index.js 6.5 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740116741116742116743116744116745116746116747116748116749116750116751116752116753116754116755116756116757116758116759116760116761116762116763116764116765116766116767116768116769116770116771116772116773116774116775116776116777116778116779116780116781116782116783116784116785116786116787116788116789116790116791116792116793116794116795116796116797116798116799116800116801116802116803116804116805116806116807116808116809116810116811116812116813116814116815116816116817116818116819116820116821116822116823116824116825116826116827116828116829116830116831116832116833116834116835116836116837116838116839116840116841116842116843116844116845116846116847116848116849116850116851116852116853116854116855116856116857116858116859116860116861116862116863116864116865116866116867116868116869116870116871116872116873116874116875116876116877116878116879116880116881116882116883116884116885116886116887116888116889116890116891116892116893116894116895116896116897116898116899116900116901116902116903116904116905116906116907116908116909116910116911116912116913116914116915116916116917116918116919116920116921116922116923116924116925116926116927116928116929116930116931116932116933116934116935116936116937116938116939116940116941116942116943116944116945116946116947116948116949116950116951116952116953116954116955116956116957116958116959116960116961116962116963116964116965116966116967116968116969116970116971116972116973116974116975116976116977116978116979116980116981116982116983116984116985116986116987116988116989116990116991116992116993116994116995116996116997116998116999117000117001117002117003117004117005117006117007117008117009117010117011117012117013117014117015117016117017117018117019117020117021117022117023117024117025117026117027117028117029117030117031117032117033117034117035117036117037117038117039117040117041117042117043117044117045117046117047117048117049117050117051117052117053117054117055117056117057117058117059117060117061117062117063117064117065117066117067117068117069117070117071117072117073117074117075117076117077117078117079117080117081117082117083117084117085117086117087117088117089117090117091117092117093117094117095117096117097117098117099117100117101117102117103117104117105117106117107117108117109117110117111117112117113117114117115117116117117117118117119117120117121117122117123117124117125117126117127117128117129117130117131117132117133117134117135117136117137117138117139117140117141117142117143117144117145117146117147117148117149117150117151117152117153117154117155117156117157117158117159117160117161117162117163117164117165117166117167117168117169117170117171117172117173117174117175117176117177117178117179117180117181117182117183117184117185117186117187117188117189117190117191117192117193117194117195117196117197117198117199117200117201117202117203117204117205117206117207117208117209117210117211117212117213117214117215117216117217117218117219117220117221117222117223117224117225117226117227117228117229117230117231117232117233117234117235117236117237117238117239117240117241117242117243117244117245117246117247117248117249117250117251117252117253117254117255117256117257117258117259117260117261117262117263117264117265117266117267117268117269117270117271117272117273117274117275117276117277117278117279117280117281117282117283117284117285117286117287117288117289117290117291117292117293117294117295117296117297117298117299117300117301117302117303117304117305117306117307117308117309117310117311117312117313117314117315117316117317117318117319117320117321117322117323117324117325117326117327117328117329117330117331117332117333117334117335117336117337117338117339117340117341117342117343117344117345117346117347117348117349117350117351117352117353117354117355117356117357117358117359117360117361117362117363117364117365117366117367117368117369117370117371117372117373117374117375117376117377117378117379117380117381117382117383117384117385117386117387117388117389117390117391117392117393117394117395117396117397117398117399117400117401117402117403117404117405117406117407117408117409117410117411117412117413117414117415117416117417117418117419117420117421117422117423117424117425117426117427117428117429117430117431117432117433117434117435117436117437117438117439117440117441117442117443117444117445117446117447117448117449117450117451117452117453117454117455117456117457117458117459117460117461117462117463117464117465117466117467117468117469117470117471117472117473117474117475117476117477117478117479117480117481117482117483117484117485117486117487117488117489117490117491117492117493117494117495117496117497117498117499117500117501117502117503117504117505117506117507117508117509117510117511117512117513117514117515117516117517117518117519117520117521117522117523117524117525117526117527117528117529117530117531117532117533117534117535117536117537117538117539117540117541117542117543117544117545117546117547117548117549117550117551117552117553117554117555117556117557117558117559117560117561117562117563117564117565117566117567117568117569117570117571117572117573117574117575117576117577117578117579117580117581117582117583117584117585117586117587117588117589117590117591117592117593117594117595117596117597117598117599117600117601117602117603117604117605117606117607117608117609117610117611117612117613117614117615117616117617117618117619117620117621117622117623117624117625117626117627117628117629117630117631117632117633117634117635117636117637117638117639117640117641117642117643117644117645117646117647117648117649117650117651117652117653117654117655117656117657117658117659117660117661117662117663117664117665117666117667117668117669117670117671117672117673117674117675117676117677117678117679117680117681117682117683117684117685117686117687117688117689117690117691117692117693117694117695117696117697117698117699117700117701117702117703117704117705117706117707117708117709117710117711117712117713117714117715117716117717117718117719117720117721117722117723117724117725117726117727117728117729117730117731117732117733117734117735117736117737117738117739117740117741117742117743117744117745117746117747117748117749117750117751117752117753117754117755117756117757117758117759117760117761117762117763117764117765117766117767117768117769117770117771117772117773117774117775117776117777117778117779117780117781117782117783117784117785117786117787117788117789117790117791117792117793117794117795117796117797117798117799117800117801117802117803117804117805117806117807117808117809117810117811117812117813117814117815117816117817117818117819117820117821117822117823117824117825117826117827117828117829117830117831117832117833117834117835117836117837117838117839117840117841117842117843117844117845117846117847117848117849117850117851117852117853117854117855117856117857117858117859117860117861117862117863117864117865117866117867117868117869117870117871117872117873117874117875117876117877117878117879117880117881117882117883117884117885117886117887117888117889117890117891117892117893117894117895117896117897117898117899117900117901117902117903117904117905117906117907117908117909117910117911117912117913117914117915117916117917117918117919117920117921117922117923117924117925117926117927117928117929117930117931117932117933117934117935117936117937117938117939117940117941117942117943117944117945117946117947117948117949117950117951117952117953117954117955117956117957117958117959117960117961117962117963117964117965117966117967117968117969117970117971117972117973117974117975117976117977117978117979117980117981117982117983117984117985117986117987117988117989117990117991117992117993117994117995117996117997117998117999118000118001118002118003118004118005118006118007118008118009118010118011118012118013118014118015118016118017118018118019118020118021118022118023118024118025118026118027118028118029118030118031118032118033118034118035118036118037118038118039118040118041118042118043118044118045118046118047118048118049118050118051118052118053118054118055118056118057118058118059118060118061118062118063118064118065118066118067118068118069118070118071118072118073118074118075118076118077118078118079118080118081118082118083118084118085118086118087118088118089118090118091118092118093118094118095118096118097118098118099118100118101118102118103118104118105118106118107118108118109118110118111118112118113118114118115118116118117118118118119118120118121118122118123118124118125118126118127118128118129118130118131118132118133118134118135118136118137118138118139118140118141118142118143118144118145118146118147118148118149118150118151118152118153118154118155118156118157118158118159118160118161118162118163118164118165118166118167118168118169118170118171118172118173118174118175118176118177118178118179118180118181118182118183118184118185118186118187118188118189118190118191118192118193118194118195118196118197118198118199118200118201118202118203118204118205118206118207118208118209118210118211118212118213118214118215118216118217118218118219118220118221118222118223118224118225118226118227118228118229118230118231118232118233118234118235118236118237118238118239118240118241118242118243118244118245118246118247118248118249118250118251118252118253118254118255118256118257118258118259118260118261118262118263118264118265118266118267118268118269118270118271118272118273118274118275118276118277118278118279118280118281118282118283118284118285118286118287118288118289118290118291118292118293118294118295118296118297118298118299118300118301118302118303118304118305118306118307118308118309118310118311118312118313118314118315118316118317118318118319118320118321118322118323118324118325118326118327118328118329118330118331118332118333118334118335118336118337118338118339118340118341118342118343118344118345118346118347118348118349118350118351118352118353118354118355118356118357118358118359118360118361118362118363118364118365118366118367118368118369118370118371118372118373118374118375118376118377118378118379118380118381118382118383118384118385118386118387118388118389118390118391118392118393118394118395118396118397118398118399118400118401118402118403118404118405118406118407118408118409118410118411118412118413118414118415118416118417118418118419118420118421118422118423118424118425118426118427118428118429118430118431118432118433118434118435118436118437118438118439118440118441118442118443118444118445118446118447118448118449118450118451118452118453118454118455118456118457118458118459118460118461118462118463118464118465118466118467118468118469118470118471118472118473118474118475118476118477118478118479118480118481118482118483118484118485118486118487118488118489118490118491118492118493118494118495118496118497118498118499118500118501118502118503118504118505118506118507118508118509118510118511118512118513118514118515118516118517118518118519118520118521118522118523118524118525118526118527118528118529118530118531118532118533118534118535118536118537118538118539118540118541118542118543118544118545118546118547118548118549118550118551118552118553118554118555118556118557118558118559118560118561118562118563118564118565118566118567118568118569118570118571118572118573118574118575118576118577118578118579118580118581118582118583118584118585118586118587118588118589118590118591118592118593118594118595118596118597118598118599118600118601118602118603118604118605118606118607118608118609118610118611118612118613118614118615118616118617118618118619118620118621118622118623118624118625118626118627118628118629118630118631118632118633118634118635118636118637118638118639118640118641118642118643118644118645118646118647118648118649118650118651118652118653118654118655118656118657118658118659118660118661118662118663118664118665118666118667118668118669118670118671118672118673118674118675118676118677118678118679118680118681118682118683118684118685118686118687118688118689118690118691118692118693118694118695118696118697118698118699118700118701118702118703118704118705118706118707118708118709118710118711118712118713118714118715118716118717118718118719118720118721118722118723118724118725118726118727118728118729118730118731118732118733118734118735118736118737118738118739118740118741118742118743118744118745118746118747118748118749118750118751118752118753118754118755118756118757118758118759118760118761118762118763118764118765118766118767118768118769118770118771118772118773118774118775118776118777118778118779118780118781118782118783118784118785118786118787118788118789118790118791118792118793118794118795118796118797118798118799118800118801118802118803118804118805118806118807118808118809118810118811118812118813118814118815118816118817118818118819118820118821118822118823118824118825118826118827118828118829118830118831118832118833118834118835118836118837118838118839118840118841118842118843118844118845118846118847118848118849118850118851118852118853118854118855118856118857118858118859118860118861118862118863118864118865118866118867118868118869118870118871118872118873118874118875118876118877118878118879118880118881118882118883118884118885118886118887118888118889118890118891118892118893118894118895118896118897118898118899118900118901118902118903118904118905118906118907118908118909118910118911118912118913118914118915118916118917118918118919118920118921118922118923118924118925118926118927118928118929118930118931118932118933118934118935118936118937118938118939118940118941118942118943118944118945118946118947118948118949118950118951118952118953118954118955118956118957118958118959118960118961118962118963118964118965118966118967118968118969118970118971118972118973118974118975118976118977118978118979118980118981118982118983118984118985118986118987118988118989118990118991118992118993118994118995118996118997118998118999119000119001119002119003119004119005119006119007119008119009119010119011119012119013119014119015119016119017119018119019119020119021119022119023119024119025119026119027119028119029119030119031119032119033119034119035119036119037119038119039119040119041119042119043119044119045119046119047119048119049119050119051119052119053119054119055119056119057119058119059119060119061119062119063119064119065119066119067119068119069119070119071119072119073119074119075119076119077119078119079119080119081119082119083119084119085119086119087119088119089119090119091119092119093119094119095119096119097119098119099119100119101119102119103119104119105119106119107119108119109119110119111119112119113119114119115119116119117119118119119119120119121119122119123119124119125119126119127119128119129119130119131119132119133119134119135119136119137119138119139119140119141119142119143119144119145119146119147119148119149119150119151119152119153119154119155119156119157119158119159119160119161119162119163119164119165119166119167119168119169119170119171119172119173119174119175119176119177119178119179119180119181119182119183119184119185119186119187119188119189119190119191119192119193119194119195119196119197119198119199119200119201119202119203119204119205119206119207119208119209119210119211119212119213119214119215119216119217119218119219119220119221119222119223119224119225119226119227119228119229119230119231119232119233119234119235119236119237119238119239119240119241119242119243119244119245119246119247119248119249119250119251119252119253119254119255119256119257119258119259119260119261119262119263119264119265119266119267119268119269119270119271119272119273119274119275119276119277119278119279119280119281119282119283119284119285119286119287119288119289119290119291119292119293119294119295119296119297119298119299119300119301119302119303119304119305119306119307119308119309119310119311119312119313119314119315119316119317119318119319119320119321119322119323119324119325119326119327119328119329119330119331119332119333119334119335119336119337119338119339119340119341119342119343119344119345119346119347119348119349119350119351119352119353119354119355119356119357119358119359119360119361119362119363119364119365119366119367119368119369119370119371119372119373119374119375119376119377119378119379119380119381119382119383119384119385119386119387119388119389119390119391119392119393119394119395119396119397119398119399119400119401119402119403119404119405119406119407119408119409119410119411119412119413119414119415119416119417119418119419119420119421119422119423119424119425119426119427119428119429119430119431119432119433119434119435119436119437119438119439119440119441119442119443119444119445119446119447119448119449119450119451119452119453119454119455119456119457119458119459119460119461119462119463119464119465119466119467119468119469119470119471119472119473119474119475119476119477119478119479119480119481119482119483119484119485119486119487119488119489119490119491119492119493119494119495119496119497119498119499119500119501119502119503119504119505119506119507119508119509119510119511119512119513119514119515119516119517119518119519119520119521119522119523119524119525119526119527119528119529119530119531119532119533119534119535119536119537119538119539119540119541119542119543119544119545119546119547119548119549119550119551119552119553119554119555119556119557119558119559119560119561119562119563119564119565119566119567119568119569119570119571119572119573119574119575119576119577119578119579119580119581119582119583119584119585119586119587119588119589119590119591119592119593119594119595119596119597119598119599119600119601119602119603119604119605119606119607119608119609119610119611119612119613119614119615119616119617119618119619119620119621119622119623119624119625119626119627119628119629119630119631119632119633119634119635119636119637119638119639119640119641119642119643119644119645119646119647119648119649119650119651119652119653119654119655119656119657119658119659119660119661119662119663119664119665119666119667119668119669119670119671119672119673119674119675119676119677119678119679119680119681119682119683119684119685119686119687119688119689119690119691119692119693119694119695119696119697119698119699119700119701119702119703119704119705119706119707119708119709119710119711119712119713119714119715119716119717119718119719119720119721119722119723119724119725119726119727119728119729119730119731119732119733119734119735119736119737119738119739119740119741119742119743119744119745119746119747119748119749119750119751119752119753119754119755119756119757119758119759119760119761119762119763119764119765119766119767119768119769119770119771119772119773119774119775119776119777119778119779119780119781119782119783119784119785119786119787119788119789119790119791119792119793119794119795119796119797119798119799119800119801119802119803119804119805119806119807119808119809119810119811119812119813119814119815119816119817119818119819119820119821119822119823119824119825119826119827119828119829119830119831119832119833119834119835119836119837119838119839119840119841119842119843119844119845119846119847119848119849119850119851119852119853119854119855119856119857119858119859119860119861119862119863119864119865119866119867119868119869119870119871119872119873119874119875119876119877119878119879119880119881119882119883119884119885119886119887119888119889119890119891119892119893119894119895119896119897119898119899119900119901119902119903119904119905119906119907119908119909119910119911119912119913119914119915119916119917119918119919119920119921119922119923119924119925119926119927119928119929119930119931119932119933119934119935119936119937119938119939119940119941119942119943119944119945119946119947119948119949119950119951119952119953119954119955119956119957119958119959119960119961119962119963119964119965119966119967119968119969119970119971119972119973119974119975119976119977119978119979119980119981119982119983119984119985119986119987119988119989119990119991119992119993119994119995119996119997119998119999120000120001120002120003120004120005120006120007120008120009120010120011120012120013120014120015120016120017120018120019120020120021120022120023120024120025120026120027120028120029120030120031120032120033120034120035120036120037120038120039120040120041120042120043120044120045120046120047120048120049120050120051120052120053120054120055120056120057120058120059120060120061120062120063120064120065120066120067120068120069120070120071120072120073120074120075120076120077120078120079120080120081120082120083120084120085120086120087120088120089120090120091120092120093120094120095120096120097120098120099120100120101120102120103120104120105120106120107120108120109120110120111120112120113120114120115120116120117120118120119120120120121120122120123120124120125120126120127120128120129120130120131120132120133120134120135120136120137120138120139120140120141120142120143120144120145120146120147120148120149120150120151120152120153120154120155120156120157120158120159120160120161120162120163120164120165120166120167120168120169120170120171120172120173120174120175120176120177120178120179120180120181120182120183120184120185120186120187120188120189120190120191120192120193120194120195120196120197120198120199120200120201120202120203120204120205120206120207120208120209120210120211120212120213120214120215120216120217120218120219120220120221120222120223120224120225120226120227120228120229120230120231120232120233120234120235120236120237120238120239120240120241120242120243120244120245120246120247120248120249120250120251120252120253120254120255120256120257120258120259120260120261120262120263120264120265120266120267120268120269120270120271120272120273120274120275120276120277120278120279120280120281120282120283120284120285120286120287120288120289120290120291120292120293120294120295120296120297120298120299120300120301120302120303120304120305120306120307120308120309120310120311120312120313120314120315120316120317120318120319120320120321120322120323120324120325120326120327120328120329120330120331120332120333120334120335120336120337120338120339120340120341120342120343120344120345120346120347120348120349120350120351120352120353120354120355120356120357120358120359120360120361120362120363120364120365120366120367120368120369120370120371120372120373120374120375120376120377120378120379120380120381120382120383120384120385120386120387120388120389120390120391120392120393120394120395120396120397120398120399120400120401120402120403120404120405120406120407120408120409120410120411120412120413120414120415120416120417120418120419120420120421120422120423120424120425120426120427120428120429120430120431120432120433120434120435120436120437120438120439120440120441120442120443120444120445120446120447120448120449120450120451120452120453120454120455120456120457120458120459120460120461120462120463120464120465120466120467120468120469120470120471120472120473120474120475120476120477120478120479120480120481120482120483120484120485120486120487120488120489120490120491120492120493120494120495120496120497120498120499120500120501120502120503120504120505120506120507120508120509120510120511120512120513120514120515120516120517120518120519120520120521120522120523120524120525120526120527120528120529120530120531120532120533120534120535120536120537120538120539120540120541120542120543120544120545120546120547120548120549120550120551120552120553120554120555120556120557120558120559120560120561120562120563120564120565120566120567120568120569120570120571120572120573120574120575120576120577120578120579120580120581120582120583120584120585120586120587120588120589120590120591120592120593120594120595120596120597120598120599120600120601120602120603120604120605120606120607120608120609120610120611120612120613120614120615120616120617120618120619120620120621120622120623120624120625120626120627120628120629120630120631120632120633120634120635120636120637120638120639120640120641120642120643120644120645120646120647120648120649120650120651120652120653120654120655120656120657120658120659120660120661120662120663120664120665120666120667120668120669120670120671120672120673120674120675120676120677120678120679120680120681120682120683120684120685120686120687120688120689120690120691120692120693120694120695120696120697120698120699120700120701120702120703120704120705120706120707120708120709120710120711120712120713120714120715120716120717120718120719120720120721120722120723120724120725120726120727120728120729120730120731120732120733120734120735120736120737120738120739120740120741120742120743120744120745120746120747120748120749120750120751120752120753120754120755120756120757120758120759120760120761120762120763120764120765120766120767120768120769120770120771120772120773120774120775120776120777120778120779120780120781120782120783120784120785120786120787120788120789120790120791120792120793120794120795120796120797120798120799120800120801120802120803120804120805120806120807120808120809120810120811120812120813120814120815120816120817120818120819120820120821120822120823120824120825120826120827120828120829120830120831120832120833120834120835120836120837120838120839120840120841120842120843120844120845120846120847120848120849120850120851120852120853120854120855120856120857120858120859120860120861120862120863120864120865120866120867120868120869120870120871120872120873120874120875120876120877120878120879120880120881120882120883120884120885120886120887120888120889120890120891120892120893120894120895120896120897120898120899120900120901120902120903120904120905120906120907120908120909120910120911120912120913120914120915120916120917120918120919120920120921120922120923120924120925120926120927120928120929120930120931120932120933120934120935120936120937120938120939120940120941120942120943120944120945120946120947120948120949120950120951120952120953120954120955120956120957120958120959120960120961120962120963120964120965120966120967120968120969120970120971120972120973120974120975120976120977120978120979120980120981120982120983120984120985120986120987120988120989120990120991120992120993120994120995120996120997120998120999121000121001121002121003121004121005121006121007121008121009121010121011121012121013121014121015121016121017121018121019121020121021121022121023121024121025121026121027121028121029121030121031121032121033121034121035121036121037121038121039121040121041121042121043121044121045121046121047121048121049121050121051121052121053121054121055121056121057121058121059121060121061121062121063121064121065121066121067121068121069121070121071121072121073121074121075121076121077121078121079121080121081121082121083121084121085121086121087121088121089121090121091121092121093121094121095121096121097121098121099121100121101121102121103121104121105121106121107121108121109121110121111121112121113121114121115121116121117121118121119121120121121121122121123121124121125121126121127121128121129121130121131121132121133121134121135121136121137121138121139121140121141121142121143121144121145121146121147121148121149121150121151121152121153121154121155121156121157121158121159121160121161121162121163121164121165121166121167121168121169121170121171121172121173121174121175121176121177121178121179121180121181121182121183121184121185121186121187121188121189121190121191121192121193121194121195121196121197121198121199121200121201121202121203121204121205121206121207121208121209121210121211121212121213121214121215121216121217121218121219121220121221121222121223121224121225121226121227121228121229121230121231121232121233121234121235121236121237121238121239121240121241121242121243121244121245121246121247121248121249121250121251121252121253121254121255121256121257121258121259121260121261121262121263121264121265121266121267121268121269121270121271121272121273121274121275121276121277121278121279121280121281121282121283121284121285121286121287121288121289121290121291121292121293121294121295121296121297121298121299121300121301121302121303121304121305121306121307121308121309121310121311121312121313121314121315121316121317121318121319121320121321121322121323121324121325121326121327121328121329121330121331121332121333121334121335121336121337121338121339121340121341121342121343121344121345121346121347121348121349121350121351121352121353121354121355121356121357121358121359121360121361121362121363121364121365121366121367121368121369121370121371121372121373121374121375121376121377121378121379121380121381121382121383121384121385121386121387121388121389121390121391121392121393121394121395121396121397121398121399121400121401121402121403121404121405121406121407121408121409121410121411121412121413121414121415121416121417121418121419121420121421121422121423121424121425121426121427121428121429121430121431121432121433121434121435121436121437121438121439121440121441121442121443121444121445121446121447121448121449121450121451121452121453121454121455121456121457121458121459121460121461121462121463121464121465121466121467121468121469121470121471121472121473121474121475121476121477121478121479121480121481121482121483121484121485121486121487121488121489121490121491121492121493121494121495121496121497121498121499121500121501121502121503121504121505121506121507121508121509121510121511121512121513121514121515121516121517121518121519121520121521121522121523121524121525121526121527121528121529121530121531121532121533121534121535121536121537121538121539121540121541121542121543121544121545121546121547121548121549121550121551121552121553121554121555121556121557121558121559121560121561121562121563121564121565121566121567121568121569121570121571121572121573121574121575121576121577121578121579121580121581121582121583121584121585121586121587121588121589121590121591121592121593121594121595121596121597121598121599121600121601121602121603121604121605121606121607121608121609121610121611121612121613121614121615121616121617121618121619121620121621121622121623121624121625121626121627121628121629121630121631121632121633121634121635121636121637121638121639121640121641121642121643121644121645121646121647121648121649121650121651121652121653121654121655121656121657121658121659121660121661121662121663121664121665121666121667121668121669121670121671121672121673121674121675121676121677121678121679121680121681121682121683121684121685121686121687121688121689121690121691121692121693121694121695121696121697121698121699121700121701121702121703121704121705121706121707121708121709121710121711121712121713121714121715121716121717121718121719121720121721121722121723121724121725121726121727121728121729121730121731121732121733121734121735121736121737121738121739121740121741121742121743121744121745121746121747121748121749121750121751121752121753121754121755121756121757121758121759121760121761121762121763121764121765121766121767121768121769121770121771121772121773121774121775121776121777121778121779121780121781121782121783121784121785121786121787121788121789121790121791121792121793121794121795121796121797121798121799121800121801121802121803121804121805121806121807121808121809121810121811121812121813121814121815121816121817121818121819121820121821121822121823121824121825121826121827121828121829121830121831121832121833121834121835121836121837121838121839121840121841121842121843121844121845121846121847121848121849121850121851121852121853121854121855121856121857121858121859121860121861121862121863121864121865121866121867121868121869121870121871121872121873121874121875121876121877121878121879121880121881121882121883121884121885121886121887121888121889121890121891121892121893121894121895121896121897121898121899121900121901121902121903121904121905121906121907121908121909121910121911121912121913121914121915121916121917121918121919121920121921121922121923121924121925121926121927121928121929121930121931121932121933121934121935121936121937121938121939121940121941121942121943121944121945121946121947121948121949121950121951121952121953121954121955121956121957121958121959121960121961121962121963121964121965121966121967121968121969121970121971121972121973121974121975121976121977121978121979121980121981121982121983121984121985121986121987121988121989121990121991121992121993121994121995121996121997121998121999122000122001122002122003122004122005122006122007122008122009122010122011122012122013122014122015122016122017122018122019122020122021122022122023122024122025122026122027122028122029122030122031122032122033122034122035122036122037122038122039122040122041122042122043122044122045122046122047122048122049122050122051122052122053122054122055122056122057122058122059122060122061122062122063122064122065122066122067122068122069122070122071122072122073122074122075122076122077122078122079122080122081122082122083122084122085122086122087122088122089122090122091122092122093122094122095122096122097122098122099122100122101122102122103122104122105122106122107122108122109122110122111122112122113122114122115122116122117122118122119122120122121122122122123122124122125122126122127122128122129122130122131122132122133122134122135122136122137122138122139122140122141122142122143122144122145122146122147122148122149122150122151122152122153122154122155122156122157122158122159122160122161122162122163122164122165122166122167122168122169122170122171122172122173122174122175122176122177122178122179122180122181122182122183122184122185122186122187122188122189122190122191122192122193122194122195122196122197122198122199122200122201122202122203122204122205122206122207122208122209122210122211122212122213122214122215122216122217122218122219122220122221122222122223122224122225122226122227122228122229122230122231122232122233122234122235122236122237122238122239122240122241122242122243122244122245122246122247122248122249122250122251122252122253122254122255122256122257122258122259122260122261122262122263122264122265122266122267122268122269122270122271122272122273122274122275122276122277122278122279122280122281122282122283122284122285122286122287122288122289122290122291122292122293122294122295122296122297122298122299122300122301122302122303122304122305122306122307122308122309122310122311122312122313122314122315122316122317122318122319122320122321122322122323122324122325122326122327122328122329122330122331122332122333122334122335122336122337122338122339122340122341122342122343122344122345122346122347122348122349122350122351122352122353122354122355122356122357122358122359122360122361122362122363122364122365122366122367122368122369122370122371122372122373122374122375122376122377122378122379122380122381122382122383122384122385122386122387122388122389122390122391122392122393122394122395122396122397122398122399122400122401122402122403122404122405122406122407122408122409122410122411122412122413122414122415122416122417122418122419122420122421122422122423122424122425122426122427122428122429122430122431122432122433122434122435122436122437122438122439122440122441122442122443122444122445122446122447122448122449122450122451122452122453122454122455122456122457122458122459122460122461122462122463122464122465122466122467122468122469122470122471122472122473122474122475122476122477122478122479122480122481122482122483122484122485122486122487122488122489122490122491122492122493122494122495122496122497122498122499122500122501122502122503122504122505122506122507122508122509122510122511122512122513122514122515122516122517122518122519122520122521122522122523122524122525122526122527122528122529122530122531122532122533122534122535122536122537122538122539122540122541122542122543122544122545122546122547122548122549122550122551122552122553122554122555122556122557122558122559122560122561122562122563122564122565122566122567122568122569122570122571122572122573122574122575122576122577122578122579122580122581122582122583122584122585122586122587122588122589122590122591122592122593122594122595122596122597122598122599122600122601122602122603122604122605122606122607122608122609122610122611122612122613122614122615122616122617122618122619122620122621122622122623122624122625122626122627122628122629122630122631122632122633122634122635122636122637122638122639122640122641122642122643122644122645122646122647122648122649122650122651122652122653122654122655122656122657122658122659122660122661122662122663122664122665122666122667122668122669122670122671122672122673122674122675122676122677122678122679122680122681122682122683122684122685122686122687122688122689122690122691122692122693122694122695122696122697122698122699122700122701122702122703122704122705122706122707122708122709122710122711122712122713122714122715122716122717122718122719122720122721122722122723122724122725122726122727122728122729122730122731122732122733122734122735122736122737122738122739122740122741122742122743122744122745122746122747122748122749122750122751122752122753122754122755122756122757122758122759122760122761122762122763122764122765122766122767122768122769122770122771122772122773122774122775122776122777122778122779122780122781122782122783122784122785122786122787122788122789122790122791122792122793122794122795122796122797122798122799122800122801122802122803122804122805122806122807122808122809122810122811122812122813122814122815122816122817122818122819122820122821122822122823122824122825122826122827122828122829122830122831122832122833122834122835122836122837122838122839122840122841122842122843122844122845122846122847122848122849122850122851122852122853122854122855122856122857122858122859122860122861122862122863122864122865122866122867122868122869122870122871122872122873122874122875122876122877122878122879122880122881122882122883122884122885122886122887122888122889122890122891122892122893122894122895122896122897122898122899122900122901122902122903122904122905122906122907122908122909122910122911122912122913122914122915122916122917122918122919122920122921122922122923122924122925122926122927122928122929122930122931122932122933122934122935122936122937122938122939122940122941122942122943122944122945122946122947122948122949122950122951122952122953122954122955122956122957122958122959122960122961122962122963122964122965122966122967122968122969122970122971122972122973122974122975122976122977122978122979122980122981122982122983122984122985122986122987122988122989122990122991122992122993122994122995122996122997122998122999123000123001123002123003123004123005123006123007123008123009123010123011123012123013123014123015123016123017123018123019123020123021123022123023123024123025123026123027123028123029123030123031123032123033123034123035123036123037123038123039123040123041123042123043123044123045123046123047123048123049123050123051123052123053123054123055123056123057123058123059123060123061123062123063123064123065123066123067123068123069123070123071123072123073123074123075123076123077123078123079123080123081123082123083123084123085123086123087123088123089123090123091123092123093123094123095123096123097123098123099123100123101123102123103123104123105123106123107123108123109123110123111123112123113123114123115123116123117123118123119123120123121123122123123123124123125123126123127123128123129123130123131123132123133123134123135123136123137123138123139123140123141123142123143123144123145123146123147123148123149123150123151123152123153123154123155123156123157123158123159123160123161123162123163123164123165123166123167123168123169123170123171123172123173123174123175123176123177123178123179123180123181123182123183123184123185123186123187123188123189123190123191123192123193123194123195123196123197123198123199123200123201123202123203123204123205123206123207123208123209123210123211123212123213123214123215123216123217123218123219123220123221123222123223123224123225123226123227123228123229123230123231123232123233123234123235123236123237123238123239123240123241123242123243123244123245123246123247123248123249123250123251123252123253123254123255123256123257123258123259123260123261123262123263123264123265123266123267123268123269123270123271123272123273123274123275123276123277123278123279123280123281123282123283123284123285123286123287123288123289123290123291123292123293123294123295123296123297123298123299123300123301123302123303123304123305123306123307123308123309123310123311123312123313123314123315123316123317123318123319123320123321123322123323123324123325123326123327123328123329123330123331123332123333123334123335123336123337123338123339123340123341123342123343123344123345123346123347123348123349123350123351123352123353123354123355123356123357123358123359123360123361123362123363123364123365123366123367123368123369123370123371123372123373123374123375123376123377123378123379123380123381123382123383123384123385123386123387123388123389123390123391123392123393123394123395123396123397123398123399123400123401123402123403123404123405123406123407123408123409123410123411123412123413123414123415123416123417123418123419123420123421123422123423123424123425123426123427123428123429123430123431123432123433123434123435123436123437123438123439123440123441123442123443123444123445123446123447123448123449123450123451123452123453123454123455123456123457123458123459123460123461123462123463123464123465123466123467123468123469123470123471123472123473123474123475123476123477123478123479123480123481123482123483123484123485123486123487123488123489123490123491123492123493123494123495123496123497123498123499123500123501123502123503123504123505123506123507123508123509123510123511123512123513123514123515123516123517123518123519123520123521123522123523123524123525123526123527123528123529123530123531123532123533123534123535123536123537123538123539123540123541123542123543123544123545123546123547123548123549123550123551123552123553123554123555123556123557123558123559123560123561123562123563123564123565123566123567123568123569123570123571123572123573123574123575123576123577123578123579123580123581123582123583123584123585123586123587123588123589123590123591123592123593123594123595123596123597123598123599123600123601123602123603123604123605123606123607123608123609123610123611123612123613123614123615123616123617123618123619123620123621123622123623123624123625123626123627123628123629123630123631123632123633123634123635123636123637123638123639123640123641123642123643123644123645123646123647123648123649123650123651123652123653123654123655123656123657123658123659123660123661123662123663123664123665123666123667123668123669123670123671123672123673123674123675123676123677123678123679123680123681123682123683123684123685123686123687123688123689123690123691123692123693123694123695123696123697123698123699123700123701123702123703123704123705123706123707123708123709123710123711123712123713123714123715123716123717123718123719123720123721123722123723123724123725123726123727123728123729123730123731123732123733123734123735123736123737123738123739123740123741123742123743123744123745123746123747123748123749123750123751123752123753123754123755123756123757123758123759123760123761123762123763123764123765123766123767123768123769123770123771123772123773123774123775123776123777123778123779123780123781123782123783123784123785123786123787123788123789123790123791123792123793123794123795123796123797123798123799123800123801123802123803123804123805123806123807123808123809123810123811123812123813123814123815123816123817123818123819123820123821123822123823123824123825123826123827123828123829123830123831123832123833123834123835123836123837123838123839123840123841123842123843123844123845123846123847123848123849123850123851123852123853123854123855123856123857123858123859123860123861123862123863123864123865123866123867123868123869123870123871123872123873123874123875123876123877123878123879123880123881123882123883123884123885123886123887123888123889123890123891123892123893123894123895123896123897123898123899123900123901123902123903123904123905123906123907123908123909123910123911123912123913123914123915123916123917123918123919123920123921123922123923123924123925123926123927123928123929123930123931123932123933123934123935123936123937123938123939123940123941123942123943123944123945123946123947123948123949123950123951123952123953123954123955123956123957123958123959123960123961123962123963123964123965123966123967123968123969123970123971123972123973123974123975123976123977123978123979123980123981123982123983123984123985123986123987123988123989123990123991123992123993123994123995123996123997123998123999124000124001124002124003124004124005124006124007124008124009124010124011124012124013124014124015124016124017124018124019124020124021124022124023124024124025124026124027124028124029124030124031124032124033124034124035124036124037124038124039124040124041124042124043124044124045124046124047124048124049124050124051124052124053124054124055124056124057124058124059124060124061124062124063124064124065124066124067124068124069124070124071124072124073124074124075124076124077124078124079124080124081124082124083124084124085124086124087124088124089124090124091124092124093124094124095124096124097124098124099124100124101124102124103124104124105124106124107124108124109124110124111124112124113124114124115124116124117124118124119124120124121124122124123124124124125124126124127124128124129124130124131124132124133124134124135124136124137124138124139124140124141124142124143124144124145124146124147124148124149124150124151124152124153124154124155124156124157124158124159124160124161124162124163124164124165124166124167124168124169124170124171124172124173124174124175124176124177124178124179124180124181124182124183124184124185124186124187124188124189124190124191124192124193124194124195124196124197124198124199124200124201124202124203124204124205124206124207124208124209124210124211124212124213124214124215124216124217124218124219124220124221124222124223124224124225124226124227124228124229124230124231124232124233124234124235124236124237124238124239124240124241124242124243124244124245124246124247124248124249124250124251124252124253124254124255124256124257124258124259124260124261124262124263124264124265124266124267124268124269124270124271124272124273124274124275124276124277124278124279124280124281124282124283124284124285124286124287124288124289124290124291124292124293124294124295124296124297124298124299124300124301124302124303124304124305124306124307124308124309124310124311124312124313124314124315124316124317124318124319124320124321124322124323124324124325124326124327124328124329124330124331124332124333124334124335124336124337124338124339124340124341124342124343124344124345124346124347124348124349124350124351124352124353124354124355124356124357124358124359124360124361124362124363124364124365124366124367124368124369124370124371124372124373124374124375124376124377124378124379124380124381124382124383124384124385124386124387124388124389124390124391124392124393124394124395124396124397124398124399124400124401124402124403124404124405124406124407124408124409124410124411124412124413124414124415124416124417124418124419124420124421124422124423124424124425124426124427124428124429124430124431124432124433124434124435124436124437124438124439124440124441124442124443124444124445124446124447124448124449124450124451124452124453124454124455124456124457124458124459124460124461124462124463124464124465124466124467124468124469124470124471124472124473124474124475124476124477124478124479124480124481124482124483124484124485124486124487124488124489124490124491124492124493124494124495124496124497124498124499124500124501124502124503124504124505124506124507124508124509124510124511124512124513124514124515124516124517124518124519124520124521124522124523124524124525124526124527124528124529124530124531124532124533124534124535124536124537124538124539124540124541124542124543124544124545124546124547124548124549124550124551124552124553124554124555124556124557124558124559124560124561124562124563124564124565124566124567124568124569124570124571124572124573124574124575124576124577124578124579124580124581124582124583124584124585124586124587124588124589124590124591124592124593124594124595124596124597124598124599124600124601124602124603124604124605124606124607124608124609124610124611124612124613124614124615124616124617124618124619124620124621124622124623124624124625124626124627124628124629124630124631124632124633124634124635124636124637124638124639124640124641124642124643124644124645124646124647124648124649124650124651124652124653124654124655124656124657124658124659124660124661124662124663124664124665124666124667124668124669124670124671124672124673124674124675124676124677124678124679124680124681124682124683124684124685124686124687124688124689124690124691124692124693124694124695124696124697124698124699124700124701124702124703124704124705124706124707124708124709124710124711124712124713124714124715124716124717124718124719124720124721124722124723124724124725124726124727124728124729124730124731124732124733124734124735124736124737124738124739124740124741124742124743124744124745124746124747124748124749124750124751124752124753124754124755124756124757124758124759124760124761124762124763124764124765124766124767124768124769124770124771124772124773124774124775124776124777124778124779124780124781124782124783124784124785124786124787124788124789124790124791124792124793124794124795124796124797124798124799124800124801124802124803124804124805124806124807124808124809124810124811124812124813124814124815124816124817124818124819124820124821124822124823124824124825124826124827124828124829124830124831124832124833124834124835124836124837124838124839124840124841124842124843124844124845124846124847124848124849124850124851124852124853124854124855124856124857124858124859124860124861124862124863124864124865124866124867124868124869124870124871124872124873124874124875124876124877124878124879124880124881124882124883124884124885124886124887124888124889124890124891124892124893124894124895124896124897124898124899124900124901124902124903124904124905124906124907124908124909124910124911124912124913124914124915124916124917124918124919124920124921124922124923124924124925124926124927124928124929124930124931124932124933124934124935124936124937124938124939124940124941124942124943124944124945124946124947124948124949124950124951124952124953124954124955124956124957124958124959124960124961124962124963124964124965124966124967124968124969124970124971124972124973124974124975124976124977124978124979124980124981124982124983124984124985124986124987124988124989124990124991124992124993124994124995124996124997124998124999125000125001125002125003125004125005125006125007125008125009125010125011125012125013125014125015125016125017125018125019125020125021125022125023125024125025125026125027125028125029125030125031125032125033125034125035125036125037125038125039125040125041125042125043125044125045125046125047125048125049125050125051125052125053125054125055125056125057125058125059125060125061125062125063125064125065125066125067125068125069125070125071125072125073125074125075125076125077125078125079125080125081125082125083125084125085125086125087125088125089125090125091125092125093125094125095125096125097125098125099125100125101125102125103125104125105125106125107125108125109125110125111125112125113125114125115125116125117125118125119125120125121125122125123125124125125125126125127125128125129125130125131125132125133125134125135125136125137125138125139125140125141125142125143125144125145125146125147125148125149125150125151125152125153125154125155125156125157125158125159125160125161125162125163125164125165125166125167125168125169125170125171125172125173125174125175125176125177125178125179125180125181125182125183125184125185125186125187125188125189125190125191125192125193125194125195125196125197125198125199125200125201125202125203125204125205125206125207125208125209125210125211125212125213125214125215125216125217125218125219125220125221125222125223125224125225125226125227125228125229125230125231125232125233125234125235125236125237125238125239125240125241125242125243125244125245125246125247125248125249125250125251125252125253125254125255125256125257125258125259125260125261125262125263125264125265125266125267125268125269125270125271125272125273125274125275125276125277125278125279125280125281125282125283125284125285125286125287125288125289125290125291125292125293125294125295125296125297125298125299125300125301125302125303125304125305125306125307125308125309125310125311125312125313125314125315125316125317125318125319125320125321125322125323125324125325125326125327125328125329125330125331125332125333125334125335125336125337125338125339125340125341125342125343125344125345125346125347125348125349125350125351125352125353125354125355125356125357125358125359125360125361125362125363125364125365125366125367125368125369125370125371125372125373125374125375125376125377125378125379125380125381125382125383125384125385125386125387125388125389125390125391125392125393125394125395125396125397125398125399125400125401125402125403125404125405125406125407125408125409125410125411125412125413125414125415125416125417125418125419125420125421125422125423125424125425125426125427125428125429125430125431125432125433125434125435125436125437125438125439125440125441125442125443125444125445125446125447125448125449125450125451125452125453125454125455125456125457125458125459125460125461125462125463125464125465125466125467125468125469125470125471125472125473125474125475125476125477125478125479125480125481125482125483125484125485125486125487125488125489125490125491125492125493125494125495125496125497125498125499125500125501125502125503125504125505125506125507125508125509125510125511125512125513125514125515125516125517125518125519125520125521125522125523125524125525125526125527125528125529125530125531125532125533125534125535125536125537125538125539125540125541125542125543125544125545125546125547125548125549125550125551125552125553125554125555125556125557125558125559125560125561125562125563125564125565125566125567125568125569125570125571125572125573125574125575125576125577125578125579125580125581125582125583125584125585125586125587125588125589125590125591125592125593125594125595125596125597125598125599125600125601125602125603125604125605125606125607125608125609125610125611125612125613125614125615125616125617125618125619125620125621125622125623125624125625125626125627125628125629125630125631125632125633125634125635125636125637125638125639125640125641125642125643125644125645125646125647125648125649125650125651125652125653125654125655125656125657125658125659125660125661125662125663125664125665125666125667125668125669125670125671125672125673125674125675125676125677125678125679125680125681125682125683125684125685125686125687125688125689125690125691125692125693125694125695125696125697125698125699125700125701125702125703125704125705125706125707125708125709125710125711125712125713125714125715125716125717125718125719125720125721125722125723125724125725125726125727125728125729125730125731125732125733125734125735125736125737125738125739125740125741125742125743125744125745125746125747125748125749125750125751125752125753125754125755125756125757125758125759125760125761125762125763125764125765125766125767125768125769125770125771125772125773125774125775125776125777125778125779125780125781125782125783125784125785125786125787125788125789125790125791125792125793125794125795125796125797125798125799125800125801125802125803125804125805125806125807125808125809125810125811125812125813125814125815125816125817125818125819125820125821125822125823125824125825125826125827125828125829125830125831125832125833125834125835125836125837125838125839125840125841125842125843125844125845125846125847125848125849125850125851125852125853125854125855125856125857125858125859125860125861125862125863125864125865125866125867125868125869125870125871125872125873125874125875125876125877125878125879125880125881125882125883125884125885125886125887125888125889125890125891125892125893125894125895125896125897125898125899125900125901125902125903125904125905125906125907125908125909125910125911125912125913125914125915125916125917125918125919125920125921125922125923125924125925125926125927125928125929125930125931125932125933125934125935125936125937125938125939125940125941125942125943125944125945125946125947125948125949125950125951125952125953125954125955125956125957125958125959125960125961125962125963125964125965125966125967125968125969125970125971125972125973125974125975125976125977125978125979125980125981125982125983125984125985125986125987125988125989125990125991125992125993125994125995125996125997125998125999126000126001126002126003126004126005126006126007126008126009126010126011126012126013126014126015126016126017126018126019126020126021126022126023126024126025126026126027126028126029126030126031126032126033126034126035126036126037126038126039126040126041126042126043126044126045126046126047126048126049126050126051126052126053126054126055126056126057126058126059126060126061126062126063126064126065126066126067126068126069126070126071126072126073126074126075126076126077126078126079126080126081126082126083126084126085126086126087126088126089126090126091126092126093126094126095126096126097126098126099126100126101126102126103126104126105126106126107126108126109126110126111126112126113126114126115126116126117126118126119126120126121126122126123126124126125126126126127126128126129126130126131126132126133126134126135126136126137126138126139126140126141126142126143126144126145126146126147126148126149126150126151126152126153126154126155126156126157126158126159126160126161126162126163126164126165126166126167126168126169126170126171126172126173126174126175126176126177126178126179126180126181126182126183126184126185126186126187126188126189126190126191126192126193126194126195126196126197126198126199126200126201126202126203126204126205126206126207126208126209126210126211126212126213126214126215126216126217126218126219126220126221126222126223126224126225126226126227126228126229126230126231126232126233126234126235126236126237126238126239126240126241126242126243126244126245126246126247126248126249126250126251126252126253126254126255126256126257126258126259126260126261126262126263126264126265126266126267126268126269126270126271126272126273126274126275126276126277126278126279126280126281126282126283126284126285126286126287126288126289126290126291126292126293126294126295126296126297126298126299126300126301126302126303126304126305126306126307126308126309126310126311126312126313126314126315126316126317126318126319126320126321126322126323126324126325126326126327126328126329126330126331126332126333126334126335126336126337126338126339126340126341126342126343126344126345126346126347126348126349126350126351126352126353126354126355126356126357126358126359126360126361126362126363126364126365126366126367126368126369126370126371126372126373126374126375126376126377126378126379126380126381126382126383126384126385126386126387126388126389126390126391126392126393126394126395126396126397126398126399126400126401126402126403126404126405126406126407126408126409126410126411126412126413126414126415126416126417126418126419126420126421126422126423126424126425126426126427126428126429126430126431126432126433126434126435126436126437126438126439126440126441126442126443126444126445126446126447126448126449126450126451126452126453126454126455126456126457126458126459126460126461126462126463126464126465126466126467126468126469126470126471126472126473126474126475126476126477126478126479126480126481126482126483126484126485126486126487126488126489126490126491126492126493126494126495126496126497126498126499126500126501126502126503126504126505126506126507126508126509126510126511126512126513126514126515126516126517126518126519126520126521126522126523126524126525126526126527126528126529126530126531126532126533126534126535126536126537126538126539126540126541126542126543126544126545126546126547126548126549126550126551126552126553126554126555126556126557126558126559126560126561126562126563126564126565126566126567126568126569126570126571126572126573126574126575126576126577126578126579126580126581126582126583126584126585126586126587126588126589126590126591126592126593126594126595126596126597126598126599126600126601126602126603126604126605126606126607126608126609126610126611126612126613126614126615126616126617126618126619126620126621126622126623126624126625126626126627126628126629126630126631126632126633126634126635126636126637126638126639126640126641126642126643126644126645126646126647126648126649126650126651126652126653126654126655126656126657126658126659126660126661126662126663126664126665126666126667126668126669126670126671126672126673126674126675126676126677126678126679126680126681126682126683126684126685126686126687126688126689126690126691126692126693126694126695126696126697126698126699126700126701126702126703126704126705126706126707126708126709126710126711126712126713126714126715126716126717126718126719126720126721126722126723126724126725126726126727126728126729126730126731126732126733126734126735126736126737126738126739126740126741126742126743126744126745126746126747126748126749126750126751126752126753126754126755126756126757126758126759126760126761126762126763126764126765126766126767126768126769126770126771126772126773126774126775126776126777126778126779126780126781126782126783126784126785126786126787126788126789126790126791126792126793126794126795126796126797126798126799126800126801126802126803126804126805126806126807126808126809126810126811126812126813126814126815126816126817126818126819126820126821126822126823126824126825126826126827126828126829126830126831126832126833126834126835126836126837126838126839126840126841126842126843126844126845126846126847126848126849126850126851126852126853126854126855126856126857126858126859126860126861126862126863126864126865126866126867126868126869126870126871126872126873126874126875126876126877126878126879126880126881126882126883126884126885126886126887126888126889126890126891126892126893126894126895126896126897126898126899126900126901126902126903126904126905126906126907126908126909126910126911126912126913126914126915126916126917126918126919126920126921126922126923126924126925126926126927126928126929126930126931126932126933126934126935126936126937126938126939126940126941126942126943126944126945126946126947126948126949126950126951126952126953126954126955126956126957126958126959126960126961126962126963126964126965126966126967126968126969126970126971126972126973126974126975126976126977126978126979126980126981126982126983126984126985126986126987126988126989126990126991126992126993126994126995126996126997126998126999127000127001127002127003127004127005127006127007127008127009127010127011127012127013127014127015127016127017127018127019127020127021127022127023127024127025127026127027127028127029127030127031127032127033127034127035127036127037127038127039127040127041127042127043127044127045127046127047127048127049127050127051127052127053127054127055127056127057127058127059127060127061127062127063127064127065127066127067127068127069127070127071127072127073127074127075127076127077127078127079127080127081127082127083127084127085127086127087127088127089127090127091127092127093127094127095127096127097127098127099127100127101127102127103127104127105127106127107127108127109127110127111127112127113127114127115127116127117127118127119127120127121127122127123127124127125127126127127127128127129127130127131127132127133127134127135127136127137127138127139127140127141127142127143127144127145127146127147127148127149127150127151127152127153127154127155127156127157127158127159127160127161127162127163127164127165127166127167127168127169127170127171127172127173127174127175127176127177127178127179127180127181127182127183127184127185127186127187127188127189127190127191127192127193127194127195127196127197127198127199127200127201127202127203127204127205127206127207127208127209127210127211127212127213127214127215127216127217127218127219127220127221127222127223127224127225127226127227127228127229127230127231127232127233127234127235127236127237127238127239127240127241127242127243127244127245127246127247127248127249127250127251127252127253127254127255127256127257127258127259127260127261127262127263127264127265127266127267127268127269127270127271127272127273127274127275127276127277127278127279127280127281127282127283127284127285127286127287127288127289127290127291127292127293127294127295127296127297127298127299127300127301127302127303127304127305127306127307127308127309127310127311127312127313127314127315127316127317127318127319127320127321127322127323127324127325127326127327127328127329127330127331127332127333127334127335127336127337127338127339127340127341127342127343127344127345127346127347127348127349127350127351127352127353127354127355127356127357127358127359127360127361127362127363127364127365127366127367127368127369127370127371127372127373127374127375127376127377127378127379127380127381127382127383127384127385127386127387127388127389127390127391127392127393127394127395127396127397127398127399127400127401127402127403127404127405127406127407127408127409127410127411127412127413127414127415127416127417127418127419127420127421127422127423127424127425127426127427127428127429127430127431127432127433127434127435127436127437127438127439127440127441127442127443127444127445127446127447127448127449127450127451127452127453127454127455127456127457127458127459127460127461127462127463127464127465127466127467127468127469127470127471127472127473127474127475127476127477127478127479127480127481127482127483127484127485127486127487127488127489127490127491127492127493127494127495127496127497127498127499127500127501127502127503127504127505127506127507127508127509127510127511127512127513127514127515127516127517127518127519127520127521127522127523127524127525127526127527127528127529127530127531127532127533127534127535127536127537127538127539127540127541127542127543127544127545127546127547127548127549127550127551127552127553127554127555127556127557127558127559127560127561127562127563127564127565127566127567127568127569127570127571127572127573127574127575127576127577127578127579127580127581127582127583127584127585127586127587127588127589127590127591127592127593127594127595127596127597127598127599127600127601127602127603127604127605127606127607127608127609127610127611127612127613127614127615127616127617127618127619127620127621127622127623127624127625127626127627127628127629127630127631127632127633127634127635127636127637127638127639127640127641127642127643127644127645127646127647127648127649127650127651127652127653127654127655127656127657127658127659127660127661127662127663127664127665127666127667127668127669127670127671127672127673127674127675127676127677127678127679127680127681127682127683127684127685127686127687127688127689127690127691127692127693127694127695127696127697127698127699127700127701127702127703127704127705127706127707127708127709127710127711127712127713127714127715127716127717127718127719127720127721127722127723127724127725127726127727127728127729127730127731127732127733127734127735127736127737127738127739127740127741127742127743127744127745127746127747127748127749127750127751127752127753127754127755127756127757127758127759127760127761127762127763127764127765127766127767127768127769127770127771127772127773127774127775127776127777127778127779127780127781127782127783127784127785127786127787127788127789127790127791127792127793127794127795127796127797127798127799127800127801127802127803127804127805127806127807127808127809127810127811127812127813127814127815127816127817127818127819127820127821127822127823127824127825127826127827127828127829127830127831127832127833127834127835127836127837127838127839127840127841127842127843127844127845127846127847127848127849127850127851127852127853127854127855127856127857127858127859127860127861127862127863127864127865127866127867127868127869127870127871127872127873127874127875127876127877127878127879127880127881127882127883127884127885127886127887127888127889127890127891127892127893127894127895127896127897127898127899127900127901127902127903127904127905127906127907127908127909127910127911127912127913127914127915127916127917127918127919127920127921127922127923127924127925127926127927127928127929127930127931127932127933127934127935127936127937127938127939127940127941127942127943127944127945127946127947127948127949127950127951127952127953127954127955127956127957127958127959127960127961127962127963127964127965127966127967127968127969127970127971127972127973127974127975127976127977127978127979127980127981127982127983127984127985127986127987127988127989127990127991127992127993127994127995127996127997127998127999128000128001128002128003128004128005128006128007128008128009128010128011128012128013128014128015128016128017128018128019128020128021128022128023128024128025128026128027128028128029128030128031128032128033128034128035128036128037128038128039128040128041128042128043128044128045128046128047128048128049128050128051128052128053128054128055128056128057128058128059128060128061128062128063128064128065128066128067128068128069128070128071128072128073128074128075128076128077128078128079128080128081128082128083128084128085128086128087128088128089128090128091128092128093128094128095128096128097128098128099128100128101128102128103128104128105128106128107128108128109128110128111128112128113128114128115128116128117128118128119128120128121128122128123128124128125128126128127128128128129128130128131128132128133128134128135128136128137128138128139128140128141128142128143128144128145128146128147128148128149128150128151128152128153128154128155128156128157128158128159128160128161128162128163128164128165128166128167128168128169128170128171128172128173128174128175128176128177128178128179128180128181128182128183128184128185128186128187128188128189128190128191128192128193128194128195128196128197128198128199128200128201128202128203128204128205128206128207128208128209128210128211128212128213128214128215128216128217128218128219128220128221128222128223128224128225128226128227128228128229128230128231128232128233128234128235128236128237128238128239128240128241128242128243128244128245128246128247128248128249128250128251128252128253128254128255128256128257128258128259128260128261128262128263128264128265128266128267128268128269128270128271128272128273128274128275128276128277128278128279128280128281128282128283128284128285128286128287128288128289128290128291128292128293128294128295128296128297128298128299128300128301128302128303128304128305128306128307128308128309128310128311128312128313128314128315128316128317128318128319128320128321128322128323128324128325128326128327128328128329128330128331128332128333128334128335128336128337128338128339128340128341128342128343128344128345128346128347128348128349128350128351128352128353128354128355128356128357128358128359128360128361128362128363128364128365128366128367128368128369128370128371128372128373128374128375128376128377128378128379128380128381128382128383128384128385128386128387128388128389128390128391128392128393128394128395128396128397128398128399128400128401128402128403128404128405128406128407128408128409128410128411128412128413128414128415128416128417128418128419128420128421128422128423128424128425128426128427128428128429128430128431128432128433128434128435128436128437128438128439128440128441128442128443128444128445128446128447128448128449128450128451128452128453128454128455128456128457128458128459128460128461128462128463128464128465128466128467128468128469128470128471128472128473128474128475128476128477128478128479128480128481128482128483128484128485128486128487128488128489128490128491128492128493128494128495128496128497128498128499128500128501128502128503128504128505128506128507128508128509128510128511128512128513128514128515128516128517128518128519128520128521128522128523128524128525128526128527128528128529128530128531128532128533128534128535128536128537128538128539128540128541128542128543128544128545128546128547128548128549128550128551128552128553128554128555128556128557128558128559128560128561128562128563128564128565128566128567128568128569128570128571128572128573128574128575128576128577128578128579128580128581128582128583128584128585128586128587128588128589128590128591128592128593128594128595128596128597128598128599128600128601128602128603128604128605128606128607128608128609128610128611128612128613128614128615128616128617128618128619128620128621128622128623128624128625128626128627128628128629128630128631128632128633128634128635128636128637128638128639128640128641128642128643128644128645128646128647128648128649128650128651128652128653128654128655128656128657128658128659128660128661128662128663128664128665128666128667128668128669128670128671128672128673128674128675128676128677128678128679128680128681128682128683128684128685128686128687128688128689128690128691128692128693128694128695128696128697128698128699128700128701128702128703128704128705128706128707128708128709128710128711128712128713128714128715128716128717128718128719128720128721128722128723128724128725128726128727128728128729128730128731128732128733128734128735128736128737128738128739128740128741128742128743128744128745128746128747128748128749128750128751128752128753128754128755128756128757128758128759128760128761128762128763128764128765128766128767128768128769128770128771128772128773128774128775128776128777128778128779128780128781128782128783128784128785128786128787128788128789128790128791128792128793128794128795128796128797128798128799128800128801128802128803128804128805128806128807128808128809128810128811128812128813128814128815128816128817128818128819128820128821128822128823128824128825128826128827128828128829128830128831128832128833128834128835128836128837128838128839128840128841128842128843128844128845128846128847128848128849128850128851128852128853128854128855128856128857128858128859128860128861128862128863128864128865128866128867128868128869128870128871128872128873128874128875128876128877128878128879128880128881128882128883128884128885128886128887128888128889128890128891128892128893128894128895128896128897128898128899128900128901128902128903128904128905128906128907128908128909128910128911128912128913128914128915128916128917128918128919128920128921128922128923128924128925128926128927128928128929128930128931128932128933128934128935128936128937128938128939128940128941128942128943128944128945128946128947128948128949128950128951128952128953128954128955128956128957128958128959128960128961128962128963128964128965128966128967128968128969128970128971128972128973128974128975128976128977128978128979128980128981128982128983128984128985128986128987128988128989128990128991128992128993128994128995128996128997128998128999129000129001129002129003129004129005129006129007129008129009129010129011129012129013129014129015129016129017129018129019129020129021129022129023129024129025129026129027129028129029129030129031129032129033129034129035129036129037129038129039129040129041129042129043129044129045129046129047129048129049129050129051129052129053129054129055129056129057129058129059129060129061129062129063129064129065129066129067129068129069129070129071129072129073129074129075129076129077129078129079129080129081129082129083129084129085129086129087129088129089129090129091129092129093129094129095129096129097129098129099129100129101129102129103129104129105129106129107129108129109129110129111129112129113129114129115129116129117129118129119129120129121129122129123129124129125129126129127129128129129129130129131129132129133129134129135129136129137129138129139129140129141129142129143129144129145129146129147129148129149129150129151129152129153129154129155129156129157129158129159129160129161129162129163129164129165129166129167129168129169129170129171129172129173129174129175129176129177129178129179129180129181129182129183129184129185129186129187129188129189129190129191129192129193129194129195129196129197129198129199129200129201129202129203129204129205129206129207129208129209129210129211129212129213129214129215129216129217129218129219129220129221129222129223129224129225129226129227129228129229129230129231129232129233129234129235129236129237129238129239129240129241129242129243129244129245129246129247129248129249129250129251129252129253129254129255129256129257129258129259129260129261129262129263129264129265129266129267129268129269129270129271129272129273129274129275129276129277129278129279129280129281129282129283129284129285129286129287129288129289129290129291129292129293129294129295129296129297129298129299129300129301129302129303129304129305129306129307129308129309129310129311129312129313129314129315129316129317129318129319129320129321129322129323129324129325129326129327129328129329129330129331129332129333129334129335129336129337129338129339129340129341129342129343129344129345129346129347129348129349129350129351129352129353129354129355129356129357129358129359129360129361129362129363129364129365129366129367129368129369129370129371129372129373129374129375129376129377129378129379129380129381129382129383129384129385129386129387129388129389129390129391129392129393129394129395129396129397129398129399129400129401129402129403129404129405129406129407129408129409129410129411129412129413129414129415129416129417129418129419129420129421129422129423129424129425129426129427129428129429129430129431129432129433129434129435129436129437129438129439129440129441129442129443129444129445129446129447129448129449129450129451129452129453129454129455129456129457129458129459129460129461129462129463129464129465129466129467129468129469129470129471129472129473129474129475129476129477129478129479129480129481129482129483129484129485129486129487129488129489129490129491129492129493129494129495129496129497129498129499129500129501129502129503129504129505129506129507129508129509129510129511129512129513129514129515129516129517129518129519129520129521129522129523129524129525129526129527129528129529129530129531129532129533129534129535129536129537129538129539129540129541129542129543129544129545129546129547129548129549129550129551129552129553129554129555129556129557129558129559129560129561129562129563129564129565129566129567129568129569129570129571129572129573129574129575129576129577129578129579129580129581129582129583129584129585129586129587129588129589129590129591129592129593129594129595129596129597129598129599129600129601129602129603129604129605129606129607129608129609129610129611129612129613129614129615129616129617129618129619129620129621129622129623129624129625129626129627129628129629129630129631129632129633129634129635129636129637129638129639129640129641129642129643129644129645129646129647129648129649129650129651129652129653129654129655129656129657129658129659129660129661129662129663129664129665129666129667129668129669129670129671129672129673129674129675129676129677129678129679129680129681129682129683129684129685129686129687129688129689129690129691129692129693129694129695129696129697129698129699129700129701129702129703129704129705129706129707129708129709129710129711129712129713129714129715129716129717129718129719129720129721129722129723129724129725129726129727129728129729129730129731129732129733129734129735129736129737129738129739129740129741129742129743129744129745129746129747129748129749129750129751129752129753129754129755129756129757129758129759129760129761129762129763129764129765129766129767129768129769129770129771129772129773129774129775129776129777129778129779129780129781129782129783129784129785129786129787129788129789129790129791129792129793129794129795129796129797129798129799129800129801129802129803129804129805129806129807129808129809129810129811129812129813129814129815129816129817129818129819129820129821129822129823129824129825129826129827129828129829129830129831129832129833129834129835129836129837129838129839129840129841129842129843129844129845129846129847129848129849129850129851129852129853129854129855129856129857129858129859129860129861129862129863129864129865129866129867129868129869129870129871129872129873129874129875129876129877129878129879129880129881129882129883129884129885129886129887129888129889129890129891129892129893129894129895129896129897129898129899129900129901129902129903129904129905129906129907129908129909129910129911129912129913129914129915129916129917129918129919129920129921129922129923129924129925129926129927129928129929129930129931129932129933129934129935129936129937129938129939129940129941129942129943129944129945129946129947129948129949129950129951129952129953129954129955129956129957129958129959129960129961129962129963129964129965129966129967129968129969129970129971129972129973129974129975129976129977129978129979129980129981129982129983129984129985129986129987129988129989129990129991129992129993129994129995129996129997129998129999130000130001130002130003130004130005130006130007130008130009130010130011130012130013130014130015130016130017130018130019130020130021130022130023130024130025130026130027130028130029130030130031130032130033130034130035130036130037130038130039130040130041130042130043130044130045130046130047130048130049130050130051130052130053130054130055130056130057130058130059130060130061130062130063130064130065130066130067130068130069130070130071130072130073130074130075130076130077130078130079130080130081130082130083130084130085130086130087130088130089130090130091130092130093130094130095130096130097130098130099130100130101130102130103130104130105130106130107130108130109130110130111130112130113130114130115130116130117130118130119130120130121130122130123130124130125130126130127130128130129130130130131130132130133130134130135130136130137130138130139130140130141130142130143130144130145130146130147130148130149130150130151130152130153130154130155130156130157130158130159130160130161130162130163130164130165130166130167130168130169130170130171130172130173130174130175130176130177130178130179130180130181130182130183130184130185130186130187130188130189130190130191130192130193130194130195130196130197130198130199130200130201130202130203130204130205130206130207130208130209130210130211130212130213130214130215130216130217130218130219130220130221130222130223130224130225130226130227130228130229130230130231130232130233130234130235130236130237130238130239130240130241130242130243130244130245130246130247130248130249130250130251130252130253130254130255130256130257130258130259130260130261130262130263130264130265130266130267130268130269130270130271130272130273130274130275130276130277130278130279130280130281130282130283130284130285130286130287130288130289130290130291130292130293130294130295130296130297130298130299130300130301130302130303130304130305130306130307130308130309130310130311130312130313130314130315130316130317130318130319130320130321130322130323130324130325130326130327130328130329130330130331130332130333130334130335130336130337130338130339130340130341130342130343130344130345130346130347130348130349130350130351130352130353130354130355130356130357130358130359130360130361130362130363130364130365130366130367130368130369130370130371130372130373130374130375130376130377130378130379130380130381130382130383130384130385130386130387130388130389130390130391130392130393130394130395130396130397130398130399130400130401130402130403130404130405130406130407130408130409130410130411130412130413130414130415130416130417130418130419130420130421130422130423130424130425130426130427130428130429130430130431130432130433130434130435130436130437130438130439130440130441130442130443130444130445130446130447130448130449130450130451130452130453130454130455130456130457130458130459130460130461130462130463130464130465130466130467130468130469130470130471130472130473130474130475130476130477130478130479130480130481130482130483130484130485130486130487130488130489130490130491130492130493130494130495130496130497130498130499130500130501130502130503130504130505130506130507130508130509130510130511130512130513130514130515130516130517130518130519130520130521130522130523130524130525130526130527130528130529130530130531130532130533130534130535130536130537130538130539130540130541130542130543130544130545130546130547130548130549130550130551130552130553130554130555130556130557130558130559130560130561130562130563130564130565130566130567130568130569130570130571130572130573130574130575130576130577130578130579130580130581130582130583130584130585130586130587130588130589130590130591130592130593130594130595130596130597130598130599130600130601130602130603130604130605130606130607130608130609130610130611130612130613130614130615130616130617130618130619130620130621130622130623130624130625130626130627130628130629130630130631130632130633130634130635130636130637130638130639130640130641130642130643130644130645130646130647130648130649130650130651130652130653130654130655130656130657130658130659130660130661130662130663130664130665130666130667130668130669130670130671130672130673130674130675130676130677130678130679130680130681130682130683130684130685130686130687130688130689130690130691130692130693130694130695130696130697130698130699130700130701130702130703130704130705130706130707130708130709130710130711130712130713130714130715130716130717130718130719130720130721130722130723130724130725130726130727130728130729130730130731130732130733130734130735130736130737130738130739130740130741130742130743130744130745130746130747130748130749130750130751130752130753130754130755130756130757130758130759130760130761130762130763130764130765130766130767130768130769130770130771130772130773130774130775130776130777130778130779130780130781130782130783130784130785130786130787130788130789130790130791130792130793130794130795130796130797130798130799130800130801130802130803130804130805130806130807130808130809130810130811130812130813130814130815130816130817130818130819130820130821130822130823130824130825130826130827130828130829130830130831130832130833130834130835130836130837130838130839130840130841130842130843130844130845130846130847130848130849130850130851130852130853130854130855130856130857130858130859130860130861130862130863130864130865130866130867130868130869130870130871130872130873130874130875130876130877130878130879130880130881130882130883130884130885130886130887130888130889130890130891130892130893130894130895130896130897130898130899130900130901130902130903130904130905130906130907130908130909130910130911130912130913130914130915130916130917130918130919130920130921130922130923130924130925130926130927130928130929130930130931130932130933130934130935130936130937130938130939130940130941130942130943130944130945130946130947130948130949130950130951130952130953130954130955130956130957130958130959130960130961130962130963130964130965130966130967130968130969130970130971130972130973130974130975130976130977130978130979130980130981130982130983130984130985130986130987130988130989130990130991130992130993130994130995130996130997130998130999131000131001131002131003131004131005131006131007131008131009131010131011131012131013131014131015131016131017131018131019131020131021131022131023131024131025131026131027131028131029131030131031131032131033131034131035131036131037131038131039131040131041131042131043131044131045131046131047131048131049131050131051131052131053131054131055131056131057131058131059131060131061131062131063131064131065131066131067131068131069131070131071131072131073131074131075131076131077131078131079131080131081131082131083131084131085131086131087131088131089131090131091131092131093131094131095131096131097131098131099131100131101131102131103131104131105131106131107131108131109131110131111131112131113131114131115131116131117131118131119131120131121131122131123131124131125131126131127131128131129131130131131131132131133131134131135131136131137131138131139131140131141131142131143131144131145131146131147131148131149131150131151131152131153131154131155131156131157131158131159131160131161131162131163131164131165131166131167131168131169131170131171131172131173131174131175131176131177131178131179131180131181131182131183131184131185131186131187131188131189131190131191131192131193131194131195131196131197131198131199131200131201131202131203131204131205131206131207131208131209131210131211131212131213131214131215131216131217131218131219131220131221131222131223131224131225131226131227131228131229131230131231131232131233131234131235131236131237131238131239131240131241131242131243131244131245131246131247131248131249131250131251131252131253131254131255131256131257131258131259131260131261131262131263131264131265131266131267131268131269131270131271131272131273131274131275131276131277131278131279131280131281131282131283131284131285131286131287131288131289131290131291131292131293131294131295131296131297131298131299131300131301131302131303131304131305131306131307131308131309131310131311131312131313131314131315131316131317131318131319131320131321131322131323131324131325131326131327131328131329131330131331131332131333131334131335131336131337131338131339131340131341131342131343131344131345131346131347131348131349131350131351131352131353131354131355131356131357131358131359131360131361131362131363131364131365131366131367131368131369131370131371131372131373131374131375131376131377131378131379131380131381131382131383131384131385131386131387131388131389131390131391131392131393131394131395131396131397131398131399131400131401131402131403131404131405131406131407131408131409131410131411131412131413131414131415131416131417131418131419131420131421131422131423131424131425131426131427131428131429131430131431131432131433131434131435131436131437131438131439131440131441131442131443131444131445131446131447131448131449131450131451131452131453131454131455131456131457131458131459131460131461131462131463131464131465131466131467131468131469131470131471131472131473131474131475131476131477131478131479131480131481131482131483131484131485131486131487131488131489131490131491131492131493131494131495131496131497131498131499131500131501131502131503131504131505131506131507131508131509131510131511131512131513131514131515131516131517131518131519131520131521131522131523131524131525131526131527131528131529131530131531131532131533131534131535131536131537131538131539131540131541131542131543131544131545131546131547131548131549131550131551131552131553131554131555131556131557131558131559131560131561131562131563131564131565131566131567131568131569131570131571131572131573131574131575131576131577131578131579131580131581131582131583131584131585131586131587131588131589131590131591131592131593131594131595131596131597131598131599131600131601131602131603131604131605131606131607131608131609131610131611131612131613131614131615131616131617131618131619131620131621131622131623131624131625131626131627131628131629131630131631131632131633131634131635131636131637131638131639131640131641131642131643131644131645131646131647131648131649131650131651131652131653131654131655131656131657131658131659131660131661131662131663131664131665131666131667131668131669131670131671131672131673131674131675131676131677131678131679131680131681131682131683131684131685131686131687131688131689131690131691131692131693131694131695131696131697131698131699131700131701131702131703131704131705131706131707131708131709131710131711131712131713131714131715131716131717131718131719131720131721131722131723131724131725131726131727131728131729131730131731131732131733131734131735131736131737131738131739131740131741131742131743131744131745131746131747131748131749131750131751131752131753131754131755131756131757131758131759131760131761131762131763131764131765131766131767131768131769131770131771131772131773131774131775131776131777131778131779131780131781131782131783131784131785131786131787131788131789131790131791131792131793131794131795131796131797131798131799131800131801131802131803131804131805131806131807131808131809131810131811131812131813131814131815131816131817131818131819131820131821131822131823131824131825131826131827131828131829131830131831131832131833131834131835131836131837131838131839131840131841131842131843131844131845131846131847131848131849131850131851131852131853131854131855131856131857131858131859131860131861131862131863131864131865131866131867131868131869131870131871131872131873131874131875131876131877131878131879131880131881131882131883131884131885131886131887131888131889131890131891131892131893131894131895131896131897131898131899131900131901131902131903131904131905131906131907131908131909131910131911131912131913131914131915131916131917131918131919131920131921131922131923131924131925131926131927131928131929131930131931131932131933131934131935131936131937131938131939131940131941131942131943131944131945131946131947131948131949131950131951131952131953131954131955131956131957131958131959131960131961131962131963131964131965131966131967131968131969131970131971131972131973131974131975131976131977131978131979131980131981131982131983131984131985131986131987131988131989131990131991131992131993131994131995131996131997131998131999132000132001132002132003132004132005132006132007132008132009132010132011132012132013132014132015132016132017132018132019132020132021132022132023132024132025132026132027132028132029132030132031132032132033132034132035132036132037132038132039132040132041132042132043132044132045132046132047132048132049132050132051132052132053132054132055132056132057132058132059132060132061132062132063132064132065132066132067132068132069132070132071132072132073132074132075132076132077132078132079132080132081132082132083132084132085132086132087132088132089132090132091132092132093132094132095132096132097132098132099132100132101132102132103132104132105132106132107132108132109132110132111132112132113132114132115132116132117132118132119132120132121132122132123132124132125132126132127132128132129132130132131132132132133132134132135132136132137132138132139132140132141132142132143132144132145132146132147132148132149132150132151132152132153132154132155132156132157132158132159132160132161132162132163132164132165132166132167132168132169132170132171132172132173132174132175132176132177132178132179132180132181132182132183132184132185132186132187132188132189132190132191132192132193132194132195132196132197132198132199132200132201132202132203132204132205132206132207132208132209132210132211132212132213132214132215132216132217132218132219132220132221132222132223132224132225132226132227132228132229132230132231132232132233132234132235132236132237132238132239132240132241132242132243132244132245132246132247132248132249132250132251132252132253132254132255132256132257132258132259132260132261132262132263132264132265132266132267132268132269132270132271132272132273132274132275132276132277132278132279132280132281132282132283132284132285132286132287132288132289132290132291132292132293132294132295132296132297132298132299132300132301132302132303132304132305132306132307132308132309132310132311132312132313132314132315132316132317132318132319132320132321132322132323132324132325132326132327132328132329132330132331132332132333132334132335132336132337132338132339132340132341132342132343132344132345132346132347132348132349132350132351132352132353132354132355132356132357132358132359132360132361132362132363132364132365132366132367132368132369132370132371132372132373132374132375132376132377132378132379132380132381132382132383132384132385132386132387132388132389132390132391132392132393132394132395132396132397132398132399132400132401132402132403132404132405132406132407132408132409132410132411132412132413132414132415132416132417132418132419132420132421132422132423132424132425132426132427132428132429132430132431132432132433132434132435132436132437132438132439132440132441132442132443132444132445132446132447132448132449132450132451132452132453132454132455132456132457132458132459132460132461132462132463132464132465132466132467132468132469132470132471132472132473132474132475132476132477132478132479132480132481132482132483132484132485132486132487132488132489132490132491132492132493132494132495132496132497132498132499132500132501132502132503132504132505132506132507132508132509132510132511132512132513132514132515132516132517132518132519132520132521132522132523132524132525132526132527132528132529132530132531132532132533132534132535132536132537132538132539132540132541132542132543132544132545132546132547132548132549132550132551132552132553132554132555132556132557132558132559132560132561132562132563132564132565132566132567132568132569132570132571132572132573132574132575132576132577132578132579132580132581132582132583132584132585132586132587132588132589132590132591132592132593132594132595132596132597132598132599132600132601132602132603132604132605132606132607132608132609132610132611132612132613132614132615132616132617132618132619132620132621132622132623132624132625132626132627132628132629132630132631132632132633132634132635132636132637132638132639132640132641132642132643132644132645132646132647132648132649132650132651132652132653132654132655132656132657132658132659132660132661132662132663132664132665132666132667132668132669132670132671132672132673132674132675132676132677132678132679132680132681132682132683132684132685132686132687132688132689132690132691132692132693132694132695132696132697132698132699132700132701132702132703132704132705132706132707132708132709132710132711132712132713132714132715132716132717132718132719132720132721132722132723132724132725132726132727132728132729132730132731132732132733132734132735132736132737132738132739132740132741132742132743132744132745132746132747132748132749132750132751132752132753132754132755132756132757132758132759132760132761132762132763132764132765132766132767132768132769132770132771132772132773132774132775132776132777132778132779132780132781132782132783132784132785132786132787132788132789132790132791132792132793132794132795132796132797132798132799132800132801132802132803132804132805132806132807132808132809132810132811132812132813132814132815132816132817132818132819132820132821132822132823132824132825132826132827132828132829132830132831132832132833132834132835132836132837132838132839132840132841132842132843132844132845132846132847132848132849132850132851132852132853132854132855132856132857132858132859132860132861132862132863132864132865132866132867132868132869132870132871132872132873132874132875132876132877132878132879132880132881132882132883132884132885132886132887132888132889132890132891132892132893132894132895132896132897132898132899132900132901132902132903132904132905132906132907132908132909132910132911132912132913132914132915132916132917132918132919132920132921132922132923132924132925132926132927132928132929132930132931132932132933132934132935132936132937132938132939132940132941132942132943132944132945132946132947132948132949132950132951132952132953132954132955132956132957132958132959132960132961132962132963132964132965132966132967132968132969132970132971132972132973132974132975132976132977132978132979132980132981132982132983132984132985132986132987132988132989132990132991132992132993132994132995132996132997132998132999133000133001133002133003133004133005133006133007133008133009133010133011133012133013133014133015133016133017133018133019133020133021133022133023133024133025133026133027133028133029133030133031133032133033133034133035133036133037133038133039133040133041133042133043133044133045133046133047133048133049133050133051133052133053133054133055133056133057133058133059133060133061133062133063133064133065133066133067133068133069133070133071133072133073133074133075133076133077133078133079133080133081133082133083133084133085133086133087133088133089133090133091133092133093133094133095133096133097133098133099133100133101133102133103133104133105133106133107133108133109133110133111133112133113133114133115133116133117133118133119133120133121133122133123133124133125133126133127133128133129133130133131133132133133133134133135133136133137133138133139133140133141133142133143133144133145133146133147133148133149133150133151133152133153133154133155133156133157133158133159133160133161133162133163133164133165133166133167133168133169133170133171133172133173133174133175133176133177133178133179133180133181133182133183133184133185133186133187133188133189133190133191133192133193133194133195133196133197133198133199133200133201133202133203133204133205133206133207133208133209133210133211133212133213133214133215133216133217133218133219133220133221133222133223133224133225133226133227133228133229133230133231133232133233133234133235133236133237133238133239133240133241133242133243133244133245133246133247133248133249133250133251133252133253133254133255133256133257133258133259133260133261133262133263133264133265133266133267133268133269133270133271133272133273133274133275133276133277133278133279133280133281133282133283133284133285133286133287133288133289133290133291133292133293133294133295133296133297133298133299133300133301133302133303133304133305133306133307133308133309133310133311133312133313133314133315133316133317133318133319133320133321133322133323133324133325133326133327133328133329133330133331133332133333133334133335133336133337133338133339133340133341133342133343133344133345133346133347133348133349133350133351133352133353133354133355133356133357133358133359133360133361133362133363133364133365133366133367133368133369133370133371133372133373133374133375133376133377133378133379133380133381133382133383133384133385133386133387133388133389133390133391133392133393133394133395133396133397133398133399133400133401133402133403133404133405133406133407133408133409133410133411133412133413133414133415133416133417133418133419133420133421133422133423133424133425133426133427133428133429133430133431133432133433133434133435133436133437133438133439133440133441133442133443133444133445133446133447133448133449133450133451133452133453133454133455133456133457133458133459133460133461133462133463133464133465133466133467133468133469133470133471133472133473133474133475133476133477133478133479133480133481133482133483133484133485133486133487133488133489133490133491133492133493133494133495133496133497133498133499133500133501133502133503133504133505133506133507133508133509133510133511133512133513133514133515133516133517133518133519133520133521133522133523133524133525133526133527133528133529133530133531133532133533133534133535133536133537133538133539133540133541133542133543133544133545133546133547133548133549133550133551133552133553133554133555133556133557133558133559133560133561133562133563133564133565133566133567133568133569133570133571133572133573133574133575133576133577133578133579133580133581133582133583133584133585133586133587133588133589133590133591133592133593133594133595133596133597133598133599133600133601133602133603133604133605133606133607133608133609133610133611133612133613133614133615133616133617133618133619133620133621133622133623133624133625133626133627133628133629133630133631133632133633133634133635133636133637133638133639133640133641133642133643133644133645133646133647133648133649133650133651133652133653133654133655133656133657133658133659133660133661133662133663133664133665133666133667133668133669133670133671133672133673133674133675133676133677133678133679133680133681133682133683133684133685133686133687133688133689133690133691133692133693133694133695133696133697133698133699133700133701133702133703133704133705133706133707133708133709133710133711133712133713133714133715133716133717133718133719133720133721133722133723133724133725133726133727133728133729133730133731133732133733133734133735133736133737133738133739133740133741133742133743133744133745133746133747133748133749133750133751133752133753133754133755133756133757133758133759133760133761133762133763133764133765133766133767133768133769133770133771133772133773133774133775133776133777133778133779133780133781133782133783133784133785133786133787133788133789133790133791133792133793133794133795133796133797133798133799133800133801133802133803133804133805133806133807133808133809133810133811133812133813133814133815133816133817133818133819133820133821133822133823133824133825133826133827133828133829133830133831133832133833133834133835133836133837133838133839133840133841133842133843133844133845133846133847133848133849133850133851133852133853133854133855133856133857133858133859133860133861133862133863133864133865133866133867133868133869133870133871133872133873133874133875133876133877133878133879133880133881133882133883133884133885133886133887133888133889133890133891133892133893133894133895133896133897133898133899133900133901133902133903133904133905133906133907133908133909133910133911133912133913133914133915133916133917133918133919133920133921133922133923133924133925133926133927133928133929133930133931133932133933133934133935133936133937133938133939133940133941133942133943133944133945133946133947133948133949133950133951133952133953133954133955133956133957133958133959133960133961133962133963133964133965133966133967133968133969133970133971133972133973133974133975133976133977133978133979133980133981133982133983133984133985133986133987133988133989133990133991133992133993133994133995133996133997133998133999134000134001134002134003134004134005134006134007134008134009134010134011134012134013134014134015134016134017134018134019134020134021134022134023134024134025134026134027134028134029134030134031134032134033134034134035134036134037134038134039134040134041134042134043134044134045134046134047134048134049134050134051134052134053134054134055134056134057134058134059134060134061134062134063134064134065134066134067134068134069134070134071134072134073134074134075134076134077134078134079134080134081134082134083134084134085134086134087134088134089134090134091134092134093134094134095134096134097134098134099134100134101134102134103134104134105134106134107134108134109134110134111134112134113134114134115134116134117134118134119134120134121134122134123134124134125134126134127134128134129134130134131134132134133134134134135134136134137134138134139134140134141134142134143134144134145134146134147134148134149134150134151134152134153134154134155134156134157134158134159134160134161134162134163134164134165134166134167134168134169134170134171134172134173134174134175134176134177134178134179134180134181134182134183134184134185134186134187134188134189134190134191134192134193134194134195134196134197134198134199134200134201134202134203134204134205134206134207134208134209134210134211134212134213134214134215134216134217134218134219134220134221134222134223134224134225134226134227134228134229134230134231134232134233134234134235134236134237134238134239134240134241134242134243134244134245134246134247134248134249134250134251134252134253134254134255134256134257134258134259134260134261134262134263134264134265134266134267134268134269134270134271134272134273134274134275134276134277134278134279134280134281134282134283134284134285134286134287134288134289134290134291134292134293134294134295134296134297134298134299134300134301134302134303134304134305134306134307134308134309134310134311134312134313134314134315134316134317134318134319134320134321134322134323134324134325134326134327134328134329134330134331134332134333134334134335134336134337134338134339134340134341134342134343134344134345134346134347134348134349134350134351134352134353134354134355134356134357134358134359134360134361134362134363134364134365134366134367134368134369134370134371134372134373134374134375134376134377134378134379134380134381134382134383134384134385134386134387134388134389134390134391134392134393134394134395134396134397134398134399134400134401134402134403134404134405134406134407134408134409134410134411134412134413134414134415134416134417134418134419134420134421134422134423134424134425134426134427134428134429134430134431134432134433134434134435134436134437134438134439134440134441134442134443134444134445134446134447134448134449134450134451134452134453134454134455134456134457134458134459134460134461134462134463134464134465134466134467134468134469134470134471134472134473134474134475134476134477134478134479134480134481134482134483134484134485134486134487134488134489134490134491134492134493134494134495134496134497134498134499134500134501134502134503134504134505134506134507134508134509134510134511134512134513134514134515134516134517134518134519134520134521134522134523134524134525134526134527134528134529134530134531134532134533134534134535134536134537134538134539134540134541134542134543134544134545134546134547134548134549134550134551134552134553134554134555134556134557134558134559134560134561134562134563134564134565134566134567134568134569134570134571134572134573134574134575134576134577134578134579134580134581134582134583134584134585134586134587134588134589134590134591134592134593134594134595134596134597134598134599134600134601134602134603134604134605134606134607134608134609134610134611134612134613134614134615134616134617134618134619134620134621134622134623134624134625134626134627134628134629134630134631134632134633134634134635134636134637134638134639134640134641134642134643134644134645134646134647134648134649134650134651134652134653134654134655134656134657134658134659134660134661134662134663134664134665134666134667134668134669134670134671134672134673134674134675134676134677134678134679134680134681134682134683134684134685134686134687134688134689134690134691134692134693134694134695134696134697134698134699134700134701134702134703134704134705134706134707134708134709134710134711134712134713134714134715134716134717134718134719134720134721134722134723134724134725134726134727134728134729134730134731134732134733134734134735134736134737134738134739134740134741134742134743134744134745134746134747134748134749134750134751134752134753134754134755134756134757134758134759134760134761134762134763134764134765134766134767134768134769134770134771134772134773134774134775134776134777134778134779134780134781134782134783134784134785134786134787134788134789134790134791134792134793134794134795134796134797134798134799134800134801134802134803134804134805134806134807134808134809134810134811134812134813134814134815134816134817134818134819134820134821134822134823134824134825134826134827134828134829134830134831134832134833134834134835134836134837134838134839134840134841134842134843134844134845134846134847134848134849134850134851134852134853134854134855134856134857134858134859134860134861134862134863134864134865134866134867134868134869134870134871134872134873134874134875134876134877134878134879134880134881134882134883134884134885134886134887134888134889134890134891134892134893134894134895134896134897134898134899134900134901134902134903134904134905134906134907134908134909134910134911134912134913134914134915134916134917134918134919134920134921134922134923134924134925134926134927134928134929134930134931134932134933134934134935134936134937134938134939134940134941134942134943134944134945134946134947134948134949134950134951134952134953134954134955134956134957134958134959134960134961134962134963134964134965134966134967134968134969134970134971134972134973134974134975134976134977134978134979134980134981134982134983134984134985134986134987134988134989134990134991134992134993134994134995134996134997134998134999135000135001135002135003135004135005135006135007135008135009135010135011135012135013135014135015135016135017135018135019135020135021135022135023135024135025135026135027135028135029135030135031135032135033135034135035135036135037135038135039135040135041135042135043135044135045135046135047135048135049135050135051135052135053135054135055135056135057135058135059135060135061135062135063135064135065135066135067135068135069135070135071135072135073135074135075135076135077135078135079135080135081135082135083135084135085135086135087135088135089135090135091135092135093135094135095135096135097135098135099135100135101135102135103135104135105135106135107135108135109135110135111135112135113135114135115135116135117135118135119135120135121135122135123135124135125135126135127135128135129135130135131135132135133135134135135135136135137135138135139135140135141135142135143135144135145135146135147135148135149135150135151135152135153135154135155135156135157135158135159135160135161135162135163135164135165135166135167135168135169135170135171135172135173135174135175135176135177135178135179135180135181135182135183135184135185135186135187135188135189135190135191135192135193135194135195135196135197135198135199135200135201135202135203135204135205135206135207135208135209135210135211135212135213135214135215135216135217135218135219135220135221135222135223135224135225135226135227135228135229135230135231135232135233135234135235135236135237135238135239135240135241135242135243135244135245135246135247135248135249135250135251135252135253135254135255135256135257135258135259135260135261135262135263135264135265135266135267135268135269135270135271135272135273135274135275135276135277135278135279135280135281135282135283135284135285135286135287135288135289135290135291135292135293135294135295135296135297135298135299135300135301135302135303135304135305135306135307135308135309135310135311135312135313135314135315135316135317135318135319135320135321135322135323135324135325135326135327135328135329135330135331135332135333135334135335135336135337135338135339135340135341135342135343135344135345135346135347135348135349135350135351135352135353135354135355135356135357135358135359135360135361135362135363135364135365135366135367135368135369135370135371135372135373135374135375135376135377135378135379135380135381135382135383135384135385135386135387135388135389135390135391135392135393135394135395135396135397135398135399135400135401135402135403135404135405135406135407135408135409135410135411135412135413135414135415135416135417135418135419135420135421135422135423135424135425135426135427135428135429135430135431135432135433135434135435135436135437135438135439135440135441135442135443135444135445135446135447135448135449135450135451135452135453135454135455135456135457135458135459135460135461135462135463135464135465135466135467135468135469135470135471135472135473135474135475135476135477135478135479135480135481135482135483135484135485135486135487135488135489135490135491135492135493135494135495135496135497135498135499135500135501135502135503135504135505135506135507135508135509135510135511135512135513135514135515135516135517135518135519135520135521135522135523135524135525135526135527135528135529135530135531135532135533135534135535135536135537135538135539135540135541135542135543135544135545135546135547135548135549135550135551135552135553135554135555135556135557135558135559135560135561135562135563135564135565135566135567135568135569135570135571135572135573135574135575135576135577135578135579135580135581135582135583135584135585135586135587135588135589135590135591135592135593135594135595135596135597135598135599135600135601135602135603135604135605135606135607135608135609135610135611135612135613135614135615135616135617135618135619135620135621135622135623135624135625135626135627135628135629135630135631135632135633135634135635135636135637135638135639135640135641135642135643135644135645135646135647135648135649135650135651135652135653135654135655135656135657135658135659135660135661135662135663135664135665135666135667135668135669135670135671135672135673135674135675135676135677135678135679135680135681135682135683135684135685135686135687135688135689135690135691135692135693135694135695135696135697135698135699135700135701135702135703135704135705135706135707135708135709135710135711135712135713135714135715135716135717135718135719135720135721135722135723135724135725135726135727135728135729135730135731135732135733135734135735135736135737135738135739135740135741135742135743135744135745135746135747135748135749135750135751135752135753135754135755135756135757135758135759135760135761135762135763135764135765135766135767135768135769135770135771135772135773135774135775135776135777135778135779135780135781135782135783135784135785135786135787135788135789135790135791135792135793135794135795135796135797135798135799135800135801135802135803135804135805135806135807135808135809135810135811135812135813135814135815135816135817135818135819135820135821135822135823135824135825135826135827135828135829135830135831135832135833135834135835135836135837135838135839135840135841135842135843135844135845135846135847135848135849135850135851135852135853135854135855135856135857135858135859135860135861135862135863135864135865135866135867135868135869135870135871135872135873135874135875135876135877135878135879135880135881135882135883135884135885135886135887135888135889135890135891135892135893135894135895135896135897135898135899135900135901135902135903135904135905135906135907135908135909135910135911135912135913135914135915135916135917135918135919135920135921135922135923135924135925135926135927135928135929135930135931135932135933135934135935135936135937135938135939135940135941135942135943135944135945135946135947135948135949135950135951135952135953135954135955135956135957135958135959135960135961135962135963135964135965135966135967135968135969135970135971135972135973135974135975135976135977135978135979135980135981135982135983135984135985135986135987135988135989135990135991135992135993135994135995135996135997135998135999136000136001136002136003136004136005136006136007136008136009136010136011136012136013136014136015136016136017136018136019136020136021136022136023136024136025136026136027136028136029136030136031136032136033136034136035136036136037136038136039136040136041136042136043136044136045136046136047136048136049136050136051136052136053136054136055136056136057136058136059136060136061136062136063136064136065136066136067136068136069136070136071136072136073136074136075136076136077136078136079136080136081136082136083136084136085136086136087136088136089136090136091136092136093136094136095136096136097136098136099136100136101136102136103136104136105136106136107136108136109136110136111136112136113136114136115136116136117136118136119136120136121136122136123136124136125136126136127136128136129136130136131136132136133136134136135136136136137136138136139136140136141136142136143136144136145136146136147136148136149136150136151136152136153136154136155136156136157136158136159136160136161136162136163136164136165136166136167136168136169136170136171136172136173136174136175136176136177136178136179136180136181136182136183136184136185136186136187136188136189136190136191136192136193136194136195136196136197136198136199136200136201136202136203136204136205136206136207136208136209136210136211136212136213136214136215136216136217136218136219136220136221136222136223136224136225136226136227136228136229136230136231136232136233136234136235136236136237136238136239136240136241136242136243136244136245136246136247136248136249136250136251136252136253136254136255136256136257136258136259136260136261136262136263136264136265136266136267136268136269136270136271136272136273136274136275136276136277136278136279136280136281136282136283136284136285136286136287136288136289136290136291136292136293136294136295136296136297136298136299136300136301136302136303136304136305136306136307136308136309136310136311136312136313136314136315136316136317136318136319136320136321136322136323136324136325136326136327136328136329136330136331136332136333136334136335136336136337136338136339136340136341136342136343136344136345136346136347136348136349136350136351136352136353136354136355136356136357136358136359136360136361136362136363136364136365136366136367136368136369136370136371136372136373136374136375136376136377136378136379136380136381136382136383136384136385136386136387136388136389136390136391136392136393136394136395136396136397136398136399136400136401136402136403136404136405136406136407136408136409136410136411136412136413136414136415136416136417136418136419136420136421136422136423136424136425136426136427136428136429136430136431136432136433136434136435136436136437136438136439136440136441136442136443136444136445136446136447136448136449136450136451136452136453136454136455136456136457136458136459136460136461136462136463136464136465136466136467136468136469136470136471136472136473136474136475136476136477136478136479136480136481136482136483136484136485136486136487136488136489136490136491136492136493136494136495136496136497136498136499136500136501136502136503136504136505136506136507136508136509136510136511136512136513136514136515136516136517136518136519136520136521136522136523136524136525136526136527136528136529136530136531136532136533136534136535136536136537136538136539136540136541136542136543136544136545136546136547136548136549136550136551136552136553136554136555136556136557136558136559136560136561136562136563136564136565136566136567136568136569136570136571136572136573136574136575136576136577136578136579136580136581136582136583136584136585136586136587136588136589136590136591136592136593136594136595136596136597136598136599136600136601136602136603136604136605136606136607136608136609136610136611136612136613136614136615136616136617136618136619136620136621136622136623136624136625136626136627136628136629136630136631136632136633136634136635136636136637136638136639136640136641136642136643136644136645136646136647136648136649136650136651136652136653136654136655136656136657136658136659136660136661136662136663136664136665136666136667136668136669136670136671136672136673136674136675136676136677136678136679136680136681136682136683136684136685136686136687136688136689136690136691136692136693136694136695136696136697136698136699136700136701136702136703136704136705136706136707136708136709136710136711136712136713136714136715136716136717136718136719136720136721136722136723136724136725136726136727136728136729136730136731136732136733136734136735136736136737136738136739136740136741136742136743136744136745136746136747136748136749136750136751136752136753136754136755136756136757136758136759136760136761136762136763136764136765136766136767136768136769136770136771136772136773136774136775136776136777136778136779136780136781136782136783136784136785136786136787136788136789136790136791136792136793136794136795136796136797136798136799136800136801136802136803136804136805136806136807136808136809136810136811136812136813136814136815136816136817136818136819136820136821136822136823136824136825136826136827136828136829136830136831136832136833136834136835136836136837136838136839136840136841136842136843136844136845136846136847136848136849136850136851136852136853136854136855136856136857136858136859136860136861136862136863136864136865136866136867136868136869136870136871136872136873136874136875136876136877136878136879136880136881136882136883136884136885136886136887136888136889136890136891136892136893136894136895136896136897136898136899136900136901136902136903136904136905136906136907136908136909136910136911136912136913136914136915136916136917136918136919136920136921136922136923136924136925136926136927136928136929136930136931136932136933136934136935136936136937136938136939136940136941136942136943136944136945136946136947136948136949136950136951136952136953136954136955136956136957136958136959136960136961136962136963136964136965136966136967136968136969136970136971136972136973136974136975136976136977136978136979136980136981136982136983136984136985136986136987136988136989136990136991136992136993136994136995136996136997136998136999137000137001137002137003137004137005137006137007137008137009137010137011137012137013137014137015137016137017137018137019137020137021137022137023137024137025137026137027137028137029137030137031137032137033137034137035137036137037137038137039137040137041137042137043137044137045137046137047137048137049137050137051137052137053137054137055137056137057137058137059137060137061137062137063137064137065137066137067137068137069137070137071137072137073137074137075137076137077137078137079137080137081137082137083137084137085137086137087137088137089137090137091137092137093137094137095137096137097137098137099137100137101137102137103137104137105137106137107137108137109137110137111137112137113137114137115137116137117137118137119137120137121137122137123137124137125137126137127137128137129137130137131137132137133137134137135137136137137137138137139137140137141137142137143137144137145137146137147137148137149137150137151137152137153137154137155137156137157137158137159137160137161137162137163137164137165137166137167137168137169137170137171137172137173137174137175137176137177137178137179137180137181137182137183137184137185137186137187137188137189137190137191137192137193137194137195137196137197137198137199137200137201137202137203137204137205137206137207137208137209137210137211137212137213137214137215137216137217137218137219137220137221137222137223137224137225137226137227137228137229137230137231137232137233137234137235137236137237137238137239137240137241137242137243137244137245137246137247137248137249137250137251137252137253137254137255137256137257137258137259137260137261137262137263137264137265137266137267137268137269137270137271137272137273137274137275137276137277137278137279137280137281137282137283137284137285137286137287137288137289137290137291137292137293137294137295137296137297137298137299137300137301137302137303137304137305137306137307137308137309137310137311137312137313137314137315137316137317137318137319137320137321137322137323137324137325137326137327137328137329137330137331137332137333137334137335137336137337137338137339137340137341137342137343137344137345137346137347137348137349137350137351137352137353137354137355137356137357137358137359137360137361137362137363137364137365137366137367137368137369137370137371137372137373137374137375137376137377137378137379137380137381137382137383137384137385137386137387137388137389137390137391137392137393137394137395137396137397137398137399137400137401137402137403137404137405137406137407137408137409137410137411137412137413137414137415137416137417137418137419137420137421137422137423137424137425137426137427137428137429137430137431137432137433137434137435137436137437137438137439137440137441137442137443137444137445137446137447137448137449137450137451137452137453137454137455137456137457137458137459137460137461137462137463137464137465137466137467137468137469137470137471137472137473137474137475137476137477137478137479137480137481137482137483137484137485137486137487137488137489137490137491137492137493137494137495137496137497137498137499137500137501137502137503137504137505137506137507137508137509137510137511137512137513137514137515137516137517137518137519137520137521137522137523137524137525137526137527137528137529137530137531137532137533137534137535137536137537137538137539137540137541137542137543137544137545137546137547137548137549137550137551137552137553137554137555137556137557137558137559137560137561137562137563137564137565137566137567137568137569137570137571137572137573137574137575137576137577137578137579137580137581137582137583137584137585137586137587137588137589137590137591137592137593137594137595137596137597137598137599137600137601137602137603137604137605137606137607137608137609137610137611137612137613137614137615137616137617137618137619137620137621137622137623137624137625137626137627137628137629137630137631137632137633137634137635137636137637137638137639137640137641137642137643137644137645137646137647137648137649137650137651137652137653137654137655137656137657137658137659137660137661137662137663137664137665137666137667137668137669137670137671137672137673137674137675137676137677137678137679137680137681137682137683137684137685137686137687137688137689137690137691137692137693137694137695137696137697137698137699137700137701137702137703137704137705137706137707137708137709137710137711137712137713137714137715137716137717137718137719137720137721137722137723137724137725137726137727137728137729137730137731137732137733137734137735137736137737137738137739137740137741137742137743137744137745137746137747137748137749137750137751137752137753137754137755137756137757137758137759137760137761137762137763137764137765137766137767137768137769137770137771137772137773137774137775137776137777137778137779137780137781137782137783137784137785137786137787137788137789137790137791137792137793137794137795137796137797137798137799137800137801137802137803137804137805137806137807137808137809137810137811137812137813137814137815137816137817137818137819137820137821137822137823137824137825137826137827137828137829137830137831137832137833137834137835137836137837137838137839137840137841137842137843137844137845137846137847137848137849137850137851137852137853137854137855137856137857137858137859137860137861137862137863137864137865137866137867137868137869137870137871137872137873137874137875137876137877137878137879137880137881137882137883137884137885137886137887137888137889137890137891137892137893137894137895137896137897137898137899137900137901137902137903137904137905137906137907137908137909137910137911137912137913137914137915137916137917137918137919137920137921137922137923137924137925137926137927137928137929137930137931137932137933137934137935137936137937137938137939137940137941137942137943137944137945137946137947137948137949137950137951137952137953137954137955137956137957137958137959137960137961137962137963137964137965137966137967137968137969137970137971137972137973137974137975137976137977137978137979137980137981137982137983137984137985137986137987137988137989137990137991137992137993137994137995137996137997137998137999138000138001138002138003138004138005138006138007138008138009138010138011138012138013138014138015138016138017138018138019138020138021138022138023138024138025138026138027138028138029138030138031138032138033138034138035138036138037138038138039138040138041138042138043138044138045138046138047138048138049138050138051138052138053138054138055138056138057138058138059138060138061138062138063138064138065138066138067138068138069138070138071138072138073138074138075138076138077138078138079138080138081138082138083138084138085138086138087138088138089138090138091138092138093138094138095138096138097138098138099138100138101138102138103138104138105138106138107138108138109138110138111138112138113138114138115138116138117138118138119138120138121138122138123138124138125138126138127138128138129138130138131138132138133138134138135138136138137138138138139138140138141138142138143138144138145138146138147138148138149138150138151138152138153138154138155138156138157138158138159138160138161138162138163138164138165138166138167138168138169138170138171138172138173138174138175138176138177138178138179138180138181138182138183138184138185138186138187138188138189138190138191138192138193138194138195138196138197138198138199138200138201138202138203138204138205138206138207138208138209138210138211138212138213138214138215138216138217138218138219138220138221138222138223138224138225138226138227138228138229138230138231138232138233138234138235138236138237138238138239138240138241138242138243138244138245138246138247138248138249138250138251138252138253138254138255138256138257138258138259138260138261138262138263138264138265138266138267138268138269138270138271138272138273138274138275138276138277138278138279138280138281138282138283138284138285138286138287138288138289138290138291138292138293138294138295138296138297138298138299138300138301138302138303138304138305138306138307138308138309138310138311138312138313138314138315138316138317138318138319138320138321138322138323138324138325138326138327138328138329138330138331138332138333138334138335138336138337138338138339138340138341138342138343138344138345138346138347138348138349138350138351138352138353138354138355138356138357138358138359138360138361138362138363138364138365138366138367138368138369138370138371138372138373138374138375138376138377138378138379138380138381138382138383138384138385138386138387138388138389138390138391138392138393138394138395138396138397138398138399138400138401138402138403138404138405138406138407138408138409138410138411138412138413138414138415138416138417138418138419138420138421138422138423138424138425138426138427138428138429138430138431138432138433138434138435138436138437138438138439138440138441138442138443138444138445138446138447138448138449138450138451138452138453138454138455138456138457138458138459138460138461138462138463138464138465138466138467138468138469138470138471138472138473138474138475138476138477138478138479138480138481138482138483138484138485138486138487138488138489138490138491138492138493138494138495138496138497138498138499138500138501138502138503138504138505138506138507138508138509138510138511138512138513138514138515138516138517138518138519138520138521138522138523138524138525138526138527138528138529138530138531138532138533138534138535138536138537138538138539138540138541138542138543138544138545138546138547138548138549138550138551138552138553138554138555138556138557138558138559138560138561138562138563138564138565138566138567138568138569138570138571138572138573138574138575138576138577138578138579138580138581138582138583138584138585138586138587138588138589138590138591138592138593138594138595138596138597138598138599138600138601138602138603138604138605138606138607138608138609138610138611138612138613138614138615138616138617138618138619138620138621138622138623138624138625138626138627138628138629138630138631138632138633138634138635138636138637138638138639138640138641138642138643138644138645138646138647138648138649138650138651138652138653138654138655138656138657138658138659138660138661138662138663138664138665138666138667138668138669138670138671138672138673138674138675138676138677138678138679138680138681138682138683138684138685138686138687138688138689138690138691138692138693138694138695138696138697138698138699138700138701138702138703138704138705138706138707138708138709138710138711138712138713138714138715138716138717138718138719138720138721138722138723138724138725138726138727138728138729138730138731138732138733138734138735138736138737138738138739138740138741138742138743138744138745138746138747138748138749138750138751138752138753138754138755138756138757138758138759138760138761138762138763138764138765138766138767138768138769138770138771138772138773138774138775138776138777138778138779138780138781138782138783138784138785138786138787138788138789138790138791138792138793138794138795138796138797138798138799138800138801138802138803138804138805138806138807138808138809138810138811138812138813138814138815138816138817138818138819138820138821138822138823138824138825138826138827138828138829138830138831138832138833138834138835138836138837138838138839138840138841138842138843138844138845138846138847138848138849138850138851138852138853138854138855138856138857138858138859138860138861138862138863138864138865138866138867138868138869138870138871138872138873138874138875138876138877138878138879138880138881138882138883138884138885138886138887138888138889138890138891138892138893138894138895138896138897138898138899138900138901138902138903138904138905138906138907138908138909138910138911138912138913138914138915138916138917138918138919138920138921138922138923138924138925138926138927138928138929138930138931138932138933138934138935138936138937138938138939138940138941138942138943138944138945138946138947138948138949138950138951138952138953138954138955138956138957138958138959138960138961138962138963138964138965138966138967138968138969138970138971138972138973138974138975138976138977138978138979138980138981138982138983138984138985138986138987138988138989138990138991138992138993138994138995138996138997138998138999139000139001139002139003139004139005139006139007139008139009139010139011139012139013139014139015139016139017139018139019139020139021139022139023139024139025139026139027139028139029139030139031139032139033139034139035139036139037139038139039139040139041139042139043139044139045139046139047139048139049139050139051139052139053139054139055139056139057139058139059139060139061139062139063139064139065139066139067139068139069139070139071139072139073139074139075139076139077139078139079139080139081139082139083139084139085139086139087139088139089139090139091139092139093139094139095139096139097139098139099139100139101139102139103139104139105139106139107139108139109139110139111139112139113139114139115139116139117139118139119139120139121139122139123139124139125139126139127139128139129139130139131139132139133139134139135139136139137139138139139139140139141139142139143139144139145139146139147139148139149139150139151139152139153139154139155139156139157139158139159139160139161139162139163139164139165139166139167139168139169139170139171139172139173139174139175139176139177139178139179139180139181139182139183139184139185139186139187139188139189139190139191139192139193139194139195139196139197139198139199139200139201139202139203139204139205139206139207139208139209139210139211139212139213139214139215139216139217139218139219139220139221139222139223139224139225139226139227139228139229139230139231139232139233139234139235139236139237139238139239139240139241139242139243139244139245139246139247139248139249139250139251139252139253139254139255139256139257139258139259139260139261139262139263139264139265139266139267139268139269139270139271139272139273139274139275139276139277139278139279139280139281139282139283139284139285139286139287139288139289139290139291139292139293139294139295139296139297139298139299139300139301139302139303139304139305139306139307139308139309139310139311139312139313139314139315139316139317139318139319139320139321139322139323139324139325139326139327139328139329139330139331139332139333139334139335139336139337139338139339139340139341139342139343139344139345139346139347139348139349139350139351139352139353139354139355139356139357139358139359139360139361139362139363139364139365139366139367139368139369139370139371139372139373139374139375139376139377139378139379139380139381139382139383139384139385139386139387139388139389139390139391139392139393139394139395139396139397139398139399139400139401139402139403139404139405139406139407139408139409139410139411139412139413139414139415139416139417139418139419139420139421139422139423139424139425139426139427139428139429139430139431139432139433139434139435139436139437139438139439139440139441139442139443139444139445139446139447139448139449139450139451139452139453139454139455139456139457139458139459139460139461139462139463139464139465139466139467139468139469139470139471139472139473139474139475139476139477139478139479139480139481139482139483139484139485139486139487139488139489139490139491139492139493139494139495139496139497139498139499139500139501139502139503139504139505139506139507139508139509139510139511139512139513139514139515139516139517139518139519139520139521139522139523139524139525139526139527139528139529139530139531139532139533139534139535139536139537139538139539139540139541139542139543139544139545139546139547139548139549139550139551139552139553139554139555139556139557139558139559139560139561139562139563139564139565139566139567139568139569139570139571139572139573139574139575139576139577139578139579139580139581139582139583139584139585139586139587139588139589139590139591139592139593139594139595139596139597139598139599139600139601139602139603139604139605139606139607139608139609139610139611139612139613139614139615139616139617139618139619139620139621139622139623139624139625139626139627139628139629139630139631139632139633139634139635139636139637139638139639139640139641139642139643139644139645139646139647139648139649139650139651139652139653139654139655139656139657139658139659139660139661139662139663139664139665139666139667139668139669139670139671139672139673139674139675139676139677139678139679139680139681139682139683139684139685139686139687139688139689139690139691139692139693139694139695139696139697139698139699139700139701139702139703139704139705139706139707139708139709139710139711139712139713139714139715139716139717139718139719139720139721139722139723139724139725139726139727139728139729139730139731139732139733139734139735139736139737139738139739139740139741139742139743139744139745139746139747139748139749139750139751139752139753139754139755139756139757139758139759139760139761139762139763139764139765139766139767139768139769139770139771139772139773139774139775139776139777139778139779139780139781139782139783139784139785139786139787139788139789139790139791139792139793139794139795139796139797139798139799139800139801139802139803139804139805139806139807139808139809139810139811139812139813139814139815139816139817139818139819139820139821139822139823139824139825139826139827139828139829139830139831139832139833139834139835139836139837139838139839139840139841139842139843139844139845139846139847139848139849139850139851139852139853139854139855139856139857139858139859139860139861139862139863139864139865139866139867139868139869139870139871139872139873139874139875139876139877139878139879139880139881139882139883139884139885139886139887139888139889139890139891139892139893139894139895139896139897139898139899139900139901139902139903139904139905139906139907139908139909139910139911139912139913139914139915139916139917139918139919139920139921139922139923139924139925139926139927139928139929139930139931139932139933139934139935139936139937139938139939139940139941139942139943139944139945139946139947139948139949139950139951139952139953139954139955139956139957139958139959139960139961139962139963139964139965139966139967139968139969139970139971139972139973139974139975139976139977139978139979139980139981139982139983139984139985139986139987139988139989139990139991139992139993139994139995139996139997139998139999140000140001140002140003140004140005140006140007140008140009140010140011140012140013140014140015140016140017140018140019140020140021140022140023140024140025140026140027140028140029140030140031140032140033140034140035140036140037140038140039140040140041140042140043140044140045140046140047140048140049140050140051140052140053140054140055140056140057140058140059140060140061140062140063140064140065140066140067140068140069140070140071140072140073140074140075140076140077140078140079140080140081140082140083140084140085140086140087140088140089140090140091140092140093140094140095140096140097140098140099140100140101140102140103140104140105140106140107140108140109140110140111140112140113140114140115140116140117140118140119140120140121140122140123140124140125140126140127140128140129140130140131140132140133140134140135140136140137140138140139140140140141140142140143140144140145140146140147140148140149140150140151140152140153140154140155140156140157140158140159140160140161140162140163140164140165140166140167140168140169140170140171140172140173140174140175140176140177140178140179140180140181140182140183140184140185140186140187140188140189140190140191140192140193140194140195140196140197140198140199140200140201140202140203140204140205140206140207140208140209140210140211140212140213140214140215140216140217140218140219140220140221140222140223140224140225140226140227140228140229140230140231140232140233140234140235140236140237140238140239140240140241140242140243140244140245140246140247140248140249140250140251140252140253140254140255140256140257140258140259140260140261140262140263140264140265140266140267140268140269140270140271140272140273140274140275140276140277140278140279140280140281140282140283140284140285140286140287140288140289140290140291140292140293140294140295140296140297140298140299140300140301140302140303140304140305140306140307140308140309140310140311140312140313140314140315140316140317140318140319140320140321140322140323140324140325140326140327140328140329140330140331140332140333140334140335140336140337140338140339140340140341140342140343140344140345140346140347140348140349140350140351140352140353140354140355140356140357140358140359140360140361140362140363140364140365140366140367140368140369140370140371140372140373140374140375140376140377140378140379140380140381140382140383140384140385140386140387140388140389140390140391140392140393140394140395140396140397140398140399140400140401140402140403140404140405140406140407140408140409140410140411140412140413140414140415140416140417140418140419140420140421140422140423140424140425140426140427140428140429140430140431140432140433140434140435140436140437140438140439140440140441140442140443140444140445140446140447140448140449140450140451140452140453140454140455140456140457140458140459140460140461140462140463140464140465140466140467140468140469140470140471140472140473140474140475140476140477140478140479140480140481140482140483140484140485140486140487140488140489140490140491140492140493140494140495140496140497140498140499140500140501140502140503140504140505140506140507140508140509140510140511140512140513140514140515140516140517140518140519140520140521140522140523140524140525140526140527140528140529140530140531140532140533140534140535140536140537140538140539140540140541140542140543140544140545140546140547140548140549140550140551140552140553140554140555140556140557140558140559140560140561140562140563140564140565140566140567140568140569140570140571140572140573140574140575140576140577140578140579140580140581140582140583140584140585140586140587140588140589140590140591140592140593140594140595140596140597140598140599140600140601140602140603140604140605140606140607140608140609140610140611140612140613140614140615140616140617140618140619140620140621140622140623140624140625140626140627140628140629140630140631140632140633140634140635140636140637140638140639140640140641140642140643140644140645140646140647140648140649140650140651140652140653140654140655140656140657140658140659140660140661140662140663140664140665140666140667140668140669140670140671140672140673140674140675140676140677140678140679140680140681140682140683140684140685140686140687140688140689140690140691140692140693140694140695140696140697140698140699140700140701140702140703140704140705140706140707140708140709140710140711140712140713140714140715140716140717140718140719140720140721140722140723140724140725140726140727140728140729140730140731140732140733140734140735140736140737140738140739140740140741140742140743140744140745140746140747140748140749140750140751140752140753140754140755140756140757140758140759140760140761140762140763140764140765140766140767140768140769140770140771140772140773140774140775140776140777140778140779140780140781140782140783140784140785140786140787140788140789140790140791140792140793140794140795140796140797140798140799140800140801140802140803140804140805140806140807140808140809140810140811140812140813140814140815140816140817140818140819140820140821140822140823140824140825140826140827140828140829140830140831140832140833140834140835140836140837140838140839140840140841140842140843140844140845140846140847140848140849140850140851140852140853140854140855140856140857140858140859140860140861140862140863140864140865140866140867140868140869140870140871140872140873140874140875140876140877140878140879140880140881140882140883140884140885140886140887140888140889140890140891140892140893140894140895140896140897140898140899140900140901140902140903140904140905140906140907140908140909140910140911140912140913140914140915140916140917140918140919140920140921140922140923140924140925140926140927140928140929140930140931140932140933140934140935140936140937140938140939140940140941140942140943140944140945140946140947140948140949140950140951140952140953140954140955140956140957140958140959140960140961140962140963140964140965140966140967140968140969140970140971140972140973140974140975140976140977140978140979140980140981140982140983140984140985140986140987140988140989140990140991140992140993140994140995140996140997140998140999141000141001141002141003141004141005141006141007141008141009141010141011141012141013141014141015141016141017141018141019141020141021141022141023141024141025141026141027141028141029141030141031141032141033141034141035141036141037141038141039141040141041141042141043141044141045141046141047141048141049141050141051141052141053141054141055141056141057141058141059141060141061141062141063141064141065141066141067141068141069141070141071141072141073141074141075141076141077141078141079141080141081141082141083141084141085141086141087141088141089141090141091141092141093141094141095141096141097141098141099141100141101141102141103141104141105141106141107141108141109141110141111141112141113141114141115141116141117141118141119141120141121141122141123141124141125141126141127141128141129141130141131141132141133141134141135141136141137141138141139141140141141141142141143141144141145141146141147141148141149141150141151141152141153141154141155141156141157141158141159141160141161141162141163141164141165141166141167141168141169141170141171141172141173141174141175141176141177141178141179141180141181141182141183141184141185141186141187141188141189141190141191141192141193141194141195141196141197141198141199141200141201141202141203141204141205141206141207141208141209141210141211141212141213141214141215141216141217141218141219141220141221141222141223141224141225141226141227141228141229141230141231141232141233141234141235141236141237141238141239141240141241141242141243141244141245141246141247141248141249141250141251141252141253141254141255141256141257141258141259141260141261141262141263141264141265141266141267141268141269141270141271141272141273141274141275141276141277141278141279141280141281141282141283141284141285141286141287141288141289141290141291141292141293141294141295141296141297141298141299141300141301141302141303141304141305141306141307141308141309141310141311141312141313141314141315141316141317141318141319141320141321141322141323141324141325141326141327141328141329141330141331141332141333141334141335141336141337141338141339141340141341141342141343141344141345141346141347141348141349141350141351141352141353141354141355141356141357141358141359141360141361141362141363141364141365141366141367141368141369141370141371141372141373141374141375141376141377141378141379141380141381141382141383141384141385141386141387141388141389141390141391141392141393141394141395141396141397141398141399141400141401141402141403141404141405141406141407141408141409141410141411141412141413141414141415141416141417141418141419141420141421141422141423141424141425141426141427141428141429141430141431141432141433141434141435141436141437141438141439141440141441141442141443141444141445141446141447141448141449141450141451141452141453141454141455141456141457141458141459141460141461141462141463141464141465141466141467141468141469141470141471141472141473141474141475141476141477141478141479141480141481141482141483141484141485141486141487141488141489141490141491141492141493141494141495141496141497141498141499141500141501141502141503141504141505141506141507141508141509141510141511141512141513141514141515141516141517141518141519141520141521141522141523141524141525141526141527141528141529141530141531141532141533141534141535141536141537141538141539141540141541141542141543141544141545141546141547141548141549141550141551141552141553141554141555141556141557141558141559141560141561141562141563141564141565141566141567141568141569141570141571141572141573141574141575141576141577141578141579141580141581141582141583141584141585141586141587141588141589141590141591141592141593141594141595141596141597141598141599141600141601141602141603141604141605141606141607141608141609141610141611141612141613141614141615141616141617141618141619141620141621141622141623141624141625141626141627141628141629141630141631141632141633141634141635141636141637141638141639141640141641141642141643141644141645141646141647141648141649141650141651141652141653141654141655141656141657141658141659141660141661141662141663141664141665141666141667141668141669141670141671141672141673141674141675141676141677141678141679141680141681141682141683141684141685141686141687141688141689141690141691141692141693141694141695141696141697141698141699141700141701141702141703141704141705141706141707141708141709141710141711141712141713141714141715141716141717141718141719141720141721141722141723141724141725141726141727141728141729141730141731141732141733141734141735141736141737141738141739141740141741141742141743141744141745141746141747141748141749141750141751141752141753141754141755141756141757141758141759141760141761141762141763141764141765141766141767141768141769141770141771141772141773141774141775141776141777141778141779141780141781141782141783141784141785141786141787141788141789141790141791141792141793141794141795141796141797141798141799141800141801141802141803141804141805141806141807141808141809141810141811141812141813141814141815141816141817141818141819141820141821141822141823141824141825141826141827141828141829141830141831141832141833141834141835141836141837141838141839141840141841141842141843141844141845141846141847141848141849141850141851141852141853141854141855141856141857141858141859141860141861141862141863141864141865141866141867141868141869141870141871141872141873141874141875141876141877141878141879141880141881141882141883141884141885141886141887141888141889141890141891141892141893141894141895141896141897141898141899141900141901141902141903141904141905141906141907141908141909141910141911141912141913141914141915141916141917141918141919141920141921141922141923141924141925141926141927141928141929141930141931141932141933141934141935141936141937141938141939141940141941141942141943141944141945141946141947141948141949141950141951141952141953141954141955141956141957141958141959141960141961141962141963141964141965141966141967141968141969141970141971141972141973141974141975141976141977141978141979141980141981141982141983141984141985141986141987141988141989141990141991141992141993141994141995141996141997141998141999142000142001142002142003142004142005142006142007142008142009142010142011142012142013142014142015142016142017142018142019142020142021142022142023142024142025142026142027142028142029142030142031142032142033142034142035142036142037142038142039142040142041142042142043142044142045142046142047142048142049142050142051142052142053142054142055142056142057142058142059142060142061142062142063142064142065142066142067142068142069142070142071142072142073142074142075142076142077142078142079142080142081142082142083142084142085142086142087142088142089142090142091142092142093142094142095142096142097142098142099142100142101142102142103142104142105142106142107142108142109142110142111142112142113142114142115142116142117142118142119142120142121142122142123142124142125142126142127142128142129142130142131142132142133142134142135142136142137142138142139142140142141142142142143142144142145142146142147142148142149142150142151142152142153142154142155142156142157142158142159142160142161142162142163142164142165142166142167142168142169142170142171142172142173142174142175142176142177142178142179142180142181142182142183142184142185142186142187142188142189142190142191142192142193142194142195142196142197142198142199142200142201142202142203142204142205142206142207142208142209142210142211142212142213142214142215142216142217142218142219142220142221142222142223142224142225142226142227142228142229142230142231142232142233142234142235142236142237142238142239142240142241142242142243142244142245142246142247142248142249142250142251142252142253142254142255142256142257142258142259142260142261142262142263142264142265142266142267142268142269142270142271142272142273142274142275142276142277142278142279142280142281142282142283142284142285142286142287142288142289142290142291142292142293142294142295142296142297142298142299142300142301142302142303142304142305142306142307142308142309142310142311142312142313142314142315142316142317142318142319142320142321142322142323142324142325142326142327142328142329142330142331142332142333142334142335142336142337142338142339142340142341142342142343142344142345142346142347142348142349142350142351142352142353142354142355142356142357142358142359142360142361142362142363142364142365142366142367142368142369142370142371142372142373142374142375142376142377142378142379142380142381142382142383142384142385142386142387142388142389142390142391142392142393142394142395142396142397142398142399142400142401142402142403142404142405142406142407142408142409142410142411142412142413142414142415142416142417142418142419142420142421142422142423142424142425142426142427142428142429142430142431142432142433142434142435142436142437142438142439142440142441142442142443142444142445142446142447142448142449142450142451142452142453142454142455142456142457142458142459142460142461142462142463142464142465142466142467142468142469142470142471142472142473142474142475142476142477142478142479142480142481142482142483142484142485142486142487142488142489142490142491142492142493142494142495142496142497142498142499142500142501142502142503142504142505142506142507142508142509142510142511142512142513142514142515142516142517142518142519142520142521142522142523142524142525142526142527142528142529142530142531142532142533142534142535142536142537142538142539142540142541142542142543142544142545142546142547142548142549142550142551142552142553142554142555142556142557142558142559142560142561142562142563142564142565142566142567142568142569142570142571142572142573142574142575142576142577142578142579142580142581142582142583142584142585142586142587142588142589142590142591142592142593142594142595142596142597142598142599142600142601142602142603142604142605142606142607142608142609142610142611142612142613142614142615142616142617142618142619142620142621142622142623142624142625142626142627142628142629142630142631142632142633142634142635142636142637142638142639142640142641142642142643142644142645142646142647142648142649142650142651142652142653142654142655142656142657142658142659142660142661142662142663142664142665142666142667142668142669142670142671142672142673142674142675142676142677142678142679142680142681142682142683142684142685142686142687142688142689142690142691142692142693142694142695142696142697142698142699142700142701142702142703142704142705142706142707142708142709142710142711142712142713142714142715142716142717142718142719142720142721142722142723142724142725142726142727142728142729142730142731142732142733142734142735142736142737142738142739142740142741142742142743142744142745142746142747142748142749142750142751142752142753142754142755142756142757142758142759142760142761142762142763142764142765142766142767142768142769142770142771142772142773142774142775142776142777142778142779142780142781142782142783142784142785142786142787142788142789142790142791142792142793142794142795142796142797142798142799142800142801142802142803142804142805142806142807142808142809142810142811142812142813142814142815142816142817142818142819142820142821142822142823142824142825142826142827142828142829142830142831142832142833142834142835142836142837142838142839142840142841142842142843142844142845142846142847142848142849142850142851142852142853142854142855142856142857142858142859142860142861142862142863142864142865142866142867142868142869142870142871142872142873142874142875142876142877142878142879142880142881142882142883142884142885142886142887142888142889142890142891142892142893142894142895142896142897142898142899142900142901142902142903142904142905142906142907142908142909142910142911142912142913142914142915142916142917142918142919142920142921142922142923142924142925142926142927142928142929142930142931142932142933142934142935142936142937142938142939142940142941142942142943142944142945142946142947142948142949142950142951142952142953142954142955142956142957142958142959142960142961142962142963142964142965142966142967142968142969142970142971142972142973142974142975142976142977142978142979142980142981142982142983142984142985142986142987142988142989142990142991142992142993142994142995142996142997142998142999143000143001143002143003143004143005143006143007143008143009143010143011143012143013143014143015143016143017143018143019143020143021143022143023143024143025143026143027143028143029143030143031143032143033143034143035143036143037143038143039143040143041143042143043143044143045143046143047143048143049143050143051143052143053143054143055143056143057143058143059143060143061143062143063143064143065143066143067143068143069143070143071143072143073143074143075143076143077143078143079143080143081143082143083143084143085143086143087143088143089143090143091143092143093143094143095143096143097143098143099143100143101143102143103143104143105143106143107143108143109143110143111143112143113143114143115143116143117143118143119143120143121143122143123143124143125143126143127143128143129143130143131143132143133143134143135143136143137143138143139143140143141143142143143143144143145143146143147143148143149143150143151143152143153143154143155143156143157143158143159143160143161143162143163143164143165143166143167143168143169143170143171143172143173143174143175143176143177143178143179143180143181143182143183143184143185143186143187143188143189143190143191143192143193143194143195143196143197143198143199143200143201143202143203143204143205143206143207143208143209143210143211143212143213143214143215143216143217143218143219143220143221143222143223143224143225143226143227143228143229143230143231143232143233143234143235143236143237143238143239143240143241143242143243143244143245143246143247143248143249143250143251143252143253143254143255143256143257143258143259143260143261143262143263143264143265143266143267143268143269143270143271143272143273143274143275143276143277143278143279143280143281143282143283143284143285143286143287143288143289143290143291143292143293143294143295143296143297143298143299143300143301143302143303143304143305143306143307143308143309143310143311143312143313143314143315143316143317143318143319143320143321143322143323143324143325143326143327143328143329143330143331143332143333143334143335143336143337143338143339143340143341143342143343143344143345143346143347143348143349143350143351143352143353143354143355143356143357143358143359143360143361143362143363143364143365143366143367143368143369143370143371143372143373143374143375143376143377143378143379143380143381143382143383143384143385143386143387143388143389143390143391143392143393143394143395143396143397143398143399143400143401143402143403143404143405143406143407143408143409143410143411143412143413143414143415143416143417143418143419143420143421143422143423143424143425143426143427143428143429143430143431143432143433143434143435143436143437143438143439143440143441143442143443143444143445143446143447143448143449143450143451143452143453143454143455143456143457143458143459143460143461143462143463143464143465143466143467143468143469143470143471143472143473143474143475143476143477143478143479143480143481143482143483143484143485143486143487143488143489143490143491143492143493143494143495143496143497143498143499143500143501143502143503143504143505143506143507143508143509143510143511143512143513143514143515143516143517143518143519143520143521143522143523143524143525143526143527143528143529143530143531143532143533143534143535143536143537143538143539143540143541143542143543143544143545143546143547143548143549143550143551143552143553143554143555143556143557143558143559143560143561143562143563143564143565143566143567143568143569143570143571143572143573143574143575143576143577143578143579143580143581143582143583143584143585143586143587143588143589143590143591143592143593143594143595143596143597143598143599143600143601143602143603143604143605143606143607143608143609143610143611143612143613143614143615143616143617143618143619143620143621143622143623143624143625143626143627143628143629143630143631143632143633143634143635143636143637143638143639143640143641143642143643143644143645143646143647143648143649143650143651143652143653143654143655143656143657143658143659143660143661143662143663143664143665143666143667143668143669143670143671143672143673143674143675143676143677143678143679143680143681143682143683143684143685143686143687143688143689143690143691143692143693143694143695143696143697143698143699143700143701143702143703143704143705143706143707143708143709143710143711143712143713143714143715143716143717143718143719143720143721143722143723143724143725143726143727143728143729143730143731143732143733143734143735143736143737143738143739143740143741143742143743143744143745143746143747143748143749143750143751143752143753143754143755143756143757143758143759143760143761143762143763143764143765143766143767143768143769143770143771143772143773143774143775143776143777143778143779143780143781143782143783143784143785143786143787143788143789143790143791143792143793143794143795143796143797143798143799143800143801143802143803143804143805143806143807143808143809143810143811143812143813143814143815143816143817143818143819143820143821143822143823143824143825143826143827143828143829143830143831143832143833143834143835143836143837143838143839143840143841143842143843143844143845143846143847143848143849143850143851143852143853143854143855143856143857143858143859143860143861143862143863143864143865143866143867143868143869143870143871143872143873143874143875143876143877143878143879143880143881143882143883143884143885143886143887143888143889143890143891143892143893143894143895143896143897143898143899143900143901143902143903143904143905143906143907143908143909143910143911143912143913143914143915143916143917143918143919143920143921143922143923143924143925143926143927143928143929143930143931143932143933143934143935143936143937143938143939143940143941143942143943143944143945143946143947143948143949143950143951143952143953143954143955143956143957143958143959143960143961143962143963143964143965143966143967143968143969143970143971143972143973143974143975143976143977143978143979143980143981143982143983143984143985143986143987143988143989143990143991143992143993143994143995143996143997143998143999144000144001144002144003144004144005144006144007144008144009144010144011144012144013144014144015144016144017144018144019144020144021144022144023144024144025144026144027144028144029144030144031144032144033144034144035144036144037144038144039144040144041144042144043144044144045144046144047144048144049144050144051144052144053144054144055144056144057144058144059144060144061144062144063144064144065144066144067144068144069144070144071144072144073144074144075144076144077144078144079144080144081144082144083144084144085144086144087144088144089144090144091144092144093144094144095144096144097144098144099144100144101144102144103144104144105144106144107144108144109144110144111144112144113144114144115144116144117144118144119144120144121144122144123144124144125144126144127144128144129144130144131144132144133144134144135144136144137144138144139144140144141144142144143144144144145144146144147144148144149144150144151144152144153144154144155144156144157144158144159144160144161144162144163144164144165144166144167144168144169144170144171144172144173144174144175144176144177144178144179144180144181144182144183144184144185144186144187144188144189144190144191144192144193144194144195144196144197144198144199144200144201144202144203144204144205144206144207144208144209144210144211144212144213144214144215144216144217144218144219144220144221144222144223144224144225144226144227144228144229144230144231144232144233144234144235144236144237144238144239144240144241144242144243144244144245144246144247144248144249144250144251144252144253144254144255144256144257144258144259144260144261144262144263144264144265144266144267144268144269144270144271144272144273144274144275144276144277144278144279144280144281144282144283144284144285144286144287144288144289144290144291144292144293144294144295144296144297144298144299144300144301144302144303144304144305144306144307144308144309144310144311144312144313144314144315144316144317144318144319144320144321144322144323144324144325144326144327144328144329144330144331144332144333144334144335144336144337144338144339144340144341144342144343144344144345144346144347144348144349144350144351144352144353144354144355144356144357144358144359144360144361144362144363144364144365144366144367144368144369144370144371144372144373144374144375144376144377144378144379144380144381144382144383144384144385144386144387144388144389144390144391144392144393144394144395144396144397144398144399144400144401144402144403144404144405144406144407144408144409144410144411144412144413144414144415144416144417144418144419144420144421144422144423144424144425144426144427144428144429144430144431144432144433144434144435144436144437144438144439144440144441144442144443144444144445144446144447144448144449144450144451144452144453144454144455144456144457144458144459144460144461144462144463144464144465144466144467144468144469144470144471144472144473144474144475144476144477144478144479144480144481144482144483144484144485144486144487144488144489144490144491144492144493144494144495144496144497144498144499144500144501144502144503144504144505144506144507144508144509144510144511144512144513144514144515144516144517144518144519144520144521144522144523144524144525144526144527144528144529144530144531144532144533144534144535144536144537144538144539144540144541144542144543144544144545144546144547144548144549144550144551144552144553144554144555144556144557144558144559144560144561144562144563144564144565144566144567144568144569144570144571144572144573144574144575144576144577144578144579144580144581144582144583144584144585144586144587144588144589144590144591144592144593144594144595144596144597144598144599144600144601144602144603144604144605144606144607144608144609144610144611144612144613144614144615144616144617144618144619144620144621144622144623144624144625144626144627144628144629144630144631144632144633144634144635144636144637144638144639144640144641144642144643144644144645144646144647144648144649144650144651144652144653144654144655144656144657144658144659144660144661144662144663144664144665144666144667144668144669144670144671144672144673144674144675144676144677144678144679144680144681144682144683144684144685144686144687144688144689144690144691144692144693144694144695144696144697144698144699144700144701144702144703144704144705144706144707144708144709144710144711144712144713144714144715144716144717144718144719144720144721144722144723144724144725144726144727144728144729144730144731144732144733144734144735144736144737144738144739144740144741144742144743144744144745144746144747144748144749144750144751144752144753144754144755144756144757144758144759144760144761144762144763144764144765144766144767144768144769144770144771144772144773144774144775144776144777144778144779144780144781144782144783144784144785144786144787144788144789144790144791144792144793144794144795144796144797144798144799144800144801144802144803144804144805144806144807144808144809144810144811144812144813144814144815144816144817144818144819144820144821144822144823144824144825144826144827144828144829144830144831144832144833144834144835144836144837144838144839144840144841144842144843144844144845144846144847144848144849144850144851144852144853144854144855144856144857144858144859144860144861144862144863144864144865144866144867144868144869144870144871144872144873144874144875144876144877144878144879144880144881144882144883144884144885144886144887144888144889144890144891144892144893144894144895144896144897144898144899144900144901144902144903144904144905144906144907144908144909144910144911144912144913144914144915144916144917144918144919144920144921144922144923144924144925144926144927144928144929144930144931144932144933144934144935144936144937144938144939144940144941144942144943144944144945144946144947144948144949144950144951144952144953144954144955144956144957144958144959144960144961144962144963144964144965144966144967144968144969144970144971144972144973144974144975144976144977144978144979144980144981144982144983144984144985144986144987144988144989144990144991144992144993144994144995144996144997144998144999145000145001145002145003145004145005145006145007145008145009145010145011145012145013145014145015145016145017145018145019145020145021145022145023145024145025145026145027145028145029145030145031145032145033145034145035145036145037145038145039145040145041145042145043145044145045145046145047145048145049145050145051145052145053145054145055145056145057145058145059145060145061145062145063145064145065145066145067145068145069145070145071145072145073145074145075145076145077145078145079145080145081145082145083145084145085145086145087145088145089145090145091145092145093145094145095145096145097145098145099145100145101145102145103145104145105145106145107145108145109145110145111145112145113145114145115145116145117145118145119145120145121145122145123145124145125145126145127145128145129145130145131145132145133145134145135145136145137145138145139145140145141145142145143145144145145145146145147145148145149145150145151145152145153145154145155145156145157145158145159145160145161145162145163145164145165145166145167145168145169145170145171145172145173145174145175145176145177145178145179145180145181145182145183145184145185145186145187145188145189145190145191145192145193145194145195145196145197145198145199145200145201145202145203145204145205145206145207145208145209145210145211145212145213145214145215145216145217145218145219145220145221145222145223145224145225145226145227145228145229145230145231145232145233145234145235145236145237145238145239145240145241145242145243145244145245145246145247145248145249145250145251145252145253145254145255145256145257145258145259145260145261145262145263145264145265145266145267145268145269145270145271145272145273145274145275145276145277145278145279145280145281145282145283145284145285145286145287145288145289145290145291145292145293145294145295145296145297145298145299145300145301145302145303145304145305145306145307145308145309145310145311145312145313145314145315145316145317145318145319145320145321145322145323145324145325145326145327145328145329145330145331145332145333145334145335145336145337145338145339145340145341145342145343145344145345145346145347145348145349145350145351145352145353145354145355145356145357145358145359145360145361145362145363145364145365145366145367145368145369145370145371145372145373145374145375145376145377145378145379145380145381145382145383145384145385145386145387145388145389145390145391145392145393145394145395145396145397145398145399145400145401145402145403145404145405145406145407145408145409145410145411145412145413145414145415145416145417145418145419145420145421145422145423145424145425145426145427145428145429145430145431145432145433145434145435145436145437145438145439145440145441145442145443145444145445145446145447145448145449145450145451145452145453145454145455145456145457145458145459145460145461145462145463145464145465145466145467145468145469145470145471145472145473145474145475145476145477145478145479145480145481145482145483145484145485145486145487145488145489145490145491145492145493145494145495145496145497145498145499145500145501145502145503145504145505145506145507145508145509145510145511145512145513145514145515145516145517145518145519145520145521145522145523145524145525145526145527145528145529145530145531145532145533145534145535145536145537145538145539145540145541145542145543145544145545145546145547145548145549145550145551145552145553145554145555145556145557145558145559145560145561145562145563145564145565145566145567145568145569145570145571145572145573145574145575145576145577145578145579145580145581145582145583145584145585145586145587145588145589145590145591145592145593145594145595145596145597145598145599145600145601145602145603145604145605145606145607145608145609145610145611145612145613145614145615145616145617145618145619145620145621145622145623145624145625145626145627145628145629145630145631145632145633145634145635145636145637145638145639145640145641145642145643145644145645145646145647145648145649145650145651145652145653145654145655145656145657145658145659145660145661145662145663145664145665145666145667145668145669145670145671145672145673145674145675145676145677145678145679145680145681145682145683145684145685145686145687145688145689145690145691145692145693145694145695145696145697145698145699145700145701145702145703145704145705145706145707145708145709145710145711145712145713145714145715145716145717145718145719145720145721145722145723145724145725145726145727145728145729145730145731145732145733145734145735145736145737145738145739145740145741145742145743145744145745145746145747145748145749145750145751145752145753145754145755145756145757145758145759145760145761145762145763145764145765145766145767145768145769145770145771145772145773145774145775145776145777145778145779145780145781145782145783145784145785145786145787145788145789145790145791145792145793145794145795145796145797145798145799145800145801145802145803145804145805145806145807145808145809145810145811145812145813145814145815145816145817145818145819145820145821145822145823145824145825145826145827145828145829145830145831145832145833145834145835145836145837145838145839145840145841145842145843145844145845145846145847145848145849145850145851145852145853145854145855145856145857145858145859145860145861145862145863145864145865145866145867145868145869145870145871145872145873145874145875145876145877145878145879145880145881145882145883145884145885145886145887145888145889145890145891145892145893145894145895145896145897145898145899145900145901145902145903145904145905145906145907145908145909145910145911145912145913145914145915145916145917145918145919145920145921145922145923145924145925145926145927145928145929145930145931145932145933145934145935145936145937145938145939145940145941145942145943145944145945145946145947145948145949145950145951145952145953145954145955145956145957145958145959145960145961145962145963145964145965145966145967145968145969145970145971145972145973145974145975145976145977145978145979145980145981145982145983145984145985145986145987145988145989145990145991145992145993145994145995145996145997145998145999146000146001146002146003146004146005146006146007146008146009146010146011146012146013146014146015146016146017146018146019146020146021146022146023146024146025146026146027146028146029146030146031146032146033146034146035146036146037146038146039146040146041146042146043146044146045146046146047146048146049146050146051146052146053146054146055146056146057146058146059146060146061146062146063146064146065146066146067146068146069146070146071146072146073146074146075146076146077146078146079146080146081146082146083146084146085146086146087146088146089146090146091146092146093146094146095146096146097146098146099146100146101146102146103146104146105146106146107146108146109146110146111146112146113146114146115146116146117146118146119146120146121146122146123146124146125146126146127146128146129146130146131146132146133146134146135146136146137146138146139146140146141146142146143146144146145146146146147146148146149146150146151146152146153146154146155146156146157146158146159146160146161146162146163146164146165146166146167146168146169146170146171146172146173146174146175146176146177146178146179146180146181146182146183146184146185146186146187146188146189146190146191146192146193146194146195146196146197146198146199146200146201146202146203146204146205146206146207146208146209146210146211146212146213146214146215146216146217146218146219146220146221146222146223146224146225146226146227146228146229146230146231146232146233146234146235146236146237146238146239146240146241146242146243146244146245146246146247146248146249146250146251146252146253146254146255146256146257146258146259146260146261146262146263146264146265146266146267146268146269146270146271146272146273146274146275146276146277146278146279146280146281146282146283146284146285146286146287146288146289146290146291146292146293146294146295146296146297146298146299146300146301146302146303146304146305146306146307146308146309146310146311146312146313146314146315146316146317146318146319146320146321146322146323146324146325146326146327146328146329146330146331146332146333146334146335146336146337146338146339146340146341146342146343146344146345146346146347146348146349146350146351146352146353146354146355146356146357146358146359146360146361146362146363146364146365146366146367146368146369146370146371146372146373146374146375146376146377146378146379146380146381146382146383146384146385146386146387146388146389146390146391146392146393146394146395146396146397146398146399146400146401146402146403146404146405146406146407146408146409146410146411146412146413146414146415146416146417146418146419146420146421146422146423146424146425146426146427146428146429146430146431146432146433146434146435146436146437146438146439146440146441146442146443146444146445146446146447146448146449146450146451146452146453146454146455146456146457146458146459146460146461146462146463146464146465146466146467146468146469146470146471146472146473146474146475146476146477146478146479146480146481146482146483146484146485146486146487146488146489146490146491146492146493146494146495146496146497146498146499146500146501146502146503146504146505146506146507146508146509146510146511146512146513146514146515146516146517146518146519146520146521146522146523146524146525146526146527146528146529146530146531146532146533146534146535146536146537146538146539146540146541146542146543146544146545146546146547146548146549146550146551146552146553146554146555146556146557146558146559146560146561146562146563146564146565146566146567146568146569146570146571146572146573146574146575146576146577146578146579146580146581146582146583146584146585146586146587146588146589146590146591146592146593146594146595146596146597146598146599146600146601146602146603146604146605146606146607146608146609146610146611146612146613146614146615146616146617146618146619146620146621146622146623146624146625146626146627146628146629146630146631146632146633146634146635146636146637146638146639146640146641146642146643146644146645146646146647146648146649146650146651146652146653146654146655146656146657146658146659146660146661146662146663146664146665146666146667146668146669146670146671146672146673146674146675146676146677146678146679146680146681146682146683146684146685146686146687146688146689146690146691146692146693146694146695146696146697146698146699146700146701146702146703146704146705146706146707146708146709146710146711146712146713146714146715146716146717146718146719146720146721146722146723146724146725146726146727146728146729146730146731146732146733146734146735146736146737146738146739146740146741146742146743146744146745146746146747146748146749146750146751146752146753146754146755146756146757146758146759146760146761146762146763146764146765146766146767146768146769146770146771146772146773146774146775146776146777146778146779146780146781146782146783146784146785146786146787146788146789146790146791146792146793146794146795146796146797146798146799146800146801146802146803146804146805146806146807146808146809146810146811146812146813146814146815146816146817146818146819146820146821146822146823146824146825146826146827146828146829146830146831146832146833146834146835146836146837146838146839146840146841146842146843146844146845146846146847146848146849146850146851146852146853146854146855146856146857146858146859146860146861146862146863146864146865146866146867146868146869146870146871146872146873146874146875146876146877146878146879146880146881146882146883146884146885146886146887146888146889146890146891146892146893146894146895146896146897146898146899146900146901146902146903146904146905146906146907146908146909146910146911146912146913146914146915146916146917146918146919146920146921146922146923146924146925146926146927146928146929146930146931146932146933146934146935146936146937146938146939146940146941146942146943146944146945146946146947146948146949146950146951146952146953146954146955146956146957146958146959146960146961146962146963146964146965146966146967146968146969146970146971146972146973146974146975146976146977146978146979146980146981146982146983146984146985146986146987146988146989146990146991146992146993146994146995146996146997146998146999147000147001147002147003147004147005147006147007147008147009147010147011147012147013147014147015147016147017147018147019147020147021147022147023147024147025147026147027147028147029147030147031147032147033147034147035147036147037147038147039147040147041147042147043147044147045147046147047147048147049147050147051147052147053147054147055147056147057147058147059147060147061147062147063147064147065147066147067147068147069147070147071147072147073147074147075147076147077147078147079147080147081147082147083147084147085147086147087147088147089147090147091147092147093147094147095147096147097147098147099147100147101147102147103147104147105147106147107147108147109147110147111147112147113147114147115147116147117147118147119147120147121147122147123147124147125147126147127147128147129147130147131147132147133147134147135147136147137147138147139147140147141147142147143147144147145147146147147147148147149147150147151147152147153147154147155147156147157147158147159147160147161147162147163147164147165147166147167147168147169147170147171147172147173147174147175147176147177147178147179147180147181147182147183147184147185147186147187147188147189147190147191147192147193147194147195147196147197147198147199147200147201147202147203147204147205147206147207147208147209147210147211147212147213147214147215147216147217147218147219147220147221147222147223147224147225147226147227147228147229147230147231147232147233147234147235147236147237147238147239147240147241147242147243147244147245147246147247147248147249147250147251147252147253147254147255147256147257147258147259147260147261147262147263147264147265147266147267147268147269147270147271147272147273147274147275147276147277147278147279147280147281147282147283147284147285147286147287147288147289147290147291147292147293147294147295147296147297147298147299147300147301147302147303147304147305147306147307147308147309147310147311147312147313147314147315147316147317147318147319147320147321147322147323147324147325147326147327147328147329147330147331147332147333147334147335147336147337147338147339147340147341147342147343147344147345147346147347147348147349147350147351147352147353147354147355147356147357147358147359147360147361147362147363147364147365147366147367147368147369147370147371147372147373147374147375147376147377147378147379147380147381147382147383147384147385147386147387147388147389147390147391147392147393147394147395147396147397147398147399147400147401147402147403147404147405147406147407147408147409147410147411147412147413147414147415147416147417147418147419147420147421147422147423147424147425147426147427147428147429147430147431147432147433147434147435147436147437147438147439147440147441147442147443147444147445147446147447147448147449147450147451147452147453147454147455147456147457147458147459147460147461147462147463147464147465147466147467147468147469147470147471147472147473147474147475147476147477147478147479147480147481147482147483147484147485147486147487147488147489147490147491147492147493147494147495147496147497147498147499147500147501147502147503147504147505147506147507147508147509147510147511147512147513147514147515147516147517147518147519147520147521147522147523147524147525147526147527147528147529147530147531147532147533147534147535147536147537147538147539147540147541147542147543147544147545147546147547147548147549147550147551147552147553147554147555147556147557147558147559147560147561147562147563147564147565147566147567147568147569147570147571147572147573147574147575147576147577147578147579147580147581147582147583147584147585147586147587147588147589147590147591147592147593147594147595147596147597147598147599147600147601147602147603147604147605147606147607147608147609147610147611147612147613147614147615147616147617147618147619147620147621147622147623147624147625147626147627147628147629147630147631147632147633147634147635147636147637147638147639147640147641147642147643147644147645147646147647147648147649147650147651147652147653147654147655147656147657147658147659147660147661147662147663147664147665147666147667147668147669147670147671147672147673147674147675147676147677147678147679147680147681147682147683147684147685147686147687147688147689147690147691147692147693147694147695147696147697147698147699147700147701147702147703147704147705147706147707147708147709147710147711147712147713147714147715147716147717147718147719147720147721147722147723147724147725147726147727147728147729147730147731147732147733147734147735147736147737147738147739147740147741147742147743147744147745147746147747147748147749147750147751147752147753147754147755147756147757147758147759147760147761147762147763147764147765147766147767147768147769147770147771147772147773147774147775147776147777147778147779147780147781147782147783147784147785147786147787147788147789147790147791147792147793147794147795147796147797147798147799147800147801147802147803147804147805147806147807147808147809147810147811147812147813147814147815147816147817147818147819147820147821147822147823147824147825147826147827147828147829147830147831147832147833147834147835147836147837147838147839147840147841147842147843147844147845147846147847147848147849147850147851147852147853147854147855147856147857147858147859147860147861147862147863147864147865147866147867147868147869147870147871147872147873147874147875147876147877147878147879147880147881147882147883147884147885147886147887147888147889147890147891147892147893147894147895147896147897147898147899147900147901147902147903147904147905147906147907147908147909147910147911147912147913147914147915147916147917147918147919147920147921147922147923147924147925147926147927147928147929147930147931147932147933147934147935147936147937147938147939147940147941147942147943147944147945147946147947147948147949147950147951147952147953147954147955147956147957147958147959147960147961147962147963147964147965147966147967147968147969147970147971147972147973147974147975147976147977147978147979147980147981147982147983147984147985147986147987147988147989147990147991147992147993147994147995147996147997147998147999148000148001148002148003148004148005148006148007148008148009148010148011148012148013148014148015148016148017148018148019148020148021148022148023148024148025148026148027148028148029148030148031148032148033148034148035148036148037148038148039148040148041148042148043148044148045148046148047148048148049148050148051148052148053148054148055148056148057148058148059148060148061148062148063148064148065148066148067148068148069148070148071148072148073148074148075148076148077148078148079148080148081148082148083148084148085148086148087148088148089148090148091148092148093148094148095148096148097148098148099148100148101148102148103148104148105148106148107148108148109148110148111148112148113148114148115148116148117148118148119148120148121148122148123148124148125148126148127148128148129148130148131148132148133148134148135148136148137148138148139148140148141148142148143148144148145148146148147148148148149148150148151148152148153148154148155148156148157148158148159148160148161148162148163148164148165148166148167148168148169148170148171148172148173148174148175148176148177148178148179148180148181148182148183148184148185148186148187148188148189148190148191148192148193148194148195148196148197148198148199148200148201148202148203148204148205148206148207148208148209148210148211148212148213148214148215148216148217148218148219148220148221148222148223148224148225148226148227148228148229148230148231148232148233148234148235148236148237148238148239148240148241148242148243148244148245148246148247148248148249148250148251148252148253148254148255148256148257148258148259148260148261148262148263148264148265148266148267148268148269148270148271148272148273148274148275148276148277148278148279148280148281148282148283148284148285148286148287148288148289148290148291148292148293148294148295148296148297148298148299148300148301148302148303148304148305148306148307148308148309148310148311148312148313148314148315148316148317148318148319148320148321148322148323148324148325148326148327148328148329148330148331148332148333148334148335148336148337148338148339148340148341148342148343148344148345148346148347148348148349148350148351148352148353148354148355148356148357148358148359148360148361148362148363148364148365148366148367148368148369148370148371148372148373148374148375148376148377148378148379148380148381148382148383148384148385148386148387148388148389148390148391148392148393148394148395148396148397148398148399148400148401148402148403148404148405148406148407148408148409148410148411148412148413148414148415148416148417148418148419148420148421148422148423148424148425148426148427148428148429148430148431148432148433148434148435148436148437148438148439148440148441148442148443148444148445148446148447148448148449148450148451148452148453148454148455148456148457148458148459148460148461148462148463148464148465148466148467148468148469148470148471148472148473148474148475148476148477148478148479148480148481148482148483148484148485148486148487148488148489148490148491148492148493148494148495148496148497148498148499148500148501148502148503148504148505148506148507148508148509148510148511148512148513148514148515148516148517148518148519148520148521148522148523148524148525148526148527148528148529148530148531148532148533148534148535148536148537148538148539148540148541148542148543148544148545148546148547148548148549148550148551148552148553148554148555148556148557148558148559148560148561148562148563148564148565148566148567148568148569148570148571148572148573148574148575148576148577148578148579148580148581148582148583148584148585148586148587148588148589148590148591148592148593148594148595148596148597148598148599148600148601148602148603148604148605148606148607148608148609148610148611148612148613148614148615148616148617148618148619148620148621148622148623148624148625148626148627148628148629148630148631148632148633148634148635148636148637148638148639148640148641148642148643148644148645148646148647148648148649148650148651148652148653148654148655148656148657148658148659148660148661148662148663148664148665148666148667148668148669148670148671148672148673148674148675148676148677148678148679148680148681148682148683148684148685148686148687148688148689148690148691148692148693148694148695148696148697148698148699148700148701148702148703148704148705148706148707148708148709148710148711148712148713148714148715148716148717148718148719148720148721148722148723148724148725148726148727148728148729148730148731148732148733148734148735148736148737148738148739148740148741148742148743148744148745148746148747148748148749148750148751148752148753148754148755148756148757148758148759148760148761148762148763148764148765148766148767148768148769148770148771148772148773148774148775148776148777148778148779148780148781148782148783148784148785148786148787148788148789148790148791148792148793148794148795148796148797148798148799148800148801148802148803148804148805148806148807148808148809148810148811148812148813148814148815148816148817148818148819148820148821148822148823148824148825148826148827148828148829148830148831148832148833148834148835148836148837148838148839148840148841148842148843148844148845148846148847148848148849148850148851148852148853148854148855148856148857148858148859148860148861148862148863148864148865148866148867148868148869148870148871148872148873148874148875148876148877148878148879148880148881148882148883148884148885148886148887148888148889148890148891148892148893148894148895148896148897148898148899148900148901148902148903148904148905148906148907148908148909148910148911148912148913148914148915148916148917148918148919148920148921148922148923148924148925148926148927148928148929148930148931148932148933148934148935148936148937148938148939148940148941148942148943148944148945148946148947148948148949148950148951148952148953148954148955148956148957148958148959148960148961148962148963148964148965148966148967148968148969148970148971148972148973148974148975148976148977148978148979148980148981148982148983148984148985148986148987148988148989148990148991148992148993148994148995148996148997148998148999149000149001149002149003149004149005149006149007149008149009149010149011149012149013149014149015149016149017149018149019149020149021149022149023149024149025149026149027149028149029149030149031149032149033149034149035149036149037149038149039149040149041149042149043149044149045149046149047149048149049149050149051149052149053149054149055149056149057149058149059149060149061149062149063149064149065149066149067149068149069149070149071149072149073149074149075149076149077149078149079149080149081149082149083149084149085149086149087149088149089149090149091149092149093149094149095149096149097149098149099149100149101149102149103149104149105149106149107149108149109149110149111149112149113149114149115149116149117149118149119149120149121149122149123149124149125149126149127149128149129149130149131149132149133149134149135149136149137149138149139149140149141149142149143149144149145149146149147149148149149149150149151149152149153149154149155149156149157149158149159149160149161149162149163149164149165149166149167149168149169149170149171149172149173149174149175149176149177149178149179149180149181149182149183149184149185149186149187149188149189149190149191149192149193149194149195149196149197149198149199149200149201149202149203149204149205149206149207149208149209149210149211149212149213149214149215149216149217149218149219149220149221149222149223149224149225149226149227149228149229149230149231149232149233149234149235149236149237149238149239149240149241149242149243149244149245149246149247149248149249149250149251149252149253149254149255149256149257149258149259149260149261149262149263149264149265149266149267149268149269149270149271149272149273149274149275149276149277149278149279149280149281149282149283149284149285149286149287149288149289149290149291149292149293149294149295149296149297149298149299149300149301149302149303149304149305149306149307149308149309149310149311149312149313149314149315149316149317149318149319149320149321149322149323149324149325149326149327149328149329149330149331149332149333149334149335149336149337149338149339149340149341149342149343149344149345149346149347149348149349149350149351149352149353149354149355149356149357149358149359149360149361149362149363149364149365149366149367149368149369149370149371149372149373149374149375149376149377149378149379149380149381149382149383149384149385149386149387149388149389149390149391149392149393149394149395149396149397149398149399149400149401149402149403149404149405149406149407149408149409149410149411149412149413149414149415149416149417149418149419149420149421149422149423149424149425149426149427149428149429149430149431149432149433149434149435149436149437149438149439149440149441149442149443149444149445149446149447149448149449149450149451149452149453149454149455149456149457149458149459149460149461149462149463149464149465149466149467149468149469149470149471149472149473149474149475149476149477149478149479149480149481149482149483149484149485149486149487149488149489149490149491149492149493149494149495149496149497149498149499149500149501149502149503149504149505149506149507149508149509149510149511149512149513149514149515149516149517149518149519149520149521149522149523149524149525149526149527149528149529149530149531149532149533149534149535149536149537149538149539149540149541149542149543149544149545149546149547149548149549149550149551149552149553149554149555149556149557149558149559149560149561149562149563149564149565149566149567149568149569149570149571149572149573149574149575149576149577149578149579149580149581149582149583149584149585149586149587149588149589149590149591149592149593149594149595149596149597149598149599149600149601149602149603149604149605149606149607149608149609149610149611149612149613149614149615149616149617149618149619149620149621149622149623149624149625149626149627149628149629149630149631149632149633149634149635149636149637149638149639149640149641149642149643149644149645149646149647149648149649149650149651149652149653149654149655149656149657149658149659149660149661149662149663149664149665149666149667149668149669149670149671149672149673149674149675149676149677149678149679149680149681149682149683149684149685149686149687149688149689149690149691149692149693149694149695149696149697149698149699149700149701149702149703149704149705149706149707149708149709149710149711149712149713149714149715149716149717149718149719149720149721149722149723149724149725149726149727149728149729149730149731149732149733149734149735149736149737149738149739149740149741149742149743149744149745149746149747149748149749149750149751149752149753149754149755149756149757149758149759149760149761149762149763149764149765149766149767149768149769149770149771149772149773149774149775149776149777149778149779149780149781149782149783149784149785149786149787149788149789149790149791149792149793149794149795149796149797149798149799149800149801149802149803149804149805149806149807149808149809149810149811149812149813149814149815149816149817149818149819149820149821149822149823149824149825149826149827149828149829149830149831149832149833149834149835149836149837149838149839149840149841149842149843149844149845149846149847149848149849149850149851149852149853149854149855149856149857149858149859149860149861149862149863149864149865149866149867149868149869149870149871149872149873149874149875149876149877149878149879149880149881149882149883149884149885149886149887149888149889149890149891149892149893149894149895149896149897149898149899149900149901149902149903149904149905149906149907149908149909149910149911149912149913149914149915149916149917149918149919149920149921149922149923149924149925149926149927149928149929149930149931149932149933149934149935149936149937149938149939149940149941149942149943149944149945149946149947149948149949149950149951149952149953149954149955149956149957149958149959149960149961149962149963149964149965149966149967149968149969149970149971149972149973149974149975149976149977149978149979149980149981149982149983149984149985149986149987149988149989149990149991149992149993149994149995149996149997149998149999150000150001150002150003150004150005150006150007150008150009150010150011150012150013150014150015150016150017150018150019150020150021150022150023150024150025150026150027150028150029150030150031150032150033150034150035150036150037150038150039150040150041150042150043150044150045150046150047150048150049150050150051150052150053150054150055150056150057150058150059150060150061150062150063150064150065150066150067150068150069150070150071150072150073150074150075150076150077150078150079150080150081150082150083150084150085150086150087150088150089150090150091150092150093150094150095150096150097150098150099150100150101150102150103150104150105150106150107150108150109150110150111150112150113150114150115150116150117150118150119150120150121150122150123150124150125150126150127150128150129150130150131150132150133150134150135150136150137150138150139150140150141150142150143150144150145150146150147150148150149150150150151150152150153150154150155150156150157150158150159150160150161150162150163150164150165150166150167150168150169150170150171150172150173150174150175150176150177150178150179150180150181150182150183150184150185150186150187150188150189150190150191150192150193150194150195150196150197150198150199150200150201150202150203150204150205150206150207150208150209150210150211150212150213150214150215150216150217150218150219150220150221150222150223150224150225150226150227150228150229150230150231150232150233150234150235150236150237150238150239150240150241150242150243150244150245150246150247150248150249150250150251150252150253150254150255150256150257150258150259150260150261150262150263150264150265150266150267150268150269150270150271150272150273150274150275150276150277150278150279150280150281150282150283150284150285150286150287150288150289150290150291150292150293150294150295150296150297150298150299150300150301150302150303150304150305150306150307150308150309150310150311150312150313150314150315150316150317150318150319150320150321150322150323150324150325150326150327150328150329150330150331150332150333150334150335150336150337150338150339150340150341150342150343150344150345150346150347150348150349150350150351150352150353150354150355150356150357150358150359150360150361150362150363150364150365150366150367150368150369150370150371150372150373150374150375150376150377150378150379150380150381150382150383150384150385150386150387150388150389150390150391150392150393150394150395150396150397150398150399150400150401150402150403150404150405150406150407150408150409150410150411150412150413150414150415150416150417150418150419150420150421150422150423150424150425150426150427150428150429150430150431150432150433150434150435150436150437150438150439150440150441150442150443150444150445150446150447150448150449150450150451150452150453150454150455150456150457150458150459150460150461150462150463150464150465150466150467150468150469150470150471150472150473150474150475150476150477150478150479150480150481150482150483150484150485150486150487150488150489150490150491150492150493150494150495150496150497150498150499150500150501150502150503150504150505150506150507150508150509150510150511150512150513150514150515150516150517150518150519150520150521150522150523150524150525150526150527150528150529150530150531150532150533150534150535150536150537150538150539150540150541150542150543150544150545150546150547150548150549150550150551150552150553150554150555150556150557150558150559150560150561150562150563150564150565150566150567150568150569150570150571150572150573150574150575150576150577150578150579150580150581150582150583150584150585150586150587150588150589150590150591150592150593150594150595150596150597150598150599150600150601150602150603150604150605150606150607150608150609150610150611150612150613150614150615150616150617150618150619150620150621150622150623150624150625150626150627150628150629150630150631150632150633150634150635150636150637150638150639150640150641150642150643150644150645150646150647150648150649150650150651150652150653150654150655150656150657150658150659150660150661150662150663150664150665150666150667150668150669150670150671150672150673150674150675150676150677150678150679150680150681150682150683150684150685150686150687150688150689150690150691150692150693150694150695150696150697150698150699150700150701150702150703150704150705150706150707150708150709150710150711150712150713150714150715150716150717150718150719150720150721150722150723150724150725150726150727150728150729150730150731150732150733150734150735150736150737150738150739150740150741150742150743150744150745150746150747150748150749150750150751150752150753150754150755150756150757150758150759150760150761150762150763150764150765150766150767150768150769150770150771150772150773150774150775150776150777150778150779150780150781150782150783150784150785150786150787150788150789150790150791150792150793150794150795150796150797150798150799150800150801150802150803150804150805150806150807150808150809150810150811150812150813150814150815150816150817150818150819150820150821150822150823150824150825150826150827150828150829150830150831150832150833150834150835150836150837150838150839150840150841150842150843150844150845150846150847150848150849150850150851150852150853150854150855150856150857150858150859150860150861150862150863150864150865150866150867150868150869150870150871150872150873150874150875150876150877150878150879150880150881150882150883150884150885150886150887150888150889150890150891150892150893150894150895150896150897150898150899150900150901150902150903150904150905150906150907150908150909150910150911150912150913150914150915150916150917150918150919150920150921150922150923150924150925150926150927150928150929150930150931150932150933150934150935150936150937150938150939150940150941150942150943150944150945150946150947150948150949150950150951150952150953150954150955150956150957150958150959150960150961150962150963150964150965150966150967150968150969150970150971150972150973150974150975150976150977150978150979150980150981150982150983150984150985150986150987150988150989150990150991150992150993150994150995150996150997150998150999151000151001151002151003151004151005151006151007151008151009151010151011151012151013151014151015151016151017151018151019151020151021151022151023151024151025151026151027151028151029151030151031151032151033151034151035151036151037151038151039151040151041151042151043151044151045151046151047151048151049151050151051151052151053151054151055151056151057151058151059151060151061151062151063151064151065151066151067151068151069151070151071151072151073151074151075151076151077151078151079151080151081151082151083151084151085151086151087151088151089151090151091151092151093151094151095151096151097151098151099151100151101151102151103151104151105151106151107151108151109151110151111151112151113151114151115151116151117151118151119151120151121151122151123151124151125151126151127151128151129151130151131151132151133151134151135151136151137151138151139151140151141151142151143151144151145151146151147151148151149151150151151151152151153151154151155151156151157151158151159151160151161151162151163151164151165151166151167151168151169151170151171151172151173151174151175151176151177151178151179151180151181151182151183151184151185151186151187151188151189151190151191151192151193151194151195151196151197151198151199151200151201151202151203151204151205151206151207151208151209151210151211151212151213151214151215151216151217151218151219151220151221151222151223151224151225151226151227151228151229151230151231151232151233151234151235151236151237151238151239151240151241151242151243151244151245151246151247151248151249151250151251151252151253151254151255151256151257151258151259151260151261151262151263151264151265151266151267151268151269151270151271151272151273151274151275151276151277151278151279151280151281151282151283151284151285151286151287151288151289151290151291151292151293151294151295151296151297151298151299151300151301151302151303151304151305151306151307151308151309151310151311151312151313151314151315151316151317151318151319151320151321151322151323151324151325151326151327151328151329151330151331151332151333151334151335151336151337151338151339151340151341151342151343151344151345151346151347151348151349151350151351151352151353151354151355151356151357151358151359151360151361151362151363151364151365151366151367151368151369151370151371151372151373151374151375151376151377151378151379151380151381151382151383151384151385151386151387151388151389151390151391151392151393151394151395151396151397151398151399151400151401151402151403151404151405151406151407151408151409151410151411151412151413151414151415151416151417151418151419151420151421151422151423151424151425151426151427151428151429151430151431151432151433151434151435151436151437151438151439151440151441151442151443151444151445151446151447151448151449151450151451151452151453151454151455151456151457151458151459151460151461151462151463151464151465151466151467151468151469151470151471151472151473151474151475151476151477151478151479151480151481151482151483151484151485151486151487151488151489151490151491151492151493151494151495151496151497151498151499151500151501151502151503151504151505151506151507151508151509151510151511151512151513151514151515151516151517151518151519151520151521151522151523151524151525151526151527151528151529151530151531151532151533151534151535151536151537151538151539151540151541151542151543151544151545151546151547151548151549151550151551151552151553151554151555151556151557151558151559151560151561151562151563151564151565151566151567151568151569151570151571151572151573151574151575151576151577151578151579151580151581151582151583151584151585151586151587151588151589151590151591151592151593151594151595151596151597151598151599151600151601151602151603151604151605151606151607151608151609151610151611151612151613151614151615151616151617151618151619151620151621151622151623151624151625151626151627151628151629151630151631151632151633151634151635151636151637151638151639151640151641151642151643151644151645151646151647151648151649151650151651151652151653151654151655151656151657151658151659151660151661151662151663151664151665151666151667151668151669151670151671151672151673151674151675151676151677151678151679151680151681151682151683151684151685151686151687151688151689151690151691151692151693151694151695151696151697151698151699151700151701151702151703151704151705151706151707151708151709151710151711151712151713151714151715151716151717151718151719151720151721151722151723151724151725151726151727151728151729151730151731151732151733151734151735151736151737151738151739151740151741151742151743151744151745151746151747151748151749151750151751151752151753151754151755151756151757151758151759151760151761151762151763151764151765151766151767151768151769151770151771151772151773151774151775151776151777151778151779151780151781151782151783151784151785151786151787151788151789151790151791151792151793151794151795151796151797151798151799151800151801151802151803151804151805151806151807151808151809151810151811151812151813151814151815151816151817151818151819151820151821151822151823151824151825151826151827151828151829151830151831151832151833151834151835151836151837151838151839151840151841151842151843151844151845151846151847151848151849151850151851151852151853151854151855151856151857151858151859151860151861151862151863151864151865151866151867151868151869151870151871151872151873151874151875151876151877151878151879151880151881151882151883151884151885151886151887151888151889151890151891151892151893151894151895151896151897151898151899151900151901151902151903151904151905151906151907151908151909151910151911151912151913151914151915151916151917151918151919151920151921151922151923151924151925151926151927151928151929151930151931151932151933151934151935151936151937151938151939151940151941151942151943151944151945151946151947151948151949151950151951151952151953151954151955151956151957151958151959151960151961151962151963151964151965151966151967151968151969151970151971151972151973151974151975151976151977151978151979151980151981151982151983151984151985151986151987151988151989151990151991151992151993151994151995151996151997151998151999152000152001152002152003152004152005152006152007152008152009152010152011152012152013152014152015152016152017152018152019152020152021152022152023152024152025152026152027152028152029152030152031152032152033152034152035152036152037152038152039152040152041152042152043152044152045152046152047152048152049152050152051152052152053152054152055152056152057152058152059152060152061152062152063152064152065152066152067152068152069152070152071152072152073152074152075152076152077152078152079152080152081152082152083152084152085152086152087152088152089152090152091152092152093152094152095152096152097152098152099152100152101152102152103152104152105152106152107152108152109152110152111152112152113152114152115152116152117152118152119152120152121152122152123152124152125152126152127152128152129152130152131152132152133152134152135152136152137152138152139152140152141152142152143152144152145152146152147152148152149152150152151152152152153152154152155152156152157152158152159152160152161152162152163152164152165152166152167152168152169152170152171152172152173152174152175152176152177152178152179152180152181152182152183152184152185152186152187152188152189152190152191152192152193152194152195152196152197152198152199152200152201152202152203152204152205152206152207152208152209152210152211152212152213152214152215152216152217152218152219152220152221152222152223152224152225152226152227152228152229152230152231152232152233152234152235152236152237152238152239152240152241152242152243152244152245152246152247152248152249152250152251152252152253152254152255152256152257152258152259152260152261152262152263152264152265152266152267152268152269152270152271152272152273152274152275152276152277152278152279152280152281152282152283152284152285152286152287152288152289152290152291152292152293152294152295152296152297152298152299152300152301152302152303152304152305152306152307152308152309152310152311152312152313152314152315152316152317152318152319152320152321152322152323152324152325152326152327152328152329152330152331152332152333152334152335152336152337152338152339152340152341152342152343152344152345152346152347152348152349152350152351152352152353152354152355152356152357152358152359152360152361152362152363152364152365152366152367152368152369152370152371152372152373152374152375152376152377152378152379152380152381152382152383152384152385152386152387152388152389152390152391152392152393152394152395152396152397152398152399152400152401152402152403152404152405152406152407152408152409152410152411152412152413152414152415152416152417152418152419152420152421152422152423152424152425152426152427152428152429152430152431152432152433152434152435152436152437152438152439152440152441152442152443152444152445152446152447152448152449152450152451152452152453152454152455152456152457152458152459152460152461152462152463152464152465152466152467152468152469152470152471152472152473152474152475152476152477152478152479152480152481152482152483152484152485152486152487152488152489152490152491152492152493152494152495152496152497152498152499152500152501152502152503152504152505152506152507152508152509152510152511152512152513152514152515152516152517152518152519152520152521152522152523152524152525152526152527152528152529152530152531152532152533152534152535152536152537152538152539152540152541152542152543152544152545152546152547152548152549152550152551152552152553152554152555152556152557152558152559152560152561152562152563152564152565152566152567152568152569152570152571152572152573152574152575152576152577152578152579152580152581152582152583152584152585152586152587152588152589152590152591152592152593152594152595152596152597152598152599152600152601152602152603152604152605152606152607152608152609152610152611152612152613152614152615152616152617152618152619152620152621152622152623152624152625152626152627152628152629152630152631152632152633152634152635152636152637152638152639152640152641152642152643152644152645152646152647152648152649152650152651152652152653152654152655152656152657152658152659152660152661152662152663152664152665152666152667152668152669152670152671152672152673152674152675152676152677152678152679152680152681152682152683152684152685152686152687152688152689152690152691152692152693152694152695152696152697152698152699152700152701152702152703152704152705152706152707152708152709152710152711152712152713152714152715152716152717152718152719152720152721152722152723152724152725152726152727152728152729152730152731152732152733152734152735152736152737152738152739152740152741152742152743152744152745152746152747152748152749152750152751152752152753152754152755152756152757152758152759152760152761152762152763152764152765152766152767152768152769152770152771152772152773152774152775152776152777152778152779152780152781152782152783152784152785152786152787152788152789152790152791152792152793152794152795152796152797152798152799152800152801152802152803152804152805152806152807152808152809152810152811152812152813152814152815152816152817152818152819152820152821152822152823152824152825152826152827152828152829152830152831152832152833152834152835152836152837152838152839152840152841152842152843152844152845152846152847152848152849152850152851152852152853152854152855152856152857152858152859152860152861152862152863152864152865152866152867152868152869152870152871152872152873152874152875152876152877152878152879152880152881152882152883152884152885152886152887152888152889152890152891152892152893152894152895152896152897152898152899152900152901152902152903152904152905152906152907152908152909152910152911152912152913152914152915152916152917152918152919152920152921152922152923152924152925152926152927152928152929152930152931152932152933152934152935152936152937152938152939152940152941152942152943152944152945152946152947152948152949152950152951152952152953152954152955152956152957152958152959152960152961152962152963152964152965152966152967152968152969152970152971152972152973152974152975152976152977152978152979152980152981152982152983152984152985152986152987152988152989152990152991152992152993152994152995152996152997152998152999153000153001153002153003153004153005153006153007153008153009153010153011153012153013153014153015153016153017153018153019153020153021153022153023153024153025153026153027153028153029153030153031153032153033153034153035153036153037153038153039153040153041153042153043153044153045153046153047153048153049153050153051153052153053153054153055153056153057153058153059153060153061153062153063153064153065153066153067153068153069153070153071153072153073153074153075153076153077153078153079153080153081153082153083153084153085153086153087153088153089153090153091153092153093153094153095153096153097153098153099153100153101153102153103153104153105153106153107153108153109153110153111153112153113153114153115153116153117153118153119153120153121153122153123153124153125153126153127153128153129153130153131153132153133153134153135153136153137153138153139153140153141153142153143153144153145153146153147153148153149153150153151153152153153153154153155153156153157153158153159153160153161153162153163153164153165153166153167153168153169153170153171153172153173153174153175153176153177153178153179153180153181153182153183153184153185153186153187153188153189153190153191153192153193153194153195153196153197153198153199153200153201153202153203153204153205153206153207153208153209153210153211153212153213153214153215153216153217153218153219153220153221153222153223153224153225153226153227153228153229153230153231153232153233153234153235153236153237153238153239153240153241153242153243153244153245153246153247153248153249153250153251153252153253153254153255153256153257153258153259153260153261153262153263153264153265153266153267153268153269153270153271153272153273153274153275153276153277153278153279153280153281153282153283153284153285153286153287153288153289153290153291153292153293153294153295153296153297153298153299153300153301153302153303153304153305153306153307153308153309153310153311153312153313153314153315153316153317153318153319153320153321153322153323153324153325153326153327153328153329153330153331153332153333153334153335153336153337153338153339153340153341153342153343153344153345153346153347153348153349153350153351153352153353153354153355153356153357153358153359153360153361153362153363153364153365153366153367153368153369153370153371153372153373153374153375153376153377153378153379153380153381153382153383153384153385153386153387153388153389153390153391153392153393153394153395153396153397153398153399153400153401153402153403153404153405153406153407153408153409153410153411153412153413153414153415153416153417153418153419153420153421153422153423153424153425153426153427153428153429153430153431153432153433153434153435153436153437153438153439153440153441153442153443153444153445153446153447153448153449153450153451153452153453153454153455153456153457153458153459153460153461153462153463153464153465153466153467153468153469153470153471153472153473153474153475153476153477153478153479153480153481153482153483153484153485153486153487153488153489153490153491153492153493153494153495153496153497153498153499153500153501153502153503153504153505153506153507153508153509153510153511153512153513153514153515153516153517153518153519153520153521153522153523153524153525153526153527153528153529153530153531153532153533153534153535153536153537153538153539153540153541153542153543153544153545153546153547153548153549153550153551153552153553153554153555153556153557153558153559153560153561153562153563153564153565153566153567153568153569153570153571153572153573153574153575153576153577153578153579153580153581153582153583153584153585153586153587153588153589153590153591153592153593153594153595153596153597153598153599153600153601153602153603153604153605153606153607153608153609153610153611153612153613153614153615153616153617153618153619153620153621153622153623153624153625153626153627153628153629153630153631153632153633153634153635153636153637153638153639153640153641153642153643153644153645153646153647153648153649153650153651153652153653153654153655153656153657153658153659153660153661153662153663153664153665153666153667153668153669153670153671153672153673153674153675153676153677153678153679153680153681153682153683153684153685153686153687153688153689153690153691153692153693153694153695153696153697153698153699153700153701153702153703153704153705153706153707153708153709153710153711153712153713153714153715153716153717153718153719153720153721153722153723153724153725153726153727153728153729153730153731153732153733153734153735153736153737153738153739153740153741153742153743153744153745153746153747153748153749153750153751153752153753153754153755153756153757153758153759153760153761153762153763153764153765153766153767153768153769153770153771153772153773153774153775153776153777153778153779153780153781153782153783153784153785153786153787153788153789153790153791153792153793153794153795153796153797153798153799153800153801153802153803153804153805153806153807153808153809153810153811153812153813153814153815153816153817153818153819153820153821153822153823153824153825153826153827153828153829153830153831153832153833153834153835153836153837153838153839153840153841153842153843153844153845153846153847153848153849153850153851153852153853153854153855153856153857153858153859153860153861153862153863153864153865153866153867153868153869153870153871153872153873153874153875153876153877153878153879153880153881153882153883153884153885153886153887153888153889153890153891153892153893153894153895153896153897153898153899153900153901153902153903153904153905153906153907153908153909153910153911153912153913153914153915153916153917153918153919153920153921153922153923153924153925153926153927153928153929153930153931153932153933153934153935153936153937153938153939153940153941153942153943153944153945153946153947153948153949153950153951153952153953153954153955153956153957153958153959153960153961153962153963153964153965153966153967153968153969153970153971153972153973153974153975153976153977153978153979153980153981153982153983153984153985153986153987153988153989153990153991153992153993153994153995153996153997153998153999154000154001154002154003154004154005154006154007154008154009154010154011154012154013154014154015154016154017154018154019154020154021154022154023154024154025154026154027154028154029154030154031154032154033154034154035154036154037154038154039154040154041154042154043154044154045154046154047154048154049154050154051154052154053154054154055154056154057154058154059154060154061154062154063154064154065154066154067154068154069154070154071154072154073154074154075154076154077154078154079154080154081154082154083154084154085154086154087154088154089154090154091154092154093154094154095154096154097154098154099154100154101154102154103154104154105154106154107154108154109154110154111154112154113154114154115154116154117154118154119154120154121154122154123154124154125154126154127154128154129154130154131154132154133154134154135154136154137154138154139154140154141154142154143154144154145154146154147154148154149154150154151154152154153154154154155154156154157154158154159154160154161154162154163154164154165154166154167154168154169154170154171154172154173154174154175154176154177154178154179154180154181154182154183154184154185154186154187154188154189154190154191154192154193154194154195154196154197154198154199154200154201154202154203154204154205154206154207154208154209154210154211154212154213154214154215154216154217154218154219154220154221154222154223154224154225154226154227154228154229154230154231154232154233154234154235154236154237154238154239154240154241154242154243154244154245154246154247154248154249154250154251154252154253154254154255154256154257154258154259154260154261154262154263154264154265154266154267154268154269154270154271154272154273154274154275154276154277154278154279154280154281154282154283154284154285154286154287154288154289154290154291154292154293154294154295154296154297154298154299154300154301154302154303154304154305154306154307154308154309154310154311154312154313154314154315154316154317154318154319154320154321154322154323154324154325154326154327154328154329154330154331154332154333154334154335154336154337154338154339154340154341154342154343154344154345154346154347154348154349154350154351154352154353154354154355154356154357154358154359154360154361154362154363154364154365154366154367154368154369154370154371154372154373154374154375154376154377154378154379154380154381154382154383154384154385154386154387154388154389154390154391154392154393154394154395154396154397154398154399154400154401154402154403154404154405154406154407154408154409154410154411154412154413154414154415154416154417154418154419154420154421154422154423154424154425154426154427154428154429154430154431154432154433154434154435154436154437154438154439154440154441154442154443154444154445154446154447154448154449154450154451154452154453154454154455154456154457154458154459154460154461154462154463154464154465154466154467154468154469154470154471154472154473154474154475154476154477154478154479154480154481154482154483154484154485154486154487154488154489154490154491154492154493154494154495154496154497154498154499154500154501154502154503154504154505154506154507154508154509154510154511154512154513154514154515154516154517154518154519154520154521154522154523154524154525154526154527154528154529154530154531154532154533154534154535154536154537154538154539154540154541154542154543154544154545154546154547154548154549154550154551154552154553154554154555154556154557154558154559154560154561154562154563154564154565154566154567154568154569154570154571154572154573154574154575154576154577154578154579154580154581154582154583154584154585154586154587154588154589154590154591154592154593154594154595154596154597154598154599154600154601154602154603154604154605154606154607154608154609154610154611154612154613154614154615154616154617154618154619154620154621154622154623154624154625154626154627154628154629154630154631154632154633154634154635154636154637154638154639154640154641154642154643154644154645154646154647154648154649154650154651154652154653154654154655154656154657154658154659154660154661154662154663154664154665154666154667154668154669154670154671154672154673154674154675154676154677154678154679154680154681154682154683154684154685154686154687154688154689154690154691154692154693154694154695154696154697154698154699154700154701154702154703154704154705154706154707154708154709154710154711154712154713154714154715154716154717154718154719154720154721154722154723154724154725154726154727154728154729154730154731154732154733154734154735154736154737154738154739154740154741154742154743154744154745154746154747154748154749154750154751154752154753154754154755154756154757154758154759154760154761154762154763154764154765154766154767154768154769154770154771154772154773154774154775154776154777154778154779154780154781154782154783154784154785154786154787154788154789154790154791154792154793154794154795154796154797154798154799154800154801154802154803154804154805154806154807154808154809154810154811154812154813154814154815154816154817154818154819154820154821154822154823154824154825154826154827154828154829154830154831154832154833154834154835154836154837154838154839154840154841154842154843154844154845154846154847154848154849154850154851154852154853154854154855154856154857154858154859154860154861154862154863154864154865154866154867154868154869154870154871154872154873154874154875154876154877154878154879154880154881154882154883154884154885154886154887154888154889154890154891154892154893154894154895154896154897154898154899154900154901154902154903154904154905154906154907154908154909154910154911154912154913154914154915154916154917154918154919154920154921154922154923154924154925154926154927154928154929154930154931154932154933154934154935154936154937154938154939154940154941154942154943154944154945154946154947154948154949154950154951154952154953154954154955154956154957154958154959154960154961154962154963154964154965154966154967154968154969154970154971154972154973154974154975154976154977154978154979154980154981154982154983154984154985154986154987154988154989154990154991154992154993154994154995154996154997154998154999155000155001155002155003155004155005155006155007155008155009155010155011155012155013155014155015155016155017155018155019155020155021155022155023155024155025155026155027155028155029155030155031155032155033155034155035155036155037155038155039155040155041155042155043155044155045155046155047155048155049155050155051155052155053155054155055155056155057155058155059155060155061155062155063155064155065155066155067155068155069155070155071155072155073155074155075155076155077155078155079155080155081155082155083155084155085155086155087155088155089155090155091155092155093155094155095155096155097155098155099155100155101155102155103155104155105155106155107155108155109155110155111155112155113155114155115155116155117155118155119155120155121155122155123155124155125155126155127155128155129155130155131155132155133155134155135155136155137155138155139155140155141155142155143155144155145155146155147155148155149155150155151155152155153155154155155155156155157155158155159155160155161155162155163155164155165155166155167155168155169155170155171155172155173155174155175155176155177155178155179155180155181155182155183155184155185155186155187155188155189155190155191155192155193155194155195155196155197155198155199155200155201155202155203155204155205155206155207155208155209155210155211155212155213155214155215155216155217155218155219155220155221155222155223155224155225155226155227155228155229155230155231155232155233155234155235155236155237155238155239155240155241155242155243155244155245155246155247155248155249155250155251155252155253155254155255155256155257155258155259155260155261155262155263155264155265155266155267155268155269155270155271155272155273155274155275155276155277155278155279155280155281155282155283155284155285155286155287155288155289155290155291155292155293155294155295155296155297155298155299155300155301155302155303155304155305155306155307155308155309155310155311155312155313155314155315155316155317155318155319155320155321155322155323155324155325155326155327155328155329155330155331155332155333155334155335155336155337155338155339155340155341155342155343155344155345155346155347155348155349155350155351155352155353155354155355155356155357155358155359155360155361155362155363155364155365155366155367155368155369155370155371155372155373155374155375155376155377155378155379155380155381155382155383155384155385155386155387155388155389155390155391155392155393155394155395155396155397155398155399155400155401155402155403155404155405155406155407155408155409155410155411155412155413155414155415155416155417155418155419155420155421155422155423155424155425155426155427155428155429155430155431155432155433155434155435155436155437155438155439155440155441155442155443155444155445155446155447155448155449155450155451155452155453155454155455155456155457155458155459155460155461155462155463155464155465155466155467155468155469155470155471155472155473155474155475155476155477155478155479155480155481155482155483155484155485155486155487155488155489155490155491155492155493155494155495155496155497155498155499155500155501155502155503155504155505155506155507155508155509155510155511155512155513155514155515155516155517155518155519155520155521155522155523155524155525155526155527155528155529155530155531155532155533155534155535155536155537155538155539155540155541155542155543155544155545155546155547155548155549155550155551155552155553155554155555155556155557155558155559155560155561155562155563155564155565155566155567155568155569155570155571155572155573155574155575155576155577155578155579155580155581155582155583155584155585155586155587155588155589155590155591155592155593155594155595155596155597155598155599155600155601155602155603155604155605155606155607155608155609155610155611155612155613155614155615155616155617155618155619155620155621155622155623155624155625155626155627155628155629155630155631155632155633155634155635155636155637155638155639155640155641155642155643155644155645155646155647155648155649155650155651155652155653155654155655155656155657155658155659155660155661155662155663155664155665155666155667155668155669155670155671155672155673155674155675155676155677155678155679155680155681155682155683155684155685155686155687155688155689155690155691155692155693155694155695155696155697155698155699155700155701155702155703155704155705155706155707155708155709155710155711155712155713155714155715155716155717155718155719155720155721155722155723155724155725155726155727155728155729155730155731155732155733155734155735155736155737155738155739155740155741155742155743155744155745155746155747155748155749155750155751155752155753155754155755155756155757155758155759155760155761155762155763155764155765155766155767155768155769155770155771155772155773155774155775155776155777155778155779155780155781155782155783155784155785155786155787155788155789155790155791155792155793155794155795155796155797155798155799155800155801155802155803155804155805155806155807155808155809155810155811155812155813155814155815155816155817155818155819155820155821155822155823155824155825155826155827155828155829155830155831155832155833155834155835155836155837155838155839155840155841155842155843155844155845155846155847155848155849155850155851155852155853155854155855155856155857155858155859155860155861155862155863155864155865155866155867155868155869155870155871155872155873155874155875155876155877155878155879155880155881155882155883155884155885155886155887155888155889155890155891155892155893155894155895155896155897155898155899155900155901155902155903155904155905155906155907155908155909155910155911155912155913155914155915155916155917155918155919155920155921155922155923155924155925155926155927155928155929155930155931155932155933155934155935155936155937155938155939155940155941155942155943155944155945155946155947155948155949155950155951155952155953155954155955155956155957155958155959155960155961155962155963155964155965155966155967155968155969155970155971155972155973155974155975155976155977155978155979155980155981155982155983155984155985155986155987155988155989155990155991155992155993155994155995155996155997155998155999156000156001156002156003156004156005156006156007156008156009156010156011156012156013156014156015156016156017156018156019156020156021156022156023156024156025156026156027156028156029156030156031156032156033156034156035156036156037156038156039156040156041156042156043156044156045156046156047156048156049156050156051156052156053156054156055156056156057156058156059156060156061156062156063156064156065156066156067156068156069156070156071156072156073156074156075156076156077156078156079156080156081156082156083156084156085156086156087156088156089156090156091156092156093156094156095156096156097156098156099156100156101156102156103156104156105156106156107156108156109156110156111156112156113156114156115156116156117156118156119156120156121156122156123156124156125156126156127156128156129156130156131156132156133156134156135156136156137156138156139156140156141156142156143156144156145156146156147156148156149156150156151156152156153156154156155156156156157156158156159156160156161156162156163156164156165156166156167156168156169156170156171156172156173156174156175156176156177156178156179156180156181156182156183156184156185156186156187156188156189156190156191156192156193156194156195156196156197156198156199156200156201156202156203156204156205156206156207156208156209156210156211156212156213156214156215156216156217156218156219156220156221156222156223156224156225156226156227156228156229156230156231156232156233156234156235156236156237156238156239156240156241156242156243156244156245156246156247156248156249156250156251156252156253156254156255156256156257156258156259156260156261156262156263156264156265156266156267156268156269156270156271156272156273156274156275156276156277156278156279156280156281156282156283156284156285156286156287156288156289156290156291156292156293156294156295156296156297156298156299156300156301156302156303156304156305156306156307156308156309156310156311156312156313156314156315156316156317156318156319156320156321156322156323156324156325156326156327156328156329156330156331156332156333156334156335156336156337156338156339156340156341156342156343156344156345156346156347156348156349156350156351156352156353156354156355156356156357156358156359156360156361156362156363156364156365156366156367156368156369156370156371156372156373156374156375156376156377156378156379156380156381156382156383156384156385156386156387156388156389156390156391156392156393156394156395156396156397156398156399156400156401156402156403156404156405156406156407156408156409156410156411156412156413156414156415156416156417156418156419156420156421156422156423156424156425156426156427156428156429156430156431156432156433156434156435156436156437156438156439156440156441156442156443156444156445156446156447156448156449156450156451156452156453156454156455156456156457156458156459156460156461156462156463156464156465156466156467156468156469156470156471156472156473156474156475156476156477156478156479156480156481156482156483156484156485156486156487156488156489156490156491156492156493156494156495156496156497156498156499156500156501156502156503156504156505156506156507156508156509156510156511156512156513156514156515156516156517156518156519156520156521156522156523156524156525156526156527156528156529156530156531156532156533156534156535156536156537156538156539156540156541156542156543156544156545156546156547156548156549156550156551156552156553156554156555156556156557156558156559156560156561156562156563156564156565156566156567156568156569156570156571156572156573156574156575156576156577156578156579156580156581156582156583156584156585156586156587156588156589156590156591156592156593156594156595156596156597156598156599156600156601156602156603156604156605156606156607156608156609156610156611156612156613156614156615156616156617156618156619156620156621156622156623156624156625156626156627156628156629156630156631156632156633156634156635156636156637156638156639156640156641156642156643156644156645156646156647156648156649156650156651156652156653156654156655156656156657156658156659156660156661156662156663156664156665156666156667156668156669156670156671156672156673156674156675156676156677156678156679156680156681156682156683156684156685156686156687156688156689156690156691156692156693156694156695156696156697156698156699156700156701156702156703156704156705156706156707156708156709156710156711156712156713156714156715156716156717156718156719156720156721156722156723156724156725156726156727156728156729156730156731156732156733156734156735156736156737156738156739156740156741156742156743156744156745156746156747156748156749156750156751156752156753156754156755156756156757156758156759156760156761156762156763156764156765156766156767156768156769156770156771156772156773156774156775156776156777156778156779156780156781156782156783156784156785156786156787156788156789156790156791156792156793156794156795156796156797156798156799156800156801156802156803156804156805156806156807156808156809156810156811156812156813156814156815156816156817156818156819156820156821156822156823156824156825156826156827156828156829156830156831156832156833156834156835156836156837156838156839156840156841156842156843156844156845156846156847156848156849156850156851156852156853156854156855156856156857156858156859156860156861156862156863156864156865156866156867156868156869156870156871156872156873156874156875156876156877156878156879156880156881156882156883156884156885156886156887156888156889156890156891156892156893156894156895156896156897156898156899156900156901156902156903156904156905156906156907156908156909156910156911156912156913156914156915156916156917156918156919156920156921156922156923156924156925156926156927156928156929156930156931156932156933156934156935156936156937156938156939156940156941156942156943156944156945156946156947156948156949156950156951156952156953156954156955156956156957156958156959156960156961156962156963156964156965156966156967156968156969156970156971156972156973156974156975156976156977156978156979156980156981156982156983156984156985156986156987156988156989156990156991156992156993156994156995156996156997156998156999157000157001157002157003157004157005157006157007157008157009157010157011157012157013157014157015157016157017157018157019157020157021157022157023157024157025157026157027157028157029157030157031157032157033157034157035157036157037157038157039157040157041157042157043157044157045157046157047157048157049157050157051157052157053157054157055157056157057157058157059157060157061157062157063157064157065157066157067157068157069157070157071157072157073157074157075157076157077157078157079157080157081157082157083157084157085157086157087157088157089157090157091157092157093157094157095157096157097157098157099157100157101157102157103157104157105157106157107157108157109157110157111157112157113157114157115157116157117157118157119157120157121157122157123157124157125157126157127157128157129157130157131157132157133157134157135157136157137157138157139157140157141157142157143157144157145157146157147157148157149157150157151157152157153157154157155157156157157157158157159157160157161157162157163157164157165157166157167157168157169157170157171157172157173157174157175157176157177157178157179157180157181157182157183157184157185157186157187157188157189157190157191157192157193157194157195157196157197157198157199157200157201157202157203157204157205157206157207157208157209157210157211157212157213157214157215157216157217157218157219157220157221157222157223157224157225157226157227157228157229157230157231157232157233157234157235157236157237157238157239157240157241157242157243157244157245157246157247157248157249157250157251157252157253157254157255157256157257157258157259157260157261157262157263157264157265157266157267157268157269157270157271157272157273157274157275157276157277157278157279157280157281157282157283157284157285157286157287157288157289157290157291157292157293157294157295157296157297157298157299157300157301157302157303157304157305157306157307157308157309157310157311157312157313157314157315157316157317157318157319157320157321157322157323157324157325157326157327157328157329157330157331157332157333157334157335157336157337157338157339157340157341157342157343157344157345157346157347157348157349157350157351157352157353157354157355157356157357157358157359157360157361157362157363157364157365157366157367157368157369157370157371157372157373157374157375157376157377157378157379157380157381157382157383157384157385157386157387157388157389157390157391157392157393157394157395157396157397157398157399157400157401157402157403157404157405157406157407157408157409157410157411157412157413157414157415157416157417157418157419157420157421157422157423157424157425157426157427157428157429157430157431157432157433157434157435157436157437157438157439157440157441157442157443157444157445157446157447157448157449157450157451157452157453157454157455157456157457157458157459157460157461157462157463157464157465157466157467157468157469157470157471157472157473157474157475157476157477157478157479157480157481157482157483157484157485157486157487157488157489157490157491157492157493157494157495157496157497157498157499157500157501157502157503157504157505157506157507157508157509157510157511157512157513157514157515157516157517157518157519157520157521157522157523157524157525157526157527157528157529157530157531157532157533157534157535157536157537157538157539157540157541157542157543157544157545157546157547157548157549157550157551157552157553157554157555157556157557157558157559157560157561157562157563157564157565157566157567157568157569157570157571157572157573157574157575157576157577157578157579157580157581157582157583157584157585157586157587157588157589157590157591157592157593157594157595157596157597157598157599157600157601157602157603157604157605157606157607157608157609157610157611157612157613157614157615157616157617157618157619157620157621157622157623157624157625157626157627157628157629157630157631157632157633157634157635157636157637157638157639157640157641157642157643157644157645157646157647157648157649157650157651157652157653157654157655157656157657157658157659157660157661157662157663157664157665157666157667157668157669157670157671157672157673157674157675157676157677157678157679157680157681157682157683157684157685157686157687157688157689157690157691157692157693157694157695157696157697157698157699157700157701157702157703157704157705157706157707157708157709157710157711157712157713157714157715157716157717157718157719157720157721157722157723157724157725157726157727157728157729157730157731157732157733157734157735157736157737157738157739157740157741157742157743157744157745157746157747157748157749157750157751157752157753157754157755157756157757157758157759157760157761157762157763157764157765157766157767157768157769157770157771157772157773157774157775157776157777157778157779157780157781157782157783157784157785157786157787157788157789157790157791157792157793157794157795157796157797157798157799157800157801157802157803157804157805157806157807157808157809157810157811157812157813157814157815157816157817157818157819157820157821157822157823157824157825157826157827157828157829157830157831157832157833157834157835157836157837157838157839157840157841157842157843157844157845157846157847157848157849157850157851157852157853157854157855157856157857157858157859157860157861157862157863157864157865157866157867157868157869157870157871157872157873157874157875157876157877157878157879157880157881157882157883157884157885157886157887157888157889157890157891157892157893157894157895157896157897157898157899157900157901157902157903157904157905157906157907157908157909157910157911157912157913157914157915157916157917157918157919157920157921157922157923157924157925157926157927157928157929157930157931157932157933157934157935157936157937157938157939157940157941157942157943157944157945157946157947157948157949157950157951157952157953157954157955157956157957157958157959157960157961157962157963157964157965157966157967157968157969157970157971157972157973157974157975157976157977157978157979157980157981157982157983157984157985157986157987157988157989157990157991157992157993157994157995157996157997157998157999158000158001158002158003158004158005158006158007158008158009158010158011158012158013158014158015158016158017158018158019158020158021158022158023158024158025158026158027158028158029158030158031158032158033158034158035158036158037158038158039158040158041158042158043158044158045158046158047158048158049158050158051158052158053158054158055158056158057158058158059158060158061158062158063158064158065158066158067158068158069158070158071158072158073158074158075158076158077158078158079158080158081158082158083158084158085158086158087158088158089158090158091158092158093158094158095158096158097158098158099158100158101158102158103158104158105158106158107158108158109158110158111158112158113158114158115158116158117158118158119158120158121158122158123158124158125158126158127158128158129158130158131158132158133158134158135158136158137158138158139158140158141158142158143158144158145158146158147158148158149158150158151158152158153158154158155158156158157158158158159158160158161158162158163158164158165158166158167158168158169158170158171158172158173158174158175158176158177158178158179158180158181158182158183158184158185158186158187158188158189158190158191158192158193158194158195158196158197158198158199158200158201158202158203158204158205158206158207158208158209158210158211158212158213158214158215158216158217158218158219158220158221158222158223158224158225158226158227158228158229158230158231158232158233158234158235158236158237158238158239158240158241158242158243158244158245158246158247158248158249158250158251158252158253158254158255158256158257158258158259158260158261158262158263158264158265158266158267158268158269158270158271158272158273158274158275158276158277158278158279158280158281158282158283158284158285158286158287158288158289158290158291158292158293158294158295158296158297158298158299158300158301158302158303158304158305158306158307158308158309158310158311158312158313158314158315158316158317158318158319158320158321158322158323158324158325158326158327158328158329158330158331158332158333158334158335158336158337158338158339158340158341158342158343158344158345158346158347158348158349158350158351158352158353158354158355158356158357158358158359158360158361158362158363158364158365158366158367158368158369158370158371158372158373158374158375158376158377158378158379158380158381158382158383158384158385158386158387158388158389158390158391158392158393158394158395158396158397158398158399158400158401158402158403158404158405158406158407158408158409158410158411158412158413158414158415158416158417158418158419158420158421158422158423158424158425158426158427158428158429158430158431158432158433158434158435158436158437158438158439158440158441158442158443158444158445158446158447158448158449158450158451158452158453158454158455158456158457158458158459158460158461158462158463158464158465158466158467158468158469158470158471158472158473158474158475158476158477158478158479158480158481158482158483158484158485158486158487158488158489158490158491158492158493158494158495158496158497158498158499158500158501158502158503158504158505158506158507158508158509158510158511158512158513158514158515158516158517158518158519158520158521158522158523158524158525158526158527158528158529158530158531158532158533158534158535158536158537158538158539158540158541158542158543158544158545158546158547158548158549158550158551158552158553158554158555158556158557158558158559158560158561158562158563158564158565158566158567158568158569158570158571158572158573158574158575158576158577158578158579158580158581158582158583158584158585158586158587158588158589158590158591158592158593158594158595158596158597158598158599158600158601158602158603158604158605158606158607158608158609158610158611158612158613158614158615158616158617158618158619158620158621158622158623158624158625158626158627158628158629158630158631158632158633158634158635158636158637158638158639158640158641158642158643158644158645158646158647158648158649158650158651158652158653158654158655158656158657158658158659158660158661158662158663158664158665158666158667158668158669158670158671158672158673158674158675158676158677158678158679158680158681158682158683158684158685158686158687158688158689158690158691158692158693158694158695158696158697158698158699158700158701158702158703158704158705158706158707158708158709158710158711158712158713158714158715158716158717158718158719158720158721158722158723158724158725158726158727158728158729158730158731158732158733158734158735158736158737158738158739158740158741158742158743158744158745158746158747158748158749158750158751158752158753158754158755158756158757158758158759158760158761158762158763158764158765158766158767158768158769158770158771158772158773158774158775158776158777158778158779158780158781158782158783158784158785158786158787158788158789158790158791158792158793158794158795158796158797158798158799158800158801158802158803158804158805158806158807158808158809158810158811158812158813158814158815158816158817158818158819158820158821158822158823158824158825158826158827158828158829158830158831158832158833158834158835158836158837158838158839158840158841158842158843158844158845158846158847158848158849158850158851158852158853158854158855158856158857158858158859158860158861158862158863158864158865158866158867158868158869158870158871158872158873158874158875158876158877158878158879158880158881158882158883158884158885158886158887158888158889158890158891158892158893158894158895158896158897158898158899158900158901158902158903158904158905158906158907158908158909158910158911158912158913158914158915158916158917158918158919158920158921158922158923158924158925158926158927158928158929158930158931158932158933158934158935158936158937158938158939158940158941158942158943158944158945158946158947158948158949158950158951158952158953158954158955158956158957158958158959158960158961158962158963158964158965158966158967158968158969158970158971158972158973158974158975158976158977158978158979158980158981158982158983158984158985158986158987158988158989158990158991158992158993158994158995158996158997158998158999159000159001159002159003159004159005159006159007159008159009159010159011159012159013159014159015159016159017159018159019159020159021159022159023159024159025159026159027159028159029159030159031159032159033159034159035159036159037159038159039159040159041159042159043159044159045159046159047159048159049159050159051159052159053159054159055159056159057159058159059159060159061159062159063159064159065159066159067159068159069159070159071159072159073159074159075159076159077159078159079159080159081159082159083159084159085159086159087159088159089159090159091159092159093159094159095159096159097159098159099159100159101159102159103159104159105159106159107159108159109159110159111159112159113159114159115159116159117159118159119159120159121159122159123159124159125159126159127159128159129159130159131159132159133159134159135159136159137159138159139159140159141159142159143159144159145159146159147159148159149159150159151159152159153159154159155159156159157159158159159159160159161159162159163159164159165159166159167159168159169159170159171159172159173159174159175159176159177159178159179159180159181159182159183159184159185159186159187159188159189159190159191159192159193159194159195159196159197159198159199159200159201159202159203159204159205159206159207159208159209159210159211159212159213159214159215159216159217159218159219159220159221159222159223159224159225159226159227159228159229159230159231159232159233159234159235159236159237159238159239159240159241159242159243159244159245159246159247159248159249159250159251159252159253159254159255159256159257159258159259159260159261159262159263159264159265159266159267159268159269159270159271159272159273159274159275159276159277159278159279159280159281159282159283159284159285159286159287159288159289159290159291159292159293159294159295159296159297159298159299159300159301159302159303159304159305159306159307159308159309159310159311159312159313159314159315159316159317159318159319159320159321159322159323159324159325159326159327159328159329159330159331159332159333159334159335159336159337159338159339159340159341159342159343159344159345159346159347159348159349159350159351159352159353159354159355159356159357159358159359159360159361159362159363159364159365159366159367159368159369159370159371159372159373159374159375159376159377159378159379159380159381159382159383159384159385159386159387159388159389159390159391159392159393159394159395159396159397159398159399159400159401159402159403159404159405159406159407159408159409159410159411159412159413159414159415159416159417159418159419159420159421159422159423159424159425159426159427159428159429159430159431159432159433159434159435159436159437159438159439159440159441159442159443159444159445159446159447159448159449159450159451159452159453159454159455159456159457159458159459159460159461159462159463159464159465159466159467159468159469159470159471159472159473159474159475159476159477159478159479159480159481159482159483159484159485159486159487159488159489159490159491159492159493159494159495159496159497159498159499159500159501159502159503159504159505159506159507159508159509159510159511159512159513159514159515159516159517159518159519159520159521159522159523159524159525159526159527159528159529159530159531159532159533159534159535159536159537159538159539159540159541159542159543159544159545159546159547159548159549159550159551159552159553159554159555159556159557159558159559159560159561159562159563159564159565159566159567159568159569159570159571159572159573159574159575159576159577159578159579159580159581159582159583159584159585159586159587159588159589159590159591159592159593159594159595159596159597159598159599159600159601159602159603159604159605159606159607159608159609159610159611159612159613159614159615159616159617159618159619159620159621159622159623159624159625159626159627159628159629159630159631159632159633159634159635159636159637159638159639159640159641159642159643159644159645159646159647159648159649159650159651159652159653159654159655159656159657159658159659159660159661159662159663159664159665159666159667159668159669159670159671159672159673159674159675159676159677159678159679159680159681159682159683159684159685159686159687159688159689159690159691159692159693159694159695159696159697159698159699159700159701159702159703159704159705159706159707159708159709159710159711159712159713159714159715159716159717159718159719159720159721159722159723159724159725159726159727159728159729159730159731159732159733159734159735159736159737159738159739159740159741159742159743159744159745159746159747159748159749159750159751159752159753159754159755159756159757159758159759159760159761159762159763159764159765159766159767159768159769159770159771159772159773159774159775159776159777159778159779159780159781159782159783159784159785159786159787159788159789159790159791159792159793159794159795159796159797159798159799159800159801159802159803159804159805159806159807159808159809159810159811159812159813159814159815159816159817159818159819159820159821159822159823159824159825159826159827159828159829159830159831159832159833159834159835159836159837159838159839159840159841159842159843159844159845159846159847159848159849159850159851159852159853159854159855159856159857159858159859159860159861159862159863159864159865159866159867159868159869159870159871159872159873159874159875159876159877159878159879159880159881159882159883159884159885159886159887159888159889159890159891159892159893159894159895159896159897159898159899159900159901159902159903159904159905159906159907159908159909159910159911159912159913159914159915159916159917159918159919159920159921159922159923159924159925159926159927159928159929159930159931159932159933159934159935159936159937159938159939159940159941159942159943159944159945159946159947159948159949159950159951159952159953159954159955159956159957159958159959159960159961159962159963159964159965159966159967159968159969159970159971159972159973159974159975159976159977159978159979159980159981159982159983159984159985159986159987159988159989159990159991159992159993159994159995159996159997159998159999160000160001160002160003160004160005160006160007160008160009160010160011160012160013160014160015160016160017160018160019160020160021160022160023160024160025160026160027160028160029160030160031160032160033160034160035160036160037160038160039160040160041160042160043160044160045160046160047160048160049160050160051160052160053160054160055160056160057160058160059160060160061160062160063160064160065160066160067160068160069160070160071160072160073160074160075160076160077160078160079160080160081160082160083160084160085160086160087160088160089160090160091160092160093160094160095160096160097160098160099160100160101160102160103160104160105160106160107160108160109160110160111160112160113160114160115160116160117160118160119160120160121160122160123160124160125160126160127160128160129160130160131160132160133160134160135160136160137160138160139160140160141160142160143160144160145160146160147160148160149160150160151160152160153160154160155160156160157160158160159160160160161160162160163160164160165160166160167160168160169160170160171160172160173160174160175160176160177160178160179160180160181160182160183160184160185160186160187160188160189160190160191160192160193160194160195160196160197160198160199160200160201160202160203160204160205160206160207160208160209160210160211160212160213160214160215160216160217160218160219160220160221160222160223160224160225160226160227160228160229160230160231160232160233160234160235160236160237160238160239160240160241160242160243160244160245160246160247160248160249160250160251160252160253160254160255160256160257160258160259160260160261160262160263160264160265160266160267160268160269160270160271160272160273160274160275160276160277160278160279160280160281160282160283160284160285160286160287160288160289160290160291160292160293160294160295160296160297160298160299160300160301160302160303160304160305160306160307160308160309160310160311160312160313160314160315160316160317160318160319160320160321160322160323160324160325160326160327160328160329160330160331160332160333160334160335160336160337160338160339160340160341160342160343160344160345160346160347160348160349160350160351160352160353160354160355160356160357160358160359160360160361160362160363160364160365160366160367160368160369160370160371160372160373160374160375160376160377160378160379160380160381160382160383160384160385160386160387160388160389160390160391160392160393160394160395160396160397160398160399160400160401160402160403160404160405160406160407160408160409160410160411160412160413160414160415160416160417160418160419160420160421160422160423160424160425160426160427160428160429160430160431160432160433160434160435160436160437160438160439160440160441160442160443160444160445160446160447160448160449160450160451160452160453160454160455160456160457160458160459160460160461160462160463160464160465160466160467160468160469160470160471160472160473160474160475160476160477160478160479160480160481160482160483160484160485160486160487160488160489160490160491160492160493160494160495160496160497160498160499160500160501160502160503160504160505160506160507160508160509160510160511160512160513160514160515160516160517160518160519160520160521160522160523160524160525160526160527160528160529160530160531160532160533160534160535160536160537160538160539160540160541160542160543160544160545160546160547160548160549160550160551160552160553160554160555160556160557160558160559160560160561160562160563160564160565160566160567160568160569160570160571160572160573160574160575160576160577160578160579160580160581160582160583160584160585160586160587160588160589160590160591160592160593160594160595160596160597160598160599160600160601160602160603160604160605160606160607160608160609160610160611160612160613160614160615160616160617160618160619160620160621160622160623160624160625160626160627160628160629160630160631160632160633160634160635160636160637160638160639160640160641160642160643160644160645160646160647160648160649160650160651160652160653160654160655160656160657160658160659160660160661160662160663160664160665160666160667160668160669160670160671160672160673160674160675160676160677160678160679160680160681160682160683160684160685160686160687160688160689160690160691160692160693160694160695160696160697160698160699160700160701160702160703160704160705160706160707160708160709160710160711160712160713160714160715160716160717160718160719160720160721160722160723160724160725160726160727160728160729160730160731160732160733160734160735160736160737160738160739160740160741160742160743160744160745160746160747160748160749160750160751160752160753160754160755160756160757160758160759160760160761160762160763160764160765160766160767160768160769160770160771160772160773160774160775160776160777160778160779160780160781160782160783160784160785160786160787160788160789160790160791160792160793160794160795160796160797160798160799160800160801160802160803160804160805160806160807160808160809160810160811160812160813160814160815160816160817160818160819160820160821160822160823160824160825160826160827160828160829160830160831160832160833160834160835160836160837160838160839160840160841160842160843160844160845160846160847160848160849160850160851160852160853160854160855160856160857160858160859160860160861160862160863160864160865160866160867160868160869160870160871160872160873160874160875160876160877160878160879160880160881160882160883160884160885160886160887160888160889160890160891160892160893160894160895160896160897160898160899160900160901160902160903160904160905160906160907160908160909160910160911160912160913160914160915160916160917160918160919160920160921160922160923160924160925160926160927160928160929160930160931160932160933160934160935160936160937160938160939160940160941160942160943160944160945160946160947160948160949160950160951160952160953160954160955160956160957160958160959160960160961160962160963160964160965160966160967160968160969160970160971160972160973160974160975160976160977160978160979160980160981160982160983160984160985160986160987160988160989160990160991160992160993160994160995160996160997160998160999161000161001161002161003161004161005161006161007161008161009161010161011161012161013161014161015161016161017161018161019161020161021161022161023161024161025161026161027161028161029161030161031161032161033161034161035161036161037161038161039161040161041161042161043161044161045161046161047161048161049161050161051161052161053161054161055161056161057161058161059161060161061161062161063161064161065161066161067161068161069161070161071161072161073161074161075161076161077161078161079161080161081161082161083161084161085161086161087161088161089161090161091161092161093161094161095161096161097161098161099161100161101161102161103161104161105161106161107161108161109161110161111161112161113161114161115161116161117161118161119161120161121161122161123161124161125161126161127161128161129161130161131161132161133161134161135161136161137161138161139161140161141161142161143161144161145161146161147161148161149161150161151161152161153161154161155161156161157161158161159161160161161161162161163161164161165161166161167161168161169161170161171161172161173161174161175161176161177161178161179161180161181161182161183161184161185161186161187161188161189161190161191161192161193161194161195161196161197161198161199161200161201161202161203161204161205161206161207161208161209161210161211161212161213161214161215161216161217161218161219161220161221161222161223161224161225161226161227161228161229161230161231161232161233161234161235161236161237161238161239161240161241161242161243161244161245161246161247161248161249161250161251161252161253161254161255161256161257161258161259161260161261161262161263161264161265161266161267161268161269161270161271161272161273161274161275161276161277161278161279161280161281161282161283161284161285161286161287161288161289161290161291161292161293161294161295161296161297161298161299161300161301161302161303161304161305161306161307161308161309161310161311161312161313161314161315161316161317161318161319161320161321161322161323161324161325161326161327161328161329161330161331161332161333161334161335161336161337161338161339161340161341161342161343161344161345161346161347161348161349161350161351161352161353161354161355161356161357161358161359161360161361161362161363161364161365161366161367161368161369161370161371161372161373161374161375161376161377161378161379161380161381161382161383161384161385161386161387161388161389161390161391161392161393161394161395161396161397161398161399161400161401161402161403161404161405161406161407161408161409161410161411161412161413161414161415161416161417161418161419161420161421161422161423161424161425161426161427161428161429161430161431161432161433161434161435161436161437161438161439161440161441161442161443161444161445161446161447161448161449161450161451161452161453161454161455161456161457161458161459161460161461161462161463161464161465161466161467161468161469161470161471161472161473161474161475161476161477161478161479161480161481161482161483161484161485161486161487161488161489161490161491161492161493161494161495161496161497161498161499161500161501161502161503161504161505161506161507161508161509161510161511161512161513161514161515161516161517161518161519161520161521161522161523161524161525161526161527161528161529161530161531161532161533161534161535161536161537161538161539161540161541161542161543161544161545161546161547161548161549161550161551161552161553161554161555161556161557161558161559161560161561161562161563161564161565161566161567161568161569161570161571161572161573161574161575161576161577161578161579161580161581161582161583161584161585161586161587161588161589161590161591161592161593161594161595161596161597161598161599161600161601161602161603161604161605161606161607161608161609161610161611161612161613161614161615161616161617161618161619161620161621161622161623161624161625161626161627161628161629161630161631161632161633161634161635161636161637161638161639161640161641161642161643161644161645161646161647161648161649161650161651161652161653161654161655161656161657161658161659161660161661161662161663161664161665161666161667161668161669161670161671161672161673161674161675161676161677161678161679161680161681161682161683161684161685161686161687161688161689161690161691161692161693161694161695161696161697161698161699161700161701161702161703161704161705161706161707161708161709161710161711161712161713161714161715161716161717161718161719161720161721161722161723161724161725161726161727161728161729161730161731161732161733161734161735161736161737161738161739161740161741161742161743161744161745161746161747161748161749161750161751161752161753161754161755161756161757161758161759161760161761161762161763161764161765161766161767161768161769161770161771161772161773161774161775161776161777161778161779161780161781161782161783161784161785161786161787161788161789161790161791161792161793161794161795161796161797161798161799161800161801161802161803161804161805161806161807161808161809161810161811161812161813161814161815161816161817161818161819161820161821161822161823161824161825161826161827161828161829161830161831161832161833161834161835161836161837161838161839161840161841161842161843161844161845161846161847161848161849161850161851161852161853161854161855161856161857161858161859161860161861161862161863161864161865161866161867161868161869161870161871161872161873161874161875161876161877161878161879161880161881161882161883161884161885161886161887161888161889161890161891161892161893161894161895161896161897161898161899161900161901161902161903161904161905161906161907161908161909161910161911161912161913161914161915161916161917161918161919161920161921161922161923161924161925161926161927161928161929161930161931161932161933161934161935161936161937161938161939161940161941161942161943161944161945161946161947161948161949161950161951161952161953161954161955161956161957161958161959161960161961161962161963161964161965161966161967161968161969161970161971161972161973161974161975161976161977161978161979161980161981161982161983161984161985161986161987161988161989161990161991161992161993161994161995161996161997161998161999162000162001162002162003162004162005162006162007162008162009162010162011162012162013162014162015162016162017162018162019162020162021162022162023162024162025162026162027162028162029162030162031162032162033162034162035162036162037162038162039162040162041162042162043162044162045162046162047162048162049162050162051162052162053162054162055162056162057162058162059162060162061162062162063162064162065162066162067162068162069162070162071162072162073162074162075162076162077162078162079162080162081162082162083162084162085162086162087162088162089162090162091162092162093162094162095162096162097162098162099162100162101162102162103162104162105162106162107162108162109162110162111162112162113162114162115162116162117162118162119162120162121162122162123162124162125162126162127162128162129162130162131162132162133162134162135162136162137162138162139162140162141162142162143162144162145162146162147162148162149162150162151162152162153162154162155162156162157162158162159162160162161162162162163162164162165162166162167162168162169162170162171162172162173162174162175162176162177162178162179162180162181162182162183162184162185162186162187162188162189162190162191162192162193162194162195162196162197162198162199162200162201162202162203162204162205162206162207162208162209162210162211162212162213162214162215162216162217162218162219162220162221162222162223162224162225162226162227162228162229162230162231162232162233162234162235162236162237162238162239162240162241162242162243162244162245162246162247162248162249162250162251162252162253162254162255162256162257162258162259162260162261162262162263162264162265162266162267162268162269162270162271162272162273162274162275162276162277162278162279162280162281162282162283162284162285162286162287162288162289162290162291162292162293162294162295162296162297162298162299162300162301162302162303162304162305162306162307162308162309162310162311162312162313162314162315162316162317162318162319162320162321162322162323162324162325162326162327162328162329162330162331162332162333162334162335162336162337162338162339162340162341162342162343162344162345162346162347162348162349162350162351162352162353162354162355162356162357162358162359162360162361162362162363162364162365162366162367162368162369162370162371162372162373162374162375162376162377162378162379162380162381162382162383162384162385162386162387162388162389162390162391162392162393162394162395162396162397162398162399162400162401162402162403162404162405162406162407162408162409162410162411162412162413162414162415162416162417162418162419162420162421162422162423162424162425162426162427162428162429162430162431162432162433162434162435162436162437162438162439162440162441162442162443162444162445162446162447162448162449162450162451162452162453162454162455162456162457162458162459162460162461162462162463162464162465162466162467162468162469162470162471162472162473162474162475162476162477162478162479162480162481162482162483162484162485162486162487162488162489162490162491162492162493162494162495162496162497162498162499162500162501162502162503162504162505162506162507162508162509162510162511162512162513162514162515162516162517162518162519162520162521162522162523162524162525162526162527162528162529162530162531162532162533162534162535162536162537162538162539162540162541162542162543162544162545162546162547162548162549162550162551162552162553162554162555162556162557162558162559162560162561162562162563162564162565162566162567162568162569162570162571162572162573162574162575162576162577162578162579162580162581162582162583162584162585162586162587162588162589162590162591162592162593162594162595162596162597162598162599162600162601162602162603162604162605162606162607162608162609162610162611162612162613162614162615162616162617162618162619162620162621162622162623162624162625162626162627162628162629162630162631162632162633162634162635162636162637162638162639162640162641162642162643162644162645162646162647162648162649162650162651162652162653162654162655162656162657162658162659162660162661162662162663162664162665162666162667162668162669162670162671162672162673162674162675162676162677162678162679162680162681162682162683162684162685162686162687162688162689162690162691162692162693162694162695162696162697162698162699162700162701162702162703162704162705162706162707162708162709162710162711162712162713162714162715162716162717162718162719162720162721162722162723162724162725162726162727162728162729162730162731162732162733162734162735162736162737162738162739162740162741162742162743162744162745162746162747162748162749162750162751162752162753162754162755162756162757162758162759162760162761162762162763162764162765162766162767162768162769162770162771162772162773162774162775162776162777162778162779162780162781162782162783162784162785162786162787162788162789162790162791162792162793162794162795162796162797162798162799162800162801162802162803162804162805162806162807162808162809162810162811162812162813162814162815162816162817162818162819162820162821162822162823162824162825162826162827162828162829162830162831162832162833162834162835162836162837162838162839162840162841162842162843162844162845162846162847162848162849162850162851162852162853162854162855162856162857162858162859162860162861162862162863162864162865162866162867162868162869162870162871162872162873162874162875162876162877162878162879162880162881162882162883162884162885162886162887162888162889162890162891162892162893162894162895162896162897162898162899162900162901162902162903162904162905162906162907162908162909162910162911162912162913162914162915162916162917162918162919162920162921162922162923162924162925162926162927162928162929162930162931162932162933162934162935162936162937162938162939162940162941162942162943162944162945162946162947162948162949162950162951162952162953162954162955162956162957162958162959162960162961162962162963162964162965162966162967162968162969162970162971162972162973162974162975162976162977162978162979162980162981162982162983162984162985162986162987162988162989162990162991162992162993162994162995162996162997162998162999163000163001163002163003163004163005163006163007163008163009163010163011163012163013163014163015163016163017163018163019163020163021163022163023163024163025163026163027163028163029163030163031163032163033163034163035163036163037163038163039163040163041163042163043163044163045163046163047163048163049163050163051163052163053163054163055163056163057163058163059163060163061163062163063163064163065163066163067163068163069163070163071163072163073163074163075163076163077163078163079163080163081163082163083163084163085163086163087163088163089163090163091163092163093163094163095163096163097163098163099163100163101163102163103163104163105163106163107163108163109163110163111163112163113163114163115163116163117163118163119163120163121163122163123163124163125163126163127163128163129163130163131163132163133163134163135163136163137163138163139163140163141163142163143163144163145163146163147163148163149163150163151163152163153163154163155163156163157163158163159163160163161163162163163163164163165163166163167163168163169163170163171163172163173163174163175163176163177163178163179163180163181163182163183163184163185163186163187163188163189163190163191163192163193163194163195163196163197163198163199163200163201163202163203163204163205163206163207163208163209163210163211163212163213163214163215163216163217163218163219163220163221163222163223163224163225163226163227163228163229163230163231163232163233163234163235163236163237163238163239163240163241163242163243163244163245163246163247163248163249163250163251163252163253163254163255163256163257163258163259163260163261163262163263163264163265163266163267163268163269163270163271163272163273163274163275163276163277163278163279163280163281163282163283163284163285163286163287163288163289163290163291163292163293163294163295163296163297163298163299163300163301163302163303163304163305163306163307163308163309163310163311163312163313163314163315163316163317163318163319163320163321163322163323163324163325163326163327163328163329163330163331163332163333163334163335163336163337163338163339163340163341163342163343163344163345163346163347163348163349163350163351163352163353163354163355163356163357163358163359163360163361163362163363163364163365163366163367163368163369163370163371163372163373163374163375163376163377163378163379163380163381163382163383163384163385163386163387163388163389163390163391163392163393163394163395163396163397163398163399163400163401163402163403163404163405163406163407163408163409163410163411163412163413163414163415163416163417163418163419163420163421163422163423163424163425163426163427163428163429163430163431163432163433163434163435163436163437163438163439163440163441163442163443163444163445163446163447163448163449163450163451163452163453163454163455163456163457163458163459163460163461163462163463163464163465163466163467163468163469163470163471163472163473163474163475163476163477163478163479163480163481163482163483163484163485163486163487163488163489163490163491163492163493163494163495163496163497163498163499163500163501163502163503163504163505163506163507163508163509163510163511163512163513163514163515163516163517163518163519163520163521163522163523163524163525163526163527163528163529163530163531163532163533163534163535163536163537163538163539163540163541163542163543163544163545163546163547163548163549163550163551163552163553163554163555163556163557163558163559163560163561163562163563163564163565163566163567163568163569163570163571163572163573163574163575163576163577163578163579163580163581163582163583163584163585163586163587163588163589163590163591163592163593163594163595163596163597163598163599163600163601163602163603163604163605163606163607163608163609163610163611163612163613163614163615163616163617163618163619163620163621163622163623163624163625163626163627163628163629163630163631163632163633163634163635163636163637163638163639163640163641163642163643163644163645163646163647163648163649163650163651163652163653163654163655163656163657163658163659163660163661163662163663163664163665163666163667163668163669163670163671163672163673163674163675163676163677163678163679163680163681163682163683163684163685163686163687163688163689163690163691163692163693163694163695163696163697163698163699163700163701163702163703163704163705163706163707163708163709163710163711163712163713163714163715163716163717163718163719163720163721163722163723163724163725163726163727163728163729163730163731163732163733163734163735163736163737163738163739163740163741163742163743163744163745163746163747163748163749163750163751163752163753163754163755163756163757163758163759163760163761163762163763163764163765163766163767163768163769163770163771163772163773163774163775163776163777163778163779163780163781163782163783163784163785163786163787163788163789163790163791163792163793163794163795163796163797163798163799163800163801163802163803163804163805163806163807163808163809163810163811163812163813163814163815163816163817163818163819163820163821163822163823163824163825163826163827163828163829163830163831163832163833163834163835163836163837163838163839163840163841163842163843163844163845163846163847163848163849163850163851163852163853163854163855163856163857163858163859163860163861163862163863163864163865163866163867163868163869163870163871163872163873163874163875163876163877163878163879163880163881163882163883163884163885163886163887163888163889163890163891163892163893163894163895163896163897163898163899163900163901163902163903163904163905163906163907163908163909163910163911163912163913163914163915163916163917163918163919163920163921163922163923163924163925163926163927163928163929163930163931163932163933163934163935163936163937163938163939163940163941163942163943163944163945163946163947163948163949163950163951163952163953163954163955163956163957163958163959163960163961163962163963163964163965163966163967163968163969163970163971163972163973163974163975163976163977163978163979163980163981163982163983163984163985163986163987163988163989163990163991163992163993163994163995163996163997163998163999164000164001164002164003164004164005164006164007164008164009164010164011164012164013164014164015164016164017164018164019164020164021164022164023164024164025164026164027164028164029164030164031164032164033164034164035164036164037164038164039164040164041164042164043164044164045164046164047164048164049164050164051164052164053164054164055164056164057164058164059164060164061164062164063164064164065164066164067164068164069164070164071164072164073164074164075164076164077164078164079164080164081164082164083164084164085164086164087164088164089164090164091164092164093164094164095164096164097164098164099164100164101164102164103164104164105164106164107164108164109164110164111164112164113164114164115164116164117164118164119164120164121164122164123164124164125164126164127164128164129164130164131164132164133164134164135164136164137164138164139164140164141164142164143164144164145164146164147164148164149164150164151164152164153164154164155164156164157164158164159164160164161164162164163164164164165164166164167164168164169164170164171164172164173164174164175164176164177164178164179164180164181164182164183164184164185164186164187164188164189164190164191164192164193164194164195164196164197164198164199164200164201164202164203164204164205164206164207164208164209164210164211164212164213164214164215164216164217164218164219164220164221164222164223164224164225164226164227164228164229164230164231164232164233164234164235164236164237164238164239164240164241164242164243164244164245164246164247164248164249164250164251164252164253164254164255164256164257164258164259164260164261164262164263164264164265164266164267164268164269164270164271164272164273164274164275164276164277164278164279164280164281164282164283164284164285164286164287164288164289164290164291164292164293164294164295164296164297164298164299164300164301164302164303164304164305164306164307164308164309164310164311164312164313164314164315164316164317164318164319164320164321164322164323164324164325164326164327164328164329164330164331164332164333164334164335164336164337164338164339164340164341164342164343164344164345164346164347164348164349164350164351164352164353164354164355164356164357164358164359164360164361164362164363164364164365164366164367164368164369164370164371164372164373164374164375164376164377164378164379164380164381164382164383164384164385164386164387164388164389164390164391164392164393164394164395164396164397164398164399164400164401164402164403164404164405164406164407164408164409164410164411164412164413164414164415164416164417164418164419164420164421164422164423164424164425164426164427164428164429164430164431164432164433164434164435164436164437164438164439164440164441164442164443164444164445164446164447164448164449164450164451164452164453164454164455164456164457164458164459164460164461164462164463164464164465164466164467164468164469164470164471164472164473164474164475164476164477164478164479164480164481164482164483164484164485164486164487164488164489164490164491164492164493164494164495164496164497164498164499164500164501164502164503164504164505164506164507164508164509164510164511164512164513164514164515164516164517164518164519164520164521164522164523164524164525164526164527164528164529164530164531164532164533164534164535164536164537164538164539164540164541164542164543164544164545164546164547164548164549164550164551164552164553164554164555164556164557164558164559164560164561164562164563164564164565164566164567164568164569164570164571164572164573164574164575164576164577164578164579164580164581164582164583164584164585164586164587164588164589164590164591164592164593164594164595164596164597164598164599164600164601164602164603164604164605164606164607164608164609164610164611164612164613164614164615164616164617164618164619164620164621164622164623164624164625164626164627164628164629164630164631164632164633164634164635164636164637164638164639164640164641164642164643164644164645164646164647164648164649164650164651164652164653164654164655164656164657164658164659164660164661164662164663164664164665164666164667164668164669164670164671164672164673164674164675164676164677164678164679164680164681164682164683164684164685164686164687164688164689164690164691164692164693164694164695164696164697164698164699164700164701164702164703164704164705164706164707164708164709164710164711164712164713164714164715164716164717164718164719164720164721164722164723164724164725164726164727164728164729164730164731164732164733164734164735164736164737164738164739164740164741164742164743164744164745164746164747164748164749164750164751164752164753164754164755164756164757164758164759164760164761164762164763164764164765164766164767164768164769164770164771164772164773164774164775164776164777164778164779164780164781164782164783164784164785164786164787164788164789164790164791164792164793164794164795164796164797164798164799164800164801164802164803164804164805164806164807164808164809164810164811164812164813164814164815164816164817164818164819164820164821164822164823164824164825164826164827164828164829164830164831164832164833164834164835164836164837164838164839164840164841164842164843164844164845164846164847164848164849164850164851164852164853164854164855164856164857164858164859164860164861164862164863164864164865164866164867164868164869164870164871164872164873164874164875164876164877164878164879164880164881164882164883164884164885164886164887164888164889164890164891164892164893164894164895164896164897164898164899164900164901164902164903164904164905164906164907164908164909164910164911164912164913164914164915164916164917164918164919164920164921164922164923164924164925164926164927164928164929164930164931164932164933164934164935164936164937164938164939164940164941164942164943164944164945164946164947164948164949164950164951164952164953164954164955164956164957164958164959164960164961164962164963164964164965164966164967164968164969164970164971164972164973164974164975164976164977164978164979164980164981164982164983164984164985164986164987164988164989164990164991164992164993164994164995164996164997164998164999165000165001165002165003165004165005165006165007165008165009165010165011165012165013165014165015165016165017165018165019165020165021165022165023165024165025165026165027165028165029165030165031165032165033165034165035165036165037165038165039165040165041165042165043165044165045165046165047165048165049165050165051165052165053165054165055165056165057165058165059165060165061165062165063165064165065165066165067165068165069165070165071165072165073165074165075165076165077165078165079165080165081165082165083165084165085165086165087165088165089165090165091165092165093165094165095165096165097165098165099165100165101165102165103165104165105165106165107165108165109165110165111165112165113165114165115165116165117165118165119165120165121165122165123165124165125165126165127165128165129165130165131165132165133165134165135165136165137165138165139165140165141165142165143165144165145165146165147165148165149165150165151165152165153165154165155165156165157165158165159165160165161165162165163165164165165165166165167165168165169165170165171165172165173165174165175165176165177165178165179165180165181165182165183165184165185165186165187165188165189165190165191165192165193165194165195165196165197165198165199165200165201165202165203165204165205165206165207165208165209165210165211165212165213165214165215165216165217165218165219165220165221165222165223165224165225165226165227165228165229165230165231165232165233165234165235165236165237165238165239165240165241165242165243165244165245165246165247165248165249165250165251165252165253165254165255165256165257165258165259165260165261165262165263165264165265165266165267165268165269165270165271165272165273165274165275165276165277165278165279165280165281165282165283165284165285165286165287165288165289165290165291165292165293165294165295165296165297165298165299165300165301165302165303165304165305165306165307165308165309165310165311165312165313165314165315165316165317165318165319165320165321165322165323165324165325165326165327165328165329165330165331165332165333165334165335165336165337165338165339165340165341165342165343165344165345165346165347165348165349165350165351165352165353165354165355165356165357165358165359165360165361165362165363165364165365165366165367165368165369165370165371165372165373165374165375165376165377165378165379165380165381165382165383165384165385165386165387165388165389165390165391165392165393165394165395165396165397165398165399165400165401165402165403165404165405165406165407165408165409165410165411165412165413165414165415165416165417165418165419165420165421165422165423165424165425165426165427165428165429165430165431165432165433165434165435165436165437165438165439165440165441165442165443165444165445165446165447165448165449165450165451165452165453165454165455165456165457165458165459165460165461165462165463165464165465165466165467165468165469165470165471165472165473165474165475165476165477165478165479165480165481165482165483165484165485165486165487165488165489165490165491165492165493165494165495165496165497165498165499165500165501165502165503165504165505165506165507165508165509165510165511165512165513165514165515165516165517165518165519165520165521165522165523165524165525165526165527165528165529165530165531165532165533165534165535165536165537165538165539165540165541165542165543165544165545165546165547165548165549165550165551165552165553165554165555165556165557165558165559165560165561165562165563165564165565165566165567165568165569165570165571165572165573165574165575165576165577165578165579165580165581165582165583165584165585165586165587165588165589165590165591165592165593165594165595165596165597165598165599165600165601165602165603165604165605165606165607165608165609165610165611165612165613165614165615165616165617165618165619165620165621165622165623165624165625165626165627165628165629165630165631165632165633165634165635165636165637165638165639165640165641165642165643165644165645165646165647165648165649165650165651165652165653165654165655165656165657165658165659165660165661165662165663165664165665165666165667165668165669165670165671165672165673165674165675165676165677165678165679165680165681165682165683165684165685165686165687165688165689165690165691165692165693165694165695165696165697165698165699165700165701165702165703165704165705165706165707165708165709165710165711165712165713165714165715165716165717165718165719165720165721165722165723165724165725165726165727165728165729165730165731165732165733165734165735165736165737165738165739165740165741165742165743165744165745165746165747165748165749165750165751165752165753165754165755165756165757165758165759165760165761165762165763165764165765165766165767165768165769165770165771165772165773165774165775165776165777165778165779165780165781165782165783165784165785165786165787165788165789165790165791165792165793165794165795165796165797165798165799165800165801165802165803165804165805165806165807165808165809165810165811165812165813165814165815165816165817165818165819165820165821165822165823165824165825165826165827165828165829165830165831165832165833165834165835165836165837165838165839165840165841165842165843165844165845165846165847165848165849165850165851165852165853165854165855165856165857165858165859165860165861165862165863165864165865165866165867165868165869165870165871165872165873165874165875165876165877165878165879165880165881165882165883165884165885165886165887165888165889165890165891165892165893165894165895165896165897165898165899165900165901165902165903165904165905165906165907165908165909165910165911165912165913165914165915165916165917165918165919165920165921165922165923165924165925165926165927165928165929165930165931165932165933165934165935165936165937165938165939165940165941165942165943165944165945165946165947165948165949165950165951165952165953165954165955165956165957165958165959165960165961165962165963165964165965165966165967165968165969165970165971165972165973165974165975165976165977165978165979165980165981165982165983165984165985165986165987165988165989165990165991165992165993165994165995165996165997165998165999166000166001166002166003166004166005166006166007166008166009166010166011166012166013166014166015166016166017166018166019166020166021166022166023166024166025166026166027166028166029166030166031166032166033166034166035166036166037166038166039166040166041166042166043166044166045166046166047166048166049166050166051166052166053166054166055166056166057166058166059166060166061166062166063166064166065166066166067166068166069166070166071166072166073166074166075166076166077166078166079166080166081166082166083166084166085166086166087166088166089166090166091166092166093166094166095166096166097166098166099166100166101166102166103166104166105166106166107166108166109166110166111166112166113166114166115166116166117166118166119166120166121166122166123166124166125166126166127166128166129166130166131166132166133166134166135166136166137166138166139166140166141166142166143166144166145166146166147166148166149166150166151166152166153166154166155166156166157166158166159166160166161166162166163166164166165166166166167166168166169166170166171166172166173166174166175166176166177166178166179166180166181166182166183166184166185166186166187166188166189166190166191166192166193166194166195166196166197166198166199166200166201166202166203166204166205166206166207166208166209166210166211166212166213166214166215166216166217166218166219166220166221166222166223166224166225166226166227166228166229166230166231166232166233166234166235166236166237166238166239166240166241166242166243166244166245166246166247166248166249166250166251166252166253166254166255166256166257166258166259166260166261166262166263166264166265166266166267166268166269166270166271166272166273166274166275166276166277166278166279166280166281166282166283166284166285166286166287166288166289166290166291166292166293166294166295166296166297166298166299166300166301166302166303166304166305166306166307166308166309166310166311166312166313166314166315166316166317166318166319166320166321166322166323166324166325166326166327166328166329166330166331166332166333166334166335166336166337166338166339166340166341166342166343166344166345166346166347166348166349166350166351166352166353166354166355166356166357166358166359166360166361166362166363166364166365166366166367166368166369166370166371166372166373166374166375166376166377166378166379166380166381166382166383166384166385166386166387166388166389166390166391166392166393166394166395166396166397166398166399166400166401166402166403166404166405166406166407166408166409166410166411166412166413166414166415166416166417166418166419166420166421166422166423166424166425166426166427166428166429166430166431166432166433166434166435166436166437166438166439166440166441166442166443166444166445166446166447166448166449166450166451166452166453166454166455166456166457166458166459166460166461166462166463166464166465166466166467166468166469166470166471166472166473166474166475166476166477166478166479166480166481166482166483166484166485166486166487166488166489166490166491166492166493166494166495166496166497166498166499166500166501166502166503166504166505166506166507166508166509166510166511166512166513166514166515166516166517166518166519166520166521166522166523166524166525166526166527166528166529166530166531166532166533166534166535166536166537166538166539166540166541166542166543166544166545166546166547166548166549166550166551166552166553166554166555166556166557166558166559166560166561166562166563166564166565166566166567166568166569166570166571166572166573166574166575166576166577166578166579166580166581166582166583166584166585166586166587166588166589166590166591166592166593166594166595166596166597166598166599166600166601166602166603166604166605166606166607166608166609166610166611166612166613166614166615166616166617166618166619166620166621166622166623166624166625166626166627166628166629166630166631166632166633166634166635166636166637166638166639166640166641166642166643166644166645166646166647166648166649166650166651166652166653166654166655166656166657166658166659166660166661166662166663166664166665166666166667166668166669166670166671166672166673166674166675166676166677166678166679166680166681166682166683166684166685166686166687166688166689166690166691166692166693166694166695166696166697166698166699166700166701166702166703166704166705166706166707166708166709166710166711166712166713166714166715166716166717166718166719166720166721166722166723166724166725166726166727166728166729166730166731166732166733166734166735166736166737166738166739166740166741166742166743166744166745166746166747166748166749166750166751166752166753166754166755166756166757166758166759166760166761166762166763166764166765166766166767166768166769166770166771166772166773166774166775166776166777166778166779166780166781166782166783166784166785166786166787166788166789166790166791166792166793166794166795166796166797166798166799166800166801166802166803166804166805166806166807166808166809166810166811166812166813166814166815166816166817166818166819166820166821166822166823166824166825166826166827166828166829166830166831166832166833166834166835166836166837166838166839166840166841166842166843166844166845166846166847166848166849166850166851166852166853166854166855166856166857166858166859166860166861166862166863166864166865166866166867166868166869166870166871166872166873166874166875166876166877166878166879166880166881166882166883166884166885166886166887166888166889166890166891166892166893166894166895166896166897166898166899166900166901166902166903166904166905166906166907166908166909166910166911166912166913166914166915166916166917166918166919166920166921166922166923166924166925166926166927166928166929166930166931166932166933166934166935166936166937166938166939166940166941166942166943166944166945166946166947166948166949166950166951166952166953166954166955166956166957166958166959166960166961166962166963166964166965166966166967166968166969166970166971166972166973166974166975166976166977166978166979166980166981166982166983166984166985166986166987166988166989166990166991166992166993166994166995166996166997166998166999167000167001167002167003167004167005167006167007167008167009167010167011167012167013167014167015167016167017167018167019167020167021167022167023167024167025167026167027167028167029167030167031167032167033167034167035167036167037167038167039167040167041167042167043167044167045167046167047167048167049167050167051167052167053167054167055167056167057167058167059167060167061167062167063167064167065167066167067167068167069167070167071167072167073167074167075167076167077167078167079167080167081167082167083167084167085167086167087167088167089167090167091167092167093167094167095167096167097167098167099167100167101167102167103167104167105167106167107167108167109167110167111167112167113167114167115167116167117167118167119167120167121167122167123167124167125167126167127167128167129167130167131167132167133167134167135167136167137167138167139167140167141167142167143167144167145167146167147167148167149167150167151167152167153167154167155167156167157167158167159167160167161167162167163167164167165167166167167167168167169167170167171167172167173167174167175167176167177167178167179167180167181167182167183167184167185167186167187167188167189167190167191167192167193167194167195167196167197167198167199167200167201167202167203167204167205167206167207167208167209167210167211167212167213167214167215167216167217167218167219167220167221167222167223167224167225167226167227167228167229167230167231167232167233167234167235167236167237167238167239167240167241167242167243167244167245167246167247167248167249167250167251167252167253167254167255167256167257167258167259167260167261167262167263167264167265167266167267167268167269167270167271167272167273167274167275167276167277167278167279167280167281167282167283167284167285167286167287167288167289167290167291167292167293167294167295167296167297167298167299167300167301167302167303167304167305167306167307167308167309167310167311167312167313167314167315167316167317167318167319167320167321167322167323167324167325167326167327167328167329167330167331167332167333167334167335167336167337167338167339167340167341167342167343167344167345167346167347167348167349167350167351167352167353167354167355167356167357167358167359167360167361167362167363167364167365167366167367167368167369167370167371167372167373167374167375167376167377167378167379167380167381167382167383167384167385167386167387167388167389167390167391167392167393167394167395167396167397167398167399167400167401167402167403167404167405167406167407167408167409167410167411167412167413167414167415167416167417167418167419167420167421167422167423167424167425167426167427167428167429167430167431167432167433167434167435167436167437167438167439167440167441167442167443167444167445167446167447167448167449167450167451167452167453167454167455167456167457167458167459167460167461167462167463167464167465167466167467167468167469167470167471167472167473167474167475167476167477167478167479167480167481167482167483167484167485167486167487167488167489167490167491167492167493167494167495167496167497167498167499167500167501167502167503167504167505167506167507167508167509167510167511167512167513167514167515167516167517167518167519167520167521167522167523167524167525167526167527167528167529167530167531167532167533167534167535167536167537167538167539167540167541167542167543167544167545167546167547167548167549167550167551167552167553167554167555167556167557167558167559167560167561167562167563167564167565167566167567167568167569167570167571167572167573167574167575167576167577167578167579167580167581167582167583167584167585167586167587167588167589167590167591167592167593167594167595167596167597167598167599167600167601167602167603167604167605167606167607167608167609167610167611167612167613167614167615167616167617167618167619167620167621167622167623167624167625167626167627167628167629167630167631167632167633167634167635167636167637167638167639167640167641167642167643167644167645167646167647167648167649167650167651167652167653167654167655167656167657167658167659167660167661167662167663167664167665167666167667167668167669167670167671167672167673167674167675167676167677167678167679167680167681167682167683167684167685167686167687167688167689167690167691167692167693167694167695167696167697167698167699167700167701167702167703167704167705167706167707167708167709167710167711167712167713167714167715167716167717167718167719167720167721167722167723167724167725167726167727167728167729167730167731167732167733167734167735167736167737167738167739167740167741167742167743167744167745167746167747167748167749167750167751167752167753167754167755167756167757167758167759167760167761167762167763167764167765167766167767167768167769167770167771167772167773167774167775167776167777167778167779167780167781167782167783167784167785167786167787167788167789167790167791167792167793167794167795167796167797167798167799167800167801167802167803167804167805167806167807167808167809167810167811167812167813167814167815167816167817167818167819167820167821167822167823167824167825167826167827167828167829167830167831167832167833167834167835167836167837167838167839167840167841167842167843167844167845167846167847167848167849167850167851167852167853167854167855167856167857167858167859167860167861167862167863167864167865167866167867167868167869167870167871167872167873167874167875167876167877167878167879167880167881167882167883167884167885167886167887167888167889167890167891167892167893167894167895167896167897167898167899167900167901167902167903167904167905167906167907167908167909167910167911167912167913167914167915167916167917167918167919167920167921167922167923167924167925167926167927167928167929167930167931167932167933167934167935167936167937167938167939167940167941167942167943167944167945167946167947167948167949167950167951167952167953167954167955167956167957167958167959167960167961167962167963167964167965167966167967167968167969167970167971167972167973167974167975167976167977167978167979167980167981167982167983167984167985167986167987167988167989167990167991167992167993167994167995167996167997167998167999168000168001168002168003168004168005168006168007168008168009168010168011168012168013168014168015168016168017168018168019168020168021168022168023168024168025168026168027168028168029168030168031168032168033168034168035168036168037168038168039168040168041168042168043168044168045168046168047168048168049168050168051168052168053168054168055168056168057168058168059168060168061168062168063168064168065168066168067168068168069168070168071168072168073168074168075168076168077168078168079168080168081168082168083168084168085168086168087168088168089168090168091168092168093168094168095168096168097168098168099168100168101168102168103168104168105168106168107168108168109168110168111168112168113168114168115168116168117168118168119168120168121168122168123168124168125168126168127168128168129168130168131168132168133168134168135168136168137168138168139168140168141168142168143168144168145168146168147168148168149168150168151168152168153168154168155168156168157168158168159168160168161168162168163168164168165168166168167168168168169168170168171168172168173168174168175168176168177168178168179168180168181168182168183168184168185168186168187168188168189168190168191168192168193168194168195168196168197168198168199168200168201168202168203168204168205168206168207168208168209168210168211168212168213168214168215168216168217168218168219168220168221168222168223168224168225168226168227168228168229168230168231168232168233168234168235168236168237168238168239168240168241168242168243168244168245168246168247168248168249168250168251168252168253168254168255168256168257168258168259168260168261168262168263168264168265168266168267168268168269168270168271168272168273168274168275168276168277168278168279168280168281168282168283168284168285168286168287168288168289168290168291168292168293168294168295168296168297168298168299168300168301168302168303168304168305168306168307168308168309168310168311168312168313168314168315168316168317168318168319168320168321168322168323168324168325168326168327168328168329168330168331168332168333168334168335168336168337168338168339168340168341168342168343168344168345168346168347168348168349168350168351168352168353168354168355168356168357168358168359168360168361168362168363168364168365168366168367168368168369168370168371168372168373168374168375168376168377168378168379168380168381168382168383168384168385168386168387168388168389168390168391168392168393168394168395168396168397168398168399168400168401168402168403168404168405168406168407168408168409168410168411168412168413168414168415168416168417168418168419168420168421168422168423168424168425168426168427168428168429168430168431168432168433168434168435168436168437168438168439168440168441168442168443168444168445168446168447168448168449168450168451168452168453168454168455168456168457168458168459168460168461168462168463168464168465168466168467168468168469168470168471168472168473168474168475168476168477168478168479168480168481168482168483168484168485168486168487168488168489168490168491168492168493168494168495168496168497168498168499168500168501168502168503168504168505168506168507168508168509168510168511168512168513168514168515168516168517168518168519168520168521168522168523168524168525168526168527168528168529168530168531168532168533168534168535168536168537168538168539168540168541168542168543168544168545168546168547168548168549168550168551168552168553168554168555168556168557168558168559168560168561168562168563168564168565168566168567168568168569168570168571168572168573168574168575168576168577168578168579168580168581168582168583168584168585168586168587168588168589168590168591168592168593168594168595168596168597168598168599168600168601168602168603168604168605168606168607168608168609168610168611168612168613168614168615168616168617168618168619168620168621168622168623168624168625168626168627168628168629168630168631168632168633168634168635168636168637168638168639168640168641168642168643168644168645168646168647168648168649168650168651168652168653168654168655168656168657168658168659168660168661168662168663168664168665168666168667168668168669168670168671168672168673168674168675168676168677168678168679168680168681168682168683168684168685168686168687168688168689168690168691168692168693168694168695168696168697168698168699168700168701168702168703168704168705168706168707168708168709168710168711168712168713168714168715168716168717168718168719168720168721168722168723168724168725168726168727168728168729168730168731168732168733168734168735168736168737168738168739168740168741168742168743168744168745168746168747168748168749168750168751168752168753168754168755168756168757168758168759168760168761168762168763168764168765168766168767168768168769168770168771168772168773168774168775168776168777168778168779168780168781168782168783168784168785168786168787168788168789168790168791168792168793168794168795168796168797168798168799168800168801168802168803168804168805168806168807168808168809168810168811168812168813168814168815168816168817168818168819168820168821168822168823168824168825168826168827168828168829168830168831168832168833168834168835168836168837168838168839168840168841168842168843168844168845168846168847168848168849168850168851168852168853168854168855168856168857168858168859168860168861168862168863168864168865168866168867168868168869168870168871168872168873168874168875168876168877168878168879168880168881168882168883168884168885168886168887168888168889168890168891168892168893168894168895168896168897168898168899168900168901168902168903168904168905168906168907168908168909168910168911168912168913168914168915168916168917168918168919168920168921168922168923168924168925168926168927168928168929168930168931168932168933168934168935168936168937168938168939168940168941168942168943168944168945168946168947168948168949168950168951168952168953168954168955168956168957168958168959168960168961168962168963168964168965168966168967168968168969168970168971168972168973168974168975168976168977168978168979168980168981168982168983168984168985168986168987168988168989168990168991168992168993168994168995168996168997168998168999169000169001169002169003169004169005169006169007169008169009169010169011169012169013169014169015169016169017169018169019169020169021169022169023169024169025169026169027169028169029169030169031169032169033169034169035169036169037169038169039169040169041169042169043169044169045169046169047169048169049169050169051169052169053169054169055169056169057169058169059169060169061169062169063169064169065169066169067169068169069169070169071169072169073169074169075169076169077169078169079169080169081169082169083169084169085169086169087169088169089169090169091169092169093169094169095169096169097169098169099169100169101169102169103169104169105169106169107169108169109169110169111169112169113169114169115169116169117169118169119169120169121169122169123169124169125169126169127169128169129169130169131169132169133169134169135169136169137169138169139169140169141169142169143169144169145169146169147169148169149169150169151169152169153169154169155169156169157169158169159169160169161169162169163169164169165169166169167169168169169169170169171169172169173169174169175169176169177169178169179169180169181169182169183169184169185169186169187169188169189169190169191169192169193169194169195169196169197169198169199169200169201169202169203169204169205169206169207169208169209169210169211169212169213169214169215169216169217169218169219169220169221169222169223169224169225169226169227169228169229169230169231169232169233169234169235169236169237169238169239169240169241169242169243169244169245169246169247169248169249169250169251169252169253169254169255169256169257169258169259169260169261169262169263169264169265169266169267169268169269169270169271169272169273169274169275169276169277169278169279169280169281169282169283169284169285169286169287169288169289169290169291169292169293169294169295169296169297169298169299169300169301169302169303169304169305169306169307169308169309169310169311169312169313169314169315169316169317169318169319169320169321169322169323169324169325169326169327169328169329169330169331169332169333169334169335169336169337169338169339169340169341169342169343169344169345169346169347169348169349169350169351169352169353169354169355169356169357169358169359169360169361169362169363169364169365169366169367169368169369169370169371169372169373169374169375169376169377169378169379169380169381169382169383169384169385169386169387169388169389169390169391169392169393169394169395169396169397169398169399169400169401169402169403169404169405169406169407169408169409169410169411169412169413169414169415169416169417169418169419169420169421169422169423169424169425169426169427169428169429169430169431169432169433169434169435169436169437169438169439169440169441169442169443169444169445169446169447169448169449169450169451169452169453169454169455169456169457169458169459169460169461169462169463169464169465169466169467169468169469169470169471169472169473169474169475169476169477169478169479169480169481169482169483169484169485169486169487169488169489169490169491169492169493169494169495169496169497169498169499169500169501169502169503169504169505169506169507169508169509169510169511169512169513169514169515169516169517169518169519169520169521169522169523169524169525169526169527169528169529169530169531169532169533169534169535169536169537169538169539169540169541169542169543169544169545169546169547169548169549169550169551169552169553169554169555169556169557169558169559169560169561169562169563169564169565169566169567169568169569169570169571169572169573169574169575169576169577169578169579169580169581169582169583169584169585169586169587169588169589169590169591169592169593169594169595169596169597169598169599169600169601169602169603169604169605169606169607169608169609169610169611169612169613169614169615169616169617169618169619169620169621169622169623169624169625169626169627169628169629169630169631169632169633169634169635169636169637169638169639169640169641169642169643169644169645169646169647169648169649169650169651169652169653169654169655169656169657169658169659169660169661169662169663169664169665169666169667169668169669169670169671169672169673169674169675169676169677169678169679169680169681169682169683169684169685169686169687169688169689169690169691169692169693169694169695169696169697169698169699169700169701169702169703169704169705169706169707169708169709169710169711169712169713169714169715169716169717169718169719169720169721169722169723169724169725169726169727169728169729169730169731169732169733169734169735169736169737169738169739169740169741169742169743169744169745169746169747169748169749169750169751169752169753169754169755169756169757169758169759169760169761169762169763169764169765169766169767169768169769169770169771169772169773169774169775169776169777169778169779169780169781169782169783169784169785169786169787169788169789169790169791169792169793169794169795169796169797169798169799169800169801169802169803169804169805169806169807169808169809169810169811169812169813169814169815169816169817169818169819169820169821169822169823169824169825169826169827169828169829169830169831169832169833169834169835169836169837169838169839169840169841169842169843169844169845169846169847169848169849169850169851169852169853169854169855169856169857169858169859169860169861169862169863169864169865169866169867169868169869169870169871169872169873169874169875169876169877169878169879169880169881169882169883169884169885169886169887169888169889169890169891169892169893169894169895169896169897169898169899169900169901169902169903169904169905169906169907169908169909169910169911169912169913169914169915169916169917169918169919169920169921169922169923169924169925169926169927169928169929169930169931169932169933169934169935169936169937169938169939169940169941169942169943169944169945169946169947169948169949169950169951169952169953169954169955169956169957169958169959169960169961169962169963169964169965169966169967169968169969169970169971169972169973169974169975169976169977169978169979169980169981169982169983169984169985169986169987169988169989169990169991169992169993169994169995169996169997169998169999170000170001170002170003170004170005170006170007170008170009170010170011170012170013170014170015170016170017170018170019170020170021170022170023170024170025170026170027170028170029170030170031170032170033170034170035170036170037170038170039170040170041170042170043170044170045170046170047170048170049170050170051170052170053170054170055170056170057170058170059170060170061170062170063170064170065170066170067170068170069170070170071170072170073170074170075170076170077170078170079170080170081170082170083170084170085170086170087170088170089170090170091170092170093170094170095170096170097170098170099170100170101170102170103170104170105170106170107170108170109170110170111170112170113170114170115170116170117170118170119170120170121170122170123170124170125170126170127170128170129170130170131170132170133170134170135170136170137170138170139170140170141170142170143170144170145170146170147170148170149170150170151170152170153170154170155170156170157170158170159170160170161170162170163170164170165170166170167170168170169170170170171170172170173170174170175170176170177170178170179170180170181170182170183170184170185170186170187170188170189170190170191170192170193170194170195170196170197170198170199170200170201170202170203170204170205170206170207170208170209170210170211170212170213170214170215170216170217170218170219170220170221170222170223170224170225170226170227170228170229170230170231170232170233170234170235170236170237170238170239170240170241170242170243170244170245170246170247170248170249170250170251170252170253170254170255170256170257170258170259170260170261170262170263170264170265170266170267170268170269170270170271170272170273170274170275170276170277170278170279170280170281170282170283170284170285170286170287170288170289170290170291170292170293170294170295170296170297170298170299170300170301170302170303170304170305170306170307170308170309170310170311170312170313170314170315170316170317170318170319170320170321170322170323170324170325170326170327170328170329170330170331170332170333170334170335170336170337170338170339170340170341170342170343170344170345170346170347170348170349170350170351170352170353170354170355170356170357170358170359170360170361170362170363170364170365170366170367170368170369170370170371170372170373170374170375170376170377170378170379170380170381170382170383170384170385170386170387170388170389170390170391170392170393170394170395170396170397170398170399170400170401170402170403170404170405170406170407170408170409170410170411170412170413170414170415170416170417170418170419170420170421170422170423170424170425170426170427170428170429170430170431170432170433170434170435170436170437170438170439170440170441170442170443170444170445170446170447170448170449170450170451170452170453170454170455170456170457170458170459170460170461170462170463170464170465170466170467170468170469170470170471170472170473170474170475170476170477170478170479170480170481170482170483170484170485170486170487170488170489170490170491170492170493170494170495170496170497170498170499170500170501170502170503170504170505170506170507170508170509170510170511170512170513170514170515170516170517170518170519170520170521170522170523170524170525170526170527170528170529170530170531170532170533170534170535170536170537170538170539170540170541170542170543170544170545170546170547170548170549170550170551170552170553170554170555170556170557170558170559170560170561170562170563170564170565170566170567170568170569170570170571170572170573170574170575170576170577170578170579170580170581170582170583170584170585170586170587170588170589170590170591170592170593170594170595170596170597170598170599170600170601170602170603170604170605170606170607170608170609170610170611170612170613170614170615170616170617170618170619170620170621170622170623170624170625170626170627170628170629170630170631170632170633170634170635170636170637170638170639170640170641170642170643170644170645170646170647170648170649170650170651170652170653170654170655170656170657170658170659170660170661170662170663170664170665170666170667170668170669170670170671170672170673170674170675170676170677170678170679170680170681170682170683170684170685170686170687170688170689170690170691170692170693170694170695170696170697170698170699170700170701170702170703170704170705170706170707170708170709170710170711170712170713170714170715170716170717170718170719170720170721170722170723170724170725170726170727170728170729170730170731170732170733170734170735170736170737170738170739170740170741170742170743170744170745170746170747170748170749170750170751170752170753170754170755170756170757170758170759170760170761170762170763170764170765170766170767170768170769170770170771170772170773170774170775170776170777170778170779170780170781170782170783170784170785170786170787170788170789170790170791170792170793170794170795170796170797170798170799170800170801170802170803170804170805170806170807170808170809170810170811170812170813170814170815170816170817170818170819170820170821170822170823170824170825170826170827170828170829170830170831170832170833170834170835170836170837170838170839170840170841170842170843170844170845170846170847170848170849170850170851170852170853170854170855170856170857170858170859170860170861170862170863170864170865170866170867170868170869170870170871170872170873170874170875170876170877170878170879170880170881170882170883170884170885170886170887170888170889170890170891170892170893170894170895170896170897170898170899170900170901170902170903170904170905170906170907170908170909170910170911170912170913170914170915170916170917170918170919170920170921170922170923170924170925170926170927170928170929170930170931170932170933170934170935170936170937170938170939170940170941170942170943170944170945170946170947170948170949170950170951170952170953170954170955170956170957170958170959170960170961170962170963170964170965170966170967170968170969170970170971170972170973170974170975170976170977170978170979170980170981170982170983170984170985170986170987170988170989170990170991170992170993170994170995170996170997170998170999171000171001171002171003171004171005171006171007171008171009171010171011171012171013171014171015171016171017171018171019171020171021171022171023171024171025171026171027171028171029171030171031171032171033171034171035171036171037171038171039171040171041171042171043171044171045171046171047171048171049171050171051171052171053171054171055171056171057171058171059171060171061171062171063171064171065171066171067171068171069171070171071171072171073171074171075171076171077171078171079171080171081171082171083171084171085171086171087171088171089171090171091171092171093171094171095171096171097171098171099171100171101171102171103171104171105171106171107171108171109171110171111171112171113171114171115171116171117171118171119171120171121171122171123171124171125171126171127171128171129171130171131171132171133171134171135171136171137171138171139171140171141171142171143171144171145171146171147171148171149171150171151171152171153171154171155171156171157171158171159171160171161171162171163171164171165171166171167171168171169171170171171171172171173171174171175171176171177171178171179171180171181171182171183171184171185171186171187171188171189171190171191171192171193171194171195171196171197171198171199171200171201171202171203171204171205171206171207171208171209171210171211171212171213171214171215171216171217171218171219171220171221171222171223171224171225171226171227171228171229171230171231171232171233171234171235171236171237171238171239171240171241171242171243171244171245171246171247171248171249171250171251171252171253171254171255171256171257171258171259171260171261171262171263171264171265171266171267171268171269171270171271171272171273171274171275171276171277171278171279171280171281171282171283171284171285171286171287171288171289171290171291171292171293171294171295171296171297171298171299171300171301171302171303171304171305171306171307171308171309171310171311171312171313171314171315171316171317171318171319171320171321171322171323171324171325171326171327171328171329171330171331171332171333171334171335171336171337171338171339171340171341171342171343171344171345171346171347171348171349171350171351171352171353171354171355171356171357171358171359171360171361171362171363171364171365171366171367171368171369171370171371171372171373171374171375171376171377171378171379171380171381171382171383171384171385171386171387171388171389171390171391171392171393171394171395171396171397171398171399171400171401171402171403171404171405171406171407171408171409171410171411171412171413171414171415171416171417171418171419171420171421171422171423171424171425171426171427171428171429171430171431171432171433171434171435171436171437171438171439171440171441171442171443171444171445171446171447171448171449171450171451171452171453171454171455171456171457171458171459171460171461171462171463171464171465171466171467171468171469171470171471171472171473171474171475171476171477171478171479171480171481171482171483171484171485171486171487171488171489171490171491171492171493171494171495171496171497171498171499171500171501171502171503171504171505171506171507171508171509171510171511171512171513171514171515171516171517171518171519171520171521171522171523171524171525171526171527171528171529171530171531171532171533171534171535171536171537171538171539171540171541171542171543171544171545171546171547171548171549171550171551171552171553171554171555171556171557171558171559171560171561171562171563171564171565171566171567171568171569171570171571171572171573171574171575171576171577171578171579171580171581171582171583171584171585171586171587171588171589171590171591171592171593171594171595171596171597171598171599171600171601171602171603171604171605171606171607171608171609171610171611171612171613171614171615171616171617171618171619171620171621171622171623171624171625171626171627171628171629171630171631171632171633171634171635171636171637171638171639171640171641171642171643171644171645171646171647171648171649171650171651171652171653171654171655171656171657171658171659171660171661171662171663171664171665171666171667171668171669171670171671171672171673171674171675171676171677171678171679171680171681171682171683171684171685171686171687171688171689171690171691171692171693171694171695171696171697171698171699171700171701171702171703171704171705171706171707171708171709171710171711171712171713171714171715171716171717171718171719171720171721171722171723171724171725171726171727171728171729171730171731171732171733171734171735171736171737171738171739171740171741171742171743171744171745171746171747171748171749171750171751171752171753171754171755171756171757171758171759171760171761171762171763171764171765171766171767171768171769171770171771171772171773171774171775171776171777171778171779171780171781171782171783171784171785171786171787171788171789171790171791171792171793171794171795171796171797171798171799171800171801171802171803171804171805171806171807171808171809171810171811171812171813171814171815171816171817171818171819171820171821171822171823171824171825171826171827171828171829171830171831171832171833171834171835171836171837171838171839171840171841171842171843171844171845171846171847171848171849171850171851171852171853171854171855171856171857171858171859171860171861171862171863171864171865171866171867171868171869171870171871171872171873171874171875171876171877171878171879171880171881171882171883171884171885171886171887171888171889171890171891171892171893171894171895171896171897171898171899171900171901171902171903171904171905171906171907171908171909171910171911171912171913171914171915171916171917171918171919171920171921171922171923171924171925171926171927171928171929171930171931171932171933171934171935171936171937171938171939171940171941171942171943171944171945171946171947171948171949171950171951171952171953171954171955171956171957171958171959171960171961171962171963171964171965171966171967171968171969171970171971171972171973171974171975171976171977171978171979171980171981171982171983171984171985171986171987171988171989171990171991171992171993171994171995171996171997171998171999172000172001172002172003172004172005172006172007172008172009172010172011172012172013172014172015172016172017172018172019172020172021172022172023172024172025172026172027172028172029172030172031172032172033172034172035172036172037172038172039172040172041172042172043172044172045172046172047172048172049172050172051172052172053172054172055172056172057172058172059172060172061172062172063172064172065172066172067172068172069172070172071172072172073172074172075172076172077172078172079172080172081172082172083172084172085172086172087172088172089172090172091172092172093172094172095172096172097172098172099172100172101172102172103172104172105172106172107172108172109172110172111172112172113172114172115172116172117172118172119172120172121172122172123172124172125172126172127172128172129172130172131172132172133172134172135172136172137172138172139172140172141172142172143172144172145172146172147172148172149172150172151172152172153172154172155172156172157172158172159172160172161172162172163172164172165172166172167172168172169172170172171172172172173172174172175172176172177172178172179172180172181172182172183172184172185172186172187172188172189172190172191172192172193172194172195172196172197172198172199172200172201172202172203172204172205172206172207172208172209172210172211172212172213172214172215172216172217172218172219172220172221172222172223172224172225172226172227172228172229172230172231172232172233172234172235172236172237172238172239172240172241172242172243172244172245172246172247172248172249172250172251172252172253172254172255172256172257172258172259172260172261172262172263172264172265172266172267172268172269172270172271172272172273172274172275172276172277172278172279172280172281172282172283172284172285172286172287172288172289172290172291172292172293172294172295172296172297172298172299172300172301172302172303172304172305172306172307172308172309172310172311172312172313172314172315172316172317172318172319172320172321172322172323172324172325172326172327172328172329172330172331172332172333172334172335172336172337172338172339172340172341172342172343172344172345172346172347172348172349172350172351172352172353172354172355172356172357172358172359172360172361172362172363172364172365172366172367172368172369172370172371172372172373172374172375172376172377172378172379172380172381172382172383172384172385172386172387172388172389172390172391172392172393172394172395172396172397172398172399172400172401172402172403172404172405172406172407172408172409172410172411172412172413172414172415172416172417172418172419172420172421172422172423172424172425172426172427172428172429172430172431172432172433172434172435172436172437172438172439172440172441172442172443172444172445172446172447172448172449172450172451172452172453172454172455172456172457172458172459172460172461172462172463172464172465172466172467172468172469172470172471172472172473172474172475172476172477172478172479172480172481172482172483172484172485172486172487172488172489172490172491172492172493172494172495172496172497172498172499172500172501172502172503172504172505172506172507172508172509172510172511172512172513172514172515172516172517172518172519172520172521172522172523172524172525172526172527172528172529172530172531172532172533172534172535172536172537172538172539172540172541172542172543172544172545172546172547172548172549172550172551172552172553172554172555172556172557172558172559172560172561172562172563172564172565172566172567172568172569172570172571172572172573172574172575172576172577172578172579172580172581172582172583172584172585172586172587172588172589172590172591172592172593172594172595172596172597172598172599172600172601172602172603172604172605172606172607172608172609172610172611172612172613172614172615172616172617172618172619172620172621172622172623172624172625172626172627172628172629172630172631172632172633172634172635172636172637172638172639172640172641172642172643172644172645172646172647172648172649172650172651172652172653172654172655172656172657172658172659172660172661172662172663172664172665172666172667172668172669172670172671172672172673172674172675172676172677172678172679172680172681172682172683172684172685172686172687172688172689172690172691172692172693172694172695172696172697172698172699172700172701172702172703172704172705172706172707172708172709172710172711172712172713172714172715172716172717172718172719172720172721172722172723172724172725172726172727172728172729172730172731172732172733172734172735172736172737172738172739172740172741172742172743172744172745172746172747172748172749172750172751172752172753172754172755172756172757172758172759172760172761172762172763172764172765172766172767172768172769172770172771172772172773172774172775172776172777172778172779172780172781172782172783172784172785172786172787172788172789172790172791172792172793172794172795172796172797172798172799172800172801172802172803172804172805172806172807172808172809172810172811172812172813172814172815172816172817172818172819172820172821172822172823172824172825172826172827172828172829172830172831172832172833172834172835172836172837172838172839172840172841172842172843172844172845172846172847172848172849172850172851172852172853172854172855172856172857172858172859172860172861172862172863172864172865172866172867172868172869172870172871172872172873172874172875172876172877172878172879172880172881172882172883172884172885172886172887172888172889172890172891172892172893172894172895172896172897172898172899172900172901172902172903172904172905172906172907172908172909172910172911172912172913172914172915172916172917172918172919172920172921172922172923172924172925172926172927172928172929172930172931172932172933172934172935172936172937172938172939172940172941172942172943172944172945172946172947172948172949172950172951172952172953172954172955172956172957172958172959172960172961172962172963172964172965172966172967172968172969172970172971172972172973172974172975172976172977172978172979172980172981172982172983172984172985172986172987172988172989172990172991172992172993172994172995172996172997172998172999173000173001173002173003173004173005173006173007173008173009173010173011173012173013173014173015173016173017173018173019173020173021173022173023173024173025173026173027173028173029173030173031173032173033173034173035173036173037173038173039173040173041173042173043173044173045173046173047173048173049173050173051173052173053173054173055173056173057173058173059173060173061173062173063173064173065173066173067173068173069173070173071173072173073173074173075173076173077173078173079173080173081173082173083173084173085173086173087173088173089173090173091173092173093173094173095173096173097173098173099173100173101173102173103173104173105173106173107173108173109173110173111173112173113173114173115173116173117173118173119173120173121173122173123173124173125173126173127173128173129173130173131173132173133173134173135173136173137173138173139173140173141173142173143173144173145173146173147173148173149173150173151173152173153173154173155173156173157173158173159173160173161173162173163173164173165173166173167173168173169173170173171173172173173173174173175173176173177173178173179173180173181173182173183173184173185173186173187173188173189173190173191173192173193173194173195173196173197173198173199173200173201173202173203173204173205173206173207173208173209173210173211173212173213173214173215173216173217173218173219173220173221173222173223173224173225173226173227173228173229173230173231173232173233173234173235173236173237173238173239173240173241173242173243173244173245173246173247173248173249173250173251173252173253173254173255173256173257173258173259173260173261173262173263173264173265173266173267173268173269173270173271173272173273173274173275173276173277173278173279173280173281173282173283173284173285173286173287173288173289173290173291173292173293173294173295173296173297173298173299173300173301173302173303173304173305173306173307173308173309173310173311173312173313173314173315173316173317173318173319173320173321173322173323173324173325173326173327173328173329173330173331173332173333173334173335173336173337173338173339173340173341173342173343173344173345173346173347173348173349173350173351173352173353173354173355173356173357173358173359173360173361173362173363173364173365173366173367173368173369173370173371173372173373173374173375173376173377173378173379173380173381173382173383173384173385173386173387173388173389173390173391173392173393173394173395173396173397173398173399173400173401173402173403173404173405173406173407173408173409173410173411173412173413173414173415173416173417173418173419173420173421173422173423173424173425173426173427173428173429173430173431173432173433173434173435173436173437173438173439173440173441173442173443173444173445173446173447173448173449173450173451173452173453173454173455173456173457173458173459173460173461173462173463173464173465173466173467173468173469173470173471173472173473173474173475173476173477173478173479173480173481173482173483173484173485173486173487173488173489173490173491173492173493173494173495173496173497173498173499173500173501173502173503173504173505173506173507173508173509173510173511173512173513173514173515173516173517173518173519173520173521173522173523173524173525173526173527173528173529173530173531173532173533173534173535173536173537173538173539173540173541173542173543173544173545173546173547173548173549173550173551173552173553173554173555173556173557173558173559173560173561173562173563173564173565173566173567173568173569173570173571173572173573173574173575173576173577173578173579173580173581173582173583173584173585173586173587173588173589173590173591173592173593173594173595173596173597173598173599173600173601173602173603173604173605173606173607173608173609173610173611173612173613173614173615173616173617173618173619173620173621173622173623173624173625173626173627173628173629173630173631173632173633173634173635173636173637173638173639173640173641173642173643173644173645173646173647173648173649173650173651173652173653173654173655173656173657173658173659173660173661173662173663173664173665173666173667173668173669173670173671173672173673173674173675173676173677173678173679173680173681173682173683173684173685173686173687173688173689173690173691173692173693173694173695173696173697173698173699173700173701173702173703173704173705173706173707173708173709173710173711173712173713173714173715173716173717173718173719173720173721173722173723173724173725173726173727173728173729173730173731173732173733173734173735173736173737173738173739173740173741173742173743173744173745173746173747173748173749173750173751173752173753173754173755173756173757173758173759173760173761173762173763173764173765173766173767173768173769173770173771173772173773173774173775173776173777173778173779173780173781173782173783173784173785173786173787173788173789173790173791173792173793173794173795173796173797173798173799173800173801173802173803173804173805173806173807173808173809173810173811173812173813173814173815173816173817173818173819173820173821173822173823173824173825173826173827173828173829173830173831173832173833173834173835173836173837173838173839173840173841173842173843173844173845173846173847173848173849173850173851173852173853173854173855173856173857173858173859173860173861173862173863173864173865173866173867173868173869173870173871173872173873173874173875173876173877173878173879173880173881173882173883173884173885173886173887173888173889173890173891173892173893173894173895173896173897173898173899173900173901173902173903173904173905173906173907173908173909173910173911173912173913173914173915173916173917173918173919173920173921173922173923173924173925173926173927173928173929173930173931173932173933173934173935173936173937173938173939173940173941173942173943173944173945173946173947173948173949173950173951173952173953173954173955173956173957173958173959173960173961173962173963173964173965173966173967173968173969173970173971173972173973173974173975173976173977173978173979173980173981173982173983173984173985173986173987173988173989173990173991173992173993173994173995173996173997173998173999174000174001174002174003174004174005174006174007174008174009174010174011174012174013174014174015174016174017174018174019174020174021174022174023174024174025174026174027174028174029174030174031174032174033174034174035174036174037174038174039174040174041174042174043174044174045174046174047174048174049174050174051174052174053174054174055174056174057174058174059174060174061174062174063174064174065174066174067174068174069174070174071174072174073174074174075174076174077174078174079174080174081174082174083174084174085174086174087174088174089174090174091174092174093174094174095174096174097174098174099174100174101174102174103174104174105174106174107174108174109174110174111174112174113174114174115174116174117174118174119174120174121174122174123174124174125174126174127174128174129174130174131174132174133174134174135174136174137174138174139174140174141174142174143174144174145174146174147174148174149174150174151174152174153174154174155174156174157174158174159174160174161174162174163174164174165174166174167174168174169174170174171174172174173174174174175174176174177174178174179174180174181174182174183174184174185174186174187174188174189174190174191174192174193174194174195174196174197174198174199174200174201174202174203174204174205174206174207174208174209174210174211174212174213174214174215174216174217174218174219174220174221174222174223174224174225174226174227174228174229174230174231174232174233174234174235174236174237174238174239174240174241174242174243174244174245174246174247174248174249174250174251174252174253174254174255174256174257174258174259174260174261174262174263174264174265174266174267174268174269174270174271174272174273174274174275174276174277174278174279174280174281174282174283174284174285174286174287174288174289174290174291174292174293174294174295174296174297174298174299174300174301174302174303174304174305174306174307174308174309174310174311174312174313174314174315174316174317174318174319174320174321174322174323174324174325174326174327174328174329174330174331174332174333174334174335174336174337174338174339174340174341174342174343174344174345174346174347174348174349174350174351174352174353174354174355174356174357174358174359174360174361174362174363174364174365174366174367174368174369174370174371174372174373174374174375174376174377174378174379174380174381174382174383174384174385174386174387174388174389174390174391174392174393174394174395174396174397174398174399174400174401174402174403174404174405174406174407174408174409174410174411174412174413174414174415174416174417174418174419174420174421174422174423174424174425174426174427174428174429174430174431174432174433174434174435174436174437174438174439174440174441174442174443174444174445174446174447174448174449174450174451174452174453174454174455174456174457174458174459174460174461174462174463174464174465174466174467174468174469174470174471174472174473174474174475174476174477174478174479174480174481174482174483174484174485174486174487174488174489174490174491174492174493174494174495174496174497174498174499174500174501174502174503174504174505174506174507174508174509174510174511174512174513174514174515174516174517174518174519174520174521174522174523174524174525174526174527174528174529174530174531174532174533174534174535174536174537174538174539174540174541174542174543174544174545174546174547174548174549174550174551174552174553174554174555174556174557174558174559174560174561174562174563174564174565174566174567174568174569174570174571174572174573174574174575174576174577174578174579174580174581174582174583174584174585174586174587174588174589174590174591174592174593174594174595174596174597174598174599174600174601174602174603174604174605174606174607174608174609174610174611174612174613174614174615174616174617174618174619174620174621174622174623174624174625174626174627174628174629174630174631174632174633174634174635174636174637174638174639174640174641174642174643174644174645174646174647174648174649174650174651174652174653174654174655174656174657174658174659174660174661174662174663174664174665174666174667174668174669174670174671174672174673174674174675174676174677174678174679174680174681174682174683174684174685174686174687174688174689174690174691174692174693174694174695174696174697174698174699174700174701174702174703174704174705174706174707174708174709174710174711174712174713174714174715174716174717174718174719174720174721174722174723174724174725174726174727174728174729174730174731174732174733174734174735174736174737174738174739174740174741174742174743174744174745174746174747174748174749174750174751174752174753174754174755174756174757174758174759174760174761174762174763174764174765174766174767174768174769174770174771174772174773174774174775174776174777174778174779174780174781174782174783174784174785174786174787174788174789174790174791174792174793174794174795174796174797174798174799174800174801174802174803174804174805174806174807174808174809174810174811174812174813174814174815174816174817174818174819174820174821174822174823174824174825174826174827174828174829174830174831174832174833174834174835174836174837174838174839174840174841174842174843174844174845174846174847174848174849174850174851174852174853174854174855174856174857174858174859174860174861174862174863174864174865174866174867174868174869174870174871174872174873174874174875174876174877174878174879174880174881174882174883174884174885174886174887174888174889174890174891174892174893174894174895174896174897174898174899174900174901174902174903174904174905174906174907174908174909174910174911174912174913174914174915174916174917174918174919174920174921174922174923174924174925174926174927174928174929174930174931174932174933174934174935174936174937174938174939174940174941174942174943174944174945174946174947174948174949174950174951174952174953174954174955174956174957174958174959174960174961174962174963174964174965174966174967174968174969174970174971174972174973174974174975174976174977174978174979174980174981174982174983174984174985174986174987174988174989174990174991174992174993174994174995174996174997174998174999175000175001175002175003175004175005175006175007175008175009175010175011175012175013175014175015175016175017175018175019175020175021175022175023175024175025175026175027175028175029175030175031175032175033175034175035175036175037175038175039175040175041175042175043175044175045175046175047175048175049175050175051175052175053175054175055175056175057175058175059175060175061175062175063175064175065175066175067175068175069175070175071175072175073175074175075175076175077175078175079175080175081175082175083175084175085175086175087175088175089175090175091175092175093175094175095175096175097175098175099175100175101175102175103175104175105175106175107175108175109175110175111175112175113175114175115175116175117175118175119175120175121175122175123175124175125175126175127175128175129175130175131175132175133175134175135175136175137175138175139175140175141175142175143175144175145175146175147175148175149175150175151175152175153175154175155175156175157175158175159175160175161175162175163175164175165175166175167175168175169175170175171175172175173175174175175175176175177175178175179175180175181175182175183175184175185175186175187175188175189175190175191175192175193175194175195175196175197175198175199175200175201175202175203175204175205175206175207175208175209175210175211175212175213175214175215175216175217175218175219175220175221175222175223175224175225175226175227175228175229175230175231175232175233175234175235175236175237175238175239175240175241175242175243175244175245175246175247175248175249175250175251175252175253175254175255175256175257175258175259175260175261175262175263175264175265175266175267175268175269175270175271175272175273175274175275175276175277175278175279175280175281175282175283175284175285175286175287175288175289175290175291175292175293175294175295175296175297175298175299175300175301175302175303175304175305175306175307175308175309175310175311175312175313175314175315175316175317175318175319175320175321175322175323175324175325175326175327175328175329175330175331175332175333175334175335175336175337175338175339175340175341175342175343175344175345175346175347175348175349175350175351175352175353175354175355175356175357175358175359175360175361175362175363175364175365175366175367175368175369175370175371175372175373175374175375175376175377175378175379175380175381175382175383175384175385175386175387175388175389175390175391175392175393175394175395175396175397175398175399175400175401175402175403175404175405175406175407175408175409175410175411175412175413175414175415175416175417175418175419175420175421175422175423175424175425175426175427175428175429175430175431175432175433175434175435175436175437175438175439175440175441175442175443175444175445175446175447175448175449175450175451175452175453175454175455175456175457175458175459175460175461175462175463175464175465175466175467175468175469175470175471175472175473175474175475175476175477175478175479175480175481175482175483175484175485175486175487175488175489175490175491175492175493175494175495175496175497175498175499175500175501175502175503175504175505175506175507175508175509175510175511175512175513175514175515175516175517175518175519175520175521175522175523175524175525175526175527175528175529175530175531175532175533175534175535175536175537175538175539175540175541175542175543175544175545175546175547175548175549175550175551175552175553175554175555175556175557175558175559175560175561175562175563175564175565175566175567175568175569175570175571175572175573175574175575175576175577175578175579175580175581175582175583175584175585175586175587175588175589175590175591175592175593175594175595175596175597175598175599175600175601175602175603175604175605175606175607175608175609175610175611175612175613175614175615175616175617175618175619175620175621175622175623175624175625175626175627175628175629175630175631175632175633175634175635175636175637175638175639175640175641175642175643175644175645175646175647175648175649175650175651175652175653175654175655175656175657175658175659175660175661175662175663175664175665175666175667175668175669175670175671175672175673175674175675175676175677175678175679175680175681175682175683175684175685175686175687175688175689175690175691175692175693175694175695175696175697175698175699175700175701175702175703175704175705175706175707175708175709175710175711175712175713175714175715175716175717175718175719175720175721175722175723175724175725175726175727175728175729175730175731175732175733175734175735175736175737175738175739175740175741175742175743175744175745175746175747175748175749175750175751175752175753175754175755175756175757175758175759175760175761175762175763175764175765175766175767175768175769175770175771175772175773175774175775175776175777175778175779175780175781175782175783175784175785175786175787175788175789175790175791175792175793175794175795175796175797175798175799175800175801175802175803175804175805175806175807175808175809175810175811175812175813175814175815175816175817175818175819175820175821175822175823175824175825175826175827175828175829175830175831175832175833175834175835175836175837175838175839175840175841175842175843175844175845175846175847175848175849175850175851175852175853175854175855175856175857175858175859175860175861175862175863175864175865175866175867175868175869175870175871175872175873175874175875175876175877175878175879175880175881175882175883175884175885175886175887175888175889175890175891175892175893175894175895175896175897175898175899175900175901175902175903175904175905175906175907175908175909175910175911175912175913175914175915175916175917175918175919175920175921175922175923175924175925175926175927175928175929175930175931175932175933175934175935175936175937175938175939175940175941175942175943175944175945175946175947175948175949175950175951175952175953175954175955175956175957175958175959175960175961175962175963175964175965175966175967175968175969175970175971175972175973175974175975175976175977175978175979175980175981175982175983175984175985175986175987175988175989175990175991175992175993175994175995175996175997175998175999176000176001176002176003176004176005176006176007176008176009176010176011176012176013176014176015176016176017176018176019176020176021176022176023176024176025176026176027176028176029176030176031176032176033176034176035176036176037176038176039176040176041176042176043176044176045176046176047176048176049176050176051176052176053176054176055176056176057176058176059176060176061176062176063176064176065176066176067176068176069176070176071176072176073176074176075176076176077176078176079176080176081176082176083176084176085176086176087176088176089176090176091176092176093176094176095176096176097176098176099176100176101176102176103176104176105176106176107176108176109176110176111176112176113176114176115176116176117176118176119176120176121176122176123176124176125176126176127176128176129176130176131176132176133176134176135176136176137176138176139176140176141176142176143176144176145176146176147176148176149176150176151176152176153176154176155176156176157176158176159176160176161176162176163176164176165176166176167176168176169176170176171176172176173176174176175176176176177176178176179176180176181176182176183176184176185176186176187176188176189176190176191176192176193176194176195176196176197176198176199176200176201176202176203176204176205176206176207176208176209176210176211176212176213176214176215176216176217176218176219176220176221176222176223176224176225176226176227176228176229176230176231176232176233176234176235176236176237176238176239176240176241176242176243176244176245176246176247176248176249176250176251176252176253176254176255176256176257176258176259176260176261176262176263176264176265176266176267176268176269176270176271176272176273176274176275176276176277176278176279176280176281176282176283176284176285176286176287176288176289176290176291176292176293176294176295176296176297176298176299176300176301176302176303176304176305176306176307176308176309176310176311176312176313176314176315176316176317176318176319176320176321176322176323176324176325176326176327176328176329176330176331176332176333176334176335176336176337176338176339176340176341176342176343176344176345176346176347176348176349176350176351176352176353176354176355176356176357176358176359176360176361176362176363176364176365176366176367176368176369176370176371176372176373176374176375176376176377176378176379176380176381176382176383176384176385176386176387176388176389176390176391176392176393176394176395176396176397176398176399176400176401176402176403176404176405176406176407176408176409176410176411176412176413176414176415176416176417176418176419176420176421176422176423176424176425176426176427176428176429176430176431176432176433176434176435176436176437176438176439176440176441176442176443176444176445176446176447176448176449176450176451176452176453176454176455176456176457176458176459176460176461176462176463176464176465176466176467176468176469176470176471176472176473176474176475176476176477176478176479176480176481176482176483176484176485176486176487176488176489176490176491176492176493176494176495176496176497176498176499176500176501176502176503176504176505176506176507176508176509176510176511176512176513176514176515176516176517176518176519176520176521176522176523176524176525176526176527176528176529176530176531176532176533176534176535176536176537176538176539176540176541176542176543176544176545176546176547176548176549176550176551176552176553176554176555176556176557176558176559176560176561176562176563176564176565176566176567176568176569176570176571176572176573176574176575176576176577176578176579176580176581176582176583176584176585176586176587176588176589176590176591176592176593176594176595176596176597176598176599176600176601176602176603176604176605176606176607176608176609176610176611176612176613176614176615176616176617176618176619176620176621176622176623176624176625176626176627176628176629176630176631176632176633176634176635176636176637176638176639176640176641176642176643176644176645176646176647176648176649176650176651176652176653176654176655176656176657176658176659176660176661176662176663176664176665176666176667176668176669176670176671176672176673176674176675176676176677176678176679176680176681176682176683176684176685176686176687176688176689176690176691176692176693176694176695176696176697176698176699176700176701176702176703176704176705176706176707176708176709176710176711176712176713176714176715176716176717176718176719176720176721176722176723176724176725176726176727176728176729176730176731176732176733176734176735176736176737176738176739176740176741176742176743176744176745176746176747176748176749176750176751176752176753176754176755176756176757176758176759176760176761176762176763176764176765176766176767176768176769176770176771176772176773176774176775176776176777176778176779176780176781176782176783176784176785176786176787176788176789176790176791176792176793176794176795176796176797176798176799176800176801176802176803176804176805176806176807176808176809176810176811176812176813176814176815176816176817176818176819176820176821176822176823176824176825176826176827176828176829176830176831176832176833176834176835176836176837176838176839176840176841176842176843176844176845176846176847176848176849176850176851176852176853176854176855176856176857176858176859176860176861176862176863176864176865176866176867176868176869176870176871176872176873176874176875176876176877176878176879176880176881176882176883176884176885176886176887176888176889176890176891176892176893176894176895176896176897176898176899176900176901176902176903176904176905176906176907176908176909176910176911176912176913176914176915176916176917176918176919176920176921176922176923176924176925176926176927176928176929176930176931176932176933176934176935176936176937176938176939176940176941176942176943176944176945176946176947176948176949176950176951176952176953176954176955176956176957176958176959176960176961176962176963176964176965176966176967176968176969176970176971176972176973176974176975176976176977176978176979176980176981176982176983176984176985176986176987176988176989176990176991176992176993176994176995176996176997176998176999177000177001177002177003177004177005177006177007177008177009177010177011177012177013177014177015177016177017177018177019177020177021177022177023177024177025177026177027177028177029177030177031177032177033177034177035177036177037177038177039177040177041177042177043177044177045177046177047177048177049177050177051177052177053177054177055177056177057177058177059177060177061177062177063177064177065177066177067177068177069177070177071177072177073177074177075177076177077177078177079177080177081177082177083177084177085177086177087177088177089177090177091177092177093177094177095177096177097177098177099177100177101177102177103177104177105177106177107177108177109177110177111177112177113177114177115177116177117177118177119177120177121177122177123177124177125177126177127177128177129177130177131177132177133177134177135177136177137177138177139177140177141177142177143177144177145177146177147177148177149177150177151177152177153177154177155177156177157177158177159177160177161177162177163177164177165177166177167177168177169177170177171177172177173177174177175177176177177177178177179177180177181177182177183177184177185177186177187177188177189177190177191177192177193177194177195177196177197177198177199177200177201177202177203177204177205177206177207177208177209177210177211177212177213177214177215177216177217177218177219177220177221177222177223177224177225177226177227177228177229177230177231177232177233177234177235177236177237177238177239177240177241177242177243177244177245177246177247177248177249177250177251177252177253177254177255177256177257177258177259177260177261177262177263177264177265177266177267177268177269177270177271177272177273177274177275177276177277177278177279177280177281177282177283177284177285177286177287177288177289177290177291177292177293177294177295177296177297177298177299177300177301177302177303177304177305177306177307177308177309177310177311177312177313177314177315177316177317177318177319177320177321177322177323177324177325177326177327177328177329177330177331177332177333177334177335177336177337177338177339177340177341177342177343177344177345177346177347177348177349177350177351177352177353177354177355177356177357177358177359177360177361177362177363177364177365177366177367177368177369177370177371177372177373177374177375177376177377177378177379177380177381177382177383177384177385177386177387177388177389177390177391177392177393177394177395177396177397177398177399177400177401177402177403177404177405177406177407177408177409177410177411177412177413177414177415177416177417177418177419177420177421177422177423177424177425177426177427177428177429177430177431177432177433177434177435177436177437177438177439177440177441177442177443177444177445177446177447177448177449177450177451177452177453177454177455177456177457177458177459177460177461177462177463177464177465177466177467177468177469177470177471177472177473177474177475177476177477177478177479177480177481177482177483177484177485177486177487177488177489177490177491177492177493177494177495177496177497177498177499177500177501177502177503177504177505177506177507177508177509177510177511177512177513177514177515177516177517177518177519177520177521177522177523177524177525177526177527177528177529177530177531177532177533177534177535177536177537177538177539177540177541177542177543177544177545177546177547177548177549177550177551177552177553177554177555177556177557177558177559177560177561177562177563177564177565177566177567177568177569177570177571177572177573177574177575177576177577177578177579177580177581177582177583177584177585177586177587177588177589177590177591177592177593177594177595177596177597177598177599177600177601177602177603177604177605177606177607177608177609177610177611177612177613177614177615177616177617177618177619177620177621177622177623177624177625177626177627177628177629177630177631177632177633177634177635177636177637177638177639177640177641177642177643177644177645177646177647177648177649177650177651177652177653177654177655177656177657177658177659177660177661177662177663177664177665177666177667177668177669177670177671177672177673177674177675177676177677177678177679177680177681177682177683177684177685177686177687177688177689177690177691177692177693177694177695177696177697177698177699177700177701177702177703177704177705177706177707177708177709177710177711177712177713177714177715177716177717177718177719177720177721177722177723177724177725177726177727177728177729177730177731177732177733177734177735177736177737177738177739177740177741177742177743177744177745177746177747177748177749177750177751177752177753177754177755177756177757177758177759177760177761177762177763177764177765177766177767177768177769177770177771177772177773177774177775177776177777177778177779177780177781177782177783177784177785177786177787177788177789177790177791177792177793177794177795177796177797177798177799177800177801177802177803177804177805177806177807177808177809177810177811177812177813177814177815177816177817177818177819177820177821177822177823177824177825177826177827177828177829177830177831177832177833177834177835177836177837177838177839177840177841177842177843177844177845177846177847177848177849177850177851177852177853177854177855177856177857177858177859177860177861177862177863177864177865177866177867177868177869177870177871177872177873177874177875177876177877177878177879177880177881177882177883177884177885177886177887177888177889177890177891177892177893177894177895177896177897177898177899177900177901177902177903177904177905177906177907177908177909177910177911177912177913177914177915177916177917177918177919177920177921177922177923177924177925177926177927177928177929177930177931177932177933177934177935177936177937177938177939177940177941177942177943177944177945177946177947177948177949177950177951177952177953177954177955177956177957177958177959177960177961177962177963177964177965177966177967177968177969177970177971177972177973177974177975177976177977177978177979177980177981177982177983177984177985177986177987177988177989177990177991177992177993177994177995177996177997177998177999178000178001178002178003178004178005178006178007178008178009178010178011178012178013178014178015178016178017178018178019178020178021178022178023178024178025178026178027178028178029178030178031178032178033178034178035178036178037178038178039178040178041178042178043178044178045178046178047178048178049178050178051178052178053178054178055178056178057178058178059178060178061178062178063178064178065178066178067178068178069178070178071178072178073178074178075178076178077178078178079178080178081178082178083178084178085178086178087178088178089178090178091178092178093178094178095178096178097178098178099178100178101178102178103178104178105178106178107178108178109178110178111178112178113178114178115178116178117178118178119178120178121178122178123178124178125178126178127178128178129178130178131178132178133178134178135178136178137178138178139178140178141178142178143178144178145178146178147178148178149178150178151178152178153178154178155178156178157178158178159178160178161178162178163178164178165178166178167178168178169178170178171178172178173178174178175178176178177178178178179178180178181178182178183178184178185178186178187178188178189178190178191178192178193178194178195178196178197178198178199178200178201178202178203178204178205178206178207178208178209178210178211178212178213178214178215178216178217178218178219178220178221178222178223178224178225178226178227178228178229178230178231178232178233178234178235178236178237178238178239178240178241178242178243178244178245178246178247178248178249178250178251178252178253178254178255178256178257178258178259178260178261178262178263178264178265178266178267178268178269178270178271178272178273178274178275178276178277178278178279178280178281178282178283178284178285178286178287178288178289178290178291178292178293178294178295178296178297178298178299178300178301178302178303178304178305178306178307178308178309178310178311178312178313178314178315178316178317178318178319178320178321178322178323178324178325178326178327178328178329178330178331178332178333178334178335178336178337178338178339178340178341178342178343178344178345178346178347178348178349178350178351178352178353178354178355178356178357178358178359178360178361178362178363178364178365178366178367178368178369178370178371178372178373178374178375178376178377178378178379178380178381178382178383178384178385178386178387178388178389178390178391178392178393178394178395178396178397178398178399178400178401178402178403178404178405178406178407178408178409178410178411178412178413178414178415178416178417178418178419178420178421178422178423178424178425178426178427178428178429178430178431178432178433178434178435178436178437178438178439178440178441178442178443178444178445178446178447178448178449178450178451178452178453178454178455178456178457178458178459178460178461178462178463178464178465178466178467178468178469178470178471178472178473178474178475178476178477178478178479178480178481178482178483178484178485178486178487178488178489178490178491178492178493178494178495178496178497178498178499178500178501178502178503178504178505178506178507178508178509178510178511178512178513178514178515178516178517178518178519178520178521178522178523178524178525178526178527178528178529178530178531178532178533178534178535178536178537178538178539178540178541178542178543178544178545178546178547178548178549178550178551178552178553178554178555178556178557178558178559178560178561178562178563178564178565178566178567178568178569178570178571178572178573178574178575178576178577178578178579178580178581178582178583178584178585178586178587178588178589178590178591178592178593178594178595178596178597178598178599178600178601178602178603178604178605178606178607178608178609178610178611178612178613178614178615178616178617178618178619178620178621178622178623178624178625178626178627178628178629178630178631178632178633178634178635178636178637178638178639178640178641178642178643178644178645178646178647178648178649178650178651178652178653178654178655178656178657178658178659178660178661178662178663178664178665178666178667178668178669178670178671178672178673178674178675178676178677178678178679178680178681178682178683178684178685178686178687178688178689178690178691178692178693178694178695178696178697178698178699178700178701178702178703178704178705178706178707178708178709178710178711178712178713178714178715178716178717178718178719178720178721178722178723178724178725178726178727178728178729178730178731178732178733178734178735178736178737178738178739178740178741178742178743178744178745178746178747178748178749178750178751178752178753178754178755178756178757178758178759178760178761178762178763178764178765178766178767178768178769178770178771178772178773178774178775178776178777178778178779178780178781178782178783178784178785178786178787178788178789178790178791178792178793178794178795178796178797178798178799178800178801178802178803178804178805178806178807178808178809178810178811178812178813178814178815178816178817178818178819178820178821178822178823178824178825178826178827178828178829178830178831178832178833178834178835178836178837178838178839178840178841178842178843178844178845178846178847178848178849178850178851178852178853178854178855178856178857178858178859178860178861178862178863178864178865178866178867178868178869178870178871178872178873178874178875178876178877178878178879178880178881178882178883178884178885178886178887178888178889178890178891178892178893178894178895178896178897178898178899178900178901178902178903178904178905178906178907178908178909178910178911178912178913178914178915178916178917178918178919178920178921178922178923178924178925178926178927178928178929178930178931178932178933178934178935178936178937178938178939178940178941178942178943178944178945178946178947178948178949178950178951178952178953178954178955178956178957178958178959178960178961178962178963178964178965178966178967178968178969178970178971178972178973178974178975178976178977178978178979178980178981178982178983178984178985178986178987178988178989178990178991178992178993178994178995178996178997178998178999179000179001179002179003179004179005179006179007179008179009179010179011179012179013179014179015179016179017179018179019179020179021179022179023179024179025179026179027179028179029179030179031179032179033179034179035179036179037179038179039179040179041179042179043179044179045179046179047179048179049179050179051179052179053179054179055179056179057179058179059179060179061179062179063179064179065179066179067179068179069179070179071179072179073179074179075179076179077179078179079179080179081179082179083179084179085179086179087179088179089179090179091179092179093179094179095179096179097179098179099179100179101179102179103179104179105179106179107179108179109179110179111179112179113179114179115179116179117179118179119179120179121179122179123179124179125179126179127179128179129179130179131179132179133179134179135179136179137179138179139179140179141179142179143179144179145179146179147179148179149179150179151179152179153179154179155179156179157179158179159179160179161179162179163179164179165179166179167179168179169179170179171179172179173179174179175179176179177179178179179179180179181179182179183179184179185179186179187179188179189179190179191179192179193179194179195179196179197179198179199179200179201179202179203179204179205179206179207179208179209179210179211179212179213179214179215179216179217179218179219179220179221179222179223179224179225179226179227179228179229179230179231179232179233179234179235179236179237179238179239179240179241179242179243179244179245179246179247179248179249179250179251179252179253179254179255179256179257179258179259179260179261179262179263179264179265179266179267179268179269179270179271179272179273179274179275179276179277179278179279179280179281179282179283179284179285179286179287179288179289179290179291179292179293179294179295179296179297179298179299179300179301179302179303179304179305179306179307179308179309179310179311179312179313179314179315179316179317179318179319179320179321179322179323179324179325179326179327179328179329179330179331179332179333179334179335179336179337179338179339179340179341179342179343179344179345179346179347179348179349179350179351179352179353179354179355179356179357179358179359179360179361179362179363179364179365179366179367179368179369179370179371179372179373179374179375179376179377179378179379179380179381179382179383179384179385179386179387179388179389179390179391179392179393179394179395179396179397179398179399179400179401179402179403179404179405179406179407179408179409179410179411179412179413179414179415179416179417179418179419179420179421179422179423179424179425179426179427179428179429179430179431179432179433179434179435179436179437179438179439179440179441179442179443179444179445179446179447179448179449179450179451179452179453179454179455179456179457179458179459179460179461179462179463179464179465179466179467179468179469179470179471179472179473179474179475179476179477179478179479179480179481179482179483179484179485179486179487179488179489179490179491179492179493179494179495179496179497179498179499179500179501179502179503179504179505179506179507179508179509179510179511179512179513179514179515179516179517179518179519179520179521179522179523179524179525179526179527179528179529179530179531179532179533179534179535179536179537179538179539179540179541179542179543179544179545179546179547179548179549179550179551179552179553179554179555179556179557179558179559179560179561179562179563179564179565179566179567179568179569179570179571179572179573179574179575179576179577179578179579179580179581179582179583179584179585179586179587179588179589179590179591179592179593179594179595179596179597179598179599179600179601179602179603179604179605179606179607179608179609179610179611179612179613179614179615179616179617179618179619179620179621179622179623179624179625179626179627179628179629179630179631179632179633179634179635179636179637179638179639179640179641179642179643179644179645179646179647179648179649179650179651179652179653179654179655179656179657179658179659179660179661179662179663179664179665179666179667179668179669179670179671179672179673179674179675179676179677179678179679179680179681179682179683179684179685179686179687179688179689179690179691179692179693179694179695179696179697179698179699179700179701179702179703179704179705179706179707179708179709179710179711179712179713179714179715179716179717179718179719179720179721179722179723179724179725179726179727179728179729179730179731179732179733179734179735179736179737179738179739179740179741179742179743179744179745179746179747179748179749179750179751179752179753179754179755179756179757179758179759179760179761179762179763179764179765179766179767179768179769179770179771179772179773179774179775179776179777179778179779179780179781179782179783179784179785179786179787179788179789179790179791179792179793179794179795179796179797179798179799179800179801179802179803179804179805179806179807179808179809179810179811179812179813179814179815179816179817179818179819179820179821179822179823179824179825179826179827179828179829179830179831179832179833179834179835179836179837179838179839179840179841179842179843179844179845179846179847179848179849179850179851179852179853179854179855179856179857179858179859179860179861179862179863179864179865179866179867179868179869179870179871179872179873179874179875179876179877179878179879179880179881179882179883179884179885179886179887179888179889179890179891179892179893179894179895179896179897179898179899179900179901179902179903179904179905179906179907179908179909179910179911179912179913179914179915179916179917179918179919179920179921179922179923179924179925179926179927179928179929179930179931179932179933179934179935179936179937179938179939179940179941179942179943179944179945179946179947179948179949179950179951179952179953179954179955179956179957179958179959179960179961179962179963179964179965179966179967179968179969179970179971179972179973179974179975179976179977179978179979179980179981179982179983179984179985179986179987179988179989179990179991179992179993179994179995179996179997179998179999180000180001180002180003180004180005180006180007180008180009180010180011180012180013180014180015180016180017180018180019180020180021180022180023180024180025180026180027180028180029180030180031180032180033180034180035180036180037180038180039180040180041180042180043180044180045180046180047180048180049180050180051180052180053180054180055180056180057180058180059180060180061180062180063180064180065180066180067180068180069180070180071180072180073180074180075180076180077180078180079180080180081180082180083180084180085180086180087180088180089180090180091180092180093180094180095180096180097180098180099180100180101180102180103180104180105180106180107180108180109180110180111180112180113180114180115180116180117180118180119180120180121180122180123180124180125180126180127180128180129180130180131180132180133180134180135180136180137180138180139180140180141180142180143180144180145180146180147180148180149180150180151180152180153180154180155180156180157180158180159180160180161180162180163180164180165180166180167180168180169180170180171180172180173180174180175180176180177180178180179180180180181180182180183180184180185180186180187180188180189180190180191180192180193180194180195180196180197180198180199180200180201180202180203180204180205180206180207180208180209180210180211180212180213180214180215180216180217180218180219180220180221180222180223180224180225180226180227180228180229180230180231180232180233180234180235180236180237180238180239180240180241180242180243180244180245180246180247180248180249180250180251180252180253180254180255180256180257180258180259180260180261180262180263180264180265180266180267180268180269180270180271180272180273180274180275180276180277180278180279180280180281180282180283180284180285180286180287180288180289180290180291180292180293180294180295180296180297180298180299180300180301180302180303180304180305180306180307180308180309180310180311180312180313180314180315180316180317180318180319180320180321180322180323180324180325180326180327180328180329180330180331180332180333180334180335180336180337180338180339180340180341180342180343180344180345180346180347180348180349180350180351180352180353180354180355180356180357180358180359180360180361180362180363180364180365180366180367180368180369180370180371180372180373180374180375180376180377180378180379180380180381180382180383180384180385180386180387180388180389180390180391180392180393180394180395180396180397180398180399180400180401180402180403180404180405180406180407180408180409180410180411180412180413180414180415180416180417180418180419180420180421180422180423180424180425180426180427180428180429180430180431180432180433180434180435180436180437180438180439180440180441180442180443180444180445180446180447180448180449180450180451180452180453180454180455180456180457180458180459180460180461180462180463180464180465180466180467180468180469180470180471180472180473180474180475180476180477180478180479180480180481180482180483180484180485180486180487180488180489180490180491180492180493180494180495180496180497180498180499180500180501180502180503180504180505180506180507180508180509180510180511180512180513180514180515180516180517180518180519180520180521180522180523180524180525180526180527180528180529180530180531180532180533180534180535180536180537180538180539180540180541180542180543180544180545180546180547180548180549180550180551180552180553180554180555180556180557180558180559180560180561180562180563180564180565180566180567180568180569180570180571180572180573180574180575180576180577180578180579180580180581180582180583180584180585180586180587180588180589180590180591180592180593180594180595180596180597180598180599180600180601180602180603180604180605180606180607180608180609180610180611180612180613180614180615180616180617180618180619180620180621180622180623180624180625180626180627180628180629180630180631180632180633180634180635180636180637180638180639180640180641180642180643180644180645180646180647180648180649180650180651180652180653180654180655180656180657180658180659180660180661180662180663180664180665180666180667180668180669180670180671180672180673180674180675180676180677180678180679180680180681180682180683180684180685180686180687180688180689180690180691180692180693180694180695180696180697180698180699180700180701180702180703180704180705180706180707180708180709180710180711180712180713180714180715180716180717180718180719180720180721180722180723180724180725180726180727180728180729180730180731180732180733180734180735180736180737180738180739180740180741180742180743180744180745180746180747180748180749180750180751180752180753180754180755180756180757180758180759180760180761180762180763180764180765180766180767180768180769180770180771180772180773180774180775180776180777180778180779180780180781180782180783180784180785180786180787180788180789180790180791180792180793180794180795180796180797180798180799180800180801180802180803180804180805180806180807180808180809180810180811180812180813180814180815180816180817180818180819180820180821180822180823180824180825180826180827180828180829180830180831180832180833180834180835180836180837180838180839180840180841180842180843180844180845180846180847180848180849180850180851180852180853180854180855180856180857180858180859180860180861180862180863180864180865180866180867180868180869180870180871180872180873180874180875180876180877180878180879180880180881180882180883180884180885180886180887180888180889180890180891180892180893180894180895180896180897180898180899180900180901180902180903180904180905180906180907180908180909180910180911180912180913180914180915180916180917180918180919180920180921180922180923180924180925180926180927180928180929180930180931180932180933180934180935180936180937180938180939180940180941180942180943180944180945180946180947180948180949180950180951180952180953180954180955180956180957180958180959180960180961180962180963180964180965180966180967180968180969180970180971180972180973180974180975180976180977180978180979180980180981180982180983180984180985180986180987180988180989180990180991180992180993180994180995180996180997180998180999181000181001181002181003181004181005181006181007181008181009181010181011181012181013181014181015181016181017181018181019181020181021181022181023181024181025181026181027181028181029181030181031181032181033181034181035181036181037181038181039181040181041181042181043181044181045181046181047181048181049181050181051181052181053181054181055181056181057181058181059181060181061181062181063181064181065181066181067181068181069181070181071181072181073181074181075181076181077181078181079181080181081181082181083181084181085181086181087181088181089181090181091181092181093181094181095181096181097181098181099181100181101181102181103181104181105181106181107181108181109181110181111181112181113181114181115181116181117181118181119181120181121181122181123181124181125181126181127181128181129181130181131181132181133181134181135181136181137181138181139181140181141181142181143181144181145181146181147181148181149181150181151181152181153181154181155181156181157181158181159181160181161181162181163181164181165181166181167181168181169181170181171181172181173181174181175181176181177181178181179181180181181181182181183181184181185181186181187181188181189181190181191181192181193181194181195181196181197181198181199181200181201181202181203181204181205181206181207181208181209181210181211181212181213181214181215181216181217181218181219181220181221181222181223181224181225181226181227181228181229181230181231181232181233181234181235181236181237181238181239181240181241181242181243181244181245181246181247181248181249181250181251181252181253181254181255181256181257181258181259181260181261181262181263181264181265181266181267181268181269181270181271181272181273181274181275181276181277181278181279181280181281181282181283181284181285181286181287181288181289181290181291181292181293181294181295181296181297181298181299181300181301181302181303181304181305181306181307181308181309181310181311181312181313181314181315181316181317181318181319181320181321181322181323181324181325181326181327181328181329181330181331181332181333181334181335181336181337181338181339181340181341181342181343181344181345181346181347181348181349181350181351181352181353181354181355181356181357181358181359181360181361181362181363181364181365181366181367181368181369181370181371181372181373181374181375181376181377181378181379181380181381181382181383181384181385181386181387181388181389181390181391181392181393181394181395181396181397181398181399181400181401181402181403181404181405181406181407181408181409181410181411181412181413181414181415181416181417181418181419181420181421181422181423181424181425181426181427181428181429181430181431181432181433181434181435181436181437181438181439181440181441181442181443181444181445181446181447181448181449181450181451181452181453181454181455181456181457181458181459181460181461181462181463181464181465181466181467181468181469181470181471181472181473181474181475181476181477181478181479181480181481181482181483181484181485181486181487181488181489181490181491181492181493181494181495181496181497181498181499181500181501181502181503181504181505181506181507181508181509181510181511181512181513181514181515181516181517181518181519181520181521181522181523181524181525181526181527181528181529181530181531181532181533181534181535181536181537181538181539181540181541181542181543181544181545181546181547181548181549181550181551181552181553181554181555181556181557181558181559181560181561181562181563181564181565181566181567181568181569181570181571181572181573181574181575181576181577181578181579181580181581181582181583181584181585181586181587181588181589181590181591181592181593181594181595181596181597181598181599181600181601181602181603181604181605181606181607181608181609181610181611181612181613181614181615181616181617181618181619181620181621181622181623181624181625181626181627181628181629181630181631181632181633181634181635181636181637181638181639181640181641181642181643181644181645181646181647181648181649181650181651181652181653181654181655181656181657181658181659181660181661181662181663181664181665181666181667181668181669181670181671181672181673181674181675181676181677181678181679181680181681181682181683181684181685181686181687181688181689181690181691181692181693181694181695181696181697181698181699181700181701181702181703181704181705181706181707181708181709181710181711181712181713181714181715181716181717181718181719181720181721181722181723181724181725181726181727181728181729181730181731181732181733181734181735181736181737181738181739181740181741181742181743181744181745181746181747181748181749181750181751181752181753181754181755181756181757181758181759181760181761181762181763181764181765181766181767181768181769181770181771181772181773181774181775181776181777181778181779181780181781181782181783181784181785181786181787181788181789181790181791181792181793181794181795181796181797181798181799181800181801181802181803181804181805181806181807181808181809181810181811181812181813181814181815181816181817181818181819181820181821181822181823181824181825181826181827181828181829181830181831181832181833181834181835181836181837181838181839181840181841181842181843181844181845181846181847181848181849181850181851181852181853181854181855181856181857181858181859181860181861181862181863181864181865181866181867181868181869181870181871181872181873181874181875181876181877181878181879181880181881181882181883181884181885181886181887181888181889181890181891181892181893181894181895181896181897181898181899181900181901181902181903181904181905181906181907181908181909181910181911181912181913181914181915181916181917181918181919181920181921181922181923181924181925181926181927181928181929181930181931181932181933181934181935181936181937181938181939181940181941181942181943181944181945181946181947181948181949181950181951181952181953181954181955181956181957181958181959181960181961181962181963181964181965181966181967181968181969181970181971181972181973181974181975181976181977181978181979181980181981181982181983181984181985181986181987181988181989181990181991181992181993181994181995181996181997181998181999182000182001182002182003182004182005182006182007182008182009182010182011182012182013182014182015182016182017182018182019182020182021182022182023182024182025182026182027182028182029182030182031182032182033182034182035182036182037182038182039182040182041182042182043182044182045182046182047182048182049182050182051182052182053182054182055182056182057182058182059182060182061182062182063182064182065182066182067182068182069182070182071182072182073182074182075182076182077182078182079182080182081182082182083182084182085182086182087182088182089182090182091182092182093182094182095182096182097182098182099182100182101182102182103182104182105182106182107182108182109182110182111182112182113182114182115182116182117182118182119182120182121182122182123182124182125182126182127182128182129182130182131182132182133182134182135182136182137182138182139182140182141182142182143182144182145182146182147182148182149182150182151182152182153182154182155182156182157182158182159182160182161182162182163182164182165182166182167182168182169182170182171182172182173182174182175182176182177182178182179182180182181182182182183182184182185182186182187182188182189182190182191182192182193182194182195182196182197182198182199182200182201182202182203182204182205182206182207182208182209182210182211182212182213182214182215182216182217182218182219182220182221182222182223182224182225182226182227182228182229182230182231182232182233182234182235182236182237182238182239182240182241182242182243182244182245182246182247182248182249182250182251182252182253182254182255182256182257182258182259182260182261182262182263182264182265182266182267182268182269182270182271182272182273182274182275182276182277182278182279182280182281182282182283182284182285182286182287182288182289182290182291182292182293182294182295182296182297182298182299182300182301182302182303182304182305182306182307182308182309182310182311182312182313182314182315182316182317182318182319182320182321182322182323182324182325182326182327182328182329182330182331182332182333182334182335182336182337182338182339182340182341182342182343182344182345182346182347182348182349182350182351182352182353182354182355182356182357182358182359182360182361182362182363182364182365182366182367182368182369182370182371182372182373182374182375182376182377182378182379182380182381182382182383182384182385182386182387182388182389182390182391182392182393182394182395182396182397182398182399182400182401182402182403182404182405182406182407182408182409182410182411182412182413182414182415182416182417182418182419182420182421182422182423182424182425182426182427182428182429182430182431182432182433182434182435182436182437182438182439182440182441182442182443182444182445182446182447182448182449182450182451182452182453182454182455182456182457182458182459182460182461182462182463182464182465182466182467182468182469182470182471182472182473182474182475182476182477182478182479182480182481182482182483182484182485182486182487182488182489182490182491182492182493182494182495182496182497182498182499182500182501182502182503182504182505182506182507182508182509182510182511182512182513182514182515182516182517182518182519182520182521182522182523182524182525182526182527182528182529182530182531182532182533182534182535182536182537182538182539182540182541182542182543182544182545182546182547182548182549182550182551182552182553182554182555182556182557182558182559182560182561182562182563182564182565182566182567182568182569182570182571182572182573182574182575182576182577182578182579182580182581182582182583182584182585182586182587182588182589182590182591182592182593182594182595182596182597182598182599182600182601182602182603182604182605182606182607182608182609182610182611182612182613182614182615182616182617182618182619182620182621182622182623182624182625182626182627182628182629182630182631182632182633182634182635182636182637182638182639182640182641182642182643182644182645182646182647182648182649182650182651182652182653182654182655182656182657182658182659182660182661182662182663182664182665182666182667182668182669182670182671182672182673182674182675182676182677182678182679182680182681182682182683182684182685182686182687182688182689182690182691182692182693182694182695182696182697182698182699182700182701182702182703182704182705182706182707182708182709182710182711182712182713182714182715182716182717182718182719182720182721182722182723182724182725182726182727182728182729182730182731182732182733182734182735182736182737182738182739182740182741182742182743182744182745182746182747182748182749182750182751182752182753182754182755182756182757182758182759182760182761182762182763182764182765182766182767182768182769182770182771182772182773182774182775182776182777182778182779182780182781182782182783182784182785182786182787182788182789182790182791182792182793182794182795182796182797182798182799182800182801182802182803182804182805182806182807182808182809182810182811182812182813182814182815182816182817182818182819182820182821182822182823182824182825182826182827182828182829182830182831182832182833182834182835182836182837182838182839182840182841182842182843182844182845182846182847182848182849182850182851182852182853182854182855182856182857182858182859182860182861182862182863182864182865182866182867182868182869182870182871182872182873182874182875182876182877182878182879182880182881182882182883182884182885182886182887182888182889182890182891182892182893182894182895182896182897182898182899182900182901182902182903182904182905182906182907182908182909182910182911182912182913182914182915182916182917182918182919182920182921182922182923182924182925182926182927182928182929182930182931182932182933182934182935182936182937182938182939182940182941182942182943182944182945182946182947182948182949182950182951182952182953182954182955182956182957182958182959182960182961182962182963182964182965182966182967182968182969182970182971182972182973182974182975182976182977182978182979182980182981182982182983182984182985182986182987182988182989182990182991182992182993182994182995182996182997182998182999183000183001183002183003183004183005183006183007183008183009183010183011183012183013183014183015183016183017183018183019183020183021183022183023183024183025183026183027183028183029183030183031183032183033183034183035183036183037183038183039183040183041183042183043183044183045183046183047183048183049183050183051183052183053183054183055183056183057183058183059183060183061183062183063183064183065183066183067183068183069183070183071183072183073183074183075183076183077183078183079183080183081183082183083183084183085183086183087183088183089183090183091183092183093183094183095183096183097183098183099183100183101183102183103183104183105183106183107183108183109183110183111183112183113183114183115183116183117183118183119183120183121183122183123183124183125183126183127183128183129183130183131183132183133183134183135183136183137183138183139183140183141183142183143183144183145183146183147183148183149183150183151183152183153183154183155183156183157183158183159183160183161183162183163183164183165183166183167183168183169183170183171183172183173183174183175183176183177183178183179183180183181183182183183183184183185183186183187183188183189183190183191183192183193183194183195183196183197183198183199183200183201183202183203183204183205183206183207183208183209183210183211183212183213183214183215183216183217183218183219183220183221183222183223183224183225183226183227183228183229183230183231183232183233183234183235183236183237183238183239183240183241183242183243183244183245183246183247183248183249183250183251183252183253183254183255183256183257183258183259183260183261183262183263183264183265183266183267183268183269183270183271183272183273183274183275183276183277183278183279183280183281183282183283183284183285183286183287183288183289183290183291183292183293183294183295183296183297183298183299183300183301183302183303183304183305183306183307183308183309183310183311183312183313183314183315183316183317183318183319183320183321183322183323183324183325183326183327183328183329183330183331183332183333183334183335183336183337183338183339183340183341183342183343183344183345183346183347183348183349183350183351183352183353183354183355183356183357183358183359183360183361183362183363183364183365183366183367183368183369183370183371183372183373183374183375183376183377183378183379183380183381183382183383183384183385183386183387183388183389183390183391183392183393183394183395183396183397183398183399183400183401183402183403183404183405183406183407183408183409183410183411183412183413183414183415183416183417183418183419183420183421183422183423183424183425183426183427183428183429183430183431183432183433183434183435183436183437183438183439183440183441183442183443183444183445183446183447183448183449183450183451183452183453183454183455183456183457183458183459183460183461183462183463183464183465183466183467183468183469183470183471183472183473183474183475183476183477183478183479183480183481183482183483183484183485183486183487183488183489183490183491183492183493183494183495183496183497183498183499183500183501183502183503183504183505183506183507183508183509183510183511183512183513183514183515183516183517183518183519183520183521183522183523183524183525183526183527183528183529183530183531183532183533183534183535183536183537183538183539183540183541183542183543183544183545183546183547183548183549183550183551183552183553183554183555183556183557183558183559183560183561183562183563183564183565183566183567183568183569183570183571183572183573183574183575183576183577183578183579183580183581183582183583183584183585183586183587183588183589183590183591183592183593183594183595183596183597183598183599183600183601183602183603183604183605183606183607183608183609183610183611183612183613183614183615183616183617183618183619183620183621183622183623183624183625183626183627183628183629183630183631183632183633183634183635183636183637183638183639183640183641183642183643183644183645183646183647183648183649183650183651183652183653183654183655183656183657183658183659183660183661183662183663183664183665183666183667183668183669183670183671183672183673183674183675183676183677183678183679183680183681183682183683183684183685183686183687183688183689183690183691183692183693183694183695183696183697183698183699183700183701183702183703183704183705183706183707183708183709183710183711183712183713183714183715183716183717183718183719183720183721183722183723183724183725183726183727183728183729183730183731183732183733183734183735183736183737183738183739183740183741183742183743183744183745183746183747183748183749183750183751183752183753183754183755183756183757183758183759183760183761183762183763183764183765183766183767183768183769183770183771183772183773183774183775183776183777183778183779183780183781183782183783183784183785183786183787183788183789183790183791183792183793183794183795183796183797183798183799183800183801183802183803183804183805183806183807183808183809183810183811183812183813183814183815183816183817183818183819183820183821183822183823183824183825183826183827183828183829183830183831183832183833183834183835183836183837183838183839183840183841183842183843183844183845183846183847183848183849183850183851183852183853183854183855183856183857183858183859183860183861183862183863183864183865183866183867183868183869183870183871183872183873183874183875183876183877183878183879183880183881183882183883183884183885183886183887183888183889183890183891183892183893183894183895183896183897183898183899183900183901183902183903183904183905183906183907183908183909183910183911183912183913183914183915183916183917183918183919183920183921183922183923183924183925183926183927183928183929183930183931183932183933183934183935183936183937183938183939183940183941183942183943183944183945183946183947183948183949183950183951183952183953183954183955183956183957183958183959183960183961183962183963183964183965183966183967183968183969183970183971183972183973183974183975183976183977183978183979183980183981183982183983183984183985183986183987183988183989183990183991183992183993183994183995183996183997183998183999184000184001184002184003184004184005184006184007184008184009184010184011184012184013184014184015184016184017184018184019184020184021184022184023184024184025184026184027184028184029184030184031184032184033184034184035184036184037184038184039184040184041184042184043184044184045184046184047184048184049184050184051184052184053184054184055184056184057184058184059184060184061184062184063184064184065184066184067184068184069184070184071184072184073184074184075184076184077184078184079184080184081184082184083184084184085184086184087184088184089184090184091184092184093184094184095184096184097184098184099184100184101184102184103184104184105184106184107184108184109184110184111184112184113184114184115184116184117184118184119184120184121184122184123184124184125184126184127184128184129184130184131184132184133184134184135184136184137184138184139184140184141184142184143184144184145184146184147184148184149184150184151184152184153184154184155184156184157184158184159184160184161184162184163184164184165184166184167184168184169184170184171184172184173184174184175184176184177184178184179184180184181184182184183184184184185184186184187184188184189184190184191184192184193184194184195184196184197184198184199184200184201184202184203184204184205184206184207184208184209184210184211184212184213184214184215184216184217184218184219184220184221184222184223184224184225184226184227184228184229184230184231184232184233184234184235184236184237184238184239184240184241184242184243184244184245184246184247184248184249184250184251184252184253184254184255184256184257184258184259184260184261184262184263184264184265184266184267184268184269184270184271184272184273184274184275184276184277184278184279184280184281184282184283184284184285184286184287184288184289184290184291184292184293184294184295184296184297184298184299184300184301184302184303184304184305184306184307184308184309184310184311184312184313184314184315184316184317184318184319184320184321184322184323184324184325184326184327184328184329184330184331184332184333184334184335184336184337184338184339184340184341184342184343184344184345184346184347184348184349184350184351184352184353184354184355184356184357184358184359184360184361184362184363184364184365184366184367184368184369184370184371184372184373184374184375184376184377184378184379184380184381184382184383184384184385184386184387184388184389184390184391184392184393184394184395184396184397184398184399184400184401184402184403184404184405184406184407184408184409184410184411184412184413184414184415184416184417184418184419184420184421184422184423184424184425184426184427184428184429184430184431184432184433184434184435184436184437184438184439184440184441184442184443184444184445184446184447184448184449184450184451184452184453184454184455184456184457184458184459184460184461184462184463184464184465184466184467184468184469184470184471184472184473184474184475184476184477184478184479184480184481184482184483184484184485184486184487184488184489184490184491184492184493184494184495184496184497184498184499184500184501184502184503184504184505184506184507184508184509184510184511184512184513184514184515184516184517184518184519184520184521184522184523184524184525184526184527184528184529184530184531184532184533184534184535184536184537184538184539184540184541184542184543184544184545184546184547184548184549184550184551184552184553184554184555184556184557184558184559184560184561184562184563184564184565184566184567184568184569184570184571184572184573184574184575184576184577184578184579184580184581184582184583184584184585184586184587184588184589184590184591184592184593184594184595184596184597184598184599184600184601184602184603184604184605184606184607184608184609184610184611184612184613184614184615184616184617184618184619184620184621184622184623184624184625184626184627184628184629184630184631184632184633184634184635184636184637184638184639184640184641184642184643184644184645184646184647184648184649184650184651184652184653184654184655184656184657184658184659184660184661184662184663184664184665184666184667184668184669184670184671184672184673184674184675184676184677184678184679184680184681184682184683184684184685184686184687184688184689184690184691184692184693184694184695184696184697184698184699184700184701184702184703184704184705184706184707184708184709184710184711184712184713184714184715184716184717184718184719184720184721184722184723184724184725184726184727184728184729184730184731184732184733184734184735184736184737184738184739184740184741184742184743184744184745184746184747184748184749184750184751184752184753184754184755184756184757184758184759184760184761184762184763184764184765184766184767184768184769184770184771184772184773184774184775184776184777184778184779184780184781184782184783184784184785184786184787184788184789184790184791184792184793184794184795184796184797184798184799184800184801184802184803184804184805184806184807184808184809184810184811184812184813184814184815184816184817184818184819184820184821184822184823184824184825184826184827184828184829184830184831184832184833184834184835184836184837184838184839184840184841184842184843184844184845184846184847184848184849184850184851184852184853184854184855184856184857184858184859184860184861184862184863184864184865184866184867184868184869184870184871184872184873184874184875184876184877184878184879184880184881184882184883184884184885184886184887184888184889184890184891184892184893184894184895184896184897184898184899184900184901184902184903184904184905184906184907184908184909184910184911184912184913184914184915184916184917184918184919184920184921184922184923184924184925184926184927184928184929184930184931184932184933184934184935184936184937184938184939184940184941184942184943184944184945184946184947184948184949184950184951184952184953184954184955184956184957184958184959184960184961184962184963184964184965184966184967184968184969184970184971184972184973184974184975184976184977184978184979184980184981184982184983184984184985184986184987184988184989184990184991184992184993184994184995184996184997184998184999185000185001185002185003185004185005185006185007185008185009185010185011185012185013185014185015185016185017185018185019185020185021185022185023185024185025185026185027185028185029185030185031185032185033185034185035185036185037185038185039185040185041185042185043185044185045185046185047185048185049185050185051185052185053185054185055185056185057185058185059185060185061185062185063185064185065185066185067185068185069185070185071185072185073185074185075185076185077185078185079185080185081185082185083185084185085185086185087185088185089185090185091185092185093185094185095185096185097185098185099185100185101185102185103185104185105185106185107185108185109185110185111185112185113185114185115185116185117185118185119185120185121185122185123185124185125185126185127185128185129185130185131185132185133185134185135185136185137185138185139185140185141185142185143185144185145185146185147185148185149185150185151185152185153185154185155185156185157185158185159185160185161185162185163185164185165185166185167185168185169185170185171185172185173185174185175185176185177185178185179185180185181185182185183185184185185185186185187185188185189185190185191185192185193185194185195185196185197185198185199185200185201185202185203185204185205185206185207185208185209185210185211185212185213185214185215185216185217185218185219185220185221185222185223185224185225185226185227185228185229185230185231185232185233185234185235185236185237185238185239185240185241185242185243185244185245185246185247185248185249185250185251185252185253185254185255185256185257185258185259185260185261185262185263185264185265185266185267185268185269185270185271185272185273185274185275185276185277185278185279185280185281185282185283185284185285185286185287185288185289185290185291185292185293185294185295185296185297185298185299185300185301185302185303185304185305185306185307185308185309185310185311185312185313185314185315185316185317185318185319185320185321185322185323185324185325185326185327185328185329185330185331185332185333185334185335185336185337185338185339185340185341185342185343185344185345185346185347185348185349185350185351185352185353185354185355185356185357185358185359185360185361185362185363185364185365185366185367185368185369185370185371185372185373185374185375185376185377185378185379185380185381185382185383185384185385185386185387185388185389185390185391185392185393185394185395185396185397185398185399185400185401185402185403185404185405185406185407185408185409185410185411185412185413185414185415185416185417185418185419185420185421185422185423185424185425185426185427185428185429185430185431185432185433185434185435185436185437185438185439185440185441185442185443185444185445185446185447185448185449185450185451185452185453185454185455185456185457185458185459185460185461185462185463185464185465185466185467185468185469185470185471185472185473185474185475185476185477185478185479185480185481185482185483185484185485185486185487185488185489185490185491185492185493185494185495185496185497185498185499185500185501185502185503185504185505185506185507185508185509185510185511185512185513185514185515185516185517185518185519185520185521185522185523185524185525185526185527185528185529185530185531185532185533185534185535185536185537185538185539185540185541185542185543185544185545185546185547185548185549185550185551185552185553185554185555185556185557185558185559185560185561185562185563185564185565185566185567185568185569185570185571185572185573185574185575185576185577185578185579185580185581185582185583185584185585185586185587185588185589185590185591185592185593185594185595185596185597185598185599185600185601185602185603185604185605185606185607185608185609185610185611185612185613185614185615185616185617185618185619185620185621185622185623185624185625185626185627185628185629185630185631185632185633185634185635185636185637185638185639185640185641185642185643185644185645185646185647185648185649185650185651185652185653185654185655185656185657185658185659185660185661185662185663185664185665185666185667185668185669185670185671185672185673185674185675185676185677185678185679185680185681185682185683185684185685185686185687185688185689185690185691185692185693185694185695185696185697185698185699185700185701185702185703185704185705185706185707185708185709185710185711185712185713185714185715185716185717185718185719185720185721185722185723185724185725185726185727185728185729185730185731185732185733185734185735185736185737185738185739185740185741185742185743185744185745185746185747185748185749185750185751185752185753185754185755185756185757185758185759185760185761185762185763185764185765185766185767185768185769185770185771185772185773185774185775185776185777185778185779185780185781185782185783185784185785185786185787185788185789185790185791185792185793185794185795185796185797185798185799185800185801185802185803185804185805185806185807185808185809185810185811185812185813185814185815185816185817185818185819185820185821185822185823185824185825185826185827185828185829185830185831185832185833185834185835185836185837185838185839185840185841185842185843185844185845185846185847185848185849185850185851185852185853185854185855185856185857185858185859185860185861185862185863185864185865185866185867185868185869185870185871185872185873185874185875185876185877185878185879185880185881185882185883185884185885185886185887185888185889185890185891185892185893185894185895185896185897185898185899185900185901185902185903185904185905185906185907185908185909185910185911185912185913185914185915185916185917185918185919185920185921185922185923185924185925185926185927185928185929185930185931185932185933185934185935185936185937185938185939185940185941185942185943185944185945185946185947185948185949185950185951185952185953185954185955185956185957185958185959185960185961185962185963185964185965185966185967185968185969185970185971185972185973185974185975185976185977185978185979185980185981185982185983185984185985185986185987185988185989185990185991185992185993185994185995185996185997185998185999186000186001186002186003186004186005186006186007186008186009186010186011186012186013186014186015186016186017186018186019186020186021186022186023186024186025186026186027186028186029186030186031186032186033186034186035186036186037186038186039186040186041186042186043186044186045186046186047186048186049186050186051186052186053186054186055186056186057186058186059186060186061186062186063186064186065186066186067186068186069186070186071186072186073186074186075186076186077186078186079186080186081186082186083186084186085186086186087186088186089186090186091186092186093186094186095186096186097186098186099186100186101186102186103186104186105186106186107186108186109186110186111186112186113186114186115186116186117186118186119186120186121186122186123186124186125186126186127186128186129186130186131186132186133186134186135186136186137186138186139186140186141186142186143186144186145186146186147186148186149186150186151186152186153186154186155186156186157186158186159186160186161186162186163186164186165186166186167186168186169186170186171186172186173186174186175186176186177186178186179186180186181186182186183186184186185186186186187186188186189186190186191186192186193186194186195186196186197186198186199186200186201186202186203186204186205186206186207186208186209186210186211186212186213186214186215186216186217186218186219186220186221186222186223186224186225186226186227186228186229186230186231186232186233186234186235186236186237186238186239186240186241186242186243186244186245186246186247186248186249186250186251186252186253186254186255186256186257186258186259186260186261186262186263186264186265186266186267186268186269186270186271186272186273186274186275186276186277186278186279186280186281186282186283186284186285186286186287186288186289186290186291186292186293186294186295186296186297186298186299186300186301186302186303186304186305186306186307186308186309186310186311186312186313186314186315186316186317186318186319186320186321186322186323186324186325186326186327186328186329186330186331186332186333186334186335186336186337186338186339186340186341186342186343186344186345186346186347186348186349186350186351186352186353186354186355186356186357186358186359186360186361186362186363186364186365186366186367186368186369186370186371186372186373186374186375186376186377186378186379186380186381186382186383186384186385186386186387186388186389186390186391186392186393186394186395186396186397186398186399186400186401186402186403186404186405186406186407186408186409186410186411186412186413186414186415186416186417186418186419186420186421186422186423186424186425186426186427186428186429186430186431186432186433186434186435186436186437186438186439186440186441186442186443186444186445186446186447186448186449186450186451186452186453186454186455186456186457186458186459186460186461186462186463186464186465186466186467186468186469186470186471186472186473186474186475186476186477186478186479186480186481186482186483186484186485186486186487186488186489186490186491186492186493186494186495186496186497186498186499186500186501186502186503186504186505186506186507186508186509186510186511186512186513186514186515186516186517186518186519186520186521186522186523186524186525186526186527186528186529186530186531186532186533186534186535186536186537186538186539186540186541186542186543186544186545186546186547186548186549186550186551186552186553186554186555186556186557186558186559186560186561186562186563186564186565186566186567186568186569186570186571186572186573186574186575186576186577186578186579186580186581186582186583186584186585186586186587186588186589186590186591186592186593186594186595186596186597186598186599186600186601186602186603186604186605186606186607186608186609186610186611186612186613186614186615186616186617186618186619186620186621186622186623186624186625186626186627186628186629186630186631186632186633186634186635186636186637186638186639186640186641186642186643186644186645186646186647186648186649186650186651186652186653186654186655186656186657186658186659186660186661186662186663186664186665186666186667186668186669186670186671186672186673186674186675186676186677186678186679186680186681186682186683186684186685186686186687186688186689186690186691186692186693186694186695186696186697186698186699186700186701186702186703186704186705186706186707186708186709186710186711186712186713186714186715186716186717186718186719186720186721186722186723186724186725186726186727186728186729186730186731186732186733186734186735186736186737186738186739186740186741186742186743186744186745186746186747186748186749186750186751186752186753186754186755186756186757186758186759186760186761186762186763186764186765186766186767186768186769186770186771186772186773186774186775186776186777186778186779186780186781186782186783186784186785186786186787186788186789186790186791186792186793186794186795186796186797186798186799186800186801186802186803186804186805186806186807186808186809186810186811186812186813186814186815186816186817186818186819186820186821186822186823186824186825186826186827186828186829186830186831186832186833186834186835186836186837186838186839186840186841186842186843186844186845186846186847186848186849186850186851186852186853186854186855186856186857186858186859186860186861186862186863186864186865186866186867186868186869186870186871186872186873186874186875186876186877186878186879186880186881186882186883186884186885186886186887186888186889186890186891186892186893186894186895186896186897186898186899186900186901186902186903186904186905186906186907186908186909186910186911186912186913186914186915186916186917186918186919186920186921186922186923186924186925186926186927186928186929186930186931186932186933186934186935186936186937186938186939186940186941186942186943186944186945186946186947186948186949186950186951186952186953186954186955186956186957186958186959186960186961186962186963186964186965186966186967186968186969186970186971186972186973186974186975186976186977186978186979186980186981186982186983186984186985186986186987186988186989186990186991186992186993186994186995186996186997186998186999187000187001187002187003187004187005187006187007187008187009187010187011187012187013187014187015187016187017187018187019187020187021187022187023187024187025187026187027187028187029187030187031187032187033187034187035187036187037187038187039187040187041187042187043187044187045187046187047187048187049187050187051187052187053187054187055187056187057187058187059187060187061187062187063187064187065187066187067187068187069187070187071187072187073187074187075187076187077187078187079187080187081187082187083187084187085187086187087187088187089187090187091187092187093187094187095187096187097187098187099187100187101187102187103187104187105187106187107187108187109187110187111187112187113187114187115187116187117187118187119187120187121187122187123187124187125187126187127187128187129187130187131187132187133187134187135187136187137187138187139187140187141187142187143187144187145187146187147187148187149187150187151187152187153187154187155187156187157187158187159187160187161187162187163187164187165187166187167187168187169187170187171187172187173187174187175187176187177187178187179187180187181187182187183187184187185187186187187187188187189187190187191187192187193187194187195187196187197187198187199187200187201187202187203187204187205187206187207187208187209187210187211187212187213187214187215187216187217187218187219187220187221187222187223187224187225187226187227187228187229187230187231187232187233187234187235187236187237187238187239187240187241187242187243187244187245187246187247187248187249187250187251187252187253187254187255187256187257187258187259187260187261187262187263187264187265187266187267187268187269187270187271187272187273187274187275187276187277187278187279187280187281187282187283187284187285187286187287187288187289187290187291187292187293187294187295187296187297187298187299187300187301187302187303187304187305187306187307187308187309187310187311187312187313187314187315187316187317187318187319187320187321187322187323187324187325187326187327187328187329187330187331187332187333187334187335187336187337187338187339187340187341187342187343187344187345187346187347187348187349187350187351187352187353187354187355187356187357187358187359187360187361187362187363187364187365187366187367187368187369187370187371187372187373187374187375187376187377187378187379187380187381187382187383187384187385187386187387187388187389187390187391187392187393187394187395187396187397187398187399187400187401187402187403187404187405187406187407187408187409187410187411187412187413187414187415187416187417187418187419187420187421187422187423187424187425187426187427187428187429187430187431187432187433187434187435187436187437187438187439187440187441187442187443187444187445187446187447187448187449187450187451187452187453187454187455187456187457187458187459187460187461187462187463187464187465187466187467187468187469187470187471187472187473187474187475187476187477187478187479187480187481187482187483187484187485187486187487187488187489187490187491187492187493187494187495187496187497187498187499187500187501187502187503187504187505187506187507187508187509187510187511187512187513187514187515187516187517187518187519187520187521187522187523187524187525187526187527187528187529187530187531187532187533187534187535187536187537187538187539187540187541187542187543187544187545187546187547187548187549187550187551187552187553187554187555187556187557187558187559187560187561187562187563187564187565187566187567187568187569187570187571187572187573187574187575187576187577187578187579187580187581187582187583187584187585187586187587187588187589187590187591187592187593187594187595187596187597187598187599187600187601187602187603187604187605187606187607187608187609187610187611187612187613187614187615187616187617187618187619187620187621187622187623187624187625187626187627187628187629187630187631187632187633187634187635187636187637187638187639187640187641187642187643187644187645187646187647187648187649187650187651187652187653187654187655187656187657187658187659187660187661187662187663187664187665187666187667187668187669187670187671187672187673187674187675187676187677187678187679187680187681187682187683187684187685187686187687187688187689187690187691187692187693187694187695187696187697187698187699187700187701187702187703187704187705187706187707187708187709187710187711187712187713187714187715187716187717187718187719187720187721187722187723187724187725187726187727187728187729187730187731187732187733187734187735187736187737187738187739187740187741187742187743187744187745187746187747187748187749187750187751187752187753187754187755187756187757187758187759187760187761187762187763187764187765187766187767187768187769187770187771187772187773187774187775187776187777187778187779187780187781187782187783187784187785187786187787187788187789187790187791187792187793187794187795187796187797187798187799187800187801187802187803187804187805187806187807187808187809187810187811187812187813187814187815187816187817187818187819187820187821187822187823187824187825187826187827187828187829187830187831187832187833187834187835187836187837187838187839187840187841187842187843187844187845187846187847187848187849187850187851187852187853187854187855187856187857187858187859187860187861187862187863187864187865187866187867187868187869187870187871187872187873187874187875187876187877187878187879187880187881187882187883187884187885187886187887187888187889187890187891187892187893187894187895187896187897187898187899187900187901187902187903187904187905187906187907187908187909187910187911187912187913187914187915187916187917187918187919187920187921187922187923187924187925187926187927187928187929187930187931187932187933187934187935187936187937187938187939187940187941187942187943187944187945187946187947187948187949187950187951187952187953187954187955187956187957187958187959187960187961187962187963187964187965187966187967187968187969187970187971187972187973187974187975187976187977187978187979187980187981187982187983187984187985187986187987187988187989187990187991187992187993187994187995187996187997187998187999188000188001188002188003188004188005188006188007188008188009188010188011188012188013188014188015188016188017188018188019188020188021188022188023188024188025188026188027188028188029188030188031188032188033188034188035188036188037188038188039188040188041188042188043188044188045188046188047188048188049188050188051188052188053188054188055188056188057188058188059188060188061188062188063188064188065188066188067188068188069188070188071188072188073188074188075188076188077188078188079188080188081188082188083188084188085188086188087188088188089188090188091188092188093188094188095188096188097188098188099188100188101188102188103188104188105188106188107188108188109188110188111188112188113188114188115188116188117188118188119188120188121188122188123188124188125188126188127188128188129188130188131188132188133188134188135188136188137188138188139188140188141188142188143188144188145188146188147188148188149188150188151188152188153188154188155188156188157188158188159188160188161188162188163188164188165188166188167188168188169188170188171188172188173188174188175188176188177188178188179188180188181188182188183188184188185188186188187188188188189188190188191188192188193188194188195188196188197188198188199188200188201188202188203188204188205188206188207188208188209188210188211188212188213188214188215188216188217188218188219188220188221188222188223188224188225188226188227188228188229188230188231188232188233188234188235188236188237188238188239188240188241188242188243188244188245188246188247188248188249188250188251188252188253188254188255188256188257188258188259188260188261188262188263188264188265188266188267188268188269188270188271188272188273188274188275188276188277188278188279188280188281188282188283188284188285188286188287188288188289188290188291188292188293188294188295188296188297188298188299188300188301188302188303188304188305188306188307188308188309188310188311188312188313188314188315188316188317188318188319188320188321188322188323188324188325188326188327188328188329188330188331188332188333188334188335188336188337188338188339188340188341188342188343188344188345188346188347188348188349188350188351188352188353188354188355188356188357188358188359188360188361188362188363188364188365188366188367188368188369188370188371188372188373188374188375188376188377188378188379188380188381188382188383188384188385188386188387188388188389188390188391188392188393188394188395188396188397188398188399188400188401188402188403188404188405188406188407188408188409188410188411188412188413188414188415188416188417188418188419188420188421188422188423188424188425188426188427188428188429188430188431188432188433188434188435188436188437188438188439188440188441188442188443188444188445188446188447188448188449188450188451188452188453188454188455188456188457188458188459188460188461188462188463188464188465188466188467188468188469188470188471188472188473188474188475188476188477188478188479188480188481188482188483188484188485188486188487188488188489188490188491188492188493188494188495188496188497188498188499188500188501188502188503188504188505188506188507188508188509188510188511188512188513188514188515188516188517188518188519188520188521188522188523188524188525188526188527188528188529188530188531188532188533188534188535188536188537188538188539188540188541188542188543188544188545188546188547188548188549188550188551188552188553188554188555188556188557188558188559188560188561188562188563188564188565188566188567188568188569188570188571188572188573188574188575188576188577188578188579188580188581188582188583188584188585188586188587188588188589188590188591188592188593188594188595188596188597188598188599188600188601188602188603188604188605188606188607188608188609188610188611188612188613188614188615188616188617188618188619188620188621188622188623188624188625188626188627188628188629188630188631188632188633188634188635188636188637188638188639188640188641188642188643188644188645188646188647188648188649188650188651188652188653188654188655188656188657188658188659188660188661188662188663188664188665188666188667188668188669188670188671188672188673188674188675188676188677188678188679188680188681188682188683188684188685188686188687188688188689188690188691188692188693188694188695188696188697188698188699188700188701188702188703188704188705188706188707188708188709188710188711188712188713188714188715188716188717188718188719188720188721188722188723188724188725188726188727188728188729188730188731188732188733188734188735188736188737188738188739188740188741188742188743188744188745188746188747188748188749188750188751188752188753188754188755188756188757188758188759188760188761188762188763188764188765188766188767188768188769188770188771188772188773188774188775188776188777188778188779188780188781188782188783188784188785188786188787188788188789188790188791188792188793188794188795188796188797188798188799188800188801188802188803188804188805188806188807188808188809188810188811188812188813188814188815188816188817188818188819188820188821188822188823188824188825188826188827188828188829188830188831188832188833188834188835188836188837188838188839188840188841188842188843188844188845188846188847188848188849188850188851188852188853188854188855188856188857188858188859188860188861188862188863188864188865188866188867188868188869188870188871188872188873188874188875188876188877188878188879188880188881188882188883188884188885188886188887188888188889188890188891188892188893188894188895188896188897188898188899188900188901188902188903188904188905188906188907188908188909188910188911188912188913188914188915188916188917188918188919188920188921188922188923188924188925188926188927188928188929188930188931188932188933188934188935188936188937188938188939188940188941188942188943188944188945188946188947188948188949188950188951188952188953188954188955188956188957188958188959188960188961188962188963188964188965188966188967188968188969188970188971188972188973188974188975188976188977188978188979188980188981188982188983188984188985188986188987188988188989188990188991188992188993188994188995188996188997188998188999189000189001189002189003189004189005189006189007189008189009189010189011189012189013189014189015189016189017189018189019189020189021189022189023189024189025189026189027189028189029189030189031189032189033189034189035189036189037189038189039189040189041189042189043189044189045189046189047189048189049189050189051189052189053189054189055189056189057189058189059189060189061189062189063189064189065189066189067189068189069189070189071189072189073189074189075189076189077189078189079189080189081189082189083189084189085189086189087189088189089189090189091189092189093189094189095189096189097189098189099189100189101189102189103189104189105189106189107189108189109189110189111189112189113189114189115189116189117189118189119189120189121189122189123189124189125189126189127189128189129189130189131189132189133189134189135189136189137189138189139189140189141189142189143189144189145189146189147189148189149189150189151189152189153189154189155189156189157189158189159189160189161189162189163189164189165189166189167189168189169189170189171189172189173189174189175189176189177189178189179189180189181189182189183189184189185189186189187189188189189189190189191189192189193189194189195189196189197189198189199189200189201189202189203189204189205189206189207189208189209189210189211189212189213189214189215189216189217189218189219189220189221189222189223189224189225189226189227189228189229189230189231189232189233189234189235189236189237189238189239189240189241189242189243189244189245189246189247189248189249189250189251189252189253189254189255189256189257189258189259189260189261189262189263189264189265189266189267189268189269189270189271189272189273189274189275189276189277189278189279189280189281189282189283189284189285189286189287189288189289189290189291189292189293189294189295189296189297189298189299189300189301189302189303189304189305189306189307189308189309189310189311189312189313189314189315189316189317189318189319189320189321189322189323189324189325189326189327189328189329189330189331189332189333189334189335189336189337189338189339189340189341189342189343189344189345189346189347189348189349189350189351189352189353189354189355189356189357189358189359189360189361189362189363189364189365189366189367189368189369189370189371189372189373189374189375189376189377189378189379189380189381189382189383189384189385189386189387189388189389189390189391189392189393189394189395189396189397189398189399189400189401189402189403189404189405189406189407189408189409189410189411189412189413189414189415189416189417189418189419189420189421189422189423189424189425189426189427189428189429189430189431189432189433189434189435189436189437189438189439189440189441189442189443189444189445189446189447189448189449189450189451189452189453189454189455189456189457189458189459189460189461189462189463189464189465189466189467189468189469189470189471189472189473189474189475189476189477189478189479189480189481189482189483189484189485189486189487189488189489189490189491189492189493189494189495189496189497189498189499189500189501189502189503189504189505189506189507189508189509189510189511189512189513189514189515189516189517189518189519189520189521189522189523189524189525189526189527189528189529189530189531189532189533189534189535189536189537189538189539189540189541189542189543189544189545189546189547189548189549189550189551189552189553189554189555189556189557189558189559189560189561189562189563189564189565189566189567189568189569189570189571189572189573189574189575189576189577189578189579189580189581189582189583189584189585189586189587189588189589189590189591189592189593189594189595189596189597189598189599189600189601189602189603189604189605189606189607189608189609189610189611189612189613189614189615189616189617189618189619189620189621189622189623189624189625189626189627189628189629189630189631189632189633189634189635189636189637189638189639189640189641189642189643189644189645189646189647189648189649189650189651189652189653189654189655189656189657189658189659189660189661189662189663189664189665189666189667189668189669189670189671189672189673189674189675189676189677189678189679189680189681189682189683189684189685189686189687189688189689189690189691189692189693189694189695189696189697189698189699189700189701189702189703189704189705189706189707189708189709189710189711189712189713189714189715189716189717189718189719189720189721189722189723189724189725189726189727189728189729189730189731189732189733189734189735189736189737189738189739189740189741189742189743189744189745189746189747189748189749189750189751189752189753189754189755189756189757189758189759189760189761189762189763189764189765189766189767189768189769189770189771189772189773189774189775189776189777189778189779189780189781189782189783189784189785189786189787189788189789189790189791189792189793189794189795189796189797189798189799189800189801189802189803189804189805189806189807189808189809189810189811189812189813189814189815189816189817189818189819189820189821189822189823189824189825189826189827189828189829189830189831189832189833189834189835189836189837189838189839189840189841189842189843189844189845189846189847189848189849189850189851189852189853189854189855189856189857189858189859189860189861189862189863189864189865189866189867189868189869189870189871189872189873189874189875189876189877189878189879189880189881189882189883189884189885189886189887189888189889189890189891189892189893189894189895189896189897189898189899189900189901189902189903189904189905189906189907189908189909189910189911189912189913189914189915189916189917189918189919189920189921189922189923189924189925189926189927189928189929189930189931189932189933189934189935189936189937189938189939189940189941189942189943189944189945189946189947189948189949189950189951189952189953189954189955189956189957189958189959189960189961189962189963189964189965189966189967189968189969189970189971189972189973189974189975189976189977189978189979189980189981189982189983189984189985189986189987189988189989189990189991189992189993189994189995189996189997189998189999190000190001190002190003190004190005190006190007190008190009190010190011190012190013190014190015190016190017190018190019190020190021190022190023190024190025190026190027190028190029190030190031190032190033190034190035190036190037190038190039190040190041190042190043190044190045190046190047190048190049190050190051190052190053190054190055190056190057190058190059190060190061190062190063190064190065190066190067190068190069190070190071190072190073190074190075190076190077190078190079190080190081190082190083190084190085190086190087190088190089190090190091190092190093190094190095190096190097190098190099190100190101190102190103190104190105190106190107190108190109190110190111190112190113190114190115190116190117190118190119190120190121190122190123190124190125190126190127190128190129190130190131190132190133190134190135190136190137190138190139190140190141190142190143190144190145190146190147190148190149190150190151190152190153190154190155190156190157190158190159190160190161190162190163190164190165190166190167190168190169190170190171190172190173190174190175190176190177190178190179190180190181190182190183190184190185190186190187190188190189190190190191190192190193190194190195190196190197190198190199190200190201190202190203190204190205190206190207190208190209190210190211190212190213190214190215190216190217190218190219190220190221190222190223190224190225190226190227190228190229190230190231190232190233190234190235190236190237190238190239190240190241190242190243190244190245190246190247190248190249190250190251190252190253190254190255190256190257190258190259190260190261190262190263190264190265190266190267190268190269190270190271190272190273190274190275190276190277190278190279190280190281190282190283190284190285190286190287190288190289190290190291190292190293190294190295190296190297190298190299190300190301190302190303190304190305190306190307190308190309190310190311190312190313190314190315190316190317190318190319190320190321190322190323190324190325190326190327190328190329190330190331190332190333190334190335190336190337190338190339190340190341190342190343190344190345190346190347190348190349190350190351190352190353190354190355190356190357190358190359190360190361190362190363190364190365190366190367190368190369190370190371190372190373190374190375190376190377190378190379190380190381190382190383190384190385190386190387190388190389190390190391190392190393190394190395190396190397190398190399190400190401190402190403190404190405190406190407190408190409190410190411190412190413190414190415190416190417190418190419190420190421190422190423190424190425190426190427190428190429190430190431190432190433190434190435190436190437190438190439190440190441190442190443190444190445190446190447190448190449190450190451190452190453190454190455190456190457190458190459190460190461190462190463190464190465190466190467190468190469190470190471190472190473190474190475190476190477190478190479190480190481190482190483190484190485190486190487190488190489190490190491190492190493190494190495190496190497190498190499190500190501190502190503190504190505190506190507190508190509190510190511190512190513190514190515190516190517190518190519190520190521190522190523190524190525190526190527190528190529190530190531190532190533190534190535190536190537190538190539190540190541190542190543190544190545190546190547190548190549190550190551190552190553190554190555190556190557190558190559190560190561190562190563190564190565190566190567190568190569190570190571190572190573190574190575190576190577190578190579190580190581190582190583190584190585190586190587190588190589190590190591190592190593190594190595190596190597190598190599190600190601190602190603190604190605190606190607190608190609190610190611190612190613190614190615190616190617190618190619190620190621190622190623190624190625190626190627190628190629190630190631190632190633190634190635190636190637190638190639190640190641190642190643190644190645190646190647190648190649190650190651190652190653190654190655190656190657190658190659190660190661190662190663190664190665190666190667190668190669190670190671190672190673190674190675190676190677190678190679190680190681190682190683190684190685190686190687190688190689190690190691190692190693190694190695190696190697190698190699190700190701190702190703190704190705190706190707190708190709190710190711190712190713190714190715190716190717190718190719190720190721190722190723190724190725190726190727190728190729190730190731190732190733190734190735190736190737190738190739190740190741190742190743190744190745190746190747190748190749190750190751190752190753190754190755190756190757190758190759190760190761190762190763190764190765190766190767190768190769190770190771190772190773190774190775190776190777190778190779190780190781190782190783190784190785190786190787190788190789190790190791190792190793190794190795190796190797190798190799190800190801190802190803190804190805190806190807190808190809190810190811190812190813190814190815190816190817190818190819190820190821190822190823190824190825190826190827190828190829190830190831190832190833190834190835190836190837190838190839190840190841190842190843190844190845190846190847190848190849190850190851190852190853190854190855190856190857190858190859190860190861190862190863190864190865190866190867190868190869190870190871190872190873190874190875190876190877190878190879190880190881190882190883190884190885190886190887190888190889190890190891190892190893190894190895190896190897190898190899190900190901190902190903190904190905190906190907190908190909190910190911190912190913190914190915190916190917190918190919190920190921190922190923190924190925190926190927190928190929190930190931190932190933190934190935190936190937190938190939190940190941190942190943190944190945190946190947190948190949190950190951190952190953190954190955190956190957190958190959190960190961190962190963190964190965190966190967190968190969190970190971190972190973190974190975190976190977190978190979190980190981190982190983190984190985190986190987190988190989190990190991190992190993190994190995190996190997190998190999191000191001191002191003191004191005191006191007191008191009191010191011191012191013191014191015191016191017191018191019191020191021191022191023191024191025191026191027191028191029191030191031191032191033191034191035191036191037191038191039191040191041191042191043191044191045191046191047191048191049191050191051191052191053191054191055191056191057191058191059191060191061191062191063191064191065191066191067191068191069191070191071191072191073191074191075191076191077191078191079191080191081191082191083191084191085191086191087191088191089191090191091191092191093191094191095191096191097191098191099191100191101191102191103191104191105191106191107191108191109191110191111191112191113191114191115191116191117191118191119191120191121191122191123191124191125191126191127191128191129191130191131191132191133191134191135191136191137191138191139191140191141191142191143191144191145191146191147191148191149191150191151191152191153191154191155191156191157191158191159191160191161191162191163
  1. var __create = Object.create;
  2. var __defProp = Object.defineProperty;
  3. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  4. var __getOwnPropNames = Object.getOwnPropertyNames;
  5. var __getProtoOf = Object.getPrototypeOf;
  6. var __hasOwnProp = Object.prototype.hasOwnProperty;
  7. var __commonJS = (cb, mod) => function __require() {
  8. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  9. };
  10. var __export = (target, all4) => {
  11. for (var name2 in all4)
  12. __defProp(target, name2, { get: all4[name2], enumerable: true });
  13. };
  14. var __copyProps = (to, from, except, desc) => {
  15. if (from && typeof from === "object" || typeof from === "function") {
  16. for (let key of __getOwnPropNames(from))
  17. if (!__hasOwnProp.call(to, key) && key !== except)
  18. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  19. }
  20. return to;
  21. };
  22. var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  23. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  24. mod
  25. ));
  26. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  27. // node_modules/@babel/types/lib/utils/shallowEqual.js
  28. var require_shallowEqual = __commonJS({
  29. "node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  30. "use strict";
  31. Object.defineProperty(exports, "__esModule", {
  32. value: true
  33. });
  34. exports.default = shallowEqual;
  35. function shallowEqual(actual, expected) {
  36. const keys2 = Object.keys(expected);
  37. for (const key of keys2) {
  38. if (actual[key] !== expected[key]) {
  39. return false;
  40. }
  41. }
  42. return true;
  43. }
  44. }
  45. });
  46. // node_modules/@babel/types/lib/validators/generated/index.js
  47. var require_generated = __commonJS({
  48. "node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  49. "use strict";
  50. Object.defineProperty(exports, "__esModule", {
  51. value: true
  52. });
  53. exports.isArrayExpression = isArrayExpression;
  54. exports.isAssignmentExpression = isAssignmentExpression;
  55. exports.isBinaryExpression = isBinaryExpression;
  56. exports.isInterpreterDirective = isInterpreterDirective;
  57. exports.isDirective = isDirective;
  58. exports.isDirectiveLiteral = isDirectiveLiteral;
  59. exports.isBlockStatement = isBlockStatement;
  60. exports.isBreakStatement = isBreakStatement;
  61. exports.isCallExpression = isCallExpression;
  62. exports.isCatchClause = isCatchClause;
  63. exports.isConditionalExpression = isConditionalExpression;
  64. exports.isContinueStatement = isContinueStatement;
  65. exports.isDebuggerStatement = isDebuggerStatement;
  66. exports.isDoWhileStatement = isDoWhileStatement;
  67. exports.isEmptyStatement = isEmptyStatement;
  68. exports.isExpressionStatement = isExpressionStatement2;
  69. exports.isFile = isFile;
  70. exports.isForInStatement = isForInStatement;
  71. exports.isForStatement = isForStatement;
  72. exports.isFunctionDeclaration = isFunctionDeclaration;
  73. exports.isFunctionExpression = isFunctionExpression;
  74. exports.isIdentifier = isIdentifier2;
  75. exports.isIfStatement = isIfStatement;
  76. exports.isLabeledStatement = isLabeledStatement;
  77. exports.isStringLiteral = isStringLiteral2;
  78. exports.isNumericLiteral = isNumericLiteral;
  79. exports.isNullLiteral = isNullLiteral;
  80. exports.isBooleanLiteral = isBooleanLiteral2;
  81. exports.isRegExpLiteral = isRegExpLiteral;
  82. exports.isLogicalExpression = isLogicalExpression;
  83. exports.isMemberExpression = isMemberExpression;
  84. exports.isNewExpression = isNewExpression;
  85. exports.isProgram = isProgram;
  86. exports.isObjectExpression = isObjectExpression;
  87. exports.isObjectMethod = isObjectMethod;
  88. exports.isObjectProperty = isObjectProperty;
  89. exports.isRestElement = isRestElement;
  90. exports.isReturnStatement = isReturnStatement;
  91. exports.isSequenceExpression = isSequenceExpression;
  92. exports.isParenthesizedExpression = isParenthesizedExpression;
  93. exports.isSwitchCase = isSwitchCase;
  94. exports.isSwitchStatement = isSwitchStatement;
  95. exports.isThisExpression = isThisExpression;
  96. exports.isThrowStatement = isThrowStatement;
  97. exports.isTryStatement = isTryStatement;
  98. exports.isUnaryExpression = isUnaryExpression;
  99. exports.isUpdateExpression = isUpdateExpression;
  100. exports.isVariableDeclaration = isVariableDeclaration;
  101. exports.isVariableDeclarator = isVariableDeclarator;
  102. exports.isWhileStatement = isWhileStatement;
  103. exports.isWithStatement = isWithStatement;
  104. exports.isAssignmentPattern = isAssignmentPattern;
  105. exports.isArrayPattern = isArrayPattern;
  106. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  107. exports.isClassBody = isClassBody;
  108. exports.isClassExpression = isClassExpression;
  109. exports.isClassDeclaration = isClassDeclaration;
  110. exports.isExportAllDeclaration = isExportAllDeclaration;
  111. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  112. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  113. exports.isExportSpecifier = isExportSpecifier;
  114. exports.isForOfStatement = isForOfStatement;
  115. exports.isImportDeclaration = isImportDeclaration;
  116. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  117. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  118. exports.isImportSpecifier = isImportSpecifier;
  119. exports.isMetaProperty = isMetaProperty;
  120. exports.isClassMethod = isClassMethod;
  121. exports.isObjectPattern = isObjectPattern;
  122. exports.isSpreadElement = isSpreadElement;
  123. exports.isSuper = isSuper;
  124. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  125. exports.isTemplateElement = isTemplateElement;
  126. exports.isTemplateLiteral = isTemplateLiteral;
  127. exports.isYieldExpression = isYieldExpression;
  128. exports.isAwaitExpression = isAwaitExpression;
  129. exports.isImport = isImport;
  130. exports.isBigIntLiteral = isBigIntLiteral;
  131. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  132. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  133. exports.isOptionalCallExpression = isOptionalCallExpression;
  134. exports.isClassProperty = isClassProperty;
  135. exports.isClassPrivateProperty = isClassPrivateProperty;
  136. exports.isClassPrivateMethod = isClassPrivateMethod;
  137. exports.isPrivateName = isPrivateName;
  138. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  139. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  140. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  141. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  142. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  143. exports.isClassImplements = isClassImplements;
  144. exports.isDeclareClass = isDeclareClass;
  145. exports.isDeclareFunction = isDeclareFunction;
  146. exports.isDeclareInterface = isDeclareInterface;
  147. exports.isDeclareModule = isDeclareModule;
  148. exports.isDeclareModuleExports = isDeclareModuleExports;
  149. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  150. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  151. exports.isDeclareVariable = isDeclareVariable;
  152. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  153. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  154. exports.isDeclaredPredicate = isDeclaredPredicate;
  155. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  156. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  157. exports.isFunctionTypeParam = isFunctionTypeParam;
  158. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  159. exports.isInferredPredicate = isInferredPredicate;
  160. exports.isInterfaceExtends = isInterfaceExtends;
  161. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  162. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  163. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  164. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  165. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  166. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  167. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  168. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  169. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  170. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  171. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  172. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  173. exports.isObjectTypeProperty = isObjectTypeProperty;
  174. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  175. exports.isOpaqueType = isOpaqueType;
  176. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  177. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  178. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  179. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  180. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  181. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  182. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  183. exports.isTypeAlias = isTypeAlias;
  184. exports.isTypeAnnotation = isTypeAnnotation;
  185. exports.isTypeCastExpression = isTypeCastExpression;
  186. exports.isTypeParameter = isTypeParameter;
  187. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  188. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  189. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  190. exports.isVariance = isVariance;
  191. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  192. exports.isEnumDeclaration = isEnumDeclaration;
  193. exports.isEnumBooleanBody = isEnumBooleanBody;
  194. exports.isEnumNumberBody = isEnumNumberBody;
  195. exports.isEnumStringBody = isEnumStringBody;
  196. exports.isEnumSymbolBody = isEnumSymbolBody;
  197. exports.isEnumBooleanMember = isEnumBooleanMember;
  198. exports.isEnumNumberMember = isEnumNumberMember;
  199. exports.isEnumStringMember = isEnumStringMember;
  200. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  201. exports.isIndexedAccessType = isIndexedAccessType;
  202. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  203. exports.isJSXAttribute = isJSXAttribute;
  204. exports.isJSXClosingElement = isJSXClosingElement;
  205. exports.isJSXElement = isJSXElement2;
  206. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  207. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  208. exports.isJSXSpreadChild = isJSXSpreadChild;
  209. exports.isJSXIdentifier = isJSXIdentifier2;
  210. exports.isJSXMemberExpression = isJSXMemberExpression;
  211. exports.isJSXNamespacedName = isJSXNamespacedName;
  212. exports.isJSXOpeningElement = isJSXOpeningElement;
  213. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  214. exports.isJSXText = isJSXText;
  215. exports.isJSXFragment = isJSXFragment2;
  216. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  217. exports.isJSXClosingFragment = isJSXClosingFragment;
  218. exports.isNoop = isNoop;
  219. exports.isPlaceholder = isPlaceholder;
  220. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  221. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  222. exports.isBindExpression = isBindExpression;
  223. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  224. exports.isPipelineBareFunction = isPipelineBareFunction;
  225. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  226. exports.isImportAttribute = isImportAttribute;
  227. exports.isDecorator = isDecorator;
  228. exports.isDoExpression = isDoExpression;
  229. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  230. exports.isRecordExpression = isRecordExpression;
  231. exports.isTupleExpression = isTupleExpression;
  232. exports.isDecimalLiteral = isDecimalLiteral;
  233. exports.isStaticBlock = isStaticBlock;
  234. exports.isModuleExpression = isModuleExpression;
  235. exports.isTSParameterProperty = isTSParameterProperty;
  236. exports.isTSDeclareFunction = isTSDeclareFunction;
  237. exports.isTSDeclareMethod = isTSDeclareMethod;
  238. exports.isTSQualifiedName = isTSQualifiedName;
  239. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  240. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  241. exports.isTSPropertySignature = isTSPropertySignature;
  242. exports.isTSMethodSignature = isTSMethodSignature;
  243. exports.isTSIndexSignature = isTSIndexSignature;
  244. exports.isTSAnyKeyword = isTSAnyKeyword;
  245. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  246. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  247. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  248. exports.isTSNeverKeyword = isTSNeverKeyword;
  249. exports.isTSNullKeyword = isTSNullKeyword;
  250. exports.isTSNumberKeyword = isTSNumberKeyword;
  251. exports.isTSObjectKeyword = isTSObjectKeyword;
  252. exports.isTSStringKeyword = isTSStringKeyword;
  253. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  254. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  255. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  256. exports.isTSVoidKeyword = isTSVoidKeyword;
  257. exports.isTSThisType = isTSThisType;
  258. exports.isTSFunctionType = isTSFunctionType;
  259. exports.isTSConstructorType = isTSConstructorType;
  260. exports.isTSTypeReference = isTSTypeReference;
  261. exports.isTSTypePredicate = isTSTypePredicate;
  262. exports.isTSTypeQuery = isTSTypeQuery;
  263. exports.isTSTypeLiteral = isTSTypeLiteral;
  264. exports.isTSArrayType = isTSArrayType;
  265. exports.isTSTupleType = isTSTupleType;
  266. exports.isTSOptionalType = isTSOptionalType;
  267. exports.isTSRestType = isTSRestType;
  268. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  269. exports.isTSUnionType = isTSUnionType;
  270. exports.isTSIntersectionType = isTSIntersectionType;
  271. exports.isTSConditionalType = isTSConditionalType;
  272. exports.isTSInferType = isTSInferType;
  273. exports.isTSParenthesizedType = isTSParenthesizedType;
  274. exports.isTSTypeOperator = isTSTypeOperator;
  275. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  276. exports.isTSMappedType = isTSMappedType;
  277. exports.isTSLiteralType = isTSLiteralType;
  278. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  279. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  280. exports.isTSInterfaceBody = isTSInterfaceBody;
  281. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  282. exports.isTSAsExpression = isTSAsExpression;
  283. exports.isTSTypeAssertion = isTSTypeAssertion;
  284. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  285. exports.isTSEnumMember = isTSEnumMember;
  286. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  287. exports.isTSModuleBlock = isTSModuleBlock;
  288. exports.isTSImportType = isTSImportType;
  289. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  290. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  291. exports.isTSNonNullExpression = isTSNonNullExpression;
  292. exports.isTSExportAssignment = isTSExportAssignment;
  293. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  294. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  295. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  296. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  297. exports.isTSTypeParameter = isTSTypeParameter;
  298. exports.isExpression = isExpression;
  299. exports.isBinary = isBinary;
  300. exports.isScopable = isScopable;
  301. exports.isBlockParent = isBlockParent;
  302. exports.isBlock = isBlock;
  303. exports.isStatement = isStatement;
  304. exports.isTerminatorless = isTerminatorless;
  305. exports.isCompletionStatement = isCompletionStatement;
  306. exports.isConditional = isConditional;
  307. exports.isLoop = isLoop;
  308. exports.isWhile = isWhile;
  309. exports.isExpressionWrapper = isExpressionWrapper;
  310. exports.isFor = isFor;
  311. exports.isForXStatement = isForXStatement;
  312. exports.isFunction = isFunction;
  313. exports.isFunctionParent = isFunctionParent;
  314. exports.isPureish = isPureish;
  315. exports.isDeclaration = isDeclaration2;
  316. exports.isPatternLike = isPatternLike;
  317. exports.isLVal = isLVal;
  318. exports.isTSEntityName = isTSEntityName;
  319. exports.isLiteral = isLiteral;
  320. exports.isImmutable = isImmutable;
  321. exports.isUserWhitespacable = isUserWhitespacable;
  322. exports.isMethod = isMethod;
  323. exports.isObjectMember = isObjectMember;
  324. exports.isProperty = isProperty;
  325. exports.isUnaryLike = isUnaryLike;
  326. exports.isPattern = isPattern;
  327. exports.isClass = isClass;
  328. exports.isModuleDeclaration = isModuleDeclaration;
  329. exports.isExportDeclaration = isExportDeclaration;
  330. exports.isModuleSpecifier = isModuleSpecifier;
  331. exports.isPrivate = isPrivate;
  332. exports.isFlow = isFlow;
  333. exports.isFlowType = isFlowType;
  334. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  335. exports.isFlowDeclaration = isFlowDeclaration;
  336. exports.isFlowPredicate = isFlowPredicate;
  337. exports.isEnumBody = isEnumBody;
  338. exports.isEnumMember = isEnumMember;
  339. exports.isJSX = isJSX;
  340. exports.isTSTypeElement = isTSTypeElement;
  341. exports.isTSType = isTSType;
  342. exports.isTSBaseType = isTSBaseType;
  343. exports.isNumberLiteral = isNumberLiteral;
  344. exports.isRegexLiteral = isRegexLiteral;
  345. exports.isRestProperty = isRestProperty;
  346. exports.isSpreadProperty = isSpreadProperty;
  347. var _shallowEqual = require_shallowEqual();
  348. function isArrayExpression(node, opts) {
  349. if (!node)
  350. return false;
  351. const nodeType = node.type;
  352. if (nodeType === "ArrayExpression") {
  353. if (typeof opts === "undefined") {
  354. return true;
  355. } else {
  356. return (0, _shallowEqual.default)(node, opts);
  357. }
  358. }
  359. return false;
  360. }
  361. function isAssignmentExpression(node, opts) {
  362. if (!node)
  363. return false;
  364. const nodeType = node.type;
  365. if (nodeType === "AssignmentExpression") {
  366. if (typeof opts === "undefined") {
  367. return true;
  368. } else {
  369. return (0, _shallowEqual.default)(node, opts);
  370. }
  371. }
  372. return false;
  373. }
  374. function isBinaryExpression(node, opts) {
  375. if (!node)
  376. return false;
  377. const nodeType = node.type;
  378. if (nodeType === "BinaryExpression") {
  379. if (typeof opts === "undefined") {
  380. return true;
  381. } else {
  382. return (0, _shallowEqual.default)(node, opts);
  383. }
  384. }
  385. return false;
  386. }
  387. function isInterpreterDirective(node, opts) {
  388. if (!node)
  389. return false;
  390. const nodeType = node.type;
  391. if (nodeType === "InterpreterDirective") {
  392. if (typeof opts === "undefined") {
  393. return true;
  394. } else {
  395. return (0, _shallowEqual.default)(node, opts);
  396. }
  397. }
  398. return false;
  399. }
  400. function isDirective(node, opts) {
  401. if (!node)
  402. return false;
  403. const nodeType = node.type;
  404. if (nodeType === "Directive") {
  405. if (typeof opts === "undefined") {
  406. return true;
  407. } else {
  408. return (0, _shallowEqual.default)(node, opts);
  409. }
  410. }
  411. return false;
  412. }
  413. function isDirectiveLiteral(node, opts) {
  414. if (!node)
  415. return false;
  416. const nodeType = node.type;
  417. if (nodeType === "DirectiveLiteral") {
  418. if (typeof opts === "undefined") {
  419. return true;
  420. } else {
  421. return (0, _shallowEqual.default)(node, opts);
  422. }
  423. }
  424. return false;
  425. }
  426. function isBlockStatement(node, opts) {
  427. if (!node)
  428. return false;
  429. const nodeType = node.type;
  430. if (nodeType === "BlockStatement") {
  431. if (typeof opts === "undefined") {
  432. return true;
  433. } else {
  434. return (0, _shallowEqual.default)(node, opts);
  435. }
  436. }
  437. return false;
  438. }
  439. function isBreakStatement(node, opts) {
  440. if (!node)
  441. return false;
  442. const nodeType = node.type;
  443. if (nodeType === "BreakStatement") {
  444. if (typeof opts === "undefined") {
  445. return true;
  446. } else {
  447. return (0, _shallowEqual.default)(node, opts);
  448. }
  449. }
  450. return false;
  451. }
  452. function isCallExpression(node, opts) {
  453. if (!node)
  454. return false;
  455. const nodeType = node.type;
  456. if (nodeType === "CallExpression") {
  457. if (typeof opts === "undefined") {
  458. return true;
  459. } else {
  460. return (0, _shallowEqual.default)(node, opts);
  461. }
  462. }
  463. return false;
  464. }
  465. function isCatchClause(node, opts) {
  466. if (!node)
  467. return false;
  468. const nodeType = node.type;
  469. if (nodeType === "CatchClause") {
  470. if (typeof opts === "undefined") {
  471. return true;
  472. } else {
  473. return (0, _shallowEqual.default)(node, opts);
  474. }
  475. }
  476. return false;
  477. }
  478. function isConditionalExpression(node, opts) {
  479. if (!node)
  480. return false;
  481. const nodeType = node.type;
  482. if (nodeType === "ConditionalExpression") {
  483. if (typeof opts === "undefined") {
  484. return true;
  485. } else {
  486. return (0, _shallowEqual.default)(node, opts);
  487. }
  488. }
  489. return false;
  490. }
  491. function isContinueStatement(node, opts) {
  492. if (!node)
  493. return false;
  494. const nodeType = node.type;
  495. if (nodeType === "ContinueStatement") {
  496. if (typeof opts === "undefined") {
  497. return true;
  498. } else {
  499. return (0, _shallowEqual.default)(node, opts);
  500. }
  501. }
  502. return false;
  503. }
  504. function isDebuggerStatement(node, opts) {
  505. if (!node)
  506. return false;
  507. const nodeType = node.type;
  508. if (nodeType === "DebuggerStatement") {
  509. if (typeof opts === "undefined") {
  510. return true;
  511. } else {
  512. return (0, _shallowEqual.default)(node, opts);
  513. }
  514. }
  515. return false;
  516. }
  517. function isDoWhileStatement(node, opts) {
  518. if (!node)
  519. return false;
  520. const nodeType = node.type;
  521. if (nodeType === "DoWhileStatement") {
  522. if (typeof opts === "undefined") {
  523. return true;
  524. } else {
  525. return (0, _shallowEqual.default)(node, opts);
  526. }
  527. }
  528. return false;
  529. }
  530. function isEmptyStatement(node, opts) {
  531. if (!node)
  532. return false;
  533. const nodeType = node.type;
  534. if (nodeType === "EmptyStatement") {
  535. if (typeof opts === "undefined") {
  536. return true;
  537. } else {
  538. return (0, _shallowEqual.default)(node, opts);
  539. }
  540. }
  541. return false;
  542. }
  543. function isExpressionStatement2(node, opts) {
  544. if (!node)
  545. return false;
  546. const nodeType = node.type;
  547. if (nodeType === "ExpressionStatement") {
  548. if (typeof opts === "undefined") {
  549. return true;
  550. } else {
  551. return (0, _shallowEqual.default)(node, opts);
  552. }
  553. }
  554. return false;
  555. }
  556. function isFile(node, opts) {
  557. if (!node)
  558. return false;
  559. const nodeType = node.type;
  560. if (nodeType === "File") {
  561. if (typeof opts === "undefined") {
  562. return true;
  563. } else {
  564. return (0, _shallowEqual.default)(node, opts);
  565. }
  566. }
  567. return false;
  568. }
  569. function isForInStatement(node, opts) {
  570. if (!node)
  571. return false;
  572. const nodeType = node.type;
  573. if (nodeType === "ForInStatement") {
  574. if (typeof opts === "undefined") {
  575. return true;
  576. } else {
  577. return (0, _shallowEqual.default)(node, opts);
  578. }
  579. }
  580. return false;
  581. }
  582. function isForStatement(node, opts) {
  583. if (!node)
  584. return false;
  585. const nodeType = node.type;
  586. if (nodeType === "ForStatement") {
  587. if (typeof opts === "undefined") {
  588. return true;
  589. } else {
  590. return (0, _shallowEqual.default)(node, opts);
  591. }
  592. }
  593. return false;
  594. }
  595. function isFunctionDeclaration(node, opts) {
  596. if (!node)
  597. return false;
  598. const nodeType = node.type;
  599. if (nodeType === "FunctionDeclaration") {
  600. if (typeof opts === "undefined") {
  601. return true;
  602. } else {
  603. return (0, _shallowEqual.default)(node, opts);
  604. }
  605. }
  606. return false;
  607. }
  608. function isFunctionExpression(node, opts) {
  609. if (!node)
  610. return false;
  611. const nodeType = node.type;
  612. if (nodeType === "FunctionExpression") {
  613. if (typeof opts === "undefined") {
  614. return true;
  615. } else {
  616. return (0, _shallowEqual.default)(node, opts);
  617. }
  618. }
  619. return false;
  620. }
  621. function isIdentifier2(node, opts) {
  622. if (!node)
  623. return false;
  624. const nodeType = node.type;
  625. if (nodeType === "Identifier") {
  626. if (typeof opts === "undefined") {
  627. return true;
  628. } else {
  629. return (0, _shallowEqual.default)(node, opts);
  630. }
  631. }
  632. return false;
  633. }
  634. function isIfStatement(node, opts) {
  635. if (!node)
  636. return false;
  637. const nodeType = node.type;
  638. if (nodeType === "IfStatement") {
  639. if (typeof opts === "undefined") {
  640. return true;
  641. } else {
  642. return (0, _shallowEqual.default)(node, opts);
  643. }
  644. }
  645. return false;
  646. }
  647. function isLabeledStatement(node, opts) {
  648. if (!node)
  649. return false;
  650. const nodeType = node.type;
  651. if (nodeType === "LabeledStatement") {
  652. if (typeof opts === "undefined") {
  653. return true;
  654. } else {
  655. return (0, _shallowEqual.default)(node, opts);
  656. }
  657. }
  658. return false;
  659. }
  660. function isStringLiteral2(node, opts) {
  661. if (!node)
  662. return false;
  663. const nodeType = node.type;
  664. if (nodeType === "StringLiteral") {
  665. if (typeof opts === "undefined") {
  666. return true;
  667. } else {
  668. return (0, _shallowEqual.default)(node, opts);
  669. }
  670. }
  671. return false;
  672. }
  673. function isNumericLiteral(node, opts) {
  674. if (!node)
  675. return false;
  676. const nodeType = node.type;
  677. if (nodeType === "NumericLiteral") {
  678. if (typeof opts === "undefined") {
  679. return true;
  680. } else {
  681. return (0, _shallowEqual.default)(node, opts);
  682. }
  683. }
  684. return false;
  685. }
  686. function isNullLiteral(node, opts) {
  687. if (!node)
  688. return false;
  689. const nodeType = node.type;
  690. if (nodeType === "NullLiteral") {
  691. if (typeof opts === "undefined") {
  692. return true;
  693. } else {
  694. return (0, _shallowEqual.default)(node, opts);
  695. }
  696. }
  697. return false;
  698. }
  699. function isBooleanLiteral2(node, opts) {
  700. if (!node)
  701. return false;
  702. const nodeType = node.type;
  703. if (nodeType === "BooleanLiteral") {
  704. if (typeof opts === "undefined") {
  705. return true;
  706. } else {
  707. return (0, _shallowEqual.default)(node, opts);
  708. }
  709. }
  710. return false;
  711. }
  712. function isRegExpLiteral(node, opts) {
  713. if (!node)
  714. return false;
  715. const nodeType = node.type;
  716. if (nodeType === "RegExpLiteral") {
  717. if (typeof opts === "undefined") {
  718. return true;
  719. } else {
  720. return (0, _shallowEqual.default)(node, opts);
  721. }
  722. }
  723. return false;
  724. }
  725. function isLogicalExpression(node, opts) {
  726. if (!node)
  727. return false;
  728. const nodeType = node.type;
  729. if (nodeType === "LogicalExpression") {
  730. if (typeof opts === "undefined") {
  731. return true;
  732. } else {
  733. return (0, _shallowEqual.default)(node, opts);
  734. }
  735. }
  736. return false;
  737. }
  738. function isMemberExpression(node, opts) {
  739. if (!node)
  740. return false;
  741. const nodeType = node.type;
  742. if (nodeType === "MemberExpression") {
  743. if (typeof opts === "undefined") {
  744. return true;
  745. } else {
  746. return (0, _shallowEqual.default)(node, opts);
  747. }
  748. }
  749. return false;
  750. }
  751. function isNewExpression(node, opts) {
  752. if (!node)
  753. return false;
  754. const nodeType = node.type;
  755. if (nodeType === "NewExpression") {
  756. if (typeof opts === "undefined") {
  757. return true;
  758. } else {
  759. return (0, _shallowEqual.default)(node, opts);
  760. }
  761. }
  762. return false;
  763. }
  764. function isProgram(node, opts) {
  765. if (!node)
  766. return false;
  767. const nodeType = node.type;
  768. if (nodeType === "Program") {
  769. if (typeof opts === "undefined") {
  770. return true;
  771. } else {
  772. return (0, _shallowEqual.default)(node, opts);
  773. }
  774. }
  775. return false;
  776. }
  777. function isObjectExpression(node, opts) {
  778. if (!node)
  779. return false;
  780. const nodeType = node.type;
  781. if (nodeType === "ObjectExpression") {
  782. if (typeof opts === "undefined") {
  783. return true;
  784. } else {
  785. return (0, _shallowEqual.default)(node, opts);
  786. }
  787. }
  788. return false;
  789. }
  790. function isObjectMethod(node, opts) {
  791. if (!node)
  792. return false;
  793. const nodeType = node.type;
  794. if (nodeType === "ObjectMethod") {
  795. if (typeof opts === "undefined") {
  796. return true;
  797. } else {
  798. return (0, _shallowEqual.default)(node, opts);
  799. }
  800. }
  801. return false;
  802. }
  803. function isObjectProperty(node, opts) {
  804. if (!node)
  805. return false;
  806. const nodeType = node.type;
  807. if (nodeType === "ObjectProperty") {
  808. if (typeof opts === "undefined") {
  809. return true;
  810. } else {
  811. return (0, _shallowEqual.default)(node, opts);
  812. }
  813. }
  814. return false;
  815. }
  816. function isRestElement(node, opts) {
  817. if (!node)
  818. return false;
  819. const nodeType = node.type;
  820. if (nodeType === "RestElement") {
  821. if (typeof opts === "undefined") {
  822. return true;
  823. } else {
  824. return (0, _shallowEqual.default)(node, opts);
  825. }
  826. }
  827. return false;
  828. }
  829. function isReturnStatement(node, opts) {
  830. if (!node)
  831. return false;
  832. const nodeType = node.type;
  833. if (nodeType === "ReturnStatement") {
  834. if (typeof opts === "undefined") {
  835. return true;
  836. } else {
  837. return (0, _shallowEqual.default)(node, opts);
  838. }
  839. }
  840. return false;
  841. }
  842. function isSequenceExpression(node, opts) {
  843. if (!node)
  844. return false;
  845. const nodeType = node.type;
  846. if (nodeType === "SequenceExpression") {
  847. if (typeof opts === "undefined") {
  848. return true;
  849. } else {
  850. return (0, _shallowEqual.default)(node, opts);
  851. }
  852. }
  853. return false;
  854. }
  855. function isParenthesizedExpression(node, opts) {
  856. if (!node)
  857. return false;
  858. const nodeType = node.type;
  859. if (nodeType === "ParenthesizedExpression") {
  860. if (typeof opts === "undefined") {
  861. return true;
  862. } else {
  863. return (0, _shallowEqual.default)(node, opts);
  864. }
  865. }
  866. return false;
  867. }
  868. function isSwitchCase(node, opts) {
  869. if (!node)
  870. return false;
  871. const nodeType = node.type;
  872. if (nodeType === "SwitchCase") {
  873. if (typeof opts === "undefined") {
  874. return true;
  875. } else {
  876. return (0, _shallowEqual.default)(node, opts);
  877. }
  878. }
  879. return false;
  880. }
  881. function isSwitchStatement(node, opts) {
  882. if (!node)
  883. return false;
  884. const nodeType = node.type;
  885. if (nodeType === "SwitchStatement") {
  886. if (typeof opts === "undefined") {
  887. return true;
  888. } else {
  889. return (0, _shallowEqual.default)(node, opts);
  890. }
  891. }
  892. return false;
  893. }
  894. function isThisExpression(node, opts) {
  895. if (!node)
  896. return false;
  897. const nodeType = node.type;
  898. if (nodeType === "ThisExpression") {
  899. if (typeof opts === "undefined") {
  900. return true;
  901. } else {
  902. return (0, _shallowEqual.default)(node, opts);
  903. }
  904. }
  905. return false;
  906. }
  907. function isThrowStatement(node, opts) {
  908. if (!node)
  909. return false;
  910. const nodeType = node.type;
  911. if (nodeType === "ThrowStatement") {
  912. if (typeof opts === "undefined") {
  913. return true;
  914. } else {
  915. return (0, _shallowEqual.default)(node, opts);
  916. }
  917. }
  918. return false;
  919. }
  920. function isTryStatement(node, opts) {
  921. if (!node)
  922. return false;
  923. const nodeType = node.type;
  924. if (nodeType === "TryStatement") {
  925. if (typeof opts === "undefined") {
  926. return true;
  927. } else {
  928. return (0, _shallowEqual.default)(node, opts);
  929. }
  930. }
  931. return false;
  932. }
  933. function isUnaryExpression(node, opts) {
  934. if (!node)
  935. return false;
  936. const nodeType = node.type;
  937. if (nodeType === "UnaryExpression") {
  938. if (typeof opts === "undefined") {
  939. return true;
  940. } else {
  941. return (0, _shallowEqual.default)(node, opts);
  942. }
  943. }
  944. return false;
  945. }
  946. function isUpdateExpression(node, opts) {
  947. if (!node)
  948. return false;
  949. const nodeType = node.type;
  950. if (nodeType === "UpdateExpression") {
  951. if (typeof opts === "undefined") {
  952. return true;
  953. } else {
  954. return (0, _shallowEqual.default)(node, opts);
  955. }
  956. }
  957. return false;
  958. }
  959. function isVariableDeclaration(node, opts) {
  960. if (!node)
  961. return false;
  962. const nodeType = node.type;
  963. if (nodeType === "VariableDeclaration") {
  964. if (typeof opts === "undefined") {
  965. return true;
  966. } else {
  967. return (0, _shallowEqual.default)(node, opts);
  968. }
  969. }
  970. return false;
  971. }
  972. function isVariableDeclarator(node, opts) {
  973. if (!node)
  974. return false;
  975. const nodeType = node.type;
  976. if (nodeType === "VariableDeclarator") {
  977. if (typeof opts === "undefined") {
  978. return true;
  979. } else {
  980. return (0, _shallowEqual.default)(node, opts);
  981. }
  982. }
  983. return false;
  984. }
  985. function isWhileStatement(node, opts) {
  986. if (!node)
  987. return false;
  988. const nodeType = node.type;
  989. if (nodeType === "WhileStatement") {
  990. if (typeof opts === "undefined") {
  991. return true;
  992. } else {
  993. return (0, _shallowEqual.default)(node, opts);
  994. }
  995. }
  996. return false;
  997. }
  998. function isWithStatement(node, opts) {
  999. if (!node)
  1000. return false;
  1001. const nodeType = node.type;
  1002. if (nodeType === "WithStatement") {
  1003. if (typeof opts === "undefined") {
  1004. return true;
  1005. } else {
  1006. return (0, _shallowEqual.default)(node, opts);
  1007. }
  1008. }
  1009. return false;
  1010. }
  1011. function isAssignmentPattern(node, opts) {
  1012. if (!node)
  1013. return false;
  1014. const nodeType = node.type;
  1015. if (nodeType === "AssignmentPattern") {
  1016. if (typeof opts === "undefined") {
  1017. return true;
  1018. } else {
  1019. return (0, _shallowEqual.default)(node, opts);
  1020. }
  1021. }
  1022. return false;
  1023. }
  1024. function isArrayPattern(node, opts) {
  1025. if (!node)
  1026. return false;
  1027. const nodeType = node.type;
  1028. if (nodeType === "ArrayPattern") {
  1029. if (typeof opts === "undefined") {
  1030. return true;
  1031. } else {
  1032. return (0, _shallowEqual.default)(node, opts);
  1033. }
  1034. }
  1035. return false;
  1036. }
  1037. function isArrowFunctionExpression(node, opts) {
  1038. if (!node)
  1039. return false;
  1040. const nodeType = node.type;
  1041. if (nodeType === "ArrowFunctionExpression") {
  1042. if (typeof opts === "undefined") {
  1043. return true;
  1044. } else {
  1045. return (0, _shallowEqual.default)(node, opts);
  1046. }
  1047. }
  1048. return false;
  1049. }
  1050. function isClassBody(node, opts) {
  1051. if (!node)
  1052. return false;
  1053. const nodeType = node.type;
  1054. if (nodeType === "ClassBody") {
  1055. if (typeof opts === "undefined") {
  1056. return true;
  1057. } else {
  1058. return (0, _shallowEqual.default)(node, opts);
  1059. }
  1060. }
  1061. return false;
  1062. }
  1063. function isClassExpression(node, opts) {
  1064. if (!node)
  1065. return false;
  1066. const nodeType = node.type;
  1067. if (nodeType === "ClassExpression") {
  1068. if (typeof opts === "undefined") {
  1069. return true;
  1070. } else {
  1071. return (0, _shallowEqual.default)(node, opts);
  1072. }
  1073. }
  1074. return false;
  1075. }
  1076. function isClassDeclaration(node, opts) {
  1077. if (!node)
  1078. return false;
  1079. const nodeType = node.type;
  1080. if (nodeType === "ClassDeclaration") {
  1081. if (typeof opts === "undefined") {
  1082. return true;
  1083. } else {
  1084. return (0, _shallowEqual.default)(node, opts);
  1085. }
  1086. }
  1087. return false;
  1088. }
  1089. function isExportAllDeclaration(node, opts) {
  1090. if (!node)
  1091. return false;
  1092. const nodeType = node.type;
  1093. if (nodeType === "ExportAllDeclaration") {
  1094. if (typeof opts === "undefined") {
  1095. return true;
  1096. } else {
  1097. return (0, _shallowEqual.default)(node, opts);
  1098. }
  1099. }
  1100. return false;
  1101. }
  1102. function isExportDefaultDeclaration(node, opts) {
  1103. if (!node)
  1104. return false;
  1105. const nodeType = node.type;
  1106. if (nodeType === "ExportDefaultDeclaration") {
  1107. if (typeof opts === "undefined") {
  1108. return true;
  1109. } else {
  1110. return (0, _shallowEqual.default)(node, opts);
  1111. }
  1112. }
  1113. return false;
  1114. }
  1115. function isExportNamedDeclaration(node, opts) {
  1116. if (!node)
  1117. return false;
  1118. const nodeType = node.type;
  1119. if (nodeType === "ExportNamedDeclaration") {
  1120. if (typeof opts === "undefined") {
  1121. return true;
  1122. } else {
  1123. return (0, _shallowEqual.default)(node, opts);
  1124. }
  1125. }
  1126. return false;
  1127. }
  1128. function isExportSpecifier(node, opts) {
  1129. if (!node)
  1130. return false;
  1131. const nodeType = node.type;
  1132. if (nodeType === "ExportSpecifier") {
  1133. if (typeof opts === "undefined") {
  1134. return true;
  1135. } else {
  1136. return (0, _shallowEqual.default)(node, opts);
  1137. }
  1138. }
  1139. return false;
  1140. }
  1141. function isForOfStatement(node, opts) {
  1142. if (!node)
  1143. return false;
  1144. const nodeType = node.type;
  1145. if (nodeType === "ForOfStatement") {
  1146. if (typeof opts === "undefined") {
  1147. return true;
  1148. } else {
  1149. return (0, _shallowEqual.default)(node, opts);
  1150. }
  1151. }
  1152. return false;
  1153. }
  1154. function isImportDeclaration(node, opts) {
  1155. if (!node)
  1156. return false;
  1157. const nodeType = node.type;
  1158. if (nodeType === "ImportDeclaration") {
  1159. if (typeof opts === "undefined") {
  1160. return true;
  1161. } else {
  1162. return (0, _shallowEqual.default)(node, opts);
  1163. }
  1164. }
  1165. return false;
  1166. }
  1167. function isImportDefaultSpecifier(node, opts) {
  1168. if (!node)
  1169. return false;
  1170. const nodeType = node.type;
  1171. if (nodeType === "ImportDefaultSpecifier") {
  1172. if (typeof opts === "undefined") {
  1173. return true;
  1174. } else {
  1175. return (0, _shallowEqual.default)(node, opts);
  1176. }
  1177. }
  1178. return false;
  1179. }
  1180. function isImportNamespaceSpecifier(node, opts) {
  1181. if (!node)
  1182. return false;
  1183. const nodeType = node.type;
  1184. if (nodeType === "ImportNamespaceSpecifier") {
  1185. if (typeof opts === "undefined") {
  1186. return true;
  1187. } else {
  1188. return (0, _shallowEqual.default)(node, opts);
  1189. }
  1190. }
  1191. return false;
  1192. }
  1193. function isImportSpecifier(node, opts) {
  1194. if (!node)
  1195. return false;
  1196. const nodeType = node.type;
  1197. if (nodeType === "ImportSpecifier") {
  1198. if (typeof opts === "undefined") {
  1199. return true;
  1200. } else {
  1201. return (0, _shallowEqual.default)(node, opts);
  1202. }
  1203. }
  1204. return false;
  1205. }
  1206. function isMetaProperty(node, opts) {
  1207. if (!node)
  1208. return false;
  1209. const nodeType = node.type;
  1210. if (nodeType === "MetaProperty") {
  1211. if (typeof opts === "undefined") {
  1212. return true;
  1213. } else {
  1214. return (0, _shallowEqual.default)(node, opts);
  1215. }
  1216. }
  1217. return false;
  1218. }
  1219. function isClassMethod(node, opts) {
  1220. if (!node)
  1221. return false;
  1222. const nodeType = node.type;
  1223. if (nodeType === "ClassMethod") {
  1224. if (typeof opts === "undefined") {
  1225. return true;
  1226. } else {
  1227. return (0, _shallowEqual.default)(node, opts);
  1228. }
  1229. }
  1230. return false;
  1231. }
  1232. function isObjectPattern(node, opts) {
  1233. if (!node)
  1234. return false;
  1235. const nodeType = node.type;
  1236. if (nodeType === "ObjectPattern") {
  1237. if (typeof opts === "undefined") {
  1238. return true;
  1239. } else {
  1240. return (0, _shallowEqual.default)(node, opts);
  1241. }
  1242. }
  1243. return false;
  1244. }
  1245. function isSpreadElement(node, opts) {
  1246. if (!node)
  1247. return false;
  1248. const nodeType = node.type;
  1249. if (nodeType === "SpreadElement") {
  1250. if (typeof opts === "undefined") {
  1251. return true;
  1252. } else {
  1253. return (0, _shallowEqual.default)(node, opts);
  1254. }
  1255. }
  1256. return false;
  1257. }
  1258. function isSuper(node, opts) {
  1259. if (!node)
  1260. return false;
  1261. const nodeType = node.type;
  1262. if (nodeType === "Super") {
  1263. if (typeof opts === "undefined") {
  1264. return true;
  1265. } else {
  1266. return (0, _shallowEqual.default)(node, opts);
  1267. }
  1268. }
  1269. return false;
  1270. }
  1271. function isTaggedTemplateExpression(node, opts) {
  1272. if (!node)
  1273. return false;
  1274. const nodeType = node.type;
  1275. if (nodeType === "TaggedTemplateExpression") {
  1276. if (typeof opts === "undefined") {
  1277. return true;
  1278. } else {
  1279. return (0, _shallowEqual.default)(node, opts);
  1280. }
  1281. }
  1282. return false;
  1283. }
  1284. function isTemplateElement(node, opts) {
  1285. if (!node)
  1286. return false;
  1287. const nodeType = node.type;
  1288. if (nodeType === "TemplateElement") {
  1289. if (typeof opts === "undefined") {
  1290. return true;
  1291. } else {
  1292. return (0, _shallowEqual.default)(node, opts);
  1293. }
  1294. }
  1295. return false;
  1296. }
  1297. function isTemplateLiteral(node, opts) {
  1298. if (!node)
  1299. return false;
  1300. const nodeType = node.type;
  1301. if (nodeType === "TemplateLiteral") {
  1302. if (typeof opts === "undefined") {
  1303. return true;
  1304. } else {
  1305. return (0, _shallowEqual.default)(node, opts);
  1306. }
  1307. }
  1308. return false;
  1309. }
  1310. function isYieldExpression(node, opts) {
  1311. if (!node)
  1312. return false;
  1313. const nodeType = node.type;
  1314. if (nodeType === "YieldExpression") {
  1315. if (typeof opts === "undefined") {
  1316. return true;
  1317. } else {
  1318. return (0, _shallowEqual.default)(node, opts);
  1319. }
  1320. }
  1321. return false;
  1322. }
  1323. function isAwaitExpression(node, opts) {
  1324. if (!node)
  1325. return false;
  1326. const nodeType = node.type;
  1327. if (nodeType === "AwaitExpression") {
  1328. if (typeof opts === "undefined") {
  1329. return true;
  1330. } else {
  1331. return (0, _shallowEqual.default)(node, opts);
  1332. }
  1333. }
  1334. return false;
  1335. }
  1336. function isImport(node, opts) {
  1337. if (!node)
  1338. return false;
  1339. const nodeType = node.type;
  1340. if (nodeType === "Import") {
  1341. if (typeof opts === "undefined") {
  1342. return true;
  1343. } else {
  1344. return (0, _shallowEqual.default)(node, opts);
  1345. }
  1346. }
  1347. return false;
  1348. }
  1349. function isBigIntLiteral(node, opts) {
  1350. if (!node)
  1351. return false;
  1352. const nodeType = node.type;
  1353. if (nodeType === "BigIntLiteral") {
  1354. if (typeof opts === "undefined") {
  1355. return true;
  1356. } else {
  1357. return (0, _shallowEqual.default)(node, opts);
  1358. }
  1359. }
  1360. return false;
  1361. }
  1362. function isExportNamespaceSpecifier(node, opts) {
  1363. if (!node)
  1364. return false;
  1365. const nodeType = node.type;
  1366. if (nodeType === "ExportNamespaceSpecifier") {
  1367. if (typeof opts === "undefined") {
  1368. return true;
  1369. } else {
  1370. return (0, _shallowEqual.default)(node, opts);
  1371. }
  1372. }
  1373. return false;
  1374. }
  1375. function isOptionalMemberExpression(node, opts) {
  1376. if (!node)
  1377. return false;
  1378. const nodeType = node.type;
  1379. if (nodeType === "OptionalMemberExpression") {
  1380. if (typeof opts === "undefined") {
  1381. return true;
  1382. } else {
  1383. return (0, _shallowEqual.default)(node, opts);
  1384. }
  1385. }
  1386. return false;
  1387. }
  1388. function isOptionalCallExpression(node, opts) {
  1389. if (!node)
  1390. return false;
  1391. const nodeType = node.type;
  1392. if (nodeType === "OptionalCallExpression") {
  1393. if (typeof opts === "undefined") {
  1394. return true;
  1395. } else {
  1396. return (0, _shallowEqual.default)(node, opts);
  1397. }
  1398. }
  1399. return false;
  1400. }
  1401. function isClassProperty(node, opts) {
  1402. if (!node)
  1403. return false;
  1404. const nodeType = node.type;
  1405. if (nodeType === "ClassProperty") {
  1406. if (typeof opts === "undefined") {
  1407. return true;
  1408. } else {
  1409. return (0, _shallowEqual.default)(node, opts);
  1410. }
  1411. }
  1412. return false;
  1413. }
  1414. function isClassPrivateProperty(node, opts) {
  1415. if (!node)
  1416. return false;
  1417. const nodeType = node.type;
  1418. if (nodeType === "ClassPrivateProperty") {
  1419. if (typeof opts === "undefined") {
  1420. return true;
  1421. } else {
  1422. return (0, _shallowEqual.default)(node, opts);
  1423. }
  1424. }
  1425. return false;
  1426. }
  1427. function isClassPrivateMethod(node, opts) {
  1428. if (!node)
  1429. return false;
  1430. const nodeType = node.type;
  1431. if (nodeType === "ClassPrivateMethod") {
  1432. if (typeof opts === "undefined") {
  1433. return true;
  1434. } else {
  1435. return (0, _shallowEqual.default)(node, opts);
  1436. }
  1437. }
  1438. return false;
  1439. }
  1440. function isPrivateName(node, opts) {
  1441. if (!node)
  1442. return false;
  1443. const nodeType = node.type;
  1444. if (nodeType === "PrivateName") {
  1445. if (typeof opts === "undefined") {
  1446. return true;
  1447. } else {
  1448. return (0, _shallowEqual.default)(node, opts);
  1449. }
  1450. }
  1451. return false;
  1452. }
  1453. function isAnyTypeAnnotation(node, opts) {
  1454. if (!node)
  1455. return false;
  1456. const nodeType = node.type;
  1457. if (nodeType === "AnyTypeAnnotation") {
  1458. if (typeof opts === "undefined") {
  1459. return true;
  1460. } else {
  1461. return (0, _shallowEqual.default)(node, opts);
  1462. }
  1463. }
  1464. return false;
  1465. }
  1466. function isArrayTypeAnnotation(node, opts) {
  1467. if (!node)
  1468. return false;
  1469. const nodeType = node.type;
  1470. if (nodeType === "ArrayTypeAnnotation") {
  1471. if (typeof opts === "undefined") {
  1472. return true;
  1473. } else {
  1474. return (0, _shallowEqual.default)(node, opts);
  1475. }
  1476. }
  1477. return false;
  1478. }
  1479. function isBooleanTypeAnnotation(node, opts) {
  1480. if (!node)
  1481. return false;
  1482. const nodeType = node.type;
  1483. if (nodeType === "BooleanTypeAnnotation") {
  1484. if (typeof opts === "undefined") {
  1485. return true;
  1486. } else {
  1487. return (0, _shallowEqual.default)(node, opts);
  1488. }
  1489. }
  1490. return false;
  1491. }
  1492. function isBooleanLiteralTypeAnnotation(node, opts) {
  1493. if (!node)
  1494. return false;
  1495. const nodeType = node.type;
  1496. if (nodeType === "BooleanLiteralTypeAnnotation") {
  1497. if (typeof opts === "undefined") {
  1498. return true;
  1499. } else {
  1500. return (0, _shallowEqual.default)(node, opts);
  1501. }
  1502. }
  1503. return false;
  1504. }
  1505. function isNullLiteralTypeAnnotation(node, opts) {
  1506. if (!node)
  1507. return false;
  1508. const nodeType = node.type;
  1509. if (nodeType === "NullLiteralTypeAnnotation") {
  1510. if (typeof opts === "undefined") {
  1511. return true;
  1512. } else {
  1513. return (0, _shallowEqual.default)(node, opts);
  1514. }
  1515. }
  1516. return false;
  1517. }
  1518. function isClassImplements(node, opts) {
  1519. if (!node)
  1520. return false;
  1521. const nodeType = node.type;
  1522. if (nodeType === "ClassImplements") {
  1523. if (typeof opts === "undefined") {
  1524. return true;
  1525. } else {
  1526. return (0, _shallowEqual.default)(node, opts);
  1527. }
  1528. }
  1529. return false;
  1530. }
  1531. function isDeclareClass(node, opts) {
  1532. if (!node)
  1533. return false;
  1534. const nodeType = node.type;
  1535. if (nodeType === "DeclareClass") {
  1536. if (typeof opts === "undefined") {
  1537. return true;
  1538. } else {
  1539. return (0, _shallowEqual.default)(node, opts);
  1540. }
  1541. }
  1542. return false;
  1543. }
  1544. function isDeclareFunction(node, opts) {
  1545. if (!node)
  1546. return false;
  1547. const nodeType = node.type;
  1548. if (nodeType === "DeclareFunction") {
  1549. if (typeof opts === "undefined") {
  1550. return true;
  1551. } else {
  1552. return (0, _shallowEqual.default)(node, opts);
  1553. }
  1554. }
  1555. return false;
  1556. }
  1557. function isDeclareInterface(node, opts) {
  1558. if (!node)
  1559. return false;
  1560. const nodeType = node.type;
  1561. if (nodeType === "DeclareInterface") {
  1562. if (typeof opts === "undefined") {
  1563. return true;
  1564. } else {
  1565. return (0, _shallowEqual.default)(node, opts);
  1566. }
  1567. }
  1568. return false;
  1569. }
  1570. function isDeclareModule(node, opts) {
  1571. if (!node)
  1572. return false;
  1573. const nodeType = node.type;
  1574. if (nodeType === "DeclareModule") {
  1575. if (typeof opts === "undefined") {
  1576. return true;
  1577. } else {
  1578. return (0, _shallowEqual.default)(node, opts);
  1579. }
  1580. }
  1581. return false;
  1582. }
  1583. function isDeclareModuleExports(node, opts) {
  1584. if (!node)
  1585. return false;
  1586. const nodeType = node.type;
  1587. if (nodeType === "DeclareModuleExports") {
  1588. if (typeof opts === "undefined") {
  1589. return true;
  1590. } else {
  1591. return (0, _shallowEqual.default)(node, opts);
  1592. }
  1593. }
  1594. return false;
  1595. }
  1596. function isDeclareTypeAlias(node, opts) {
  1597. if (!node)
  1598. return false;
  1599. const nodeType = node.type;
  1600. if (nodeType === "DeclareTypeAlias") {
  1601. if (typeof opts === "undefined") {
  1602. return true;
  1603. } else {
  1604. return (0, _shallowEqual.default)(node, opts);
  1605. }
  1606. }
  1607. return false;
  1608. }
  1609. function isDeclareOpaqueType(node, opts) {
  1610. if (!node)
  1611. return false;
  1612. const nodeType = node.type;
  1613. if (nodeType === "DeclareOpaqueType") {
  1614. if (typeof opts === "undefined") {
  1615. return true;
  1616. } else {
  1617. return (0, _shallowEqual.default)(node, opts);
  1618. }
  1619. }
  1620. return false;
  1621. }
  1622. function isDeclareVariable(node, opts) {
  1623. if (!node)
  1624. return false;
  1625. const nodeType = node.type;
  1626. if (nodeType === "DeclareVariable") {
  1627. if (typeof opts === "undefined") {
  1628. return true;
  1629. } else {
  1630. return (0, _shallowEqual.default)(node, opts);
  1631. }
  1632. }
  1633. return false;
  1634. }
  1635. function isDeclareExportDeclaration(node, opts) {
  1636. if (!node)
  1637. return false;
  1638. const nodeType = node.type;
  1639. if (nodeType === "DeclareExportDeclaration") {
  1640. if (typeof opts === "undefined") {
  1641. return true;
  1642. } else {
  1643. return (0, _shallowEqual.default)(node, opts);
  1644. }
  1645. }
  1646. return false;
  1647. }
  1648. function isDeclareExportAllDeclaration(node, opts) {
  1649. if (!node)
  1650. return false;
  1651. const nodeType = node.type;
  1652. if (nodeType === "DeclareExportAllDeclaration") {
  1653. if (typeof opts === "undefined") {
  1654. return true;
  1655. } else {
  1656. return (0, _shallowEqual.default)(node, opts);
  1657. }
  1658. }
  1659. return false;
  1660. }
  1661. function isDeclaredPredicate(node, opts) {
  1662. if (!node)
  1663. return false;
  1664. const nodeType = node.type;
  1665. if (nodeType === "DeclaredPredicate") {
  1666. if (typeof opts === "undefined") {
  1667. return true;
  1668. } else {
  1669. return (0, _shallowEqual.default)(node, opts);
  1670. }
  1671. }
  1672. return false;
  1673. }
  1674. function isExistsTypeAnnotation(node, opts) {
  1675. if (!node)
  1676. return false;
  1677. const nodeType = node.type;
  1678. if (nodeType === "ExistsTypeAnnotation") {
  1679. if (typeof opts === "undefined") {
  1680. return true;
  1681. } else {
  1682. return (0, _shallowEqual.default)(node, opts);
  1683. }
  1684. }
  1685. return false;
  1686. }
  1687. function isFunctionTypeAnnotation(node, opts) {
  1688. if (!node)
  1689. return false;
  1690. const nodeType = node.type;
  1691. if (nodeType === "FunctionTypeAnnotation") {
  1692. if (typeof opts === "undefined") {
  1693. return true;
  1694. } else {
  1695. return (0, _shallowEqual.default)(node, opts);
  1696. }
  1697. }
  1698. return false;
  1699. }
  1700. function isFunctionTypeParam(node, opts) {
  1701. if (!node)
  1702. return false;
  1703. const nodeType = node.type;
  1704. if (nodeType === "FunctionTypeParam") {
  1705. if (typeof opts === "undefined") {
  1706. return true;
  1707. } else {
  1708. return (0, _shallowEqual.default)(node, opts);
  1709. }
  1710. }
  1711. return false;
  1712. }
  1713. function isGenericTypeAnnotation(node, opts) {
  1714. if (!node)
  1715. return false;
  1716. const nodeType = node.type;
  1717. if (nodeType === "GenericTypeAnnotation") {
  1718. if (typeof opts === "undefined") {
  1719. return true;
  1720. } else {
  1721. return (0, _shallowEqual.default)(node, opts);
  1722. }
  1723. }
  1724. return false;
  1725. }
  1726. function isInferredPredicate(node, opts) {
  1727. if (!node)
  1728. return false;
  1729. const nodeType = node.type;
  1730. if (nodeType === "InferredPredicate") {
  1731. if (typeof opts === "undefined") {
  1732. return true;
  1733. } else {
  1734. return (0, _shallowEqual.default)(node, opts);
  1735. }
  1736. }
  1737. return false;
  1738. }
  1739. function isInterfaceExtends(node, opts) {
  1740. if (!node)
  1741. return false;
  1742. const nodeType = node.type;
  1743. if (nodeType === "InterfaceExtends") {
  1744. if (typeof opts === "undefined") {
  1745. return true;
  1746. } else {
  1747. return (0, _shallowEqual.default)(node, opts);
  1748. }
  1749. }
  1750. return false;
  1751. }
  1752. function isInterfaceDeclaration(node, opts) {
  1753. if (!node)
  1754. return false;
  1755. const nodeType = node.type;
  1756. if (nodeType === "InterfaceDeclaration") {
  1757. if (typeof opts === "undefined") {
  1758. return true;
  1759. } else {
  1760. return (0, _shallowEqual.default)(node, opts);
  1761. }
  1762. }
  1763. return false;
  1764. }
  1765. function isInterfaceTypeAnnotation(node, opts) {
  1766. if (!node)
  1767. return false;
  1768. const nodeType = node.type;
  1769. if (nodeType === "InterfaceTypeAnnotation") {
  1770. if (typeof opts === "undefined") {
  1771. return true;
  1772. } else {
  1773. return (0, _shallowEqual.default)(node, opts);
  1774. }
  1775. }
  1776. return false;
  1777. }
  1778. function isIntersectionTypeAnnotation(node, opts) {
  1779. if (!node)
  1780. return false;
  1781. const nodeType = node.type;
  1782. if (nodeType === "IntersectionTypeAnnotation") {
  1783. if (typeof opts === "undefined") {
  1784. return true;
  1785. } else {
  1786. return (0, _shallowEqual.default)(node, opts);
  1787. }
  1788. }
  1789. return false;
  1790. }
  1791. function isMixedTypeAnnotation(node, opts) {
  1792. if (!node)
  1793. return false;
  1794. const nodeType = node.type;
  1795. if (nodeType === "MixedTypeAnnotation") {
  1796. if (typeof opts === "undefined") {
  1797. return true;
  1798. } else {
  1799. return (0, _shallowEqual.default)(node, opts);
  1800. }
  1801. }
  1802. return false;
  1803. }
  1804. function isEmptyTypeAnnotation(node, opts) {
  1805. if (!node)
  1806. return false;
  1807. const nodeType = node.type;
  1808. if (nodeType === "EmptyTypeAnnotation") {
  1809. if (typeof opts === "undefined") {
  1810. return true;
  1811. } else {
  1812. return (0, _shallowEqual.default)(node, opts);
  1813. }
  1814. }
  1815. return false;
  1816. }
  1817. function isNullableTypeAnnotation(node, opts) {
  1818. if (!node)
  1819. return false;
  1820. const nodeType = node.type;
  1821. if (nodeType === "NullableTypeAnnotation") {
  1822. if (typeof opts === "undefined") {
  1823. return true;
  1824. } else {
  1825. return (0, _shallowEqual.default)(node, opts);
  1826. }
  1827. }
  1828. return false;
  1829. }
  1830. function isNumberLiteralTypeAnnotation(node, opts) {
  1831. if (!node)
  1832. return false;
  1833. const nodeType = node.type;
  1834. if (nodeType === "NumberLiteralTypeAnnotation") {
  1835. if (typeof opts === "undefined") {
  1836. return true;
  1837. } else {
  1838. return (0, _shallowEqual.default)(node, opts);
  1839. }
  1840. }
  1841. return false;
  1842. }
  1843. function isNumberTypeAnnotation(node, opts) {
  1844. if (!node)
  1845. return false;
  1846. const nodeType = node.type;
  1847. if (nodeType === "NumberTypeAnnotation") {
  1848. if (typeof opts === "undefined") {
  1849. return true;
  1850. } else {
  1851. return (0, _shallowEqual.default)(node, opts);
  1852. }
  1853. }
  1854. return false;
  1855. }
  1856. function isObjectTypeAnnotation(node, opts) {
  1857. if (!node)
  1858. return false;
  1859. const nodeType = node.type;
  1860. if (nodeType === "ObjectTypeAnnotation") {
  1861. if (typeof opts === "undefined") {
  1862. return true;
  1863. } else {
  1864. return (0, _shallowEqual.default)(node, opts);
  1865. }
  1866. }
  1867. return false;
  1868. }
  1869. function isObjectTypeInternalSlot(node, opts) {
  1870. if (!node)
  1871. return false;
  1872. const nodeType = node.type;
  1873. if (nodeType === "ObjectTypeInternalSlot") {
  1874. if (typeof opts === "undefined") {
  1875. return true;
  1876. } else {
  1877. return (0, _shallowEqual.default)(node, opts);
  1878. }
  1879. }
  1880. return false;
  1881. }
  1882. function isObjectTypeCallProperty(node, opts) {
  1883. if (!node)
  1884. return false;
  1885. const nodeType = node.type;
  1886. if (nodeType === "ObjectTypeCallProperty") {
  1887. if (typeof opts === "undefined") {
  1888. return true;
  1889. } else {
  1890. return (0, _shallowEqual.default)(node, opts);
  1891. }
  1892. }
  1893. return false;
  1894. }
  1895. function isObjectTypeIndexer(node, opts) {
  1896. if (!node)
  1897. return false;
  1898. const nodeType = node.type;
  1899. if (nodeType === "ObjectTypeIndexer") {
  1900. if (typeof opts === "undefined") {
  1901. return true;
  1902. } else {
  1903. return (0, _shallowEqual.default)(node, opts);
  1904. }
  1905. }
  1906. return false;
  1907. }
  1908. function isObjectTypeProperty(node, opts) {
  1909. if (!node)
  1910. return false;
  1911. const nodeType = node.type;
  1912. if (nodeType === "ObjectTypeProperty") {
  1913. if (typeof opts === "undefined") {
  1914. return true;
  1915. } else {
  1916. return (0, _shallowEqual.default)(node, opts);
  1917. }
  1918. }
  1919. return false;
  1920. }
  1921. function isObjectTypeSpreadProperty(node, opts) {
  1922. if (!node)
  1923. return false;
  1924. const nodeType = node.type;
  1925. if (nodeType === "ObjectTypeSpreadProperty") {
  1926. if (typeof opts === "undefined") {
  1927. return true;
  1928. } else {
  1929. return (0, _shallowEqual.default)(node, opts);
  1930. }
  1931. }
  1932. return false;
  1933. }
  1934. function isOpaqueType(node, opts) {
  1935. if (!node)
  1936. return false;
  1937. const nodeType = node.type;
  1938. if (nodeType === "OpaqueType") {
  1939. if (typeof opts === "undefined") {
  1940. return true;
  1941. } else {
  1942. return (0, _shallowEqual.default)(node, opts);
  1943. }
  1944. }
  1945. return false;
  1946. }
  1947. function isQualifiedTypeIdentifier(node, opts) {
  1948. if (!node)
  1949. return false;
  1950. const nodeType = node.type;
  1951. if (nodeType === "QualifiedTypeIdentifier") {
  1952. if (typeof opts === "undefined") {
  1953. return true;
  1954. } else {
  1955. return (0, _shallowEqual.default)(node, opts);
  1956. }
  1957. }
  1958. return false;
  1959. }
  1960. function isStringLiteralTypeAnnotation(node, opts) {
  1961. if (!node)
  1962. return false;
  1963. const nodeType = node.type;
  1964. if (nodeType === "StringLiteralTypeAnnotation") {
  1965. if (typeof opts === "undefined") {
  1966. return true;
  1967. } else {
  1968. return (0, _shallowEqual.default)(node, opts);
  1969. }
  1970. }
  1971. return false;
  1972. }
  1973. function isStringTypeAnnotation(node, opts) {
  1974. if (!node)
  1975. return false;
  1976. const nodeType = node.type;
  1977. if (nodeType === "StringTypeAnnotation") {
  1978. if (typeof opts === "undefined") {
  1979. return true;
  1980. } else {
  1981. return (0, _shallowEqual.default)(node, opts);
  1982. }
  1983. }
  1984. return false;
  1985. }
  1986. function isSymbolTypeAnnotation(node, opts) {
  1987. if (!node)
  1988. return false;
  1989. const nodeType = node.type;
  1990. if (nodeType === "SymbolTypeAnnotation") {
  1991. if (typeof opts === "undefined") {
  1992. return true;
  1993. } else {
  1994. return (0, _shallowEqual.default)(node, opts);
  1995. }
  1996. }
  1997. return false;
  1998. }
  1999. function isThisTypeAnnotation(node, opts) {
  2000. if (!node)
  2001. return false;
  2002. const nodeType = node.type;
  2003. if (nodeType === "ThisTypeAnnotation") {
  2004. if (typeof opts === "undefined") {
  2005. return true;
  2006. } else {
  2007. return (0, _shallowEqual.default)(node, opts);
  2008. }
  2009. }
  2010. return false;
  2011. }
  2012. function isTupleTypeAnnotation(node, opts) {
  2013. if (!node)
  2014. return false;
  2015. const nodeType = node.type;
  2016. if (nodeType === "TupleTypeAnnotation") {
  2017. if (typeof opts === "undefined") {
  2018. return true;
  2019. } else {
  2020. return (0, _shallowEqual.default)(node, opts);
  2021. }
  2022. }
  2023. return false;
  2024. }
  2025. function isTypeofTypeAnnotation(node, opts) {
  2026. if (!node)
  2027. return false;
  2028. const nodeType = node.type;
  2029. if (nodeType === "TypeofTypeAnnotation") {
  2030. if (typeof opts === "undefined") {
  2031. return true;
  2032. } else {
  2033. return (0, _shallowEqual.default)(node, opts);
  2034. }
  2035. }
  2036. return false;
  2037. }
  2038. function isTypeAlias(node, opts) {
  2039. if (!node)
  2040. return false;
  2041. const nodeType = node.type;
  2042. if (nodeType === "TypeAlias") {
  2043. if (typeof opts === "undefined") {
  2044. return true;
  2045. } else {
  2046. return (0, _shallowEqual.default)(node, opts);
  2047. }
  2048. }
  2049. return false;
  2050. }
  2051. function isTypeAnnotation(node, opts) {
  2052. if (!node)
  2053. return false;
  2054. const nodeType = node.type;
  2055. if (nodeType === "TypeAnnotation") {
  2056. if (typeof opts === "undefined") {
  2057. return true;
  2058. } else {
  2059. return (0, _shallowEqual.default)(node, opts);
  2060. }
  2061. }
  2062. return false;
  2063. }
  2064. function isTypeCastExpression(node, opts) {
  2065. if (!node)
  2066. return false;
  2067. const nodeType = node.type;
  2068. if (nodeType === "TypeCastExpression") {
  2069. if (typeof opts === "undefined") {
  2070. return true;
  2071. } else {
  2072. return (0, _shallowEqual.default)(node, opts);
  2073. }
  2074. }
  2075. return false;
  2076. }
  2077. function isTypeParameter(node, opts) {
  2078. if (!node)
  2079. return false;
  2080. const nodeType = node.type;
  2081. if (nodeType === "TypeParameter") {
  2082. if (typeof opts === "undefined") {
  2083. return true;
  2084. } else {
  2085. return (0, _shallowEqual.default)(node, opts);
  2086. }
  2087. }
  2088. return false;
  2089. }
  2090. function isTypeParameterDeclaration(node, opts) {
  2091. if (!node)
  2092. return false;
  2093. const nodeType = node.type;
  2094. if (nodeType === "TypeParameterDeclaration") {
  2095. if (typeof opts === "undefined") {
  2096. return true;
  2097. } else {
  2098. return (0, _shallowEqual.default)(node, opts);
  2099. }
  2100. }
  2101. return false;
  2102. }
  2103. function isTypeParameterInstantiation(node, opts) {
  2104. if (!node)
  2105. return false;
  2106. const nodeType = node.type;
  2107. if (nodeType === "TypeParameterInstantiation") {
  2108. if (typeof opts === "undefined") {
  2109. return true;
  2110. } else {
  2111. return (0, _shallowEqual.default)(node, opts);
  2112. }
  2113. }
  2114. return false;
  2115. }
  2116. function isUnionTypeAnnotation(node, opts) {
  2117. if (!node)
  2118. return false;
  2119. const nodeType = node.type;
  2120. if (nodeType === "UnionTypeAnnotation") {
  2121. if (typeof opts === "undefined") {
  2122. return true;
  2123. } else {
  2124. return (0, _shallowEqual.default)(node, opts);
  2125. }
  2126. }
  2127. return false;
  2128. }
  2129. function isVariance(node, opts) {
  2130. if (!node)
  2131. return false;
  2132. const nodeType = node.type;
  2133. if (nodeType === "Variance") {
  2134. if (typeof opts === "undefined") {
  2135. return true;
  2136. } else {
  2137. return (0, _shallowEqual.default)(node, opts);
  2138. }
  2139. }
  2140. return false;
  2141. }
  2142. function isVoidTypeAnnotation(node, opts) {
  2143. if (!node)
  2144. return false;
  2145. const nodeType = node.type;
  2146. if (nodeType === "VoidTypeAnnotation") {
  2147. if (typeof opts === "undefined") {
  2148. return true;
  2149. } else {
  2150. return (0, _shallowEqual.default)(node, opts);
  2151. }
  2152. }
  2153. return false;
  2154. }
  2155. function isEnumDeclaration(node, opts) {
  2156. if (!node)
  2157. return false;
  2158. const nodeType = node.type;
  2159. if (nodeType === "EnumDeclaration") {
  2160. if (typeof opts === "undefined") {
  2161. return true;
  2162. } else {
  2163. return (0, _shallowEqual.default)(node, opts);
  2164. }
  2165. }
  2166. return false;
  2167. }
  2168. function isEnumBooleanBody(node, opts) {
  2169. if (!node)
  2170. return false;
  2171. const nodeType = node.type;
  2172. if (nodeType === "EnumBooleanBody") {
  2173. if (typeof opts === "undefined") {
  2174. return true;
  2175. } else {
  2176. return (0, _shallowEqual.default)(node, opts);
  2177. }
  2178. }
  2179. return false;
  2180. }
  2181. function isEnumNumberBody(node, opts) {
  2182. if (!node)
  2183. return false;
  2184. const nodeType = node.type;
  2185. if (nodeType === "EnumNumberBody") {
  2186. if (typeof opts === "undefined") {
  2187. return true;
  2188. } else {
  2189. return (0, _shallowEqual.default)(node, opts);
  2190. }
  2191. }
  2192. return false;
  2193. }
  2194. function isEnumStringBody(node, opts) {
  2195. if (!node)
  2196. return false;
  2197. const nodeType = node.type;
  2198. if (nodeType === "EnumStringBody") {
  2199. if (typeof opts === "undefined") {
  2200. return true;
  2201. } else {
  2202. return (0, _shallowEqual.default)(node, opts);
  2203. }
  2204. }
  2205. return false;
  2206. }
  2207. function isEnumSymbolBody(node, opts) {
  2208. if (!node)
  2209. return false;
  2210. const nodeType = node.type;
  2211. if (nodeType === "EnumSymbolBody") {
  2212. if (typeof opts === "undefined") {
  2213. return true;
  2214. } else {
  2215. return (0, _shallowEqual.default)(node, opts);
  2216. }
  2217. }
  2218. return false;
  2219. }
  2220. function isEnumBooleanMember(node, opts) {
  2221. if (!node)
  2222. return false;
  2223. const nodeType = node.type;
  2224. if (nodeType === "EnumBooleanMember") {
  2225. if (typeof opts === "undefined") {
  2226. return true;
  2227. } else {
  2228. return (0, _shallowEqual.default)(node, opts);
  2229. }
  2230. }
  2231. return false;
  2232. }
  2233. function isEnumNumberMember(node, opts) {
  2234. if (!node)
  2235. return false;
  2236. const nodeType = node.type;
  2237. if (nodeType === "EnumNumberMember") {
  2238. if (typeof opts === "undefined") {
  2239. return true;
  2240. } else {
  2241. return (0, _shallowEqual.default)(node, opts);
  2242. }
  2243. }
  2244. return false;
  2245. }
  2246. function isEnumStringMember(node, opts) {
  2247. if (!node)
  2248. return false;
  2249. const nodeType = node.type;
  2250. if (nodeType === "EnumStringMember") {
  2251. if (typeof opts === "undefined") {
  2252. return true;
  2253. } else {
  2254. return (0, _shallowEqual.default)(node, opts);
  2255. }
  2256. }
  2257. return false;
  2258. }
  2259. function isEnumDefaultedMember(node, opts) {
  2260. if (!node)
  2261. return false;
  2262. const nodeType = node.type;
  2263. if (nodeType === "EnumDefaultedMember") {
  2264. if (typeof opts === "undefined") {
  2265. return true;
  2266. } else {
  2267. return (0, _shallowEqual.default)(node, opts);
  2268. }
  2269. }
  2270. return false;
  2271. }
  2272. function isIndexedAccessType(node, opts) {
  2273. if (!node)
  2274. return false;
  2275. const nodeType = node.type;
  2276. if (nodeType === "IndexedAccessType") {
  2277. if (typeof opts === "undefined") {
  2278. return true;
  2279. } else {
  2280. return (0, _shallowEqual.default)(node, opts);
  2281. }
  2282. }
  2283. return false;
  2284. }
  2285. function isOptionalIndexedAccessType(node, opts) {
  2286. if (!node)
  2287. return false;
  2288. const nodeType = node.type;
  2289. if (nodeType === "OptionalIndexedAccessType") {
  2290. if (typeof opts === "undefined") {
  2291. return true;
  2292. } else {
  2293. return (0, _shallowEqual.default)(node, opts);
  2294. }
  2295. }
  2296. return false;
  2297. }
  2298. function isJSXAttribute(node, opts) {
  2299. if (!node)
  2300. return false;
  2301. const nodeType = node.type;
  2302. if (nodeType === "JSXAttribute") {
  2303. if (typeof opts === "undefined") {
  2304. return true;
  2305. } else {
  2306. return (0, _shallowEqual.default)(node, opts);
  2307. }
  2308. }
  2309. return false;
  2310. }
  2311. function isJSXClosingElement(node, opts) {
  2312. if (!node)
  2313. return false;
  2314. const nodeType = node.type;
  2315. if (nodeType === "JSXClosingElement") {
  2316. if (typeof opts === "undefined") {
  2317. return true;
  2318. } else {
  2319. return (0, _shallowEqual.default)(node, opts);
  2320. }
  2321. }
  2322. return false;
  2323. }
  2324. function isJSXElement2(node, opts) {
  2325. if (!node)
  2326. return false;
  2327. const nodeType = node.type;
  2328. if (nodeType === "JSXElement") {
  2329. if (typeof opts === "undefined") {
  2330. return true;
  2331. } else {
  2332. return (0, _shallowEqual.default)(node, opts);
  2333. }
  2334. }
  2335. return false;
  2336. }
  2337. function isJSXEmptyExpression(node, opts) {
  2338. if (!node)
  2339. return false;
  2340. const nodeType = node.type;
  2341. if (nodeType === "JSXEmptyExpression") {
  2342. if (typeof opts === "undefined") {
  2343. return true;
  2344. } else {
  2345. return (0, _shallowEqual.default)(node, opts);
  2346. }
  2347. }
  2348. return false;
  2349. }
  2350. function isJSXExpressionContainer2(node, opts) {
  2351. if (!node)
  2352. return false;
  2353. const nodeType = node.type;
  2354. if (nodeType === "JSXExpressionContainer") {
  2355. if (typeof opts === "undefined") {
  2356. return true;
  2357. } else {
  2358. return (0, _shallowEqual.default)(node, opts);
  2359. }
  2360. }
  2361. return false;
  2362. }
  2363. function isJSXSpreadChild(node, opts) {
  2364. if (!node)
  2365. return false;
  2366. const nodeType = node.type;
  2367. if (nodeType === "JSXSpreadChild") {
  2368. if (typeof opts === "undefined") {
  2369. return true;
  2370. } else {
  2371. return (0, _shallowEqual.default)(node, opts);
  2372. }
  2373. }
  2374. return false;
  2375. }
  2376. function isJSXIdentifier2(node, opts) {
  2377. if (!node)
  2378. return false;
  2379. const nodeType = node.type;
  2380. if (nodeType === "JSXIdentifier") {
  2381. if (typeof opts === "undefined") {
  2382. return true;
  2383. } else {
  2384. return (0, _shallowEqual.default)(node, opts);
  2385. }
  2386. }
  2387. return false;
  2388. }
  2389. function isJSXMemberExpression(node, opts) {
  2390. if (!node)
  2391. return false;
  2392. const nodeType = node.type;
  2393. if (nodeType === "JSXMemberExpression") {
  2394. if (typeof opts === "undefined") {
  2395. return true;
  2396. } else {
  2397. return (0, _shallowEqual.default)(node, opts);
  2398. }
  2399. }
  2400. return false;
  2401. }
  2402. function isJSXNamespacedName(node, opts) {
  2403. if (!node)
  2404. return false;
  2405. const nodeType = node.type;
  2406. if (nodeType === "JSXNamespacedName") {
  2407. if (typeof opts === "undefined") {
  2408. return true;
  2409. } else {
  2410. return (0, _shallowEqual.default)(node, opts);
  2411. }
  2412. }
  2413. return false;
  2414. }
  2415. function isJSXOpeningElement(node, opts) {
  2416. if (!node)
  2417. return false;
  2418. const nodeType = node.type;
  2419. if (nodeType === "JSXOpeningElement") {
  2420. if (typeof opts === "undefined") {
  2421. return true;
  2422. } else {
  2423. return (0, _shallowEqual.default)(node, opts);
  2424. }
  2425. }
  2426. return false;
  2427. }
  2428. function isJSXSpreadAttribute(node, opts) {
  2429. if (!node)
  2430. return false;
  2431. const nodeType = node.type;
  2432. if (nodeType === "JSXSpreadAttribute") {
  2433. if (typeof opts === "undefined") {
  2434. return true;
  2435. } else {
  2436. return (0, _shallowEqual.default)(node, opts);
  2437. }
  2438. }
  2439. return false;
  2440. }
  2441. function isJSXText(node, opts) {
  2442. if (!node)
  2443. return false;
  2444. const nodeType = node.type;
  2445. if (nodeType === "JSXText") {
  2446. if (typeof opts === "undefined") {
  2447. return true;
  2448. } else {
  2449. return (0, _shallowEqual.default)(node, opts);
  2450. }
  2451. }
  2452. return false;
  2453. }
  2454. function isJSXFragment2(node, opts) {
  2455. if (!node)
  2456. return false;
  2457. const nodeType = node.type;
  2458. if (nodeType === "JSXFragment") {
  2459. if (typeof opts === "undefined") {
  2460. return true;
  2461. } else {
  2462. return (0, _shallowEqual.default)(node, opts);
  2463. }
  2464. }
  2465. return false;
  2466. }
  2467. function isJSXOpeningFragment(node, opts) {
  2468. if (!node)
  2469. return false;
  2470. const nodeType = node.type;
  2471. if (nodeType === "JSXOpeningFragment") {
  2472. if (typeof opts === "undefined") {
  2473. return true;
  2474. } else {
  2475. return (0, _shallowEqual.default)(node, opts);
  2476. }
  2477. }
  2478. return false;
  2479. }
  2480. function isJSXClosingFragment(node, opts) {
  2481. if (!node)
  2482. return false;
  2483. const nodeType = node.type;
  2484. if (nodeType === "JSXClosingFragment") {
  2485. if (typeof opts === "undefined") {
  2486. return true;
  2487. } else {
  2488. return (0, _shallowEqual.default)(node, opts);
  2489. }
  2490. }
  2491. return false;
  2492. }
  2493. function isNoop(node, opts) {
  2494. if (!node)
  2495. return false;
  2496. const nodeType = node.type;
  2497. if (nodeType === "Noop") {
  2498. if (typeof opts === "undefined") {
  2499. return true;
  2500. } else {
  2501. return (0, _shallowEqual.default)(node, opts);
  2502. }
  2503. }
  2504. return false;
  2505. }
  2506. function isPlaceholder(node, opts) {
  2507. if (!node)
  2508. return false;
  2509. const nodeType = node.type;
  2510. if (nodeType === "Placeholder") {
  2511. if (typeof opts === "undefined") {
  2512. return true;
  2513. } else {
  2514. return (0, _shallowEqual.default)(node, opts);
  2515. }
  2516. }
  2517. return false;
  2518. }
  2519. function isV8IntrinsicIdentifier(node, opts) {
  2520. if (!node)
  2521. return false;
  2522. const nodeType = node.type;
  2523. if (nodeType === "V8IntrinsicIdentifier") {
  2524. if (typeof opts === "undefined") {
  2525. return true;
  2526. } else {
  2527. return (0, _shallowEqual.default)(node, opts);
  2528. }
  2529. }
  2530. return false;
  2531. }
  2532. function isArgumentPlaceholder(node, opts) {
  2533. if (!node)
  2534. return false;
  2535. const nodeType = node.type;
  2536. if (nodeType === "ArgumentPlaceholder") {
  2537. if (typeof opts === "undefined") {
  2538. return true;
  2539. } else {
  2540. return (0, _shallowEqual.default)(node, opts);
  2541. }
  2542. }
  2543. return false;
  2544. }
  2545. function isBindExpression(node, opts) {
  2546. if (!node)
  2547. return false;
  2548. const nodeType = node.type;
  2549. if (nodeType === "BindExpression") {
  2550. if (typeof opts === "undefined") {
  2551. return true;
  2552. } else {
  2553. return (0, _shallowEqual.default)(node, opts);
  2554. }
  2555. }
  2556. return false;
  2557. }
  2558. function isPipelineTopicExpression(node, opts) {
  2559. if (!node)
  2560. return false;
  2561. const nodeType = node.type;
  2562. if (nodeType === "PipelineTopicExpression") {
  2563. if (typeof opts === "undefined") {
  2564. return true;
  2565. } else {
  2566. return (0, _shallowEqual.default)(node, opts);
  2567. }
  2568. }
  2569. return false;
  2570. }
  2571. function isPipelineBareFunction(node, opts) {
  2572. if (!node)
  2573. return false;
  2574. const nodeType = node.type;
  2575. if (nodeType === "PipelineBareFunction") {
  2576. if (typeof opts === "undefined") {
  2577. return true;
  2578. } else {
  2579. return (0, _shallowEqual.default)(node, opts);
  2580. }
  2581. }
  2582. return false;
  2583. }
  2584. function isPipelinePrimaryTopicReference(node, opts) {
  2585. if (!node)
  2586. return false;
  2587. const nodeType = node.type;
  2588. if (nodeType === "PipelinePrimaryTopicReference") {
  2589. if (typeof opts === "undefined") {
  2590. return true;
  2591. } else {
  2592. return (0, _shallowEqual.default)(node, opts);
  2593. }
  2594. }
  2595. return false;
  2596. }
  2597. function isImportAttribute(node, opts) {
  2598. if (!node)
  2599. return false;
  2600. const nodeType = node.type;
  2601. if (nodeType === "ImportAttribute") {
  2602. if (typeof opts === "undefined") {
  2603. return true;
  2604. } else {
  2605. return (0, _shallowEqual.default)(node, opts);
  2606. }
  2607. }
  2608. return false;
  2609. }
  2610. function isDecorator(node, opts) {
  2611. if (!node)
  2612. return false;
  2613. const nodeType = node.type;
  2614. if (nodeType === "Decorator") {
  2615. if (typeof opts === "undefined") {
  2616. return true;
  2617. } else {
  2618. return (0, _shallowEqual.default)(node, opts);
  2619. }
  2620. }
  2621. return false;
  2622. }
  2623. function isDoExpression(node, opts) {
  2624. if (!node)
  2625. return false;
  2626. const nodeType = node.type;
  2627. if (nodeType === "DoExpression") {
  2628. if (typeof opts === "undefined") {
  2629. return true;
  2630. } else {
  2631. return (0, _shallowEqual.default)(node, opts);
  2632. }
  2633. }
  2634. return false;
  2635. }
  2636. function isExportDefaultSpecifier(node, opts) {
  2637. if (!node)
  2638. return false;
  2639. const nodeType = node.type;
  2640. if (nodeType === "ExportDefaultSpecifier") {
  2641. if (typeof opts === "undefined") {
  2642. return true;
  2643. } else {
  2644. return (0, _shallowEqual.default)(node, opts);
  2645. }
  2646. }
  2647. return false;
  2648. }
  2649. function isRecordExpression(node, opts) {
  2650. if (!node)
  2651. return false;
  2652. const nodeType = node.type;
  2653. if (nodeType === "RecordExpression") {
  2654. if (typeof opts === "undefined") {
  2655. return true;
  2656. } else {
  2657. return (0, _shallowEqual.default)(node, opts);
  2658. }
  2659. }
  2660. return false;
  2661. }
  2662. function isTupleExpression(node, opts) {
  2663. if (!node)
  2664. return false;
  2665. const nodeType = node.type;
  2666. if (nodeType === "TupleExpression") {
  2667. if (typeof opts === "undefined") {
  2668. return true;
  2669. } else {
  2670. return (0, _shallowEqual.default)(node, opts);
  2671. }
  2672. }
  2673. return false;
  2674. }
  2675. function isDecimalLiteral(node, opts) {
  2676. if (!node)
  2677. return false;
  2678. const nodeType = node.type;
  2679. if (nodeType === "DecimalLiteral") {
  2680. if (typeof opts === "undefined") {
  2681. return true;
  2682. } else {
  2683. return (0, _shallowEqual.default)(node, opts);
  2684. }
  2685. }
  2686. return false;
  2687. }
  2688. function isStaticBlock(node, opts) {
  2689. if (!node)
  2690. return false;
  2691. const nodeType = node.type;
  2692. if (nodeType === "StaticBlock") {
  2693. if (typeof opts === "undefined") {
  2694. return true;
  2695. } else {
  2696. return (0, _shallowEqual.default)(node, opts);
  2697. }
  2698. }
  2699. return false;
  2700. }
  2701. function isModuleExpression(node, opts) {
  2702. if (!node)
  2703. return false;
  2704. const nodeType = node.type;
  2705. if (nodeType === "ModuleExpression") {
  2706. if (typeof opts === "undefined") {
  2707. return true;
  2708. } else {
  2709. return (0, _shallowEqual.default)(node, opts);
  2710. }
  2711. }
  2712. return false;
  2713. }
  2714. function isTSParameterProperty(node, opts) {
  2715. if (!node)
  2716. return false;
  2717. const nodeType = node.type;
  2718. if (nodeType === "TSParameterProperty") {
  2719. if (typeof opts === "undefined") {
  2720. return true;
  2721. } else {
  2722. return (0, _shallowEqual.default)(node, opts);
  2723. }
  2724. }
  2725. return false;
  2726. }
  2727. function isTSDeclareFunction(node, opts) {
  2728. if (!node)
  2729. return false;
  2730. const nodeType = node.type;
  2731. if (nodeType === "TSDeclareFunction") {
  2732. if (typeof opts === "undefined") {
  2733. return true;
  2734. } else {
  2735. return (0, _shallowEqual.default)(node, opts);
  2736. }
  2737. }
  2738. return false;
  2739. }
  2740. function isTSDeclareMethod(node, opts) {
  2741. if (!node)
  2742. return false;
  2743. const nodeType = node.type;
  2744. if (nodeType === "TSDeclareMethod") {
  2745. if (typeof opts === "undefined") {
  2746. return true;
  2747. } else {
  2748. return (0, _shallowEqual.default)(node, opts);
  2749. }
  2750. }
  2751. return false;
  2752. }
  2753. function isTSQualifiedName(node, opts) {
  2754. if (!node)
  2755. return false;
  2756. const nodeType = node.type;
  2757. if (nodeType === "TSQualifiedName") {
  2758. if (typeof opts === "undefined") {
  2759. return true;
  2760. } else {
  2761. return (0, _shallowEqual.default)(node, opts);
  2762. }
  2763. }
  2764. return false;
  2765. }
  2766. function isTSCallSignatureDeclaration(node, opts) {
  2767. if (!node)
  2768. return false;
  2769. const nodeType = node.type;
  2770. if (nodeType === "TSCallSignatureDeclaration") {
  2771. if (typeof opts === "undefined") {
  2772. return true;
  2773. } else {
  2774. return (0, _shallowEqual.default)(node, opts);
  2775. }
  2776. }
  2777. return false;
  2778. }
  2779. function isTSConstructSignatureDeclaration(node, opts) {
  2780. if (!node)
  2781. return false;
  2782. const nodeType = node.type;
  2783. if (nodeType === "TSConstructSignatureDeclaration") {
  2784. if (typeof opts === "undefined") {
  2785. return true;
  2786. } else {
  2787. return (0, _shallowEqual.default)(node, opts);
  2788. }
  2789. }
  2790. return false;
  2791. }
  2792. function isTSPropertySignature(node, opts) {
  2793. if (!node)
  2794. return false;
  2795. const nodeType = node.type;
  2796. if (nodeType === "TSPropertySignature") {
  2797. if (typeof opts === "undefined") {
  2798. return true;
  2799. } else {
  2800. return (0, _shallowEqual.default)(node, opts);
  2801. }
  2802. }
  2803. return false;
  2804. }
  2805. function isTSMethodSignature(node, opts) {
  2806. if (!node)
  2807. return false;
  2808. const nodeType = node.type;
  2809. if (nodeType === "TSMethodSignature") {
  2810. if (typeof opts === "undefined") {
  2811. return true;
  2812. } else {
  2813. return (0, _shallowEqual.default)(node, opts);
  2814. }
  2815. }
  2816. return false;
  2817. }
  2818. function isTSIndexSignature(node, opts) {
  2819. if (!node)
  2820. return false;
  2821. const nodeType = node.type;
  2822. if (nodeType === "TSIndexSignature") {
  2823. if (typeof opts === "undefined") {
  2824. return true;
  2825. } else {
  2826. return (0, _shallowEqual.default)(node, opts);
  2827. }
  2828. }
  2829. return false;
  2830. }
  2831. function isTSAnyKeyword(node, opts) {
  2832. if (!node)
  2833. return false;
  2834. const nodeType = node.type;
  2835. if (nodeType === "TSAnyKeyword") {
  2836. if (typeof opts === "undefined") {
  2837. return true;
  2838. } else {
  2839. return (0, _shallowEqual.default)(node, opts);
  2840. }
  2841. }
  2842. return false;
  2843. }
  2844. function isTSBooleanKeyword(node, opts) {
  2845. if (!node)
  2846. return false;
  2847. const nodeType = node.type;
  2848. if (nodeType === "TSBooleanKeyword") {
  2849. if (typeof opts === "undefined") {
  2850. return true;
  2851. } else {
  2852. return (0, _shallowEqual.default)(node, opts);
  2853. }
  2854. }
  2855. return false;
  2856. }
  2857. function isTSBigIntKeyword(node, opts) {
  2858. if (!node)
  2859. return false;
  2860. const nodeType = node.type;
  2861. if (nodeType === "TSBigIntKeyword") {
  2862. if (typeof opts === "undefined") {
  2863. return true;
  2864. } else {
  2865. return (0, _shallowEqual.default)(node, opts);
  2866. }
  2867. }
  2868. return false;
  2869. }
  2870. function isTSIntrinsicKeyword(node, opts) {
  2871. if (!node)
  2872. return false;
  2873. const nodeType = node.type;
  2874. if (nodeType === "TSIntrinsicKeyword") {
  2875. if (typeof opts === "undefined") {
  2876. return true;
  2877. } else {
  2878. return (0, _shallowEqual.default)(node, opts);
  2879. }
  2880. }
  2881. return false;
  2882. }
  2883. function isTSNeverKeyword(node, opts) {
  2884. if (!node)
  2885. return false;
  2886. const nodeType = node.type;
  2887. if (nodeType === "TSNeverKeyword") {
  2888. if (typeof opts === "undefined") {
  2889. return true;
  2890. } else {
  2891. return (0, _shallowEqual.default)(node, opts);
  2892. }
  2893. }
  2894. return false;
  2895. }
  2896. function isTSNullKeyword(node, opts) {
  2897. if (!node)
  2898. return false;
  2899. const nodeType = node.type;
  2900. if (nodeType === "TSNullKeyword") {
  2901. if (typeof opts === "undefined") {
  2902. return true;
  2903. } else {
  2904. return (0, _shallowEqual.default)(node, opts);
  2905. }
  2906. }
  2907. return false;
  2908. }
  2909. function isTSNumberKeyword(node, opts) {
  2910. if (!node)
  2911. return false;
  2912. const nodeType = node.type;
  2913. if (nodeType === "TSNumberKeyword") {
  2914. if (typeof opts === "undefined") {
  2915. return true;
  2916. } else {
  2917. return (0, _shallowEqual.default)(node, opts);
  2918. }
  2919. }
  2920. return false;
  2921. }
  2922. function isTSObjectKeyword(node, opts) {
  2923. if (!node)
  2924. return false;
  2925. const nodeType = node.type;
  2926. if (nodeType === "TSObjectKeyword") {
  2927. if (typeof opts === "undefined") {
  2928. return true;
  2929. } else {
  2930. return (0, _shallowEqual.default)(node, opts);
  2931. }
  2932. }
  2933. return false;
  2934. }
  2935. function isTSStringKeyword(node, opts) {
  2936. if (!node)
  2937. return false;
  2938. const nodeType = node.type;
  2939. if (nodeType === "TSStringKeyword") {
  2940. if (typeof opts === "undefined") {
  2941. return true;
  2942. } else {
  2943. return (0, _shallowEqual.default)(node, opts);
  2944. }
  2945. }
  2946. return false;
  2947. }
  2948. function isTSSymbolKeyword(node, opts) {
  2949. if (!node)
  2950. return false;
  2951. const nodeType = node.type;
  2952. if (nodeType === "TSSymbolKeyword") {
  2953. if (typeof opts === "undefined") {
  2954. return true;
  2955. } else {
  2956. return (0, _shallowEqual.default)(node, opts);
  2957. }
  2958. }
  2959. return false;
  2960. }
  2961. function isTSUndefinedKeyword(node, opts) {
  2962. if (!node)
  2963. return false;
  2964. const nodeType = node.type;
  2965. if (nodeType === "TSUndefinedKeyword") {
  2966. if (typeof opts === "undefined") {
  2967. return true;
  2968. } else {
  2969. return (0, _shallowEqual.default)(node, opts);
  2970. }
  2971. }
  2972. return false;
  2973. }
  2974. function isTSUnknownKeyword(node, opts) {
  2975. if (!node)
  2976. return false;
  2977. const nodeType = node.type;
  2978. if (nodeType === "TSUnknownKeyword") {
  2979. if (typeof opts === "undefined") {
  2980. return true;
  2981. } else {
  2982. return (0, _shallowEqual.default)(node, opts);
  2983. }
  2984. }
  2985. return false;
  2986. }
  2987. function isTSVoidKeyword(node, opts) {
  2988. if (!node)
  2989. return false;
  2990. const nodeType = node.type;
  2991. if (nodeType === "TSVoidKeyword") {
  2992. if (typeof opts === "undefined") {
  2993. return true;
  2994. } else {
  2995. return (0, _shallowEqual.default)(node, opts);
  2996. }
  2997. }
  2998. return false;
  2999. }
  3000. function isTSThisType(node, opts) {
  3001. if (!node)
  3002. return false;
  3003. const nodeType = node.type;
  3004. if (nodeType === "TSThisType") {
  3005. if (typeof opts === "undefined") {
  3006. return true;
  3007. } else {
  3008. return (0, _shallowEqual.default)(node, opts);
  3009. }
  3010. }
  3011. return false;
  3012. }
  3013. function isTSFunctionType(node, opts) {
  3014. if (!node)
  3015. return false;
  3016. const nodeType = node.type;
  3017. if (nodeType === "TSFunctionType") {
  3018. if (typeof opts === "undefined") {
  3019. return true;
  3020. } else {
  3021. return (0, _shallowEqual.default)(node, opts);
  3022. }
  3023. }
  3024. return false;
  3025. }
  3026. function isTSConstructorType(node, opts) {
  3027. if (!node)
  3028. return false;
  3029. const nodeType = node.type;
  3030. if (nodeType === "TSConstructorType") {
  3031. if (typeof opts === "undefined") {
  3032. return true;
  3033. } else {
  3034. return (0, _shallowEqual.default)(node, opts);
  3035. }
  3036. }
  3037. return false;
  3038. }
  3039. function isTSTypeReference(node, opts) {
  3040. if (!node)
  3041. return false;
  3042. const nodeType = node.type;
  3043. if (nodeType === "TSTypeReference") {
  3044. if (typeof opts === "undefined") {
  3045. return true;
  3046. } else {
  3047. return (0, _shallowEqual.default)(node, opts);
  3048. }
  3049. }
  3050. return false;
  3051. }
  3052. function isTSTypePredicate(node, opts) {
  3053. if (!node)
  3054. return false;
  3055. const nodeType = node.type;
  3056. if (nodeType === "TSTypePredicate") {
  3057. if (typeof opts === "undefined") {
  3058. return true;
  3059. } else {
  3060. return (0, _shallowEqual.default)(node, opts);
  3061. }
  3062. }
  3063. return false;
  3064. }
  3065. function isTSTypeQuery(node, opts) {
  3066. if (!node)
  3067. return false;
  3068. const nodeType = node.type;
  3069. if (nodeType === "TSTypeQuery") {
  3070. if (typeof opts === "undefined") {
  3071. return true;
  3072. } else {
  3073. return (0, _shallowEqual.default)(node, opts);
  3074. }
  3075. }
  3076. return false;
  3077. }
  3078. function isTSTypeLiteral(node, opts) {
  3079. if (!node)
  3080. return false;
  3081. const nodeType = node.type;
  3082. if (nodeType === "TSTypeLiteral") {
  3083. if (typeof opts === "undefined") {
  3084. return true;
  3085. } else {
  3086. return (0, _shallowEqual.default)(node, opts);
  3087. }
  3088. }
  3089. return false;
  3090. }
  3091. function isTSArrayType(node, opts) {
  3092. if (!node)
  3093. return false;
  3094. const nodeType = node.type;
  3095. if (nodeType === "TSArrayType") {
  3096. if (typeof opts === "undefined") {
  3097. return true;
  3098. } else {
  3099. return (0, _shallowEqual.default)(node, opts);
  3100. }
  3101. }
  3102. return false;
  3103. }
  3104. function isTSTupleType(node, opts) {
  3105. if (!node)
  3106. return false;
  3107. const nodeType = node.type;
  3108. if (nodeType === "TSTupleType") {
  3109. if (typeof opts === "undefined") {
  3110. return true;
  3111. } else {
  3112. return (0, _shallowEqual.default)(node, opts);
  3113. }
  3114. }
  3115. return false;
  3116. }
  3117. function isTSOptionalType(node, opts) {
  3118. if (!node)
  3119. return false;
  3120. const nodeType = node.type;
  3121. if (nodeType === "TSOptionalType") {
  3122. if (typeof opts === "undefined") {
  3123. return true;
  3124. } else {
  3125. return (0, _shallowEqual.default)(node, opts);
  3126. }
  3127. }
  3128. return false;
  3129. }
  3130. function isTSRestType(node, opts) {
  3131. if (!node)
  3132. return false;
  3133. const nodeType = node.type;
  3134. if (nodeType === "TSRestType") {
  3135. if (typeof opts === "undefined") {
  3136. return true;
  3137. } else {
  3138. return (0, _shallowEqual.default)(node, opts);
  3139. }
  3140. }
  3141. return false;
  3142. }
  3143. function isTSNamedTupleMember(node, opts) {
  3144. if (!node)
  3145. return false;
  3146. const nodeType = node.type;
  3147. if (nodeType === "TSNamedTupleMember") {
  3148. if (typeof opts === "undefined") {
  3149. return true;
  3150. } else {
  3151. return (0, _shallowEqual.default)(node, opts);
  3152. }
  3153. }
  3154. return false;
  3155. }
  3156. function isTSUnionType(node, opts) {
  3157. if (!node)
  3158. return false;
  3159. const nodeType = node.type;
  3160. if (nodeType === "TSUnionType") {
  3161. if (typeof opts === "undefined") {
  3162. return true;
  3163. } else {
  3164. return (0, _shallowEqual.default)(node, opts);
  3165. }
  3166. }
  3167. return false;
  3168. }
  3169. function isTSIntersectionType(node, opts) {
  3170. if (!node)
  3171. return false;
  3172. const nodeType = node.type;
  3173. if (nodeType === "TSIntersectionType") {
  3174. if (typeof opts === "undefined") {
  3175. return true;
  3176. } else {
  3177. return (0, _shallowEqual.default)(node, opts);
  3178. }
  3179. }
  3180. return false;
  3181. }
  3182. function isTSConditionalType(node, opts) {
  3183. if (!node)
  3184. return false;
  3185. const nodeType = node.type;
  3186. if (nodeType === "TSConditionalType") {
  3187. if (typeof opts === "undefined") {
  3188. return true;
  3189. } else {
  3190. return (0, _shallowEqual.default)(node, opts);
  3191. }
  3192. }
  3193. return false;
  3194. }
  3195. function isTSInferType(node, opts) {
  3196. if (!node)
  3197. return false;
  3198. const nodeType = node.type;
  3199. if (nodeType === "TSInferType") {
  3200. if (typeof opts === "undefined") {
  3201. return true;
  3202. } else {
  3203. return (0, _shallowEqual.default)(node, opts);
  3204. }
  3205. }
  3206. return false;
  3207. }
  3208. function isTSParenthesizedType(node, opts) {
  3209. if (!node)
  3210. return false;
  3211. const nodeType = node.type;
  3212. if (nodeType === "TSParenthesizedType") {
  3213. if (typeof opts === "undefined") {
  3214. return true;
  3215. } else {
  3216. return (0, _shallowEqual.default)(node, opts);
  3217. }
  3218. }
  3219. return false;
  3220. }
  3221. function isTSTypeOperator(node, opts) {
  3222. if (!node)
  3223. return false;
  3224. const nodeType = node.type;
  3225. if (nodeType === "TSTypeOperator") {
  3226. if (typeof opts === "undefined") {
  3227. return true;
  3228. } else {
  3229. return (0, _shallowEqual.default)(node, opts);
  3230. }
  3231. }
  3232. return false;
  3233. }
  3234. function isTSIndexedAccessType(node, opts) {
  3235. if (!node)
  3236. return false;
  3237. const nodeType = node.type;
  3238. if (nodeType === "TSIndexedAccessType") {
  3239. if (typeof opts === "undefined") {
  3240. return true;
  3241. } else {
  3242. return (0, _shallowEqual.default)(node, opts);
  3243. }
  3244. }
  3245. return false;
  3246. }
  3247. function isTSMappedType(node, opts) {
  3248. if (!node)
  3249. return false;
  3250. const nodeType = node.type;
  3251. if (nodeType === "TSMappedType") {
  3252. if (typeof opts === "undefined") {
  3253. return true;
  3254. } else {
  3255. return (0, _shallowEqual.default)(node, opts);
  3256. }
  3257. }
  3258. return false;
  3259. }
  3260. function isTSLiteralType(node, opts) {
  3261. if (!node)
  3262. return false;
  3263. const nodeType = node.type;
  3264. if (nodeType === "TSLiteralType") {
  3265. if (typeof opts === "undefined") {
  3266. return true;
  3267. } else {
  3268. return (0, _shallowEqual.default)(node, opts);
  3269. }
  3270. }
  3271. return false;
  3272. }
  3273. function isTSExpressionWithTypeArguments(node, opts) {
  3274. if (!node)
  3275. return false;
  3276. const nodeType = node.type;
  3277. if (nodeType === "TSExpressionWithTypeArguments") {
  3278. if (typeof opts === "undefined") {
  3279. return true;
  3280. } else {
  3281. return (0, _shallowEqual.default)(node, opts);
  3282. }
  3283. }
  3284. return false;
  3285. }
  3286. function isTSInterfaceDeclaration(node, opts) {
  3287. if (!node)
  3288. return false;
  3289. const nodeType = node.type;
  3290. if (nodeType === "TSInterfaceDeclaration") {
  3291. if (typeof opts === "undefined") {
  3292. return true;
  3293. } else {
  3294. return (0, _shallowEqual.default)(node, opts);
  3295. }
  3296. }
  3297. return false;
  3298. }
  3299. function isTSInterfaceBody(node, opts) {
  3300. if (!node)
  3301. return false;
  3302. const nodeType = node.type;
  3303. if (nodeType === "TSInterfaceBody") {
  3304. if (typeof opts === "undefined") {
  3305. return true;
  3306. } else {
  3307. return (0, _shallowEqual.default)(node, opts);
  3308. }
  3309. }
  3310. return false;
  3311. }
  3312. function isTSTypeAliasDeclaration(node, opts) {
  3313. if (!node)
  3314. return false;
  3315. const nodeType = node.type;
  3316. if (nodeType === "TSTypeAliasDeclaration") {
  3317. if (typeof opts === "undefined") {
  3318. return true;
  3319. } else {
  3320. return (0, _shallowEqual.default)(node, opts);
  3321. }
  3322. }
  3323. return false;
  3324. }
  3325. function isTSAsExpression(node, opts) {
  3326. if (!node)
  3327. return false;
  3328. const nodeType = node.type;
  3329. if (nodeType === "TSAsExpression") {
  3330. if (typeof opts === "undefined") {
  3331. return true;
  3332. } else {
  3333. return (0, _shallowEqual.default)(node, opts);
  3334. }
  3335. }
  3336. return false;
  3337. }
  3338. function isTSTypeAssertion(node, opts) {
  3339. if (!node)
  3340. return false;
  3341. const nodeType = node.type;
  3342. if (nodeType === "TSTypeAssertion") {
  3343. if (typeof opts === "undefined") {
  3344. return true;
  3345. } else {
  3346. return (0, _shallowEqual.default)(node, opts);
  3347. }
  3348. }
  3349. return false;
  3350. }
  3351. function isTSEnumDeclaration(node, opts) {
  3352. if (!node)
  3353. return false;
  3354. const nodeType = node.type;
  3355. if (nodeType === "TSEnumDeclaration") {
  3356. if (typeof opts === "undefined") {
  3357. return true;
  3358. } else {
  3359. return (0, _shallowEqual.default)(node, opts);
  3360. }
  3361. }
  3362. return false;
  3363. }
  3364. function isTSEnumMember(node, opts) {
  3365. if (!node)
  3366. return false;
  3367. const nodeType = node.type;
  3368. if (nodeType === "TSEnumMember") {
  3369. if (typeof opts === "undefined") {
  3370. return true;
  3371. } else {
  3372. return (0, _shallowEqual.default)(node, opts);
  3373. }
  3374. }
  3375. return false;
  3376. }
  3377. function isTSModuleDeclaration(node, opts) {
  3378. if (!node)
  3379. return false;
  3380. const nodeType = node.type;
  3381. if (nodeType === "TSModuleDeclaration") {
  3382. if (typeof opts === "undefined") {
  3383. return true;
  3384. } else {
  3385. return (0, _shallowEqual.default)(node, opts);
  3386. }
  3387. }
  3388. return false;
  3389. }
  3390. function isTSModuleBlock(node, opts) {
  3391. if (!node)
  3392. return false;
  3393. const nodeType = node.type;
  3394. if (nodeType === "TSModuleBlock") {
  3395. if (typeof opts === "undefined") {
  3396. return true;
  3397. } else {
  3398. return (0, _shallowEqual.default)(node, opts);
  3399. }
  3400. }
  3401. return false;
  3402. }
  3403. function isTSImportType(node, opts) {
  3404. if (!node)
  3405. return false;
  3406. const nodeType = node.type;
  3407. if (nodeType === "TSImportType") {
  3408. if (typeof opts === "undefined") {
  3409. return true;
  3410. } else {
  3411. return (0, _shallowEqual.default)(node, opts);
  3412. }
  3413. }
  3414. return false;
  3415. }
  3416. function isTSImportEqualsDeclaration(node, opts) {
  3417. if (!node)
  3418. return false;
  3419. const nodeType = node.type;
  3420. if (nodeType === "TSImportEqualsDeclaration") {
  3421. if (typeof opts === "undefined") {
  3422. return true;
  3423. } else {
  3424. return (0, _shallowEqual.default)(node, opts);
  3425. }
  3426. }
  3427. return false;
  3428. }
  3429. function isTSExternalModuleReference(node, opts) {
  3430. if (!node)
  3431. return false;
  3432. const nodeType = node.type;
  3433. if (nodeType === "TSExternalModuleReference") {
  3434. if (typeof opts === "undefined") {
  3435. return true;
  3436. } else {
  3437. return (0, _shallowEqual.default)(node, opts);
  3438. }
  3439. }
  3440. return false;
  3441. }
  3442. function isTSNonNullExpression(node, opts) {
  3443. if (!node)
  3444. return false;
  3445. const nodeType = node.type;
  3446. if (nodeType === "TSNonNullExpression") {
  3447. if (typeof opts === "undefined") {
  3448. return true;
  3449. } else {
  3450. return (0, _shallowEqual.default)(node, opts);
  3451. }
  3452. }
  3453. return false;
  3454. }
  3455. function isTSExportAssignment(node, opts) {
  3456. if (!node)
  3457. return false;
  3458. const nodeType = node.type;
  3459. if (nodeType === "TSExportAssignment") {
  3460. if (typeof opts === "undefined") {
  3461. return true;
  3462. } else {
  3463. return (0, _shallowEqual.default)(node, opts);
  3464. }
  3465. }
  3466. return false;
  3467. }
  3468. function isTSNamespaceExportDeclaration(node, opts) {
  3469. if (!node)
  3470. return false;
  3471. const nodeType = node.type;
  3472. if (nodeType === "TSNamespaceExportDeclaration") {
  3473. if (typeof opts === "undefined") {
  3474. return true;
  3475. } else {
  3476. return (0, _shallowEqual.default)(node, opts);
  3477. }
  3478. }
  3479. return false;
  3480. }
  3481. function isTSTypeAnnotation(node, opts) {
  3482. if (!node)
  3483. return false;
  3484. const nodeType = node.type;
  3485. if (nodeType === "TSTypeAnnotation") {
  3486. if (typeof opts === "undefined") {
  3487. return true;
  3488. } else {
  3489. return (0, _shallowEqual.default)(node, opts);
  3490. }
  3491. }
  3492. return false;
  3493. }
  3494. function isTSTypeParameterInstantiation(node, opts) {
  3495. if (!node)
  3496. return false;
  3497. const nodeType = node.type;
  3498. if (nodeType === "TSTypeParameterInstantiation") {
  3499. if (typeof opts === "undefined") {
  3500. return true;
  3501. } else {
  3502. return (0, _shallowEqual.default)(node, opts);
  3503. }
  3504. }
  3505. return false;
  3506. }
  3507. function isTSTypeParameterDeclaration(node, opts) {
  3508. if (!node)
  3509. return false;
  3510. const nodeType = node.type;
  3511. if (nodeType === "TSTypeParameterDeclaration") {
  3512. if (typeof opts === "undefined") {
  3513. return true;
  3514. } else {
  3515. return (0, _shallowEqual.default)(node, opts);
  3516. }
  3517. }
  3518. return false;
  3519. }
  3520. function isTSTypeParameter(node, opts) {
  3521. if (!node)
  3522. return false;
  3523. const nodeType = node.type;
  3524. if (nodeType === "TSTypeParameter") {
  3525. if (typeof opts === "undefined") {
  3526. return true;
  3527. } else {
  3528. return (0, _shallowEqual.default)(node, opts);
  3529. }
  3530. }
  3531. return false;
  3532. }
  3533. function isExpression(node, opts) {
  3534. if (!node)
  3535. return false;
  3536. const nodeType = node.type;
  3537. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  3538. if (typeof opts === "undefined") {
  3539. return true;
  3540. } else {
  3541. return (0, _shallowEqual.default)(node, opts);
  3542. }
  3543. }
  3544. return false;
  3545. }
  3546. function isBinary(node, opts) {
  3547. if (!node)
  3548. return false;
  3549. const nodeType = node.type;
  3550. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  3551. if (typeof opts === "undefined") {
  3552. return true;
  3553. } else {
  3554. return (0, _shallowEqual.default)(node, opts);
  3555. }
  3556. }
  3557. return false;
  3558. }
  3559. function isScopable(node, opts) {
  3560. if (!node)
  3561. return false;
  3562. const nodeType = node.type;
  3563. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3564. if (typeof opts === "undefined") {
  3565. return true;
  3566. } else {
  3567. return (0, _shallowEqual.default)(node, opts);
  3568. }
  3569. }
  3570. return false;
  3571. }
  3572. function isBlockParent(node, opts) {
  3573. if (!node)
  3574. return false;
  3575. const nodeType = node.type;
  3576. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3577. if (typeof opts === "undefined") {
  3578. return true;
  3579. } else {
  3580. return (0, _shallowEqual.default)(node, opts);
  3581. }
  3582. }
  3583. return false;
  3584. }
  3585. function isBlock(node, opts) {
  3586. if (!node)
  3587. return false;
  3588. const nodeType = node.type;
  3589. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3590. if (typeof opts === "undefined") {
  3591. return true;
  3592. } else {
  3593. return (0, _shallowEqual.default)(node, opts);
  3594. }
  3595. }
  3596. return false;
  3597. }
  3598. function isStatement(node, opts) {
  3599. if (!node)
  3600. return false;
  3601. const nodeType = node.type;
  3602. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  3603. if (typeof opts === "undefined") {
  3604. return true;
  3605. } else {
  3606. return (0, _shallowEqual.default)(node, opts);
  3607. }
  3608. }
  3609. return false;
  3610. }
  3611. function isTerminatorless(node, opts) {
  3612. if (!node)
  3613. return false;
  3614. const nodeType = node.type;
  3615. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  3616. if (typeof opts === "undefined") {
  3617. return true;
  3618. } else {
  3619. return (0, _shallowEqual.default)(node, opts);
  3620. }
  3621. }
  3622. return false;
  3623. }
  3624. function isCompletionStatement(node, opts) {
  3625. if (!node)
  3626. return false;
  3627. const nodeType = node.type;
  3628. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  3629. if (typeof opts === "undefined") {
  3630. return true;
  3631. } else {
  3632. return (0, _shallowEqual.default)(node, opts);
  3633. }
  3634. }
  3635. return false;
  3636. }
  3637. function isConditional(node, opts) {
  3638. if (!node)
  3639. return false;
  3640. const nodeType = node.type;
  3641. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  3642. if (typeof opts === "undefined") {
  3643. return true;
  3644. } else {
  3645. return (0, _shallowEqual.default)(node, opts);
  3646. }
  3647. }
  3648. return false;
  3649. }
  3650. function isLoop(node, opts) {
  3651. if (!node)
  3652. return false;
  3653. const nodeType = node.type;
  3654. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  3655. if (typeof opts === "undefined") {
  3656. return true;
  3657. } else {
  3658. return (0, _shallowEqual.default)(node, opts);
  3659. }
  3660. }
  3661. return false;
  3662. }
  3663. function isWhile(node, opts) {
  3664. if (!node)
  3665. return false;
  3666. const nodeType = node.type;
  3667. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  3668. if (typeof opts === "undefined") {
  3669. return true;
  3670. } else {
  3671. return (0, _shallowEqual.default)(node, opts);
  3672. }
  3673. }
  3674. return false;
  3675. }
  3676. function isExpressionWrapper(node, opts) {
  3677. if (!node)
  3678. return false;
  3679. const nodeType = node.type;
  3680. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  3681. if (typeof opts === "undefined") {
  3682. return true;
  3683. } else {
  3684. return (0, _shallowEqual.default)(node, opts);
  3685. }
  3686. }
  3687. return false;
  3688. }
  3689. function isFor(node, opts) {
  3690. if (!node)
  3691. return false;
  3692. const nodeType = node.type;
  3693. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  3694. if (typeof opts === "undefined") {
  3695. return true;
  3696. } else {
  3697. return (0, _shallowEqual.default)(node, opts);
  3698. }
  3699. }
  3700. return false;
  3701. }
  3702. function isForXStatement(node, opts) {
  3703. if (!node)
  3704. return false;
  3705. const nodeType = node.type;
  3706. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  3707. if (typeof opts === "undefined") {
  3708. return true;
  3709. } else {
  3710. return (0, _shallowEqual.default)(node, opts);
  3711. }
  3712. }
  3713. return false;
  3714. }
  3715. function isFunction(node, opts) {
  3716. if (!node)
  3717. return false;
  3718. const nodeType = node.type;
  3719. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3720. if (typeof opts === "undefined") {
  3721. return true;
  3722. } else {
  3723. return (0, _shallowEqual.default)(node, opts);
  3724. }
  3725. }
  3726. return false;
  3727. }
  3728. function isFunctionParent(node, opts) {
  3729. if (!node)
  3730. return false;
  3731. const nodeType = node.type;
  3732. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3733. if (typeof opts === "undefined") {
  3734. return true;
  3735. } else {
  3736. return (0, _shallowEqual.default)(node, opts);
  3737. }
  3738. }
  3739. return false;
  3740. }
  3741. function isPureish(node, opts) {
  3742. if (!node)
  3743. return false;
  3744. const nodeType = node.type;
  3745. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3746. if (typeof opts === "undefined") {
  3747. return true;
  3748. } else {
  3749. return (0, _shallowEqual.default)(node, opts);
  3750. }
  3751. }
  3752. return false;
  3753. }
  3754. function isDeclaration2(node, opts) {
  3755. if (!node)
  3756. return false;
  3757. const nodeType = node.type;
  3758. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  3759. if (typeof opts === "undefined") {
  3760. return true;
  3761. } else {
  3762. return (0, _shallowEqual.default)(node, opts);
  3763. }
  3764. }
  3765. return false;
  3766. }
  3767. function isPatternLike(node, opts) {
  3768. if (!node)
  3769. return false;
  3770. const nodeType = node.type;
  3771. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  3772. if (typeof opts === "undefined") {
  3773. return true;
  3774. } else {
  3775. return (0, _shallowEqual.default)(node, opts);
  3776. }
  3777. }
  3778. return false;
  3779. }
  3780. function isLVal(node, opts) {
  3781. if (!node)
  3782. return false;
  3783. const nodeType = node.type;
  3784. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  3785. if (typeof opts === "undefined") {
  3786. return true;
  3787. } else {
  3788. return (0, _shallowEqual.default)(node, opts);
  3789. }
  3790. }
  3791. return false;
  3792. }
  3793. function isTSEntityName(node, opts) {
  3794. if (!node)
  3795. return false;
  3796. const nodeType = node.type;
  3797. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  3798. if (typeof opts === "undefined") {
  3799. return true;
  3800. } else {
  3801. return (0, _shallowEqual.default)(node, opts);
  3802. }
  3803. }
  3804. return false;
  3805. }
  3806. function isLiteral(node, opts) {
  3807. if (!node)
  3808. return false;
  3809. const nodeType = node.type;
  3810. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3811. if (typeof opts === "undefined") {
  3812. return true;
  3813. } else {
  3814. return (0, _shallowEqual.default)(node, opts);
  3815. }
  3816. }
  3817. return false;
  3818. }
  3819. function isImmutable(node, opts) {
  3820. if (!node)
  3821. return false;
  3822. const nodeType = node.type;
  3823. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3824. if (typeof opts === "undefined") {
  3825. return true;
  3826. } else {
  3827. return (0, _shallowEqual.default)(node, opts);
  3828. }
  3829. }
  3830. return false;
  3831. }
  3832. function isUserWhitespacable(node, opts) {
  3833. if (!node)
  3834. return false;
  3835. const nodeType = node.type;
  3836. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  3837. if (typeof opts === "undefined") {
  3838. return true;
  3839. } else {
  3840. return (0, _shallowEqual.default)(node, opts);
  3841. }
  3842. }
  3843. return false;
  3844. }
  3845. function isMethod(node, opts) {
  3846. if (!node)
  3847. return false;
  3848. const nodeType = node.type;
  3849. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3850. if (typeof opts === "undefined") {
  3851. return true;
  3852. } else {
  3853. return (0, _shallowEqual.default)(node, opts);
  3854. }
  3855. }
  3856. return false;
  3857. }
  3858. function isObjectMember(node, opts) {
  3859. if (!node)
  3860. return false;
  3861. const nodeType = node.type;
  3862. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  3863. if (typeof opts === "undefined") {
  3864. return true;
  3865. } else {
  3866. return (0, _shallowEqual.default)(node, opts);
  3867. }
  3868. }
  3869. return false;
  3870. }
  3871. function isProperty(node, opts) {
  3872. if (!node)
  3873. return false;
  3874. const nodeType = node.type;
  3875. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  3876. if (typeof opts === "undefined") {
  3877. return true;
  3878. } else {
  3879. return (0, _shallowEqual.default)(node, opts);
  3880. }
  3881. }
  3882. return false;
  3883. }
  3884. function isUnaryLike(node, opts) {
  3885. if (!node)
  3886. return false;
  3887. const nodeType = node.type;
  3888. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  3889. if (typeof opts === "undefined") {
  3890. return true;
  3891. } else {
  3892. return (0, _shallowEqual.default)(node, opts);
  3893. }
  3894. }
  3895. return false;
  3896. }
  3897. function isPattern(node, opts) {
  3898. if (!node)
  3899. return false;
  3900. const nodeType = node.type;
  3901. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  3902. if (typeof opts === "undefined") {
  3903. return true;
  3904. } else {
  3905. return (0, _shallowEqual.default)(node, opts);
  3906. }
  3907. }
  3908. return false;
  3909. }
  3910. function isClass(node, opts) {
  3911. if (!node)
  3912. return false;
  3913. const nodeType = node.type;
  3914. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  3915. if (typeof opts === "undefined") {
  3916. return true;
  3917. } else {
  3918. return (0, _shallowEqual.default)(node, opts);
  3919. }
  3920. }
  3921. return false;
  3922. }
  3923. function isModuleDeclaration(node, opts) {
  3924. if (!node)
  3925. return false;
  3926. const nodeType = node.type;
  3927. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  3928. if (typeof opts === "undefined") {
  3929. return true;
  3930. } else {
  3931. return (0, _shallowEqual.default)(node, opts);
  3932. }
  3933. }
  3934. return false;
  3935. }
  3936. function isExportDeclaration(node, opts) {
  3937. if (!node)
  3938. return false;
  3939. const nodeType = node.type;
  3940. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  3941. if (typeof opts === "undefined") {
  3942. return true;
  3943. } else {
  3944. return (0, _shallowEqual.default)(node, opts);
  3945. }
  3946. }
  3947. return false;
  3948. }
  3949. function isModuleSpecifier(node, opts) {
  3950. if (!node)
  3951. return false;
  3952. const nodeType = node.type;
  3953. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  3954. if (typeof opts === "undefined") {
  3955. return true;
  3956. } else {
  3957. return (0, _shallowEqual.default)(node, opts);
  3958. }
  3959. }
  3960. return false;
  3961. }
  3962. function isPrivate(node, opts) {
  3963. if (!node)
  3964. return false;
  3965. const nodeType = node.type;
  3966. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  3967. if (typeof opts === "undefined") {
  3968. return true;
  3969. } else {
  3970. return (0, _shallowEqual.default)(node, opts);
  3971. }
  3972. }
  3973. return false;
  3974. }
  3975. function isFlow(node, opts) {
  3976. if (!node)
  3977. return false;
  3978. const nodeType = node.type;
  3979. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  3980. if (typeof opts === "undefined") {
  3981. return true;
  3982. } else {
  3983. return (0, _shallowEqual.default)(node, opts);
  3984. }
  3985. }
  3986. return false;
  3987. }
  3988. function isFlowType(node, opts) {
  3989. if (!node)
  3990. return false;
  3991. const nodeType = node.type;
  3992. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  3993. if (typeof opts === "undefined") {
  3994. return true;
  3995. } else {
  3996. return (0, _shallowEqual.default)(node, opts);
  3997. }
  3998. }
  3999. return false;
  4000. }
  4001. function isFlowBaseAnnotation(node, opts) {
  4002. if (!node)
  4003. return false;
  4004. const nodeType = node.type;
  4005. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  4006. if (typeof opts === "undefined") {
  4007. return true;
  4008. } else {
  4009. return (0, _shallowEqual.default)(node, opts);
  4010. }
  4011. }
  4012. return false;
  4013. }
  4014. function isFlowDeclaration(node, opts) {
  4015. if (!node)
  4016. return false;
  4017. const nodeType = node.type;
  4018. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  4019. if (typeof opts === "undefined") {
  4020. return true;
  4021. } else {
  4022. return (0, _shallowEqual.default)(node, opts);
  4023. }
  4024. }
  4025. return false;
  4026. }
  4027. function isFlowPredicate(node, opts) {
  4028. if (!node)
  4029. return false;
  4030. const nodeType = node.type;
  4031. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  4032. if (typeof opts === "undefined") {
  4033. return true;
  4034. } else {
  4035. return (0, _shallowEqual.default)(node, opts);
  4036. }
  4037. }
  4038. return false;
  4039. }
  4040. function isEnumBody(node, opts) {
  4041. if (!node)
  4042. return false;
  4043. const nodeType = node.type;
  4044. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  4045. if (typeof opts === "undefined") {
  4046. return true;
  4047. } else {
  4048. return (0, _shallowEqual.default)(node, opts);
  4049. }
  4050. }
  4051. return false;
  4052. }
  4053. function isEnumMember(node, opts) {
  4054. if (!node)
  4055. return false;
  4056. const nodeType = node.type;
  4057. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  4058. if (typeof opts === "undefined") {
  4059. return true;
  4060. } else {
  4061. return (0, _shallowEqual.default)(node, opts);
  4062. }
  4063. }
  4064. return false;
  4065. }
  4066. function isJSX(node, opts) {
  4067. if (!node)
  4068. return false;
  4069. const nodeType = node.type;
  4070. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  4071. if (typeof opts === "undefined") {
  4072. return true;
  4073. } else {
  4074. return (0, _shallowEqual.default)(node, opts);
  4075. }
  4076. }
  4077. return false;
  4078. }
  4079. function isTSTypeElement(node, opts) {
  4080. if (!node)
  4081. return false;
  4082. const nodeType = node.type;
  4083. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  4084. if (typeof opts === "undefined") {
  4085. return true;
  4086. } else {
  4087. return (0, _shallowEqual.default)(node, opts);
  4088. }
  4089. }
  4090. return false;
  4091. }
  4092. function isTSType(node, opts) {
  4093. if (!node)
  4094. return false;
  4095. const nodeType = node.type;
  4096. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  4097. if (typeof opts === "undefined") {
  4098. return true;
  4099. } else {
  4100. return (0, _shallowEqual.default)(node, opts);
  4101. }
  4102. }
  4103. return false;
  4104. }
  4105. function isTSBaseType(node, opts) {
  4106. if (!node)
  4107. return false;
  4108. const nodeType = node.type;
  4109. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  4110. if (typeof opts === "undefined") {
  4111. return true;
  4112. } else {
  4113. return (0, _shallowEqual.default)(node, opts);
  4114. }
  4115. }
  4116. return false;
  4117. }
  4118. function isNumberLiteral(node, opts) {
  4119. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  4120. if (!node)
  4121. return false;
  4122. const nodeType = node.type;
  4123. if (nodeType === "NumberLiteral") {
  4124. if (typeof opts === "undefined") {
  4125. return true;
  4126. } else {
  4127. return (0, _shallowEqual.default)(node, opts);
  4128. }
  4129. }
  4130. return false;
  4131. }
  4132. function isRegexLiteral(node, opts) {
  4133. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  4134. if (!node)
  4135. return false;
  4136. const nodeType = node.type;
  4137. if (nodeType === "RegexLiteral") {
  4138. if (typeof opts === "undefined") {
  4139. return true;
  4140. } else {
  4141. return (0, _shallowEqual.default)(node, opts);
  4142. }
  4143. }
  4144. return false;
  4145. }
  4146. function isRestProperty(node, opts) {
  4147. console.trace("The node type RestProperty has been renamed to RestElement");
  4148. if (!node)
  4149. return false;
  4150. const nodeType = node.type;
  4151. if (nodeType === "RestProperty") {
  4152. if (typeof opts === "undefined") {
  4153. return true;
  4154. } else {
  4155. return (0, _shallowEqual.default)(node, opts);
  4156. }
  4157. }
  4158. return false;
  4159. }
  4160. function isSpreadProperty(node, opts) {
  4161. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  4162. if (!node)
  4163. return false;
  4164. const nodeType = node.type;
  4165. if (nodeType === "SpreadProperty") {
  4166. if (typeof opts === "undefined") {
  4167. return true;
  4168. } else {
  4169. return (0, _shallowEqual.default)(node, opts);
  4170. }
  4171. }
  4172. return false;
  4173. }
  4174. }
  4175. });
  4176. // node_modules/@babel/types/lib/validators/matchesPattern.js
  4177. var require_matchesPattern = __commonJS({
  4178. "node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  4179. "use strict";
  4180. Object.defineProperty(exports, "__esModule", {
  4181. value: true
  4182. });
  4183. exports.default = matchesPattern;
  4184. var _generated = require_generated();
  4185. function matchesPattern(member, match, allowPartial) {
  4186. if (!(0, _generated.isMemberExpression)(member))
  4187. return false;
  4188. const parts = Array.isArray(match) ? match : match.split(".");
  4189. const nodes = [];
  4190. let node;
  4191. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  4192. nodes.push(node.property);
  4193. }
  4194. nodes.push(node);
  4195. if (nodes.length < parts.length)
  4196. return false;
  4197. if (!allowPartial && nodes.length > parts.length)
  4198. return false;
  4199. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  4200. const node2 = nodes[j];
  4201. let value;
  4202. if ((0, _generated.isIdentifier)(node2)) {
  4203. value = node2.name;
  4204. } else if ((0, _generated.isStringLiteral)(node2)) {
  4205. value = node2.value;
  4206. } else if ((0, _generated.isThisExpression)(node2)) {
  4207. value = "this";
  4208. } else {
  4209. return false;
  4210. }
  4211. if (parts[i] !== value)
  4212. return false;
  4213. }
  4214. return true;
  4215. }
  4216. }
  4217. });
  4218. // node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  4219. var require_buildMatchMemberExpression = __commonJS({
  4220. "node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  4221. "use strict";
  4222. Object.defineProperty(exports, "__esModule", {
  4223. value: true
  4224. });
  4225. exports.default = buildMatchMemberExpression;
  4226. var _matchesPattern = require_matchesPattern();
  4227. function buildMatchMemberExpression(match, allowPartial) {
  4228. const parts = match.split(".");
  4229. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  4230. }
  4231. }
  4232. });
  4233. // node_modules/@babel/types/lib/validators/react/isReactComponent.js
  4234. var require_isReactComponent = __commonJS({
  4235. "node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  4236. "use strict";
  4237. Object.defineProperty(exports, "__esModule", {
  4238. value: true
  4239. });
  4240. exports.default = void 0;
  4241. var _buildMatchMemberExpression = require_buildMatchMemberExpression();
  4242. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  4243. var _default = isReactComponent;
  4244. exports.default = _default;
  4245. }
  4246. });
  4247. // node_modules/@babel/types/lib/validators/react/isCompatTag.js
  4248. var require_isCompatTag = __commonJS({
  4249. "node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  4250. "use strict";
  4251. Object.defineProperty(exports, "__esModule", {
  4252. value: true
  4253. });
  4254. exports.default = isCompatTag;
  4255. function isCompatTag(tagName) {
  4256. return !!tagName && /^[a-z]/.test(tagName);
  4257. }
  4258. }
  4259. });
  4260. // node_modules/to-fast-properties/index.js
  4261. var require_to_fast_properties = __commonJS({
  4262. "node_modules/to-fast-properties/index.js"(exports, module2) {
  4263. "use strict";
  4264. var fastProto = null;
  4265. function FastObject(o) {
  4266. if (fastProto !== null && typeof fastProto.property) {
  4267. const result = fastProto;
  4268. fastProto = FastObject.prototype = null;
  4269. return result;
  4270. }
  4271. fastProto = FastObject.prototype = o == null ? /* @__PURE__ */ Object.create(null) : o;
  4272. return new FastObject();
  4273. }
  4274. FastObject();
  4275. module2.exports = function toFastproperties(o) {
  4276. return FastObject(o);
  4277. };
  4278. }
  4279. });
  4280. // node_modules/@babel/types/lib/validators/isType.js
  4281. var require_isType = __commonJS({
  4282. "node_modules/@babel/types/lib/validators/isType.js"(exports) {
  4283. "use strict";
  4284. Object.defineProperty(exports, "__esModule", {
  4285. value: true
  4286. });
  4287. exports.default = isType;
  4288. var _definitions = require_definitions();
  4289. function isType(nodeType, targetType) {
  4290. if (nodeType === targetType)
  4291. return true;
  4292. if (_definitions.ALIAS_KEYS[targetType])
  4293. return false;
  4294. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  4295. if (aliases) {
  4296. if (aliases[0] === nodeType)
  4297. return true;
  4298. for (const alias of aliases) {
  4299. if (nodeType === alias)
  4300. return true;
  4301. }
  4302. }
  4303. return false;
  4304. }
  4305. }
  4306. });
  4307. // node_modules/@babel/types/lib/validators/isPlaceholderType.js
  4308. var require_isPlaceholderType = __commonJS({
  4309. "node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  4310. "use strict";
  4311. Object.defineProperty(exports, "__esModule", {
  4312. value: true
  4313. });
  4314. exports.default = isPlaceholderType;
  4315. var _definitions = require_definitions();
  4316. function isPlaceholderType(placeholderType, targetType) {
  4317. if (placeholderType === targetType)
  4318. return true;
  4319. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  4320. if (aliases) {
  4321. for (const alias of aliases) {
  4322. if (targetType === alias)
  4323. return true;
  4324. }
  4325. }
  4326. return false;
  4327. }
  4328. }
  4329. });
  4330. // node_modules/@babel/types/lib/validators/is.js
  4331. var require_is = __commonJS({
  4332. "node_modules/@babel/types/lib/validators/is.js"(exports) {
  4333. "use strict";
  4334. Object.defineProperty(exports, "__esModule", {
  4335. value: true
  4336. });
  4337. exports.default = is;
  4338. var _shallowEqual = require_shallowEqual();
  4339. var _isType = require_isType();
  4340. var _isPlaceholderType = require_isPlaceholderType();
  4341. var _definitions = require_definitions();
  4342. function is(type, node, opts) {
  4343. if (!node)
  4344. return false;
  4345. const matches = (0, _isType.default)(node.type, type);
  4346. if (!matches) {
  4347. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  4348. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  4349. }
  4350. return false;
  4351. }
  4352. if (typeof opts === "undefined") {
  4353. return true;
  4354. } else {
  4355. return (0, _shallowEqual.default)(node, opts);
  4356. }
  4357. }
  4358. }
  4359. });
  4360. // node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  4361. var require_identifier = __commonJS({
  4362. "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  4363. "use strict";
  4364. Object.defineProperty(exports, "__esModule", {
  4365. value: true
  4366. });
  4367. exports.isIdentifierStart = isIdentifierStart2;
  4368. exports.isIdentifierChar = isIdentifierChar2;
  4369. exports.isIdentifierName = isIdentifierName;
  4370. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  4371. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  4372. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  4373. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  4374. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  4375. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  4376. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  4377. function isInAstralSet2(code2, set) {
  4378. let pos = 65536;
  4379. for (let i = 0, length = set.length; i < length; i += 2) {
  4380. pos += set[i];
  4381. if (pos > code2)
  4382. return false;
  4383. pos += set[i + 1];
  4384. if (pos >= code2)
  4385. return true;
  4386. }
  4387. return false;
  4388. }
  4389. function isIdentifierStart2(code2) {
  4390. if (code2 < 65)
  4391. return code2 === 36;
  4392. if (code2 <= 90)
  4393. return true;
  4394. if (code2 < 97)
  4395. return code2 === 95;
  4396. if (code2 <= 122)
  4397. return true;
  4398. if (code2 <= 65535) {
  4399. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  4400. }
  4401. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  4402. }
  4403. function isIdentifierChar2(code2) {
  4404. if (code2 < 48)
  4405. return code2 === 36;
  4406. if (code2 < 58)
  4407. return true;
  4408. if (code2 < 65)
  4409. return false;
  4410. if (code2 <= 90)
  4411. return true;
  4412. if (code2 < 97)
  4413. return code2 === 95;
  4414. if (code2 <= 122)
  4415. return true;
  4416. if (code2 <= 65535) {
  4417. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  4418. }
  4419. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  4420. }
  4421. function isIdentifierName(name2) {
  4422. let isFirst = true;
  4423. for (let i = 0; i < name2.length; i++) {
  4424. let cp = name2.charCodeAt(i);
  4425. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  4426. const trail = name2.charCodeAt(++i);
  4427. if ((trail & 64512) === 56320) {
  4428. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  4429. }
  4430. }
  4431. if (isFirst) {
  4432. isFirst = false;
  4433. if (!isIdentifierStart2(cp)) {
  4434. return false;
  4435. }
  4436. } else if (!isIdentifierChar2(cp)) {
  4437. return false;
  4438. }
  4439. }
  4440. return !isFirst;
  4441. }
  4442. }
  4443. });
  4444. // node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  4445. var require_keyword = __commonJS({
  4446. "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  4447. "use strict";
  4448. Object.defineProperty(exports, "__esModule", {
  4449. value: true
  4450. });
  4451. exports.isReservedWord = isReservedWord;
  4452. exports.isStrictReservedWord = isStrictReservedWord;
  4453. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  4454. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  4455. exports.isKeyword = isKeyword;
  4456. var reservedWords2 = {
  4457. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  4458. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  4459. strictBind: ["eval", "arguments"]
  4460. };
  4461. var keywords2 = new Set(reservedWords2.keyword);
  4462. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  4463. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  4464. function isReservedWord(word, inModule) {
  4465. return inModule && word === "await" || word === "enum";
  4466. }
  4467. function isStrictReservedWord(word, inModule) {
  4468. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  4469. }
  4470. function isStrictBindOnlyReservedWord(word) {
  4471. return reservedWordsStrictBindSet.has(word);
  4472. }
  4473. function isStrictBindReservedWord(word, inModule) {
  4474. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  4475. }
  4476. function isKeyword(word) {
  4477. return keywords2.has(word);
  4478. }
  4479. }
  4480. });
  4481. // node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/index.js
  4482. var require_lib = __commonJS({
  4483. "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  4484. "use strict";
  4485. Object.defineProperty(exports, "__esModule", {
  4486. value: true
  4487. });
  4488. Object.defineProperty(exports, "isIdentifierName", {
  4489. enumerable: true,
  4490. get: function() {
  4491. return _identifier.isIdentifierName;
  4492. }
  4493. });
  4494. Object.defineProperty(exports, "isIdentifierChar", {
  4495. enumerable: true,
  4496. get: function() {
  4497. return _identifier.isIdentifierChar;
  4498. }
  4499. });
  4500. Object.defineProperty(exports, "isIdentifierStart", {
  4501. enumerable: true,
  4502. get: function() {
  4503. return _identifier.isIdentifierStart;
  4504. }
  4505. });
  4506. Object.defineProperty(exports, "isReservedWord", {
  4507. enumerable: true,
  4508. get: function() {
  4509. return _keyword.isReservedWord;
  4510. }
  4511. });
  4512. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  4513. enumerable: true,
  4514. get: function() {
  4515. return _keyword.isStrictBindOnlyReservedWord;
  4516. }
  4517. });
  4518. Object.defineProperty(exports, "isStrictBindReservedWord", {
  4519. enumerable: true,
  4520. get: function() {
  4521. return _keyword.isStrictBindReservedWord;
  4522. }
  4523. });
  4524. Object.defineProperty(exports, "isStrictReservedWord", {
  4525. enumerable: true,
  4526. get: function() {
  4527. return _keyword.isStrictReservedWord;
  4528. }
  4529. });
  4530. Object.defineProperty(exports, "isKeyword", {
  4531. enumerable: true,
  4532. get: function() {
  4533. return _keyword.isKeyword;
  4534. }
  4535. });
  4536. var _identifier = require_identifier();
  4537. var _keyword = require_keyword();
  4538. }
  4539. });
  4540. // node_modules/@babel/types/lib/validators/isValidIdentifier.js
  4541. var require_isValidIdentifier = __commonJS({
  4542. "node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  4543. "use strict";
  4544. Object.defineProperty(exports, "__esModule", {
  4545. value: true
  4546. });
  4547. exports.default = isValidIdentifier;
  4548. var _helperValidatorIdentifier = require_lib();
  4549. function isValidIdentifier(name2, reserved = true) {
  4550. if (typeof name2 !== "string")
  4551. return false;
  4552. if (reserved) {
  4553. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  4554. return false;
  4555. }
  4556. }
  4557. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  4558. }
  4559. }
  4560. });
  4561. // node_modules/@babel/types/lib/constants/index.js
  4562. var require_constants = __commonJS({
  4563. "node_modules/@babel/types/lib/constants/index.js"(exports) {
  4564. "use strict";
  4565. Object.defineProperty(exports, "__esModule", {
  4566. value: true
  4567. });
  4568. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  4569. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  4570. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  4571. var FLATTENABLE_KEYS = ["body", "expressions"];
  4572. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  4573. var FOR_INIT_KEYS = ["left", "init"];
  4574. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  4575. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  4576. exports.COMMENT_KEYS = COMMENT_KEYS;
  4577. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  4578. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  4579. var UPDATE_OPERATORS = ["++", "--"];
  4580. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  4581. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  4582. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  4583. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  4584. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  4585. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  4586. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  4587. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  4588. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  4589. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  4590. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  4591. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  4592. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  4593. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  4594. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  4595. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  4596. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  4597. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  4598. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  4599. var STRING_UNARY_OPERATORS = ["typeof"];
  4600. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  4601. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  4602. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  4603. var INHERIT_KEYS = {
  4604. optional: ["typeAnnotation", "typeParameters", "returnType"],
  4605. force: ["start", "loc", "end"]
  4606. };
  4607. exports.INHERIT_KEYS = INHERIT_KEYS;
  4608. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  4609. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  4610. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  4611. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  4612. }
  4613. });
  4614. // node_modules/@babel/types/lib/validators/validate.js
  4615. var require_validate = __commonJS({
  4616. "node_modules/@babel/types/lib/validators/validate.js"(exports) {
  4617. "use strict";
  4618. Object.defineProperty(exports, "__esModule", {
  4619. value: true
  4620. });
  4621. exports.default = validate;
  4622. exports.validateField = validateField;
  4623. exports.validateChild = validateChild;
  4624. var _definitions = require_definitions();
  4625. function validate(node, key, val) {
  4626. if (!node)
  4627. return;
  4628. const fields = _definitions.NODE_FIELDS[node.type];
  4629. if (!fields)
  4630. return;
  4631. const field = fields[key];
  4632. validateField(node, key, val, field);
  4633. validateChild(node, key, val);
  4634. }
  4635. function validateField(node, key, val, field) {
  4636. if (!(field != null && field.validate))
  4637. return;
  4638. if (field.optional && val == null)
  4639. return;
  4640. field.validate(node, key, val);
  4641. }
  4642. function validateChild(node, key, val) {
  4643. if (val == null)
  4644. return;
  4645. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  4646. if (!validate2)
  4647. return;
  4648. validate2(node, key, val);
  4649. }
  4650. }
  4651. });
  4652. // node_modules/@babel/types/lib/definitions/utils.js
  4653. var require_utils = __commonJS({
  4654. "node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  4655. "use strict";
  4656. Object.defineProperty(exports, "__esModule", {
  4657. value: true
  4658. });
  4659. exports.validate = validate;
  4660. exports.typeIs = typeIs;
  4661. exports.validateType = validateType;
  4662. exports.validateOptional = validateOptional;
  4663. exports.validateOptionalType = validateOptionalType;
  4664. exports.arrayOf = arrayOf;
  4665. exports.arrayOfType = arrayOfType;
  4666. exports.validateArrayOfType = validateArrayOfType;
  4667. exports.assertEach = assertEach;
  4668. exports.assertOneOf = assertOneOf;
  4669. exports.assertNodeType = assertNodeType;
  4670. exports.assertNodeOrValueType = assertNodeOrValueType;
  4671. exports.assertValueType = assertValueType;
  4672. exports.assertShape = assertShape;
  4673. exports.assertOptionalChainStart = assertOptionalChainStart;
  4674. exports.chain = chain;
  4675. exports.default = defineType;
  4676. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  4677. var _is = require_is();
  4678. var _validate = require_validate();
  4679. var VISITOR_KEYS = {};
  4680. exports.VISITOR_KEYS = VISITOR_KEYS;
  4681. var ALIAS_KEYS = {};
  4682. exports.ALIAS_KEYS = ALIAS_KEYS;
  4683. var FLIPPED_ALIAS_KEYS = {};
  4684. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  4685. var NODE_FIELDS = {};
  4686. exports.NODE_FIELDS = NODE_FIELDS;
  4687. var BUILDER_KEYS = {};
  4688. exports.BUILDER_KEYS = BUILDER_KEYS;
  4689. var DEPRECATED_KEYS = {};
  4690. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  4691. var NODE_PARENT_VALIDATIONS = {};
  4692. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  4693. function getType(val) {
  4694. if (Array.isArray(val)) {
  4695. return "array";
  4696. } else if (val === null) {
  4697. return "null";
  4698. } else {
  4699. return typeof val;
  4700. }
  4701. }
  4702. function validate(validate2) {
  4703. return {
  4704. validate: validate2
  4705. };
  4706. }
  4707. function typeIs(typeName) {
  4708. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  4709. }
  4710. function validateType(typeName) {
  4711. return validate(typeIs(typeName));
  4712. }
  4713. function validateOptional(validate2) {
  4714. return {
  4715. validate: validate2,
  4716. optional: true
  4717. };
  4718. }
  4719. function validateOptionalType(typeName) {
  4720. return {
  4721. validate: typeIs(typeName),
  4722. optional: true
  4723. };
  4724. }
  4725. function arrayOf(elementType) {
  4726. return chain(assertValueType("array"), assertEach(elementType));
  4727. }
  4728. function arrayOfType(typeName) {
  4729. return arrayOf(typeIs(typeName));
  4730. }
  4731. function validateArrayOfType(typeName) {
  4732. return validate(arrayOfType(typeName));
  4733. }
  4734. function assertEach(callback) {
  4735. function validator(node, key, val) {
  4736. if (!Array.isArray(val))
  4737. return;
  4738. for (let i = 0; i < val.length; i++) {
  4739. const subkey = `${key}[${i}]`;
  4740. const v = val[i];
  4741. callback(node, subkey, v);
  4742. if (process.env.BABEL_TYPES_8_BREAKING)
  4743. (0, _validate.validateChild)(node, subkey, v);
  4744. }
  4745. }
  4746. validator.each = callback;
  4747. return validator;
  4748. }
  4749. function assertOneOf(...values) {
  4750. function validate2(node, key, val) {
  4751. if (values.indexOf(val) < 0) {
  4752. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  4753. }
  4754. }
  4755. validate2.oneOf = values;
  4756. return validate2;
  4757. }
  4758. function assertNodeType(...types2) {
  4759. function validate2(node, key, val) {
  4760. for (const type of types2) {
  4761. if ((0, _is.default)(type, val)) {
  4762. (0, _validate.validateChild)(node, key, val);
  4763. return;
  4764. }
  4765. }
  4766. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  4767. }
  4768. validate2.oneOfNodeTypes = types2;
  4769. return validate2;
  4770. }
  4771. function assertNodeOrValueType(...types2) {
  4772. function validate2(node, key, val) {
  4773. for (const type of types2) {
  4774. if (getType(val) === type || (0, _is.default)(type, val)) {
  4775. (0, _validate.validateChild)(node, key, val);
  4776. return;
  4777. }
  4778. }
  4779. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  4780. }
  4781. validate2.oneOfNodeOrValueTypes = types2;
  4782. return validate2;
  4783. }
  4784. function assertValueType(type) {
  4785. function validate2(node, key, val) {
  4786. const valid2 = getType(val) === type;
  4787. if (!valid2) {
  4788. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  4789. }
  4790. }
  4791. validate2.type = type;
  4792. return validate2;
  4793. }
  4794. function assertShape(shape) {
  4795. function validate2(node, key, val) {
  4796. const errors = [];
  4797. for (const property of Object.keys(shape)) {
  4798. try {
  4799. (0, _validate.validateField)(node, property, val[property], shape[property]);
  4800. } catch (error) {
  4801. if (error instanceof TypeError) {
  4802. errors.push(error.message);
  4803. continue;
  4804. }
  4805. throw error;
  4806. }
  4807. }
  4808. if (errors.length) {
  4809. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  4810. ${errors.join("\n")}`);
  4811. }
  4812. }
  4813. validate2.shapeOf = shape;
  4814. return validate2;
  4815. }
  4816. function assertOptionalChainStart() {
  4817. function validate2(node) {
  4818. var _current;
  4819. let current2 = node;
  4820. while (node) {
  4821. const {
  4822. type
  4823. } = current2;
  4824. if (type === "OptionalCallExpression") {
  4825. if (current2.optional)
  4826. return;
  4827. current2 = current2.callee;
  4828. continue;
  4829. }
  4830. if (type === "OptionalMemberExpression") {
  4831. if (current2.optional)
  4832. return;
  4833. current2 = current2.object;
  4834. continue;
  4835. }
  4836. break;
  4837. }
  4838. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  4839. }
  4840. return validate2;
  4841. }
  4842. function chain(...fns) {
  4843. function validate2(...args) {
  4844. for (const fn of fns) {
  4845. fn(...args);
  4846. }
  4847. }
  4848. validate2.chainOf = fns;
  4849. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  4850. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  4851. }
  4852. return validate2;
  4853. }
  4854. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  4855. var validFieldKeys = ["default", "optional", "validate"];
  4856. function defineType(type, opts = {}) {
  4857. const inherits = opts.inherits && store[opts.inherits] || {};
  4858. let fields = opts.fields;
  4859. if (!fields) {
  4860. fields = {};
  4861. if (inherits.fields) {
  4862. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  4863. for (const key of keys2) {
  4864. const field = inherits.fields[key];
  4865. const def = field.default;
  4866. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  4867. throw new Error("field defaults can only be primitives or empty arrays currently");
  4868. }
  4869. fields[key] = {
  4870. default: Array.isArray(def) ? [] : def,
  4871. optional: field.optional,
  4872. validate: field.validate
  4873. };
  4874. }
  4875. }
  4876. }
  4877. const visitor = opts.visitor || inherits.visitor || [];
  4878. const aliases = opts.aliases || inherits.aliases || [];
  4879. const builder = opts.builder || inherits.builder || opts.visitor || [];
  4880. for (const k of Object.keys(opts)) {
  4881. if (validTypeOpts.indexOf(k) === -1) {
  4882. throw new Error(`Unknown type option "${k}" on ${type}`);
  4883. }
  4884. }
  4885. if (opts.deprecatedAlias) {
  4886. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  4887. }
  4888. for (const key of visitor.concat(builder)) {
  4889. fields[key] = fields[key] || {};
  4890. }
  4891. for (const key of Object.keys(fields)) {
  4892. const field = fields[key];
  4893. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  4894. field.optional = true;
  4895. }
  4896. if (field.default === void 0) {
  4897. field.default = null;
  4898. } else if (!field.validate && field.default != null) {
  4899. field.validate = assertValueType(getType(field.default));
  4900. }
  4901. for (const k of Object.keys(field)) {
  4902. if (validFieldKeys.indexOf(k) === -1) {
  4903. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  4904. }
  4905. }
  4906. }
  4907. VISITOR_KEYS[type] = opts.visitor = visitor;
  4908. BUILDER_KEYS[type] = opts.builder = builder;
  4909. NODE_FIELDS[type] = opts.fields = fields;
  4910. ALIAS_KEYS[type] = opts.aliases = aliases;
  4911. aliases.forEach((alias) => {
  4912. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  4913. FLIPPED_ALIAS_KEYS[alias].push(type);
  4914. });
  4915. if (opts.validate) {
  4916. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  4917. }
  4918. store[type] = opts;
  4919. }
  4920. var store = {};
  4921. }
  4922. });
  4923. // node_modules/@babel/types/lib/definitions/core.js
  4924. var require_core = __commonJS({
  4925. "node_modules/@babel/types/lib/definitions/core.js"(exports) {
  4926. "use strict";
  4927. Object.defineProperty(exports, "__esModule", {
  4928. value: true
  4929. });
  4930. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  4931. var _is = require_is();
  4932. var _isValidIdentifier = require_isValidIdentifier();
  4933. var _helperValidatorIdentifier = require_lib();
  4934. var _constants = require_constants();
  4935. var _utils = require_utils();
  4936. (0, _utils.default)("ArrayExpression", {
  4937. fields: {
  4938. elements: {
  4939. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  4940. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  4941. }
  4942. },
  4943. visitor: ["elements"],
  4944. aliases: ["Expression"]
  4945. });
  4946. (0, _utils.default)("AssignmentExpression", {
  4947. fields: {
  4948. operator: {
  4949. validate: function() {
  4950. if (!process.env.BABEL_TYPES_8_BREAKING) {
  4951. return (0, _utils.assertValueType)("string");
  4952. }
  4953. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  4954. const pattern = (0, _utils.assertOneOf)("=");
  4955. return function(node, key, val) {
  4956. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  4957. validator(node, key, val);
  4958. };
  4959. }()
  4960. },
  4961. left: {
  4962. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  4963. },
  4964. right: {
  4965. validate: (0, _utils.assertNodeType)("Expression")
  4966. }
  4967. },
  4968. builder: ["operator", "left", "right"],
  4969. visitor: ["left", "right"],
  4970. aliases: ["Expression"]
  4971. });
  4972. (0, _utils.default)("BinaryExpression", {
  4973. builder: ["operator", "left", "right"],
  4974. fields: {
  4975. operator: {
  4976. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  4977. },
  4978. left: {
  4979. validate: function() {
  4980. const expression = (0, _utils.assertNodeType)("Expression");
  4981. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  4982. const validator = function(node, key, val) {
  4983. const validator2 = node.operator === "in" ? inOp : expression;
  4984. validator2(node, key, val);
  4985. };
  4986. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  4987. return validator;
  4988. }()
  4989. },
  4990. right: {
  4991. validate: (0, _utils.assertNodeType)("Expression")
  4992. }
  4993. },
  4994. visitor: ["left", "right"],
  4995. aliases: ["Binary", "Expression"]
  4996. });
  4997. (0, _utils.default)("InterpreterDirective", {
  4998. builder: ["value"],
  4999. fields: {
  5000. value: {
  5001. validate: (0, _utils.assertValueType)("string")
  5002. }
  5003. }
  5004. });
  5005. (0, _utils.default)("Directive", {
  5006. visitor: ["value"],
  5007. fields: {
  5008. value: {
  5009. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  5010. }
  5011. }
  5012. });
  5013. (0, _utils.default)("DirectiveLiteral", {
  5014. builder: ["value"],
  5015. fields: {
  5016. value: {
  5017. validate: (0, _utils.assertValueType)("string")
  5018. }
  5019. }
  5020. });
  5021. (0, _utils.default)("BlockStatement", {
  5022. builder: ["body", "directives"],
  5023. visitor: ["directives", "body"],
  5024. fields: {
  5025. directives: {
  5026. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  5027. default: []
  5028. },
  5029. body: {
  5030. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  5031. }
  5032. },
  5033. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  5034. });
  5035. (0, _utils.default)("BreakStatement", {
  5036. visitor: ["label"],
  5037. fields: {
  5038. label: {
  5039. validate: (0, _utils.assertNodeType)("Identifier"),
  5040. optional: true
  5041. }
  5042. },
  5043. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  5044. });
  5045. (0, _utils.default)("CallExpression", {
  5046. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  5047. builder: ["callee", "arguments"],
  5048. aliases: ["Expression"],
  5049. fields: Object.assign({
  5050. callee: {
  5051. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  5052. },
  5053. arguments: {
  5054. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  5055. }
  5056. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5057. optional: {
  5058. validate: (0, _utils.assertOneOf)(true, false),
  5059. optional: true
  5060. }
  5061. } : {}, {
  5062. typeArguments: {
  5063. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  5064. optional: true
  5065. },
  5066. typeParameters: {
  5067. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  5068. optional: true
  5069. }
  5070. })
  5071. });
  5072. (0, _utils.default)("CatchClause", {
  5073. visitor: ["param", "body"],
  5074. fields: {
  5075. param: {
  5076. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  5077. optional: true
  5078. },
  5079. body: {
  5080. validate: (0, _utils.assertNodeType)("BlockStatement")
  5081. }
  5082. },
  5083. aliases: ["Scopable", "BlockParent"]
  5084. });
  5085. (0, _utils.default)("ConditionalExpression", {
  5086. visitor: ["test", "consequent", "alternate"],
  5087. fields: {
  5088. test: {
  5089. validate: (0, _utils.assertNodeType)("Expression")
  5090. },
  5091. consequent: {
  5092. validate: (0, _utils.assertNodeType)("Expression")
  5093. },
  5094. alternate: {
  5095. validate: (0, _utils.assertNodeType)("Expression")
  5096. }
  5097. },
  5098. aliases: ["Expression", "Conditional"]
  5099. });
  5100. (0, _utils.default)("ContinueStatement", {
  5101. visitor: ["label"],
  5102. fields: {
  5103. label: {
  5104. validate: (0, _utils.assertNodeType)("Identifier"),
  5105. optional: true
  5106. }
  5107. },
  5108. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  5109. });
  5110. (0, _utils.default)("DebuggerStatement", {
  5111. aliases: ["Statement"]
  5112. });
  5113. (0, _utils.default)("DoWhileStatement", {
  5114. visitor: ["test", "body"],
  5115. fields: {
  5116. test: {
  5117. validate: (0, _utils.assertNodeType)("Expression")
  5118. },
  5119. body: {
  5120. validate: (0, _utils.assertNodeType)("Statement")
  5121. }
  5122. },
  5123. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  5124. });
  5125. (0, _utils.default)("EmptyStatement", {
  5126. aliases: ["Statement"]
  5127. });
  5128. (0, _utils.default)("ExpressionStatement", {
  5129. visitor: ["expression"],
  5130. fields: {
  5131. expression: {
  5132. validate: (0, _utils.assertNodeType)("Expression")
  5133. }
  5134. },
  5135. aliases: ["Statement", "ExpressionWrapper"]
  5136. });
  5137. (0, _utils.default)("File", {
  5138. builder: ["program", "comments", "tokens"],
  5139. visitor: ["program"],
  5140. fields: {
  5141. program: {
  5142. validate: (0, _utils.assertNodeType)("Program")
  5143. },
  5144. comments: {
  5145. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  5146. }, {
  5147. each: {
  5148. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  5149. }
  5150. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  5151. optional: true
  5152. },
  5153. tokens: {
  5154. validate: (0, _utils.assertEach)(Object.assign(() => {
  5155. }, {
  5156. type: "any"
  5157. })),
  5158. optional: true
  5159. }
  5160. }
  5161. });
  5162. (0, _utils.default)("ForInStatement", {
  5163. visitor: ["left", "right", "body"],
  5164. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  5165. fields: {
  5166. left: {
  5167. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  5168. },
  5169. right: {
  5170. validate: (0, _utils.assertNodeType)("Expression")
  5171. },
  5172. body: {
  5173. validate: (0, _utils.assertNodeType)("Statement")
  5174. }
  5175. }
  5176. });
  5177. (0, _utils.default)("ForStatement", {
  5178. visitor: ["init", "test", "update", "body"],
  5179. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  5180. fields: {
  5181. init: {
  5182. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  5183. optional: true
  5184. },
  5185. test: {
  5186. validate: (0, _utils.assertNodeType)("Expression"),
  5187. optional: true
  5188. },
  5189. update: {
  5190. validate: (0, _utils.assertNodeType)("Expression"),
  5191. optional: true
  5192. },
  5193. body: {
  5194. validate: (0, _utils.assertNodeType)("Statement")
  5195. }
  5196. }
  5197. });
  5198. var functionCommon = {
  5199. params: {
  5200. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  5201. },
  5202. generator: {
  5203. default: false
  5204. },
  5205. async: {
  5206. default: false
  5207. }
  5208. };
  5209. exports.functionCommon = functionCommon;
  5210. var functionTypeAnnotationCommon = {
  5211. returnType: {
  5212. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  5213. optional: true
  5214. },
  5215. typeParameters: {
  5216. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5217. optional: true
  5218. }
  5219. };
  5220. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  5221. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  5222. declare: {
  5223. validate: (0, _utils.assertValueType)("boolean"),
  5224. optional: true
  5225. },
  5226. id: {
  5227. validate: (0, _utils.assertNodeType)("Identifier"),
  5228. optional: true
  5229. }
  5230. });
  5231. exports.functionDeclarationCommon = functionDeclarationCommon;
  5232. (0, _utils.default)("FunctionDeclaration", {
  5233. builder: ["id", "params", "body", "generator", "async"],
  5234. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  5235. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  5236. body: {
  5237. validate: (0, _utils.assertNodeType)("BlockStatement")
  5238. }
  5239. }),
  5240. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  5241. validate: function() {
  5242. if (!process.env.BABEL_TYPES_8_BREAKING)
  5243. return () => {
  5244. };
  5245. const identifier = (0, _utils.assertNodeType)("Identifier");
  5246. return function(parent, key, node) {
  5247. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  5248. identifier(node, "id", node.id);
  5249. }
  5250. };
  5251. }()
  5252. });
  5253. (0, _utils.default)("FunctionExpression", {
  5254. inherits: "FunctionDeclaration",
  5255. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  5256. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  5257. id: {
  5258. validate: (0, _utils.assertNodeType)("Identifier"),
  5259. optional: true
  5260. },
  5261. body: {
  5262. validate: (0, _utils.assertNodeType)("BlockStatement")
  5263. }
  5264. })
  5265. });
  5266. var patternLikeCommon = {
  5267. typeAnnotation: {
  5268. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  5269. optional: true
  5270. },
  5271. decorators: {
  5272. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  5273. }
  5274. };
  5275. exports.patternLikeCommon = patternLikeCommon;
  5276. (0, _utils.default)("Identifier", {
  5277. builder: ["name"],
  5278. visitor: ["typeAnnotation", "decorators"],
  5279. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  5280. fields: Object.assign({}, patternLikeCommon, {
  5281. name: {
  5282. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  5283. if (!process.env.BABEL_TYPES_8_BREAKING)
  5284. return;
  5285. if (!(0, _isValidIdentifier.default)(val, false)) {
  5286. throw new TypeError(`"${val}" is not a valid identifier name`);
  5287. }
  5288. }, {
  5289. type: "string"
  5290. }))
  5291. },
  5292. optional: {
  5293. validate: (0, _utils.assertValueType)("boolean"),
  5294. optional: true
  5295. }
  5296. }),
  5297. validate(parent, key, node) {
  5298. if (!process.env.BABEL_TYPES_8_BREAKING)
  5299. return;
  5300. const match = /\.(\w+)$/.exec(key);
  5301. if (!match)
  5302. return;
  5303. const [, parentKey] = match;
  5304. const nonComp = {
  5305. computed: false
  5306. };
  5307. if (parentKey === "property") {
  5308. if ((0, _is.default)("MemberExpression", parent, nonComp))
  5309. return;
  5310. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  5311. return;
  5312. } else if (parentKey === "key") {
  5313. if ((0, _is.default)("Property", parent, nonComp))
  5314. return;
  5315. if ((0, _is.default)("Method", parent, nonComp))
  5316. return;
  5317. } else if (parentKey === "exported") {
  5318. if ((0, _is.default)("ExportSpecifier", parent))
  5319. return;
  5320. } else if (parentKey === "imported") {
  5321. if ((0, _is.default)("ImportSpecifier", parent, {
  5322. imported: node
  5323. }))
  5324. return;
  5325. } else if (parentKey === "meta") {
  5326. if ((0, _is.default)("MetaProperty", parent, {
  5327. meta: node
  5328. }))
  5329. return;
  5330. }
  5331. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  5332. throw new TypeError(`"${node.name}" is not a valid identifier`);
  5333. }
  5334. }
  5335. });
  5336. (0, _utils.default)("IfStatement", {
  5337. visitor: ["test", "consequent", "alternate"],
  5338. aliases: ["Statement", "Conditional"],
  5339. fields: {
  5340. test: {
  5341. validate: (0, _utils.assertNodeType)("Expression")
  5342. },
  5343. consequent: {
  5344. validate: (0, _utils.assertNodeType)("Statement")
  5345. },
  5346. alternate: {
  5347. optional: true,
  5348. validate: (0, _utils.assertNodeType)("Statement")
  5349. }
  5350. }
  5351. });
  5352. (0, _utils.default)("LabeledStatement", {
  5353. visitor: ["label", "body"],
  5354. aliases: ["Statement"],
  5355. fields: {
  5356. label: {
  5357. validate: (0, _utils.assertNodeType)("Identifier")
  5358. },
  5359. body: {
  5360. validate: (0, _utils.assertNodeType)("Statement")
  5361. }
  5362. }
  5363. });
  5364. (0, _utils.default)("StringLiteral", {
  5365. builder: ["value"],
  5366. fields: {
  5367. value: {
  5368. validate: (0, _utils.assertValueType)("string")
  5369. }
  5370. },
  5371. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5372. });
  5373. (0, _utils.default)("NumericLiteral", {
  5374. builder: ["value"],
  5375. deprecatedAlias: "NumberLiteral",
  5376. fields: {
  5377. value: {
  5378. validate: (0, _utils.assertValueType)("number")
  5379. }
  5380. },
  5381. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5382. });
  5383. (0, _utils.default)("NullLiteral", {
  5384. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5385. });
  5386. (0, _utils.default)("BooleanLiteral", {
  5387. builder: ["value"],
  5388. fields: {
  5389. value: {
  5390. validate: (0, _utils.assertValueType)("boolean")
  5391. }
  5392. },
  5393. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5394. });
  5395. (0, _utils.default)("RegExpLiteral", {
  5396. builder: ["pattern", "flags"],
  5397. deprecatedAlias: "RegexLiteral",
  5398. aliases: ["Expression", "Pureish", "Literal"],
  5399. fields: {
  5400. pattern: {
  5401. validate: (0, _utils.assertValueType)("string")
  5402. },
  5403. flags: {
  5404. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  5405. if (!process.env.BABEL_TYPES_8_BREAKING)
  5406. return;
  5407. const invalid2 = /[^gimsuy]/.exec(val);
  5408. if (invalid2) {
  5409. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  5410. }
  5411. }, {
  5412. type: "string"
  5413. })),
  5414. default: ""
  5415. }
  5416. }
  5417. });
  5418. (0, _utils.default)("LogicalExpression", {
  5419. builder: ["operator", "left", "right"],
  5420. visitor: ["left", "right"],
  5421. aliases: ["Binary", "Expression"],
  5422. fields: {
  5423. operator: {
  5424. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  5425. },
  5426. left: {
  5427. validate: (0, _utils.assertNodeType)("Expression")
  5428. },
  5429. right: {
  5430. validate: (0, _utils.assertNodeType)("Expression")
  5431. }
  5432. }
  5433. });
  5434. (0, _utils.default)("MemberExpression", {
  5435. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  5436. visitor: ["object", "property"],
  5437. aliases: ["Expression", "LVal"],
  5438. fields: Object.assign({
  5439. object: {
  5440. validate: (0, _utils.assertNodeType)("Expression")
  5441. },
  5442. property: {
  5443. validate: function() {
  5444. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  5445. const computed = (0, _utils.assertNodeType)("Expression");
  5446. const validator = function(node, key, val) {
  5447. const validator2 = node.computed ? computed : normal;
  5448. validator2(node, key, val);
  5449. };
  5450. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  5451. return validator;
  5452. }()
  5453. },
  5454. computed: {
  5455. default: false
  5456. }
  5457. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5458. optional: {
  5459. validate: (0, _utils.assertOneOf)(true, false),
  5460. optional: true
  5461. }
  5462. } : {})
  5463. });
  5464. (0, _utils.default)("NewExpression", {
  5465. inherits: "CallExpression"
  5466. });
  5467. (0, _utils.default)("Program", {
  5468. visitor: ["directives", "body"],
  5469. builder: ["body", "directives", "sourceType", "interpreter"],
  5470. fields: {
  5471. sourceFile: {
  5472. validate: (0, _utils.assertValueType)("string")
  5473. },
  5474. sourceType: {
  5475. validate: (0, _utils.assertOneOf)("script", "module"),
  5476. default: "script"
  5477. },
  5478. interpreter: {
  5479. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  5480. default: null,
  5481. optional: true
  5482. },
  5483. directives: {
  5484. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  5485. default: []
  5486. },
  5487. body: {
  5488. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  5489. }
  5490. },
  5491. aliases: ["Scopable", "BlockParent", "Block"]
  5492. });
  5493. (0, _utils.default)("ObjectExpression", {
  5494. visitor: ["properties"],
  5495. aliases: ["Expression"],
  5496. fields: {
  5497. properties: {
  5498. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  5499. }
  5500. }
  5501. });
  5502. (0, _utils.default)("ObjectMethod", {
  5503. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  5504. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  5505. kind: Object.assign({
  5506. validate: (0, _utils.assertOneOf)("method", "get", "set")
  5507. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5508. default: "method"
  5509. } : {}),
  5510. computed: {
  5511. default: false
  5512. },
  5513. key: {
  5514. validate: function() {
  5515. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  5516. const computed = (0, _utils.assertNodeType)("Expression");
  5517. const validator = function(node, key, val) {
  5518. const validator2 = node.computed ? computed : normal;
  5519. validator2(node, key, val);
  5520. };
  5521. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  5522. return validator;
  5523. }()
  5524. },
  5525. decorators: {
  5526. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5527. optional: true
  5528. },
  5529. body: {
  5530. validate: (0, _utils.assertNodeType)("BlockStatement")
  5531. }
  5532. }),
  5533. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  5534. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  5535. });
  5536. (0, _utils.default)("ObjectProperty", {
  5537. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  5538. fields: {
  5539. computed: {
  5540. default: false
  5541. },
  5542. key: {
  5543. validate: function() {
  5544. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  5545. const computed = (0, _utils.assertNodeType)("Expression");
  5546. const validator = function(node, key, val) {
  5547. const validator2 = node.computed ? computed : normal;
  5548. validator2(node, key, val);
  5549. };
  5550. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  5551. return validator;
  5552. }()
  5553. },
  5554. value: {
  5555. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  5556. },
  5557. shorthand: {
  5558. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  5559. if (!process.env.BABEL_TYPES_8_BREAKING)
  5560. return;
  5561. if (val && node.computed) {
  5562. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  5563. }
  5564. }, {
  5565. type: "boolean"
  5566. }), function(node, key, val) {
  5567. if (!process.env.BABEL_TYPES_8_BREAKING)
  5568. return;
  5569. if (val && !(0, _is.default)("Identifier", node.key)) {
  5570. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  5571. }
  5572. }),
  5573. default: false
  5574. },
  5575. decorators: {
  5576. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5577. optional: true
  5578. }
  5579. },
  5580. visitor: ["key", "value", "decorators"],
  5581. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  5582. validate: function() {
  5583. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  5584. const expression = (0, _utils.assertNodeType)("Expression");
  5585. return function(parent, key, node) {
  5586. if (!process.env.BABEL_TYPES_8_BREAKING)
  5587. return;
  5588. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  5589. validator(node, "value", node.value);
  5590. };
  5591. }()
  5592. });
  5593. (0, _utils.default)("RestElement", {
  5594. visitor: ["argument", "typeAnnotation"],
  5595. builder: ["argument"],
  5596. aliases: ["LVal", "PatternLike"],
  5597. deprecatedAlias: "RestProperty",
  5598. fields: Object.assign({}, patternLikeCommon, {
  5599. argument: {
  5600. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  5601. }
  5602. }),
  5603. validate(parent, key) {
  5604. if (!process.env.BABEL_TYPES_8_BREAKING)
  5605. return;
  5606. const match = /(\w+)\[(\d+)\]/.exec(key);
  5607. if (!match)
  5608. throw new Error("Internal Babel error: malformed key.");
  5609. const [, listKey, index2] = match;
  5610. if (parent[listKey].length > index2 + 1) {
  5611. throw new TypeError(`RestElement must be last element of ${listKey}`);
  5612. }
  5613. }
  5614. });
  5615. (0, _utils.default)("ReturnStatement", {
  5616. visitor: ["argument"],
  5617. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  5618. fields: {
  5619. argument: {
  5620. validate: (0, _utils.assertNodeType)("Expression"),
  5621. optional: true
  5622. }
  5623. }
  5624. });
  5625. (0, _utils.default)("SequenceExpression", {
  5626. visitor: ["expressions"],
  5627. fields: {
  5628. expressions: {
  5629. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  5630. }
  5631. },
  5632. aliases: ["Expression"]
  5633. });
  5634. (0, _utils.default)("ParenthesizedExpression", {
  5635. visitor: ["expression"],
  5636. aliases: ["Expression", "ExpressionWrapper"],
  5637. fields: {
  5638. expression: {
  5639. validate: (0, _utils.assertNodeType)("Expression")
  5640. }
  5641. }
  5642. });
  5643. (0, _utils.default)("SwitchCase", {
  5644. visitor: ["test", "consequent"],
  5645. fields: {
  5646. test: {
  5647. validate: (0, _utils.assertNodeType)("Expression"),
  5648. optional: true
  5649. },
  5650. consequent: {
  5651. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  5652. }
  5653. }
  5654. });
  5655. (0, _utils.default)("SwitchStatement", {
  5656. visitor: ["discriminant", "cases"],
  5657. aliases: ["Statement", "BlockParent", "Scopable"],
  5658. fields: {
  5659. discriminant: {
  5660. validate: (0, _utils.assertNodeType)("Expression")
  5661. },
  5662. cases: {
  5663. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  5664. }
  5665. }
  5666. });
  5667. (0, _utils.default)("ThisExpression", {
  5668. aliases: ["Expression"]
  5669. });
  5670. (0, _utils.default)("ThrowStatement", {
  5671. visitor: ["argument"],
  5672. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  5673. fields: {
  5674. argument: {
  5675. validate: (0, _utils.assertNodeType)("Expression")
  5676. }
  5677. }
  5678. });
  5679. (0, _utils.default)("TryStatement", {
  5680. visitor: ["block", "handler", "finalizer"],
  5681. aliases: ["Statement"],
  5682. fields: {
  5683. block: {
  5684. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  5685. if (!process.env.BABEL_TYPES_8_BREAKING)
  5686. return;
  5687. if (!node.handler && !node.finalizer) {
  5688. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  5689. }
  5690. }, {
  5691. oneOfNodeTypes: ["BlockStatement"]
  5692. }))
  5693. },
  5694. handler: {
  5695. optional: true,
  5696. validate: (0, _utils.assertNodeType)("CatchClause")
  5697. },
  5698. finalizer: {
  5699. optional: true,
  5700. validate: (0, _utils.assertNodeType)("BlockStatement")
  5701. }
  5702. }
  5703. });
  5704. (0, _utils.default)("UnaryExpression", {
  5705. builder: ["operator", "argument", "prefix"],
  5706. fields: {
  5707. prefix: {
  5708. default: true
  5709. },
  5710. argument: {
  5711. validate: (0, _utils.assertNodeType)("Expression")
  5712. },
  5713. operator: {
  5714. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  5715. }
  5716. },
  5717. visitor: ["argument"],
  5718. aliases: ["UnaryLike", "Expression"]
  5719. });
  5720. (0, _utils.default)("UpdateExpression", {
  5721. builder: ["operator", "argument", "prefix"],
  5722. fields: {
  5723. prefix: {
  5724. default: false
  5725. },
  5726. argument: {
  5727. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  5728. },
  5729. operator: {
  5730. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  5731. }
  5732. },
  5733. visitor: ["argument"],
  5734. aliases: ["Expression"]
  5735. });
  5736. (0, _utils.default)("VariableDeclaration", {
  5737. builder: ["kind", "declarations"],
  5738. visitor: ["declarations"],
  5739. aliases: ["Statement", "Declaration"],
  5740. fields: {
  5741. declare: {
  5742. validate: (0, _utils.assertValueType)("boolean"),
  5743. optional: true
  5744. },
  5745. kind: {
  5746. validate: (0, _utils.assertOneOf)("var", "let", "const")
  5747. },
  5748. declarations: {
  5749. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  5750. }
  5751. },
  5752. validate(parent, key, node) {
  5753. if (!process.env.BABEL_TYPES_8_BREAKING)
  5754. return;
  5755. if (!(0, _is.default)("ForXStatement", parent, {
  5756. left: node
  5757. }))
  5758. return;
  5759. if (node.declarations.length !== 1) {
  5760. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  5761. }
  5762. }
  5763. });
  5764. (0, _utils.default)("VariableDeclarator", {
  5765. visitor: ["id", "init"],
  5766. fields: {
  5767. id: {
  5768. validate: function() {
  5769. if (!process.env.BABEL_TYPES_8_BREAKING) {
  5770. return (0, _utils.assertNodeType)("LVal");
  5771. }
  5772. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  5773. const without = (0, _utils.assertNodeType)("Identifier");
  5774. return function(node, key, val) {
  5775. const validator = node.init ? normal : without;
  5776. validator(node, key, val);
  5777. };
  5778. }()
  5779. },
  5780. definite: {
  5781. optional: true,
  5782. validate: (0, _utils.assertValueType)("boolean")
  5783. },
  5784. init: {
  5785. optional: true,
  5786. validate: (0, _utils.assertNodeType)("Expression")
  5787. }
  5788. }
  5789. });
  5790. (0, _utils.default)("WhileStatement", {
  5791. visitor: ["test", "body"],
  5792. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  5793. fields: {
  5794. test: {
  5795. validate: (0, _utils.assertNodeType)("Expression")
  5796. },
  5797. body: {
  5798. validate: (0, _utils.assertNodeType)("Statement")
  5799. }
  5800. }
  5801. });
  5802. (0, _utils.default)("WithStatement", {
  5803. visitor: ["object", "body"],
  5804. aliases: ["Statement"],
  5805. fields: {
  5806. object: {
  5807. validate: (0, _utils.assertNodeType)("Expression")
  5808. },
  5809. body: {
  5810. validate: (0, _utils.assertNodeType)("Statement")
  5811. }
  5812. }
  5813. });
  5814. (0, _utils.default)("AssignmentPattern", {
  5815. visitor: ["left", "right", "decorators"],
  5816. builder: ["left", "right"],
  5817. aliases: ["Pattern", "PatternLike", "LVal"],
  5818. fields: Object.assign({}, patternLikeCommon, {
  5819. left: {
  5820. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  5821. },
  5822. right: {
  5823. validate: (0, _utils.assertNodeType)("Expression")
  5824. },
  5825. decorators: {
  5826. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5827. optional: true
  5828. }
  5829. })
  5830. });
  5831. (0, _utils.default)("ArrayPattern", {
  5832. visitor: ["elements", "typeAnnotation"],
  5833. builder: ["elements"],
  5834. aliases: ["Pattern", "PatternLike", "LVal"],
  5835. fields: Object.assign({}, patternLikeCommon, {
  5836. elements: {
  5837. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  5838. },
  5839. decorators: {
  5840. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5841. optional: true
  5842. }
  5843. })
  5844. });
  5845. (0, _utils.default)("ArrowFunctionExpression", {
  5846. builder: ["params", "body", "async"],
  5847. visitor: ["params", "body", "returnType", "typeParameters"],
  5848. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  5849. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  5850. expression: {
  5851. validate: (0, _utils.assertValueType)("boolean")
  5852. },
  5853. body: {
  5854. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  5855. }
  5856. })
  5857. });
  5858. (0, _utils.default)("ClassBody", {
  5859. visitor: ["body"],
  5860. fields: {
  5861. body: {
  5862. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  5863. }
  5864. }
  5865. });
  5866. (0, _utils.default)("ClassExpression", {
  5867. builder: ["id", "superClass", "body", "decorators"],
  5868. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  5869. aliases: ["Scopable", "Class", "Expression"],
  5870. fields: {
  5871. id: {
  5872. validate: (0, _utils.assertNodeType)("Identifier"),
  5873. optional: true
  5874. },
  5875. typeParameters: {
  5876. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5877. optional: true
  5878. },
  5879. body: {
  5880. validate: (0, _utils.assertNodeType)("ClassBody")
  5881. },
  5882. superClass: {
  5883. optional: true,
  5884. validate: (0, _utils.assertNodeType)("Expression")
  5885. },
  5886. superTypeParameters: {
  5887. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  5888. optional: true
  5889. },
  5890. implements: {
  5891. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  5892. optional: true
  5893. },
  5894. decorators: {
  5895. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5896. optional: true
  5897. },
  5898. mixins: {
  5899. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  5900. optional: true
  5901. }
  5902. }
  5903. });
  5904. (0, _utils.default)("ClassDeclaration", {
  5905. inherits: "ClassExpression",
  5906. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  5907. fields: {
  5908. id: {
  5909. validate: (0, _utils.assertNodeType)("Identifier")
  5910. },
  5911. typeParameters: {
  5912. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5913. optional: true
  5914. },
  5915. body: {
  5916. validate: (0, _utils.assertNodeType)("ClassBody")
  5917. },
  5918. superClass: {
  5919. optional: true,
  5920. validate: (0, _utils.assertNodeType)("Expression")
  5921. },
  5922. superTypeParameters: {
  5923. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  5924. optional: true
  5925. },
  5926. implements: {
  5927. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  5928. optional: true
  5929. },
  5930. decorators: {
  5931. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  5932. optional: true
  5933. },
  5934. mixins: {
  5935. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  5936. optional: true
  5937. },
  5938. declare: {
  5939. validate: (0, _utils.assertValueType)("boolean"),
  5940. optional: true
  5941. },
  5942. abstract: {
  5943. validate: (0, _utils.assertValueType)("boolean"),
  5944. optional: true
  5945. }
  5946. },
  5947. validate: function() {
  5948. const identifier = (0, _utils.assertNodeType)("Identifier");
  5949. return function(parent, key, node) {
  5950. if (!process.env.BABEL_TYPES_8_BREAKING)
  5951. return;
  5952. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  5953. identifier(node, "id", node.id);
  5954. }
  5955. };
  5956. }()
  5957. });
  5958. (0, _utils.default)("ExportAllDeclaration", {
  5959. visitor: ["source"],
  5960. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5961. fields: {
  5962. source: {
  5963. validate: (0, _utils.assertNodeType)("StringLiteral")
  5964. },
  5965. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  5966. assertions: {
  5967. optional: true,
  5968. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  5969. }
  5970. }
  5971. });
  5972. (0, _utils.default)("ExportDefaultDeclaration", {
  5973. visitor: ["declaration"],
  5974. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5975. fields: {
  5976. declaration: {
  5977. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  5978. }
  5979. }
  5980. });
  5981. (0, _utils.default)("ExportNamedDeclaration", {
  5982. visitor: ["declaration", "specifiers", "source"],
  5983. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5984. fields: {
  5985. declaration: {
  5986. optional: true,
  5987. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  5988. if (!process.env.BABEL_TYPES_8_BREAKING)
  5989. return;
  5990. if (val && node.specifiers.length) {
  5991. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  5992. }
  5993. }, {
  5994. oneOfNodeTypes: ["Declaration"]
  5995. }), function(node, key, val) {
  5996. if (!process.env.BABEL_TYPES_8_BREAKING)
  5997. return;
  5998. if (val && node.source) {
  5999. throw new TypeError("Cannot export a declaration from a source");
  6000. }
  6001. })
  6002. },
  6003. assertions: {
  6004. optional: true,
  6005. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  6006. },
  6007. specifiers: {
  6008. default: [],
  6009. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  6010. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  6011. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  6012. if (!process.env.BABEL_TYPES_8_BREAKING)
  6013. return sourced;
  6014. return function(node, key, val) {
  6015. const validator = node.source ? sourced : sourceless;
  6016. validator(node, key, val);
  6017. };
  6018. }()))
  6019. },
  6020. source: {
  6021. validate: (0, _utils.assertNodeType)("StringLiteral"),
  6022. optional: true
  6023. },
  6024. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  6025. }
  6026. });
  6027. (0, _utils.default)("ExportSpecifier", {
  6028. visitor: ["local", "exported"],
  6029. aliases: ["ModuleSpecifier"],
  6030. fields: {
  6031. local: {
  6032. validate: (0, _utils.assertNodeType)("Identifier")
  6033. },
  6034. exported: {
  6035. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  6036. }
  6037. }
  6038. });
  6039. (0, _utils.default)("ForOfStatement", {
  6040. visitor: ["left", "right", "body"],
  6041. builder: ["left", "right", "body", "await"],
  6042. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  6043. fields: {
  6044. left: {
  6045. validate: function() {
  6046. if (!process.env.BABEL_TYPES_8_BREAKING) {
  6047. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  6048. }
  6049. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  6050. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  6051. return function(node, key, val) {
  6052. if ((0, _is.default)("VariableDeclaration", val)) {
  6053. declaration(node, key, val);
  6054. } else {
  6055. lval(node, key, val);
  6056. }
  6057. };
  6058. }()
  6059. },
  6060. right: {
  6061. validate: (0, _utils.assertNodeType)("Expression")
  6062. },
  6063. body: {
  6064. validate: (0, _utils.assertNodeType)("Statement")
  6065. },
  6066. await: {
  6067. default: false
  6068. }
  6069. }
  6070. });
  6071. (0, _utils.default)("ImportDeclaration", {
  6072. visitor: ["specifiers", "source"],
  6073. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  6074. fields: {
  6075. assertions: {
  6076. optional: true,
  6077. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  6078. },
  6079. specifiers: {
  6080. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  6081. },
  6082. source: {
  6083. validate: (0, _utils.assertNodeType)("StringLiteral")
  6084. },
  6085. importKind: {
  6086. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  6087. optional: true
  6088. }
  6089. }
  6090. });
  6091. (0, _utils.default)("ImportDefaultSpecifier", {
  6092. visitor: ["local"],
  6093. aliases: ["ModuleSpecifier"],
  6094. fields: {
  6095. local: {
  6096. validate: (0, _utils.assertNodeType)("Identifier")
  6097. }
  6098. }
  6099. });
  6100. (0, _utils.default)("ImportNamespaceSpecifier", {
  6101. visitor: ["local"],
  6102. aliases: ["ModuleSpecifier"],
  6103. fields: {
  6104. local: {
  6105. validate: (0, _utils.assertNodeType)("Identifier")
  6106. }
  6107. }
  6108. });
  6109. (0, _utils.default)("ImportSpecifier", {
  6110. visitor: ["local", "imported"],
  6111. aliases: ["ModuleSpecifier"],
  6112. fields: {
  6113. local: {
  6114. validate: (0, _utils.assertNodeType)("Identifier")
  6115. },
  6116. imported: {
  6117. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  6118. },
  6119. importKind: {
  6120. validate: (0, _utils.assertOneOf)("type", "typeof"),
  6121. optional: true
  6122. }
  6123. }
  6124. });
  6125. (0, _utils.default)("MetaProperty", {
  6126. visitor: ["meta", "property"],
  6127. aliases: ["Expression"],
  6128. fields: {
  6129. meta: {
  6130. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  6131. if (!process.env.BABEL_TYPES_8_BREAKING)
  6132. return;
  6133. let property;
  6134. switch (val.name) {
  6135. case "function":
  6136. property = "sent";
  6137. break;
  6138. case "new":
  6139. property = "target";
  6140. break;
  6141. case "import":
  6142. property = "meta";
  6143. break;
  6144. }
  6145. if (!(0, _is.default)("Identifier", node.property, {
  6146. name: property
  6147. })) {
  6148. throw new TypeError("Unrecognised MetaProperty");
  6149. }
  6150. }, {
  6151. oneOfNodeTypes: ["Identifier"]
  6152. }))
  6153. },
  6154. property: {
  6155. validate: (0, _utils.assertNodeType)("Identifier")
  6156. }
  6157. }
  6158. });
  6159. var classMethodOrPropertyCommon = {
  6160. abstract: {
  6161. validate: (0, _utils.assertValueType)("boolean"),
  6162. optional: true
  6163. },
  6164. accessibility: {
  6165. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  6166. optional: true
  6167. },
  6168. static: {
  6169. default: false
  6170. },
  6171. override: {
  6172. default: false
  6173. },
  6174. computed: {
  6175. default: false
  6176. },
  6177. optional: {
  6178. validate: (0, _utils.assertValueType)("boolean"),
  6179. optional: true
  6180. },
  6181. key: {
  6182. validate: (0, _utils.chain)(function() {
  6183. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  6184. const computed = (0, _utils.assertNodeType)("Expression");
  6185. return function(node, key, val) {
  6186. const validator = node.computed ? computed : normal;
  6187. validator(node, key, val);
  6188. };
  6189. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  6190. }
  6191. };
  6192. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  6193. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  6194. params: {
  6195. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  6196. },
  6197. kind: {
  6198. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  6199. default: "method"
  6200. },
  6201. access: {
  6202. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  6203. optional: true
  6204. },
  6205. decorators: {
  6206. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  6207. optional: true
  6208. }
  6209. });
  6210. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  6211. (0, _utils.default)("ClassMethod", {
  6212. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  6213. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  6214. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  6215. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  6216. body: {
  6217. validate: (0, _utils.assertNodeType)("BlockStatement")
  6218. }
  6219. })
  6220. });
  6221. (0, _utils.default)("ObjectPattern", {
  6222. visitor: ["properties", "typeAnnotation", "decorators"],
  6223. builder: ["properties"],
  6224. aliases: ["Pattern", "PatternLike", "LVal"],
  6225. fields: Object.assign({}, patternLikeCommon, {
  6226. properties: {
  6227. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  6228. }
  6229. })
  6230. });
  6231. (0, _utils.default)("SpreadElement", {
  6232. visitor: ["argument"],
  6233. aliases: ["UnaryLike"],
  6234. deprecatedAlias: "SpreadProperty",
  6235. fields: {
  6236. argument: {
  6237. validate: (0, _utils.assertNodeType)("Expression")
  6238. }
  6239. }
  6240. });
  6241. (0, _utils.default)("Super", {
  6242. aliases: ["Expression"]
  6243. });
  6244. (0, _utils.default)("TaggedTemplateExpression", {
  6245. visitor: ["tag", "quasi", "typeParameters"],
  6246. builder: ["tag", "quasi"],
  6247. aliases: ["Expression"],
  6248. fields: {
  6249. tag: {
  6250. validate: (0, _utils.assertNodeType)("Expression")
  6251. },
  6252. quasi: {
  6253. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  6254. },
  6255. typeParameters: {
  6256. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  6257. optional: true
  6258. }
  6259. }
  6260. });
  6261. (0, _utils.default)("TemplateElement", {
  6262. builder: ["value", "tail"],
  6263. fields: {
  6264. value: {
  6265. validate: (0, _utils.assertShape)({
  6266. raw: {
  6267. validate: (0, _utils.assertValueType)("string")
  6268. },
  6269. cooked: {
  6270. validate: (0, _utils.assertValueType)("string"),
  6271. optional: true
  6272. }
  6273. })
  6274. },
  6275. tail: {
  6276. default: false
  6277. }
  6278. }
  6279. });
  6280. (0, _utils.default)("TemplateLiteral", {
  6281. visitor: ["quasis", "expressions"],
  6282. aliases: ["Expression", "Literal"],
  6283. fields: {
  6284. quasis: {
  6285. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  6286. },
  6287. expressions: {
  6288. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  6289. if (node.quasis.length !== val.length + 1) {
  6290. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  6291. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  6292. }
  6293. })
  6294. }
  6295. }
  6296. });
  6297. (0, _utils.default)("YieldExpression", {
  6298. builder: ["argument", "delegate"],
  6299. visitor: ["argument"],
  6300. aliases: ["Expression", "Terminatorless"],
  6301. fields: {
  6302. delegate: {
  6303. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  6304. if (!process.env.BABEL_TYPES_8_BREAKING)
  6305. return;
  6306. if (val && !node.argument) {
  6307. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  6308. }
  6309. }, {
  6310. type: "boolean"
  6311. })),
  6312. default: false
  6313. },
  6314. argument: {
  6315. optional: true,
  6316. validate: (0, _utils.assertNodeType)("Expression")
  6317. }
  6318. }
  6319. });
  6320. (0, _utils.default)("AwaitExpression", {
  6321. builder: ["argument"],
  6322. visitor: ["argument"],
  6323. aliases: ["Expression", "Terminatorless"],
  6324. fields: {
  6325. argument: {
  6326. validate: (0, _utils.assertNodeType)("Expression")
  6327. }
  6328. }
  6329. });
  6330. (0, _utils.default)("Import", {
  6331. aliases: ["Expression"]
  6332. });
  6333. (0, _utils.default)("BigIntLiteral", {
  6334. builder: ["value"],
  6335. fields: {
  6336. value: {
  6337. validate: (0, _utils.assertValueType)("string")
  6338. }
  6339. },
  6340. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  6341. });
  6342. (0, _utils.default)("ExportNamespaceSpecifier", {
  6343. visitor: ["exported"],
  6344. aliases: ["ModuleSpecifier"],
  6345. fields: {
  6346. exported: {
  6347. validate: (0, _utils.assertNodeType)("Identifier")
  6348. }
  6349. }
  6350. });
  6351. (0, _utils.default)("OptionalMemberExpression", {
  6352. builder: ["object", "property", "computed", "optional"],
  6353. visitor: ["object", "property"],
  6354. aliases: ["Expression"],
  6355. fields: {
  6356. object: {
  6357. validate: (0, _utils.assertNodeType)("Expression")
  6358. },
  6359. property: {
  6360. validate: function() {
  6361. const normal = (0, _utils.assertNodeType)("Identifier");
  6362. const computed = (0, _utils.assertNodeType)("Expression");
  6363. const validator = function(node, key, val) {
  6364. const validator2 = node.computed ? computed : normal;
  6365. validator2(node, key, val);
  6366. };
  6367. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  6368. return validator;
  6369. }()
  6370. },
  6371. computed: {
  6372. default: false
  6373. },
  6374. optional: {
  6375. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  6376. }
  6377. }
  6378. });
  6379. (0, _utils.default)("OptionalCallExpression", {
  6380. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  6381. builder: ["callee", "arguments", "optional"],
  6382. aliases: ["Expression"],
  6383. fields: {
  6384. callee: {
  6385. validate: (0, _utils.assertNodeType)("Expression")
  6386. },
  6387. arguments: {
  6388. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  6389. },
  6390. optional: {
  6391. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  6392. },
  6393. typeArguments: {
  6394. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  6395. optional: true
  6396. },
  6397. typeParameters: {
  6398. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  6399. optional: true
  6400. }
  6401. }
  6402. });
  6403. (0, _utils.default)("ClassProperty", {
  6404. visitor: ["key", "value", "typeAnnotation", "decorators"],
  6405. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  6406. aliases: ["Property"],
  6407. fields: Object.assign({}, classMethodOrPropertyCommon, {
  6408. value: {
  6409. validate: (0, _utils.assertNodeType)("Expression"),
  6410. optional: true
  6411. },
  6412. definite: {
  6413. validate: (0, _utils.assertValueType)("boolean"),
  6414. optional: true
  6415. },
  6416. typeAnnotation: {
  6417. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  6418. optional: true
  6419. },
  6420. decorators: {
  6421. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  6422. optional: true
  6423. },
  6424. readonly: {
  6425. validate: (0, _utils.assertValueType)("boolean"),
  6426. optional: true
  6427. },
  6428. declare: {
  6429. validate: (0, _utils.assertValueType)("boolean"),
  6430. optional: true
  6431. }
  6432. })
  6433. });
  6434. (0, _utils.default)("ClassPrivateProperty", {
  6435. visitor: ["key", "value", "decorators", "typeAnnotation"],
  6436. builder: ["key", "value", "decorators", "static"],
  6437. aliases: ["Property", "Private"],
  6438. fields: {
  6439. key: {
  6440. validate: (0, _utils.assertNodeType)("PrivateName")
  6441. },
  6442. value: {
  6443. validate: (0, _utils.assertNodeType)("Expression"),
  6444. optional: true
  6445. },
  6446. typeAnnotation: {
  6447. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  6448. optional: true
  6449. },
  6450. decorators: {
  6451. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  6452. optional: true
  6453. }
  6454. }
  6455. });
  6456. (0, _utils.default)("ClassPrivateMethod", {
  6457. builder: ["kind", "key", "params", "body", "static"],
  6458. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  6459. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  6460. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  6461. key: {
  6462. validate: (0, _utils.assertNodeType)("PrivateName")
  6463. },
  6464. body: {
  6465. validate: (0, _utils.assertNodeType)("BlockStatement")
  6466. }
  6467. })
  6468. });
  6469. (0, _utils.default)("PrivateName", {
  6470. visitor: ["id"],
  6471. aliases: ["Private"],
  6472. fields: {
  6473. id: {
  6474. validate: (0, _utils.assertNodeType)("Identifier")
  6475. }
  6476. }
  6477. });
  6478. }
  6479. });
  6480. // node_modules/@babel/types/lib/definitions/flow.js
  6481. var require_flow = __commonJS({
  6482. "node_modules/@babel/types/lib/definitions/flow.js"() {
  6483. "use strict";
  6484. var _utils = require_utils();
  6485. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  6486. (0, _utils.default)(name2, {
  6487. builder: ["id", "typeParameters", "extends", "body"],
  6488. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  6489. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6490. fields: {
  6491. id: (0, _utils.validateType)("Identifier"),
  6492. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  6493. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  6494. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  6495. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  6496. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  6497. }
  6498. });
  6499. };
  6500. (0, _utils.default)("AnyTypeAnnotation", {
  6501. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6502. });
  6503. (0, _utils.default)("ArrayTypeAnnotation", {
  6504. visitor: ["elementType"],
  6505. aliases: ["Flow", "FlowType"],
  6506. fields: {
  6507. elementType: (0, _utils.validateType)("FlowType")
  6508. }
  6509. });
  6510. (0, _utils.default)("BooleanTypeAnnotation", {
  6511. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6512. });
  6513. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  6514. builder: ["value"],
  6515. aliases: ["Flow", "FlowType"],
  6516. fields: {
  6517. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6518. }
  6519. });
  6520. (0, _utils.default)("NullLiteralTypeAnnotation", {
  6521. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6522. });
  6523. (0, _utils.default)("ClassImplements", {
  6524. visitor: ["id", "typeParameters"],
  6525. aliases: ["Flow"],
  6526. fields: {
  6527. id: (0, _utils.validateType)("Identifier"),
  6528. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  6529. }
  6530. });
  6531. defineInterfaceishType("DeclareClass");
  6532. (0, _utils.default)("DeclareFunction", {
  6533. visitor: ["id"],
  6534. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6535. fields: {
  6536. id: (0, _utils.validateType)("Identifier"),
  6537. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  6538. }
  6539. });
  6540. defineInterfaceishType("DeclareInterface");
  6541. (0, _utils.default)("DeclareModule", {
  6542. builder: ["id", "body", "kind"],
  6543. visitor: ["id", "body"],
  6544. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6545. fields: {
  6546. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  6547. body: (0, _utils.validateType)("BlockStatement"),
  6548. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  6549. }
  6550. });
  6551. (0, _utils.default)("DeclareModuleExports", {
  6552. visitor: ["typeAnnotation"],
  6553. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6554. fields: {
  6555. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  6556. }
  6557. });
  6558. (0, _utils.default)("DeclareTypeAlias", {
  6559. visitor: ["id", "typeParameters", "right"],
  6560. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6561. fields: {
  6562. id: (0, _utils.validateType)("Identifier"),
  6563. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6564. right: (0, _utils.validateType)("FlowType")
  6565. }
  6566. });
  6567. (0, _utils.default)("DeclareOpaqueType", {
  6568. visitor: ["id", "typeParameters", "supertype"],
  6569. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6570. fields: {
  6571. id: (0, _utils.validateType)("Identifier"),
  6572. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6573. supertype: (0, _utils.validateOptionalType)("FlowType")
  6574. }
  6575. });
  6576. (0, _utils.default)("DeclareVariable", {
  6577. visitor: ["id"],
  6578. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6579. fields: {
  6580. id: (0, _utils.validateType)("Identifier")
  6581. }
  6582. });
  6583. (0, _utils.default)("DeclareExportDeclaration", {
  6584. visitor: ["declaration", "specifiers", "source"],
  6585. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6586. fields: {
  6587. declaration: (0, _utils.validateOptionalType)("Flow"),
  6588. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  6589. source: (0, _utils.validateOptionalType)("StringLiteral"),
  6590. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  6591. }
  6592. });
  6593. (0, _utils.default)("DeclareExportAllDeclaration", {
  6594. visitor: ["source"],
  6595. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6596. fields: {
  6597. source: (0, _utils.validateType)("StringLiteral"),
  6598. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  6599. }
  6600. });
  6601. (0, _utils.default)("DeclaredPredicate", {
  6602. visitor: ["value"],
  6603. aliases: ["Flow", "FlowPredicate"],
  6604. fields: {
  6605. value: (0, _utils.validateType)("Flow")
  6606. }
  6607. });
  6608. (0, _utils.default)("ExistsTypeAnnotation", {
  6609. aliases: ["Flow", "FlowType"]
  6610. });
  6611. (0, _utils.default)("FunctionTypeAnnotation", {
  6612. visitor: ["typeParameters", "params", "rest", "returnType"],
  6613. aliases: ["Flow", "FlowType"],
  6614. fields: {
  6615. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6616. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  6617. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  6618. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  6619. returnType: (0, _utils.validateType)("FlowType")
  6620. }
  6621. });
  6622. (0, _utils.default)("FunctionTypeParam", {
  6623. visitor: ["name", "typeAnnotation"],
  6624. aliases: ["Flow"],
  6625. fields: {
  6626. name: (0, _utils.validateOptionalType)("Identifier"),
  6627. typeAnnotation: (0, _utils.validateType)("FlowType"),
  6628. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  6629. }
  6630. });
  6631. (0, _utils.default)("GenericTypeAnnotation", {
  6632. visitor: ["id", "typeParameters"],
  6633. aliases: ["Flow", "FlowType"],
  6634. fields: {
  6635. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  6636. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  6637. }
  6638. });
  6639. (0, _utils.default)("InferredPredicate", {
  6640. aliases: ["Flow", "FlowPredicate"]
  6641. });
  6642. (0, _utils.default)("InterfaceExtends", {
  6643. visitor: ["id", "typeParameters"],
  6644. aliases: ["Flow"],
  6645. fields: {
  6646. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  6647. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  6648. }
  6649. });
  6650. defineInterfaceishType("InterfaceDeclaration");
  6651. (0, _utils.default)("InterfaceTypeAnnotation", {
  6652. visitor: ["extends", "body"],
  6653. aliases: ["Flow", "FlowType"],
  6654. fields: {
  6655. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  6656. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  6657. }
  6658. });
  6659. (0, _utils.default)("IntersectionTypeAnnotation", {
  6660. visitor: ["types"],
  6661. aliases: ["Flow", "FlowType"],
  6662. fields: {
  6663. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  6664. }
  6665. });
  6666. (0, _utils.default)("MixedTypeAnnotation", {
  6667. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6668. });
  6669. (0, _utils.default)("EmptyTypeAnnotation", {
  6670. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6671. });
  6672. (0, _utils.default)("NullableTypeAnnotation", {
  6673. visitor: ["typeAnnotation"],
  6674. aliases: ["Flow", "FlowType"],
  6675. fields: {
  6676. typeAnnotation: (0, _utils.validateType)("FlowType")
  6677. }
  6678. });
  6679. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  6680. builder: ["value"],
  6681. aliases: ["Flow", "FlowType"],
  6682. fields: {
  6683. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  6684. }
  6685. });
  6686. (0, _utils.default)("NumberTypeAnnotation", {
  6687. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6688. });
  6689. (0, _utils.default)("ObjectTypeAnnotation", {
  6690. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  6691. aliases: ["Flow", "FlowType"],
  6692. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  6693. fields: {
  6694. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  6695. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  6696. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  6697. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  6698. exact: {
  6699. validate: (0, _utils.assertValueType)("boolean"),
  6700. default: false
  6701. },
  6702. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  6703. }
  6704. });
  6705. (0, _utils.default)("ObjectTypeInternalSlot", {
  6706. visitor: ["id", "value", "optional", "static", "method"],
  6707. aliases: ["Flow", "UserWhitespacable"],
  6708. fields: {
  6709. id: (0, _utils.validateType)("Identifier"),
  6710. value: (0, _utils.validateType)("FlowType"),
  6711. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6712. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6713. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6714. }
  6715. });
  6716. (0, _utils.default)("ObjectTypeCallProperty", {
  6717. visitor: ["value"],
  6718. aliases: ["Flow", "UserWhitespacable"],
  6719. fields: {
  6720. value: (0, _utils.validateType)("FlowType"),
  6721. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6722. }
  6723. });
  6724. (0, _utils.default)("ObjectTypeIndexer", {
  6725. visitor: ["id", "key", "value", "variance"],
  6726. aliases: ["Flow", "UserWhitespacable"],
  6727. fields: {
  6728. id: (0, _utils.validateOptionalType)("Identifier"),
  6729. key: (0, _utils.validateType)("FlowType"),
  6730. value: (0, _utils.validateType)("FlowType"),
  6731. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6732. variance: (0, _utils.validateOptionalType)("Variance")
  6733. }
  6734. });
  6735. (0, _utils.default)("ObjectTypeProperty", {
  6736. visitor: ["key", "value", "variance"],
  6737. aliases: ["Flow", "UserWhitespacable"],
  6738. fields: {
  6739. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  6740. value: (0, _utils.validateType)("FlowType"),
  6741. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  6742. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6743. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6744. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6745. variance: (0, _utils.validateOptionalType)("Variance"),
  6746. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6747. }
  6748. });
  6749. (0, _utils.default)("ObjectTypeSpreadProperty", {
  6750. visitor: ["argument"],
  6751. aliases: ["Flow", "UserWhitespacable"],
  6752. fields: {
  6753. argument: (0, _utils.validateType)("FlowType")
  6754. }
  6755. });
  6756. (0, _utils.default)("OpaqueType", {
  6757. visitor: ["id", "typeParameters", "supertype", "impltype"],
  6758. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6759. fields: {
  6760. id: (0, _utils.validateType)("Identifier"),
  6761. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6762. supertype: (0, _utils.validateOptionalType)("FlowType"),
  6763. impltype: (0, _utils.validateType)("FlowType")
  6764. }
  6765. });
  6766. (0, _utils.default)("QualifiedTypeIdentifier", {
  6767. visitor: ["id", "qualification"],
  6768. aliases: ["Flow"],
  6769. fields: {
  6770. id: (0, _utils.validateType)("Identifier"),
  6771. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  6772. }
  6773. });
  6774. (0, _utils.default)("StringLiteralTypeAnnotation", {
  6775. builder: ["value"],
  6776. aliases: ["Flow", "FlowType"],
  6777. fields: {
  6778. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  6779. }
  6780. });
  6781. (0, _utils.default)("StringTypeAnnotation", {
  6782. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6783. });
  6784. (0, _utils.default)("SymbolTypeAnnotation", {
  6785. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6786. });
  6787. (0, _utils.default)("ThisTypeAnnotation", {
  6788. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6789. });
  6790. (0, _utils.default)("TupleTypeAnnotation", {
  6791. visitor: ["types"],
  6792. aliases: ["Flow", "FlowType"],
  6793. fields: {
  6794. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  6795. }
  6796. });
  6797. (0, _utils.default)("TypeofTypeAnnotation", {
  6798. visitor: ["argument"],
  6799. aliases: ["Flow", "FlowType"],
  6800. fields: {
  6801. argument: (0, _utils.validateType)("FlowType")
  6802. }
  6803. });
  6804. (0, _utils.default)("TypeAlias", {
  6805. visitor: ["id", "typeParameters", "right"],
  6806. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6807. fields: {
  6808. id: (0, _utils.validateType)("Identifier"),
  6809. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  6810. right: (0, _utils.validateType)("FlowType")
  6811. }
  6812. });
  6813. (0, _utils.default)("TypeAnnotation", {
  6814. aliases: ["Flow"],
  6815. visitor: ["typeAnnotation"],
  6816. fields: {
  6817. typeAnnotation: (0, _utils.validateType)("FlowType")
  6818. }
  6819. });
  6820. (0, _utils.default)("TypeCastExpression", {
  6821. visitor: ["expression", "typeAnnotation"],
  6822. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  6823. fields: {
  6824. expression: (0, _utils.validateType)("Expression"),
  6825. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  6826. }
  6827. });
  6828. (0, _utils.default)("TypeParameter", {
  6829. aliases: ["Flow"],
  6830. visitor: ["bound", "default", "variance"],
  6831. fields: {
  6832. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  6833. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  6834. default: (0, _utils.validateOptionalType)("FlowType"),
  6835. variance: (0, _utils.validateOptionalType)("Variance")
  6836. }
  6837. });
  6838. (0, _utils.default)("TypeParameterDeclaration", {
  6839. aliases: ["Flow"],
  6840. visitor: ["params"],
  6841. fields: {
  6842. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  6843. }
  6844. });
  6845. (0, _utils.default)("TypeParameterInstantiation", {
  6846. aliases: ["Flow"],
  6847. visitor: ["params"],
  6848. fields: {
  6849. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  6850. }
  6851. });
  6852. (0, _utils.default)("UnionTypeAnnotation", {
  6853. visitor: ["types"],
  6854. aliases: ["Flow", "FlowType"],
  6855. fields: {
  6856. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  6857. }
  6858. });
  6859. (0, _utils.default)("Variance", {
  6860. aliases: ["Flow"],
  6861. builder: ["kind"],
  6862. fields: {
  6863. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  6864. }
  6865. });
  6866. (0, _utils.default)("VoidTypeAnnotation", {
  6867. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6868. });
  6869. (0, _utils.default)("EnumDeclaration", {
  6870. aliases: ["Statement", "Declaration"],
  6871. visitor: ["id", "body"],
  6872. fields: {
  6873. id: (0, _utils.validateType)("Identifier"),
  6874. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  6875. }
  6876. });
  6877. (0, _utils.default)("EnumBooleanBody", {
  6878. aliases: ["EnumBody"],
  6879. visitor: ["members"],
  6880. fields: {
  6881. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6882. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  6883. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6884. }
  6885. });
  6886. (0, _utils.default)("EnumNumberBody", {
  6887. aliases: ["EnumBody"],
  6888. visitor: ["members"],
  6889. fields: {
  6890. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6891. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  6892. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6893. }
  6894. });
  6895. (0, _utils.default)("EnumStringBody", {
  6896. aliases: ["EnumBody"],
  6897. visitor: ["members"],
  6898. fields: {
  6899. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  6900. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  6901. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6902. }
  6903. });
  6904. (0, _utils.default)("EnumSymbolBody", {
  6905. aliases: ["EnumBody"],
  6906. visitor: ["members"],
  6907. fields: {
  6908. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  6909. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6910. }
  6911. });
  6912. (0, _utils.default)("EnumBooleanMember", {
  6913. aliases: ["EnumMember"],
  6914. visitor: ["id"],
  6915. fields: {
  6916. id: (0, _utils.validateType)("Identifier"),
  6917. init: (0, _utils.validateType)("BooleanLiteral")
  6918. }
  6919. });
  6920. (0, _utils.default)("EnumNumberMember", {
  6921. aliases: ["EnumMember"],
  6922. visitor: ["id", "init"],
  6923. fields: {
  6924. id: (0, _utils.validateType)("Identifier"),
  6925. init: (0, _utils.validateType)("NumericLiteral")
  6926. }
  6927. });
  6928. (0, _utils.default)("EnumStringMember", {
  6929. aliases: ["EnumMember"],
  6930. visitor: ["id", "init"],
  6931. fields: {
  6932. id: (0, _utils.validateType)("Identifier"),
  6933. init: (0, _utils.validateType)("StringLiteral")
  6934. }
  6935. });
  6936. (0, _utils.default)("EnumDefaultedMember", {
  6937. aliases: ["EnumMember"],
  6938. visitor: ["id"],
  6939. fields: {
  6940. id: (0, _utils.validateType)("Identifier")
  6941. }
  6942. });
  6943. (0, _utils.default)("IndexedAccessType", {
  6944. visitor: ["objectType", "indexType"],
  6945. aliases: ["Flow", "FlowType"],
  6946. fields: {
  6947. objectType: (0, _utils.validateType)("FlowType"),
  6948. indexType: (0, _utils.validateType)("FlowType")
  6949. }
  6950. });
  6951. (0, _utils.default)("OptionalIndexedAccessType", {
  6952. visitor: ["objectType", "indexType"],
  6953. aliases: ["Flow", "FlowType"],
  6954. fields: {
  6955. objectType: (0, _utils.validateType)("FlowType"),
  6956. indexType: (0, _utils.validateType)("FlowType"),
  6957. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  6958. }
  6959. });
  6960. }
  6961. });
  6962. // node_modules/@babel/types/lib/definitions/jsx.js
  6963. var require_jsx = __commonJS({
  6964. "node_modules/@babel/types/lib/definitions/jsx.js"() {
  6965. "use strict";
  6966. var _utils = require_utils();
  6967. (0, _utils.default)("JSXAttribute", {
  6968. visitor: ["name", "value"],
  6969. aliases: ["JSX", "Immutable"],
  6970. fields: {
  6971. name: {
  6972. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  6973. },
  6974. value: {
  6975. optional: true,
  6976. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  6977. }
  6978. }
  6979. });
  6980. (0, _utils.default)("JSXClosingElement", {
  6981. visitor: ["name"],
  6982. aliases: ["JSX", "Immutable"],
  6983. fields: {
  6984. name: {
  6985. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  6986. }
  6987. }
  6988. });
  6989. (0, _utils.default)("JSXElement", {
  6990. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  6991. visitor: ["openingElement", "children", "closingElement"],
  6992. aliases: ["JSX", "Immutable", "Expression"],
  6993. fields: {
  6994. openingElement: {
  6995. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  6996. },
  6997. closingElement: {
  6998. optional: true,
  6999. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  7000. },
  7001. children: {
  7002. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  7003. },
  7004. selfClosing: {
  7005. validate: (0, _utils.assertValueType)("boolean"),
  7006. optional: true
  7007. }
  7008. }
  7009. });
  7010. (0, _utils.default)("JSXEmptyExpression", {
  7011. aliases: ["JSX"]
  7012. });
  7013. (0, _utils.default)("JSXExpressionContainer", {
  7014. visitor: ["expression"],
  7015. aliases: ["JSX", "Immutable"],
  7016. fields: {
  7017. expression: {
  7018. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  7019. }
  7020. }
  7021. });
  7022. (0, _utils.default)("JSXSpreadChild", {
  7023. visitor: ["expression"],
  7024. aliases: ["JSX", "Immutable"],
  7025. fields: {
  7026. expression: {
  7027. validate: (0, _utils.assertNodeType)("Expression")
  7028. }
  7029. }
  7030. });
  7031. (0, _utils.default)("JSXIdentifier", {
  7032. builder: ["name"],
  7033. aliases: ["JSX"],
  7034. fields: {
  7035. name: {
  7036. validate: (0, _utils.assertValueType)("string")
  7037. }
  7038. }
  7039. });
  7040. (0, _utils.default)("JSXMemberExpression", {
  7041. visitor: ["object", "property"],
  7042. aliases: ["JSX"],
  7043. fields: {
  7044. object: {
  7045. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  7046. },
  7047. property: {
  7048. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  7049. }
  7050. }
  7051. });
  7052. (0, _utils.default)("JSXNamespacedName", {
  7053. visitor: ["namespace", "name"],
  7054. aliases: ["JSX"],
  7055. fields: {
  7056. namespace: {
  7057. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  7058. },
  7059. name: {
  7060. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  7061. }
  7062. }
  7063. });
  7064. (0, _utils.default)("JSXOpeningElement", {
  7065. builder: ["name", "attributes", "selfClosing"],
  7066. visitor: ["name", "attributes"],
  7067. aliases: ["JSX", "Immutable"],
  7068. fields: {
  7069. name: {
  7070. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  7071. },
  7072. selfClosing: {
  7073. default: false
  7074. },
  7075. attributes: {
  7076. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  7077. },
  7078. typeParameters: {
  7079. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  7080. optional: true
  7081. }
  7082. }
  7083. });
  7084. (0, _utils.default)("JSXSpreadAttribute", {
  7085. visitor: ["argument"],
  7086. aliases: ["JSX"],
  7087. fields: {
  7088. argument: {
  7089. validate: (0, _utils.assertNodeType)("Expression")
  7090. }
  7091. }
  7092. });
  7093. (0, _utils.default)("JSXText", {
  7094. aliases: ["JSX", "Immutable"],
  7095. builder: ["value"],
  7096. fields: {
  7097. value: {
  7098. validate: (0, _utils.assertValueType)("string")
  7099. }
  7100. }
  7101. });
  7102. (0, _utils.default)("JSXFragment", {
  7103. builder: ["openingFragment", "closingFragment", "children"],
  7104. visitor: ["openingFragment", "children", "closingFragment"],
  7105. aliases: ["JSX", "Immutable", "Expression"],
  7106. fields: {
  7107. openingFragment: {
  7108. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  7109. },
  7110. closingFragment: {
  7111. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  7112. },
  7113. children: {
  7114. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  7115. }
  7116. }
  7117. });
  7118. (0, _utils.default)("JSXOpeningFragment", {
  7119. aliases: ["JSX", "Immutable"]
  7120. });
  7121. (0, _utils.default)("JSXClosingFragment", {
  7122. aliases: ["JSX", "Immutable"]
  7123. });
  7124. }
  7125. });
  7126. // node_modules/@babel/types/lib/definitions/placeholders.js
  7127. var require_placeholders = __commonJS({
  7128. "node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  7129. "use strict";
  7130. Object.defineProperty(exports, "__esModule", {
  7131. value: true
  7132. });
  7133. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  7134. var _utils = require_utils();
  7135. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  7136. exports.PLACEHOLDERS = PLACEHOLDERS;
  7137. var PLACEHOLDERS_ALIAS = {
  7138. Declaration: ["Statement"],
  7139. Pattern: ["PatternLike", "LVal"]
  7140. };
  7141. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  7142. for (const type of PLACEHOLDERS) {
  7143. const alias = _utils.ALIAS_KEYS[type];
  7144. if (alias != null && alias.length)
  7145. PLACEHOLDERS_ALIAS[type] = alias;
  7146. }
  7147. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  7148. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  7149. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  7150. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  7151. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  7152. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  7153. }
  7154. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  7155. });
  7156. });
  7157. }
  7158. });
  7159. // node_modules/@babel/types/lib/definitions/misc.js
  7160. var require_misc = __commonJS({
  7161. "node_modules/@babel/types/lib/definitions/misc.js"() {
  7162. "use strict";
  7163. var _utils = require_utils();
  7164. var _placeholders = require_placeholders();
  7165. {
  7166. (0, _utils.default)("Noop", {
  7167. visitor: []
  7168. });
  7169. }
  7170. (0, _utils.default)("Placeholder", {
  7171. visitor: [],
  7172. builder: ["expectedNode", "name"],
  7173. fields: {
  7174. name: {
  7175. validate: (0, _utils.assertNodeType)("Identifier")
  7176. },
  7177. expectedNode: {
  7178. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  7179. }
  7180. }
  7181. });
  7182. (0, _utils.default)("V8IntrinsicIdentifier", {
  7183. builder: ["name"],
  7184. fields: {
  7185. name: {
  7186. validate: (0, _utils.assertValueType)("string")
  7187. }
  7188. }
  7189. });
  7190. }
  7191. });
  7192. // node_modules/@babel/types/lib/definitions/experimental.js
  7193. var require_experimental = __commonJS({
  7194. "node_modules/@babel/types/lib/definitions/experimental.js"() {
  7195. "use strict";
  7196. var _utils = require_utils();
  7197. (0, _utils.default)("ArgumentPlaceholder", {});
  7198. (0, _utils.default)("BindExpression", {
  7199. visitor: ["object", "callee"],
  7200. aliases: ["Expression"],
  7201. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  7202. object: {
  7203. validate: Object.assign(() => {
  7204. }, {
  7205. oneOfNodeTypes: ["Expression"]
  7206. })
  7207. },
  7208. callee: {
  7209. validate: Object.assign(() => {
  7210. }, {
  7211. oneOfNodeTypes: ["Expression"]
  7212. })
  7213. }
  7214. } : {
  7215. object: {
  7216. validate: (0, _utils.assertNodeType)("Expression")
  7217. },
  7218. callee: {
  7219. validate: (0, _utils.assertNodeType)("Expression")
  7220. }
  7221. }
  7222. });
  7223. (0, _utils.default)("PipelineTopicExpression", {
  7224. builder: ["expression"],
  7225. visitor: ["expression"],
  7226. fields: {
  7227. expression: {
  7228. validate: (0, _utils.assertNodeType)("Expression")
  7229. }
  7230. }
  7231. });
  7232. (0, _utils.default)("PipelineBareFunction", {
  7233. builder: ["callee"],
  7234. visitor: ["callee"],
  7235. fields: {
  7236. callee: {
  7237. validate: (0, _utils.assertNodeType)("Expression")
  7238. }
  7239. }
  7240. });
  7241. (0, _utils.default)("PipelinePrimaryTopicReference", {
  7242. aliases: ["Expression"]
  7243. });
  7244. (0, _utils.default)("ImportAttribute", {
  7245. visitor: ["key", "value"],
  7246. fields: {
  7247. key: {
  7248. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  7249. },
  7250. value: {
  7251. validate: (0, _utils.assertNodeType)("StringLiteral")
  7252. }
  7253. }
  7254. });
  7255. (0, _utils.default)("Decorator", {
  7256. visitor: ["expression"],
  7257. fields: {
  7258. expression: {
  7259. validate: (0, _utils.assertNodeType)("Expression")
  7260. }
  7261. }
  7262. });
  7263. (0, _utils.default)("DoExpression", {
  7264. visitor: ["body"],
  7265. builder: ["body", "async"],
  7266. aliases: ["Expression"],
  7267. fields: {
  7268. body: {
  7269. validate: (0, _utils.assertNodeType)("BlockStatement")
  7270. },
  7271. async: {
  7272. validate: (0, _utils.assertValueType)("boolean"),
  7273. default: false
  7274. }
  7275. }
  7276. });
  7277. (0, _utils.default)("ExportDefaultSpecifier", {
  7278. visitor: ["exported"],
  7279. aliases: ["ModuleSpecifier"],
  7280. fields: {
  7281. exported: {
  7282. validate: (0, _utils.assertNodeType)("Identifier")
  7283. }
  7284. }
  7285. });
  7286. (0, _utils.default)("RecordExpression", {
  7287. visitor: ["properties"],
  7288. aliases: ["Expression"],
  7289. fields: {
  7290. properties: {
  7291. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  7292. }
  7293. }
  7294. });
  7295. (0, _utils.default)("TupleExpression", {
  7296. fields: {
  7297. elements: {
  7298. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  7299. default: []
  7300. }
  7301. },
  7302. visitor: ["elements"],
  7303. aliases: ["Expression"]
  7304. });
  7305. (0, _utils.default)("DecimalLiteral", {
  7306. builder: ["value"],
  7307. fields: {
  7308. value: {
  7309. validate: (0, _utils.assertValueType)("string")
  7310. }
  7311. },
  7312. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  7313. });
  7314. (0, _utils.default)("StaticBlock", {
  7315. visitor: ["body"],
  7316. fields: {
  7317. body: {
  7318. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  7319. }
  7320. },
  7321. aliases: ["Scopable", "BlockParent"]
  7322. });
  7323. (0, _utils.default)("ModuleExpression", {
  7324. visitor: ["body"],
  7325. fields: {
  7326. body: {
  7327. validate: (0, _utils.assertNodeType)("Program")
  7328. }
  7329. },
  7330. aliases: ["Expression"]
  7331. });
  7332. }
  7333. });
  7334. // node_modules/@babel/types/lib/definitions/typescript.js
  7335. var require_typescript = __commonJS({
  7336. "node_modules/@babel/types/lib/definitions/typescript.js"() {
  7337. "use strict";
  7338. var _utils = require_utils();
  7339. var _core = require_core();
  7340. var _is = require_is();
  7341. var bool = (0, _utils.assertValueType)("boolean");
  7342. var tSFunctionTypeAnnotationCommon = {
  7343. returnType: {
  7344. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  7345. optional: true
  7346. },
  7347. typeParameters: {
  7348. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  7349. optional: true
  7350. }
  7351. };
  7352. (0, _utils.default)("TSParameterProperty", {
  7353. aliases: ["LVal"],
  7354. visitor: ["parameter"],
  7355. fields: {
  7356. accessibility: {
  7357. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  7358. optional: true
  7359. },
  7360. readonly: {
  7361. validate: (0, _utils.assertValueType)("boolean"),
  7362. optional: true
  7363. },
  7364. parameter: {
  7365. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  7366. }
  7367. }
  7368. });
  7369. (0, _utils.default)("TSDeclareFunction", {
  7370. aliases: ["Statement", "Declaration"],
  7371. visitor: ["id", "typeParameters", "params", "returnType"],
  7372. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  7373. });
  7374. (0, _utils.default)("TSDeclareMethod", {
  7375. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  7376. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  7377. });
  7378. (0, _utils.default)("TSQualifiedName", {
  7379. aliases: ["TSEntityName"],
  7380. visitor: ["left", "right"],
  7381. fields: {
  7382. left: (0, _utils.validateType)("TSEntityName"),
  7383. right: (0, _utils.validateType)("Identifier")
  7384. }
  7385. });
  7386. var signatureDeclarationCommon = {
  7387. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  7388. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  7389. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  7390. };
  7391. var callConstructSignatureDeclaration = {
  7392. aliases: ["TSTypeElement"],
  7393. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  7394. fields: signatureDeclarationCommon
  7395. };
  7396. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  7397. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  7398. var namedTypeElementCommon = {
  7399. key: (0, _utils.validateType)("Expression"),
  7400. computed: (0, _utils.validate)(bool),
  7401. optional: (0, _utils.validateOptional)(bool)
  7402. };
  7403. (0, _utils.default)("TSPropertySignature", {
  7404. aliases: ["TSTypeElement"],
  7405. visitor: ["key", "typeAnnotation", "initializer"],
  7406. fields: Object.assign({}, namedTypeElementCommon, {
  7407. readonly: (0, _utils.validateOptional)(bool),
  7408. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  7409. initializer: (0, _utils.validateOptionalType)("Expression")
  7410. })
  7411. });
  7412. (0, _utils.default)("TSMethodSignature", {
  7413. aliases: ["TSTypeElement"],
  7414. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  7415. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  7416. kind: {
  7417. validate: (0, _utils.assertOneOf)("method", "get", "set")
  7418. }
  7419. })
  7420. });
  7421. (0, _utils.default)("TSIndexSignature", {
  7422. aliases: ["TSTypeElement"],
  7423. visitor: ["parameters", "typeAnnotation"],
  7424. fields: {
  7425. readonly: (0, _utils.validateOptional)(bool),
  7426. static: (0, _utils.validateOptional)(bool),
  7427. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  7428. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  7429. }
  7430. });
  7431. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  7432. for (const type of tsKeywordTypes) {
  7433. (0, _utils.default)(type, {
  7434. aliases: ["TSType", "TSBaseType"],
  7435. visitor: [],
  7436. fields: {}
  7437. });
  7438. }
  7439. (0, _utils.default)("TSThisType", {
  7440. aliases: ["TSType", "TSBaseType"],
  7441. visitor: [],
  7442. fields: {}
  7443. });
  7444. var fnOrCtrBase = {
  7445. aliases: ["TSType"],
  7446. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  7447. };
  7448. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  7449. fields: signatureDeclarationCommon
  7450. }));
  7451. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  7452. fields: Object.assign({}, signatureDeclarationCommon, {
  7453. abstract: (0, _utils.validateOptional)(bool)
  7454. })
  7455. }));
  7456. (0, _utils.default)("TSTypeReference", {
  7457. aliases: ["TSType"],
  7458. visitor: ["typeName", "typeParameters"],
  7459. fields: {
  7460. typeName: (0, _utils.validateType)("TSEntityName"),
  7461. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  7462. }
  7463. });
  7464. (0, _utils.default)("TSTypePredicate", {
  7465. aliases: ["TSType"],
  7466. visitor: ["parameterName", "typeAnnotation"],
  7467. builder: ["parameterName", "typeAnnotation", "asserts"],
  7468. fields: {
  7469. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  7470. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  7471. asserts: (0, _utils.validateOptional)(bool)
  7472. }
  7473. });
  7474. (0, _utils.default)("TSTypeQuery", {
  7475. aliases: ["TSType"],
  7476. visitor: ["exprName"],
  7477. fields: {
  7478. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  7479. }
  7480. });
  7481. (0, _utils.default)("TSTypeLiteral", {
  7482. aliases: ["TSType"],
  7483. visitor: ["members"],
  7484. fields: {
  7485. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  7486. }
  7487. });
  7488. (0, _utils.default)("TSArrayType", {
  7489. aliases: ["TSType"],
  7490. visitor: ["elementType"],
  7491. fields: {
  7492. elementType: (0, _utils.validateType)("TSType")
  7493. }
  7494. });
  7495. (0, _utils.default)("TSTupleType", {
  7496. aliases: ["TSType"],
  7497. visitor: ["elementTypes"],
  7498. fields: {
  7499. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  7500. }
  7501. });
  7502. (0, _utils.default)("TSOptionalType", {
  7503. aliases: ["TSType"],
  7504. visitor: ["typeAnnotation"],
  7505. fields: {
  7506. typeAnnotation: (0, _utils.validateType)("TSType")
  7507. }
  7508. });
  7509. (0, _utils.default)("TSRestType", {
  7510. aliases: ["TSType"],
  7511. visitor: ["typeAnnotation"],
  7512. fields: {
  7513. typeAnnotation: (0, _utils.validateType)("TSType")
  7514. }
  7515. });
  7516. (0, _utils.default)("TSNamedTupleMember", {
  7517. visitor: ["label", "elementType"],
  7518. builder: ["label", "elementType", "optional"],
  7519. fields: {
  7520. label: (0, _utils.validateType)("Identifier"),
  7521. optional: {
  7522. validate: bool,
  7523. default: false
  7524. },
  7525. elementType: (0, _utils.validateType)("TSType")
  7526. }
  7527. });
  7528. var unionOrIntersection = {
  7529. aliases: ["TSType"],
  7530. visitor: ["types"],
  7531. fields: {
  7532. types: (0, _utils.validateArrayOfType)("TSType")
  7533. }
  7534. };
  7535. (0, _utils.default)("TSUnionType", unionOrIntersection);
  7536. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  7537. (0, _utils.default)("TSConditionalType", {
  7538. aliases: ["TSType"],
  7539. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  7540. fields: {
  7541. checkType: (0, _utils.validateType)("TSType"),
  7542. extendsType: (0, _utils.validateType)("TSType"),
  7543. trueType: (0, _utils.validateType)("TSType"),
  7544. falseType: (0, _utils.validateType)("TSType")
  7545. }
  7546. });
  7547. (0, _utils.default)("TSInferType", {
  7548. aliases: ["TSType"],
  7549. visitor: ["typeParameter"],
  7550. fields: {
  7551. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  7552. }
  7553. });
  7554. (0, _utils.default)("TSParenthesizedType", {
  7555. aliases: ["TSType"],
  7556. visitor: ["typeAnnotation"],
  7557. fields: {
  7558. typeAnnotation: (0, _utils.validateType)("TSType")
  7559. }
  7560. });
  7561. (0, _utils.default)("TSTypeOperator", {
  7562. aliases: ["TSType"],
  7563. visitor: ["typeAnnotation"],
  7564. fields: {
  7565. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  7566. typeAnnotation: (0, _utils.validateType)("TSType")
  7567. }
  7568. });
  7569. (0, _utils.default)("TSIndexedAccessType", {
  7570. aliases: ["TSType"],
  7571. visitor: ["objectType", "indexType"],
  7572. fields: {
  7573. objectType: (0, _utils.validateType)("TSType"),
  7574. indexType: (0, _utils.validateType)("TSType")
  7575. }
  7576. });
  7577. (0, _utils.default)("TSMappedType", {
  7578. aliases: ["TSType"],
  7579. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  7580. fields: {
  7581. readonly: (0, _utils.validateOptional)(bool),
  7582. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  7583. optional: (0, _utils.validateOptional)(bool),
  7584. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  7585. nameType: (0, _utils.validateOptionalType)("TSType")
  7586. }
  7587. });
  7588. (0, _utils.default)("TSLiteralType", {
  7589. aliases: ["TSType", "TSBaseType"],
  7590. visitor: ["literal"],
  7591. fields: {
  7592. literal: {
  7593. validate: function() {
  7594. const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral");
  7595. const unaryOperator = (0, _utils.assertOneOf)("-");
  7596. const literal2 = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral");
  7597. function validator(parent, key, node) {
  7598. if ((0, _is.default)("UnaryExpression", node)) {
  7599. unaryOperator(node, "operator", node.operator);
  7600. unaryExpression(node, "argument", node.argument);
  7601. } else {
  7602. literal2(parent, key, node);
  7603. }
  7604. }
  7605. validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "UnaryExpression"];
  7606. return validator;
  7607. }()
  7608. }
  7609. }
  7610. });
  7611. (0, _utils.default)("TSExpressionWithTypeArguments", {
  7612. aliases: ["TSType"],
  7613. visitor: ["expression", "typeParameters"],
  7614. fields: {
  7615. expression: (0, _utils.validateType)("TSEntityName"),
  7616. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  7617. }
  7618. });
  7619. (0, _utils.default)("TSInterfaceDeclaration", {
  7620. aliases: ["Statement", "Declaration"],
  7621. visitor: ["id", "typeParameters", "extends", "body"],
  7622. fields: {
  7623. declare: (0, _utils.validateOptional)(bool),
  7624. id: (0, _utils.validateType)("Identifier"),
  7625. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  7626. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  7627. body: (0, _utils.validateType)("TSInterfaceBody")
  7628. }
  7629. });
  7630. (0, _utils.default)("TSInterfaceBody", {
  7631. visitor: ["body"],
  7632. fields: {
  7633. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  7634. }
  7635. });
  7636. (0, _utils.default)("TSTypeAliasDeclaration", {
  7637. aliases: ["Statement", "Declaration"],
  7638. visitor: ["id", "typeParameters", "typeAnnotation"],
  7639. fields: {
  7640. declare: (0, _utils.validateOptional)(bool),
  7641. id: (0, _utils.validateType)("Identifier"),
  7642. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  7643. typeAnnotation: (0, _utils.validateType)("TSType")
  7644. }
  7645. });
  7646. (0, _utils.default)("TSAsExpression", {
  7647. aliases: ["Expression"],
  7648. visitor: ["expression", "typeAnnotation"],
  7649. fields: {
  7650. expression: (0, _utils.validateType)("Expression"),
  7651. typeAnnotation: (0, _utils.validateType)("TSType")
  7652. }
  7653. });
  7654. (0, _utils.default)("TSTypeAssertion", {
  7655. aliases: ["Expression"],
  7656. visitor: ["typeAnnotation", "expression"],
  7657. fields: {
  7658. typeAnnotation: (0, _utils.validateType)("TSType"),
  7659. expression: (0, _utils.validateType)("Expression")
  7660. }
  7661. });
  7662. (0, _utils.default)("TSEnumDeclaration", {
  7663. aliases: ["Statement", "Declaration"],
  7664. visitor: ["id", "members"],
  7665. fields: {
  7666. declare: (0, _utils.validateOptional)(bool),
  7667. const: (0, _utils.validateOptional)(bool),
  7668. id: (0, _utils.validateType)("Identifier"),
  7669. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  7670. initializer: (0, _utils.validateOptionalType)("Expression")
  7671. }
  7672. });
  7673. (0, _utils.default)("TSEnumMember", {
  7674. visitor: ["id", "initializer"],
  7675. fields: {
  7676. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  7677. initializer: (0, _utils.validateOptionalType)("Expression")
  7678. }
  7679. });
  7680. (0, _utils.default)("TSModuleDeclaration", {
  7681. aliases: ["Statement", "Declaration"],
  7682. visitor: ["id", "body"],
  7683. fields: {
  7684. declare: (0, _utils.validateOptional)(bool),
  7685. global: (0, _utils.validateOptional)(bool),
  7686. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  7687. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  7688. }
  7689. });
  7690. (0, _utils.default)("TSModuleBlock", {
  7691. aliases: ["Scopable", "Block", "BlockParent"],
  7692. visitor: ["body"],
  7693. fields: {
  7694. body: (0, _utils.validateArrayOfType)("Statement")
  7695. }
  7696. });
  7697. (0, _utils.default)("TSImportType", {
  7698. aliases: ["TSType"],
  7699. visitor: ["argument", "qualifier", "typeParameters"],
  7700. fields: {
  7701. argument: (0, _utils.validateType)("StringLiteral"),
  7702. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  7703. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  7704. }
  7705. });
  7706. (0, _utils.default)("TSImportEqualsDeclaration", {
  7707. aliases: ["Statement"],
  7708. visitor: ["id", "moduleReference"],
  7709. fields: {
  7710. isExport: (0, _utils.validate)(bool),
  7711. id: (0, _utils.validateType)("Identifier"),
  7712. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  7713. }
  7714. });
  7715. (0, _utils.default)("TSExternalModuleReference", {
  7716. visitor: ["expression"],
  7717. fields: {
  7718. expression: (0, _utils.validateType)("StringLiteral")
  7719. }
  7720. });
  7721. (0, _utils.default)("TSNonNullExpression", {
  7722. aliases: ["Expression"],
  7723. visitor: ["expression"],
  7724. fields: {
  7725. expression: (0, _utils.validateType)("Expression")
  7726. }
  7727. });
  7728. (0, _utils.default)("TSExportAssignment", {
  7729. aliases: ["Statement"],
  7730. visitor: ["expression"],
  7731. fields: {
  7732. expression: (0, _utils.validateType)("Expression")
  7733. }
  7734. });
  7735. (0, _utils.default)("TSNamespaceExportDeclaration", {
  7736. aliases: ["Statement"],
  7737. visitor: ["id"],
  7738. fields: {
  7739. id: (0, _utils.validateType)("Identifier")
  7740. }
  7741. });
  7742. (0, _utils.default)("TSTypeAnnotation", {
  7743. visitor: ["typeAnnotation"],
  7744. fields: {
  7745. typeAnnotation: {
  7746. validate: (0, _utils.assertNodeType)("TSType")
  7747. }
  7748. }
  7749. });
  7750. (0, _utils.default)("TSTypeParameterInstantiation", {
  7751. visitor: ["params"],
  7752. fields: {
  7753. params: {
  7754. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  7755. }
  7756. }
  7757. });
  7758. (0, _utils.default)("TSTypeParameterDeclaration", {
  7759. visitor: ["params"],
  7760. fields: {
  7761. params: {
  7762. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  7763. }
  7764. }
  7765. });
  7766. (0, _utils.default)("TSTypeParameter", {
  7767. builder: ["constraint", "default", "name"],
  7768. visitor: ["constraint", "default"],
  7769. fields: {
  7770. name: {
  7771. validate: (0, _utils.assertValueType)("string")
  7772. },
  7773. constraint: {
  7774. validate: (0, _utils.assertNodeType)("TSType"),
  7775. optional: true
  7776. },
  7777. default: {
  7778. validate: (0, _utils.assertNodeType)("TSType"),
  7779. optional: true
  7780. }
  7781. }
  7782. });
  7783. }
  7784. });
  7785. // node_modules/@babel/types/lib/definitions/index.js
  7786. var require_definitions = __commonJS({
  7787. "node_modules/@babel/types/lib/definitions/index.js"(exports) {
  7788. "use strict";
  7789. Object.defineProperty(exports, "__esModule", {
  7790. value: true
  7791. });
  7792. Object.defineProperty(exports, "VISITOR_KEYS", {
  7793. enumerable: true,
  7794. get: function() {
  7795. return _utils.VISITOR_KEYS;
  7796. }
  7797. });
  7798. Object.defineProperty(exports, "ALIAS_KEYS", {
  7799. enumerable: true,
  7800. get: function() {
  7801. return _utils.ALIAS_KEYS;
  7802. }
  7803. });
  7804. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  7805. enumerable: true,
  7806. get: function() {
  7807. return _utils.FLIPPED_ALIAS_KEYS;
  7808. }
  7809. });
  7810. Object.defineProperty(exports, "NODE_FIELDS", {
  7811. enumerable: true,
  7812. get: function() {
  7813. return _utils.NODE_FIELDS;
  7814. }
  7815. });
  7816. Object.defineProperty(exports, "BUILDER_KEYS", {
  7817. enumerable: true,
  7818. get: function() {
  7819. return _utils.BUILDER_KEYS;
  7820. }
  7821. });
  7822. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  7823. enumerable: true,
  7824. get: function() {
  7825. return _utils.DEPRECATED_KEYS;
  7826. }
  7827. });
  7828. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  7829. enumerable: true,
  7830. get: function() {
  7831. return _utils.NODE_PARENT_VALIDATIONS;
  7832. }
  7833. });
  7834. Object.defineProperty(exports, "PLACEHOLDERS", {
  7835. enumerable: true,
  7836. get: function() {
  7837. return _placeholders.PLACEHOLDERS;
  7838. }
  7839. });
  7840. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  7841. enumerable: true,
  7842. get: function() {
  7843. return _placeholders.PLACEHOLDERS_ALIAS;
  7844. }
  7845. });
  7846. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  7847. enumerable: true,
  7848. get: function() {
  7849. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  7850. }
  7851. });
  7852. exports.TYPES = void 0;
  7853. var _toFastProperties = require_to_fast_properties();
  7854. require_core();
  7855. require_flow();
  7856. require_jsx();
  7857. require_misc();
  7858. require_experimental();
  7859. require_typescript();
  7860. var _utils = require_utils();
  7861. var _placeholders = require_placeholders();
  7862. _toFastProperties(_utils.VISITOR_KEYS);
  7863. _toFastProperties(_utils.ALIAS_KEYS);
  7864. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  7865. _toFastProperties(_utils.NODE_FIELDS);
  7866. _toFastProperties(_utils.BUILDER_KEYS);
  7867. _toFastProperties(_utils.DEPRECATED_KEYS);
  7868. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  7869. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  7870. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  7871. exports.TYPES = TYPES;
  7872. }
  7873. });
  7874. // node_modules/@babel/types/lib/builders/builder.js
  7875. var require_builder = __commonJS({
  7876. "node_modules/@babel/types/lib/builders/builder.js"(exports) {
  7877. "use strict";
  7878. Object.defineProperty(exports, "__esModule", {
  7879. value: true
  7880. });
  7881. exports.default = builder;
  7882. var _definitions = require_definitions();
  7883. var _validate = require_validate();
  7884. function builder(type, ...args) {
  7885. const keys2 = _definitions.BUILDER_KEYS[type];
  7886. const countArgs = args.length;
  7887. if (countArgs > keys2.length) {
  7888. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  7889. }
  7890. const node = {
  7891. type
  7892. };
  7893. let i = 0;
  7894. keys2.forEach((key) => {
  7895. const field = _definitions.NODE_FIELDS[type][key];
  7896. let arg;
  7897. if (i < countArgs)
  7898. arg = args[i];
  7899. if (arg === void 0) {
  7900. arg = Array.isArray(field.default) ? [] : field.default;
  7901. }
  7902. node[key] = arg;
  7903. i++;
  7904. });
  7905. for (const key of Object.keys(node)) {
  7906. (0, _validate.default)(node, key, node[key]);
  7907. }
  7908. return node;
  7909. }
  7910. }
  7911. });
  7912. // node_modules/@babel/types/lib/builders/generated/index.js
  7913. var require_generated2 = __commonJS({
  7914. "node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  7915. "use strict";
  7916. Object.defineProperty(exports, "__esModule", {
  7917. value: true
  7918. });
  7919. exports.arrayExpression = arrayExpression;
  7920. exports.assignmentExpression = assignmentExpression;
  7921. exports.binaryExpression = binaryExpression;
  7922. exports.interpreterDirective = interpreterDirective;
  7923. exports.directive = directive;
  7924. exports.directiveLiteral = directiveLiteral;
  7925. exports.blockStatement = blockStatement;
  7926. exports.breakStatement = breakStatement;
  7927. exports.callExpression = callExpression;
  7928. exports.catchClause = catchClause;
  7929. exports.conditionalExpression = conditionalExpression;
  7930. exports.continueStatement = continueStatement;
  7931. exports.debuggerStatement = debuggerStatement;
  7932. exports.doWhileStatement = doWhileStatement;
  7933. exports.emptyStatement = emptyStatement;
  7934. exports.expressionStatement = expressionStatement;
  7935. exports.file = file;
  7936. exports.forInStatement = forInStatement;
  7937. exports.forStatement = forStatement;
  7938. exports.functionDeclaration = functionDeclaration;
  7939. exports.functionExpression = functionExpression;
  7940. exports.identifier = identifier;
  7941. exports.ifStatement = ifStatement;
  7942. exports.labeledStatement = labeledStatement;
  7943. exports.stringLiteral = stringLiteral;
  7944. exports.numericLiteral = numericLiteral;
  7945. exports.nullLiteral = nullLiteral;
  7946. exports.booleanLiteral = booleanLiteral;
  7947. exports.regExpLiteral = regExpLiteral;
  7948. exports.logicalExpression = logicalExpression;
  7949. exports.memberExpression = memberExpression;
  7950. exports.newExpression = newExpression;
  7951. exports.program = program;
  7952. exports.objectExpression = objectExpression;
  7953. exports.objectMethod = objectMethod;
  7954. exports.objectProperty = objectProperty;
  7955. exports.restElement = restElement;
  7956. exports.returnStatement = returnStatement;
  7957. exports.sequenceExpression = sequenceExpression;
  7958. exports.parenthesizedExpression = parenthesizedExpression;
  7959. exports.switchCase = switchCase;
  7960. exports.switchStatement = switchStatement;
  7961. exports.thisExpression = thisExpression;
  7962. exports.throwStatement = throwStatement;
  7963. exports.tryStatement = tryStatement;
  7964. exports.unaryExpression = unaryExpression;
  7965. exports.updateExpression = updateExpression;
  7966. exports.variableDeclaration = variableDeclaration;
  7967. exports.variableDeclarator = variableDeclarator;
  7968. exports.whileStatement = whileStatement;
  7969. exports.withStatement = withStatement;
  7970. exports.assignmentPattern = assignmentPattern;
  7971. exports.arrayPattern = arrayPattern;
  7972. exports.arrowFunctionExpression = arrowFunctionExpression;
  7973. exports.classBody = classBody;
  7974. exports.classExpression = classExpression;
  7975. exports.classDeclaration = classDeclaration;
  7976. exports.exportAllDeclaration = exportAllDeclaration;
  7977. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  7978. exports.exportNamedDeclaration = exportNamedDeclaration;
  7979. exports.exportSpecifier = exportSpecifier;
  7980. exports.forOfStatement = forOfStatement;
  7981. exports.importDeclaration = importDeclaration;
  7982. exports.importDefaultSpecifier = importDefaultSpecifier;
  7983. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  7984. exports.importSpecifier = importSpecifier;
  7985. exports.metaProperty = metaProperty;
  7986. exports.classMethod = classMethod;
  7987. exports.objectPattern = objectPattern;
  7988. exports.spreadElement = spreadElement;
  7989. exports.super = _super;
  7990. exports.taggedTemplateExpression = taggedTemplateExpression;
  7991. exports.templateElement = templateElement;
  7992. exports.templateLiteral = templateLiteral;
  7993. exports.yieldExpression = yieldExpression;
  7994. exports.awaitExpression = awaitExpression;
  7995. exports.import = _import;
  7996. exports.bigIntLiteral = bigIntLiteral;
  7997. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  7998. exports.optionalMemberExpression = optionalMemberExpression;
  7999. exports.optionalCallExpression = optionalCallExpression;
  8000. exports.classProperty = classProperty;
  8001. exports.classPrivateProperty = classPrivateProperty;
  8002. exports.classPrivateMethod = classPrivateMethod;
  8003. exports.privateName = privateName;
  8004. exports.anyTypeAnnotation = anyTypeAnnotation;
  8005. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  8006. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  8007. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  8008. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  8009. exports.classImplements = classImplements;
  8010. exports.declareClass = declareClass;
  8011. exports.declareFunction = declareFunction;
  8012. exports.declareInterface = declareInterface;
  8013. exports.declareModule = declareModule;
  8014. exports.declareModuleExports = declareModuleExports;
  8015. exports.declareTypeAlias = declareTypeAlias;
  8016. exports.declareOpaqueType = declareOpaqueType;
  8017. exports.declareVariable = declareVariable;
  8018. exports.declareExportDeclaration = declareExportDeclaration;
  8019. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  8020. exports.declaredPredicate = declaredPredicate;
  8021. exports.existsTypeAnnotation = existsTypeAnnotation;
  8022. exports.functionTypeAnnotation = functionTypeAnnotation;
  8023. exports.functionTypeParam = functionTypeParam;
  8024. exports.genericTypeAnnotation = genericTypeAnnotation;
  8025. exports.inferredPredicate = inferredPredicate;
  8026. exports.interfaceExtends = interfaceExtends;
  8027. exports.interfaceDeclaration = interfaceDeclaration;
  8028. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  8029. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  8030. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  8031. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  8032. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  8033. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  8034. exports.numberTypeAnnotation = numberTypeAnnotation;
  8035. exports.objectTypeAnnotation = objectTypeAnnotation;
  8036. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  8037. exports.objectTypeCallProperty = objectTypeCallProperty;
  8038. exports.objectTypeIndexer = objectTypeIndexer;
  8039. exports.objectTypeProperty = objectTypeProperty;
  8040. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  8041. exports.opaqueType = opaqueType;
  8042. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  8043. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  8044. exports.stringTypeAnnotation = stringTypeAnnotation;
  8045. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  8046. exports.thisTypeAnnotation = thisTypeAnnotation;
  8047. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  8048. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  8049. exports.typeAlias = typeAlias;
  8050. exports.typeAnnotation = typeAnnotation;
  8051. exports.typeCastExpression = typeCastExpression;
  8052. exports.typeParameter = typeParameter;
  8053. exports.typeParameterDeclaration = typeParameterDeclaration;
  8054. exports.typeParameterInstantiation = typeParameterInstantiation;
  8055. exports.unionTypeAnnotation = unionTypeAnnotation;
  8056. exports.variance = variance;
  8057. exports.voidTypeAnnotation = voidTypeAnnotation;
  8058. exports.enumDeclaration = enumDeclaration;
  8059. exports.enumBooleanBody = enumBooleanBody;
  8060. exports.enumNumberBody = enumNumberBody;
  8061. exports.enumStringBody = enumStringBody;
  8062. exports.enumSymbolBody = enumSymbolBody;
  8063. exports.enumBooleanMember = enumBooleanMember;
  8064. exports.enumNumberMember = enumNumberMember;
  8065. exports.enumStringMember = enumStringMember;
  8066. exports.enumDefaultedMember = enumDefaultedMember;
  8067. exports.indexedAccessType = indexedAccessType;
  8068. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  8069. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  8070. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  8071. exports.jSXElement = exports.jsxElement = jsxElement;
  8072. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  8073. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  8074. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  8075. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  8076. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  8077. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  8078. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  8079. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  8080. exports.jSXText = exports.jsxText = jsxText2;
  8081. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  8082. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  8083. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  8084. exports.noop = noop;
  8085. exports.placeholder = placeholder;
  8086. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  8087. exports.argumentPlaceholder = argumentPlaceholder;
  8088. exports.bindExpression = bindExpression;
  8089. exports.pipelineTopicExpression = pipelineTopicExpression;
  8090. exports.pipelineBareFunction = pipelineBareFunction;
  8091. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  8092. exports.importAttribute = importAttribute;
  8093. exports.decorator = decorator;
  8094. exports.doExpression = doExpression;
  8095. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  8096. exports.recordExpression = recordExpression;
  8097. exports.tupleExpression = tupleExpression;
  8098. exports.decimalLiteral = decimalLiteral;
  8099. exports.staticBlock = staticBlock;
  8100. exports.moduleExpression = moduleExpression;
  8101. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  8102. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  8103. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  8104. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  8105. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  8106. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  8107. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  8108. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  8109. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  8110. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  8111. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  8112. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  8113. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  8114. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  8115. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  8116. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  8117. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  8118. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  8119. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  8120. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  8121. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  8122. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  8123. exports.tSThisType = exports.tsThisType = tsThisType;
  8124. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  8125. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  8126. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  8127. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  8128. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  8129. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  8130. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  8131. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  8132. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  8133. exports.tSRestType = exports.tsRestType = tsRestType;
  8134. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  8135. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  8136. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  8137. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  8138. exports.tSInferType = exports.tsInferType = tsInferType;
  8139. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  8140. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  8141. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  8142. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  8143. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  8144. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  8145. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  8146. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  8147. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  8148. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  8149. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  8150. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  8151. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  8152. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  8153. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  8154. exports.tSImportType = exports.tsImportType = tsImportType;
  8155. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  8156. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  8157. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  8158. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  8159. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  8160. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  8161. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  8162. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  8163. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  8164. exports.numberLiteral = NumberLiteral;
  8165. exports.regexLiteral = RegexLiteral;
  8166. exports.restProperty = RestProperty;
  8167. exports.spreadProperty = SpreadProperty;
  8168. var _builder = require_builder();
  8169. function arrayExpression(elements) {
  8170. return (0, _builder.default)("ArrayExpression", ...arguments);
  8171. }
  8172. function assignmentExpression(operator, left, right) {
  8173. return (0, _builder.default)("AssignmentExpression", ...arguments);
  8174. }
  8175. function binaryExpression(operator, left, right) {
  8176. return (0, _builder.default)("BinaryExpression", ...arguments);
  8177. }
  8178. function interpreterDirective(value) {
  8179. return (0, _builder.default)("InterpreterDirective", ...arguments);
  8180. }
  8181. function directive(value) {
  8182. return (0, _builder.default)("Directive", ...arguments);
  8183. }
  8184. function directiveLiteral(value) {
  8185. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  8186. }
  8187. function blockStatement(body, directives) {
  8188. return (0, _builder.default)("BlockStatement", ...arguments);
  8189. }
  8190. function breakStatement(label) {
  8191. return (0, _builder.default)("BreakStatement", ...arguments);
  8192. }
  8193. function callExpression(callee, _arguments) {
  8194. return (0, _builder.default)("CallExpression", ...arguments);
  8195. }
  8196. function catchClause(param, body) {
  8197. return (0, _builder.default)("CatchClause", ...arguments);
  8198. }
  8199. function conditionalExpression(test, consequent, alternate) {
  8200. return (0, _builder.default)("ConditionalExpression", ...arguments);
  8201. }
  8202. function continueStatement(label) {
  8203. return (0, _builder.default)("ContinueStatement", ...arguments);
  8204. }
  8205. function debuggerStatement() {
  8206. return (0, _builder.default)("DebuggerStatement", ...arguments);
  8207. }
  8208. function doWhileStatement(test, body) {
  8209. return (0, _builder.default)("DoWhileStatement", ...arguments);
  8210. }
  8211. function emptyStatement() {
  8212. return (0, _builder.default)("EmptyStatement", ...arguments);
  8213. }
  8214. function expressionStatement(expression) {
  8215. return (0, _builder.default)("ExpressionStatement", ...arguments);
  8216. }
  8217. function file(program2, comments, tokens) {
  8218. return (0, _builder.default)("File", ...arguments);
  8219. }
  8220. function forInStatement(left, right, body) {
  8221. return (0, _builder.default)("ForInStatement", ...arguments);
  8222. }
  8223. function forStatement(init, test, update, body) {
  8224. return (0, _builder.default)("ForStatement", ...arguments);
  8225. }
  8226. function functionDeclaration(id, params, body, generator, async) {
  8227. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  8228. }
  8229. function functionExpression(id, params, body, generator, async) {
  8230. return (0, _builder.default)("FunctionExpression", ...arguments);
  8231. }
  8232. function identifier(name2) {
  8233. return (0, _builder.default)("Identifier", ...arguments);
  8234. }
  8235. function ifStatement(test, consequent, alternate) {
  8236. return (0, _builder.default)("IfStatement", ...arguments);
  8237. }
  8238. function labeledStatement(label, body) {
  8239. return (0, _builder.default)("LabeledStatement", ...arguments);
  8240. }
  8241. function stringLiteral(value) {
  8242. return (0, _builder.default)("StringLiteral", ...arguments);
  8243. }
  8244. function numericLiteral(value) {
  8245. return (0, _builder.default)("NumericLiteral", ...arguments);
  8246. }
  8247. function nullLiteral() {
  8248. return (0, _builder.default)("NullLiteral", ...arguments);
  8249. }
  8250. function booleanLiteral(value) {
  8251. return (0, _builder.default)("BooleanLiteral", ...arguments);
  8252. }
  8253. function regExpLiteral(pattern, flags) {
  8254. return (0, _builder.default)("RegExpLiteral", ...arguments);
  8255. }
  8256. function logicalExpression(operator, left, right) {
  8257. return (0, _builder.default)("LogicalExpression", ...arguments);
  8258. }
  8259. function memberExpression(object, property, computed, optional) {
  8260. return (0, _builder.default)("MemberExpression", ...arguments);
  8261. }
  8262. function newExpression(callee, _arguments) {
  8263. return (0, _builder.default)("NewExpression", ...arguments);
  8264. }
  8265. function program(body, directives, sourceType, interpreter) {
  8266. return (0, _builder.default)("Program", ...arguments);
  8267. }
  8268. function objectExpression(properties) {
  8269. return (0, _builder.default)("ObjectExpression", ...arguments);
  8270. }
  8271. function objectMethod(kind, key, params, body, computed, generator, async) {
  8272. return (0, _builder.default)("ObjectMethod", ...arguments);
  8273. }
  8274. function objectProperty(key, value, computed, shorthand, decorators) {
  8275. return (0, _builder.default)("ObjectProperty", ...arguments);
  8276. }
  8277. function restElement(argument) {
  8278. return (0, _builder.default)("RestElement", ...arguments);
  8279. }
  8280. function returnStatement(argument) {
  8281. return (0, _builder.default)("ReturnStatement", ...arguments);
  8282. }
  8283. function sequenceExpression(expressions) {
  8284. return (0, _builder.default)("SequenceExpression", ...arguments);
  8285. }
  8286. function parenthesizedExpression(expression) {
  8287. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  8288. }
  8289. function switchCase(test, consequent) {
  8290. return (0, _builder.default)("SwitchCase", ...arguments);
  8291. }
  8292. function switchStatement(discriminant, cases) {
  8293. return (0, _builder.default)("SwitchStatement", ...arguments);
  8294. }
  8295. function thisExpression() {
  8296. return (0, _builder.default)("ThisExpression", ...arguments);
  8297. }
  8298. function throwStatement(argument) {
  8299. return (0, _builder.default)("ThrowStatement", ...arguments);
  8300. }
  8301. function tryStatement(block, handler, finalizer) {
  8302. return (0, _builder.default)("TryStatement", ...arguments);
  8303. }
  8304. function unaryExpression(operator, argument, prefix) {
  8305. return (0, _builder.default)("UnaryExpression", ...arguments);
  8306. }
  8307. function updateExpression(operator, argument, prefix) {
  8308. return (0, _builder.default)("UpdateExpression", ...arguments);
  8309. }
  8310. function variableDeclaration(kind, declarations) {
  8311. return (0, _builder.default)("VariableDeclaration", ...arguments);
  8312. }
  8313. function variableDeclarator(id, init) {
  8314. return (0, _builder.default)("VariableDeclarator", ...arguments);
  8315. }
  8316. function whileStatement(test, body) {
  8317. return (0, _builder.default)("WhileStatement", ...arguments);
  8318. }
  8319. function withStatement(object, body) {
  8320. return (0, _builder.default)("WithStatement", ...arguments);
  8321. }
  8322. function assignmentPattern(left, right) {
  8323. return (0, _builder.default)("AssignmentPattern", ...arguments);
  8324. }
  8325. function arrayPattern(elements) {
  8326. return (0, _builder.default)("ArrayPattern", ...arguments);
  8327. }
  8328. function arrowFunctionExpression(params, body, async) {
  8329. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  8330. }
  8331. function classBody(body) {
  8332. return (0, _builder.default)("ClassBody", ...arguments);
  8333. }
  8334. function classExpression(id, superClass, body, decorators) {
  8335. return (0, _builder.default)("ClassExpression", ...arguments);
  8336. }
  8337. function classDeclaration(id, superClass, body, decorators) {
  8338. return (0, _builder.default)("ClassDeclaration", ...arguments);
  8339. }
  8340. function exportAllDeclaration(source) {
  8341. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  8342. }
  8343. function exportDefaultDeclaration(declaration) {
  8344. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  8345. }
  8346. function exportNamedDeclaration(declaration, specifiers, source) {
  8347. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  8348. }
  8349. function exportSpecifier(local, exported) {
  8350. return (0, _builder.default)("ExportSpecifier", ...arguments);
  8351. }
  8352. function forOfStatement(left, right, body, _await) {
  8353. return (0, _builder.default)("ForOfStatement", ...arguments);
  8354. }
  8355. function importDeclaration(specifiers, source) {
  8356. return (0, _builder.default)("ImportDeclaration", ...arguments);
  8357. }
  8358. function importDefaultSpecifier(local) {
  8359. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  8360. }
  8361. function importNamespaceSpecifier(local) {
  8362. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  8363. }
  8364. function importSpecifier(local, imported) {
  8365. return (0, _builder.default)("ImportSpecifier", ...arguments);
  8366. }
  8367. function metaProperty(meta, property) {
  8368. return (0, _builder.default)("MetaProperty", ...arguments);
  8369. }
  8370. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  8371. return (0, _builder.default)("ClassMethod", ...arguments);
  8372. }
  8373. function objectPattern(properties) {
  8374. return (0, _builder.default)("ObjectPattern", ...arguments);
  8375. }
  8376. function spreadElement(argument) {
  8377. return (0, _builder.default)("SpreadElement", ...arguments);
  8378. }
  8379. function _super() {
  8380. return (0, _builder.default)("Super", ...arguments);
  8381. }
  8382. function taggedTemplateExpression(tag, quasi) {
  8383. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  8384. }
  8385. function templateElement(value, tail) {
  8386. return (0, _builder.default)("TemplateElement", ...arguments);
  8387. }
  8388. function templateLiteral(quasis, expressions) {
  8389. return (0, _builder.default)("TemplateLiteral", ...arguments);
  8390. }
  8391. function yieldExpression(argument, delegate) {
  8392. return (0, _builder.default)("YieldExpression", ...arguments);
  8393. }
  8394. function awaitExpression(argument) {
  8395. return (0, _builder.default)("AwaitExpression", ...arguments);
  8396. }
  8397. function _import() {
  8398. return (0, _builder.default)("Import", ...arguments);
  8399. }
  8400. function bigIntLiteral(value) {
  8401. return (0, _builder.default)("BigIntLiteral", ...arguments);
  8402. }
  8403. function exportNamespaceSpecifier(exported) {
  8404. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  8405. }
  8406. function optionalMemberExpression(object, property, computed, optional) {
  8407. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  8408. }
  8409. function optionalCallExpression(callee, _arguments, optional) {
  8410. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  8411. }
  8412. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  8413. return (0, _builder.default)("ClassProperty", ...arguments);
  8414. }
  8415. function classPrivateProperty(key, value, decorators, _static) {
  8416. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  8417. }
  8418. function classPrivateMethod(kind, key, params, body, _static) {
  8419. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  8420. }
  8421. function privateName(id) {
  8422. return (0, _builder.default)("PrivateName", ...arguments);
  8423. }
  8424. function anyTypeAnnotation() {
  8425. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  8426. }
  8427. function arrayTypeAnnotation(elementType) {
  8428. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  8429. }
  8430. function booleanTypeAnnotation() {
  8431. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  8432. }
  8433. function booleanLiteralTypeAnnotation(value) {
  8434. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  8435. }
  8436. function nullLiteralTypeAnnotation() {
  8437. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  8438. }
  8439. function classImplements(id, typeParameters) {
  8440. return (0, _builder.default)("ClassImplements", ...arguments);
  8441. }
  8442. function declareClass(id, typeParameters, _extends, body) {
  8443. return (0, _builder.default)("DeclareClass", ...arguments);
  8444. }
  8445. function declareFunction(id) {
  8446. return (0, _builder.default)("DeclareFunction", ...arguments);
  8447. }
  8448. function declareInterface(id, typeParameters, _extends, body) {
  8449. return (0, _builder.default)("DeclareInterface", ...arguments);
  8450. }
  8451. function declareModule(id, body, kind) {
  8452. return (0, _builder.default)("DeclareModule", ...arguments);
  8453. }
  8454. function declareModuleExports(typeAnnotation2) {
  8455. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  8456. }
  8457. function declareTypeAlias(id, typeParameters, right) {
  8458. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  8459. }
  8460. function declareOpaqueType(id, typeParameters, supertype) {
  8461. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  8462. }
  8463. function declareVariable(id) {
  8464. return (0, _builder.default)("DeclareVariable", ...arguments);
  8465. }
  8466. function declareExportDeclaration(declaration, specifiers, source) {
  8467. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  8468. }
  8469. function declareExportAllDeclaration(source) {
  8470. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  8471. }
  8472. function declaredPredicate(value) {
  8473. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  8474. }
  8475. function existsTypeAnnotation() {
  8476. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  8477. }
  8478. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  8479. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  8480. }
  8481. function functionTypeParam(name2, typeAnnotation2) {
  8482. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  8483. }
  8484. function genericTypeAnnotation(id, typeParameters) {
  8485. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  8486. }
  8487. function inferredPredicate() {
  8488. return (0, _builder.default)("InferredPredicate", ...arguments);
  8489. }
  8490. function interfaceExtends(id, typeParameters) {
  8491. return (0, _builder.default)("InterfaceExtends", ...arguments);
  8492. }
  8493. function interfaceDeclaration(id, typeParameters, _extends, body) {
  8494. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  8495. }
  8496. function interfaceTypeAnnotation(_extends, body) {
  8497. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  8498. }
  8499. function intersectionTypeAnnotation(types2) {
  8500. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  8501. }
  8502. function mixedTypeAnnotation() {
  8503. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  8504. }
  8505. function emptyTypeAnnotation() {
  8506. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  8507. }
  8508. function nullableTypeAnnotation(typeAnnotation2) {
  8509. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  8510. }
  8511. function numberLiteralTypeAnnotation(value) {
  8512. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  8513. }
  8514. function numberTypeAnnotation() {
  8515. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  8516. }
  8517. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  8518. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  8519. }
  8520. function objectTypeInternalSlot(id, value, optional, _static, method) {
  8521. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  8522. }
  8523. function objectTypeCallProperty(value) {
  8524. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  8525. }
  8526. function objectTypeIndexer(id, key, value, variance2) {
  8527. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  8528. }
  8529. function objectTypeProperty(key, value, variance2) {
  8530. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  8531. }
  8532. function objectTypeSpreadProperty(argument) {
  8533. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  8534. }
  8535. function opaqueType(id, typeParameters, supertype, impltype) {
  8536. return (0, _builder.default)("OpaqueType", ...arguments);
  8537. }
  8538. function qualifiedTypeIdentifier(id, qualification) {
  8539. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  8540. }
  8541. function stringLiteralTypeAnnotation(value) {
  8542. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  8543. }
  8544. function stringTypeAnnotation() {
  8545. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  8546. }
  8547. function symbolTypeAnnotation() {
  8548. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  8549. }
  8550. function thisTypeAnnotation() {
  8551. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  8552. }
  8553. function tupleTypeAnnotation(types2) {
  8554. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  8555. }
  8556. function typeofTypeAnnotation(argument) {
  8557. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  8558. }
  8559. function typeAlias(id, typeParameters, right) {
  8560. return (0, _builder.default)("TypeAlias", ...arguments);
  8561. }
  8562. function typeAnnotation(typeAnnotation2) {
  8563. return (0, _builder.default)("TypeAnnotation", ...arguments);
  8564. }
  8565. function typeCastExpression(expression, typeAnnotation2) {
  8566. return (0, _builder.default)("TypeCastExpression", ...arguments);
  8567. }
  8568. function typeParameter(bound, _default, variance2) {
  8569. return (0, _builder.default)("TypeParameter", ...arguments);
  8570. }
  8571. function typeParameterDeclaration(params) {
  8572. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  8573. }
  8574. function typeParameterInstantiation(params) {
  8575. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  8576. }
  8577. function unionTypeAnnotation(types2) {
  8578. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  8579. }
  8580. function variance(kind) {
  8581. return (0, _builder.default)("Variance", ...arguments);
  8582. }
  8583. function voidTypeAnnotation() {
  8584. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  8585. }
  8586. function enumDeclaration(id, body) {
  8587. return (0, _builder.default)("EnumDeclaration", ...arguments);
  8588. }
  8589. function enumBooleanBody(members) {
  8590. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  8591. }
  8592. function enumNumberBody(members) {
  8593. return (0, _builder.default)("EnumNumberBody", ...arguments);
  8594. }
  8595. function enumStringBody(members) {
  8596. return (0, _builder.default)("EnumStringBody", ...arguments);
  8597. }
  8598. function enumSymbolBody(members) {
  8599. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  8600. }
  8601. function enumBooleanMember(id) {
  8602. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  8603. }
  8604. function enumNumberMember(id, init) {
  8605. return (0, _builder.default)("EnumNumberMember", ...arguments);
  8606. }
  8607. function enumStringMember(id, init) {
  8608. return (0, _builder.default)("EnumStringMember", ...arguments);
  8609. }
  8610. function enumDefaultedMember(id) {
  8611. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  8612. }
  8613. function indexedAccessType(objectType, indexType) {
  8614. return (0, _builder.default)("IndexedAccessType", ...arguments);
  8615. }
  8616. function optionalIndexedAccessType(objectType, indexType) {
  8617. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  8618. }
  8619. function jsxAttribute(name2, value) {
  8620. return (0, _builder.default)("JSXAttribute", ...arguments);
  8621. }
  8622. function jsxClosingElement(name2) {
  8623. return (0, _builder.default)("JSXClosingElement", ...arguments);
  8624. }
  8625. function jsxElement(openingElement, closingElement, children, selfClosing) {
  8626. return (0, _builder.default)("JSXElement", ...arguments);
  8627. }
  8628. function jsxEmptyExpression() {
  8629. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  8630. }
  8631. function jsxExpressionContainer(expression) {
  8632. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  8633. }
  8634. function jsxSpreadChild(expression) {
  8635. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  8636. }
  8637. function jsxIdentifier(name2) {
  8638. return (0, _builder.default)("JSXIdentifier", ...arguments);
  8639. }
  8640. function jsxMemberExpression(object, property) {
  8641. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  8642. }
  8643. function jsxNamespacedName(namespace, name2) {
  8644. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  8645. }
  8646. function jsxOpeningElement(name2, attributes, selfClosing) {
  8647. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  8648. }
  8649. function jsxSpreadAttribute(argument) {
  8650. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  8651. }
  8652. function jsxText2(value) {
  8653. return (0, _builder.default)("JSXText", ...arguments);
  8654. }
  8655. function jsxFragment(openingFragment, closingFragment, children) {
  8656. return (0, _builder.default)("JSXFragment", ...arguments);
  8657. }
  8658. function jsxOpeningFragment() {
  8659. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  8660. }
  8661. function jsxClosingFragment() {
  8662. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  8663. }
  8664. function noop() {
  8665. return (0, _builder.default)("Noop", ...arguments);
  8666. }
  8667. function placeholder(expectedNode, name2) {
  8668. return (0, _builder.default)("Placeholder", ...arguments);
  8669. }
  8670. function v8IntrinsicIdentifier(name2) {
  8671. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  8672. }
  8673. function argumentPlaceholder() {
  8674. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  8675. }
  8676. function bindExpression(object, callee) {
  8677. return (0, _builder.default)("BindExpression", ...arguments);
  8678. }
  8679. function pipelineTopicExpression(expression) {
  8680. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  8681. }
  8682. function pipelineBareFunction(callee) {
  8683. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  8684. }
  8685. function pipelinePrimaryTopicReference() {
  8686. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  8687. }
  8688. function importAttribute(key, value) {
  8689. return (0, _builder.default)("ImportAttribute", ...arguments);
  8690. }
  8691. function decorator(expression) {
  8692. return (0, _builder.default)("Decorator", ...arguments);
  8693. }
  8694. function doExpression(body, async) {
  8695. return (0, _builder.default)("DoExpression", ...arguments);
  8696. }
  8697. function exportDefaultSpecifier(exported) {
  8698. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  8699. }
  8700. function recordExpression(properties) {
  8701. return (0, _builder.default)("RecordExpression", ...arguments);
  8702. }
  8703. function tupleExpression(elements) {
  8704. return (0, _builder.default)("TupleExpression", ...arguments);
  8705. }
  8706. function decimalLiteral(value) {
  8707. return (0, _builder.default)("DecimalLiteral", ...arguments);
  8708. }
  8709. function staticBlock(body) {
  8710. return (0, _builder.default)("StaticBlock", ...arguments);
  8711. }
  8712. function moduleExpression(body) {
  8713. return (0, _builder.default)("ModuleExpression", ...arguments);
  8714. }
  8715. function tsParameterProperty(parameter) {
  8716. return (0, _builder.default)("TSParameterProperty", ...arguments);
  8717. }
  8718. function tsDeclareFunction(id, typeParameters, params, returnType) {
  8719. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  8720. }
  8721. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  8722. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  8723. }
  8724. function tsQualifiedName(left, right) {
  8725. return (0, _builder.default)("TSQualifiedName", ...arguments);
  8726. }
  8727. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  8728. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  8729. }
  8730. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  8731. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  8732. }
  8733. function tsPropertySignature(key, typeAnnotation2, initializer) {
  8734. return (0, _builder.default)("TSPropertySignature", ...arguments);
  8735. }
  8736. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  8737. return (0, _builder.default)("TSMethodSignature", ...arguments);
  8738. }
  8739. function tsIndexSignature(parameters, typeAnnotation2) {
  8740. return (0, _builder.default)("TSIndexSignature", ...arguments);
  8741. }
  8742. function tsAnyKeyword() {
  8743. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  8744. }
  8745. function tsBooleanKeyword() {
  8746. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  8747. }
  8748. function tsBigIntKeyword() {
  8749. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  8750. }
  8751. function tsIntrinsicKeyword() {
  8752. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  8753. }
  8754. function tsNeverKeyword() {
  8755. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  8756. }
  8757. function tsNullKeyword() {
  8758. return (0, _builder.default)("TSNullKeyword", ...arguments);
  8759. }
  8760. function tsNumberKeyword() {
  8761. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  8762. }
  8763. function tsObjectKeyword() {
  8764. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  8765. }
  8766. function tsStringKeyword() {
  8767. return (0, _builder.default)("TSStringKeyword", ...arguments);
  8768. }
  8769. function tsSymbolKeyword() {
  8770. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  8771. }
  8772. function tsUndefinedKeyword() {
  8773. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  8774. }
  8775. function tsUnknownKeyword() {
  8776. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  8777. }
  8778. function tsVoidKeyword() {
  8779. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  8780. }
  8781. function tsThisType() {
  8782. return (0, _builder.default)("TSThisType", ...arguments);
  8783. }
  8784. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  8785. return (0, _builder.default)("TSFunctionType", ...arguments);
  8786. }
  8787. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  8788. return (0, _builder.default)("TSConstructorType", ...arguments);
  8789. }
  8790. function tsTypeReference(typeName, typeParameters) {
  8791. return (0, _builder.default)("TSTypeReference", ...arguments);
  8792. }
  8793. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  8794. return (0, _builder.default)("TSTypePredicate", ...arguments);
  8795. }
  8796. function tsTypeQuery(exprName) {
  8797. return (0, _builder.default)("TSTypeQuery", ...arguments);
  8798. }
  8799. function tsTypeLiteral(members) {
  8800. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  8801. }
  8802. function tsArrayType(elementType) {
  8803. return (0, _builder.default)("TSArrayType", ...arguments);
  8804. }
  8805. function tsTupleType(elementTypes) {
  8806. return (0, _builder.default)("TSTupleType", ...arguments);
  8807. }
  8808. function tsOptionalType(typeAnnotation2) {
  8809. return (0, _builder.default)("TSOptionalType", ...arguments);
  8810. }
  8811. function tsRestType(typeAnnotation2) {
  8812. return (0, _builder.default)("TSRestType", ...arguments);
  8813. }
  8814. function tsNamedTupleMember(label, elementType, optional) {
  8815. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  8816. }
  8817. function tsUnionType(types2) {
  8818. return (0, _builder.default)("TSUnionType", ...arguments);
  8819. }
  8820. function tsIntersectionType(types2) {
  8821. return (0, _builder.default)("TSIntersectionType", ...arguments);
  8822. }
  8823. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  8824. return (0, _builder.default)("TSConditionalType", ...arguments);
  8825. }
  8826. function tsInferType(typeParameter2) {
  8827. return (0, _builder.default)("TSInferType", ...arguments);
  8828. }
  8829. function tsParenthesizedType(typeAnnotation2) {
  8830. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  8831. }
  8832. function tsTypeOperator(typeAnnotation2) {
  8833. return (0, _builder.default)("TSTypeOperator", ...arguments);
  8834. }
  8835. function tsIndexedAccessType(objectType, indexType) {
  8836. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  8837. }
  8838. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  8839. return (0, _builder.default)("TSMappedType", ...arguments);
  8840. }
  8841. function tsLiteralType(literal2) {
  8842. return (0, _builder.default)("TSLiteralType", ...arguments);
  8843. }
  8844. function tsExpressionWithTypeArguments(expression, typeParameters) {
  8845. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  8846. }
  8847. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  8848. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  8849. }
  8850. function tsInterfaceBody(body) {
  8851. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  8852. }
  8853. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  8854. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  8855. }
  8856. function tsAsExpression(expression, typeAnnotation2) {
  8857. return (0, _builder.default)("TSAsExpression", ...arguments);
  8858. }
  8859. function tsTypeAssertion(typeAnnotation2, expression) {
  8860. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  8861. }
  8862. function tsEnumDeclaration(id, members) {
  8863. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  8864. }
  8865. function tsEnumMember(id, initializer) {
  8866. return (0, _builder.default)("TSEnumMember", ...arguments);
  8867. }
  8868. function tsModuleDeclaration(id, body) {
  8869. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  8870. }
  8871. function tsModuleBlock(body) {
  8872. return (0, _builder.default)("TSModuleBlock", ...arguments);
  8873. }
  8874. function tsImportType(argument, qualifier, typeParameters) {
  8875. return (0, _builder.default)("TSImportType", ...arguments);
  8876. }
  8877. function tsImportEqualsDeclaration(id, moduleReference) {
  8878. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  8879. }
  8880. function tsExternalModuleReference(expression) {
  8881. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  8882. }
  8883. function tsNonNullExpression(expression) {
  8884. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  8885. }
  8886. function tsExportAssignment(expression) {
  8887. return (0, _builder.default)("TSExportAssignment", ...arguments);
  8888. }
  8889. function tsNamespaceExportDeclaration(id) {
  8890. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  8891. }
  8892. function tsTypeAnnotation(typeAnnotation2) {
  8893. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  8894. }
  8895. function tsTypeParameterInstantiation(params) {
  8896. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  8897. }
  8898. function tsTypeParameterDeclaration(params) {
  8899. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  8900. }
  8901. function tsTypeParameter(constraint, _default, name2) {
  8902. return (0, _builder.default)("TSTypeParameter", ...arguments);
  8903. }
  8904. function NumberLiteral(...args) {
  8905. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  8906. return (0, _builder.default)("NumberLiteral", ...args);
  8907. }
  8908. function RegexLiteral(...args) {
  8909. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  8910. return (0, _builder.default)("RegexLiteral", ...args);
  8911. }
  8912. function RestProperty(...args) {
  8913. console.trace("The node type RestProperty has been renamed to RestElement");
  8914. return (0, _builder.default)("RestProperty", ...args);
  8915. }
  8916. function SpreadProperty(...args) {
  8917. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  8918. return (0, _builder.default)("SpreadProperty", ...args);
  8919. }
  8920. }
  8921. });
  8922. // node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  8923. var require_cleanJSXElementLiteralChild = __commonJS({
  8924. "node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  8925. "use strict";
  8926. Object.defineProperty(exports, "__esModule", {
  8927. value: true
  8928. });
  8929. exports.default = cleanJSXElementLiteralChild;
  8930. var _generated = require_generated2();
  8931. function cleanJSXElementLiteralChild(child, args) {
  8932. const lines = child.value.split(/\r\n|\n|\r/);
  8933. let lastNonEmptyLine = 0;
  8934. for (let i = 0; i < lines.length; i++) {
  8935. if (lines[i].match(/[^ \t]/)) {
  8936. lastNonEmptyLine = i;
  8937. }
  8938. }
  8939. let str = "";
  8940. for (let i = 0; i < lines.length; i++) {
  8941. const line = lines[i];
  8942. const isFirstLine = i === 0;
  8943. const isLastLine = i === lines.length - 1;
  8944. const isLastNonEmptyLine = i === lastNonEmptyLine;
  8945. let trimmedLine = line.replace(/\t/g, " ");
  8946. if (!isFirstLine) {
  8947. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  8948. }
  8949. if (!isLastLine) {
  8950. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  8951. }
  8952. if (trimmedLine) {
  8953. if (!isLastNonEmptyLine) {
  8954. trimmedLine += " ";
  8955. }
  8956. str += trimmedLine;
  8957. }
  8958. }
  8959. if (str)
  8960. args.push((0, _generated.stringLiteral)(str));
  8961. }
  8962. }
  8963. });
  8964. // node_modules/@babel/types/lib/builders/react/buildChildren.js
  8965. var require_buildChildren = __commonJS({
  8966. "node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  8967. "use strict";
  8968. Object.defineProperty(exports, "__esModule", {
  8969. value: true
  8970. });
  8971. exports.default = buildChildren;
  8972. var _generated = require_generated();
  8973. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild();
  8974. function buildChildren(node) {
  8975. const elements = [];
  8976. for (let i = 0; i < node.children.length; i++) {
  8977. let child = node.children[i];
  8978. if ((0, _generated.isJSXText)(child)) {
  8979. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  8980. continue;
  8981. }
  8982. if ((0, _generated.isJSXExpressionContainer)(child))
  8983. child = child.expression;
  8984. if ((0, _generated.isJSXEmptyExpression)(child))
  8985. continue;
  8986. elements.push(child);
  8987. }
  8988. return elements;
  8989. }
  8990. }
  8991. });
  8992. // node_modules/@babel/types/lib/validators/isNode.js
  8993. var require_isNode = __commonJS({
  8994. "node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  8995. "use strict";
  8996. Object.defineProperty(exports, "__esModule", {
  8997. value: true
  8998. });
  8999. exports.default = isNode;
  9000. var _definitions = require_definitions();
  9001. function isNode(node) {
  9002. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  9003. }
  9004. }
  9005. });
  9006. // node_modules/@babel/types/lib/asserts/assertNode.js
  9007. var require_assertNode = __commonJS({
  9008. "node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  9009. "use strict";
  9010. Object.defineProperty(exports, "__esModule", {
  9011. value: true
  9012. });
  9013. exports.default = assertNode2;
  9014. var _isNode = require_isNode();
  9015. function assertNode2(node) {
  9016. if (!(0, _isNode.default)(node)) {
  9017. var _node$type;
  9018. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  9019. throw new TypeError(`Not a valid node of type "${type}"`);
  9020. }
  9021. }
  9022. }
  9023. });
  9024. // node_modules/@babel/types/lib/asserts/generated/index.js
  9025. var require_generated3 = __commonJS({
  9026. "node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  9027. "use strict";
  9028. Object.defineProperty(exports, "__esModule", {
  9029. value: true
  9030. });
  9031. exports.assertArrayExpression = assertArrayExpression;
  9032. exports.assertAssignmentExpression = assertAssignmentExpression;
  9033. exports.assertBinaryExpression = assertBinaryExpression;
  9034. exports.assertInterpreterDirective = assertInterpreterDirective;
  9035. exports.assertDirective = assertDirective;
  9036. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  9037. exports.assertBlockStatement = assertBlockStatement;
  9038. exports.assertBreakStatement = assertBreakStatement;
  9039. exports.assertCallExpression = assertCallExpression;
  9040. exports.assertCatchClause = assertCatchClause;
  9041. exports.assertConditionalExpression = assertConditionalExpression;
  9042. exports.assertContinueStatement = assertContinueStatement;
  9043. exports.assertDebuggerStatement = assertDebuggerStatement;
  9044. exports.assertDoWhileStatement = assertDoWhileStatement;
  9045. exports.assertEmptyStatement = assertEmptyStatement;
  9046. exports.assertExpressionStatement = assertExpressionStatement;
  9047. exports.assertFile = assertFile;
  9048. exports.assertForInStatement = assertForInStatement;
  9049. exports.assertForStatement = assertForStatement;
  9050. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  9051. exports.assertFunctionExpression = assertFunctionExpression;
  9052. exports.assertIdentifier = assertIdentifier;
  9053. exports.assertIfStatement = assertIfStatement;
  9054. exports.assertLabeledStatement = assertLabeledStatement;
  9055. exports.assertStringLiteral = assertStringLiteral;
  9056. exports.assertNumericLiteral = assertNumericLiteral;
  9057. exports.assertNullLiteral = assertNullLiteral;
  9058. exports.assertBooleanLiteral = assertBooleanLiteral;
  9059. exports.assertRegExpLiteral = assertRegExpLiteral;
  9060. exports.assertLogicalExpression = assertLogicalExpression;
  9061. exports.assertMemberExpression = assertMemberExpression;
  9062. exports.assertNewExpression = assertNewExpression;
  9063. exports.assertProgram = assertProgram;
  9064. exports.assertObjectExpression = assertObjectExpression;
  9065. exports.assertObjectMethod = assertObjectMethod;
  9066. exports.assertObjectProperty = assertObjectProperty;
  9067. exports.assertRestElement = assertRestElement;
  9068. exports.assertReturnStatement = assertReturnStatement;
  9069. exports.assertSequenceExpression = assertSequenceExpression;
  9070. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  9071. exports.assertSwitchCase = assertSwitchCase;
  9072. exports.assertSwitchStatement = assertSwitchStatement;
  9073. exports.assertThisExpression = assertThisExpression;
  9074. exports.assertThrowStatement = assertThrowStatement;
  9075. exports.assertTryStatement = assertTryStatement;
  9076. exports.assertUnaryExpression = assertUnaryExpression;
  9077. exports.assertUpdateExpression = assertUpdateExpression;
  9078. exports.assertVariableDeclaration = assertVariableDeclaration;
  9079. exports.assertVariableDeclarator = assertVariableDeclarator;
  9080. exports.assertWhileStatement = assertWhileStatement;
  9081. exports.assertWithStatement = assertWithStatement;
  9082. exports.assertAssignmentPattern = assertAssignmentPattern;
  9083. exports.assertArrayPattern = assertArrayPattern;
  9084. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  9085. exports.assertClassBody = assertClassBody;
  9086. exports.assertClassExpression = assertClassExpression;
  9087. exports.assertClassDeclaration = assertClassDeclaration;
  9088. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  9089. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  9090. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  9091. exports.assertExportSpecifier = assertExportSpecifier;
  9092. exports.assertForOfStatement = assertForOfStatement;
  9093. exports.assertImportDeclaration = assertImportDeclaration;
  9094. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  9095. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  9096. exports.assertImportSpecifier = assertImportSpecifier;
  9097. exports.assertMetaProperty = assertMetaProperty;
  9098. exports.assertClassMethod = assertClassMethod;
  9099. exports.assertObjectPattern = assertObjectPattern;
  9100. exports.assertSpreadElement = assertSpreadElement;
  9101. exports.assertSuper = assertSuper;
  9102. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  9103. exports.assertTemplateElement = assertTemplateElement;
  9104. exports.assertTemplateLiteral = assertTemplateLiteral;
  9105. exports.assertYieldExpression = assertYieldExpression;
  9106. exports.assertAwaitExpression = assertAwaitExpression;
  9107. exports.assertImport = assertImport;
  9108. exports.assertBigIntLiteral = assertBigIntLiteral;
  9109. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  9110. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  9111. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  9112. exports.assertClassProperty = assertClassProperty;
  9113. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  9114. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  9115. exports.assertPrivateName = assertPrivateName;
  9116. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  9117. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  9118. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  9119. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  9120. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  9121. exports.assertClassImplements = assertClassImplements;
  9122. exports.assertDeclareClass = assertDeclareClass;
  9123. exports.assertDeclareFunction = assertDeclareFunction;
  9124. exports.assertDeclareInterface = assertDeclareInterface;
  9125. exports.assertDeclareModule = assertDeclareModule;
  9126. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  9127. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  9128. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  9129. exports.assertDeclareVariable = assertDeclareVariable;
  9130. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  9131. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  9132. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  9133. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  9134. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  9135. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  9136. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  9137. exports.assertInferredPredicate = assertInferredPredicate;
  9138. exports.assertInterfaceExtends = assertInterfaceExtends;
  9139. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  9140. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  9141. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  9142. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  9143. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  9144. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  9145. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  9146. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  9147. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  9148. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  9149. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  9150. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  9151. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  9152. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  9153. exports.assertOpaqueType = assertOpaqueType;
  9154. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  9155. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  9156. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  9157. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  9158. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  9159. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  9160. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  9161. exports.assertTypeAlias = assertTypeAlias;
  9162. exports.assertTypeAnnotation = assertTypeAnnotation;
  9163. exports.assertTypeCastExpression = assertTypeCastExpression;
  9164. exports.assertTypeParameter = assertTypeParameter;
  9165. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  9166. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  9167. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  9168. exports.assertVariance = assertVariance;
  9169. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  9170. exports.assertEnumDeclaration = assertEnumDeclaration;
  9171. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  9172. exports.assertEnumNumberBody = assertEnumNumberBody;
  9173. exports.assertEnumStringBody = assertEnumStringBody;
  9174. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  9175. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  9176. exports.assertEnumNumberMember = assertEnumNumberMember;
  9177. exports.assertEnumStringMember = assertEnumStringMember;
  9178. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  9179. exports.assertIndexedAccessType = assertIndexedAccessType;
  9180. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  9181. exports.assertJSXAttribute = assertJSXAttribute;
  9182. exports.assertJSXClosingElement = assertJSXClosingElement;
  9183. exports.assertJSXElement = assertJSXElement;
  9184. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  9185. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  9186. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  9187. exports.assertJSXIdentifier = assertJSXIdentifier;
  9188. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  9189. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  9190. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  9191. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  9192. exports.assertJSXText = assertJSXText;
  9193. exports.assertJSXFragment = assertJSXFragment;
  9194. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  9195. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  9196. exports.assertNoop = assertNoop;
  9197. exports.assertPlaceholder = assertPlaceholder;
  9198. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  9199. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  9200. exports.assertBindExpression = assertBindExpression;
  9201. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  9202. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  9203. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  9204. exports.assertImportAttribute = assertImportAttribute;
  9205. exports.assertDecorator = assertDecorator;
  9206. exports.assertDoExpression = assertDoExpression;
  9207. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  9208. exports.assertRecordExpression = assertRecordExpression;
  9209. exports.assertTupleExpression = assertTupleExpression;
  9210. exports.assertDecimalLiteral = assertDecimalLiteral;
  9211. exports.assertStaticBlock = assertStaticBlock;
  9212. exports.assertModuleExpression = assertModuleExpression;
  9213. exports.assertTSParameterProperty = assertTSParameterProperty;
  9214. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  9215. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  9216. exports.assertTSQualifiedName = assertTSQualifiedName;
  9217. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  9218. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  9219. exports.assertTSPropertySignature = assertTSPropertySignature;
  9220. exports.assertTSMethodSignature = assertTSMethodSignature;
  9221. exports.assertTSIndexSignature = assertTSIndexSignature;
  9222. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  9223. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  9224. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  9225. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  9226. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  9227. exports.assertTSNullKeyword = assertTSNullKeyword;
  9228. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  9229. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  9230. exports.assertTSStringKeyword = assertTSStringKeyword;
  9231. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  9232. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  9233. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  9234. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  9235. exports.assertTSThisType = assertTSThisType;
  9236. exports.assertTSFunctionType = assertTSFunctionType;
  9237. exports.assertTSConstructorType = assertTSConstructorType;
  9238. exports.assertTSTypeReference = assertTSTypeReference;
  9239. exports.assertTSTypePredicate = assertTSTypePredicate;
  9240. exports.assertTSTypeQuery = assertTSTypeQuery;
  9241. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  9242. exports.assertTSArrayType = assertTSArrayType;
  9243. exports.assertTSTupleType = assertTSTupleType;
  9244. exports.assertTSOptionalType = assertTSOptionalType;
  9245. exports.assertTSRestType = assertTSRestType;
  9246. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  9247. exports.assertTSUnionType = assertTSUnionType;
  9248. exports.assertTSIntersectionType = assertTSIntersectionType;
  9249. exports.assertTSConditionalType = assertTSConditionalType;
  9250. exports.assertTSInferType = assertTSInferType;
  9251. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  9252. exports.assertTSTypeOperator = assertTSTypeOperator;
  9253. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  9254. exports.assertTSMappedType = assertTSMappedType;
  9255. exports.assertTSLiteralType = assertTSLiteralType;
  9256. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  9257. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  9258. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  9259. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  9260. exports.assertTSAsExpression = assertTSAsExpression;
  9261. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  9262. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  9263. exports.assertTSEnumMember = assertTSEnumMember;
  9264. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  9265. exports.assertTSModuleBlock = assertTSModuleBlock;
  9266. exports.assertTSImportType = assertTSImportType;
  9267. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  9268. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  9269. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  9270. exports.assertTSExportAssignment = assertTSExportAssignment;
  9271. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  9272. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  9273. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  9274. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  9275. exports.assertTSTypeParameter = assertTSTypeParameter;
  9276. exports.assertExpression = assertExpression;
  9277. exports.assertBinary = assertBinary;
  9278. exports.assertScopable = assertScopable;
  9279. exports.assertBlockParent = assertBlockParent;
  9280. exports.assertBlock = assertBlock;
  9281. exports.assertStatement = assertStatement;
  9282. exports.assertTerminatorless = assertTerminatorless;
  9283. exports.assertCompletionStatement = assertCompletionStatement;
  9284. exports.assertConditional = assertConditional;
  9285. exports.assertLoop = assertLoop;
  9286. exports.assertWhile = assertWhile;
  9287. exports.assertExpressionWrapper = assertExpressionWrapper;
  9288. exports.assertFor = assertFor;
  9289. exports.assertForXStatement = assertForXStatement;
  9290. exports.assertFunction = assertFunction;
  9291. exports.assertFunctionParent = assertFunctionParent;
  9292. exports.assertPureish = assertPureish;
  9293. exports.assertDeclaration = assertDeclaration;
  9294. exports.assertPatternLike = assertPatternLike;
  9295. exports.assertLVal = assertLVal;
  9296. exports.assertTSEntityName = assertTSEntityName;
  9297. exports.assertLiteral = assertLiteral;
  9298. exports.assertImmutable = assertImmutable;
  9299. exports.assertUserWhitespacable = assertUserWhitespacable;
  9300. exports.assertMethod = assertMethod;
  9301. exports.assertObjectMember = assertObjectMember;
  9302. exports.assertProperty = assertProperty;
  9303. exports.assertUnaryLike = assertUnaryLike;
  9304. exports.assertPattern = assertPattern;
  9305. exports.assertClass = assertClass;
  9306. exports.assertModuleDeclaration = assertModuleDeclaration;
  9307. exports.assertExportDeclaration = assertExportDeclaration;
  9308. exports.assertModuleSpecifier = assertModuleSpecifier;
  9309. exports.assertPrivate = assertPrivate;
  9310. exports.assertFlow = assertFlow;
  9311. exports.assertFlowType = assertFlowType;
  9312. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  9313. exports.assertFlowDeclaration = assertFlowDeclaration;
  9314. exports.assertFlowPredicate = assertFlowPredicate;
  9315. exports.assertEnumBody = assertEnumBody;
  9316. exports.assertEnumMember = assertEnumMember;
  9317. exports.assertJSX = assertJSX;
  9318. exports.assertTSTypeElement = assertTSTypeElement;
  9319. exports.assertTSType = assertTSType;
  9320. exports.assertTSBaseType = assertTSBaseType;
  9321. exports.assertNumberLiteral = assertNumberLiteral;
  9322. exports.assertRegexLiteral = assertRegexLiteral;
  9323. exports.assertRestProperty = assertRestProperty;
  9324. exports.assertSpreadProperty = assertSpreadProperty;
  9325. var _is = require_is();
  9326. function assert(type, node, opts) {
  9327. if (!(0, _is.default)(type, node, opts)) {
  9328. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  9329. }
  9330. }
  9331. function assertArrayExpression(node, opts) {
  9332. assert("ArrayExpression", node, opts);
  9333. }
  9334. function assertAssignmentExpression(node, opts) {
  9335. assert("AssignmentExpression", node, opts);
  9336. }
  9337. function assertBinaryExpression(node, opts) {
  9338. assert("BinaryExpression", node, opts);
  9339. }
  9340. function assertInterpreterDirective(node, opts) {
  9341. assert("InterpreterDirective", node, opts);
  9342. }
  9343. function assertDirective(node, opts) {
  9344. assert("Directive", node, opts);
  9345. }
  9346. function assertDirectiveLiteral(node, opts) {
  9347. assert("DirectiveLiteral", node, opts);
  9348. }
  9349. function assertBlockStatement(node, opts) {
  9350. assert("BlockStatement", node, opts);
  9351. }
  9352. function assertBreakStatement(node, opts) {
  9353. assert("BreakStatement", node, opts);
  9354. }
  9355. function assertCallExpression(node, opts) {
  9356. assert("CallExpression", node, opts);
  9357. }
  9358. function assertCatchClause(node, opts) {
  9359. assert("CatchClause", node, opts);
  9360. }
  9361. function assertConditionalExpression(node, opts) {
  9362. assert("ConditionalExpression", node, opts);
  9363. }
  9364. function assertContinueStatement(node, opts) {
  9365. assert("ContinueStatement", node, opts);
  9366. }
  9367. function assertDebuggerStatement(node, opts) {
  9368. assert("DebuggerStatement", node, opts);
  9369. }
  9370. function assertDoWhileStatement(node, opts) {
  9371. assert("DoWhileStatement", node, opts);
  9372. }
  9373. function assertEmptyStatement(node, opts) {
  9374. assert("EmptyStatement", node, opts);
  9375. }
  9376. function assertExpressionStatement(node, opts) {
  9377. assert("ExpressionStatement", node, opts);
  9378. }
  9379. function assertFile(node, opts) {
  9380. assert("File", node, opts);
  9381. }
  9382. function assertForInStatement(node, opts) {
  9383. assert("ForInStatement", node, opts);
  9384. }
  9385. function assertForStatement(node, opts) {
  9386. assert("ForStatement", node, opts);
  9387. }
  9388. function assertFunctionDeclaration(node, opts) {
  9389. assert("FunctionDeclaration", node, opts);
  9390. }
  9391. function assertFunctionExpression(node, opts) {
  9392. assert("FunctionExpression", node, opts);
  9393. }
  9394. function assertIdentifier(node, opts) {
  9395. assert("Identifier", node, opts);
  9396. }
  9397. function assertIfStatement(node, opts) {
  9398. assert("IfStatement", node, opts);
  9399. }
  9400. function assertLabeledStatement(node, opts) {
  9401. assert("LabeledStatement", node, opts);
  9402. }
  9403. function assertStringLiteral(node, opts) {
  9404. assert("StringLiteral", node, opts);
  9405. }
  9406. function assertNumericLiteral(node, opts) {
  9407. assert("NumericLiteral", node, opts);
  9408. }
  9409. function assertNullLiteral(node, opts) {
  9410. assert("NullLiteral", node, opts);
  9411. }
  9412. function assertBooleanLiteral(node, opts) {
  9413. assert("BooleanLiteral", node, opts);
  9414. }
  9415. function assertRegExpLiteral(node, opts) {
  9416. assert("RegExpLiteral", node, opts);
  9417. }
  9418. function assertLogicalExpression(node, opts) {
  9419. assert("LogicalExpression", node, opts);
  9420. }
  9421. function assertMemberExpression(node, opts) {
  9422. assert("MemberExpression", node, opts);
  9423. }
  9424. function assertNewExpression(node, opts) {
  9425. assert("NewExpression", node, opts);
  9426. }
  9427. function assertProgram(node, opts) {
  9428. assert("Program", node, opts);
  9429. }
  9430. function assertObjectExpression(node, opts) {
  9431. assert("ObjectExpression", node, opts);
  9432. }
  9433. function assertObjectMethod(node, opts) {
  9434. assert("ObjectMethod", node, opts);
  9435. }
  9436. function assertObjectProperty(node, opts) {
  9437. assert("ObjectProperty", node, opts);
  9438. }
  9439. function assertRestElement(node, opts) {
  9440. assert("RestElement", node, opts);
  9441. }
  9442. function assertReturnStatement(node, opts) {
  9443. assert("ReturnStatement", node, opts);
  9444. }
  9445. function assertSequenceExpression(node, opts) {
  9446. assert("SequenceExpression", node, opts);
  9447. }
  9448. function assertParenthesizedExpression(node, opts) {
  9449. assert("ParenthesizedExpression", node, opts);
  9450. }
  9451. function assertSwitchCase(node, opts) {
  9452. assert("SwitchCase", node, opts);
  9453. }
  9454. function assertSwitchStatement(node, opts) {
  9455. assert("SwitchStatement", node, opts);
  9456. }
  9457. function assertThisExpression(node, opts) {
  9458. assert("ThisExpression", node, opts);
  9459. }
  9460. function assertThrowStatement(node, opts) {
  9461. assert("ThrowStatement", node, opts);
  9462. }
  9463. function assertTryStatement(node, opts) {
  9464. assert("TryStatement", node, opts);
  9465. }
  9466. function assertUnaryExpression(node, opts) {
  9467. assert("UnaryExpression", node, opts);
  9468. }
  9469. function assertUpdateExpression(node, opts) {
  9470. assert("UpdateExpression", node, opts);
  9471. }
  9472. function assertVariableDeclaration(node, opts) {
  9473. assert("VariableDeclaration", node, opts);
  9474. }
  9475. function assertVariableDeclarator(node, opts) {
  9476. assert("VariableDeclarator", node, opts);
  9477. }
  9478. function assertWhileStatement(node, opts) {
  9479. assert("WhileStatement", node, opts);
  9480. }
  9481. function assertWithStatement(node, opts) {
  9482. assert("WithStatement", node, opts);
  9483. }
  9484. function assertAssignmentPattern(node, opts) {
  9485. assert("AssignmentPattern", node, opts);
  9486. }
  9487. function assertArrayPattern(node, opts) {
  9488. assert("ArrayPattern", node, opts);
  9489. }
  9490. function assertArrowFunctionExpression(node, opts) {
  9491. assert("ArrowFunctionExpression", node, opts);
  9492. }
  9493. function assertClassBody(node, opts) {
  9494. assert("ClassBody", node, opts);
  9495. }
  9496. function assertClassExpression(node, opts) {
  9497. assert("ClassExpression", node, opts);
  9498. }
  9499. function assertClassDeclaration(node, opts) {
  9500. assert("ClassDeclaration", node, opts);
  9501. }
  9502. function assertExportAllDeclaration(node, opts) {
  9503. assert("ExportAllDeclaration", node, opts);
  9504. }
  9505. function assertExportDefaultDeclaration(node, opts) {
  9506. assert("ExportDefaultDeclaration", node, opts);
  9507. }
  9508. function assertExportNamedDeclaration(node, opts) {
  9509. assert("ExportNamedDeclaration", node, opts);
  9510. }
  9511. function assertExportSpecifier(node, opts) {
  9512. assert("ExportSpecifier", node, opts);
  9513. }
  9514. function assertForOfStatement(node, opts) {
  9515. assert("ForOfStatement", node, opts);
  9516. }
  9517. function assertImportDeclaration(node, opts) {
  9518. assert("ImportDeclaration", node, opts);
  9519. }
  9520. function assertImportDefaultSpecifier(node, opts) {
  9521. assert("ImportDefaultSpecifier", node, opts);
  9522. }
  9523. function assertImportNamespaceSpecifier(node, opts) {
  9524. assert("ImportNamespaceSpecifier", node, opts);
  9525. }
  9526. function assertImportSpecifier(node, opts) {
  9527. assert("ImportSpecifier", node, opts);
  9528. }
  9529. function assertMetaProperty(node, opts) {
  9530. assert("MetaProperty", node, opts);
  9531. }
  9532. function assertClassMethod(node, opts) {
  9533. assert("ClassMethod", node, opts);
  9534. }
  9535. function assertObjectPattern(node, opts) {
  9536. assert("ObjectPattern", node, opts);
  9537. }
  9538. function assertSpreadElement(node, opts) {
  9539. assert("SpreadElement", node, opts);
  9540. }
  9541. function assertSuper(node, opts) {
  9542. assert("Super", node, opts);
  9543. }
  9544. function assertTaggedTemplateExpression(node, opts) {
  9545. assert("TaggedTemplateExpression", node, opts);
  9546. }
  9547. function assertTemplateElement(node, opts) {
  9548. assert("TemplateElement", node, opts);
  9549. }
  9550. function assertTemplateLiteral(node, opts) {
  9551. assert("TemplateLiteral", node, opts);
  9552. }
  9553. function assertYieldExpression(node, opts) {
  9554. assert("YieldExpression", node, opts);
  9555. }
  9556. function assertAwaitExpression(node, opts) {
  9557. assert("AwaitExpression", node, opts);
  9558. }
  9559. function assertImport(node, opts) {
  9560. assert("Import", node, opts);
  9561. }
  9562. function assertBigIntLiteral(node, opts) {
  9563. assert("BigIntLiteral", node, opts);
  9564. }
  9565. function assertExportNamespaceSpecifier(node, opts) {
  9566. assert("ExportNamespaceSpecifier", node, opts);
  9567. }
  9568. function assertOptionalMemberExpression(node, opts) {
  9569. assert("OptionalMemberExpression", node, opts);
  9570. }
  9571. function assertOptionalCallExpression(node, opts) {
  9572. assert("OptionalCallExpression", node, opts);
  9573. }
  9574. function assertClassProperty(node, opts) {
  9575. assert("ClassProperty", node, opts);
  9576. }
  9577. function assertClassPrivateProperty(node, opts) {
  9578. assert("ClassPrivateProperty", node, opts);
  9579. }
  9580. function assertClassPrivateMethod(node, opts) {
  9581. assert("ClassPrivateMethod", node, opts);
  9582. }
  9583. function assertPrivateName(node, opts) {
  9584. assert("PrivateName", node, opts);
  9585. }
  9586. function assertAnyTypeAnnotation(node, opts) {
  9587. assert("AnyTypeAnnotation", node, opts);
  9588. }
  9589. function assertArrayTypeAnnotation(node, opts) {
  9590. assert("ArrayTypeAnnotation", node, opts);
  9591. }
  9592. function assertBooleanTypeAnnotation(node, opts) {
  9593. assert("BooleanTypeAnnotation", node, opts);
  9594. }
  9595. function assertBooleanLiteralTypeAnnotation(node, opts) {
  9596. assert("BooleanLiteralTypeAnnotation", node, opts);
  9597. }
  9598. function assertNullLiteralTypeAnnotation(node, opts) {
  9599. assert("NullLiteralTypeAnnotation", node, opts);
  9600. }
  9601. function assertClassImplements(node, opts) {
  9602. assert("ClassImplements", node, opts);
  9603. }
  9604. function assertDeclareClass(node, opts) {
  9605. assert("DeclareClass", node, opts);
  9606. }
  9607. function assertDeclareFunction(node, opts) {
  9608. assert("DeclareFunction", node, opts);
  9609. }
  9610. function assertDeclareInterface(node, opts) {
  9611. assert("DeclareInterface", node, opts);
  9612. }
  9613. function assertDeclareModule(node, opts) {
  9614. assert("DeclareModule", node, opts);
  9615. }
  9616. function assertDeclareModuleExports(node, opts) {
  9617. assert("DeclareModuleExports", node, opts);
  9618. }
  9619. function assertDeclareTypeAlias(node, opts) {
  9620. assert("DeclareTypeAlias", node, opts);
  9621. }
  9622. function assertDeclareOpaqueType(node, opts) {
  9623. assert("DeclareOpaqueType", node, opts);
  9624. }
  9625. function assertDeclareVariable(node, opts) {
  9626. assert("DeclareVariable", node, opts);
  9627. }
  9628. function assertDeclareExportDeclaration(node, opts) {
  9629. assert("DeclareExportDeclaration", node, opts);
  9630. }
  9631. function assertDeclareExportAllDeclaration(node, opts) {
  9632. assert("DeclareExportAllDeclaration", node, opts);
  9633. }
  9634. function assertDeclaredPredicate(node, opts) {
  9635. assert("DeclaredPredicate", node, opts);
  9636. }
  9637. function assertExistsTypeAnnotation(node, opts) {
  9638. assert("ExistsTypeAnnotation", node, opts);
  9639. }
  9640. function assertFunctionTypeAnnotation(node, opts) {
  9641. assert("FunctionTypeAnnotation", node, opts);
  9642. }
  9643. function assertFunctionTypeParam(node, opts) {
  9644. assert("FunctionTypeParam", node, opts);
  9645. }
  9646. function assertGenericTypeAnnotation(node, opts) {
  9647. assert("GenericTypeAnnotation", node, opts);
  9648. }
  9649. function assertInferredPredicate(node, opts) {
  9650. assert("InferredPredicate", node, opts);
  9651. }
  9652. function assertInterfaceExtends(node, opts) {
  9653. assert("InterfaceExtends", node, opts);
  9654. }
  9655. function assertInterfaceDeclaration(node, opts) {
  9656. assert("InterfaceDeclaration", node, opts);
  9657. }
  9658. function assertInterfaceTypeAnnotation(node, opts) {
  9659. assert("InterfaceTypeAnnotation", node, opts);
  9660. }
  9661. function assertIntersectionTypeAnnotation(node, opts) {
  9662. assert("IntersectionTypeAnnotation", node, opts);
  9663. }
  9664. function assertMixedTypeAnnotation(node, opts) {
  9665. assert("MixedTypeAnnotation", node, opts);
  9666. }
  9667. function assertEmptyTypeAnnotation(node, opts) {
  9668. assert("EmptyTypeAnnotation", node, opts);
  9669. }
  9670. function assertNullableTypeAnnotation(node, opts) {
  9671. assert("NullableTypeAnnotation", node, opts);
  9672. }
  9673. function assertNumberLiteralTypeAnnotation(node, opts) {
  9674. assert("NumberLiteralTypeAnnotation", node, opts);
  9675. }
  9676. function assertNumberTypeAnnotation(node, opts) {
  9677. assert("NumberTypeAnnotation", node, opts);
  9678. }
  9679. function assertObjectTypeAnnotation(node, opts) {
  9680. assert("ObjectTypeAnnotation", node, opts);
  9681. }
  9682. function assertObjectTypeInternalSlot(node, opts) {
  9683. assert("ObjectTypeInternalSlot", node, opts);
  9684. }
  9685. function assertObjectTypeCallProperty(node, opts) {
  9686. assert("ObjectTypeCallProperty", node, opts);
  9687. }
  9688. function assertObjectTypeIndexer(node, opts) {
  9689. assert("ObjectTypeIndexer", node, opts);
  9690. }
  9691. function assertObjectTypeProperty(node, opts) {
  9692. assert("ObjectTypeProperty", node, opts);
  9693. }
  9694. function assertObjectTypeSpreadProperty(node, opts) {
  9695. assert("ObjectTypeSpreadProperty", node, opts);
  9696. }
  9697. function assertOpaqueType(node, opts) {
  9698. assert("OpaqueType", node, opts);
  9699. }
  9700. function assertQualifiedTypeIdentifier(node, opts) {
  9701. assert("QualifiedTypeIdentifier", node, opts);
  9702. }
  9703. function assertStringLiteralTypeAnnotation(node, opts) {
  9704. assert("StringLiteralTypeAnnotation", node, opts);
  9705. }
  9706. function assertStringTypeAnnotation(node, opts) {
  9707. assert("StringTypeAnnotation", node, opts);
  9708. }
  9709. function assertSymbolTypeAnnotation(node, opts) {
  9710. assert("SymbolTypeAnnotation", node, opts);
  9711. }
  9712. function assertThisTypeAnnotation(node, opts) {
  9713. assert("ThisTypeAnnotation", node, opts);
  9714. }
  9715. function assertTupleTypeAnnotation(node, opts) {
  9716. assert("TupleTypeAnnotation", node, opts);
  9717. }
  9718. function assertTypeofTypeAnnotation(node, opts) {
  9719. assert("TypeofTypeAnnotation", node, opts);
  9720. }
  9721. function assertTypeAlias(node, opts) {
  9722. assert("TypeAlias", node, opts);
  9723. }
  9724. function assertTypeAnnotation(node, opts) {
  9725. assert("TypeAnnotation", node, opts);
  9726. }
  9727. function assertTypeCastExpression(node, opts) {
  9728. assert("TypeCastExpression", node, opts);
  9729. }
  9730. function assertTypeParameter(node, opts) {
  9731. assert("TypeParameter", node, opts);
  9732. }
  9733. function assertTypeParameterDeclaration(node, opts) {
  9734. assert("TypeParameterDeclaration", node, opts);
  9735. }
  9736. function assertTypeParameterInstantiation(node, opts) {
  9737. assert("TypeParameterInstantiation", node, opts);
  9738. }
  9739. function assertUnionTypeAnnotation(node, opts) {
  9740. assert("UnionTypeAnnotation", node, opts);
  9741. }
  9742. function assertVariance(node, opts) {
  9743. assert("Variance", node, opts);
  9744. }
  9745. function assertVoidTypeAnnotation(node, opts) {
  9746. assert("VoidTypeAnnotation", node, opts);
  9747. }
  9748. function assertEnumDeclaration(node, opts) {
  9749. assert("EnumDeclaration", node, opts);
  9750. }
  9751. function assertEnumBooleanBody(node, opts) {
  9752. assert("EnumBooleanBody", node, opts);
  9753. }
  9754. function assertEnumNumberBody(node, opts) {
  9755. assert("EnumNumberBody", node, opts);
  9756. }
  9757. function assertEnumStringBody(node, opts) {
  9758. assert("EnumStringBody", node, opts);
  9759. }
  9760. function assertEnumSymbolBody(node, opts) {
  9761. assert("EnumSymbolBody", node, opts);
  9762. }
  9763. function assertEnumBooleanMember(node, opts) {
  9764. assert("EnumBooleanMember", node, opts);
  9765. }
  9766. function assertEnumNumberMember(node, opts) {
  9767. assert("EnumNumberMember", node, opts);
  9768. }
  9769. function assertEnumStringMember(node, opts) {
  9770. assert("EnumStringMember", node, opts);
  9771. }
  9772. function assertEnumDefaultedMember(node, opts) {
  9773. assert("EnumDefaultedMember", node, opts);
  9774. }
  9775. function assertIndexedAccessType(node, opts) {
  9776. assert("IndexedAccessType", node, opts);
  9777. }
  9778. function assertOptionalIndexedAccessType(node, opts) {
  9779. assert("OptionalIndexedAccessType", node, opts);
  9780. }
  9781. function assertJSXAttribute(node, opts) {
  9782. assert("JSXAttribute", node, opts);
  9783. }
  9784. function assertJSXClosingElement(node, opts) {
  9785. assert("JSXClosingElement", node, opts);
  9786. }
  9787. function assertJSXElement(node, opts) {
  9788. assert("JSXElement", node, opts);
  9789. }
  9790. function assertJSXEmptyExpression(node, opts) {
  9791. assert("JSXEmptyExpression", node, opts);
  9792. }
  9793. function assertJSXExpressionContainer(node, opts) {
  9794. assert("JSXExpressionContainer", node, opts);
  9795. }
  9796. function assertJSXSpreadChild(node, opts) {
  9797. assert("JSXSpreadChild", node, opts);
  9798. }
  9799. function assertJSXIdentifier(node, opts) {
  9800. assert("JSXIdentifier", node, opts);
  9801. }
  9802. function assertJSXMemberExpression(node, opts) {
  9803. assert("JSXMemberExpression", node, opts);
  9804. }
  9805. function assertJSXNamespacedName(node, opts) {
  9806. assert("JSXNamespacedName", node, opts);
  9807. }
  9808. function assertJSXOpeningElement(node, opts) {
  9809. assert("JSXOpeningElement", node, opts);
  9810. }
  9811. function assertJSXSpreadAttribute(node, opts) {
  9812. assert("JSXSpreadAttribute", node, opts);
  9813. }
  9814. function assertJSXText(node, opts) {
  9815. assert("JSXText", node, opts);
  9816. }
  9817. function assertJSXFragment(node, opts) {
  9818. assert("JSXFragment", node, opts);
  9819. }
  9820. function assertJSXOpeningFragment(node, opts) {
  9821. assert("JSXOpeningFragment", node, opts);
  9822. }
  9823. function assertJSXClosingFragment(node, opts) {
  9824. assert("JSXClosingFragment", node, opts);
  9825. }
  9826. function assertNoop(node, opts) {
  9827. assert("Noop", node, opts);
  9828. }
  9829. function assertPlaceholder(node, opts) {
  9830. assert("Placeholder", node, opts);
  9831. }
  9832. function assertV8IntrinsicIdentifier(node, opts) {
  9833. assert("V8IntrinsicIdentifier", node, opts);
  9834. }
  9835. function assertArgumentPlaceholder(node, opts) {
  9836. assert("ArgumentPlaceholder", node, opts);
  9837. }
  9838. function assertBindExpression(node, opts) {
  9839. assert("BindExpression", node, opts);
  9840. }
  9841. function assertPipelineTopicExpression(node, opts) {
  9842. assert("PipelineTopicExpression", node, opts);
  9843. }
  9844. function assertPipelineBareFunction(node, opts) {
  9845. assert("PipelineBareFunction", node, opts);
  9846. }
  9847. function assertPipelinePrimaryTopicReference(node, opts) {
  9848. assert("PipelinePrimaryTopicReference", node, opts);
  9849. }
  9850. function assertImportAttribute(node, opts) {
  9851. assert("ImportAttribute", node, opts);
  9852. }
  9853. function assertDecorator(node, opts) {
  9854. assert("Decorator", node, opts);
  9855. }
  9856. function assertDoExpression(node, opts) {
  9857. assert("DoExpression", node, opts);
  9858. }
  9859. function assertExportDefaultSpecifier(node, opts) {
  9860. assert("ExportDefaultSpecifier", node, opts);
  9861. }
  9862. function assertRecordExpression(node, opts) {
  9863. assert("RecordExpression", node, opts);
  9864. }
  9865. function assertTupleExpression(node, opts) {
  9866. assert("TupleExpression", node, opts);
  9867. }
  9868. function assertDecimalLiteral(node, opts) {
  9869. assert("DecimalLiteral", node, opts);
  9870. }
  9871. function assertStaticBlock(node, opts) {
  9872. assert("StaticBlock", node, opts);
  9873. }
  9874. function assertModuleExpression(node, opts) {
  9875. assert("ModuleExpression", node, opts);
  9876. }
  9877. function assertTSParameterProperty(node, opts) {
  9878. assert("TSParameterProperty", node, opts);
  9879. }
  9880. function assertTSDeclareFunction(node, opts) {
  9881. assert("TSDeclareFunction", node, opts);
  9882. }
  9883. function assertTSDeclareMethod(node, opts) {
  9884. assert("TSDeclareMethod", node, opts);
  9885. }
  9886. function assertTSQualifiedName(node, opts) {
  9887. assert("TSQualifiedName", node, opts);
  9888. }
  9889. function assertTSCallSignatureDeclaration(node, opts) {
  9890. assert("TSCallSignatureDeclaration", node, opts);
  9891. }
  9892. function assertTSConstructSignatureDeclaration(node, opts) {
  9893. assert("TSConstructSignatureDeclaration", node, opts);
  9894. }
  9895. function assertTSPropertySignature(node, opts) {
  9896. assert("TSPropertySignature", node, opts);
  9897. }
  9898. function assertTSMethodSignature(node, opts) {
  9899. assert("TSMethodSignature", node, opts);
  9900. }
  9901. function assertTSIndexSignature(node, opts) {
  9902. assert("TSIndexSignature", node, opts);
  9903. }
  9904. function assertTSAnyKeyword(node, opts) {
  9905. assert("TSAnyKeyword", node, opts);
  9906. }
  9907. function assertTSBooleanKeyword(node, opts) {
  9908. assert("TSBooleanKeyword", node, opts);
  9909. }
  9910. function assertTSBigIntKeyword(node, opts) {
  9911. assert("TSBigIntKeyword", node, opts);
  9912. }
  9913. function assertTSIntrinsicKeyword(node, opts) {
  9914. assert("TSIntrinsicKeyword", node, opts);
  9915. }
  9916. function assertTSNeverKeyword(node, opts) {
  9917. assert("TSNeverKeyword", node, opts);
  9918. }
  9919. function assertTSNullKeyword(node, opts) {
  9920. assert("TSNullKeyword", node, opts);
  9921. }
  9922. function assertTSNumberKeyword(node, opts) {
  9923. assert("TSNumberKeyword", node, opts);
  9924. }
  9925. function assertTSObjectKeyword(node, opts) {
  9926. assert("TSObjectKeyword", node, opts);
  9927. }
  9928. function assertTSStringKeyword(node, opts) {
  9929. assert("TSStringKeyword", node, opts);
  9930. }
  9931. function assertTSSymbolKeyword(node, opts) {
  9932. assert("TSSymbolKeyword", node, opts);
  9933. }
  9934. function assertTSUndefinedKeyword(node, opts) {
  9935. assert("TSUndefinedKeyword", node, opts);
  9936. }
  9937. function assertTSUnknownKeyword(node, opts) {
  9938. assert("TSUnknownKeyword", node, opts);
  9939. }
  9940. function assertTSVoidKeyword(node, opts) {
  9941. assert("TSVoidKeyword", node, opts);
  9942. }
  9943. function assertTSThisType(node, opts) {
  9944. assert("TSThisType", node, opts);
  9945. }
  9946. function assertTSFunctionType(node, opts) {
  9947. assert("TSFunctionType", node, opts);
  9948. }
  9949. function assertTSConstructorType(node, opts) {
  9950. assert("TSConstructorType", node, opts);
  9951. }
  9952. function assertTSTypeReference(node, opts) {
  9953. assert("TSTypeReference", node, opts);
  9954. }
  9955. function assertTSTypePredicate(node, opts) {
  9956. assert("TSTypePredicate", node, opts);
  9957. }
  9958. function assertTSTypeQuery(node, opts) {
  9959. assert("TSTypeQuery", node, opts);
  9960. }
  9961. function assertTSTypeLiteral(node, opts) {
  9962. assert("TSTypeLiteral", node, opts);
  9963. }
  9964. function assertTSArrayType(node, opts) {
  9965. assert("TSArrayType", node, opts);
  9966. }
  9967. function assertTSTupleType(node, opts) {
  9968. assert("TSTupleType", node, opts);
  9969. }
  9970. function assertTSOptionalType(node, opts) {
  9971. assert("TSOptionalType", node, opts);
  9972. }
  9973. function assertTSRestType(node, opts) {
  9974. assert("TSRestType", node, opts);
  9975. }
  9976. function assertTSNamedTupleMember(node, opts) {
  9977. assert("TSNamedTupleMember", node, opts);
  9978. }
  9979. function assertTSUnionType(node, opts) {
  9980. assert("TSUnionType", node, opts);
  9981. }
  9982. function assertTSIntersectionType(node, opts) {
  9983. assert("TSIntersectionType", node, opts);
  9984. }
  9985. function assertTSConditionalType(node, opts) {
  9986. assert("TSConditionalType", node, opts);
  9987. }
  9988. function assertTSInferType(node, opts) {
  9989. assert("TSInferType", node, opts);
  9990. }
  9991. function assertTSParenthesizedType(node, opts) {
  9992. assert("TSParenthesizedType", node, opts);
  9993. }
  9994. function assertTSTypeOperator(node, opts) {
  9995. assert("TSTypeOperator", node, opts);
  9996. }
  9997. function assertTSIndexedAccessType(node, opts) {
  9998. assert("TSIndexedAccessType", node, opts);
  9999. }
  10000. function assertTSMappedType(node, opts) {
  10001. assert("TSMappedType", node, opts);
  10002. }
  10003. function assertTSLiteralType(node, opts) {
  10004. assert("TSLiteralType", node, opts);
  10005. }
  10006. function assertTSExpressionWithTypeArguments(node, opts) {
  10007. assert("TSExpressionWithTypeArguments", node, opts);
  10008. }
  10009. function assertTSInterfaceDeclaration(node, opts) {
  10010. assert("TSInterfaceDeclaration", node, opts);
  10011. }
  10012. function assertTSInterfaceBody(node, opts) {
  10013. assert("TSInterfaceBody", node, opts);
  10014. }
  10015. function assertTSTypeAliasDeclaration(node, opts) {
  10016. assert("TSTypeAliasDeclaration", node, opts);
  10017. }
  10018. function assertTSAsExpression(node, opts) {
  10019. assert("TSAsExpression", node, opts);
  10020. }
  10021. function assertTSTypeAssertion(node, opts) {
  10022. assert("TSTypeAssertion", node, opts);
  10023. }
  10024. function assertTSEnumDeclaration(node, opts) {
  10025. assert("TSEnumDeclaration", node, opts);
  10026. }
  10027. function assertTSEnumMember(node, opts) {
  10028. assert("TSEnumMember", node, opts);
  10029. }
  10030. function assertTSModuleDeclaration(node, opts) {
  10031. assert("TSModuleDeclaration", node, opts);
  10032. }
  10033. function assertTSModuleBlock(node, opts) {
  10034. assert("TSModuleBlock", node, opts);
  10035. }
  10036. function assertTSImportType(node, opts) {
  10037. assert("TSImportType", node, opts);
  10038. }
  10039. function assertTSImportEqualsDeclaration(node, opts) {
  10040. assert("TSImportEqualsDeclaration", node, opts);
  10041. }
  10042. function assertTSExternalModuleReference(node, opts) {
  10043. assert("TSExternalModuleReference", node, opts);
  10044. }
  10045. function assertTSNonNullExpression(node, opts) {
  10046. assert("TSNonNullExpression", node, opts);
  10047. }
  10048. function assertTSExportAssignment(node, opts) {
  10049. assert("TSExportAssignment", node, opts);
  10050. }
  10051. function assertTSNamespaceExportDeclaration(node, opts) {
  10052. assert("TSNamespaceExportDeclaration", node, opts);
  10053. }
  10054. function assertTSTypeAnnotation(node, opts) {
  10055. assert("TSTypeAnnotation", node, opts);
  10056. }
  10057. function assertTSTypeParameterInstantiation(node, opts) {
  10058. assert("TSTypeParameterInstantiation", node, opts);
  10059. }
  10060. function assertTSTypeParameterDeclaration(node, opts) {
  10061. assert("TSTypeParameterDeclaration", node, opts);
  10062. }
  10063. function assertTSTypeParameter(node, opts) {
  10064. assert("TSTypeParameter", node, opts);
  10065. }
  10066. function assertExpression(node, opts) {
  10067. assert("Expression", node, opts);
  10068. }
  10069. function assertBinary(node, opts) {
  10070. assert("Binary", node, opts);
  10071. }
  10072. function assertScopable(node, opts) {
  10073. assert("Scopable", node, opts);
  10074. }
  10075. function assertBlockParent(node, opts) {
  10076. assert("BlockParent", node, opts);
  10077. }
  10078. function assertBlock(node, opts) {
  10079. assert("Block", node, opts);
  10080. }
  10081. function assertStatement(node, opts) {
  10082. assert("Statement", node, opts);
  10083. }
  10084. function assertTerminatorless(node, opts) {
  10085. assert("Terminatorless", node, opts);
  10086. }
  10087. function assertCompletionStatement(node, opts) {
  10088. assert("CompletionStatement", node, opts);
  10089. }
  10090. function assertConditional(node, opts) {
  10091. assert("Conditional", node, opts);
  10092. }
  10093. function assertLoop(node, opts) {
  10094. assert("Loop", node, opts);
  10095. }
  10096. function assertWhile(node, opts) {
  10097. assert("While", node, opts);
  10098. }
  10099. function assertExpressionWrapper(node, opts) {
  10100. assert("ExpressionWrapper", node, opts);
  10101. }
  10102. function assertFor(node, opts) {
  10103. assert("For", node, opts);
  10104. }
  10105. function assertForXStatement(node, opts) {
  10106. assert("ForXStatement", node, opts);
  10107. }
  10108. function assertFunction(node, opts) {
  10109. assert("Function", node, opts);
  10110. }
  10111. function assertFunctionParent(node, opts) {
  10112. assert("FunctionParent", node, opts);
  10113. }
  10114. function assertPureish(node, opts) {
  10115. assert("Pureish", node, opts);
  10116. }
  10117. function assertDeclaration(node, opts) {
  10118. assert("Declaration", node, opts);
  10119. }
  10120. function assertPatternLike(node, opts) {
  10121. assert("PatternLike", node, opts);
  10122. }
  10123. function assertLVal(node, opts) {
  10124. assert("LVal", node, opts);
  10125. }
  10126. function assertTSEntityName(node, opts) {
  10127. assert("TSEntityName", node, opts);
  10128. }
  10129. function assertLiteral(node, opts) {
  10130. assert("Literal", node, opts);
  10131. }
  10132. function assertImmutable(node, opts) {
  10133. assert("Immutable", node, opts);
  10134. }
  10135. function assertUserWhitespacable(node, opts) {
  10136. assert("UserWhitespacable", node, opts);
  10137. }
  10138. function assertMethod(node, opts) {
  10139. assert("Method", node, opts);
  10140. }
  10141. function assertObjectMember(node, opts) {
  10142. assert("ObjectMember", node, opts);
  10143. }
  10144. function assertProperty(node, opts) {
  10145. assert("Property", node, opts);
  10146. }
  10147. function assertUnaryLike(node, opts) {
  10148. assert("UnaryLike", node, opts);
  10149. }
  10150. function assertPattern(node, opts) {
  10151. assert("Pattern", node, opts);
  10152. }
  10153. function assertClass(node, opts) {
  10154. assert("Class", node, opts);
  10155. }
  10156. function assertModuleDeclaration(node, opts) {
  10157. assert("ModuleDeclaration", node, opts);
  10158. }
  10159. function assertExportDeclaration(node, opts) {
  10160. assert("ExportDeclaration", node, opts);
  10161. }
  10162. function assertModuleSpecifier(node, opts) {
  10163. assert("ModuleSpecifier", node, opts);
  10164. }
  10165. function assertPrivate(node, opts) {
  10166. assert("Private", node, opts);
  10167. }
  10168. function assertFlow(node, opts) {
  10169. assert("Flow", node, opts);
  10170. }
  10171. function assertFlowType(node, opts) {
  10172. assert("FlowType", node, opts);
  10173. }
  10174. function assertFlowBaseAnnotation(node, opts) {
  10175. assert("FlowBaseAnnotation", node, opts);
  10176. }
  10177. function assertFlowDeclaration(node, opts) {
  10178. assert("FlowDeclaration", node, opts);
  10179. }
  10180. function assertFlowPredicate(node, opts) {
  10181. assert("FlowPredicate", node, opts);
  10182. }
  10183. function assertEnumBody(node, opts) {
  10184. assert("EnumBody", node, opts);
  10185. }
  10186. function assertEnumMember(node, opts) {
  10187. assert("EnumMember", node, opts);
  10188. }
  10189. function assertJSX(node, opts) {
  10190. assert("JSX", node, opts);
  10191. }
  10192. function assertTSTypeElement(node, opts) {
  10193. assert("TSTypeElement", node, opts);
  10194. }
  10195. function assertTSType(node, opts) {
  10196. assert("TSType", node, opts);
  10197. }
  10198. function assertTSBaseType(node, opts) {
  10199. assert("TSBaseType", node, opts);
  10200. }
  10201. function assertNumberLiteral(node, opts) {
  10202. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  10203. assert("NumberLiteral", node, opts);
  10204. }
  10205. function assertRegexLiteral(node, opts) {
  10206. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  10207. assert("RegexLiteral", node, opts);
  10208. }
  10209. function assertRestProperty(node, opts) {
  10210. console.trace("The node type RestProperty has been renamed to RestElement");
  10211. assert("RestProperty", node, opts);
  10212. }
  10213. function assertSpreadProperty(node, opts) {
  10214. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  10215. assert("SpreadProperty", node, opts);
  10216. }
  10217. }
  10218. });
  10219. // node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  10220. var require_createTypeAnnotationBasedOnTypeof = __commonJS({
  10221. "node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  10222. "use strict";
  10223. Object.defineProperty(exports, "__esModule", {
  10224. value: true
  10225. });
  10226. exports.default = createTypeAnnotationBasedOnTypeof;
  10227. var _generated = require_generated2();
  10228. function createTypeAnnotationBasedOnTypeof(type) {
  10229. if (type === "string") {
  10230. return (0, _generated.stringTypeAnnotation)();
  10231. } else if (type === "number") {
  10232. return (0, _generated.numberTypeAnnotation)();
  10233. } else if (type === "undefined") {
  10234. return (0, _generated.voidTypeAnnotation)();
  10235. } else if (type === "boolean") {
  10236. return (0, _generated.booleanTypeAnnotation)();
  10237. } else if (type === "function") {
  10238. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  10239. } else if (type === "object") {
  10240. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  10241. } else if (type === "symbol") {
  10242. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  10243. } else if (type === "bigint") {
  10244. return (0, _generated.anyTypeAnnotation)();
  10245. } else {
  10246. throw new Error("Invalid typeof value: " + type);
  10247. }
  10248. }
  10249. }
  10250. });
  10251. // node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  10252. var require_removeTypeDuplicates = __commonJS({
  10253. "node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  10254. "use strict";
  10255. Object.defineProperty(exports, "__esModule", {
  10256. value: true
  10257. });
  10258. exports.default = removeTypeDuplicates;
  10259. var _generated = require_generated();
  10260. function getQualifiedName(node) {
  10261. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  10262. }
  10263. function removeTypeDuplicates(nodes) {
  10264. const generics = {};
  10265. const bases = {};
  10266. const typeGroups = [];
  10267. const types2 = [];
  10268. for (let i = 0; i < nodes.length; i++) {
  10269. const node = nodes[i];
  10270. if (!node)
  10271. continue;
  10272. if (types2.indexOf(node) >= 0) {
  10273. continue;
  10274. }
  10275. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  10276. return [node];
  10277. }
  10278. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  10279. bases[node.type] = node;
  10280. continue;
  10281. }
  10282. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  10283. if (typeGroups.indexOf(node.types) < 0) {
  10284. nodes = nodes.concat(node.types);
  10285. typeGroups.push(node.types);
  10286. }
  10287. continue;
  10288. }
  10289. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  10290. const name2 = getQualifiedName(node.id);
  10291. if (generics[name2]) {
  10292. let existing = generics[name2];
  10293. if (existing.typeParameters) {
  10294. if (node.typeParameters) {
  10295. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  10296. }
  10297. } else {
  10298. existing = node.typeParameters;
  10299. }
  10300. } else {
  10301. generics[name2] = node;
  10302. }
  10303. continue;
  10304. }
  10305. types2.push(node);
  10306. }
  10307. for (const type of Object.keys(bases)) {
  10308. types2.push(bases[type]);
  10309. }
  10310. for (const name2 of Object.keys(generics)) {
  10311. types2.push(generics[name2]);
  10312. }
  10313. return types2;
  10314. }
  10315. }
  10316. });
  10317. // node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  10318. var require_createFlowUnionType = __commonJS({
  10319. "node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  10320. "use strict";
  10321. Object.defineProperty(exports, "__esModule", {
  10322. value: true
  10323. });
  10324. exports.default = createFlowUnionType;
  10325. var _generated = require_generated2();
  10326. var _removeTypeDuplicates = require_removeTypeDuplicates();
  10327. function createFlowUnionType(types2) {
  10328. const flattened = (0, _removeTypeDuplicates.default)(types2);
  10329. if (flattened.length === 1) {
  10330. return flattened[0];
  10331. } else {
  10332. return (0, _generated.unionTypeAnnotation)(flattened);
  10333. }
  10334. }
  10335. }
  10336. });
  10337. // node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  10338. var require_removeTypeDuplicates2 = __commonJS({
  10339. "node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  10340. "use strict";
  10341. Object.defineProperty(exports, "__esModule", {
  10342. value: true
  10343. });
  10344. exports.default = removeTypeDuplicates;
  10345. var _generated = require_generated();
  10346. function removeTypeDuplicates(nodes) {
  10347. const generics = {};
  10348. const bases = {};
  10349. const typeGroups = [];
  10350. const types2 = [];
  10351. for (let i = 0; i < nodes.length; i++) {
  10352. const node = nodes[i];
  10353. if (!node)
  10354. continue;
  10355. if (types2.indexOf(node) >= 0) {
  10356. continue;
  10357. }
  10358. if ((0, _generated.isTSAnyKeyword)(node)) {
  10359. return [node];
  10360. }
  10361. if ((0, _generated.isTSBaseType)(node)) {
  10362. bases[node.type] = node;
  10363. continue;
  10364. }
  10365. if ((0, _generated.isTSUnionType)(node)) {
  10366. if (typeGroups.indexOf(node.types) < 0) {
  10367. nodes = nodes.concat(node.types);
  10368. typeGroups.push(node.types);
  10369. }
  10370. continue;
  10371. }
  10372. types2.push(node);
  10373. }
  10374. for (const type of Object.keys(bases)) {
  10375. types2.push(bases[type]);
  10376. }
  10377. for (const name2 of Object.keys(generics)) {
  10378. types2.push(generics[name2]);
  10379. }
  10380. return types2;
  10381. }
  10382. }
  10383. });
  10384. // node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  10385. var require_createTSUnionType = __commonJS({
  10386. "node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  10387. "use strict";
  10388. Object.defineProperty(exports, "__esModule", {
  10389. value: true
  10390. });
  10391. exports.default = createTSUnionType;
  10392. var _generated = require_generated2();
  10393. var _removeTypeDuplicates = require_removeTypeDuplicates2();
  10394. function createTSUnionType(typeAnnotations) {
  10395. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  10396. const flattened = (0, _removeTypeDuplicates.default)(types2);
  10397. if (flattened.length === 1) {
  10398. return flattened[0];
  10399. } else {
  10400. return (0, _generated.tsUnionType)(flattened);
  10401. }
  10402. }
  10403. }
  10404. });
  10405. // node_modules/@babel/types/lib/builders/generated/uppercase.js
  10406. var require_uppercase = __commonJS({
  10407. "node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  10408. "use strict";
  10409. Object.defineProperty(exports, "__esModule", {
  10410. value: true
  10411. });
  10412. Object.defineProperty(exports, "ArrayExpression", {
  10413. enumerable: true,
  10414. get: function() {
  10415. return _index.arrayExpression;
  10416. }
  10417. });
  10418. Object.defineProperty(exports, "AssignmentExpression", {
  10419. enumerable: true,
  10420. get: function() {
  10421. return _index.assignmentExpression;
  10422. }
  10423. });
  10424. Object.defineProperty(exports, "BinaryExpression", {
  10425. enumerable: true,
  10426. get: function() {
  10427. return _index.binaryExpression;
  10428. }
  10429. });
  10430. Object.defineProperty(exports, "InterpreterDirective", {
  10431. enumerable: true,
  10432. get: function() {
  10433. return _index.interpreterDirective;
  10434. }
  10435. });
  10436. Object.defineProperty(exports, "Directive", {
  10437. enumerable: true,
  10438. get: function() {
  10439. return _index.directive;
  10440. }
  10441. });
  10442. Object.defineProperty(exports, "DirectiveLiteral", {
  10443. enumerable: true,
  10444. get: function() {
  10445. return _index.directiveLiteral;
  10446. }
  10447. });
  10448. Object.defineProperty(exports, "BlockStatement", {
  10449. enumerable: true,
  10450. get: function() {
  10451. return _index.blockStatement;
  10452. }
  10453. });
  10454. Object.defineProperty(exports, "BreakStatement", {
  10455. enumerable: true,
  10456. get: function() {
  10457. return _index.breakStatement;
  10458. }
  10459. });
  10460. Object.defineProperty(exports, "CallExpression", {
  10461. enumerable: true,
  10462. get: function() {
  10463. return _index.callExpression;
  10464. }
  10465. });
  10466. Object.defineProperty(exports, "CatchClause", {
  10467. enumerable: true,
  10468. get: function() {
  10469. return _index.catchClause;
  10470. }
  10471. });
  10472. Object.defineProperty(exports, "ConditionalExpression", {
  10473. enumerable: true,
  10474. get: function() {
  10475. return _index.conditionalExpression;
  10476. }
  10477. });
  10478. Object.defineProperty(exports, "ContinueStatement", {
  10479. enumerable: true,
  10480. get: function() {
  10481. return _index.continueStatement;
  10482. }
  10483. });
  10484. Object.defineProperty(exports, "DebuggerStatement", {
  10485. enumerable: true,
  10486. get: function() {
  10487. return _index.debuggerStatement;
  10488. }
  10489. });
  10490. Object.defineProperty(exports, "DoWhileStatement", {
  10491. enumerable: true,
  10492. get: function() {
  10493. return _index.doWhileStatement;
  10494. }
  10495. });
  10496. Object.defineProperty(exports, "EmptyStatement", {
  10497. enumerable: true,
  10498. get: function() {
  10499. return _index.emptyStatement;
  10500. }
  10501. });
  10502. Object.defineProperty(exports, "ExpressionStatement", {
  10503. enumerable: true,
  10504. get: function() {
  10505. return _index.expressionStatement;
  10506. }
  10507. });
  10508. Object.defineProperty(exports, "File", {
  10509. enumerable: true,
  10510. get: function() {
  10511. return _index.file;
  10512. }
  10513. });
  10514. Object.defineProperty(exports, "ForInStatement", {
  10515. enumerable: true,
  10516. get: function() {
  10517. return _index.forInStatement;
  10518. }
  10519. });
  10520. Object.defineProperty(exports, "ForStatement", {
  10521. enumerable: true,
  10522. get: function() {
  10523. return _index.forStatement;
  10524. }
  10525. });
  10526. Object.defineProperty(exports, "FunctionDeclaration", {
  10527. enumerable: true,
  10528. get: function() {
  10529. return _index.functionDeclaration;
  10530. }
  10531. });
  10532. Object.defineProperty(exports, "FunctionExpression", {
  10533. enumerable: true,
  10534. get: function() {
  10535. return _index.functionExpression;
  10536. }
  10537. });
  10538. Object.defineProperty(exports, "Identifier", {
  10539. enumerable: true,
  10540. get: function() {
  10541. return _index.identifier;
  10542. }
  10543. });
  10544. Object.defineProperty(exports, "IfStatement", {
  10545. enumerable: true,
  10546. get: function() {
  10547. return _index.ifStatement;
  10548. }
  10549. });
  10550. Object.defineProperty(exports, "LabeledStatement", {
  10551. enumerable: true,
  10552. get: function() {
  10553. return _index.labeledStatement;
  10554. }
  10555. });
  10556. Object.defineProperty(exports, "StringLiteral", {
  10557. enumerable: true,
  10558. get: function() {
  10559. return _index.stringLiteral;
  10560. }
  10561. });
  10562. Object.defineProperty(exports, "NumericLiteral", {
  10563. enumerable: true,
  10564. get: function() {
  10565. return _index.numericLiteral;
  10566. }
  10567. });
  10568. Object.defineProperty(exports, "NullLiteral", {
  10569. enumerable: true,
  10570. get: function() {
  10571. return _index.nullLiteral;
  10572. }
  10573. });
  10574. Object.defineProperty(exports, "BooleanLiteral", {
  10575. enumerable: true,
  10576. get: function() {
  10577. return _index.booleanLiteral;
  10578. }
  10579. });
  10580. Object.defineProperty(exports, "RegExpLiteral", {
  10581. enumerable: true,
  10582. get: function() {
  10583. return _index.regExpLiteral;
  10584. }
  10585. });
  10586. Object.defineProperty(exports, "LogicalExpression", {
  10587. enumerable: true,
  10588. get: function() {
  10589. return _index.logicalExpression;
  10590. }
  10591. });
  10592. Object.defineProperty(exports, "MemberExpression", {
  10593. enumerable: true,
  10594. get: function() {
  10595. return _index.memberExpression;
  10596. }
  10597. });
  10598. Object.defineProperty(exports, "NewExpression", {
  10599. enumerable: true,
  10600. get: function() {
  10601. return _index.newExpression;
  10602. }
  10603. });
  10604. Object.defineProperty(exports, "Program", {
  10605. enumerable: true,
  10606. get: function() {
  10607. return _index.program;
  10608. }
  10609. });
  10610. Object.defineProperty(exports, "ObjectExpression", {
  10611. enumerable: true,
  10612. get: function() {
  10613. return _index.objectExpression;
  10614. }
  10615. });
  10616. Object.defineProperty(exports, "ObjectMethod", {
  10617. enumerable: true,
  10618. get: function() {
  10619. return _index.objectMethod;
  10620. }
  10621. });
  10622. Object.defineProperty(exports, "ObjectProperty", {
  10623. enumerable: true,
  10624. get: function() {
  10625. return _index.objectProperty;
  10626. }
  10627. });
  10628. Object.defineProperty(exports, "RestElement", {
  10629. enumerable: true,
  10630. get: function() {
  10631. return _index.restElement;
  10632. }
  10633. });
  10634. Object.defineProperty(exports, "ReturnStatement", {
  10635. enumerable: true,
  10636. get: function() {
  10637. return _index.returnStatement;
  10638. }
  10639. });
  10640. Object.defineProperty(exports, "SequenceExpression", {
  10641. enumerable: true,
  10642. get: function() {
  10643. return _index.sequenceExpression;
  10644. }
  10645. });
  10646. Object.defineProperty(exports, "ParenthesizedExpression", {
  10647. enumerable: true,
  10648. get: function() {
  10649. return _index.parenthesizedExpression;
  10650. }
  10651. });
  10652. Object.defineProperty(exports, "SwitchCase", {
  10653. enumerable: true,
  10654. get: function() {
  10655. return _index.switchCase;
  10656. }
  10657. });
  10658. Object.defineProperty(exports, "SwitchStatement", {
  10659. enumerable: true,
  10660. get: function() {
  10661. return _index.switchStatement;
  10662. }
  10663. });
  10664. Object.defineProperty(exports, "ThisExpression", {
  10665. enumerable: true,
  10666. get: function() {
  10667. return _index.thisExpression;
  10668. }
  10669. });
  10670. Object.defineProperty(exports, "ThrowStatement", {
  10671. enumerable: true,
  10672. get: function() {
  10673. return _index.throwStatement;
  10674. }
  10675. });
  10676. Object.defineProperty(exports, "TryStatement", {
  10677. enumerable: true,
  10678. get: function() {
  10679. return _index.tryStatement;
  10680. }
  10681. });
  10682. Object.defineProperty(exports, "UnaryExpression", {
  10683. enumerable: true,
  10684. get: function() {
  10685. return _index.unaryExpression;
  10686. }
  10687. });
  10688. Object.defineProperty(exports, "UpdateExpression", {
  10689. enumerable: true,
  10690. get: function() {
  10691. return _index.updateExpression;
  10692. }
  10693. });
  10694. Object.defineProperty(exports, "VariableDeclaration", {
  10695. enumerable: true,
  10696. get: function() {
  10697. return _index.variableDeclaration;
  10698. }
  10699. });
  10700. Object.defineProperty(exports, "VariableDeclarator", {
  10701. enumerable: true,
  10702. get: function() {
  10703. return _index.variableDeclarator;
  10704. }
  10705. });
  10706. Object.defineProperty(exports, "WhileStatement", {
  10707. enumerable: true,
  10708. get: function() {
  10709. return _index.whileStatement;
  10710. }
  10711. });
  10712. Object.defineProperty(exports, "WithStatement", {
  10713. enumerable: true,
  10714. get: function() {
  10715. return _index.withStatement;
  10716. }
  10717. });
  10718. Object.defineProperty(exports, "AssignmentPattern", {
  10719. enumerable: true,
  10720. get: function() {
  10721. return _index.assignmentPattern;
  10722. }
  10723. });
  10724. Object.defineProperty(exports, "ArrayPattern", {
  10725. enumerable: true,
  10726. get: function() {
  10727. return _index.arrayPattern;
  10728. }
  10729. });
  10730. Object.defineProperty(exports, "ArrowFunctionExpression", {
  10731. enumerable: true,
  10732. get: function() {
  10733. return _index.arrowFunctionExpression;
  10734. }
  10735. });
  10736. Object.defineProperty(exports, "ClassBody", {
  10737. enumerable: true,
  10738. get: function() {
  10739. return _index.classBody;
  10740. }
  10741. });
  10742. Object.defineProperty(exports, "ClassExpression", {
  10743. enumerable: true,
  10744. get: function() {
  10745. return _index.classExpression;
  10746. }
  10747. });
  10748. Object.defineProperty(exports, "ClassDeclaration", {
  10749. enumerable: true,
  10750. get: function() {
  10751. return _index.classDeclaration;
  10752. }
  10753. });
  10754. Object.defineProperty(exports, "ExportAllDeclaration", {
  10755. enumerable: true,
  10756. get: function() {
  10757. return _index.exportAllDeclaration;
  10758. }
  10759. });
  10760. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  10761. enumerable: true,
  10762. get: function() {
  10763. return _index.exportDefaultDeclaration;
  10764. }
  10765. });
  10766. Object.defineProperty(exports, "ExportNamedDeclaration", {
  10767. enumerable: true,
  10768. get: function() {
  10769. return _index.exportNamedDeclaration;
  10770. }
  10771. });
  10772. Object.defineProperty(exports, "ExportSpecifier", {
  10773. enumerable: true,
  10774. get: function() {
  10775. return _index.exportSpecifier;
  10776. }
  10777. });
  10778. Object.defineProperty(exports, "ForOfStatement", {
  10779. enumerable: true,
  10780. get: function() {
  10781. return _index.forOfStatement;
  10782. }
  10783. });
  10784. Object.defineProperty(exports, "ImportDeclaration", {
  10785. enumerable: true,
  10786. get: function() {
  10787. return _index.importDeclaration;
  10788. }
  10789. });
  10790. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  10791. enumerable: true,
  10792. get: function() {
  10793. return _index.importDefaultSpecifier;
  10794. }
  10795. });
  10796. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  10797. enumerable: true,
  10798. get: function() {
  10799. return _index.importNamespaceSpecifier;
  10800. }
  10801. });
  10802. Object.defineProperty(exports, "ImportSpecifier", {
  10803. enumerable: true,
  10804. get: function() {
  10805. return _index.importSpecifier;
  10806. }
  10807. });
  10808. Object.defineProperty(exports, "MetaProperty", {
  10809. enumerable: true,
  10810. get: function() {
  10811. return _index.metaProperty;
  10812. }
  10813. });
  10814. Object.defineProperty(exports, "ClassMethod", {
  10815. enumerable: true,
  10816. get: function() {
  10817. return _index.classMethod;
  10818. }
  10819. });
  10820. Object.defineProperty(exports, "ObjectPattern", {
  10821. enumerable: true,
  10822. get: function() {
  10823. return _index.objectPattern;
  10824. }
  10825. });
  10826. Object.defineProperty(exports, "SpreadElement", {
  10827. enumerable: true,
  10828. get: function() {
  10829. return _index.spreadElement;
  10830. }
  10831. });
  10832. Object.defineProperty(exports, "Super", {
  10833. enumerable: true,
  10834. get: function() {
  10835. return _index.super;
  10836. }
  10837. });
  10838. Object.defineProperty(exports, "TaggedTemplateExpression", {
  10839. enumerable: true,
  10840. get: function() {
  10841. return _index.taggedTemplateExpression;
  10842. }
  10843. });
  10844. Object.defineProperty(exports, "TemplateElement", {
  10845. enumerable: true,
  10846. get: function() {
  10847. return _index.templateElement;
  10848. }
  10849. });
  10850. Object.defineProperty(exports, "TemplateLiteral", {
  10851. enumerable: true,
  10852. get: function() {
  10853. return _index.templateLiteral;
  10854. }
  10855. });
  10856. Object.defineProperty(exports, "YieldExpression", {
  10857. enumerable: true,
  10858. get: function() {
  10859. return _index.yieldExpression;
  10860. }
  10861. });
  10862. Object.defineProperty(exports, "AwaitExpression", {
  10863. enumerable: true,
  10864. get: function() {
  10865. return _index.awaitExpression;
  10866. }
  10867. });
  10868. Object.defineProperty(exports, "Import", {
  10869. enumerable: true,
  10870. get: function() {
  10871. return _index.import;
  10872. }
  10873. });
  10874. Object.defineProperty(exports, "BigIntLiteral", {
  10875. enumerable: true,
  10876. get: function() {
  10877. return _index.bigIntLiteral;
  10878. }
  10879. });
  10880. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  10881. enumerable: true,
  10882. get: function() {
  10883. return _index.exportNamespaceSpecifier;
  10884. }
  10885. });
  10886. Object.defineProperty(exports, "OptionalMemberExpression", {
  10887. enumerable: true,
  10888. get: function() {
  10889. return _index.optionalMemberExpression;
  10890. }
  10891. });
  10892. Object.defineProperty(exports, "OptionalCallExpression", {
  10893. enumerable: true,
  10894. get: function() {
  10895. return _index.optionalCallExpression;
  10896. }
  10897. });
  10898. Object.defineProperty(exports, "ClassProperty", {
  10899. enumerable: true,
  10900. get: function() {
  10901. return _index.classProperty;
  10902. }
  10903. });
  10904. Object.defineProperty(exports, "ClassPrivateProperty", {
  10905. enumerable: true,
  10906. get: function() {
  10907. return _index.classPrivateProperty;
  10908. }
  10909. });
  10910. Object.defineProperty(exports, "ClassPrivateMethod", {
  10911. enumerable: true,
  10912. get: function() {
  10913. return _index.classPrivateMethod;
  10914. }
  10915. });
  10916. Object.defineProperty(exports, "PrivateName", {
  10917. enumerable: true,
  10918. get: function() {
  10919. return _index.privateName;
  10920. }
  10921. });
  10922. Object.defineProperty(exports, "AnyTypeAnnotation", {
  10923. enumerable: true,
  10924. get: function() {
  10925. return _index.anyTypeAnnotation;
  10926. }
  10927. });
  10928. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  10929. enumerable: true,
  10930. get: function() {
  10931. return _index.arrayTypeAnnotation;
  10932. }
  10933. });
  10934. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  10935. enumerable: true,
  10936. get: function() {
  10937. return _index.booleanTypeAnnotation;
  10938. }
  10939. });
  10940. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  10941. enumerable: true,
  10942. get: function() {
  10943. return _index.booleanLiteralTypeAnnotation;
  10944. }
  10945. });
  10946. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  10947. enumerable: true,
  10948. get: function() {
  10949. return _index.nullLiteralTypeAnnotation;
  10950. }
  10951. });
  10952. Object.defineProperty(exports, "ClassImplements", {
  10953. enumerable: true,
  10954. get: function() {
  10955. return _index.classImplements;
  10956. }
  10957. });
  10958. Object.defineProperty(exports, "DeclareClass", {
  10959. enumerable: true,
  10960. get: function() {
  10961. return _index.declareClass;
  10962. }
  10963. });
  10964. Object.defineProperty(exports, "DeclareFunction", {
  10965. enumerable: true,
  10966. get: function() {
  10967. return _index.declareFunction;
  10968. }
  10969. });
  10970. Object.defineProperty(exports, "DeclareInterface", {
  10971. enumerable: true,
  10972. get: function() {
  10973. return _index.declareInterface;
  10974. }
  10975. });
  10976. Object.defineProperty(exports, "DeclareModule", {
  10977. enumerable: true,
  10978. get: function() {
  10979. return _index.declareModule;
  10980. }
  10981. });
  10982. Object.defineProperty(exports, "DeclareModuleExports", {
  10983. enumerable: true,
  10984. get: function() {
  10985. return _index.declareModuleExports;
  10986. }
  10987. });
  10988. Object.defineProperty(exports, "DeclareTypeAlias", {
  10989. enumerable: true,
  10990. get: function() {
  10991. return _index.declareTypeAlias;
  10992. }
  10993. });
  10994. Object.defineProperty(exports, "DeclareOpaqueType", {
  10995. enumerable: true,
  10996. get: function() {
  10997. return _index.declareOpaqueType;
  10998. }
  10999. });
  11000. Object.defineProperty(exports, "DeclareVariable", {
  11001. enumerable: true,
  11002. get: function() {
  11003. return _index.declareVariable;
  11004. }
  11005. });
  11006. Object.defineProperty(exports, "DeclareExportDeclaration", {
  11007. enumerable: true,
  11008. get: function() {
  11009. return _index.declareExportDeclaration;
  11010. }
  11011. });
  11012. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  11013. enumerable: true,
  11014. get: function() {
  11015. return _index.declareExportAllDeclaration;
  11016. }
  11017. });
  11018. Object.defineProperty(exports, "DeclaredPredicate", {
  11019. enumerable: true,
  11020. get: function() {
  11021. return _index.declaredPredicate;
  11022. }
  11023. });
  11024. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  11025. enumerable: true,
  11026. get: function() {
  11027. return _index.existsTypeAnnotation;
  11028. }
  11029. });
  11030. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  11031. enumerable: true,
  11032. get: function() {
  11033. return _index.functionTypeAnnotation;
  11034. }
  11035. });
  11036. Object.defineProperty(exports, "FunctionTypeParam", {
  11037. enumerable: true,
  11038. get: function() {
  11039. return _index.functionTypeParam;
  11040. }
  11041. });
  11042. Object.defineProperty(exports, "GenericTypeAnnotation", {
  11043. enumerable: true,
  11044. get: function() {
  11045. return _index.genericTypeAnnotation;
  11046. }
  11047. });
  11048. Object.defineProperty(exports, "InferredPredicate", {
  11049. enumerable: true,
  11050. get: function() {
  11051. return _index.inferredPredicate;
  11052. }
  11053. });
  11054. Object.defineProperty(exports, "InterfaceExtends", {
  11055. enumerable: true,
  11056. get: function() {
  11057. return _index.interfaceExtends;
  11058. }
  11059. });
  11060. Object.defineProperty(exports, "InterfaceDeclaration", {
  11061. enumerable: true,
  11062. get: function() {
  11063. return _index.interfaceDeclaration;
  11064. }
  11065. });
  11066. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  11067. enumerable: true,
  11068. get: function() {
  11069. return _index.interfaceTypeAnnotation;
  11070. }
  11071. });
  11072. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  11073. enumerable: true,
  11074. get: function() {
  11075. return _index.intersectionTypeAnnotation;
  11076. }
  11077. });
  11078. Object.defineProperty(exports, "MixedTypeAnnotation", {
  11079. enumerable: true,
  11080. get: function() {
  11081. return _index.mixedTypeAnnotation;
  11082. }
  11083. });
  11084. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  11085. enumerable: true,
  11086. get: function() {
  11087. return _index.emptyTypeAnnotation;
  11088. }
  11089. });
  11090. Object.defineProperty(exports, "NullableTypeAnnotation", {
  11091. enumerable: true,
  11092. get: function() {
  11093. return _index.nullableTypeAnnotation;
  11094. }
  11095. });
  11096. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  11097. enumerable: true,
  11098. get: function() {
  11099. return _index.numberLiteralTypeAnnotation;
  11100. }
  11101. });
  11102. Object.defineProperty(exports, "NumberTypeAnnotation", {
  11103. enumerable: true,
  11104. get: function() {
  11105. return _index.numberTypeAnnotation;
  11106. }
  11107. });
  11108. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  11109. enumerable: true,
  11110. get: function() {
  11111. return _index.objectTypeAnnotation;
  11112. }
  11113. });
  11114. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  11115. enumerable: true,
  11116. get: function() {
  11117. return _index.objectTypeInternalSlot;
  11118. }
  11119. });
  11120. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  11121. enumerable: true,
  11122. get: function() {
  11123. return _index.objectTypeCallProperty;
  11124. }
  11125. });
  11126. Object.defineProperty(exports, "ObjectTypeIndexer", {
  11127. enumerable: true,
  11128. get: function() {
  11129. return _index.objectTypeIndexer;
  11130. }
  11131. });
  11132. Object.defineProperty(exports, "ObjectTypeProperty", {
  11133. enumerable: true,
  11134. get: function() {
  11135. return _index.objectTypeProperty;
  11136. }
  11137. });
  11138. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  11139. enumerable: true,
  11140. get: function() {
  11141. return _index.objectTypeSpreadProperty;
  11142. }
  11143. });
  11144. Object.defineProperty(exports, "OpaqueType", {
  11145. enumerable: true,
  11146. get: function() {
  11147. return _index.opaqueType;
  11148. }
  11149. });
  11150. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  11151. enumerable: true,
  11152. get: function() {
  11153. return _index.qualifiedTypeIdentifier;
  11154. }
  11155. });
  11156. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  11157. enumerable: true,
  11158. get: function() {
  11159. return _index.stringLiteralTypeAnnotation;
  11160. }
  11161. });
  11162. Object.defineProperty(exports, "StringTypeAnnotation", {
  11163. enumerable: true,
  11164. get: function() {
  11165. return _index.stringTypeAnnotation;
  11166. }
  11167. });
  11168. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  11169. enumerable: true,
  11170. get: function() {
  11171. return _index.symbolTypeAnnotation;
  11172. }
  11173. });
  11174. Object.defineProperty(exports, "ThisTypeAnnotation", {
  11175. enumerable: true,
  11176. get: function() {
  11177. return _index.thisTypeAnnotation;
  11178. }
  11179. });
  11180. Object.defineProperty(exports, "TupleTypeAnnotation", {
  11181. enumerable: true,
  11182. get: function() {
  11183. return _index.tupleTypeAnnotation;
  11184. }
  11185. });
  11186. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  11187. enumerable: true,
  11188. get: function() {
  11189. return _index.typeofTypeAnnotation;
  11190. }
  11191. });
  11192. Object.defineProperty(exports, "TypeAlias", {
  11193. enumerable: true,
  11194. get: function() {
  11195. return _index.typeAlias;
  11196. }
  11197. });
  11198. Object.defineProperty(exports, "TypeAnnotation", {
  11199. enumerable: true,
  11200. get: function() {
  11201. return _index.typeAnnotation;
  11202. }
  11203. });
  11204. Object.defineProperty(exports, "TypeCastExpression", {
  11205. enumerable: true,
  11206. get: function() {
  11207. return _index.typeCastExpression;
  11208. }
  11209. });
  11210. Object.defineProperty(exports, "TypeParameter", {
  11211. enumerable: true,
  11212. get: function() {
  11213. return _index.typeParameter;
  11214. }
  11215. });
  11216. Object.defineProperty(exports, "TypeParameterDeclaration", {
  11217. enumerable: true,
  11218. get: function() {
  11219. return _index.typeParameterDeclaration;
  11220. }
  11221. });
  11222. Object.defineProperty(exports, "TypeParameterInstantiation", {
  11223. enumerable: true,
  11224. get: function() {
  11225. return _index.typeParameterInstantiation;
  11226. }
  11227. });
  11228. Object.defineProperty(exports, "UnionTypeAnnotation", {
  11229. enumerable: true,
  11230. get: function() {
  11231. return _index.unionTypeAnnotation;
  11232. }
  11233. });
  11234. Object.defineProperty(exports, "Variance", {
  11235. enumerable: true,
  11236. get: function() {
  11237. return _index.variance;
  11238. }
  11239. });
  11240. Object.defineProperty(exports, "VoidTypeAnnotation", {
  11241. enumerable: true,
  11242. get: function() {
  11243. return _index.voidTypeAnnotation;
  11244. }
  11245. });
  11246. Object.defineProperty(exports, "EnumDeclaration", {
  11247. enumerable: true,
  11248. get: function() {
  11249. return _index.enumDeclaration;
  11250. }
  11251. });
  11252. Object.defineProperty(exports, "EnumBooleanBody", {
  11253. enumerable: true,
  11254. get: function() {
  11255. return _index.enumBooleanBody;
  11256. }
  11257. });
  11258. Object.defineProperty(exports, "EnumNumberBody", {
  11259. enumerable: true,
  11260. get: function() {
  11261. return _index.enumNumberBody;
  11262. }
  11263. });
  11264. Object.defineProperty(exports, "EnumStringBody", {
  11265. enumerable: true,
  11266. get: function() {
  11267. return _index.enumStringBody;
  11268. }
  11269. });
  11270. Object.defineProperty(exports, "EnumSymbolBody", {
  11271. enumerable: true,
  11272. get: function() {
  11273. return _index.enumSymbolBody;
  11274. }
  11275. });
  11276. Object.defineProperty(exports, "EnumBooleanMember", {
  11277. enumerable: true,
  11278. get: function() {
  11279. return _index.enumBooleanMember;
  11280. }
  11281. });
  11282. Object.defineProperty(exports, "EnumNumberMember", {
  11283. enumerable: true,
  11284. get: function() {
  11285. return _index.enumNumberMember;
  11286. }
  11287. });
  11288. Object.defineProperty(exports, "EnumStringMember", {
  11289. enumerable: true,
  11290. get: function() {
  11291. return _index.enumStringMember;
  11292. }
  11293. });
  11294. Object.defineProperty(exports, "EnumDefaultedMember", {
  11295. enumerable: true,
  11296. get: function() {
  11297. return _index.enumDefaultedMember;
  11298. }
  11299. });
  11300. Object.defineProperty(exports, "IndexedAccessType", {
  11301. enumerable: true,
  11302. get: function() {
  11303. return _index.indexedAccessType;
  11304. }
  11305. });
  11306. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  11307. enumerable: true,
  11308. get: function() {
  11309. return _index.optionalIndexedAccessType;
  11310. }
  11311. });
  11312. Object.defineProperty(exports, "JSXAttribute", {
  11313. enumerable: true,
  11314. get: function() {
  11315. return _index.jsxAttribute;
  11316. }
  11317. });
  11318. Object.defineProperty(exports, "JSXClosingElement", {
  11319. enumerable: true,
  11320. get: function() {
  11321. return _index.jsxClosingElement;
  11322. }
  11323. });
  11324. Object.defineProperty(exports, "JSXElement", {
  11325. enumerable: true,
  11326. get: function() {
  11327. return _index.jsxElement;
  11328. }
  11329. });
  11330. Object.defineProperty(exports, "JSXEmptyExpression", {
  11331. enumerable: true,
  11332. get: function() {
  11333. return _index.jsxEmptyExpression;
  11334. }
  11335. });
  11336. Object.defineProperty(exports, "JSXExpressionContainer", {
  11337. enumerable: true,
  11338. get: function() {
  11339. return _index.jsxExpressionContainer;
  11340. }
  11341. });
  11342. Object.defineProperty(exports, "JSXSpreadChild", {
  11343. enumerable: true,
  11344. get: function() {
  11345. return _index.jsxSpreadChild;
  11346. }
  11347. });
  11348. Object.defineProperty(exports, "JSXIdentifier", {
  11349. enumerable: true,
  11350. get: function() {
  11351. return _index.jsxIdentifier;
  11352. }
  11353. });
  11354. Object.defineProperty(exports, "JSXMemberExpression", {
  11355. enumerable: true,
  11356. get: function() {
  11357. return _index.jsxMemberExpression;
  11358. }
  11359. });
  11360. Object.defineProperty(exports, "JSXNamespacedName", {
  11361. enumerable: true,
  11362. get: function() {
  11363. return _index.jsxNamespacedName;
  11364. }
  11365. });
  11366. Object.defineProperty(exports, "JSXOpeningElement", {
  11367. enumerable: true,
  11368. get: function() {
  11369. return _index.jsxOpeningElement;
  11370. }
  11371. });
  11372. Object.defineProperty(exports, "JSXSpreadAttribute", {
  11373. enumerable: true,
  11374. get: function() {
  11375. return _index.jsxSpreadAttribute;
  11376. }
  11377. });
  11378. Object.defineProperty(exports, "JSXText", {
  11379. enumerable: true,
  11380. get: function() {
  11381. return _index.jsxText;
  11382. }
  11383. });
  11384. Object.defineProperty(exports, "JSXFragment", {
  11385. enumerable: true,
  11386. get: function() {
  11387. return _index.jsxFragment;
  11388. }
  11389. });
  11390. Object.defineProperty(exports, "JSXOpeningFragment", {
  11391. enumerable: true,
  11392. get: function() {
  11393. return _index.jsxOpeningFragment;
  11394. }
  11395. });
  11396. Object.defineProperty(exports, "JSXClosingFragment", {
  11397. enumerable: true,
  11398. get: function() {
  11399. return _index.jsxClosingFragment;
  11400. }
  11401. });
  11402. Object.defineProperty(exports, "Noop", {
  11403. enumerable: true,
  11404. get: function() {
  11405. return _index.noop;
  11406. }
  11407. });
  11408. Object.defineProperty(exports, "Placeholder", {
  11409. enumerable: true,
  11410. get: function() {
  11411. return _index.placeholder;
  11412. }
  11413. });
  11414. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  11415. enumerable: true,
  11416. get: function() {
  11417. return _index.v8IntrinsicIdentifier;
  11418. }
  11419. });
  11420. Object.defineProperty(exports, "ArgumentPlaceholder", {
  11421. enumerable: true,
  11422. get: function() {
  11423. return _index.argumentPlaceholder;
  11424. }
  11425. });
  11426. Object.defineProperty(exports, "BindExpression", {
  11427. enumerable: true,
  11428. get: function() {
  11429. return _index.bindExpression;
  11430. }
  11431. });
  11432. Object.defineProperty(exports, "PipelineTopicExpression", {
  11433. enumerable: true,
  11434. get: function() {
  11435. return _index.pipelineTopicExpression;
  11436. }
  11437. });
  11438. Object.defineProperty(exports, "PipelineBareFunction", {
  11439. enumerable: true,
  11440. get: function() {
  11441. return _index.pipelineBareFunction;
  11442. }
  11443. });
  11444. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  11445. enumerable: true,
  11446. get: function() {
  11447. return _index.pipelinePrimaryTopicReference;
  11448. }
  11449. });
  11450. Object.defineProperty(exports, "ImportAttribute", {
  11451. enumerable: true,
  11452. get: function() {
  11453. return _index.importAttribute;
  11454. }
  11455. });
  11456. Object.defineProperty(exports, "Decorator", {
  11457. enumerable: true,
  11458. get: function() {
  11459. return _index.decorator;
  11460. }
  11461. });
  11462. Object.defineProperty(exports, "DoExpression", {
  11463. enumerable: true,
  11464. get: function() {
  11465. return _index.doExpression;
  11466. }
  11467. });
  11468. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  11469. enumerable: true,
  11470. get: function() {
  11471. return _index.exportDefaultSpecifier;
  11472. }
  11473. });
  11474. Object.defineProperty(exports, "RecordExpression", {
  11475. enumerable: true,
  11476. get: function() {
  11477. return _index.recordExpression;
  11478. }
  11479. });
  11480. Object.defineProperty(exports, "TupleExpression", {
  11481. enumerable: true,
  11482. get: function() {
  11483. return _index.tupleExpression;
  11484. }
  11485. });
  11486. Object.defineProperty(exports, "DecimalLiteral", {
  11487. enumerable: true,
  11488. get: function() {
  11489. return _index.decimalLiteral;
  11490. }
  11491. });
  11492. Object.defineProperty(exports, "StaticBlock", {
  11493. enumerable: true,
  11494. get: function() {
  11495. return _index.staticBlock;
  11496. }
  11497. });
  11498. Object.defineProperty(exports, "ModuleExpression", {
  11499. enumerable: true,
  11500. get: function() {
  11501. return _index.moduleExpression;
  11502. }
  11503. });
  11504. Object.defineProperty(exports, "TSParameterProperty", {
  11505. enumerable: true,
  11506. get: function() {
  11507. return _index.tsParameterProperty;
  11508. }
  11509. });
  11510. Object.defineProperty(exports, "TSDeclareFunction", {
  11511. enumerable: true,
  11512. get: function() {
  11513. return _index.tsDeclareFunction;
  11514. }
  11515. });
  11516. Object.defineProperty(exports, "TSDeclareMethod", {
  11517. enumerable: true,
  11518. get: function() {
  11519. return _index.tsDeclareMethod;
  11520. }
  11521. });
  11522. Object.defineProperty(exports, "TSQualifiedName", {
  11523. enumerable: true,
  11524. get: function() {
  11525. return _index.tsQualifiedName;
  11526. }
  11527. });
  11528. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  11529. enumerable: true,
  11530. get: function() {
  11531. return _index.tsCallSignatureDeclaration;
  11532. }
  11533. });
  11534. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  11535. enumerable: true,
  11536. get: function() {
  11537. return _index.tsConstructSignatureDeclaration;
  11538. }
  11539. });
  11540. Object.defineProperty(exports, "TSPropertySignature", {
  11541. enumerable: true,
  11542. get: function() {
  11543. return _index.tsPropertySignature;
  11544. }
  11545. });
  11546. Object.defineProperty(exports, "TSMethodSignature", {
  11547. enumerable: true,
  11548. get: function() {
  11549. return _index.tsMethodSignature;
  11550. }
  11551. });
  11552. Object.defineProperty(exports, "TSIndexSignature", {
  11553. enumerable: true,
  11554. get: function() {
  11555. return _index.tsIndexSignature;
  11556. }
  11557. });
  11558. Object.defineProperty(exports, "TSAnyKeyword", {
  11559. enumerable: true,
  11560. get: function() {
  11561. return _index.tsAnyKeyword;
  11562. }
  11563. });
  11564. Object.defineProperty(exports, "TSBooleanKeyword", {
  11565. enumerable: true,
  11566. get: function() {
  11567. return _index.tsBooleanKeyword;
  11568. }
  11569. });
  11570. Object.defineProperty(exports, "TSBigIntKeyword", {
  11571. enumerable: true,
  11572. get: function() {
  11573. return _index.tsBigIntKeyword;
  11574. }
  11575. });
  11576. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  11577. enumerable: true,
  11578. get: function() {
  11579. return _index.tsIntrinsicKeyword;
  11580. }
  11581. });
  11582. Object.defineProperty(exports, "TSNeverKeyword", {
  11583. enumerable: true,
  11584. get: function() {
  11585. return _index.tsNeverKeyword;
  11586. }
  11587. });
  11588. Object.defineProperty(exports, "TSNullKeyword", {
  11589. enumerable: true,
  11590. get: function() {
  11591. return _index.tsNullKeyword;
  11592. }
  11593. });
  11594. Object.defineProperty(exports, "TSNumberKeyword", {
  11595. enumerable: true,
  11596. get: function() {
  11597. return _index.tsNumberKeyword;
  11598. }
  11599. });
  11600. Object.defineProperty(exports, "TSObjectKeyword", {
  11601. enumerable: true,
  11602. get: function() {
  11603. return _index.tsObjectKeyword;
  11604. }
  11605. });
  11606. Object.defineProperty(exports, "TSStringKeyword", {
  11607. enumerable: true,
  11608. get: function() {
  11609. return _index.tsStringKeyword;
  11610. }
  11611. });
  11612. Object.defineProperty(exports, "TSSymbolKeyword", {
  11613. enumerable: true,
  11614. get: function() {
  11615. return _index.tsSymbolKeyword;
  11616. }
  11617. });
  11618. Object.defineProperty(exports, "TSUndefinedKeyword", {
  11619. enumerable: true,
  11620. get: function() {
  11621. return _index.tsUndefinedKeyword;
  11622. }
  11623. });
  11624. Object.defineProperty(exports, "TSUnknownKeyword", {
  11625. enumerable: true,
  11626. get: function() {
  11627. return _index.tsUnknownKeyword;
  11628. }
  11629. });
  11630. Object.defineProperty(exports, "TSVoidKeyword", {
  11631. enumerable: true,
  11632. get: function() {
  11633. return _index.tsVoidKeyword;
  11634. }
  11635. });
  11636. Object.defineProperty(exports, "TSThisType", {
  11637. enumerable: true,
  11638. get: function() {
  11639. return _index.tsThisType;
  11640. }
  11641. });
  11642. Object.defineProperty(exports, "TSFunctionType", {
  11643. enumerable: true,
  11644. get: function() {
  11645. return _index.tsFunctionType;
  11646. }
  11647. });
  11648. Object.defineProperty(exports, "TSConstructorType", {
  11649. enumerable: true,
  11650. get: function() {
  11651. return _index.tsConstructorType;
  11652. }
  11653. });
  11654. Object.defineProperty(exports, "TSTypeReference", {
  11655. enumerable: true,
  11656. get: function() {
  11657. return _index.tsTypeReference;
  11658. }
  11659. });
  11660. Object.defineProperty(exports, "TSTypePredicate", {
  11661. enumerable: true,
  11662. get: function() {
  11663. return _index.tsTypePredicate;
  11664. }
  11665. });
  11666. Object.defineProperty(exports, "TSTypeQuery", {
  11667. enumerable: true,
  11668. get: function() {
  11669. return _index.tsTypeQuery;
  11670. }
  11671. });
  11672. Object.defineProperty(exports, "TSTypeLiteral", {
  11673. enumerable: true,
  11674. get: function() {
  11675. return _index.tsTypeLiteral;
  11676. }
  11677. });
  11678. Object.defineProperty(exports, "TSArrayType", {
  11679. enumerable: true,
  11680. get: function() {
  11681. return _index.tsArrayType;
  11682. }
  11683. });
  11684. Object.defineProperty(exports, "TSTupleType", {
  11685. enumerable: true,
  11686. get: function() {
  11687. return _index.tsTupleType;
  11688. }
  11689. });
  11690. Object.defineProperty(exports, "TSOptionalType", {
  11691. enumerable: true,
  11692. get: function() {
  11693. return _index.tsOptionalType;
  11694. }
  11695. });
  11696. Object.defineProperty(exports, "TSRestType", {
  11697. enumerable: true,
  11698. get: function() {
  11699. return _index.tsRestType;
  11700. }
  11701. });
  11702. Object.defineProperty(exports, "TSNamedTupleMember", {
  11703. enumerable: true,
  11704. get: function() {
  11705. return _index.tsNamedTupleMember;
  11706. }
  11707. });
  11708. Object.defineProperty(exports, "TSUnionType", {
  11709. enumerable: true,
  11710. get: function() {
  11711. return _index.tsUnionType;
  11712. }
  11713. });
  11714. Object.defineProperty(exports, "TSIntersectionType", {
  11715. enumerable: true,
  11716. get: function() {
  11717. return _index.tsIntersectionType;
  11718. }
  11719. });
  11720. Object.defineProperty(exports, "TSConditionalType", {
  11721. enumerable: true,
  11722. get: function() {
  11723. return _index.tsConditionalType;
  11724. }
  11725. });
  11726. Object.defineProperty(exports, "TSInferType", {
  11727. enumerable: true,
  11728. get: function() {
  11729. return _index.tsInferType;
  11730. }
  11731. });
  11732. Object.defineProperty(exports, "TSParenthesizedType", {
  11733. enumerable: true,
  11734. get: function() {
  11735. return _index.tsParenthesizedType;
  11736. }
  11737. });
  11738. Object.defineProperty(exports, "TSTypeOperator", {
  11739. enumerable: true,
  11740. get: function() {
  11741. return _index.tsTypeOperator;
  11742. }
  11743. });
  11744. Object.defineProperty(exports, "TSIndexedAccessType", {
  11745. enumerable: true,
  11746. get: function() {
  11747. return _index.tsIndexedAccessType;
  11748. }
  11749. });
  11750. Object.defineProperty(exports, "TSMappedType", {
  11751. enumerable: true,
  11752. get: function() {
  11753. return _index.tsMappedType;
  11754. }
  11755. });
  11756. Object.defineProperty(exports, "TSLiteralType", {
  11757. enumerable: true,
  11758. get: function() {
  11759. return _index.tsLiteralType;
  11760. }
  11761. });
  11762. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  11763. enumerable: true,
  11764. get: function() {
  11765. return _index.tsExpressionWithTypeArguments;
  11766. }
  11767. });
  11768. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  11769. enumerable: true,
  11770. get: function() {
  11771. return _index.tsInterfaceDeclaration;
  11772. }
  11773. });
  11774. Object.defineProperty(exports, "TSInterfaceBody", {
  11775. enumerable: true,
  11776. get: function() {
  11777. return _index.tsInterfaceBody;
  11778. }
  11779. });
  11780. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  11781. enumerable: true,
  11782. get: function() {
  11783. return _index.tsTypeAliasDeclaration;
  11784. }
  11785. });
  11786. Object.defineProperty(exports, "TSAsExpression", {
  11787. enumerable: true,
  11788. get: function() {
  11789. return _index.tsAsExpression;
  11790. }
  11791. });
  11792. Object.defineProperty(exports, "TSTypeAssertion", {
  11793. enumerable: true,
  11794. get: function() {
  11795. return _index.tsTypeAssertion;
  11796. }
  11797. });
  11798. Object.defineProperty(exports, "TSEnumDeclaration", {
  11799. enumerable: true,
  11800. get: function() {
  11801. return _index.tsEnumDeclaration;
  11802. }
  11803. });
  11804. Object.defineProperty(exports, "TSEnumMember", {
  11805. enumerable: true,
  11806. get: function() {
  11807. return _index.tsEnumMember;
  11808. }
  11809. });
  11810. Object.defineProperty(exports, "TSModuleDeclaration", {
  11811. enumerable: true,
  11812. get: function() {
  11813. return _index.tsModuleDeclaration;
  11814. }
  11815. });
  11816. Object.defineProperty(exports, "TSModuleBlock", {
  11817. enumerable: true,
  11818. get: function() {
  11819. return _index.tsModuleBlock;
  11820. }
  11821. });
  11822. Object.defineProperty(exports, "TSImportType", {
  11823. enumerable: true,
  11824. get: function() {
  11825. return _index.tsImportType;
  11826. }
  11827. });
  11828. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  11829. enumerable: true,
  11830. get: function() {
  11831. return _index.tsImportEqualsDeclaration;
  11832. }
  11833. });
  11834. Object.defineProperty(exports, "TSExternalModuleReference", {
  11835. enumerable: true,
  11836. get: function() {
  11837. return _index.tsExternalModuleReference;
  11838. }
  11839. });
  11840. Object.defineProperty(exports, "TSNonNullExpression", {
  11841. enumerable: true,
  11842. get: function() {
  11843. return _index.tsNonNullExpression;
  11844. }
  11845. });
  11846. Object.defineProperty(exports, "TSExportAssignment", {
  11847. enumerable: true,
  11848. get: function() {
  11849. return _index.tsExportAssignment;
  11850. }
  11851. });
  11852. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  11853. enumerable: true,
  11854. get: function() {
  11855. return _index.tsNamespaceExportDeclaration;
  11856. }
  11857. });
  11858. Object.defineProperty(exports, "TSTypeAnnotation", {
  11859. enumerable: true,
  11860. get: function() {
  11861. return _index.tsTypeAnnotation;
  11862. }
  11863. });
  11864. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  11865. enumerable: true,
  11866. get: function() {
  11867. return _index.tsTypeParameterInstantiation;
  11868. }
  11869. });
  11870. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  11871. enumerable: true,
  11872. get: function() {
  11873. return _index.tsTypeParameterDeclaration;
  11874. }
  11875. });
  11876. Object.defineProperty(exports, "TSTypeParameter", {
  11877. enumerable: true,
  11878. get: function() {
  11879. return _index.tsTypeParameter;
  11880. }
  11881. });
  11882. Object.defineProperty(exports, "NumberLiteral", {
  11883. enumerable: true,
  11884. get: function() {
  11885. return _index.numberLiteral;
  11886. }
  11887. });
  11888. Object.defineProperty(exports, "RegexLiteral", {
  11889. enumerable: true,
  11890. get: function() {
  11891. return _index.regexLiteral;
  11892. }
  11893. });
  11894. Object.defineProperty(exports, "RestProperty", {
  11895. enumerable: true,
  11896. get: function() {
  11897. return _index.restProperty;
  11898. }
  11899. });
  11900. Object.defineProperty(exports, "SpreadProperty", {
  11901. enumerable: true,
  11902. get: function() {
  11903. return _index.spreadProperty;
  11904. }
  11905. });
  11906. var _index = require_generated2();
  11907. }
  11908. });
  11909. // node_modules/@babel/types/lib/clone/cloneNode.js
  11910. var require_cloneNode = __commonJS({
  11911. "node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  11912. "use strict";
  11913. Object.defineProperty(exports, "__esModule", {
  11914. value: true
  11915. });
  11916. exports.default = cloneNode;
  11917. var _definitions = require_definitions();
  11918. var _generated = require_generated();
  11919. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  11920. function cloneIfNode(obj, deep, withoutLoc) {
  11921. if (obj && typeof obj.type === "string") {
  11922. return cloneNode(obj, deep, withoutLoc);
  11923. }
  11924. return obj;
  11925. }
  11926. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  11927. if (Array.isArray(obj)) {
  11928. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  11929. }
  11930. return cloneIfNode(obj, deep, withoutLoc);
  11931. }
  11932. function cloneNode(node, deep = true, withoutLoc = false) {
  11933. if (!node)
  11934. return node;
  11935. const {
  11936. type
  11937. } = node;
  11938. const newNode = {
  11939. type: node.type
  11940. };
  11941. if ((0, _generated.isIdentifier)(node)) {
  11942. newNode.name = node.name;
  11943. if (has(node, "optional") && typeof node.optional === "boolean") {
  11944. newNode.optional = node.optional;
  11945. }
  11946. if (has(node, "typeAnnotation")) {
  11947. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  11948. }
  11949. } else if (!has(_definitions.NODE_FIELDS, type)) {
  11950. throw new Error(`Unknown node type: "${type}"`);
  11951. } else {
  11952. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  11953. if (has(node, field)) {
  11954. if (deep) {
  11955. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  11956. } else {
  11957. newNode[field] = node[field];
  11958. }
  11959. }
  11960. }
  11961. }
  11962. if (has(node, "loc")) {
  11963. if (withoutLoc) {
  11964. newNode.loc = null;
  11965. } else {
  11966. newNode.loc = node.loc;
  11967. }
  11968. }
  11969. if (has(node, "leadingComments")) {
  11970. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  11971. }
  11972. if (has(node, "innerComments")) {
  11973. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  11974. }
  11975. if (has(node, "trailingComments")) {
  11976. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  11977. }
  11978. if (has(node, "extra")) {
  11979. newNode.extra = Object.assign({}, node.extra);
  11980. }
  11981. return newNode;
  11982. }
  11983. function maybeCloneComments(comments, deep, withoutLoc) {
  11984. if (!comments || !deep) {
  11985. return comments;
  11986. }
  11987. return comments.map(({
  11988. type,
  11989. value,
  11990. loc
  11991. }) => {
  11992. if (withoutLoc) {
  11993. return {
  11994. type,
  11995. value,
  11996. loc: null
  11997. };
  11998. }
  11999. return {
  12000. type,
  12001. value,
  12002. loc
  12003. };
  12004. });
  12005. }
  12006. }
  12007. });
  12008. // node_modules/@babel/types/lib/clone/clone.js
  12009. var require_clone = __commonJS({
  12010. "node_modules/@babel/types/lib/clone/clone.js"(exports) {
  12011. "use strict";
  12012. Object.defineProperty(exports, "__esModule", {
  12013. value: true
  12014. });
  12015. exports.default = clone;
  12016. var _cloneNode = require_cloneNode();
  12017. function clone(node) {
  12018. return (0, _cloneNode.default)(node, false);
  12019. }
  12020. }
  12021. });
  12022. // node_modules/@babel/types/lib/clone/cloneDeep.js
  12023. var require_cloneDeep = __commonJS({
  12024. "node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  12025. "use strict";
  12026. Object.defineProperty(exports, "__esModule", {
  12027. value: true
  12028. });
  12029. exports.default = cloneDeep2;
  12030. var _cloneNode = require_cloneNode();
  12031. function cloneDeep2(node) {
  12032. return (0, _cloneNode.default)(node);
  12033. }
  12034. }
  12035. });
  12036. // node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  12037. var require_cloneDeepWithoutLoc = __commonJS({
  12038. "node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  12039. "use strict";
  12040. Object.defineProperty(exports, "__esModule", {
  12041. value: true
  12042. });
  12043. exports.default = cloneDeepWithoutLoc;
  12044. var _cloneNode = require_cloneNode();
  12045. function cloneDeepWithoutLoc(node) {
  12046. return (0, _cloneNode.default)(node, true, true);
  12047. }
  12048. }
  12049. });
  12050. // node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  12051. var require_cloneWithoutLoc = __commonJS({
  12052. "node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  12053. "use strict";
  12054. Object.defineProperty(exports, "__esModule", {
  12055. value: true
  12056. });
  12057. exports.default = cloneWithoutLoc;
  12058. var _cloneNode = require_cloneNode();
  12059. function cloneWithoutLoc(node) {
  12060. return (0, _cloneNode.default)(node, false, true);
  12061. }
  12062. }
  12063. });
  12064. // node_modules/@babel/types/lib/comments/addComments.js
  12065. var require_addComments = __commonJS({
  12066. "node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  12067. "use strict";
  12068. Object.defineProperty(exports, "__esModule", {
  12069. value: true
  12070. });
  12071. exports.default = addComments;
  12072. function addComments(node, type, comments) {
  12073. if (!comments || !node)
  12074. return node;
  12075. const key = `${type}Comments`;
  12076. if (node[key]) {
  12077. if (type === "leading") {
  12078. node[key] = comments.concat(node[key]);
  12079. } else {
  12080. node[key] = node[key].concat(comments);
  12081. }
  12082. } else {
  12083. node[key] = comments;
  12084. }
  12085. return node;
  12086. }
  12087. }
  12088. });
  12089. // node_modules/@babel/types/lib/comments/addComment.js
  12090. var require_addComment = __commonJS({
  12091. "node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  12092. "use strict";
  12093. Object.defineProperty(exports, "__esModule", {
  12094. value: true
  12095. });
  12096. exports.default = addComment;
  12097. var _addComments = require_addComments();
  12098. function addComment(node, type, content3, line) {
  12099. return (0, _addComments.default)(node, type, [{
  12100. type: line ? "CommentLine" : "CommentBlock",
  12101. value: content3
  12102. }]);
  12103. }
  12104. }
  12105. });
  12106. // node_modules/@babel/types/lib/utils/inherit.js
  12107. var require_inherit = __commonJS({
  12108. "node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  12109. "use strict";
  12110. Object.defineProperty(exports, "__esModule", {
  12111. value: true
  12112. });
  12113. exports.default = inherit2;
  12114. function inherit2(key, child, parent) {
  12115. if (child && parent) {
  12116. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  12117. }
  12118. }
  12119. }
  12120. });
  12121. // node_modules/@babel/types/lib/comments/inheritInnerComments.js
  12122. var require_inheritInnerComments = __commonJS({
  12123. "node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  12124. "use strict";
  12125. Object.defineProperty(exports, "__esModule", {
  12126. value: true
  12127. });
  12128. exports.default = inheritInnerComments;
  12129. var _inherit = require_inherit();
  12130. function inheritInnerComments(child, parent) {
  12131. (0, _inherit.default)("innerComments", child, parent);
  12132. }
  12133. }
  12134. });
  12135. // node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  12136. var require_inheritLeadingComments = __commonJS({
  12137. "node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  12138. "use strict";
  12139. Object.defineProperty(exports, "__esModule", {
  12140. value: true
  12141. });
  12142. exports.default = inheritLeadingComments;
  12143. var _inherit = require_inherit();
  12144. function inheritLeadingComments(child, parent) {
  12145. (0, _inherit.default)("leadingComments", child, parent);
  12146. }
  12147. }
  12148. });
  12149. // node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  12150. var require_inheritTrailingComments = __commonJS({
  12151. "node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  12152. "use strict";
  12153. Object.defineProperty(exports, "__esModule", {
  12154. value: true
  12155. });
  12156. exports.default = inheritTrailingComments;
  12157. var _inherit = require_inherit();
  12158. function inheritTrailingComments(child, parent) {
  12159. (0, _inherit.default)("trailingComments", child, parent);
  12160. }
  12161. }
  12162. });
  12163. // node_modules/@babel/types/lib/comments/inheritsComments.js
  12164. var require_inheritsComments = __commonJS({
  12165. "node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  12166. "use strict";
  12167. Object.defineProperty(exports, "__esModule", {
  12168. value: true
  12169. });
  12170. exports.default = inheritsComments;
  12171. var _inheritTrailingComments = require_inheritTrailingComments();
  12172. var _inheritLeadingComments = require_inheritLeadingComments();
  12173. var _inheritInnerComments = require_inheritInnerComments();
  12174. function inheritsComments(child, parent) {
  12175. (0, _inheritTrailingComments.default)(child, parent);
  12176. (0, _inheritLeadingComments.default)(child, parent);
  12177. (0, _inheritInnerComments.default)(child, parent);
  12178. return child;
  12179. }
  12180. }
  12181. });
  12182. // node_modules/@babel/types/lib/comments/removeComments.js
  12183. var require_removeComments = __commonJS({
  12184. "node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  12185. "use strict";
  12186. Object.defineProperty(exports, "__esModule", {
  12187. value: true
  12188. });
  12189. exports.default = removeComments;
  12190. var _constants = require_constants();
  12191. function removeComments(node) {
  12192. _constants.COMMENT_KEYS.forEach((key) => {
  12193. node[key] = null;
  12194. });
  12195. return node;
  12196. }
  12197. }
  12198. });
  12199. // node_modules/@babel/types/lib/constants/generated/index.js
  12200. var require_generated4 = __commonJS({
  12201. "node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  12202. "use strict";
  12203. Object.defineProperty(exports, "__esModule", {
  12204. value: true
  12205. });
  12206. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.PRIVATE_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  12207. var _definitions = require_definitions();
  12208. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  12209. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  12210. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  12211. exports.BINARY_TYPES = BINARY_TYPES;
  12212. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  12213. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  12214. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  12215. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  12216. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  12217. exports.BLOCK_TYPES = BLOCK_TYPES;
  12218. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  12219. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  12220. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  12221. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  12222. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  12223. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  12224. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  12225. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  12226. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  12227. exports.LOOP_TYPES = LOOP_TYPES;
  12228. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  12229. exports.WHILE_TYPES = WHILE_TYPES;
  12230. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  12231. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  12232. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  12233. exports.FOR_TYPES = FOR_TYPES;
  12234. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  12235. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  12236. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  12237. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  12238. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  12239. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  12240. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  12241. exports.PUREISH_TYPES = PUREISH_TYPES;
  12242. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  12243. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  12244. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  12245. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  12246. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  12247. exports.LVAL_TYPES = LVAL_TYPES;
  12248. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  12249. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  12250. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  12251. exports.LITERAL_TYPES = LITERAL_TYPES;
  12252. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  12253. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  12254. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  12255. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  12256. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  12257. exports.METHOD_TYPES = METHOD_TYPES;
  12258. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  12259. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  12260. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  12261. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  12262. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  12263. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  12264. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  12265. exports.PATTERN_TYPES = PATTERN_TYPES;
  12266. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  12267. exports.CLASS_TYPES = CLASS_TYPES;
  12268. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  12269. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  12270. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  12271. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  12272. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  12273. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  12274. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  12275. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  12276. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  12277. exports.FLOW_TYPES = FLOW_TYPES;
  12278. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  12279. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  12280. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  12281. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  12282. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  12283. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  12284. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  12285. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  12286. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  12287. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  12288. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  12289. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  12290. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  12291. exports.JSX_TYPES = JSX_TYPES;
  12292. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  12293. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  12294. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  12295. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  12296. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  12297. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  12298. }
  12299. });
  12300. // node_modules/@babel/types/lib/converters/toBlock.js
  12301. var require_toBlock = __commonJS({
  12302. "node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  12303. "use strict";
  12304. Object.defineProperty(exports, "__esModule", {
  12305. value: true
  12306. });
  12307. exports.default = toBlock;
  12308. var _generated = require_generated();
  12309. var _generated2 = require_generated2();
  12310. function toBlock(node, parent) {
  12311. if ((0, _generated.isBlockStatement)(node)) {
  12312. return node;
  12313. }
  12314. let blockNodes = [];
  12315. if ((0, _generated.isEmptyStatement)(node)) {
  12316. blockNodes = [];
  12317. } else {
  12318. if (!(0, _generated.isStatement)(node)) {
  12319. if ((0, _generated.isFunction)(parent)) {
  12320. node = (0, _generated2.returnStatement)(node);
  12321. } else {
  12322. node = (0, _generated2.expressionStatement)(node);
  12323. }
  12324. }
  12325. blockNodes = [node];
  12326. }
  12327. return (0, _generated2.blockStatement)(blockNodes);
  12328. }
  12329. }
  12330. });
  12331. // node_modules/@babel/types/lib/converters/ensureBlock.js
  12332. var require_ensureBlock = __commonJS({
  12333. "node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  12334. "use strict";
  12335. Object.defineProperty(exports, "__esModule", {
  12336. value: true
  12337. });
  12338. exports.default = ensureBlock;
  12339. var _toBlock = require_toBlock();
  12340. function ensureBlock(node, key = "body") {
  12341. return node[key] = (0, _toBlock.default)(node[key], node);
  12342. }
  12343. }
  12344. });
  12345. // node_modules/@babel/types/lib/converters/toIdentifier.js
  12346. var require_toIdentifier = __commonJS({
  12347. "node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  12348. "use strict";
  12349. Object.defineProperty(exports, "__esModule", {
  12350. value: true
  12351. });
  12352. exports.default = toIdentifier2;
  12353. var _isValidIdentifier = require_isValidIdentifier();
  12354. var _helperValidatorIdentifier = require_lib();
  12355. function toIdentifier2(input) {
  12356. input = input + "";
  12357. let name2 = "";
  12358. for (const c of input) {
  12359. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  12360. }
  12361. name2 = name2.replace(/^[-0-9]+/, "");
  12362. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  12363. return c ? c.toUpperCase() : "";
  12364. });
  12365. if (!(0, _isValidIdentifier.default)(name2)) {
  12366. name2 = `_${name2}`;
  12367. }
  12368. return name2 || "_";
  12369. }
  12370. }
  12371. });
  12372. // node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  12373. var require_toBindingIdentifierName = __commonJS({
  12374. "node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  12375. "use strict";
  12376. Object.defineProperty(exports, "__esModule", {
  12377. value: true
  12378. });
  12379. exports.default = toBindingIdentifierName;
  12380. var _toIdentifier = require_toIdentifier();
  12381. function toBindingIdentifierName(name2) {
  12382. name2 = (0, _toIdentifier.default)(name2);
  12383. if (name2 === "eval" || name2 === "arguments")
  12384. name2 = "_" + name2;
  12385. return name2;
  12386. }
  12387. }
  12388. });
  12389. // node_modules/@babel/types/lib/converters/toComputedKey.js
  12390. var require_toComputedKey = __commonJS({
  12391. "node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  12392. "use strict";
  12393. Object.defineProperty(exports, "__esModule", {
  12394. value: true
  12395. });
  12396. exports.default = toComputedKey;
  12397. var _generated = require_generated();
  12398. var _generated2 = require_generated2();
  12399. function toComputedKey(node, key = node.key || node.property) {
  12400. if (!node.computed && (0, _generated.isIdentifier)(key))
  12401. key = (0, _generated2.stringLiteral)(key.name);
  12402. return key;
  12403. }
  12404. }
  12405. });
  12406. // node_modules/@babel/types/lib/converters/toExpression.js
  12407. var require_toExpression = __commonJS({
  12408. "node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  12409. "use strict";
  12410. Object.defineProperty(exports, "__esModule", {
  12411. value: true
  12412. });
  12413. exports.default = void 0;
  12414. var _generated = require_generated();
  12415. var _default = toExpression;
  12416. exports.default = _default;
  12417. function toExpression(node) {
  12418. if ((0, _generated.isExpressionStatement)(node)) {
  12419. node = node.expression;
  12420. }
  12421. if ((0, _generated.isExpression)(node)) {
  12422. return node;
  12423. }
  12424. if ((0, _generated.isClass)(node)) {
  12425. node.type = "ClassExpression";
  12426. } else if ((0, _generated.isFunction)(node)) {
  12427. node.type = "FunctionExpression";
  12428. }
  12429. if (!(0, _generated.isExpression)(node)) {
  12430. throw new Error(`cannot turn ${node.type} to an expression`);
  12431. }
  12432. return node;
  12433. }
  12434. }
  12435. });
  12436. // node_modules/@babel/types/lib/traverse/traverseFast.js
  12437. var require_traverseFast = __commonJS({
  12438. "node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  12439. "use strict";
  12440. Object.defineProperty(exports, "__esModule", {
  12441. value: true
  12442. });
  12443. exports.default = traverseFast;
  12444. var _definitions = require_definitions();
  12445. function traverseFast(node, enter, opts) {
  12446. if (!node)
  12447. return;
  12448. const keys2 = _definitions.VISITOR_KEYS[node.type];
  12449. if (!keys2)
  12450. return;
  12451. opts = opts || {};
  12452. enter(node, opts);
  12453. for (const key of keys2) {
  12454. const subNode = node[key];
  12455. if (Array.isArray(subNode)) {
  12456. for (const node2 of subNode) {
  12457. traverseFast(node2, enter, opts);
  12458. }
  12459. } else {
  12460. traverseFast(subNode, enter, opts);
  12461. }
  12462. }
  12463. }
  12464. }
  12465. });
  12466. // node_modules/@babel/types/lib/modifications/removeProperties.js
  12467. var require_removeProperties = __commonJS({
  12468. "node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  12469. "use strict";
  12470. Object.defineProperty(exports, "__esModule", {
  12471. value: true
  12472. });
  12473. exports.default = removeProperties;
  12474. var _constants = require_constants();
  12475. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  12476. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  12477. function removeProperties(node, opts = {}) {
  12478. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  12479. for (const key of map) {
  12480. if (node[key] != null)
  12481. node[key] = void 0;
  12482. }
  12483. for (const key of Object.keys(node)) {
  12484. if (key[0] === "_" && node[key] != null)
  12485. node[key] = void 0;
  12486. }
  12487. const symbols = Object.getOwnPropertySymbols(node);
  12488. for (const sym of symbols) {
  12489. node[sym] = null;
  12490. }
  12491. }
  12492. }
  12493. });
  12494. // node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  12495. var require_removePropertiesDeep = __commonJS({
  12496. "node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  12497. "use strict";
  12498. Object.defineProperty(exports, "__esModule", {
  12499. value: true
  12500. });
  12501. exports.default = removePropertiesDeep;
  12502. var _traverseFast = require_traverseFast();
  12503. var _removeProperties = require_removeProperties();
  12504. function removePropertiesDeep(tree, opts) {
  12505. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  12506. return tree;
  12507. }
  12508. }
  12509. });
  12510. // node_modules/@babel/types/lib/converters/toKeyAlias.js
  12511. var require_toKeyAlias = __commonJS({
  12512. "node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  12513. "use strict";
  12514. Object.defineProperty(exports, "__esModule", {
  12515. value: true
  12516. });
  12517. exports.default = toKeyAlias;
  12518. var _generated = require_generated();
  12519. var _cloneNode = require_cloneNode();
  12520. var _removePropertiesDeep = require_removePropertiesDeep();
  12521. function toKeyAlias(node, key = node.key) {
  12522. let alias;
  12523. if (node.kind === "method") {
  12524. return toKeyAlias.increment() + "";
  12525. } else if ((0, _generated.isIdentifier)(key)) {
  12526. alias = key.name;
  12527. } else if ((0, _generated.isStringLiteral)(key)) {
  12528. alias = JSON.stringify(key.value);
  12529. } else {
  12530. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  12531. }
  12532. if (node.computed) {
  12533. alias = `[${alias}]`;
  12534. }
  12535. if (node.static) {
  12536. alias = `static:${alias}`;
  12537. }
  12538. return alias;
  12539. }
  12540. toKeyAlias.uid = 0;
  12541. toKeyAlias.increment = function() {
  12542. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  12543. return toKeyAlias.uid = 0;
  12544. } else {
  12545. return toKeyAlias.uid++;
  12546. }
  12547. };
  12548. }
  12549. });
  12550. // node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  12551. var require_getBindingIdentifiers = __commonJS({
  12552. "node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  12553. "use strict";
  12554. Object.defineProperty(exports, "__esModule", {
  12555. value: true
  12556. });
  12557. exports.default = getBindingIdentifiers;
  12558. var _generated = require_generated();
  12559. function getBindingIdentifiers(node, duplicates, outerOnly) {
  12560. let search2 = [].concat(node);
  12561. const ids = /* @__PURE__ */ Object.create(null);
  12562. while (search2.length) {
  12563. const id = search2.shift();
  12564. if (!id)
  12565. continue;
  12566. const keys2 = getBindingIdentifiers.keys[id.type];
  12567. if ((0, _generated.isIdentifier)(id)) {
  12568. if (duplicates) {
  12569. const _ids = ids[id.name] = ids[id.name] || [];
  12570. _ids.push(id);
  12571. } else {
  12572. ids[id.name] = id;
  12573. }
  12574. continue;
  12575. }
  12576. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  12577. if ((0, _generated.isDeclaration)(id.declaration)) {
  12578. search2.push(id.declaration);
  12579. }
  12580. continue;
  12581. }
  12582. if (outerOnly) {
  12583. if ((0, _generated.isFunctionDeclaration)(id)) {
  12584. search2.push(id.id);
  12585. continue;
  12586. }
  12587. if ((0, _generated.isFunctionExpression)(id)) {
  12588. continue;
  12589. }
  12590. }
  12591. if (keys2) {
  12592. for (let i = 0; i < keys2.length; i++) {
  12593. const key = keys2[i];
  12594. if (id[key]) {
  12595. search2 = search2.concat(id[key]);
  12596. }
  12597. }
  12598. }
  12599. }
  12600. return ids;
  12601. }
  12602. getBindingIdentifiers.keys = {
  12603. DeclareClass: ["id"],
  12604. DeclareFunction: ["id"],
  12605. DeclareModule: ["id"],
  12606. DeclareVariable: ["id"],
  12607. DeclareInterface: ["id"],
  12608. DeclareTypeAlias: ["id"],
  12609. DeclareOpaqueType: ["id"],
  12610. InterfaceDeclaration: ["id"],
  12611. TypeAlias: ["id"],
  12612. OpaqueType: ["id"],
  12613. CatchClause: ["param"],
  12614. LabeledStatement: ["label"],
  12615. UnaryExpression: ["argument"],
  12616. AssignmentExpression: ["left"],
  12617. ImportSpecifier: ["local"],
  12618. ImportNamespaceSpecifier: ["local"],
  12619. ImportDefaultSpecifier: ["local"],
  12620. ImportDeclaration: ["specifiers"],
  12621. ExportSpecifier: ["exported"],
  12622. ExportNamespaceSpecifier: ["exported"],
  12623. ExportDefaultSpecifier: ["exported"],
  12624. FunctionDeclaration: ["id", "params"],
  12625. FunctionExpression: ["id", "params"],
  12626. ArrowFunctionExpression: ["params"],
  12627. ObjectMethod: ["params"],
  12628. ClassMethod: ["params"],
  12629. ForInStatement: ["left"],
  12630. ForOfStatement: ["left"],
  12631. ClassDeclaration: ["id"],
  12632. ClassExpression: ["id"],
  12633. RestElement: ["argument"],
  12634. UpdateExpression: ["argument"],
  12635. ObjectProperty: ["value"],
  12636. AssignmentPattern: ["left"],
  12637. ArrayPattern: ["elements"],
  12638. ObjectPattern: ["properties"],
  12639. VariableDeclaration: ["declarations"],
  12640. VariableDeclarator: ["id"]
  12641. };
  12642. }
  12643. });
  12644. // node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  12645. var require_gatherSequenceExpressions = __commonJS({
  12646. "node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  12647. "use strict";
  12648. Object.defineProperty(exports, "__esModule", {
  12649. value: true
  12650. });
  12651. exports.default = gatherSequenceExpressions;
  12652. var _getBindingIdentifiers = require_getBindingIdentifiers();
  12653. var _generated = require_generated();
  12654. var _generated2 = require_generated2();
  12655. var _cloneNode = require_cloneNode();
  12656. function gatherSequenceExpressions(nodes, scope, declars) {
  12657. const exprs = [];
  12658. let ensureLastUndefined = true;
  12659. for (const node of nodes) {
  12660. if (!(0, _generated.isEmptyStatement)(node)) {
  12661. ensureLastUndefined = false;
  12662. }
  12663. if ((0, _generated.isExpression)(node)) {
  12664. exprs.push(node);
  12665. } else if ((0, _generated.isExpressionStatement)(node)) {
  12666. exprs.push(node.expression);
  12667. } else if ((0, _generated.isVariableDeclaration)(node)) {
  12668. if (node.kind !== "var")
  12669. return;
  12670. for (const declar of node.declarations) {
  12671. const bindings = (0, _getBindingIdentifiers.default)(declar);
  12672. for (const key of Object.keys(bindings)) {
  12673. declars.push({
  12674. kind: node.kind,
  12675. id: (0, _cloneNode.default)(bindings[key])
  12676. });
  12677. }
  12678. if (declar.init) {
  12679. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  12680. }
  12681. }
  12682. ensureLastUndefined = true;
  12683. } else if ((0, _generated.isIfStatement)(node)) {
  12684. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  12685. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  12686. if (!consequent || !alternate)
  12687. return;
  12688. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  12689. } else if ((0, _generated.isBlockStatement)(node)) {
  12690. const body = gatherSequenceExpressions(node.body, scope, declars);
  12691. if (!body)
  12692. return;
  12693. exprs.push(body);
  12694. } else if ((0, _generated.isEmptyStatement)(node)) {
  12695. if (nodes.indexOf(node) === 0) {
  12696. ensureLastUndefined = true;
  12697. }
  12698. } else {
  12699. return;
  12700. }
  12701. }
  12702. if (ensureLastUndefined) {
  12703. exprs.push(scope.buildUndefinedNode());
  12704. }
  12705. if (exprs.length === 1) {
  12706. return exprs[0];
  12707. } else {
  12708. return (0, _generated2.sequenceExpression)(exprs);
  12709. }
  12710. }
  12711. }
  12712. });
  12713. // node_modules/@babel/types/lib/converters/toSequenceExpression.js
  12714. var require_toSequenceExpression = __commonJS({
  12715. "node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  12716. "use strict";
  12717. Object.defineProperty(exports, "__esModule", {
  12718. value: true
  12719. });
  12720. exports.default = toSequenceExpression;
  12721. var _gatherSequenceExpressions = require_gatherSequenceExpressions();
  12722. function toSequenceExpression(nodes, scope) {
  12723. if (!(nodes != null && nodes.length))
  12724. return;
  12725. const declars = [];
  12726. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  12727. if (!result)
  12728. return;
  12729. for (const declar of declars) {
  12730. scope.push(declar);
  12731. }
  12732. return result;
  12733. }
  12734. }
  12735. });
  12736. // node_modules/@babel/types/lib/converters/toStatement.js
  12737. var require_toStatement = __commonJS({
  12738. "node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  12739. "use strict";
  12740. Object.defineProperty(exports, "__esModule", {
  12741. value: true
  12742. });
  12743. exports.default = void 0;
  12744. var _generated = require_generated();
  12745. var _generated2 = require_generated2();
  12746. var _default = toStatement;
  12747. exports.default = _default;
  12748. function toStatement(node, ignore3) {
  12749. if ((0, _generated.isStatement)(node)) {
  12750. return node;
  12751. }
  12752. let mustHaveId = false;
  12753. let newType;
  12754. if ((0, _generated.isClass)(node)) {
  12755. mustHaveId = true;
  12756. newType = "ClassDeclaration";
  12757. } else if ((0, _generated.isFunction)(node)) {
  12758. mustHaveId = true;
  12759. newType = "FunctionDeclaration";
  12760. } else if ((0, _generated.isAssignmentExpression)(node)) {
  12761. return (0, _generated2.expressionStatement)(node);
  12762. }
  12763. if (mustHaveId && !node.id) {
  12764. newType = false;
  12765. }
  12766. if (!newType) {
  12767. if (ignore3) {
  12768. return false;
  12769. } else {
  12770. throw new Error(`cannot turn ${node.type} to a statement`);
  12771. }
  12772. }
  12773. node.type = newType;
  12774. return node;
  12775. }
  12776. }
  12777. });
  12778. // node_modules/@babel/types/lib/converters/valueToNode.js
  12779. var require_valueToNode = __commonJS({
  12780. "node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  12781. "use strict";
  12782. Object.defineProperty(exports, "__esModule", {
  12783. value: true
  12784. });
  12785. exports.default = void 0;
  12786. var _isValidIdentifier = require_isValidIdentifier();
  12787. var _generated = require_generated2();
  12788. var _default = valueToNode;
  12789. exports.default = _default;
  12790. var objectToString = Function.call.bind(Object.prototype.toString);
  12791. function isRegExp(value) {
  12792. return objectToString(value) === "[object RegExp]";
  12793. }
  12794. function isPlainObject2(value) {
  12795. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  12796. return false;
  12797. }
  12798. const proto = Object.getPrototypeOf(value);
  12799. return proto === null || Object.getPrototypeOf(proto) === null;
  12800. }
  12801. function valueToNode(value) {
  12802. if (value === void 0) {
  12803. return (0, _generated.identifier)("undefined");
  12804. }
  12805. if (value === true || value === false) {
  12806. return (0, _generated.booleanLiteral)(value);
  12807. }
  12808. if (value === null) {
  12809. return (0, _generated.nullLiteral)();
  12810. }
  12811. if (typeof value === "string") {
  12812. return (0, _generated.stringLiteral)(value);
  12813. }
  12814. if (typeof value === "number") {
  12815. let result;
  12816. if (Number.isFinite(value)) {
  12817. result = (0, _generated.numericLiteral)(Math.abs(value));
  12818. } else {
  12819. let numerator;
  12820. if (Number.isNaN(value)) {
  12821. numerator = (0, _generated.numericLiteral)(0);
  12822. } else {
  12823. numerator = (0, _generated.numericLiteral)(1);
  12824. }
  12825. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  12826. }
  12827. if (value < 0 || Object.is(value, -0)) {
  12828. result = (0, _generated.unaryExpression)("-", result);
  12829. }
  12830. return result;
  12831. }
  12832. if (isRegExp(value)) {
  12833. const pattern = value.source;
  12834. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  12835. return (0, _generated.regExpLiteral)(pattern, flags);
  12836. }
  12837. if (Array.isArray(value)) {
  12838. return (0, _generated.arrayExpression)(value.map(valueToNode));
  12839. }
  12840. if (isPlainObject2(value)) {
  12841. const props = [];
  12842. for (const key of Object.keys(value)) {
  12843. let nodeKey;
  12844. if ((0, _isValidIdentifier.default)(key)) {
  12845. nodeKey = (0, _generated.identifier)(key);
  12846. } else {
  12847. nodeKey = (0, _generated.stringLiteral)(key);
  12848. }
  12849. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  12850. }
  12851. return (0, _generated.objectExpression)(props);
  12852. }
  12853. throw new Error("don't know how to turn this value into a node");
  12854. }
  12855. }
  12856. });
  12857. // node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  12858. var require_appendToMemberExpression = __commonJS({
  12859. "node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  12860. "use strict";
  12861. Object.defineProperty(exports, "__esModule", {
  12862. value: true
  12863. });
  12864. exports.default = appendToMemberExpression;
  12865. var _generated = require_generated2();
  12866. function appendToMemberExpression(member, append, computed = false) {
  12867. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  12868. member.property = append;
  12869. member.computed = !!computed;
  12870. return member;
  12871. }
  12872. }
  12873. });
  12874. // node_modules/@babel/types/lib/modifications/inherits.js
  12875. var require_inherits = __commonJS({
  12876. "node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  12877. "use strict";
  12878. Object.defineProperty(exports, "__esModule", {
  12879. value: true
  12880. });
  12881. exports.default = inherits;
  12882. var _constants = require_constants();
  12883. var _inheritsComments = require_inheritsComments();
  12884. function inherits(child, parent) {
  12885. if (!child || !parent)
  12886. return child;
  12887. for (const key of _constants.INHERIT_KEYS.optional) {
  12888. if (child[key] == null) {
  12889. child[key] = parent[key];
  12890. }
  12891. }
  12892. for (const key of Object.keys(parent)) {
  12893. if (key[0] === "_" && key !== "__clone")
  12894. child[key] = parent[key];
  12895. }
  12896. for (const key of _constants.INHERIT_KEYS.force) {
  12897. child[key] = parent[key];
  12898. }
  12899. (0, _inheritsComments.default)(child, parent);
  12900. return child;
  12901. }
  12902. }
  12903. });
  12904. // node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  12905. var require_prependToMemberExpression = __commonJS({
  12906. "node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  12907. "use strict";
  12908. Object.defineProperty(exports, "__esModule", {
  12909. value: true
  12910. });
  12911. exports.default = prependToMemberExpression;
  12912. var _generated = require_generated2();
  12913. function prependToMemberExpression(member, prepend) {
  12914. member.object = (0, _generated.memberExpression)(prepend, member.object);
  12915. return member;
  12916. }
  12917. }
  12918. });
  12919. // node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  12920. var require_getOuterBindingIdentifiers = __commonJS({
  12921. "node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  12922. "use strict";
  12923. Object.defineProperty(exports, "__esModule", {
  12924. value: true
  12925. });
  12926. exports.default = void 0;
  12927. var _getBindingIdentifiers = require_getBindingIdentifiers();
  12928. var _default = getOuterBindingIdentifiers;
  12929. exports.default = _default;
  12930. function getOuterBindingIdentifiers(node, duplicates) {
  12931. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  12932. }
  12933. }
  12934. });
  12935. // node_modules/@babel/types/lib/traverse/traverse.js
  12936. var require_traverse = __commonJS({
  12937. "node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  12938. "use strict";
  12939. Object.defineProperty(exports, "__esModule", {
  12940. value: true
  12941. });
  12942. exports.default = traverse;
  12943. var _definitions = require_definitions();
  12944. function traverse(node, handlers2, state) {
  12945. if (typeof handlers2 === "function") {
  12946. handlers2 = {
  12947. enter: handlers2
  12948. };
  12949. }
  12950. const {
  12951. enter,
  12952. exit: exit2
  12953. } = handlers2;
  12954. traverseSimpleImpl(node, enter, exit2, state, []);
  12955. }
  12956. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  12957. const keys2 = _definitions.VISITOR_KEYS[node.type];
  12958. if (!keys2)
  12959. return;
  12960. if (enter)
  12961. enter(node, ancestors, state);
  12962. for (const key of keys2) {
  12963. const subNode = node[key];
  12964. if (Array.isArray(subNode)) {
  12965. for (let i = 0; i < subNode.length; i++) {
  12966. const child = subNode[i];
  12967. if (!child)
  12968. continue;
  12969. ancestors.push({
  12970. node,
  12971. key,
  12972. index: i
  12973. });
  12974. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  12975. ancestors.pop();
  12976. }
  12977. } else if (subNode) {
  12978. ancestors.push({
  12979. node,
  12980. key
  12981. });
  12982. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  12983. ancestors.pop();
  12984. }
  12985. }
  12986. if (exit2)
  12987. exit2(node, ancestors, state);
  12988. }
  12989. }
  12990. });
  12991. // node_modules/@babel/types/lib/validators/isBinding.js
  12992. var require_isBinding = __commonJS({
  12993. "node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  12994. "use strict";
  12995. Object.defineProperty(exports, "__esModule", {
  12996. value: true
  12997. });
  12998. exports.default = isBinding;
  12999. var _getBindingIdentifiers = require_getBindingIdentifiers();
  13000. function isBinding(node, parent, grandparent) {
  13001. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  13002. return false;
  13003. }
  13004. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  13005. if (keys2) {
  13006. for (let i = 0; i < keys2.length; i++) {
  13007. const key = keys2[i];
  13008. const val = parent[key];
  13009. if (Array.isArray(val)) {
  13010. if (val.indexOf(node) >= 0)
  13011. return true;
  13012. } else {
  13013. if (val === node)
  13014. return true;
  13015. }
  13016. }
  13017. }
  13018. return false;
  13019. }
  13020. }
  13021. });
  13022. // node_modules/@babel/types/lib/validators/isLet.js
  13023. var require_isLet = __commonJS({
  13024. "node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  13025. "use strict";
  13026. Object.defineProperty(exports, "__esModule", {
  13027. value: true
  13028. });
  13029. exports.default = isLet;
  13030. var _generated = require_generated();
  13031. var _constants = require_constants();
  13032. function isLet(node) {
  13033. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  13034. }
  13035. }
  13036. });
  13037. // node_modules/@babel/types/lib/validators/isBlockScoped.js
  13038. var require_isBlockScoped = __commonJS({
  13039. "node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  13040. "use strict";
  13041. Object.defineProperty(exports, "__esModule", {
  13042. value: true
  13043. });
  13044. exports.default = isBlockScoped;
  13045. var _generated = require_generated();
  13046. var _isLet = require_isLet();
  13047. function isBlockScoped(node) {
  13048. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  13049. }
  13050. }
  13051. });
  13052. // node_modules/@babel/types/lib/validators/isImmutable.js
  13053. var require_isImmutable = __commonJS({
  13054. "node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  13055. "use strict";
  13056. Object.defineProperty(exports, "__esModule", {
  13057. value: true
  13058. });
  13059. exports.default = isImmutable;
  13060. var _isType = require_isType();
  13061. var _generated = require_generated();
  13062. function isImmutable(node) {
  13063. if ((0, _isType.default)(node.type, "Immutable"))
  13064. return true;
  13065. if ((0, _generated.isIdentifier)(node)) {
  13066. if (node.name === "undefined") {
  13067. return true;
  13068. } else {
  13069. return false;
  13070. }
  13071. }
  13072. return false;
  13073. }
  13074. }
  13075. });
  13076. // node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  13077. var require_isNodesEquivalent = __commonJS({
  13078. "node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  13079. "use strict";
  13080. Object.defineProperty(exports, "__esModule", {
  13081. value: true
  13082. });
  13083. exports.default = isNodesEquivalent;
  13084. var _definitions = require_definitions();
  13085. function isNodesEquivalent(a, b) {
  13086. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  13087. return a === b;
  13088. }
  13089. if (a.type !== b.type) {
  13090. return false;
  13091. }
  13092. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  13093. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  13094. for (const field of fields) {
  13095. if (typeof a[field] !== typeof b[field]) {
  13096. return false;
  13097. }
  13098. if (a[field] == null && b[field] == null) {
  13099. continue;
  13100. } else if (a[field] == null || b[field] == null) {
  13101. return false;
  13102. }
  13103. if (Array.isArray(a[field])) {
  13104. if (!Array.isArray(b[field])) {
  13105. return false;
  13106. }
  13107. if (a[field].length !== b[field].length) {
  13108. return false;
  13109. }
  13110. for (let i = 0; i < a[field].length; i++) {
  13111. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  13112. return false;
  13113. }
  13114. }
  13115. continue;
  13116. }
  13117. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  13118. for (const key of Object.keys(a[field])) {
  13119. if (a[field][key] !== b[field][key]) {
  13120. return false;
  13121. }
  13122. }
  13123. continue;
  13124. }
  13125. if (!isNodesEquivalent(a[field], b[field])) {
  13126. return false;
  13127. }
  13128. }
  13129. return true;
  13130. }
  13131. }
  13132. });
  13133. // node_modules/@babel/types/lib/validators/isReferenced.js
  13134. var require_isReferenced = __commonJS({
  13135. "node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  13136. "use strict";
  13137. Object.defineProperty(exports, "__esModule", {
  13138. value: true
  13139. });
  13140. exports.default = isReferenced;
  13141. function isReferenced(node, parent, grandparent) {
  13142. switch (parent.type) {
  13143. case "MemberExpression":
  13144. case "JSXMemberExpression":
  13145. case "OptionalMemberExpression":
  13146. if (parent.property === node) {
  13147. return !!parent.computed;
  13148. }
  13149. return parent.object === node;
  13150. case "VariableDeclarator":
  13151. return parent.init === node;
  13152. case "ArrowFunctionExpression":
  13153. return parent.body === node;
  13154. case "PrivateName":
  13155. return false;
  13156. case "ClassMethod":
  13157. case "ClassPrivateMethod":
  13158. case "ObjectMethod":
  13159. if (parent.params.includes(node)) {
  13160. return false;
  13161. }
  13162. case "ObjectProperty":
  13163. case "ClassProperty":
  13164. case "ClassPrivateProperty":
  13165. if (parent.key === node) {
  13166. return !!parent.computed;
  13167. }
  13168. if (parent.value === node) {
  13169. return !grandparent || grandparent.type !== "ObjectPattern";
  13170. }
  13171. return true;
  13172. case "ClassDeclaration":
  13173. case "ClassExpression":
  13174. return parent.superClass === node;
  13175. case "AssignmentExpression":
  13176. return parent.right === node;
  13177. case "AssignmentPattern":
  13178. return parent.right === node;
  13179. case "LabeledStatement":
  13180. return false;
  13181. case "CatchClause":
  13182. return false;
  13183. case "RestElement":
  13184. return false;
  13185. case "BreakStatement":
  13186. case "ContinueStatement":
  13187. return false;
  13188. case "FunctionDeclaration":
  13189. case "FunctionExpression":
  13190. return false;
  13191. case "ExportNamespaceSpecifier":
  13192. case "ExportDefaultSpecifier":
  13193. return false;
  13194. case "ExportSpecifier":
  13195. if (grandparent != null && grandparent.source) {
  13196. return false;
  13197. }
  13198. return parent.local === node;
  13199. case "ImportDefaultSpecifier":
  13200. case "ImportNamespaceSpecifier":
  13201. case "ImportSpecifier":
  13202. return false;
  13203. case "JSXAttribute":
  13204. return false;
  13205. case "ObjectPattern":
  13206. case "ArrayPattern":
  13207. return false;
  13208. case "MetaProperty":
  13209. return false;
  13210. case "ObjectTypeProperty":
  13211. return parent.key !== node;
  13212. case "TSEnumMember":
  13213. return parent.id !== node;
  13214. case "TSPropertySignature":
  13215. if (parent.key === node) {
  13216. return !!parent.computed;
  13217. }
  13218. return true;
  13219. }
  13220. return true;
  13221. }
  13222. }
  13223. });
  13224. // node_modules/@babel/types/lib/validators/isScope.js
  13225. var require_isScope = __commonJS({
  13226. "node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  13227. "use strict";
  13228. Object.defineProperty(exports, "__esModule", {
  13229. value: true
  13230. });
  13231. exports.default = isScope;
  13232. var _generated = require_generated();
  13233. function isScope(node, parent) {
  13234. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  13235. return false;
  13236. }
  13237. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  13238. return true;
  13239. }
  13240. return (0, _generated.isScopable)(node);
  13241. }
  13242. }
  13243. });
  13244. // node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  13245. var require_isSpecifierDefault = __commonJS({
  13246. "node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  13247. "use strict";
  13248. Object.defineProperty(exports, "__esModule", {
  13249. value: true
  13250. });
  13251. exports.default = isSpecifierDefault;
  13252. var _generated = require_generated();
  13253. function isSpecifierDefault(specifier) {
  13254. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  13255. name: "default"
  13256. });
  13257. }
  13258. }
  13259. });
  13260. // node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  13261. var require_isValidES3Identifier = __commonJS({
  13262. "node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  13263. "use strict";
  13264. Object.defineProperty(exports, "__esModule", {
  13265. value: true
  13266. });
  13267. exports.default = isValidES3Identifier;
  13268. var _isValidIdentifier = require_isValidIdentifier();
  13269. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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"]);
  13270. function isValidES3Identifier(name2) {
  13271. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  13272. }
  13273. }
  13274. });
  13275. // node_modules/@babel/types/lib/validators/isVar.js
  13276. var require_isVar = __commonJS({
  13277. "node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  13278. "use strict";
  13279. Object.defineProperty(exports, "__esModule", {
  13280. value: true
  13281. });
  13282. exports.default = isVar;
  13283. var _generated = require_generated();
  13284. var _constants = require_constants();
  13285. function isVar(node) {
  13286. return (0, _generated.isVariableDeclaration)(node, {
  13287. kind: "var"
  13288. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  13289. }
  13290. }
  13291. });
  13292. // node_modules/@babel/types/lib/ast-types/generated/index.js
  13293. var require_generated5 = __commonJS({
  13294. "node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  13295. }
  13296. });
  13297. // node_modules/@babel/types/lib/index.js
  13298. var require_lib2 = __commonJS({
  13299. "node_modules/@babel/types/lib/index.js"(exports) {
  13300. "use strict";
  13301. Object.defineProperty(exports, "__esModule", {
  13302. value: true
  13303. });
  13304. var _exportNames = {
  13305. react: true,
  13306. assertNode: true,
  13307. createTypeAnnotationBasedOnTypeof: true,
  13308. createUnionTypeAnnotation: true,
  13309. createFlowUnionType: true,
  13310. createTSUnionType: true,
  13311. cloneNode: true,
  13312. clone: true,
  13313. cloneDeep: true,
  13314. cloneDeepWithoutLoc: true,
  13315. cloneWithoutLoc: true,
  13316. addComment: true,
  13317. addComments: true,
  13318. inheritInnerComments: true,
  13319. inheritLeadingComments: true,
  13320. inheritsComments: true,
  13321. inheritTrailingComments: true,
  13322. removeComments: true,
  13323. ensureBlock: true,
  13324. toBindingIdentifierName: true,
  13325. toBlock: true,
  13326. toComputedKey: true,
  13327. toExpression: true,
  13328. toIdentifier: true,
  13329. toKeyAlias: true,
  13330. toSequenceExpression: true,
  13331. toStatement: true,
  13332. valueToNode: true,
  13333. appendToMemberExpression: true,
  13334. inherits: true,
  13335. prependToMemberExpression: true,
  13336. removeProperties: true,
  13337. removePropertiesDeep: true,
  13338. removeTypeDuplicates: true,
  13339. getBindingIdentifiers: true,
  13340. getOuterBindingIdentifiers: true,
  13341. traverse: true,
  13342. traverseFast: true,
  13343. shallowEqual: true,
  13344. is: true,
  13345. isBinding: true,
  13346. isBlockScoped: true,
  13347. isImmutable: true,
  13348. isLet: true,
  13349. isNode: true,
  13350. isNodesEquivalent: true,
  13351. isPlaceholderType: true,
  13352. isReferenced: true,
  13353. isScope: true,
  13354. isSpecifierDefault: true,
  13355. isType: true,
  13356. isValidES3Identifier: true,
  13357. isValidIdentifier: true,
  13358. isVar: true,
  13359. matchesPattern: true,
  13360. validate: true,
  13361. buildMatchMemberExpression: true
  13362. };
  13363. Object.defineProperty(exports, "assertNode", {
  13364. enumerable: true,
  13365. get: function() {
  13366. return _assertNode.default;
  13367. }
  13368. });
  13369. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  13370. enumerable: true,
  13371. get: function() {
  13372. return _createTypeAnnotationBasedOnTypeof.default;
  13373. }
  13374. });
  13375. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  13376. enumerable: true,
  13377. get: function() {
  13378. return _createFlowUnionType.default;
  13379. }
  13380. });
  13381. Object.defineProperty(exports, "createFlowUnionType", {
  13382. enumerable: true,
  13383. get: function() {
  13384. return _createFlowUnionType.default;
  13385. }
  13386. });
  13387. Object.defineProperty(exports, "createTSUnionType", {
  13388. enumerable: true,
  13389. get: function() {
  13390. return _createTSUnionType.default;
  13391. }
  13392. });
  13393. Object.defineProperty(exports, "cloneNode", {
  13394. enumerable: true,
  13395. get: function() {
  13396. return _cloneNode.default;
  13397. }
  13398. });
  13399. Object.defineProperty(exports, "clone", {
  13400. enumerable: true,
  13401. get: function() {
  13402. return _clone.default;
  13403. }
  13404. });
  13405. Object.defineProperty(exports, "cloneDeep", {
  13406. enumerable: true,
  13407. get: function() {
  13408. return _cloneDeep.default;
  13409. }
  13410. });
  13411. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  13412. enumerable: true,
  13413. get: function() {
  13414. return _cloneDeepWithoutLoc.default;
  13415. }
  13416. });
  13417. Object.defineProperty(exports, "cloneWithoutLoc", {
  13418. enumerable: true,
  13419. get: function() {
  13420. return _cloneWithoutLoc.default;
  13421. }
  13422. });
  13423. Object.defineProperty(exports, "addComment", {
  13424. enumerable: true,
  13425. get: function() {
  13426. return _addComment.default;
  13427. }
  13428. });
  13429. Object.defineProperty(exports, "addComments", {
  13430. enumerable: true,
  13431. get: function() {
  13432. return _addComments.default;
  13433. }
  13434. });
  13435. Object.defineProperty(exports, "inheritInnerComments", {
  13436. enumerable: true,
  13437. get: function() {
  13438. return _inheritInnerComments.default;
  13439. }
  13440. });
  13441. Object.defineProperty(exports, "inheritLeadingComments", {
  13442. enumerable: true,
  13443. get: function() {
  13444. return _inheritLeadingComments.default;
  13445. }
  13446. });
  13447. Object.defineProperty(exports, "inheritsComments", {
  13448. enumerable: true,
  13449. get: function() {
  13450. return _inheritsComments.default;
  13451. }
  13452. });
  13453. Object.defineProperty(exports, "inheritTrailingComments", {
  13454. enumerable: true,
  13455. get: function() {
  13456. return _inheritTrailingComments.default;
  13457. }
  13458. });
  13459. Object.defineProperty(exports, "removeComments", {
  13460. enumerable: true,
  13461. get: function() {
  13462. return _removeComments.default;
  13463. }
  13464. });
  13465. Object.defineProperty(exports, "ensureBlock", {
  13466. enumerable: true,
  13467. get: function() {
  13468. return _ensureBlock.default;
  13469. }
  13470. });
  13471. Object.defineProperty(exports, "toBindingIdentifierName", {
  13472. enumerable: true,
  13473. get: function() {
  13474. return _toBindingIdentifierName.default;
  13475. }
  13476. });
  13477. Object.defineProperty(exports, "toBlock", {
  13478. enumerable: true,
  13479. get: function() {
  13480. return _toBlock.default;
  13481. }
  13482. });
  13483. Object.defineProperty(exports, "toComputedKey", {
  13484. enumerable: true,
  13485. get: function() {
  13486. return _toComputedKey.default;
  13487. }
  13488. });
  13489. Object.defineProperty(exports, "toExpression", {
  13490. enumerable: true,
  13491. get: function() {
  13492. return _toExpression.default;
  13493. }
  13494. });
  13495. Object.defineProperty(exports, "toIdentifier", {
  13496. enumerable: true,
  13497. get: function() {
  13498. return _toIdentifier.default;
  13499. }
  13500. });
  13501. Object.defineProperty(exports, "toKeyAlias", {
  13502. enumerable: true,
  13503. get: function() {
  13504. return _toKeyAlias.default;
  13505. }
  13506. });
  13507. Object.defineProperty(exports, "toSequenceExpression", {
  13508. enumerable: true,
  13509. get: function() {
  13510. return _toSequenceExpression.default;
  13511. }
  13512. });
  13513. Object.defineProperty(exports, "toStatement", {
  13514. enumerable: true,
  13515. get: function() {
  13516. return _toStatement.default;
  13517. }
  13518. });
  13519. Object.defineProperty(exports, "valueToNode", {
  13520. enumerable: true,
  13521. get: function() {
  13522. return _valueToNode.default;
  13523. }
  13524. });
  13525. Object.defineProperty(exports, "appendToMemberExpression", {
  13526. enumerable: true,
  13527. get: function() {
  13528. return _appendToMemberExpression.default;
  13529. }
  13530. });
  13531. Object.defineProperty(exports, "inherits", {
  13532. enumerable: true,
  13533. get: function() {
  13534. return _inherits.default;
  13535. }
  13536. });
  13537. Object.defineProperty(exports, "prependToMemberExpression", {
  13538. enumerable: true,
  13539. get: function() {
  13540. return _prependToMemberExpression.default;
  13541. }
  13542. });
  13543. Object.defineProperty(exports, "removeProperties", {
  13544. enumerable: true,
  13545. get: function() {
  13546. return _removeProperties.default;
  13547. }
  13548. });
  13549. Object.defineProperty(exports, "removePropertiesDeep", {
  13550. enumerable: true,
  13551. get: function() {
  13552. return _removePropertiesDeep.default;
  13553. }
  13554. });
  13555. Object.defineProperty(exports, "removeTypeDuplicates", {
  13556. enumerable: true,
  13557. get: function() {
  13558. return _removeTypeDuplicates.default;
  13559. }
  13560. });
  13561. Object.defineProperty(exports, "getBindingIdentifiers", {
  13562. enumerable: true,
  13563. get: function() {
  13564. return _getBindingIdentifiers.default;
  13565. }
  13566. });
  13567. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  13568. enumerable: true,
  13569. get: function() {
  13570. return _getOuterBindingIdentifiers.default;
  13571. }
  13572. });
  13573. Object.defineProperty(exports, "traverse", {
  13574. enumerable: true,
  13575. get: function() {
  13576. return _traverse.default;
  13577. }
  13578. });
  13579. Object.defineProperty(exports, "traverseFast", {
  13580. enumerable: true,
  13581. get: function() {
  13582. return _traverseFast.default;
  13583. }
  13584. });
  13585. Object.defineProperty(exports, "shallowEqual", {
  13586. enumerable: true,
  13587. get: function() {
  13588. return _shallowEqual.default;
  13589. }
  13590. });
  13591. Object.defineProperty(exports, "is", {
  13592. enumerable: true,
  13593. get: function() {
  13594. return _is.default;
  13595. }
  13596. });
  13597. Object.defineProperty(exports, "isBinding", {
  13598. enumerable: true,
  13599. get: function() {
  13600. return _isBinding.default;
  13601. }
  13602. });
  13603. Object.defineProperty(exports, "isBlockScoped", {
  13604. enumerable: true,
  13605. get: function() {
  13606. return _isBlockScoped.default;
  13607. }
  13608. });
  13609. Object.defineProperty(exports, "isImmutable", {
  13610. enumerable: true,
  13611. get: function() {
  13612. return _isImmutable.default;
  13613. }
  13614. });
  13615. Object.defineProperty(exports, "isLet", {
  13616. enumerable: true,
  13617. get: function() {
  13618. return _isLet.default;
  13619. }
  13620. });
  13621. Object.defineProperty(exports, "isNode", {
  13622. enumerable: true,
  13623. get: function() {
  13624. return _isNode.default;
  13625. }
  13626. });
  13627. Object.defineProperty(exports, "isNodesEquivalent", {
  13628. enumerable: true,
  13629. get: function() {
  13630. return _isNodesEquivalent.default;
  13631. }
  13632. });
  13633. Object.defineProperty(exports, "isPlaceholderType", {
  13634. enumerable: true,
  13635. get: function() {
  13636. return _isPlaceholderType.default;
  13637. }
  13638. });
  13639. Object.defineProperty(exports, "isReferenced", {
  13640. enumerable: true,
  13641. get: function() {
  13642. return _isReferenced.default;
  13643. }
  13644. });
  13645. Object.defineProperty(exports, "isScope", {
  13646. enumerable: true,
  13647. get: function() {
  13648. return _isScope.default;
  13649. }
  13650. });
  13651. Object.defineProperty(exports, "isSpecifierDefault", {
  13652. enumerable: true,
  13653. get: function() {
  13654. return _isSpecifierDefault.default;
  13655. }
  13656. });
  13657. Object.defineProperty(exports, "isType", {
  13658. enumerable: true,
  13659. get: function() {
  13660. return _isType.default;
  13661. }
  13662. });
  13663. Object.defineProperty(exports, "isValidES3Identifier", {
  13664. enumerable: true,
  13665. get: function() {
  13666. return _isValidES3Identifier.default;
  13667. }
  13668. });
  13669. Object.defineProperty(exports, "isValidIdentifier", {
  13670. enumerable: true,
  13671. get: function() {
  13672. return _isValidIdentifier.default;
  13673. }
  13674. });
  13675. Object.defineProperty(exports, "isVar", {
  13676. enumerable: true,
  13677. get: function() {
  13678. return _isVar.default;
  13679. }
  13680. });
  13681. Object.defineProperty(exports, "matchesPattern", {
  13682. enumerable: true,
  13683. get: function() {
  13684. return _matchesPattern.default;
  13685. }
  13686. });
  13687. Object.defineProperty(exports, "validate", {
  13688. enumerable: true,
  13689. get: function() {
  13690. return _validate.default;
  13691. }
  13692. });
  13693. Object.defineProperty(exports, "buildMatchMemberExpression", {
  13694. enumerable: true,
  13695. get: function() {
  13696. return _buildMatchMemberExpression.default;
  13697. }
  13698. });
  13699. exports.react = void 0;
  13700. var _isReactComponent = require_isReactComponent();
  13701. var _isCompatTag = require_isCompatTag();
  13702. var _buildChildren = require_buildChildren();
  13703. var _assertNode = require_assertNode();
  13704. var _generated = require_generated3();
  13705. Object.keys(_generated).forEach(function(key) {
  13706. if (key === "default" || key === "__esModule")
  13707. return;
  13708. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13709. return;
  13710. if (key in exports && exports[key] === _generated[key])
  13711. return;
  13712. Object.defineProperty(exports, key, {
  13713. enumerable: true,
  13714. get: function() {
  13715. return _generated[key];
  13716. }
  13717. });
  13718. });
  13719. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof();
  13720. var _createFlowUnionType = require_createFlowUnionType();
  13721. var _createTSUnionType = require_createTSUnionType();
  13722. var _generated2 = require_generated2();
  13723. Object.keys(_generated2).forEach(function(key) {
  13724. if (key === "default" || key === "__esModule")
  13725. return;
  13726. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13727. return;
  13728. if (key in exports && exports[key] === _generated2[key])
  13729. return;
  13730. Object.defineProperty(exports, key, {
  13731. enumerable: true,
  13732. get: function() {
  13733. return _generated2[key];
  13734. }
  13735. });
  13736. });
  13737. var _uppercase = require_uppercase();
  13738. Object.keys(_uppercase).forEach(function(key) {
  13739. if (key === "default" || key === "__esModule")
  13740. return;
  13741. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13742. return;
  13743. if (key in exports && exports[key] === _uppercase[key])
  13744. return;
  13745. Object.defineProperty(exports, key, {
  13746. enumerable: true,
  13747. get: function() {
  13748. return _uppercase[key];
  13749. }
  13750. });
  13751. });
  13752. var _cloneNode = require_cloneNode();
  13753. var _clone = require_clone();
  13754. var _cloneDeep = require_cloneDeep();
  13755. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc();
  13756. var _cloneWithoutLoc = require_cloneWithoutLoc();
  13757. var _addComment = require_addComment();
  13758. var _addComments = require_addComments();
  13759. var _inheritInnerComments = require_inheritInnerComments();
  13760. var _inheritLeadingComments = require_inheritLeadingComments();
  13761. var _inheritsComments = require_inheritsComments();
  13762. var _inheritTrailingComments = require_inheritTrailingComments();
  13763. var _removeComments = require_removeComments();
  13764. var _generated3 = require_generated4();
  13765. Object.keys(_generated3).forEach(function(key) {
  13766. if (key === "default" || key === "__esModule")
  13767. return;
  13768. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13769. return;
  13770. if (key in exports && exports[key] === _generated3[key])
  13771. return;
  13772. Object.defineProperty(exports, key, {
  13773. enumerable: true,
  13774. get: function() {
  13775. return _generated3[key];
  13776. }
  13777. });
  13778. });
  13779. var _constants = require_constants();
  13780. Object.keys(_constants).forEach(function(key) {
  13781. if (key === "default" || key === "__esModule")
  13782. return;
  13783. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13784. return;
  13785. if (key in exports && exports[key] === _constants[key])
  13786. return;
  13787. Object.defineProperty(exports, key, {
  13788. enumerable: true,
  13789. get: function() {
  13790. return _constants[key];
  13791. }
  13792. });
  13793. });
  13794. var _ensureBlock = require_ensureBlock();
  13795. var _toBindingIdentifierName = require_toBindingIdentifierName();
  13796. var _toBlock = require_toBlock();
  13797. var _toComputedKey = require_toComputedKey();
  13798. var _toExpression = require_toExpression();
  13799. var _toIdentifier = require_toIdentifier();
  13800. var _toKeyAlias = require_toKeyAlias();
  13801. var _toSequenceExpression = require_toSequenceExpression();
  13802. var _toStatement = require_toStatement();
  13803. var _valueToNode = require_valueToNode();
  13804. var _definitions = require_definitions();
  13805. Object.keys(_definitions).forEach(function(key) {
  13806. if (key === "default" || key === "__esModule")
  13807. return;
  13808. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13809. return;
  13810. if (key in exports && exports[key] === _definitions[key])
  13811. return;
  13812. Object.defineProperty(exports, key, {
  13813. enumerable: true,
  13814. get: function() {
  13815. return _definitions[key];
  13816. }
  13817. });
  13818. });
  13819. var _appendToMemberExpression = require_appendToMemberExpression();
  13820. var _inherits = require_inherits();
  13821. var _prependToMemberExpression = require_prependToMemberExpression();
  13822. var _removeProperties = require_removeProperties();
  13823. var _removePropertiesDeep = require_removePropertiesDeep();
  13824. var _removeTypeDuplicates = require_removeTypeDuplicates();
  13825. var _getBindingIdentifiers = require_getBindingIdentifiers();
  13826. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers();
  13827. var _traverse = require_traverse();
  13828. Object.keys(_traverse).forEach(function(key) {
  13829. if (key === "default" || key === "__esModule")
  13830. return;
  13831. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13832. return;
  13833. if (key in exports && exports[key] === _traverse[key])
  13834. return;
  13835. Object.defineProperty(exports, key, {
  13836. enumerable: true,
  13837. get: function() {
  13838. return _traverse[key];
  13839. }
  13840. });
  13841. });
  13842. var _traverseFast = require_traverseFast();
  13843. var _shallowEqual = require_shallowEqual();
  13844. var _is = require_is();
  13845. var _isBinding = require_isBinding();
  13846. var _isBlockScoped = require_isBlockScoped();
  13847. var _isImmutable = require_isImmutable();
  13848. var _isLet = require_isLet();
  13849. var _isNode = require_isNode();
  13850. var _isNodesEquivalent = require_isNodesEquivalent();
  13851. var _isPlaceholderType = require_isPlaceholderType();
  13852. var _isReferenced = require_isReferenced();
  13853. var _isScope = require_isScope();
  13854. var _isSpecifierDefault = require_isSpecifierDefault();
  13855. var _isType = require_isType();
  13856. var _isValidES3Identifier = require_isValidES3Identifier();
  13857. var _isValidIdentifier = require_isValidIdentifier();
  13858. var _isVar = require_isVar();
  13859. var _matchesPattern = require_matchesPattern();
  13860. var _validate = require_validate();
  13861. var _buildMatchMemberExpression = require_buildMatchMemberExpression();
  13862. var _generated4 = require_generated();
  13863. Object.keys(_generated4).forEach(function(key) {
  13864. if (key === "default" || key === "__esModule")
  13865. return;
  13866. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13867. return;
  13868. if (key in exports && exports[key] === _generated4[key])
  13869. return;
  13870. Object.defineProperty(exports, key, {
  13871. enumerable: true,
  13872. get: function() {
  13873. return _generated4[key];
  13874. }
  13875. });
  13876. });
  13877. var _generated5 = require_generated5();
  13878. Object.keys(_generated5).forEach(function(key) {
  13879. if (key === "default" || key === "__esModule")
  13880. return;
  13881. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  13882. return;
  13883. if (key in exports && exports[key] === _generated5[key])
  13884. return;
  13885. Object.defineProperty(exports, key, {
  13886. enumerable: true,
  13887. get: function() {
  13888. return _generated5[key];
  13889. }
  13890. });
  13891. });
  13892. var react = {
  13893. isReactComponent: _isReactComponent.default,
  13894. isCompatTag: _isCompatTag.default,
  13895. buildChildren: _buildChildren.default
  13896. };
  13897. exports.react = react;
  13898. }
  13899. });
  13900. // node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/shallowEqual.js
  13901. var require_shallowEqual2 = __commonJS({
  13902. "node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  13903. "use strict";
  13904. Object.defineProperty(exports, "__esModule", {
  13905. value: true
  13906. });
  13907. exports.default = shallowEqual;
  13908. function shallowEqual(actual, expected) {
  13909. const keys2 = Object.keys(expected);
  13910. for (const key of keys2) {
  13911. if (actual[key] !== expected[key]) {
  13912. return false;
  13913. }
  13914. }
  13915. return true;
  13916. }
  13917. }
  13918. });
  13919. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/generated/index.js
  13920. var require_generated6 = __commonJS({
  13921. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  13922. "use strict";
  13923. Object.defineProperty(exports, "__esModule", {
  13924. value: true
  13925. });
  13926. exports.isArrayExpression = isArrayExpression;
  13927. exports.isAssignmentExpression = isAssignmentExpression;
  13928. exports.isBinaryExpression = isBinaryExpression;
  13929. exports.isInterpreterDirective = isInterpreterDirective;
  13930. exports.isDirective = isDirective;
  13931. exports.isDirectiveLiteral = isDirectiveLiteral;
  13932. exports.isBlockStatement = isBlockStatement;
  13933. exports.isBreakStatement = isBreakStatement;
  13934. exports.isCallExpression = isCallExpression;
  13935. exports.isCatchClause = isCatchClause;
  13936. exports.isConditionalExpression = isConditionalExpression;
  13937. exports.isContinueStatement = isContinueStatement;
  13938. exports.isDebuggerStatement = isDebuggerStatement;
  13939. exports.isDoWhileStatement = isDoWhileStatement;
  13940. exports.isEmptyStatement = isEmptyStatement;
  13941. exports.isExpressionStatement = isExpressionStatement2;
  13942. exports.isFile = isFile;
  13943. exports.isForInStatement = isForInStatement;
  13944. exports.isForStatement = isForStatement;
  13945. exports.isFunctionDeclaration = isFunctionDeclaration;
  13946. exports.isFunctionExpression = isFunctionExpression;
  13947. exports.isIdentifier = isIdentifier2;
  13948. exports.isIfStatement = isIfStatement;
  13949. exports.isLabeledStatement = isLabeledStatement;
  13950. exports.isStringLiteral = isStringLiteral2;
  13951. exports.isNumericLiteral = isNumericLiteral;
  13952. exports.isNullLiteral = isNullLiteral;
  13953. exports.isBooleanLiteral = isBooleanLiteral2;
  13954. exports.isRegExpLiteral = isRegExpLiteral;
  13955. exports.isLogicalExpression = isLogicalExpression;
  13956. exports.isMemberExpression = isMemberExpression;
  13957. exports.isNewExpression = isNewExpression;
  13958. exports.isProgram = isProgram;
  13959. exports.isObjectExpression = isObjectExpression;
  13960. exports.isObjectMethod = isObjectMethod;
  13961. exports.isObjectProperty = isObjectProperty;
  13962. exports.isRestElement = isRestElement;
  13963. exports.isReturnStatement = isReturnStatement;
  13964. exports.isSequenceExpression = isSequenceExpression;
  13965. exports.isParenthesizedExpression = isParenthesizedExpression;
  13966. exports.isSwitchCase = isSwitchCase;
  13967. exports.isSwitchStatement = isSwitchStatement;
  13968. exports.isThisExpression = isThisExpression;
  13969. exports.isThrowStatement = isThrowStatement;
  13970. exports.isTryStatement = isTryStatement;
  13971. exports.isUnaryExpression = isUnaryExpression;
  13972. exports.isUpdateExpression = isUpdateExpression;
  13973. exports.isVariableDeclaration = isVariableDeclaration;
  13974. exports.isVariableDeclarator = isVariableDeclarator;
  13975. exports.isWhileStatement = isWhileStatement;
  13976. exports.isWithStatement = isWithStatement;
  13977. exports.isAssignmentPattern = isAssignmentPattern;
  13978. exports.isArrayPattern = isArrayPattern;
  13979. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  13980. exports.isClassBody = isClassBody;
  13981. exports.isClassExpression = isClassExpression;
  13982. exports.isClassDeclaration = isClassDeclaration;
  13983. exports.isExportAllDeclaration = isExportAllDeclaration;
  13984. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  13985. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  13986. exports.isExportSpecifier = isExportSpecifier;
  13987. exports.isForOfStatement = isForOfStatement;
  13988. exports.isImportDeclaration = isImportDeclaration;
  13989. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  13990. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  13991. exports.isImportSpecifier = isImportSpecifier;
  13992. exports.isMetaProperty = isMetaProperty;
  13993. exports.isClassMethod = isClassMethod;
  13994. exports.isObjectPattern = isObjectPattern;
  13995. exports.isSpreadElement = isSpreadElement;
  13996. exports.isSuper = isSuper;
  13997. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  13998. exports.isTemplateElement = isTemplateElement;
  13999. exports.isTemplateLiteral = isTemplateLiteral;
  14000. exports.isYieldExpression = isYieldExpression;
  14001. exports.isAwaitExpression = isAwaitExpression;
  14002. exports.isImport = isImport;
  14003. exports.isBigIntLiteral = isBigIntLiteral;
  14004. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  14005. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  14006. exports.isOptionalCallExpression = isOptionalCallExpression;
  14007. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  14008. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  14009. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  14010. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  14011. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  14012. exports.isClassImplements = isClassImplements;
  14013. exports.isDeclareClass = isDeclareClass;
  14014. exports.isDeclareFunction = isDeclareFunction;
  14015. exports.isDeclareInterface = isDeclareInterface;
  14016. exports.isDeclareModule = isDeclareModule;
  14017. exports.isDeclareModuleExports = isDeclareModuleExports;
  14018. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  14019. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  14020. exports.isDeclareVariable = isDeclareVariable;
  14021. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  14022. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  14023. exports.isDeclaredPredicate = isDeclaredPredicate;
  14024. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  14025. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  14026. exports.isFunctionTypeParam = isFunctionTypeParam;
  14027. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  14028. exports.isInferredPredicate = isInferredPredicate;
  14029. exports.isInterfaceExtends = isInterfaceExtends;
  14030. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  14031. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  14032. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  14033. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  14034. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  14035. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  14036. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  14037. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  14038. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  14039. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  14040. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  14041. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  14042. exports.isObjectTypeProperty = isObjectTypeProperty;
  14043. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  14044. exports.isOpaqueType = isOpaqueType;
  14045. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  14046. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  14047. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  14048. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  14049. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  14050. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  14051. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  14052. exports.isTypeAlias = isTypeAlias;
  14053. exports.isTypeAnnotation = isTypeAnnotation;
  14054. exports.isTypeCastExpression = isTypeCastExpression;
  14055. exports.isTypeParameter = isTypeParameter;
  14056. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  14057. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  14058. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  14059. exports.isVariance = isVariance;
  14060. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  14061. exports.isEnumDeclaration = isEnumDeclaration;
  14062. exports.isEnumBooleanBody = isEnumBooleanBody;
  14063. exports.isEnumNumberBody = isEnumNumberBody;
  14064. exports.isEnumStringBody = isEnumStringBody;
  14065. exports.isEnumSymbolBody = isEnumSymbolBody;
  14066. exports.isEnumBooleanMember = isEnumBooleanMember;
  14067. exports.isEnumNumberMember = isEnumNumberMember;
  14068. exports.isEnumStringMember = isEnumStringMember;
  14069. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  14070. exports.isIndexedAccessType = isIndexedAccessType;
  14071. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  14072. exports.isJSXAttribute = isJSXAttribute;
  14073. exports.isJSXClosingElement = isJSXClosingElement;
  14074. exports.isJSXElement = isJSXElement2;
  14075. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  14076. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  14077. exports.isJSXSpreadChild = isJSXSpreadChild;
  14078. exports.isJSXIdentifier = isJSXIdentifier2;
  14079. exports.isJSXMemberExpression = isJSXMemberExpression;
  14080. exports.isJSXNamespacedName = isJSXNamespacedName;
  14081. exports.isJSXOpeningElement = isJSXOpeningElement;
  14082. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  14083. exports.isJSXText = isJSXText;
  14084. exports.isJSXFragment = isJSXFragment2;
  14085. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  14086. exports.isJSXClosingFragment = isJSXClosingFragment;
  14087. exports.isNoop = isNoop;
  14088. exports.isPlaceholder = isPlaceholder;
  14089. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  14090. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  14091. exports.isBindExpression = isBindExpression;
  14092. exports.isClassProperty = isClassProperty;
  14093. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  14094. exports.isPipelineBareFunction = isPipelineBareFunction;
  14095. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  14096. exports.isClassPrivateProperty = isClassPrivateProperty;
  14097. exports.isClassPrivateMethod = isClassPrivateMethod;
  14098. exports.isImportAttribute = isImportAttribute;
  14099. exports.isDecorator = isDecorator;
  14100. exports.isDoExpression = isDoExpression;
  14101. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  14102. exports.isPrivateName = isPrivateName;
  14103. exports.isRecordExpression = isRecordExpression;
  14104. exports.isTupleExpression = isTupleExpression;
  14105. exports.isDecimalLiteral = isDecimalLiteral;
  14106. exports.isStaticBlock = isStaticBlock;
  14107. exports.isModuleExpression = isModuleExpression;
  14108. exports.isTSParameterProperty = isTSParameterProperty;
  14109. exports.isTSDeclareFunction = isTSDeclareFunction;
  14110. exports.isTSDeclareMethod = isTSDeclareMethod;
  14111. exports.isTSQualifiedName = isTSQualifiedName;
  14112. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  14113. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  14114. exports.isTSPropertySignature = isTSPropertySignature;
  14115. exports.isTSMethodSignature = isTSMethodSignature;
  14116. exports.isTSIndexSignature = isTSIndexSignature;
  14117. exports.isTSAnyKeyword = isTSAnyKeyword;
  14118. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  14119. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  14120. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  14121. exports.isTSNeverKeyword = isTSNeverKeyword;
  14122. exports.isTSNullKeyword = isTSNullKeyword;
  14123. exports.isTSNumberKeyword = isTSNumberKeyword;
  14124. exports.isTSObjectKeyword = isTSObjectKeyword;
  14125. exports.isTSStringKeyword = isTSStringKeyword;
  14126. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  14127. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  14128. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  14129. exports.isTSVoidKeyword = isTSVoidKeyword;
  14130. exports.isTSThisType = isTSThisType;
  14131. exports.isTSFunctionType = isTSFunctionType;
  14132. exports.isTSConstructorType = isTSConstructorType;
  14133. exports.isTSTypeReference = isTSTypeReference;
  14134. exports.isTSTypePredicate = isTSTypePredicate;
  14135. exports.isTSTypeQuery = isTSTypeQuery;
  14136. exports.isTSTypeLiteral = isTSTypeLiteral;
  14137. exports.isTSArrayType = isTSArrayType;
  14138. exports.isTSTupleType = isTSTupleType;
  14139. exports.isTSOptionalType = isTSOptionalType;
  14140. exports.isTSRestType = isTSRestType;
  14141. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  14142. exports.isTSUnionType = isTSUnionType;
  14143. exports.isTSIntersectionType = isTSIntersectionType;
  14144. exports.isTSConditionalType = isTSConditionalType;
  14145. exports.isTSInferType = isTSInferType;
  14146. exports.isTSParenthesizedType = isTSParenthesizedType;
  14147. exports.isTSTypeOperator = isTSTypeOperator;
  14148. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  14149. exports.isTSMappedType = isTSMappedType;
  14150. exports.isTSLiteralType = isTSLiteralType;
  14151. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  14152. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  14153. exports.isTSInterfaceBody = isTSInterfaceBody;
  14154. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  14155. exports.isTSAsExpression = isTSAsExpression;
  14156. exports.isTSTypeAssertion = isTSTypeAssertion;
  14157. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  14158. exports.isTSEnumMember = isTSEnumMember;
  14159. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  14160. exports.isTSModuleBlock = isTSModuleBlock;
  14161. exports.isTSImportType = isTSImportType;
  14162. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  14163. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  14164. exports.isTSNonNullExpression = isTSNonNullExpression;
  14165. exports.isTSExportAssignment = isTSExportAssignment;
  14166. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  14167. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  14168. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  14169. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  14170. exports.isTSTypeParameter = isTSTypeParameter;
  14171. exports.isExpression = isExpression;
  14172. exports.isBinary = isBinary;
  14173. exports.isScopable = isScopable;
  14174. exports.isBlockParent = isBlockParent;
  14175. exports.isBlock = isBlock;
  14176. exports.isStatement = isStatement;
  14177. exports.isTerminatorless = isTerminatorless;
  14178. exports.isCompletionStatement = isCompletionStatement;
  14179. exports.isConditional = isConditional;
  14180. exports.isLoop = isLoop;
  14181. exports.isWhile = isWhile;
  14182. exports.isExpressionWrapper = isExpressionWrapper;
  14183. exports.isFor = isFor;
  14184. exports.isForXStatement = isForXStatement;
  14185. exports.isFunction = isFunction;
  14186. exports.isFunctionParent = isFunctionParent;
  14187. exports.isPureish = isPureish;
  14188. exports.isDeclaration = isDeclaration2;
  14189. exports.isPatternLike = isPatternLike;
  14190. exports.isLVal = isLVal;
  14191. exports.isTSEntityName = isTSEntityName;
  14192. exports.isLiteral = isLiteral;
  14193. exports.isImmutable = isImmutable;
  14194. exports.isUserWhitespacable = isUserWhitespacable;
  14195. exports.isMethod = isMethod;
  14196. exports.isObjectMember = isObjectMember;
  14197. exports.isProperty = isProperty;
  14198. exports.isUnaryLike = isUnaryLike;
  14199. exports.isPattern = isPattern;
  14200. exports.isClass = isClass;
  14201. exports.isModuleDeclaration = isModuleDeclaration;
  14202. exports.isExportDeclaration = isExportDeclaration;
  14203. exports.isModuleSpecifier = isModuleSpecifier;
  14204. exports.isFlow = isFlow;
  14205. exports.isFlowType = isFlowType;
  14206. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  14207. exports.isFlowDeclaration = isFlowDeclaration;
  14208. exports.isFlowPredicate = isFlowPredicate;
  14209. exports.isEnumBody = isEnumBody;
  14210. exports.isEnumMember = isEnumMember;
  14211. exports.isJSX = isJSX;
  14212. exports.isPrivate = isPrivate;
  14213. exports.isTSTypeElement = isTSTypeElement;
  14214. exports.isTSType = isTSType;
  14215. exports.isTSBaseType = isTSBaseType;
  14216. exports.isNumberLiteral = isNumberLiteral;
  14217. exports.isRegexLiteral = isRegexLiteral;
  14218. exports.isRestProperty = isRestProperty;
  14219. exports.isSpreadProperty = isSpreadProperty;
  14220. var _shallowEqual = require_shallowEqual2();
  14221. function isArrayExpression(node, opts) {
  14222. if (!node)
  14223. return false;
  14224. const nodeType = node.type;
  14225. if (nodeType === "ArrayExpression") {
  14226. if (typeof opts === "undefined") {
  14227. return true;
  14228. } else {
  14229. return (0, _shallowEqual.default)(node, opts);
  14230. }
  14231. }
  14232. return false;
  14233. }
  14234. function isAssignmentExpression(node, opts) {
  14235. if (!node)
  14236. return false;
  14237. const nodeType = node.type;
  14238. if (nodeType === "AssignmentExpression") {
  14239. if (typeof opts === "undefined") {
  14240. return true;
  14241. } else {
  14242. return (0, _shallowEqual.default)(node, opts);
  14243. }
  14244. }
  14245. return false;
  14246. }
  14247. function isBinaryExpression(node, opts) {
  14248. if (!node)
  14249. return false;
  14250. const nodeType = node.type;
  14251. if (nodeType === "BinaryExpression") {
  14252. if (typeof opts === "undefined") {
  14253. return true;
  14254. } else {
  14255. return (0, _shallowEqual.default)(node, opts);
  14256. }
  14257. }
  14258. return false;
  14259. }
  14260. function isInterpreterDirective(node, opts) {
  14261. if (!node)
  14262. return false;
  14263. const nodeType = node.type;
  14264. if (nodeType === "InterpreterDirective") {
  14265. if (typeof opts === "undefined") {
  14266. return true;
  14267. } else {
  14268. return (0, _shallowEqual.default)(node, opts);
  14269. }
  14270. }
  14271. return false;
  14272. }
  14273. function isDirective(node, opts) {
  14274. if (!node)
  14275. return false;
  14276. const nodeType = node.type;
  14277. if (nodeType === "Directive") {
  14278. if (typeof opts === "undefined") {
  14279. return true;
  14280. } else {
  14281. return (0, _shallowEqual.default)(node, opts);
  14282. }
  14283. }
  14284. return false;
  14285. }
  14286. function isDirectiveLiteral(node, opts) {
  14287. if (!node)
  14288. return false;
  14289. const nodeType = node.type;
  14290. if (nodeType === "DirectiveLiteral") {
  14291. if (typeof opts === "undefined") {
  14292. return true;
  14293. } else {
  14294. return (0, _shallowEqual.default)(node, opts);
  14295. }
  14296. }
  14297. return false;
  14298. }
  14299. function isBlockStatement(node, opts) {
  14300. if (!node)
  14301. return false;
  14302. const nodeType = node.type;
  14303. if (nodeType === "BlockStatement") {
  14304. if (typeof opts === "undefined") {
  14305. return true;
  14306. } else {
  14307. return (0, _shallowEqual.default)(node, opts);
  14308. }
  14309. }
  14310. return false;
  14311. }
  14312. function isBreakStatement(node, opts) {
  14313. if (!node)
  14314. return false;
  14315. const nodeType = node.type;
  14316. if (nodeType === "BreakStatement") {
  14317. if (typeof opts === "undefined") {
  14318. return true;
  14319. } else {
  14320. return (0, _shallowEqual.default)(node, opts);
  14321. }
  14322. }
  14323. return false;
  14324. }
  14325. function isCallExpression(node, opts) {
  14326. if (!node)
  14327. return false;
  14328. const nodeType = node.type;
  14329. if (nodeType === "CallExpression") {
  14330. if (typeof opts === "undefined") {
  14331. return true;
  14332. } else {
  14333. return (0, _shallowEqual.default)(node, opts);
  14334. }
  14335. }
  14336. return false;
  14337. }
  14338. function isCatchClause(node, opts) {
  14339. if (!node)
  14340. return false;
  14341. const nodeType = node.type;
  14342. if (nodeType === "CatchClause") {
  14343. if (typeof opts === "undefined") {
  14344. return true;
  14345. } else {
  14346. return (0, _shallowEqual.default)(node, opts);
  14347. }
  14348. }
  14349. return false;
  14350. }
  14351. function isConditionalExpression(node, opts) {
  14352. if (!node)
  14353. return false;
  14354. const nodeType = node.type;
  14355. if (nodeType === "ConditionalExpression") {
  14356. if (typeof opts === "undefined") {
  14357. return true;
  14358. } else {
  14359. return (0, _shallowEqual.default)(node, opts);
  14360. }
  14361. }
  14362. return false;
  14363. }
  14364. function isContinueStatement(node, opts) {
  14365. if (!node)
  14366. return false;
  14367. const nodeType = node.type;
  14368. if (nodeType === "ContinueStatement") {
  14369. if (typeof opts === "undefined") {
  14370. return true;
  14371. } else {
  14372. return (0, _shallowEqual.default)(node, opts);
  14373. }
  14374. }
  14375. return false;
  14376. }
  14377. function isDebuggerStatement(node, opts) {
  14378. if (!node)
  14379. return false;
  14380. const nodeType = node.type;
  14381. if (nodeType === "DebuggerStatement") {
  14382. if (typeof opts === "undefined") {
  14383. return true;
  14384. } else {
  14385. return (0, _shallowEqual.default)(node, opts);
  14386. }
  14387. }
  14388. return false;
  14389. }
  14390. function isDoWhileStatement(node, opts) {
  14391. if (!node)
  14392. return false;
  14393. const nodeType = node.type;
  14394. if (nodeType === "DoWhileStatement") {
  14395. if (typeof opts === "undefined") {
  14396. return true;
  14397. } else {
  14398. return (0, _shallowEqual.default)(node, opts);
  14399. }
  14400. }
  14401. return false;
  14402. }
  14403. function isEmptyStatement(node, opts) {
  14404. if (!node)
  14405. return false;
  14406. const nodeType = node.type;
  14407. if (nodeType === "EmptyStatement") {
  14408. if (typeof opts === "undefined") {
  14409. return true;
  14410. } else {
  14411. return (0, _shallowEqual.default)(node, opts);
  14412. }
  14413. }
  14414. return false;
  14415. }
  14416. function isExpressionStatement2(node, opts) {
  14417. if (!node)
  14418. return false;
  14419. const nodeType = node.type;
  14420. if (nodeType === "ExpressionStatement") {
  14421. if (typeof opts === "undefined") {
  14422. return true;
  14423. } else {
  14424. return (0, _shallowEqual.default)(node, opts);
  14425. }
  14426. }
  14427. return false;
  14428. }
  14429. function isFile(node, opts) {
  14430. if (!node)
  14431. return false;
  14432. const nodeType = node.type;
  14433. if (nodeType === "File") {
  14434. if (typeof opts === "undefined") {
  14435. return true;
  14436. } else {
  14437. return (0, _shallowEqual.default)(node, opts);
  14438. }
  14439. }
  14440. return false;
  14441. }
  14442. function isForInStatement(node, opts) {
  14443. if (!node)
  14444. return false;
  14445. const nodeType = node.type;
  14446. if (nodeType === "ForInStatement") {
  14447. if (typeof opts === "undefined") {
  14448. return true;
  14449. } else {
  14450. return (0, _shallowEqual.default)(node, opts);
  14451. }
  14452. }
  14453. return false;
  14454. }
  14455. function isForStatement(node, opts) {
  14456. if (!node)
  14457. return false;
  14458. const nodeType = node.type;
  14459. if (nodeType === "ForStatement") {
  14460. if (typeof opts === "undefined") {
  14461. return true;
  14462. } else {
  14463. return (0, _shallowEqual.default)(node, opts);
  14464. }
  14465. }
  14466. return false;
  14467. }
  14468. function isFunctionDeclaration(node, opts) {
  14469. if (!node)
  14470. return false;
  14471. const nodeType = node.type;
  14472. if (nodeType === "FunctionDeclaration") {
  14473. if (typeof opts === "undefined") {
  14474. return true;
  14475. } else {
  14476. return (0, _shallowEqual.default)(node, opts);
  14477. }
  14478. }
  14479. return false;
  14480. }
  14481. function isFunctionExpression(node, opts) {
  14482. if (!node)
  14483. return false;
  14484. const nodeType = node.type;
  14485. if (nodeType === "FunctionExpression") {
  14486. if (typeof opts === "undefined") {
  14487. return true;
  14488. } else {
  14489. return (0, _shallowEqual.default)(node, opts);
  14490. }
  14491. }
  14492. return false;
  14493. }
  14494. function isIdentifier2(node, opts) {
  14495. if (!node)
  14496. return false;
  14497. const nodeType = node.type;
  14498. if (nodeType === "Identifier") {
  14499. if (typeof opts === "undefined") {
  14500. return true;
  14501. } else {
  14502. return (0, _shallowEqual.default)(node, opts);
  14503. }
  14504. }
  14505. return false;
  14506. }
  14507. function isIfStatement(node, opts) {
  14508. if (!node)
  14509. return false;
  14510. const nodeType = node.type;
  14511. if (nodeType === "IfStatement") {
  14512. if (typeof opts === "undefined") {
  14513. return true;
  14514. } else {
  14515. return (0, _shallowEqual.default)(node, opts);
  14516. }
  14517. }
  14518. return false;
  14519. }
  14520. function isLabeledStatement(node, opts) {
  14521. if (!node)
  14522. return false;
  14523. const nodeType = node.type;
  14524. if (nodeType === "LabeledStatement") {
  14525. if (typeof opts === "undefined") {
  14526. return true;
  14527. } else {
  14528. return (0, _shallowEqual.default)(node, opts);
  14529. }
  14530. }
  14531. return false;
  14532. }
  14533. function isStringLiteral2(node, opts) {
  14534. if (!node)
  14535. return false;
  14536. const nodeType = node.type;
  14537. if (nodeType === "StringLiteral") {
  14538. if (typeof opts === "undefined") {
  14539. return true;
  14540. } else {
  14541. return (0, _shallowEqual.default)(node, opts);
  14542. }
  14543. }
  14544. return false;
  14545. }
  14546. function isNumericLiteral(node, opts) {
  14547. if (!node)
  14548. return false;
  14549. const nodeType = node.type;
  14550. if (nodeType === "NumericLiteral") {
  14551. if (typeof opts === "undefined") {
  14552. return true;
  14553. } else {
  14554. return (0, _shallowEqual.default)(node, opts);
  14555. }
  14556. }
  14557. return false;
  14558. }
  14559. function isNullLiteral(node, opts) {
  14560. if (!node)
  14561. return false;
  14562. const nodeType = node.type;
  14563. if (nodeType === "NullLiteral") {
  14564. if (typeof opts === "undefined") {
  14565. return true;
  14566. } else {
  14567. return (0, _shallowEqual.default)(node, opts);
  14568. }
  14569. }
  14570. return false;
  14571. }
  14572. function isBooleanLiteral2(node, opts) {
  14573. if (!node)
  14574. return false;
  14575. const nodeType = node.type;
  14576. if (nodeType === "BooleanLiteral") {
  14577. if (typeof opts === "undefined") {
  14578. return true;
  14579. } else {
  14580. return (0, _shallowEqual.default)(node, opts);
  14581. }
  14582. }
  14583. return false;
  14584. }
  14585. function isRegExpLiteral(node, opts) {
  14586. if (!node)
  14587. return false;
  14588. const nodeType = node.type;
  14589. if (nodeType === "RegExpLiteral") {
  14590. if (typeof opts === "undefined") {
  14591. return true;
  14592. } else {
  14593. return (0, _shallowEqual.default)(node, opts);
  14594. }
  14595. }
  14596. return false;
  14597. }
  14598. function isLogicalExpression(node, opts) {
  14599. if (!node)
  14600. return false;
  14601. const nodeType = node.type;
  14602. if (nodeType === "LogicalExpression") {
  14603. if (typeof opts === "undefined") {
  14604. return true;
  14605. } else {
  14606. return (0, _shallowEqual.default)(node, opts);
  14607. }
  14608. }
  14609. return false;
  14610. }
  14611. function isMemberExpression(node, opts) {
  14612. if (!node)
  14613. return false;
  14614. const nodeType = node.type;
  14615. if (nodeType === "MemberExpression") {
  14616. if (typeof opts === "undefined") {
  14617. return true;
  14618. } else {
  14619. return (0, _shallowEqual.default)(node, opts);
  14620. }
  14621. }
  14622. return false;
  14623. }
  14624. function isNewExpression(node, opts) {
  14625. if (!node)
  14626. return false;
  14627. const nodeType = node.type;
  14628. if (nodeType === "NewExpression") {
  14629. if (typeof opts === "undefined") {
  14630. return true;
  14631. } else {
  14632. return (0, _shallowEqual.default)(node, opts);
  14633. }
  14634. }
  14635. return false;
  14636. }
  14637. function isProgram(node, opts) {
  14638. if (!node)
  14639. return false;
  14640. const nodeType = node.type;
  14641. if (nodeType === "Program") {
  14642. if (typeof opts === "undefined") {
  14643. return true;
  14644. } else {
  14645. return (0, _shallowEqual.default)(node, opts);
  14646. }
  14647. }
  14648. return false;
  14649. }
  14650. function isObjectExpression(node, opts) {
  14651. if (!node)
  14652. return false;
  14653. const nodeType = node.type;
  14654. if (nodeType === "ObjectExpression") {
  14655. if (typeof opts === "undefined") {
  14656. return true;
  14657. } else {
  14658. return (0, _shallowEqual.default)(node, opts);
  14659. }
  14660. }
  14661. return false;
  14662. }
  14663. function isObjectMethod(node, opts) {
  14664. if (!node)
  14665. return false;
  14666. const nodeType = node.type;
  14667. if (nodeType === "ObjectMethod") {
  14668. if (typeof opts === "undefined") {
  14669. return true;
  14670. } else {
  14671. return (0, _shallowEqual.default)(node, opts);
  14672. }
  14673. }
  14674. return false;
  14675. }
  14676. function isObjectProperty(node, opts) {
  14677. if (!node)
  14678. return false;
  14679. const nodeType = node.type;
  14680. if (nodeType === "ObjectProperty") {
  14681. if (typeof opts === "undefined") {
  14682. return true;
  14683. } else {
  14684. return (0, _shallowEqual.default)(node, opts);
  14685. }
  14686. }
  14687. return false;
  14688. }
  14689. function isRestElement(node, opts) {
  14690. if (!node)
  14691. return false;
  14692. const nodeType = node.type;
  14693. if (nodeType === "RestElement") {
  14694. if (typeof opts === "undefined") {
  14695. return true;
  14696. } else {
  14697. return (0, _shallowEqual.default)(node, opts);
  14698. }
  14699. }
  14700. return false;
  14701. }
  14702. function isReturnStatement(node, opts) {
  14703. if (!node)
  14704. return false;
  14705. const nodeType = node.type;
  14706. if (nodeType === "ReturnStatement") {
  14707. if (typeof opts === "undefined") {
  14708. return true;
  14709. } else {
  14710. return (0, _shallowEqual.default)(node, opts);
  14711. }
  14712. }
  14713. return false;
  14714. }
  14715. function isSequenceExpression(node, opts) {
  14716. if (!node)
  14717. return false;
  14718. const nodeType = node.type;
  14719. if (nodeType === "SequenceExpression") {
  14720. if (typeof opts === "undefined") {
  14721. return true;
  14722. } else {
  14723. return (0, _shallowEqual.default)(node, opts);
  14724. }
  14725. }
  14726. return false;
  14727. }
  14728. function isParenthesizedExpression(node, opts) {
  14729. if (!node)
  14730. return false;
  14731. const nodeType = node.type;
  14732. if (nodeType === "ParenthesizedExpression") {
  14733. if (typeof opts === "undefined") {
  14734. return true;
  14735. } else {
  14736. return (0, _shallowEqual.default)(node, opts);
  14737. }
  14738. }
  14739. return false;
  14740. }
  14741. function isSwitchCase(node, opts) {
  14742. if (!node)
  14743. return false;
  14744. const nodeType = node.type;
  14745. if (nodeType === "SwitchCase") {
  14746. if (typeof opts === "undefined") {
  14747. return true;
  14748. } else {
  14749. return (0, _shallowEqual.default)(node, opts);
  14750. }
  14751. }
  14752. return false;
  14753. }
  14754. function isSwitchStatement(node, opts) {
  14755. if (!node)
  14756. return false;
  14757. const nodeType = node.type;
  14758. if (nodeType === "SwitchStatement") {
  14759. if (typeof opts === "undefined") {
  14760. return true;
  14761. } else {
  14762. return (0, _shallowEqual.default)(node, opts);
  14763. }
  14764. }
  14765. return false;
  14766. }
  14767. function isThisExpression(node, opts) {
  14768. if (!node)
  14769. return false;
  14770. const nodeType = node.type;
  14771. if (nodeType === "ThisExpression") {
  14772. if (typeof opts === "undefined") {
  14773. return true;
  14774. } else {
  14775. return (0, _shallowEqual.default)(node, opts);
  14776. }
  14777. }
  14778. return false;
  14779. }
  14780. function isThrowStatement(node, opts) {
  14781. if (!node)
  14782. return false;
  14783. const nodeType = node.type;
  14784. if (nodeType === "ThrowStatement") {
  14785. if (typeof opts === "undefined") {
  14786. return true;
  14787. } else {
  14788. return (0, _shallowEqual.default)(node, opts);
  14789. }
  14790. }
  14791. return false;
  14792. }
  14793. function isTryStatement(node, opts) {
  14794. if (!node)
  14795. return false;
  14796. const nodeType = node.type;
  14797. if (nodeType === "TryStatement") {
  14798. if (typeof opts === "undefined") {
  14799. return true;
  14800. } else {
  14801. return (0, _shallowEqual.default)(node, opts);
  14802. }
  14803. }
  14804. return false;
  14805. }
  14806. function isUnaryExpression(node, opts) {
  14807. if (!node)
  14808. return false;
  14809. const nodeType = node.type;
  14810. if (nodeType === "UnaryExpression") {
  14811. if (typeof opts === "undefined") {
  14812. return true;
  14813. } else {
  14814. return (0, _shallowEqual.default)(node, opts);
  14815. }
  14816. }
  14817. return false;
  14818. }
  14819. function isUpdateExpression(node, opts) {
  14820. if (!node)
  14821. return false;
  14822. const nodeType = node.type;
  14823. if (nodeType === "UpdateExpression") {
  14824. if (typeof opts === "undefined") {
  14825. return true;
  14826. } else {
  14827. return (0, _shallowEqual.default)(node, opts);
  14828. }
  14829. }
  14830. return false;
  14831. }
  14832. function isVariableDeclaration(node, opts) {
  14833. if (!node)
  14834. return false;
  14835. const nodeType = node.type;
  14836. if (nodeType === "VariableDeclaration") {
  14837. if (typeof opts === "undefined") {
  14838. return true;
  14839. } else {
  14840. return (0, _shallowEqual.default)(node, opts);
  14841. }
  14842. }
  14843. return false;
  14844. }
  14845. function isVariableDeclarator(node, opts) {
  14846. if (!node)
  14847. return false;
  14848. const nodeType = node.type;
  14849. if (nodeType === "VariableDeclarator") {
  14850. if (typeof opts === "undefined") {
  14851. return true;
  14852. } else {
  14853. return (0, _shallowEqual.default)(node, opts);
  14854. }
  14855. }
  14856. return false;
  14857. }
  14858. function isWhileStatement(node, opts) {
  14859. if (!node)
  14860. return false;
  14861. const nodeType = node.type;
  14862. if (nodeType === "WhileStatement") {
  14863. if (typeof opts === "undefined") {
  14864. return true;
  14865. } else {
  14866. return (0, _shallowEqual.default)(node, opts);
  14867. }
  14868. }
  14869. return false;
  14870. }
  14871. function isWithStatement(node, opts) {
  14872. if (!node)
  14873. return false;
  14874. const nodeType = node.type;
  14875. if (nodeType === "WithStatement") {
  14876. if (typeof opts === "undefined") {
  14877. return true;
  14878. } else {
  14879. return (0, _shallowEqual.default)(node, opts);
  14880. }
  14881. }
  14882. return false;
  14883. }
  14884. function isAssignmentPattern(node, opts) {
  14885. if (!node)
  14886. return false;
  14887. const nodeType = node.type;
  14888. if (nodeType === "AssignmentPattern") {
  14889. if (typeof opts === "undefined") {
  14890. return true;
  14891. } else {
  14892. return (0, _shallowEqual.default)(node, opts);
  14893. }
  14894. }
  14895. return false;
  14896. }
  14897. function isArrayPattern(node, opts) {
  14898. if (!node)
  14899. return false;
  14900. const nodeType = node.type;
  14901. if (nodeType === "ArrayPattern") {
  14902. if (typeof opts === "undefined") {
  14903. return true;
  14904. } else {
  14905. return (0, _shallowEqual.default)(node, opts);
  14906. }
  14907. }
  14908. return false;
  14909. }
  14910. function isArrowFunctionExpression(node, opts) {
  14911. if (!node)
  14912. return false;
  14913. const nodeType = node.type;
  14914. if (nodeType === "ArrowFunctionExpression") {
  14915. if (typeof opts === "undefined") {
  14916. return true;
  14917. } else {
  14918. return (0, _shallowEqual.default)(node, opts);
  14919. }
  14920. }
  14921. return false;
  14922. }
  14923. function isClassBody(node, opts) {
  14924. if (!node)
  14925. return false;
  14926. const nodeType = node.type;
  14927. if (nodeType === "ClassBody") {
  14928. if (typeof opts === "undefined") {
  14929. return true;
  14930. } else {
  14931. return (0, _shallowEqual.default)(node, opts);
  14932. }
  14933. }
  14934. return false;
  14935. }
  14936. function isClassExpression(node, opts) {
  14937. if (!node)
  14938. return false;
  14939. const nodeType = node.type;
  14940. if (nodeType === "ClassExpression") {
  14941. if (typeof opts === "undefined") {
  14942. return true;
  14943. } else {
  14944. return (0, _shallowEqual.default)(node, opts);
  14945. }
  14946. }
  14947. return false;
  14948. }
  14949. function isClassDeclaration(node, opts) {
  14950. if (!node)
  14951. return false;
  14952. const nodeType = node.type;
  14953. if (nodeType === "ClassDeclaration") {
  14954. if (typeof opts === "undefined") {
  14955. return true;
  14956. } else {
  14957. return (0, _shallowEqual.default)(node, opts);
  14958. }
  14959. }
  14960. return false;
  14961. }
  14962. function isExportAllDeclaration(node, opts) {
  14963. if (!node)
  14964. return false;
  14965. const nodeType = node.type;
  14966. if (nodeType === "ExportAllDeclaration") {
  14967. if (typeof opts === "undefined") {
  14968. return true;
  14969. } else {
  14970. return (0, _shallowEqual.default)(node, opts);
  14971. }
  14972. }
  14973. return false;
  14974. }
  14975. function isExportDefaultDeclaration(node, opts) {
  14976. if (!node)
  14977. return false;
  14978. const nodeType = node.type;
  14979. if (nodeType === "ExportDefaultDeclaration") {
  14980. if (typeof opts === "undefined") {
  14981. return true;
  14982. } else {
  14983. return (0, _shallowEqual.default)(node, opts);
  14984. }
  14985. }
  14986. return false;
  14987. }
  14988. function isExportNamedDeclaration(node, opts) {
  14989. if (!node)
  14990. return false;
  14991. const nodeType = node.type;
  14992. if (nodeType === "ExportNamedDeclaration") {
  14993. if (typeof opts === "undefined") {
  14994. return true;
  14995. } else {
  14996. return (0, _shallowEqual.default)(node, opts);
  14997. }
  14998. }
  14999. return false;
  15000. }
  15001. function isExportSpecifier(node, opts) {
  15002. if (!node)
  15003. return false;
  15004. const nodeType = node.type;
  15005. if (nodeType === "ExportSpecifier") {
  15006. if (typeof opts === "undefined") {
  15007. return true;
  15008. } else {
  15009. return (0, _shallowEqual.default)(node, opts);
  15010. }
  15011. }
  15012. return false;
  15013. }
  15014. function isForOfStatement(node, opts) {
  15015. if (!node)
  15016. return false;
  15017. const nodeType = node.type;
  15018. if (nodeType === "ForOfStatement") {
  15019. if (typeof opts === "undefined") {
  15020. return true;
  15021. } else {
  15022. return (0, _shallowEqual.default)(node, opts);
  15023. }
  15024. }
  15025. return false;
  15026. }
  15027. function isImportDeclaration(node, opts) {
  15028. if (!node)
  15029. return false;
  15030. const nodeType = node.type;
  15031. if (nodeType === "ImportDeclaration") {
  15032. if (typeof opts === "undefined") {
  15033. return true;
  15034. } else {
  15035. return (0, _shallowEqual.default)(node, opts);
  15036. }
  15037. }
  15038. return false;
  15039. }
  15040. function isImportDefaultSpecifier(node, opts) {
  15041. if (!node)
  15042. return false;
  15043. const nodeType = node.type;
  15044. if (nodeType === "ImportDefaultSpecifier") {
  15045. if (typeof opts === "undefined") {
  15046. return true;
  15047. } else {
  15048. return (0, _shallowEqual.default)(node, opts);
  15049. }
  15050. }
  15051. return false;
  15052. }
  15053. function isImportNamespaceSpecifier(node, opts) {
  15054. if (!node)
  15055. return false;
  15056. const nodeType = node.type;
  15057. if (nodeType === "ImportNamespaceSpecifier") {
  15058. if (typeof opts === "undefined") {
  15059. return true;
  15060. } else {
  15061. return (0, _shallowEqual.default)(node, opts);
  15062. }
  15063. }
  15064. return false;
  15065. }
  15066. function isImportSpecifier(node, opts) {
  15067. if (!node)
  15068. return false;
  15069. const nodeType = node.type;
  15070. if (nodeType === "ImportSpecifier") {
  15071. if (typeof opts === "undefined") {
  15072. return true;
  15073. } else {
  15074. return (0, _shallowEqual.default)(node, opts);
  15075. }
  15076. }
  15077. return false;
  15078. }
  15079. function isMetaProperty(node, opts) {
  15080. if (!node)
  15081. return false;
  15082. const nodeType = node.type;
  15083. if (nodeType === "MetaProperty") {
  15084. if (typeof opts === "undefined") {
  15085. return true;
  15086. } else {
  15087. return (0, _shallowEqual.default)(node, opts);
  15088. }
  15089. }
  15090. return false;
  15091. }
  15092. function isClassMethod(node, opts) {
  15093. if (!node)
  15094. return false;
  15095. const nodeType = node.type;
  15096. if (nodeType === "ClassMethod") {
  15097. if (typeof opts === "undefined") {
  15098. return true;
  15099. } else {
  15100. return (0, _shallowEqual.default)(node, opts);
  15101. }
  15102. }
  15103. return false;
  15104. }
  15105. function isObjectPattern(node, opts) {
  15106. if (!node)
  15107. return false;
  15108. const nodeType = node.type;
  15109. if (nodeType === "ObjectPattern") {
  15110. if (typeof opts === "undefined") {
  15111. return true;
  15112. } else {
  15113. return (0, _shallowEqual.default)(node, opts);
  15114. }
  15115. }
  15116. return false;
  15117. }
  15118. function isSpreadElement(node, opts) {
  15119. if (!node)
  15120. return false;
  15121. const nodeType = node.type;
  15122. if (nodeType === "SpreadElement") {
  15123. if (typeof opts === "undefined") {
  15124. return true;
  15125. } else {
  15126. return (0, _shallowEqual.default)(node, opts);
  15127. }
  15128. }
  15129. return false;
  15130. }
  15131. function isSuper(node, opts) {
  15132. if (!node)
  15133. return false;
  15134. const nodeType = node.type;
  15135. if (nodeType === "Super") {
  15136. if (typeof opts === "undefined") {
  15137. return true;
  15138. } else {
  15139. return (0, _shallowEqual.default)(node, opts);
  15140. }
  15141. }
  15142. return false;
  15143. }
  15144. function isTaggedTemplateExpression(node, opts) {
  15145. if (!node)
  15146. return false;
  15147. const nodeType = node.type;
  15148. if (nodeType === "TaggedTemplateExpression") {
  15149. if (typeof opts === "undefined") {
  15150. return true;
  15151. } else {
  15152. return (0, _shallowEqual.default)(node, opts);
  15153. }
  15154. }
  15155. return false;
  15156. }
  15157. function isTemplateElement(node, opts) {
  15158. if (!node)
  15159. return false;
  15160. const nodeType = node.type;
  15161. if (nodeType === "TemplateElement") {
  15162. if (typeof opts === "undefined") {
  15163. return true;
  15164. } else {
  15165. return (0, _shallowEqual.default)(node, opts);
  15166. }
  15167. }
  15168. return false;
  15169. }
  15170. function isTemplateLiteral(node, opts) {
  15171. if (!node)
  15172. return false;
  15173. const nodeType = node.type;
  15174. if (nodeType === "TemplateLiteral") {
  15175. if (typeof opts === "undefined") {
  15176. return true;
  15177. } else {
  15178. return (0, _shallowEqual.default)(node, opts);
  15179. }
  15180. }
  15181. return false;
  15182. }
  15183. function isYieldExpression(node, opts) {
  15184. if (!node)
  15185. return false;
  15186. const nodeType = node.type;
  15187. if (nodeType === "YieldExpression") {
  15188. if (typeof opts === "undefined") {
  15189. return true;
  15190. } else {
  15191. return (0, _shallowEqual.default)(node, opts);
  15192. }
  15193. }
  15194. return false;
  15195. }
  15196. function isAwaitExpression(node, opts) {
  15197. if (!node)
  15198. return false;
  15199. const nodeType = node.type;
  15200. if (nodeType === "AwaitExpression") {
  15201. if (typeof opts === "undefined") {
  15202. return true;
  15203. } else {
  15204. return (0, _shallowEqual.default)(node, opts);
  15205. }
  15206. }
  15207. return false;
  15208. }
  15209. function isImport(node, opts) {
  15210. if (!node)
  15211. return false;
  15212. const nodeType = node.type;
  15213. if (nodeType === "Import") {
  15214. if (typeof opts === "undefined") {
  15215. return true;
  15216. } else {
  15217. return (0, _shallowEqual.default)(node, opts);
  15218. }
  15219. }
  15220. return false;
  15221. }
  15222. function isBigIntLiteral(node, opts) {
  15223. if (!node)
  15224. return false;
  15225. const nodeType = node.type;
  15226. if (nodeType === "BigIntLiteral") {
  15227. if (typeof opts === "undefined") {
  15228. return true;
  15229. } else {
  15230. return (0, _shallowEqual.default)(node, opts);
  15231. }
  15232. }
  15233. return false;
  15234. }
  15235. function isExportNamespaceSpecifier(node, opts) {
  15236. if (!node)
  15237. return false;
  15238. const nodeType = node.type;
  15239. if (nodeType === "ExportNamespaceSpecifier") {
  15240. if (typeof opts === "undefined") {
  15241. return true;
  15242. } else {
  15243. return (0, _shallowEqual.default)(node, opts);
  15244. }
  15245. }
  15246. return false;
  15247. }
  15248. function isOptionalMemberExpression(node, opts) {
  15249. if (!node)
  15250. return false;
  15251. const nodeType = node.type;
  15252. if (nodeType === "OptionalMemberExpression") {
  15253. if (typeof opts === "undefined") {
  15254. return true;
  15255. } else {
  15256. return (0, _shallowEqual.default)(node, opts);
  15257. }
  15258. }
  15259. return false;
  15260. }
  15261. function isOptionalCallExpression(node, opts) {
  15262. if (!node)
  15263. return false;
  15264. const nodeType = node.type;
  15265. if (nodeType === "OptionalCallExpression") {
  15266. if (typeof opts === "undefined") {
  15267. return true;
  15268. } else {
  15269. return (0, _shallowEqual.default)(node, opts);
  15270. }
  15271. }
  15272. return false;
  15273. }
  15274. function isAnyTypeAnnotation(node, opts) {
  15275. if (!node)
  15276. return false;
  15277. const nodeType = node.type;
  15278. if (nodeType === "AnyTypeAnnotation") {
  15279. if (typeof opts === "undefined") {
  15280. return true;
  15281. } else {
  15282. return (0, _shallowEqual.default)(node, opts);
  15283. }
  15284. }
  15285. return false;
  15286. }
  15287. function isArrayTypeAnnotation(node, opts) {
  15288. if (!node)
  15289. return false;
  15290. const nodeType = node.type;
  15291. if (nodeType === "ArrayTypeAnnotation") {
  15292. if (typeof opts === "undefined") {
  15293. return true;
  15294. } else {
  15295. return (0, _shallowEqual.default)(node, opts);
  15296. }
  15297. }
  15298. return false;
  15299. }
  15300. function isBooleanTypeAnnotation(node, opts) {
  15301. if (!node)
  15302. return false;
  15303. const nodeType = node.type;
  15304. if (nodeType === "BooleanTypeAnnotation") {
  15305. if (typeof opts === "undefined") {
  15306. return true;
  15307. } else {
  15308. return (0, _shallowEqual.default)(node, opts);
  15309. }
  15310. }
  15311. return false;
  15312. }
  15313. function isBooleanLiteralTypeAnnotation(node, opts) {
  15314. if (!node)
  15315. return false;
  15316. const nodeType = node.type;
  15317. if (nodeType === "BooleanLiteralTypeAnnotation") {
  15318. if (typeof opts === "undefined") {
  15319. return true;
  15320. } else {
  15321. return (0, _shallowEqual.default)(node, opts);
  15322. }
  15323. }
  15324. return false;
  15325. }
  15326. function isNullLiteralTypeAnnotation(node, opts) {
  15327. if (!node)
  15328. return false;
  15329. const nodeType = node.type;
  15330. if (nodeType === "NullLiteralTypeAnnotation") {
  15331. if (typeof opts === "undefined") {
  15332. return true;
  15333. } else {
  15334. return (0, _shallowEqual.default)(node, opts);
  15335. }
  15336. }
  15337. return false;
  15338. }
  15339. function isClassImplements(node, opts) {
  15340. if (!node)
  15341. return false;
  15342. const nodeType = node.type;
  15343. if (nodeType === "ClassImplements") {
  15344. if (typeof opts === "undefined") {
  15345. return true;
  15346. } else {
  15347. return (0, _shallowEqual.default)(node, opts);
  15348. }
  15349. }
  15350. return false;
  15351. }
  15352. function isDeclareClass(node, opts) {
  15353. if (!node)
  15354. return false;
  15355. const nodeType = node.type;
  15356. if (nodeType === "DeclareClass") {
  15357. if (typeof opts === "undefined") {
  15358. return true;
  15359. } else {
  15360. return (0, _shallowEqual.default)(node, opts);
  15361. }
  15362. }
  15363. return false;
  15364. }
  15365. function isDeclareFunction(node, opts) {
  15366. if (!node)
  15367. return false;
  15368. const nodeType = node.type;
  15369. if (nodeType === "DeclareFunction") {
  15370. if (typeof opts === "undefined") {
  15371. return true;
  15372. } else {
  15373. return (0, _shallowEqual.default)(node, opts);
  15374. }
  15375. }
  15376. return false;
  15377. }
  15378. function isDeclareInterface(node, opts) {
  15379. if (!node)
  15380. return false;
  15381. const nodeType = node.type;
  15382. if (nodeType === "DeclareInterface") {
  15383. if (typeof opts === "undefined") {
  15384. return true;
  15385. } else {
  15386. return (0, _shallowEqual.default)(node, opts);
  15387. }
  15388. }
  15389. return false;
  15390. }
  15391. function isDeclareModule(node, opts) {
  15392. if (!node)
  15393. return false;
  15394. const nodeType = node.type;
  15395. if (nodeType === "DeclareModule") {
  15396. if (typeof opts === "undefined") {
  15397. return true;
  15398. } else {
  15399. return (0, _shallowEqual.default)(node, opts);
  15400. }
  15401. }
  15402. return false;
  15403. }
  15404. function isDeclareModuleExports(node, opts) {
  15405. if (!node)
  15406. return false;
  15407. const nodeType = node.type;
  15408. if (nodeType === "DeclareModuleExports") {
  15409. if (typeof opts === "undefined") {
  15410. return true;
  15411. } else {
  15412. return (0, _shallowEqual.default)(node, opts);
  15413. }
  15414. }
  15415. return false;
  15416. }
  15417. function isDeclareTypeAlias(node, opts) {
  15418. if (!node)
  15419. return false;
  15420. const nodeType = node.type;
  15421. if (nodeType === "DeclareTypeAlias") {
  15422. if (typeof opts === "undefined") {
  15423. return true;
  15424. } else {
  15425. return (0, _shallowEqual.default)(node, opts);
  15426. }
  15427. }
  15428. return false;
  15429. }
  15430. function isDeclareOpaqueType(node, opts) {
  15431. if (!node)
  15432. return false;
  15433. const nodeType = node.type;
  15434. if (nodeType === "DeclareOpaqueType") {
  15435. if (typeof opts === "undefined") {
  15436. return true;
  15437. } else {
  15438. return (0, _shallowEqual.default)(node, opts);
  15439. }
  15440. }
  15441. return false;
  15442. }
  15443. function isDeclareVariable(node, opts) {
  15444. if (!node)
  15445. return false;
  15446. const nodeType = node.type;
  15447. if (nodeType === "DeclareVariable") {
  15448. if (typeof opts === "undefined") {
  15449. return true;
  15450. } else {
  15451. return (0, _shallowEqual.default)(node, opts);
  15452. }
  15453. }
  15454. return false;
  15455. }
  15456. function isDeclareExportDeclaration(node, opts) {
  15457. if (!node)
  15458. return false;
  15459. const nodeType = node.type;
  15460. if (nodeType === "DeclareExportDeclaration") {
  15461. if (typeof opts === "undefined") {
  15462. return true;
  15463. } else {
  15464. return (0, _shallowEqual.default)(node, opts);
  15465. }
  15466. }
  15467. return false;
  15468. }
  15469. function isDeclareExportAllDeclaration(node, opts) {
  15470. if (!node)
  15471. return false;
  15472. const nodeType = node.type;
  15473. if (nodeType === "DeclareExportAllDeclaration") {
  15474. if (typeof opts === "undefined") {
  15475. return true;
  15476. } else {
  15477. return (0, _shallowEqual.default)(node, opts);
  15478. }
  15479. }
  15480. return false;
  15481. }
  15482. function isDeclaredPredicate(node, opts) {
  15483. if (!node)
  15484. return false;
  15485. const nodeType = node.type;
  15486. if (nodeType === "DeclaredPredicate") {
  15487. if (typeof opts === "undefined") {
  15488. return true;
  15489. } else {
  15490. return (0, _shallowEqual.default)(node, opts);
  15491. }
  15492. }
  15493. return false;
  15494. }
  15495. function isExistsTypeAnnotation(node, opts) {
  15496. if (!node)
  15497. return false;
  15498. const nodeType = node.type;
  15499. if (nodeType === "ExistsTypeAnnotation") {
  15500. if (typeof opts === "undefined") {
  15501. return true;
  15502. } else {
  15503. return (0, _shallowEqual.default)(node, opts);
  15504. }
  15505. }
  15506. return false;
  15507. }
  15508. function isFunctionTypeAnnotation(node, opts) {
  15509. if (!node)
  15510. return false;
  15511. const nodeType = node.type;
  15512. if (nodeType === "FunctionTypeAnnotation") {
  15513. if (typeof opts === "undefined") {
  15514. return true;
  15515. } else {
  15516. return (0, _shallowEqual.default)(node, opts);
  15517. }
  15518. }
  15519. return false;
  15520. }
  15521. function isFunctionTypeParam(node, opts) {
  15522. if (!node)
  15523. return false;
  15524. const nodeType = node.type;
  15525. if (nodeType === "FunctionTypeParam") {
  15526. if (typeof opts === "undefined") {
  15527. return true;
  15528. } else {
  15529. return (0, _shallowEqual.default)(node, opts);
  15530. }
  15531. }
  15532. return false;
  15533. }
  15534. function isGenericTypeAnnotation(node, opts) {
  15535. if (!node)
  15536. return false;
  15537. const nodeType = node.type;
  15538. if (nodeType === "GenericTypeAnnotation") {
  15539. if (typeof opts === "undefined") {
  15540. return true;
  15541. } else {
  15542. return (0, _shallowEqual.default)(node, opts);
  15543. }
  15544. }
  15545. return false;
  15546. }
  15547. function isInferredPredicate(node, opts) {
  15548. if (!node)
  15549. return false;
  15550. const nodeType = node.type;
  15551. if (nodeType === "InferredPredicate") {
  15552. if (typeof opts === "undefined") {
  15553. return true;
  15554. } else {
  15555. return (0, _shallowEqual.default)(node, opts);
  15556. }
  15557. }
  15558. return false;
  15559. }
  15560. function isInterfaceExtends(node, opts) {
  15561. if (!node)
  15562. return false;
  15563. const nodeType = node.type;
  15564. if (nodeType === "InterfaceExtends") {
  15565. if (typeof opts === "undefined") {
  15566. return true;
  15567. } else {
  15568. return (0, _shallowEqual.default)(node, opts);
  15569. }
  15570. }
  15571. return false;
  15572. }
  15573. function isInterfaceDeclaration(node, opts) {
  15574. if (!node)
  15575. return false;
  15576. const nodeType = node.type;
  15577. if (nodeType === "InterfaceDeclaration") {
  15578. if (typeof opts === "undefined") {
  15579. return true;
  15580. } else {
  15581. return (0, _shallowEqual.default)(node, opts);
  15582. }
  15583. }
  15584. return false;
  15585. }
  15586. function isInterfaceTypeAnnotation(node, opts) {
  15587. if (!node)
  15588. return false;
  15589. const nodeType = node.type;
  15590. if (nodeType === "InterfaceTypeAnnotation") {
  15591. if (typeof opts === "undefined") {
  15592. return true;
  15593. } else {
  15594. return (0, _shallowEqual.default)(node, opts);
  15595. }
  15596. }
  15597. return false;
  15598. }
  15599. function isIntersectionTypeAnnotation(node, opts) {
  15600. if (!node)
  15601. return false;
  15602. const nodeType = node.type;
  15603. if (nodeType === "IntersectionTypeAnnotation") {
  15604. if (typeof opts === "undefined") {
  15605. return true;
  15606. } else {
  15607. return (0, _shallowEqual.default)(node, opts);
  15608. }
  15609. }
  15610. return false;
  15611. }
  15612. function isMixedTypeAnnotation(node, opts) {
  15613. if (!node)
  15614. return false;
  15615. const nodeType = node.type;
  15616. if (nodeType === "MixedTypeAnnotation") {
  15617. if (typeof opts === "undefined") {
  15618. return true;
  15619. } else {
  15620. return (0, _shallowEqual.default)(node, opts);
  15621. }
  15622. }
  15623. return false;
  15624. }
  15625. function isEmptyTypeAnnotation(node, opts) {
  15626. if (!node)
  15627. return false;
  15628. const nodeType = node.type;
  15629. if (nodeType === "EmptyTypeAnnotation") {
  15630. if (typeof opts === "undefined") {
  15631. return true;
  15632. } else {
  15633. return (0, _shallowEqual.default)(node, opts);
  15634. }
  15635. }
  15636. return false;
  15637. }
  15638. function isNullableTypeAnnotation(node, opts) {
  15639. if (!node)
  15640. return false;
  15641. const nodeType = node.type;
  15642. if (nodeType === "NullableTypeAnnotation") {
  15643. if (typeof opts === "undefined") {
  15644. return true;
  15645. } else {
  15646. return (0, _shallowEqual.default)(node, opts);
  15647. }
  15648. }
  15649. return false;
  15650. }
  15651. function isNumberLiteralTypeAnnotation(node, opts) {
  15652. if (!node)
  15653. return false;
  15654. const nodeType = node.type;
  15655. if (nodeType === "NumberLiteralTypeAnnotation") {
  15656. if (typeof opts === "undefined") {
  15657. return true;
  15658. } else {
  15659. return (0, _shallowEqual.default)(node, opts);
  15660. }
  15661. }
  15662. return false;
  15663. }
  15664. function isNumberTypeAnnotation(node, opts) {
  15665. if (!node)
  15666. return false;
  15667. const nodeType = node.type;
  15668. if (nodeType === "NumberTypeAnnotation") {
  15669. if (typeof opts === "undefined") {
  15670. return true;
  15671. } else {
  15672. return (0, _shallowEqual.default)(node, opts);
  15673. }
  15674. }
  15675. return false;
  15676. }
  15677. function isObjectTypeAnnotation(node, opts) {
  15678. if (!node)
  15679. return false;
  15680. const nodeType = node.type;
  15681. if (nodeType === "ObjectTypeAnnotation") {
  15682. if (typeof opts === "undefined") {
  15683. return true;
  15684. } else {
  15685. return (0, _shallowEqual.default)(node, opts);
  15686. }
  15687. }
  15688. return false;
  15689. }
  15690. function isObjectTypeInternalSlot(node, opts) {
  15691. if (!node)
  15692. return false;
  15693. const nodeType = node.type;
  15694. if (nodeType === "ObjectTypeInternalSlot") {
  15695. if (typeof opts === "undefined") {
  15696. return true;
  15697. } else {
  15698. return (0, _shallowEqual.default)(node, opts);
  15699. }
  15700. }
  15701. return false;
  15702. }
  15703. function isObjectTypeCallProperty(node, opts) {
  15704. if (!node)
  15705. return false;
  15706. const nodeType = node.type;
  15707. if (nodeType === "ObjectTypeCallProperty") {
  15708. if (typeof opts === "undefined") {
  15709. return true;
  15710. } else {
  15711. return (0, _shallowEqual.default)(node, opts);
  15712. }
  15713. }
  15714. return false;
  15715. }
  15716. function isObjectTypeIndexer(node, opts) {
  15717. if (!node)
  15718. return false;
  15719. const nodeType = node.type;
  15720. if (nodeType === "ObjectTypeIndexer") {
  15721. if (typeof opts === "undefined") {
  15722. return true;
  15723. } else {
  15724. return (0, _shallowEqual.default)(node, opts);
  15725. }
  15726. }
  15727. return false;
  15728. }
  15729. function isObjectTypeProperty(node, opts) {
  15730. if (!node)
  15731. return false;
  15732. const nodeType = node.type;
  15733. if (nodeType === "ObjectTypeProperty") {
  15734. if (typeof opts === "undefined") {
  15735. return true;
  15736. } else {
  15737. return (0, _shallowEqual.default)(node, opts);
  15738. }
  15739. }
  15740. return false;
  15741. }
  15742. function isObjectTypeSpreadProperty(node, opts) {
  15743. if (!node)
  15744. return false;
  15745. const nodeType = node.type;
  15746. if (nodeType === "ObjectTypeSpreadProperty") {
  15747. if (typeof opts === "undefined") {
  15748. return true;
  15749. } else {
  15750. return (0, _shallowEqual.default)(node, opts);
  15751. }
  15752. }
  15753. return false;
  15754. }
  15755. function isOpaqueType(node, opts) {
  15756. if (!node)
  15757. return false;
  15758. const nodeType = node.type;
  15759. if (nodeType === "OpaqueType") {
  15760. if (typeof opts === "undefined") {
  15761. return true;
  15762. } else {
  15763. return (0, _shallowEqual.default)(node, opts);
  15764. }
  15765. }
  15766. return false;
  15767. }
  15768. function isQualifiedTypeIdentifier(node, opts) {
  15769. if (!node)
  15770. return false;
  15771. const nodeType = node.type;
  15772. if (nodeType === "QualifiedTypeIdentifier") {
  15773. if (typeof opts === "undefined") {
  15774. return true;
  15775. } else {
  15776. return (0, _shallowEqual.default)(node, opts);
  15777. }
  15778. }
  15779. return false;
  15780. }
  15781. function isStringLiteralTypeAnnotation(node, opts) {
  15782. if (!node)
  15783. return false;
  15784. const nodeType = node.type;
  15785. if (nodeType === "StringLiteralTypeAnnotation") {
  15786. if (typeof opts === "undefined") {
  15787. return true;
  15788. } else {
  15789. return (0, _shallowEqual.default)(node, opts);
  15790. }
  15791. }
  15792. return false;
  15793. }
  15794. function isStringTypeAnnotation(node, opts) {
  15795. if (!node)
  15796. return false;
  15797. const nodeType = node.type;
  15798. if (nodeType === "StringTypeAnnotation") {
  15799. if (typeof opts === "undefined") {
  15800. return true;
  15801. } else {
  15802. return (0, _shallowEqual.default)(node, opts);
  15803. }
  15804. }
  15805. return false;
  15806. }
  15807. function isSymbolTypeAnnotation(node, opts) {
  15808. if (!node)
  15809. return false;
  15810. const nodeType = node.type;
  15811. if (nodeType === "SymbolTypeAnnotation") {
  15812. if (typeof opts === "undefined") {
  15813. return true;
  15814. } else {
  15815. return (0, _shallowEqual.default)(node, opts);
  15816. }
  15817. }
  15818. return false;
  15819. }
  15820. function isThisTypeAnnotation(node, opts) {
  15821. if (!node)
  15822. return false;
  15823. const nodeType = node.type;
  15824. if (nodeType === "ThisTypeAnnotation") {
  15825. if (typeof opts === "undefined") {
  15826. return true;
  15827. } else {
  15828. return (0, _shallowEqual.default)(node, opts);
  15829. }
  15830. }
  15831. return false;
  15832. }
  15833. function isTupleTypeAnnotation(node, opts) {
  15834. if (!node)
  15835. return false;
  15836. const nodeType = node.type;
  15837. if (nodeType === "TupleTypeAnnotation") {
  15838. if (typeof opts === "undefined") {
  15839. return true;
  15840. } else {
  15841. return (0, _shallowEqual.default)(node, opts);
  15842. }
  15843. }
  15844. return false;
  15845. }
  15846. function isTypeofTypeAnnotation(node, opts) {
  15847. if (!node)
  15848. return false;
  15849. const nodeType = node.type;
  15850. if (nodeType === "TypeofTypeAnnotation") {
  15851. if (typeof opts === "undefined") {
  15852. return true;
  15853. } else {
  15854. return (0, _shallowEqual.default)(node, opts);
  15855. }
  15856. }
  15857. return false;
  15858. }
  15859. function isTypeAlias(node, opts) {
  15860. if (!node)
  15861. return false;
  15862. const nodeType = node.type;
  15863. if (nodeType === "TypeAlias") {
  15864. if (typeof opts === "undefined") {
  15865. return true;
  15866. } else {
  15867. return (0, _shallowEqual.default)(node, opts);
  15868. }
  15869. }
  15870. return false;
  15871. }
  15872. function isTypeAnnotation(node, opts) {
  15873. if (!node)
  15874. return false;
  15875. const nodeType = node.type;
  15876. if (nodeType === "TypeAnnotation") {
  15877. if (typeof opts === "undefined") {
  15878. return true;
  15879. } else {
  15880. return (0, _shallowEqual.default)(node, opts);
  15881. }
  15882. }
  15883. return false;
  15884. }
  15885. function isTypeCastExpression(node, opts) {
  15886. if (!node)
  15887. return false;
  15888. const nodeType = node.type;
  15889. if (nodeType === "TypeCastExpression") {
  15890. if (typeof opts === "undefined") {
  15891. return true;
  15892. } else {
  15893. return (0, _shallowEqual.default)(node, opts);
  15894. }
  15895. }
  15896. return false;
  15897. }
  15898. function isTypeParameter(node, opts) {
  15899. if (!node)
  15900. return false;
  15901. const nodeType = node.type;
  15902. if (nodeType === "TypeParameter") {
  15903. if (typeof opts === "undefined") {
  15904. return true;
  15905. } else {
  15906. return (0, _shallowEqual.default)(node, opts);
  15907. }
  15908. }
  15909. return false;
  15910. }
  15911. function isTypeParameterDeclaration(node, opts) {
  15912. if (!node)
  15913. return false;
  15914. const nodeType = node.type;
  15915. if (nodeType === "TypeParameterDeclaration") {
  15916. if (typeof opts === "undefined") {
  15917. return true;
  15918. } else {
  15919. return (0, _shallowEqual.default)(node, opts);
  15920. }
  15921. }
  15922. return false;
  15923. }
  15924. function isTypeParameterInstantiation(node, opts) {
  15925. if (!node)
  15926. return false;
  15927. const nodeType = node.type;
  15928. if (nodeType === "TypeParameterInstantiation") {
  15929. if (typeof opts === "undefined") {
  15930. return true;
  15931. } else {
  15932. return (0, _shallowEqual.default)(node, opts);
  15933. }
  15934. }
  15935. return false;
  15936. }
  15937. function isUnionTypeAnnotation(node, opts) {
  15938. if (!node)
  15939. return false;
  15940. const nodeType = node.type;
  15941. if (nodeType === "UnionTypeAnnotation") {
  15942. if (typeof opts === "undefined") {
  15943. return true;
  15944. } else {
  15945. return (0, _shallowEqual.default)(node, opts);
  15946. }
  15947. }
  15948. return false;
  15949. }
  15950. function isVariance(node, opts) {
  15951. if (!node)
  15952. return false;
  15953. const nodeType = node.type;
  15954. if (nodeType === "Variance") {
  15955. if (typeof opts === "undefined") {
  15956. return true;
  15957. } else {
  15958. return (0, _shallowEqual.default)(node, opts);
  15959. }
  15960. }
  15961. return false;
  15962. }
  15963. function isVoidTypeAnnotation(node, opts) {
  15964. if (!node)
  15965. return false;
  15966. const nodeType = node.type;
  15967. if (nodeType === "VoidTypeAnnotation") {
  15968. if (typeof opts === "undefined") {
  15969. return true;
  15970. } else {
  15971. return (0, _shallowEqual.default)(node, opts);
  15972. }
  15973. }
  15974. return false;
  15975. }
  15976. function isEnumDeclaration(node, opts) {
  15977. if (!node)
  15978. return false;
  15979. const nodeType = node.type;
  15980. if (nodeType === "EnumDeclaration") {
  15981. if (typeof opts === "undefined") {
  15982. return true;
  15983. } else {
  15984. return (0, _shallowEqual.default)(node, opts);
  15985. }
  15986. }
  15987. return false;
  15988. }
  15989. function isEnumBooleanBody(node, opts) {
  15990. if (!node)
  15991. return false;
  15992. const nodeType = node.type;
  15993. if (nodeType === "EnumBooleanBody") {
  15994. if (typeof opts === "undefined") {
  15995. return true;
  15996. } else {
  15997. return (0, _shallowEqual.default)(node, opts);
  15998. }
  15999. }
  16000. return false;
  16001. }
  16002. function isEnumNumberBody(node, opts) {
  16003. if (!node)
  16004. return false;
  16005. const nodeType = node.type;
  16006. if (nodeType === "EnumNumberBody") {
  16007. if (typeof opts === "undefined") {
  16008. return true;
  16009. } else {
  16010. return (0, _shallowEqual.default)(node, opts);
  16011. }
  16012. }
  16013. return false;
  16014. }
  16015. function isEnumStringBody(node, opts) {
  16016. if (!node)
  16017. return false;
  16018. const nodeType = node.type;
  16019. if (nodeType === "EnumStringBody") {
  16020. if (typeof opts === "undefined") {
  16021. return true;
  16022. } else {
  16023. return (0, _shallowEqual.default)(node, opts);
  16024. }
  16025. }
  16026. return false;
  16027. }
  16028. function isEnumSymbolBody(node, opts) {
  16029. if (!node)
  16030. return false;
  16031. const nodeType = node.type;
  16032. if (nodeType === "EnumSymbolBody") {
  16033. if (typeof opts === "undefined") {
  16034. return true;
  16035. } else {
  16036. return (0, _shallowEqual.default)(node, opts);
  16037. }
  16038. }
  16039. return false;
  16040. }
  16041. function isEnumBooleanMember(node, opts) {
  16042. if (!node)
  16043. return false;
  16044. const nodeType = node.type;
  16045. if (nodeType === "EnumBooleanMember") {
  16046. if (typeof opts === "undefined") {
  16047. return true;
  16048. } else {
  16049. return (0, _shallowEqual.default)(node, opts);
  16050. }
  16051. }
  16052. return false;
  16053. }
  16054. function isEnumNumberMember(node, opts) {
  16055. if (!node)
  16056. return false;
  16057. const nodeType = node.type;
  16058. if (nodeType === "EnumNumberMember") {
  16059. if (typeof opts === "undefined") {
  16060. return true;
  16061. } else {
  16062. return (0, _shallowEqual.default)(node, opts);
  16063. }
  16064. }
  16065. return false;
  16066. }
  16067. function isEnumStringMember(node, opts) {
  16068. if (!node)
  16069. return false;
  16070. const nodeType = node.type;
  16071. if (nodeType === "EnumStringMember") {
  16072. if (typeof opts === "undefined") {
  16073. return true;
  16074. } else {
  16075. return (0, _shallowEqual.default)(node, opts);
  16076. }
  16077. }
  16078. return false;
  16079. }
  16080. function isEnumDefaultedMember(node, opts) {
  16081. if (!node)
  16082. return false;
  16083. const nodeType = node.type;
  16084. if (nodeType === "EnumDefaultedMember") {
  16085. if (typeof opts === "undefined") {
  16086. return true;
  16087. } else {
  16088. return (0, _shallowEqual.default)(node, opts);
  16089. }
  16090. }
  16091. return false;
  16092. }
  16093. function isIndexedAccessType(node, opts) {
  16094. if (!node)
  16095. return false;
  16096. const nodeType = node.type;
  16097. if (nodeType === "IndexedAccessType") {
  16098. if (typeof opts === "undefined") {
  16099. return true;
  16100. } else {
  16101. return (0, _shallowEqual.default)(node, opts);
  16102. }
  16103. }
  16104. return false;
  16105. }
  16106. function isOptionalIndexedAccessType(node, opts) {
  16107. if (!node)
  16108. return false;
  16109. const nodeType = node.type;
  16110. if (nodeType === "OptionalIndexedAccessType") {
  16111. if (typeof opts === "undefined") {
  16112. return true;
  16113. } else {
  16114. return (0, _shallowEqual.default)(node, opts);
  16115. }
  16116. }
  16117. return false;
  16118. }
  16119. function isJSXAttribute(node, opts) {
  16120. if (!node)
  16121. return false;
  16122. const nodeType = node.type;
  16123. if (nodeType === "JSXAttribute") {
  16124. if (typeof opts === "undefined") {
  16125. return true;
  16126. } else {
  16127. return (0, _shallowEqual.default)(node, opts);
  16128. }
  16129. }
  16130. return false;
  16131. }
  16132. function isJSXClosingElement(node, opts) {
  16133. if (!node)
  16134. return false;
  16135. const nodeType = node.type;
  16136. if (nodeType === "JSXClosingElement") {
  16137. if (typeof opts === "undefined") {
  16138. return true;
  16139. } else {
  16140. return (0, _shallowEqual.default)(node, opts);
  16141. }
  16142. }
  16143. return false;
  16144. }
  16145. function isJSXElement2(node, opts) {
  16146. if (!node)
  16147. return false;
  16148. const nodeType = node.type;
  16149. if (nodeType === "JSXElement") {
  16150. if (typeof opts === "undefined") {
  16151. return true;
  16152. } else {
  16153. return (0, _shallowEqual.default)(node, opts);
  16154. }
  16155. }
  16156. return false;
  16157. }
  16158. function isJSXEmptyExpression(node, opts) {
  16159. if (!node)
  16160. return false;
  16161. const nodeType = node.type;
  16162. if (nodeType === "JSXEmptyExpression") {
  16163. if (typeof opts === "undefined") {
  16164. return true;
  16165. } else {
  16166. return (0, _shallowEqual.default)(node, opts);
  16167. }
  16168. }
  16169. return false;
  16170. }
  16171. function isJSXExpressionContainer2(node, opts) {
  16172. if (!node)
  16173. return false;
  16174. const nodeType = node.type;
  16175. if (nodeType === "JSXExpressionContainer") {
  16176. if (typeof opts === "undefined") {
  16177. return true;
  16178. } else {
  16179. return (0, _shallowEqual.default)(node, opts);
  16180. }
  16181. }
  16182. return false;
  16183. }
  16184. function isJSXSpreadChild(node, opts) {
  16185. if (!node)
  16186. return false;
  16187. const nodeType = node.type;
  16188. if (nodeType === "JSXSpreadChild") {
  16189. if (typeof opts === "undefined") {
  16190. return true;
  16191. } else {
  16192. return (0, _shallowEqual.default)(node, opts);
  16193. }
  16194. }
  16195. return false;
  16196. }
  16197. function isJSXIdentifier2(node, opts) {
  16198. if (!node)
  16199. return false;
  16200. const nodeType = node.type;
  16201. if (nodeType === "JSXIdentifier") {
  16202. if (typeof opts === "undefined") {
  16203. return true;
  16204. } else {
  16205. return (0, _shallowEqual.default)(node, opts);
  16206. }
  16207. }
  16208. return false;
  16209. }
  16210. function isJSXMemberExpression(node, opts) {
  16211. if (!node)
  16212. return false;
  16213. const nodeType = node.type;
  16214. if (nodeType === "JSXMemberExpression") {
  16215. if (typeof opts === "undefined") {
  16216. return true;
  16217. } else {
  16218. return (0, _shallowEqual.default)(node, opts);
  16219. }
  16220. }
  16221. return false;
  16222. }
  16223. function isJSXNamespacedName(node, opts) {
  16224. if (!node)
  16225. return false;
  16226. const nodeType = node.type;
  16227. if (nodeType === "JSXNamespacedName") {
  16228. if (typeof opts === "undefined") {
  16229. return true;
  16230. } else {
  16231. return (0, _shallowEqual.default)(node, opts);
  16232. }
  16233. }
  16234. return false;
  16235. }
  16236. function isJSXOpeningElement(node, opts) {
  16237. if (!node)
  16238. return false;
  16239. const nodeType = node.type;
  16240. if (nodeType === "JSXOpeningElement") {
  16241. if (typeof opts === "undefined") {
  16242. return true;
  16243. } else {
  16244. return (0, _shallowEqual.default)(node, opts);
  16245. }
  16246. }
  16247. return false;
  16248. }
  16249. function isJSXSpreadAttribute(node, opts) {
  16250. if (!node)
  16251. return false;
  16252. const nodeType = node.type;
  16253. if (nodeType === "JSXSpreadAttribute") {
  16254. if (typeof opts === "undefined") {
  16255. return true;
  16256. } else {
  16257. return (0, _shallowEqual.default)(node, opts);
  16258. }
  16259. }
  16260. return false;
  16261. }
  16262. function isJSXText(node, opts) {
  16263. if (!node)
  16264. return false;
  16265. const nodeType = node.type;
  16266. if (nodeType === "JSXText") {
  16267. if (typeof opts === "undefined") {
  16268. return true;
  16269. } else {
  16270. return (0, _shallowEqual.default)(node, opts);
  16271. }
  16272. }
  16273. return false;
  16274. }
  16275. function isJSXFragment2(node, opts) {
  16276. if (!node)
  16277. return false;
  16278. const nodeType = node.type;
  16279. if (nodeType === "JSXFragment") {
  16280. if (typeof opts === "undefined") {
  16281. return true;
  16282. } else {
  16283. return (0, _shallowEqual.default)(node, opts);
  16284. }
  16285. }
  16286. return false;
  16287. }
  16288. function isJSXOpeningFragment(node, opts) {
  16289. if (!node)
  16290. return false;
  16291. const nodeType = node.type;
  16292. if (nodeType === "JSXOpeningFragment") {
  16293. if (typeof opts === "undefined") {
  16294. return true;
  16295. } else {
  16296. return (0, _shallowEqual.default)(node, opts);
  16297. }
  16298. }
  16299. return false;
  16300. }
  16301. function isJSXClosingFragment(node, opts) {
  16302. if (!node)
  16303. return false;
  16304. const nodeType = node.type;
  16305. if (nodeType === "JSXClosingFragment") {
  16306. if (typeof opts === "undefined") {
  16307. return true;
  16308. } else {
  16309. return (0, _shallowEqual.default)(node, opts);
  16310. }
  16311. }
  16312. return false;
  16313. }
  16314. function isNoop(node, opts) {
  16315. if (!node)
  16316. return false;
  16317. const nodeType = node.type;
  16318. if (nodeType === "Noop") {
  16319. if (typeof opts === "undefined") {
  16320. return true;
  16321. } else {
  16322. return (0, _shallowEqual.default)(node, opts);
  16323. }
  16324. }
  16325. return false;
  16326. }
  16327. function isPlaceholder(node, opts) {
  16328. if (!node)
  16329. return false;
  16330. const nodeType = node.type;
  16331. if (nodeType === "Placeholder") {
  16332. if (typeof opts === "undefined") {
  16333. return true;
  16334. } else {
  16335. return (0, _shallowEqual.default)(node, opts);
  16336. }
  16337. }
  16338. return false;
  16339. }
  16340. function isV8IntrinsicIdentifier(node, opts) {
  16341. if (!node)
  16342. return false;
  16343. const nodeType = node.type;
  16344. if (nodeType === "V8IntrinsicIdentifier") {
  16345. if (typeof opts === "undefined") {
  16346. return true;
  16347. } else {
  16348. return (0, _shallowEqual.default)(node, opts);
  16349. }
  16350. }
  16351. return false;
  16352. }
  16353. function isArgumentPlaceholder(node, opts) {
  16354. if (!node)
  16355. return false;
  16356. const nodeType = node.type;
  16357. if (nodeType === "ArgumentPlaceholder") {
  16358. if (typeof opts === "undefined") {
  16359. return true;
  16360. } else {
  16361. return (0, _shallowEqual.default)(node, opts);
  16362. }
  16363. }
  16364. return false;
  16365. }
  16366. function isBindExpression(node, opts) {
  16367. if (!node)
  16368. return false;
  16369. const nodeType = node.type;
  16370. if (nodeType === "BindExpression") {
  16371. if (typeof opts === "undefined") {
  16372. return true;
  16373. } else {
  16374. return (0, _shallowEqual.default)(node, opts);
  16375. }
  16376. }
  16377. return false;
  16378. }
  16379. function isClassProperty(node, opts) {
  16380. if (!node)
  16381. return false;
  16382. const nodeType = node.type;
  16383. if (nodeType === "ClassProperty") {
  16384. if (typeof opts === "undefined") {
  16385. return true;
  16386. } else {
  16387. return (0, _shallowEqual.default)(node, opts);
  16388. }
  16389. }
  16390. return false;
  16391. }
  16392. function isPipelineTopicExpression(node, opts) {
  16393. if (!node)
  16394. return false;
  16395. const nodeType = node.type;
  16396. if (nodeType === "PipelineTopicExpression") {
  16397. if (typeof opts === "undefined") {
  16398. return true;
  16399. } else {
  16400. return (0, _shallowEqual.default)(node, opts);
  16401. }
  16402. }
  16403. return false;
  16404. }
  16405. function isPipelineBareFunction(node, opts) {
  16406. if (!node)
  16407. return false;
  16408. const nodeType = node.type;
  16409. if (nodeType === "PipelineBareFunction") {
  16410. if (typeof opts === "undefined") {
  16411. return true;
  16412. } else {
  16413. return (0, _shallowEqual.default)(node, opts);
  16414. }
  16415. }
  16416. return false;
  16417. }
  16418. function isPipelinePrimaryTopicReference(node, opts) {
  16419. if (!node)
  16420. return false;
  16421. const nodeType = node.type;
  16422. if (nodeType === "PipelinePrimaryTopicReference") {
  16423. if (typeof opts === "undefined") {
  16424. return true;
  16425. } else {
  16426. return (0, _shallowEqual.default)(node, opts);
  16427. }
  16428. }
  16429. return false;
  16430. }
  16431. function isClassPrivateProperty(node, opts) {
  16432. if (!node)
  16433. return false;
  16434. const nodeType = node.type;
  16435. if (nodeType === "ClassPrivateProperty") {
  16436. if (typeof opts === "undefined") {
  16437. return true;
  16438. } else {
  16439. return (0, _shallowEqual.default)(node, opts);
  16440. }
  16441. }
  16442. return false;
  16443. }
  16444. function isClassPrivateMethod(node, opts) {
  16445. if (!node)
  16446. return false;
  16447. const nodeType = node.type;
  16448. if (nodeType === "ClassPrivateMethod") {
  16449. if (typeof opts === "undefined") {
  16450. return true;
  16451. } else {
  16452. return (0, _shallowEqual.default)(node, opts);
  16453. }
  16454. }
  16455. return false;
  16456. }
  16457. function isImportAttribute(node, opts) {
  16458. if (!node)
  16459. return false;
  16460. const nodeType = node.type;
  16461. if (nodeType === "ImportAttribute") {
  16462. if (typeof opts === "undefined") {
  16463. return true;
  16464. } else {
  16465. return (0, _shallowEqual.default)(node, opts);
  16466. }
  16467. }
  16468. return false;
  16469. }
  16470. function isDecorator(node, opts) {
  16471. if (!node)
  16472. return false;
  16473. const nodeType = node.type;
  16474. if (nodeType === "Decorator") {
  16475. if (typeof opts === "undefined") {
  16476. return true;
  16477. } else {
  16478. return (0, _shallowEqual.default)(node, opts);
  16479. }
  16480. }
  16481. return false;
  16482. }
  16483. function isDoExpression(node, opts) {
  16484. if (!node)
  16485. return false;
  16486. const nodeType = node.type;
  16487. if (nodeType === "DoExpression") {
  16488. if (typeof opts === "undefined") {
  16489. return true;
  16490. } else {
  16491. return (0, _shallowEqual.default)(node, opts);
  16492. }
  16493. }
  16494. return false;
  16495. }
  16496. function isExportDefaultSpecifier(node, opts) {
  16497. if (!node)
  16498. return false;
  16499. const nodeType = node.type;
  16500. if (nodeType === "ExportDefaultSpecifier") {
  16501. if (typeof opts === "undefined") {
  16502. return true;
  16503. } else {
  16504. return (0, _shallowEqual.default)(node, opts);
  16505. }
  16506. }
  16507. return false;
  16508. }
  16509. function isPrivateName(node, opts) {
  16510. if (!node)
  16511. return false;
  16512. const nodeType = node.type;
  16513. if (nodeType === "PrivateName") {
  16514. if (typeof opts === "undefined") {
  16515. return true;
  16516. } else {
  16517. return (0, _shallowEqual.default)(node, opts);
  16518. }
  16519. }
  16520. return false;
  16521. }
  16522. function isRecordExpression(node, opts) {
  16523. if (!node)
  16524. return false;
  16525. const nodeType = node.type;
  16526. if (nodeType === "RecordExpression") {
  16527. if (typeof opts === "undefined") {
  16528. return true;
  16529. } else {
  16530. return (0, _shallowEqual.default)(node, opts);
  16531. }
  16532. }
  16533. return false;
  16534. }
  16535. function isTupleExpression(node, opts) {
  16536. if (!node)
  16537. return false;
  16538. const nodeType = node.type;
  16539. if (nodeType === "TupleExpression") {
  16540. if (typeof opts === "undefined") {
  16541. return true;
  16542. } else {
  16543. return (0, _shallowEqual.default)(node, opts);
  16544. }
  16545. }
  16546. return false;
  16547. }
  16548. function isDecimalLiteral(node, opts) {
  16549. if (!node)
  16550. return false;
  16551. const nodeType = node.type;
  16552. if (nodeType === "DecimalLiteral") {
  16553. if (typeof opts === "undefined") {
  16554. return true;
  16555. } else {
  16556. return (0, _shallowEqual.default)(node, opts);
  16557. }
  16558. }
  16559. return false;
  16560. }
  16561. function isStaticBlock(node, opts) {
  16562. if (!node)
  16563. return false;
  16564. const nodeType = node.type;
  16565. if (nodeType === "StaticBlock") {
  16566. if (typeof opts === "undefined") {
  16567. return true;
  16568. } else {
  16569. return (0, _shallowEqual.default)(node, opts);
  16570. }
  16571. }
  16572. return false;
  16573. }
  16574. function isModuleExpression(node, opts) {
  16575. if (!node)
  16576. return false;
  16577. const nodeType = node.type;
  16578. if (nodeType === "ModuleExpression") {
  16579. if (typeof opts === "undefined") {
  16580. return true;
  16581. } else {
  16582. return (0, _shallowEqual.default)(node, opts);
  16583. }
  16584. }
  16585. return false;
  16586. }
  16587. function isTSParameterProperty(node, opts) {
  16588. if (!node)
  16589. return false;
  16590. const nodeType = node.type;
  16591. if (nodeType === "TSParameterProperty") {
  16592. if (typeof opts === "undefined") {
  16593. return true;
  16594. } else {
  16595. return (0, _shallowEqual.default)(node, opts);
  16596. }
  16597. }
  16598. return false;
  16599. }
  16600. function isTSDeclareFunction(node, opts) {
  16601. if (!node)
  16602. return false;
  16603. const nodeType = node.type;
  16604. if (nodeType === "TSDeclareFunction") {
  16605. if (typeof opts === "undefined") {
  16606. return true;
  16607. } else {
  16608. return (0, _shallowEqual.default)(node, opts);
  16609. }
  16610. }
  16611. return false;
  16612. }
  16613. function isTSDeclareMethod(node, opts) {
  16614. if (!node)
  16615. return false;
  16616. const nodeType = node.type;
  16617. if (nodeType === "TSDeclareMethod") {
  16618. if (typeof opts === "undefined") {
  16619. return true;
  16620. } else {
  16621. return (0, _shallowEqual.default)(node, opts);
  16622. }
  16623. }
  16624. return false;
  16625. }
  16626. function isTSQualifiedName(node, opts) {
  16627. if (!node)
  16628. return false;
  16629. const nodeType = node.type;
  16630. if (nodeType === "TSQualifiedName") {
  16631. if (typeof opts === "undefined") {
  16632. return true;
  16633. } else {
  16634. return (0, _shallowEqual.default)(node, opts);
  16635. }
  16636. }
  16637. return false;
  16638. }
  16639. function isTSCallSignatureDeclaration(node, opts) {
  16640. if (!node)
  16641. return false;
  16642. const nodeType = node.type;
  16643. if (nodeType === "TSCallSignatureDeclaration") {
  16644. if (typeof opts === "undefined") {
  16645. return true;
  16646. } else {
  16647. return (0, _shallowEqual.default)(node, opts);
  16648. }
  16649. }
  16650. return false;
  16651. }
  16652. function isTSConstructSignatureDeclaration(node, opts) {
  16653. if (!node)
  16654. return false;
  16655. const nodeType = node.type;
  16656. if (nodeType === "TSConstructSignatureDeclaration") {
  16657. if (typeof opts === "undefined") {
  16658. return true;
  16659. } else {
  16660. return (0, _shallowEqual.default)(node, opts);
  16661. }
  16662. }
  16663. return false;
  16664. }
  16665. function isTSPropertySignature(node, opts) {
  16666. if (!node)
  16667. return false;
  16668. const nodeType = node.type;
  16669. if (nodeType === "TSPropertySignature") {
  16670. if (typeof opts === "undefined") {
  16671. return true;
  16672. } else {
  16673. return (0, _shallowEqual.default)(node, opts);
  16674. }
  16675. }
  16676. return false;
  16677. }
  16678. function isTSMethodSignature(node, opts) {
  16679. if (!node)
  16680. return false;
  16681. const nodeType = node.type;
  16682. if (nodeType === "TSMethodSignature") {
  16683. if (typeof opts === "undefined") {
  16684. return true;
  16685. } else {
  16686. return (0, _shallowEqual.default)(node, opts);
  16687. }
  16688. }
  16689. return false;
  16690. }
  16691. function isTSIndexSignature(node, opts) {
  16692. if (!node)
  16693. return false;
  16694. const nodeType = node.type;
  16695. if (nodeType === "TSIndexSignature") {
  16696. if (typeof opts === "undefined") {
  16697. return true;
  16698. } else {
  16699. return (0, _shallowEqual.default)(node, opts);
  16700. }
  16701. }
  16702. return false;
  16703. }
  16704. function isTSAnyKeyword(node, opts) {
  16705. if (!node)
  16706. return false;
  16707. const nodeType = node.type;
  16708. if (nodeType === "TSAnyKeyword") {
  16709. if (typeof opts === "undefined") {
  16710. return true;
  16711. } else {
  16712. return (0, _shallowEqual.default)(node, opts);
  16713. }
  16714. }
  16715. return false;
  16716. }
  16717. function isTSBooleanKeyword(node, opts) {
  16718. if (!node)
  16719. return false;
  16720. const nodeType = node.type;
  16721. if (nodeType === "TSBooleanKeyword") {
  16722. if (typeof opts === "undefined") {
  16723. return true;
  16724. } else {
  16725. return (0, _shallowEqual.default)(node, opts);
  16726. }
  16727. }
  16728. return false;
  16729. }
  16730. function isTSBigIntKeyword(node, opts) {
  16731. if (!node)
  16732. return false;
  16733. const nodeType = node.type;
  16734. if (nodeType === "TSBigIntKeyword") {
  16735. if (typeof opts === "undefined") {
  16736. return true;
  16737. } else {
  16738. return (0, _shallowEqual.default)(node, opts);
  16739. }
  16740. }
  16741. return false;
  16742. }
  16743. function isTSIntrinsicKeyword(node, opts) {
  16744. if (!node)
  16745. return false;
  16746. const nodeType = node.type;
  16747. if (nodeType === "TSIntrinsicKeyword") {
  16748. if (typeof opts === "undefined") {
  16749. return true;
  16750. } else {
  16751. return (0, _shallowEqual.default)(node, opts);
  16752. }
  16753. }
  16754. return false;
  16755. }
  16756. function isTSNeverKeyword(node, opts) {
  16757. if (!node)
  16758. return false;
  16759. const nodeType = node.type;
  16760. if (nodeType === "TSNeverKeyword") {
  16761. if (typeof opts === "undefined") {
  16762. return true;
  16763. } else {
  16764. return (0, _shallowEqual.default)(node, opts);
  16765. }
  16766. }
  16767. return false;
  16768. }
  16769. function isTSNullKeyword(node, opts) {
  16770. if (!node)
  16771. return false;
  16772. const nodeType = node.type;
  16773. if (nodeType === "TSNullKeyword") {
  16774. if (typeof opts === "undefined") {
  16775. return true;
  16776. } else {
  16777. return (0, _shallowEqual.default)(node, opts);
  16778. }
  16779. }
  16780. return false;
  16781. }
  16782. function isTSNumberKeyword(node, opts) {
  16783. if (!node)
  16784. return false;
  16785. const nodeType = node.type;
  16786. if (nodeType === "TSNumberKeyword") {
  16787. if (typeof opts === "undefined") {
  16788. return true;
  16789. } else {
  16790. return (0, _shallowEqual.default)(node, opts);
  16791. }
  16792. }
  16793. return false;
  16794. }
  16795. function isTSObjectKeyword(node, opts) {
  16796. if (!node)
  16797. return false;
  16798. const nodeType = node.type;
  16799. if (nodeType === "TSObjectKeyword") {
  16800. if (typeof opts === "undefined") {
  16801. return true;
  16802. } else {
  16803. return (0, _shallowEqual.default)(node, opts);
  16804. }
  16805. }
  16806. return false;
  16807. }
  16808. function isTSStringKeyword(node, opts) {
  16809. if (!node)
  16810. return false;
  16811. const nodeType = node.type;
  16812. if (nodeType === "TSStringKeyword") {
  16813. if (typeof opts === "undefined") {
  16814. return true;
  16815. } else {
  16816. return (0, _shallowEqual.default)(node, opts);
  16817. }
  16818. }
  16819. return false;
  16820. }
  16821. function isTSSymbolKeyword(node, opts) {
  16822. if (!node)
  16823. return false;
  16824. const nodeType = node.type;
  16825. if (nodeType === "TSSymbolKeyword") {
  16826. if (typeof opts === "undefined") {
  16827. return true;
  16828. } else {
  16829. return (0, _shallowEqual.default)(node, opts);
  16830. }
  16831. }
  16832. return false;
  16833. }
  16834. function isTSUndefinedKeyword(node, opts) {
  16835. if (!node)
  16836. return false;
  16837. const nodeType = node.type;
  16838. if (nodeType === "TSUndefinedKeyword") {
  16839. if (typeof opts === "undefined") {
  16840. return true;
  16841. } else {
  16842. return (0, _shallowEqual.default)(node, opts);
  16843. }
  16844. }
  16845. return false;
  16846. }
  16847. function isTSUnknownKeyword(node, opts) {
  16848. if (!node)
  16849. return false;
  16850. const nodeType = node.type;
  16851. if (nodeType === "TSUnknownKeyword") {
  16852. if (typeof opts === "undefined") {
  16853. return true;
  16854. } else {
  16855. return (0, _shallowEqual.default)(node, opts);
  16856. }
  16857. }
  16858. return false;
  16859. }
  16860. function isTSVoidKeyword(node, opts) {
  16861. if (!node)
  16862. return false;
  16863. const nodeType = node.type;
  16864. if (nodeType === "TSVoidKeyword") {
  16865. if (typeof opts === "undefined") {
  16866. return true;
  16867. } else {
  16868. return (0, _shallowEqual.default)(node, opts);
  16869. }
  16870. }
  16871. return false;
  16872. }
  16873. function isTSThisType(node, opts) {
  16874. if (!node)
  16875. return false;
  16876. const nodeType = node.type;
  16877. if (nodeType === "TSThisType") {
  16878. if (typeof opts === "undefined") {
  16879. return true;
  16880. } else {
  16881. return (0, _shallowEqual.default)(node, opts);
  16882. }
  16883. }
  16884. return false;
  16885. }
  16886. function isTSFunctionType(node, opts) {
  16887. if (!node)
  16888. return false;
  16889. const nodeType = node.type;
  16890. if (nodeType === "TSFunctionType") {
  16891. if (typeof opts === "undefined") {
  16892. return true;
  16893. } else {
  16894. return (0, _shallowEqual.default)(node, opts);
  16895. }
  16896. }
  16897. return false;
  16898. }
  16899. function isTSConstructorType(node, opts) {
  16900. if (!node)
  16901. return false;
  16902. const nodeType = node.type;
  16903. if (nodeType === "TSConstructorType") {
  16904. if (typeof opts === "undefined") {
  16905. return true;
  16906. } else {
  16907. return (0, _shallowEqual.default)(node, opts);
  16908. }
  16909. }
  16910. return false;
  16911. }
  16912. function isTSTypeReference(node, opts) {
  16913. if (!node)
  16914. return false;
  16915. const nodeType = node.type;
  16916. if (nodeType === "TSTypeReference") {
  16917. if (typeof opts === "undefined") {
  16918. return true;
  16919. } else {
  16920. return (0, _shallowEqual.default)(node, opts);
  16921. }
  16922. }
  16923. return false;
  16924. }
  16925. function isTSTypePredicate(node, opts) {
  16926. if (!node)
  16927. return false;
  16928. const nodeType = node.type;
  16929. if (nodeType === "TSTypePredicate") {
  16930. if (typeof opts === "undefined") {
  16931. return true;
  16932. } else {
  16933. return (0, _shallowEqual.default)(node, opts);
  16934. }
  16935. }
  16936. return false;
  16937. }
  16938. function isTSTypeQuery(node, opts) {
  16939. if (!node)
  16940. return false;
  16941. const nodeType = node.type;
  16942. if (nodeType === "TSTypeQuery") {
  16943. if (typeof opts === "undefined") {
  16944. return true;
  16945. } else {
  16946. return (0, _shallowEqual.default)(node, opts);
  16947. }
  16948. }
  16949. return false;
  16950. }
  16951. function isTSTypeLiteral(node, opts) {
  16952. if (!node)
  16953. return false;
  16954. const nodeType = node.type;
  16955. if (nodeType === "TSTypeLiteral") {
  16956. if (typeof opts === "undefined") {
  16957. return true;
  16958. } else {
  16959. return (0, _shallowEqual.default)(node, opts);
  16960. }
  16961. }
  16962. return false;
  16963. }
  16964. function isTSArrayType(node, opts) {
  16965. if (!node)
  16966. return false;
  16967. const nodeType = node.type;
  16968. if (nodeType === "TSArrayType") {
  16969. if (typeof opts === "undefined") {
  16970. return true;
  16971. } else {
  16972. return (0, _shallowEqual.default)(node, opts);
  16973. }
  16974. }
  16975. return false;
  16976. }
  16977. function isTSTupleType(node, opts) {
  16978. if (!node)
  16979. return false;
  16980. const nodeType = node.type;
  16981. if (nodeType === "TSTupleType") {
  16982. if (typeof opts === "undefined") {
  16983. return true;
  16984. } else {
  16985. return (0, _shallowEqual.default)(node, opts);
  16986. }
  16987. }
  16988. return false;
  16989. }
  16990. function isTSOptionalType(node, opts) {
  16991. if (!node)
  16992. return false;
  16993. const nodeType = node.type;
  16994. if (nodeType === "TSOptionalType") {
  16995. if (typeof opts === "undefined") {
  16996. return true;
  16997. } else {
  16998. return (0, _shallowEqual.default)(node, opts);
  16999. }
  17000. }
  17001. return false;
  17002. }
  17003. function isTSRestType(node, opts) {
  17004. if (!node)
  17005. return false;
  17006. const nodeType = node.type;
  17007. if (nodeType === "TSRestType") {
  17008. if (typeof opts === "undefined") {
  17009. return true;
  17010. } else {
  17011. return (0, _shallowEqual.default)(node, opts);
  17012. }
  17013. }
  17014. return false;
  17015. }
  17016. function isTSNamedTupleMember(node, opts) {
  17017. if (!node)
  17018. return false;
  17019. const nodeType = node.type;
  17020. if (nodeType === "TSNamedTupleMember") {
  17021. if (typeof opts === "undefined") {
  17022. return true;
  17023. } else {
  17024. return (0, _shallowEqual.default)(node, opts);
  17025. }
  17026. }
  17027. return false;
  17028. }
  17029. function isTSUnionType(node, opts) {
  17030. if (!node)
  17031. return false;
  17032. const nodeType = node.type;
  17033. if (nodeType === "TSUnionType") {
  17034. if (typeof opts === "undefined") {
  17035. return true;
  17036. } else {
  17037. return (0, _shallowEqual.default)(node, opts);
  17038. }
  17039. }
  17040. return false;
  17041. }
  17042. function isTSIntersectionType(node, opts) {
  17043. if (!node)
  17044. return false;
  17045. const nodeType = node.type;
  17046. if (nodeType === "TSIntersectionType") {
  17047. if (typeof opts === "undefined") {
  17048. return true;
  17049. } else {
  17050. return (0, _shallowEqual.default)(node, opts);
  17051. }
  17052. }
  17053. return false;
  17054. }
  17055. function isTSConditionalType(node, opts) {
  17056. if (!node)
  17057. return false;
  17058. const nodeType = node.type;
  17059. if (nodeType === "TSConditionalType") {
  17060. if (typeof opts === "undefined") {
  17061. return true;
  17062. } else {
  17063. return (0, _shallowEqual.default)(node, opts);
  17064. }
  17065. }
  17066. return false;
  17067. }
  17068. function isTSInferType(node, opts) {
  17069. if (!node)
  17070. return false;
  17071. const nodeType = node.type;
  17072. if (nodeType === "TSInferType") {
  17073. if (typeof opts === "undefined") {
  17074. return true;
  17075. } else {
  17076. return (0, _shallowEqual.default)(node, opts);
  17077. }
  17078. }
  17079. return false;
  17080. }
  17081. function isTSParenthesizedType(node, opts) {
  17082. if (!node)
  17083. return false;
  17084. const nodeType = node.type;
  17085. if (nodeType === "TSParenthesizedType") {
  17086. if (typeof opts === "undefined") {
  17087. return true;
  17088. } else {
  17089. return (0, _shallowEqual.default)(node, opts);
  17090. }
  17091. }
  17092. return false;
  17093. }
  17094. function isTSTypeOperator(node, opts) {
  17095. if (!node)
  17096. return false;
  17097. const nodeType = node.type;
  17098. if (nodeType === "TSTypeOperator") {
  17099. if (typeof opts === "undefined") {
  17100. return true;
  17101. } else {
  17102. return (0, _shallowEqual.default)(node, opts);
  17103. }
  17104. }
  17105. return false;
  17106. }
  17107. function isTSIndexedAccessType(node, opts) {
  17108. if (!node)
  17109. return false;
  17110. const nodeType = node.type;
  17111. if (nodeType === "TSIndexedAccessType") {
  17112. if (typeof opts === "undefined") {
  17113. return true;
  17114. } else {
  17115. return (0, _shallowEqual.default)(node, opts);
  17116. }
  17117. }
  17118. return false;
  17119. }
  17120. function isTSMappedType(node, opts) {
  17121. if (!node)
  17122. return false;
  17123. const nodeType = node.type;
  17124. if (nodeType === "TSMappedType") {
  17125. if (typeof opts === "undefined") {
  17126. return true;
  17127. } else {
  17128. return (0, _shallowEqual.default)(node, opts);
  17129. }
  17130. }
  17131. return false;
  17132. }
  17133. function isTSLiteralType(node, opts) {
  17134. if (!node)
  17135. return false;
  17136. const nodeType = node.type;
  17137. if (nodeType === "TSLiteralType") {
  17138. if (typeof opts === "undefined") {
  17139. return true;
  17140. } else {
  17141. return (0, _shallowEqual.default)(node, opts);
  17142. }
  17143. }
  17144. return false;
  17145. }
  17146. function isTSExpressionWithTypeArguments(node, opts) {
  17147. if (!node)
  17148. return false;
  17149. const nodeType = node.type;
  17150. if (nodeType === "TSExpressionWithTypeArguments") {
  17151. if (typeof opts === "undefined") {
  17152. return true;
  17153. } else {
  17154. return (0, _shallowEqual.default)(node, opts);
  17155. }
  17156. }
  17157. return false;
  17158. }
  17159. function isTSInterfaceDeclaration(node, opts) {
  17160. if (!node)
  17161. return false;
  17162. const nodeType = node.type;
  17163. if (nodeType === "TSInterfaceDeclaration") {
  17164. if (typeof opts === "undefined") {
  17165. return true;
  17166. } else {
  17167. return (0, _shallowEqual.default)(node, opts);
  17168. }
  17169. }
  17170. return false;
  17171. }
  17172. function isTSInterfaceBody(node, opts) {
  17173. if (!node)
  17174. return false;
  17175. const nodeType = node.type;
  17176. if (nodeType === "TSInterfaceBody") {
  17177. if (typeof opts === "undefined") {
  17178. return true;
  17179. } else {
  17180. return (0, _shallowEqual.default)(node, opts);
  17181. }
  17182. }
  17183. return false;
  17184. }
  17185. function isTSTypeAliasDeclaration(node, opts) {
  17186. if (!node)
  17187. return false;
  17188. const nodeType = node.type;
  17189. if (nodeType === "TSTypeAliasDeclaration") {
  17190. if (typeof opts === "undefined") {
  17191. return true;
  17192. } else {
  17193. return (0, _shallowEqual.default)(node, opts);
  17194. }
  17195. }
  17196. return false;
  17197. }
  17198. function isTSAsExpression(node, opts) {
  17199. if (!node)
  17200. return false;
  17201. const nodeType = node.type;
  17202. if (nodeType === "TSAsExpression") {
  17203. if (typeof opts === "undefined") {
  17204. return true;
  17205. } else {
  17206. return (0, _shallowEqual.default)(node, opts);
  17207. }
  17208. }
  17209. return false;
  17210. }
  17211. function isTSTypeAssertion(node, opts) {
  17212. if (!node)
  17213. return false;
  17214. const nodeType = node.type;
  17215. if (nodeType === "TSTypeAssertion") {
  17216. if (typeof opts === "undefined") {
  17217. return true;
  17218. } else {
  17219. return (0, _shallowEqual.default)(node, opts);
  17220. }
  17221. }
  17222. return false;
  17223. }
  17224. function isTSEnumDeclaration(node, opts) {
  17225. if (!node)
  17226. return false;
  17227. const nodeType = node.type;
  17228. if (nodeType === "TSEnumDeclaration") {
  17229. if (typeof opts === "undefined") {
  17230. return true;
  17231. } else {
  17232. return (0, _shallowEqual.default)(node, opts);
  17233. }
  17234. }
  17235. return false;
  17236. }
  17237. function isTSEnumMember(node, opts) {
  17238. if (!node)
  17239. return false;
  17240. const nodeType = node.type;
  17241. if (nodeType === "TSEnumMember") {
  17242. if (typeof opts === "undefined") {
  17243. return true;
  17244. } else {
  17245. return (0, _shallowEqual.default)(node, opts);
  17246. }
  17247. }
  17248. return false;
  17249. }
  17250. function isTSModuleDeclaration(node, opts) {
  17251. if (!node)
  17252. return false;
  17253. const nodeType = node.type;
  17254. if (nodeType === "TSModuleDeclaration") {
  17255. if (typeof opts === "undefined") {
  17256. return true;
  17257. } else {
  17258. return (0, _shallowEqual.default)(node, opts);
  17259. }
  17260. }
  17261. return false;
  17262. }
  17263. function isTSModuleBlock(node, opts) {
  17264. if (!node)
  17265. return false;
  17266. const nodeType = node.type;
  17267. if (nodeType === "TSModuleBlock") {
  17268. if (typeof opts === "undefined") {
  17269. return true;
  17270. } else {
  17271. return (0, _shallowEqual.default)(node, opts);
  17272. }
  17273. }
  17274. return false;
  17275. }
  17276. function isTSImportType(node, opts) {
  17277. if (!node)
  17278. return false;
  17279. const nodeType = node.type;
  17280. if (nodeType === "TSImportType") {
  17281. if (typeof opts === "undefined") {
  17282. return true;
  17283. } else {
  17284. return (0, _shallowEqual.default)(node, opts);
  17285. }
  17286. }
  17287. return false;
  17288. }
  17289. function isTSImportEqualsDeclaration(node, opts) {
  17290. if (!node)
  17291. return false;
  17292. const nodeType = node.type;
  17293. if (nodeType === "TSImportEqualsDeclaration") {
  17294. if (typeof opts === "undefined") {
  17295. return true;
  17296. } else {
  17297. return (0, _shallowEqual.default)(node, opts);
  17298. }
  17299. }
  17300. return false;
  17301. }
  17302. function isTSExternalModuleReference(node, opts) {
  17303. if (!node)
  17304. return false;
  17305. const nodeType = node.type;
  17306. if (nodeType === "TSExternalModuleReference") {
  17307. if (typeof opts === "undefined") {
  17308. return true;
  17309. } else {
  17310. return (0, _shallowEqual.default)(node, opts);
  17311. }
  17312. }
  17313. return false;
  17314. }
  17315. function isTSNonNullExpression(node, opts) {
  17316. if (!node)
  17317. return false;
  17318. const nodeType = node.type;
  17319. if (nodeType === "TSNonNullExpression") {
  17320. if (typeof opts === "undefined") {
  17321. return true;
  17322. } else {
  17323. return (0, _shallowEqual.default)(node, opts);
  17324. }
  17325. }
  17326. return false;
  17327. }
  17328. function isTSExportAssignment(node, opts) {
  17329. if (!node)
  17330. return false;
  17331. const nodeType = node.type;
  17332. if (nodeType === "TSExportAssignment") {
  17333. if (typeof opts === "undefined") {
  17334. return true;
  17335. } else {
  17336. return (0, _shallowEqual.default)(node, opts);
  17337. }
  17338. }
  17339. return false;
  17340. }
  17341. function isTSNamespaceExportDeclaration(node, opts) {
  17342. if (!node)
  17343. return false;
  17344. const nodeType = node.type;
  17345. if (nodeType === "TSNamespaceExportDeclaration") {
  17346. if (typeof opts === "undefined") {
  17347. return true;
  17348. } else {
  17349. return (0, _shallowEqual.default)(node, opts);
  17350. }
  17351. }
  17352. return false;
  17353. }
  17354. function isTSTypeAnnotation(node, opts) {
  17355. if (!node)
  17356. return false;
  17357. const nodeType = node.type;
  17358. if (nodeType === "TSTypeAnnotation") {
  17359. if (typeof opts === "undefined") {
  17360. return true;
  17361. } else {
  17362. return (0, _shallowEqual.default)(node, opts);
  17363. }
  17364. }
  17365. return false;
  17366. }
  17367. function isTSTypeParameterInstantiation(node, opts) {
  17368. if (!node)
  17369. return false;
  17370. const nodeType = node.type;
  17371. if (nodeType === "TSTypeParameterInstantiation") {
  17372. if (typeof opts === "undefined") {
  17373. return true;
  17374. } else {
  17375. return (0, _shallowEqual.default)(node, opts);
  17376. }
  17377. }
  17378. return false;
  17379. }
  17380. function isTSTypeParameterDeclaration(node, opts) {
  17381. if (!node)
  17382. return false;
  17383. const nodeType = node.type;
  17384. if (nodeType === "TSTypeParameterDeclaration") {
  17385. if (typeof opts === "undefined") {
  17386. return true;
  17387. } else {
  17388. return (0, _shallowEqual.default)(node, opts);
  17389. }
  17390. }
  17391. return false;
  17392. }
  17393. function isTSTypeParameter(node, opts) {
  17394. if (!node)
  17395. return false;
  17396. const nodeType = node.type;
  17397. if (nodeType === "TSTypeParameter") {
  17398. if (typeof opts === "undefined") {
  17399. return true;
  17400. } else {
  17401. return (0, _shallowEqual.default)(node, opts);
  17402. }
  17403. }
  17404. return false;
  17405. }
  17406. function isExpression(node, opts) {
  17407. if (!node)
  17408. return false;
  17409. const nodeType = node.type;
  17410. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  17411. if (typeof opts === "undefined") {
  17412. return true;
  17413. } else {
  17414. return (0, _shallowEqual.default)(node, opts);
  17415. }
  17416. }
  17417. return false;
  17418. }
  17419. function isBinary(node, opts) {
  17420. if (!node)
  17421. return false;
  17422. const nodeType = node.type;
  17423. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  17424. if (typeof opts === "undefined") {
  17425. return true;
  17426. } else {
  17427. return (0, _shallowEqual.default)(node, opts);
  17428. }
  17429. }
  17430. return false;
  17431. }
  17432. function isScopable(node, opts) {
  17433. if (!node)
  17434. return false;
  17435. const nodeType = node.type;
  17436. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  17437. if (typeof opts === "undefined") {
  17438. return true;
  17439. } else {
  17440. return (0, _shallowEqual.default)(node, opts);
  17441. }
  17442. }
  17443. return false;
  17444. }
  17445. function isBlockParent(node, opts) {
  17446. if (!node)
  17447. return false;
  17448. const nodeType = node.type;
  17449. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  17450. if (typeof opts === "undefined") {
  17451. return true;
  17452. } else {
  17453. return (0, _shallowEqual.default)(node, opts);
  17454. }
  17455. }
  17456. return false;
  17457. }
  17458. function isBlock(node, opts) {
  17459. if (!node)
  17460. return false;
  17461. const nodeType = node.type;
  17462. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  17463. if (typeof opts === "undefined") {
  17464. return true;
  17465. } else {
  17466. return (0, _shallowEqual.default)(node, opts);
  17467. }
  17468. }
  17469. return false;
  17470. }
  17471. function isStatement(node, opts) {
  17472. if (!node)
  17473. return false;
  17474. const nodeType = node.type;
  17475. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  17476. if (typeof opts === "undefined") {
  17477. return true;
  17478. } else {
  17479. return (0, _shallowEqual.default)(node, opts);
  17480. }
  17481. }
  17482. return false;
  17483. }
  17484. function isTerminatorless(node, opts) {
  17485. if (!node)
  17486. return false;
  17487. const nodeType = node.type;
  17488. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  17489. if (typeof opts === "undefined") {
  17490. return true;
  17491. } else {
  17492. return (0, _shallowEqual.default)(node, opts);
  17493. }
  17494. }
  17495. return false;
  17496. }
  17497. function isCompletionStatement(node, opts) {
  17498. if (!node)
  17499. return false;
  17500. const nodeType = node.type;
  17501. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  17502. if (typeof opts === "undefined") {
  17503. return true;
  17504. } else {
  17505. return (0, _shallowEqual.default)(node, opts);
  17506. }
  17507. }
  17508. return false;
  17509. }
  17510. function isConditional(node, opts) {
  17511. if (!node)
  17512. return false;
  17513. const nodeType = node.type;
  17514. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  17515. if (typeof opts === "undefined") {
  17516. return true;
  17517. } else {
  17518. return (0, _shallowEqual.default)(node, opts);
  17519. }
  17520. }
  17521. return false;
  17522. }
  17523. function isLoop(node, opts) {
  17524. if (!node)
  17525. return false;
  17526. const nodeType = node.type;
  17527. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  17528. if (typeof opts === "undefined") {
  17529. return true;
  17530. } else {
  17531. return (0, _shallowEqual.default)(node, opts);
  17532. }
  17533. }
  17534. return false;
  17535. }
  17536. function isWhile(node, opts) {
  17537. if (!node)
  17538. return false;
  17539. const nodeType = node.type;
  17540. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  17541. if (typeof opts === "undefined") {
  17542. return true;
  17543. } else {
  17544. return (0, _shallowEqual.default)(node, opts);
  17545. }
  17546. }
  17547. return false;
  17548. }
  17549. function isExpressionWrapper(node, opts) {
  17550. if (!node)
  17551. return false;
  17552. const nodeType = node.type;
  17553. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  17554. if (typeof opts === "undefined") {
  17555. return true;
  17556. } else {
  17557. return (0, _shallowEqual.default)(node, opts);
  17558. }
  17559. }
  17560. return false;
  17561. }
  17562. function isFor(node, opts) {
  17563. if (!node)
  17564. return false;
  17565. const nodeType = node.type;
  17566. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  17567. if (typeof opts === "undefined") {
  17568. return true;
  17569. } else {
  17570. return (0, _shallowEqual.default)(node, opts);
  17571. }
  17572. }
  17573. return false;
  17574. }
  17575. function isForXStatement(node, opts) {
  17576. if (!node)
  17577. return false;
  17578. const nodeType = node.type;
  17579. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  17580. if (typeof opts === "undefined") {
  17581. return true;
  17582. } else {
  17583. return (0, _shallowEqual.default)(node, opts);
  17584. }
  17585. }
  17586. return false;
  17587. }
  17588. function isFunction(node, opts) {
  17589. if (!node)
  17590. return false;
  17591. const nodeType = node.type;
  17592. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  17593. if (typeof opts === "undefined") {
  17594. return true;
  17595. } else {
  17596. return (0, _shallowEqual.default)(node, opts);
  17597. }
  17598. }
  17599. return false;
  17600. }
  17601. function isFunctionParent(node, opts) {
  17602. if (!node)
  17603. return false;
  17604. const nodeType = node.type;
  17605. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  17606. if (typeof opts === "undefined") {
  17607. return true;
  17608. } else {
  17609. return (0, _shallowEqual.default)(node, opts);
  17610. }
  17611. }
  17612. return false;
  17613. }
  17614. function isPureish(node, opts) {
  17615. if (!node)
  17616. return false;
  17617. const nodeType = node.type;
  17618. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  17619. if (typeof opts === "undefined") {
  17620. return true;
  17621. } else {
  17622. return (0, _shallowEqual.default)(node, opts);
  17623. }
  17624. }
  17625. return false;
  17626. }
  17627. function isDeclaration2(node, opts) {
  17628. if (!node)
  17629. return false;
  17630. const nodeType = node.type;
  17631. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  17632. if (typeof opts === "undefined") {
  17633. return true;
  17634. } else {
  17635. return (0, _shallowEqual.default)(node, opts);
  17636. }
  17637. }
  17638. return false;
  17639. }
  17640. function isPatternLike(node, opts) {
  17641. if (!node)
  17642. return false;
  17643. const nodeType = node.type;
  17644. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  17645. if (typeof opts === "undefined") {
  17646. return true;
  17647. } else {
  17648. return (0, _shallowEqual.default)(node, opts);
  17649. }
  17650. }
  17651. return false;
  17652. }
  17653. function isLVal(node, opts) {
  17654. if (!node)
  17655. return false;
  17656. const nodeType = node.type;
  17657. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  17658. if (typeof opts === "undefined") {
  17659. return true;
  17660. } else {
  17661. return (0, _shallowEqual.default)(node, opts);
  17662. }
  17663. }
  17664. return false;
  17665. }
  17666. function isTSEntityName(node, opts) {
  17667. if (!node)
  17668. return false;
  17669. const nodeType = node.type;
  17670. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  17671. if (typeof opts === "undefined") {
  17672. return true;
  17673. } else {
  17674. return (0, _shallowEqual.default)(node, opts);
  17675. }
  17676. }
  17677. return false;
  17678. }
  17679. function isLiteral(node, opts) {
  17680. if (!node)
  17681. return false;
  17682. const nodeType = node.type;
  17683. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  17684. if (typeof opts === "undefined") {
  17685. return true;
  17686. } else {
  17687. return (0, _shallowEqual.default)(node, opts);
  17688. }
  17689. }
  17690. return false;
  17691. }
  17692. function isImmutable(node, opts) {
  17693. if (!node)
  17694. return false;
  17695. const nodeType = node.type;
  17696. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  17697. if (typeof opts === "undefined") {
  17698. return true;
  17699. } else {
  17700. return (0, _shallowEqual.default)(node, opts);
  17701. }
  17702. }
  17703. return false;
  17704. }
  17705. function isUserWhitespacable(node, opts) {
  17706. if (!node)
  17707. return false;
  17708. const nodeType = node.type;
  17709. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  17710. if (typeof opts === "undefined") {
  17711. return true;
  17712. } else {
  17713. return (0, _shallowEqual.default)(node, opts);
  17714. }
  17715. }
  17716. return false;
  17717. }
  17718. function isMethod(node, opts) {
  17719. if (!node)
  17720. return false;
  17721. const nodeType = node.type;
  17722. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  17723. if (typeof opts === "undefined") {
  17724. return true;
  17725. } else {
  17726. return (0, _shallowEqual.default)(node, opts);
  17727. }
  17728. }
  17729. return false;
  17730. }
  17731. function isObjectMember(node, opts) {
  17732. if (!node)
  17733. return false;
  17734. const nodeType = node.type;
  17735. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  17736. if (typeof opts === "undefined") {
  17737. return true;
  17738. } else {
  17739. return (0, _shallowEqual.default)(node, opts);
  17740. }
  17741. }
  17742. return false;
  17743. }
  17744. function isProperty(node, opts) {
  17745. if (!node)
  17746. return false;
  17747. const nodeType = node.type;
  17748. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  17749. if (typeof opts === "undefined") {
  17750. return true;
  17751. } else {
  17752. return (0, _shallowEqual.default)(node, opts);
  17753. }
  17754. }
  17755. return false;
  17756. }
  17757. function isUnaryLike(node, opts) {
  17758. if (!node)
  17759. return false;
  17760. const nodeType = node.type;
  17761. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  17762. if (typeof opts === "undefined") {
  17763. return true;
  17764. } else {
  17765. return (0, _shallowEqual.default)(node, opts);
  17766. }
  17767. }
  17768. return false;
  17769. }
  17770. function isPattern(node, opts) {
  17771. if (!node)
  17772. return false;
  17773. const nodeType = node.type;
  17774. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  17775. if (typeof opts === "undefined") {
  17776. return true;
  17777. } else {
  17778. return (0, _shallowEqual.default)(node, opts);
  17779. }
  17780. }
  17781. return false;
  17782. }
  17783. function isClass(node, opts) {
  17784. if (!node)
  17785. return false;
  17786. const nodeType = node.type;
  17787. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  17788. if (typeof opts === "undefined") {
  17789. return true;
  17790. } else {
  17791. return (0, _shallowEqual.default)(node, opts);
  17792. }
  17793. }
  17794. return false;
  17795. }
  17796. function isModuleDeclaration(node, opts) {
  17797. if (!node)
  17798. return false;
  17799. const nodeType = node.type;
  17800. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  17801. if (typeof opts === "undefined") {
  17802. return true;
  17803. } else {
  17804. return (0, _shallowEqual.default)(node, opts);
  17805. }
  17806. }
  17807. return false;
  17808. }
  17809. function isExportDeclaration(node, opts) {
  17810. if (!node)
  17811. return false;
  17812. const nodeType = node.type;
  17813. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  17814. if (typeof opts === "undefined") {
  17815. return true;
  17816. } else {
  17817. return (0, _shallowEqual.default)(node, opts);
  17818. }
  17819. }
  17820. return false;
  17821. }
  17822. function isModuleSpecifier(node, opts) {
  17823. if (!node)
  17824. return false;
  17825. const nodeType = node.type;
  17826. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  17827. if (typeof opts === "undefined") {
  17828. return true;
  17829. } else {
  17830. return (0, _shallowEqual.default)(node, opts);
  17831. }
  17832. }
  17833. return false;
  17834. }
  17835. function isFlow(node, opts) {
  17836. if (!node)
  17837. return false;
  17838. const nodeType = node.type;
  17839. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  17840. if (typeof opts === "undefined") {
  17841. return true;
  17842. } else {
  17843. return (0, _shallowEqual.default)(node, opts);
  17844. }
  17845. }
  17846. return false;
  17847. }
  17848. function isFlowType(node, opts) {
  17849. if (!node)
  17850. return false;
  17851. const nodeType = node.type;
  17852. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  17853. if (typeof opts === "undefined") {
  17854. return true;
  17855. } else {
  17856. return (0, _shallowEqual.default)(node, opts);
  17857. }
  17858. }
  17859. return false;
  17860. }
  17861. function isFlowBaseAnnotation(node, opts) {
  17862. if (!node)
  17863. return false;
  17864. const nodeType = node.type;
  17865. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  17866. if (typeof opts === "undefined") {
  17867. return true;
  17868. } else {
  17869. return (0, _shallowEqual.default)(node, opts);
  17870. }
  17871. }
  17872. return false;
  17873. }
  17874. function isFlowDeclaration(node, opts) {
  17875. if (!node)
  17876. return false;
  17877. const nodeType = node.type;
  17878. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  17879. if (typeof opts === "undefined") {
  17880. return true;
  17881. } else {
  17882. return (0, _shallowEqual.default)(node, opts);
  17883. }
  17884. }
  17885. return false;
  17886. }
  17887. function isFlowPredicate(node, opts) {
  17888. if (!node)
  17889. return false;
  17890. const nodeType = node.type;
  17891. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  17892. if (typeof opts === "undefined") {
  17893. return true;
  17894. } else {
  17895. return (0, _shallowEqual.default)(node, opts);
  17896. }
  17897. }
  17898. return false;
  17899. }
  17900. function isEnumBody(node, opts) {
  17901. if (!node)
  17902. return false;
  17903. const nodeType = node.type;
  17904. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  17905. if (typeof opts === "undefined") {
  17906. return true;
  17907. } else {
  17908. return (0, _shallowEqual.default)(node, opts);
  17909. }
  17910. }
  17911. return false;
  17912. }
  17913. function isEnumMember(node, opts) {
  17914. if (!node)
  17915. return false;
  17916. const nodeType = node.type;
  17917. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  17918. if (typeof opts === "undefined") {
  17919. return true;
  17920. } else {
  17921. return (0, _shallowEqual.default)(node, opts);
  17922. }
  17923. }
  17924. return false;
  17925. }
  17926. function isJSX(node, opts) {
  17927. if (!node)
  17928. return false;
  17929. const nodeType = node.type;
  17930. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  17931. if (typeof opts === "undefined") {
  17932. return true;
  17933. } else {
  17934. return (0, _shallowEqual.default)(node, opts);
  17935. }
  17936. }
  17937. return false;
  17938. }
  17939. function isPrivate(node, opts) {
  17940. if (!node)
  17941. return false;
  17942. const nodeType = node.type;
  17943. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  17944. if (typeof opts === "undefined") {
  17945. return true;
  17946. } else {
  17947. return (0, _shallowEqual.default)(node, opts);
  17948. }
  17949. }
  17950. return false;
  17951. }
  17952. function isTSTypeElement(node, opts) {
  17953. if (!node)
  17954. return false;
  17955. const nodeType = node.type;
  17956. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  17957. if (typeof opts === "undefined") {
  17958. return true;
  17959. } else {
  17960. return (0, _shallowEqual.default)(node, opts);
  17961. }
  17962. }
  17963. return false;
  17964. }
  17965. function isTSType(node, opts) {
  17966. if (!node)
  17967. return false;
  17968. const nodeType = node.type;
  17969. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  17970. if (typeof opts === "undefined") {
  17971. return true;
  17972. } else {
  17973. return (0, _shallowEqual.default)(node, opts);
  17974. }
  17975. }
  17976. return false;
  17977. }
  17978. function isTSBaseType(node, opts) {
  17979. if (!node)
  17980. return false;
  17981. const nodeType = node.type;
  17982. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  17983. if (typeof opts === "undefined") {
  17984. return true;
  17985. } else {
  17986. return (0, _shallowEqual.default)(node, opts);
  17987. }
  17988. }
  17989. return false;
  17990. }
  17991. function isNumberLiteral(node, opts) {
  17992. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  17993. if (!node)
  17994. return false;
  17995. const nodeType = node.type;
  17996. if (nodeType === "NumberLiteral") {
  17997. if (typeof opts === "undefined") {
  17998. return true;
  17999. } else {
  18000. return (0, _shallowEqual.default)(node, opts);
  18001. }
  18002. }
  18003. return false;
  18004. }
  18005. function isRegexLiteral(node, opts) {
  18006. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  18007. if (!node)
  18008. return false;
  18009. const nodeType = node.type;
  18010. if (nodeType === "RegexLiteral") {
  18011. if (typeof opts === "undefined") {
  18012. return true;
  18013. } else {
  18014. return (0, _shallowEqual.default)(node, opts);
  18015. }
  18016. }
  18017. return false;
  18018. }
  18019. function isRestProperty(node, opts) {
  18020. console.trace("The node type RestProperty has been renamed to RestElement");
  18021. if (!node)
  18022. return false;
  18023. const nodeType = node.type;
  18024. if (nodeType === "RestProperty") {
  18025. if (typeof opts === "undefined") {
  18026. return true;
  18027. } else {
  18028. return (0, _shallowEqual.default)(node, opts);
  18029. }
  18030. }
  18031. return false;
  18032. }
  18033. function isSpreadProperty(node, opts) {
  18034. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  18035. if (!node)
  18036. return false;
  18037. const nodeType = node.type;
  18038. if (nodeType === "SpreadProperty") {
  18039. if (typeof opts === "undefined") {
  18040. return true;
  18041. } else {
  18042. return (0, _shallowEqual.default)(node, opts);
  18043. }
  18044. }
  18045. return false;
  18046. }
  18047. }
  18048. });
  18049. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/matchesPattern.js
  18050. var require_matchesPattern2 = __commonJS({
  18051. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  18052. "use strict";
  18053. Object.defineProperty(exports, "__esModule", {
  18054. value: true
  18055. });
  18056. exports.default = matchesPattern;
  18057. var _generated = require_generated6();
  18058. function matchesPattern(member, match, allowPartial) {
  18059. if (!(0, _generated.isMemberExpression)(member))
  18060. return false;
  18061. const parts = Array.isArray(match) ? match : match.split(".");
  18062. const nodes = [];
  18063. let node;
  18064. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  18065. nodes.push(node.property);
  18066. }
  18067. nodes.push(node);
  18068. if (nodes.length < parts.length)
  18069. return false;
  18070. if (!allowPartial && nodes.length > parts.length)
  18071. return false;
  18072. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  18073. const node2 = nodes[j];
  18074. let value;
  18075. if ((0, _generated.isIdentifier)(node2)) {
  18076. value = node2.name;
  18077. } else if ((0, _generated.isStringLiteral)(node2)) {
  18078. value = node2.value;
  18079. } else if ((0, _generated.isThisExpression)(node2)) {
  18080. value = "this";
  18081. } else {
  18082. return false;
  18083. }
  18084. if (parts[i] !== value)
  18085. return false;
  18086. }
  18087. return true;
  18088. }
  18089. }
  18090. });
  18091. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  18092. var require_buildMatchMemberExpression2 = __commonJS({
  18093. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  18094. "use strict";
  18095. Object.defineProperty(exports, "__esModule", {
  18096. value: true
  18097. });
  18098. exports.default = buildMatchMemberExpression;
  18099. var _matchesPattern = require_matchesPattern2();
  18100. function buildMatchMemberExpression(match, allowPartial) {
  18101. const parts = match.split(".");
  18102. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  18103. }
  18104. }
  18105. });
  18106. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  18107. var require_isReactComponent2 = __commonJS({
  18108. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  18109. "use strict";
  18110. Object.defineProperty(exports, "__esModule", {
  18111. value: true
  18112. });
  18113. exports.default = void 0;
  18114. var _buildMatchMemberExpression = require_buildMatchMemberExpression2();
  18115. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  18116. var _default = isReactComponent;
  18117. exports.default = _default;
  18118. }
  18119. });
  18120. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  18121. var require_isCompatTag2 = __commonJS({
  18122. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  18123. "use strict";
  18124. Object.defineProperty(exports, "__esModule", {
  18125. value: true
  18126. });
  18127. exports.default = isCompatTag;
  18128. function isCompatTag(tagName) {
  18129. return !!tagName && /^[a-z]/.test(tagName);
  18130. }
  18131. }
  18132. });
  18133. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isType.js
  18134. var require_isType2 = __commonJS({
  18135. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  18136. "use strict";
  18137. Object.defineProperty(exports, "__esModule", {
  18138. value: true
  18139. });
  18140. exports.default = isType;
  18141. var _definitions = require_definitions2();
  18142. function isType(nodeType, targetType) {
  18143. if (nodeType === targetType)
  18144. return true;
  18145. if (_definitions.ALIAS_KEYS[targetType])
  18146. return false;
  18147. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  18148. if (aliases) {
  18149. if (aliases[0] === nodeType)
  18150. return true;
  18151. for (const alias of aliases) {
  18152. if (nodeType === alias)
  18153. return true;
  18154. }
  18155. }
  18156. return false;
  18157. }
  18158. }
  18159. });
  18160. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  18161. var require_isPlaceholderType2 = __commonJS({
  18162. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  18163. "use strict";
  18164. Object.defineProperty(exports, "__esModule", {
  18165. value: true
  18166. });
  18167. exports.default = isPlaceholderType;
  18168. var _definitions = require_definitions2();
  18169. function isPlaceholderType(placeholderType, targetType) {
  18170. if (placeholderType === targetType)
  18171. return true;
  18172. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  18173. if (aliases) {
  18174. for (const alias of aliases) {
  18175. if (targetType === alias)
  18176. return true;
  18177. }
  18178. }
  18179. return false;
  18180. }
  18181. }
  18182. });
  18183. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/is.js
  18184. var require_is2 = __commonJS({
  18185. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/is.js"(exports) {
  18186. "use strict";
  18187. Object.defineProperty(exports, "__esModule", {
  18188. value: true
  18189. });
  18190. exports.default = is;
  18191. var _shallowEqual = require_shallowEqual2();
  18192. var _isType = require_isType2();
  18193. var _isPlaceholderType = require_isPlaceholderType2();
  18194. var _definitions = require_definitions2();
  18195. function is(type, node, opts) {
  18196. if (!node)
  18197. return false;
  18198. const matches = (0, _isType.default)(node.type, type);
  18199. if (!matches) {
  18200. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  18201. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  18202. }
  18203. return false;
  18204. }
  18205. if (typeof opts === "undefined") {
  18206. return true;
  18207. } else {
  18208. return (0, _shallowEqual.default)(node, opts);
  18209. }
  18210. }
  18211. }
  18212. });
  18213. // node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  18214. var require_identifier2 = __commonJS({
  18215. "node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  18216. "use strict";
  18217. Object.defineProperty(exports, "__esModule", {
  18218. value: true
  18219. });
  18220. exports.isIdentifierStart = isIdentifierStart2;
  18221. exports.isIdentifierChar = isIdentifierChar2;
  18222. exports.isIdentifierName = isIdentifierName;
  18223. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  18224. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  18225. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  18226. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  18227. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  18228. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  18229. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  18230. function isInAstralSet2(code2, set) {
  18231. let pos = 65536;
  18232. for (let i = 0, length = set.length; i < length; i += 2) {
  18233. pos += set[i];
  18234. if (pos > code2)
  18235. return false;
  18236. pos += set[i + 1];
  18237. if (pos >= code2)
  18238. return true;
  18239. }
  18240. return false;
  18241. }
  18242. function isIdentifierStart2(code2) {
  18243. if (code2 < 65)
  18244. return code2 === 36;
  18245. if (code2 <= 90)
  18246. return true;
  18247. if (code2 < 97)
  18248. return code2 === 95;
  18249. if (code2 <= 122)
  18250. return true;
  18251. if (code2 <= 65535) {
  18252. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  18253. }
  18254. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  18255. }
  18256. function isIdentifierChar2(code2) {
  18257. if (code2 < 48)
  18258. return code2 === 36;
  18259. if (code2 < 58)
  18260. return true;
  18261. if (code2 < 65)
  18262. return false;
  18263. if (code2 <= 90)
  18264. return true;
  18265. if (code2 < 97)
  18266. return code2 === 95;
  18267. if (code2 <= 122)
  18268. return true;
  18269. if (code2 <= 65535) {
  18270. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  18271. }
  18272. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  18273. }
  18274. function isIdentifierName(name2) {
  18275. let isFirst = true;
  18276. for (let i = 0; i < name2.length; i++) {
  18277. let cp = name2.charCodeAt(i);
  18278. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  18279. const trail = name2.charCodeAt(++i);
  18280. if ((trail & 64512) === 56320) {
  18281. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  18282. }
  18283. }
  18284. if (isFirst) {
  18285. isFirst = false;
  18286. if (!isIdentifierStart2(cp)) {
  18287. return false;
  18288. }
  18289. } else if (!isIdentifierChar2(cp)) {
  18290. return false;
  18291. }
  18292. }
  18293. return !isFirst;
  18294. }
  18295. }
  18296. });
  18297. // node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  18298. var require_keyword2 = __commonJS({
  18299. "node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  18300. "use strict";
  18301. Object.defineProperty(exports, "__esModule", {
  18302. value: true
  18303. });
  18304. exports.isReservedWord = isReservedWord;
  18305. exports.isStrictReservedWord = isStrictReservedWord;
  18306. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  18307. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  18308. exports.isKeyword = isKeyword;
  18309. var reservedWords2 = {
  18310. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  18311. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  18312. strictBind: ["eval", "arguments"]
  18313. };
  18314. var keywords2 = new Set(reservedWords2.keyword);
  18315. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  18316. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  18317. function isReservedWord(word, inModule) {
  18318. return inModule && word === "await" || word === "enum";
  18319. }
  18320. function isStrictReservedWord(word, inModule) {
  18321. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  18322. }
  18323. function isStrictBindOnlyReservedWord(word) {
  18324. return reservedWordsStrictBindSet.has(word);
  18325. }
  18326. function isStrictBindReservedWord(word, inModule) {
  18327. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  18328. }
  18329. function isKeyword(word) {
  18330. return keywords2.has(word);
  18331. }
  18332. }
  18333. });
  18334. // node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/index.js
  18335. var require_lib3 = __commonJS({
  18336. "node_modules/estree-to-babel/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  18337. "use strict";
  18338. Object.defineProperty(exports, "__esModule", {
  18339. value: true
  18340. });
  18341. Object.defineProperty(exports, "isIdentifierName", {
  18342. enumerable: true,
  18343. get: function() {
  18344. return _identifier.isIdentifierName;
  18345. }
  18346. });
  18347. Object.defineProperty(exports, "isIdentifierChar", {
  18348. enumerable: true,
  18349. get: function() {
  18350. return _identifier.isIdentifierChar;
  18351. }
  18352. });
  18353. Object.defineProperty(exports, "isIdentifierStart", {
  18354. enumerable: true,
  18355. get: function() {
  18356. return _identifier.isIdentifierStart;
  18357. }
  18358. });
  18359. Object.defineProperty(exports, "isReservedWord", {
  18360. enumerable: true,
  18361. get: function() {
  18362. return _keyword.isReservedWord;
  18363. }
  18364. });
  18365. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  18366. enumerable: true,
  18367. get: function() {
  18368. return _keyword.isStrictBindOnlyReservedWord;
  18369. }
  18370. });
  18371. Object.defineProperty(exports, "isStrictBindReservedWord", {
  18372. enumerable: true,
  18373. get: function() {
  18374. return _keyword.isStrictBindReservedWord;
  18375. }
  18376. });
  18377. Object.defineProperty(exports, "isStrictReservedWord", {
  18378. enumerable: true,
  18379. get: function() {
  18380. return _keyword.isStrictReservedWord;
  18381. }
  18382. });
  18383. Object.defineProperty(exports, "isKeyword", {
  18384. enumerable: true,
  18385. get: function() {
  18386. return _keyword.isKeyword;
  18387. }
  18388. });
  18389. var _identifier = require_identifier2();
  18390. var _keyword = require_keyword2();
  18391. }
  18392. });
  18393. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  18394. var require_isValidIdentifier2 = __commonJS({
  18395. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  18396. "use strict";
  18397. Object.defineProperty(exports, "__esModule", {
  18398. value: true
  18399. });
  18400. exports.default = isValidIdentifier;
  18401. var _helperValidatorIdentifier = require_lib3();
  18402. function isValidIdentifier(name2, reserved = true) {
  18403. if (typeof name2 !== "string")
  18404. return false;
  18405. if (reserved) {
  18406. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  18407. return false;
  18408. }
  18409. }
  18410. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  18411. }
  18412. }
  18413. });
  18414. // node_modules/estree-to-babel/node_modules/@babel/types/lib/constants/index.js
  18415. var require_constants2 = __commonJS({
  18416. "node_modules/estree-to-babel/node_modules/@babel/types/lib/constants/index.js"(exports) {
  18417. "use strict";
  18418. Object.defineProperty(exports, "__esModule", {
  18419. value: true
  18420. });
  18421. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  18422. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  18423. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  18424. var FLATTENABLE_KEYS = ["body", "expressions"];
  18425. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  18426. var FOR_INIT_KEYS = ["left", "init"];
  18427. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  18428. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  18429. exports.COMMENT_KEYS = COMMENT_KEYS;
  18430. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  18431. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  18432. var UPDATE_OPERATORS = ["++", "--"];
  18433. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  18434. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  18435. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  18436. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  18437. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  18438. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  18439. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  18440. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  18441. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  18442. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  18443. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  18444. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  18445. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  18446. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  18447. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  18448. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  18449. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  18450. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  18451. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  18452. var STRING_UNARY_OPERATORS = ["typeof"];
  18453. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  18454. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  18455. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  18456. var INHERIT_KEYS = {
  18457. optional: ["typeAnnotation", "typeParameters", "returnType"],
  18458. force: ["start", "loc", "end"]
  18459. };
  18460. exports.INHERIT_KEYS = INHERIT_KEYS;
  18461. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  18462. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  18463. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  18464. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  18465. }
  18466. });
  18467. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/validate.js
  18468. var require_validate2 = __commonJS({
  18469. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  18470. "use strict";
  18471. Object.defineProperty(exports, "__esModule", {
  18472. value: true
  18473. });
  18474. exports.default = validate;
  18475. exports.validateField = validateField;
  18476. exports.validateChild = validateChild;
  18477. var _definitions = require_definitions2();
  18478. function validate(node, key, val) {
  18479. if (!node)
  18480. return;
  18481. const fields = _definitions.NODE_FIELDS[node.type];
  18482. if (!fields)
  18483. return;
  18484. const field = fields[key];
  18485. validateField(node, key, val, field);
  18486. validateChild(node, key, val);
  18487. }
  18488. function validateField(node, key, val, field) {
  18489. if (!(field != null && field.validate))
  18490. return;
  18491. if (field.optional && val == null)
  18492. return;
  18493. field.validate(node, key, val);
  18494. }
  18495. function validateChild(node, key, val) {
  18496. if (val == null)
  18497. return;
  18498. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  18499. if (!validate2)
  18500. return;
  18501. validate2(node, key, val);
  18502. }
  18503. }
  18504. });
  18505. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/utils.js
  18506. var require_utils2 = __commonJS({
  18507. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  18508. "use strict";
  18509. Object.defineProperty(exports, "__esModule", {
  18510. value: true
  18511. });
  18512. exports.validate = validate;
  18513. exports.typeIs = typeIs;
  18514. exports.validateType = validateType;
  18515. exports.validateOptional = validateOptional;
  18516. exports.validateOptionalType = validateOptionalType;
  18517. exports.arrayOf = arrayOf;
  18518. exports.arrayOfType = arrayOfType;
  18519. exports.validateArrayOfType = validateArrayOfType;
  18520. exports.assertEach = assertEach;
  18521. exports.assertOneOf = assertOneOf;
  18522. exports.assertNodeType = assertNodeType;
  18523. exports.assertNodeOrValueType = assertNodeOrValueType;
  18524. exports.assertValueType = assertValueType;
  18525. exports.assertShape = assertShape;
  18526. exports.assertOptionalChainStart = assertOptionalChainStart;
  18527. exports.chain = chain;
  18528. exports.default = defineType;
  18529. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  18530. var _is = require_is2();
  18531. var _validate = require_validate2();
  18532. var VISITOR_KEYS = {};
  18533. exports.VISITOR_KEYS = VISITOR_KEYS;
  18534. var ALIAS_KEYS = {};
  18535. exports.ALIAS_KEYS = ALIAS_KEYS;
  18536. var FLIPPED_ALIAS_KEYS = {};
  18537. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  18538. var NODE_FIELDS = {};
  18539. exports.NODE_FIELDS = NODE_FIELDS;
  18540. var BUILDER_KEYS = {};
  18541. exports.BUILDER_KEYS = BUILDER_KEYS;
  18542. var DEPRECATED_KEYS = {};
  18543. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  18544. var NODE_PARENT_VALIDATIONS = {};
  18545. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  18546. function getType(val) {
  18547. if (Array.isArray(val)) {
  18548. return "array";
  18549. } else if (val === null) {
  18550. return "null";
  18551. } else {
  18552. return typeof val;
  18553. }
  18554. }
  18555. function validate(validate2) {
  18556. return {
  18557. validate: validate2
  18558. };
  18559. }
  18560. function typeIs(typeName) {
  18561. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  18562. }
  18563. function validateType(typeName) {
  18564. return validate(typeIs(typeName));
  18565. }
  18566. function validateOptional(validate2) {
  18567. return {
  18568. validate: validate2,
  18569. optional: true
  18570. };
  18571. }
  18572. function validateOptionalType(typeName) {
  18573. return {
  18574. validate: typeIs(typeName),
  18575. optional: true
  18576. };
  18577. }
  18578. function arrayOf(elementType) {
  18579. return chain(assertValueType("array"), assertEach(elementType));
  18580. }
  18581. function arrayOfType(typeName) {
  18582. return arrayOf(typeIs(typeName));
  18583. }
  18584. function validateArrayOfType(typeName) {
  18585. return validate(arrayOfType(typeName));
  18586. }
  18587. function assertEach(callback) {
  18588. function validator(node, key, val) {
  18589. if (!Array.isArray(val))
  18590. return;
  18591. for (let i = 0; i < val.length; i++) {
  18592. const subkey = `${key}[${i}]`;
  18593. const v = val[i];
  18594. callback(node, subkey, v);
  18595. if (process.env.BABEL_TYPES_8_BREAKING)
  18596. (0, _validate.validateChild)(node, subkey, v);
  18597. }
  18598. }
  18599. validator.each = callback;
  18600. return validator;
  18601. }
  18602. function assertOneOf(...values) {
  18603. function validate2(node, key, val) {
  18604. if (values.indexOf(val) < 0) {
  18605. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  18606. }
  18607. }
  18608. validate2.oneOf = values;
  18609. return validate2;
  18610. }
  18611. function assertNodeType(...types2) {
  18612. function validate2(node, key, val) {
  18613. for (const type of types2) {
  18614. if ((0, _is.default)(type, val)) {
  18615. (0, _validate.validateChild)(node, key, val);
  18616. return;
  18617. }
  18618. }
  18619. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  18620. }
  18621. validate2.oneOfNodeTypes = types2;
  18622. return validate2;
  18623. }
  18624. function assertNodeOrValueType(...types2) {
  18625. function validate2(node, key, val) {
  18626. for (const type of types2) {
  18627. if (getType(val) === type || (0, _is.default)(type, val)) {
  18628. (0, _validate.validateChild)(node, key, val);
  18629. return;
  18630. }
  18631. }
  18632. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  18633. }
  18634. validate2.oneOfNodeOrValueTypes = types2;
  18635. return validate2;
  18636. }
  18637. function assertValueType(type) {
  18638. function validate2(node, key, val) {
  18639. const valid2 = getType(val) === type;
  18640. if (!valid2) {
  18641. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  18642. }
  18643. }
  18644. validate2.type = type;
  18645. return validate2;
  18646. }
  18647. function assertShape(shape) {
  18648. function validate2(node, key, val) {
  18649. const errors = [];
  18650. for (const property of Object.keys(shape)) {
  18651. try {
  18652. (0, _validate.validateField)(node, property, val[property], shape[property]);
  18653. } catch (error) {
  18654. if (error instanceof TypeError) {
  18655. errors.push(error.message);
  18656. continue;
  18657. }
  18658. throw error;
  18659. }
  18660. }
  18661. if (errors.length) {
  18662. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  18663. ${errors.join("\n")}`);
  18664. }
  18665. }
  18666. validate2.shapeOf = shape;
  18667. return validate2;
  18668. }
  18669. function assertOptionalChainStart() {
  18670. function validate2(node) {
  18671. var _current;
  18672. let current2 = node;
  18673. while (node) {
  18674. const {
  18675. type
  18676. } = current2;
  18677. if (type === "OptionalCallExpression") {
  18678. if (current2.optional)
  18679. return;
  18680. current2 = current2.callee;
  18681. continue;
  18682. }
  18683. if (type === "OptionalMemberExpression") {
  18684. if (current2.optional)
  18685. return;
  18686. current2 = current2.object;
  18687. continue;
  18688. }
  18689. break;
  18690. }
  18691. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  18692. }
  18693. return validate2;
  18694. }
  18695. function chain(...fns) {
  18696. function validate2(...args) {
  18697. for (const fn of fns) {
  18698. fn(...args);
  18699. }
  18700. }
  18701. validate2.chainOf = fns;
  18702. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  18703. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  18704. }
  18705. return validate2;
  18706. }
  18707. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  18708. var validFieldKeys = ["default", "optional", "validate"];
  18709. function defineType(type, opts = {}) {
  18710. const inherits = opts.inherits && store[opts.inherits] || {};
  18711. let fields = opts.fields;
  18712. if (!fields) {
  18713. fields = {};
  18714. if (inherits.fields) {
  18715. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  18716. for (const key of keys2) {
  18717. const field = inherits.fields[key];
  18718. const def = field.default;
  18719. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  18720. throw new Error("field defaults can only be primitives or empty arrays currently");
  18721. }
  18722. fields[key] = {
  18723. default: Array.isArray(def) ? [] : def,
  18724. optional: field.optional,
  18725. validate: field.validate
  18726. };
  18727. }
  18728. }
  18729. }
  18730. const visitor = opts.visitor || inherits.visitor || [];
  18731. const aliases = opts.aliases || inherits.aliases || [];
  18732. const builder = opts.builder || inherits.builder || opts.visitor || [];
  18733. for (const k of Object.keys(opts)) {
  18734. if (validTypeOpts.indexOf(k) === -1) {
  18735. throw new Error(`Unknown type option "${k}" on ${type}`);
  18736. }
  18737. }
  18738. if (opts.deprecatedAlias) {
  18739. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  18740. }
  18741. for (const key of visitor.concat(builder)) {
  18742. fields[key] = fields[key] || {};
  18743. }
  18744. for (const key of Object.keys(fields)) {
  18745. const field = fields[key];
  18746. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  18747. field.optional = true;
  18748. }
  18749. if (field.default === void 0) {
  18750. field.default = null;
  18751. } else if (!field.validate && field.default != null) {
  18752. field.validate = assertValueType(getType(field.default));
  18753. }
  18754. for (const k of Object.keys(field)) {
  18755. if (validFieldKeys.indexOf(k) === -1) {
  18756. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  18757. }
  18758. }
  18759. }
  18760. VISITOR_KEYS[type] = opts.visitor = visitor;
  18761. BUILDER_KEYS[type] = opts.builder = builder;
  18762. NODE_FIELDS[type] = opts.fields = fields;
  18763. ALIAS_KEYS[type] = opts.aliases = aliases;
  18764. aliases.forEach((alias) => {
  18765. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  18766. FLIPPED_ALIAS_KEYS[alias].push(type);
  18767. });
  18768. if (opts.validate) {
  18769. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  18770. }
  18771. store[type] = opts;
  18772. }
  18773. var store = {};
  18774. }
  18775. });
  18776. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/core.js
  18777. var require_core2 = __commonJS({
  18778. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  18779. "use strict";
  18780. Object.defineProperty(exports, "__esModule", {
  18781. value: true
  18782. });
  18783. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  18784. var _is = require_is2();
  18785. var _isValidIdentifier = require_isValidIdentifier2();
  18786. var _helperValidatorIdentifier = require_lib3();
  18787. var _constants = require_constants2();
  18788. var _utils = require_utils2();
  18789. (0, _utils.default)("ArrayExpression", {
  18790. fields: {
  18791. elements: {
  18792. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  18793. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  18794. }
  18795. },
  18796. visitor: ["elements"],
  18797. aliases: ["Expression"]
  18798. });
  18799. (0, _utils.default)("AssignmentExpression", {
  18800. fields: {
  18801. operator: {
  18802. validate: function() {
  18803. if (!process.env.BABEL_TYPES_8_BREAKING) {
  18804. return (0, _utils.assertValueType)("string");
  18805. }
  18806. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  18807. const pattern = (0, _utils.assertOneOf)("=");
  18808. return function(node, key, val) {
  18809. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  18810. validator(node, key, val);
  18811. };
  18812. }()
  18813. },
  18814. left: {
  18815. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  18816. },
  18817. right: {
  18818. validate: (0, _utils.assertNodeType)("Expression")
  18819. }
  18820. },
  18821. builder: ["operator", "left", "right"],
  18822. visitor: ["left", "right"],
  18823. aliases: ["Expression"]
  18824. });
  18825. (0, _utils.default)("BinaryExpression", {
  18826. builder: ["operator", "left", "right"],
  18827. fields: {
  18828. operator: {
  18829. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  18830. },
  18831. left: {
  18832. validate: function() {
  18833. const expression = (0, _utils.assertNodeType)("Expression");
  18834. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  18835. const validator = function(node, key, val) {
  18836. const validator2 = node.operator === "in" ? inOp : expression;
  18837. validator2(node, key, val);
  18838. };
  18839. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  18840. return validator;
  18841. }()
  18842. },
  18843. right: {
  18844. validate: (0, _utils.assertNodeType)("Expression")
  18845. }
  18846. },
  18847. visitor: ["left", "right"],
  18848. aliases: ["Binary", "Expression"]
  18849. });
  18850. (0, _utils.default)("InterpreterDirective", {
  18851. builder: ["value"],
  18852. fields: {
  18853. value: {
  18854. validate: (0, _utils.assertValueType)("string")
  18855. }
  18856. }
  18857. });
  18858. (0, _utils.default)("Directive", {
  18859. visitor: ["value"],
  18860. fields: {
  18861. value: {
  18862. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  18863. }
  18864. }
  18865. });
  18866. (0, _utils.default)("DirectiveLiteral", {
  18867. builder: ["value"],
  18868. fields: {
  18869. value: {
  18870. validate: (0, _utils.assertValueType)("string")
  18871. }
  18872. }
  18873. });
  18874. (0, _utils.default)("BlockStatement", {
  18875. builder: ["body", "directives"],
  18876. visitor: ["directives", "body"],
  18877. fields: {
  18878. directives: {
  18879. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  18880. default: []
  18881. },
  18882. body: {
  18883. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  18884. }
  18885. },
  18886. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  18887. });
  18888. (0, _utils.default)("BreakStatement", {
  18889. visitor: ["label"],
  18890. fields: {
  18891. label: {
  18892. validate: (0, _utils.assertNodeType)("Identifier"),
  18893. optional: true
  18894. }
  18895. },
  18896. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  18897. });
  18898. (0, _utils.default)("CallExpression", {
  18899. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  18900. builder: ["callee", "arguments"],
  18901. aliases: ["Expression"],
  18902. fields: Object.assign({
  18903. callee: {
  18904. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  18905. },
  18906. arguments: {
  18907. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  18908. }
  18909. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  18910. optional: {
  18911. validate: (0, _utils.assertOneOf)(true, false),
  18912. optional: true
  18913. }
  18914. } : {}, {
  18915. typeArguments: {
  18916. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  18917. optional: true
  18918. },
  18919. typeParameters: {
  18920. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  18921. optional: true
  18922. }
  18923. })
  18924. });
  18925. (0, _utils.default)("CatchClause", {
  18926. visitor: ["param", "body"],
  18927. fields: {
  18928. param: {
  18929. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  18930. optional: true
  18931. },
  18932. body: {
  18933. validate: (0, _utils.assertNodeType)("BlockStatement")
  18934. }
  18935. },
  18936. aliases: ["Scopable", "BlockParent"]
  18937. });
  18938. (0, _utils.default)("ConditionalExpression", {
  18939. visitor: ["test", "consequent", "alternate"],
  18940. fields: {
  18941. test: {
  18942. validate: (0, _utils.assertNodeType)("Expression")
  18943. },
  18944. consequent: {
  18945. validate: (0, _utils.assertNodeType)("Expression")
  18946. },
  18947. alternate: {
  18948. validate: (0, _utils.assertNodeType)("Expression")
  18949. }
  18950. },
  18951. aliases: ["Expression", "Conditional"]
  18952. });
  18953. (0, _utils.default)("ContinueStatement", {
  18954. visitor: ["label"],
  18955. fields: {
  18956. label: {
  18957. validate: (0, _utils.assertNodeType)("Identifier"),
  18958. optional: true
  18959. }
  18960. },
  18961. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  18962. });
  18963. (0, _utils.default)("DebuggerStatement", {
  18964. aliases: ["Statement"]
  18965. });
  18966. (0, _utils.default)("DoWhileStatement", {
  18967. visitor: ["test", "body"],
  18968. fields: {
  18969. test: {
  18970. validate: (0, _utils.assertNodeType)("Expression")
  18971. },
  18972. body: {
  18973. validate: (0, _utils.assertNodeType)("Statement")
  18974. }
  18975. },
  18976. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  18977. });
  18978. (0, _utils.default)("EmptyStatement", {
  18979. aliases: ["Statement"]
  18980. });
  18981. (0, _utils.default)("ExpressionStatement", {
  18982. visitor: ["expression"],
  18983. fields: {
  18984. expression: {
  18985. validate: (0, _utils.assertNodeType)("Expression")
  18986. }
  18987. },
  18988. aliases: ["Statement", "ExpressionWrapper"]
  18989. });
  18990. (0, _utils.default)("File", {
  18991. builder: ["program", "comments", "tokens"],
  18992. visitor: ["program"],
  18993. fields: {
  18994. program: {
  18995. validate: (0, _utils.assertNodeType)("Program")
  18996. },
  18997. comments: {
  18998. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  18999. }, {
  19000. each: {
  19001. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  19002. }
  19003. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  19004. optional: true
  19005. },
  19006. tokens: {
  19007. validate: (0, _utils.assertEach)(Object.assign(() => {
  19008. }, {
  19009. type: "any"
  19010. })),
  19011. optional: true
  19012. }
  19013. }
  19014. });
  19015. (0, _utils.default)("ForInStatement", {
  19016. visitor: ["left", "right", "body"],
  19017. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  19018. fields: {
  19019. left: {
  19020. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  19021. },
  19022. right: {
  19023. validate: (0, _utils.assertNodeType)("Expression")
  19024. },
  19025. body: {
  19026. validate: (0, _utils.assertNodeType)("Statement")
  19027. }
  19028. }
  19029. });
  19030. (0, _utils.default)("ForStatement", {
  19031. visitor: ["init", "test", "update", "body"],
  19032. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  19033. fields: {
  19034. init: {
  19035. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  19036. optional: true
  19037. },
  19038. test: {
  19039. validate: (0, _utils.assertNodeType)("Expression"),
  19040. optional: true
  19041. },
  19042. update: {
  19043. validate: (0, _utils.assertNodeType)("Expression"),
  19044. optional: true
  19045. },
  19046. body: {
  19047. validate: (0, _utils.assertNodeType)("Statement")
  19048. }
  19049. }
  19050. });
  19051. var functionCommon = {
  19052. params: {
  19053. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  19054. },
  19055. generator: {
  19056. default: false
  19057. },
  19058. async: {
  19059. default: false
  19060. }
  19061. };
  19062. exports.functionCommon = functionCommon;
  19063. var functionTypeAnnotationCommon = {
  19064. returnType: {
  19065. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  19066. optional: true
  19067. },
  19068. typeParameters: {
  19069. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  19070. optional: true
  19071. }
  19072. };
  19073. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  19074. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  19075. declare: {
  19076. validate: (0, _utils.assertValueType)("boolean"),
  19077. optional: true
  19078. },
  19079. id: {
  19080. validate: (0, _utils.assertNodeType)("Identifier"),
  19081. optional: true
  19082. }
  19083. });
  19084. exports.functionDeclarationCommon = functionDeclarationCommon;
  19085. (0, _utils.default)("FunctionDeclaration", {
  19086. builder: ["id", "params", "body", "generator", "async"],
  19087. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  19088. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  19089. body: {
  19090. validate: (0, _utils.assertNodeType)("BlockStatement")
  19091. }
  19092. }),
  19093. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  19094. validate: function() {
  19095. if (!process.env.BABEL_TYPES_8_BREAKING)
  19096. return () => {
  19097. };
  19098. const identifier = (0, _utils.assertNodeType)("Identifier");
  19099. return function(parent, key, node) {
  19100. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  19101. identifier(node, "id", node.id);
  19102. }
  19103. };
  19104. }()
  19105. });
  19106. (0, _utils.default)("FunctionExpression", {
  19107. inherits: "FunctionDeclaration",
  19108. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  19109. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  19110. id: {
  19111. validate: (0, _utils.assertNodeType)("Identifier"),
  19112. optional: true
  19113. },
  19114. body: {
  19115. validate: (0, _utils.assertNodeType)("BlockStatement")
  19116. }
  19117. })
  19118. });
  19119. var patternLikeCommon = {
  19120. typeAnnotation: {
  19121. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  19122. optional: true
  19123. },
  19124. decorators: {
  19125. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  19126. }
  19127. };
  19128. exports.patternLikeCommon = patternLikeCommon;
  19129. (0, _utils.default)("Identifier", {
  19130. builder: ["name"],
  19131. visitor: ["typeAnnotation", "decorators"],
  19132. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  19133. fields: Object.assign({}, patternLikeCommon, {
  19134. name: {
  19135. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  19136. if (!process.env.BABEL_TYPES_8_BREAKING)
  19137. return;
  19138. if (!(0, _isValidIdentifier.default)(val, false)) {
  19139. throw new TypeError(`"${val}" is not a valid identifier name`);
  19140. }
  19141. }, {
  19142. type: "string"
  19143. }))
  19144. },
  19145. optional: {
  19146. validate: (0, _utils.assertValueType)("boolean"),
  19147. optional: true
  19148. }
  19149. }),
  19150. validate(parent, key, node) {
  19151. if (!process.env.BABEL_TYPES_8_BREAKING)
  19152. return;
  19153. const match = /\.(\w+)$/.exec(key);
  19154. if (!match)
  19155. return;
  19156. const [, parentKey] = match;
  19157. const nonComp = {
  19158. computed: false
  19159. };
  19160. if (parentKey === "property") {
  19161. if ((0, _is.default)("MemberExpression", parent, nonComp))
  19162. return;
  19163. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  19164. return;
  19165. } else if (parentKey === "key") {
  19166. if ((0, _is.default)("Property", parent, nonComp))
  19167. return;
  19168. if ((0, _is.default)("Method", parent, nonComp))
  19169. return;
  19170. } else if (parentKey === "exported") {
  19171. if ((0, _is.default)("ExportSpecifier", parent))
  19172. return;
  19173. } else if (parentKey === "imported") {
  19174. if ((0, _is.default)("ImportSpecifier", parent, {
  19175. imported: node
  19176. }))
  19177. return;
  19178. } else if (parentKey === "meta") {
  19179. if ((0, _is.default)("MetaProperty", parent, {
  19180. meta: node
  19181. }))
  19182. return;
  19183. }
  19184. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  19185. throw new TypeError(`"${node.name}" is not a valid identifier`);
  19186. }
  19187. }
  19188. });
  19189. (0, _utils.default)("IfStatement", {
  19190. visitor: ["test", "consequent", "alternate"],
  19191. aliases: ["Statement", "Conditional"],
  19192. fields: {
  19193. test: {
  19194. validate: (0, _utils.assertNodeType)("Expression")
  19195. },
  19196. consequent: {
  19197. validate: (0, _utils.assertNodeType)("Statement")
  19198. },
  19199. alternate: {
  19200. optional: true,
  19201. validate: (0, _utils.assertNodeType)("Statement")
  19202. }
  19203. }
  19204. });
  19205. (0, _utils.default)("LabeledStatement", {
  19206. visitor: ["label", "body"],
  19207. aliases: ["Statement"],
  19208. fields: {
  19209. label: {
  19210. validate: (0, _utils.assertNodeType)("Identifier")
  19211. },
  19212. body: {
  19213. validate: (0, _utils.assertNodeType)("Statement")
  19214. }
  19215. }
  19216. });
  19217. (0, _utils.default)("StringLiteral", {
  19218. builder: ["value"],
  19219. fields: {
  19220. value: {
  19221. validate: (0, _utils.assertValueType)("string")
  19222. }
  19223. },
  19224. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  19225. });
  19226. (0, _utils.default)("NumericLiteral", {
  19227. builder: ["value"],
  19228. deprecatedAlias: "NumberLiteral",
  19229. fields: {
  19230. value: {
  19231. validate: (0, _utils.assertValueType)("number")
  19232. }
  19233. },
  19234. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  19235. });
  19236. (0, _utils.default)("NullLiteral", {
  19237. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  19238. });
  19239. (0, _utils.default)("BooleanLiteral", {
  19240. builder: ["value"],
  19241. fields: {
  19242. value: {
  19243. validate: (0, _utils.assertValueType)("boolean")
  19244. }
  19245. },
  19246. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  19247. });
  19248. (0, _utils.default)("RegExpLiteral", {
  19249. builder: ["pattern", "flags"],
  19250. deprecatedAlias: "RegexLiteral",
  19251. aliases: ["Expression", "Pureish", "Literal"],
  19252. fields: {
  19253. pattern: {
  19254. validate: (0, _utils.assertValueType)("string")
  19255. },
  19256. flags: {
  19257. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  19258. if (!process.env.BABEL_TYPES_8_BREAKING)
  19259. return;
  19260. const invalid2 = /[^gimsuy]/.exec(val);
  19261. if (invalid2) {
  19262. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  19263. }
  19264. }, {
  19265. type: "string"
  19266. })),
  19267. default: ""
  19268. }
  19269. }
  19270. });
  19271. (0, _utils.default)("LogicalExpression", {
  19272. builder: ["operator", "left", "right"],
  19273. visitor: ["left", "right"],
  19274. aliases: ["Binary", "Expression"],
  19275. fields: {
  19276. operator: {
  19277. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  19278. },
  19279. left: {
  19280. validate: (0, _utils.assertNodeType)("Expression")
  19281. },
  19282. right: {
  19283. validate: (0, _utils.assertNodeType)("Expression")
  19284. }
  19285. }
  19286. });
  19287. (0, _utils.default)("MemberExpression", {
  19288. builder: ["object", "property", "computed", "optional"],
  19289. visitor: ["object", "property"],
  19290. aliases: ["Expression", "LVal"],
  19291. fields: Object.assign({
  19292. object: {
  19293. validate: (0, _utils.assertNodeType)("Expression")
  19294. },
  19295. property: {
  19296. validate: function() {
  19297. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  19298. const computed = (0, _utils.assertNodeType)("Expression");
  19299. const validator = function(node, key, val) {
  19300. const validator2 = node.computed ? computed : normal;
  19301. validator2(node, key, val);
  19302. };
  19303. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  19304. return validator;
  19305. }()
  19306. },
  19307. computed: {
  19308. default: false
  19309. }
  19310. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  19311. optional: {
  19312. validate: (0, _utils.assertOneOf)(true, false),
  19313. optional: true
  19314. }
  19315. } : {})
  19316. });
  19317. (0, _utils.default)("NewExpression", {
  19318. inherits: "CallExpression"
  19319. });
  19320. (0, _utils.default)("Program", {
  19321. visitor: ["directives", "body"],
  19322. builder: ["body", "directives", "sourceType", "interpreter"],
  19323. fields: {
  19324. sourceFile: {
  19325. validate: (0, _utils.assertValueType)("string")
  19326. },
  19327. sourceType: {
  19328. validate: (0, _utils.assertOneOf)("script", "module"),
  19329. default: "script"
  19330. },
  19331. interpreter: {
  19332. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  19333. default: null,
  19334. optional: true
  19335. },
  19336. directives: {
  19337. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  19338. default: []
  19339. },
  19340. body: {
  19341. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  19342. }
  19343. },
  19344. aliases: ["Scopable", "BlockParent", "Block"]
  19345. });
  19346. (0, _utils.default)("ObjectExpression", {
  19347. visitor: ["properties"],
  19348. aliases: ["Expression"],
  19349. fields: {
  19350. properties: {
  19351. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  19352. }
  19353. }
  19354. });
  19355. (0, _utils.default)("ObjectMethod", {
  19356. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  19357. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  19358. kind: Object.assign({
  19359. validate: (0, _utils.assertOneOf)("method", "get", "set")
  19360. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  19361. default: "method"
  19362. } : {}),
  19363. computed: {
  19364. default: false
  19365. },
  19366. key: {
  19367. validate: function() {
  19368. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  19369. const computed = (0, _utils.assertNodeType)("Expression");
  19370. const validator = function(node, key, val) {
  19371. const validator2 = node.computed ? computed : normal;
  19372. validator2(node, key, val);
  19373. };
  19374. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  19375. return validator;
  19376. }()
  19377. },
  19378. decorators: {
  19379. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19380. optional: true
  19381. },
  19382. body: {
  19383. validate: (0, _utils.assertNodeType)("BlockStatement")
  19384. }
  19385. }),
  19386. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  19387. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  19388. });
  19389. (0, _utils.default)("ObjectProperty", {
  19390. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  19391. fields: {
  19392. computed: {
  19393. default: false
  19394. },
  19395. key: {
  19396. validate: function() {
  19397. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  19398. const computed = (0, _utils.assertNodeType)("Expression");
  19399. const validator = function(node, key, val) {
  19400. const validator2 = node.computed ? computed : normal;
  19401. validator2(node, key, val);
  19402. };
  19403. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  19404. return validator;
  19405. }()
  19406. },
  19407. value: {
  19408. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  19409. },
  19410. shorthand: {
  19411. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  19412. if (!process.env.BABEL_TYPES_8_BREAKING)
  19413. return;
  19414. if (val && node.computed) {
  19415. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  19416. }
  19417. }, {
  19418. type: "boolean"
  19419. }), function(node, key, val) {
  19420. if (!process.env.BABEL_TYPES_8_BREAKING)
  19421. return;
  19422. if (val && !(0, _is.default)("Identifier", node.key)) {
  19423. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  19424. }
  19425. }),
  19426. default: false
  19427. },
  19428. decorators: {
  19429. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19430. optional: true
  19431. }
  19432. },
  19433. visitor: ["key", "value", "decorators"],
  19434. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  19435. validate: function() {
  19436. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  19437. const expression = (0, _utils.assertNodeType)("Expression");
  19438. return function(parent, key, node) {
  19439. if (!process.env.BABEL_TYPES_8_BREAKING)
  19440. return;
  19441. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  19442. validator(node, "value", node.value);
  19443. };
  19444. }()
  19445. });
  19446. (0, _utils.default)("RestElement", {
  19447. visitor: ["argument", "typeAnnotation"],
  19448. builder: ["argument"],
  19449. aliases: ["LVal", "PatternLike"],
  19450. deprecatedAlias: "RestProperty",
  19451. fields: Object.assign({}, patternLikeCommon, {
  19452. argument: {
  19453. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  19454. }
  19455. }),
  19456. validate(parent, key) {
  19457. if (!process.env.BABEL_TYPES_8_BREAKING)
  19458. return;
  19459. const match = /(\w+)\[(\d+)\]/.exec(key);
  19460. if (!match)
  19461. throw new Error("Internal Babel error: malformed key.");
  19462. const [, listKey, index2] = match;
  19463. if (parent[listKey].length > index2 + 1) {
  19464. throw new TypeError(`RestElement must be last element of ${listKey}`);
  19465. }
  19466. }
  19467. });
  19468. (0, _utils.default)("ReturnStatement", {
  19469. visitor: ["argument"],
  19470. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  19471. fields: {
  19472. argument: {
  19473. validate: (0, _utils.assertNodeType)("Expression"),
  19474. optional: true
  19475. }
  19476. }
  19477. });
  19478. (0, _utils.default)("SequenceExpression", {
  19479. visitor: ["expressions"],
  19480. fields: {
  19481. expressions: {
  19482. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  19483. }
  19484. },
  19485. aliases: ["Expression"]
  19486. });
  19487. (0, _utils.default)("ParenthesizedExpression", {
  19488. visitor: ["expression"],
  19489. aliases: ["Expression", "ExpressionWrapper"],
  19490. fields: {
  19491. expression: {
  19492. validate: (0, _utils.assertNodeType)("Expression")
  19493. }
  19494. }
  19495. });
  19496. (0, _utils.default)("SwitchCase", {
  19497. visitor: ["test", "consequent"],
  19498. fields: {
  19499. test: {
  19500. validate: (0, _utils.assertNodeType)("Expression"),
  19501. optional: true
  19502. },
  19503. consequent: {
  19504. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  19505. }
  19506. }
  19507. });
  19508. (0, _utils.default)("SwitchStatement", {
  19509. visitor: ["discriminant", "cases"],
  19510. aliases: ["Statement", "BlockParent", "Scopable"],
  19511. fields: {
  19512. discriminant: {
  19513. validate: (0, _utils.assertNodeType)("Expression")
  19514. },
  19515. cases: {
  19516. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  19517. }
  19518. }
  19519. });
  19520. (0, _utils.default)("ThisExpression", {
  19521. aliases: ["Expression"]
  19522. });
  19523. (0, _utils.default)("ThrowStatement", {
  19524. visitor: ["argument"],
  19525. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  19526. fields: {
  19527. argument: {
  19528. validate: (0, _utils.assertNodeType)("Expression")
  19529. }
  19530. }
  19531. });
  19532. (0, _utils.default)("TryStatement", {
  19533. visitor: ["block", "handler", "finalizer"],
  19534. aliases: ["Statement"],
  19535. fields: {
  19536. block: {
  19537. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  19538. if (!process.env.BABEL_TYPES_8_BREAKING)
  19539. return;
  19540. if (!node.handler && !node.finalizer) {
  19541. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  19542. }
  19543. }, {
  19544. oneOfNodeTypes: ["BlockStatement"]
  19545. }))
  19546. },
  19547. handler: {
  19548. optional: true,
  19549. validate: (0, _utils.assertNodeType)("CatchClause")
  19550. },
  19551. finalizer: {
  19552. optional: true,
  19553. validate: (0, _utils.assertNodeType)("BlockStatement")
  19554. }
  19555. }
  19556. });
  19557. (0, _utils.default)("UnaryExpression", {
  19558. builder: ["operator", "argument", "prefix"],
  19559. fields: {
  19560. prefix: {
  19561. default: true
  19562. },
  19563. argument: {
  19564. validate: (0, _utils.assertNodeType)("Expression")
  19565. },
  19566. operator: {
  19567. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  19568. }
  19569. },
  19570. visitor: ["argument"],
  19571. aliases: ["UnaryLike", "Expression"]
  19572. });
  19573. (0, _utils.default)("UpdateExpression", {
  19574. builder: ["operator", "argument", "prefix"],
  19575. fields: {
  19576. prefix: {
  19577. default: false
  19578. },
  19579. argument: {
  19580. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  19581. },
  19582. operator: {
  19583. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  19584. }
  19585. },
  19586. visitor: ["argument"],
  19587. aliases: ["Expression"]
  19588. });
  19589. (0, _utils.default)("VariableDeclaration", {
  19590. builder: ["kind", "declarations"],
  19591. visitor: ["declarations"],
  19592. aliases: ["Statement", "Declaration"],
  19593. fields: {
  19594. declare: {
  19595. validate: (0, _utils.assertValueType)("boolean"),
  19596. optional: true
  19597. },
  19598. kind: {
  19599. validate: (0, _utils.assertOneOf)("var", "let", "const")
  19600. },
  19601. declarations: {
  19602. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  19603. }
  19604. },
  19605. validate(parent, key, node) {
  19606. if (!process.env.BABEL_TYPES_8_BREAKING)
  19607. return;
  19608. if (!(0, _is.default)("ForXStatement", parent, {
  19609. left: node
  19610. }))
  19611. return;
  19612. if (node.declarations.length !== 1) {
  19613. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  19614. }
  19615. }
  19616. });
  19617. (0, _utils.default)("VariableDeclarator", {
  19618. visitor: ["id", "init"],
  19619. fields: {
  19620. id: {
  19621. validate: function() {
  19622. if (!process.env.BABEL_TYPES_8_BREAKING) {
  19623. return (0, _utils.assertNodeType)("LVal");
  19624. }
  19625. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  19626. const without = (0, _utils.assertNodeType)("Identifier");
  19627. return function(node, key, val) {
  19628. const validator = node.init ? normal : without;
  19629. validator(node, key, val);
  19630. };
  19631. }()
  19632. },
  19633. definite: {
  19634. optional: true,
  19635. validate: (0, _utils.assertValueType)("boolean")
  19636. },
  19637. init: {
  19638. optional: true,
  19639. validate: (0, _utils.assertNodeType)("Expression")
  19640. }
  19641. }
  19642. });
  19643. (0, _utils.default)("WhileStatement", {
  19644. visitor: ["test", "body"],
  19645. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  19646. fields: {
  19647. test: {
  19648. validate: (0, _utils.assertNodeType)("Expression")
  19649. },
  19650. body: {
  19651. validate: (0, _utils.assertNodeType)("Statement")
  19652. }
  19653. }
  19654. });
  19655. (0, _utils.default)("WithStatement", {
  19656. visitor: ["object", "body"],
  19657. aliases: ["Statement"],
  19658. fields: {
  19659. object: {
  19660. validate: (0, _utils.assertNodeType)("Expression")
  19661. },
  19662. body: {
  19663. validate: (0, _utils.assertNodeType)("Statement")
  19664. }
  19665. }
  19666. });
  19667. (0, _utils.default)("AssignmentPattern", {
  19668. visitor: ["left", "right", "decorators"],
  19669. builder: ["left", "right"],
  19670. aliases: ["Pattern", "PatternLike", "LVal"],
  19671. fields: Object.assign({}, patternLikeCommon, {
  19672. left: {
  19673. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  19674. },
  19675. right: {
  19676. validate: (0, _utils.assertNodeType)("Expression")
  19677. },
  19678. decorators: {
  19679. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19680. optional: true
  19681. }
  19682. })
  19683. });
  19684. (0, _utils.default)("ArrayPattern", {
  19685. visitor: ["elements", "typeAnnotation"],
  19686. builder: ["elements"],
  19687. aliases: ["Pattern", "PatternLike", "LVal"],
  19688. fields: Object.assign({}, patternLikeCommon, {
  19689. elements: {
  19690. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  19691. },
  19692. decorators: {
  19693. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19694. optional: true
  19695. }
  19696. })
  19697. });
  19698. (0, _utils.default)("ArrowFunctionExpression", {
  19699. builder: ["params", "body", "async"],
  19700. visitor: ["params", "body", "returnType", "typeParameters"],
  19701. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  19702. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  19703. expression: {
  19704. validate: (0, _utils.assertValueType)("boolean")
  19705. },
  19706. body: {
  19707. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  19708. }
  19709. })
  19710. });
  19711. (0, _utils.default)("ClassBody", {
  19712. visitor: ["body"],
  19713. fields: {
  19714. body: {
  19715. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  19716. }
  19717. }
  19718. });
  19719. (0, _utils.default)("ClassExpression", {
  19720. builder: ["id", "superClass", "body", "decorators"],
  19721. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  19722. aliases: ["Scopable", "Class", "Expression"],
  19723. fields: {
  19724. id: {
  19725. validate: (0, _utils.assertNodeType)("Identifier"),
  19726. optional: true
  19727. },
  19728. typeParameters: {
  19729. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  19730. optional: true
  19731. },
  19732. body: {
  19733. validate: (0, _utils.assertNodeType)("ClassBody")
  19734. },
  19735. superClass: {
  19736. optional: true,
  19737. validate: (0, _utils.assertNodeType)("Expression")
  19738. },
  19739. superTypeParameters: {
  19740. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  19741. optional: true
  19742. },
  19743. implements: {
  19744. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  19745. optional: true
  19746. },
  19747. decorators: {
  19748. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19749. optional: true
  19750. },
  19751. mixins: {
  19752. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  19753. optional: true
  19754. }
  19755. }
  19756. });
  19757. (0, _utils.default)("ClassDeclaration", {
  19758. inherits: "ClassExpression",
  19759. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  19760. fields: {
  19761. id: {
  19762. validate: (0, _utils.assertNodeType)("Identifier")
  19763. },
  19764. typeParameters: {
  19765. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  19766. optional: true
  19767. },
  19768. body: {
  19769. validate: (0, _utils.assertNodeType)("ClassBody")
  19770. },
  19771. superClass: {
  19772. optional: true,
  19773. validate: (0, _utils.assertNodeType)("Expression")
  19774. },
  19775. superTypeParameters: {
  19776. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  19777. optional: true
  19778. },
  19779. implements: {
  19780. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  19781. optional: true
  19782. },
  19783. decorators: {
  19784. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  19785. optional: true
  19786. },
  19787. mixins: {
  19788. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  19789. optional: true
  19790. },
  19791. declare: {
  19792. validate: (0, _utils.assertValueType)("boolean"),
  19793. optional: true
  19794. },
  19795. abstract: {
  19796. validate: (0, _utils.assertValueType)("boolean"),
  19797. optional: true
  19798. }
  19799. },
  19800. validate: function() {
  19801. const identifier = (0, _utils.assertNodeType)("Identifier");
  19802. return function(parent, key, node) {
  19803. if (!process.env.BABEL_TYPES_8_BREAKING)
  19804. return;
  19805. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  19806. identifier(node, "id", node.id);
  19807. }
  19808. };
  19809. }()
  19810. });
  19811. (0, _utils.default)("ExportAllDeclaration", {
  19812. visitor: ["source"],
  19813. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  19814. fields: {
  19815. source: {
  19816. validate: (0, _utils.assertNodeType)("StringLiteral")
  19817. },
  19818. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  19819. assertions: {
  19820. optional: true,
  19821. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  19822. }
  19823. }
  19824. });
  19825. (0, _utils.default)("ExportDefaultDeclaration", {
  19826. visitor: ["declaration"],
  19827. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  19828. fields: {
  19829. declaration: {
  19830. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  19831. }
  19832. }
  19833. });
  19834. (0, _utils.default)("ExportNamedDeclaration", {
  19835. visitor: ["declaration", "specifiers", "source"],
  19836. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  19837. fields: {
  19838. declaration: {
  19839. optional: true,
  19840. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  19841. if (!process.env.BABEL_TYPES_8_BREAKING)
  19842. return;
  19843. if (val && node.specifiers.length) {
  19844. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  19845. }
  19846. }, {
  19847. oneOfNodeTypes: ["Declaration"]
  19848. }), function(node, key, val) {
  19849. if (!process.env.BABEL_TYPES_8_BREAKING)
  19850. return;
  19851. if (val && node.source) {
  19852. throw new TypeError("Cannot export a declaration from a source");
  19853. }
  19854. })
  19855. },
  19856. assertions: {
  19857. optional: true,
  19858. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  19859. },
  19860. specifiers: {
  19861. default: [],
  19862. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  19863. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  19864. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  19865. if (!process.env.BABEL_TYPES_8_BREAKING)
  19866. return sourced;
  19867. return function(node, key, val) {
  19868. const validator = node.source ? sourced : sourceless;
  19869. validator(node, key, val);
  19870. };
  19871. }()))
  19872. },
  19873. source: {
  19874. validate: (0, _utils.assertNodeType)("StringLiteral"),
  19875. optional: true
  19876. },
  19877. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  19878. }
  19879. });
  19880. (0, _utils.default)("ExportSpecifier", {
  19881. visitor: ["local", "exported"],
  19882. aliases: ["ModuleSpecifier"],
  19883. fields: {
  19884. local: {
  19885. validate: (0, _utils.assertNodeType)("Identifier")
  19886. },
  19887. exported: {
  19888. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  19889. }
  19890. }
  19891. });
  19892. (0, _utils.default)("ForOfStatement", {
  19893. visitor: ["left", "right", "body"],
  19894. builder: ["left", "right", "body", "await"],
  19895. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  19896. fields: {
  19897. left: {
  19898. validate: function() {
  19899. if (!process.env.BABEL_TYPES_8_BREAKING) {
  19900. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  19901. }
  19902. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  19903. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  19904. return function(node, key, val) {
  19905. if ((0, _is.default)("VariableDeclaration", val)) {
  19906. declaration(node, key, val);
  19907. } else {
  19908. lval(node, key, val);
  19909. }
  19910. };
  19911. }()
  19912. },
  19913. right: {
  19914. validate: (0, _utils.assertNodeType)("Expression")
  19915. },
  19916. body: {
  19917. validate: (0, _utils.assertNodeType)("Statement")
  19918. },
  19919. await: {
  19920. default: false
  19921. }
  19922. }
  19923. });
  19924. (0, _utils.default)("ImportDeclaration", {
  19925. visitor: ["specifiers", "source"],
  19926. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  19927. fields: {
  19928. assertions: {
  19929. optional: true,
  19930. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  19931. },
  19932. specifiers: {
  19933. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  19934. },
  19935. source: {
  19936. validate: (0, _utils.assertNodeType)("StringLiteral")
  19937. },
  19938. importKind: {
  19939. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  19940. optional: true
  19941. }
  19942. }
  19943. });
  19944. (0, _utils.default)("ImportDefaultSpecifier", {
  19945. visitor: ["local"],
  19946. aliases: ["ModuleSpecifier"],
  19947. fields: {
  19948. local: {
  19949. validate: (0, _utils.assertNodeType)("Identifier")
  19950. }
  19951. }
  19952. });
  19953. (0, _utils.default)("ImportNamespaceSpecifier", {
  19954. visitor: ["local"],
  19955. aliases: ["ModuleSpecifier"],
  19956. fields: {
  19957. local: {
  19958. validate: (0, _utils.assertNodeType)("Identifier")
  19959. }
  19960. }
  19961. });
  19962. (0, _utils.default)("ImportSpecifier", {
  19963. visitor: ["local", "imported"],
  19964. aliases: ["ModuleSpecifier"],
  19965. fields: {
  19966. local: {
  19967. validate: (0, _utils.assertNodeType)("Identifier")
  19968. },
  19969. imported: {
  19970. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  19971. },
  19972. importKind: {
  19973. validate: (0, _utils.assertOneOf)("type", "typeof"),
  19974. optional: true
  19975. }
  19976. }
  19977. });
  19978. (0, _utils.default)("MetaProperty", {
  19979. visitor: ["meta", "property"],
  19980. aliases: ["Expression"],
  19981. fields: {
  19982. meta: {
  19983. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  19984. if (!process.env.BABEL_TYPES_8_BREAKING)
  19985. return;
  19986. let property;
  19987. switch (val.name) {
  19988. case "function":
  19989. property = "sent";
  19990. break;
  19991. case "new":
  19992. property = "target";
  19993. break;
  19994. case "import":
  19995. property = "meta";
  19996. break;
  19997. }
  19998. if (!(0, _is.default)("Identifier", node.property, {
  19999. name: property
  20000. })) {
  20001. throw new TypeError("Unrecognised MetaProperty");
  20002. }
  20003. }, {
  20004. oneOfNodeTypes: ["Identifier"]
  20005. }))
  20006. },
  20007. property: {
  20008. validate: (0, _utils.assertNodeType)("Identifier")
  20009. }
  20010. }
  20011. });
  20012. var classMethodOrPropertyCommon = {
  20013. abstract: {
  20014. validate: (0, _utils.assertValueType)("boolean"),
  20015. optional: true
  20016. },
  20017. accessibility: {
  20018. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  20019. optional: true
  20020. },
  20021. static: {
  20022. default: false
  20023. },
  20024. override: {
  20025. default: false
  20026. },
  20027. computed: {
  20028. default: false
  20029. },
  20030. optional: {
  20031. validate: (0, _utils.assertValueType)("boolean"),
  20032. optional: true
  20033. },
  20034. key: {
  20035. validate: (0, _utils.chain)(function() {
  20036. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  20037. const computed = (0, _utils.assertNodeType)("Expression");
  20038. return function(node, key, val) {
  20039. const validator = node.computed ? computed : normal;
  20040. validator(node, key, val);
  20041. };
  20042. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  20043. }
  20044. };
  20045. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  20046. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  20047. params: {
  20048. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  20049. },
  20050. kind: {
  20051. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  20052. default: "method"
  20053. },
  20054. access: {
  20055. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  20056. optional: true
  20057. },
  20058. decorators: {
  20059. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  20060. optional: true
  20061. }
  20062. });
  20063. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  20064. (0, _utils.default)("ClassMethod", {
  20065. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  20066. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  20067. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  20068. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  20069. body: {
  20070. validate: (0, _utils.assertNodeType)("BlockStatement")
  20071. }
  20072. })
  20073. });
  20074. (0, _utils.default)("ObjectPattern", {
  20075. visitor: ["properties", "typeAnnotation", "decorators"],
  20076. builder: ["properties"],
  20077. aliases: ["Pattern", "PatternLike", "LVal"],
  20078. fields: Object.assign({}, patternLikeCommon, {
  20079. properties: {
  20080. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  20081. }
  20082. })
  20083. });
  20084. (0, _utils.default)("SpreadElement", {
  20085. visitor: ["argument"],
  20086. aliases: ["UnaryLike"],
  20087. deprecatedAlias: "SpreadProperty",
  20088. fields: {
  20089. argument: {
  20090. validate: (0, _utils.assertNodeType)("Expression")
  20091. }
  20092. }
  20093. });
  20094. (0, _utils.default)("Super", {
  20095. aliases: ["Expression"]
  20096. });
  20097. (0, _utils.default)("TaggedTemplateExpression", {
  20098. visitor: ["tag", "quasi"],
  20099. aliases: ["Expression"],
  20100. fields: {
  20101. tag: {
  20102. validate: (0, _utils.assertNodeType)("Expression")
  20103. },
  20104. quasi: {
  20105. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  20106. },
  20107. typeParameters: {
  20108. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  20109. optional: true
  20110. }
  20111. }
  20112. });
  20113. (0, _utils.default)("TemplateElement", {
  20114. builder: ["value", "tail"],
  20115. fields: {
  20116. value: {
  20117. validate: (0, _utils.assertShape)({
  20118. raw: {
  20119. validate: (0, _utils.assertValueType)("string")
  20120. },
  20121. cooked: {
  20122. validate: (0, _utils.assertValueType)("string"),
  20123. optional: true
  20124. }
  20125. })
  20126. },
  20127. tail: {
  20128. default: false
  20129. }
  20130. }
  20131. });
  20132. (0, _utils.default)("TemplateLiteral", {
  20133. visitor: ["quasis", "expressions"],
  20134. aliases: ["Expression", "Literal"],
  20135. fields: {
  20136. quasis: {
  20137. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  20138. },
  20139. expressions: {
  20140. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  20141. if (node.quasis.length !== val.length + 1) {
  20142. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  20143. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  20144. }
  20145. })
  20146. }
  20147. }
  20148. });
  20149. (0, _utils.default)("YieldExpression", {
  20150. builder: ["argument", "delegate"],
  20151. visitor: ["argument"],
  20152. aliases: ["Expression", "Terminatorless"],
  20153. fields: {
  20154. delegate: {
  20155. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  20156. if (!process.env.BABEL_TYPES_8_BREAKING)
  20157. return;
  20158. if (val && !node.argument) {
  20159. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  20160. }
  20161. }, {
  20162. type: "boolean"
  20163. })),
  20164. default: false
  20165. },
  20166. argument: {
  20167. optional: true,
  20168. validate: (0, _utils.assertNodeType)("Expression")
  20169. }
  20170. }
  20171. });
  20172. (0, _utils.default)("AwaitExpression", {
  20173. builder: ["argument"],
  20174. visitor: ["argument"],
  20175. aliases: ["Expression", "Terminatorless"],
  20176. fields: {
  20177. argument: {
  20178. validate: (0, _utils.assertNodeType)("Expression")
  20179. }
  20180. }
  20181. });
  20182. (0, _utils.default)("Import", {
  20183. aliases: ["Expression"]
  20184. });
  20185. (0, _utils.default)("BigIntLiteral", {
  20186. builder: ["value"],
  20187. fields: {
  20188. value: {
  20189. validate: (0, _utils.assertValueType)("string")
  20190. }
  20191. },
  20192. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  20193. });
  20194. (0, _utils.default)("ExportNamespaceSpecifier", {
  20195. visitor: ["exported"],
  20196. aliases: ["ModuleSpecifier"],
  20197. fields: {
  20198. exported: {
  20199. validate: (0, _utils.assertNodeType)("Identifier")
  20200. }
  20201. }
  20202. });
  20203. (0, _utils.default)("OptionalMemberExpression", {
  20204. builder: ["object", "property", "computed", "optional"],
  20205. visitor: ["object", "property"],
  20206. aliases: ["Expression"],
  20207. fields: {
  20208. object: {
  20209. validate: (0, _utils.assertNodeType)("Expression")
  20210. },
  20211. property: {
  20212. validate: function() {
  20213. const normal = (0, _utils.assertNodeType)("Identifier");
  20214. const computed = (0, _utils.assertNodeType)("Expression");
  20215. const validator = function(node, key, val) {
  20216. const validator2 = node.computed ? computed : normal;
  20217. validator2(node, key, val);
  20218. };
  20219. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  20220. return validator;
  20221. }()
  20222. },
  20223. computed: {
  20224. default: false
  20225. },
  20226. optional: {
  20227. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  20228. }
  20229. }
  20230. });
  20231. (0, _utils.default)("OptionalCallExpression", {
  20232. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  20233. builder: ["callee", "arguments", "optional"],
  20234. aliases: ["Expression"],
  20235. fields: {
  20236. callee: {
  20237. validate: (0, _utils.assertNodeType)("Expression")
  20238. },
  20239. arguments: {
  20240. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  20241. },
  20242. optional: {
  20243. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  20244. },
  20245. typeArguments: {
  20246. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  20247. optional: true
  20248. },
  20249. typeParameters: {
  20250. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  20251. optional: true
  20252. }
  20253. }
  20254. });
  20255. }
  20256. });
  20257. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/flow.js
  20258. var require_flow2 = __commonJS({
  20259. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/flow.js"() {
  20260. "use strict";
  20261. var _utils = require_utils2();
  20262. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  20263. (0, _utils.default)(name2, {
  20264. builder: ["id", "typeParameters", "extends", "body"],
  20265. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  20266. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20267. fields: {
  20268. id: (0, _utils.validateType)("Identifier"),
  20269. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  20270. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  20271. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  20272. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  20273. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  20274. }
  20275. });
  20276. };
  20277. (0, _utils.default)("AnyTypeAnnotation", {
  20278. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20279. });
  20280. (0, _utils.default)("ArrayTypeAnnotation", {
  20281. visitor: ["elementType"],
  20282. aliases: ["Flow", "FlowType"],
  20283. fields: {
  20284. elementType: (0, _utils.validateType)("FlowType")
  20285. }
  20286. });
  20287. (0, _utils.default)("BooleanTypeAnnotation", {
  20288. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20289. });
  20290. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  20291. builder: ["value"],
  20292. aliases: ["Flow", "FlowType"],
  20293. fields: {
  20294. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20295. }
  20296. });
  20297. (0, _utils.default)("NullLiteralTypeAnnotation", {
  20298. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20299. });
  20300. (0, _utils.default)("ClassImplements", {
  20301. visitor: ["id", "typeParameters"],
  20302. aliases: ["Flow"],
  20303. fields: {
  20304. id: (0, _utils.validateType)("Identifier"),
  20305. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  20306. }
  20307. });
  20308. defineInterfaceishType("DeclareClass");
  20309. (0, _utils.default)("DeclareFunction", {
  20310. visitor: ["id"],
  20311. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20312. fields: {
  20313. id: (0, _utils.validateType)("Identifier"),
  20314. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  20315. }
  20316. });
  20317. defineInterfaceishType("DeclareInterface");
  20318. (0, _utils.default)("DeclareModule", {
  20319. builder: ["id", "body", "kind"],
  20320. visitor: ["id", "body"],
  20321. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20322. fields: {
  20323. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  20324. body: (0, _utils.validateType)("BlockStatement"),
  20325. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  20326. }
  20327. });
  20328. (0, _utils.default)("DeclareModuleExports", {
  20329. visitor: ["typeAnnotation"],
  20330. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20331. fields: {
  20332. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  20333. }
  20334. });
  20335. (0, _utils.default)("DeclareTypeAlias", {
  20336. visitor: ["id", "typeParameters", "right"],
  20337. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20338. fields: {
  20339. id: (0, _utils.validateType)("Identifier"),
  20340. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20341. right: (0, _utils.validateType)("FlowType")
  20342. }
  20343. });
  20344. (0, _utils.default)("DeclareOpaqueType", {
  20345. visitor: ["id", "typeParameters", "supertype"],
  20346. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20347. fields: {
  20348. id: (0, _utils.validateType)("Identifier"),
  20349. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20350. supertype: (0, _utils.validateOptionalType)("FlowType")
  20351. }
  20352. });
  20353. (0, _utils.default)("DeclareVariable", {
  20354. visitor: ["id"],
  20355. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20356. fields: {
  20357. id: (0, _utils.validateType)("Identifier")
  20358. }
  20359. });
  20360. (0, _utils.default)("DeclareExportDeclaration", {
  20361. visitor: ["declaration", "specifiers", "source"],
  20362. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20363. fields: {
  20364. declaration: (0, _utils.validateOptionalType)("Flow"),
  20365. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  20366. source: (0, _utils.validateOptionalType)("StringLiteral"),
  20367. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  20368. }
  20369. });
  20370. (0, _utils.default)("DeclareExportAllDeclaration", {
  20371. visitor: ["source"],
  20372. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20373. fields: {
  20374. source: (0, _utils.validateType)("StringLiteral"),
  20375. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  20376. }
  20377. });
  20378. (0, _utils.default)("DeclaredPredicate", {
  20379. visitor: ["value"],
  20380. aliases: ["Flow", "FlowPredicate"],
  20381. fields: {
  20382. value: (0, _utils.validateType)("Flow")
  20383. }
  20384. });
  20385. (0, _utils.default)("ExistsTypeAnnotation", {
  20386. aliases: ["Flow", "FlowType"]
  20387. });
  20388. (0, _utils.default)("FunctionTypeAnnotation", {
  20389. visitor: ["typeParameters", "params", "rest", "returnType"],
  20390. aliases: ["Flow", "FlowType"],
  20391. fields: {
  20392. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20393. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  20394. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  20395. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  20396. returnType: (0, _utils.validateType)("FlowType")
  20397. }
  20398. });
  20399. (0, _utils.default)("FunctionTypeParam", {
  20400. visitor: ["name", "typeAnnotation"],
  20401. aliases: ["Flow"],
  20402. fields: {
  20403. name: (0, _utils.validateOptionalType)("Identifier"),
  20404. typeAnnotation: (0, _utils.validateType)("FlowType"),
  20405. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  20406. }
  20407. });
  20408. (0, _utils.default)("GenericTypeAnnotation", {
  20409. visitor: ["id", "typeParameters"],
  20410. aliases: ["Flow", "FlowType"],
  20411. fields: {
  20412. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  20413. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  20414. }
  20415. });
  20416. (0, _utils.default)("InferredPredicate", {
  20417. aliases: ["Flow", "FlowPredicate"]
  20418. });
  20419. (0, _utils.default)("InterfaceExtends", {
  20420. visitor: ["id", "typeParameters"],
  20421. aliases: ["Flow"],
  20422. fields: {
  20423. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  20424. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  20425. }
  20426. });
  20427. defineInterfaceishType("InterfaceDeclaration");
  20428. (0, _utils.default)("InterfaceTypeAnnotation", {
  20429. visitor: ["extends", "body"],
  20430. aliases: ["Flow", "FlowType"],
  20431. fields: {
  20432. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  20433. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  20434. }
  20435. });
  20436. (0, _utils.default)("IntersectionTypeAnnotation", {
  20437. visitor: ["types"],
  20438. aliases: ["Flow", "FlowType"],
  20439. fields: {
  20440. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  20441. }
  20442. });
  20443. (0, _utils.default)("MixedTypeAnnotation", {
  20444. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20445. });
  20446. (0, _utils.default)("EmptyTypeAnnotation", {
  20447. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20448. });
  20449. (0, _utils.default)("NullableTypeAnnotation", {
  20450. visitor: ["typeAnnotation"],
  20451. aliases: ["Flow", "FlowType"],
  20452. fields: {
  20453. typeAnnotation: (0, _utils.validateType)("FlowType")
  20454. }
  20455. });
  20456. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  20457. builder: ["value"],
  20458. aliases: ["Flow", "FlowType"],
  20459. fields: {
  20460. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  20461. }
  20462. });
  20463. (0, _utils.default)("NumberTypeAnnotation", {
  20464. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20465. });
  20466. (0, _utils.default)("ObjectTypeAnnotation", {
  20467. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  20468. aliases: ["Flow", "FlowType"],
  20469. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  20470. fields: {
  20471. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  20472. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  20473. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  20474. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  20475. exact: {
  20476. validate: (0, _utils.assertValueType)("boolean"),
  20477. default: false
  20478. },
  20479. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  20480. }
  20481. });
  20482. (0, _utils.default)("ObjectTypeInternalSlot", {
  20483. visitor: ["id", "value", "optional", "static", "method"],
  20484. aliases: ["Flow", "UserWhitespacable"],
  20485. fields: {
  20486. id: (0, _utils.validateType)("Identifier"),
  20487. value: (0, _utils.validateType)("FlowType"),
  20488. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20489. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20490. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20491. }
  20492. });
  20493. (0, _utils.default)("ObjectTypeCallProperty", {
  20494. visitor: ["value"],
  20495. aliases: ["Flow", "UserWhitespacable"],
  20496. fields: {
  20497. value: (0, _utils.validateType)("FlowType"),
  20498. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20499. }
  20500. });
  20501. (0, _utils.default)("ObjectTypeIndexer", {
  20502. visitor: ["id", "key", "value", "variance"],
  20503. aliases: ["Flow", "UserWhitespacable"],
  20504. fields: {
  20505. id: (0, _utils.validateOptionalType)("Identifier"),
  20506. key: (0, _utils.validateType)("FlowType"),
  20507. value: (0, _utils.validateType)("FlowType"),
  20508. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20509. variance: (0, _utils.validateOptionalType)("Variance")
  20510. }
  20511. });
  20512. (0, _utils.default)("ObjectTypeProperty", {
  20513. visitor: ["key", "value", "variance"],
  20514. aliases: ["Flow", "UserWhitespacable"],
  20515. fields: {
  20516. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  20517. value: (0, _utils.validateType)("FlowType"),
  20518. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  20519. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20520. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20521. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20522. variance: (0, _utils.validateOptionalType)("Variance"),
  20523. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20524. }
  20525. });
  20526. (0, _utils.default)("ObjectTypeSpreadProperty", {
  20527. visitor: ["argument"],
  20528. aliases: ["Flow", "UserWhitespacable"],
  20529. fields: {
  20530. argument: (0, _utils.validateType)("FlowType")
  20531. }
  20532. });
  20533. (0, _utils.default)("OpaqueType", {
  20534. visitor: ["id", "typeParameters", "supertype", "impltype"],
  20535. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20536. fields: {
  20537. id: (0, _utils.validateType)("Identifier"),
  20538. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20539. supertype: (0, _utils.validateOptionalType)("FlowType"),
  20540. impltype: (0, _utils.validateType)("FlowType")
  20541. }
  20542. });
  20543. (0, _utils.default)("QualifiedTypeIdentifier", {
  20544. visitor: ["id", "qualification"],
  20545. aliases: ["Flow"],
  20546. fields: {
  20547. id: (0, _utils.validateType)("Identifier"),
  20548. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  20549. }
  20550. });
  20551. (0, _utils.default)("StringLiteralTypeAnnotation", {
  20552. builder: ["value"],
  20553. aliases: ["Flow", "FlowType"],
  20554. fields: {
  20555. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  20556. }
  20557. });
  20558. (0, _utils.default)("StringTypeAnnotation", {
  20559. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20560. });
  20561. (0, _utils.default)("SymbolTypeAnnotation", {
  20562. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20563. });
  20564. (0, _utils.default)("ThisTypeAnnotation", {
  20565. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20566. });
  20567. (0, _utils.default)("TupleTypeAnnotation", {
  20568. visitor: ["types"],
  20569. aliases: ["Flow", "FlowType"],
  20570. fields: {
  20571. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  20572. }
  20573. });
  20574. (0, _utils.default)("TypeofTypeAnnotation", {
  20575. visitor: ["argument"],
  20576. aliases: ["Flow", "FlowType"],
  20577. fields: {
  20578. argument: (0, _utils.validateType)("FlowType")
  20579. }
  20580. });
  20581. (0, _utils.default)("TypeAlias", {
  20582. visitor: ["id", "typeParameters", "right"],
  20583. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  20584. fields: {
  20585. id: (0, _utils.validateType)("Identifier"),
  20586. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  20587. right: (0, _utils.validateType)("FlowType")
  20588. }
  20589. });
  20590. (0, _utils.default)("TypeAnnotation", {
  20591. aliases: ["Flow"],
  20592. visitor: ["typeAnnotation"],
  20593. fields: {
  20594. typeAnnotation: (0, _utils.validateType)("FlowType")
  20595. }
  20596. });
  20597. (0, _utils.default)("TypeCastExpression", {
  20598. visitor: ["expression", "typeAnnotation"],
  20599. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  20600. fields: {
  20601. expression: (0, _utils.validateType)("Expression"),
  20602. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  20603. }
  20604. });
  20605. (0, _utils.default)("TypeParameter", {
  20606. aliases: ["Flow"],
  20607. visitor: ["bound", "default", "variance"],
  20608. fields: {
  20609. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  20610. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  20611. default: (0, _utils.validateOptionalType)("FlowType"),
  20612. variance: (0, _utils.validateOptionalType)("Variance")
  20613. }
  20614. });
  20615. (0, _utils.default)("TypeParameterDeclaration", {
  20616. aliases: ["Flow"],
  20617. visitor: ["params"],
  20618. fields: {
  20619. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  20620. }
  20621. });
  20622. (0, _utils.default)("TypeParameterInstantiation", {
  20623. aliases: ["Flow"],
  20624. visitor: ["params"],
  20625. fields: {
  20626. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  20627. }
  20628. });
  20629. (0, _utils.default)("UnionTypeAnnotation", {
  20630. visitor: ["types"],
  20631. aliases: ["Flow", "FlowType"],
  20632. fields: {
  20633. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  20634. }
  20635. });
  20636. (0, _utils.default)("Variance", {
  20637. aliases: ["Flow"],
  20638. builder: ["kind"],
  20639. fields: {
  20640. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  20641. }
  20642. });
  20643. (0, _utils.default)("VoidTypeAnnotation", {
  20644. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  20645. });
  20646. (0, _utils.default)("EnumDeclaration", {
  20647. aliases: ["Statement", "Declaration"],
  20648. visitor: ["id", "body"],
  20649. fields: {
  20650. id: (0, _utils.validateType)("Identifier"),
  20651. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  20652. }
  20653. });
  20654. (0, _utils.default)("EnumBooleanBody", {
  20655. aliases: ["EnumBody"],
  20656. visitor: ["members"],
  20657. fields: {
  20658. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20659. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  20660. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20661. }
  20662. });
  20663. (0, _utils.default)("EnumNumberBody", {
  20664. aliases: ["EnumBody"],
  20665. visitor: ["members"],
  20666. fields: {
  20667. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20668. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  20669. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20670. }
  20671. });
  20672. (0, _utils.default)("EnumStringBody", {
  20673. aliases: ["EnumBody"],
  20674. visitor: ["members"],
  20675. fields: {
  20676. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  20677. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  20678. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20679. }
  20680. });
  20681. (0, _utils.default)("EnumSymbolBody", {
  20682. aliases: ["EnumBody"],
  20683. visitor: ["members"],
  20684. fields: {
  20685. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  20686. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20687. }
  20688. });
  20689. (0, _utils.default)("EnumBooleanMember", {
  20690. aliases: ["EnumMember"],
  20691. visitor: ["id"],
  20692. fields: {
  20693. id: (0, _utils.validateType)("Identifier"),
  20694. init: (0, _utils.validateType)("BooleanLiteral")
  20695. }
  20696. });
  20697. (0, _utils.default)("EnumNumberMember", {
  20698. aliases: ["EnumMember"],
  20699. visitor: ["id", "init"],
  20700. fields: {
  20701. id: (0, _utils.validateType)("Identifier"),
  20702. init: (0, _utils.validateType)("NumericLiteral")
  20703. }
  20704. });
  20705. (0, _utils.default)("EnumStringMember", {
  20706. aliases: ["EnumMember"],
  20707. visitor: ["id", "init"],
  20708. fields: {
  20709. id: (0, _utils.validateType)("Identifier"),
  20710. init: (0, _utils.validateType)("StringLiteral")
  20711. }
  20712. });
  20713. (0, _utils.default)("EnumDefaultedMember", {
  20714. aliases: ["EnumMember"],
  20715. visitor: ["id"],
  20716. fields: {
  20717. id: (0, _utils.validateType)("Identifier")
  20718. }
  20719. });
  20720. (0, _utils.default)("IndexedAccessType", {
  20721. visitor: ["objectType", "indexType"],
  20722. aliases: ["Flow", "FlowType"],
  20723. fields: {
  20724. objectType: (0, _utils.validateType)("FlowType"),
  20725. indexType: (0, _utils.validateType)("FlowType")
  20726. }
  20727. });
  20728. (0, _utils.default)("OptionalIndexedAccessType", {
  20729. visitor: ["objectType", "indexType"],
  20730. aliases: ["Flow", "FlowType"],
  20731. fields: {
  20732. objectType: (0, _utils.validateType)("FlowType"),
  20733. indexType: (0, _utils.validateType)("FlowType"),
  20734. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  20735. }
  20736. });
  20737. }
  20738. });
  20739. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/jsx.js
  20740. var require_jsx2 = __commonJS({
  20741. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/jsx.js"() {
  20742. "use strict";
  20743. var _utils = require_utils2();
  20744. (0, _utils.default)("JSXAttribute", {
  20745. visitor: ["name", "value"],
  20746. aliases: ["JSX", "Immutable"],
  20747. fields: {
  20748. name: {
  20749. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  20750. },
  20751. value: {
  20752. optional: true,
  20753. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  20754. }
  20755. }
  20756. });
  20757. (0, _utils.default)("JSXClosingElement", {
  20758. visitor: ["name"],
  20759. aliases: ["JSX", "Immutable"],
  20760. fields: {
  20761. name: {
  20762. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  20763. }
  20764. }
  20765. });
  20766. (0, _utils.default)("JSXElement", {
  20767. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  20768. visitor: ["openingElement", "children", "closingElement"],
  20769. aliases: ["JSX", "Immutable", "Expression"],
  20770. fields: {
  20771. openingElement: {
  20772. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  20773. },
  20774. closingElement: {
  20775. optional: true,
  20776. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  20777. },
  20778. children: {
  20779. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  20780. },
  20781. selfClosing: {
  20782. validate: (0, _utils.assertValueType)("boolean"),
  20783. optional: true
  20784. }
  20785. }
  20786. });
  20787. (0, _utils.default)("JSXEmptyExpression", {
  20788. aliases: ["JSX"]
  20789. });
  20790. (0, _utils.default)("JSXExpressionContainer", {
  20791. visitor: ["expression"],
  20792. aliases: ["JSX", "Immutable"],
  20793. fields: {
  20794. expression: {
  20795. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  20796. }
  20797. }
  20798. });
  20799. (0, _utils.default)("JSXSpreadChild", {
  20800. visitor: ["expression"],
  20801. aliases: ["JSX", "Immutable"],
  20802. fields: {
  20803. expression: {
  20804. validate: (0, _utils.assertNodeType)("Expression")
  20805. }
  20806. }
  20807. });
  20808. (0, _utils.default)("JSXIdentifier", {
  20809. builder: ["name"],
  20810. aliases: ["JSX"],
  20811. fields: {
  20812. name: {
  20813. validate: (0, _utils.assertValueType)("string")
  20814. }
  20815. }
  20816. });
  20817. (0, _utils.default)("JSXMemberExpression", {
  20818. visitor: ["object", "property"],
  20819. aliases: ["JSX"],
  20820. fields: {
  20821. object: {
  20822. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  20823. },
  20824. property: {
  20825. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  20826. }
  20827. }
  20828. });
  20829. (0, _utils.default)("JSXNamespacedName", {
  20830. visitor: ["namespace", "name"],
  20831. aliases: ["JSX"],
  20832. fields: {
  20833. namespace: {
  20834. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  20835. },
  20836. name: {
  20837. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  20838. }
  20839. }
  20840. });
  20841. (0, _utils.default)("JSXOpeningElement", {
  20842. builder: ["name", "attributes", "selfClosing"],
  20843. visitor: ["name", "attributes"],
  20844. aliases: ["JSX", "Immutable"],
  20845. fields: {
  20846. name: {
  20847. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  20848. },
  20849. selfClosing: {
  20850. default: false
  20851. },
  20852. attributes: {
  20853. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  20854. },
  20855. typeParameters: {
  20856. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  20857. optional: true
  20858. }
  20859. }
  20860. });
  20861. (0, _utils.default)("JSXSpreadAttribute", {
  20862. visitor: ["argument"],
  20863. aliases: ["JSX"],
  20864. fields: {
  20865. argument: {
  20866. validate: (0, _utils.assertNodeType)("Expression")
  20867. }
  20868. }
  20869. });
  20870. (0, _utils.default)("JSXText", {
  20871. aliases: ["JSX", "Immutable"],
  20872. builder: ["value"],
  20873. fields: {
  20874. value: {
  20875. validate: (0, _utils.assertValueType)("string")
  20876. }
  20877. }
  20878. });
  20879. (0, _utils.default)("JSXFragment", {
  20880. builder: ["openingFragment", "closingFragment", "children"],
  20881. visitor: ["openingFragment", "children", "closingFragment"],
  20882. aliases: ["JSX", "Immutable", "Expression"],
  20883. fields: {
  20884. openingFragment: {
  20885. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  20886. },
  20887. closingFragment: {
  20888. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  20889. },
  20890. children: {
  20891. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  20892. }
  20893. }
  20894. });
  20895. (0, _utils.default)("JSXOpeningFragment", {
  20896. aliases: ["JSX", "Immutable"]
  20897. });
  20898. (0, _utils.default)("JSXClosingFragment", {
  20899. aliases: ["JSX", "Immutable"]
  20900. });
  20901. }
  20902. });
  20903. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/placeholders.js
  20904. var require_placeholders2 = __commonJS({
  20905. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  20906. "use strict";
  20907. Object.defineProperty(exports, "__esModule", {
  20908. value: true
  20909. });
  20910. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  20911. var _utils = require_utils2();
  20912. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  20913. exports.PLACEHOLDERS = PLACEHOLDERS;
  20914. var PLACEHOLDERS_ALIAS = {
  20915. Declaration: ["Statement"],
  20916. Pattern: ["PatternLike", "LVal"]
  20917. };
  20918. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  20919. for (const type of PLACEHOLDERS) {
  20920. const alias = _utils.ALIAS_KEYS[type];
  20921. if (alias != null && alias.length)
  20922. PLACEHOLDERS_ALIAS[type] = alias;
  20923. }
  20924. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  20925. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  20926. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  20927. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  20928. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  20929. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  20930. }
  20931. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  20932. });
  20933. });
  20934. }
  20935. });
  20936. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/misc.js
  20937. var require_misc2 = __commonJS({
  20938. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/misc.js"() {
  20939. "use strict";
  20940. var _utils = require_utils2();
  20941. var _placeholders = require_placeholders2();
  20942. {
  20943. (0, _utils.default)("Noop", {
  20944. visitor: []
  20945. });
  20946. }
  20947. (0, _utils.default)("Placeholder", {
  20948. visitor: [],
  20949. builder: ["expectedNode", "name"],
  20950. fields: {
  20951. name: {
  20952. validate: (0, _utils.assertNodeType)("Identifier")
  20953. },
  20954. expectedNode: {
  20955. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  20956. }
  20957. }
  20958. });
  20959. (0, _utils.default)("V8IntrinsicIdentifier", {
  20960. builder: ["name"],
  20961. fields: {
  20962. name: {
  20963. validate: (0, _utils.assertValueType)("string")
  20964. }
  20965. }
  20966. });
  20967. }
  20968. });
  20969. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/experimental.js
  20970. var require_experimental2 = __commonJS({
  20971. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/experimental.js"() {
  20972. "use strict";
  20973. var _utils = require_utils2();
  20974. var _core = require_core2();
  20975. (0, _utils.default)("ArgumentPlaceholder", {});
  20976. (0, _utils.default)("BindExpression", {
  20977. visitor: ["object", "callee"],
  20978. aliases: ["Expression"],
  20979. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  20980. object: {
  20981. validate: Object.assign(() => {
  20982. }, {
  20983. oneOfNodeTypes: ["Expression"]
  20984. })
  20985. },
  20986. callee: {
  20987. validate: Object.assign(() => {
  20988. }, {
  20989. oneOfNodeTypes: ["Expression"]
  20990. })
  20991. }
  20992. } : {
  20993. object: {
  20994. validate: (0, _utils.assertNodeType)("Expression")
  20995. },
  20996. callee: {
  20997. validate: (0, _utils.assertNodeType)("Expression")
  20998. }
  20999. }
  21000. });
  21001. (0, _utils.default)("ClassProperty", {
  21002. visitor: ["key", "value", "typeAnnotation", "decorators"],
  21003. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  21004. aliases: ["Property"],
  21005. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  21006. value: {
  21007. validate: (0, _utils.assertNodeType)("Expression"),
  21008. optional: true
  21009. },
  21010. definite: {
  21011. validate: (0, _utils.assertValueType)("boolean"),
  21012. optional: true
  21013. },
  21014. typeAnnotation: {
  21015. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  21016. optional: true
  21017. },
  21018. decorators: {
  21019. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  21020. optional: true
  21021. },
  21022. readonly: {
  21023. validate: (0, _utils.assertValueType)("boolean"),
  21024. optional: true
  21025. },
  21026. declare: {
  21027. validate: (0, _utils.assertValueType)("boolean"),
  21028. optional: true
  21029. }
  21030. })
  21031. });
  21032. (0, _utils.default)("PipelineTopicExpression", {
  21033. builder: ["expression"],
  21034. visitor: ["expression"],
  21035. fields: {
  21036. expression: {
  21037. validate: (0, _utils.assertNodeType)("Expression")
  21038. }
  21039. }
  21040. });
  21041. (0, _utils.default)("PipelineBareFunction", {
  21042. builder: ["callee"],
  21043. visitor: ["callee"],
  21044. fields: {
  21045. callee: {
  21046. validate: (0, _utils.assertNodeType)("Expression")
  21047. }
  21048. }
  21049. });
  21050. (0, _utils.default)("PipelinePrimaryTopicReference", {
  21051. aliases: ["Expression"]
  21052. });
  21053. (0, _utils.default)("ClassPrivateProperty", {
  21054. visitor: ["key", "value", "decorators"],
  21055. builder: ["key", "value", "decorators", "static"],
  21056. aliases: ["Property", "Private"],
  21057. fields: {
  21058. key: {
  21059. validate: (0, _utils.assertNodeType)("PrivateName")
  21060. },
  21061. value: {
  21062. validate: (0, _utils.assertNodeType)("Expression"),
  21063. optional: true
  21064. },
  21065. typeAnnotation: {
  21066. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  21067. optional: true
  21068. },
  21069. decorators: {
  21070. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  21071. optional: true
  21072. }
  21073. }
  21074. });
  21075. (0, _utils.default)("ClassPrivateMethod", {
  21076. builder: ["kind", "key", "params", "body", "static"],
  21077. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  21078. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  21079. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  21080. key: {
  21081. validate: (0, _utils.assertNodeType)("PrivateName")
  21082. },
  21083. body: {
  21084. validate: (0, _utils.assertNodeType)("BlockStatement")
  21085. }
  21086. })
  21087. });
  21088. (0, _utils.default)("ImportAttribute", {
  21089. visitor: ["key", "value"],
  21090. fields: {
  21091. key: {
  21092. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  21093. },
  21094. value: {
  21095. validate: (0, _utils.assertNodeType)("StringLiteral")
  21096. }
  21097. }
  21098. });
  21099. (0, _utils.default)("Decorator", {
  21100. visitor: ["expression"],
  21101. fields: {
  21102. expression: {
  21103. validate: (0, _utils.assertNodeType)("Expression")
  21104. }
  21105. }
  21106. });
  21107. (0, _utils.default)("DoExpression", {
  21108. visitor: ["body"],
  21109. builder: ["body", "async"],
  21110. aliases: ["Expression"],
  21111. fields: {
  21112. body: {
  21113. validate: (0, _utils.assertNodeType)("BlockStatement")
  21114. },
  21115. async: {
  21116. validate: (0, _utils.assertValueType)("boolean"),
  21117. default: false
  21118. }
  21119. }
  21120. });
  21121. (0, _utils.default)("ExportDefaultSpecifier", {
  21122. visitor: ["exported"],
  21123. aliases: ["ModuleSpecifier"],
  21124. fields: {
  21125. exported: {
  21126. validate: (0, _utils.assertNodeType)("Identifier")
  21127. }
  21128. }
  21129. });
  21130. (0, _utils.default)("PrivateName", {
  21131. visitor: ["id"],
  21132. aliases: ["Private"],
  21133. fields: {
  21134. id: {
  21135. validate: (0, _utils.assertNodeType)("Identifier")
  21136. }
  21137. }
  21138. });
  21139. (0, _utils.default)("RecordExpression", {
  21140. visitor: ["properties"],
  21141. aliases: ["Expression"],
  21142. fields: {
  21143. properties: {
  21144. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  21145. }
  21146. }
  21147. });
  21148. (0, _utils.default)("TupleExpression", {
  21149. fields: {
  21150. elements: {
  21151. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  21152. default: []
  21153. }
  21154. },
  21155. visitor: ["elements"],
  21156. aliases: ["Expression"]
  21157. });
  21158. (0, _utils.default)("DecimalLiteral", {
  21159. builder: ["value"],
  21160. fields: {
  21161. value: {
  21162. validate: (0, _utils.assertValueType)("string")
  21163. }
  21164. },
  21165. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  21166. });
  21167. (0, _utils.default)("StaticBlock", {
  21168. visitor: ["body"],
  21169. fields: {
  21170. body: {
  21171. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  21172. }
  21173. },
  21174. aliases: ["Scopable", "BlockParent"]
  21175. });
  21176. (0, _utils.default)("ModuleExpression", {
  21177. visitor: ["body"],
  21178. fields: {
  21179. body: {
  21180. validate: (0, _utils.assertNodeType)("Program")
  21181. }
  21182. },
  21183. aliases: ["Expression"]
  21184. });
  21185. }
  21186. });
  21187. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/typescript.js
  21188. var require_typescript2 = __commonJS({
  21189. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/typescript.js"() {
  21190. "use strict";
  21191. var _utils = require_utils2();
  21192. var _core = require_core2();
  21193. var bool = (0, _utils.assertValueType)("boolean");
  21194. var tSFunctionTypeAnnotationCommon = {
  21195. returnType: {
  21196. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  21197. optional: true
  21198. },
  21199. typeParameters: {
  21200. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  21201. optional: true
  21202. }
  21203. };
  21204. (0, _utils.default)("TSParameterProperty", {
  21205. aliases: ["LVal"],
  21206. visitor: ["parameter"],
  21207. fields: {
  21208. accessibility: {
  21209. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  21210. optional: true
  21211. },
  21212. readonly: {
  21213. validate: (0, _utils.assertValueType)("boolean"),
  21214. optional: true
  21215. },
  21216. parameter: {
  21217. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  21218. }
  21219. }
  21220. });
  21221. (0, _utils.default)("TSDeclareFunction", {
  21222. aliases: ["Statement", "Declaration"],
  21223. visitor: ["id", "typeParameters", "params", "returnType"],
  21224. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  21225. });
  21226. (0, _utils.default)("TSDeclareMethod", {
  21227. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  21228. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  21229. });
  21230. (0, _utils.default)("TSQualifiedName", {
  21231. aliases: ["TSEntityName"],
  21232. visitor: ["left", "right"],
  21233. fields: {
  21234. left: (0, _utils.validateType)("TSEntityName"),
  21235. right: (0, _utils.validateType)("Identifier")
  21236. }
  21237. });
  21238. var signatureDeclarationCommon = {
  21239. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  21240. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  21241. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  21242. };
  21243. var callConstructSignatureDeclaration = {
  21244. aliases: ["TSTypeElement"],
  21245. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  21246. fields: signatureDeclarationCommon
  21247. };
  21248. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  21249. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  21250. var namedTypeElementCommon = {
  21251. key: (0, _utils.validateType)("Expression"),
  21252. computed: (0, _utils.validate)(bool),
  21253. optional: (0, _utils.validateOptional)(bool)
  21254. };
  21255. (0, _utils.default)("TSPropertySignature", {
  21256. aliases: ["TSTypeElement"],
  21257. visitor: ["key", "typeAnnotation", "initializer"],
  21258. fields: Object.assign({}, namedTypeElementCommon, {
  21259. readonly: (0, _utils.validateOptional)(bool),
  21260. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  21261. initializer: (0, _utils.validateOptionalType)("Expression")
  21262. })
  21263. });
  21264. (0, _utils.default)("TSMethodSignature", {
  21265. aliases: ["TSTypeElement"],
  21266. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  21267. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  21268. kind: {
  21269. validate: (0, _utils.assertOneOf)("method", "get", "set")
  21270. }
  21271. })
  21272. });
  21273. (0, _utils.default)("TSIndexSignature", {
  21274. aliases: ["TSTypeElement"],
  21275. visitor: ["parameters", "typeAnnotation"],
  21276. fields: {
  21277. readonly: (0, _utils.validateOptional)(bool),
  21278. static: (0, _utils.validateOptional)(bool),
  21279. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  21280. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  21281. }
  21282. });
  21283. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  21284. for (const type of tsKeywordTypes) {
  21285. (0, _utils.default)(type, {
  21286. aliases: ["TSType", "TSBaseType"],
  21287. visitor: [],
  21288. fields: {}
  21289. });
  21290. }
  21291. (0, _utils.default)("TSThisType", {
  21292. aliases: ["TSType", "TSBaseType"],
  21293. visitor: [],
  21294. fields: {}
  21295. });
  21296. var fnOrCtrBase = {
  21297. aliases: ["TSType"],
  21298. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  21299. };
  21300. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  21301. fields: signatureDeclarationCommon
  21302. }));
  21303. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  21304. fields: Object.assign({}, signatureDeclarationCommon, {
  21305. abstract: (0, _utils.validateOptional)(bool)
  21306. })
  21307. }));
  21308. (0, _utils.default)("TSTypeReference", {
  21309. aliases: ["TSType"],
  21310. visitor: ["typeName", "typeParameters"],
  21311. fields: {
  21312. typeName: (0, _utils.validateType)("TSEntityName"),
  21313. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  21314. }
  21315. });
  21316. (0, _utils.default)("TSTypePredicate", {
  21317. aliases: ["TSType"],
  21318. visitor: ["parameterName", "typeAnnotation"],
  21319. builder: ["parameterName", "typeAnnotation", "asserts"],
  21320. fields: {
  21321. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  21322. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  21323. asserts: (0, _utils.validateOptional)(bool)
  21324. }
  21325. });
  21326. (0, _utils.default)("TSTypeQuery", {
  21327. aliases: ["TSType"],
  21328. visitor: ["exprName"],
  21329. fields: {
  21330. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  21331. }
  21332. });
  21333. (0, _utils.default)("TSTypeLiteral", {
  21334. aliases: ["TSType"],
  21335. visitor: ["members"],
  21336. fields: {
  21337. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  21338. }
  21339. });
  21340. (0, _utils.default)("TSArrayType", {
  21341. aliases: ["TSType"],
  21342. visitor: ["elementType"],
  21343. fields: {
  21344. elementType: (0, _utils.validateType)("TSType")
  21345. }
  21346. });
  21347. (0, _utils.default)("TSTupleType", {
  21348. aliases: ["TSType"],
  21349. visitor: ["elementTypes"],
  21350. fields: {
  21351. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  21352. }
  21353. });
  21354. (0, _utils.default)("TSOptionalType", {
  21355. aliases: ["TSType"],
  21356. visitor: ["typeAnnotation"],
  21357. fields: {
  21358. typeAnnotation: (0, _utils.validateType)("TSType")
  21359. }
  21360. });
  21361. (0, _utils.default)("TSRestType", {
  21362. aliases: ["TSType"],
  21363. visitor: ["typeAnnotation"],
  21364. fields: {
  21365. typeAnnotation: (0, _utils.validateType)("TSType")
  21366. }
  21367. });
  21368. (0, _utils.default)("TSNamedTupleMember", {
  21369. visitor: ["label", "elementType"],
  21370. builder: ["label", "elementType", "optional"],
  21371. fields: {
  21372. label: (0, _utils.validateType)("Identifier"),
  21373. optional: {
  21374. validate: bool,
  21375. default: false
  21376. },
  21377. elementType: (0, _utils.validateType)("TSType")
  21378. }
  21379. });
  21380. var unionOrIntersection = {
  21381. aliases: ["TSType"],
  21382. visitor: ["types"],
  21383. fields: {
  21384. types: (0, _utils.validateArrayOfType)("TSType")
  21385. }
  21386. };
  21387. (0, _utils.default)("TSUnionType", unionOrIntersection);
  21388. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  21389. (0, _utils.default)("TSConditionalType", {
  21390. aliases: ["TSType"],
  21391. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  21392. fields: {
  21393. checkType: (0, _utils.validateType)("TSType"),
  21394. extendsType: (0, _utils.validateType)("TSType"),
  21395. trueType: (0, _utils.validateType)("TSType"),
  21396. falseType: (0, _utils.validateType)("TSType")
  21397. }
  21398. });
  21399. (0, _utils.default)("TSInferType", {
  21400. aliases: ["TSType"],
  21401. visitor: ["typeParameter"],
  21402. fields: {
  21403. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  21404. }
  21405. });
  21406. (0, _utils.default)("TSParenthesizedType", {
  21407. aliases: ["TSType"],
  21408. visitor: ["typeAnnotation"],
  21409. fields: {
  21410. typeAnnotation: (0, _utils.validateType)("TSType")
  21411. }
  21412. });
  21413. (0, _utils.default)("TSTypeOperator", {
  21414. aliases: ["TSType"],
  21415. visitor: ["typeAnnotation"],
  21416. fields: {
  21417. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  21418. typeAnnotation: (0, _utils.validateType)("TSType")
  21419. }
  21420. });
  21421. (0, _utils.default)("TSIndexedAccessType", {
  21422. aliases: ["TSType"],
  21423. visitor: ["objectType", "indexType"],
  21424. fields: {
  21425. objectType: (0, _utils.validateType)("TSType"),
  21426. indexType: (0, _utils.validateType)("TSType")
  21427. }
  21428. });
  21429. (0, _utils.default)("TSMappedType", {
  21430. aliases: ["TSType"],
  21431. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  21432. fields: {
  21433. readonly: (0, _utils.validateOptional)(bool),
  21434. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  21435. optional: (0, _utils.validateOptional)(bool),
  21436. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  21437. nameType: (0, _utils.validateOptionalType)("TSType")
  21438. }
  21439. });
  21440. (0, _utils.default)("TSLiteralType", {
  21441. aliases: ["TSType", "TSBaseType"],
  21442. visitor: ["literal"],
  21443. fields: {
  21444. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  21445. }
  21446. });
  21447. (0, _utils.default)("TSExpressionWithTypeArguments", {
  21448. aliases: ["TSType"],
  21449. visitor: ["expression", "typeParameters"],
  21450. fields: {
  21451. expression: (0, _utils.validateType)("TSEntityName"),
  21452. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  21453. }
  21454. });
  21455. (0, _utils.default)("TSInterfaceDeclaration", {
  21456. aliases: ["Statement", "Declaration"],
  21457. visitor: ["id", "typeParameters", "extends", "body"],
  21458. fields: {
  21459. declare: (0, _utils.validateOptional)(bool),
  21460. id: (0, _utils.validateType)("Identifier"),
  21461. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  21462. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  21463. body: (0, _utils.validateType)("TSInterfaceBody")
  21464. }
  21465. });
  21466. (0, _utils.default)("TSInterfaceBody", {
  21467. visitor: ["body"],
  21468. fields: {
  21469. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  21470. }
  21471. });
  21472. (0, _utils.default)("TSTypeAliasDeclaration", {
  21473. aliases: ["Statement", "Declaration"],
  21474. visitor: ["id", "typeParameters", "typeAnnotation"],
  21475. fields: {
  21476. declare: (0, _utils.validateOptional)(bool),
  21477. id: (0, _utils.validateType)("Identifier"),
  21478. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  21479. typeAnnotation: (0, _utils.validateType)("TSType")
  21480. }
  21481. });
  21482. (0, _utils.default)("TSAsExpression", {
  21483. aliases: ["Expression"],
  21484. visitor: ["expression", "typeAnnotation"],
  21485. fields: {
  21486. expression: (0, _utils.validateType)("Expression"),
  21487. typeAnnotation: (0, _utils.validateType)("TSType")
  21488. }
  21489. });
  21490. (0, _utils.default)("TSTypeAssertion", {
  21491. aliases: ["Expression"],
  21492. visitor: ["typeAnnotation", "expression"],
  21493. fields: {
  21494. typeAnnotation: (0, _utils.validateType)("TSType"),
  21495. expression: (0, _utils.validateType)("Expression")
  21496. }
  21497. });
  21498. (0, _utils.default)("TSEnumDeclaration", {
  21499. aliases: ["Statement", "Declaration"],
  21500. visitor: ["id", "members"],
  21501. fields: {
  21502. declare: (0, _utils.validateOptional)(bool),
  21503. const: (0, _utils.validateOptional)(bool),
  21504. id: (0, _utils.validateType)("Identifier"),
  21505. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  21506. initializer: (0, _utils.validateOptionalType)("Expression")
  21507. }
  21508. });
  21509. (0, _utils.default)("TSEnumMember", {
  21510. visitor: ["id", "initializer"],
  21511. fields: {
  21512. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  21513. initializer: (0, _utils.validateOptionalType)("Expression")
  21514. }
  21515. });
  21516. (0, _utils.default)("TSModuleDeclaration", {
  21517. aliases: ["Statement", "Declaration"],
  21518. visitor: ["id", "body"],
  21519. fields: {
  21520. declare: (0, _utils.validateOptional)(bool),
  21521. global: (0, _utils.validateOptional)(bool),
  21522. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  21523. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  21524. }
  21525. });
  21526. (0, _utils.default)("TSModuleBlock", {
  21527. aliases: ["Scopable", "Block", "BlockParent"],
  21528. visitor: ["body"],
  21529. fields: {
  21530. body: (0, _utils.validateArrayOfType)("Statement")
  21531. }
  21532. });
  21533. (0, _utils.default)("TSImportType", {
  21534. aliases: ["TSType"],
  21535. visitor: ["argument", "qualifier", "typeParameters"],
  21536. fields: {
  21537. argument: (0, _utils.validateType)("StringLiteral"),
  21538. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  21539. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  21540. }
  21541. });
  21542. (0, _utils.default)("TSImportEqualsDeclaration", {
  21543. aliases: ["Statement"],
  21544. visitor: ["id", "moduleReference"],
  21545. fields: {
  21546. isExport: (0, _utils.validate)(bool),
  21547. id: (0, _utils.validateType)("Identifier"),
  21548. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  21549. }
  21550. });
  21551. (0, _utils.default)("TSExternalModuleReference", {
  21552. visitor: ["expression"],
  21553. fields: {
  21554. expression: (0, _utils.validateType)("StringLiteral")
  21555. }
  21556. });
  21557. (0, _utils.default)("TSNonNullExpression", {
  21558. aliases: ["Expression"],
  21559. visitor: ["expression"],
  21560. fields: {
  21561. expression: (0, _utils.validateType)("Expression")
  21562. }
  21563. });
  21564. (0, _utils.default)("TSExportAssignment", {
  21565. aliases: ["Statement"],
  21566. visitor: ["expression"],
  21567. fields: {
  21568. expression: (0, _utils.validateType)("Expression")
  21569. }
  21570. });
  21571. (0, _utils.default)("TSNamespaceExportDeclaration", {
  21572. aliases: ["Statement"],
  21573. visitor: ["id"],
  21574. fields: {
  21575. id: (0, _utils.validateType)("Identifier")
  21576. }
  21577. });
  21578. (0, _utils.default)("TSTypeAnnotation", {
  21579. visitor: ["typeAnnotation"],
  21580. fields: {
  21581. typeAnnotation: {
  21582. validate: (0, _utils.assertNodeType)("TSType")
  21583. }
  21584. }
  21585. });
  21586. (0, _utils.default)("TSTypeParameterInstantiation", {
  21587. visitor: ["params"],
  21588. fields: {
  21589. params: {
  21590. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  21591. }
  21592. }
  21593. });
  21594. (0, _utils.default)("TSTypeParameterDeclaration", {
  21595. visitor: ["params"],
  21596. fields: {
  21597. params: {
  21598. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  21599. }
  21600. }
  21601. });
  21602. (0, _utils.default)("TSTypeParameter", {
  21603. builder: ["constraint", "default", "name"],
  21604. visitor: ["constraint", "default"],
  21605. fields: {
  21606. name: {
  21607. validate: (0, _utils.assertValueType)("string")
  21608. },
  21609. constraint: {
  21610. validate: (0, _utils.assertNodeType)("TSType"),
  21611. optional: true
  21612. },
  21613. default: {
  21614. validate: (0, _utils.assertNodeType)("TSType"),
  21615. optional: true
  21616. }
  21617. }
  21618. });
  21619. }
  21620. });
  21621. // node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/index.js
  21622. var require_definitions2 = __commonJS({
  21623. "node_modules/estree-to-babel/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  21624. "use strict";
  21625. Object.defineProperty(exports, "__esModule", {
  21626. value: true
  21627. });
  21628. Object.defineProperty(exports, "VISITOR_KEYS", {
  21629. enumerable: true,
  21630. get: function() {
  21631. return _utils.VISITOR_KEYS;
  21632. }
  21633. });
  21634. Object.defineProperty(exports, "ALIAS_KEYS", {
  21635. enumerable: true,
  21636. get: function() {
  21637. return _utils.ALIAS_KEYS;
  21638. }
  21639. });
  21640. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  21641. enumerable: true,
  21642. get: function() {
  21643. return _utils.FLIPPED_ALIAS_KEYS;
  21644. }
  21645. });
  21646. Object.defineProperty(exports, "NODE_FIELDS", {
  21647. enumerable: true,
  21648. get: function() {
  21649. return _utils.NODE_FIELDS;
  21650. }
  21651. });
  21652. Object.defineProperty(exports, "BUILDER_KEYS", {
  21653. enumerable: true,
  21654. get: function() {
  21655. return _utils.BUILDER_KEYS;
  21656. }
  21657. });
  21658. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  21659. enumerable: true,
  21660. get: function() {
  21661. return _utils.DEPRECATED_KEYS;
  21662. }
  21663. });
  21664. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  21665. enumerable: true,
  21666. get: function() {
  21667. return _utils.NODE_PARENT_VALIDATIONS;
  21668. }
  21669. });
  21670. Object.defineProperty(exports, "PLACEHOLDERS", {
  21671. enumerable: true,
  21672. get: function() {
  21673. return _placeholders.PLACEHOLDERS;
  21674. }
  21675. });
  21676. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  21677. enumerable: true,
  21678. get: function() {
  21679. return _placeholders.PLACEHOLDERS_ALIAS;
  21680. }
  21681. });
  21682. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  21683. enumerable: true,
  21684. get: function() {
  21685. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  21686. }
  21687. });
  21688. exports.TYPES = void 0;
  21689. var _toFastProperties = require_to_fast_properties();
  21690. require_core2();
  21691. require_flow2();
  21692. require_jsx2();
  21693. require_misc2();
  21694. require_experimental2();
  21695. require_typescript2();
  21696. var _utils = require_utils2();
  21697. var _placeholders = require_placeholders2();
  21698. _toFastProperties(_utils.VISITOR_KEYS);
  21699. _toFastProperties(_utils.ALIAS_KEYS);
  21700. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  21701. _toFastProperties(_utils.NODE_FIELDS);
  21702. _toFastProperties(_utils.BUILDER_KEYS);
  21703. _toFastProperties(_utils.DEPRECATED_KEYS);
  21704. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  21705. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  21706. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  21707. exports.TYPES = TYPES;
  21708. }
  21709. });
  21710. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/builder.js
  21711. var require_builder2 = __commonJS({
  21712. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  21713. "use strict";
  21714. Object.defineProperty(exports, "__esModule", {
  21715. value: true
  21716. });
  21717. exports.default = builder;
  21718. var _definitions = require_definitions2();
  21719. var _validate = require_validate2();
  21720. function builder(type, ...args) {
  21721. const keys2 = _definitions.BUILDER_KEYS[type];
  21722. const countArgs = args.length;
  21723. if (countArgs > keys2.length) {
  21724. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  21725. }
  21726. const node = {
  21727. type
  21728. };
  21729. let i = 0;
  21730. keys2.forEach((key) => {
  21731. const field = _definitions.NODE_FIELDS[type][key];
  21732. let arg;
  21733. if (i < countArgs)
  21734. arg = args[i];
  21735. if (arg === void 0) {
  21736. arg = Array.isArray(field.default) ? [] : field.default;
  21737. }
  21738. node[key] = arg;
  21739. i++;
  21740. });
  21741. for (const key of Object.keys(node)) {
  21742. (0, _validate.default)(node, key, node[key]);
  21743. }
  21744. return node;
  21745. }
  21746. }
  21747. });
  21748. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/generated/index.js
  21749. var require_generated7 = __commonJS({
  21750. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  21751. "use strict";
  21752. Object.defineProperty(exports, "__esModule", {
  21753. value: true
  21754. });
  21755. exports.arrayExpression = arrayExpression;
  21756. exports.assignmentExpression = assignmentExpression;
  21757. exports.binaryExpression = binaryExpression;
  21758. exports.interpreterDirective = interpreterDirective;
  21759. exports.directive = directive;
  21760. exports.directiveLiteral = directiveLiteral;
  21761. exports.blockStatement = blockStatement;
  21762. exports.breakStatement = breakStatement;
  21763. exports.callExpression = callExpression;
  21764. exports.catchClause = catchClause;
  21765. exports.conditionalExpression = conditionalExpression;
  21766. exports.continueStatement = continueStatement;
  21767. exports.debuggerStatement = debuggerStatement;
  21768. exports.doWhileStatement = doWhileStatement;
  21769. exports.emptyStatement = emptyStatement;
  21770. exports.expressionStatement = expressionStatement;
  21771. exports.file = file;
  21772. exports.forInStatement = forInStatement;
  21773. exports.forStatement = forStatement;
  21774. exports.functionDeclaration = functionDeclaration;
  21775. exports.functionExpression = functionExpression;
  21776. exports.identifier = identifier;
  21777. exports.ifStatement = ifStatement;
  21778. exports.labeledStatement = labeledStatement;
  21779. exports.stringLiteral = stringLiteral;
  21780. exports.numericLiteral = numericLiteral;
  21781. exports.nullLiteral = nullLiteral;
  21782. exports.booleanLiteral = booleanLiteral;
  21783. exports.regExpLiteral = regExpLiteral;
  21784. exports.logicalExpression = logicalExpression;
  21785. exports.memberExpression = memberExpression;
  21786. exports.newExpression = newExpression;
  21787. exports.program = program;
  21788. exports.objectExpression = objectExpression;
  21789. exports.objectMethod = objectMethod;
  21790. exports.objectProperty = objectProperty;
  21791. exports.restElement = restElement;
  21792. exports.returnStatement = returnStatement;
  21793. exports.sequenceExpression = sequenceExpression;
  21794. exports.parenthesizedExpression = parenthesizedExpression;
  21795. exports.switchCase = switchCase;
  21796. exports.switchStatement = switchStatement;
  21797. exports.thisExpression = thisExpression;
  21798. exports.throwStatement = throwStatement;
  21799. exports.tryStatement = tryStatement;
  21800. exports.unaryExpression = unaryExpression;
  21801. exports.updateExpression = updateExpression;
  21802. exports.variableDeclaration = variableDeclaration;
  21803. exports.variableDeclarator = variableDeclarator;
  21804. exports.whileStatement = whileStatement;
  21805. exports.withStatement = withStatement;
  21806. exports.assignmentPattern = assignmentPattern;
  21807. exports.arrayPattern = arrayPattern;
  21808. exports.arrowFunctionExpression = arrowFunctionExpression;
  21809. exports.classBody = classBody;
  21810. exports.classExpression = classExpression;
  21811. exports.classDeclaration = classDeclaration;
  21812. exports.exportAllDeclaration = exportAllDeclaration;
  21813. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  21814. exports.exportNamedDeclaration = exportNamedDeclaration;
  21815. exports.exportSpecifier = exportSpecifier;
  21816. exports.forOfStatement = forOfStatement;
  21817. exports.importDeclaration = importDeclaration;
  21818. exports.importDefaultSpecifier = importDefaultSpecifier;
  21819. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  21820. exports.importSpecifier = importSpecifier;
  21821. exports.metaProperty = metaProperty;
  21822. exports.classMethod = classMethod;
  21823. exports.objectPattern = objectPattern;
  21824. exports.spreadElement = spreadElement;
  21825. exports.super = _super;
  21826. exports.taggedTemplateExpression = taggedTemplateExpression;
  21827. exports.templateElement = templateElement;
  21828. exports.templateLiteral = templateLiteral;
  21829. exports.yieldExpression = yieldExpression;
  21830. exports.awaitExpression = awaitExpression;
  21831. exports.import = _import;
  21832. exports.bigIntLiteral = bigIntLiteral;
  21833. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  21834. exports.optionalMemberExpression = optionalMemberExpression;
  21835. exports.optionalCallExpression = optionalCallExpression;
  21836. exports.anyTypeAnnotation = anyTypeAnnotation;
  21837. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  21838. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  21839. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  21840. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  21841. exports.classImplements = classImplements;
  21842. exports.declareClass = declareClass;
  21843. exports.declareFunction = declareFunction;
  21844. exports.declareInterface = declareInterface;
  21845. exports.declareModule = declareModule;
  21846. exports.declareModuleExports = declareModuleExports;
  21847. exports.declareTypeAlias = declareTypeAlias;
  21848. exports.declareOpaqueType = declareOpaqueType;
  21849. exports.declareVariable = declareVariable;
  21850. exports.declareExportDeclaration = declareExportDeclaration;
  21851. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  21852. exports.declaredPredicate = declaredPredicate;
  21853. exports.existsTypeAnnotation = existsTypeAnnotation;
  21854. exports.functionTypeAnnotation = functionTypeAnnotation;
  21855. exports.functionTypeParam = functionTypeParam;
  21856. exports.genericTypeAnnotation = genericTypeAnnotation;
  21857. exports.inferredPredicate = inferredPredicate;
  21858. exports.interfaceExtends = interfaceExtends;
  21859. exports.interfaceDeclaration = interfaceDeclaration;
  21860. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  21861. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  21862. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  21863. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  21864. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  21865. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  21866. exports.numberTypeAnnotation = numberTypeAnnotation;
  21867. exports.objectTypeAnnotation = objectTypeAnnotation;
  21868. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  21869. exports.objectTypeCallProperty = objectTypeCallProperty;
  21870. exports.objectTypeIndexer = objectTypeIndexer;
  21871. exports.objectTypeProperty = objectTypeProperty;
  21872. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  21873. exports.opaqueType = opaqueType;
  21874. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  21875. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  21876. exports.stringTypeAnnotation = stringTypeAnnotation;
  21877. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  21878. exports.thisTypeAnnotation = thisTypeAnnotation;
  21879. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  21880. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  21881. exports.typeAlias = typeAlias;
  21882. exports.typeAnnotation = typeAnnotation;
  21883. exports.typeCastExpression = typeCastExpression;
  21884. exports.typeParameter = typeParameter;
  21885. exports.typeParameterDeclaration = typeParameterDeclaration;
  21886. exports.typeParameterInstantiation = typeParameterInstantiation;
  21887. exports.unionTypeAnnotation = unionTypeAnnotation;
  21888. exports.variance = variance;
  21889. exports.voidTypeAnnotation = voidTypeAnnotation;
  21890. exports.enumDeclaration = enumDeclaration;
  21891. exports.enumBooleanBody = enumBooleanBody;
  21892. exports.enumNumberBody = enumNumberBody;
  21893. exports.enumStringBody = enumStringBody;
  21894. exports.enumSymbolBody = enumSymbolBody;
  21895. exports.enumBooleanMember = enumBooleanMember;
  21896. exports.enumNumberMember = enumNumberMember;
  21897. exports.enumStringMember = enumStringMember;
  21898. exports.enumDefaultedMember = enumDefaultedMember;
  21899. exports.indexedAccessType = indexedAccessType;
  21900. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  21901. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  21902. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  21903. exports.jSXElement = exports.jsxElement = jsxElement;
  21904. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  21905. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  21906. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  21907. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  21908. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  21909. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  21910. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  21911. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  21912. exports.jSXText = exports.jsxText = jsxText2;
  21913. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  21914. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  21915. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  21916. exports.noop = noop;
  21917. exports.placeholder = placeholder;
  21918. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  21919. exports.argumentPlaceholder = argumentPlaceholder;
  21920. exports.bindExpression = bindExpression;
  21921. exports.classProperty = classProperty;
  21922. exports.pipelineTopicExpression = pipelineTopicExpression;
  21923. exports.pipelineBareFunction = pipelineBareFunction;
  21924. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  21925. exports.classPrivateProperty = classPrivateProperty;
  21926. exports.classPrivateMethod = classPrivateMethod;
  21927. exports.importAttribute = importAttribute;
  21928. exports.decorator = decorator;
  21929. exports.doExpression = doExpression;
  21930. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  21931. exports.privateName = privateName;
  21932. exports.recordExpression = recordExpression;
  21933. exports.tupleExpression = tupleExpression;
  21934. exports.decimalLiteral = decimalLiteral;
  21935. exports.staticBlock = staticBlock;
  21936. exports.moduleExpression = moduleExpression;
  21937. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  21938. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  21939. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  21940. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  21941. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  21942. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  21943. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  21944. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  21945. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  21946. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  21947. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  21948. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  21949. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  21950. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  21951. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  21952. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  21953. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  21954. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  21955. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  21956. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  21957. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  21958. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  21959. exports.tSThisType = exports.tsThisType = tsThisType;
  21960. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  21961. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  21962. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  21963. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  21964. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  21965. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  21966. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  21967. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  21968. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  21969. exports.tSRestType = exports.tsRestType = tsRestType;
  21970. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  21971. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  21972. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  21973. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  21974. exports.tSInferType = exports.tsInferType = tsInferType;
  21975. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  21976. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  21977. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  21978. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  21979. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  21980. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  21981. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  21982. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  21983. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  21984. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  21985. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  21986. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  21987. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  21988. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  21989. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  21990. exports.tSImportType = exports.tsImportType = tsImportType;
  21991. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  21992. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  21993. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  21994. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  21995. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  21996. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  21997. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  21998. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  21999. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  22000. exports.numberLiteral = NumberLiteral;
  22001. exports.regexLiteral = RegexLiteral;
  22002. exports.restProperty = RestProperty;
  22003. exports.spreadProperty = SpreadProperty;
  22004. var _builder = require_builder2();
  22005. function arrayExpression(elements) {
  22006. return (0, _builder.default)("ArrayExpression", ...arguments);
  22007. }
  22008. function assignmentExpression(operator, left, right) {
  22009. return (0, _builder.default)("AssignmentExpression", ...arguments);
  22010. }
  22011. function binaryExpression(operator, left, right) {
  22012. return (0, _builder.default)("BinaryExpression", ...arguments);
  22013. }
  22014. function interpreterDirective(value) {
  22015. return (0, _builder.default)("InterpreterDirective", ...arguments);
  22016. }
  22017. function directive(value) {
  22018. return (0, _builder.default)("Directive", ...arguments);
  22019. }
  22020. function directiveLiteral(value) {
  22021. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  22022. }
  22023. function blockStatement(body, directives) {
  22024. return (0, _builder.default)("BlockStatement", ...arguments);
  22025. }
  22026. function breakStatement(label) {
  22027. return (0, _builder.default)("BreakStatement", ...arguments);
  22028. }
  22029. function callExpression(callee, _arguments) {
  22030. return (0, _builder.default)("CallExpression", ...arguments);
  22031. }
  22032. function catchClause(param, body) {
  22033. return (0, _builder.default)("CatchClause", ...arguments);
  22034. }
  22035. function conditionalExpression(test, consequent, alternate) {
  22036. return (0, _builder.default)("ConditionalExpression", ...arguments);
  22037. }
  22038. function continueStatement(label) {
  22039. return (0, _builder.default)("ContinueStatement", ...arguments);
  22040. }
  22041. function debuggerStatement() {
  22042. return (0, _builder.default)("DebuggerStatement", ...arguments);
  22043. }
  22044. function doWhileStatement(test, body) {
  22045. return (0, _builder.default)("DoWhileStatement", ...arguments);
  22046. }
  22047. function emptyStatement() {
  22048. return (0, _builder.default)("EmptyStatement", ...arguments);
  22049. }
  22050. function expressionStatement(expression) {
  22051. return (0, _builder.default)("ExpressionStatement", ...arguments);
  22052. }
  22053. function file(program2, comments, tokens) {
  22054. return (0, _builder.default)("File", ...arguments);
  22055. }
  22056. function forInStatement(left, right, body) {
  22057. return (0, _builder.default)("ForInStatement", ...arguments);
  22058. }
  22059. function forStatement(init, test, update, body) {
  22060. return (0, _builder.default)("ForStatement", ...arguments);
  22061. }
  22062. function functionDeclaration(id, params, body, generator, async) {
  22063. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  22064. }
  22065. function functionExpression(id, params, body, generator, async) {
  22066. return (0, _builder.default)("FunctionExpression", ...arguments);
  22067. }
  22068. function identifier(name2) {
  22069. return (0, _builder.default)("Identifier", ...arguments);
  22070. }
  22071. function ifStatement(test, consequent, alternate) {
  22072. return (0, _builder.default)("IfStatement", ...arguments);
  22073. }
  22074. function labeledStatement(label, body) {
  22075. return (0, _builder.default)("LabeledStatement", ...arguments);
  22076. }
  22077. function stringLiteral(value) {
  22078. return (0, _builder.default)("StringLiteral", ...arguments);
  22079. }
  22080. function numericLiteral(value) {
  22081. return (0, _builder.default)("NumericLiteral", ...arguments);
  22082. }
  22083. function nullLiteral() {
  22084. return (0, _builder.default)("NullLiteral", ...arguments);
  22085. }
  22086. function booleanLiteral(value) {
  22087. return (0, _builder.default)("BooleanLiteral", ...arguments);
  22088. }
  22089. function regExpLiteral(pattern, flags) {
  22090. return (0, _builder.default)("RegExpLiteral", ...arguments);
  22091. }
  22092. function logicalExpression(operator, left, right) {
  22093. return (0, _builder.default)("LogicalExpression", ...arguments);
  22094. }
  22095. function memberExpression(object, property, computed, optional) {
  22096. return (0, _builder.default)("MemberExpression", ...arguments);
  22097. }
  22098. function newExpression(callee, _arguments) {
  22099. return (0, _builder.default)("NewExpression", ...arguments);
  22100. }
  22101. function program(body, directives, sourceType, interpreter) {
  22102. return (0, _builder.default)("Program", ...arguments);
  22103. }
  22104. function objectExpression(properties) {
  22105. return (0, _builder.default)("ObjectExpression", ...arguments);
  22106. }
  22107. function objectMethod(kind, key, params, body, computed, generator, async) {
  22108. return (0, _builder.default)("ObjectMethod", ...arguments);
  22109. }
  22110. function objectProperty(key, value, computed, shorthand, decorators) {
  22111. return (0, _builder.default)("ObjectProperty", ...arguments);
  22112. }
  22113. function restElement(argument) {
  22114. return (0, _builder.default)("RestElement", ...arguments);
  22115. }
  22116. function returnStatement(argument) {
  22117. return (0, _builder.default)("ReturnStatement", ...arguments);
  22118. }
  22119. function sequenceExpression(expressions) {
  22120. return (0, _builder.default)("SequenceExpression", ...arguments);
  22121. }
  22122. function parenthesizedExpression(expression) {
  22123. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  22124. }
  22125. function switchCase(test, consequent) {
  22126. return (0, _builder.default)("SwitchCase", ...arguments);
  22127. }
  22128. function switchStatement(discriminant, cases) {
  22129. return (0, _builder.default)("SwitchStatement", ...arguments);
  22130. }
  22131. function thisExpression() {
  22132. return (0, _builder.default)("ThisExpression", ...arguments);
  22133. }
  22134. function throwStatement(argument) {
  22135. return (0, _builder.default)("ThrowStatement", ...arguments);
  22136. }
  22137. function tryStatement(block, handler, finalizer) {
  22138. return (0, _builder.default)("TryStatement", ...arguments);
  22139. }
  22140. function unaryExpression(operator, argument, prefix) {
  22141. return (0, _builder.default)("UnaryExpression", ...arguments);
  22142. }
  22143. function updateExpression(operator, argument, prefix) {
  22144. return (0, _builder.default)("UpdateExpression", ...arguments);
  22145. }
  22146. function variableDeclaration(kind, declarations) {
  22147. return (0, _builder.default)("VariableDeclaration", ...arguments);
  22148. }
  22149. function variableDeclarator(id, init) {
  22150. return (0, _builder.default)("VariableDeclarator", ...arguments);
  22151. }
  22152. function whileStatement(test, body) {
  22153. return (0, _builder.default)("WhileStatement", ...arguments);
  22154. }
  22155. function withStatement(object, body) {
  22156. return (0, _builder.default)("WithStatement", ...arguments);
  22157. }
  22158. function assignmentPattern(left, right) {
  22159. return (0, _builder.default)("AssignmentPattern", ...arguments);
  22160. }
  22161. function arrayPattern(elements) {
  22162. return (0, _builder.default)("ArrayPattern", ...arguments);
  22163. }
  22164. function arrowFunctionExpression(params, body, async) {
  22165. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  22166. }
  22167. function classBody(body) {
  22168. return (0, _builder.default)("ClassBody", ...arguments);
  22169. }
  22170. function classExpression(id, superClass, body, decorators) {
  22171. return (0, _builder.default)("ClassExpression", ...arguments);
  22172. }
  22173. function classDeclaration(id, superClass, body, decorators) {
  22174. return (0, _builder.default)("ClassDeclaration", ...arguments);
  22175. }
  22176. function exportAllDeclaration(source) {
  22177. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  22178. }
  22179. function exportDefaultDeclaration(declaration) {
  22180. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  22181. }
  22182. function exportNamedDeclaration(declaration, specifiers, source) {
  22183. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  22184. }
  22185. function exportSpecifier(local, exported) {
  22186. return (0, _builder.default)("ExportSpecifier", ...arguments);
  22187. }
  22188. function forOfStatement(left, right, body, _await) {
  22189. return (0, _builder.default)("ForOfStatement", ...arguments);
  22190. }
  22191. function importDeclaration(specifiers, source) {
  22192. return (0, _builder.default)("ImportDeclaration", ...arguments);
  22193. }
  22194. function importDefaultSpecifier(local) {
  22195. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  22196. }
  22197. function importNamespaceSpecifier(local) {
  22198. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  22199. }
  22200. function importSpecifier(local, imported) {
  22201. return (0, _builder.default)("ImportSpecifier", ...arguments);
  22202. }
  22203. function metaProperty(meta, property) {
  22204. return (0, _builder.default)("MetaProperty", ...arguments);
  22205. }
  22206. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  22207. return (0, _builder.default)("ClassMethod", ...arguments);
  22208. }
  22209. function objectPattern(properties) {
  22210. return (0, _builder.default)("ObjectPattern", ...arguments);
  22211. }
  22212. function spreadElement(argument) {
  22213. return (0, _builder.default)("SpreadElement", ...arguments);
  22214. }
  22215. function _super() {
  22216. return (0, _builder.default)("Super", ...arguments);
  22217. }
  22218. function taggedTemplateExpression(tag, quasi) {
  22219. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  22220. }
  22221. function templateElement(value, tail) {
  22222. return (0, _builder.default)("TemplateElement", ...arguments);
  22223. }
  22224. function templateLiteral(quasis, expressions) {
  22225. return (0, _builder.default)("TemplateLiteral", ...arguments);
  22226. }
  22227. function yieldExpression(argument, delegate) {
  22228. return (0, _builder.default)("YieldExpression", ...arguments);
  22229. }
  22230. function awaitExpression(argument) {
  22231. return (0, _builder.default)("AwaitExpression", ...arguments);
  22232. }
  22233. function _import() {
  22234. return (0, _builder.default)("Import", ...arguments);
  22235. }
  22236. function bigIntLiteral(value) {
  22237. return (0, _builder.default)("BigIntLiteral", ...arguments);
  22238. }
  22239. function exportNamespaceSpecifier(exported) {
  22240. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  22241. }
  22242. function optionalMemberExpression(object, property, computed, optional) {
  22243. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  22244. }
  22245. function optionalCallExpression(callee, _arguments, optional) {
  22246. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  22247. }
  22248. function anyTypeAnnotation() {
  22249. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  22250. }
  22251. function arrayTypeAnnotation(elementType) {
  22252. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  22253. }
  22254. function booleanTypeAnnotation() {
  22255. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  22256. }
  22257. function booleanLiteralTypeAnnotation(value) {
  22258. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  22259. }
  22260. function nullLiteralTypeAnnotation() {
  22261. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  22262. }
  22263. function classImplements(id, typeParameters) {
  22264. return (0, _builder.default)("ClassImplements", ...arguments);
  22265. }
  22266. function declareClass(id, typeParameters, _extends, body) {
  22267. return (0, _builder.default)("DeclareClass", ...arguments);
  22268. }
  22269. function declareFunction(id) {
  22270. return (0, _builder.default)("DeclareFunction", ...arguments);
  22271. }
  22272. function declareInterface(id, typeParameters, _extends, body) {
  22273. return (0, _builder.default)("DeclareInterface", ...arguments);
  22274. }
  22275. function declareModule(id, body, kind) {
  22276. return (0, _builder.default)("DeclareModule", ...arguments);
  22277. }
  22278. function declareModuleExports(typeAnnotation2) {
  22279. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  22280. }
  22281. function declareTypeAlias(id, typeParameters, right) {
  22282. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  22283. }
  22284. function declareOpaqueType(id, typeParameters, supertype) {
  22285. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  22286. }
  22287. function declareVariable(id) {
  22288. return (0, _builder.default)("DeclareVariable", ...arguments);
  22289. }
  22290. function declareExportDeclaration(declaration, specifiers, source) {
  22291. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  22292. }
  22293. function declareExportAllDeclaration(source) {
  22294. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  22295. }
  22296. function declaredPredicate(value) {
  22297. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  22298. }
  22299. function existsTypeAnnotation() {
  22300. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  22301. }
  22302. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  22303. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  22304. }
  22305. function functionTypeParam(name2, typeAnnotation2) {
  22306. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  22307. }
  22308. function genericTypeAnnotation(id, typeParameters) {
  22309. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  22310. }
  22311. function inferredPredicate() {
  22312. return (0, _builder.default)("InferredPredicate", ...arguments);
  22313. }
  22314. function interfaceExtends(id, typeParameters) {
  22315. return (0, _builder.default)("InterfaceExtends", ...arguments);
  22316. }
  22317. function interfaceDeclaration(id, typeParameters, _extends, body) {
  22318. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  22319. }
  22320. function interfaceTypeAnnotation(_extends, body) {
  22321. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  22322. }
  22323. function intersectionTypeAnnotation(types2) {
  22324. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  22325. }
  22326. function mixedTypeAnnotation() {
  22327. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  22328. }
  22329. function emptyTypeAnnotation() {
  22330. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  22331. }
  22332. function nullableTypeAnnotation(typeAnnotation2) {
  22333. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  22334. }
  22335. function numberLiteralTypeAnnotation(value) {
  22336. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  22337. }
  22338. function numberTypeAnnotation() {
  22339. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  22340. }
  22341. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  22342. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  22343. }
  22344. function objectTypeInternalSlot(id, value, optional, _static, method) {
  22345. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  22346. }
  22347. function objectTypeCallProperty(value) {
  22348. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  22349. }
  22350. function objectTypeIndexer(id, key, value, variance2) {
  22351. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  22352. }
  22353. function objectTypeProperty(key, value, variance2) {
  22354. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  22355. }
  22356. function objectTypeSpreadProperty(argument) {
  22357. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  22358. }
  22359. function opaqueType(id, typeParameters, supertype, impltype) {
  22360. return (0, _builder.default)("OpaqueType", ...arguments);
  22361. }
  22362. function qualifiedTypeIdentifier(id, qualification) {
  22363. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  22364. }
  22365. function stringLiteralTypeAnnotation(value) {
  22366. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  22367. }
  22368. function stringTypeAnnotation() {
  22369. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  22370. }
  22371. function symbolTypeAnnotation() {
  22372. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  22373. }
  22374. function thisTypeAnnotation() {
  22375. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  22376. }
  22377. function tupleTypeAnnotation(types2) {
  22378. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  22379. }
  22380. function typeofTypeAnnotation(argument) {
  22381. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  22382. }
  22383. function typeAlias(id, typeParameters, right) {
  22384. return (0, _builder.default)("TypeAlias", ...arguments);
  22385. }
  22386. function typeAnnotation(typeAnnotation2) {
  22387. return (0, _builder.default)("TypeAnnotation", ...arguments);
  22388. }
  22389. function typeCastExpression(expression, typeAnnotation2) {
  22390. return (0, _builder.default)("TypeCastExpression", ...arguments);
  22391. }
  22392. function typeParameter(bound, _default, variance2) {
  22393. return (0, _builder.default)("TypeParameter", ...arguments);
  22394. }
  22395. function typeParameterDeclaration(params) {
  22396. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  22397. }
  22398. function typeParameterInstantiation(params) {
  22399. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  22400. }
  22401. function unionTypeAnnotation(types2) {
  22402. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  22403. }
  22404. function variance(kind) {
  22405. return (0, _builder.default)("Variance", ...arguments);
  22406. }
  22407. function voidTypeAnnotation() {
  22408. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  22409. }
  22410. function enumDeclaration(id, body) {
  22411. return (0, _builder.default)("EnumDeclaration", ...arguments);
  22412. }
  22413. function enumBooleanBody(members) {
  22414. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  22415. }
  22416. function enumNumberBody(members) {
  22417. return (0, _builder.default)("EnumNumberBody", ...arguments);
  22418. }
  22419. function enumStringBody(members) {
  22420. return (0, _builder.default)("EnumStringBody", ...arguments);
  22421. }
  22422. function enumSymbolBody(members) {
  22423. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  22424. }
  22425. function enumBooleanMember(id) {
  22426. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  22427. }
  22428. function enumNumberMember(id, init) {
  22429. return (0, _builder.default)("EnumNumberMember", ...arguments);
  22430. }
  22431. function enumStringMember(id, init) {
  22432. return (0, _builder.default)("EnumStringMember", ...arguments);
  22433. }
  22434. function enumDefaultedMember(id) {
  22435. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  22436. }
  22437. function indexedAccessType(objectType, indexType) {
  22438. return (0, _builder.default)("IndexedAccessType", ...arguments);
  22439. }
  22440. function optionalIndexedAccessType(objectType, indexType) {
  22441. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  22442. }
  22443. function jsxAttribute(name2, value) {
  22444. return (0, _builder.default)("JSXAttribute", ...arguments);
  22445. }
  22446. function jsxClosingElement(name2) {
  22447. return (0, _builder.default)("JSXClosingElement", ...arguments);
  22448. }
  22449. function jsxElement(openingElement, closingElement, children, selfClosing) {
  22450. return (0, _builder.default)("JSXElement", ...arguments);
  22451. }
  22452. function jsxEmptyExpression() {
  22453. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  22454. }
  22455. function jsxExpressionContainer(expression) {
  22456. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  22457. }
  22458. function jsxSpreadChild(expression) {
  22459. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  22460. }
  22461. function jsxIdentifier(name2) {
  22462. return (0, _builder.default)("JSXIdentifier", ...arguments);
  22463. }
  22464. function jsxMemberExpression(object, property) {
  22465. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  22466. }
  22467. function jsxNamespacedName(namespace, name2) {
  22468. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  22469. }
  22470. function jsxOpeningElement(name2, attributes, selfClosing) {
  22471. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  22472. }
  22473. function jsxSpreadAttribute(argument) {
  22474. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  22475. }
  22476. function jsxText2(value) {
  22477. return (0, _builder.default)("JSXText", ...arguments);
  22478. }
  22479. function jsxFragment(openingFragment, closingFragment, children) {
  22480. return (0, _builder.default)("JSXFragment", ...arguments);
  22481. }
  22482. function jsxOpeningFragment() {
  22483. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  22484. }
  22485. function jsxClosingFragment() {
  22486. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  22487. }
  22488. function noop() {
  22489. return (0, _builder.default)("Noop", ...arguments);
  22490. }
  22491. function placeholder(expectedNode, name2) {
  22492. return (0, _builder.default)("Placeholder", ...arguments);
  22493. }
  22494. function v8IntrinsicIdentifier(name2) {
  22495. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  22496. }
  22497. function argumentPlaceholder() {
  22498. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  22499. }
  22500. function bindExpression(object, callee) {
  22501. return (0, _builder.default)("BindExpression", ...arguments);
  22502. }
  22503. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  22504. return (0, _builder.default)("ClassProperty", ...arguments);
  22505. }
  22506. function pipelineTopicExpression(expression) {
  22507. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  22508. }
  22509. function pipelineBareFunction(callee) {
  22510. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  22511. }
  22512. function pipelinePrimaryTopicReference() {
  22513. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  22514. }
  22515. function classPrivateProperty(key, value, decorators, _static) {
  22516. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  22517. }
  22518. function classPrivateMethod(kind, key, params, body, _static) {
  22519. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  22520. }
  22521. function importAttribute(key, value) {
  22522. return (0, _builder.default)("ImportAttribute", ...arguments);
  22523. }
  22524. function decorator(expression) {
  22525. return (0, _builder.default)("Decorator", ...arguments);
  22526. }
  22527. function doExpression(body, async) {
  22528. return (0, _builder.default)("DoExpression", ...arguments);
  22529. }
  22530. function exportDefaultSpecifier(exported) {
  22531. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  22532. }
  22533. function privateName(id) {
  22534. return (0, _builder.default)("PrivateName", ...arguments);
  22535. }
  22536. function recordExpression(properties) {
  22537. return (0, _builder.default)("RecordExpression", ...arguments);
  22538. }
  22539. function tupleExpression(elements) {
  22540. return (0, _builder.default)("TupleExpression", ...arguments);
  22541. }
  22542. function decimalLiteral(value) {
  22543. return (0, _builder.default)("DecimalLiteral", ...arguments);
  22544. }
  22545. function staticBlock(body) {
  22546. return (0, _builder.default)("StaticBlock", ...arguments);
  22547. }
  22548. function moduleExpression(body) {
  22549. return (0, _builder.default)("ModuleExpression", ...arguments);
  22550. }
  22551. function tsParameterProperty(parameter) {
  22552. return (0, _builder.default)("TSParameterProperty", ...arguments);
  22553. }
  22554. function tsDeclareFunction(id, typeParameters, params, returnType) {
  22555. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  22556. }
  22557. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  22558. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  22559. }
  22560. function tsQualifiedName(left, right) {
  22561. return (0, _builder.default)("TSQualifiedName", ...arguments);
  22562. }
  22563. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  22564. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  22565. }
  22566. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  22567. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  22568. }
  22569. function tsPropertySignature(key, typeAnnotation2, initializer) {
  22570. return (0, _builder.default)("TSPropertySignature", ...arguments);
  22571. }
  22572. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  22573. return (0, _builder.default)("TSMethodSignature", ...arguments);
  22574. }
  22575. function tsIndexSignature(parameters, typeAnnotation2) {
  22576. return (0, _builder.default)("TSIndexSignature", ...arguments);
  22577. }
  22578. function tsAnyKeyword() {
  22579. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  22580. }
  22581. function tsBooleanKeyword() {
  22582. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  22583. }
  22584. function tsBigIntKeyword() {
  22585. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  22586. }
  22587. function tsIntrinsicKeyword() {
  22588. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  22589. }
  22590. function tsNeverKeyword() {
  22591. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  22592. }
  22593. function tsNullKeyword() {
  22594. return (0, _builder.default)("TSNullKeyword", ...arguments);
  22595. }
  22596. function tsNumberKeyword() {
  22597. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  22598. }
  22599. function tsObjectKeyword() {
  22600. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  22601. }
  22602. function tsStringKeyword() {
  22603. return (0, _builder.default)("TSStringKeyword", ...arguments);
  22604. }
  22605. function tsSymbolKeyword() {
  22606. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  22607. }
  22608. function tsUndefinedKeyword() {
  22609. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  22610. }
  22611. function tsUnknownKeyword() {
  22612. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  22613. }
  22614. function tsVoidKeyword() {
  22615. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  22616. }
  22617. function tsThisType() {
  22618. return (0, _builder.default)("TSThisType", ...arguments);
  22619. }
  22620. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  22621. return (0, _builder.default)("TSFunctionType", ...arguments);
  22622. }
  22623. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  22624. return (0, _builder.default)("TSConstructorType", ...arguments);
  22625. }
  22626. function tsTypeReference(typeName, typeParameters) {
  22627. return (0, _builder.default)("TSTypeReference", ...arguments);
  22628. }
  22629. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  22630. return (0, _builder.default)("TSTypePredicate", ...arguments);
  22631. }
  22632. function tsTypeQuery(exprName) {
  22633. return (0, _builder.default)("TSTypeQuery", ...arguments);
  22634. }
  22635. function tsTypeLiteral(members) {
  22636. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  22637. }
  22638. function tsArrayType(elementType) {
  22639. return (0, _builder.default)("TSArrayType", ...arguments);
  22640. }
  22641. function tsTupleType(elementTypes) {
  22642. return (0, _builder.default)("TSTupleType", ...arguments);
  22643. }
  22644. function tsOptionalType(typeAnnotation2) {
  22645. return (0, _builder.default)("TSOptionalType", ...arguments);
  22646. }
  22647. function tsRestType(typeAnnotation2) {
  22648. return (0, _builder.default)("TSRestType", ...arguments);
  22649. }
  22650. function tsNamedTupleMember(label, elementType, optional) {
  22651. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  22652. }
  22653. function tsUnionType(types2) {
  22654. return (0, _builder.default)("TSUnionType", ...arguments);
  22655. }
  22656. function tsIntersectionType(types2) {
  22657. return (0, _builder.default)("TSIntersectionType", ...arguments);
  22658. }
  22659. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  22660. return (0, _builder.default)("TSConditionalType", ...arguments);
  22661. }
  22662. function tsInferType(typeParameter2) {
  22663. return (0, _builder.default)("TSInferType", ...arguments);
  22664. }
  22665. function tsParenthesizedType(typeAnnotation2) {
  22666. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  22667. }
  22668. function tsTypeOperator(typeAnnotation2) {
  22669. return (0, _builder.default)("TSTypeOperator", ...arguments);
  22670. }
  22671. function tsIndexedAccessType(objectType, indexType) {
  22672. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  22673. }
  22674. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  22675. return (0, _builder.default)("TSMappedType", ...arguments);
  22676. }
  22677. function tsLiteralType(literal2) {
  22678. return (0, _builder.default)("TSLiteralType", ...arguments);
  22679. }
  22680. function tsExpressionWithTypeArguments(expression, typeParameters) {
  22681. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  22682. }
  22683. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  22684. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  22685. }
  22686. function tsInterfaceBody(body) {
  22687. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  22688. }
  22689. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  22690. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  22691. }
  22692. function tsAsExpression(expression, typeAnnotation2) {
  22693. return (0, _builder.default)("TSAsExpression", ...arguments);
  22694. }
  22695. function tsTypeAssertion(typeAnnotation2, expression) {
  22696. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  22697. }
  22698. function tsEnumDeclaration(id, members) {
  22699. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  22700. }
  22701. function tsEnumMember(id, initializer) {
  22702. return (0, _builder.default)("TSEnumMember", ...arguments);
  22703. }
  22704. function tsModuleDeclaration(id, body) {
  22705. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  22706. }
  22707. function tsModuleBlock(body) {
  22708. return (0, _builder.default)("TSModuleBlock", ...arguments);
  22709. }
  22710. function tsImportType(argument, qualifier, typeParameters) {
  22711. return (0, _builder.default)("TSImportType", ...arguments);
  22712. }
  22713. function tsImportEqualsDeclaration(id, moduleReference) {
  22714. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  22715. }
  22716. function tsExternalModuleReference(expression) {
  22717. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  22718. }
  22719. function tsNonNullExpression(expression) {
  22720. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  22721. }
  22722. function tsExportAssignment(expression) {
  22723. return (0, _builder.default)("TSExportAssignment", ...arguments);
  22724. }
  22725. function tsNamespaceExportDeclaration(id) {
  22726. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  22727. }
  22728. function tsTypeAnnotation(typeAnnotation2) {
  22729. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  22730. }
  22731. function tsTypeParameterInstantiation(params) {
  22732. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  22733. }
  22734. function tsTypeParameterDeclaration(params) {
  22735. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  22736. }
  22737. function tsTypeParameter(constraint, _default, name2) {
  22738. return (0, _builder.default)("TSTypeParameter", ...arguments);
  22739. }
  22740. function NumberLiteral(...args) {
  22741. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  22742. return (0, _builder.default)("NumberLiteral", ...args);
  22743. }
  22744. function RegexLiteral(...args) {
  22745. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  22746. return (0, _builder.default)("RegexLiteral", ...args);
  22747. }
  22748. function RestProperty(...args) {
  22749. console.trace("The node type RestProperty has been renamed to RestElement");
  22750. return (0, _builder.default)("RestProperty", ...args);
  22751. }
  22752. function SpreadProperty(...args) {
  22753. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  22754. return (0, _builder.default)("SpreadProperty", ...args);
  22755. }
  22756. }
  22757. });
  22758. // node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  22759. var require_cleanJSXElementLiteralChild2 = __commonJS({
  22760. "node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  22761. "use strict";
  22762. Object.defineProperty(exports, "__esModule", {
  22763. value: true
  22764. });
  22765. exports.default = cleanJSXElementLiteralChild;
  22766. var _generated = require_generated7();
  22767. function cleanJSXElementLiteralChild(child, args) {
  22768. const lines = child.value.split(/\r\n|\n|\r/);
  22769. let lastNonEmptyLine = 0;
  22770. for (let i = 0; i < lines.length; i++) {
  22771. if (lines[i].match(/[^ \t]/)) {
  22772. lastNonEmptyLine = i;
  22773. }
  22774. }
  22775. let str = "";
  22776. for (let i = 0; i < lines.length; i++) {
  22777. const line = lines[i];
  22778. const isFirstLine = i === 0;
  22779. const isLastLine = i === lines.length - 1;
  22780. const isLastNonEmptyLine = i === lastNonEmptyLine;
  22781. let trimmedLine = line.replace(/\t/g, " ");
  22782. if (!isFirstLine) {
  22783. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  22784. }
  22785. if (!isLastLine) {
  22786. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  22787. }
  22788. if (trimmedLine) {
  22789. if (!isLastNonEmptyLine) {
  22790. trimmedLine += " ";
  22791. }
  22792. str += trimmedLine;
  22793. }
  22794. }
  22795. if (str)
  22796. args.push((0, _generated.stringLiteral)(str));
  22797. }
  22798. }
  22799. });
  22800. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/react/buildChildren.js
  22801. var require_buildChildren2 = __commonJS({
  22802. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  22803. "use strict";
  22804. Object.defineProperty(exports, "__esModule", {
  22805. value: true
  22806. });
  22807. exports.default = buildChildren;
  22808. var _generated = require_generated6();
  22809. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild2();
  22810. function buildChildren(node) {
  22811. const elements = [];
  22812. for (let i = 0; i < node.children.length; i++) {
  22813. let child = node.children[i];
  22814. if ((0, _generated.isJSXText)(child)) {
  22815. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  22816. continue;
  22817. }
  22818. if ((0, _generated.isJSXExpressionContainer)(child))
  22819. child = child.expression;
  22820. if ((0, _generated.isJSXEmptyExpression)(child))
  22821. continue;
  22822. elements.push(child);
  22823. }
  22824. return elements;
  22825. }
  22826. }
  22827. });
  22828. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isNode.js
  22829. var require_isNode2 = __commonJS({
  22830. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  22831. "use strict";
  22832. Object.defineProperty(exports, "__esModule", {
  22833. value: true
  22834. });
  22835. exports.default = isNode;
  22836. var _definitions = require_definitions2();
  22837. function isNode(node) {
  22838. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  22839. }
  22840. }
  22841. });
  22842. // node_modules/estree-to-babel/node_modules/@babel/types/lib/asserts/assertNode.js
  22843. var require_assertNode2 = __commonJS({
  22844. "node_modules/estree-to-babel/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  22845. "use strict";
  22846. Object.defineProperty(exports, "__esModule", {
  22847. value: true
  22848. });
  22849. exports.default = assertNode2;
  22850. var _isNode = require_isNode2();
  22851. function assertNode2(node) {
  22852. if (!(0, _isNode.default)(node)) {
  22853. var _node$type;
  22854. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  22855. throw new TypeError(`Not a valid node of type "${type}"`);
  22856. }
  22857. }
  22858. }
  22859. });
  22860. // node_modules/estree-to-babel/node_modules/@babel/types/lib/asserts/generated/index.js
  22861. var require_generated8 = __commonJS({
  22862. "node_modules/estree-to-babel/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  22863. "use strict";
  22864. Object.defineProperty(exports, "__esModule", {
  22865. value: true
  22866. });
  22867. exports.assertArrayExpression = assertArrayExpression;
  22868. exports.assertAssignmentExpression = assertAssignmentExpression;
  22869. exports.assertBinaryExpression = assertBinaryExpression;
  22870. exports.assertInterpreterDirective = assertInterpreterDirective;
  22871. exports.assertDirective = assertDirective;
  22872. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  22873. exports.assertBlockStatement = assertBlockStatement;
  22874. exports.assertBreakStatement = assertBreakStatement;
  22875. exports.assertCallExpression = assertCallExpression;
  22876. exports.assertCatchClause = assertCatchClause;
  22877. exports.assertConditionalExpression = assertConditionalExpression;
  22878. exports.assertContinueStatement = assertContinueStatement;
  22879. exports.assertDebuggerStatement = assertDebuggerStatement;
  22880. exports.assertDoWhileStatement = assertDoWhileStatement;
  22881. exports.assertEmptyStatement = assertEmptyStatement;
  22882. exports.assertExpressionStatement = assertExpressionStatement;
  22883. exports.assertFile = assertFile;
  22884. exports.assertForInStatement = assertForInStatement;
  22885. exports.assertForStatement = assertForStatement;
  22886. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  22887. exports.assertFunctionExpression = assertFunctionExpression;
  22888. exports.assertIdentifier = assertIdentifier;
  22889. exports.assertIfStatement = assertIfStatement;
  22890. exports.assertLabeledStatement = assertLabeledStatement;
  22891. exports.assertStringLiteral = assertStringLiteral;
  22892. exports.assertNumericLiteral = assertNumericLiteral;
  22893. exports.assertNullLiteral = assertNullLiteral;
  22894. exports.assertBooleanLiteral = assertBooleanLiteral;
  22895. exports.assertRegExpLiteral = assertRegExpLiteral;
  22896. exports.assertLogicalExpression = assertLogicalExpression;
  22897. exports.assertMemberExpression = assertMemberExpression;
  22898. exports.assertNewExpression = assertNewExpression;
  22899. exports.assertProgram = assertProgram;
  22900. exports.assertObjectExpression = assertObjectExpression;
  22901. exports.assertObjectMethod = assertObjectMethod;
  22902. exports.assertObjectProperty = assertObjectProperty;
  22903. exports.assertRestElement = assertRestElement;
  22904. exports.assertReturnStatement = assertReturnStatement;
  22905. exports.assertSequenceExpression = assertSequenceExpression;
  22906. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  22907. exports.assertSwitchCase = assertSwitchCase;
  22908. exports.assertSwitchStatement = assertSwitchStatement;
  22909. exports.assertThisExpression = assertThisExpression;
  22910. exports.assertThrowStatement = assertThrowStatement;
  22911. exports.assertTryStatement = assertTryStatement;
  22912. exports.assertUnaryExpression = assertUnaryExpression;
  22913. exports.assertUpdateExpression = assertUpdateExpression;
  22914. exports.assertVariableDeclaration = assertVariableDeclaration;
  22915. exports.assertVariableDeclarator = assertVariableDeclarator;
  22916. exports.assertWhileStatement = assertWhileStatement;
  22917. exports.assertWithStatement = assertWithStatement;
  22918. exports.assertAssignmentPattern = assertAssignmentPattern;
  22919. exports.assertArrayPattern = assertArrayPattern;
  22920. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  22921. exports.assertClassBody = assertClassBody;
  22922. exports.assertClassExpression = assertClassExpression;
  22923. exports.assertClassDeclaration = assertClassDeclaration;
  22924. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  22925. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  22926. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  22927. exports.assertExportSpecifier = assertExportSpecifier;
  22928. exports.assertForOfStatement = assertForOfStatement;
  22929. exports.assertImportDeclaration = assertImportDeclaration;
  22930. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  22931. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  22932. exports.assertImportSpecifier = assertImportSpecifier;
  22933. exports.assertMetaProperty = assertMetaProperty;
  22934. exports.assertClassMethod = assertClassMethod;
  22935. exports.assertObjectPattern = assertObjectPattern;
  22936. exports.assertSpreadElement = assertSpreadElement;
  22937. exports.assertSuper = assertSuper;
  22938. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  22939. exports.assertTemplateElement = assertTemplateElement;
  22940. exports.assertTemplateLiteral = assertTemplateLiteral;
  22941. exports.assertYieldExpression = assertYieldExpression;
  22942. exports.assertAwaitExpression = assertAwaitExpression;
  22943. exports.assertImport = assertImport;
  22944. exports.assertBigIntLiteral = assertBigIntLiteral;
  22945. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  22946. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  22947. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  22948. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  22949. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  22950. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  22951. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  22952. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  22953. exports.assertClassImplements = assertClassImplements;
  22954. exports.assertDeclareClass = assertDeclareClass;
  22955. exports.assertDeclareFunction = assertDeclareFunction;
  22956. exports.assertDeclareInterface = assertDeclareInterface;
  22957. exports.assertDeclareModule = assertDeclareModule;
  22958. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  22959. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  22960. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  22961. exports.assertDeclareVariable = assertDeclareVariable;
  22962. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  22963. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  22964. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  22965. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  22966. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  22967. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  22968. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  22969. exports.assertInferredPredicate = assertInferredPredicate;
  22970. exports.assertInterfaceExtends = assertInterfaceExtends;
  22971. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  22972. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  22973. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  22974. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  22975. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  22976. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  22977. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  22978. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  22979. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  22980. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  22981. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  22982. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  22983. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  22984. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  22985. exports.assertOpaqueType = assertOpaqueType;
  22986. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  22987. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  22988. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  22989. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  22990. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  22991. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  22992. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  22993. exports.assertTypeAlias = assertTypeAlias;
  22994. exports.assertTypeAnnotation = assertTypeAnnotation;
  22995. exports.assertTypeCastExpression = assertTypeCastExpression;
  22996. exports.assertTypeParameter = assertTypeParameter;
  22997. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  22998. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  22999. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  23000. exports.assertVariance = assertVariance;
  23001. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  23002. exports.assertEnumDeclaration = assertEnumDeclaration;
  23003. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  23004. exports.assertEnumNumberBody = assertEnumNumberBody;
  23005. exports.assertEnumStringBody = assertEnumStringBody;
  23006. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  23007. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  23008. exports.assertEnumNumberMember = assertEnumNumberMember;
  23009. exports.assertEnumStringMember = assertEnumStringMember;
  23010. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  23011. exports.assertIndexedAccessType = assertIndexedAccessType;
  23012. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  23013. exports.assertJSXAttribute = assertJSXAttribute;
  23014. exports.assertJSXClosingElement = assertJSXClosingElement;
  23015. exports.assertJSXElement = assertJSXElement;
  23016. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  23017. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  23018. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  23019. exports.assertJSXIdentifier = assertJSXIdentifier;
  23020. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  23021. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  23022. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  23023. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  23024. exports.assertJSXText = assertJSXText;
  23025. exports.assertJSXFragment = assertJSXFragment;
  23026. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  23027. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  23028. exports.assertNoop = assertNoop;
  23029. exports.assertPlaceholder = assertPlaceholder;
  23030. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  23031. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  23032. exports.assertBindExpression = assertBindExpression;
  23033. exports.assertClassProperty = assertClassProperty;
  23034. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  23035. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  23036. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  23037. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  23038. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  23039. exports.assertImportAttribute = assertImportAttribute;
  23040. exports.assertDecorator = assertDecorator;
  23041. exports.assertDoExpression = assertDoExpression;
  23042. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  23043. exports.assertPrivateName = assertPrivateName;
  23044. exports.assertRecordExpression = assertRecordExpression;
  23045. exports.assertTupleExpression = assertTupleExpression;
  23046. exports.assertDecimalLiteral = assertDecimalLiteral;
  23047. exports.assertStaticBlock = assertStaticBlock;
  23048. exports.assertModuleExpression = assertModuleExpression;
  23049. exports.assertTSParameterProperty = assertTSParameterProperty;
  23050. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  23051. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  23052. exports.assertTSQualifiedName = assertTSQualifiedName;
  23053. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  23054. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  23055. exports.assertTSPropertySignature = assertTSPropertySignature;
  23056. exports.assertTSMethodSignature = assertTSMethodSignature;
  23057. exports.assertTSIndexSignature = assertTSIndexSignature;
  23058. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  23059. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  23060. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  23061. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  23062. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  23063. exports.assertTSNullKeyword = assertTSNullKeyword;
  23064. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  23065. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  23066. exports.assertTSStringKeyword = assertTSStringKeyword;
  23067. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  23068. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  23069. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  23070. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  23071. exports.assertTSThisType = assertTSThisType;
  23072. exports.assertTSFunctionType = assertTSFunctionType;
  23073. exports.assertTSConstructorType = assertTSConstructorType;
  23074. exports.assertTSTypeReference = assertTSTypeReference;
  23075. exports.assertTSTypePredicate = assertTSTypePredicate;
  23076. exports.assertTSTypeQuery = assertTSTypeQuery;
  23077. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  23078. exports.assertTSArrayType = assertTSArrayType;
  23079. exports.assertTSTupleType = assertTSTupleType;
  23080. exports.assertTSOptionalType = assertTSOptionalType;
  23081. exports.assertTSRestType = assertTSRestType;
  23082. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  23083. exports.assertTSUnionType = assertTSUnionType;
  23084. exports.assertTSIntersectionType = assertTSIntersectionType;
  23085. exports.assertTSConditionalType = assertTSConditionalType;
  23086. exports.assertTSInferType = assertTSInferType;
  23087. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  23088. exports.assertTSTypeOperator = assertTSTypeOperator;
  23089. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  23090. exports.assertTSMappedType = assertTSMappedType;
  23091. exports.assertTSLiteralType = assertTSLiteralType;
  23092. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  23093. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  23094. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  23095. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  23096. exports.assertTSAsExpression = assertTSAsExpression;
  23097. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  23098. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  23099. exports.assertTSEnumMember = assertTSEnumMember;
  23100. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  23101. exports.assertTSModuleBlock = assertTSModuleBlock;
  23102. exports.assertTSImportType = assertTSImportType;
  23103. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  23104. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  23105. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  23106. exports.assertTSExportAssignment = assertTSExportAssignment;
  23107. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  23108. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  23109. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  23110. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  23111. exports.assertTSTypeParameter = assertTSTypeParameter;
  23112. exports.assertExpression = assertExpression;
  23113. exports.assertBinary = assertBinary;
  23114. exports.assertScopable = assertScopable;
  23115. exports.assertBlockParent = assertBlockParent;
  23116. exports.assertBlock = assertBlock;
  23117. exports.assertStatement = assertStatement;
  23118. exports.assertTerminatorless = assertTerminatorless;
  23119. exports.assertCompletionStatement = assertCompletionStatement;
  23120. exports.assertConditional = assertConditional;
  23121. exports.assertLoop = assertLoop;
  23122. exports.assertWhile = assertWhile;
  23123. exports.assertExpressionWrapper = assertExpressionWrapper;
  23124. exports.assertFor = assertFor;
  23125. exports.assertForXStatement = assertForXStatement;
  23126. exports.assertFunction = assertFunction;
  23127. exports.assertFunctionParent = assertFunctionParent;
  23128. exports.assertPureish = assertPureish;
  23129. exports.assertDeclaration = assertDeclaration;
  23130. exports.assertPatternLike = assertPatternLike;
  23131. exports.assertLVal = assertLVal;
  23132. exports.assertTSEntityName = assertTSEntityName;
  23133. exports.assertLiteral = assertLiteral;
  23134. exports.assertImmutable = assertImmutable;
  23135. exports.assertUserWhitespacable = assertUserWhitespacable;
  23136. exports.assertMethod = assertMethod;
  23137. exports.assertObjectMember = assertObjectMember;
  23138. exports.assertProperty = assertProperty;
  23139. exports.assertUnaryLike = assertUnaryLike;
  23140. exports.assertPattern = assertPattern;
  23141. exports.assertClass = assertClass;
  23142. exports.assertModuleDeclaration = assertModuleDeclaration;
  23143. exports.assertExportDeclaration = assertExportDeclaration;
  23144. exports.assertModuleSpecifier = assertModuleSpecifier;
  23145. exports.assertFlow = assertFlow;
  23146. exports.assertFlowType = assertFlowType;
  23147. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  23148. exports.assertFlowDeclaration = assertFlowDeclaration;
  23149. exports.assertFlowPredicate = assertFlowPredicate;
  23150. exports.assertEnumBody = assertEnumBody;
  23151. exports.assertEnumMember = assertEnumMember;
  23152. exports.assertJSX = assertJSX;
  23153. exports.assertPrivate = assertPrivate;
  23154. exports.assertTSTypeElement = assertTSTypeElement;
  23155. exports.assertTSType = assertTSType;
  23156. exports.assertTSBaseType = assertTSBaseType;
  23157. exports.assertNumberLiteral = assertNumberLiteral;
  23158. exports.assertRegexLiteral = assertRegexLiteral;
  23159. exports.assertRestProperty = assertRestProperty;
  23160. exports.assertSpreadProperty = assertSpreadProperty;
  23161. var _is = require_is2();
  23162. function assert(type, node, opts) {
  23163. if (!(0, _is.default)(type, node, opts)) {
  23164. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  23165. }
  23166. }
  23167. function assertArrayExpression(node, opts) {
  23168. assert("ArrayExpression", node, opts);
  23169. }
  23170. function assertAssignmentExpression(node, opts) {
  23171. assert("AssignmentExpression", node, opts);
  23172. }
  23173. function assertBinaryExpression(node, opts) {
  23174. assert("BinaryExpression", node, opts);
  23175. }
  23176. function assertInterpreterDirective(node, opts) {
  23177. assert("InterpreterDirective", node, opts);
  23178. }
  23179. function assertDirective(node, opts) {
  23180. assert("Directive", node, opts);
  23181. }
  23182. function assertDirectiveLiteral(node, opts) {
  23183. assert("DirectiveLiteral", node, opts);
  23184. }
  23185. function assertBlockStatement(node, opts) {
  23186. assert("BlockStatement", node, opts);
  23187. }
  23188. function assertBreakStatement(node, opts) {
  23189. assert("BreakStatement", node, opts);
  23190. }
  23191. function assertCallExpression(node, opts) {
  23192. assert("CallExpression", node, opts);
  23193. }
  23194. function assertCatchClause(node, opts) {
  23195. assert("CatchClause", node, opts);
  23196. }
  23197. function assertConditionalExpression(node, opts) {
  23198. assert("ConditionalExpression", node, opts);
  23199. }
  23200. function assertContinueStatement(node, opts) {
  23201. assert("ContinueStatement", node, opts);
  23202. }
  23203. function assertDebuggerStatement(node, opts) {
  23204. assert("DebuggerStatement", node, opts);
  23205. }
  23206. function assertDoWhileStatement(node, opts) {
  23207. assert("DoWhileStatement", node, opts);
  23208. }
  23209. function assertEmptyStatement(node, opts) {
  23210. assert("EmptyStatement", node, opts);
  23211. }
  23212. function assertExpressionStatement(node, opts) {
  23213. assert("ExpressionStatement", node, opts);
  23214. }
  23215. function assertFile(node, opts) {
  23216. assert("File", node, opts);
  23217. }
  23218. function assertForInStatement(node, opts) {
  23219. assert("ForInStatement", node, opts);
  23220. }
  23221. function assertForStatement(node, opts) {
  23222. assert("ForStatement", node, opts);
  23223. }
  23224. function assertFunctionDeclaration(node, opts) {
  23225. assert("FunctionDeclaration", node, opts);
  23226. }
  23227. function assertFunctionExpression(node, opts) {
  23228. assert("FunctionExpression", node, opts);
  23229. }
  23230. function assertIdentifier(node, opts) {
  23231. assert("Identifier", node, opts);
  23232. }
  23233. function assertIfStatement(node, opts) {
  23234. assert("IfStatement", node, opts);
  23235. }
  23236. function assertLabeledStatement(node, opts) {
  23237. assert("LabeledStatement", node, opts);
  23238. }
  23239. function assertStringLiteral(node, opts) {
  23240. assert("StringLiteral", node, opts);
  23241. }
  23242. function assertNumericLiteral(node, opts) {
  23243. assert("NumericLiteral", node, opts);
  23244. }
  23245. function assertNullLiteral(node, opts) {
  23246. assert("NullLiteral", node, opts);
  23247. }
  23248. function assertBooleanLiteral(node, opts) {
  23249. assert("BooleanLiteral", node, opts);
  23250. }
  23251. function assertRegExpLiteral(node, opts) {
  23252. assert("RegExpLiteral", node, opts);
  23253. }
  23254. function assertLogicalExpression(node, opts) {
  23255. assert("LogicalExpression", node, opts);
  23256. }
  23257. function assertMemberExpression(node, opts) {
  23258. assert("MemberExpression", node, opts);
  23259. }
  23260. function assertNewExpression(node, opts) {
  23261. assert("NewExpression", node, opts);
  23262. }
  23263. function assertProgram(node, opts) {
  23264. assert("Program", node, opts);
  23265. }
  23266. function assertObjectExpression(node, opts) {
  23267. assert("ObjectExpression", node, opts);
  23268. }
  23269. function assertObjectMethod(node, opts) {
  23270. assert("ObjectMethod", node, opts);
  23271. }
  23272. function assertObjectProperty(node, opts) {
  23273. assert("ObjectProperty", node, opts);
  23274. }
  23275. function assertRestElement(node, opts) {
  23276. assert("RestElement", node, opts);
  23277. }
  23278. function assertReturnStatement(node, opts) {
  23279. assert("ReturnStatement", node, opts);
  23280. }
  23281. function assertSequenceExpression(node, opts) {
  23282. assert("SequenceExpression", node, opts);
  23283. }
  23284. function assertParenthesizedExpression(node, opts) {
  23285. assert("ParenthesizedExpression", node, opts);
  23286. }
  23287. function assertSwitchCase(node, opts) {
  23288. assert("SwitchCase", node, opts);
  23289. }
  23290. function assertSwitchStatement(node, opts) {
  23291. assert("SwitchStatement", node, opts);
  23292. }
  23293. function assertThisExpression(node, opts) {
  23294. assert("ThisExpression", node, opts);
  23295. }
  23296. function assertThrowStatement(node, opts) {
  23297. assert("ThrowStatement", node, opts);
  23298. }
  23299. function assertTryStatement(node, opts) {
  23300. assert("TryStatement", node, opts);
  23301. }
  23302. function assertUnaryExpression(node, opts) {
  23303. assert("UnaryExpression", node, opts);
  23304. }
  23305. function assertUpdateExpression(node, opts) {
  23306. assert("UpdateExpression", node, opts);
  23307. }
  23308. function assertVariableDeclaration(node, opts) {
  23309. assert("VariableDeclaration", node, opts);
  23310. }
  23311. function assertVariableDeclarator(node, opts) {
  23312. assert("VariableDeclarator", node, opts);
  23313. }
  23314. function assertWhileStatement(node, opts) {
  23315. assert("WhileStatement", node, opts);
  23316. }
  23317. function assertWithStatement(node, opts) {
  23318. assert("WithStatement", node, opts);
  23319. }
  23320. function assertAssignmentPattern(node, opts) {
  23321. assert("AssignmentPattern", node, opts);
  23322. }
  23323. function assertArrayPattern(node, opts) {
  23324. assert("ArrayPattern", node, opts);
  23325. }
  23326. function assertArrowFunctionExpression(node, opts) {
  23327. assert("ArrowFunctionExpression", node, opts);
  23328. }
  23329. function assertClassBody(node, opts) {
  23330. assert("ClassBody", node, opts);
  23331. }
  23332. function assertClassExpression(node, opts) {
  23333. assert("ClassExpression", node, opts);
  23334. }
  23335. function assertClassDeclaration(node, opts) {
  23336. assert("ClassDeclaration", node, opts);
  23337. }
  23338. function assertExportAllDeclaration(node, opts) {
  23339. assert("ExportAllDeclaration", node, opts);
  23340. }
  23341. function assertExportDefaultDeclaration(node, opts) {
  23342. assert("ExportDefaultDeclaration", node, opts);
  23343. }
  23344. function assertExportNamedDeclaration(node, opts) {
  23345. assert("ExportNamedDeclaration", node, opts);
  23346. }
  23347. function assertExportSpecifier(node, opts) {
  23348. assert("ExportSpecifier", node, opts);
  23349. }
  23350. function assertForOfStatement(node, opts) {
  23351. assert("ForOfStatement", node, opts);
  23352. }
  23353. function assertImportDeclaration(node, opts) {
  23354. assert("ImportDeclaration", node, opts);
  23355. }
  23356. function assertImportDefaultSpecifier(node, opts) {
  23357. assert("ImportDefaultSpecifier", node, opts);
  23358. }
  23359. function assertImportNamespaceSpecifier(node, opts) {
  23360. assert("ImportNamespaceSpecifier", node, opts);
  23361. }
  23362. function assertImportSpecifier(node, opts) {
  23363. assert("ImportSpecifier", node, opts);
  23364. }
  23365. function assertMetaProperty(node, opts) {
  23366. assert("MetaProperty", node, opts);
  23367. }
  23368. function assertClassMethod(node, opts) {
  23369. assert("ClassMethod", node, opts);
  23370. }
  23371. function assertObjectPattern(node, opts) {
  23372. assert("ObjectPattern", node, opts);
  23373. }
  23374. function assertSpreadElement(node, opts) {
  23375. assert("SpreadElement", node, opts);
  23376. }
  23377. function assertSuper(node, opts) {
  23378. assert("Super", node, opts);
  23379. }
  23380. function assertTaggedTemplateExpression(node, opts) {
  23381. assert("TaggedTemplateExpression", node, opts);
  23382. }
  23383. function assertTemplateElement(node, opts) {
  23384. assert("TemplateElement", node, opts);
  23385. }
  23386. function assertTemplateLiteral(node, opts) {
  23387. assert("TemplateLiteral", node, opts);
  23388. }
  23389. function assertYieldExpression(node, opts) {
  23390. assert("YieldExpression", node, opts);
  23391. }
  23392. function assertAwaitExpression(node, opts) {
  23393. assert("AwaitExpression", node, opts);
  23394. }
  23395. function assertImport(node, opts) {
  23396. assert("Import", node, opts);
  23397. }
  23398. function assertBigIntLiteral(node, opts) {
  23399. assert("BigIntLiteral", node, opts);
  23400. }
  23401. function assertExportNamespaceSpecifier(node, opts) {
  23402. assert("ExportNamespaceSpecifier", node, opts);
  23403. }
  23404. function assertOptionalMemberExpression(node, opts) {
  23405. assert("OptionalMemberExpression", node, opts);
  23406. }
  23407. function assertOptionalCallExpression(node, opts) {
  23408. assert("OptionalCallExpression", node, opts);
  23409. }
  23410. function assertAnyTypeAnnotation(node, opts) {
  23411. assert("AnyTypeAnnotation", node, opts);
  23412. }
  23413. function assertArrayTypeAnnotation(node, opts) {
  23414. assert("ArrayTypeAnnotation", node, opts);
  23415. }
  23416. function assertBooleanTypeAnnotation(node, opts) {
  23417. assert("BooleanTypeAnnotation", node, opts);
  23418. }
  23419. function assertBooleanLiteralTypeAnnotation(node, opts) {
  23420. assert("BooleanLiteralTypeAnnotation", node, opts);
  23421. }
  23422. function assertNullLiteralTypeAnnotation(node, opts) {
  23423. assert("NullLiteralTypeAnnotation", node, opts);
  23424. }
  23425. function assertClassImplements(node, opts) {
  23426. assert("ClassImplements", node, opts);
  23427. }
  23428. function assertDeclareClass(node, opts) {
  23429. assert("DeclareClass", node, opts);
  23430. }
  23431. function assertDeclareFunction(node, opts) {
  23432. assert("DeclareFunction", node, opts);
  23433. }
  23434. function assertDeclareInterface(node, opts) {
  23435. assert("DeclareInterface", node, opts);
  23436. }
  23437. function assertDeclareModule(node, opts) {
  23438. assert("DeclareModule", node, opts);
  23439. }
  23440. function assertDeclareModuleExports(node, opts) {
  23441. assert("DeclareModuleExports", node, opts);
  23442. }
  23443. function assertDeclareTypeAlias(node, opts) {
  23444. assert("DeclareTypeAlias", node, opts);
  23445. }
  23446. function assertDeclareOpaqueType(node, opts) {
  23447. assert("DeclareOpaqueType", node, opts);
  23448. }
  23449. function assertDeclareVariable(node, opts) {
  23450. assert("DeclareVariable", node, opts);
  23451. }
  23452. function assertDeclareExportDeclaration(node, opts) {
  23453. assert("DeclareExportDeclaration", node, opts);
  23454. }
  23455. function assertDeclareExportAllDeclaration(node, opts) {
  23456. assert("DeclareExportAllDeclaration", node, opts);
  23457. }
  23458. function assertDeclaredPredicate(node, opts) {
  23459. assert("DeclaredPredicate", node, opts);
  23460. }
  23461. function assertExistsTypeAnnotation(node, opts) {
  23462. assert("ExistsTypeAnnotation", node, opts);
  23463. }
  23464. function assertFunctionTypeAnnotation(node, opts) {
  23465. assert("FunctionTypeAnnotation", node, opts);
  23466. }
  23467. function assertFunctionTypeParam(node, opts) {
  23468. assert("FunctionTypeParam", node, opts);
  23469. }
  23470. function assertGenericTypeAnnotation(node, opts) {
  23471. assert("GenericTypeAnnotation", node, opts);
  23472. }
  23473. function assertInferredPredicate(node, opts) {
  23474. assert("InferredPredicate", node, opts);
  23475. }
  23476. function assertInterfaceExtends(node, opts) {
  23477. assert("InterfaceExtends", node, opts);
  23478. }
  23479. function assertInterfaceDeclaration(node, opts) {
  23480. assert("InterfaceDeclaration", node, opts);
  23481. }
  23482. function assertInterfaceTypeAnnotation(node, opts) {
  23483. assert("InterfaceTypeAnnotation", node, opts);
  23484. }
  23485. function assertIntersectionTypeAnnotation(node, opts) {
  23486. assert("IntersectionTypeAnnotation", node, opts);
  23487. }
  23488. function assertMixedTypeAnnotation(node, opts) {
  23489. assert("MixedTypeAnnotation", node, opts);
  23490. }
  23491. function assertEmptyTypeAnnotation(node, opts) {
  23492. assert("EmptyTypeAnnotation", node, opts);
  23493. }
  23494. function assertNullableTypeAnnotation(node, opts) {
  23495. assert("NullableTypeAnnotation", node, opts);
  23496. }
  23497. function assertNumberLiteralTypeAnnotation(node, opts) {
  23498. assert("NumberLiteralTypeAnnotation", node, opts);
  23499. }
  23500. function assertNumberTypeAnnotation(node, opts) {
  23501. assert("NumberTypeAnnotation", node, opts);
  23502. }
  23503. function assertObjectTypeAnnotation(node, opts) {
  23504. assert("ObjectTypeAnnotation", node, opts);
  23505. }
  23506. function assertObjectTypeInternalSlot(node, opts) {
  23507. assert("ObjectTypeInternalSlot", node, opts);
  23508. }
  23509. function assertObjectTypeCallProperty(node, opts) {
  23510. assert("ObjectTypeCallProperty", node, opts);
  23511. }
  23512. function assertObjectTypeIndexer(node, opts) {
  23513. assert("ObjectTypeIndexer", node, opts);
  23514. }
  23515. function assertObjectTypeProperty(node, opts) {
  23516. assert("ObjectTypeProperty", node, opts);
  23517. }
  23518. function assertObjectTypeSpreadProperty(node, opts) {
  23519. assert("ObjectTypeSpreadProperty", node, opts);
  23520. }
  23521. function assertOpaqueType(node, opts) {
  23522. assert("OpaqueType", node, opts);
  23523. }
  23524. function assertQualifiedTypeIdentifier(node, opts) {
  23525. assert("QualifiedTypeIdentifier", node, opts);
  23526. }
  23527. function assertStringLiteralTypeAnnotation(node, opts) {
  23528. assert("StringLiteralTypeAnnotation", node, opts);
  23529. }
  23530. function assertStringTypeAnnotation(node, opts) {
  23531. assert("StringTypeAnnotation", node, opts);
  23532. }
  23533. function assertSymbolTypeAnnotation(node, opts) {
  23534. assert("SymbolTypeAnnotation", node, opts);
  23535. }
  23536. function assertThisTypeAnnotation(node, opts) {
  23537. assert("ThisTypeAnnotation", node, opts);
  23538. }
  23539. function assertTupleTypeAnnotation(node, opts) {
  23540. assert("TupleTypeAnnotation", node, opts);
  23541. }
  23542. function assertTypeofTypeAnnotation(node, opts) {
  23543. assert("TypeofTypeAnnotation", node, opts);
  23544. }
  23545. function assertTypeAlias(node, opts) {
  23546. assert("TypeAlias", node, opts);
  23547. }
  23548. function assertTypeAnnotation(node, opts) {
  23549. assert("TypeAnnotation", node, opts);
  23550. }
  23551. function assertTypeCastExpression(node, opts) {
  23552. assert("TypeCastExpression", node, opts);
  23553. }
  23554. function assertTypeParameter(node, opts) {
  23555. assert("TypeParameter", node, opts);
  23556. }
  23557. function assertTypeParameterDeclaration(node, opts) {
  23558. assert("TypeParameterDeclaration", node, opts);
  23559. }
  23560. function assertTypeParameterInstantiation(node, opts) {
  23561. assert("TypeParameterInstantiation", node, opts);
  23562. }
  23563. function assertUnionTypeAnnotation(node, opts) {
  23564. assert("UnionTypeAnnotation", node, opts);
  23565. }
  23566. function assertVariance(node, opts) {
  23567. assert("Variance", node, opts);
  23568. }
  23569. function assertVoidTypeAnnotation(node, opts) {
  23570. assert("VoidTypeAnnotation", node, opts);
  23571. }
  23572. function assertEnumDeclaration(node, opts) {
  23573. assert("EnumDeclaration", node, opts);
  23574. }
  23575. function assertEnumBooleanBody(node, opts) {
  23576. assert("EnumBooleanBody", node, opts);
  23577. }
  23578. function assertEnumNumberBody(node, opts) {
  23579. assert("EnumNumberBody", node, opts);
  23580. }
  23581. function assertEnumStringBody(node, opts) {
  23582. assert("EnumStringBody", node, opts);
  23583. }
  23584. function assertEnumSymbolBody(node, opts) {
  23585. assert("EnumSymbolBody", node, opts);
  23586. }
  23587. function assertEnumBooleanMember(node, opts) {
  23588. assert("EnumBooleanMember", node, opts);
  23589. }
  23590. function assertEnumNumberMember(node, opts) {
  23591. assert("EnumNumberMember", node, opts);
  23592. }
  23593. function assertEnumStringMember(node, opts) {
  23594. assert("EnumStringMember", node, opts);
  23595. }
  23596. function assertEnumDefaultedMember(node, opts) {
  23597. assert("EnumDefaultedMember", node, opts);
  23598. }
  23599. function assertIndexedAccessType(node, opts) {
  23600. assert("IndexedAccessType", node, opts);
  23601. }
  23602. function assertOptionalIndexedAccessType(node, opts) {
  23603. assert("OptionalIndexedAccessType", node, opts);
  23604. }
  23605. function assertJSXAttribute(node, opts) {
  23606. assert("JSXAttribute", node, opts);
  23607. }
  23608. function assertJSXClosingElement(node, opts) {
  23609. assert("JSXClosingElement", node, opts);
  23610. }
  23611. function assertJSXElement(node, opts) {
  23612. assert("JSXElement", node, opts);
  23613. }
  23614. function assertJSXEmptyExpression(node, opts) {
  23615. assert("JSXEmptyExpression", node, opts);
  23616. }
  23617. function assertJSXExpressionContainer(node, opts) {
  23618. assert("JSXExpressionContainer", node, opts);
  23619. }
  23620. function assertJSXSpreadChild(node, opts) {
  23621. assert("JSXSpreadChild", node, opts);
  23622. }
  23623. function assertJSXIdentifier(node, opts) {
  23624. assert("JSXIdentifier", node, opts);
  23625. }
  23626. function assertJSXMemberExpression(node, opts) {
  23627. assert("JSXMemberExpression", node, opts);
  23628. }
  23629. function assertJSXNamespacedName(node, opts) {
  23630. assert("JSXNamespacedName", node, opts);
  23631. }
  23632. function assertJSXOpeningElement(node, opts) {
  23633. assert("JSXOpeningElement", node, opts);
  23634. }
  23635. function assertJSXSpreadAttribute(node, opts) {
  23636. assert("JSXSpreadAttribute", node, opts);
  23637. }
  23638. function assertJSXText(node, opts) {
  23639. assert("JSXText", node, opts);
  23640. }
  23641. function assertJSXFragment(node, opts) {
  23642. assert("JSXFragment", node, opts);
  23643. }
  23644. function assertJSXOpeningFragment(node, opts) {
  23645. assert("JSXOpeningFragment", node, opts);
  23646. }
  23647. function assertJSXClosingFragment(node, opts) {
  23648. assert("JSXClosingFragment", node, opts);
  23649. }
  23650. function assertNoop(node, opts) {
  23651. assert("Noop", node, opts);
  23652. }
  23653. function assertPlaceholder(node, opts) {
  23654. assert("Placeholder", node, opts);
  23655. }
  23656. function assertV8IntrinsicIdentifier(node, opts) {
  23657. assert("V8IntrinsicIdentifier", node, opts);
  23658. }
  23659. function assertArgumentPlaceholder(node, opts) {
  23660. assert("ArgumentPlaceholder", node, opts);
  23661. }
  23662. function assertBindExpression(node, opts) {
  23663. assert("BindExpression", node, opts);
  23664. }
  23665. function assertClassProperty(node, opts) {
  23666. assert("ClassProperty", node, opts);
  23667. }
  23668. function assertPipelineTopicExpression(node, opts) {
  23669. assert("PipelineTopicExpression", node, opts);
  23670. }
  23671. function assertPipelineBareFunction(node, opts) {
  23672. assert("PipelineBareFunction", node, opts);
  23673. }
  23674. function assertPipelinePrimaryTopicReference(node, opts) {
  23675. assert("PipelinePrimaryTopicReference", node, opts);
  23676. }
  23677. function assertClassPrivateProperty(node, opts) {
  23678. assert("ClassPrivateProperty", node, opts);
  23679. }
  23680. function assertClassPrivateMethod(node, opts) {
  23681. assert("ClassPrivateMethod", node, opts);
  23682. }
  23683. function assertImportAttribute(node, opts) {
  23684. assert("ImportAttribute", node, opts);
  23685. }
  23686. function assertDecorator(node, opts) {
  23687. assert("Decorator", node, opts);
  23688. }
  23689. function assertDoExpression(node, opts) {
  23690. assert("DoExpression", node, opts);
  23691. }
  23692. function assertExportDefaultSpecifier(node, opts) {
  23693. assert("ExportDefaultSpecifier", node, opts);
  23694. }
  23695. function assertPrivateName(node, opts) {
  23696. assert("PrivateName", node, opts);
  23697. }
  23698. function assertRecordExpression(node, opts) {
  23699. assert("RecordExpression", node, opts);
  23700. }
  23701. function assertTupleExpression(node, opts) {
  23702. assert("TupleExpression", node, opts);
  23703. }
  23704. function assertDecimalLiteral(node, opts) {
  23705. assert("DecimalLiteral", node, opts);
  23706. }
  23707. function assertStaticBlock(node, opts) {
  23708. assert("StaticBlock", node, opts);
  23709. }
  23710. function assertModuleExpression(node, opts) {
  23711. assert("ModuleExpression", node, opts);
  23712. }
  23713. function assertTSParameterProperty(node, opts) {
  23714. assert("TSParameterProperty", node, opts);
  23715. }
  23716. function assertTSDeclareFunction(node, opts) {
  23717. assert("TSDeclareFunction", node, opts);
  23718. }
  23719. function assertTSDeclareMethod(node, opts) {
  23720. assert("TSDeclareMethod", node, opts);
  23721. }
  23722. function assertTSQualifiedName(node, opts) {
  23723. assert("TSQualifiedName", node, opts);
  23724. }
  23725. function assertTSCallSignatureDeclaration(node, opts) {
  23726. assert("TSCallSignatureDeclaration", node, opts);
  23727. }
  23728. function assertTSConstructSignatureDeclaration(node, opts) {
  23729. assert("TSConstructSignatureDeclaration", node, opts);
  23730. }
  23731. function assertTSPropertySignature(node, opts) {
  23732. assert("TSPropertySignature", node, opts);
  23733. }
  23734. function assertTSMethodSignature(node, opts) {
  23735. assert("TSMethodSignature", node, opts);
  23736. }
  23737. function assertTSIndexSignature(node, opts) {
  23738. assert("TSIndexSignature", node, opts);
  23739. }
  23740. function assertTSAnyKeyword(node, opts) {
  23741. assert("TSAnyKeyword", node, opts);
  23742. }
  23743. function assertTSBooleanKeyword(node, opts) {
  23744. assert("TSBooleanKeyword", node, opts);
  23745. }
  23746. function assertTSBigIntKeyword(node, opts) {
  23747. assert("TSBigIntKeyword", node, opts);
  23748. }
  23749. function assertTSIntrinsicKeyword(node, opts) {
  23750. assert("TSIntrinsicKeyword", node, opts);
  23751. }
  23752. function assertTSNeverKeyword(node, opts) {
  23753. assert("TSNeverKeyword", node, opts);
  23754. }
  23755. function assertTSNullKeyword(node, opts) {
  23756. assert("TSNullKeyword", node, opts);
  23757. }
  23758. function assertTSNumberKeyword(node, opts) {
  23759. assert("TSNumberKeyword", node, opts);
  23760. }
  23761. function assertTSObjectKeyword(node, opts) {
  23762. assert("TSObjectKeyword", node, opts);
  23763. }
  23764. function assertTSStringKeyword(node, opts) {
  23765. assert("TSStringKeyword", node, opts);
  23766. }
  23767. function assertTSSymbolKeyword(node, opts) {
  23768. assert("TSSymbolKeyword", node, opts);
  23769. }
  23770. function assertTSUndefinedKeyword(node, opts) {
  23771. assert("TSUndefinedKeyword", node, opts);
  23772. }
  23773. function assertTSUnknownKeyword(node, opts) {
  23774. assert("TSUnknownKeyword", node, opts);
  23775. }
  23776. function assertTSVoidKeyword(node, opts) {
  23777. assert("TSVoidKeyword", node, opts);
  23778. }
  23779. function assertTSThisType(node, opts) {
  23780. assert("TSThisType", node, opts);
  23781. }
  23782. function assertTSFunctionType(node, opts) {
  23783. assert("TSFunctionType", node, opts);
  23784. }
  23785. function assertTSConstructorType(node, opts) {
  23786. assert("TSConstructorType", node, opts);
  23787. }
  23788. function assertTSTypeReference(node, opts) {
  23789. assert("TSTypeReference", node, opts);
  23790. }
  23791. function assertTSTypePredicate(node, opts) {
  23792. assert("TSTypePredicate", node, opts);
  23793. }
  23794. function assertTSTypeQuery(node, opts) {
  23795. assert("TSTypeQuery", node, opts);
  23796. }
  23797. function assertTSTypeLiteral(node, opts) {
  23798. assert("TSTypeLiteral", node, opts);
  23799. }
  23800. function assertTSArrayType(node, opts) {
  23801. assert("TSArrayType", node, opts);
  23802. }
  23803. function assertTSTupleType(node, opts) {
  23804. assert("TSTupleType", node, opts);
  23805. }
  23806. function assertTSOptionalType(node, opts) {
  23807. assert("TSOptionalType", node, opts);
  23808. }
  23809. function assertTSRestType(node, opts) {
  23810. assert("TSRestType", node, opts);
  23811. }
  23812. function assertTSNamedTupleMember(node, opts) {
  23813. assert("TSNamedTupleMember", node, opts);
  23814. }
  23815. function assertTSUnionType(node, opts) {
  23816. assert("TSUnionType", node, opts);
  23817. }
  23818. function assertTSIntersectionType(node, opts) {
  23819. assert("TSIntersectionType", node, opts);
  23820. }
  23821. function assertTSConditionalType(node, opts) {
  23822. assert("TSConditionalType", node, opts);
  23823. }
  23824. function assertTSInferType(node, opts) {
  23825. assert("TSInferType", node, opts);
  23826. }
  23827. function assertTSParenthesizedType(node, opts) {
  23828. assert("TSParenthesizedType", node, opts);
  23829. }
  23830. function assertTSTypeOperator(node, opts) {
  23831. assert("TSTypeOperator", node, opts);
  23832. }
  23833. function assertTSIndexedAccessType(node, opts) {
  23834. assert("TSIndexedAccessType", node, opts);
  23835. }
  23836. function assertTSMappedType(node, opts) {
  23837. assert("TSMappedType", node, opts);
  23838. }
  23839. function assertTSLiteralType(node, opts) {
  23840. assert("TSLiteralType", node, opts);
  23841. }
  23842. function assertTSExpressionWithTypeArguments(node, opts) {
  23843. assert("TSExpressionWithTypeArguments", node, opts);
  23844. }
  23845. function assertTSInterfaceDeclaration(node, opts) {
  23846. assert("TSInterfaceDeclaration", node, opts);
  23847. }
  23848. function assertTSInterfaceBody(node, opts) {
  23849. assert("TSInterfaceBody", node, opts);
  23850. }
  23851. function assertTSTypeAliasDeclaration(node, opts) {
  23852. assert("TSTypeAliasDeclaration", node, opts);
  23853. }
  23854. function assertTSAsExpression(node, opts) {
  23855. assert("TSAsExpression", node, opts);
  23856. }
  23857. function assertTSTypeAssertion(node, opts) {
  23858. assert("TSTypeAssertion", node, opts);
  23859. }
  23860. function assertTSEnumDeclaration(node, opts) {
  23861. assert("TSEnumDeclaration", node, opts);
  23862. }
  23863. function assertTSEnumMember(node, opts) {
  23864. assert("TSEnumMember", node, opts);
  23865. }
  23866. function assertTSModuleDeclaration(node, opts) {
  23867. assert("TSModuleDeclaration", node, opts);
  23868. }
  23869. function assertTSModuleBlock(node, opts) {
  23870. assert("TSModuleBlock", node, opts);
  23871. }
  23872. function assertTSImportType(node, opts) {
  23873. assert("TSImportType", node, opts);
  23874. }
  23875. function assertTSImportEqualsDeclaration(node, opts) {
  23876. assert("TSImportEqualsDeclaration", node, opts);
  23877. }
  23878. function assertTSExternalModuleReference(node, opts) {
  23879. assert("TSExternalModuleReference", node, opts);
  23880. }
  23881. function assertTSNonNullExpression(node, opts) {
  23882. assert("TSNonNullExpression", node, opts);
  23883. }
  23884. function assertTSExportAssignment(node, opts) {
  23885. assert("TSExportAssignment", node, opts);
  23886. }
  23887. function assertTSNamespaceExportDeclaration(node, opts) {
  23888. assert("TSNamespaceExportDeclaration", node, opts);
  23889. }
  23890. function assertTSTypeAnnotation(node, opts) {
  23891. assert("TSTypeAnnotation", node, opts);
  23892. }
  23893. function assertTSTypeParameterInstantiation(node, opts) {
  23894. assert("TSTypeParameterInstantiation", node, opts);
  23895. }
  23896. function assertTSTypeParameterDeclaration(node, opts) {
  23897. assert("TSTypeParameterDeclaration", node, opts);
  23898. }
  23899. function assertTSTypeParameter(node, opts) {
  23900. assert("TSTypeParameter", node, opts);
  23901. }
  23902. function assertExpression(node, opts) {
  23903. assert("Expression", node, opts);
  23904. }
  23905. function assertBinary(node, opts) {
  23906. assert("Binary", node, opts);
  23907. }
  23908. function assertScopable(node, opts) {
  23909. assert("Scopable", node, opts);
  23910. }
  23911. function assertBlockParent(node, opts) {
  23912. assert("BlockParent", node, opts);
  23913. }
  23914. function assertBlock(node, opts) {
  23915. assert("Block", node, opts);
  23916. }
  23917. function assertStatement(node, opts) {
  23918. assert("Statement", node, opts);
  23919. }
  23920. function assertTerminatorless(node, opts) {
  23921. assert("Terminatorless", node, opts);
  23922. }
  23923. function assertCompletionStatement(node, opts) {
  23924. assert("CompletionStatement", node, opts);
  23925. }
  23926. function assertConditional(node, opts) {
  23927. assert("Conditional", node, opts);
  23928. }
  23929. function assertLoop(node, opts) {
  23930. assert("Loop", node, opts);
  23931. }
  23932. function assertWhile(node, opts) {
  23933. assert("While", node, opts);
  23934. }
  23935. function assertExpressionWrapper(node, opts) {
  23936. assert("ExpressionWrapper", node, opts);
  23937. }
  23938. function assertFor(node, opts) {
  23939. assert("For", node, opts);
  23940. }
  23941. function assertForXStatement(node, opts) {
  23942. assert("ForXStatement", node, opts);
  23943. }
  23944. function assertFunction(node, opts) {
  23945. assert("Function", node, opts);
  23946. }
  23947. function assertFunctionParent(node, opts) {
  23948. assert("FunctionParent", node, opts);
  23949. }
  23950. function assertPureish(node, opts) {
  23951. assert("Pureish", node, opts);
  23952. }
  23953. function assertDeclaration(node, opts) {
  23954. assert("Declaration", node, opts);
  23955. }
  23956. function assertPatternLike(node, opts) {
  23957. assert("PatternLike", node, opts);
  23958. }
  23959. function assertLVal(node, opts) {
  23960. assert("LVal", node, opts);
  23961. }
  23962. function assertTSEntityName(node, opts) {
  23963. assert("TSEntityName", node, opts);
  23964. }
  23965. function assertLiteral(node, opts) {
  23966. assert("Literal", node, opts);
  23967. }
  23968. function assertImmutable(node, opts) {
  23969. assert("Immutable", node, opts);
  23970. }
  23971. function assertUserWhitespacable(node, opts) {
  23972. assert("UserWhitespacable", node, opts);
  23973. }
  23974. function assertMethod(node, opts) {
  23975. assert("Method", node, opts);
  23976. }
  23977. function assertObjectMember(node, opts) {
  23978. assert("ObjectMember", node, opts);
  23979. }
  23980. function assertProperty(node, opts) {
  23981. assert("Property", node, opts);
  23982. }
  23983. function assertUnaryLike(node, opts) {
  23984. assert("UnaryLike", node, opts);
  23985. }
  23986. function assertPattern(node, opts) {
  23987. assert("Pattern", node, opts);
  23988. }
  23989. function assertClass(node, opts) {
  23990. assert("Class", node, opts);
  23991. }
  23992. function assertModuleDeclaration(node, opts) {
  23993. assert("ModuleDeclaration", node, opts);
  23994. }
  23995. function assertExportDeclaration(node, opts) {
  23996. assert("ExportDeclaration", node, opts);
  23997. }
  23998. function assertModuleSpecifier(node, opts) {
  23999. assert("ModuleSpecifier", node, opts);
  24000. }
  24001. function assertFlow(node, opts) {
  24002. assert("Flow", node, opts);
  24003. }
  24004. function assertFlowType(node, opts) {
  24005. assert("FlowType", node, opts);
  24006. }
  24007. function assertFlowBaseAnnotation(node, opts) {
  24008. assert("FlowBaseAnnotation", node, opts);
  24009. }
  24010. function assertFlowDeclaration(node, opts) {
  24011. assert("FlowDeclaration", node, opts);
  24012. }
  24013. function assertFlowPredicate(node, opts) {
  24014. assert("FlowPredicate", node, opts);
  24015. }
  24016. function assertEnumBody(node, opts) {
  24017. assert("EnumBody", node, opts);
  24018. }
  24019. function assertEnumMember(node, opts) {
  24020. assert("EnumMember", node, opts);
  24021. }
  24022. function assertJSX(node, opts) {
  24023. assert("JSX", node, opts);
  24024. }
  24025. function assertPrivate(node, opts) {
  24026. assert("Private", node, opts);
  24027. }
  24028. function assertTSTypeElement(node, opts) {
  24029. assert("TSTypeElement", node, opts);
  24030. }
  24031. function assertTSType(node, opts) {
  24032. assert("TSType", node, opts);
  24033. }
  24034. function assertTSBaseType(node, opts) {
  24035. assert("TSBaseType", node, opts);
  24036. }
  24037. function assertNumberLiteral(node, opts) {
  24038. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  24039. assert("NumberLiteral", node, opts);
  24040. }
  24041. function assertRegexLiteral(node, opts) {
  24042. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  24043. assert("RegexLiteral", node, opts);
  24044. }
  24045. function assertRestProperty(node, opts) {
  24046. console.trace("The node type RestProperty has been renamed to RestElement");
  24047. assert("RestProperty", node, opts);
  24048. }
  24049. function assertSpreadProperty(node, opts) {
  24050. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  24051. assert("SpreadProperty", node, opts);
  24052. }
  24053. }
  24054. });
  24055. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  24056. var require_createTypeAnnotationBasedOnTypeof2 = __commonJS({
  24057. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  24058. "use strict";
  24059. Object.defineProperty(exports, "__esModule", {
  24060. value: true
  24061. });
  24062. exports.default = createTypeAnnotationBasedOnTypeof;
  24063. var _generated = require_generated7();
  24064. function createTypeAnnotationBasedOnTypeof(type) {
  24065. if (type === "string") {
  24066. return (0, _generated.stringTypeAnnotation)();
  24067. } else if (type === "number") {
  24068. return (0, _generated.numberTypeAnnotation)();
  24069. } else if (type === "undefined") {
  24070. return (0, _generated.voidTypeAnnotation)();
  24071. } else if (type === "boolean") {
  24072. return (0, _generated.booleanTypeAnnotation)();
  24073. } else if (type === "function") {
  24074. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  24075. } else if (type === "object") {
  24076. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  24077. } else if (type === "symbol") {
  24078. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  24079. } else if (type === "bigint") {
  24080. return (0, _generated.anyTypeAnnotation)();
  24081. } else {
  24082. throw new Error("Invalid typeof value: " + type);
  24083. }
  24084. }
  24085. }
  24086. });
  24087. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  24088. var require_removeTypeDuplicates3 = __commonJS({
  24089. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  24090. "use strict";
  24091. Object.defineProperty(exports, "__esModule", {
  24092. value: true
  24093. });
  24094. exports.default = removeTypeDuplicates;
  24095. var _generated = require_generated6();
  24096. function getQualifiedName(node) {
  24097. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  24098. }
  24099. function removeTypeDuplicates(nodes) {
  24100. const generics = {};
  24101. const bases = {};
  24102. const typeGroups = [];
  24103. const types2 = [];
  24104. for (let i = 0; i < nodes.length; i++) {
  24105. const node = nodes[i];
  24106. if (!node)
  24107. continue;
  24108. if (types2.indexOf(node) >= 0) {
  24109. continue;
  24110. }
  24111. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  24112. return [node];
  24113. }
  24114. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  24115. bases[node.type] = node;
  24116. continue;
  24117. }
  24118. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  24119. if (typeGroups.indexOf(node.types) < 0) {
  24120. nodes = nodes.concat(node.types);
  24121. typeGroups.push(node.types);
  24122. }
  24123. continue;
  24124. }
  24125. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  24126. const name2 = getQualifiedName(node.id);
  24127. if (generics[name2]) {
  24128. let existing = generics[name2];
  24129. if (existing.typeParameters) {
  24130. if (node.typeParameters) {
  24131. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  24132. }
  24133. } else {
  24134. existing = node.typeParameters;
  24135. }
  24136. } else {
  24137. generics[name2] = node;
  24138. }
  24139. continue;
  24140. }
  24141. types2.push(node);
  24142. }
  24143. for (const type of Object.keys(bases)) {
  24144. types2.push(bases[type]);
  24145. }
  24146. for (const name2 of Object.keys(generics)) {
  24147. types2.push(generics[name2]);
  24148. }
  24149. return types2;
  24150. }
  24151. }
  24152. });
  24153. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  24154. var require_createFlowUnionType2 = __commonJS({
  24155. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  24156. "use strict";
  24157. Object.defineProperty(exports, "__esModule", {
  24158. value: true
  24159. });
  24160. exports.default = createFlowUnionType;
  24161. var _generated = require_generated7();
  24162. var _removeTypeDuplicates = require_removeTypeDuplicates3();
  24163. function createFlowUnionType(types2) {
  24164. const flattened = (0, _removeTypeDuplicates.default)(types2);
  24165. if (flattened.length === 1) {
  24166. return flattened[0];
  24167. } else {
  24168. return (0, _generated.unionTypeAnnotation)(flattened);
  24169. }
  24170. }
  24171. }
  24172. });
  24173. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  24174. var require_removeTypeDuplicates4 = __commonJS({
  24175. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  24176. "use strict";
  24177. Object.defineProperty(exports, "__esModule", {
  24178. value: true
  24179. });
  24180. exports.default = removeTypeDuplicates;
  24181. var _generated = require_generated6();
  24182. function removeTypeDuplicates(nodes) {
  24183. const generics = {};
  24184. const bases = {};
  24185. const typeGroups = [];
  24186. const types2 = [];
  24187. for (let i = 0; i < nodes.length; i++) {
  24188. const node = nodes[i];
  24189. if (!node)
  24190. continue;
  24191. if (types2.indexOf(node) >= 0) {
  24192. continue;
  24193. }
  24194. if ((0, _generated.isTSAnyKeyword)(node)) {
  24195. return [node];
  24196. }
  24197. if ((0, _generated.isTSBaseType)(node)) {
  24198. bases[node.type] = node;
  24199. continue;
  24200. }
  24201. if ((0, _generated.isTSUnionType)(node)) {
  24202. if (typeGroups.indexOf(node.types) < 0) {
  24203. nodes = nodes.concat(node.types);
  24204. typeGroups.push(node.types);
  24205. }
  24206. continue;
  24207. }
  24208. types2.push(node);
  24209. }
  24210. for (const type of Object.keys(bases)) {
  24211. types2.push(bases[type]);
  24212. }
  24213. for (const name2 of Object.keys(generics)) {
  24214. types2.push(generics[name2]);
  24215. }
  24216. return types2;
  24217. }
  24218. }
  24219. });
  24220. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  24221. var require_createTSUnionType2 = __commonJS({
  24222. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  24223. "use strict";
  24224. Object.defineProperty(exports, "__esModule", {
  24225. value: true
  24226. });
  24227. exports.default = createTSUnionType;
  24228. var _generated = require_generated7();
  24229. var _removeTypeDuplicates = require_removeTypeDuplicates4();
  24230. function createTSUnionType(typeAnnotations) {
  24231. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  24232. const flattened = (0, _removeTypeDuplicates.default)(types2);
  24233. if (flattened.length === 1) {
  24234. return flattened[0];
  24235. } else {
  24236. return (0, _generated.tsUnionType)(flattened);
  24237. }
  24238. }
  24239. }
  24240. });
  24241. // node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/generated/uppercase.js
  24242. var require_uppercase2 = __commonJS({
  24243. "node_modules/estree-to-babel/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  24244. "use strict";
  24245. Object.defineProperty(exports, "__esModule", {
  24246. value: true
  24247. });
  24248. Object.defineProperty(exports, "ArrayExpression", {
  24249. enumerable: true,
  24250. get: function() {
  24251. return _index.arrayExpression;
  24252. }
  24253. });
  24254. Object.defineProperty(exports, "AssignmentExpression", {
  24255. enumerable: true,
  24256. get: function() {
  24257. return _index.assignmentExpression;
  24258. }
  24259. });
  24260. Object.defineProperty(exports, "BinaryExpression", {
  24261. enumerable: true,
  24262. get: function() {
  24263. return _index.binaryExpression;
  24264. }
  24265. });
  24266. Object.defineProperty(exports, "InterpreterDirective", {
  24267. enumerable: true,
  24268. get: function() {
  24269. return _index.interpreterDirective;
  24270. }
  24271. });
  24272. Object.defineProperty(exports, "Directive", {
  24273. enumerable: true,
  24274. get: function() {
  24275. return _index.directive;
  24276. }
  24277. });
  24278. Object.defineProperty(exports, "DirectiveLiteral", {
  24279. enumerable: true,
  24280. get: function() {
  24281. return _index.directiveLiteral;
  24282. }
  24283. });
  24284. Object.defineProperty(exports, "BlockStatement", {
  24285. enumerable: true,
  24286. get: function() {
  24287. return _index.blockStatement;
  24288. }
  24289. });
  24290. Object.defineProperty(exports, "BreakStatement", {
  24291. enumerable: true,
  24292. get: function() {
  24293. return _index.breakStatement;
  24294. }
  24295. });
  24296. Object.defineProperty(exports, "CallExpression", {
  24297. enumerable: true,
  24298. get: function() {
  24299. return _index.callExpression;
  24300. }
  24301. });
  24302. Object.defineProperty(exports, "CatchClause", {
  24303. enumerable: true,
  24304. get: function() {
  24305. return _index.catchClause;
  24306. }
  24307. });
  24308. Object.defineProperty(exports, "ConditionalExpression", {
  24309. enumerable: true,
  24310. get: function() {
  24311. return _index.conditionalExpression;
  24312. }
  24313. });
  24314. Object.defineProperty(exports, "ContinueStatement", {
  24315. enumerable: true,
  24316. get: function() {
  24317. return _index.continueStatement;
  24318. }
  24319. });
  24320. Object.defineProperty(exports, "DebuggerStatement", {
  24321. enumerable: true,
  24322. get: function() {
  24323. return _index.debuggerStatement;
  24324. }
  24325. });
  24326. Object.defineProperty(exports, "DoWhileStatement", {
  24327. enumerable: true,
  24328. get: function() {
  24329. return _index.doWhileStatement;
  24330. }
  24331. });
  24332. Object.defineProperty(exports, "EmptyStatement", {
  24333. enumerable: true,
  24334. get: function() {
  24335. return _index.emptyStatement;
  24336. }
  24337. });
  24338. Object.defineProperty(exports, "ExpressionStatement", {
  24339. enumerable: true,
  24340. get: function() {
  24341. return _index.expressionStatement;
  24342. }
  24343. });
  24344. Object.defineProperty(exports, "File", {
  24345. enumerable: true,
  24346. get: function() {
  24347. return _index.file;
  24348. }
  24349. });
  24350. Object.defineProperty(exports, "ForInStatement", {
  24351. enumerable: true,
  24352. get: function() {
  24353. return _index.forInStatement;
  24354. }
  24355. });
  24356. Object.defineProperty(exports, "ForStatement", {
  24357. enumerable: true,
  24358. get: function() {
  24359. return _index.forStatement;
  24360. }
  24361. });
  24362. Object.defineProperty(exports, "FunctionDeclaration", {
  24363. enumerable: true,
  24364. get: function() {
  24365. return _index.functionDeclaration;
  24366. }
  24367. });
  24368. Object.defineProperty(exports, "FunctionExpression", {
  24369. enumerable: true,
  24370. get: function() {
  24371. return _index.functionExpression;
  24372. }
  24373. });
  24374. Object.defineProperty(exports, "Identifier", {
  24375. enumerable: true,
  24376. get: function() {
  24377. return _index.identifier;
  24378. }
  24379. });
  24380. Object.defineProperty(exports, "IfStatement", {
  24381. enumerable: true,
  24382. get: function() {
  24383. return _index.ifStatement;
  24384. }
  24385. });
  24386. Object.defineProperty(exports, "LabeledStatement", {
  24387. enumerable: true,
  24388. get: function() {
  24389. return _index.labeledStatement;
  24390. }
  24391. });
  24392. Object.defineProperty(exports, "StringLiteral", {
  24393. enumerable: true,
  24394. get: function() {
  24395. return _index.stringLiteral;
  24396. }
  24397. });
  24398. Object.defineProperty(exports, "NumericLiteral", {
  24399. enumerable: true,
  24400. get: function() {
  24401. return _index.numericLiteral;
  24402. }
  24403. });
  24404. Object.defineProperty(exports, "NullLiteral", {
  24405. enumerable: true,
  24406. get: function() {
  24407. return _index.nullLiteral;
  24408. }
  24409. });
  24410. Object.defineProperty(exports, "BooleanLiteral", {
  24411. enumerable: true,
  24412. get: function() {
  24413. return _index.booleanLiteral;
  24414. }
  24415. });
  24416. Object.defineProperty(exports, "RegExpLiteral", {
  24417. enumerable: true,
  24418. get: function() {
  24419. return _index.regExpLiteral;
  24420. }
  24421. });
  24422. Object.defineProperty(exports, "LogicalExpression", {
  24423. enumerable: true,
  24424. get: function() {
  24425. return _index.logicalExpression;
  24426. }
  24427. });
  24428. Object.defineProperty(exports, "MemberExpression", {
  24429. enumerable: true,
  24430. get: function() {
  24431. return _index.memberExpression;
  24432. }
  24433. });
  24434. Object.defineProperty(exports, "NewExpression", {
  24435. enumerable: true,
  24436. get: function() {
  24437. return _index.newExpression;
  24438. }
  24439. });
  24440. Object.defineProperty(exports, "Program", {
  24441. enumerable: true,
  24442. get: function() {
  24443. return _index.program;
  24444. }
  24445. });
  24446. Object.defineProperty(exports, "ObjectExpression", {
  24447. enumerable: true,
  24448. get: function() {
  24449. return _index.objectExpression;
  24450. }
  24451. });
  24452. Object.defineProperty(exports, "ObjectMethod", {
  24453. enumerable: true,
  24454. get: function() {
  24455. return _index.objectMethod;
  24456. }
  24457. });
  24458. Object.defineProperty(exports, "ObjectProperty", {
  24459. enumerable: true,
  24460. get: function() {
  24461. return _index.objectProperty;
  24462. }
  24463. });
  24464. Object.defineProperty(exports, "RestElement", {
  24465. enumerable: true,
  24466. get: function() {
  24467. return _index.restElement;
  24468. }
  24469. });
  24470. Object.defineProperty(exports, "ReturnStatement", {
  24471. enumerable: true,
  24472. get: function() {
  24473. return _index.returnStatement;
  24474. }
  24475. });
  24476. Object.defineProperty(exports, "SequenceExpression", {
  24477. enumerable: true,
  24478. get: function() {
  24479. return _index.sequenceExpression;
  24480. }
  24481. });
  24482. Object.defineProperty(exports, "ParenthesizedExpression", {
  24483. enumerable: true,
  24484. get: function() {
  24485. return _index.parenthesizedExpression;
  24486. }
  24487. });
  24488. Object.defineProperty(exports, "SwitchCase", {
  24489. enumerable: true,
  24490. get: function() {
  24491. return _index.switchCase;
  24492. }
  24493. });
  24494. Object.defineProperty(exports, "SwitchStatement", {
  24495. enumerable: true,
  24496. get: function() {
  24497. return _index.switchStatement;
  24498. }
  24499. });
  24500. Object.defineProperty(exports, "ThisExpression", {
  24501. enumerable: true,
  24502. get: function() {
  24503. return _index.thisExpression;
  24504. }
  24505. });
  24506. Object.defineProperty(exports, "ThrowStatement", {
  24507. enumerable: true,
  24508. get: function() {
  24509. return _index.throwStatement;
  24510. }
  24511. });
  24512. Object.defineProperty(exports, "TryStatement", {
  24513. enumerable: true,
  24514. get: function() {
  24515. return _index.tryStatement;
  24516. }
  24517. });
  24518. Object.defineProperty(exports, "UnaryExpression", {
  24519. enumerable: true,
  24520. get: function() {
  24521. return _index.unaryExpression;
  24522. }
  24523. });
  24524. Object.defineProperty(exports, "UpdateExpression", {
  24525. enumerable: true,
  24526. get: function() {
  24527. return _index.updateExpression;
  24528. }
  24529. });
  24530. Object.defineProperty(exports, "VariableDeclaration", {
  24531. enumerable: true,
  24532. get: function() {
  24533. return _index.variableDeclaration;
  24534. }
  24535. });
  24536. Object.defineProperty(exports, "VariableDeclarator", {
  24537. enumerable: true,
  24538. get: function() {
  24539. return _index.variableDeclarator;
  24540. }
  24541. });
  24542. Object.defineProperty(exports, "WhileStatement", {
  24543. enumerable: true,
  24544. get: function() {
  24545. return _index.whileStatement;
  24546. }
  24547. });
  24548. Object.defineProperty(exports, "WithStatement", {
  24549. enumerable: true,
  24550. get: function() {
  24551. return _index.withStatement;
  24552. }
  24553. });
  24554. Object.defineProperty(exports, "AssignmentPattern", {
  24555. enumerable: true,
  24556. get: function() {
  24557. return _index.assignmentPattern;
  24558. }
  24559. });
  24560. Object.defineProperty(exports, "ArrayPattern", {
  24561. enumerable: true,
  24562. get: function() {
  24563. return _index.arrayPattern;
  24564. }
  24565. });
  24566. Object.defineProperty(exports, "ArrowFunctionExpression", {
  24567. enumerable: true,
  24568. get: function() {
  24569. return _index.arrowFunctionExpression;
  24570. }
  24571. });
  24572. Object.defineProperty(exports, "ClassBody", {
  24573. enumerable: true,
  24574. get: function() {
  24575. return _index.classBody;
  24576. }
  24577. });
  24578. Object.defineProperty(exports, "ClassExpression", {
  24579. enumerable: true,
  24580. get: function() {
  24581. return _index.classExpression;
  24582. }
  24583. });
  24584. Object.defineProperty(exports, "ClassDeclaration", {
  24585. enumerable: true,
  24586. get: function() {
  24587. return _index.classDeclaration;
  24588. }
  24589. });
  24590. Object.defineProperty(exports, "ExportAllDeclaration", {
  24591. enumerable: true,
  24592. get: function() {
  24593. return _index.exportAllDeclaration;
  24594. }
  24595. });
  24596. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  24597. enumerable: true,
  24598. get: function() {
  24599. return _index.exportDefaultDeclaration;
  24600. }
  24601. });
  24602. Object.defineProperty(exports, "ExportNamedDeclaration", {
  24603. enumerable: true,
  24604. get: function() {
  24605. return _index.exportNamedDeclaration;
  24606. }
  24607. });
  24608. Object.defineProperty(exports, "ExportSpecifier", {
  24609. enumerable: true,
  24610. get: function() {
  24611. return _index.exportSpecifier;
  24612. }
  24613. });
  24614. Object.defineProperty(exports, "ForOfStatement", {
  24615. enumerable: true,
  24616. get: function() {
  24617. return _index.forOfStatement;
  24618. }
  24619. });
  24620. Object.defineProperty(exports, "ImportDeclaration", {
  24621. enumerable: true,
  24622. get: function() {
  24623. return _index.importDeclaration;
  24624. }
  24625. });
  24626. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  24627. enumerable: true,
  24628. get: function() {
  24629. return _index.importDefaultSpecifier;
  24630. }
  24631. });
  24632. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  24633. enumerable: true,
  24634. get: function() {
  24635. return _index.importNamespaceSpecifier;
  24636. }
  24637. });
  24638. Object.defineProperty(exports, "ImportSpecifier", {
  24639. enumerable: true,
  24640. get: function() {
  24641. return _index.importSpecifier;
  24642. }
  24643. });
  24644. Object.defineProperty(exports, "MetaProperty", {
  24645. enumerable: true,
  24646. get: function() {
  24647. return _index.metaProperty;
  24648. }
  24649. });
  24650. Object.defineProperty(exports, "ClassMethod", {
  24651. enumerable: true,
  24652. get: function() {
  24653. return _index.classMethod;
  24654. }
  24655. });
  24656. Object.defineProperty(exports, "ObjectPattern", {
  24657. enumerable: true,
  24658. get: function() {
  24659. return _index.objectPattern;
  24660. }
  24661. });
  24662. Object.defineProperty(exports, "SpreadElement", {
  24663. enumerable: true,
  24664. get: function() {
  24665. return _index.spreadElement;
  24666. }
  24667. });
  24668. Object.defineProperty(exports, "Super", {
  24669. enumerable: true,
  24670. get: function() {
  24671. return _index.super;
  24672. }
  24673. });
  24674. Object.defineProperty(exports, "TaggedTemplateExpression", {
  24675. enumerable: true,
  24676. get: function() {
  24677. return _index.taggedTemplateExpression;
  24678. }
  24679. });
  24680. Object.defineProperty(exports, "TemplateElement", {
  24681. enumerable: true,
  24682. get: function() {
  24683. return _index.templateElement;
  24684. }
  24685. });
  24686. Object.defineProperty(exports, "TemplateLiteral", {
  24687. enumerable: true,
  24688. get: function() {
  24689. return _index.templateLiteral;
  24690. }
  24691. });
  24692. Object.defineProperty(exports, "YieldExpression", {
  24693. enumerable: true,
  24694. get: function() {
  24695. return _index.yieldExpression;
  24696. }
  24697. });
  24698. Object.defineProperty(exports, "AwaitExpression", {
  24699. enumerable: true,
  24700. get: function() {
  24701. return _index.awaitExpression;
  24702. }
  24703. });
  24704. Object.defineProperty(exports, "Import", {
  24705. enumerable: true,
  24706. get: function() {
  24707. return _index.import;
  24708. }
  24709. });
  24710. Object.defineProperty(exports, "BigIntLiteral", {
  24711. enumerable: true,
  24712. get: function() {
  24713. return _index.bigIntLiteral;
  24714. }
  24715. });
  24716. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  24717. enumerable: true,
  24718. get: function() {
  24719. return _index.exportNamespaceSpecifier;
  24720. }
  24721. });
  24722. Object.defineProperty(exports, "OptionalMemberExpression", {
  24723. enumerable: true,
  24724. get: function() {
  24725. return _index.optionalMemberExpression;
  24726. }
  24727. });
  24728. Object.defineProperty(exports, "OptionalCallExpression", {
  24729. enumerable: true,
  24730. get: function() {
  24731. return _index.optionalCallExpression;
  24732. }
  24733. });
  24734. Object.defineProperty(exports, "AnyTypeAnnotation", {
  24735. enumerable: true,
  24736. get: function() {
  24737. return _index.anyTypeAnnotation;
  24738. }
  24739. });
  24740. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  24741. enumerable: true,
  24742. get: function() {
  24743. return _index.arrayTypeAnnotation;
  24744. }
  24745. });
  24746. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  24747. enumerable: true,
  24748. get: function() {
  24749. return _index.booleanTypeAnnotation;
  24750. }
  24751. });
  24752. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  24753. enumerable: true,
  24754. get: function() {
  24755. return _index.booleanLiteralTypeAnnotation;
  24756. }
  24757. });
  24758. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  24759. enumerable: true,
  24760. get: function() {
  24761. return _index.nullLiteralTypeAnnotation;
  24762. }
  24763. });
  24764. Object.defineProperty(exports, "ClassImplements", {
  24765. enumerable: true,
  24766. get: function() {
  24767. return _index.classImplements;
  24768. }
  24769. });
  24770. Object.defineProperty(exports, "DeclareClass", {
  24771. enumerable: true,
  24772. get: function() {
  24773. return _index.declareClass;
  24774. }
  24775. });
  24776. Object.defineProperty(exports, "DeclareFunction", {
  24777. enumerable: true,
  24778. get: function() {
  24779. return _index.declareFunction;
  24780. }
  24781. });
  24782. Object.defineProperty(exports, "DeclareInterface", {
  24783. enumerable: true,
  24784. get: function() {
  24785. return _index.declareInterface;
  24786. }
  24787. });
  24788. Object.defineProperty(exports, "DeclareModule", {
  24789. enumerable: true,
  24790. get: function() {
  24791. return _index.declareModule;
  24792. }
  24793. });
  24794. Object.defineProperty(exports, "DeclareModuleExports", {
  24795. enumerable: true,
  24796. get: function() {
  24797. return _index.declareModuleExports;
  24798. }
  24799. });
  24800. Object.defineProperty(exports, "DeclareTypeAlias", {
  24801. enumerable: true,
  24802. get: function() {
  24803. return _index.declareTypeAlias;
  24804. }
  24805. });
  24806. Object.defineProperty(exports, "DeclareOpaqueType", {
  24807. enumerable: true,
  24808. get: function() {
  24809. return _index.declareOpaqueType;
  24810. }
  24811. });
  24812. Object.defineProperty(exports, "DeclareVariable", {
  24813. enumerable: true,
  24814. get: function() {
  24815. return _index.declareVariable;
  24816. }
  24817. });
  24818. Object.defineProperty(exports, "DeclareExportDeclaration", {
  24819. enumerable: true,
  24820. get: function() {
  24821. return _index.declareExportDeclaration;
  24822. }
  24823. });
  24824. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  24825. enumerable: true,
  24826. get: function() {
  24827. return _index.declareExportAllDeclaration;
  24828. }
  24829. });
  24830. Object.defineProperty(exports, "DeclaredPredicate", {
  24831. enumerable: true,
  24832. get: function() {
  24833. return _index.declaredPredicate;
  24834. }
  24835. });
  24836. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  24837. enumerable: true,
  24838. get: function() {
  24839. return _index.existsTypeAnnotation;
  24840. }
  24841. });
  24842. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  24843. enumerable: true,
  24844. get: function() {
  24845. return _index.functionTypeAnnotation;
  24846. }
  24847. });
  24848. Object.defineProperty(exports, "FunctionTypeParam", {
  24849. enumerable: true,
  24850. get: function() {
  24851. return _index.functionTypeParam;
  24852. }
  24853. });
  24854. Object.defineProperty(exports, "GenericTypeAnnotation", {
  24855. enumerable: true,
  24856. get: function() {
  24857. return _index.genericTypeAnnotation;
  24858. }
  24859. });
  24860. Object.defineProperty(exports, "InferredPredicate", {
  24861. enumerable: true,
  24862. get: function() {
  24863. return _index.inferredPredicate;
  24864. }
  24865. });
  24866. Object.defineProperty(exports, "InterfaceExtends", {
  24867. enumerable: true,
  24868. get: function() {
  24869. return _index.interfaceExtends;
  24870. }
  24871. });
  24872. Object.defineProperty(exports, "InterfaceDeclaration", {
  24873. enumerable: true,
  24874. get: function() {
  24875. return _index.interfaceDeclaration;
  24876. }
  24877. });
  24878. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  24879. enumerable: true,
  24880. get: function() {
  24881. return _index.interfaceTypeAnnotation;
  24882. }
  24883. });
  24884. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  24885. enumerable: true,
  24886. get: function() {
  24887. return _index.intersectionTypeAnnotation;
  24888. }
  24889. });
  24890. Object.defineProperty(exports, "MixedTypeAnnotation", {
  24891. enumerable: true,
  24892. get: function() {
  24893. return _index.mixedTypeAnnotation;
  24894. }
  24895. });
  24896. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  24897. enumerable: true,
  24898. get: function() {
  24899. return _index.emptyTypeAnnotation;
  24900. }
  24901. });
  24902. Object.defineProperty(exports, "NullableTypeAnnotation", {
  24903. enumerable: true,
  24904. get: function() {
  24905. return _index.nullableTypeAnnotation;
  24906. }
  24907. });
  24908. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  24909. enumerable: true,
  24910. get: function() {
  24911. return _index.numberLiteralTypeAnnotation;
  24912. }
  24913. });
  24914. Object.defineProperty(exports, "NumberTypeAnnotation", {
  24915. enumerable: true,
  24916. get: function() {
  24917. return _index.numberTypeAnnotation;
  24918. }
  24919. });
  24920. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  24921. enumerable: true,
  24922. get: function() {
  24923. return _index.objectTypeAnnotation;
  24924. }
  24925. });
  24926. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  24927. enumerable: true,
  24928. get: function() {
  24929. return _index.objectTypeInternalSlot;
  24930. }
  24931. });
  24932. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  24933. enumerable: true,
  24934. get: function() {
  24935. return _index.objectTypeCallProperty;
  24936. }
  24937. });
  24938. Object.defineProperty(exports, "ObjectTypeIndexer", {
  24939. enumerable: true,
  24940. get: function() {
  24941. return _index.objectTypeIndexer;
  24942. }
  24943. });
  24944. Object.defineProperty(exports, "ObjectTypeProperty", {
  24945. enumerable: true,
  24946. get: function() {
  24947. return _index.objectTypeProperty;
  24948. }
  24949. });
  24950. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  24951. enumerable: true,
  24952. get: function() {
  24953. return _index.objectTypeSpreadProperty;
  24954. }
  24955. });
  24956. Object.defineProperty(exports, "OpaqueType", {
  24957. enumerable: true,
  24958. get: function() {
  24959. return _index.opaqueType;
  24960. }
  24961. });
  24962. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  24963. enumerable: true,
  24964. get: function() {
  24965. return _index.qualifiedTypeIdentifier;
  24966. }
  24967. });
  24968. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  24969. enumerable: true,
  24970. get: function() {
  24971. return _index.stringLiteralTypeAnnotation;
  24972. }
  24973. });
  24974. Object.defineProperty(exports, "StringTypeAnnotation", {
  24975. enumerable: true,
  24976. get: function() {
  24977. return _index.stringTypeAnnotation;
  24978. }
  24979. });
  24980. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  24981. enumerable: true,
  24982. get: function() {
  24983. return _index.symbolTypeAnnotation;
  24984. }
  24985. });
  24986. Object.defineProperty(exports, "ThisTypeAnnotation", {
  24987. enumerable: true,
  24988. get: function() {
  24989. return _index.thisTypeAnnotation;
  24990. }
  24991. });
  24992. Object.defineProperty(exports, "TupleTypeAnnotation", {
  24993. enumerable: true,
  24994. get: function() {
  24995. return _index.tupleTypeAnnotation;
  24996. }
  24997. });
  24998. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  24999. enumerable: true,
  25000. get: function() {
  25001. return _index.typeofTypeAnnotation;
  25002. }
  25003. });
  25004. Object.defineProperty(exports, "TypeAlias", {
  25005. enumerable: true,
  25006. get: function() {
  25007. return _index.typeAlias;
  25008. }
  25009. });
  25010. Object.defineProperty(exports, "TypeAnnotation", {
  25011. enumerable: true,
  25012. get: function() {
  25013. return _index.typeAnnotation;
  25014. }
  25015. });
  25016. Object.defineProperty(exports, "TypeCastExpression", {
  25017. enumerable: true,
  25018. get: function() {
  25019. return _index.typeCastExpression;
  25020. }
  25021. });
  25022. Object.defineProperty(exports, "TypeParameter", {
  25023. enumerable: true,
  25024. get: function() {
  25025. return _index.typeParameter;
  25026. }
  25027. });
  25028. Object.defineProperty(exports, "TypeParameterDeclaration", {
  25029. enumerable: true,
  25030. get: function() {
  25031. return _index.typeParameterDeclaration;
  25032. }
  25033. });
  25034. Object.defineProperty(exports, "TypeParameterInstantiation", {
  25035. enumerable: true,
  25036. get: function() {
  25037. return _index.typeParameterInstantiation;
  25038. }
  25039. });
  25040. Object.defineProperty(exports, "UnionTypeAnnotation", {
  25041. enumerable: true,
  25042. get: function() {
  25043. return _index.unionTypeAnnotation;
  25044. }
  25045. });
  25046. Object.defineProperty(exports, "Variance", {
  25047. enumerable: true,
  25048. get: function() {
  25049. return _index.variance;
  25050. }
  25051. });
  25052. Object.defineProperty(exports, "VoidTypeAnnotation", {
  25053. enumerable: true,
  25054. get: function() {
  25055. return _index.voidTypeAnnotation;
  25056. }
  25057. });
  25058. Object.defineProperty(exports, "EnumDeclaration", {
  25059. enumerable: true,
  25060. get: function() {
  25061. return _index.enumDeclaration;
  25062. }
  25063. });
  25064. Object.defineProperty(exports, "EnumBooleanBody", {
  25065. enumerable: true,
  25066. get: function() {
  25067. return _index.enumBooleanBody;
  25068. }
  25069. });
  25070. Object.defineProperty(exports, "EnumNumberBody", {
  25071. enumerable: true,
  25072. get: function() {
  25073. return _index.enumNumberBody;
  25074. }
  25075. });
  25076. Object.defineProperty(exports, "EnumStringBody", {
  25077. enumerable: true,
  25078. get: function() {
  25079. return _index.enumStringBody;
  25080. }
  25081. });
  25082. Object.defineProperty(exports, "EnumSymbolBody", {
  25083. enumerable: true,
  25084. get: function() {
  25085. return _index.enumSymbolBody;
  25086. }
  25087. });
  25088. Object.defineProperty(exports, "EnumBooleanMember", {
  25089. enumerable: true,
  25090. get: function() {
  25091. return _index.enumBooleanMember;
  25092. }
  25093. });
  25094. Object.defineProperty(exports, "EnumNumberMember", {
  25095. enumerable: true,
  25096. get: function() {
  25097. return _index.enumNumberMember;
  25098. }
  25099. });
  25100. Object.defineProperty(exports, "EnumStringMember", {
  25101. enumerable: true,
  25102. get: function() {
  25103. return _index.enumStringMember;
  25104. }
  25105. });
  25106. Object.defineProperty(exports, "EnumDefaultedMember", {
  25107. enumerable: true,
  25108. get: function() {
  25109. return _index.enumDefaultedMember;
  25110. }
  25111. });
  25112. Object.defineProperty(exports, "IndexedAccessType", {
  25113. enumerable: true,
  25114. get: function() {
  25115. return _index.indexedAccessType;
  25116. }
  25117. });
  25118. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  25119. enumerable: true,
  25120. get: function() {
  25121. return _index.optionalIndexedAccessType;
  25122. }
  25123. });
  25124. Object.defineProperty(exports, "JSXAttribute", {
  25125. enumerable: true,
  25126. get: function() {
  25127. return _index.jsxAttribute;
  25128. }
  25129. });
  25130. Object.defineProperty(exports, "JSXClosingElement", {
  25131. enumerable: true,
  25132. get: function() {
  25133. return _index.jsxClosingElement;
  25134. }
  25135. });
  25136. Object.defineProperty(exports, "JSXElement", {
  25137. enumerable: true,
  25138. get: function() {
  25139. return _index.jsxElement;
  25140. }
  25141. });
  25142. Object.defineProperty(exports, "JSXEmptyExpression", {
  25143. enumerable: true,
  25144. get: function() {
  25145. return _index.jsxEmptyExpression;
  25146. }
  25147. });
  25148. Object.defineProperty(exports, "JSXExpressionContainer", {
  25149. enumerable: true,
  25150. get: function() {
  25151. return _index.jsxExpressionContainer;
  25152. }
  25153. });
  25154. Object.defineProperty(exports, "JSXSpreadChild", {
  25155. enumerable: true,
  25156. get: function() {
  25157. return _index.jsxSpreadChild;
  25158. }
  25159. });
  25160. Object.defineProperty(exports, "JSXIdentifier", {
  25161. enumerable: true,
  25162. get: function() {
  25163. return _index.jsxIdentifier;
  25164. }
  25165. });
  25166. Object.defineProperty(exports, "JSXMemberExpression", {
  25167. enumerable: true,
  25168. get: function() {
  25169. return _index.jsxMemberExpression;
  25170. }
  25171. });
  25172. Object.defineProperty(exports, "JSXNamespacedName", {
  25173. enumerable: true,
  25174. get: function() {
  25175. return _index.jsxNamespacedName;
  25176. }
  25177. });
  25178. Object.defineProperty(exports, "JSXOpeningElement", {
  25179. enumerable: true,
  25180. get: function() {
  25181. return _index.jsxOpeningElement;
  25182. }
  25183. });
  25184. Object.defineProperty(exports, "JSXSpreadAttribute", {
  25185. enumerable: true,
  25186. get: function() {
  25187. return _index.jsxSpreadAttribute;
  25188. }
  25189. });
  25190. Object.defineProperty(exports, "JSXText", {
  25191. enumerable: true,
  25192. get: function() {
  25193. return _index.jsxText;
  25194. }
  25195. });
  25196. Object.defineProperty(exports, "JSXFragment", {
  25197. enumerable: true,
  25198. get: function() {
  25199. return _index.jsxFragment;
  25200. }
  25201. });
  25202. Object.defineProperty(exports, "JSXOpeningFragment", {
  25203. enumerable: true,
  25204. get: function() {
  25205. return _index.jsxOpeningFragment;
  25206. }
  25207. });
  25208. Object.defineProperty(exports, "JSXClosingFragment", {
  25209. enumerable: true,
  25210. get: function() {
  25211. return _index.jsxClosingFragment;
  25212. }
  25213. });
  25214. Object.defineProperty(exports, "Noop", {
  25215. enumerable: true,
  25216. get: function() {
  25217. return _index.noop;
  25218. }
  25219. });
  25220. Object.defineProperty(exports, "Placeholder", {
  25221. enumerable: true,
  25222. get: function() {
  25223. return _index.placeholder;
  25224. }
  25225. });
  25226. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  25227. enumerable: true,
  25228. get: function() {
  25229. return _index.v8IntrinsicIdentifier;
  25230. }
  25231. });
  25232. Object.defineProperty(exports, "ArgumentPlaceholder", {
  25233. enumerable: true,
  25234. get: function() {
  25235. return _index.argumentPlaceholder;
  25236. }
  25237. });
  25238. Object.defineProperty(exports, "BindExpression", {
  25239. enumerable: true,
  25240. get: function() {
  25241. return _index.bindExpression;
  25242. }
  25243. });
  25244. Object.defineProperty(exports, "ClassProperty", {
  25245. enumerable: true,
  25246. get: function() {
  25247. return _index.classProperty;
  25248. }
  25249. });
  25250. Object.defineProperty(exports, "PipelineTopicExpression", {
  25251. enumerable: true,
  25252. get: function() {
  25253. return _index.pipelineTopicExpression;
  25254. }
  25255. });
  25256. Object.defineProperty(exports, "PipelineBareFunction", {
  25257. enumerable: true,
  25258. get: function() {
  25259. return _index.pipelineBareFunction;
  25260. }
  25261. });
  25262. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  25263. enumerable: true,
  25264. get: function() {
  25265. return _index.pipelinePrimaryTopicReference;
  25266. }
  25267. });
  25268. Object.defineProperty(exports, "ClassPrivateProperty", {
  25269. enumerable: true,
  25270. get: function() {
  25271. return _index.classPrivateProperty;
  25272. }
  25273. });
  25274. Object.defineProperty(exports, "ClassPrivateMethod", {
  25275. enumerable: true,
  25276. get: function() {
  25277. return _index.classPrivateMethod;
  25278. }
  25279. });
  25280. Object.defineProperty(exports, "ImportAttribute", {
  25281. enumerable: true,
  25282. get: function() {
  25283. return _index.importAttribute;
  25284. }
  25285. });
  25286. Object.defineProperty(exports, "Decorator", {
  25287. enumerable: true,
  25288. get: function() {
  25289. return _index.decorator;
  25290. }
  25291. });
  25292. Object.defineProperty(exports, "DoExpression", {
  25293. enumerable: true,
  25294. get: function() {
  25295. return _index.doExpression;
  25296. }
  25297. });
  25298. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  25299. enumerable: true,
  25300. get: function() {
  25301. return _index.exportDefaultSpecifier;
  25302. }
  25303. });
  25304. Object.defineProperty(exports, "PrivateName", {
  25305. enumerable: true,
  25306. get: function() {
  25307. return _index.privateName;
  25308. }
  25309. });
  25310. Object.defineProperty(exports, "RecordExpression", {
  25311. enumerable: true,
  25312. get: function() {
  25313. return _index.recordExpression;
  25314. }
  25315. });
  25316. Object.defineProperty(exports, "TupleExpression", {
  25317. enumerable: true,
  25318. get: function() {
  25319. return _index.tupleExpression;
  25320. }
  25321. });
  25322. Object.defineProperty(exports, "DecimalLiteral", {
  25323. enumerable: true,
  25324. get: function() {
  25325. return _index.decimalLiteral;
  25326. }
  25327. });
  25328. Object.defineProperty(exports, "StaticBlock", {
  25329. enumerable: true,
  25330. get: function() {
  25331. return _index.staticBlock;
  25332. }
  25333. });
  25334. Object.defineProperty(exports, "ModuleExpression", {
  25335. enumerable: true,
  25336. get: function() {
  25337. return _index.moduleExpression;
  25338. }
  25339. });
  25340. Object.defineProperty(exports, "TSParameterProperty", {
  25341. enumerable: true,
  25342. get: function() {
  25343. return _index.tsParameterProperty;
  25344. }
  25345. });
  25346. Object.defineProperty(exports, "TSDeclareFunction", {
  25347. enumerable: true,
  25348. get: function() {
  25349. return _index.tsDeclareFunction;
  25350. }
  25351. });
  25352. Object.defineProperty(exports, "TSDeclareMethod", {
  25353. enumerable: true,
  25354. get: function() {
  25355. return _index.tsDeclareMethod;
  25356. }
  25357. });
  25358. Object.defineProperty(exports, "TSQualifiedName", {
  25359. enumerable: true,
  25360. get: function() {
  25361. return _index.tsQualifiedName;
  25362. }
  25363. });
  25364. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  25365. enumerable: true,
  25366. get: function() {
  25367. return _index.tsCallSignatureDeclaration;
  25368. }
  25369. });
  25370. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  25371. enumerable: true,
  25372. get: function() {
  25373. return _index.tsConstructSignatureDeclaration;
  25374. }
  25375. });
  25376. Object.defineProperty(exports, "TSPropertySignature", {
  25377. enumerable: true,
  25378. get: function() {
  25379. return _index.tsPropertySignature;
  25380. }
  25381. });
  25382. Object.defineProperty(exports, "TSMethodSignature", {
  25383. enumerable: true,
  25384. get: function() {
  25385. return _index.tsMethodSignature;
  25386. }
  25387. });
  25388. Object.defineProperty(exports, "TSIndexSignature", {
  25389. enumerable: true,
  25390. get: function() {
  25391. return _index.tsIndexSignature;
  25392. }
  25393. });
  25394. Object.defineProperty(exports, "TSAnyKeyword", {
  25395. enumerable: true,
  25396. get: function() {
  25397. return _index.tsAnyKeyword;
  25398. }
  25399. });
  25400. Object.defineProperty(exports, "TSBooleanKeyword", {
  25401. enumerable: true,
  25402. get: function() {
  25403. return _index.tsBooleanKeyword;
  25404. }
  25405. });
  25406. Object.defineProperty(exports, "TSBigIntKeyword", {
  25407. enumerable: true,
  25408. get: function() {
  25409. return _index.tsBigIntKeyword;
  25410. }
  25411. });
  25412. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  25413. enumerable: true,
  25414. get: function() {
  25415. return _index.tsIntrinsicKeyword;
  25416. }
  25417. });
  25418. Object.defineProperty(exports, "TSNeverKeyword", {
  25419. enumerable: true,
  25420. get: function() {
  25421. return _index.tsNeverKeyword;
  25422. }
  25423. });
  25424. Object.defineProperty(exports, "TSNullKeyword", {
  25425. enumerable: true,
  25426. get: function() {
  25427. return _index.tsNullKeyword;
  25428. }
  25429. });
  25430. Object.defineProperty(exports, "TSNumberKeyword", {
  25431. enumerable: true,
  25432. get: function() {
  25433. return _index.tsNumberKeyword;
  25434. }
  25435. });
  25436. Object.defineProperty(exports, "TSObjectKeyword", {
  25437. enumerable: true,
  25438. get: function() {
  25439. return _index.tsObjectKeyword;
  25440. }
  25441. });
  25442. Object.defineProperty(exports, "TSStringKeyword", {
  25443. enumerable: true,
  25444. get: function() {
  25445. return _index.tsStringKeyword;
  25446. }
  25447. });
  25448. Object.defineProperty(exports, "TSSymbolKeyword", {
  25449. enumerable: true,
  25450. get: function() {
  25451. return _index.tsSymbolKeyword;
  25452. }
  25453. });
  25454. Object.defineProperty(exports, "TSUndefinedKeyword", {
  25455. enumerable: true,
  25456. get: function() {
  25457. return _index.tsUndefinedKeyword;
  25458. }
  25459. });
  25460. Object.defineProperty(exports, "TSUnknownKeyword", {
  25461. enumerable: true,
  25462. get: function() {
  25463. return _index.tsUnknownKeyword;
  25464. }
  25465. });
  25466. Object.defineProperty(exports, "TSVoidKeyword", {
  25467. enumerable: true,
  25468. get: function() {
  25469. return _index.tsVoidKeyword;
  25470. }
  25471. });
  25472. Object.defineProperty(exports, "TSThisType", {
  25473. enumerable: true,
  25474. get: function() {
  25475. return _index.tsThisType;
  25476. }
  25477. });
  25478. Object.defineProperty(exports, "TSFunctionType", {
  25479. enumerable: true,
  25480. get: function() {
  25481. return _index.tsFunctionType;
  25482. }
  25483. });
  25484. Object.defineProperty(exports, "TSConstructorType", {
  25485. enumerable: true,
  25486. get: function() {
  25487. return _index.tsConstructorType;
  25488. }
  25489. });
  25490. Object.defineProperty(exports, "TSTypeReference", {
  25491. enumerable: true,
  25492. get: function() {
  25493. return _index.tsTypeReference;
  25494. }
  25495. });
  25496. Object.defineProperty(exports, "TSTypePredicate", {
  25497. enumerable: true,
  25498. get: function() {
  25499. return _index.tsTypePredicate;
  25500. }
  25501. });
  25502. Object.defineProperty(exports, "TSTypeQuery", {
  25503. enumerable: true,
  25504. get: function() {
  25505. return _index.tsTypeQuery;
  25506. }
  25507. });
  25508. Object.defineProperty(exports, "TSTypeLiteral", {
  25509. enumerable: true,
  25510. get: function() {
  25511. return _index.tsTypeLiteral;
  25512. }
  25513. });
  25514. Object.defineProperty(exports, "TSArrayType", {
  25515. enumerable: true,
  25516. get: function() {
  25517. return _index.tsArrayType;
  25518. }
  25519. });
  25520. Object.defineProperty(exports, "TSTupleType", {
  25521. enumerable: true,
  25522. get: function() {
  25523. return _index.tsTupleType;
  25524. }
  25525. });
  25526. Object.defineProperty(exports, "TSOptionalType", {
  25527. enumerable: true,
  25528. get: function() {
  25529. return _index.tsOptionalType;
  25530. }
  25531. });
  25532. Object.defineProperty(exports, "TSRestType", {
  25533. enumerable: true,
  25534. get: function() {
  25535. return _index.tsRestType;
  25536. }
  25537. });
  25538. Object.defineProperty(exports, "TSNamedTupleMember", {
  25539. enumerable: true,
  25540. get: function() {
  25541. return _index.tsNamedTupleMember;
  25542. }
  25543. });
  25544. Object.defineProperty(exports, "TSUnionType", {
  25545. enumerable: true,
  25546. get: function() {
  25547. return _index.tsUnionType;
  25548. }
  25549. });
  25550. Object.defineProperty(exports, "TSIntersectionType", {
  25551. enumerable: true,
  25552. get: function() {
  25553. return _index.tsIntersectionType;
  25554. }
  25555. });
  25556. Object.defineProperty(exports, "TSConditionalType", {
  25557. enumerable: true,
  25558. get: function() {
  25559. return _index.tsConditionalType;
  25560. }
  25561. });
  25562. Object.defineProperty(exports, "TSInferType", {
  25563. enumerable: true,
  25564. get: function() {
  25565. return _index.tsInferType;
  25566. }
  25567. });
  25568. Object.defineProperty(exports, "TSParenthesizedType", {
  25569. enumerable: true,
  25570. get: function() {
  25571. return _index.tsParenthesizedType;
  25572. }
  25573. });
  25574. Object.defineProperty(exports, "TSTypeOperator", {
  25575. enumerable: true,
  25576. get: function() {
  25577. return _index.tsTypeOperator;
  25578. }
  25579. });
  25580. Object.defineProperty(exports, "TSIndexedAccessType", {
  25581. enumerable: true,
  25582. get: function() {
  25583. return _index.tsIndexedAccessType;
  25584. }
  25585. });
  25586. Object.defineProperty(exports, "TSMappedType", {
  25587. enumerable: true,
  25588. get: function() {
  25589. return _index.tsMappedType;
  25590. }
  25591. });
  25592. Object.defineProperty(exports, "TSLiteralType", {
  25593. enumerable: true,
  25594. get: function() {
  25595. return _index.tsLiteralType;
  25596. }
  25597. });
  25598. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  25599. enumerable: true,
  25600. get: function() {
  25601. return _index.tsExpressionWithTypeArguments;
  25602. }
  25603. });
  25604. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  25605. enumerable: true,
  25606. get: function() {
  25607. return _index.tsInterfaceDeclaration;
  25608. }
  25609. });
  25610. Object.defineProperty(exports, "TSInterfaceBody", {
  25611. enumerable: true,
  25612. get: function() {
  25613. return _index.tsInterfaceBody;
  25614. }
  25615. });
  25616. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  25617. enumerable: true,
  25618. get: function() {
  25619. return _index.tsTypeAliasDeclaration;
  25620. }
  25621. });
  25622. Object.defineProperty(exports, "TSAsExpression", {
  25623. enumerable: true,
  25624. get: function() {
  25625. return _index.tsAsExpression;
  25626. }
  25627. });
  25628. Object.defineProperty(exports, "TSTypeAssertion", {
  25629. enumerable: true,
  25630. get: function() {
  25631. return _index.tsTypeAssertion;
  25632. }
  25633. });
  25634. Object.defineProperty(exports, "TSEnumDeclaration", {
  25635. enumerable: true,
  25636. get: function() {
  25637. return _index.tsEnumDeclaration;
  25638. }
  25639. });
  25640. Object.defineProperty(exports, "TSEnumMember", {
  25641. enumerable: true,
  25642. get: function() {
  25643. return _index.tsEnumMember;
  25644. }
  25645. });
  25646. Object.defineProperty(exports, "TSModuleDeclaration", {
  25647. enumerable: true,
  25648. get: function() {
  25649. return _index.tsModuleDeclaration;
  25650. }
  25651. });
  25652. Object.defineProperty(exports, "TSModuleBlock", {
  25653. enumerable: true,
  25654. get: function() {
  25655. return _index.tsModuleBlock;
  25656. }
  25657. });
  25658. Object.defineProperty(exports, "TSImportType", {
  25659. enumerable: true,
  25660. get: function() {
  25661. return _index.tsImportType;
  25662. }
  25663. });
  25664. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  25665. enumerable: true,
  25666. get: function() {
  25667. return _index.tsImportEqualsDeclaration;
  25668. }
  25669. });
  25670. Object.defineProperty(exports, "TSExternalModuleReference", {
  25671. enumerable: true,
  25672. get: function() {
  25673. return _index.tsExternalModuleReference;
  25674. }
  25675. });
  25676. Object.defineProperty(exports, "TSNonNullExpression", {
  25677. enumerable: true,
  25678. get: function() {
  25679. return _index.tsNonNullExpression;
  25680. }
  25681. });
  25682. Object.defineProperty(exports, "TSExportAssignment", {
  25683. enumerable: true,
  25684. get: function() {
  25685. return _index.tsExportAssignment;
  25686. }
  25687. });
  25688. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  25689. enumerable: true,
  25690. get: function() {
  25691. return _index.tsNamespaceExportDeclaration;
  25692. }
  25693. });
  25694. Object.defineProperty(exports, "TSTypeAnnotation", {
  25695. enumerable: true,
  25696. get: function() {
  25697. return _index.tsTypeAnnotation;
  25698. }
  25699. });
  25700. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  25701. enumerable: true,
  25702. get: function() {
  25703. return _index.tsTypeParameterInstantiation;
  25704. }
  25705. });
  25706. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  25707. enumerable: true,
  25708. get: function() {
  25709. return _index.tsTypeParameterDeclaration;
  25710. }
  25711. });
  25712. Object.defineProperty(exports, "TSTypeParameter", {
  25713. enumerable: true,
  25714. get: function() {
  25715. return _index.tsTypeParameter;
  25716. }
  25717. });
  25718. Object.defineProperty(exports, "NumberLiteral", {
  25719. enumerable: true,
  25720. get: function() {
  25721. return _index.numberLiteral;
  25722. }
  25723. });
  25724. Object.defineProperty(exports, "RegexLiteral", {
  25725. enumerable: true,
  25726. get: function() {
  25727. return _index.regexLiteral;
  25728. }
  25729. });
  25730. Object.defineProperty(exports, "RestProperty", {
  25731. enumerable: true,
  25732. get: function() {
  25733. return _index.restProperty;
  25734. }
  25735. });
  25736. Object.defineProperty(exports, "SpreadProperty", {
  25737. enumerable: true,
  25738. get: function() {
  25739. return _index.spreadProperty;
  25740. }
  25741. });
  25742. var _index = require_generated7();
  25743. }
  25744. });
  25745. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneNode.js
  25746. var require_cloneNode2 = __commonJS({
  25747. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  25748. "use strict";
  25749. Object.defineProperty(exports, "__esModule", {
  25750. value: true
  25751. });
  25752. exports.default = cloneNode;
  25753. var _definitions = require_definitions2();
  25754. var _generated = require_generated6();
  25755. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  25756. function cloneIfNode(obj, deep, withoutLoc) {
  25757. if (obj && typeof obj.type === "string") {
  25758. return cloneNode(obj, deep, withoutLoc);
  25759. }
  25760. return obj;
  25761. }
  25762. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  25763. if (Array.isArray(obj)) {
  25764. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  25765. }
  25766. return cloneIfNode(obj, deep, withoutLoc);
  25767. }
  25768. function cloneNode(node, deep = true, withoutLoc = false) {
  25769. if (!node)
  25770. return node;
  25771. const {
  25772. type
  25773. } = node;
  25774. const newNode = {
  25775. type: node.type
  25776. };
  25777. if ((0, _generated.isIdentifier)(node)) {
  25778. newNode.name = node.name;
  25779. if (has(node, "optional") && typeof node.optional === "boolean") {
  25780. newNode.optional = node.optional;
  25781. }
  25782. if (has(node, "typeAnnotation")) {
  25783. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  25784. }
  25785. } else if (!has(_definitions.NODE_FIELDS, type)) {
  25786. throw new Error(`Unknown node type: "${type}"`);
  25787. } else {
  25788. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  25789. if (has(node, field)) {
  25790. if (deep) {
  25791. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  25792. } else {
  25793. newNode[field] = node[field];
  25794. }
  25795. }
  25796. }
  25797. }
  25798. if (has(node, "loc")) {
  25799. if (withoutLoc) {
  25800. newNode.loc = null;
  25801. } else {
  25802. newNode.loc = node.loc;
  25803. }
  25804. }
  25805. if (has(node, "leadingComments")) {
  25806. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  25807. }
  25808. if (has(node, "innerComments")) {
  25809. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  25810. }
  25811. if (has(node, "trailingComments")) {
  25812. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  25813. }
  25814. if (has(node, "extra")) {
  25815. newNode.extra = Object.assign({}, node.extra);
  25816. }
  25817. return newNode;
  25818. }
  25819. function maybeCloneComments(comments, deep, withoutLoc) {
  25820. if (!comments || !deep) {
  25821. return comments;
  25822. }
  25823. return comments.map(({
  25824. type,
  25825. value,
  25826. loc
  25827. }) => {
  25828. if (withoutLoc) {
  25829. return {
  25830. type,
  25831. value,
  25832. loc: null
  25833. };
  25834. }
  25835. return {
  25836. type,
  25837. value,
  25838. loc
  25839. };
  25840. });
  25841. }
  25842. }
  25843. });
  25844. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/clone.js
  25845. var require_clone2 = __commonJS({
  25846. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  25847. "use strict";
  25848. Object.defineProperty(exports, "__esModule", {
  25849. value: true
  25850. });
  25851. exports.default = clone;
  25852. var _cloneNode = require_cloneNode2();
  25853. function clone(node) {
  25854. return (0, _cloneNode.default)(node, false);
  25855. }
  25856. }
  25857. });
  25858. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneDeep.js
  25859. var require_cloneDeep2 = __commonJS({
  25860. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  25861. "use strict";
  25862. Object.defineProperty(exports, "__esModule", {
  25863. value: true
  25864. });
  25865. exports.default = cloneDeep2;
  25866. var _cloneNode = require_cloneNode2();
  25867. function cloneDeep2(node) {
  25868. return (0, _cloneNode.default)(node);
  25869. }
  25870. }
  25871. });
  25872. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  25873. var require_cloneDeepWithoutLoc2 = __commonJS({
  25874. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  25875. "use strict";
  25876. Object.defineProperty(exports, "__esModule", {
  25877. value: true
  25878. });
  25879. exports.default = cloneDeepWithoutLoc;
  25880. var _cloneNode = require_cloneNode2();
  25881. function cloneDeepWithoutLoc(node) {
  25882. return (0, _cloneNode.default)(node, true, true);
  25883. }
  25884. }
  25885. });
  25886. // node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  25887. var require_cloneWithoutLoc2 = __commonJS({
  25888. "node_modules/estree-to-babel/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  25889. "use strict";
  25890. Object.defineProperty(exports, "__esModule", {
  25891. value: true
  25892. });
  25893. exports.default = cloneWithoutLoc;
  25894. var _cloneNode = require_cloneNode2();
  25895. function cloneWithoutLoc(node) {
  25896. return (0, _cloneNode.default)(node, false, true);
  25897. }
  25898. }
  25899. });
  25900. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/addComments.js
  25901. var require_addComments2 = __commonJS({
  25902. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  25903. "use strict";
  25904. Object.defineProperty(exports, "__esModule", {
  25905. value: true
  25906. });
  25907. exports.default = addComments;
  25908. function addComments(node, type, comments) {
  25909. if (!comments || !node)
  25910. return node;
  25911. const key = `${type}Comments`;
  25912. if (node[key]) {
  25913. if (type === "leading") {
  25914. node[key] = comments.concat(node[key]);
  25915. } else {
  25916. node[key] = node[key].concat(comments);
  25917. }
  25918. } else {
  25919. node[key] = comments;
  25920. }
  25921. return node;
  25922. }
  25923. }
  25924. });
  25925. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/addComment.js
  25926. var require_addComment2 = __commonJS({
  25927. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  25928. "use strict";
  25929. Object.defineProperty(exports, "__esModule", {
  25930. value: true
  25931. });
  25932. exports.default = addComment;
  25933. var _addComments = require_addComments2();
  25934. function addComment(node, type, content3, line) {
  25935. return (0, _addComments.default)(node, type, [{
  25936. type: line ? "CommentLine" : "CommentBlock",
  25937. value: content3
  25938. }]);
  25939. }
  25940. }
  25941. });
  25942. // node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/inherit.js
  25943. var require_inherit2 = __commonJS({
  25944. "node_modules/estree-to-babel/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  25945. "use strict";
  25946. Object.defineProperty(exports, "__esModule", {
  25947. value: true
  25948. });
  25949. exports.default = inherit2;
  25950. function inherit2(key, child, parent) {
  25951. if (child && parent) {
  25952. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  25953. }
  25954. }
  25955. }
  25956. });
  25957. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  25958. var require_inheritInnerComments2 = __commonJS({
  25959. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  25960. "use strict";
  25961. Object.defineProperty(exports, "__esModule", {
  25962. value: true
  25963. });
  25964. exports.default = inheritInnerComments;
  25965. var _inherit = require_inherit2();
  25966. function inheritInnerComments(child, parent) {
  25967. (0, _inherit.default)("innerComments", child, parent);
  25968. }
  25969. }
  25970. });
  25971. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  25972. var require_inheritLeadingComments2 = __commonJS({
  25973. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  25974. "use strict";
  25975. Object.defineProperty(exports, "__esModule", {
  25976. value: true
  25977. });
  25978. exports.default = inheritLeadingComments;
  25979. var _inherit = require_inherit2();
  25980. function inheritLeadingComments(child, parent) {
  25981. (0, _inherit.default)("leadingComments", child, parent);
  25982. }
  25983. }
  25984. });
  25985. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  25986. var require_inheritTrailingComments2 = __commonJS({
  25987. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  25988. "use strict";
  25989. Object.defineProperty(exports, "__esModule", {
  25990. value: true
  25991. });
  25992. exports.default = inheritTrailingComments;
  25993. var _inherit = require_inherit2();
  25994. function inheritTrailingComments(child, parent) {
  25995. (0, _inherit.default)("trailingComments", child, parent);
  25996. }
  25997. }
  25998. });
  25999. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritsComments.js
  26000. var require_inheritsComments2 = __commonJS({
  26001. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  26002. "use strict";
  26003. Object.defineProperty(exports, "__esModule", {
  26004. value: true
  26005. });
  26006. exports.default = inheritsComments;
  26007. var _inheritTrailingComments = require_inheritTrailingComments2();
  26008. var _inheritLeadingComments = require_inheritLeadingComments2();
  26009. var _inheritInnerComments = require_inheritInnerComments2();
  26010. function inheritsComments(child, parent) {
  26011. (0, _inheritTrailingComments.default)(child, parent);
  26012. (0, _inheritLeadingComments.default)(child, parent);
  26013. (0, _inheritInnerComments.default)(child, parent);
  26014. return child;
  26015. }
  26016. }
  26017. });
  26018. // node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/removeComments.js
  26019. var require_removeComments2 = __commonJS({
  26020. "node_modules/estree-to-babel/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  26021. "use strict";
  26022. Object.defineProperty(exports, "__esModule", {
  26023. value: true
  26024. });
  26025. exports.default = removeComments;
  26026. var _constants = require_constants2();
  26027. function removeComments(node) {
  26028. _constants.COMMENT_KEYS.forEach((key) => {
  26029. node[key] = null;
  26030. });
  26031. return node;
  26032. }
  26033. }
  26034. });
  26035. // node_modules/estree-to-babel/node_modules/@babel/types/lib/constants/generated/index.js
  26036. var require_generated9 = __commonJS({
  26037. "node_modules/estree-to-babel/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  26038. "use strict";
  26039. Object.defineProperty(exports, "__esModule", {
  26040. value: true
  26041. });
  26042. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  26043. var _definitions = require_definitions2();
  26044. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  26045. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  26046. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  26047. exports.BINARY_TYPES = BINARY_TYPES;
  26048. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  26049. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  26050. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  26051. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  26052. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  26053. exports.BLOCK_TYPES = BLOCK_TYPES;
  26054. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  26055. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  26056. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  26057. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  26058. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  26059. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  26060. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  26061. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  26062. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  26063. exports.LOOP_TYPES = LOOP_TYPES;
  26064. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  26065. exports.WHILE_TYPES = WHILE_TYPES;
  26066. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  26067. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  26068. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  26069. exports.FOR_TYPES = FOR_TYPES;
  26070. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  26071. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  26072. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  26073. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  26074. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  26075. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  26076. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  26077. exports.PUREISH_TYPES = PUREISH_TYPES;
  26078. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  26079. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  26080. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  26081. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  26082. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  26083. exports.LVAL_TYPES = LVAL_TYPES;
  26084. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  26085. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  26086. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  26087. exports.LITERAL_TYPES = LITERAL_TYPES;
  26088. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  26089. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  26090. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  26091. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  26092. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  26093. exports.METHOD_TYPES = METHOD_TYPES;
  26094. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  26095. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  26096. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  26097. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  26098. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  26099. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  26100. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  26101. exports.PATTERN_TYPES = PATTERN_TYPES;
  26102. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  26103. exports.CLASS_TYPES = CLASS_TYPES;
  26104. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  26105. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  26106. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  26107. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  26108. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  26109. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  26110. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  26111. exports.FLOW_TYPES = FLOW_TYPES;
  26112. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  26113. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  26114. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  26115. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  26116. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  26117. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  26118. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  26119. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  26120. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  26121. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  26122. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  26123. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  26124. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  26125. exports.JSX_TYPES = JSX_TYPES;
  26126. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  26127. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  26128. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  26129. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  26130. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  26131. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  26132. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  26133. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  26134. }
  26135. });
  26136. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toBlock.js
  26137. var require_toBlock2 = __commonJS({
  26138. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  26139. "use strict";
  26140. Object.defineProperty(exports, "__esModule", {
  26141. value: true
  26142. });
  26143. exports.default = toBlock;
  26144. var _generated = require_generated6();
  26145. var _generated2 = require_generated7();
  26146. function toBlock(node, parent) {
  26147. if ((0, _generated.isBlockStatement)(node)) {
  26148. return node;
  26149. }
  26150. let blockNodes = [];
  26151. if ((0, _generated.isEmptyStatement)(node)) {
  26152. blockNodes = [];
  26153. } else {
  26154. if (!(0, _generated.isStatement)(node)) {
  26155. if ((0, _generated.isFunction)(parent)) {
  26156. node = (0, _generated2.returnStatement)(node);
  26157. } else {
  26158. node = (0, _generated2.expressionStatement)(node);
  26159. }
  26160. }
  26161. blockNodes = [node];
  26162. }
  26163. return (0, _generated2.blockStatement)(blockNodes);
  26164. }
  26165. }
  26166. });
  26167. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/ensureBlock.js
  26168. var require_ensureBlock2 = __commonJS({
  26169. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  26170. "use strict";
  26171. Object.defineProperty(exports, "__esModule", {
  26172. value: true
  26173. });
  26174. exports.default = ensureBlock;
  26175. var _toBlock = require_toBlock2();
  26176. function ensureBlock(node, key = "body") {
  26177. return node[key] = (0, _toBlock.default)(node[key], node);
  26178. }
  26179. }
  26180. });
  26181. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toIdentifier.js
  26182. var require_toIdentifier2 = __commonJS({
  26183. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  26184. "use strict";
  26185. Object.defineProperty(exports, "__esModule", {
  26186. value: true
  26187. });
  26188. exports.default = toIdentifier2;
  26189. var _isValidIdentifier = require_isValidIdentifier2();
  26190. var _helperValidatorIdentifier = require_lib3();
  26191. function toIdentifier2(input) {
  26192. input = input + "";
  26193. let name2 = "";
  26194. for (const c of input) {
  26195. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  26196. }
  26197. name2 = name2.replace(/^[-0-9]+/, "");
  26198. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  26199. return c ? c.toUpperCase() : "";
  26200. });
  26201. if (!(0, _isValidIdentifier.default)(name2)) {
  26202. name2 = `_${name2}`;
  26203. }
  26204. return name2 || "_";
  26205. }
  26206. }
  26207. });
  26208. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  26209. var require_toBindingIdentifierName2 = __commonJS({
  26210. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  26211. "use strict";
  26212. Object.defineProperty(exports, "__esModule", {
  26213. value: true
  26214. });
  26215. exports.default = toBindingIdentifierName;
  26216. var _toIdentifier = require_toIdentifier2();
  26217. function toBindingIdentifierName(name2) {
  26218. name2 = (0, _toIdentifier.default)(name2);
  26219. if (name2 === "eval" || name2 === "arguments")
  26220. name2 = "_" + name2;
  26221. return name2;
  26222. }
  26223. }
  26224. });
  26225. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toComputedKey.js
  26226. var require_toComputedKey2 = __commonJS({
  26227. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  26228. "use strict";
  26229. Object.defineProperty(exports, "__esModule", {
  26230. value: true
  26231. });
  26232. exports.default = toComputedKey;
  26233. var _generated = require_generated6();
  26234. var _generated2 = require_generated7();
  26235. function toComputedKey(node, key = node.key || node.property) {
  26236. if (!node.computed && (0, _generated.isIdentifier)(key))
  26237. key = (0, _generated2.stringLiteral)(key.name);
  26238. return key;
  26239. }
  26240. }
  26241. });
  26242. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toExpression.js
  26243. var require_toExpression2 = __commonJS({
  26244. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  26245. "use strict";
  26246. Object.defineProperty(exports, "__esModule", {
  26247. value: true
  26248. });
  26249. exports.default = void 0;
  26250. var _generated = require_generated6();
  26251. var _default = toExpression;
  26252. exports.default = _default;
  26253. function toExpression(node) {
  26254. if ((0, _generated.isExpressionStatement)(node)) {
  26255. node = node.expression;
  26256. }
  26257. if ((0, _generated.isExpression)(node)) {
  26258. return node;
  26259. }
  26260. if ((0, _generated.isClass)(node)) {
  26261. node.type = "ClassExpression";
  26262. } else if ((0, _generated.isFunction)(node)) {
  26263. node.type = "FunctionExpression";
  26264. }
  26265. if (!(0, _generated.isExpression)(node)) {
  26266. throw new Error(`cannot turn ${node.type} to an expression`);
  26267. }
  26268. return node;
  26269. }
  26270. }
  26271. });
  26272. // node_modules/estree-to-babel/node_modules/@babel/types/lib/traverse/traverseFast.js
  26273. var require_traverseFast2 = __commonJS({
  26274. "node_modules/estree-to-babel/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  26275. "use strict";
  26276. Object.defineProperty(exports, "__esModule", {
  26277. value: true
  26278. });
  26279. exports.default = traverseFast;
  26280. var _definitions = require_definitions2();
  26281. function traverseFast(node, enter, opts) {
  26282. if (!node)
  26283. return;
  26284. const keys2 = _definitions.VISITOR_KEYS[node.type];
  26285. if (!keys2)
  26286. return;
  26287. opts = opts || {};
  26288. enter(node, opts);
  26289. for (const key of keys2) {
  26290. const subNode = node[key];
  26291. if (Array.isArray(subNode)) {
  26292. for (const node2 of subNode) {
  26293. traverseFast(node2, enter, opts);
  26294. }
  26295. } else {
  26296. traverseFast(subNode, enter, opts);
  26297. }
  26298. }
  26299. }
  26300. }
  26301. });
  26302. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/removeProperties.js
  26303. var require_removeProperties2 = __commonJS({
  26304. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  26305. "use strict";
  26306. Object.defineProperty(exports, "__esModule", {
  26307. value: true
  26308. });
  26309. exports.default = removeProperties;
  26310. var _constants = require_constants2();
  26311. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  26312. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  26313. function removeProperties(node, opts = {}) {
  26314. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  26315. for (const key of map) {
  26316. if (node[key] != null)
  26317. node[key] = void 0;
  26318. }
  26319. for (const key of Object.keys(node)) {
  26320. if (key[0] === "_" && node[key] != null)
  26321. node[key] = void 0;
  26322. }
  26323. const symbols = Object.getOwnPropertySymbols(node);
  26324. for (const sym of symbols) {
  26325. node[sym] = null;
  26326. }
  26327. }
  26328. }
  26329. });
  26330. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  26331. var require_removePropertiesDeep2 = __commonJS({
  26332. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  26333. "use strict";
  26334. Object.defineProperty(exports, "__esModule", {
  26335. value: true
  26336. });
  26337. exports.default = removePropertiesDeep;
  26338. var _traverseFast = require_traverseFast2();
  26339. var _removeProperties = require_removeProperties2();
  26340. function removePropertiesDeep(tree, opts) {
  26341. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  26342. return tree;
  26343. }
  26344. }
  26345. });
  26346. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toKeyAlias.js
  26347. var require_toKeyAlias2 = __commonJS({
  26348. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  26349. "use strict";
  26350. Object.defineProperty(exports, "__esModule", {
  26351. value: true
  26352. });
  26353. exports.default = toKeyAlias;
  26354. var _generated = require_generated6();
  26355. var _cloneNode = require_cloneNode2();
  26356. var _removePropertiesDeep = require_removePropertiesDeep2();
  26357. function toKeyAlias(node, key = node.key) {
  26358. let alias;
  26359. if (node.kind === "method") {
  26360. return toKeyAlias.increment() + "";
  26361. } else if ((0, _generated.isIdentifier)(key)) {
  26362. alias = key.name;
  26363. } else if ((0, _generated.isStringLiteral)(key)) {
  26364. alias = JSON.stringify(key.value);
  26365. } else {
  26366. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  26367. }
  26368. if (node.computed) {
  26369. alias = `[${alias}]`;
  26370. }
  26371. if (node.static) {
  26372. alias = `static:${alias}`;
  26373. }
  26374. return alias;
  26375. }
  26376. toKeyAlias.uid = 0;
  26377. toKeyAlias.increment = function() {
  26378. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  26379. return toKeyAlias.uid = 0;
  26380. } else {
  26381. return toKeyAlias.uid++;
  26382. }
  26383. };
  26384. }
  26385. });
  26386. // node_modules/estree-to-babel/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  26387. var require_getBindingIdentifiers2 = __commonJS({
  26388. "node_modules/estree-to-babel/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  26389. "use strict";
  26390. Object.defineProperty(exports, "__esModule", {
  26391. value: true
  26392. });
  26393. exports.default = getBindingIdentifiers;
  26394. var _generated = require_generated6();
  26395. function getBindingIdentifiers(node, duplicates, outerOnly) {
  26396. let search2 = [].concat(node);
  26397. const ids = /* @__PURE__ */ Object.create(null);
  26398. while (search2.length) {
  26399. const id = search2.shift();
  26400. if (!id)
  26401. continue;
  26402. const keys2 = getBindingIdentifiers.keys[id.type];
  26403. if ((0, _generated.isIdentifier)(id)) {
  26404. if (duplicates) {
  26405. const _ids = ids[id.name] = ids[id.name] || [];
  26406. _ids.push(id);
  26407. } else {
  26408. ids[id.name] = id;
  26409. }
  26410. continue;
  26411. }
  26412. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  26413. if ((0, _generated.isDeclaration)(id.declaration)) {
  26414. search2.push(id.declaration);
  26415. }
  26416. continue;
  26417. }
  26418. if (outerOnly) {
  26419. if ((0, _generated.isFunctionDeclaration)(id)) {
  26420. search2.push(id.id);
  26421. continue;
  26422. }
  26423. if ((0, _generated.isFunctionExpression)(id)) {
  26424. continue;
  26425. }
  26426. }
  26427. if (keys2) {
  26428. for (let i = 0; i < keys2.length; i++) {
  26429. const key = keys2[i];
  26430. if (id[key]) {
  26431. search2 = search2.concat(id[key]);
  26432. }
  26433. }
  26434. }
  26435. }
  26436. return ids;
  26437. }
  26438. getBindingIdentifiers.keys = {
  26439. DeclareClass: ["id"],
  26440. DeclareFunction: ["id"],
  26441. DeclareModule: ["id"],
  26442. DeclareVariable: ["id"],
  26443. DeclareInterface: ["id"],
  26444. DeclareTypeAlias: ["id"],
  26445. DeclareOpaqueType: ["id"],
  26446. InterfaceDeclaration: ["id"],
  26447. TypeAlias: ["id"],
  26448. OpaqueType: ["id"],
  26449. CatchClause: ["param"],
  26450. LabeledStatement: ["label"],
  26451. UnaryExpression: ["argument"],
  26452. AssignmentExpression: ["left"],
  26453. ImportSpecifier: ["local"],
  26454. ImportNamespaceSpecifier: ["local"],
  26455. ImportDefaultSpecifier: ["local"],
  26456. ImportDeclaration: ["specifiers"],
  26457. ExportSpecifier: ["exported"],
  26458. ExportNamespaceSpecifier: ["exported"],
  26459. ExportDefaultSpecifier: ["exported"],
  26460. FunctionDeclaration: ["id", "params"],
  26461. FunctionExpression: ["id", "params"],
  26462. ArrowFunctionExpression: ["params"],
  26463. ObjectMethod: ["params"],
  26464. ClassMethod: ["params"],
  26465. ForInStatement: ["left"],
  26466. ForOfStatement: ["left"],
  26467. ClassDeclaration: ["id"],
  26468. ClassExpression: ["id"],
  26469. RestElement: ["argument"],
  26470. UpdateExpression: ["argument"],
  26471. ObjectProperty: ["value"],
  26472. AssignmentPattern: ["left"],
  26473. ArrayPattern: ["elements"],
  26474. ObjectPattern: ["properties"],
  26475. VariableDeclaration: ["declarations"],
  26476. VariableDeclarator: ["id"]
  26477. };
  26478. }
  26479. });
  26480. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  26481. var require_gatherSequenceExpressions2 = __commonJS({
  26482. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  26483. "use strict";
  26484. Object.defineProperty(exports, "__esModule", {
  26485. value: true
  26486. });
  26487. exports.default = gatherSequenceExpressions;
  26488. var _getBindingIdentifiers = require_getBindingIdentifiers2();
  26489. var _generated = require_generated6();
  26490. var _generated2 = require_generated7();
  26491. var _cloneNode = require_cloneNode2();
  26492. function gatherSequenceExpressions(nodes, scope, declars) {
  26493. const exprs = [];
  26494. let ensureLastUndefined = true;
  26495. for (const node of nodes) {
  26496. if (!(0, _generated.isEmptyStatement)(node)) {
  26497. ensureLastUndefined = false;
  26498. }
  26499. if ((0, _generated.isExpression)(node)) {
  26500. exprs.push(node);
  26501. } else if ((0, _generated.isExpressionStatement)(node)) {
  26502. exprs.push(node.expression);
  26503. } else if ((0, _generated.isVariableDeclaration)(node)) {
  26504. if (node.kind !== "var")
  26505. return;
  26506. for (const declar of node.declarations) {
  26507. const bindings = (0, _getBindingIdentifiers.default)(declar);
  26508. for (const key of Object.keys(bindings)) {
  26509. declars.push({
  26510. kind: node.kind,
  26511. id: (0, _cloneNode.default)(bindings[key])
  26512. });
  26513. }
  26514. if (declar.init) {
  26515. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  26516. }
  26517. }
  26518. ensureLastUndefined = true;
  26519. } else if ((0, _generated.isIfStatement)(node)) {
  26520. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  26521. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  26522. if (!consequent || !alternate)
  26523. return;
  26524. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  26525. } else if ((0, _generated.isBlockStatement)(node)) {
  26526. const body = gatherSequenceExpressions(node.body, scope, declars);
  26527. if (!body)
  26528. return;
  26529. exprs.push(body);
  26530. } else if ((0, _generated.isEmptyStatement)(node)) {
  26531. if (nodes.indexOf(node) === 0) {
  26532. ensureLastUndefined = true;
  26533. }
  26534. } else {
  26535. return;
  26536. }
  26537. }
  26538. if (ensureLastUndefined) {
  26539. exprs.push(scope.buildUndefinedNode());
  26540. }
  26541. if (exprs.length === 1) {
  26542. return exprs[0];
  26543. } else {
  26544. return (0, _generated2.sequenceExpression)(exprs);
  26545. }
  26546. }
  26547. }
  26548. });
  26549. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  26550. var require_toSequenceExpression2 = __commonJS({
  26551. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  26552. "use strict";
  26553. Object.defineProperty(exports, "__esModule", {
  26554. value: true
  26555. });
  26556. exports.default = toSequenceExpression;
  26557. var _gatherSequenceExpressions = require_gatherSequenceExpressions2();
  26558. function toSequenceExpression(nodes, scope) {
  26559. if (!(nodes != null && nodes.length))
  26560. return;
  26561. const declars = [];
  26562. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  26563. if (!result)
  26564. return;
  26565. for (const declar of declars) {
  26566. scope.push(declar);
  26567. }
  26568. return result;
  26569. }
  26570. }
  26571. });
  26572. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toStatement.js
  26573. var require_toStatement2 = __commonJS({
  26574. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  26575. "use strict";
  26576. Object.defineProperty(exports, "__esModule", {
  26577. value: true
  26578. });
  26579. exports.default = void 0;
  26580. var _generated = require_generated6();
  26581. var _generated2 = require_generated7();
  26582. var _default = toStatement;
  26583. exports.default = _default;
  26584. function toStatement(node, ignore3) {
  26585. if ((0, _generated.isStatement)(node)) {
  26586. return node;
  26587. }
  26588. let mustHaveId = false;
  26589. let newType;
  26590. if ((0, _generated.isClass)(node)) {
  26591. mustHaveId = true;
  26592. newType = "ClassDeclaration";
  26593. } else if ((0, _generated.isFunction)(node)) {
  26594. mustHaveId = true;
  26595. newType = "FunctionDeclaration";
  26596. } else if ((0, _generated.isAssignmentExpression)(node)) {
  26597. return (0, _generated2.expressionStatement)(node);
  26598. }
  26599. if (mustHaveId && !node.id) {
  26600. newType = false;
  26601. }
  26602. if (!newType) {
  26603. if (ignore3) {
  26604. return false;
  26605. } else {
  26606. throw new Error(`cannot turn ${node.type} to a statement`);
  26607. }
  26608. }
  26609. node.type = newType;
  26610. return node;
  26611. }
  26612. }
  26613. });
  26614. // node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/valueToNode.js
  26615. var require_valueToNode2 = __commonJS({
  26616. "node_modules/estree-to-babel/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  26617. "use strict";
  26618. Object.defineProperty(exports, "__esModule", {
  26619. value: true
  26620. });
  26621. exports.default = void 0;
  26622. var _isValidIdentifier = require_isValidIdentifier2();
  26623. var _generated = require_generated7();
  26624. var _default = valueToNode;
  26625. exports.default = _default;
  26626. var objectToString = Function.call.bind(Object.prototype.toString);
  26627. function isRegExp(value) {
  26628. return objectToString(value) === "[object RegExp]";
  26629. }
  26630. function isPlainObject2(value) {
  26631. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  26632. return false;
  26633. }
  26634. const proto = Object.getPrototypeOf(value);
  26635. return proto === null || Object.getPrototypeOf(proto) === null;
  26636. }
  26637. function valueToNode(value) {
  26638. if (value === void 0) {
  26639. return (0, _generated.identifier)("undefined");
  26640. }
  26641. if (value === true || value === false) {
  26642. return (0, _generated.booleanLiteral)(value);
  26643. }
  26644. if (value === null) {
  26645. return (0, _generated.nullLiteral)();
  26646. }
  26647. if (typeof value === "string") {
  26648. return (0, _generated.stringLiteral)(value);
  26649. }
  26650. if (typeof value === "number") {
  26651. let result;
  26652. if (Number.isFinite(value)) {
  26653. result = (0, _generated.numericLiteral)(Math.abs(value));
  26654. } else {
  26655. let numerator;
  26656. if (Number.isNaN(value)) {
  26657. numerator = (0, _generated.numericLiteral)(0);
  26658. } else {
  26659. numerator = (0, _generated.numericLiteral)(1);
  26660. }
  26661. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  26662. }
  26663. if (value < 0 || Object.is(value, -0)) {
  26664. result = (0, _generated.unaryExpression)("-", result);
  26665. }
  26666. return result;
  26667. }
  26668. if (isRegExp(value)) {
  26669. const pattern = value.source;
  26670. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  26671. return (0, _generated.regExpLiteral)(pattern, flags);
  26672. }
  26673. if (Array.isArray(value)) {
  26674. return (0, _generated.arrayExpression)(value.map(valueToNode));
  26675. }
  26676. if (isPlainObject2(value)) {
  26677. const props = [];
  26678. for (const key of Object.keys(value)) {
  26679. let nodeKey;
  26680. if ((0, _isValidIdentifier.default)(key)) {
  26681. nodeKey = (0, _generated.identifier)(key);
  26682. } else {
  26683. nodeKey = (0, _generated.stringLiteral)(key);
  26684. }
  26685. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  26686. }
  26687. return (0, _generated.objectExpression)(props);
  26688. }
  26689. throw new Error("don't know how to turn this value into a node");
  26690. }
  26691. }
  26692. });
  26693. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  26694. var require_appendToMemberExpression2 = __commonJS({
  26695. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  26696. "use strict";
  26697. Object.defineProperty(exports, "__esModule", {
  26698. value: true
  26699. });
  26700. exports.default = appendToMemberExpression;
  26701. var _generated = require_generated7();
  26702. function appendToMemberExpression(member, append, computed = false) {
  26703. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  26704. member.property = append;
  26705. member.computed = !!computed;
  26706. return member;
  26707. }
  26708. }
  26709. });
  26710. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/inherits.js
  26711. var require_inherits2 = __commonJS({
  26712. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  26713. "use strict";
  26714. Object.defineProperty(exports, "__esModule", {
  26715. value: true
  26716. });
  26717. exports.default = inherits;
  26718. var _constants = require_constants2();
  26719. var _inheritsComments = require_inheritsComments2();
  26720. function inherits(child, parent) {
  26721. if (!child || !parent)
  26722. return child;
  26723. for (const key of _constants.INHERIT_KEYS.optional) {
  26724. if (child[key] == null) {
  26725. child[key] = parent[key];
  26726. }
  26727. }
  26728. for (const key of Object.keys(parent)) {
  26729. if (key[0] === "_" && key !== "__clone")
  26730. child[key] = parent[key];
  26731. }
  26732. for (const key of _constants.INHERIT_KEYS.force) {
  26733. child[key] = parent[key];
  26734. }
  26735. (0, _inheritsComments.default)(child, parent);
  26736. return child;
  26737. }
  26738. }
  26739. });
  26740. // node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  26741. var require_prependToMemberExpression2 = __commonJS({
  26742. "node_modules/estree-to-babel/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  26743. "use strict";
  26744. Object.defineProperty(exports, "__esModule", {
  26745. value: true
  26746. });
  26747. exports.default = prependToMemberExpression;
  26748. var _generated = require_generated7();
  26749. function prependToMemberExpression(member, prepend) {
  26750. member.object = (0, _generated.memberExpression)(prepend, member.object);
  26751. return member;
  26752. }
  26753. }
  26754. });
  26755. // node_modules/estree-to-babel/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  26756. var require_getOuterBindingIdentifiers2 = __commonJS({
  26757. "node_modules/estree-to-babel/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  26758. "use strict";
  26759. Object.defineProperty(exports, "__esModule", {
  26760. value: true
  26761. });
  26762. exports.default = void 0;
  26763. var _getBindingIdentifiers = require_getBindingIdentifiers2();
  26764. var _default = getOuterBindingIdentifiers;
  26765. exports.default = _default;
  26766. function getOuterBindingIdentifiers(node, duplicates) {
  26767. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  26768. }
  26769. }
  26770. });
  26771. // node_modules/estree-to-babel/node_modules/@babel/types/lib/traverse/traverse.js
  26772. var require_traverse2 = __commonJS({
  26773. "node_modules/estree-to-babel/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  26774. "use strict";
  26775. Object.defineProperty(exports, "__esModule", {
  26776. value: true
  26777. });
  26778. exports.default = traverse;
  26779. var _definitions = require_definitions2();
  26780. function traverse(node, handlers2, state) {
  26781. if (typeof handlers2 === "function") {
  26782. handlers2 = {
  26783. enter: handlers2
  26784. };
  26785. }
  26786. const {
  26787. enter,
  26788. exit: exit2
  26789. } = handlers2;
  26790. traverseSimpleImpl(node, enter, exit2, state, []);
  26791. }
  26792. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  26793. const keys2 = _definitions.VISITOR_KEYS[node.type];
  26794. if (!keys2)
  26795. return;
  26796. if (enter)
  26797. enter(node, ancestors, state);
  26798. for (const key of keys2) {
  26799. const subNode = node[key];
  26800. if (Array.isArray(subNode)) {
  26801. for (let i = 0; i < subNode.length; i++) {
  26802. const child = subNode[i];
  26803. if (!child)
  26804. continue;
  26805. ancestors.push({
  26806. node,
  26807. key,
  26808. index: i
  26809. });
  26810. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  26811. ancestors.pop();
  26812. }
  26813. } else if (subNode) {
  26814. ancestors.push({
  26815. node,
  26816. key
  26817. });
  26818. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  26819. ancestors.pop();
  26820. }
  26821. }
  26822. if (exit2)
  26823. exit2(node, ancestors, state);
  26824. }
  26825. }
  26826. });
  26827. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isBinding.js
  26828. var require_isBinding2 = __commonJS({
  26829. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  26830. "use strict";
  26831. Object.defineProperty(exports, "__esModule", {
  26832. value: true
  26833. });
  26834. exports.default = isBinding;
  26835. var _getBindingIdentifiers = require_getBindingIdentifiers2();
  26836. function isBinding(node, parent, grandparent) {
  26837. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  26838. return false;
  26839. }
  26840. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  26841. if (keys2) {
  26842. for (let i = 0; i < keys2.length; i++) {
  26843. const key = keys2[i];
  26844. const val = parent[key];
  26845. if (Array.isArray(val)) {
  26846. if (val.indexOf(node) >= 0)
  26847. return true;
  26848. } else {
  26849. if (val === node)
  26850. return true;
  26851. }
  26852. }
  26853. }
  26854. return false;
  26855. }
  26856. }
  26857. });
  26858. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isLet.js
  26859. var require_isLet2 = __commonJS({
  26860. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  26861. "use strict";
  26862. Object.defineProperty(exports, "__esModule", {
  26863. value: true
  26864. });
  26865. exports.default = isLet;
  26866. var _generated = require_generated6();
  26867. var _constants = require_constants2();
  26868. function isLet(node) {
  26869. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  26870. }
  26871. }
  26872. });
  26873. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isBlockScoped.js
  26874. var require_isBlockScoped2 = __commonJS({
  26875. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  26876. "use strict";
  26877. Object.defineProperty(exports, "__esModule", {
  26878. value: true
  26879. });
  26880. exports.default = isBlockScoped;
  26881. var _generated = require_generated6();
  26882. var _isLet = require_isLet2();
  26883. function isBlockScoped(node) {
  26884. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  26885. }
  26886. }
  26887. });
  26888. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isImmutable.js
  26889. var require_isImmutable2 = __commonJS({
  26890. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  26891. "use strict";
  26892. Object.defineProperty(exports, "__esModule", {
  26893. value: true
  26894. });
  26895. exports.default = isImmutable;
  26896. var _isType = require_isType2();
  26897. var _generated = require_generated6();
  26898. function isImmutable(node) {
  26899. if ((0, _isType.default)(node.type, "Immutable"))
  26900. return true;
  26901. if ((0, _generated.isIdentifier)(node)) {
  26902. if (node.name === "undefined") {
  26903. return true;
  26904. } else {
  26905. return false;
  26906. }
  26907. }
  26908. return false;
  26909. }
  26910. }
  26911. });
  26912. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  26913. var require_isNodesEquivalent2 = __commonJS({
  26914. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  26915. "use strict";
  26916. Object.defineProperty(exports, "__esModule", {
  26917. value: true
  26918. });
  26919. exports.default = isNodesEquivalent;
  26920. var _definitions = require_definitions2();
  26921. function isNodesEquivalent(a, b) {
  26922. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  26923. return a === b;
  26924. }
  26925. if (a.type !== b.type) {
  26926. return false;
  26927. }
  26928. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  26929. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  26930. for (const field of fields) {
  26931. if (typeof a[field] !== typeof b[field]) {
  26932. return false;
  26933. }
  26934. if (a[field] == null && b[field] == null) {
  26935. continue;
  26936. } else if (a[field] == null || b[field] == null) {
  26937. return false;
  26938. }
  26939. if (Array.isArray(a[field])) {
  26940. if (!Array.isArray(b[field])) {
  26941. return false;
  26942. }
  26943. if (a[field].length !== b[field].length) {
  26944. return false;
  26945. }
  26946. for (let i = 0; i < a[field].length; i++) {
  26947. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  26948. return false;
  26949. }
  26950. }
  26951. continue;
  26952. }
  26953. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  26954. for (const key of Object.keys(a[field])) {
  26955. if (a[field][key] !== b[field][key]) {
  26956. return false;
  26957. }
  26958. }
  26959. continue;
  26960. }
  26961. if (!isNodesEquivalent(a[field], b[field])) {
  26962. return false;
  26963. }
  26964. }
  26965. return true;
  26966. }
  26967. }
  26968. });
  26969. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isReferenced.js
  26970. var require_isReferenced2 = __commonJS({
  26971. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  26972. "use strict";
  26973. Object.defineProperty(exports, "__esModule", {
  26974. value: true
  26975. });
  26976. exports.default = isReferenced;
  26977. function isReferenced(node, parent, grandparent) {
  26978. switch (parent.type) {
  26979. case "MemberExpression":
  26980. case "JSXMemberExpression":
  26981. case "OptionalMemberExpression":
  26982. if (parent.property === node) {
  26983. return !!parent.computed;
  26984. }
  26985. return parent.object === node;
  26986. case "VariableDeclarator":
  26987. return parent.init === node;
  26988. case "ArrowFunctionExpression":
  26989. return parent.body === node;
  26990. case "PrivateName":
  26991. return false;
  26992. case "ClassMethod":
  26993. case "ClassPrivateMethod":
  26994. case "ObjectMethod":
  26995. if (parent.params.includes(node)) {
  26996. return false;
  26997. }
  26998. case "ObjectProperty":
  26999. case "ClassProperty":
  27000. case "ClassPrivateProperty":
  27001. if (parent.key === node) {
  27002. return !!parent.computed;
  27003. }
  27004. if (parent.value === node) {
  27005. return !grandparent || grandparent.type !== "ObjectPattern";
  27006. }
  27007. return true;
  27008. case "ClassDeclaration":
  27009. case "ClassExpression":
  27010. return parent.superClass === node;
  27011. case "AssignmentExpression":
  27012. return parent.right === node;
  27013. case "AssignmentPattern":
  27014. return parent.right === node;
  27015. case "LabeledStatement":
  27016. return false;
  27017. case "CatchClause":
  27018. return false;
  27019. case "RestElement":
  27020. return false;
  27021. case "BreakStatement":
  27022. case "ContinueStatement":
  27023. return false;
  27024. case "FunctionDeclaration":
  27025. case "FunctionExpression":
  27026. return false;
  27027. case "ExportNamespaceSpecifier":
  27028. case "ExportDefaultSpecifier":
  27029. return false;
  27030. case "ExportSpecifier":
  27031. if (grandparent != null && grandparent.source) {
  27032. return false;
  27033. }
  27034. return parent.local === node;
  27035. case "ImportDefaultSpecifier":
  27036. case "ImportNamespaceSpecifier":
  27037. case "ImportSpecifier":
  27038. return false;
  27039. case "JSXAttribute":
  27040. return false;
  27041. case "ObjectPattern":
  27042. case "ArrayPattern":
  27043. return false;
  27044. case "MetaProperty":
  27045. return false;
  27046. case "ObjectTypeProperty":
  27047. return parent.key !== node;
  27048. case "TSEnumMember":
  27049. return parent.id !== node;
  27050. case "TSPropertySignature":
  27051. if (parent.key === node) {
  27052. return !!parent.computed;
  27053. }
  27054. return true;
  27055. }
  27056. return true;
  27057. }
  27058. }
  27059. });
  27060. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isScope.js
  27061. var require_isScope2 = __commonJS({
  27062. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  27063. "use strict";
  27064. Object.defineProperty(exports, "__esModule", {
  27065. value: true
  27066. });
  27067. exports.default = isScope;
  27068. var _generated = require_generated6();
  27069. function isScope(node, parent) {
  27070. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  27071. return false;
  27072. }
  27073. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  27074. return true;
  27075. }
  27076. return (0, _generated.isScopable)(node);
  27077. }
  27078. }
  27079. });
  27080. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  27081. var require_isSpecifierDefault2 = __commonJS({
  27082. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  27083. "use strict";
  27084. Object.defineProperty(exports, "__esModule", {
  27085. value: true
  27086. });
  27087. exports.default = isSpecifierDefault;
  27088. var _generated = require_generated6();
  27089. function isSpecifierDefault(specifier) {
  27090. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  27091. name: "default"
  27092. });
  27093. }
  27094. }
  27095. });
  27096. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  27097. var require_isValidES3Identifier2 = __commonJS({
  27098. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  27099. "use strict";
  27100. Object.defineProperty(exports, "__esModule", {
  27101. value: true
  27102. });
  27103. exports.default = isValidES3Identifier;
  27104. var _isValidIdentifier = require_isValidIdentifier2();
  27105. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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"]);
  27106. function isValidES3Identifier(name2) {
  27107. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  27108. }
  27109. }
  27110. });
  27111. // node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isVar.js
  27112. var require_isVar2 = __commonJS({
  27113. "node_modules/estree-to-babel/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  27114. "use strict";
  27115. Object.defineProperty(exports, "__esModule", {
  27116. value: true
  27117. });
  27118. exports.default = isVar;
  27119. var _generated = require_generated6();
  27120. var _constants = require_constants2();
  27121. function isVar(node) {
  27122. return (0, _generated.isVariableDeclaration)(node, {
  27123. kind: "var"
  27124. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  27125. }
  27126. }
  27127. });
  27128. // node_modules/estree-to-babel/node_modules/@babel/types/lib/ast-types/generated/index.js
  27129. var require_generated10 = __commonJS({
  27130. "node_modules/estree-to-babel/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  27131. }
  27132. });
  27133. // node_modules/estree-to-babel/node_modules/@babel/types/lib/index.js
  27134. var require_lib4 = __commonJS({
  27135. "node_modules/estree-to-babel/node_modules/@babel/types/lib/index.js"(exports) {
  27136. "use strict";
  27137. Object.defineProperty(exports, "__esModule", {
  27138. value: true
  27139. });
  27140. var _exportNames = {
  27141. react: true,
  27142. assertNode: true,
  27143. createTypeAnnotationBasedOnTypeof: true,
  27144. createUnionTypeAnnotation: true,
  27145. createFlowUnionType: true,
  27146. createTSUnionType: true,
  27147. cloneNode: true,
  27148. clone: true,
  27149. cloneDeep: true,
  27150. cloneDeepWithoutLoc: true,
  27151. cloneWithoutLoc: true,
  27152. addComment: true,
  27153. addComments: true,
  27154. inheritInnerComments: true,
  27155. inheritLeadingComments: true,
  27156. inheritsComments: true,
  27157. inheritTrailingComments: true,
  27158. removeComments: true,
  27159. ensureBlock: true,
  27160. toBindingIdentifierName: true,
  27161. toBlock: true,
  27162. toComputedKey: true,
  27163. toExpression: true,
  27164. toIdentifier: true,
  27165. toKeyAlias: true,
  27166. toSequenceExpression: true,
  27167. toStatement: true,
  27168. valueToNode: true,
  27169. appendToMemberExpression: true,
  27170. inherits: true,
  27171. prependToMemberExpression: true,
  27172. removeProperties: true,
  27173. removePropertiesDeep: true,
  27174. removeTypeDuplicates: true,
  27175. getBindingIdentifiers: true,
  27176. getOuterBindingIdentifiers: true,
  27177. traverse: true,
  27178. traverseFast: true,
  27179. shallowEqual: true,
  27180. is: true,
  27181. isBinding: true,
  27182. isBlockScoped: true,
  27183. isImmutable: true,
  27184. isLet: true,
  27185. isNode: true,
  27186. isNodesEquivalent: true,
  27187. isPlaceholderType: true,
  27188. isReferenced: true,
  27189. isScope: true,
  27190. isSpecifierDefault: true,
  27191. isType: true,
  27192. isValidES3Identifier: true,
  27193. isValidIdentifier: true,
  27194. isVar: true,
  27195. matchesPattern: true,
  27196. validate: true,
  27197. buildMatchMemberExpression: true
  27198. };
  27199. Object.defineProperty(exports, "assertNode", {
  27200. enumerable: true,
  27201. get: function() {
  27202. return _assertNode.default;
  27203. }
  27204. });
  27205. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  27206. enumerable: true,
  27207. get: function() {
  27208. return _createTypeAnnotationBasedOnTypeof.default;
  27209. }
  27210. });
  27211. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  27212. enumerable: true,
  27213. get: function() {
  27214. return _createFlowUnionType.default;
  27215. }
  27216. });
  27217. Object.defineProperty(exports, "createFlowUnionType", {
  27218. enumerable: true,
  27219. get: function() {
  27220. return _createFlowUnionType.default;
  27221. }
  27222. });
  27223. Object.defineProperty(exports, "createTSUnionType", {
  27224. enumerable: true,
  27225. get: function() {
  27226. return _createTSUnionType.default;
  27227. }
  27228. });
  27229. Object.defineProperty(exports, "cloneNode", {
  27230. enumerable: true,
  27231. get: function() {
  27232. return _cloneNode.default;
  27233. }
  27234. });
  27235. Object.defineProperty(exports, "clone", {
  27236. enumerable: true,
  27237. get: function() {
  27238. return _clone.default;
  27239. }
  27240. });
  27241. Object.defineProperty(exports, "cloneDeep", {
  27242. enumerable: true,
  27243. get: function() {
  27244. return _cloneDeep.default;
  27245. }
  27246. });
  27247. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  27248. enumerable: true,
  27249. get: function() {
  27250. return _cloneDeepWithoutLoc.default;
  27251. }
  27252. });
  27253. Object.defineProperty(exports, "cloneWithoutLoc", {
  27254. enumerable: true,
  27255. get: function() {
  27256. return _cloneWithoutLoc.default;
  27257. }
  27258. });
  27259. Object.defineProperty(exports, "addComment", {
  27260. enumerable: true,
  27261. get: function() {
  27262. return _addComment.default;
  27263. }
  27264. });
  27265. Object.defineProperty(exports, "addComments", {
  27266. enumerable: true,
  27267. get: function() {
  27268. return _addComments.default;
  27269. }
  27270. });
  27271. Object.defineProperty(exports, "inheritInnerComments", {
  27272. enumerable: true,
  27273. get: function() {
  27274. return _inheritInnerComments.default;
  27275. }
  27276. });
  27277. Object.defineProperty(exports, "inheritLeadingComments", {
  27278. enumerable: true,
  27279. get: function() {
  27280. return _inheritLeadingComments.default;
  27281. }
  27282. });
  27283. Object.defineProperty(exports, "inheritsComments", {
  27284. enumerable: true,
  27285. get: function() {
  27286. return _inheritsComments.default;
  27287. }
  27288. });
  27289. Object.defineProperty(exports, "inheritTrailingComments", {
  27290. enumerable: true,
  27291. get: function() {
  27292. return _inheritTrailingComments.default;
  27293. }
  27294. });
  27295. Object.defineProperty(exports, "removeComments", {
  27296. enumerable: true,
  27297. get: function() {
  27298. return _removeComments.default;
  27299. }
  27300. });
  27301. Object.defineProperty(exports, "ensureBlock", {
  27302. enumerable: true,
  27303. get: function() {
  27304. return _ensureBlock.default;
  27305. }
  27306. });
  27307. Object.defineProperty(exports, "toBindingIdentifierName", {
  27308. enumerable: true,
  27309. get: function() {
  27310. return _toBindingIdentifierName.default;
  27311. }
  27312. });
  27313. Object.defineProperty(exports, "toBlock", {
  27314. enumerable: true,
  27315. get: function() {
  27316. return _toBlock.default;
  27317. }
  27318. });
  27319. Object.defineProperty(exports, "toComputedKey", {
  27320. enumerable: true,
  27321. get: function() {
  27322. return _toComputedKey.default;
  27323. }
  27324. });
  27325. Object.defineProperty(exports, "toExpression", {
  27326. enumerable: true,
  27327. get: function() {
  27328. return _toExpression.default;
  27329. }
  27330. });
  27331. Object.defineProperty(exports, "toIdentifier", {
  27332. enumerable: true,
  27333. get: function() {
  27334. return _toIdentifier.default;
  27335. }
  27336. });
  27337. Object.defineProperty(exports, "toKeyAlias", {
  27338. enumerable: true,
  27339. get: function() {
  27340. return _toKeyAlias.default;
  27341. }
  27342. });
  27343. Object.defineProperty(exports, "toSequenceExpression", {
  27344. enumerable: true,
  27345. get: function() {
  27346. return _toSequenceExpression.default;
  27347. }
  27348. });
  27349. Object.defineProperty(exports, "toStatement", {
  27350. enumerable: true,
  27351. get: function() {
  27352. return _toStatement.default;
  27353. }
  27354. });
  27355. Object.defineProperty(exports, "valueToNode", {
  27356. enumerable: true,
  27357. get: function() {
  27358. return _valueToNode.default;
  27359. }
  27360. });
  27361. Object.defineProperty(exports, "appendToMemberExpression", {
  27362. enumerable: true,
  27363. get: function() {
  27364. return _appendToMemberExpression.default;
  27365. }
  27366. });
  27367. Object.defineProperty(exports, "inherits", {
  27368. enumerable: true,
  27369. get: function() {
  27370. return _inherits.default;
  27371. }
  27372. });
  27373. Object.defineProperty(exports, "prependToMemberExpression", {
  27374. enumerable: true,
  27375. get: function() {
  27376. return _prependToMemberExpression.default;
  27377. }
  27378. });
  27379. Object.defineProperty(exports, "removeProperties", {
  27380. enumerable: true,
  27381. get: function() {
  27382. return _removeProperties.default;
  27383. }
  27384. });
  27385. Object.defineProperty(exports, "removePropertiesDeep", {
  27386. enumerable: true,
  27387. get: function() {
  27388. return _removePropertiesDeep.default;
  27389. }
  27390. });
  27391. Object.defineProperty(exports, "removeTypeDuplicates", {
  27392. enumerable: true,
  27393. get: function() {
  27394. return _removeTypeDuplicates.default;
  27395. }
  27396. });
  27397. Object.defineProperty(exports, "getBindingIdentifiers", {
  27398. enumerable: true,
  27399. get: function() {
  27400. return _getBindingIdentifiers.default;
  27401. }
  27402. });
  27403. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  27404. enumerable: true,
  27405. get: function() {
  27406. return _getOuterBindingIdentifiers.default;
  27407. }
  27408. });
  27409. Object.defineProperty(exports, "traverse", {
  27410. enumerable: true,
  27411. get: function() {
  27412. return _traverse.default;
  27413. }
  27414. });
  27415. Object.defineProperty(exports, "traverseFast", {
  27416. enumerable: true,
  27417. get: function() {
  27418. return _traverseFast.default;
  27419. }
  27420. });
  27421. Object.defineProperty(exports, "shallowEqual", {
  27422. enumerable: true,
  27423. get: function() {
  27424. return _shallowEqual.default;
  27425. }
  27426. });
  27427. Object.defineProperty(exports, "is", {
  27428. enumerable: true,
  27429. get: function() {
  27430. return _is.default;
  27431. }
  27432. });
  27433. Object.defineProperty(exports, "isBinding", {
  27434. enumerable: true,
  27435. get: function() {
  27436. return _isBinding.default;
  27437. }
  27438. });
  27439. Object.defineProperty(exports, "isBlockScoped", {
  27440. enumerable: true,
  27441. get: function() {
  27442. return _isBlockScoped.default;
  27443. }
  27444. });
  27445. Object.defineProperty(exports, "isImmutable", {
  27446. enumerable: true,
  27447. get: function() {
  27448. return _isImmutable.default;
  27449. }
  27450. });
  27451. Object.defineProperty(exports, "isLet", {
  27452. enumerable: true,
  27453. get: function() {
  27454. return _isLet.default;
  27455. }
  27456. });
  27457. Object.defineProperty(exports, "isNode", {
  27458. enumerable: true,
  27459. get: function() {
  27460. return _isNode.default;
  27461. }
  27462. });
  27463. Object.defineProperty(exports, "isNodesEquivalent", {
  27464. enumerable: true,
  27465. get: function() {
  27466. return _isNodesEquivalent.default;
  27467. }
  27468. });
  27469. Object.defineProperty(exports, "isPlaceholderType", {
  27470. enumerable: true,
  27471. get: function() {
  27472. return _isPlaceholderType.default;
  27473. }
  27474. });
  27475. Object.defineProperty(exports, "isReferenced", {
  27476. enumerable: true,
  27477. get: function() {
  27478. return _isReferenced.default;
  27479. }
  27480. });
  27481. Object.defineProperty(exports, "isScope", {
  27482. enumerable: true,
  27483. get: function() {
  27484. return _isScope.default;
  27485. }
  27486. });
  27487. Object.defineProperty(exports, "isSpecifierDefault", {
  27488. enumerable: true,
  27489. get: function() {
  27490. return _isSpecifierDefault.default;
  27491. }
  27492. });
  27493. Object.defineProperty(exports, "isType", {
  27494. enumerable: true,
  27495. get: function() {
  27496. return _isType.default;
  27497. }
  27498. });
  27499. Object.defineProperty(exports, "isValidES3Identifier", {
  27500. enumerable: true,
  27501. get: function() {
  27502. return _isValidES3Identifier.default;
  27503. }
  27504. });
  27505. Object.defineProperty(exports, "isValidIdentifier", {
  27506. enumerable: true,
  27507. get: function() {
  27508. return _isValidIdentifier.default;
  27509. }
  27510. });
  27511. Object.defineProperty(exports, "isVar", {
  27512. enumerable: true,
  27513. get: function() {
  27514. return _isVar.default;
  27515. }
  27516. });
  27517. Object.defineProperty(exports, "matchesPattern", {
  27518. enumerable: true,
  27519. get: function() {
  27520. return _matchesPattern.default;
  27521. }
  27522. });
  27523. Object.defineProperty(exports, "validate", {
  27524. enumerable: true,
  27525. get: function() {
  27526. return _validate.default;
  27527. }
  27528. });
  27529. Object.defineProperty(exports, "buildMatchMemberExpression", {
  27530. enumerable: true,
  27531. get: function() {
  27532. return _buildMatchMemberExpression.default;
  27533. }
  27534. });
  27535. exports.react = void 0;
  27536. var _isReactComponent = require_isReactComponent2();
  27537. var _isCompatTag = require_isCompatTag2();
  27538. var _buildChildren = require_buildChildren2();
  27539. var _assertNode = require_assertNode2();
  27540. var _generated = require_generated8();
  27541. Object.keys(_generated).forEach(function(key) {
  27542. if (key === "default" || key === "__esModule")
  27543. return;
  27544. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27545. return;
  27546. if (key in exports && exports[key] === _generated[key])
  27547. return;
  27548. Object.defineProperty(exports, key, {
  27549. enumerable: true,
  27550. get: function() {
  27551. return _generated[key];
  27552. }
  27553. });
  27554. });
  27555. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof2();
  27556. var _createFlowUnionType = require_createFlowUnionType2();
  27557. var _createTSUnionType = require_createTSUnionType2();
  27558. var _generated2 = require_generated7();
  27559. Object.keys(_generated2).forEach(function(key) {
  27560. if (key === "default" || key === "__esModule")
  27561. return;
  27562. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27563. return;
  27564. if (key in exports && exports[key] === _generated2[key])
  27565. return;
  27566. Object.defineProperty(exports, key, {
  27567. enumerable: true,
  27568. get: function() {
  27569. return _generated2[key];
  27570. }
  27571. });
  27572. });
  27573. var _uppercase = require_uppercase2();
  27574. Object.keys(_uppercase).forEach(function(key) {
  27575. if (key === "default" || key === "__esModule")
  27576. return;
  27577. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27578. return;
  27579. if (key in exports && exports[key] === _uppercase[key])
  27580. return;
  27581. Object.defineProperty(exports, key, {
  27582. enumerable: true,
  27583. get: function() {
  27584. return _uppercase[key];
  27585. }
  27586. });
  27587. });
  27588. var _cloneNode = require_cloneNode2();
  27589. var _clone = require_clone2();
  27590. var _cloneDeep = require_cloneDeep2();
  27591. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc2();
  27592. var _cloneWithoutLoc = require_cloneWithoutLoc2();
  27593. var _addComment = require_addComment2();
  27594. var _addComments = require_addComments2();
  27595. var _inheritInnerComments = require_inheritInnerComments2();
  27596. var _inheritLeadingComments = require_inheritLeadingComments2();
  27597. var _inheritsComments = require_inheritsComments2();
  27598. var _inheritTrailingComments = require_inheritTrailingComments2();
  27599. var _removeComments = require_removeComments2();
  27600. var _generated3 = require_generated9();
  27601. Object.keys(_generated3).forEach(function(key) {
  27602. if (key === "default" || key === "__esModule")
  27603. return;
  27604. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27605. return;
  27606. if (key in exports && exports[key] === _generated3[key])
  27607. return;
  27608. Object.defineProperty(exports, key, {
  27609. enumerable: true,
  27610. get: function() {
  27611. return _generated3[key];
  27612. }
  27613. });
  27614. });
  27615. var _constants = require_constants2();
  27616. Object.keys(_constants).forEach(function(key) {
  27617. if (key === "default" || key === "__esModule")
  27618. return;
  27619. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27620. return;
  27621. if (key in exports && exports[key] === _constants[key])
  27622. return;
  27623. Object.defineProperty(exports, key, {
  27624. enumerable: true,
  27625. get: function() {
  27626. return _constants[key];
  27627. }
  27628. });
  27629. });
  27630. var _ensureBlock = require_ensureBlock2();
  27631. var _toBindingIdentifierName = require_toBindingIdentifierName2();
  27632. var _toBlock = require_toBlock2();
  27633. var _toComputedKey = require_toComputedKey2();
  27634. var _toExpression = require_toExpression2();
  27635. var _toIdentifier = require_toIdentifier2();
  27636. var _toKeyAlias = require_toKeyAlias2();
  27637. var _toSequenceExpression = require_toSequenceExpression2();
  27638. var _toStatement = require_toStatement2();
  27639. var _valueToNode = require_valueToNode2();
  27640. var _definitions = require_definitions2();
  27641. Object.keys(_definitions).forEach(function(key) {
  27642. if (key === "default" || key === "__esModule")
  27643. return;
  27644. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27645. return;
  27646. if (key in exports && exports[key] === _definitions[key])
  27647. return;
  27648. Object.defineProperty(exports, key, {
  27649. enumerable: true,
  27650. get: function() {
  27651. return _definitions[key];
  27652. }
  27653. });
  27654. });
  27655. var _appendToMemberExpression = require_appendToMemberExpression2();
  27656. var _inherits = require_inherits2();
  27657. var _prependToMemberExpression = require_prependToMemberExpression2();
  27658. var _removeProperties = require_removeProperties2();
  27659. var _removePropertiesDeep = require_removePropertiesDeep2();
  27660. var _removeTypeDuplicates = require_removeTypeDuplicates3();
  27661. var _getBindingIdentifiers = require_getBindingIdentifiers2();
  27662. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers2();
  27663. var _traverse = require_traverse2();
  27664. Object.keys(_traverse).forEach(function(key) {
  27665. if (key === "default" || key === "__esModule")
  27666. return;
  27667. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27668. return;
  27669. if (key in exports && exports[key] === _traverse[key])
  27670. return;
  27671. Object.defineProperty(exports, key, {
  27672. enumerable: true,
  27673. get: function() {
  27674. return _traverse[key];
  27675. }
  27676. });
  27677. });
  27678. var _traverseFast = require_traverseFast2();
  27679. var _shallowEqual = require_shallowEqual2();
  27680. var _is = require_is2();
  27681. var _isBinding = require_isBinding2();
  27682. var _isBlockScoped = require_isBlockScoped2();
  27683. var _isImmutable = require_isImmutable2();
  27684. var _isLet = require_isLet2();
  27685. var _isNode = require_isNode2();
  27686. var _isNodesEquivalent = require_isNodesEquivalent2();
  27687. var _isPlaceholderType = require_isPlaceholderType2();
  27688. var _isReferenced = require_isReferenced2();
  27689. var _isScope = require_isScope2();
  27690. var _isSpecifierDefault = require_isSpecifierDefault2();
  27691. var _isType = require_isType2();
  27692. var _isValidES3Identifier = require_isValidES3Identifier2();
  27693. var _isValidIdentifier = require_isValidIdentifier2();
  27694. var _isVar = require_isVar2();
  27695. var _matchesPattern = require_matchesPattern2();
  27696. var _validate = require_validate2();
  27697. var _buildMatchMemberExpression = require_buildMatchMemberExpression2();
  27698. var _generated4 = require_generated6();
  27699. Object.keys(_generated4).forEach(function(key) {
  27700. if (key === "default" || key === "__esModule")
  27701. return;
  27702. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27703. return;
  27704. if (key in exports && exports[key] === _generated4[key])
  27705. return;
  27706. Object.defineProperty(exports, key, {
  27707. enumerable: true,
  27708. get: function() {
  27709. return _generated4[key];
  27710. }
  27711. });
  27712. });
  27713. var _generated5 = require_generated10();
  27714. Object.keys(_generated5).forEach(function(key) {
  27715. if (key === "default" || key === "__esModule")
  27716. return;
  27717. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  27718. return;
  27719. if (key in exports && exports[key] === _generated5[key])
  27720. return;
  27721. Object.defineProperty(exports, key, {
  27722. enumerable: true,
  27723. get: function() {
  27724. return _generated5[key];
  27725. }
  27726. });
  27727. });
  27728. var react = {
  27729. isReactComponent: _isReactComponent.default,
  27730. isCompatTag: _isCompatTag.default,
  27731. buildChildren: _buildChildren.default
  27732. };
  27733. exports.react = react;
  27734. }
  27735. });
  27736. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/virtual-types.js
  27737. var require_virtual_types = __commonJS({
  27738. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/virtual-types.js"(exports) {
  27739. "use strict";
  27740. Object.defineProperty(exports, "__esModule", {
  27741. value: true
  27742. });
  27743. exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0;
  27744. var t2 = require_lib4();
  27745. var ReferencedIdentifier = {
  27746. types: ["Identifier", "JSXIdentifier"],
  27747. checkPath(path, opts) {
  27748. const {
  27749. node,
  27750. parent
  27751. } = path;
  27752. if (!t2.isIdentifier(node, opts) && !t2.isJSXMemberExpression(parent, opts)) {
  27753. if (t2.isJSXIdentifier(node, opts)) {
  27754. if (t2.react.isCompatTag(node.name))
  27755. return false;
  27756. } else {
  27757. return false;
  27758. }
  27759. }
  27760. return t2.isReferenced(node, parent, path.parentPath.parent);
  27761. }
  27762. };
  27763. exports.ReferencedIdentifier = ReferencedIdentifier;
  27764. var ReferencedMemberExpression = {
  27765. types: ["MemberExpression"],
  27766. checkPath({
  27767. node,
  27768. parent
  27769. }) {
  27770. return t2.isMemberExpression(node) && t2.isReferenced(node, parent);
  27771. }
  27772. };
  27773. exports.ReferencedMemberExpression = ReferencedMemberExpression;
  27774. var BindingIdentifier = {
  27775. types: ["Identifier"],
  27776. checkPath(path) {
  27777. const {
  27778. node,
  27779. parent
  27780. } = path;
  27781. const grandparent = path.parentPath.parent;
  27782. return t2.isIdentifier(node) && t2.isBinding(node, parent, grandparent);
  27783. }
  27784. };
  27785. exports.BindingIdentifier = BindingIdentifier;
  27786. var Statement = {
  27787. types: ["Statement"],
  27788. checkPath({
  27789. node,
  27790. parent
  27791. }) {
  27792. if (t2.isStatement(node)) {
  27793. if (t2.isVariableDeclaration(node)) {
  27794. if (t2.isForXStatement(parent, {
  27795. left: node
  27796. }))
  27797. return false;
  27798. if (t2.isForStatement(parent, {
  27799. init: node
  27800. }))
  27801. return false;
  27802. }
  27803. return true;
  27804. } else {
  27805. return false;
  27806. }
  27807. }
  27808. };
  27809. exports.Statement = Statement;
  27810. var Expression = {
  27811. types: ["Expression"],
  27812. checkPath(path) {
  27813. if (path.isIdentifier()) {
  27814. return path.isReferencedIdentifier();
  27815. } else {
  27816. return t2.isExpression(path.node);
  27817. }
  27818. }
  27819. };
  27820. exports.Expression = Expression;
  27821. var Scope4 = {
  27822. types: ["Scopable", "Pattern"],
  27823. checkPath(path) {
  27824. return t2.isScope(path.node, path.parent);
  27825. }
  27826. };
  27827. exports.Scope = Scope4;
  27828. var Referenced = {
  27829. checkPath(path) {
  27830. return t2.isReferenced(path.node, path.parent);
  27831. }
  27832. };
  27833. exports.Referenced = Referenced;
  27834. var BlockScoped = {
  27835. checkPath(path) {
  27836. return t2.isBlockScoped(path.node);
  27837. }
  27838. };
  27839. exports.BlockScoped = BlockScoped;
  27840. var Var = {
  27841. types: ["VariableDeclaration"],
  27842. checkPath(path) {
  27843. return t2.isVar(path.node);
  27844. }
  27845. };
  27846. exports.Var = Var;
  27847. var User = {
  27848. checkPath(path) {
  27849. return path.node && !!path.node.loc;
  27850. }
  27851. };
  27852. exports.User = User;
  27853. var Generated = {
  27854. checkPath(path) {
  27855. return !path.isUser();
  27856. }
  27857. };
  27858. exports.Generated = Generated;
  27859. var Pure = {
  27860. checkPath(path, opts) {
  27861. return path.scope.isPure(path.node, opts);
  27862. }
  27863. };
  27864. exports.Pure = Pure;
  27865. var Flow = {
  27866. types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
  27867. checkPath({
  27868. node
  27869. }) {
  27870. if (t2.isFlow(node)) {
  27871. return true;
  27872. } else if (t2.isImportDeclaration(node)) {
  27873. return node.importKind === "type" || node.importKind === "typeof";
  27874. } else if (t2.isExportDeclaration(node)) {
  27875. return node.exportKind === "type";
  27876. } else if (t2.isImportSpecifier(node)) {
  27877. return node.importKind === "type" || node.importKind === "typeof";
  27878. } else {
  27879. return false;
  27880. }
  27881. }
  27882. };
  27883. exports.Flow = Flow;
  27884. var RestProperty = {
  27885. types: ["RestElement"],
  27886. checkPath(path) {
  27887. return path.parentPath && path.parentPath.isObjectPattern();
  27888. }
  27889. };
  27890. exports.RestProperty = RestProperty;
  27891. var SpreadProperty = {
  27892. types: ["RestElement"],
  27893. checkPath(path) {
  27894. return path.parentPath && path.parentPath.isObjectExpression();
  27895. }
  27896. };
  27897. exports.SpreadProperty = SpreadProperty;
  27898. var ExistentialTypeParam = {
  27899. types: ["ExistsTypeAnnotation"]
  27900. };
  27901. exports.ExistentialTypeParam = ExistentialTypeParam;
  27902. var NumericLiteralTypeAnnotation = {
  27903. types: ["NumberLiteralTypeAnnotation"]
  27904. };
  27905. exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
  27906. var ForAwaitStatement = {
  27907. types: ["ForOfStatement"],
  27908. checkPath({
  27909. node
  27910. }) {
  27911. return node.await === true;
  27912. }
  27913. };
  27914. exports.ForAwaitStatement = ForAwaitStatement;
  27915. }
  27916. });
  27917. // node_modules/ms/index.js
  27918. var require_ms = __commonJS({
  27919. "node_modules/ms/index.js"(exports, module2) {
  27920. var s = 1e3;
  27921. var m = s * 60;
  27922. var h = m * 60;
  27923. var d = h * 24;
  27924. var w = d * 7;
  27925. var y = d * 365.25;
  27926. module2.exports = function(val, options) {
  27927. options = options || {};
  27928. var type = typeof val;
  27929. if (type === "string" && val.length > 0) {
  27930. return parse4(val);
  27931. } else if (type === "number" && isFinite(val)) {
  27932. return options.long ? fmtLong(val) : fmtShort(val);
  27933. }
  27934. throw new Error(
  27935. "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
  27936. );
  27937. };
  27938. function parse4(str) {
  27939. str = String(str);
  27940. if (str.length > 100) {
  27941. return;
  27942. }
  27943. 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(
  27944. str
  27945. );
  27946. if (!match) {
  27947. return;
  27948. }
  27949. var n = parseFloat(match[1]);
  27950. var type = (match[2] || "ms").toLowerCase();
  27951. switch (type) {
  27952. case "years":
  27953. case "year":
  27954. case "yrs":
  27955. case "yr":
  27956. case "y":
  27957. return n * y;
  27958. case "weeks":
  27959. case "week":
  27960. case "w":
  27961. return n * w;
  27962. case "days":
  27963. case "day":
  27964. case "d":
  27965. return n * d;
  27966. case "hours":
  27967. case "hour":
  27968. case "hrs":
  27969. case "hr":
  27970. case "h":
  27971. return n * h;
  27972. case "minutes":
  27973. case "minute":
  27974. case "mins":
  27975. case "min":
  27976. case "m":
  27977. return n * m;
  27978. case "seconds":
  27979. case "second":
  27980. case "secs":
  27981. case "sec":
  27982. case "s":
  27983. return n * s;
  27984. case "milliseconds":
  27985. case "millisecond":
  27986. case "msecs":
  27987. case "msec":
  27988. case "ms":
  27989. return n;
  27990. default:
  27991. return void 0;
  27992. }
  27993. }
  27994. function fmtShort(ms) {
  27995. var msAbs = Math.abs(ms);
  27996. if (msAbs >= d) {
  27997. return Math.round(ms / d) + "d";
  27998. }
  27999. if (msAbs >= h) {
  28000. return Math.round(ms / h) + "h";
  28001. }
  28002. if (msAbs >= m) {
  28003. return Math.round(ms / m) + "m";
  28004. }
  28005. if (msAbs >= s) {
  28006. return Math.round(ms / s) + "s";
  28007. }
  28008. return ms + "ms";
  28009. }
  28010. function fmtLong(ms) {
  28011. var msAbs = Math.abs(ms);
  28012. if (msAbs >= d) {
  28013. return plural(ms, msAbs, d, "day");
  28014. }
  28015. if (msAbs >= h) {
  28016. return plural(ms, msAbs, h, "hour");
  28017. }
  28018. if (msAbs >= m) {
  28019. return plural(ms, msAbs, m, "minute");
  28020. }
  28021. if (msAbs >= s) {
  28022. return plural(ms, msAbs, s, "second");
  28023. }
  28024. return ms + " ms";
  28025. }
  28026. function plural(ms, msAbs, n, name2) {
  28027. var isPlural = msAbs >= n * 1.5;
  28028. return Math.round(ms / n) + " " + name2 + (isPlural ? "s" : "");
  28029. }
  28030. }
  28031. });
  28032. // node_modules/debug/src/common.js
  28033. var require_common = __commonJS({
  28034. "node_modules/debug/src/common.js"(exports, module2) {
  28035. function setup(env) {
  28036. createDebug.debug = createDebug;
  28037. createDebug.default = createDebug;
  28038. createDebug.coerce = coerce;
  28039. createDebug.disable = disable2;
  28040. createDebug.enable = enable;
  28041. createDebug.enabled = enabled;
  28042. createDebug.humanize = require_ms();
  28043. createDebug.destroy = destroy;
  28044. Object.keys(env).forEach((key) => {
  28045. createDebug[key] = env[key];
  28046. });
  28047. createDebug.names = [];
  28048. createDebug.skips = [];
  28049. createDebug.formatters = {};
  28050. function selectColor(namespace) {
  28051. let hash = 0;
  28052. for (let i = 0; i < namespace.length; i++) {
  28053. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  28054. hash |= 0;
  28055. }
  28056. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  28057. }
  28058. createDebug.selectColor = selectColor;
  28059. function createDebug(namespace) {
  28060. let prevTime;
  28061. let enableOverride = null;
  28062. function debug(...args) {
  28063. if (!debug.enabled) {
  28064. return;
  28065. }
  28066. const self2 = debug;
  28067. const curr = Number(new Date());
  28068. const ms = curr - (prevTime || curr);
  28069. self2.diff = ms;
  28070. self2.prev = prevTime;
  28071. self2.curr = curr;
  28072. prevTime = curr;
  28073. args[0] = createDebug.coerce(args[0]);
  28074. if (typeof args[0] !== "string") {
  28075. args.unshift("%O");
  28076. }
  28077. let index2 = 0;
  28078. args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
  28079. if (match === "%%") {
  28080. return "%";
  28081. }
  28082. index2++;
  28083. const formatter = createDebug.formatters[format];
  28084. if (typeof formatter === "function") {
  28085. const val = args[index2];
  28086. match = formatter.call(self2, val);
  28087. args.splice(index2, 1);
  28088. index2--;
  28089. }
  28090. return match;
  28091. });
  28092. createDebug.formatArgs.call(self2, args);
  28093. const logFn = self2.log || createDebug.log;
  28094. logFn.apply(self2, args);
  28095. }
  28096. debug.namespace = namespace;
  28097. debug.useColors = createDebug.useColors();
  28098. debug.color = createDebug.selectColor(namespace);
  28099. debug.extend = extend3;
  28100. debug.destroy = createDebug.destroy;
  28101. Object.defineProperty(debug, "enabled", {
  28102. enumerable: true,
  28103. configurable: false,
  28104. get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,
  28105. set: (v) => {
  28106. enableOverride = v;
  28107. }
  28108. });
  28109. if (typeof createDebug.init === "function") {
  28110. createDebug.init(debug);
  28111. }
  28112. return debug;
  28113. }
  28114. function extend3(namespace, delimiter) {
  28115. const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
  28116. newDebug.log = this.log;
  28117. return newDebug;
  28118. }
  28119. function enable(namespaces) {
  28120. createDebug.save(namespaces);
  28121. createDebug.names = [];
  28122. createDebug.skips = [];
  28123. let i;
  28124. const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
  28125. const len = split.length;
  28126. for (i = 0; i < len; i++) {
  28127. if (!split[i]) {
  28128. continue;
  28129. }
  28130. namespaces = split[i].replace(/\*/g, ".*?");
  28131. if (namespaces[0] === "-") {
  28132. createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
  28133. } else {
  28134. createDebug.names.push(new RegExp("^" + namespaces + "$"));
  28135. }
  28136. }
  28137. }
  28138. function disable2() {
  28139. const namespaces = [
  28140. ...createDebug.names.map(toNamespace),
  28141. ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
  28142. ].join(",");
  28143. createDebug.enable("");
  28144. return namespaces;
  28145. }
  28146. function enabled(name2) {
  28147. if (name2[name2.length - 1] === "*") {
  28148. return true;
  28149. }
  28150. let i;
  28151. let len;
  28152. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  28153. if (createDebug.skips[i].test(name2)) {
  28154. return false;
  28155. }
  28156. }
  28157. for (i = 0, len = createDebug.names.length; i < len; i++) {
  28158. if (createDebug.names[i].test(name2)) {
  28159. return true;
  28160. }
  28161. }
  28162. return false;
  28163. }
  28164. function toNamespace(regexp) {
  28165. return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
  28166. }
  28167. function coerce(val) {
  28168. if (val instanceof Error) {
  28169. return val.stack || val.message;
  28170. }
  28171. return val;
  28172. }
  28173. function destroy() {
  28174. console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
  28175. }
  28176. createDebug.enable(createDebug.load());
  28177. return createDebug;
  28178. }
  28179. module2.exports = setup;
  28180. }
  28181. });
  28182. // node_modules/debug/src/browser.js
  28183. var require_browser = __commonJS({
  28184. "node_modules/debug/src/browser.js"(exports, module2) {
  28185. exports.formatArgs = formatArgs;
  28186. exports.save = save;
  28187. exports.load = load;
  28188. exports.useColors = useColors;
  28189. exports.storage = localstorage();
  28190. exports.destroy = (() => {
  28191. let warned = false;
  28192. return () => {
  28193. if (!warned) {
  28194. warned = true;
  28195. console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
  28196. }
  28197. };
  28198. })();
  28199. exports.colors = [
  28200. "#0000CC",
  28201. "#0000FF",
  28202. "#0033CC",
  28203. "#0033FF",
  28204. "#0066CC",
  28205. "#0066FF",
  28206. "#0099CC",
  28207. "#0099FF",
  28208. "#00CC00",
  28209. "#00CC33",
  28210. "#00CC66",
  28211. "#00CC99",
  28212. "#00CCCC",
  28213. "#00CCFF",
  28214. "#3300CC",
  28215. "#3300FF",
  28216. "#3333CC",
  28217. "#3333FF",
  28218. "#3366CC",
  28219. "#3366FF",
  28220. "#3399CC",
  28221. "#3399FF",
  28222. "#33CC00",
  28223. "#33CC33",
  28224. "#33CC66",
  28225. "#33CC99",
  28226. "#33CCCC",
  28227. "#33CCFF",
  28228. "#6600CC",
  28229. "#6600FF",
  28230. "#6633CC",
  28231. "#6633FF",
  28232. "#66CC00",
  28233. "#66CC33",
  28234. "#9900CC",
  28235. "#9900FF",
  28236. "#9933CC",
  28237. "#9933FF",
  28238. "#99CC00",
  28239. "#99CC33",
  28240. "#CC0000",
  28241. "#CC0033",
  28242. "#CC0066",
  28243. "#CC0099",
  28244. "#CC00CC",
  28245. "#CC00FF",
  28246. "#CC3300",
  28247. "#CC3333",
  28248. "#CC3366",
  28249. "#CC3399",
  28250. "#CC33CC",
  28251. "#CC33FF",
  28252. "#CC6600",
  28253. "#CC6633",
  28254. "#CC9900",
  28255. "#CC9933",
  28256. "#CCCC00",
  28257. "#CCCC33",
  28258. "#FF0000",
  28259. "#FF0033",
  28260. "#FF0066",
  28261. "#FF0099",
  28262. "#FF00CC",
  28263. "#FF00FF",
  28264. "#FF3300",
  28265. "#FF3333",
  28266. "#FF3366",
  28267. "#FF3399",
  28268. "#FF33CC",
  28269. "#FF33FF",
  28270. "#FF6600",
  28271. "#FF6633",
  28272. "#FF9900",
  28273. "#FF9933",
  28274. "#FFCC00",
  28275. "#FFCC33"
  28276. ];
  28277. function useColors() {
  28278. if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
  28279. return true;
  28280. }
  28281. if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  28282. return false;
  28283. }
  28284. 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+)/);
  28285. }
  28286. function formatArgs(args) {
  28287. args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
  28288. if (!this.useColors) {
  28289. return;
  28290. }
  28291. const c = "color: " + this.color;
  28292. args.splice(1, 0, c, "color: inherit");
  28293. let index2 = 0;
  28294. let lastC = 0;
  28295. args[0].replace(/%[a-zA-Z%]/g, (match) => {
  28296. if (match === "%%") {
  28297. return;
  28298. }
  28299. index2++;
  28300. if (match === "%c") {
  28301. lastC = index2;
  28302. }
  28303. });
  28304. args.splice(lastC, 0, c);
  28305. }
  28306. exports.log = console.debug || console.log || (() => {
  28307. });
  28308. function save(namespaces) {
  28309. try {
  28310. if (namespaces) {
  28311. exports.storage.setItem("debug", namespaces);
  28312. } else {
  28313. exports.storage.removeItem("debug");
  28314. }
  28315. } catch (error) {
  28316. }
  28317. }
  28318. function load() {
  28319. let r;
  28320. try {
  28321. r = exports.storage.getItem("debug");
  28322. } catch (error) {
  28323. }
  28324. if (!r && typeof process !== "undefined" && "env" in process) {
  28325. r = process.env.DEBUG;
  28326. }
  28327. return r;
  28328. }
  28329. function localstorage() {
  28330. try {
  28331. return localStorage;
  28332. } catch (error) {
  28333. }
  28334. }
  28335. module2.exports = require_common()(exports);
  28336. var { formatters } = module2.exports;
  28337. formatters.j = function(v) {
  28338. try {
  28339. return JSON.stringify(v);
  28340. } catch (error) {
  28341. return "[UnexpectedJSONParseError]: " + error.message;
  28342. }
  28343. };
  28344. }
  28345. });
  28346. // node_modules/has-flag/index.js
  28347. var require_has_flag = __commonJS({
  28348. "node_modules/has-flag/index.js"(exports, module2) {
  28349. "use strict";
  28350. module2.exports = (flag, argv = process.argv) => {
  28351. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  28352. const position3 = argv.indexOf(prefix + flag);
  28353. const terminatorPosition = argv.indexOf("--");
  28354. return position3 !== -1 && (terminatorPosition === -1 || position3 < terminatorPosition);
  28355. };
  28356. }
  28357. });
  28358. // node_modules/supports-color/index.js
  28359. var require_supports_color = __commonJS({
  28360. "node_modules/supports-color/index.js"(exports, module2) {
  28361. "use strict";
  28362. var os = require("os");
  28363. var tty = require("tty");
  28364. var hasFlag = require_has_flag();
  28365. var { env } = process;
  28366. var forceColor;
  28367. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
  28368. forceColor = 0;
  28369. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  28370. forceColor = 1;
  28371. }
  28372. if ("FORCE_COLOR" in env) {
  28373. if (env.FORCE_COLOR === "true") {
  28374. forceColor = 1;
  28375. } else if (env.FORCE_COLOR === "false") {
  28376. forceColor = 0;
  28377. } else {
  28378. forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
  28379. }
  28380. }
  28381. function translateLevel(level) {
  28382. if (level === 0) {
  28383. return false;
  28384. }
  28385. return {
  28386. level,
  28387. hasBasic: true,
  28388. has256: level >= 2,
  28389. has16m: level >= 3
  28390. };
  28391. }
  28392. function supportsColor(haveStream, streamIsTTY) {
  28393. if (forceColor === 0) {
  28394. return 0;
  28395. }
  28396. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  28397. return 3;
  28398. }
  28399. if (hasFlag("color=256")) {
  28400. return 2;
  28401. }
  28402. if (haveStream && !streamIsTTY && forceColor === void 0) {
  28403. return 0;
  28404. }
  28405. const min = forceColor || 0;
  28406. if (env.TERM === "dumb") {
  28407. return min;
  28408. }
  28409. if (process.platform === "win32") {
  28410. const osRelease = os.release().split(".");
  28411. if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  28412. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  28413. }
  28414. return 1;
  28415. }
  28416. if ("CI" in env) {
  28417. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  28418. return 1;
  28419. }
  28420. return min;
  28421. }
  28422. if ("TEAMCITY_VERSION" in env) {
  28423. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  28424. }
  28425. if (env.COLORTERM === "truecolor") {
  28426. return 3;
  28427. }
  28428. if ("TERM_PROGRAM" in env) {
  28429. const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  28430. switch (env.TERM_PROGRAM) {
  28431. case "iTerm.app":
  28432. return version2 >= 3 ? 3 : 2;
  28433. case "Apple_Terminal":
  28434. return 2;
  28435. }
  28436. }
  28437. if (/-256(color)?$/i.test(env.TERM)) {
  28438. return 2;
  28439. }
  28440. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  28441. return 1;
  28442. }
  28443. if ("COLORTERM" in env) {
  28444. return 1;
  28445. }
  28446. return min;
  28447. }
  28448. function getSupportLevel(stream) {
  28449. const level = supportsColor(stream, stream && stream.isTTY);
  28450. return translateLevel(level);
  28451. }
  28452. module2.exports = {
  28453. supportsColor: getSupportLevel,
  28454. stdout: translateLevel(supportsColor(true, tty.isatty(1))),
  28455. stderr: translateLevel(supportsColor(true, tty.isatty(2)))
  28456. };
  28457. }
  28458. });
  28459. // node_modules/debug/src/node.js
  28460. var require_node = __commonJS({
  28461. "node_modules/debug/src/node.js"(exports, module2) {
  28462. var tty = require("tty");
  28463. var util = require("util");
  28464. exports.init = init;
  28465. exports.log = log;
  28466. exports.formatArgs = formatArgs;
  28467. exports.save = save;
  28468. exports.load = load;
  28469. exports.useColors = useColors;
  28470. exports.destroy = util.deprecate(
  28471. () => {
  28472. },
  28473. "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
  28474. );
  28475. exports.colors = [6, 2, 3, 4, 5, 1];
  28476. try {
  28477. const supportsColor = require_supports_color();
  28478. if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
  28479. exports.colors = [
  28480. 20,
  28481. 21,
  28482. 26,
  28483. 27,
  28484. 32,
  28485. 33,
  28486. 38,
  28487. 39,
  28488. 40,
  28489. 41,
  28490. 42,
  28491. 43,
  28492. 44,
  28493. 45,
  28494. 56,
  28495. 57,
  28496. 62,
  28497. 63,
  28498. 68,
  28499. 69,
  28500. 74,
  28501. 75,
  28502. 76,
  28503. 77,
  28504. 78,
  28505. 79,
  28506. 80,
  28507. 81,
  28508. 92,
  28509. 93,
  28510. 98,
  28511. 99,
  28512. 112,
  28513. 113,
  28514. 128,
  28515. 129,
  28516. 134,
  28517. 135,
  28518. 148,
  28519. 149,
  28520. 160,
  28521. 161,
  28522. 162,
  28523. 163,
  28524. 164,
  28525. 165,
  28526. 166,
  28527. 167,
  28528. 168,
  28529. 169,
  28530. 170,
  28531. 171,
  28532. 172,
  28533. 173,
  28534. 178,
  28535. 179,
  28536. 184,
  28537. 185,
  28538. 196,
  28539. 197,
  28540. 198,
  28541. 199,
  28542. 200,
  28543. 201,
  28544. 202,
  28545. 203,
  28546. 204,
  28547. 205,
  28548. 206,
  28549. 207,
  28550. 208,
  28551. 209,
  28552. 214,
  28553. 215,
  28554. 220,
  28555. 221
  28556. ];
  28557. }
  28558. } catch (error) {
  28559. }
  28560. exports.inspectOpts = Object.keys(process.env).filter((key) => {
  28561. return /^debug_/i.test(key);
  28562. }).reduce((obj, key) => {
  28563. const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
  28564. return k.toUpperCase();
  28565. });
  28566. let val = process.env[key];
  28567. if (/^(yes|on|true|enabled)$/i.test(val)) {
  28568. val = true;
  28569. } else if (/^(no|off|false|disabled)$/i.test(val)) {
  28570. val = false;
  28571. } else if (val === "null") {
  28572. val = null;
  28573. } else {
  28574. val = Number(val);
  28575. }
  28576. obj[prop] = val;
  28577. return obj;
  28578. }, {});
  28579. function useColors() {
  28580. return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
  28581. }
  28582. function formatArgs(args) {
  28583. const { namespace: name2, useColors: useColors2 } = this;
  28584. if (useColors2) {
  28585. const c = this.color;
  28586. const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
  28587. const prefix = ` ${colorCode};1m${name2} \x1B[0m`;
  28588. args[0] = prefix + args[0].split("\n").join("\n" + prefix);
  28589. args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
  28590. } else {
  28591. args[0] = getDate() + name2 + " " + args[0];
  28592. }
  28593. }
  28594. function getDate() {
  28595. if (exports.inspectOpts.hideDate) {
  28596. return "";
  28597. }
  28598. return new Date().toISOString() + " ";
  28599. }
  28600. function log(...args) {
  28601. return process.stderr.write(util.format(...args) + "\n");
  28602. }
  28603. function save(namespaces) {
  28604. if (namespaces) {
  28605. process.env.DEBUG = namespaces;
  28606. } else {
  28607. delete process.env.DEBUG;
  28608. }
  28609. }
  28610. function load() {
  28611. return process.env.DEBUG;
  28612. }
  28613. function init(debug) {
  28614. debug.inspectOpts = {};
  28615. const keys2 = Object.keys(exports.inspectOpts);
  28616. for (let i = 0; i < keys2.length; i++) {
  28617. debug.inspectOpts[keys2[i]] = exports.inspectOpts[keys2[i]];
  28618. }
  28619. }
  28620. module2.exports = require_common()(exports);
  28621. var { formatters } = module2.exports;
  28622. formatters.o = function(v) {
  28623. this.inspectOpts.colors = this.useColors;
  28624. return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
  28625. };
  28626. formatters.O = function(v) {
  28627. this.inspectOpts.colors = this.useColors;
  28628. return util.inspect(v, this.inspectOpts);
  28629. };
  28630. }
  28631. });
  28632. // node_modules/debug/src/index.js
  28633. var require_src = __commonJS({
  28634. "node_modules/debug/src/index.js"(exports, module2) {
  28635. if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
  28636. module2.exports = require_browser();
  28637. } else {
  28638. module2.exports = require_node();
  28639. }
  28640. }
  28641. });
  28642. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/binding.js
  28643. var require_binding = __commonJS({
  28644. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/binding.js"(exports) {
  28645. "use strict";
  28646. Object.defineProperty(exports, "__esModule", {
  28647. value: true
  28648. });
  28649. exports.default = void 0;
  28650. var Binding = class {
  28651. constructor({
  28652. identifier,
  28653. scope,
  28654. path,
  28655. kind
  28656. }) {
  28657. this.identifier = void 0;
  28658. this.scope = void 0;
  28659. this.path = void 0;
  28660. this.kind = void 0;
  28661. this.constantViolations = [];
  28662. this.constant = true;
  28663. this.referencePaths = [];
  28664. this.referenced = false;
  28665. this.references = 0;
  28666. this.identifier = identifier;
  28667. this.scope = scope;
  28668. this.path = path;
  28669. this.kind = kind;
  28670. this.clearValue();
  28671. }
  28672. deoptValue() {
  28673. this.clearValue();
  28674. this.hasDeoptedValue = true;
  28675. }
  28676. setValue(value) {
  28677. if (this.hasDeoptedValue)
  28678. return;
  28679. this.hasValue = true;
  28680. this.value = value;
  28681. }
  28682. clearValue() {
  28683. this.hasDeoptedValue = false;
  28684. this.hasValue = false;
  28685. this.value = null;
  28686. }
  28687. reassign(path) {
  28688. this.constant = false;
  28689. if (this.constantViolations.indexOf(path) !== -1) {
  28690. return;
  28691. }
  28692. this.constantViolations.push(path);
  28693. }
  28694. reference(path) {
  28695. if (this.referencePaths.indexOf(path) !== -1) {
  28696. return;
  28697. }
  28698. this.referenced = true;
  28699. this.references++;
  28700. this.referencePaths.push(path);
  28701. }
  28702. dereference() {
  28703. this.references--;
  28704. this.referenced = !!this.references;
  28705. }
  28706. };
  28707. exports.default = Binding;
  28708. }
  28709. });
  28710. // node_modules/estree-to-babel/node_modules/@babel/helper-split-export-declaration/lib/index.js
  28711. var require_lib5 = __commonJS({
  28712. "node_modules/estree-to-babel/node_modules/@babel/helper-split-export-declaration/lib/index.js"(exports) {
  28713. "use strict";
  28714. Object.defineProperty(exports, "__esModule", {
  28715. value: true
  28716. });
  28717. exports.default = splitExportDeclaration;
  28718. var t2 = _interopRequireWildcard(require_lib4());
  28719. function _getRequireWildcardCache() {
  28720. if (typeof WeakMap !== "function")
  28721. return null;
  28722. var cache = /* @__PURE__ */ new WeakMap();
  28723. _getRequireWildcardCache = function() {
  28724. return cache;
  28725. };
  28726. return cache;
  28727. }
  28728. function _interopRequireWildcard(obj) {
  28729. if (obj && obj.__esModule) {
  28730. return obj;
  28731. }
  28732. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  28733. return { default: obj };
  28734. }
  28735. var cache = _getRequireWildcardCache();
  28736. if (cache && cache.has(obj)) {
  28737. return cache.get(obj);
  28738. }
  28739. var newObj = {};
  28740. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  28741. for (var key in obj) {
  28742. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  28743. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  28744. if (desc && (desc.get || desc.set)) {
  28745. Object.defineProperty(newObj, key, desc);
  28746. } else {
  28747. newObj[key] = obj[key];
  28748. }
  28749. }
  28750. }
  28751. newObj.default = obj;
  28752. if (cache) {
  28753. cache.set(obj, newObj);
  28754. }
  28755. return newObj;
  28756. }
  28757. function splitExportDeclaration(exportDeclaration) {
  28758. if (!exportDeclaration.isExportDeclaration()) {
  28759. throw new Error("Only export declarations can be split.");
  28760. }
  28761. const isDefault = exportDeclaration.isExportDefaultDeclaration();
  28762. const declaration = exportDeclaration.get("declaration");
  28763. const isClassDeclaration = declaration.isClassDeclaration();
  28764. if (isDefault) {
  28765. const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
  28766. const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
  28767. let id = declaration.node.id;
  28768. let needBindingRegistration = false;
  28769. if (!id) {
  28770. needBindingRegistration = true;
  28771. id = scope.generateUidIdentifier("default");
  28772. if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
  28773. declaration.node.id = t2.cloneNode(id);
  28774. }
  28775. }
  28776. const updatedDeclaration = standaloneDeclaration ? declaration : t2.variableDeclaration("var", [t2.variableDeclarator(t2.cloneNode(id), declaration.node)]);
  28777. const updatedExportDeclaration = t2.exportNamedDeclaration(null, [t2.exportSpecifier(t2.cloneNode(id), t2.identifier("default"))]);
  28778. exportDeclaration.insertAfter(updatedExportDeclaration);
  28779. exportDeclaration.replaceWith(updatedDeclaration);
  28780. if (needBindingRegistration) {
  28781. scope.registerDeclaration(exportDeclaration);
  28782. }
  28783. return exportDeclaration;
  28784. }
  28785. if (exportDeclaration.get("specifiers").length > 0) {
  28786. throw new Error("It doesn't make sense to split exported specifiers.");
  28787. }
  28788. const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
  28789. const specifiers = Object.keys(bindingIdentifiers).map((name2) => {
  28790. return t2.exportSpecifier(t2.identifier(name2), t2.identifier(name2));
  28791. });
  28792. const aliasDeclar = t2.exportNamedDeclaration(null, specifiers);
  28793. exportDeclaration.insertAfter(aliasDeclar);
  28794. exportDeclaration.replaceWith(declaration.node);
  28795. return exportDeclaration;
  28796. }
  28797. }
  28798. });
  28799. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/lib/renamer.js
  28800. var require_renamer = __commonJS({
  28801. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/lib/renamer.js"(exports) {
  28802. "use strict";
  28803. Object.defineProperty(exports, "__esModule", {
  28804. value: true
  28805. });
  28806. exports.default = void 0;
  28807. var _binding = require_binding();
  28808. var _helperSplitExportDeclaration = require_lib5();
  28809. var t2 = require_lib4();
  28810. var renameVisitor = {
  28811. ReferencedIdentifier({
  28812. node
  28813. }, state) {
  28814. if (node.name === state.oldName) {
  28815. node.name = state.newName;
  28816. }
  28817. },
  28818. Scope(path, state) {
  28819. if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
  28820. skipAllButComputedMethodKey(path);
  28821. }
  28822. },
  28823. "AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
  28824. if (path.isVariableDeclaration())
  28825. return;
  28826. const ids = path.getOuterBindingIdentifiers();
  28827. for (const name2 in ids) {
  28828. if (name2 === state.oldName)
  28829. ids[name2].name = state.newName;
  28830. }
  28831. }
  28832. };
  28833. var Renamer = class {
  28834. constructor(binding, oldName, newName) {
  28835. this.newName = newName;
  28836. this.oldName = oldName;
  28837. this.binding = binding;
  28838. }
  28839. maybeConvertFromExportDeclaration(parentDeclar) {
  28840. const maybeExportDeclar = parentDeclar.parentPath;
  28841. if (!maybeExportDeclar.isExportDeclaration()) {
  28842. return;
  28843. }
  28844. if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
  28845. return;
  28846. }
  28847. (0, _helperSplitExportDeclaration.default)(maybeExportDeclar);
  28848. }
  28849. maybeConvertFromClassFunctionDeclaration(path) {
  28850. return;
  28851. if (!path.isFunctionDeclaration() && !path.isClassDeclaration())
  28852. return;
  28853. if (this.binding.kind !== "hoisted")
  28854. return;
  28855. path.node.id = t2.identifier(this.oldName);
  28856. path.node._blockHoist = 3;
  28857. path.replaceWith(t2.variableDeclaration("let", [t2.variableDeclarator(t2.identifier(this.newName), t2.toExpression(path.node))]));
  28858. }
  28859. maybeConvertFromClassFunctionExpression(path) {
  28860. return;
  28861. if (!path.isFunctionExpression() && !path.isClassExpression())
  28862. return;
  28863. if (this.binding.kind !== "local")
  28864. return;
  28865. path.node.id = t2.identifier(this.oldName);
  28866. this.binding.scope.parent.push({
  28867. id: t2.identifier(this.newName)
  28868. });
  28869. path.replaceWith(t2.assignmentExpression("=", t2.identifier(this.newName), path.node));
  28870. }
  28871. rename(block) {
  28872. const {
  28873. binding,
  28874. oldName,
  28875. newName
  28876. } = this;
  28877. const {
  28878. scope,
  28879. path
  28880. } = binding;
  28881. const parentDeclar = path.find((path2) => path2.isDeclaration() || path2.isFunctionExpression() || path2.isClassExpression());
  28882. if (parentDeclar) {
  28883. const bindingIds = parentDeclar.getOuterBindingIdentifiers();
  28884. if (bindingIds[oldName] === binding.identifier) {
  28885. this.maybeConvertFromExportDeclaration(parentDeclar);
  28886. }
  28887. }
  28888. const blockToTraverse = block || scope.block;
  28889. if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === "SwitchStatement") {
  28890. blockToTraverse.cases.forEach((c) => {
  28891. scope.traverse(c, renameVisitor, this);
  28892. });
  28893. } else {
  28894. scope.traverse(blockToTraverse, renameVisitor, this);
  28895. }
  28896. if (!block) {
  28897. scope.removeOwnBinding(oldName);
  28898. scope.bindings[newName] = binding;
  28899. this.binding.identifier.name = newName;
  28900. }
  28901. if (parentDeclar) {
  28902. this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
  28903. this.maybeConvertFromClassFunctionExpression(parentDeclar);
  28904. }
  28905. }
  28906. };
  28907. exports.default = Renamer;
  28908. function skipAllButComputedMethodKey(path) {
  28909. if (!path.isMethod() || !path.node.computed) {
  28910. path.skip();
  28911. return;
  28912. }
  28913. const keys2 = t2.VISITOR_KEYS[path.type];
  28914. for (const key of keys2) {
  28915. if (key !== "key")
  28916. path.skipKey(key);
  28917. }
  28918. }
  28919. }
  28920. });
  28921. // node_modules/globals/globals.json
  28922. var require_globals = __commonJS({
  28923. "node_modules/globals/globals.json"(exports, module2) {
  28924. module2.exports = {
  28925. builtin: {
  28926. Array: false,
  28927. ArrayBuffer: false,
  28928. Atomics: false,
  28929. BigInt: false,
  28930. BigInt64Array: false,
  28931. BigUint64Array: false,
  28932. Boolean: false,
  28933. constructor: false,
  28934. DataView: false,
  28935. Date: false,
  28936. decodeURI: false,
  28937. decodeURIComponent: false,
  28938. encodeURI: false,
  28939. encodeURIComponent: false,
  28940. Error: false,
  28941. escape: false,
  28942. eval: false,
  28943. EvalError: false,
  28944. Float32Array: false,
  28945. Float64Array: false,
  28946. Function: false,
  28947. globalThis: false,
  28948. hasOwnProperty: false,
  28949. Infinity: false,
  28950. Int16Array: false,
  28951. Int32Array: false,
  28952. Int8Array: false,
  28953. isFinite: false,
  28954. isNaN: false,
  28955. isPrototypeOf: false,
  28956. JSON: false,
  28957. Map: false,
  28958. Math: false,
  28959. NaN: false,
  28960. Number: false,
  28961. Object: false,
  28962. parseFloat: false,
  28963. parseInt: false,
  28964. Promise: false,
  28965. propertyIsEnumerable: false,
  28966. Proxy: false,
  28967. RangeError: false,
  28968. ReferenceError: false,
  28969. Reflect: false,
  28970. RegExp: false,
  28971. Set: false,
  28972. SharedArrayBuffer: false,
  28973. String: false,
  28974. Symbol: false,
  28975. SyntaxError: false,
  28976. toLocaleString: false,
  28977. toString: false,
  28978. TypeError: false,
  28979. Uint16Array: false,
  28980. Uint32Array: false,
  28981. Uint8Array: false,
  28982. Uint8ClampedArray: false,
  28983. undefined: false,
  28984. unescape: false,
  28985. URIError: false,
  28986. valueOf: false,
  28987. WeakMap: false,
  28988. WeakSet: false
  28989. },
  28990. es5: {
  28991. Array: false,
  28992. Boolean: false,
  28993. constructor: false,
  28994. Date: false,
  28995. decodeURI: false,
  28996. decodeURIComponent: false,
  28997. encodeURI: false,
  28998. encodeURIComponent: false,
  28999. Error: false,
  29000. escape: false,
  29001. eval: false,
  29002. EvalError: false,
  29003. Function: false,
  29004. hasOwnProperty: false,
  29005. Infinity: false,
  29006. isFinite: false,
  29007. isNaN: false,
  29008. isPrototypeOf: false,
  29009. JSON: false,
  29010. Math: false,
  29011. NaN: false,
  29012. Number: false,
  29013. Object: false,
  29014. parseFloat: false,
  29015. parseInt: false,
  29016. propertyIsEnumerable: false,
  29017. RangeError: false,
  29018. ReferenceError: false,
  29019. RegExp: false,
  29020. String: false,
  29021. SyntaxError: false,
  29022. toLocaleString: false,
  29023. toString: false,
  29024. TypeError: false,
  29025. undefined: false,
  29026. unescape: false,
  29027. URIError: false,
  29028. valueOf: false
  29029. },
  29030. es2015: {
  29031. Array: false,
  29032. ArrayBuffer: false,
  29033. Boolean: false,
  29034. constructor: false,
  29035. DataView: false,
  29036. Date: false,
  29037. decodeURI: false,
  29038. decodeURIComponent: false,
  29039. encodeURI: false,
  29040. encodeURIComponent: false,
  29041. Error: false,
  29042. escape: false,
  29043. eval: false,
  29044. EvalError: false,
  29045. Float32Array: false,
  29046. Float64Array: false,
  29047. Function: false,
  29048. hasOwnProperty: false,
  29049. Infinity: false,
  29050. Int16Array: false,
  29051. Int32Array: false,
  29052. Int8Array: false,
  29053. isFinite: false,
  29054. isNaN: false,
  29055. isPrototypeOf: false,
  29056. JSON: false,
  29057. Map: false,
  29058. Math: false,
  29059. NaN: false,
  29060. Number: false,
  29061. Object: false,
  29062. parseFloat: false,
  29063. parseInt: false,
  29064. Promise: false,
  29065. propertyIsEnumerable: false,
  29066. Proxy: false,
  29067. RangeError: false,
  29068. ReferenceError: false,
  29069. Reflect: false,
  29070. RegExp: false,
  29071. Set: false,
  29072. String: false,
  29073. Symbol: false,
  29074. SyntaxError: false,
  29075. toLocaleString: false,
  29076. toString: false,
  29077. TypeError: false,
  29078. Uint16Array: false,
  29079. Uint32Array: false,
  29080. Uint8Array: false,
  29081. Uint8ClampedArray: false,
  29082. undefined: false,
  29083. unescape: false,
  29084. URIError: false,
  29085. valueOf: false,
  29086. WeakMap: false,
  29087. WeakSet: false
  29088. },
  29089. es2017: {
  29090. Array: false,
  29091. ArrayBuffer: false,
  29092. Atomics: false,
  29093. Boolean: false,
  29094. constructor: false,
  29095. DataView: false,
  29096. Date: false,
  29097. decodeURI: false,
  29098. decodeURIComponent: false,
  29099. encodeURI: false,
  29100. encodeURIComponent: false,
  29101. Error: false,
  29102. escape: false,
  29103. eval: false,
  29104. EvalError: false,
  29105. Float32Array: false,
  29106. Float64Array: false,
  29107. Function: false,
  29108. hasOwnProperty: false,
  29109. Infinity: false,
  29110. Int16Array: false,
  29111. Int32Array: false,
  29112. Int8Array: false,
  29113. isFinite: false,
  29114. isNaN: false,
  29115. isPrototypeOf: false,
  29116. JSON: false,
  29117. Map: false,
  29118. Math: false,
  29119. NaN: false,
  29120. Number: false,
  29121. Object: false,
  29122. parseFloat: false,
  29123. parseInt: false,
  29124. Promise: false,
  29125. propertyIsEnumerable: false,
  29126. Proxy: false,
  29127. RangeError: false,
  29128. ReferenceError: false,
  29129. Reflect: false,
  29130. RegExp: false,
  29131. Set: false,
  29132. SharedArrayBuffer: false,
  29133. String: false,
  29134. Symbol: false,
  29135. SyntaxError: false,
  29136. toLocaleString: false,
  29137. toString: false,
  29138. TypeError: false,
  29139. Uint16Array: false,
  29140. Uint32Array: false,
  29141. Uint8Array: false,
  29142. Uint8ClampedArray: false,
  29143. undefined: false,
  29144. unescape: false,
  29145. URIError: false,
  29146. valueOf: false,
  29147. WeakMap: false,
  29148. WeakSet: false
  29149. },
  29150. browser: {
  29151. AbortController: false,
  29152. AbortSignal: false,
  29153. addEventListener: false,
  29154. alert: false,
  29155. AnalyserNode: false,
  29156. Animation: false,
  29157. AnimationEffectReadOnly: false,
  29158. AnimationEffectTiming: false,
  29159. AnimationEffectTimingReadOnly: false,
  29160. AnimationEvent: false,
  29161. AnimationPlaybackEvent: false,
  29162. AnimationTimeline: false,
  29163. applicationCache: false,
  29164. ApplicationCache: false,
  29165. ApplicationCacheErrorEvent: false,
  29166. atob: false,
  29167. Attr: false,
  29168. Audio: false,
  29169. AudioBuffer: false,
  29170. AudioBufferSourceNode: false,
  29171. AudioContext: false,
  29172. AudioDestinationNode: false,
  29173. AudioListener: false,
  29174. AudioNode: false,
  29175. AudioParam: false,
  29176. AudioProcessingEvent: false,
  29177. AudioScheduledSourceNode: false,
  29178. "AudioWorkletGlobalScope ": false,
  29179. AudioWorkletNode: false,
  29180. AudioWorkletProcessor: false,
  29181. BarProp: false,
  29182. BaseAudioContext: false,
  29183. BatteryManager: false,
  29184. BeforeUnloadEvent: false,
  29185. BiquadFilterNode: false,
  29186. Blob: false,
  29187. BlobEvent: false,
  29188. blur: false,
  29189. BroadcastChannel: false,
  29190. btoa: false,
  29191. BudgetService: false,
  29192. ByteLengthQueuingStrategy: false,
  29193. Cache: false,
  29194. caches: false,
  29195. CacheStorage: false,
  29196. cancelAnimationFrame: false,
  29197. cancelIdleCallback: false,
  29198. CanvasCaptureMediaStreamTrack: false,
  29199. CanvasGradient: false,
  29200. CanvasPattern: false,
  29201. CanvasRenderingContext2D: false,
  29202. ChannelMergerNode: false,
  29203. ChannelSplitterNode: false,
  29204. CharacterData: false,
  29205. clearInterval: false,
  29206. clearTimeout: false,
  29207. clientInformation: false,
  29208. ClipboardEvent: false,
  29209. close: false,
  29210. closed: false,
  29211. CloseEvent: false,
  29212. Comment: false,
  29213. CompositionEvent: false,
  29214. confirm: false,
  29215. console: false,
  29216. ConstantSourceNode: false,
  29217. ConvolverNode: false,
  29218. CountQueuingStrategy: false,
  29219. createImageBitmap: false,
  29220. Credential: false,
  29221. CredentialsContainer: false,
  29222. crypto: false,
  29223. Crypto: false,
  29224. CryptoKey: false,
  29225. CSS: false,
  29226. CSSConditionRule: false,
  29227. CSSFontFaceRule: false,
  29228. CSSGroupingRule: false,
  29229. CSSImportRule: false,
  29230. CSSKeyframeRule: false,
  29231. CSSKeyframesRule: false,
  29232. CSSMediaRule: false,
  29233. CSSNamespaceRule: false,
  29234. CSSPageRule: false,
  29235. CSSRule: false,
  29236. CSSRuleList: false,
  29237. CSSStyleDeclaration: false,
  29238. CSSStyleRule: false,
  29239. CSSStyleSheet: false,
  29240. CSSSupportsRule: false,
  29241. CustomElementRegistry: false,
  29242. customElements: false,
  29243. CustomEvent: false,
  29244. DataTransfer: false,
  29245. DataTransferItem: false,
  29246. DataTransferItemList: false,
  29247. defaultstatus: false,
  29248. defaultStatus: false,
  29249. DelayNode: false,
  29250. DeviceMotionEvent: false,
  29251. DeviceOrientationEvent: false,
  29252. devicePixelRatio: false,
  29253. dispatchEvent: false,
  29254. document: false,
  29255. Document: false,
  29256. DocumentFragment: false,
  29257. DocumentType: false,
  29258. DOMError: false,
  29259. DOMException: false,
  29260. DOMImplementation: false,
  29261. DOMMatrix: false,
  29262. DOMMatrixReadOnly: false,
  29263. DOMParser: false,
  29264. DOMPoint: false,
  29265. DOMPointReadOnly: false,
  29266. DOMQuad: false,
  29267. DOMRect: false,
  29268. DOMRectReadOnly: false,
  29269. DOMStringList: false,
  29270. DOMStringMap: false,
  29271. DOMTokenList: false,
  29272. DragEvent: false,
  29273. DynamicsCompressorNode: false,
  29274. Element: false,
  29275. ErrorEvent: false,
  29276. event: false,
  29277. Event: false,
  29278. EventSource: false,
  29279. EventTarget: false,
  29280. external: false,
  29281. fetch: false,
  29282. File: false,
  29283. FileList: false,
  29284. FileReader: false,
  29285. find: false,
  29286. focus: false,
  29287. FocusEvent: false,
  29288. FontFace: false,
  29289. FontFaceSetLoadEvent: false,
  29290. FormData: false,
  29291. frameElement: false,
  29292. frames: false,
  29293. GainNode: false,
  29294. Gamepad: false,
  29295. GamepadButton: false,
  29296. GamepadEvent: false,
  29297. getComputedStyle: false,
  29298. getSelection: false,
  29299. HashChangeEvent: false,
  29300. Headers: false,
  29301. history: false,
  29302. History: false,
  29303. HTMLAllCollection: false,
  29304. HTMLAnchorElement: false,
  29305. HTMLAreaElement: false,
  29306. HTMLAudioElement: false,
  29307. HTMLBaseElement: false,
  29308. HTMLBodyElement: false,
  29309. HTMLBRElement: false,
  29310. HTMLButtonElement: false,
  29311. HTMLCanvasElement: false,
  29312. HTMLCollection: false,
  29313. HTMLContentElement: false,
  29314. HTMLDataElement: false,
  29315. HTMLDataListElement: false,
  29316. HTMLDetailsElement: false,
  29317. HTMLDialogElement: false,
  29318. HTMLDirectoryElement: false,
  29319. HTMLDivElement: false,
  29320. HTMLDListElement: false,
  29321. HTMLDocument: false,
  29322. HTMLElement: false,
  29323. HTMLEmbedElement: false,
  29324. HTMLFieldSetElement: false,
  29325. HTMLFontElement: false,
  29326. HTMLFormControlsCollection: false,
  29327. HTMLFormElement: false,
  29328. HTMLFrameElement: false,
  29329. HTMLFrameSetElement: false,
  29330. HTMLHeadElement: false,
  29331. HTMLHeadingElement: false,
  29332. HTMLHRElement: false,
  29333. HTMLHtmlElement: false,
  29334. HTMLIFrameElement: false,
  29335. HTMLImageElement: false,
  29336. HTMLInputElement: false,
  29337. HTMLLabelElement: false,
  29338. HTMLLegendElement: false,
  29339. HTMLLIElement: false,
  29340. HTMLLinkElement: false,
  29341. HTMLMapElement: false,
  29342. HTMLMarqueeElement: false,
  29343. HTMLMediaElement: false,
  29344. HTMLMenuElement: false,
  29345. HTMLMetaElement: false,
  29346. HTMLMeterElement: false,
  29347. HTMLModElement: false,
  29348. HTMLObjectElement: false,
  29349. HTMLOListElement: false,
  29350. HTMLOptGroupElement: false,
  29351. HTMLOptionElement: false,
  29352. HTMLOptionsCollection: false,
  29353. HTMLOutputElement: false,
  29354. HTMLParagraphElement: false,
  29355. HTMLParamElement: false,
  29356. HTMLPictureElement: false,
  29357. HTMLPreElement: false,
  29358. HTMLProgressElement: false,
  29359. HTMLQuoteElement: false,
  29360. HTMLScriptElement: false,
  29361. HTMLSelectElement: false,
  29362. HTMLShadowElement: false,
  29363. HTMLSlotElement: false,
  29364. HTMLSourceElement: false,
  29365. HTMLSpanElement: false,
  29366. HTMLStyleElement: false,
  29367. HTMLTableCaptionElement: false,
  29368. HTMLTableCellElement: false,
  29369. HTMLTableColElement: false,
  29370. HTMLTableElement: false,
  29371. HTMLTableRowElement: false,
  29372. HTMLTableSectionElement: false,
  29373. HTMLTemplateElement: false,
  29374. HTMLTextAreaElement: false,
  29375. HTMLTimeElement: false,
  29376. HTMLTitleElement: false,
  29377. HTMLTrackElement: false,
  29378. HTMLUListElement: false,
  29379. HTMLUnknownElement: false,
  29380. HTMLVideoElement: false,
  29381. IDBCursor: false,
  29382. IDBCursorWithValue: false,
  29383. IDBDatabase: false,
  29384. IDBFactory: false,
  29385. IDBIndex: false,
  29386. IDBKeyRange: false,
  29387. IDBObjectStore: false,
  29388. IDBOpenDBRequest: false,
  29389. IDBRequest: false,
  29390. IDBTransaction: false,
  29391. IDBVersionChangeEvent: false,
  29392. IdleDeadline: false,
  29393. IIRFilterNode: false,
  29394. Image: false,
  29395. ImageBitmap: false,
  29396. ImageBitmapRenderingContext: false,
  29397. ImageCapture: false,
  29398. ImageData: false,
  29399. indexedDB: false,
  29400. innerHeight: false,
  29401. innerWidth: false,
  29402. InputEvent: false,
  29403. IntersectionObserver: false,
  29404. IntersectionObserverEntry: false,
  29405. Intl: false,
  29406. isSecureContext: false,
  29407. KeyboardEvent: false,
  29408. KeyframeEffect: false,
  29409. KeyframeEffectReadOnly: false,
  29410. length: false,
  29411. localStorage: false,
  29412. location: true,
  29413. Location: false,
  29414. locationbar: false,
  29415. matchMedia: false,
  29416. MediaDeviceInfo: false,
  29417. MediaDevices: false,
  29418. MediaElementAudioSourceNode: false,
  29419. MediaEncryptedEvent: false,
  29420. MediaError: false,
  29421. MediaKeyMessageEvent: false,
  29422. MediaKeySession: false,
  29423. MediaKeyStatusMap: false,
  29424. MediaKeySystemAccess: false,
  29425. MediaList: false,
  29426. MediaQueryList: false,
  29427. MediaQueryListEvent: false,
  29428. MediaRecorder: false,
  29429. MediaSettingsRange: false,
  29430. MediaSource: false,
  29431. MediaStream: false,
  29432. MediaStreamAudioDestinationNode: false,
  29433. MediaStreamAudioSourceNode: false,
  29434. MediaStreamEvent: false,
  29435. MediaStreamTrack: false,
  29436. MediaStreamTrackEvent: false,
  29437. menubar: false,
  29438. MessageChannel: false,
  29439. MessageEvent: false,
  29440. MessagePort: false,
  29441. MIDIAccess: false,
  29442. MIDIConnectionEvent: false,
  29443. MIDIInput: false,
  29444. MIDIInputMap: false,
  29445. MIDIMessageEvent: false,
  29446. MIDIOutput: false,
  29447. MIDIOutputMap: false,
  29448. MIDIPort: false,
  29449. MimeType: false,
  29450. MimeTypeArray: false,
  29451. MouseEvent: false,
  29452. moveBy: false,
  29453. moveTo: false,
  29454. MutationEvent: false,
  29455. MutationObserver: false,
  29456. MutationRecord: false,
  29457. name: false,
  29458. NamedNodeMap: false,
  29459. NavigationPreloadManager: false,
  29460. navigator: false,
  29461. Navigator: false,
  29462. NetworkInformation: false,
  29463. Node: false,
  29464. NodeFilter: false,
  29465. NodeIterator: false,
  29466. NodeList: false,
  29467. Notification: false,
  29468. OfflineAudioCompletionEvent: false,
  29469. OfflineAudioContext: false,
  29470. offscreenBuffering: false,
  29471. OffscreenCanvas: true,
  29472. onabort: true,
  29473. onafterprint: true,
  29474. onanimationend: true,
  29475. onanimationiteration: true,
  29476. onanimationstart: true,
  29477. onappinstalled: true,
  29478. onauxclick: true,
  29479. onbeforeinstallprompt: true,
  29480. onbeforeprint: true,
  29481. onbeforeunload: true,
  29482. onblur: true,
  29483. oncancel: true,
  29484. oncanplay: true,
  29485. oncanplaythrough: true,
  29486. onchange: true,
  29487. onclick: true,
  29488. onclose: true,
  29489. oncontextmenu: true,
  29490. oncuechange: true,
  29491. ondblclick: true,
  29492. ondevicemotion: true,
  29493. ondeviceorientation: true,
  29494. ondeviceorientationabsolute: true,
  29495. ondrag: true,
  29496. ondragend: true,
  29497. ondragenter: true,
  29498. ondragleave: true,
  29499. ondragover: true,
  29500. ondragstart: true,
  29501. ondrop: true,
  29502. ondurationchange: true,
  29503. onemptied: true,
  29504. onended: true,
  29505. onerror: true,
  29506. onfocus: true,
  29507. ongotpointercapture: true,
  29508. onhashchange: true,
  29509. oninput: true,
  29510. oninvalid: true,
  29511. onkeydown: true,
  29512. onkeypress: true,
  29513. onkeyup: true,
  29514. onlanguagechange: true,
  29515. onload: true,
  29516. onloadeddata: true,
  29517. onloadedmetadata: true,
  29518. onloadstart: true,
  29519. onlostpointercapture: true,
  29520. onmessage: true,
  29521. onmessageerror: true,
  29522. onmousedown: true,
  29523. onmouseenter: true,
  29524. onmouseleave: true,
  29525. onmousemove: true,
  29526. onmouseout: true,
  29527. onmouseover: true,
  29528. onmouseup: true,
  29529. onmousewheel: true,
  29530. onoffline: true,
  29531. ononline: true,
  29532. onpagehide: true,
  29533. onpageshow: true,
  29534. onpause: true,
  29535. onplay: true,
  29536. onplaying: true,
  29537. onpointercancel: true,
  29538. onpointerdown: true,
  29539. onpointerenter: true,
  29540. onpointerleave: true,
  29541. onpointermove: true,
  29542. onpointerout: true,
  29543. onpointerover: true,
  29544. onpointerup: true,
  29545. onpopstate: true,
  29546. onprogress: true,
  29547. onratechange: true,
  29548. onrejectionhandled: true,
  29549. onreset: true,
  29550. onresize: true,
  29551. onscroll: true,
  29552. onsearch: true,
  29553. onseeked: true,
  29554. onseeking: true,
  29555. onselect: true,
  29556. onstalled: true,
  29557. onstorage: true,
  29558. onsubmit: true,
  29559. onsuspend: true,
  29560. ontimeupdate: true,
  29561. ontoggle: true,
  29562. ontransitionend: true,
  29563. onunhandledrejection: true,
  29564. onunload: true,
  29565. onvolumechange: true,
  29566. onwaiting: true,
  29567. onwheel: true,
  29568. open: false,
  29569. openDatabase: false,
  29570. opener: false,
  29571. Option: false,
  29572. origin: false,
  29573. OscillatorNode: false,
  29574. outerHeight: false,
  29575. outerWidth: false,
  29576. PageTransitionEvent: false,
  29577. pageXOffset: false,
  29578. pageYOffset: false,
  29579. PannerNode: false,
  29580. parent: false,
  29581. Path2D: false,
  29582. PaymentAddress: false,
  29583. PaymentRequest: false,
  29584. PaymentRequestUpdateEvent: false,
  29585. PaymentResponse: false,
  29586. performance: false,
  29587. Performance: false,
  29588. PerformanceEntry: false,
  29589. PerformanceLongTaskTiming: false,
  29590. PerformanceMark: false,
  29591. PerformanceMeasure: false,
  29592. PerformanceNavigation: false,
  29593. PerformanceNavigationTiming: false,
  29594. PerformanceObserver: false,
  29595. PerformanceObserverEntryList: false,
  29596. PerformancePaintTiming: false,
  29597. PerformanceResourceTiming: false,
  29598. PerformanceTiming: false,
  29599. PeriodicWave: false,
  29600. Permissions: false,
  29601. PermissionStatus: false,
  29602. personalbar: false,
  29603. PhotoCapabilities: false,
  29604. Plugin: false,
  29605. PluginArray: false,
  29606. PointerEvent: false,
  29607. PopStateEvent: false,
  29608. postMessage: false,
  29609. Presentation: false,
  29610. PresentationAvailability: false,
  29611. PresentationConnection: false,
  29612. PresentationConnectionAvailableEvent: false,
  29613. PresentationConnectionCloseEvent: false,
  29614. PresentationConnectionList: false,
  29615. PresentationReceiver: false,
  29616. PresentationRequest: false,
  29617. print: false,
  29618. ProcessingInstruction: false,
  29619. ProgressEvent: false,
  29620. PromiseRejectionEvent: false,
  29621. prompt: false,
  29622. PushManager: false,
  29623. PushSubscription: false,
  29624. PushSubscriptionOptions: false,
  29625. queueMicrotask: false,
  29626. RadioNodeList: false,
  29627. Range: false,
  29628. ReadableStream: false,
  29629. registerProcessor: false,
  29630. RemotePlayback: false,
  29631. removeEventListener: false,
  29632. Request: false,
  29633. requestAnimationFrame: false,
  29634. requestIdleCallback: false,
  29635. resizeBy: false,
  29636. ResizeObserver: false,
  29637. ResizeObserverEntry: false,
  29638. resizeTo: false,
  29639. Response: false,
  29640. RTCCertificate: false,
  29641. RTCDataChannel: false,
  29642. RTCDataChannelEvent: false,
  29643. RTCDtlsTransport: false,
  29644. RTCIceCandidate: false,
  29645. RTCIceGatherer: false,
  29646. RTCIceTransport: false,
  29647. RTCPeerConnection: false,
  29648. RTCPeerConnectionIceEvent: false,
  29649. RTCRtpContributingSource: false,
  29650. RTCRtpReceiver: false,
  29651. RTCRtpSender: false,
  29652. RTCSctpTransport: false,
  29653. RTCSessionDescription: false,
  29654. RTCStatsReport: false,
  29655. RTCTrackEvent: false,
  29656. screen: false,
  29657. Screen: false,
  29658. screenLeft: false,
  29659. ScreenOrientation: false,
  29660. screenTop: false,
  29661. screenX: false,
  29662. screenY: false,
  29663. ScriptProcessorNode: false,
  29664. scroll: false,
  29665. scrollbars: false,
  29666. scrollBy: false,
  29667. scrollTo: false,
  29668. scrollX: false,
  29669. scrollY: false,
  29670. SecurityPolicyViolationEvent: false,
  29671. Selection: false,
  29672. self: false,
  29673. ServiceWorker: false,
  29674. ServiceWorkerContainer: false,
  29675. ServiceWorkerRegistration: false,
  29676. sessionStorage: false,
  29677. setInterval: false,
  29678. setTimeout: false,
  29679. ShadowRoot: false,
  29680. SharedWorker: false,
  29681. SourceBuffer: false,
  29682. SourceBufferList: false,
  29683. speechSynthesis: false,
  29684. SpeechSynthesisEvent: false,
  29685. SpeechSynthesisUtterance: false,
  29686. StaticRange: false,
  29687. status: false,
  29688. statusbar: false,
  29689. StereoPannerNode: false,
  29690. stop: false,
  29691. Storage: false,
  29692. StorageEvent: false,
  29693. StorageManager: false,
  29694. styleMedia: false,
  29695. StyleSheet: false,
  29696. StyleSheetList: false,
  29697. SubtleCrypto: false,
  29698. SVGAElement: false,
  29699. SVGAngle: false,
  29700. SVGAnimatedAngle: false,
  29701. SVGAnimatedBoolean: false,
  29702. SVGAnimatedEnumeration: false,
  29703. SVGAnimatedInteger: false,
  29704. SVGAnimatedLength: false,
  29705. SVGAnimatedLengthList: false,
  29706. SVGAnimatedNumber: false,
  29707. SVGAnimatedNumberList: false,
  29708. SVGAnimatedPreserveAspectRatio: false,
  29709. SVGAnimatedRect: false,
  29710. SVGAnimatedString: false,
  29711. SVGAnimatedTransformList: false,
  29712. SVGAnimateElement: false,
  29713. SVGAnimateMotionElement: false,
  29714. SVGAnimateTransformElement: false,
  29715. SVGAnimationElement: false,
  29716. SVGCircleElement: false,
  29717. SVGClipPathElement: false,
  29718. SVGComponentTransferFunctionElement: false,
  29719. SVGDefsElement: false,
  29720. SVGDescElement: false,
  29721. SVGDiscardElement: false,
  29722. SVGElement: false,
  29723. SVGEllipseElement: false,
  29724. SVGFEBlendElement: false,
  29725. SVGFEColorMatrixElement: false,
  29726. SVGFEComponentTransferElement: false,
  29727. SVGFECompositeElement: false,
  29728. SVGFEConvolveMatrixElement: false,
  29729. SVGFEDiffuseLightingElement: false,
  29730. SVGFEDisplacementMapElement: false,
  29731. SVGFEDistantLightElement: false,
  29732. SVGFEDropShadowElement: false,
  29733. SVGFEFloodElement: false,
  29734. SVGFEFuncAElement: false,
  29735. SVGFEFuncBElement: false,
  29736. SVGFEFuncGElement: false,
  29737. SVGFEFuncRElement: false,
  29738. SVGFEGaussianBlurElement: false,
  29739. SVGFEImageElement: false,
  29740. SVGFEMergeElement: false,
  29741. SVGFEMergeNodeElement: false,
  29742. SVGFEMorphologyElement: false,
  29743. SVGFEOffsetElement: false,
  29744. SVGFEPointLightElement: false,
  29745. SVGFESpecularLightingElement: false,
  29746. SVGFESpotLightElement: false,
  29747. SVGFETileElement: false,
  29748. SVGFETurbulenceElement: false,
  29749. SVGFilterElement: false,
  29750. SVGForeignObjectElement: false,
  29751. SVGGElement: false,
  29752. SVGGeometryElement: false,
  29753. SVGGradientElement: false,
  29754. SVGGraphicsElement: false,
  29755. SVGImageElement: false,
  29756. SVGLength: false,
  29757. SVGLengthList: false,
  29758. SVGLinearGradientElement: false,
  29759. SVGLineElement: false,
  29760. SVGMarkerElement: false,
  29761. SVGMaskElement: false,
  29762. SVGMatrix: false,
  29763. SVGMetadataElement: false,
  29764. SVGMPathElement: false,
  29765. SVGNumber: false,
  29766. SVGNumberList: false,
  29767. SVGPathElement: false,
  29768. SVGPatternElement: false,
  29769. SVGPoint: false,
  29770. SVGPointList: false,
  29771. SVGPolygonElement: false,
  29772. SVGPolylineElement: false,
  29773. SVGPreserveAspectRatio: false,
  29774. SVGRadialGradientElement: false,
  29775. SVGRect: false,
  29776. SVGRectElement: false,
  29777. SVGScriptElement: false,
  29778. SVGSetElement: false,
  29779. SVGStopElement: false,
  29780. SVGStringList: false,
  29781. SVGStyleElement: false,
  29782. SVGSVGElement: false,
  29783. SVGSwitchElement: false,
  29784. SVGSymbolElement: false,
  29785. SVGTextContentElement: false,
  29786. SVGTextElement: false,
  29787. SVGTextPathElement: false,
  29788. SVGTextPositioningElement: false,
  29789. SVGTitleElement: false,
  29790. SVGTransform: false,
  29791. SVGTransformList: false,
  29792. SVGTSpanElement: false,
  29793. SVGUnitTypes: false,
  29794. SVGUseElement: false,
  29795. SVGViewElement: false,
  29796. TaskAttributionTiming: false,
  29797. Text: false,
  29798. TextDecoder: false,
  29799. TextEncoder: false,
  29800. TextEvent: false,
  29801. TextMetrics: false,
  29802. TextTrack: false,
  29803. TextTrackCue: false,
  29804. TextTrackCueList: false,
  29805. TextTrackList: false,
  29806. TimeRanges: false,
  29807. toolbar: false,
  29808. top: false,
  29809. Touch: false,
  29810. TouchEvent: false,
  29811. TouchList: false,
  29812. TrackEvent: false,
  29813. TransitionEvent: false,
  29814. TreeWalker: false,
  29815. UIEvent: false,
  29816. URL: false,
  29817. URLSearchParams: false,
  29818. ValidityState: false,
  29819. visualViewport: false,
  29820. VisualViewport: false,
  29821. VTTCue: false,
  29822. WaveShaperNode: false,
  29823. WebAssembly: false,
  29824. WebGL2RenderingContext: false,
  29825. WebGLActiveInfo: false,
  29826. WebGLBuffer: false,
  29827. WebGLContextEvent: false,
  29828. WebGLFramebuffer: false,
  29829. WebGLProgram: false,
  29830. WebGLQuery: false,
  29831. WebGLRenderbuffer: false,
  29832. WebGLRenderingContext: false,
  29833. WebGLSampler: false,
  29834. WebGLShader: false,
  29835. WebGLShaderPrecisionFormat: false,
  29836. WebGLSync: false,
  29837. WebGLTexture: false,
  29838. WebGLTransformFeedback: false,
  29839. WebGLUniformLocation: false,
  29840. WebGLVertexArrayObject: false,
  29841. WebSocket: false,
  29842. WheelEvent: false,
  29843. window: false,
  29844. Window: false,
  29845. Worker: false,
  29846. WritableStream: false,
  29847. XMLDocument: false,
  29848. XMLHttpRequest: false,
  29849. XMLHttpRequestEventTarget: false,
  29850. XMLHttpRequestUpload: false,
  29851. XMLSerializer: false,
  29852. XPathEvaluator: false,
  29853. XPathExpression: false,
  29854. XPathResult: false,
  29855. XSLTProcessor: false
  29856. },
  29857. worker: {
  29858. addEventListener: false,
  29859. applicationCache: false,
  29860. atob: false,
  29861. Blob: false,
  29862. BroadcastChannel: false,
  29863. btoa: false,
  29864. Cache: false,
  29865. caches: false,
  29866. clearInterval: false,
  29867. clearTimeout: false,
  29868. close: true,
  29869. console: false,
  29870. fetch: false,
  29871. FileReaderSync: false,
  29872. FormData: false,
  29873. Headers: false,
  29874. IDBCursor: false,
  29875. IDBCursorWithValue: false,
  29876. IDBDatabase: false,
  29877. IDBFactory: false,
  29878. IDBIndex: false,
  29879. IDBKeyRange: false,
  29880. IDBObjectStore: false,
  29881. IDBOpenDBRequest: false,
  29882. IDBRequest: false,
  29883. IDBTransaction: false,
  29884. IDBVersionChangeEvent: false,
  29885. ImageData: false,
  29886. importScripts: true,
  29887. indexedDB: false,
  29888. location: false,
  29889. MessageChannel: false,
  29890. MessagePort: false,
  29891. name: false,
  29892. navigator: false,
  29893. Notification: false,
  29894. onclose: true,
  29895. onconnect: true,
  29896. onerror: true,
  29897. onlanguagechange: true,
  29898. onmessage: true,
  29899. onoffline: true,
  29900. ononline: true,
  29901. onrejectionhandled: true,
  29902. onunhandledrejection: true,
  29903. performance: false,
  29904. Performance: false,
  29905. PerformanceEntry: false,
  29906. PerformanceMark: false,
  29907. PerformanceMeasure: false,
  29908. PerformanceNavigation: false,
  29909. PerformanceResourceTiming: false,
  29910. PerformanceTiming: false,
  29911. postMessage: true,
  29912. Promise: false,
  29913. queueMicrotask: false,
  29914. removeEventListener: false,
  29915. Request: false,
  29916. Response: false,
  29917. self: true,
  29918. ServiceWorkerRegistration: false,
  29919. setInterval: false,
  29920. setTimeout: false,
  29921. TextDecoder: false,
  29922. TextEncoder: false,
  29923. URL: false,
  29924. URLSearchParams: false,
  29925. WebSocket: false,
  29926. Worker: false,
  29927. WorkerGlobalScope: false,
  29928. XMLHttpRequest: false
  29929. },
  29930. node: {
  29931. __dirname: false,
  29932. __filename: false,
  29933. Buffer: false,
  29934. clearImmediate: false,
  29935. clearInterval: false,
  29936. clearTimeout: false,
  29937. console: false,
  29938. exports: true,
  29939. global: false,
  29940. Intl: false,
  29941. module: false,
  29942. process: false,
  29943. queueMicrotask: false,
  29944. require: false,
  29945. setImmediate: false,
  29946. setInterval: false,
  29947. setTimeout: false,
  29948. TextDecoder: false,
  29949. TextEncoder: false,
  29950. URL: false,
  29951. URLSearchParams: false
  29952. },
  29953. commonjs: {
  29954. exports: true,
  29955. global: false,
  29956. module: false,
  29957. require: false
  29958. },
  29959. amd: {
  29960. define: false,
  29961. require: false
  29962. },
  29963. mocha: {
  29964. after: false,
  29965. afterEach: false,
  29966. before: false,
  29967. beforeEach: false,
  29968. context: false,
  29969. describe: false,
  29970. it: false,
  29971. mocha: false,
  29972. run: false,
  29973. setup: false,
  29974. specify: false,
  29975. suite: false,
  29976. suiteSetup: false,
  29977. suiteTeardown: false,
  29978. teardown: false,
  29979. test: false,
  29980. xcontext: false,
  29981. xdescribe: false,
  29982. xit: false,
  29983. xspecify: false
  29984. },
  29985. jasmine: {
  29986. afterAll: false,
  29987. afterEach: false,
  29988. beforeAll: false,
  29989. beforeEach: false,
  29990. describe: false,
  29991. expect: false,
  29992. fail: false,
  29993. fdescribe: false,
  29994. fit: false,
  29995. it: false,
  29996. jasmine: false,
  29997. pending: false,
  29998. runs: false,
  29999. spyOn: false,
  30000. spyOnProperty: false,
  30001. waits: false,
  30002. waitsFor: false,
  30003. xdescribe: false,
  30004. xit: false
  30005. },
  30006. jest: {
  30007. afterAll: false,
  30008. afterEach: false,
  30009. beforeAll: false,
  30010. beforeEach: false,
  30011. describe: false,
  30012. expect: false,
  30013. fdescribe: false,
  30014. fit: false,
  30015. it: false,
  30016. jest: false,
  30017. pit: false,
  30018. require: false,
  30019. test: false,
  30020. xdescribe: false,
  30021. xit: false,
  30022. xtest: false
  30023. },
  30024. qunit: {
  30025. asyncTest: false,
  30026. deepEqual: false,
  30027. equal: false,
  30028. expect: false,
  30029. module: false,
  30030. notDeepEqual: false,
  30031. notEqual: false,
  30032. notOk: false,
  30033. notPropEqual: false,
  30034. notStrictEqual: false,
  30035. ok: false,
  30036. propEqual: false,
  30037. QUnit: false,
  30038. raises: false,
  30039. start: false,
  30040. stop: false,
  30041. strictEqual: false,
  30042. test: false,
  30043. throws: false
  30044. },
  30045. phantomjs: {
  30046. console: true,
  30047. exports: true,
  30048. phantom: true,
  30049. require: true,
  30050. WebPage: true
  30051. },
  30052. couch: {
  30053. emit: false,
  30054. exports: false,
  30055. getRow: false,
  30056. log: false,
  30057. module: false,
  30058. provides: false,
  30059. require: false,
  30060. respond: false,
  30061. send: false,
  30062. start: false,
  30063. sum: false
  30064. },
  30065. rhino: {
  30066. defineClass: false,
  30067. deserialize: false,
  30068. gc: false,
  30069. help: false,
  30070. importClass: false,
  30071. importPackage: false,
  30072. java: false,
  30073. load: false,
  30074. loadClass: false,
  30075. Packages: false,
  30076. print: false,
  30077. quit: false,
  30078. readFile: false,
  30079. readUrl: false,
  30080. runCommand: false,
  30081. seal: false,
  30082. serialize: false,
  30083. spawn: false,
  30084. sync: false,
  30085. toint32: false,
  30086. version: false
  30087. },
  30088. nashorn: {
  30089. __DIR__: false,
  30090. __FILE__: false,
  30091. __LINE__: false,
  30092. com: false,
  30093. edu: false,
  30094. exit: false,
  30095. java: false,
  30096. Java: false,
  30097. javafx: false,
  30098. JavaImporter: false,
  30099. javax: false,
  30100. JSAdapter: false,
  30101. load: false,
  30102. loadWithNewGlobal: false,
  30103. org: false,
  30104. Packages: false,
  30105. print: false,
  30106. quit: false
  30107. },
  30108. wsh: {
  30109. ActiveXObject: true,
  30110. Enumerator: true,
  30111. GetObject: true,
  30112. ScriptEngine: true,
  30113. ScriptEngineBuildVersion: true,
  30114. ScriptEngineMajorVersion: true,
  30115. ScriptEngineMinorVersion: true,
  30116. VBArray: true,
  30117. WScript: true,
  30118. WSH: true,
  30119. XDomainRequest: true
  30120. },
  30121. jquery: {
  30122. $: false,
  30123. jQuery: false
  30124. },
  30125. yui: {
  30126. YAHOO: false,
  30127. YAHOO_config: false,
  30128. YUI: false,
  30129. YUI_config: false
  30130. },
  30131. shelljs: {
  30132. cat: false,
  30133. cd: false,
  30134. chmod: false,
  30135. config: false,
  30136. cp: false,
  30137. dirs: false,
  30138. echo: false,
  30139. env: false,
  30140. error: false,
  30141. exec: false,
  30142. exit: false,
  30143. find: false,
  30144. grep: false,
  30145. ln: false,
  30146. ls: false,
  30147. mkdir: false,
  30148. mv: false,
  30149. popd: false,
  30150. pushd: false,
  30151. pwd: false,
  30152. rm: false,
  30153. sed: false,
  30154. set: false,
  30155. target: false,
  30156. tempdir: false,
  30157. test: false,
  30158. touch: false,
  30159. which: false
  30160. },
  30161. prototypejs: {
  30162. $: false,
  30163. $$: false,
  30164. $A: false,
  30165. $break: false,
  30166. $continue: false,
  30167. $F: false,
  30168. $H: false,
  30169. $R: false,
  30170. $w: false,
  30171. Abstract: false,
  30172. Ajax: false,
  30173. Autocompleter: false,
  30174. Builder: false,
  30175. Class: false,
  30176. Control: false,
  30177. Draggable: false,
  30178. Draggables: false,
  30179. Droppables: false,
  30180. Effect: false,
  30181. Element: false,
  30182. Enumerable: false,
  30183. Event: false,
  30184. Field: false,
  30185. Form: false,
  30186. Hash: false,
  30187. Insertion: false,
  30188. ObjectRange: false,
  30189. PeriodicalExecuter: false,
  30190. Position: false,
  30191. Prototype: false,
  30192. Scriptaculous: false,
  30193. Selector: false,
  30194. Sortable: false,
  30195. SortableObserver: false,
  30196. Sound: false,
  30197. Template: false,
  30198. Toggle: false,
  30199. Try: false
  30200. },
  30201. meteor: {
  30202. _: false,
  30203. $: false,
  30204. Accounts: false,
  30205. AccountsClient: false,
  30206. AccountsCommon: false,
  30207. AccountsServer: false,
  30208. App: false,
  30209. Assets: false,
  30210. Blaze: false,
  30211. check: false,
  30212. Cordova: false,
  30213. DDP: false,
  30214. DDPRateLimiter: false,
  30215. DDPServer: false,
  30216. Deps: false,
  30217. EJSON: false,
  30218. Email: false,
  30219. HTTP: false,
  30220. Log: false,
  30221. Match: false,
  30222. Meteor: false,
  30223. Mongo: false,
  30224. MongoInternals: false,
  30225. Npm: false,
  30226. Package: false,
  30227. Plugin: false,
  30228. process: false,
  30229. Random: false,
  30230. ReactiveDict: false,
  30231. ReactiveVar: false,
  30232. Router: false,
  30233. ServiceConfiguration: false,
  30234. Session: false,
  30235. share: false,
  30236. Spacebars: false,
  30237. Template: false,
  30238. Tinytest: false,
  30239. Tracker: false,
  30240. UI: false,
  30241. Utils: false,
  30242. WebApp: false,
  30243. WebAppInternals: false
  30244. },
  30245. mongo: {
  30246. _isWindows: false,
  30247. _rand: false,
  30248. BulkWriteResult: false,
  30249. cat: false,
  30250. cd: false,
  30251. connect: false,
  30252. db: false,
  30253. getHostName: false,
  30254. getMemInfo: false,
  30255. hostname: false,
  30256. ISODate: false,
  30257. listFiles: false,
  30258. load: false,
  30259. ls: false,
  30260. md5sumFile: false,
  30261. mkdir: false,
  30262. Mongo: false,
  30263. NumberInt: false,
  30264. NumberLong: false,
  30265. ObjectId: false,
  30266. PlanCache: false,
  30267. print: false,
  30268. printjson: false,
  30269. pwd: false,
  30270. quit: false,
  30271. removeFile: false,
  30272. rs: false,
  30273. sh: false,
  30274. UUID: false,
  30275. version: false,
  30276. WriteResult: false
  30277. },
  30278. applescript: {
  30279. $: false,
  30280. Application: false,
  30281. Automation: false,
  30282. console: false,
  30283. delay: false,
  30284. Library: false,
  30285. ObjC: false,
  30286. ObjectSpecifier: false,
  30287. Path: false,
  30288. Progress: false,
  30289. Ref: false
  30290. },
  30291. serviceworker: {
  30292. addEventListener: false,
  30293. applicationCache: false,
  30294. atob: false,
  30295. Blob: false,
  30296. BroadcastChannel: false,
  30297. btoa: false,
  30298. Cache: false,
  30299. caches: false,
  30300. CacheStorage: false,
  30301. clearInterval: false,
  30302. clearTimeout: false,
  30303. Client: false,
  30304. clients: false,
  30305. Clients: false,
  30306. close: true,
  30307. console: false,
  30308. ExtendableEvent: false,
  30309. ExtendableMessageEvent: false,
  30310. fetch: false,
  30311. FetchEvent: false,
  30312. FileReaderSync: false,
  30313. FormData: false,
  30314. Headers: false,
  30315. IDBCursor: false,
  30316. IDBCursorWithValue: false,
  30317. IDBDatabase: false,
  30318. IDBFactory: false,
  30319. IDBIndex: false,
  30320. IDBKeyRange: false,
  30321. IDBObjectStore: false,
  30322. IDBOpenDBRequest: false,
  30323. IDBRequest: false,
  30324. IDBTransaction: false,
  30325. IDBVersionChangeEvent: false,
  30326. ImageData: false,
  30327. importScripts: false,
  30328. indexedDB: false,
  30329. location: false,
  30330. MessageChannel: false,
  30331. MessagePort: false,
  30332. name: false,
  30333. navigator: false,
  30334. Notification: false,
  30335. onclose: true,
  30336. onconnect: true,
  30337. onerror: true,
  30338. onfetch: true,
  30339. oninstall: true,
  30340. onlanguagechange: true,
  30341. onmessage: true,
  30342. onmessageerror: true,
  30343. onnotificationclick: true,
  30344. onnotificationclose: true,
  30345. onoffline: true,
  30346. ononline: true,
  30347. onpush: true,
  30348. onpushsubscriptionchange: true,
  30349. onrejectionhandled: true,
  30350. onsync: true,
  30351. onunhandledrejection: true,
  30352. performance: false,
  30353. Performance: false,
  30354. PerformanceEntry: false,
  30355. PerformanceMark: false,
  30356. PerformanceMeasure: false,
  30357. PerformanceNavigation: false,
  30358. PerformanceResourceTiming: false,
  30359. PerformanceTiming: false,
  30360. postMessage: true,
  30361. Promise: false,
  30362. queueMicrotask: false,
  30363. registration: false,
  30364. removeEventListener: false,
  30365. Request: false,
  30366. Response: false,
  30367. self: false,
  30368. ServiceWorker: false,
  30369. ServiceWorkerContainer: false,
  30370. ServiceWorkerGlobalScope: false,
  30371. ServiceWorkerMessageEvent: false,
  30372. ServiceWorkerRegistration: false,
  30373. setInterval: false,
  30374. setTimeout: false,
  30375. skipWaiting: false,
  30376. TextDecoder: false,
  30377. TextEncoder: false,
  30378. URL: false,
  30379. URLSearchParams: false,
  30380. WebSocket: false,
  30381. WindowClient: false,
  30382. Worker: false,
  30383. WorkerGlobalScope: false,
  30384. XMLHttpRequest: false
  30385. },
  30386. atomtest: {
  30387. advanceClock: false,
  30388. fakeClearInterval: false,
  30389. fakeClearTimeout: false,
  30390. fakeSetInterval: false,
  30391. fakeSetTimeout: false,
  30392. resetTimeouts: false,
  30393. waitsForPromise: false
  30394. },
  30395. embertest: {
  30396. andThen: false,
  30397. click: false,
  30398. currentPath: false,
  30399. currentRouteName: false,
  30400. currentURL: false,
  30401. fillIn: false,
  30402. find: false,
  30403. findAll: false,
  30404. findWithAssert: false,
  30405. keyEvent: false,
  30406. pauseTest: false,
  30407. resumeTest: false,
  30408. triggerEvent: false,
  30409. visit: false,
  30410. wait: false
  30411. },
  30412. protractor: {
  30413. $: false,
  30414. $$: false,
  30415. browser: false,
  30416. by: false,
  30417. By: false,
  30418. DartObject: false,
  30419. element: false,
  30420. protractor: false
  30421. },
  30422. "shared-node-browser": {
  30423. clearInterval: false,
  30424. clearTimeout: false,
  30425. console: false,
  30426. setInterval: false,
  30427. setTimeout: false,
  30428. URL: false,
  30429. URLSearchParams: false
  30430. },
  30431. webextensions: {
  30432. browser: false,
  30433. chrome: false,
  30434. opr: false
  30435. },
  30436. greasemonkey: {
  30437. cloneInto: false,
  30438. createObjectIn: false,
  30439. exportFunction: false,
  30440. GM: false,
  30441. GM_addStyle: false,
  30442. GM_deleteValue: false,
  30443. GM_getResourceText: false,
  30444. GM_getResourceURL: false,
  30445. GM_getValue: false,
  30446. GM_info: false,
  30447. GM_listValues: false,
  30448. GM_log: false,
  30449. GM_openInTab: false,
  30450. GM_registerMenuCommand: false,
  30451. GM_setClipboard: false,
  30452. GM_setValue: false,
  30453. GM_xmlhttpRequest: false,
  30454. unsafeWindow: false
  30455. },
  30456. devtools: {
  30457. $: false,
  30458. $_: false,
  30459. $$: false,
  30460. $0: false,
  30461. $1: false,
  30462. $2: false,
  30463. $3: false,
  30464. $4: false,
  30465. $x: false,
  30466. chrome: false,
  30467. clear: false,
  30468. copy: false,
  30469. debug: false,
  30470. dir: false,
  30471. dirxml: false,
  30472. getEventListeners: false,
  30473. inspect: false,
  30474. keys: false,
  30475. monitor: false,
  30476. monitorEvents: false,
  30477. profile: false,
  30478. profileEnd: false,
  30479. queryObjects: false,
  30480. table: false,
  30481. undebug: false,
  30482. unmonitor: false,
  30483. unmonitorEvents: false,
  30484. values: false
  30485. }
  30486. };
  30487. }
  30488. });
  30489. // node_modules/globals/index.js
  30490. var require_globals2 = __commonJS({
  30491. "node_modules/globals/index.js"(exports, module2) {
  30492. "use strict";
  30493. module2.exports = require_globals();
  30494. }
  30495. });
  30496. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/cache.js
  30497. var require_cache = __commonJS({
  30498. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/cache.js"(exports) {
  30499. "use strict";
  30500. Object.defineProperty(exports, "__esModule", {
  30501. value: true
  30502. });
  30503. exports.clear = clear;
  30504. exports.clearPath = clearPath;
  30505. exports.clearScope = clearScope;
  30506. exports.scope = exports.path = void 0;
  30507. var path = /* @__PURE__ */ new WeakMap();
  30508. exports.path = path;
  30509. var scope = /* @__PURE__ */ new WeakMap();
  30510. exports.scope = scope;
  30511. function clear() {
  30512. clearPath();
  30513. clearScope();
  30514. }
  30515. function clearPath() {
  30516. exports.path = path = /* @__PURE__ */ new WeakMap();
  30517. }
  30518. function clearScope() {
  30519. exports.scope = scope = /* @__PURE__ */ new WeakMap();
  30520. }
  30521. }
  30522. });
  30523. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/index.js
  30524. var require_scope = __commonJS({
  30525. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/scope/index.js"(exports) {
  30526. "use strict";
  30527. Object.defineProperty(exports, "__esModule", {
  30528. value: true
  30529. });
  30530. exports.default = void 0;
  30531. var _renamer = require_renamer();
  30532. var _index = require_lib14();
  30533. var _binding = require_binding();
  30534. var _globals = require_globals2();
  30535. var t2 = require_lib4();
  30536. var _cache = require_cache();
  30537. function gatherNodeParts(node, parts) {
  30538. switch (node == null ? void 0 : node.type) {
  30539. default:
  30540. if (t2.isModuleDeclaration(node)) {
  30541. if ((t2.isExportAllDeclaration(node) || t2.isExportNamedDeclaration(node) || t2.isImportDeclaration(node)) && node.source) {
  30542. gatherNodeParts(node.source, parts);
  30543. } else if ((t2.isExportNamedDeclaration(node) || t2.isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {
  30544. for (const e of node.specifiers)
  30545. gatherNodeParts(e, parts);
  30546. } else if ((t2.isExportDefaultDeclaration(node) || t2.isExportNamedDeclaration(node)) && node.declaration) {
  30547. gatherNodeParts(node.declaration, parts);
  30548. }
  30549. } else if (t2.isModuleSpecifier(node)) {
  30550. gatherNodeParts(node.local, parts);
  30551. } else if (t2.isLiteral(node)) {
  30552. parts.push(node.value);
  30553. }
  30554. break;
  30555. case "MemberExpression":
  30556. case "OptionalMemberExpression":
  30557. case "JSXMemberExpression":
  30558. gatherNodeParts(node.object, parts);
  30559. gatherNodeParts(node.property, parts);
  30560. break;
  30561. case "Identifier":
  30562. case "JSXIdentifier":
  30563. parts.push(node.name);
  30564. break;
  30565. case "CallExpression":
  30566. case "OptionalCallExpression":
  30567. case "NewExpression":
  30568. gatherNodeParts(node.callee, parts);
  30569. break;
  30570. case "ObjectExpression":
  30571. case "ObjectPattern":
  30572. for (const e of node.properties) {
  30573. gatherNodeParts(e, parts);
  30574. }
  30575. break;
  30576. case "SpreadElement":
  30577. case "RestElement":
  30578. gatherNodeParts(node.argument, parts);
  30579. break;
  30580. case "ObjectProperty":
  30581. case "ObjectMethod":
  30582. case "ClassProperty":
  30583. case "ClassMethod":
  30584. case "ClassPrivateProperty":
  30585. case "ClassPrivateMethod":
  30586. gatherNodeParts(node.key, parts);
  30587. break;
  30588. case "ThisExpression":
  30589. parts.push("this");
  30590. break;
  30591. case "Super":
  30592. parts.push("super");
  30593. break;
  30594. case "Import":
  30595. parts.push("import");
  30596. break;
  30597. case "DoExpression":
  30598. parts.push("do");
  30599. break;
  30600. case "YieldExpression":
  30601. parts.push("yield");
  30602. gatherNodeParts(node.argument, parts);
  30603. break;
  30604. case "AwaitExpression":
  30605. parts.push("await");
  30606. gatherNodeParts(node.argument, parts);
  30607. break;
  30608. case "AssignmentExpression":
  30609. gatherNodeParts(node.left, parts);
  30610. break;
  30611. case "VariableDeclarator":
  30612. gatherNodeParts(node.id, parts);
  30613. break;
  30614. case "FunctionExpression":
  30615. case "FunctionDeclaration":
  30616. case "ClassExpression":
  30617. case "ClassDeclaration":
  30618. gatherNodeParts(node.id, parts);
  30619. break;
  30620. case "PrivateName":
  30621. gatherNodeParts(node.id, parts);
  30622. break;
  30623. case "ParenthesizedExpression":
  30624. gatherNodeParts(node.expression, parts);
  30625. break;
  30626. case "UnaryExpression":
  30627. case "UpdateExpression":
  30628. gatherNodeParts(node.argument, parts);
  30629. break;
  30630. case "MetaProperty":
  30631. gatherNodeParts(node.meta, parts);
  30632. gatherNodeParts(node.property, parts);
  30633. break;
  30634. case "JSXElement":
  30635. gatherNodeParts(node.openingElement, parts);
  30636. break;
  30637. case "JSXOpeningElement":
  30638. parts.push(node.name);
  30639. break;
  30640. case "JSXFragment":
  30641. gatherNodeParts(node.openingFragment, parts);
  30642. break;
  30643. case "JSXOpeningFragment":
  30644. parts.push("Fragment");
  30645. break;
  30646. case "JSXNamespacedName":
  30647. gatherNodeParts(node.namespace, parts);
  30648. gatherNodeParts(node.name, parts);
  30649. break;
  30650. }
  30651. }
  30652. var collectorVisitor = {
  30653. For(path) {
  30654. for (const key of t2.FOR_INIT_KEYS) {
  30655. const declar = path.get(key);
  30656. if (declar.isVar()) {
  30657. const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
  30658. parentScope.registerBinding("var", declar);
  30659. }
  30660. }
  30661. },
  30662. Declaration(path) {
  30663. if (path.isBlockScoped())
  30664. return;
  30665. if (path.isExportDeclaration())
  30666. return;
  30667. const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
  30668. parent.registerDeclaration(path);
  30669. },
  30670. ReferencedIdentifier(path, state) {
  30671. state.references.push(path);
  30672. },
  30673. ForXStatement(path, state) {
  30674. const left = path.get("left");
  30675. if (left.isPattern() || left.isIdentifier()) {
  30676. state.constantViolations.push(path);
  30677. }
  30678. },
  30679. ExportDeclaration: {
  30680. exit(path) {
  30681. const {
  30682. node,
  30683. scope
  30684. } = path;
  30685. if (t2.isExportAllDeclaration(node))
  30686. return;
  30687. const declar = node.declaration;
  30688. if (t2.isClassDeclaration(declar) || t2.isFunctionDeclaration(declar)) {
  30689. const id = declar.id;
  30690. if (!id)
  30691. return;
  30692. const binding = scope.getBinding(id.name);
  30693. if (binding)
  30694. binding.reference(path);
  30695. } else if (t2.isVariableDeclaration(declar)) {
  30696. for (const decl of declar.declarations) {
  30697. for (const name2 of Object.keys(t2.getBindingIdentifiers(decl))) {
  30698. const binding = scope.getBinding(name2);
  30699. if (binding)
  30700. binding.reference(path);
  30701. }
  30702. }
  30703. }
  30704. }
  30705. },
  30706. LabeledStatement(path) {
  30707. path.scope.getBlockParent().registerDeclaration(path);
  30708. },
  30709. AssignmentExpression(path, state) {
  30710. state.assignments.push(path);
  30711. },
  30712. UpdateExpression(path, state) {
  30713. state.constantViolations.push(path);
  30714. },
  30715. UnaryExpression(path, state) {
  30716. if (path.node.operator === "delete") {
  30717. state.constantViolations.push(path);
  30718. }
  30719. },
  30720. BlockScoped(path) {
  30721. let scope = path.scope;
  30722. if (scope.path === path)
  30723. scope = scope.parent;
  30724. const parent = scope.getBlockParent();
  30725. parent.registerDeclaration(path);
  30726. if (path.isClassDeclaration() && path.node.id) {
  30727. const id = path.node.id;
  30728. const name2 = id.name;
  30729. path.scope.bindings[name2] = path.scope.parent.getBinding(name2);
  30730. }
  30731. },
  30732. CatchClause(path) {
  30733. path.scope.registerBinding("let", path);
  30734. },
  30735. Function(path) {
  30736. if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[t2.NOT_LOCAL_BINDING]) {
  30737. path.scope.registerBinding("local", path.get("id"), path);
  30738. }
  30739. const params = path.get("params");
  30740. for (const param of params) {
  30741. path.scope.registerBinding("param", param);
  30742. }
  30743. },
  30744. ClassExpression(path) {
  30745. if (path.has("id") && !path.get("id").node[t2.NOT_LOCAL_BINDING]) {
  30746. path.scope.registerBinding("local", path);
  30747. }
  30748. }
  30749. };
  30750. var uid = 0;
  30751. var Scope4 = class {
  30752. constructor(path) {
  30753. this.uid = void 0;
  30754. this.path = void 0;
  30755. this.block = void 0;
  30756. this.labels = void 0;
  30757. this.inited = void 0;
  30758. this.bindings = void 0;
  30759. this.references = void 0;
  30760. this.globals = void 0;
  30761. this.uids = void 0;
  30762. this.data = void 0;
  30763. this.crawling = void 0;
  30764. const {
  30765. node
  30766. } = path;
  30767. const cached = _cache.scope.get(node);
  30768. if ((cached == null ? void 0 : cached.path) === path) {
  30769. return cached;
  30770. }
  30771. _cache.scope.set(node, this);
  30772. this.uid = uid++;
  30773. this.block = node;
  30774. this.path = path;
  30775. this.labels = /* @__PURE__ */ new Map();
  30776. this.inited = false;
  30777. }
  30778. get parent() {
  30779. var _parent;
  30780. let parent, path = this.path;
  30781. do {
  30782. const isKey = path.key === "key";
  30783. path = path.parentPath;
  30784. if (isKey && path.isMethod())
  30785. path = path.parentPath;
  30786. if (path && path.isScope())
  30787. parent = path;
  30788. } while (path && !parent);
  30789. return (_parent = parent) == null ? void 0 : _parent.scope;
  30790. }
  30791. get parentBlock() {
  30792. return this.path.parent;
  30793. }
  30794. get hub() {
  30795. return this.path.hub;
  30796. }
  30797. traverse(node, opts, state) {
  30798. (0, _index.default)(node, opts, this, state, this.path);
  30799. }
  30800. generateDeclaredUidIdentifier(name2) {
  30801. const id = this.generateUidIdentifier(name2);
  30802. this.push({
  30803. id
  30804. });
  30805. return t2.cloneNode(id);
  30806. }
  30807. generateUidIdentifier(name2) {
  30808. return t2.identifier(this.generateUid(name2));
  30809. }
  30810. generateUid(name2 = "temp") {
  30811. name2 = t2.toIdentifier(name2).replace(/^_+/, "").replace(/[0-9]+$/g, "");
  30812. let uid2;
  30813. let i = 1;
  30814. do {
  30815. uid2 = this._generateUid(name2, i);
  30816. i++;
  30817. } while (this.hasLabel(uid2) || this.hasBinding(uid2) || this.hasGlobal(uid2) || this.hasReference(uid2));
  30818. const program = this.getProgramParent();
  30819. program.references[uid2] = true;
  30820. program.uids[uid2] = true;
  30821. return uid2;
  30822. }
  30823. _generateUid(name2, i) {
  30824. let id = name2;
  30825. if (i > 1)
  30826. id += i;
  30827. return `_${id}`;
  30828. }
  30829. generateUidBasedOnNode(node, defaultName) {
  30830. const parts = [];
  30831. gatherNodeParts(node, parts);
  30832. let id = parts.join("$");
  30833. id = id.replace(/^_/, "") || defaultName || "ref";
  30834. return this.generateUid(id.slice(0, 20));
  30835. }
  30836. generateUidIdentifierBasedOnNode(node, defaultName) {
  30837. return t2.identifier(this.generateUidBasedOnNode(node, defaultName));
  30838. }
  30839. isStatic(node) {
  30840. if (t2.isThisExpression(node) || t2.isSuper(node)) {
  30841. return true;
  30842. }
  30843. if (t2.isIdentifier(node)) {
  30844. const binding = this.getBinding(node.name);
  30845. if (binding) {
  30846. return binding.constant;
  30847. } else {
  30848. return this.hasBinding(node.name);
  30849. }
  30850. }
  30851. return false;
  30852. }
  30853. maybeGenerateMemoised(node, dontPush) {
  30854. if (this.isStatic(node)) {
  30855. return null;
  30856. } else {
  30857. const id = this.generateUidIdentifierBasedOnNode(node);
  30858. if (!dontPush) {
  30859. this.push({
  30860. id
  30861. });
  30862. return t2.cloneNode(id);
  30863. }
  30864. return id;
  30865. }
  30866. }
  30867. checkBlockScopedCollisions(local, kind, name2, id) {
  30868. if (kind === "param")
  30869. return;
  30870. if (local.kind === "local")
  30871. return;
  30872. const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
  30873. if (duplicate) {
  30874. throw this.hub.buildError(id, `Duplicate declaration "${name2}"`, TypeError);
  30875. }
  30876. }
  30877. rename(oldName, newName, block) {
  30878. const binding = this.getBinding(oldName);
  30879. if (binding) {
  30880. newName = newName || this.generateUidIdentifier(oldName).name;
  30881. return new _renamer.default(binding, oldName, newName).rename(block);
  30882. }
  30883. }
  30884. _renameFromMap(map, oldName, newName, value) {
  30885. if (map[oldName]) {
  30886. map[newName] = value;
  30887. map[oldName] = null;
  30888. }
  30889. }
  30890. dump() {
  30891. const sep = "-".repeat(60);
  30892. console.log(sep);
  30893. let scope = this;
  30894. do {
  30895. console.log("#", scope.block.type);
  30896. for (const name2 of Object.keys(scope.bindings)) {
  30897. const binding = scope.bindings[name2];
  30898. console.log(" -", name2, {
  30899. constant: binding.constant,
  30900. references: binding.references,
  30901. violations: binding.constantViolations.length,
  30902. kind: binding.kind
  30903. });
  30904. }
  30905. } while (scope = scope.parent);
  30906. console.log(sep);
  30907. }
  30908. toArray(node, i, arrayLikeIsIterable) {
  30909. if (t2.isIdentifier(node)) {
  30910. const binding = this.getBinding(node.name);
  30911. if (binding != null && binding.constant && binding.path.isGenericType("Array")) {
  30912. return node;
  30913. }
  30914. }
  30915. if (t2.isArrayExpression(node)) {
  30916. return node;
  30917. }
  30918. if (t2.isIdentifier(node, {
  30919. name: "arguments"
  30920. })) {
  30921. return t2.callExpression(t2.memberExpression(t2.memberExpression(t2.memberExpression(t2.identifier("Array"), t2.identifier("prototype")), t2.identifier("slice")), t2.identifier("call")), [node]);
  30922. }
  30923. let helperName;
  30924. const args = [node];
  30925. if (i === true) {
  30926. helperName = "toConsumableArray";
  30927. } else if (i) {
  30928. args.push(t2.numericLiteral(i));
  30929. helperName = "slicedToArray";
  30930. } else {
  30931. helperName = "toArray";
  30932. }
  30933. if (arrayLikeIsIterable) {
  30934. args.unshift(this.hub.addHelper(helperName));
  30935. helperName = "maybeArrayLike";
  30936. }
  30937. return t2.callExpression(this.hub.addHelper(helperName), args);
  30938. }
  30939. hasLabel(name2) {
  30940. return !!this.getLabel(name2);
  30941. }
  30942. getLabel(name2) {
  30943. return this.labels.get(name2);
  30944. }
  30945. registerLabel(path) {
  30946. this.labels.set(path.node.label.name, path);
  30947. }
  30948. registerDeclaration(path) {
  30949. if (path.isLabeledStatement()) {
  30950. this.registerLabel(path);
  30951. } else if (path.isFunctionDeclaration()) {
  30952. this.registerBinding("hoisted", path.get("id"), path);
  30953. } else if (path.isVariableDeclaration()) {
  30954. const declarations = path.get("declarations");
  30955. for (const declar of declarations) {
  30956. this.registerBinding(path.node.kind, declar);
  30957. }
  30958. } else if (path.isClassDeclaration()) {
  30959. this.registerBinding("let", path);
  30960. } else if (path.isImportDeclaration()) {
  30961. const specifiers = path.get("specifiers");
  30962. for (const specifier of specifiers) {
  30963. this.registerBinding("module", specifier);
  30964. }
  30965. } else if (path.isExportDeclaration()) {
  30966. const declar = path.get("declaration");
  30967. if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
  30968. this.registerDeclaration(declar);
  30969. }
  30970. } else {
  30971. this.registerBinding("unknown", path);
  30972. }
  30973. }
  30974. buildUndefinedNode() {
  30975. return t2.unaryExpression("void", t2.numericLiteral(0), true);
  30976. }
  30977. registerConstantViolation(path) {
  30978. const ids = path.getBindingIdentifiers();
  30979. for (const name2 of Object.keys(ids)) {
  30980. const binding = this.getBinding(name2);
  30981. if (binding)
  30982. binding.reassign(path);
  30983. }
  30984. }
  30985. registerBinding(kind, path, bindingPath = path) {
  30986. if (!kind)
  30987. throw new ReferenceError("no `kind`");
  30988. if (path.isVariableDeclaration()) {
  30989. const declarators = path.get("declarations");
  30990. for (const declar of declarators) {
  30991. this.registerBinding(kind, declar);
  30992. }
  30993. return;
  30994. }
  30995. const parent = this.getProgramParent();
  30996. const ids = path.getOuterBindingIdentifiers(true);
  30997. for (const name2 of Object.keys(ids)) {
  30998. parent.references[name2] = true;
  30999. for (const id of ids[name2]) {
  31000. const local = this.getOwnBinding(name2);
  31001. if (local) {
  31002. if (local.identifier === id)
  31003. continue;
  31004. this.checkBlockScopedCollisions(local, kind, name2, id);
  31005. }
  31006. if (local) {
  31007. this.registerConstantViolation(bindingPath);
  31008. } else {
  31009. this.bindings[name2] = new _binding.default({
  31010. identifier: id,
  31011. scope: this,
  31012. path: bindingPath,
  31013. kind
  31014. });
  31015. }
  31016. }
  31017. }
  31018. }
  31019. addGlobal(node) {
  31020. this.globals[node.name] = node;
  31021. }
  31022. hasUid(name2) {
  31023. let scope = this;
  31024. do {
  31025. if (scope.uids[name2])
  31026. return true;
  31027. } while (scope = scope.parent);
  31028. return false;
  31029. }
  31030. hasGlobal(name2) {
  31031. let scope = this;
  31032. do {
  31033. if (scope.globals[name2])
  31034. return true;
  31035. } while (scope = scope.parent);
  31036. return false;
  31037. }
  31038. hasReference(name2) {
  31039. return !!this.getProgramParent().references[name2];
  31040. }
  31041. isPure(node, constantsOnly) {
  31042. if (t2.isIdentifier(node)) {
  31043. const binding = this.getBinding(node.name);
  31044. if (!binding)
  31045. return false;
  31046. if (constantsOnly)
  31047. return binding.constant;
  31048. return true;
  31049. } else if (t2.isClass(node)) {
  31050. if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
  31051. return false;
  31052. }
  31053. return this.isPure(node.body, constantsOnly);
  31054. } else if (t2.isClassBody(node)) {
  31055. for (const method of node.body) {
  31056. if (!this.isPure(method, constantsOnly))
  31057. return false;
  31058. }
  31059. return true;
  31060. } else if (t2.isBinary(node)) {
  31061. return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
  31062. } else if (t2.isArrayExpression(node)) {
  31063. for (const elem of node.elements) {
  31064. if (!this.isPure(elem, constantsOnly))
  31065. return false;
  31066. }
  31067. return true;
  31068. } else if (t2.isObjectExpression(node)) {
  31069. for (const prop of node.properties) {
  31070. if (!this.isPure(prop, constantsOnly))
  31071. return false;
  31072. }
  31073. return true;
  31074. } else if (t2.isMethod(node)) {
  31075. if (node.computed && !this.isPure(node.key, constantsOnly))
  31076. return false;
  31077. if (node.kind === "get" || node.kind === "set")
  31078. return false;
  31079. return true;
  31080. } else if (t2.isProperty(node)) {
  31081. if (node.computed && !this.isPure(node.key, constantsOnly))
  31082. return false;
  31083. return this.isPure(node.value, constantsOnly);
  31084. } else if (t2.isUnaryExpression(node)) {
  31085. return this.isPure(node.argument, constantsOnly);
  31086. } else if (t2.isTaggedTemplateExpression(node)) {
  31087. return t2.matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
  31088. } else if (t2.isTemplateLiteral(node)) {
  31089. for (const expression of node.expressions) {
  31090. if (!this.isPure(expression, constantsOnly))
  31091. return false;
  31092. }
  31093. return true;
  31094. } else {
  31095. return t2.isPureish(node);
  31096. }
  31097. }
  31098. setData(key, val) {
  31099. return this.data[key] = val;
  31100. }
  31101. getData(key) {
  31102. let scope = this;
  31103. do {
  31104. const data2 = scope.data[key];
  31105. if (data2 != null)
  31106. return data2;
  31107. } while (scope = scope.parent);
  31108. }
  31109. removeData(key) {
  31110. let scope = this;
  31111. do {
  31112. const data2 = scope.data[key];
  31113. if (data2 != null)
  31114. scope.data[key] = null;
  31115. } while (scope = scope.parent);
  31116. }
  31117. init() {
  31118. if (!this.inited) {
  31119. this.inited = true;
  31120. this.crawl();
  31121. }
  31122. }
  31123. crawl() {
  31124. const path = this.path;
  31125. this.references = /* @__PURE__ */ Object.create(null);
  31126. this.bindings = /* @__PURE__ */ Object.create(null);
  31127. this.globals = /* @__PURE__ */ Object.create(null);
  31128. this.uids = /* @__PURE__ */ Object.create(null);
  31129. this.data = /* @__PURE__ */ Object.create(null);
  31130. const programParent = this.getProgramParent();
  31131. if (programParent.crawling)
  31132. return;
  31133. const state = {
  31134. references: [],
  31135. constantViolations: [],
  31136. assignments: []
  31137. };
  31138. this.crawling = true;
  31139. if (path.type !== "Program" && collectorVisitor._exploded) {
  31140. for (const visit4 of collectorVisitor.enter) {
  31141. visit4(path, state);
  31142. }
  31143. const typeVisitors = collectorVisitor[path.type];
  31144. if (typeVisitors) {
  31145. for (const visit4 of typeVisitors.enter) {
  31146. visit4(path, state);
  31147. }
  31148. }
  31149. }
  31150. path.traverse(collectorVisitor, state);
  31151. this.crawling = false;
  31152. for (const path2 of state.assignments) {
  31153. const ids = path2.getBindingIdentifiers();
  31154. for (const name2 of Object.keys(ids)) {
  31155. if (path2.scope.getBinding(name2))
  31156. continue;
  31157. programParent.addGlobal(ids[name2]);
  31158. }
  31159. path2.scope.registerConstantViolation(path2);
  31160. }
  31161. for (const ref2 of state.references) {
  31162. const binding = ref2.scope.getBinding(ref2.node.name);
  31163. if (binding) {
  31164. binding.reference(ref2);
  31165. } else {
  31166. programParent.addGlobal(ref2.node);
  31167. }
  31168. }
  31169. for (const path2 of state.constantViolations) {
  31170. path2.scope.registerConstantViolation(path2);
  31171. }
  31172. }
  31173. push(opts) {
  31174. let path = this.path;
  31175. if (!path.isBlockStatement() && !path.isProgram()) {
  31176. path = this.getBlockParent().path;
  31177. }
  31178. if (path.isSwitchStatement()) {
  31179. path = (this.getFunctionParent() || this.getProgramParent()).path;
  31180. }
  31181. if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
  31182. path.ensureBlock();
  31183. path = path.get("body");
  31184. }
  31185. const unique = opts.unique;
  31186. const kind = opts.kind || "var";
  31187. const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
  31188. const dataKey = `declaration:${kind}:${blockHoist}`;
  31189. let declarPath = !unique && path.getData(dataKey);
  31190. if (!declarPath) {
  31191. const declar = t2.variableDeclaration(kind, []);
  31192. declar._blockHoist = blockHoist;
  31193. [declarPath] = path.unshiftContainer("body", [declar]);
  31194. if (!unique)
  31195. path.setData(dataKey, declarPath);
  31196. }
  31197. const declarator = t2.variableDeclarator(opts.id, opts.init);
  31198. declarPath.node.declarations.push(declarator);
  31199. this.registerBinding(kind, declarPath.get("declarations").pop());
  31200. }
  31201. getProgramParent() {
  31202. let scope = this;
  31203. do {
  31204. if (scope.path.isProgram()) {
  31205. return scope;
  31206. }
  31207. } while (scope = scope.parent);
  31208. throw new Error("Couldn't find a Program");
  31209. }
  31210. getFunctionParent() {
  31211. let scope = this;
  31212. do {
  31213. if (scope.path.isFunctionParent()) {
  31214. return scope;
  31215. }
  31216. } while (scope = scope.parent);
  31217. return null;
  31218. }
  31219. getBlockParent() {
  31220. let scope = this;
  31221. do {
  31222. if (scope.path.isBlockParent()) {
  31223. return scope;
  31224. }
  31225. } while (scope = scope.parent);
  31226. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  31227. }
  31228. getAllBindings() {
  31229. const ids = /* @__PURE__ */ Object.create(null);
  31230. let scope = this;
  31231. do {
  31232. for (const key of Object.keys(scope.bindings)) {
  31233. if (key in ids === false) {
  31234. ids[key] = scope.bindings[key];
  31235. }
  31236. }
  31237. scope = scope.parent;
  31238. } while (scope);
  31239. return ids;
  31240. }
  31241. getAllBindingsOfKind(...kinds) {
  31242. const ids = /* @__PURE__ */ Object.create(null);
  31243. for (const kind of kinds) {
  31244. let scope = this;
  31245. do {
  31246. for (const name2 of Object.keys(scope.bindings)) {
  31247. const binding = scope.bindings[name2];
  31248. if (binding.kind === kind)
  31249. ids[name2] = binding;
  31250. }
  31251. scope = scope.parent;
  31252. } while (scope);
  31253. }
  31254. return ids;
  31255. }
  31256. bindingIdentifierEquals(name2, node) {
  31257. return this.getBindingIdentifier(name2) === node;
  31258. }
  31259. getBinding(name2) {
  31260. let scope = this;
  31261. let previousPath;
  31262. do {
  31263. const binding = scope.getOwnBinding(name2);
  31264. if (binding) {
  31265. var _previousPath;
  31266. if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param") {
  31267. } else {
  31268. return binding;
  31269. }
  31270. }
  31271. previousPath = scope.path;
  31272. } while (scope = scope.parent);
  31273. }
  31274. getOwnBinding(name2) {
  31275. return this.bindings[name2];
  31276. }
  31277. getBindingIdentifier(name2) {
  31278. var _this$getBinding;
  31279. return (_this$getBinding = this.getBinding(name2)) == null ? void 0 : _this$getBinding.identifier;
  31280. }
  31281. getOwnBindingIdentifier(name2) {
  31282. const binding = this.bindings[name2];
  31283. return binding == null ? void 0 : binding.identifier;
  31284. }
  31285. hasOwnBinding(name2) {
  31286. return !!this.getOwnBinding(name2);
  31287. }
  31288. hasBinding(name2, noGlobals) {
  31289. if (!name2)
  31290. return false;
  31291. if (this.hasOwnBinding(name2))
  31292. return true;
  31293. if (this.parentHasBinding(name2, noGlobals))
  31294. return true;
  31295. if (this.hasUid(name2))
  31296. return true;
  31297. if (!noGlobals && Scope4.globals.includes(name2))
  31298. return true;
  31299. if (!noGlobals && Scope4.contextVariables.includes(name2))
  31300. return true;
  31301. return false;
  31302. }
  31303. parentHasBinding(name2, noGlobals) {
  31304. var _this$parent;
  31305. return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name2, noGlobals);
  31306. }
  31307. moveBindingTo(name2, scope) {
  31308. const info = this.getBinding(name2);
  31309. if (info) {
  31310. info.scope.removeOwnBinding(name2);
  31311. info.scope = scope;
  31312. scope.bindings[name2] = info;
  31313. }
  31314. }
  31315. removeOwnBinding(name2) {
  31316. delete this.bindings[name2];
  31317. }
  31318. removeBinding(name2) {
  31319. var _this$getBinding2;
  31320. (_this$getBinding2 = this.getBinding(name2)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name2);
  31321. let scope = this;
  31322. do {
  31323. if (scope.uids[name2]) {
  31324. scope.uids[name2] = false;
  31325. }
  31326. } while (scope = scope.parent);
  31327. }
  31328. };
  31329. exports.default = Scope4;
  31330. Scope4.globals = Object.keys(_globals.builtin);
  31331. Scope4.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
  31332. }
  31333. });
  31334. // node_modules/source-map/lib/base64.js
  31335. var require_base64 = __commonJS({
  31336. "node_modules/source-map/lib/base64.js"(exports) {
  31337. var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
  31338. exports.encode = function(number2) {
  31339. if (0 <= number2 && number2 < intToCharMap.length) {
  31340. return intToCharMap[number2];
  31341. }
  31342. throw new TypeError("Must be between 0 and 63: " + number2);
  31343. };
  31344. exports.decode = function(charCode) {
  31345. var bigA = 65;
  31346. var bigZ = 90;
  31347. var littleA = 97;
  31348. var littleZ = 122;
  31349. var zero = 48;
  31350. var nine = 57;
  31351. var plus = 43;
  31352. var slash = 47;
  31353. var littleOffset = 26;
  31354. var numberOffset = 52;
  31355. if (bigA <= charCode && charCode <= bigZ) {
  31356. return charCode - bigA;
  31357. }
  31358. if (littleA <= charCode && charCode <= littleZ) {
  31359. return charCode - littleA + littleOffset;
  31360. }
  31361. if (zero <= charCode && charCode <= nine) {
  31362. return charCode - zero + numberOffset;
  31363. }
  31364. if (charCode == plus) {
  31365. return 62;
  31366. }
  31367. if (charCode == slash) {
  31368. return 63;
  31369. }
  31370. return -1;
  31371. };
  31372. }
  31373. });
  31374. // node_modules/source-map/lib/base64-vlq.js
  31375. var require_base64_vlq = __commonJS({
  31376. "node_modules/source-map/lib/base64-vlq.js"(exports) {
  31377. var base64 = require_base64();
  31378. var VLQ_BASE_SHIFT = 5;
  31379. var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  31380. var VLQ_BASE_MASK = VLQ_BASE - 1;
  31381. var VLQ_CONTINUATION_BIT = VLQ_BASE;
  31382. function toVLQSigned(aValue) {
  31383. return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
  31384. }
  31385. function fromVLQSigned(aValue) {
  31386. var isNegative = (aValue & 1) === 1;
  31387. var shifted = aValue >> 1;
  31388. return isNegative ? -shifted : shifted;
  31389. }
  31390. exports.encode = function base64VLQ_encode(aValue) {
  31391. var encoded = "";
  31392. var digit;
  31393. var vlq = toVLQSigned(aValue);
  31394. do {
  31395. digit = vlq & VLQ_BASE_MASK;
  31396. vlq >>>= VLQ_BASE_SHIFT;
  31397. if (vlq > 0) {
  31398. digit |= VLQ_CONTINUATION_BIT;
  31399. }
  31400. encoded += base64.encode(digit);
  31401. } while (vlq > 0);
  31402. return encoded;
  31403. };
  31404. exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  31405. var strLen = aStr.length;
  31406. var result = 0;
  31407. var shift = 0;
  31408. var continuation, digit;
  31409. do {
  31410. if (aIndex >= strLen) {
  31411. throw new Error("Expected more digits in base 64 VLQ value.");
  31412. }
  31413. digit = base64.decode(aStr.charCodeAt(aIndex++));
  31414. if (digit === -1) {
  31415. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  31416. }
  31417. continuation = !!(digit & VLQ_CONTINUATION_BIT);
  31418. digit &= VLQ_BASE_MASK;
  31419. result = result + (digit << shift);
  31420. shift += VLQ_BASE_SHIFT;
  31421. } while (continuation);
  31422. aOutParam.value = fromVLQSigned(result);
  31423. aOutParam.rest = aIndex;
  31424. };
  31425. }
  31426. });
  31427. // node_modules/source-map/lib/util.js
  31428. var require_util = __commonJS({
  31429. "node_modules/source-map/lib/util.js"(exports) {
  31430. function getArg(aArgs, aName, aDefaultValue) {
  31431. if (aName in aArgs) {
  31432. return aArgs[aName];
  31433. } else if (arguments.length === 3) {
  31434. return aDefaultValue;
  31435. } else {
  31436. throw new Error('"' + aName + '" is a required argument.');
  31437. }
  31438. }
  31439. exports.getArg = getArg;
  31440. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
  31441. var dataUrlRegexp = /^data:.+\,.+$/;
  31442. function urlParse(aUrl) {
  31443. var match = aUrl.match(urlRegexp);
  31444. if (!match) {
  31445. return null;
  31446. }
  31447. return {
  31448. scheme: match[1],
  31449. auth: match[2],
  31450. host: match[3],
  31451. port: match[4],
  31452. path: match[5]
  31453. };
  31454. }
  31455. exports.urlParse = urlParse;
  31456. function urlGenerate(aParsedUrl) {
  31457. var url = "";
  31458. if (aParsedUrl.scheme) {
  31459. url += aParsedUrl.scheme + ":";
  31460. }
  31461. url += "//";
  31462. if (aParsedUrl.auth) {
  31463. url += aParsedUrl.auth + "@";
  31464. }
  31465. if (aParsedUrl.host) {
  31466. url += aParsedUrl.host;
  31467. }
  31468. if (aParsedUrl.port) {
  31469. url += ":" + aParsedUrl.port;
  31470. }
  31471. if (aParsedUrl.path) {
  31472. url += aParsedUrl.path;
  31473. }
  31474. return url;
  31475. }
  31476. exports.urlGenerate = urlGenerate;
  31477. function normalize6(aPath) {
  31478. var path = aPath;
  31479. var url = urlParse(aPath);
  31480. if (url) {
  31481. if (!url.path) {
  31482. return aPath;
  31483. }
  31484. path = url.path;
  31485. }
  31486. var isAbsolute = exports.isAbsolute(path);
  31487. var parts = path.split(/\/+/);
  31488. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  31489. part = parts[i];
  31490. if (part === ".") {
  31491. parts.splice(i, 1);
  31492. } else if (part === "..") {
  31493. up++;
  31494. } else if (up > 0) {
  31495. if (part === "") {
  31496. parts.splice(i + 1, up);
  31497. up = 0;
  31498. } else {
  31499. parts.splice(i, 2);
  31500. up--;
  31501. }
  31502. }
  31503. }
  31504. path = parts.join("/");
  31505. if (path === "") {
  31506. path = isAbsolute ? "/" : ".";
  31507. }
  31508. if (url) {
  31509. url.path = path;
  31510. return urlGenerate(url);
  31511. }
  31512. return path;
  31513. }
  31514. exports.normalize = normalize6;
  31515. function join(aRoot, aPath) {
  31516. if (aRoot === "") {
  31517. aRoot = ".";
  31518. }
  31519. if (aPath === "") {
  31520. aPath = ".";
  31521. }
  31522. var aPathUrl = urlParse(aPath);
  31523. var aRootUrl = urlParse(aRoot);
  31524. if (aRootUrl) {
  31525. aRoot = aRootUrl.path || "/";
  31526. }
  31527. if (aPathUrl && !aPathUrl.scheme) {
  31528. if (aRootUrl) {
  31529. aPathUrl.scheme = aRootUrl.scheme;
  31530. }
  31531. return urlGenerate(aPathUrl);
  31532. }
  31533. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  31534. return aPath;
  31535. }
  31536. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  31537. aRootUrl.host = aPath;
  31538. return urlGenerate(aRootUrl);
  31539. }
  31540. var joined = aPath.charAt(0) === "/" ? aPath : normalize6(aRoot.replace(/\/+$/, "") + "/" + aPath);
  31541. if (aRootUrl) {
  31542. aRootUrl.path = joined;
  31543. return urlGenerate(aRootUrl);
  31544. }
  31545. return joined;
  31546. }
  31547. exports.join = join;
  31548. exports.isAbsolute = function(aPath) {
  31549. return aPath.charAt(0) === "/" || !!aPath.match(urlRegexp);
  31550. };
  31551. function relative(aRoot, aPath) {
  31552. if (aRoot === "") {
  31553. aRoot = ".";
  31554. }
  31555. aRoot = aRoot.replace(/\/$/, "");
  31556. var level = 0;
  31557. while (aPath.indexOf(aRoot + "/") !== 0) {
  31558. var index2 = aRoot.lastIndexOf("/");
  31559. if (index2 < 0) {
  31560. return aPath;
  31561. }
  31562. aRoot = aRoot.slice(0, index2);
  31563. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  31564. return aPath;
  31565. }
  31566. ++level;
  31567. }
  31568. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  31569. }
  31570. exports.relative = relative;
  31571. var supportsNullProto = function() {
  31572. var obj = /* @__PURE__ */ Object.create(null);
  31573. return !("__proto__" in obj);
  31574. }();
  31575. function identity(s) {
  31576. return s;
  31577. }
  31578. function toSetString(aStr) {
  31579. if (isProtoString(aStr)) {
  31580. return "$" + aStr;
  31581. }
  31582. return aStr;
  31583. }
  31584. exports.toSetString = supportsNullProto ? identity : toSetString;
  31585. function fromSetString(aStr) {
  31586. if (isProtoString(aStr)) {
  31587. return aStr.slice(1);
  31588. }
  31589. return aStr;
  31590. }
  31591. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  31592. function isProtoString(s) {
  31593. if (!s) {
  31594. return false;
  31595. }
  31596. var length = s.length;
  31597. if (length < 9) {
  31598. return false;
  31599. }
  31600. 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) {
  31601. return false;
  31602. }
  31603. for (var i = length - 10; i >= 0; i--) {
  31604. if (s.charCodeAt(i) !== 36) {
  31605. return false;
  31606. }
  31607. }
  31608. return true;
  31609. }
  31610. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  31611. var cmp = mappingA.source - mappingB.source;
  31612. if (cmp !== 0) {
  31613. return cmp;
  31614. }
  31615. cmp = mappingA.originalLine - mappingB.originalLine;
  31616. if (cmp !== 0) {
  31617. return cmp;
  31618. }
  31619. cmp = mappingA.originalColumn - mappingB.originalColumn;
  31620. if (cmp !== 0 || onlyCompareOriginal) {
  31621. return cmp;
  31622. }
  31623. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  31624. if (cmp !== 0) {
  31625. return cmp;
  31626. }
  31627. cmp = mappingA.generatedLine - mappingB.generatedLine;
  31628. if (cmp !== 0) {
  31629. return cmp;
  31630. }
  31631. return mappingA.name - mappingB.name;
  31632. }
  31633. exports.compareByOriginalPositions = compareByOriginalPositions;
  31634. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  31635. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  31636. if (cmp !== 0) {
  31637. return cmp;
  31638. }
  31639. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  31640. if (cmp !== 0 || onlyCompareGenerated) {
  31641. return cmp;
  31642. }
  31643. cmp = mappingA.source - mappingB.source;
  31644. if (cmp !== 0) {
  31645. return cmp;
  31646. }
  31647. cmp = mappingA.originalLine - mappingB.originalLine;
  31648. if (cmp !== 0) {
  31649. return cmp;
  31650. }
  31651. cmp = mappingA.originalColumn - mappingB.originalColumn;
  31652. if (cmp !== 0) {
  31653. return cmp;
  31654. }
  31655. return mappingA.name - mappingB.name;
  31656. }
  31657. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  31658. function strcmp(aStr1, aStr2) {
  31659. if (aStr1 === aStr2) {
  31660. return 0;
  31661. }
  31662. if (aStr1 > aStr2) {
  31663. return 1;
  31664. }
  31665. return -1;
  31666. }
  31667. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  31668. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  31669. if (cmp !== 0) {
  31670. return cmp;
  31671. }
  31672. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  31673. if (cmp !== 0) {
  31674. return cmp;
  31675. }
  31676. cmp = strcmp(mappingA.source, mappingB.source);
  31677. if (cmp !== 0) {
  31678. return cmp;
  31679. }
  31680. cmp = mappingA.originalLine - mappingB.originalLine;
  31681. if (cmp !== 0) {
  31682. return cmp;
  31683. }
  31684. cmp = mappingA.originalColumn - mappingB.originalColumn;
  31685. if (cmp !== 0) {
  31686. return cmp;
  31687. }
  31688. return strcmp(mappingA.name, mappingB.name);
  31689. }
  31690. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  31691. }
  31692. });
  31693. // node_modules/source-map/lib/array-set.js
  31694. var require_array_set = __commonJS({
  31695. "node_modules/source-map/lib/array-set.js"(exports) {
  31696. var util = require_util();
  31697. var has = Object.prototype.hasOwnProperty;
  31698. var hasNativeMap = typeof Map !== "undefined";
  31699. function ArraySet() {
  31700. this._array = [];
  31701. this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
  31702. }
  31703. ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  31704. var set = new ArraySet();
  31705. for (var i = 0, len = aArray.length; i < len; i++) {
  31706. set.add(aArray[i], aAllowDuplicates);
  31707. }
  31708. return set;
  31709. };
  31710. ArraySet.prototype.size = function ArraySet_size() {
  31711. return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  31712. };
  31713. ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  31714. var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
  31715. var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
  31716. var idx = this._array.length;
  31717. if (!isDuplicate || aAllowDuplicates) {
  31718. this._array.push(aStr);
  31719. }
  31720. if (!isDuplicate) {
  31721. if (hasNativeMap) {
  31722. this._set.set(aStr, idx);
  31723. } else {
  31724. this._set[sStr] = idx;
  31725. }
  31726. }
  31727. };
  31728. ArraySet.prototype.has = function ArraySet_has(aStr) {
  31729. if (hasNativeMap) {
  31730. return this._set.has(aStr);
  31731. } else {
  31732. var sStr = util.toSetString(aStr);
  31733. return has.call(this._set, sStr);
  31734. }
  31735. };
  31736. ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
  31737. if (hasNativeMap) {
  31738. var idx = this._set.get(aStr);
  31739. if (idx >= 0) {
  31740. return idx;
  31741. }
  31742. } else {
  31743. var sStr = util.toSetString(aStr);
  31744. if (has.call(this._set, sStr)) {
  31745. return this._set[sStr];
  31746. }
  31747. }
  31748. throw new Error('"' + aStr + '" is not in the set.');
  31749. };
  31750. ArraySet.prototype.at = function ArraySet_at(aIdx) {
  31751. if (aIdx >= 0 && aIdx < this._array.length) {
  31752. return this._array[aIdx];
  31753. }
  31754. throw new Error("No element indexed by " + aIdx);
  31755. };
  31756. ArraySet.prototype.toArray = function ArraySet_toArray() {
  31757. return this._array.slice();
  31758. };
  31759. exports.ArraySet = ArraySet;
  31760. }
  31761. });
  31762. // node_modules/source-map/lib/mapping-list.js
  31763. var require_mapping_list = __commonJS({
  31764. "node_modules/source-map/lib/mapping-list.js"(exports) {
  31765. var util = require_util();
  31766. function generatedPositionAfter(mappingA, mappingB) {
  31767. var lineA = mappingA.generatedLine;
  31768. var lineB = mappingB.generatedLine;
  31769. var columnA = mappingA.generatedColumn;
  31770. var columnB = mappingB.generatedColumn;
  31771. return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  31772. }
  31773. function MappingList() {
  31774. this._array = [];
  31775. this._sorted = true;
  31776. this._last = { generatedLine: -1, generatedColumn: 0 };
  31777. }
  31778. MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
  31779. this._array.forEach(aCallback, aThisArg);
  31780. };
  31781. MappingList.prototype.add = function MappingList_add(aMapping) {
  31782. if (generatedPositionAfter(this._last, aMapping)) {
  31783. this._last = aMapping;
  31784. this._array.push(aMapping);
  31785. } else {
  31786. this._sorted = false;
  31787. this._array.push(aMapping);
  31788. }
  31789. };
  31790. MappingList.prototype.toArray = function MappingList_toArray() {
  31791. if (!this._sorted) {
  31792. this._array.sort(util.compareByGeneratedPositionsInflated);
  31793. this._sorted = true;
  31794. }
  31795. return this._array;
  31796. };
  31797. exports.MappingList = MappingList;
  31798. }
  31799. });
  31800. // node_modules/source-map/lib/source-map-generator.js
  31801. var require_source_map_generator = __commonJS({
  31802. "node_modules/source-map/lib/source-map-generator.js"(exports) {
  31803. var base64VLQ = require_base64_vlq();
  31804. var util = require_util();
  31805. var ArraySet = require_array_set().ArraySet;
  31806. var MappingList = require_mapping_list().MappingList;
  31807. function SourceMapGenerator(aArgs) {
  31808. if (!aArgs) {
  31809. aArgs = {};
  31810. }
  31811. this._file = util.getArg(aArgs, "file", null);
  31812. this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
  31813. this._skipValidation = util.getArg(aArgs, "skipValidation", false);
  31814. this._sources = new ArraySet();
  31815. this._names = new ArraySet();
  31816. this._mappings = new MappingList();
  31817. this._sourcesContents = null;
  31818. }
  31819. SourceMapGenerator.prototype._version = 3;
  31820. SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  31821. var sourceRoot = aSourceMapConsumer.sourceRoot;
  31822. var generator = new SourceMapGenerator({
  31823. file: aSourceMapConsumer.file,
  31824. sourceRoot
  31825. });
  31826. aSourceMapConsumer.eachMapping(function(mapping) {
  31827. var newMapping = {
  31828. generated: {
  31829. line: mapping.generatedLine,
  31830. column: mapping.generatedColumn
  31831. }
  31832. };
  31833. if (mapping.source != null) {
  31834. newMapping.source = mapping.source;
  31835. if (sourceRoot != null) {
  31836. newMapping.source = util.relative(sourceRoot, newMapping.source);
  31837. }
  31838. newMapping.original = {
  31839. line: mapping.originalLine,
  31840. column: mapping.originalColumn
  31841. };
  31842. if (mapping.name != null) {
  31843. newMapping.name = mapping.name;
  31844. }
  31845. }
  31846. generator.addMapping(newMapping);
  31847. });
  31848. aSourceMapConsumer.sources.forEach(function(sourceFile) {
  31849. var content3 = aSourceMapConsumer.sourceContentFor(sourceFile);
  31850. if (content3 != null) {
  31851. generator.setSourceContent(sourceFile, content3);
  31852. }
  31853. });
  31854. return generator;
  31855. };
  31856. SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
  31857. var generated2 = util.getArg(aArgs, "generated");
  31858. var original = util.getArg(aArgs, "original", null);
  31859. var source = util.getArg(aArgs, "source", null);
  31860. var name2 = util.getArg(aArgs, "name", null);
  31861. if (!this._skipValidation) {
  31862. this._validateMapping(generated2, original, source, name2);
  31863. }
  31864. if (source != null) {
  31865. source = String(source);
  31866. if (!this._sources.has(source)) {
  31867. this._sources.add(source);
  31868. }
  31869. }
  31870. if (name2 != null) {
  31871. name2 = String(name2);
  31872. if (!this._names.has(name2)) {
  31873. this._names.add(name2);
  31874. }
  31875. }
  31876. this._mappings.add({
  31877. generatedLine: generated2.line,
  31878. generatedColumn: generated2.column,
  31879. originalLine: original != null && original.line,
  31880. originalColumn: original != null && original.column,
  31881. source,
  31882. name: name2
  31883. });
  31884. };
  31885. SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  31886. var source = aSourceFile;
  31887. if (this._sourceRoot != null) {
  31888. source = util.relative(this._sourceRoot, source);
  31889. }
  31890. if (aSourceContent != null) {
  31891. if (!this._sourcesContents) {
  31892. this._sourcesContents = /* @__PURE__ */ Object.create(null);
  31893. }
  31894. this._sourcesContents[util.toSetString(source)] = aSourceContent;
  31895. } else if (this._sourcesContents) {
  31896. delete this._sourcesContents[util.toSetString(source)];
  31897. if (Object.keys(this._sourcesContents).length === 0) {
  31898. this._sourcesContents = null;
  31899. }
  31900. }
  31901. };
  31902. SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  31903. var sourceFile = aSourceFile;
  31904. if (aSourceFile == null) {
  31905. if (aSourceMapConsumer.file == null) {
  31906. throw new Error(
  31907. `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
  31908. );
  31909. }
  31910. sourceFile = aSourceMapConsumer.file;
  31911. }
  31912. var sourceRoot = this._sourceRoot;
  31913. if (sourceRoot != null) {
  31914. sourceFile = util.relative(sourceRoot, sourceFile);
  31915. }
  31916. var newSources = new ArraySet();
  31917. var newNames = new ArraySet();
  31918. this._mappings.unsortedForEach(function(mapping) {
  31919. if (mapping.source === sourceFile && mapping.originalLine != null) {
  31920. var original = aSourceMapConsumer.originalPositionFor({
  31921. line: mapping.originalLine,
  31922. column: mapping.originalColumn
  31923. });
  31924. if (original.source != null) {
  31925. mapping.source = original.source;
  31926. if (aSourceMapPath != null) {
  31927. mapping.source = util.join(aSourceMapPath, mapping.source);
  31928. }
  31929. if (sourceRoot != null) {
  31930. mapping.source = util.relative(sourceRoot, mapping.source);
  31931. }
  31932. mapping.originalLine = original.line;
  31933. mapping.originalColumn = original.column;
  31934. if (original.name != null) {
  31935. mapping.name = original.name;
  31936. }
  31937. }
  31938. }
  31939. var source = mapping.source;
  31940. if (source != null && !newSources.has(source)) {
  31941. newSources.add(source);
  31942. }
  31943. var name2 = mapping.name;
  31944. if (name2 != null && !newNames.has(name2)) {
  31945. newNames.add(name2);
  31946. }
  31947. }, this);
  31948. this._sources = newSources;
  31949. this._names = newNames;
  31950. aSourceMapConsumer.sources.forEach(function(sourceFile2) {
  31951. var content3 = aSourceMapConsumer.sourceContentFor(sourceFile2);
  31952. if (content3 != null) {
  31953. if (aSourceMapPath != null) {
  31954. sourceFile2 = util.join(aSourceMapPath, sourceFile2);
  31955. }
  31956. if (sourceRoot != null) {
  31957. sourceFile2 = util.relative(sourceRoot, sourceFile2);
  31958. }
  31959. this.setSourceContent(sourceFile2, content3);
  31960. }
  31961. }, this);
  31962. };
  31963. SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
  31964. if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
  31965. throw new Error(
  31966. "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."
  31967. );
  31968. }
  31969. if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
  31970. return;
  31971. } 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) {
  31972. return;
  31973. } else {
  31974. throw new Error("Invalid mapping: " + JSON.stringify({
  31975. generated: aGenerated,
  31976. source: aSource,
  31977. original: aOriginal,
  31978. name: aName
  31979. }));
  31980. }
  31981. };
  31982. SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
  31983. var previousGeneratedColumn = 0;
  31984. var previousGeneratedLine = 1;
  31985. var previousOriginalColumn = 0;
  31986. var previousOriginalLine = 0;
  31987. var previousName = 0;
  31988. var previousSource = 0;
  31989. var result = "";
  31990. var next;
  31991. var mapping;
  31992. var nameIdx;
  31993. var sourceIdx;
  31994. var mappings = this._mappings.toArray();
  31995. for (var i = 0, len = mappings.length; i < len; i++) {
  31996. mapping = mappings[i];
  31997. next = "";
  31998. if (mapping.generatedLine !== previousGeneratedLine) {
  31999. previousGeneratedColumn = 0;
  32000. while (mapping.generatedLine !== previousGeneratedLine) {
  32001. next += ";";
  32002. previousGeneratedLine++;
  32003. }
  32004. } else {
  32005. if (i > 0) {
  32006. if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  32007. continue;
  32008. }
  32009. next += ",";
  32010. }
  32011. }
  32012. next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
  32013. previousGeneratedColumn = mapping.generatedColumn;
  32014. if (mapping.source != null) {
  32015. sourceIdx = this._sources.indexOf(mapping.source);
  32016. next += base64VLQ.encode(sourceIdx - previousSource);
  32017. previousSource = sourceIdx;
  32018. next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
  32019. previousOriginalLine = mapping.originalLine - 1;
  32020. next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
  32021. previousOriginalColumn = mapping.originalColumn;
  32022. if (mapping.name != null) {
  32023. nameIdx = this._names.indexOf(mapping.name);
  32024. next += base64VLQ.encode(nameIdx - previousName);
  32025. previousName = nameIdx;
  32026. }
  32027. }
  32028. result += next;
  32029. }
  32030. return result;
  32031. };
  32032. SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  32033. return aSources.map(function(source) {
  32034. if (!this._sourcesContents) {
  32035. return null;
  32036. }
  32037. if (aSourceRoot != null) {
  32038. source = util.relative(aSourceRoot, source);
  32039. }
  32040. var key = util.toSetString(source);
  32041. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
  32042. }, this);
  32043. };
  32044. SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
  32045. var map = {
  32046. version: this._version,
  32047. sources: this._sources.toArray(),
  32048. names: this._names.toArray(),
  32049. mappings: this._serializeMappings()
  32050. };
  32051. if (this._file != null) {
  32052. map.file = this._file;
  32053. }
  32054. if (this._sourceRoot != null) {
  32055. map.sourceRoot = this._sourceRoot;
  32056. }
  32057. if (this._sourcesContents) {
  32058. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  32059. }
  32060. return map;
  32061. };
  32062. SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
  32063. return JSON.stringify(this.toJSON());
  32064. };
  32065. exports.SourceMapGenerator = SourceMapGenerator;
  32066. }
  32067. });
  32068. // node_modules/source-map/lib/binary-search.js
  32069. var require_binary_search = __commonJS({
  32070. "node_modules/source-map/lib/binary-search.js"(exports) {
  32071. exports.GREATEST_LOWER_BOUND = 1;
  32072. exports.LEAST_UPPER_BOUND = 2;
  32073. function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  32074. var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  32075. var cmp = aCompare(aNeedle, aHaystack[mid], true);
  32076. if (cmp === 0) {
  32077. return mid;
  32078. } else if (cmp > 0) {
  32079. if (aHigh - mid > 1) {
  32080. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
  32081. }
  32082. if (aBias == exports.LEAST_UPPER_BOUND) {
  32083. return aHigh < aHaystack.length ? aHigh : -1;
  32084. } else {
  32085. return mid;
  32086. }
  32087. } else {
  32088. if (mid - aLow > 1) {
  32089. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
  32090. }
  32091. if (aBias == exports.LEAST_UPPER_BOUND) {
  32092. return mid;
  32093. } else {
  32094. return aLow < 0 ? -1 : aLow;
  32095. }
  32096. }
  32097. }
  32098. exports.search = function search2(aNeedle, aHaystack, aCompare, aBias) {
  32099. if (aHaystack.length === 0) {
  32100. return -1;
  32101. }
  32102. var index2 = recursiveSearch(
  32103. -1,
  32104. aHaystack.length,
  32105. aNeedle,
  32106. aHaystack,
  32107. aCompare,
  32108. aBias || exports.GREATEST_LOWER_BOUND
  32109. );
  32110. if (index2 < 0) {
  32111. return -1;
  32112. }
  32113. while (index2 - 1 >= 0) {
  32114. if (aCompare(aHaystack[index2], aHaystack[index2 - 1], true) !== 0) {
  32115. break;
  32116. }
  32117. --index2;
  32118. }
  32119. return index2;
  32120. };
  32121. }
  32122. });
  32123. // node_modules/source-map/lib/quick-sort.js
  32124. var require_quick_sort = __commonJS({
  32125. "node_modules/source-map/lib/quick-sort.js"(exports) {
  32126. function swap(ary, x, y) {
  32127. var temp = ary[x];
  32128. ary[x] = ary[y];
  32129. ary[y] = temp;
  32130. }
  32131. function randomIntInRange(low, high) {
  32132. return Math.round(low + Math.random() * (high - low));
  32133. }
  32134. function doQuickSort(ary, comparator, p, r) {
  32135. if (p < r) {
  32136. var pivotIndex = randomIntInRange(p, r);
  32137. var i = p - 1;
  32138. swap(ary, pivotIndex, r);
  32139. var pivot = ary[r];
  32140. for (var j = p; j < r; j++) {
  32141. if (comparator(ary[j], pivot) <= 0) {
  32142. i += 1;
  32143. swap(ary, i, j);
  32144. }
  32145. }
  32146. swap(ary, i + 1, j);
  32147. var q = i + 1;
  32148. doQuickSort(ary, comparator, p, q - 1);
  32149. doQuickSort(ary, comparator, q + 1, r);
  32150. }
  32151. }
  32152. exports.quickSort = function(ary, comparator) {
  32153. doQuickSort(ary, comparator, 0, ary.length - 1);
  32154. };
  32155. }
  32156. });
  32157. // node_modules/source-map/lib/source-map-consumer.js
  32158. var require_source_map_consumer = __commonJS({
  32159. "node_modules/source-map/lib/source-map-consumer.js"(exports) {
  32160. var util = require_util();
  32161. var binarySearch = require_binary_search();
  32162. var ArraySet = require_array_set().ArraySet;
  32163. var base64VLQ = require_base64_vlq();
  32164. var quickSort = require_quick_sort().quickSort;
  32165. function SourceMapConsumer(aSourceMap) {
  32166. var sourceMap = aSourceMap;
  32167. if (typeof aSourceMap === "string") {
  32168. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ""));
  32169. }
  32170. return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap);
  32171. }
  32172. SourceMapConsumer.fromSourceMap = function(aSourceMap) {
  32173. return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
  32174. };
  32175. SourceMapConsumer.prototype._version = 3;
  32176. SourceMapConsumer.prototype.__generatedMappings = null;
  32177. Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
  32178. get: function() {
  32179. if (!this.__generatedMappings) {
  32180. this._parseMappings(this._mappings, this.sourceRoot);
  32181. }
  32182. return this.__generatedMappings;
  32183. }
  32184. });
  32185. SourceMapConsumer.prototype.__originalMappings = null;
  32186. Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
  32187. get: function() {
  32188. if (!this.__originalMappings) {
  32189. this._parseMappings(this._mappings, this.sourceRoot);
  32190. }
  32191. return this.__originalMappings;
  32192. }
  32193. });
  32194. SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index2) {
  32195. var c = aStr.charAt(index2);
  32196. return c === ";" || c === ",";
  32197. };
  32198. SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  32199. throw new Error("Subclasses must implement _parseMappings");
  32200. };
  32201. SourceMapConsumer.GENERATED_ORDER = 1;
  32202. SourceMapConsumer.ORIGINAL_ORDER = 2;
  32203. SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
  32204. SourceMapConsumer.LEAST_UPPER_BOUND = 2;
  32205. SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
  32206. var context = aContext || null;
  32207. var order2 = aOrder || SourceMapConsumer.GENERATED_ORDER;
  32208. var mappings;
  32209. switch (order2) {
  32210. case SourceMapConsumer.GENERATED_ORDER:
  32211. mappings = this._generatedMappings;
  32212. break;
  32213. case SourceMapConsumer.ORIGINAL_ORDER:
  32214. mappings = this._originalMappings;
  32215. break;
  32216. default:
  32217. throw new Error("Unknown order of iteration.");
  32218. }
  32219. var sourceRoot = this.sourceRoot;
  32220. mappings.map(function(mapping) {
  32221. var source = mapping.source === null ? null : this._sources.at(mapping.source);
  32222. if (source != null && sourceRoot != null) {
  32223. source = util.join(sourceRoot, source);
  32224. }
  32225. return {
  32226. source,
  32227. generatedLine: mapping.generatedLine,
  32228. generatedColumn: mapping.generatedColumn,
  32229. originalLine: mapping.originalLine,
  32230. originalColumn: mapping.originalColumn,
  32231. name: mapping.name === null ? null : this._names.at(mapping.name)
  32232. };
  32233. }, this).forEach(aCallback, context);
  32234. };
  32235. SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
  32236. var line = util.getArg(aArgs, "line");
  32237. var needle = {
  32238. source: util.getArg(aArgs, "source"),
  32239. originalLine: line,
  32240. originalColumn: util.getArg(aArgs, "column", 0)
  32241. };
  32242. if (this.sourceRoot != null) {
  32243. needle.source = util.relative(this.sourceRoot, needle.source);
  32244. }
  32245. if (!this._sources.has(needle.source)) {
  32246. return [];
  32247. }
  32248. needle.source = this._sources.indexOf(needle.source);
  32249. var mappings = [];
  32250. var index2 = this._findMapping(
  32251. needle,
  32252. this._originalMappings,
  32253. "originalLine",
  32254. "originalColumn",
  32255. util.compareByOriginalPositions,
  32256. binarySearch.LEAST_UPPER_BOUND
  32257. );
  32258. if (index2 >= 0) {
  32259. var mapping = this._originalMappings[index2];
  32260. if (aArgs.column === void 0) {
  32261. var originalLine = mapping.originalLine;
  32262. while (mapping && mapping.originalLine === originalLine) {
  32263. mappings.push({
  32264. line: util.getArg(mapping, "generatedLine", null),
  32265. column: util.getArg(mapping, "generatedColumn", null),
  32266. lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
  32267. });
  32268. mapping = this._originalMappings[++index2];
  32269. }
  32270. } else {
  32271. var originalColumn = mapping.originalColumn;
  32272. while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
  32273. mappings.push({
  32274. line: util.getArg(mapping, "generatedLine", null),
  32275. column: util.getArg(mapping, "generatedColumn", null),
  32276. lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
  32277. });
  32278. mapping = this._originalMappings[++index2];
  32279. }
  32280. }
  32281. }
  32282. return mappings;
  32283. };
  32284. exports.SourceMapConsumer = SourceMapConsumer;
  32285. function BasicSourceMapConsumer(aSourceMap) {
  32286. var sourceMap = aSourceMap;
  32287. if (typeof aSourceMap === "string") {
  32288. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ""));
  32289. }
  32290. var version2 = util.getArg(sourceMap, "version");
  32291. var sources = util.getArg(sourceMap, "sources");
  32292. var names = util.getArg(sourceMap, "names", []);
  32293. var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
  32294. var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
  32295. var mappings = util.getArg(sourceMap, "mappings");
  32296. var file = util.getArg(sourceMap, "file", null);
  32297. if (version2 != this._version) {
  32298. throw new Error("Unsupported version: " + version2);
  32299. }
  32300. sources = sources.map(String).map(util.normalize).map(function(source) {
  32301. return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
  32302. });
  32303. this._names = ArraySet.fromArray(names.map(String), true);
  32304. this._sources = ArraySet.fromArray(sources, true);
  32305. this.sourceRoot = sourceRoot;
  32306. this.sourcesContent = sourcesContent;
  32307. this._mappings = mappings;
  32308. this.file = file;
  32309. }
  32310. BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  32311. BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
  32312. BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {
  32313. var smc = Object.create(BasicSourceMapConsumer.prototype);
  32314. var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
  32315. var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
  32316. smc.sourceRoot = aSourceMap._sourceRoot;
  32317. smc.sourcesContent = aSourceMap._generateSourcesContent(
  32318. smc._sources.toArray(),
  32319. smc.sourceRoot
  32320. );
  32321. smc.file = aSourceMap._file;
  32322. var generatedMappings = aSourceMap._mappings.toArray().slice();
  32323. var destGeneratedMappings = smc.__generatedMappings = [];
  32324. var destOriginalMappings = smc.__originalMappings = [];
  32325. for (var i = 0, length = generatedMappings.length; i < length; i++) {
  32326. var srcMapping = generatedMappings[i];
  32327. var destMapping = new Mapping();
  32328. destMapping.generatedLine = srcMapping.generatedLine;
  32329. destMapping.generatedColumn = srcMapping.generatedColumn;
  32330. if (srcMapping.source) {
  32331. destMapping.source = sources.indexOf(srcMapping.source);
  32332. destMapping.originalLine = srcMapping.originalLine;
  32333. destMapping.originalColumn = srcMapping.originalColumn;
  32334. if (srcMapping.name) {
  32335. destMapping.name = names.indexOf(srcMapping.name);
  32336. }
  32337. destOriginalMappings.push(destMapping);
  32338. }
  32339. destGeneratedMappings.push(destMapping);
  32340. }
  32341. quickSort(smc.__originalMappings, util.compareByOriginalPositions);
  32342. return smc;
  32343. };
  32344. BasicSourceMapConsumer.prototype._version = 3;
  32345. Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
  32346. get: function() {
  32347. return this._sources.toArray().map(function(s) {
  32348. return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
  32349. }, this);
  32350. }
  32351. });
  32352. function Mapping() {
  32353. this.generatedLine = 0;
  32354. this.generatedColumn = 0;
  32355. this.source = null;
  32356. this.originalLine = null;
  32357. this.originalColumn = null;
  32358. this.name = null;
  32359. }
  32360. BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  32361. var generatedLine = 1;
  32362. var previousGeneratedColumn = 0;
  32363. var previousOriginalLine = 0;
  32364. var previousOriginalColumn = 0;
  32365. var previousSource = 0;
  32366. var previousName = 0;
  32367. var length = aStr.length;
  32368. var index2 = 0;
  32369. var cachedSegments = {};
  32370. var temp = {};
  32371. var originalMappings = [];
  32372. var generatedMappings = [];
  32373. var mapping, str, segment, end, value;
  32374. while (index2 < length) {
  32375. if (aStr.charAt(index2) === ";") {
  32376. generatedLine++;
  32377. index2++;
  32378. previousGeneratedColumn = 0;
  32379. } else if (aStr.charAt(index2) === ",") {
  32380. index2++;
  32381. } else {
  32382. mapping = new Mapping();
  32383. mapping.generatedLine = generatedLine;
  32384. for (end = index2; end < length; end++) {
  32385. if (this._charIsMappingSeparator(aStr, end)) {
  32386. break;
  32387. }
  32388. }
  32389. str = aStr.slice(index2, end);
  32390. segment = cachedSegments[str];
  32391. if (segment) {
  32392. index2 += str.length;
  32393. } else {
  32394. segment = [];
  32395. while (index2 < end) {
  32396. base64VLQ.decode(aStr, index2, temp);
  32397. value = temp.value;
  32398. index2 = temp.rest;
  32399. segment.push(value);
  32400. }
  32401. if (segment.length === 2) {
  32402. throw new Error("Found a source, but no line and column");
  32403. }
  32404. if (segment.length === 3) {
  32405. throw new Error("Found a source and line, but no column");
  32406. }
  32407. cachedSegments[str] = segment;
  32408. }
  32409. mapping.generatedColumn = previousGeneratedColumn + segment[0];
  32410. previousGeneratedColumn = mapping.generatedColumn;
  32411. if (segment.length > 1) {
  32412. mapping.source = previousSource + segment[1];
  32413. previousSource += segment[1];
  32414. mapping.originalLine = previousOriginalLine + segment[2];
  32415. previousOriginalLine = mapping.originalLine;
  32416. mapping.originalLine += 1;
  32417. mapping.originalColumn = previousOriginalColumn + segment[3];
  32418. previousOriginalColumn = mapping.originalColumn;
  32419. if (segment.length > 4) {
  32420. mapping.name = previousName + segment[4];
  32421. previousName += segment[4];
  32422. }
  32423. }
  32424. generatedMappings.push(mapping);
  32425. if (typeof mapping.originalLine === "number") {
  32426. originalMappings.push(mapping);
  32427. }
  32428. }
  32429. }
  32430. quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
  32431. this.__generatedMappings = generatedMappings;
  32432. quickSort(originalMappings, util.compareByOriginalPositions);
  32433. this.__originalMappings = originalMappings;
  32434. };
  32435. BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
  32436. if (aNeedle[aLineName] <= 0) {
  32437. throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
  32438. }
  32439. if (aNeedle[aColumnName] < 0) {
  32440. throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
  32441. }
  32442. return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  32443. };
  32444. BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
  32445. for (var index2 = 0; index2 < this._generatedMappings.length; ++index2) {
  32446. var mapping = this._generatedMappings[index2];
  32447. if (index2 + 1 < this._generatedMappings.length) {
  32448. var nextMapping = this._generatedMappings[index2 + 1];
  32449. if (mapping.generatedLine === nextMapping.generatedLine) {
  32450. mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
  32451. continue;
  32452. }
  32453. }
  32454. mapping.lastGeneratedColumn = Infinity;
  32455. }
  32456. };
  32457. BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
  32458. var needle = {
  32459. generatedLine: util.getArg(aArgs, "line"),
  32460. generatedColumn: util.getArg(aArgs, "column")
  32461. };
  32462. var index2 = this._findMapping(
  32463. needle,
  32464. this._generatedMappings,
  32465. "generatedLine",
  32466. "generatedColumn",
  32467. util.compareByGeneratedPositionsDeflated,
  32468. util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
  32469. );
  32470. if (index2 >= 0) {
  32471. var mapping = this._generatedMappings[index2];
  32472. if (mapping.generatedLine === needle.generatedLine) {
  32473. var source = util.getArg(mapping, "source", null);
  32474. if (source !== null) {
  32475. source = this._sources.at(source);
  32476. if (this.sourceRoot != null) {
  32477. source = util.join(this.sourceRoot, source);
  32478. }
  32479. }
  32480. var name2 = util.getArg(mapping, "name", null);
  32481. if (name2 !== null) {
  32482. name2 = this._names.at(name2);
  32483. }
  32484. return {
  32485. source,
  32486. line: util.getArg(mapping, "originalLine", null),
  32487. column: util.getArg(mapping, "originalColumn", null),
  32488. name: name2
  32489. };
  32490. }
  32491. }
  32492. return {
  32493. source: null,
  32494. line: null,
  32495. column: null,
  32496. name: null
  32497. };
  32498. };
  32499. BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
  32500. if (!this.sourcesContent) {
  32501. return false;
  32502. }
  32503. return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
  32504. return sc == null;
  32505. });
  32506. };
  32507. BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  32508. if (!this.sourcesContent) {
  32509. return null;
  32510. }
  32511. if (this.sourceRoot != null) {
  32512. aSource = util.relative(this.sourceRoot, aSource);
  32513. }
  32514. if (this._sources.has(aSource)) {
  32515. return this.sourcesContent[this._sources.indexOf(aSource)];
  32516. }
  32517. var url;
  32518. if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
  32519. var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
  32520. if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
  32521. return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
  32522. }
  32523. if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) {
  32524. return this.sourcesContent[this._sources.indexOf("/" + aSource)];
  32525. }
  32526. }
  32527. if (nullOnMissing) {
  32528. return null;
  32529. } else {
  32530. throw new Error('"' + aSource + '" is not in the SourceMap.');
  32531. }
  32532. };
  32533. BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
  32534. var source = util.getArg(aArgs, "source");
  32535. if (this.sourceRoot != null) {
  32536. source = util.relative(this.sourceRoot, source);
  32537. }
  32538. if (!this._sources.has(source)) {
  32539. return {
  32540. line: null,
  32541. column: null,
  32542. lastColumn: null
  32543. };
  32544. }
  32545. source = this._sources.indexOf(source);
  32546. var needle = {
  32547. source,
  32548. originalLine: util.getArg(aArgs, "line"),
  32549. originalColumn: util.getArg(aArgs, "column")
  32550. };
  32551. var index2 = this._findMapping(
  32552. needle,
  32553. this._originalMappings,
  32554. "originalLine",
  32555. "originalColumn",
  32556. util.compareByOriginalPositions,
  32557. util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
  32558. );
  32559. if (index2 >= 0) {
  32560. var mapping = this._originalMappings[index2];
  32561. if (mapping.source === needle.source) {
  32562. return {
  32563. line: util.getArg(mapping, "generatedLine", null),
  32564. column: util.getArg(mapping, "generatedColumn", null),
  32565. lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
  32566. };
  32567. }
  32568. }
  32569. return {
  32570. line: null,
  32571. column: null,
  32572. lastColumn: null
  32573. };
  32574. };
  32575. exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
  32576. function IndexedSourceMapConsumer(aSourceMap) {
  32577. var sourceMap = aSourceMap;
  32578. if (typeof aSourceMap === "string") {
  32579. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ""));
  32580. }
  32581. var version2 = util.getArg(sourceMap, "version");
  32582. var sections = util.getArg(sourceMap, "sections");
  32583. if (version2 != this._version) {
  32584. throw new Error("Unsupported version: " + version2);
  32585. }
  32586. this._sources = new ArraySet();
  32587. this._names = new ArraySet();
  32588. var lastOffset = {
  32589. line: -1,
  32590. column: 0
  32591. };
  32592. this._sections = sections.map(function(s) {
  32593. if (s.url) {
  32594. throw new Error("Support for url field in sections not implemented.");
  32595. }
  32596. var offset2 = util.getArg(s, "offset");
  32597. var offsetLine = util.getArg(offset2, "line");
  32598. var offsetColumn = util.getArg(offset2, "column");
  32599. if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
  32600. throw new Error("Section offsets must be ordered and non-overlapping.");
  32601. }
  32602. lastOffset = offset2;
  32603. return {
  32604. generatedOffset: {
  32605. generatedLine: offsetLine + 1,
  32606. generatedColumn: offsetColumn + 1
  32607. },
  32608. consumer: new SourceMapConsumer(util.getArg(s, "map"))
  32609. };
  32610. });
  32611. }
  32612. IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  32613. IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
  32614. IndexedSourceMapConsumer.prototype._version = 3;
  32615. Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
  32616. get: function() {
  32617. var sources = [];
  32618. for (var i = 0; i < this._sections.length; i++) {
  32619. for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
  32620. sources.push(this._sections[i].consumer.sources[j]);
  32621. }
  32622. }
  32623. return sources;
  32624. }
  32625. });
  32626. IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
  32627. var needle = {
  32628. generatedLine: util.getArg(aArgs, "line"),
  32629. generatedColumn: util.getArg(aArgs, "column")
  32630. };
  32631. var sectionIndex = binarySearch.search(
  32632. needle,
  32633. this._sections,
  32634. function(needle2, section2) {
  32635. var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
  32636. if (cmp) {
  32637. return cmp;
  32638. }
  32639. return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
  32640. }
  32641. );
  32642. var section = this._sections[sectionIndex];
  32643. if (!section) {
  32644. return {
  32645. source: null,
  32646. line: null,
  32647. column: null,
  32648. name: null
  32649. };
  32650. }
  32651. return section.consumer.originalPositionFor({
  32652. line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
  32653. column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  32654. bias: aArgs.bias
  32655. });
  32656. };
  32657. IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
  32658. return this._sections.every(function(s) {
  32659. return s.consumer.hasContentsOfAllSources();
  32660. });
  32661. };
  32662. IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  32663. for (var i = 0; i < this._sections.length; i++) {
  32664. var section = this._sections[i];
  32665. var content3 = section.consumer.sourceContentFor(aSource, true);
  32666. if (content3) {
  32667. return content3;
  32668. }
  32669. }
  32670. if (nullOnMissing) {
  32671. return null;
  32672. } else {
  32673. throw new Error('"' + aSource + '" is not in the SourceMap.');
  32674. }
  32675. };
  32676. IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
  32677. for (var i = 0; i < this._sections.length; i++) {
  32678. var section = this._sections[i];
  32679. if (section.consumer.sources.indexOf(util.getArg(aArgs, "source")) === -1) {
  32680. continue;
  32681. }
  32682. var generatedPosition = section.consumer.generatedPositionFor(aArgs);
  32683. if (generatedPosition) {
  32684. var ret = {
  32685. line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
  32686. column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
  32687. };
  32688. return ret;
  32689. }
  32690. }
  32691. return {
  32692. line: null,
  32693. column: null
  32694. };
  32695. };
  32696. IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  32697. this.__generatedMappings = [];
  32698. this.__originalMappings = [];
  32699. for (var i = 0; i < this._sections.length; i++) {
  32700. var section = this._sections[i];
  32701. var sectionMappings = section.consumer._generatedMappings;
  32702. for (var j = 0; j < sectionMappings.length; j++) {
  32703. var mapping = sectionMappings[j];
  32704. var source = section.consumer._sources.at(mapping.source);
  32705. if (section.consumer.sourceRoot !== null) {
  32706. source = util.join(section.consumer.sourceRoot, source);
  32707. }
  32708. this._sources.add(source);
  32709. source = this._sources.indexOf(source);
  32710. var name2 = section.consumer._names.at(mapping.name);
  32711. this._names.add(name2);
  32712. name2 = this._names.indexOf(name2);
  32713. var adjustedMapping = {
  32714. source,
  32715. generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
  32716. generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  32717. originalLine: mapping.originalLine,
  32718. originalColumn: mapping.originalColumn,
  32719. name: name2
  32720. };
  32721. this.__generatedMappings.push(adjustedMapping);
  32722. if (typeof adjustedMapping.originalLine === "number") {
  32723. this.__originalMappings.push(adjustedMapping);
  32724. }
  32725. }
  32726. }
  32727. quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
  32728. quickSort(this.__originalMappings, util.compareByOriginalPositions);
  32729. };
  32730. exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
  32731. }
  32732. });
  32733. // node_modules/source-map/lib/source-node.js
  32734. var require_source_node = __commonJS({
  32735. "node_modules/source-map/lib/source-node.js"(exports) {
  32736. var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
  32737. var util = require_util();
  32738. var REGEX_NEWLINE = /(\r?\n)/;
  32739. var NEWLINE_CODE = 10;
  32740. var isSourceNode = "$$$isSourceNode$$$";
  32741. function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
  32742. this.children = [];
  32743. this.sourceContents = {};
  32744. this.line = aLine == null ? null : aLine;
  32745. this.column = aColumn == null ? null : aColumn;
  32746. this.source = aSource == null ? null : aSource;
  32747. this.name = aName == null ? null : aName;
  32748. this[isSourceNode] = true;
  32749. if (aChunks != null)
  32750. this.add(aChunks);
  32751. }
  32752. SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
  32753. var node = new SourceNode();
  32754. var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
  32755. var remainingLinesIndex = 0;
  32756. var shiftNextLine = function() {
  32757. var lineContents = getNextLine();
  32758. var newLine = getNextLine() || "";
  32759. return lineContents + newLine;
  32760. function getNextLine() {
  32761. return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
  32762. }
  32763. };
  32764. var lastGeneratedLine = 1, lastGeneratedColumn = 0;
  32765. var lastMapping = null;
  32766. aSourceMapConsumer.eachMapping(function(mapping) {
  32767. if (lastMapping !== null) {
  32768. if (lastGeneratedLine < mapping.generatedLine) {
  32769. addMappingWithCode(lastMapping, shiftNextLine());
  32770. lastGeneratedLine++;
  32771. lastGeneratedColumn = 0;
  32772. } else {
  32773. var nextLine = remainingLines[remainingLinesIndex];
  32774. var code2 = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
  32775. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
  32776. lastGeneratedColumn = mapping.generatedColumn;
  32777. addMappingWithCode(lastMapping, code2);
  32778. lastMapping = mapping;
  32779. return;
  32780. }
  32781. }
  32782. while (lastGeneratedLine < mapping.generatedLine) {
  32783. node.add(shiftNextLine());
  32784. lastGeneratedLine++;
  32785. }
  32786. if (lastGeneratedColumn < mapping.generatedColumn) {
  32787. var nextLine = remainingLines[remainingLinesIndex];
  32788. node.add(nextLine.substr(0, mapping.generatedColumn));
  32789. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
  32790. lastGeneratedColumn = mapping.generatedColumn;
  32791. }
  32792. lastMapping = mapping;
  32793. }, this);
  32794. if (remainingLinesIndex < remainingLines.length) {
  32795. if (lastMapping) {
  32796. addMappingWithCode(lastMapping, shiftNextLine());
  32797. }
  32798. node.add(remainingLines.splice(remainingLinesIndex).join(""));
  32799. }
  32800. aSourceMapConsumer.sources.forEach(function(sourceFile) {
  32801. var content3 = aSourceMapConsumer.sourceContentFor(sourceFile);
  32802. if (content3 != null) {
  32803. if (aRelativePath != null) {
  32804. sourceFile = util.join(aRelativePath, sourceFile);
  32805. }
  32806. node.setSourceContent(sourceFile, content3);
  32807. }
  32808. });
  32809. return node;
  32810. function addMappingWithCode(mapping, code2) {
  32811. if (mapping === null || mapping.source === void 0) {
  32812. node.add(code2);
  32813. } else {
  32814. var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
  32815. node.add(new SourceNode(
  32816. mapping.originalLine,
  32817. mapping.originalColumn,
  32818. source,
  32819. code2,
  32820. mapping.name
  32821. ));
  32822. }
  32823. }
  32824. };
  32825. SourceNode.prototype.add = function SourceNode_add(aChunk) {
  32826. if (Array.isArray(aChunk)) {
  32827. aChunk.forEach(function(chunk) {
  32828. this.add(chunk);
  32829. }, this);
  32830. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  32831. if (aChunk) {
  32832. this.children.push(aChunk);
  32833. }
  32834. } else {
  32835. throw new TypeError(
  32836. "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
  32837. );
  32838. }
  32839. return this;
  32840. };
  32841. SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
  32842. if (Array.isArray(aChunk)) {
  32843. for (var i = aChunk.length - 1; i >= 0; i--) {
  32844. this.prepend(aChunk[i]);
  32845. }
  32846. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  32847. this.children.unshift(aChunk);
  32848. } else {
  32849. throw new TypeError(
  32850. "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
  32851. );
  32852. }
  32853. return this;
  32854. };
  32855. SourceNode.prototype.walk = function SourceNode_walk(aFn) {
  32856. var chunk;
  32857. for (var i = 0, len = this.children.length; i < len; i++) {
  32858. chunk = this.children[i];
  32859. if (chunk[isSourceNode]) {
  32860. chunk.walk(aFn);
  32861. } else {
  32862. if (chunk !== "") {
  32863. aFn(chunk, {
  32864. source: this.source,
  32865. line: this.line,
  32866. column: this.column,
  32867. name: this.name
  32868. });
  32869. }
  32870. }
  32871. }
  32872. };
  32873. SourceNode.prototype.join = function SourceNode_join(aSep) {
  32874. var newChildren;
  32875. var i;
  32876. var len = this.children.length;
  32877. if (len > 0) {
  32878. newChildren = [];
  32879. for (i = 0; i < len - 1; i++) {
  32880. newChildren.push(this.children[i]);
  32881. newChildren.push(aSep);
  32882. }
  32883. newChildren.push(this.children[i]);
  32884. this.children = newChildren;
  32885. }
  32886. return this;
  32887. };
  32888. SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  32889. var lastChild = this.children[this.children.length - 1];
  32890. if (lastChild[isSourceNode]) {
  32891. lastChild.replaceRight(aPattern, aReplacement);
  32892. } else if (typeof lastChild === "string") {
  32893. this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  32894. } else {
  32895. this.children.push("".replace(aPattern, aReplacement));
  32896. }
  32897. return this;
  32898. };
  32899. SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
  32900. this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
  32901. };
  32902. SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
  32903. for (var i = 0, len = this.children.length; i < len; i++) {
  32904. if (this.children[i][isSourceNode]) {
  32905. this.children[i].walkSourceContents(aFn);
  32906. }
  32907. }
  32908. var sources = Object.keys(this.sourceContents);
  32909. for (var i = 0, len = sources.length; i < len; i++) {
  32910. aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
  32911. }
  32912. };
  32913. SourceNode.prototype.toString = function SourceNode_toString() {
  32914. var str = "";
  32915. this.walk(function(chunk) {
  32916. str += chunk;
  32917. });
  32918. return str;
  32919. };
  32920. SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  32921. var generated2 = {
  32922. code: "",
  32923. line: 1,
  32924. column: 0
  32925. };
  32926. var map = new SourceMapGenerator(aArgs);
  32927. var sourceMappingActive = false;
  32928. var lastOriginalSource = null;
  32929. var lastOriginalLine = null;
  32930. var lastOriginalColumn = null;
  32931. var lastOriginalName = null;
  32932. this.walk(function(chunk, original) {
  32933. generated2.code += chunk;
  32934. if (original.source !== null && original.line !== null && original.column !== null) {
  32935. if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
  32936. map.addMapping({
  32937. source: original.source,
  32938. original: {
  32939. line: original.line,
  32940. column: original.column
  32941. },
  32942. generated: {
  32943. line: generated2.line,
  32944. column: generated2.column
  32945. },
  32946. name: original.name
  32947. });
  32948. }
  32949. lastOriginalSource = original.source;
  32950. lastOriginalLine = original.line;
  32951. lastOriginalColumn = original.column;
  32952. lastOriginalName = original.name;
  32953. sourceMappingActive = true;
  32954. } else if (sourceMappingActive) {
  32955. map.addMapping({
  32956. generated: {
  32957. line: generated2.line,
  32958. column: generated2.column
  32959. }
  32960. });
  32961. lastOriginalSource = null;
  32962. sourceMappingActive = false;
  32963. }
  32964. for (var idx = 0, length = chunk.length; idx < length; idx++) {
  32965. if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
  32966. generated2.line++;
  32967. generated2.column = 0;
  32968. if (idx + 1 === length) {
  32969. lastOriginalSource = null;
  32970. sourceMappingActive = false;
  32971. } else if (sourceMappingActive) {
  32972. map.addMapping({
  32973. source: original.source,
  32974. original: {
  32975. line: original.line,
  32976. column: original.column
  32977. },
  32978. generated: {
  32979. line: generated2.line,
  32980. column: generated2.column
  32981. },
  32982. name: original.name
  32983. });
  32984. }
  32985. } else {
  32986. generated2.column++;
  32987. }
  32988. }
  32989. });
  32990. this.walkSourceContents(function(sourceFile, sourceContent) {
  32991. map.setSourceContent(sourceFile, sourceContent);
  32992. });
  32993. return { code: generated2.code, map };
  32994. };
  32995. exports.SourceNode = SourceNode;
  32996. }
  32997. });
  32998. // node_modules/source-map/source-map.js
  32999. var require_source_map = __commonJS({
  33000. "node_modules/source-map/source-map.js"(exports) {
  33001. exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
  33002. exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
  33003. exports.SourceNode = require_source_node().SourceNode;
  33004. }
  33005. });
  33006. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/source-map.js
  33007. var require_source_map2 = __commonJS({
  33008. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/source-map.js"(exports) {
  33009. "use strict";
  33010. Object.defineProperty(exports, "__esModule", {
  33011. value: true
  33012. });
  33013. exports.default = void 0;
  33014. var _sourceMap = require_source_map();
  33015. var SourceMap = class {
  33016. constructor(opts, code2) {
  33017. this._cachedMap = void 0;
  33018. this._code = void 0;
  33019. this._opts = void 0;
  33020. this._rawMappings = void 0;
  33021. this._lastGenLine = void 0;
  33022. this._lastSourceLine = void 0;
  33023. this._lastSourceColumn = void 0;
  33024. this._cachedMap = null;
  33025. this._code = code2;
  33026. this._opts = opts;
  33027. this._rawMappings = [];
  33028. }
  33029. get() {
  33030. if (!this._cachedMap) {
  33031. const map = this._cachedMap = new _sourceMap.SourceMapGenerator({
  33032. sourceRoot: this._opts.sourceRoot
  33033. });
  33034. const code2 = this._code;
  33035. if (typeof code2 === "string") {
  33036. map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code2);
  33037. } else if (typeof code2 === "object") {
  33038. Object.keys(code2).forEach((sourceFileName) => {
  33039. map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code2[sourceFileName]);
  33040. });
  33041. }
  33042. this._rawMappings.forEach((mapping) => map.addMapping(mapping), map);
  33043. }
  33044. return this._cachedMap.toJSON();
  33045. }
  33046. getRawMappings() {
  33047. return this._rawMappings.slice();
  33048. }
  33049. mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
  33050. if (this._lastGenLine !== generatedLine && line === null)
  33051. return;
  33052. if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
  33053. return;
  33054. }
  33055. this._cachedMap = null;
  33056. this._lastGenLine = generatedLine;
  33057. this._lastSourceLine = line;
  33058. this._lastSourceColumn = column;
  33059. this._rawMappings.push({
  33060. name: identifierName || void 0,
  33061. generated: {
  33062. line: generatedLine,
  33063. column: generatedColumn
  33064. },
  33065. source: line == null ? void 0 : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
  33066. original: line == null ? void 0 : {
  33067. line,
  33068. column
  33069. }
  33070. });
  33071. }
  33072. };
  33073. exports.default = SourceMap;
  33074. }
  33075. });
  33076. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/buffer.js
  33077. var require_buffer = __commonJS({
  33078. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/buffer.js"(exports) {
  33079. "use strict";
  33080. Object.defineProperty(exports, "__esModule", {
  33081. value: true
  33082. });
  33083. exports.default = void 0;
  33084. var SPACES_RE = /^[ \t]+$/;
  33085. var Buffer2 = class {
  33086. constructor(map) {
  33087. this._map = null;
  33088. this._buf = [];
  33089. this._last = "";
  33090. this._queue = [];
  33091. this._position = {
  33092. line: 1,
  33093. column: 0
  33094. };
  33095. this._sourcePosition = {
  33096. identifierName: null,
  33097. line: null,
  33098. column: null,
  33099. filename: null
  33100. };
  33101. this._disallowedPop = null;
  33102. this._map = map;
  33103. }
  33104. get() {
  33105. this._flush();
  33106. const map = this._map;
  33107. const result = {
  33108. code: this._buf.join("").trimRight(),
  33109. map: null,
  33110. rawMappings: map == null ? void 0 : map.getRawMappings()
  33111. };
  33112. if (map) {
  33113. Object.defineProperty(result, "map", {
  33114. configurable: true,
  33115. enumerable: true,
  33116. get() {
  33117. return this.map = map.get();
  33118. },
  33119. set(value) {
  33120. Object.defineProperty(this, "map", {
  33121. value,
  33122. writable: true
  33123. });
  33124. }
  33125. });
  33126. }
  33127. return result;
  33128. }
  33129. append(str) {
  33130. this._flush();
  33131. const {
  33132. line,
  33133. column,
  33134. filename,
  33135. identifierName,
  33136. force
  33137. } = this._sourcePosition;
  33138. this._append(str, line, column, identifierName, filename, force);
  33139. }
  33140. queue(str) {
  33141. if (str === "\n") {
  33142. while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
  33143. this._queue.shift();
  33144. }
  33145. }
  33146. const {
  33147. line,
  33148. column,
  33149. filename,
  33150. identifierName,
  33151. force
  33152. } = this._sourcePosition;
  33153. this._queue.unshift([str, line, column, identifierName, filename, force]);
  33154. }
  33155. _flush() {
  33156. let item;
  33157. while (item = this._queue.pop()) {
  33158. this._append(...item);
  33159. }
  33160. }
  33161. _append(str, line, column, identifierName, filename, force) {
  33162. this._buf.push(str);
  33163. this._last = str[str.length - 1];
  33164. let i = str.indexOf("\n");
  33165. let last = 0;
  33166. if (i !== 0) {
  33167. this._mark(line, column, identifierName, filename, force);
  33168. }
  33169. while (i !== -1) {
  33170. this._position.line++;
  33171. this._position.column = 0;
  33172. last = i + 1;
  33173. if (last < str.length) {
  33174. this._mark(++line, 0, identifierName, filename, force);
  33175. }
  33176. i = str.indexOf("\n", last);
  33177. }
  33178. this._position.column += str.length - last;
  33179. }
  33180. _mark(line, column, identifierName, filename, force) {
  33181. var _this$_map;
  33182. (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
  33183. }
  33184. removeTrailingNewline() {
  33185. if (this._queue.length > 0 && this._queue[0][0] === "\n") {
  33186. this._queue.shift();
  33187. }
  33188. }
  33189. removeLastSemicolon() {
  33190. if (this._queue.length > 0 && this._queue[0][0] === ";") {
  33191. this._queue.shift();
  33192. }
  33193. }
  33194. endsWith(suffix) {
  33195. if (suffix.length === 1) {
  33196. let last;
  33197. if (this._queue.length > 0) {
  33198. const str = this._queue[0][0];
  33199. last = str[str.length - 1];
  33200. } else {
  33201. last = this._last;
  33202. }
  33203. return last === suffix;
  33204. }
  33205. const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, "");
  33206. if (suffix.length <= end.length) {
  33207. return end.slice(-suffix.length) === suffix;
  33208. }
  33209. return false;
  33210. }
  33211. hasContent() {
  33212. return this._queue.length > 0 || !!this._last;
  33213. }
  33214. exactSource(loc, cb) {
  33215. this.source("start", loc, true);
  33216. cb();
  33217. this.source("end", loc);
  33218. this._disallowPop("start", loc);
  33219. }
  33220. source(prop, loc, force) {
  33221. if (prop && !loc)
  33222. return;
  33223. this._normalizePosition(prop, loc, this._sourcePosition, force);
  33224. }
  33225. withSource(prop, loc, cb) {
  33226. if (!this._map)
  33227. return cb();
  33228. const originalLine = this._sourcePosition.line;
  33229. const originalColumn = this._sourcePosition.column;
  33230. const originalFilename = this._sourcePosition.filename;
  33231. const originalIdentifierName = this._sourcePosition.identifierName;
  33232. this.source(prop, loc);
  33233. cb();
  33234. 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)) {
  33235. this._sourcePosition.line = originalLine;
  33236. this._sourcePosition.column = originalColumn;
  33237. this._sourcePosition.filename = originalFilename;
  33238. this._sourcePosition.identifierName = originalIdentifierName;
  33239. this._sourcePosition.force = false;
  33240. this._disallowedPop = null;
  33241. }
  33242. }
  33243. _disallowPop(prop, loc) {
  33244. if (prop && !loc)
  33245. return;
  33246. this._disallowedPop = this._normalizePosition(prop, loc);
  33247. }
  33248. _normalizePosition(prop, loc, targetObj, force) {
  33249. const pos = loc ? loc[prop] : null;
  33250. if (targetObj === void 0) {
  33251. targetObj = {
  33252. identifierName: null,
  33253. line: null,
  33254. column: null,
  33255. filename: null,
  33256. force: false
  33257. };
  33258. }
  33259. const origLine = targetObj.line;
  33260. const origColumn = targetObj.column;
  33261. const origFilename = targetObj.filename;
  33262. targetObj.identifierName = prop === "start" && (loc == null ? void 0 : loc.identifierName) || null;
  33263. targetObj.line = pos == null ? void 0 : pos.line;
  33264. targetObj.column = pos == null ? void 0 : pos.column;
  33265. targetObj.filename = loc == null ? void 0 : loc.filename;
  33266. if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
  33267. targetObj.force = force;
  33268. }
  33269. return targetObj;
  33270. }
  33271. getCurrentColumn() {
  33272. const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
  33273. const lastIndex = extra.lastIndexOf("\n");
  33274. return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
  33275. }
  33276. getCurrentLine() {
  33277. const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
  33278. let count = 0;
  33279. for (let i = 0; i < extra.length; i++) {
  33280. if (extra[i] === "\n")
  33281. count++;
  33282. }
  33283. return this._position.line + count;
  33284. }
  33285. };
  33286. exports.default = Buffer2;
  33287. }
  33288. });
  33289. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/whitespace.js
  33290. var require_whitespace = __commonJS({
  33291. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/whitespace.js"(exports) {
  33292. "use strict";
  33293. Object.defineProperty(exports, "__esModule", {
  33294. value: true
  33295. });
  33296. exports.list = exports.nodes = void 0;
  33297. var t2 = require_lib4();
  33298. function crawl(node, state = {}) {
  33299. if (t2.isMemberExpression(node) || t2.isOptionalMemberExpression(node)) {
  33300. crawl(node.object, state);
  33301. if (node.computed)
  33302. crawl(node.property, state);
  33303. } else if (t2.isBinary(node) || t2.isAssignmentExpression(node)) {
  33304. crawl(node.left, state);
  33305. crawl(node.right, state);
  33306. } else if (t2.isCallExpression(node) || t2.isOptionalCallExpression(node)) {
  33307. state.hasCall = true;
  33308. crawl(node.callee, state);
  33309. } else if (t2.isFunction(node)) {
  33310. state.hasFunction = true;
  33311. } else if (t2.isIdentifier(node)) {
  33312. state.hasHelper = state.hasHelper || isHelper(node.callee);
  33313. }
  33314. return state;
  33315. }
  33316. function isHelper(node) {
  33317. if (t2.isMemberExpression(node)) {
  33318. return isHelper(node.object) || isHelper(node.property);
  33319. } else if (t2.isIdentifier(node)) {
  33320. return node.name === "require" || node.name[0] === "_";
  33321. } else if (t2.isCallExpression(node)) {
  33322. return isHelper(node.callee);
  33323. } else if (t2.isBinary(node) || t2.isAssignmentExpression(node)) {
  33324. return t2.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
  33325. } else {
  33326. return false;
  33327. }
  33328. }
  33329. function isType(node) {
  33330. return t2.isLiteral(node) || t2.isObjectExpression(node) || t2.isArrayExpression(node) || t2.isIdentifier(node) || t2.isMemberExpression(node);
  33331. }
  33332. var nodes = {
  33333. AssignmentExpression(node) {
  33334. const state = crawl(node.right);
  33335. if (state.hasCall && state.hasHelper || state.hasFunction) {
  33336. return {
  33337. before: state.hasFunction,
  33338. after: true
  33339. };
  33340. }
  33341. },
  33342. SwitchCase(node, parent) {
  33343. return {
  33344. before: !!node.consequent.length || parent.cases[0] === node,
  33345. after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
  33346. };
  33347. },
  33348. LogicalExpression(node) {
  33349. if (t2.isFunction(node.left) || t2.isFunction(node.right)) {
  33350. return {
  33351. after: true
  33352. };
  33353. }
  33354. },
  33355. Literal(node) {
  33356. if (t2.isStringLiteral(node) && node.value === "use strict") {
  33357. return {
  33358. after: true
  33359. };
  33360. }
  33361. },
  33362. CallExpression(node) {
  33363. if (t2.isFunction(node.callee) || isHelper(node)) {
  33364. return {
  33365. before: true,
  33366. after: true
  33367. };
  33368. }
  33369. },
  33370. OptionalCallExpression(node) {
  33371. if (t2.isFunction(node.callee)) {
  33372. return {
  33373. before: true,
  33374. after: true
  33375. };
  33376. }
  33377. },
  33378. VariableDeclaration(node) {
  33379. for (let i = 0; i < node.declarations.length; i++) {
  33380. const declar = node.declarations[i];
  33381. let enabled = isHelper(declar.id) && !isType(declar.init);
  33382. if (!enabled) {
  33383. const state = crawl(declar.init);
  33384. enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
  33385. }
  33386. if (enabled) {
  33387. return {
  33388. before: true,
  33389. after: true
  33390. };
  33391. }
  33392. }
  33393. },
  33394. IfStatement(node) {
  33395. if (t2.isBlockStatement(node.consequent)) {
  33396. return {
  33397. before: true,
  33398. after: true
  33399. };
  33400. }
  33401. }
  33402. };
  33403. exports.nodes = nodes;
  33404. nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function(node, parent) {
  33405. if (parent.properties[0] === node) {
  33406. return {
  33407. before: true
  33408. };
  33409. }
  33410. };
  33411. nodes.ObjectTypeCallProperty = function(node, parent) {
  33412. var _parent$properties;
  33413. if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {
  33414. return {
  33415. before: true
  33416. };
  33417. }
  33418. };
  33419. nodes.ObjectTypeIndexer = function(node, parent) {
  33420. var _parent$properties2, _parent$callPropertie;
  33421. if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {
  33422. return {
  33423. before: true
  33424. };
  33425. }
  33426. };
  33427. nodes.ObjectTypeInternalSlot = function(node, parent) {
  33428. var _parent$properties3, _parent$callPropertie2, _parent$indexers;
  33429. if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {
  33430. return {
  33431. before: true
  33432. };
  33433. }
  33434. };
  33435. var list3 = {
  33436. VariableDeclaration(node) {
  33437. return node.declarations.map((decl) => decl.init);
  33438. },
  33439. ArrayExpression(node) {
  33440. return node.elements;
  33441. },
  33442. ObjectExpression(node) {
  33443. return node.properties;
  33444. }
  33445. };
  33446. exports.list = list3;
  33447. [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function([type, amounts]) {
  33448. if (typeof amounts === "boolean") {
  33449. amounts = {
  33450. after: amounts,
  33451. before: amounts
  33452. };
  33453. }
  33454. [type].concat(t2.FLIPPED_ALIAS_KEYS[type] || []).forEach(function(type2) {
  33455. nodes[type2] = function() {
  33456. return amounts;
  33457. };
  33458. });
  33459. });
  33460. }
  33461. });
  33462. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/parentheses.js
  33463. var require_parentheses = __commonJS({
  33464. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/parentheses.js"(exports) {
  33465. "use strict";
  33466. Object.defineProperty(exports, "__esModule", {
  33467. value: true
  33468. });
  33469. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  33470. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  33471. exports.UpdateExpression = UpdateExpression;
  33472. exports.ObjectExpression = ObjectExpression;
  33473. exports.DoExpression = DoExpression;
  33474. exports.Binary = Binary;
  33475. exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
  33476. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  33477. exports.TSAsExpression = TSAsExpression;
  33478. exports.TSTypeAssertion = TSTypeAssertion;
  33479. exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
  33480. exports.TSInferType = TSInferType;
  33481. exports.BinaryExpression = BinaryExpression2;
  33482. exports.SequenceExpression = SequenceExpression;
  33483. exports.AwaitExpression = exports.YieldExpression = YieldExpression;
  33484. exports.ClassExpression = ClassExpression;
  33485. exports.UnaryLike = UnaryLike;
  33486. exports.FunctionExpression = FunctionExpression;
  33487. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  33488. exports.ConditionalExpression = ConditionalExpression;
  33489. exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
  33490. exports.AssignmentExpression = AssignmentExpression;
  33491. exports.LogicalExpression = LogicalExpression;
  33492. exports.Identifier = Identifier;
  33493. var t2 = require_lib4();
  33494. var PRECEDENCE = {
  33495. "||": 0,
  33496. "??": 0,
  33497. "&&": 1,
  33498. "|": 2,
  33499. "^": 3,
  33500. "&": 4,
  33501. "==": 5,
  33502. "===": 5,
  33503. "!=": 5,
  33504. "!==": 5,
  33505. "<": 6,
  33506. ">": 6,
  33507. "<=": 6,
  33508. ">=": 6,
  33509. in: 6,
  33510. instanceof: 6,
  33511. ">>": 7,
  33512. "<<": 7,
  33513. ">>>": 7,
  33514. "+": 8,
  33515. "-": 8,
  33516. "*": 9,
  33517. "/": 9,
  33518. "%": 9,
  33519. "**": 10
  33520. };
  33521. var isClassExtendsClause = (node, parent) => (t2.isClassDeclaration(parent) || t2.isClassExpression(parent)) && parent.superClass === node;
  33522. var hasPostfixPart = (node, parent) => (t2.isMemberExpression(parent) || t2.isOptionalMemberExpression(parent)) && parent.object === node || (t2.isCallExpression(parent) || t2.isOptionalCallExpression(parent) || t2.isNewExpression(parent)) && parent.callee === node || t2.isTaggedTemplateExpression(parent) && parent.tag === node || t2.isTSNonNullExpression(parent);
  33523. function NullableTypeAnnotation(node, parent) {
  33524. return t2.isArrayTypeAnnotation(parent);
  33525. }
  33526. function FunctionTypeAnnotation(node, parent, printStack) {
  33527. return t2.isUnionTypeAnnotation(parent) || t2.isIntersectionTypeAnnotation(parent) || t2.isArrayTypeAnnotation(parent) || t2.isTypeAnnotation(parent) && t2.isArrowFunctionExpression(printStack[printStack.length - 3]);
  33528. }
  33529. function UpdateExpression(node, parent) {
  33530. return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
  33531. }
  33532. function ObjectExpression(node, parent, printStack) {
  33533. return isFirstInContext(printStack, {
  33534. expressionStatement: true,
  33535. arrowBody: true
  33536. });
  33537. }
  33538. function DoExpression(node, parent, printStack) {
  33539. return !node.async && isFirstInContext(printStack, {
  33540. expressionStatement: true
  33541. });
  33542. }
  33543. function Binary(node, parent) {
  33544. if (node.operator === "**" && t2.isBinaryExpression(parent, {
  33545. operator: "**"
  33546. })) {
  33547. return parent.left === node;
  33548. }
  33549. if (isClassExtendsClause(node, parent)) {
  33550. return true;
  33551. }
  33552. if (hasPostfixPart(node, parent) || t2.isUnaryLike(parent) || t2.isAwaitExpression(parent)) {
  33553. return true;
  33554. }
  33555. if (t2.isBinary(parent)) {
  33556. const parentOp = parent.operator;
  33557. const parentPos = PRECEDENCE[parentOp];
  33558. const nodeOp = node.operator;
  33559. const nodePos = PRECEDENCE[nodeOp];
  33560. if (parentPos === nodePos && parent.right === node && !t2.isLogicalExpression(parent) || parentPos > nodePos) {
  33561. return true;
  33562. }
  33563. }
  33564. }
  33565. function UnionTypeAnnotation(node, parent) {
  33566. return t2.isArrayTypeAnnotation(parent) || t2.isNullableTypeAnnotation(parent) || t2.isIntersectionTypeAnnotation(parent) || t2.isUnionTypeAnnotation(parent);
  33567. }
  33568. function OptionalIndexedAccessType(node, parent) {
  33569. return t2.isIndexedAccessType(parent, {
  33570. objectType: node
  33571. });
  33572. }
  33573. function TSAsExpression() {
  33574. return true;
  33575. }
  33576. function TSTypeAssertion() {
  33577. return true;
  33578. }
  33579. function TSUnionType(node, parent) {
  33580. return t2.isTSArrayType(parent) || t2.isTSOptionalType(parent) || t2.isTSIntersectionType(parent) || t2.isTSUnionType(parent) || t2.isTSRestType(parent);
  33581. }
  33582. function TSInferType(node, parent) {
  33583. return t2.isTSArrayType(parent) || t2.isTSOptionalType(parent);
  33584. }
  33585. function BinaryExpression2(node, parent) {
  33586. return node.operator === "in" && (t2.isVariableDeclarator(parent) || t2.isFor(parent));
  33587. }
  33588. function SequenceExpression(node, parent) {
  33589. if (t2.isForStatement(parent) || t2.isThrowStatement(parent) || t2.isReturnStatement(parent) || t2.isIfStatement(parent) && parent.test === node || t2.isWhileStatement(parent) && parent.test === node || t2.isForInStatement(parent) && parent.right === node || t2.isSwitchStatement(parent) && parent.discriminant === node || t2.isExpressionStatement(parent) && parent.expression === node) {
  33590. return false;
  33591. }
  33592. return true;
  33593. }
  33594. function YieldExpression(node, parent) {
  33595. return t2.isBinary(parent) || t2.isUnaryLike(parent) || hasPostfixPart(node, parent) || t2.isAwaitExpression(parent) && t2.isYieldExpression(node) || t2.isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
  33596. }
  33597. function ClassExpression(node, parent, printStack) {
  33598. return isFirstInContext(printStack, {
  33599. expressionStatement: true,
  33600. exportDefault: true
  33601. });
  33602. }
  33603. function UnaryLike(node, parent) {
  33604. return hasPostfixPart(node, parent) || t2.isBinaryExpression(parent, {
  33605. operator: "**",
  33606. left: node
  33607. }) || isClassExtendsClause(node, parent);
  33608. }
  33609. function FunctionExpression(node, parent, printStack) {
  33610. return isFirstInContext(printStack, {
  33611. expressionStatement: true,
  33612. exportDefault: true
  33613. });
  33614. }
  33615. function ArrowFunctionExpression(node, parent) {
  33616. return t2.isExportDeclaration(parent) || ConditionalExpression(node, parent);
  33617. }
  33618. function ConditionalExpression(node, parent) {
  33619. if (t2.isUnaryLike(parent) || t2.isBinary(parent) || t2.isConditionalExpression(parent, {
  33620. test: node
  33621. }) || t2.isAwaitExpression(parent) || t2.isTSTypeAssertion(parent) || t2.isTSAsExpression(parent)) {
  33622. return true;
  33623. }
  33624. return UnaryLike(node, parent);
  33625. }
  33626. function OptionalMemberExpression(node, parent) {
  33627. return t2.isCallExpression(parent, {
  33628. callee: node
  33629. }) || t2.isMemberExpression(parent, {
  33630. object: node
  33631. });
  33632. }
  33633. function AssignmentExpression(node, parent) {
  33634. if (t2.isObjectPattern(node.left)) {
  33635. return true;
  33636. } else {
  33637. return ConditionalExpression(node, parent);
  33638. }
  33639. }
  33640. function LogicalExpression(node, parent) {
  33641. switch (node.operator) {
  33642. case "||":
  33643. if (!t2.isLogicalExpression(parent))
  33644. return false;
  33645. return parent.operator === "??" || parent.operator === "&&";
  33646. case "&&":
  33647. return t2.isLogicalExpression(parent, {
  33648. operator: "??"
  33649. });
  33650. case "??":
  33651. return t2.isLogicalExpression(parent) && parent.operator !== "??";
  33652. }
  33653. }
  33654. function Identifier(node, parent, printStack) {
  33655. if (node.name === "let") {
  33656. const isFollowedByBracket = t2.isMemberExpression(parent, {
  33657. object: node,
  33658. computed: true
  33659. }) || t2.isOptionalMemberExpression(parent, {
  33660. object: node,
  33661. computed: true,
  33662. optional: false
  33663. });
  33664. return isFirstInContext(printStack, {
  33665. expressionStatement: isFollowedByBracket,
  33666. forHead: isFollowedByBracket,
  33667. forInHead: isFollowedByBracket,
  33668. forOfHead: true
  33669. });
  33670. }
  33671. return node.name === "async" && t2.isForOfStatement(parent) && node === parent.left;
  33672. }
  33673. function isFirstInContext(printStack, {
  33674. expressionStatement = false,
  33675. arrowBody = false,
  33676. exportDefault = false,
  33677. forHead = false,
  33678. forInHead = false,
  33679. forOfHead = false
  33680. }) {
  33681. let i = printStack.length - 1;
  33682. let node = printStack[i];
  33683. i--;
  33684. let parent = printStack[i];
  33685. while (i >= 0) {
  33686. if (expressionStatement && t2.isExpressionStatement(parent, {
  33687. expression: node
  33688. }) || exportDefault && t2.isExportDefaultDeclaration(parent, {
  33689. declaration: node
  33690. }) || arrowBody && t2.isArrowFunctionExpression(parent, {
  33691. body: node
  33692. }) || forHead && t2.isForStatement(parent, {
  33693. init: node
  33694. }) || forInHead && t2.isForInStatement(parent, {
  33695. left: node
  33696. }) || forOfHead && t2.isForOfStatement(parent, {
  33697. left: node
  33698. })) {
  33699. return true;
  33700. }
  33701. if (hasPostfixPart(node, parent) && !t2.isNewExpression(parent) || t2.isSequenceExpression(parent) && parent.expressions[0] === node || t2.isConditional(parent, {
  33702. test: node
  33703. }) || t2.isBinary(parent, {
  33704. left: node
  33705. }) || t2.isAssignmentExpression(parent, {
  33706. left: node
  33707. })) {
  33708. node = parent;
  33709. i--;
  33710. parent = printStack[i];
  33711. } else {
  33712. return false;
  33713. }
  33714. }
  33715. return false;
  33716. }
  33717. }
  33718. });
  33719. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/index.js
  33720. var require_node2 = __commonJS({
  33721. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/node/index.js"(exports) {
  33722. "use strict";
  33723. Object.defineProperty(exports, "__esModule", {
  33724. value: true
  33725. });
  33726. exports.needsWhitespace = needsWhitespace;
  33727. exports.needsWhitespaceBefore = needsWhitespaceBefore;
  33728. exports.needsWhitespaceAfter = needsWhitespaceAfter;
  33729. exports.needsParens = needsParens;
  33730. var whitespace2 = require_whitespace();
  33731. var parens = require_parentheses();
  33732. var t2 = require_lib4();
  33733. function expandAliases(obj) {
  33734. const newObj = {};
  33735. function add(type, func) {
  33736. const fn = newObj[type];
  33737. newObj[type] = fn ? function(node, parent, stack) {
  33738. const result = fn(node, parent, stack);
  33739. return result == null ? func(node, parent, stack) : result;
  33740. } : func;
  33741. }
  33742. for (const type of Object.keys(obj)) {
  33743. const aliases = t2.FLIPPED_ALIAS_KEYS[type];
  33744. if (aliases) {
  33745. for (const alias of aliases) {
  33746. add(alias, obj[type]);
  33747. }
  33748. } else {
  33749. add(type, obj[type]);
  33750. }
  33751. }
  33752. return newObj;
  33753. }
  33754. var expandedParens = expandAliases(parens);
  33755. var expandedWhitespaceNodes = expandAliases(whitespace2.nodes);
  33756. var expandedWhitespaceList = expandAliases(whitespace2.list);
  33757. function find2(obj, node, parent, printStack) {
  33758. const fn = obj[node.type];
  33759. return fn ? fn(node, parent, printStack) : null;
  33760. }
  33761. function isOrHasCallExpression(node) {
  33762. if (t2.isCallExpression(node)) {
  33763. return true;
  33764. }
  33765. return t2.isMemberExpression(node) && isOrHasCallExpression(node.object);
  33766. }
  33767. function needsWhitespace(node, parent, type) {
  33768. if (!node)
  33769. return 0;
  33770. if (t2.isExpressionStatement(node)) {
  33771. node = node.expression;
  33772. }
  33773. let linesInfo = find2(expandedWhitespaceNodes, node, parent);
  33774. if (!linesInfo) {
  33775. const items = find2(expandedWhitespaceList, node, parent);
  33776. if (items) {
  33777. for (let i = 0; i < items.length; i++) {
  33778. linesInfo = needsWhitespace(items[i], node, type);
  33779. if (linesInfo)
  33780. break;
  33781. }
  33782. }
  33783. }
  33784. if (typeof linesInfo === "object" && linesInfo !== null) {
  33785. return linesInfo[type] || 0;
  33786. }
  33787. return 0;
  33788. }
  33789. function needsWhitespaceBefore(node, parent) {
  33790. return needsWhitespace(node, parent, "before");
  33791. }
  33792. function needsWhitespaceAfter(node, parent) {
  33793. return needsWhitespace(node, parent, "after");
  33794. }
  33795. function needsParens(node, parent, printStack) {
  33796. if (!parent)
  33797. return false;
  33798. if (t2.isNewExpression(parent) && parent.callee === node) {
  33799. if (isOrHasCallExpression(node))
  33800. return true;
  33801. }
  33802. return find2(expandedParens, node, parent, printStack);
  33803. }
  33804. }
  33805. });
  33806. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/template-literals.js
  33807. var require_template_literals = __commonJS({
  33808. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/template-literals.js"(exports) {
  33809. "use strict";
  33810. Object.defineProperty(exports, "__esModule", {
  33811. value: true
  33812. });
  33813. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  33814. exports.TemplateElement = TemplateElement;
  33815. exports.TemplateLiteral = TemplateLiteral;
  33816. var t2 = require_lib4();
  33817. function TaggedTemplateExpression(node) {
  33818. this.print(node.tag, node);
  33819. this.print(node.typeParameters, node);
  33820. this.print(node.quasi, node);
  33821. }
  33822. function TemplateElement(node, parent) {
  33823. const isFirst = parent.quasis[0] === node;
  33824. const isLast = parent.quasis[parent.quasis.length - 1] === node;
  33825. const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
  33826. this.token(value);
  33827. }
  33828. function TemplateLiteral(node) {
  33829. const quasis = node.quasis;
  33830. for (let i = 0; i < quasis.length; i++) {
  33831. this.print(quasis[i], node);
  33832. if (i + 1 < quasis.length) {
  33833. this.print(node.expressions[i], node);
  33834. }
  33835. }
  33836. }
  33837. }
  33838. });
  33839. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/expressions.js
  33840. var require_expressions = __commonJS({
  33841. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/expressions.js"(exports) {
  33842. "use strict";
  33843. Object.defineProperty(exports, "__esModule", {
  33844. value: true
  33845. });
  33846. exports.UnaryExpression = UnaryExpression;
  33847. exports.DoExpression = DoExpression;
  33848. exports.ParenthesizedExpression = ParenthesizedExpression;
  33849. exports.UpdateExpression = UpdateExpression;
  33850. exports.ConditionalExpression = ConditionalExpression;
  33851. exports.NewExpression = NewExpression;
  33852. exports.SequenceExpression = SequenceExpression;
  33853. exports.ThisExpression = ThisExpression;
  33854. exports.Super = Super;
  33855. exports.Decorator = Decorator;
  33856. exports.OptionalMemberExpression = OptionalMemberExpression;
  33857. exports.OptionalCallExpression = OptionalCallExpression;
  33858. exports.CallExpression = CallExpression;
  33859. exports.Import = Import;
  33860. exports.EmptyStatement = EmptyStatement;
  33861. exports.ExpressionStatement = ExpressionStatement;
  33862. exports.AssignmentPattern = AssignmentPattern;
  33863. exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
  33864. exports.BindExpression = BindExpression;
  33865. exports.MemberExpression = MemberExpression;
  33866. exports.MetaProperty = MetaProperty;
  33867. exports.PrivateName = PrivateName;
  33868. exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
  33869. exports.ModuleExpression = ModuleExpression;
  33870. exports.AwaitExpression = exports.YieldExpression = void 0;
  33871. var t2 = require_lib4();
  33872. var n = require_node2();
  33873. function UnaryExpression(node) {
  33874. if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
  33875. this.word(node.operator);
  33876. this.space();
  33877. } else {
  33878. this.token(node.operator);
  33879. }
  33880. this.print(node.argument, node);
  33881. }
  33882. function DoExpression(node) {
  33883. if (node.async) {
  33884. this.word("async");
  33885. this.space();
  33886. }
  33887. this.word("do");
  33888. this.space();
  33889. this.print(node.body, node);
  33890. }
  33891. function ParenthesizedExpression(node) {
  33892. this.token("(");
  33893. this.print(node.expression, node);
  33894. this.token(")");
  33895. }
  33896. function UpdateExpression(node) {
  33897. if (node.prefix) {
  33898. this.token(node.operator);
  33899. this.print(node.argument, node);
  33900. } else {
  33901. this.startTerminatorless(true);
  33902. this.print(node.argument, node);
  33903. this.endTerminatorless();
  33904. this.token(node.operator);
  33905. }
  33906. }
  33907. function ConditionalExpression(node) {
  33908. this.print(node.test, node);
  33909. this.space();
  33910. this.token("?");
  33911. this.space();
  33912. this.print(node.consequent, node);
  33913. this.space();
  33914. this.token(":");
  33915. this.space();
  33916. this.print(node.alternate, node);
  33917. }
  33918. function NewExpression(node, parent) {
  33919. this.word("new");
  33920. this.space();
  33921. this.print(node.callee, node);
  33922. if (this.format.minified && node.arguments.length === 0 && !node.optional && !t2.isCallExpression(parent, {
  33923. callee: node
  33924. }) && !t2.isMemberExpression(parent) && !t2.isNewExpression(parent)) {
  33925. return;
  33926. }
  33927. this.print(node.typeArguments, node);
  33928. this.print(node.typeParameters, node);
  33929. if (node.optional) {
  33930. this.token("?.");
  33931. }
  33932. this.token("(");
  33933. this.printList(node.arguments, node);
  33934. this.token(")");
  33935. }
  33936. function SequenceExpression(node) {
  33937. this.printList(node.expressions, node);
  33938. }
  33939. function ThisExpression() {
  33940. this.word("this");
  33941. }
  33942. function Super() {
  33943. this.word("super");
  33944. }
  33945. function Decorator(node) {
  33946. this.token("@");
  33947. this.print(node.expression, node);
  33948. this.newline();
  33949. }
  33950. function OptionalMemberExpression(node) {
  33951. this.print(node.object, node);
  33952. if (!node.computed && t2.isMemberExpression(node.property)) {
  33953. throw new TypeError("Got a MemberExpression for MemberExpression property");
  33954. }
  33955. let computed = node.computed;
  33956. if (t2.isLiteral(node.property) && typeof node.property.value === "number") {
  33957. computed = true;
  33958. }
  33959. if (node.optional) {
  33960. this.token("?.");
  33961. }
  33962. if (computed) {
  33963. this.token("[");
  33964. this.print(node.property, node);
  33965. this.token("]");
  33966. } else {
  33967. if (!node.optional) {
  33968. this.token(".");
  33969. }
  33970. this.print(node.property, node);
  33971. }
  33972. }
  33973. function OptionalCallExpression(node) {
  33974. this.print(node.callee, node);
  33975. this.print(node.typeArguments, node);
  33976. this.print(node.typeParameters, node);
  33977. if (node.optional) {
  33978. this.token("?.");
  33979. }
  33980. this.token("(");
  33981. this.printList(node.arguments, node);
  33982. this.token(")");
  33983. }
  33984. function CallExpression(node) {
  33985. this.print(node.callee, node);
  33986. this.print(node.typeArguments, node);
  33987. this.print(node.typeParameters, node);
  33988. this.token("(");
  33989. this.printList(node.arguments, node);
  33990. this.token(")");
  33991. }
  33992. function Import() {
  33993. this.word("import");
  33994. }
  33995. function buildYieldAwait(keyword) {
  33996. return function(node) {
  33997. this.word(keyword);
  33998. if (node.delegate) {
  33999. this.token("*");
  34000. }
  34001. if (node.argument) {
  34002. this.space();
  34003. const terminatorState = this.startTerminatorless();
  34004. this.print(node.argument, node);
  34005. this.endTerminatorless(terminatorState);
  34006. }
  34007. };
  34008. }
  34009. var YieldExpression = buildYieldAwait("yield");
  34010. exports.YieldExpression = YieldExpression;
  34011. var AwaitExpression = buildYieldAwait("await");
  34012. exports.AwaitExpression = AwaitExpression;
  34013. function EmptyStatement() {
  34014. this.semicolon(true);
  34015. }
  34016. function ExpressionStatement(node) {
  34017. this.print(node.expression, node);
  34018. this.semicolon();
  34019. }
  34020. function AssignmentPattern(node) {
  34021. this.print(node.left, node);
  34022. if (node.left.optional)
  34023. this.token("?");
  34024. this.print(node.left.typeAnnotation, node);
  34025. this.space();
  34026. this.token("=");
  34027. this.space();
  34028. this.print(node.right, node);
  34029. }
  34030. function AssignmentExpression(node, parent) {
  34031. const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
  34032. if (parens) {
  34033. this.token("(");
  34034. }
  34035. this.print(node.left, node);
  34036. this.space();
  34037. if (node.operator === "in" || node.operator === "instanceof") {
  34038. this.word(node.operator);
  34039. } else {
  34040. this.token(node.operator);
  34041. }
  34042. this.space();
  34043. this.print(node.right, node);
  34044. if (parens) {
  34045. this.token(")");
  34046. }
  34047. }
  34048. function BindExpression(node) {
  34049. this.print(node.object, node);
  34050. this.token("::");
  34051. this.print(node.callee, node);
  34052. }
  34053. function MemberExpression(node) {
  34054. this.print(node.object, node);
  34055. if (!node.computed && t2.isMemberExpression(node.property)) {
  34056. throw new TypeError("Got a MemberExpression for MemberExpression property");
  34057. }
  34058. let computed = node.computed;
  34059. if (t2.isLiteral(node.property) && typeof node.property.value === "number") {
  34060. computed = true;
  34061. }
  34062. if (computed) {
  34063. this.token("[");
  34064. this.print(node.property, node);
  34065. this.token("]");
  34066. } else {
  34067. this.token(".");
  34068. this.print(node.property, node);
  34069. }
  34070. }
  34071. function MetaProperty(node) {
  34072. this.print(node.meta, node);
  34073. this.token(".");
  34074. this.print(node.property, node);
  34075. }
  34076. function PrivateName(node) {
  34077. this.token("#");
  34078. this.print(node.id, node);
  34079. }
  34080. function V8IntrinsicIdentifier(node) {
  34081. this.token("%");
  34082. this.word(node.name);
  34083. }
  34084. function ModuleExpression(node) {
  34085. this.word("module");
  34086. this.space();
  34087. this.token("{");
  34088. if (node.body.body.length === 0) {
  34089. this.token("}");
  34090. } else {
  34091. this.newline();
  34092. this.printSequence(node.body.body, node, {
  34093. indent: true
  34094. });
  34095. this.rightBrace();
  34096. }
  34097. }
  34098. }
  34099. });
  34100. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/statements.js
  34101. var require_statements = __commonJS({
  34102. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/statements.js"(exports) {
  34103. "use strict";
  34104. Object.defineProperty(exports, "__esModule", {
  34105. value: true
  34106. });
  34107. exports.WithStatement = WithStatement;
  34108. exports.IfStatement = IfStatement;
  34109. exports.ForStatement = ForStatement;
  34110. exports.WhileStatement = WhileStatement;
  34111. exports.DoWhileStatement = DoWhileStatement;
  34112. exports.LabeledStatement = LabeledStatement;
  34113. exports.TryStatement = TryStatement;
  34114. exports.CatchClause = CatchClause;
  34115. exports.SwitchStatement = SwitchStatement;
  34116. exports.SwitchCase = SwitchCase;
  34117. exports.DebuggerStatement = DebuggerStatement;
  34118. exports.VariableDeclaration = VariableDeclaration;
  34119. exports.VariableDeclarator = VariableDeclarator;
  34120. exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0;
  34121. var t2 = require_lib4();
  34122. function WithStatement(node) {
  34123. this.word("with");
  34124. this.space();
  34125. this.token("(");
  34126. this.print(node.object, node);
  34127. this.token(")");
  34128. this.printBlock(node);
  34129. }
  34130. function IfStatement(node) {
  34131. this.word("if");
  34132. this.space();
  34133. this.token("(");
  34134. this.print(node.test, node);
  34135. this.token(")");
  34136. this.space();
  34137. const needsBlock = node.alternate && t2.isIfStatement(getLastStatement(node.consequent));
  34138. if (needsBlock) {
  34139. this.token("{");
  34140. this.newline();
  34141. this.indent();
  34142. }
  34143. this.printAndIndentOnComments(node.consequent, node);
  34144. if (needsBlock) {
  34145. this.dedent();
  34146. this.newline();
  34147. this.token("}");
  34148. }
  34149. if (node.alternate) {
  34150. if (this.endsWith("}"))
  34151. this.space();
  34152. this.word("else");
  34153. this.space();
  34154. this.printAndIndentOnComments(node.alternate, node);
  34155. }
  34156. }
  34157. function getLastStatement(statement) {
  34158. if (!t2.isStatement(statement.body))
  34159. return statement;
  34160. return getLastStatement(statement.body);
  34161. }
  34162. function ForStatement(node) {
  34163. this.word("for");
  34164. this.space();
  34165. this.token("(");
  34166. this.inForStatementInitCounter++;
  34167. this.print(node.init, node);
  34168. this.inForStatementInitCounter--;
  34169. this.token(";");
  34170. if (node.test) {
  34171. this.space();
  34172. this.print(node.test, node);
  34173. }
  34174. this.token(";");
  34175. if (node.update) {
  34176. this.space();
  34177. this.print(node.update, node);
  34178. }
  34179. this.token(")");
  34180. this.printBlock(node);
  34181. }
  34182. function WhileStatement(node) {
  34183. this.word("while");
  34184. this.space();
  34185. this.token("(");
  34186. this.print(node.test, node);
  34187. this.token(")");
  34188. this.printBlock(node);
  34189. }
  34190. var buildForXStatement = function(op) {
  34191. return function(node) {
  34192. this.word("for");
  34193. this.space();
  34194. if (op === "of" && node.await) {
  34195. this.word("await");
  34196. this.space();
  34197. }
  34198. this.token("(");
  34199. this.print(node.left, node);
  34200. this.space();
  34201. this.word(op);
  34202. this.space();
  34203. this.print(node.right, node);
  34204. this.token(")");
  34205. this.printBlock(node);
  34206. };
  34207. };
  34208. var ForInStatement2 = buildForXStatement("in");
  34209. exports.ForInStatement = ForInStatement2;
  34210. var ForOfStatement = buildForXStatement("of");
  34211. exports.ForOfStatement = ForOfStatement;
  34212. function DoWhileStatement(node) {
  34213. this.word("do");
  34214. this.space();
  34215. this.print(node.body, node);
  34216. this.space();
  34217. this.word("while");
  34218. this.space();
  34219. this.token("(");
  34220. this.print(node.test, node);
  34221. this.token(")");
  34222. this.semicolon();
  34223. }
  34224. function buildLabelStatement(prefix, key = "label") {
  34225. return function(node) {
  34226. this.word(prefix);
  34227. const label = node[key];
  34228. if (label) {
  34229. this.space();
  34230. const isLabel = key == "label";
  34231. const terminatorState = this.startTerminatorless(isLabel);
  34232. this.print(label, node);
  34233. this.endTerminatorless(terminatorState);
  34234. }
  34235. this.semicolon();
  34236. };
  34237. }
  34238. var ContinueStatement = buildLabelStatement("continue");
  34239. exports.ContinueStatement = ContinueStatement;
  34240. var ReturnStatement = buildLabelStatement("return", "argument");
  34241. exports.ReturnStatement = ReturnStatement;
  34242. var BreakStatement = buildLabelStatement("break");
  34243. exports.BreakStatement = BreakStatement;
  34244. var ThrowStatement = buildLabelStatement("throw", "argument");
  34245. exports.ThrowStatement = ThrowStatement;
  34246. function LabeledStatement(node) {
  34247. this.print(node.label, node);
  34248. this.token(":");
  34249. this.space();
  34250. this.print(node.body, node);
  34251. }
  34252. function TryStatement(node) {
  34253. this.word("try");
  34254. this.space();
  34255. this.print(node.block, node);
  34256. this.space();
  34257. if (node.handlers) {
  34258. this.print(node.handlers[0], node);
  34259. } else {
  34260. this.print(node.handler, node);
  34261. }
  34262. if (node.finalizer) {
  34263. this.space();
  34264. this.word("finally");
  34265. this.space();
  34266. this.print(node.finalizer, node);
  34267. }
  34268. }
  34269. function CatchClause(node) {
  34270. this.word("catch");
  34271. this.space();
  34272. if (node.param) {
  34273. this.token("(");
  34274. this.print(node.param, node);
  34275. this.print(node.param.typeAnnotation, node);
  34276. this.token(")");
  34277. this.space();
  34278. }
  34279. this.print(node.body, node);
  34280. }
  34281. function SwitchStatement(node) {
  34282. this.word("switch");
  34283. this.space();
  34284. this.token("(");
  34285. this.print(node.discriminant, node);
  34286. this.token(")");
  34287. this.space();
  34288. this.token("{");
  34289. this.printSequence(node.cases, node, {
  34290. indent: true,
  34291. addNewlines(leading, cas) {
  34292. if (!leading && node.cases[node.cases.length - 1] === cas)
  34293. return -1;
  34294. }
  34295. });
  34296. this.token("}");
  34297. }
  34298. function SwitchCase(node) {
  34299. if (node.test) {
  34300. this.word("case");
  34301. this.space();
  34302. this.print(node.test, node);
  34303. this.token(":");
  34304. } else {
  34305. this.word("default");
  34306. this.token(":");
  34307. }
  34308. if (node.consequent.length) {
  34309. this.newline();
  34310. this.printSequence(node.consequent, node, {
  34311. indent: true
  34312. });
  34313. }
  34314. }
  34315. function DebuggerStatement() {
  34316. this.word("debugger");
  34317. this.semicolon();
  34318. }
  34319. function variableDeclarationIndent() {
  34320. this.token(",");
  34321. this.newline();
  34322. if (this.endsWith("\n"))
  34323. for (let i = 0; i < 4; i++)
  34324. this.space(true);
  34325. }
  34326. function constDeclarationIndent() {
  34327. this.token(",");
  34328. this.newline();
  34329. if (this.endsWith("\n"))
  34330. for (let i = 0; i < 6; i++)
  34331. this.space(true);
  34332. }
  34333. function VariableDeclaration(node, parent) {
  34334. if (node.declare) {
  34335. this.word("declare");
  34336. this.space();
  34337. }
  34338. this.word(node.kind);
  34339. this.space();
  34340. let hasInits = false;
  34341. if (!t2.isFor(parent)) {
  34342. for (const declar of node.declarations) {
  34343. if (declar.init) {
  34344. hasInits = true;
  34345. }
  34346. }
  34347. }
  34348. let separator;
  34349. if (hasInits) {
  34350. separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
  34351. }
  34352. this.printList(node.declarations, node, {
  34353. separator
  34354. });
  34355. if (t2.isFor(parent)) {
  34356. if (t2.isForStatement(parent)) {
  34357. if (parent.init === node)
  34358. return;
  34359. } else {
  34360. if (parent.left === node)
  34361. return;
  34362. }
  34363. }
  34364. this.semicolon();
  34365. }
  34366. function VariableDeclarator(node) {
  34367. this.print(node.id, node);
  34368. if (node.definite)
  34369. this.token("!");
  34370. this.print(node.id.typeAnnotation, node);
  34371. if (node.init) {
  34372. this.space();
  34373. this.token("=");
  34374. this.space();
  34375. this.print(node.init, node);
  34376. }
  34377. }
  34378. }
  34379. });
  34380. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/classes.js
  34381. var require_classes = __commonJS({
  34382. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/classes.js"(exports) {
  34383. "use strict";
  34384. Object.defineProperty(exports, "__esModule", {
  34385. value: true
  34386. });
  34387. exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
  34388. exports.ClassBody = ClassBody;
  34389. exports.ClassProperty = ClassProperty;
  34390. exports.ClassPrivateProperty = ClassPrivateProperty;
  34391. exports.ClassMethod = ClassMethod;
  34392. exports.ClassPrivateMethod = ClassPrivateMethod;
  34393. exports._classMethodHead = _classMethodHead;
  34394. exports.StaticBlock = StaticBlock;
  34395. var t2 = require_lib4();
  34396. function ClassDeclaration(node, parent) {
  34397. if (!this.format.decoratorsBeforeExport || !t2.isExportDefaultDeclaration(parent) && !t2.isExportNamedDeclaration(parent)) {
  34398. this.printJoin(node.decorators, node);
  34399. }
  34400. if (node.declare) {
  34401. this.word("declare");
  34402. this.space();
  34403. }
  34404. if (node.abstract) {
  34405. this.word("abstract");
  34406. this.space();
  34407. }
  34408. this.word("class");
  34409. if (node.id) {
  34410. this.space();
  34411. this.print(node.id, node);
  34412. }
  34413. this.print(node.typeParameters, node);
  34414. if (node.superClass) {
  34415. this.space();
  34416. this.word("extends");
  34417. this.space();
  34418. this.print(node.superClass, node);
  34419. this.print(node.superTypeParameters, node);
  34420. }
  34421. if (node.implements) {
  34422. this.space();
  34423. this.word("implements");
  34424. this.space();
  34425. this.printList(node.implements, node);
  34426. }
  34427. this.space();
  34428. this.print(node.body, node);
  34429. }
  34430. function ClassBody(node) {
  34431. this.token("{");
  34432. this.printInnerComments(node);
  34433. if (node.body.length === 0) {
  34434. this.token("}");
  34435. } else {
  34436. this.newline();
  34437. this.indent();
  34438. this.printSequence(node.body, node);
  34439. this.dedent();
  34440. if (!this.endsWith("\n"))
  34441. this.newline();
  34442. this.rightBrace();
  34443. }
  34444. }
  34445. function ClassProperty(node) {
  34446. this.printJoin(node.decorators, node);
  34447. this.source("end", node.key.loc);
  34448. this.tsPrintClassMemberModifiers(node, true);
  34449. if (node.computed) {
  34450. this.token("[");
  34451. this.print(node.key, node);
  34452. this.token("]");
  34453. } else {
  34454. this._variance(node);
  34455. this.print(node.key, node);
  34456. }
  34457. if (node.optional) {
  34458. this.token("?");
  34459. }
  34460. if (node.definite) {
  34461. this.token("!");
  34462. }
  34463. this.print(node.typeAnnotation, node);
  34464. if (node.value) {
  34465. this.space();
  34466. this.token("=");
  34467. this.space();
  34468. this.print(node.value, node);
  34469. }
  34470. this.semicolon();
  34471. }
  34472. function ClassPrivateProperty(node) {
  34473. this.printJoin(node.decorators, node);
  34474. if (node.static) {
  34475. this.word("static");
  34476. this.space();
  34477. }
  34478. this.print(node.key, node);
  34479. this.print(node.typeAnnotation, node);
  34480. if (node.value) {
  34481. this.space();
  34482. this.token("=");
  34483. this.space();
  34484. this.print(node.value, node);
  34485. }
  34486. this.semicolon();
  34487. }
  34488. function ClassMethod(node) {
  34489. this._classMethodHead(node);
  34490. this.space();
  34491. this.print(node.body, node);
  34492. }
  34493. function ClassPrivateMethod(node) {
  34494. this._classMethodHead(node);
  34495. this.space();
  34496. this.print(node.body, node);
  34497. }
  34498. function _classMethodHead(node) {
  34499. this.printJoin(node.decorators, node);
  34500. this.source("end", node.key.loc);
  34501. this.tsPrintClassMemberModifiers(node, false);
  34502. this._methodHead(node);
  34503. }
  34504. function StaticBlock(node) {
  34505. this.word("static");
  34506. this.space();
  34507. this.token("{");
  34508. if (node.body.length === 0) {
  34509. this.token("}");
  34510. } else {
  34511. this.newline();
  34512. this.printSequence(node.body, node, {
  34513. indent: true
  34514. });
  34515. this.rightBrace();
  34516. }
  34517. }
  34518. }
  34519. });
  34520. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/methods.js
  34521. var require_methods = __commonJS({
  34522. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/methods.js"(exports) {
  34523. "use strict";
  34524. Object.defineProperty(exports, "__esModule", {
  34525. value: true
  34526. });
  34527. exports._params = _params;
  34528. exports._parameters = _parameters;
  34529. exports._param = _param;
  34530. exports._methodHead = _methodHead;
  34531. exports._predicate = _predicate;
  34532. exports._functionHead = _functionHead;
  34533. exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
  34534. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  34535. var t2 = require_lib4();
  34536. function _params(node) {
  34537. this.print(node.typeParameters, node);
  34538. this.token("(");
  34539. this._parameters(node.params, node);
  34540. this.token(")");
  34541. this.print(node.returnType, node);
  34542. }
  34543. function _parameters(parameters, parent) {
  34544. for (let i = 0; i < parameters.length; i++) {
  34545. this._param(parameters[i], parent);
  34546. if (i < parameters.length - 1) {
  34547. this.token(",");
  34548. this.space();
  34549. }
  34550. }
  34551. }
  34552. function _param(parameter, parent) {
  34553. this.printJoin(parameter.decorators, parameter);
  34554. this.print(parameter, parent);
  34555. if (parameter.optional)
  34556. this.token("?");
  34557. this.print(parameter.typeAnnotation, parameter);
  34558. }
  34559. function _methodHead(node) {
  34560. const kind = node.kind;
  34561. const key = node.key;
  34562. if (kind === "get" || kind === "set") {
  34563. this.word(kind);
  34564. this.space();
  34565. }
  34566. if (node.async) {
  34567. this._catchUp("start", key.loc);
  34568. this.word("async");
  34569. this.space();
  34570. }
  34571. if (kind === "method" || kind === "init") {
  34572. if (node.generator) {
  34573. this.token("*");
  34574. }
  34575. }
  34576. if (node.computed) {
  34577. this.token("[");
  34578. this.print(key, node);
  34579. this.token("]");
  34580. } else {
  34581. this.print(key, node);
  34582. }
  34583. if (node.optional) {
  34584. this.token("?");
  34585. }
  34586. this._params(node);
  34587. }
  34588. function _predicate(node) {
  34589. if (node.predicate) {
  34590. if (!node.returnType) {
  34591. this.token(":");
  34592. }
  34593. this.space();
  34594. this.print(node.predicate, node);
  34595. }
  34596. }
  34597. function _functionHead(node) {
  34598. if (node.async) {
  34599. this.word("async");
  34600. this.space();
  34601. }
  34602. this.word("function");
  34603. if (node.generator)
  34604. this.token("*");
  34605. this.space();
  34606. if (node.id) {
  34607. this.print(node.id, node);
  34608. }
  34609. this._params(node);
  34610. this._predicate(node);
  34611. }
  34612. function FunctionExpression(node) {
  34613. this._functionHead(node);
  34614. this.space();
  34615. this.print(node.body, node);
  34616. }
  34617. function ArrowFunctionExpression(node) {
  34618. if (node.async) {
  34619. this.word("async");
  34620. this.space();
  34621. }
  34622. const firstParam = node.params[0];
  34623. if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && t2.isIdentifier(firstParam) && !hasTypesOrComments(node, firstParam)) {
  34624. this.print(firstParam, node);
  34625. } else {
  34626. this._params(node);
  34627. }
  34628. this._predicate(node);
  34629. this.space();
  34630. this.token("=>");
  34631. this.space();
  34632. this.print(node.body, node);
  34633. }
  34634. function hasTypesOrComments(node, param) {
  34635. var _param$leadingComment, _param$trailingCommen;
  34636. return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);
  34637. }
  34638. }
  34639. });
  34640. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/modules.js
  34641. var require_modules = __commonJS({
  34642. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/modules.js"(exports) {
  34643. "use strict";
  34644. Object.defineProperty(exports, "__esModule", {
  34645. value: true
  34646. });
  34647. exports.ImportSpecifier = ImportSpecifier;
  34648. exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
  34649. exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
  34650. exports.ExportSpecifier = ExportSpecifier;
  34651. exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
  34652. exports.ExportAllDeclaration = ExportAllDeclaration;
  34653. exports.ExportNamedDeclaration = ExportNamedDeclaration;
  34654. exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
  34655. exports.ImportDeclaration = ImportDeclaration;
  34656. exports.ImportAttribute = ImportAttribute;
  34657. exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
  34658. var t2 = require_lib4();
  34659. function ImportSpecifier(node) {
  34660. if (node.importKind === "type" || node.importKind === "typeof") {
  34661. this.word(node.importKind);
  34662. this.space();
  34663. }
  34664. this.print(node.imported, node);
  34665. if (node.local && node.local.name !== node.imported.name) {
  34666. this.space();
  34667. this.word("as");
  34668. this.space();
  34669. this.print(node.local, node);
  34670. }
  34671. }
  34672. function ImportDefaultSpecifier(node) {
  34673. this.print(node.local, node);
  34674. }
  34675. function ExportDefaultSpecifier(node) {
  34676. this.print(node.exported, node);
  34677. }
  34678. function ExportSpecifier(node) {
  34679. this.print(node.local, node);
  34680. if (node.exported && node.local.name !== node.exported.name) {
  34681. this.space();
  34682. this.word("as");
  34683. this.space();
  34684. this.print(node.exported, node);
  34685. }
  34686. }
  34687. function ExportNamespaceSpecifier(node) {
  34688. this.token("*");
  34689. this.space();
  34690. this.word("as");
  34691. this.space();
  34692. this.print(node.exported, node);
  34693. }
  34694. function ExportAllDeclaration(node) {
  34695. this.word("export");
  34696. this.space();
  34697. if (node.exportKind === "type") {
  34698. this.word("type");
  34699. this.space();
  34700. }
  34701. this.token("*");
  34702. this.space();
  34703. this.word("from");
  34704. this.space();
  34705. this.print(node.source, node);
  34706. this.printAssertions(node);
  34707. this.semicolon();
  34708. }
  34709. function ExportNamedDeclaration(node) {
  34710. if (this.format.decoratorsBeforeExport && t2.isClassDeclaration(node.declaration)) {
  34711. this.printJoin(node.declaration.decorators, node);
  34712. }
  34713. this.word("export");
  34714. this.space();
  34715. ExportDeclaration.apply(this, arguments);
  34716. }
  34717. function ExportDefaultDeclaration(node) {
  34718. if (this.format.decoratorsBeforeExport && t2.isClassDeclaration(node.declaration)) {
  34719. this.printJoin(node.declaration.decorators, node);
  34720. }
  34721. this.word("export");
  34722. this.space();
  34723. this.word("default");
  34724. this.space();
  34725. ExportDeclaration.apply(this, arguments);
  34726. }
  34727. function ExportDeclaration(node) {
  34728. if (node.declaration) {
  34729. const declar = node.declaration;
  34730. this.print(declar, node);
  34731. if (!t2.isStatement(declar))
  34732. this.semicolon();
  34733. } else {
  34734. if (node.exportKind === "type") {
  34735. this.word("type");
  34736. this.space();
  34737. }
  34738. const specifiers = node.specifiers.slice(0);
  34739. let hasSpecial = false;
  34740. for (; ; ) {
  34741. const first = specifiers[0];
  34742. if (t2.isExportDefaultSpecifier(first) || t2.isExportNamespaceSpecifier(first)) {
  34743. hasSpecial = true;
  34744. this.print(specifiers.shift(), node);
  34745. if (specifiers.length) {
  34746. this.token(",");
  34747. this.space();
  34748. }
  34749. } else {
  34750. break;
  34751. }
  34752. }
  34753. if (specifiers.length || !specifiers.length && !hasSpecial) {
  34754. this.token("{");
  34755. if (specifiers.length) {
  34756. this.space();
  34757. this.printList(specifiers, node);
  34758. this.space();
  34759. }
  34760. this.token("}");
  34761. }
  34762. if (node.source) {
  34763. this.space();
  34764. this.word("from");
  34765. this.space();
  34766. this.print(node.source, node);
  34767. this.printAssertions(node);
  34768. }
  34769. this.semicolon();
  34770. }
  34771. }
  34772. function ImportDeclaration(node) {
  34773. this.word("import");
  34774. this.space();
  34775. if (node.importKind === "type" || node.importKind === "typeof") {
  34776. this.word(node.importKind);
  34777. this.space();
  34778. }
  34779. const specifiers = node.specifiers.slice(0);
  34780. if (specifiers != null && specifiers.length) {
  34781. for (; ; ) {
  34782. const first = specifiers[0];
  34783. if (t2.isImportDefaultSpecifier(first) || t2.isImportNamespaceSpecifier(first)) {
  34784. this.print(specifiers.shift(), node);
  34785. if (specifiers.length) {
  34786. this.token(",");
  34787. this.space();
  34788. }
  34789. } else {
  34790. break;
  34791. }
  34792. }
  34793. if (specifiers.length) {
  34794. this.token("{");
  34795. this.space();
  34796. this.printList(specifiers, node);
  34797. this.space();
  34798. this.token("}");
  34799. }
  34800. this.space();
  34801. this.word("from");
  34802. this.space();
  34803. }
  34804. this.print(node.source, node);
  34805. this.printAssertions(node);
  34806. {
  34807. var _node$attributes;
  34808. if ((_node$attributes = node.attributes) != null && _node$attributes.length) {
  34809. this.space();
  34810. this.word("with");
  34811. this.space();
  34812. this.printList(node.attributes, node);
  34813. }
  34814. }
  34815. this.semicolon();
  34816. }
  34817. function ImportAttribute(node) {
  34818. this.print(node.key);
  34819. this.token(":");
  34820. this.space();
  34821. this.print(node.value);
  34822. }
  34823. function ImportNamespaceSpecifier(node) {
  34824. this.token("*");
  34825. this.space();
  34826. this.word("as");
  34827. this.space();
  34828. this.print(node.local, node);
  34829. }
  34830. }
  34831. });
  34832. // node_modules/jsesc/jsesc.js
  34833. var require_jsesc = __commonJS({
  34834. "node_modules/jsesc/jsesc.js"(exports, module2) {
  34835. "use strict";
  34836. var object = {};
  34837. var hasOwnProperty3 = object.hasOwnProperty;
  34838. var forOwn = (object2, callback) => {
  34839. for (const key in object2) {
  34840. if (hasOwnProperty3.call(object2, key)) {
  34841. callback(key, object2[key]);
  34842. }
  34843. }
  34844. };
  34845. var extend3 = (destination, source) => {
  34846. if (!source) {
  34847. return destination;
  34848. }
  34849. forOwn(source, (key, value) => {
  34850. destination[key] = value;
  34851. });
  34852. return destination;
  34853. };
  34854. var forEach = (array, callback) => {
  34855. const length = array.length;
  34856. let index2 = -1;
  34857. while (++index2 < length) {
  34858. callback(array[index2]);
  34859. }
  34860. };
  34861. var toString3 = object.toString;
  34862. var isArray2 = Array.isArray;
  34863. var isBuffer2 = Buffer.isBuffer;
  34864. var isObject = (value) => {
  34865. return toString3.call(value) == "[object Object]";
  34866. };
  34867. var isString = (value) => {
  34868. return typeof value == "string" || toString3.call(value) == "[object String]";
  34869. };
  34870. var isNumber = (value) => {
  34871. return typeof value == "number" || toString3.call(value) == "[object Number]";
  34872. };
  34873. var isFunction = (value) => {
  34874. return typeof value == "function";
  34875. };
  34876. var isMap = (value) => {
  34877. return toString3.call(value) == "[object Map]";
  34878. };
  34879. var isSet = (value) => {
  34880. return toString3.call(value) == "[object Set]";
  34881. };
  34882. var singleEscapes = {
  34883. '"': '\\"',
  34884. "'": "\\'",
  34885. "\\": "\\\\",
  34886. "\b": "\\b",
  34887. "\f": "\\f",
  34888. "\n": "\\n",
  34889. "\r": "\\r",
  34890. " ": "\\t"
  34891. };
  34892. var regexSingleEscape = /["'\\\b\f\n\r\t]/;
  34893. var regexDigit = /[0-9]/;
  34894. var regexWhitelist = /[ !#-&\(-\[\]-_a-~]/;
  34895. var jsesc = (argument, options) => {
  34896. const increaseIndentation = () => {
  34897. oldIndent = indent;
  34898. ++options.indentLevel;
  34899. indent = options.indent.repeat(options.indentLevel);
  34900. };
  34901. const defaults = {
  34902. "escapeEverything": false,
  34903. "minimal": false,
  34904. "isScriptContext": false,
  34905. "quotes": "single",
  34906. "wrap": false,
  34907. "es6": false,
  34908. "json": false,
  34909. "compact": true,
  34910. "lowercaseHex": false,
  34911. "numbers": "decimal",
  34912. "indent": " ",
  34913. "indentLevel": 0,
  34914. "__inline1__": false,
  34915. "__inline2__": false
  34916. };
  34917. const json = options && options.json;
  34918. if (json) {
  34919. defaults.quotes = "double";
  34920. defaults.wrap = true;
  34921. }
  34922. options = extend3(defaults, options);
  34923. if (options.quotes != "single" && options.quotes != "double" && options.quotes != "backtick") {
  34924. options.quotes = "single";
  34925. }
  34926. const quote = options.quotes == "double" ? '"' : options.quotes == "backtick" ? "`" : "'";
  34927. const compact = options.compact;
  34928. const lowercaseHex = options.lowercaseHex;
  34929. let indent = options.indent.repeat(options.indentLevel);
  34930. let oldIndent = "";
  34931. const inline1 = options.__inline1__;
  34932. const inline2 = options.__inline2__;
  34933. const newLine = compact ? "" : "\n";
  34934. let result;
  34935. let isEmpty = true;
  34936. const useBinNumbers = options.numbers == "binary";
  34937. const useOctNumbers = options.numbers == "octal";
  34938. const useDecNumbers = options.numbers == "decimal";
  34939. const useHexNumbers = options.numbers == "hexadecimal";
  34940. if (json && argument && isFunction(argument.toJSON)) {
  34941. argument = argument.toJSON();
  34942. }
  34943. if (!isString(argument)) {
  34944. if (isMap(argument)) {
  34945. if (argument.size == 0) {
  34946. return "new Map()";
  34947. }
  34948. if (!compact) {
  34949. options.__inline1__ = true;
  34950. options.__inline2__ = false;
  34951. }
  34952. return "new Map(" + jsesc(Array.from(argument), options) + ")";
  34953. }
  34954. if (isSet(argument)) {
  34955. if (argument.size == 0) {
  34956. return "new Set()";
  34957. }
  34958. return "new Set(" + jsesc(Array.from(argument), options) + ")";
  34959. }
  34960. if (isBuffer2(argument)) {
  34961. if (argument.length == 0) {
  34962. return "Buffer.from([])";
  34963. }
  34964. return "Buffer.from(" + jsesc(Array.from(argument), options) + ")";
  34965. }
  34966. if (isArray2(argument)) {
  34967. result = [];
  34968. options.wrap = true;
  34969. if (inline1) {
  34970. options.__inline1__ = false;
  34971. options.__inline2__ = true;
  34972. }
  34973. if (!inline2) {
  34974. increaseIndentation();
  34975. }
  34976. forEach(argument, (value) => {
  34977. isEmpty = false;
  34978. if (inline2) {
  34979. options.__inline2__ = false;
  34980. }
  34981. result.push(
  34982. (compact || inline2 ? "" : indent) + jsesc(value, options)
  34983. );
  34984. });
  34985. if (isEmpty) {
  34986. return "[]";
  34987. }
  34988. if (inline2) {
  34989. return "[" + result.join(", ") + "]";
  34990. }
  34991. return "[" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "]";
  34992. } else if (isNumber(argument)) {
  34993. if (json) {
  34994. return JSON.stringify(argument);
  34995. }
  34996. if (useDecNumbers) {
  34997. return String(argument);
  34998. }
  34999. if (useHexNumbers) {
  35000. let hexadecimal = argument.toString(16);
  35001. if (!lowercaseHex) {
  35002. hexadecimal = hexadecimal.toUpperCase();
  35003. }
  35004. return "0x" + hexadecimal;
  35005. }
  35006. if (useBinNumbers) {
  35007. return "0b" + argument.toString(2);
  35008. }
  35009. if (useOctNumbers) {
  35010. return "0o" + argument.toString(8);
  35011. }
  35012. } else if (!isObject(argument)) {
  35013. if (json) {
  35014. return JSON.stringify(argument) || "null";
  35015. }
  35016. return String(argument);
  35017. } else {
  35018. result = [];
  35019. options.wrap = true;
  35020. increaseIndentation();
  35021. forOwn(argument, (key, value) => {
  35022. isEmpty = false;
  35023. result.push(
  35024. (compact ? "" : indent) + jsesc(key, options) + ":" + (compact ? "" : " ") + jsesc(value, options)
  35025. );
  35026. });
  35027. if (isEmpty) {
  35028. return "{}";
  35029. }
  35030. return "{" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "}";
  35031. }
  35032. }
  35033. const string3 = argument;
  35034. let index2 = -1;
  35035. const length = string3.length;
  35036. result = "";
  35037. while (++index2 < length) {
  35038. const character = string3.charAt(index2);
  35039. if (options.es6) {
  35040. const first = string3.charCodeAt(index2);
  35041. if (first >= 55296 && first <= 56319 && length > index2 + 1) {
  35042. const second = string3.charCodeAt(index2 + 1);
  35043. if (second >= 56320 && second <= 57343) {
  35044. const codePoint = (first - 55296) * 1024 + second - 56320 + 65536;
  35045. let hexadecimal2 = codePoint.toString(16);
  35046. if (!lowercaseHex) {
  35047. hexadecimal2 = hexadecimal2.toUpperCase();
  35048. }
  35049. result += "\\u{" + hexadecimal2 + "}";
  35050. ++index2;
  35051. continue;
  35052. }
  35053. }
  35054. }
  35055. if (!options.escapeEverything) {
  35056. if (regexWhitelist.test(character)) {
  35057. result += character;
  35058. continue;
  35059. }
  35060. if (character == '"') {
  35061. result += quote == character ? '\\"' : character;
  35062. continue;
  35063. }
  35064. if (character == "`") {
  35065. result += quote == character ? "\\`" : character;
  35066. continue;
  35067. }
  35068. if (character == "'") {
  35069. result += quote == character ? "\\'" : character;
  35070. continue;
  35071. }
  35072. }
  35073. if (character == "\0" && !json && !regexDigit.test(string3.charAt(index2 + 1))) {
  35074. result += "\\0";
  35075. continue;
  35076. }
  35077. if (regexSingleEscape.test(character)) {
  35078. result += singleEscapes[character];
  35079. continue;
  35080. }
  35081. const charCode = character.charCodeAt(0);
  35082. if (options.minimal && charCode != 8232 && charCode != 8233) {
  35083. result += character;
  35084. continue;
  35085. }
  35086. let hexadecimal = charCode.toString(16);
  35087. if (!lowercaseHex) {
  35088. hexadecimal = hexadecimal.toUpperCase();
  35089. }
  35090. const longhand = hexadecimal.length > 2 || json;
  35091. const escaped = "\\" + (longhand ? "u" : "x") + ("0000" + hexadecimal).slice(longhand ? -4 : -2);
  35092. result += escaped;
  35093. continue;
  35094. }
  35095. if (options.wrap) {
  35096. result = quote + result + quote;
  35097. }
  35098. if (quote == "`") {
  35099. result = result.replace(/\$\{/g, "\\${");
  35100. }
  35101. if (options.isScriptContext) {
  35102. return result.replace(/<\/(script|style)/gi, "<\\/$1").replace(/<!--/g, json ? "\\u003C!--" : "\\x3C!--");
  35103. }
  35104. return result;
  35105. };
  35106. jsesc.version = "2.5.2";
  35107. module2.exports = jsesc;
  35108. }
  35109. });
  35110. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/types.js
  35111. var require_types = __commonJS({
  35112. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/types.js"(exports) {
  35113. "use strict";
  35114. Object.defineProperty(exports, "__esModule", {
  35115. value: true
  35116. });
  35117. exports.Identifier = Identifier;
  35118. exports.ArgumentPlaceholder = ArgumentPlaceholder;
  35119. exports.SpreadElement = exports.RestElement = RestElement2;
  35120. exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
  35121. exports.ObjectMethod = ObjectMethod;
  35122. exports.ObjectProperty = ObjectProperty;
  35123. exports.ArrayPattern = exports.ArrayExpression = ArrayExpression2;
  35124. exports.RecordExpression = RecordExpression;
  35125. exports.TupleExpression = TupleExpression;
  35126. exports.RegExpLiteral = RegExpLiteral;
  35127. exports.BooleanLiteral = BooleanLiteral;
  35128. exports.NullLiteral = NullLiteral;
  35129. exports.NumericLiteral = NumericLiteral;
  35130. exports.StringLiteral = StringLiteral;
  35131. exports.BigIntLiteral = BigIntLiteral;
  35132. exports.DecimalLiteral = DecimalLiteral;
  35133. exports.PipelineTopicExpression = PipelineTopicExpression;
  35134. exports.PipelineBareFunction = PipelineBareFunction;
  35135. exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
  35136. var t2 = require_lib4();
  35137. var _jsesc = require_jsesc();
  35138. function Identifier(node) {
  35139. this.exactSource(node.loc, () => {
  35140. this.word(node.name);
  35141. });
  35142. }
  35143. function ArgumentPlaceholder() {
  35144. this.token("?");
  35145. }
  35146. function RestElement2(node) {
  35147. this.token("...");
  35148. this.print(node.argument, node);
  35149. }
  35150. function ObjectExpression(node) {
  35151. const props = node.properties;
  35152. this.token("{");
  35153. this.printInnerComments(node);
  35154. if (props.length) {
  35155. this.space();
  35156. this.printList(props, node, {
  35157. indent: true,
  35158. statement: true
  35159. });
  35160. this.space();
  35161. }
  35162. this.token("}");
  35163. }
  35164. function ObjectMethod(node) {
  35165. this.printJoin(node.decorators, node);
  35166. this._methodHead(node);
  35167. this.space();
  35168. this.print(node.body, node);
  35169. }
  35170. function ObjectProperty(node) {
  35171. this.printJoin(node.decorators, node);
  35172. if (node.computed) {
  35173. this.token("[");
  35174. this.print(node.key, node);
  35175. this.token("]");
  35176. } else {
  35177. if (t2.isAssignmentPattern(node.value) && t2.isIdentifier(node.key) && node.key.name === node.value.left.name) {
  35178. this.print(node.value, node);
  35179. return;
  35180. }
  35181. this.print(node.key, node);
  35182. if (node.shorthand && t2.isIdentifier(node.key) && t2.isIdentifier(node.value) && node.key.name === node.value.name) {
  35183. return;
  35184. }
  35185. }
  35186. this.token(":");
  35187. this.space();
  35188. this.print(node.value, node);
  35189. }
  35190. function ArrayExpression2(node) {
  35191. const elems = node.elements;
  35192. const len = elems.length;
  35193. this.token("[");
  35194. this.printInnerComments(node);
  35195. for (let i = 0; i < elems.length; i++) {
  35196. const elem = elems[i];
  35197. if (elem) {
  35198. if (i > 0)
  35199. this.space();
  35200. this.print(elem, node);
  35201. if (i < len - 1)
  35202. this.token(",");
  35203. } else {
  35204. this.token(",");
  35205. }
  35206. }
  35207. this.token("]");
  35208. }
  35209. function RecordExpression(node) {
  35210. const props = node.properties;
  35211. let startToken;
  35212. let endToken;
  35213. if (this.format.recordAndTupleSyntaxType === "bar") {
  35214. startToken = "{|";
  35215. endToken = "|}";
  35216. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  35217. startToken = "#{";
  35218. endToken = "}";
  35219. } else {
  35220. throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
  35221. }
  35222. this.token(startToken);
  35223. this.printInnerComments(node);
  35224. if (props.length) {
  35225. this.space();
  35226. this.printList(props, node, {
  35227. indent: true,
  35228. statement: true
  35229. });
  35230. this.space();
  35231. }
  35232. this.token(endToken);
  35233. }
  35234. function TupleExpression(node) {
  35235. const elems = node.elements;
  35236. const len = elems.length;
  35237. let startToken;
  35238. let endToken;
  35239. if (this.format.recordAndTupleSyntaxType === "bar") {
  35240. startToken = "[|";
  35241. endToken = "|]";
  35242. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  35243. startToken = "#[";
  35244. endToken = "]";
  35245. } else {
  35246. throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
  35247. }
  35248. this.token(startToken);
  35249. this.printInnerComments(node);
  35250. for (let i = 0; i < elems.length; i++) {
  35251. const elem = elems[i];
  35252. if (elem) {
  35253. if (i > 0)
  35254. this.space();
  35255. this.print(elem, node);
  35256. if (i < len - 1)
  35257. this.token(",");
  35258. }
  35259. }
  35260. this.token(endToken);
  35261. }
  35262. function RegExpLiteral(node) {
  35263. this.word(`/${node.pattern}/${node.flags}`);
  35264. }
  35265. function BooleanLiteral(node) {
  35266. this.word(node.value ? "true" : "false");
  35267. }
  35268. function NullLiteral() {
  35269. this.word("null");
  35270. }
  35271. function NumericLiteral(node) {
  35272. const raw = this.getPossibleRaw(node);
  35273. const opts = this.format.jsescOption;
  35274. const value = node.value + "";
  35275. if (opts.numbers) {
  35276. this.number(_jsesc(node.value, opts));
  35277. } else if (raw == null) {
  35278. this.number(value);
  35279. } else if (this.format.minified) {
  35280. this.number(raw.length < value.length ? raw : value);
  35281. } else {
  35282. this.number(raw);
  35283. }
  35284. }
  35285. function StringLiteral(node) {
  35286. const raw = this.getPossibleRaw(node);
  35287. if (!this.format.minified && raw != null) {
  35288. this.token(raw);
  35289. return;
  35290. }
  35291. const val = _jsesc(node.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && {
  35292. json: true
  35293. }));
  35294. return this.token(val);
  35295. }
  35296. function BigIntLiteral(node) {
  35297. const raw = this.getPossibleRaw(node);
  35298. if (!this.format.minified && raw != null) {
  35299. this.word(raw);
  35300. return;
  35301. }
  35302. this.word(node.value + "n");
  35303. }
  35304. function DecimalLiteral(node) {
  35305. const raw = this.getPossibleRaw(node);
  35306. if (!this.format.minified && raw != null) {
  35307. this.word(raw);
  35308. return;
  35309. }
  35310. this.word(node.value + "m");
  35311. }
  35312. function PipelineTopicExpression(node) {
  35313. this.print(node.expression, node);
  35314. }
  35315. function PipelineBareFunction(node) {
  35316. this.print(node.callee, node);
  35317. }
  35318. function PipelinePrimaryTopicReference() {
  35319. this.token("#");
  35320. }
  35321. }
  35322. });
  35323. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/flow.js
  35324. var require_flow3 = __commonJS({
  35325. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/flow.js"(exports) {
  35326. "use strict";
  35327. Object.defineProperty(exports, "__esModule", {
  35328. value: true
  35329. });
  35330. exports.AnyTypeAnnotation = AnyTypeAnnotation;
  35331. exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
  35332. exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
  35333. exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
  35334. exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
  35335. exports.DeclareClass = DeclareClass;
  35336. exports.DeclareFunction = DeclareFunction;
  35337. exports.InferredPredicate = InferredPredicate;
  35338. exports.DeclaredPredicate = DeclaredPredicate;
  35339. exports.DeclareInterface = DeclareInterface;
  35340. exports.DeclareModule = DeclareModule;
  35341. exports.DeclareModuleExports = DeclareModuleExports;
  35342. exports.DeclareTypeAlias = DeclareTypeAlias;
  35343. exports.DeclareOpaqueType = DeclareOpaqueType;
  35344. exports.DeclareVariable = DeclareVariable;
  35345. exports.DeclareExportDeclaration = DeclareExportDeclaration;
  35346. exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
  35347. exports.EnumDeclaration = EnumDeclaration;
  35348. exports.EnumBooleanBody = EnumBooleanBody;
  35349. exports.EnumNumberBody = EnumNumberBody;
  35350. exports.EnumStringBody = EnumStringBody;
  35351. exports.EnumSymbolBody = EnumSymbolBody;
  35352. exports.EnumDefaultedMember = EnumDefaultedMember;
  35353. exports.EnumBooleanMember = EnumBooleanMember;
  35354. exports.EnumNumberMember = EnumNumberMember;
  35355. exports.EnumStringMember = EnumStringMember;
  35356. exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
  35357. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  35358. exports.FunctionTypeParam = FunctionTypeParam;
  35359. exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
  35360. exports._interfaceish = _interfaceish;
  35361. exports._variance = _variance;
  35362. exports.InterfaceDeclaration = InterfaceDeclaration;
  35363. exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
  35364. exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
  35365. exports.MixedTypeAnnotation = MixedTypeAnnotation;
  35366. exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
  35367. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  35368. exports.NumberTypeAnnotation = NumberTypeAnnotation;
  35369. exports.StringTypeAnnotation = StringTypeAnnotation;
  35370. exports.ThisTypeAnnotation = ThisTypeAnnotation;
  35371. exports.TupleTypeAnnotation = TupleTypeAnnotation;
  35372. exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
  35373. exports.TypeAlias = TypeAlias;
  35374. exports.TypeAnnotation = TypeAnnotation;
  35375. exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
  35376. exports.TypeParameter = TypeParameter;
  35377. exports.OpaqueType = OpaqueType;
  35378. exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
  35379. exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
  35380. exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
  35381. exports.ObjectTypeIndexer = ObjectTypeIndexer;
  35382. exports.ObjectTypeProperty = ObjectTypeProperty;
  35383. exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
  35384. exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
  35385. exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
  35386. exports.UnionTypeAnnotation = UnionTypeAnnotation;
  35387. exports.TypeCastExpression = TypeCastExpression;
  35388. exports.Variance = Variance;
  35389. exports.VoidTypeAnnotation = VoidTypeAnnotation;
  35390. exports.IndexedAccessType = IndexedAccessType;
  35391. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  35392. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  35393. enumerable: true,
  35394. get: function() {
  35395. return _types2.NumericLiteral;
  35396. }
  35397. });
  35398. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  35399. enumerable: true,
  35400. get: function() {
  35401. return _types2.StringLiteral;
  35402. }
  35403. });
  35404. var t2 = require_lib4();
  35405. var _modules = require_modules();
  35406. var _types2 = require_types();
  35407. function AnyTypeAnnotation() {
  35408. this.word("any");
  35409. }
  35410. function ArrayTypeAnnotation(node) {
  35411. this.print(node.elementType, node);
  35412. this.token("[");
  35413. this.token("]");
  35414. }
  35415. function BooleanTypeAnnotation() {
  35416. this.word("boolean");
  35417. }
  35418. function BooleanLiteralTypeAnnotation(node) {
  35419. this.word(node.value ? "true" : "false");
  35420. }
  35421. function NullLiteralTypeAnnotation() {
  35422. this.word("null");
  35423. }
  35424. function DeclareClass(node, parent) {
  35425. if (!t2.isDeclareExportDeclaration(parent)) {
  35426. this.word("declare");
  35427. this.space();
  35428. }
  35429. this.word("class");
  35430. this.space();
  35431. this._interfaceish(node);
  35432. }
  35433. function DeclareFunction(node, parent) {
  35434. if (!t2.isDeclareExportDeclaration(parent)) {
  35435. this.word("declare");
  35436. this.space();
  35437. }
  35438. this.word("function");
  35439. this.space();
  35440. this.print(node.id, node);
  35441. this.print(node.id.typeAnnotation.typeAnnotation, node);
  35442. if (node.predicate) {
  35443. this.space();
  35444. this.print(node.predicate, node);
  35445. }
  35446. this.semicolon();
  35447. }
  35448. function InferredPredicate() {
  35449. this.token("%");
  35450. this.word("checks");
  35451. }
  35452. function DeclaredPredicate(node) {
  35453. this.token("%");
  35454. this.word("checks");
  35455. this.token("(");
  35456. this.print(node.value, node);
  35457. this.token(")");
  35458. }
  35459. function DeclareInterface(node) {
  35460. this.word("declare");
  35461. this.space();
  35462. this.InterfaceDeclaration(node);
  35463. }
  35464. function DeclareModule(node) {
  35465. this.word("declare");
  35466. this.space();
  35467. this.word("module");
  35468. this.space();
  35469. this.print(node.id, node);
  35470. this.space();
  35471. this.print(node.body, node);
  35472. }
  35473. function DeclareModuleExports(node) {
  35474. this.word("declare");
  35475. this.space();
  35476. this.word("module");
  35477. this.token(".");
  35478. this.word("exports");
  35479. this.print(node.typeAnnotation, node);
  35480. }
  35481. function DeclareTypeAlias(node) {
  35482. this.word("declare");
  35483. this.space();
  35484. this.TypeAlias(node);
  35485. }
  35486. function DeclareOpaqueType(node, parent) {
  35487. if (!t2.isDeclareExportDeclaration(parent)) {
  35488. this.word("declare");
  35489. this.space();
  35490. }
  35491. this.OpaqueType(node);
  35492. }
  35493. function DeclareVariable(node, parent) {
  35494. if (!t2.isDeclareExportDeclaration(parent)) {
  35495. this.word("declare");
  35496. this.space();
  35497. }
  35498. this.word("var");
  35499. this.space();
  35500. this.print(node.id, node);
  35501. this.print(node.id.typeAnnotation, node);
  35502. this.semicolon();
  35503. }
  35504. function DeclareExportDeclaration(node) {
  35505. this.word("declare");
  35506. this.space();
  35507. this.word("export");
  35508. this.space();
  35509. if (node.default) {
  35510. this.word("default");
  35511. this.space();
  35512. }
  35513. FlowExportDeclaration.apply(this, arguments);
  35514. }
  35515. function DeclareExportAllDeclaration() {
  35516. this.word("declare");
  35517. this.space();
  35518. _modules.ExportAllDeclaration.apply(this, arguments);
  35519. }
  35520. function EnumDeclaration(node) {
  35521. const {
  35522. id,
  35523. body
  35524. } = node;
  35525. this.word("enum");
  35526. this.space();
  35527. this.print(id, node);
  35528. this.print(body, node);
  35529. }
  35530. function enumExplicitType(context, name2, hasExplicitType) {
  35531. if (hasExplicitType) {
  35532. context.space();
  35533. context.word("of");
  35534. context.space();
  35535. context.word(name2);
  35536. }
  35537. context.space();
  35538. }
  35539. function enumBody(context, node) {
  35540. const {
  35541. members
  35542. } = node;
  35543. context.token("{");
  35544. context.indent();
  35545. context.newline();
  35546. for (const member of members) {
  35547. context.print(member, node);
  35548. context.newline();
  35549. }
  35550. if (node.hasUnknownMembers) {
  35551. context.token("...");
  35552. context.newline();
  35553. }
  35554. context.dedent();
  35555. context.token("}");
  35556. }
  35557. function EnumBooleanBody(node) {
  35558. const {
  35559. explicitType
  35560. } = node;
  35561. enumExplicitType(this, "boolean", explicitType);
  35562. enumBody(this, node);
  35563. }
  35564. function EnumNumberBody(node) {
  35565. const {
  35566. explicitType
  35567. } = node;
  35568. enumExplicitType(this, "number", explicitType);
  35569. enumBody(this, node);
  35570. }
  35571. function EnumStringBody(node) {
  35572. const {
  35573. explicitType
  35574. } = node;
  35575. enumExplicitType(this, "string", explicitType);
  35576. enumBody(this, node);
  35577. }
  35578. function EnumSymbolBody(node) {
  35579. enumExplicitType(this, "symbol", true);
  35580. enumBody(this, node);
  35581. }
  35582. function EnumDefaultedMember(node) {
  35583. const {
  35584. id
  35585. } = node;
  35586. this.print(id, node);
  35587. this.token(",");
  35588. }
  35589. function enumInitializedMember(context, node) {
  35590. const {
  35591. id,
  35592. init
  35593. } = node;
  35594. context.print(id, node);
  35595. context.space();
  35596. context.token("=");
  35597. context.space();
  35598. context.print(init, node);
  35599. context.token(",");
  35600. }
  35601. function EnumBooleanMember(node) {
  35602. enumInitializedMember(this, node);
  35603. }
  35604. function EnumNumberMember(node) {
  35605. enumInitializedMember(this, node);
  35606. }
  35607. function EnumStringMember(node) {
  35608. enumInitializedMember(this, node);
  35609. }
  35610. function FlowExportDeclaration(node) {
  35611. if (node.declaration) {
  35612. const declar = node.declaration;
  35613. this.print(declar, node);
  35614. if (!t2.isStatement(declar))
  35615. this.semicolon();
  35616. } else {
  35617. this.token("{");
  35618. if (node.specifiers.length) {
  35619. this.space();
  35620. this.printList(node.specifiers, node);
  35621. this.space();
  35622. }
  35623. this.token("}");
  35624. if (node.source) {
  35625. this.space();
  35626. this.word("from");
  35627. this.space();
  35628. this.print(node.source, node);
  35629. }
  35630. this.semicolon();
  35631. }
  35632. }
  35633. function ExistsTypeAnnotation() {
  35634. this.token("*");
  35635. }
  35636. function FunctionTypeAnnotation(node, parent) {
  35637. this.print(node.typeParameters, node);
  35638. this.token("(");
  35639. if (node.this) {
  35640. this.word("this");
  35641. this.token(":");
  35642. this.space();
  35643. this.print(node.this.typeAnnotation, node);
  35644. if (node.params.length || node.rest) {
  35645. this.token(",");
  35646. this.space();
  35647. }
  35648. }
  35649. this.printList(node.params, node);
  35650. if (node.rest) {
  35651. if (node.params.length) {
  35652. this.token(",");
  35653. this.space();
  35654. }
  35655. this.token("...");
  35656. this.print(node.rest, node);
  35657. }
  35658. this.token(")");
  35659. if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) {
  35660. this.token(":");
  35661. } else {
  35662. this.space();
  35663. this.token("=>");
  35664. }
  35665. this.space();
  35666. this.print(node.returnType, node);
  35667. }
  35668. function FunctionTypeParam(node) {
  35669. this.print(node.name, node);
  35670. if (node.optional)
  35671. this.token("?");
  35672. if (node.name) {
  35673. this.token(":");
  35674. this.space();
  35675. }
  35676. this.print(node.typeAnnotation, node);
  35677. }
  35678. function InterfaceExtends(node) {
  35679. this.print(node.id, node);
  35680. this.print(node.typeParameters, node);
  35681. }
  35682. function _interfaceish(node) {
  35683. var _node$extends;
  35684. this.print(node.id, node);
  35685. this.print(node.typeParameters, node);
  35686. if ((_node$extends = node.extends) != null && _node$extends.length) {
  35687. this.space();
  35688. this.word("extends");
  35689. this.space();
  35690. this.printList(node.extends, node);
  35691. }
  35692. if (node.mixins && node.mixins.length) {
  35693. this.space();
  35694. this.word("mixins");
  35695. this.space();
  35696. this.printList(node.mixins, node);
  35697. }
  35698. if (node.implements && node.implements.length) {
  35699. this.space();
  35700. this.word("implements");
  35701. this.space();
  35702. this.printList(node.implements, node);
  35703. }
  35704. this.space();
  35705. this.print(node.body, node);
  35706. }
  35707. function _variance(node) {
  35708. if (node.variance) {
  35709. if (node.variance.kind === "plus") {
  35710. this.token("+");
  35711. } else if (node.variance.kind === "minus") {
  35712. this.token("-");
  35713. }
  35714. }
  35715. }
  35716. function InterfaceDeclaration(node) {
  35717. this.word("interface");
  35718. this.space();
  35719. this._interfaceish(node);
  35720. }
  35721. function andSeparator() {
  35722. this.space();
  35723. this.token("&");
  35724. this.space();
  35725. }
  35726. function InterfaceTypeAnnotation(node) {
  35727. this.word("interface");
  35728. if (node.extends && node.extends.length) {
  35729. this.space();
  35730. this.word("extends");
  35731. this.space();
  35732. this.printList(node.extends, node);
  35733. }
  35734. this.space();
  35735. this.print(node.body, node);
  35736. }
  35737. function IntersectionTypeAnnotation(node) {
  35738. this.printJoin(node.types, node, {
  35739. separator: andSeparator
  35740. });
  35741. }
  35742. function MixedTypeAnnotation() {
  35743. this.word("mixed");
  35744. }
  35745. function EmptyTypeAnnotation() {
  35746. this.word("empty");
  35747. }
  35748. function NullableTypeAnnotation(node) {
  35749. this.token("?");
  35750. this.print(node.typeAnnotation, node);
  35751. }
  35752. function NumberTypeAnnotation() {
  35753. this.word("number");
  35754. }
  35755. function StringTypeAnnotation() {
  35756. this.word("string");
  35757. }
  35758. function ThisTypeAnnotation() {
  35759. this.word("this");
  35760. }
  35761. function TupleTypeAnnotation(node) {
  35762. this.token("[");
  35763. this.printList(node.types, node);
  35764. this.token("]");
  35765. }
  35766. function TypeofTypeAnnotation(node) {
  35767. this.word("typeof");
  35768. this.space();
  35769. this.print(node.argument, node);
  35770. }
  35771. function TypeAlias(node) {
  35772. this.word("type");
  35773. this.space();
  35774. this.print(node.id, node);
  35775. this.print(node.typeParameters, node);
  35776. this.space();
  35777. this.token("=");
  35778. this.space();
  35779. this.print(node.right, node);
  35780. this.semicolon();
  35781. }
  35782. function TypeAnnotation(node) {
  35783. this.token(":");
  35784. this.space();
  35785. if (node.optional)
  35786. this.token("?");
  35787. this.print(node.typeAnnotation, node);
  35788. }
  35789. function TypeParameterInstantiation(node) {
  35790. this.token("<");
  35791. this.printList(node.params, node, {});
  35792. this.token(">");
  35793. }
  35794. function TypeParameter(node) {
  35795. this._variance(node);
  35796. this.word(node.name);
  35797. if (node.bound) {
  35798. this.print(node.bound, node);
  35799. }
  35800. if (node.default) {
  35801. this.space();
  35802. this.token("=");
  35803. this.space();
  35804. this.print(node.default, node);
  35805. }
  35806. }
  35807. function OpaqueType(node) {
  35808. this.word("opaque");
  35809. this.space();
  35810. this.word("type");
  35811. this.space();
  35812. this.print(node.id, node);
  35813. this.print(node.typeParameters, node);
  35814. if (node.supertype) {
  35815. this.token(":");
  35816. this.space();
  35817. this.print(node.supertype, node);
  35818. }
  35819. if (node.impltype) {
  35820. this.space();
  35821. this.token("=");
  35822. this.space();
  35823. this.print(node.impltype, node);
  35824. }
  35825. this.semicolon();
  35826. }
  35827. function ObjectTypeAnnotation(node) {
  35828. if (node.exact) {
  35829. this.token("{|");
  35830. } else {
  35831. this.token("{");
  35832. }
  35833. const props = [...node.properties, ...node.callProperties || [], ...node.indexers || [], ...node.internalSlots || []];
  35834. if (props.length) {
  35835. this.space();
  35836. this.printJoin(props, node, {
  35837. addNewlines(leading) {
  35838. if (leading && !props[0])
  35839. return 1;
  35840. },
  35841. indent: true,
  35842. statement: true,
  35843. iterator: () => {
  35844. if (props.length !== 1 || node.inexact) {
  35845. this.token(",");
  35846. this.space();
  35847. }
  35848. }
  35849. });
  35850. this.space();
  35851. }
  35852. if (node.inexact) {
  35853. this.indent();
  35854. this.token("...");
  35855. if (props.length) {
  35856. this.newline();
  35857. }
  35858. this.dedent();
  35859. }
  35860. if (node.exact) {
  35861. this.token("|}");
  35862. } else {
  35863. this.token("}");
  35864. }
  35865. }
  35866. function ObjectTypeInternalSlot(node) {
  35867. if (node.static) {
  35868. this.word("static");
  35869. this.space();
  35870. }
  35871. this.token("[");
  35872. this.token("[");
  35873. this.print(node.id, node);
  35874. this.token("]");
  35875. this.token("]");
  35876. if (node.optional)
  35877. this.token("?");
  35878. if (!node.method) {
  35879. this.token(":");
  35880. this.space();
  35881. }
  35882. this.print(node.value, node);
  35883. }
  35884. function ObjectTypeCallProperty(node) {
  35885. if (node.static) {
  35886. this.word("static");
  35887. this.space();
  35888. }
  35889. this.print(node.value, node);
  35890. }
  35891. function ObjectTypeIndexer(node) {
  35892. if (node.static) {
  35893. this.word("static");
  35894. this.space();
  35895. }
  35896. this._variance(node);
  35897. this.token("[");
  35898. if (node.id) {
  35899. this.print(node.id, node);
  35900. this.token(":");
  35901. this.space();
  35902. }
  35903. this.print(node.key, node);
  35904. this.token("]");
  35905. this.token(":");
  35906. this.space();
  35907. this.print(node.value, node);
  35908. }
  35909. function ObjectTypeProperty(node) {
  35910. if (node.proto) {
  35911. this.word("proto");
  35912. this.space();
  35913. }
  35914. if (node.static) {
  35915. this.word("static");
  35916. this.space();
  35917. }
  35918. if (node.kind === "get" || node.kind === "set") {
  35919. this.word(node.kind);
  35920. this.space();
  35921. }
  35922. this._variance(node);
  35923. this.print(node.key, node);
  35924. if (node.optional)
  35925. this.token("?");
  35926. if (!node.method) {
  35927. this.token(":");
  35928. this.space();
  35929. }
  35930. this.print(node.value, node);
  35931. }
  35932. function ObjectTypeSpreadProperty(node) {
  35933. this.token("...");
  35934. this.print(node.argument, node);
  35935. }
  35936. function QualifiedTypeIdentifier(node) {
  35937. this.print(node.qualification, node);
  35938. this.token(".");
  35939. this.print(node.id, node);
  35940. }
  35941. function SymbolTypeAnnotation() {
  35942. this.word("symbol");
  35943. }
  35944. function orSeparator() {
  35945. this.space();
  35946. this.token("|");
  35947. this.space();
  35948. }
  35949. function UnionTypeAnnotation(node) {
  35950. this.printJoin(node.types, node, {
  35951. separator: orSeparator
  35952. });
  35953. }
  35954. function TypeCastExpression(node) {
  35955. this.token("(");
  35956. this.print(node.expression, node);
  35957. this.print(node.typeAnnotation, node);
  35958. this.token(")");
  35959. }
  35960. function Variance(node) {
  35961. if (node.kind === "plus") {
  35962. this.token("+");
  35963. } else {
  35964. this.token("-");
  35965. }
  35966. }
  35967. function VoidTypeAnnotation() {
  35968. this.word("void");
  35969. }
  35970. function IndexedAccessType(node) {
  35971. this.print(node.objectType, node);
  35972. this.token("[");
  35973. this.print(node.indexType, node);
  35974. this.token("]");
  35975. }
  35976. function OptionalIndexedAccessType(node) {
  35977. this.print(node.objectType, node);
  35978. if (node.optional) {
  35979. this.token("?.");
  35980. }
  35981. this.token("[");
  35982. this.print(node.indexType, node);
  35983. this.token("]");
  35984. }
  35985. }
  35986. });
  35987. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/base.js
  35988. var require_base = __commonJS({
  35989. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/base.js"(exports) {
  35990. "use strict";
  35991. Object.defineProperty(exports, "__esModule", {
  35992. value: true
  35993. });
  35994. exports.File = File;
  35995. exports.Program = Program;
  35996. exports.BlockStatement = BlockStatement2;
  35997. exports.Directive = Directive;
  35998. exports.DirectiveLiteral = DirectiveLiteral;
  35999. exports.InterpreterDirective = InterpreterDirective;
  36000. exports.Placeholder = Placeholder;
  36001. var t2 = require_lib4();
  36002. function File(node) {
  36003. if (node.program) {
  36004. this.print(node.program.interpreter, node);
  36005. }
  36006. this.print(node.program, node);
  36007. }
  36008. function Program(node) {
  36009. this.printInnerComments(node, false);
  36010. this.printSequence(node.directives, node);
  36011. if (node.directives && node.directives.length)
  36012. this.newline();
  36013. this.printSequence(node.body, node);
  36014. }
  36015. function BlockStatement2(node) {
  36016. var _node$directives;
  36017. this.token("{");
  36018. this.printInnerComments(node);
  36019. const hasDirectives = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
  36020. if (node.body.length || hasDirectives) {
  36021. this.newline();
  36022. this.printSequence(node.directives, node, {
  36023. indent: true
  36024. });
  36025. if (hasDirectives)
  36026. this.newline();
  36027. this.printSequence(node.body, node, {
  36028. indent: true
  36029. });
  36030. this.removeTrailingNewline();
  36031. this.source("end", node.loc);
  36032. if (!this.endsWith("\n"))
  36033. this.newline();
  36034. this.rightBrace();
  36035. } else {
  36036. this.source("end", node.loc);
  36037. this.token("}");
  36038. }
  36039. }
  36040. function Directive(node) {
  36041. this.print(node.value, node);
  36042. this.semicolon();
  36043. }
  36044. var unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
  36045. var unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
  36046. function DirectiveLiteral(node) {
  36047. const raw = this.getPossibleRaw(node);
  36048. if (raw != null) {
  36049. this.token(raw);
  36050. return;
  36051. }
  36052. const {
  36053. value
  36054. } = node;
  36055. if (!unescapedDoubleQuoteRE.test(value)) {
  36056. this.token(`"${value}"`);
  36057. } else if (!unescapedSingleQuoteRE.test(value)) {
  36058. this.token(`'${value}'`);
  36059. } else {
  36060. throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");
  36061. }
  36062. }
  36063. function InterpreterDirective(node) {
  36064. this.token(`#!${node.value}
  36065. `);
  36066. }
  36067. function Placeholder(node) {
  36068. this.token("%%");
  36069. this.print(node.name);
  36070. this.token("%%");
  36071. if (node.expectedNode === "Statement") {
  36072. this.semicolon();
  36073. }
  36074. }
  36075. }
  36076. });
  36077. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/jsx.js
  36078. var require_jsx3 = __commonJS({
  36079. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/jsx.js"(exports) {
  36080. "use strict";
  36081. Object.defineProperty(exports, "__esModule", {
  36082. value: true
  36083. });
  36084. exports.JSXAttribute = JSXAttribute2;
  36085. exports.JSXIdentifier = JSXIdentifier2;
  36086. exports.JSXNamespacedName = JSXNamespacedName2;
  36087. exports.JSXMemberExpression = JSXMemberExpression2;
  36088. exports.JSXSpreadAttribute = JSXSpreadAttribute2;
  36089. exports.JSXExpressionContainer = JSXExpressionContainer2;
  36090. exports.JSXSpreadChild = JSXSpreadChild;
  36091. exports.JSXText = JSXText2;
  36092. exports.JSXElement = JSXElement2;
  36093. exports.JSXOpeningElement = JSXOpeningElement2;
  36094. exports.JSXClosingElement = JSXClosingElement2;
  36095. exports.JSXEmptyExpression = JSXEmptyExpression2;
  36096. exports.JSXFragment = JSXFragment2;
  36097. exports.JSXOpeningFragment = JSXOpeningFragment2;
  36098. exports.JSXClosingFragment = JSXClosingFragment2;
  36099. var t2 = require_lib4();
  36100. function JSXAttribute2(node) {
  36101. this.print(node.name, node);
  36102. if (node.value) {
  36103. this.token("=");
  36104. this.print(node.value, node);
  36105. }
  36106. }
  36107. function JSXIdentifier2(node) {
  36108. this.word(node.name);
  36109. }
  36110. function JSXNamespacedName2(node) {
  36111. this.print(node.namespace, node);
  36112. this.token(":");
  36113. this.print(node.name, node);
  36114. }
  36115. function JSXMemberExpression2(node) {
  36116. this.print(node.object, node);
  36117. this.token(".");
  36118. this.print(node.property, node);
  36119. }
  36120. function JSXSpreadAttribute2(node) {
  36121. this.token("{");
  36122. this.token("...");
  36123. this.print(node.argument, node);
  36124. this.token("}");
  36125. }
  36126. function JSXExpressionContainer2(node) {
  36127. this.token("{");
  36128. this.print(node.expression, node);
  36129. this.token("}");
  36130. }
  36131. function JSXSpreadChild(node) {
  36132. this.token("{");
  36133. this.token("...");
  36134. this.print(node.expression, node);
  36135. this.token("}");
  36136. }
  36137. function JSXText2(node) {
  36138. const raw = this.getPossibleRaw(node);
  36139. if (raw != null) {
  36140. this.token(raw);
  36141. } else {
  36142. this.token(node.value);
  36143. }
  36144. }
  36145. function JSXElement2(node) {
  36146. const open = node.openingElement;
  36147. this.print(open, node);
  36148. if (open.selfClosing)
  36149. return;
  36150. this.indent();
  36151. for (const child of node.children) {
  36152. this.print(child, node);
  36153. }
  36154. this.dedent();
  36155. this.print(node.closingElement, node);
  36156. }
  36157. function spaceSeparator() {
  36158. this.space();
  36159. }
  36160. function JSXOpeningElement2(node) {
  36161. this.token("<");
  36162. this.print(node.name, node);
  36163. this.print(node.typeParameters, node);
  36164. if (node.attributes.length > 0) {
  36165. this.space();
  36166. this.printJoin(node.attributes, node, {
  36167. separator: spaceSeparator
  36168. });
  36169. }
  36170. if (node.selfClosing) {
  36171. this.space();
  36172. this.token("/>");
  36173. } else {
  36174. this.token(">");
  36175. }
  36176. }
  36177. function JSXClosingElement2(node) {
  36178. this.token("</");
  36179. this.print(node.name, node);
  36180. this.token(">");
  36181. }
  36182. function JSXEmptyExpression2(node) {
  36183. this.printInnerComments(node);
  36184. }
  36185. function JSXFragment2(node) {
  36186. this.print(node.openingFragment, node);
  36187. this.indent();
  36188. for (const child of node.children) {
  36189. this.print(child, node);
  36190. }
  36191. this.dedent();
  36192. this.print(node.closingFragment, node);
  36193. }
  36194. function JSXOpeningFragment2() {
  36195. this.token("<");
  36196. this.token(">");
  36197. }
  36198. function JSXClosingFragment2() {
  36199. this.token("</");
  36200. this.token(">");
  36201. }
  36202. }
  36203. });
  36204. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/typescript.js
  36205. var require_typescript3 = __commonJS({
  36206. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/typescript.js"(exports) {
  36207. "use strict";
  36208. Object.defineProperty(exports, "__esModule", {
  36209. value: true
  36210. });
  36211. exports.TSTypeAnnotation = TSTypeAnnotation;
  36212. exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
  36213. exports.TSTypeParameter = TSTypeParameter;
  36214. exports.TSParameterProperty = TSParameterProperty;
  36215. exports.TSDeclareFunction = TSDeclareFunction;
  36216. exports.TSDeclareMethod = TSDeclareMethod;
  36217. exports.TSQualifiedName = TSQualifiedName;
  36218. exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
  36219. exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
  36220. exports.TSPropertySignature = TSPropertySignature;
  36221. exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
  36222. exports.TSMethodSignature = TSMethodSignature;
  36223. exports.TSIndexSignature = TSIndexSignature;
  36224. exports.TSAnyKeyword = TSAnyKeyword;
  36225. exports.TSBigIntKeyword = TSBigIntKeyword;
  36226. exports.TSUnknownKeyword = TSUnknownKeyword;
  36227. exports.TSNumberKeyword = TSNumberKeyword;
  36228. exports.TSObjectKeyword = TSObjectKeyword;
  36229. exports.TSBooleanKeyword = TSBooleanKeyword;
  36230. exports.TSStringKeyword = TSStringKeyword;
  36231. exports.TSSymbolKeyword = TSSymbolKeyword;
  36232. exports.TSVoidKeyword = TSVoidKeyword;
  36233. exports.TSUndefinedKeyword = TSUndefinedKeyword;
  36234. exports.TSNullKeyword = TSNullKeyword;
  36235. exports.TSNeverKeyword = TSNeverKeyword;
  36236. exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
  36237. exports.TSThisType = TSThisType;
  36238. exports.TSFunctionType = TSFunctionType;
  36239. exports.TSConstructorType = TSConstructorType;
  36240. exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
  36241. exports.TSTypeReference = TSTypeReference;
  36242. exports.TSTypePredicate = TSTypePredicate;
  36243. exports.TSTypeQuery = TSTypeQuery;
  36244. exports.TSTypeLiteral = TSTypeLiteral;
  36245. exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
  36246. exports.tsPrintBraced = tsPrintBraced;
  36247. exports.TSArrayType = TSArrayType;
  36248. exports.TSTupleType = TSTupleType;
  36249. exports.TSOptionalType = TSOptionalType;
  36250. exports.TSRestType = TSRestType;
  36251. exports.TSNamedTupleMember = TSNamedTupleMember;
  36252. exports.TSUnionType = TSUnionType;
  36253. exports.TSIntersectionType = TSIntersectionType;
  36254. exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType;
  36255. exports.TSConditionalType = TSConditionalType;
  36256. exports.TSInferType = TSInferType;
  36257. exports.TSParenthesizedType = TSParenthesizedType;
  36258. exports.TSTypeOperator = TSTypeOperator;
  36259. exports.TSIndexedAccessType = TSIndexedAccessType;
  36260. exports.TSMappedType = TSMappedType;
  36261. exports.TSLiteralType = TSLiteralType;
  36262. exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
  36263. exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
  36264. exports.TSInterfaceBody = TSInterfaceBody;
  36265. exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
  36266. exports.TSAsExpression = TSAsExpression;
  36267. exports.TSTypeAssertion = TSTypeAssertion;
  36268. exports.TSEnumDeclaration = TSEnumDeclaration;
  36269. exports.TSEnumMember = TSEnumMember;
  36270. exports.TSModuleDeclaration = TSModuleDeclaration;
  36271. exports.TSModuleBlock = TSModuleBlock;
  36272. exports.TSImportType = TSImportType;
  36273. exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
  36274. exports.TSExternalModuleReference = TSExternalModuleReference;
  36275. exports.TSNonNullExpression = TSNonNullExpression;
  36276. exports.TSExportAssignment = TSExportAssignment;
  36277. exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
  36278. exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
  36279. exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
  36280. var t2 = require_lib4();
  36281. function TSTypeAnnotation(node) {
  36282. this.token(":");
  36283. this.space();
  36284. if (node.optional)
  36285. this.token("?");
  36286. this.print(node.typeAnnotation, node);
  36287. }
  36288. function TSTypeParameterInstantiation(node) {
  36289. this.token("<");
  36290. this.printList(node.params, node, {});
  36291. this.token(">");
  36292. }
  36293. function TSTypeParameter(node) {
  36294. this.word(node.name);
  36295. if (node.constraint) {
  36296. this.space();
  36297. this.word("extends");
  36298. this.space();
  36299. this.print(node.constraint, node);
  36300. }
  36301. if (node.default) {
  36302. this.space();
  36303. this.token("=");
  36304. this.space();
  36305. this.print(node.default, node);
  36306. }
  36307. }
  36308. function TSParameterProperty(node) {
  36309. if (node.accessibility) {
  36310. this.word(node.accessibility);
  36311. this.space();
  36312. }
  36313. if (node.readonly) {
  36314. this.word("readonly");
  36315. this.space();
  36316. }
  36317. this._param(node.parameter);
  36318. }
  36319. function TSDeclareFunction(node) {
  36320. if (node.declare) {
  36321. this.word("declare");
  36322. this.space();
  36323. }
  36324. this._functionHead(node);
  36325. this.token(";");
  36326. }
  36327. function TSDeclareMethod(node) {
  36328. this._classMethodHead(node);
  36329. this.token(";");
  36330. }
  36331. function TSQualifiedName(node) {
  36332. this.print(node.left, node);
  36333. this.token(".");
  36334. this.print(node.right, node);
  36335. }
  36336. function TSCallSignatureDeclaration(node) {
  36337. this.tsPrintSignatureDeclarationBase(node);
  36338. this.token(";");
  36339. }
  36340. function TSConstructSignatureDeclaration(node) {
  36341. this.word("new");
  36342. this.space();
  36343. this.tsPrintSignatureDeclarationBase(node);
  36344. this.token(";");
  36345. }
  36346. function TSPropertySignature(node) {
  36347. const {
  36348. readonly,
  36349. initializer
  36350. } = node;
  36351. if (readonly) {
  36352. this.word("readonly");
  36353. this.space();
  36354. }
  36355. this.tsPrintPropertyOrMethodName(node);
  36356. this.print(node.typeAnnotation, node);
  36357. if (initializer) {
  36358. this.space();
  36359. this.token("=");
  36360. this.space();
  36361. this.print(initializer, node);
  36362. }
  36363. this.token(";");
  36364. }
  36365. function tsPrintPropertyOrMethodName(node) {
  36366. if (node.computed) {
  36367. this.token("[");
  36368. }
  36369. this.print(node.key, node);
  36370. if (node.computed) {
  36371. this.token("]");
  36372. }
  36373. if (node.optional) {
  36374. this.token("?");
  36375. }
  36376. }
  36377. function TSMethodSignature(node) {
  36378. const {
  36379. kind
  36380. } = node;
  36381. if (kind === "set" || kind === "get") {
  36382. this.word(kind);
  36383. this.space();
  36384. }
  36385. this.tsPrintPropertyOrMethodName(node);
  36386. this.tsPrintSignatureDeclarationBase(node);
  36387. this.token(";");
  36388. }
  36389. function TSIndexSignature(node) {
  36390. const {
  36391. readonly,
  36392. static: isStatic
  36393. } = node;
  36394. if (isStatic) {
  36395. this.word("static");
  36396. this.space();
  36397. }
  36398. if (readonly) {
  36399. this.word("readonly");
  36400. this.space();
  36401. }
  36402. this.token("[");
  36403. this._parameters(node.parameters, node);
  36404. this.token("]");
  36405. this.print(node.typeAnnotation, node);
  36406. this.token(";");
  36407. }
  36408. function TSAnyKeyword() {
  36409. this.word("any");
  36410. }
  36411. function TSBigIntKeyword() {
  36412. this.word("bigint");
  36413. }
  36414. function TSUnknownKeyword() {
  36415. this.word("unknown");
  36416. }
  36417. function TSNumberKeyword() {
  36418. this.word("number");
  36419. }
  36420. function TSObjectKeyword() {
  36421. this.word("object");
  36422. }
  36423. function TSBooleanKeyword() {
  36424. this.word("boolean");
  36425. }
  36426. function TSStringKeyword() {
  36427. this.word("string");
  36428. }
  36429. function TSSymbolKeyword() {
  36430. this.word("symbol");
  36431. }
  36432. function TSVoidKeyword() {
  36433. this.word("void");
  36434. }
  36435. function TSUndefinedKeyword() {
  36436. this.word("undefined");
  36437. }
  36438. function TSNullKeyword() {
  36439. this.word("null");
  36440. }
  36441. function TSNeverKeyword() {
  36442. this.word("never");
  36443. }
  36444. function TSIntrinsicKeyword() {
  36445. this.word("intrinsic");
  36446. }
  36447. function TSThisType() {
  36448. this.word("this");
  36449. }
  36450. function TSFunctionType(node) {
  36451. this.tsPrintFunctionOrConstructorType(node);
  36452. }
  36453. function TSConstructorType(node) {
  36454. if (node.abstract) {
  36455. this.word("abstract");
  36456. this.space();
  36457. }
  36458. this.word("new");
  36459. this.space();
  36460. this.tsPrintFunctionOrConstructorType(node);
  36461. }
  36462. function tsPrintFunctionOrConstructorType(node) {
  36463. const {
  36464. typeParameters,
  36465. parameters
  36466. } = node;
  36467. this.print(typeParameters, node);
  36468. this.token("(");
  36469. this._parameters(parameters, node);
  36470. this.token(")");
  36471. this.space();
  36472. this.token("=>");
  36473. this.space();
  36474. this.print(node.typeAnnotation.typeAnnotation, node);
  36475. }
  36476. function TSTypeReference(node) {
  36477. this.print(node.typeName, node);
  36478. this.print(node.typeParameters, node);
  36479. }
  36480. function TSTypePredicate(node) {
  36481. if (node.asserts) {
  36482. this.word("asserts");
  36483. this.space();
  36484. }
  36485. this.print(node.parameterName);
  36486. if (node.typeAnnotation) {
  36487. this.space();
  36488. this.word("is");
  36489. this.space();
  36490. this.print(node.typeAnnotation.typeAnnotation);
  36491. }
  36492. }
  36493. function TSTypeQuery(node) {
  36494. this.word("typeof");
  36495. this.space();
  36496. this.print(node.exprName);
  36497. }
  36498. function TSTypeLiteral(node) {
  36499. this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
  36500. }
  36501. function tsPrintTypeLiteralOrInterfaceBody(members, node) {
  36502. this.tsPrintBraced(members, node);
  36503. }
  36504. function tsPrintBraced(members, node) {
  36505. this.token("{");
  36506. if (members.length) {
  36507. this.indent();
  36508. this.newline();
  36509. for (const member of members) {
  36510. this.print(member, node);
  36511. this.newline();
  36512. }
  36513. this.dedent();
  36514. this.rightBrace();
  36515. } else {
  36516. this.token("}");
  36517. }
  36518. }
  36519. function TSArrayType(node) {
  36520. this.print(node.elementType, node);
  36521. this.token("[]");
  36522. }
  36523. function TSTupleType(node) {
  36524. this.token("[");
  36525. this.printList(node.elementTypes, node);
  36526. this.token("]");
  36527. }
  36528. function TSOptionalType(node) {
  36529. this.print(node.typeAnnotation, node);
  36530. this.token("?");
  36531. }
  36532. function TSRestType(node) {
  36533. this.token("...");
  36534. this.print(node.typeAnnotation, node);
  36535. }
  36536. function TSNamedTupleMember(node) {
  36537. this.print(node.label, node);
  36538. if (node.optional)
  36539. this.token("?");
  36540. this.token(":");
  36541. this.space();
  36542. this.print(node.elementType, node);
  36543. }
  36544. function TSUnionType(node) {
  36545. this.tsPrintUnionOrIntersectionType(node, "|");
  36546. }
  36547. function TSIntersectionType(node) {
  36548. this.tsPrintUnionOrIntersectionType(node, "&");
  36549. }
  36550. function tsPrintUnionOrIntersectionType(node, sep) {
  36551. this.printJoin(node.types, node, {
  36552. separator() {
  36553. this.space();
  36554. this.token(sep);
  36555. this.space();
  36556. }
  36557. });
  36558. }
  36559. function TSConditionalType(node) {
  36560. this.print(node.checkType);
  36561. this.space();
  36562. this.word("extends");
  36563. this.space();
  36564. this.print(node.extendsType);
  36565. this.space();
  36566. this.token("?");
  36567. this.space();
  36568. this.print(node.trueType);
  36569. this.space();
  36570. this.token(":");
  36571. this.space();
  36572. this.print(node.falseType);
  36573. }
  36574. function TSInferType(node) {
  36575. this.token("infer");
  36576. this.space();
  36577. this.print(node.typeParameter);
  36578. }
  36579. function TSParenthesizedType(node) {
  36580. this.token("(");
  36581. this.print(node.typeAnnotation, node);
  36582. this.token(")");
  36583. }
  36584. function TSTypeOperator(node) {
  36585. this.word(node.operator);
  36586. this.space();
  36587. this.print(node.typeAnnotation, node);
  36588. }
  36589. function TSIndexedAccessType(node) {
  36590. this.print(node.objectType, node);
  36591. this.token("[");
  36592. this.print(node.indexType, node);
  36593. this.token("]");
  36594. }
  36595. function TSMappedType(node) {
  36596. const {
  36597. nameType,
  36598. optional,
  36599. readonly,
  36600. typeParameter
  36601. } = node;
  36602. this.token("{");
  36603. this.space();
  36604. if (readonly) {
  36605. tokenIfPlusMinus(this, readonly);
  36606. this.word("readonly");
  36607. this.space();
  36608. }
  36609. this.token("[");
  36610. this.word(typeParameter.name);
  36611. this.space();
  36612. this.word("in");
  36613. this.space();
  36614. this.print(typeParameter.constraint, typeParameter);
  36615. if (nameType) {
  36616. this.space();
  36617. this.word("as");
  36618. this.space();
  36619. this.print(nameType, node);
  36620. }
  36621. this.token("]");
  36622. if (optional) {
  36623. tokenIfPlusMinus(this, optional);
  36624. this.token("?");
  36625. }
  36626. this.token(":");
  36627. this.space();
  36628. this.print(node.typeAnnotation, node);
  36629. this.space();
  36630. this.token("}");
  36631. }
  36632. function tokenIfPlusMinus(self2, tok) {
  36633. if (tok !== true) {
  36634. self2.token(tok);
  36635. }
  36636. }
  36637. function TSLiteralType(node) {
  36638. this.print(node.literal, node);
  36639. }
  36640. function TSExpressionWithTypeArguments(node) {
  36641. this.print(node.expression, node);
  36642. this.print(node.typeParameters, node);
  36643. }
  36644. function TSInterfaceDeclaration(node) {
  36645. const {
  36646. declare,
  36647. id,
  36648. typeParameters,
  36649. extends: extendz,
  36650. body
  36651. } = node;
  36652. if (declare) {
  36653. this.word("declare");
  36654. this.space();
  36655. }
  36656. this.word("interface");
  36657. this.space();
  36658. this.print(id, node);
  36659. this.print(typeParameters, node);
  36660. if (extendz != null && extendz.length) {
  36661. this.space();
  36662. this.word("extends");
  36663. this.space();
  36664. this.printList(extendz, node);
  36665. }
  36666. this.space();
  36667. this.print(body, node);
  36668. }
  36669. function TSInterfaceBody(node) {
  36670. this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
  36671. }
  36672. function TSTypeAliasDeclaration(node) {
  36673. const {
  36674. declare,
  36675. id,
  36676. typeParameters,
  36677. typeAnnotation
  36678. } = node;
  36679. if (declare) {
  36680. this.word("declare");
  36681. this.space();
  36682. }
  36683. this.word("type");
  36684. this.space();
  36685. this.print(id, node);
  36686. this.print(typeParameters, node);
  36687. this.space();
  36688. this.token("=");
  36689. this.space();
  36690. this.print(typeAnnotation, node);
  36691. this.token(";");
  36692. }
  36693. function TSAsExpression(node) {
  36694. const {
  36695. expression,
  36696. typeAnnotation
  36697. } = node;
  36698. this.print(expression, node);
  36699. this.space();
  36700. this.word("as");
  36701. this.space();
  36702. this.print(typeAnnotation, node);
  36703. }
  36704. function TSTypeAssertion(node) {
  36705. const {
  36706. typeAnnotation,
  36707. expression
  36708. } = node;
  36709. this.token("<");
  36710. this.print(typeAnnotation, node);
  36711. this.token(">");
  36712. this.space();
  36713. this.print(expression, node);
  36714. }
  36715. function TSEnumDeclaration(node) {
  36716. const {
  36717. declare,
  36718. const: isConst,
  36719. id,
  36720. members
  36721. } = node;
  36722. if (declare) {
  36723. this.word("declare");
  36724. this.space();
  36725. }
  36726. if (isConst) {
  36727. this.word("const");
  36728. this.space();
  36729. }
  36730. this.word("enum");
  36731. this.space();
  36732. this.print(id, node);
  36733. this.space();
  36734. this.tsPrintBraced(members, node);
  36735. }
  36736. function TSEnumMember(node) {
  36737. const {
  36738. id,
  36739. initializer
  36740. } = node;
  36741. this.print(id, node);
  36742. if (initializer) {
  36743. this.space();
  36744. this.token("=");
  36745. this.space();
  36746. this.print(initializer, node);
  36747. }
  36748. this.token(",");
  36749. }
  36750. function TSModuleDeclaration(node) {
  36751. const {
  36752. declare,
  36753. id
  36754. } = node;
  36755. if (declare) {
  36756. this.word("declare");
  36757. this.space();
  36758. }
  36759. if (!node.global) {
  36760. this.word(id.type === "Identifier" ? "namespace" : "module");
  36761. this.space();
  36762. }
  36763. this.print(id, node);
  36764. if (!node.body) {
  36765. this.token(";");
  36766. return;
  36767. }
  36768. let body = node.body;
  36769. while (body.type === "TSModuleDeclaration") {
  36770. this.token(".");
  36771. this.print(body.id, body);
  36772. body = body.body;
  36773. }
  36774. this.space();
  36775. this.print(body, node);
  36776. }
  36777. function TSModuleBlock(node) {
  36778. this.tsPrintBraced(node.body, node);
  36779. }
  36780. function TSImportType(node) {
  36781. const {
  36782. argument,
  36783. qualifier,
  36784. typeParameters
  36785. } = node;
  36786. this.word("import");
  36787. this.token("(");
  36788. this.print(argument, node);
  36789. this.token(")");
  36790. if (qualifier) {
  36791. this.token(".");
  36792. this.print(qualifier, node);
  36793. }
  36794. if (typeParameters) {
  36795. this.print(typeParameters, node);
  36796. }
  36797. }
  36798. function TSImportEqualsDeclaration(node) {
  36799. const {
  36800. isExport,
  36801. id,
  36802. moduleReference
  36803. } = node;
  36804. if (isExport) {
  36805. this.word("export");
  36806. this.space();
  36807. }
  36808. this.word("import");
  36809. this.space();
  36810. this.print(id, node);
  36811. this.space();
  36812. this.token("=");
  36813. this.space();
  36814. this.print(moduleReference, node);
  36815. this.token(";");
  36816. }
  36817. function TSExternalModuleReference(node) {
  36818. this.token("require(");
  36819. this.print(node.expression, node);
  36820. this.token(")");
  36821. }
  36822. function TSNonNullExpression(node) {
  36823. this.print(node.expression, node);
  36824. this.token("!");
  36825. }
  36826. function TSExportAssignment(node) {
  36827. this.word("export");
  36828. this.space();
  36829. this.token("=");
  36830. this.space();
  36831. this.print(node.expression, node);
  36832. this.token(";");
  36833. }
  36834. function TSNamespaceExportDeclaration(node) {
  36835. this.word("export");
  36836. this.space();
  36837. this.word("as");
  36838. this.space();
  36839. this.word("namespace");
  36840. this.space();
  36841. this.print(node.id, node);
  36842. }
  36843. function tsPrintSignatureDeclarationBase(node) {
  36844. const {
  36845. typeParameters,
  36846. parameters
  36847. } = node;
  36848. this.print(typeParameters, node);
  36849. this.token("(");
  36850. this._parameters(parameters, node);
  36851. this.token(")");
  36852. this.print(node.typeAnnotation, node);
  36853. }
  36854. function tsPrintClassMemberModifiers(node, isField) {
  36855. if (isField && node.declare) {
  36856. this.word("declare");
  36857. this.space();
  36858. }
  36859. if (node.accessibility) {
  36860. this.word(node.accessibility);
  36861. this.space();
  36862. }
  36863. if (node.static) {
  36864. this.word("static");
  36865. this.space();
  36866. }
  36867. if (node.override) {
  36868. this.word("override");
  36869. this.space();
  36870. }
  36871. if (node.abstract) {
  36872. this.word("abstract");
  36873. this.space();
  36874. }
  36875. if (isField && node.readonly) {
  36876. this.word("readonly");
  36877. this.space();
  36878. }
  36879. }
  36880. }
  36881. });
  36882. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/index.js
  36883. var require_generators = __commonJS({
  36884. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/generators/index.js"(exports) {
  36885. "use strict";
  36886. Object.defineProperty(exports, "__esModule", {
  36887. value: true
  36888. });
  36889. var _templateLiterals = require_template_literals();
  36890. Object.keys(_templateLiterals).forEach(function(key) {
  36891. if (key === "default" || key === "__esModule")
  36892. return;
  36893. if (key in exports && exports[key] === _templateLiterals[key])
  36894. return;
  36895. Object.defineProperty(exports, key, {
  36896. enumerable: true,
  36897. get: function() {
  36898. return _templateLiterals[key];
  36899. }
  36900. });
  36901. });
  36902. var _expressions = require_expressions();
  36903. Object.keys(_expressions).forEach(function(key) {
  36904. if (key === "default" || key === "__esModule")
  36905. return;
  36906. if (key in exports && exports[key] === _expressions[key])
  36907. return;
  36908. Object.defineProperty(exports, key, {
  36909. enumerable: true,
  36910. get: function() {
  36911. return _expressions[key];
  36912. }
  36913. });
  36914. });
  36915. var _statements = require_statements();
  36916. Object.keys(_statements).forEach(function(key) {
  36917. if (key === "default" || key === "__esModule")
  36918. return;
  36919. if (key in exports && exports[key] === _statements[key])
  36920. return;
  36921. Object.defineProperty(exports, key, {
  36922. enumerable: true,
  36923. get: function() {
  36924. return _statements[key];
  36925. }
  36926. });
  36927. });
  36928. var _classes = require_classes();
  36929. Object.keys(_classes).forEach(function(key) {
  36930. if (key === "default" || key === "__esModule")
  36931. return;
  36932. if (key in exports && exports[key] === _classes[key])
  36933. return;
  36934. Object.defineProperty(exports, key, {
  36935. enumerable: true,
  36936. get: function() {
  36937. return _classes[key];
  36938. }
  36939. });
  36940. });
  36941. var _methods = require_methods();
  36942. Object.keys(_methods).forEach(function(key) {
  36943. if (key === "default" || key === "__esModule")
  36944. return;
  36945. if (key in exports && exports[key] === _methods[key])
  36946. return;
  36947. Object.defineProperty(exports, key, {
  36948. enumerable: true,
  36949. get: function() {
  36950. return _methods[key];
  36951. }
  36952. });
  36953. });
  36954. var _modules = require_modules();
  36955. Object.keys(_modules).forEach(function(key) {
  36956. if (key === "default" || key === "__esModule")
  36957. return;
  36958. if (key in exports && exports[key] === _modules[key])
  36959. return;
  36960. Object.defineProperty(exports, key, {
  36961. enumerable: true,
  36962. get: function() {
  36963. return _modules[key];
  36964. }
  36965. });
  36966. });
  36967. var _types = require_types();
  36968. Object.keys(_types).forEach(function(key) {
  36969. if (key === "default" || key === "__esModule")
  36970. return;
  36971. if (key in exports && exports[key] === _types[key])
  36972. return;
  36973. Object.defineProperty(exports, key, {
  36974. enumerable: true,
  36975. get: function() {
  36976. return _types[key];
  36977. }
  36978. });
  36979. });
  36980. var _flow = require_flow3();
  36981. Object.keys(_flow).forEach(function(key) {
  36982. if (key === "default" || key === "__esModule")
  36983. return;
  36984. if (key in exports && exports[key] === _flow[key])
  36985. return;
  36986. Object.defineProperty(exports, key, {
  36987. enumerable: true,
  36988. get: function() {
  36989. return _flow[key];
  36990. }
  36991. });
  36992. });
  36993. var _base = require_base();
  36994. Object.keys(_base).forEach(function(key) {
  36995. if (key === "default" || key === "__esModule")
  36996. return;
  36997. if (key in exports && exports[key] === _base[key])
  36998. return;
  36999. Object.defineProperty(exports, key, {
  37000. enumerable: true,
  37001. get: function() {
  37002. return _base[key];
  37003. }
  37004. });
  37005. });
  37006. var _jsx = require_jsx3();
  37007. Object.keys(_jsx).forEach(function(key) {
  37008. if (key === "default" || key === "__esModule")
  37009. return;
  37010. if (key in exports && exports[key] === _jsx[key])
  37011. return;
  37012. Object.defineProperty(exports, key, {
  37013. enumerable: true,
  37014. get: function() {
  37015. return _jsx[key];
  37016. }
  37017. });
  37018. });
  37019. var _typescript = require_typescript3();
  37020. Object.keys(_typescript).forEach(function(key) {
  37021. if (key === "default" || key === "__esModule")
  37022. return;
  37023. if (key in exports && exports[key] === _typescript[key])
  37024. return;
  37025. Object.defineProperty(exports, key, {
  37026. enumerable: true,
  37027. get: function() {
  37028. return _typescript[key];
  37029. }
  37030. });
  37031. });
  37032. }
  37033. });
  37034. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/printer.js
  37035. var require_printer = __commonJS({
  37036. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/printer.js"(exports) {
  37037. "use strict";
  37038. Object.defineProperty(exports, "__esModule", {
  37039. value: true
  37040. });
  37041. exports.default = void 0;
  37042. var _buffer = require_buffer();
  37043. var n = require_node2();
  37044. var t2 = require_lib4();
  37045. var generatorFunctions = require_generators();
  37046. var SCIENTIFIC_NOTATION = /e/i;
  37047. var ZERO_DECIMAL_INTEGER = /\.0+$/;
  37048. var NON_DECIMAL_LITERAL = /^0[box]/;
  37049. var PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
  37050. var Printer = class {
  37051. constructor(format, map) {
  37052. this.inForStatementInitCounter = 0;
  37053. this._printStack = [];
  37054. this._indent = 0;
  37055. this._insideAux = false;
  37056. this._parenPushNewlineState = null;
  37057. this._noLineTerminator = false;
  37058. this._printAuxAfterOnNextUserNode = false;
  37059. this._printedComments = /* @__PURE__ */ new WeakSet();
  37060. this._endsWithInteger = false;
  37061. this._endsWithWord = false;
  37062. this.format = format;
  37063. this._buf = new _buffer.default(map);
  37064. }
  37065. generate(ast) {
  37066. this.print(ast);
  37067. this._maybeAddAuxComment();
  37068. return this._buf.get();
  37069. }
  37070. indent() {
  37071. if (this.format.compact || this.format.concise)
  37072. return;
  37073. this._indent++;
  37074. }
  37075. dedent() {
  37076. if (this.format.compact || this.format.concise)
  37077. return;
  37078. this._indent--;
  37079. }
  37080. semicolon(force = false) {
  37081. this._maybeAddAuxComment();
  37082. this._append(";", !force);
  37083. }
  37084. rightBrace() {
  37085. if (this.format.minified) {
  37086. this._buf.removeLastSemicolon();
  37087. }
  37088. this.token("}");
  37089. }
  37090. space(force = false) {
  37091. if (this.format.compact)
  37092. return;
  37093. if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
  37094. this._space();
  37095. }
  37096. }
  37097. word(str) {
  37098. if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) {
  37099. this._space();
  37100. }
  37101. this._maybeAddAuxComment();
  37102. this._append(str);
  37103. this._endsWithWord = true;
  37104. }
  37105. number(str) {
  37106. this.word(str);
  37107. this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
  37108. }
  37109. token(str) {
  37110. if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
  37111. this._space();
  37112. }
  37113. this._maybeAddAuxComment();
  37114. this._append(str);
  37115. }
  37116. newline(i) {
  37117. if (this.format.retainLines || this.format.compact)
  37118. return;
  37119. if (this.format.concise) {
  37120. this.space();
  37121. return;
  37122. }
  37123. if (this.endsWith("\n\n"))
  37124. return;
  37125. if (typeof i !== "number")
  37126. i = 1;
  37127. i = Math.min(2, i);
  37128. if (this.endsWith("{\n") || this.endsWith(":\n"))
  37129. i--;
  37130. if (i <= 0)
  37131. return;
  37132. for (let j = 0; j < i; j++) {
  37133. this._newline();
  37134. }
  37135. }
  37136. endsWith(str) {
  37137. return this._buf.endsWith(str);
  37138. }
  37139. removeTrailingNewline() {
  37140. this._buf.removeTrailingNewline();
  37141. }
  37142. exactSource(loc, cb) {
  37143. this._catchUp("start", loc);
  37144. this._buf.exactSource(loc, cb);
  37145. }
  37146. source(prop, loc) {
  37147. this._catchUp(prop, loc);
  37148. this._buf.source(prop, loc);
  37149. }
  37150. withSource(prop, loc, cb) {
  37151. this._catchUp(prop, loc);
  37152. this._buf.withSource(prop, loc, cb);
  37153. }
  37154. _space() {
  37155. this._append(" ", true);
  37156. }
  37157. _newline() {
  37158. this._append("\n", true);
  37159. }
  37160. _append(str, queue = false) {
  37161. this._maybeAddParen(str);
  37162. this._maybeIndent(str);
  37163. if (queue)
  37164. this._buf.queue(str);
  37165. else
  37166. this._buf.append(str);
  37167. this._endsWithWord = false;
  37168. this._endsWithInteger = false;
  37169. }
  37170. _maybeIndent(str) {
  37171. if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
  37172. this._buf.queue(this._getIndent());
  37173. }
  37174. }
  37175. _maybeAddParen(str) {
  37176. const parenPushNewlineState = this._parenPushNewlineState;
  37177. if (!parenPushNewlineState)
  37178. return;
  37179. let i;
  37180. for (i = 0; i < str.length && str[i] === " "; i++)
  37181. continue;
  37182. if (i === str.length) {
  37183. return;
  37184. }
  37185. const cha = str[i];
  37186. if (cha !== "\n") {
  37187. if (cha !== "/" || i + 1 === str.length) {
  37188. this._parenPushNewlineState = null;
  37189. return;
  37190. }
  37191. const chaPost = str[i + 1];
  37192. if (chaPost === "*") {
  37193. if (PURE_ANNOTATION_RE.test(str.slice(i + 2, str.length - 2))) {
  37194. return;
  37195. }
  37196. } else if (chaPost !== "/") {
  37197. this._parenPushNewlineState = null;
  37198. return;
  37199. }
  37200. }
  37201. this.token("(");
  37202. this.indent();
  37203. parenPushNewlineState.printed = true;
  37204. }
  37205. _catchUp(prop, loc) {
  37206. if (!this.format.retainLines)
  37207. return;
  37208. const pos = loc ? loc[prop] : null;
  37209. if ((pos == null ? void 0 : pos.line) != null) {
  37210. const count = pos.line - this._buf.getCurrentLine();
  37211. for (let i = 0; i < count; i++) {
  37212. this._newline();
  37213. }
  37214. }
  37215. }
  37216. _getIndent() {
  37217. return this.format.indent.style.repeat(this._indent);
  37218. }
  37219. startTerminatorless(isLabel = false) {
  37220. if (isLabel) {
  37221. this._noLineTerminator = true;
  37222. return null;
  37223. } else {
  37224. return this._parenPushNewlineState = {
  37225. printed: false
  37226. };
  37227. }
  37228. }
  37229. endTerminatorless(state) {
  37230. this._noLineTerminator = false;
  37231. if (state != null && state.printed) {
  37232. this.dedent();
  37233. this.newline();
  37234. this.token(")");
  37235. }
  37236. }
  37237. print(node, parent) {
  37238. if (!node)
  37239. return;
  37240. const oldConcise = this.format.concise;
  37241. if (node._compact) {
  37242. this.format.concise = true;
  37243. }
  37244. const printMethod = this[node.type];
  37245. if (!printMethod) {
  37246. throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node == null ? void 0 : node.constructor.name)}`);
  37247. }
  37248. this._printStack.push(node);
  37249. const oldInAux = this._insideAux;
  37250. this._insideAux = !node.loc;
  37251. this._maybeAddAuxComment(this._insideAux && !oldInAux);
  37252. let needsParens = n.needsParens(node, parent, this._printStack);
  37253. if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
  37254. needsParens = true;
  37255. }
  37256. if (needsParens)
  37257. this.token("(");
  37258. this._printLeadingComments(node);
  37259. const loc = t2.isProgram(node) || t2.isFile(node) ? null : node.loc;
  37260. this.withSource("start", loc, () => {
  37261. printMethod.call(this, node, parent);
  37262. });
  37263. this._printTrailingComments(node);
  37264. if (needsParens)
  37265. this.token(")");
  37266. this._printStack.pop();
  37267. this.format.concise = oldConcise;
  37268. this._insideAux = oldInAux;
  37269. }
  37270. _maybeAddAuxComment(enteredPositionlessNode) {
  37271. if (enteredPositionlessNode)
  37272. this._printAuxBeforeComment();
  37273. if (!this._insideAux)
  37274. this._printAuxAfterComment();
  37275. }
  37276. _printAuxBeforeComment() {
  37277. if (this._printAuxAfterOnNextUserNode)
  37278. return;
  37279. this._printAuxAfterOnNextUserNode = true;
  37280. const comment2 = this.format.auxiliaryCommentBefore;
  37281. if (comment2) {
  37282. this._printComment({
  37283. type: "CommentBlock",
  37284. value: comment2
  37285. });
  37286. }
  37287. }
  37288. _printAuxAfterComment() {
  37289. if (!this._printAuxAfterOnNextUserNode)
  37290. return;
  37291. this._printAuxAfterOnNextUserNode = false;
  37292. const comment2 = this.format.auxiliaryCommentAfter;
  37293. if (comment2) {
  37294. this._printComment({
  37295. type: "CommentBlock",
  37296. value: comment2
  37297. });
  37298. }
  37299. }
  37300. getPossibleRaw(node) {
  37301. const extra = node.extra;
  37302. if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
  37303. return extra.raw;
  37304. }
  37305. }
  37306. printJoin(nodes, parent, opts = {}) {
  37307. if (!(nodes != null && nodes.length))
  37308. return;
  37309. if (opts.indent)
  37310. this.indent();
  37311. const newlineOpts = {
  37312. addNewlines: opts.addNewlines
  37313. };
  37314. for (let i = 0; i < nodes.length; i++) {
  37315. const node = nodes[i];
  37316. if (!node)
  37317. continue;
  37318. if (opts.statement)
  37319. this._printNewline(true, node, parent, newlineOpts);
  37320. this.print(node, parent);
  37321. if (opts.iterator) {
  37322. opts.iterator(node, i);
  37323. }
  37324. if (opts.separator && i < nodes.length - 1) {
  37325. opts.separator.call(this);
  37326. }
  37327. if (opts.statement)
  37328. this._printNewline(false, node, parent, newlineOpts);
  37329. }
  37330. if (opts.indent)
  37331. this.dedent();
  37332. }
  37333. printAndIndentOnComments(node, parent) {
  37334. const indent = node.leadingComments && node.leadingComments.length > 0;
  37335. if (indent)
  37336. this.indent();
  37337. this.print(node, parent);
  37338. if (indent)
  37339. this.dedent();
  37340. }
  37341. printBlock(parent) {
  37342. const node = parent.body;
  37343. if (!t2.isEmptyStatement(node)) {
  37344. this.space();
  37345. }
  37346. this.print(node, parent);
  37347. }
  37348. _printTrailingComments(node) {
  37349. this._printComments(this._getComments(false, node));
  37350. }
  37351. _printLeadingComments(node) {
  37352. this._printComments(this._getComments(true, node), true);
  37353. }
  37354. printInnerComments(node, indent = true) {
  37355. var _node$innerComments;
  37356. if (!((_node$innerComments = node.innerComments) != null && _node$innerComments.length))
  37357. return;
  37358. if (indent)
  37359. this.indent();
  37360. this._printComments(node.innerComments);
  37361. if (indent)
  37362. this.dedent();
  37363. }
  37364. printSequence(nodes, parent, opts = {}) {
  37365. opts.statement = true;
  37366. return this.printJoin(nodes, parent, opts);
  37367. }
  37368. printList(items, parent, opts = {}) {
  37369. if (opts.separator == null) {
  37370. opts.separator = commaSeparator;
  37371. }
  37372. return this.printJoin(items, parent, opts);
  37373. }
  37374. _printNewline(leading, node, parent, opts) {
  37375. if (this.format.retainLines || this.format.compact)
  37376. return;
  37377. if (this.format.concise) {
  37378. this.space();
  37379. return;
  37380. }
  37381. let lines = 0;
  37382. if (this._buf.hasContent()) {
  37383. if (!leading)
  37384. lines++;
  37385. if (opts.addNewlines)
  37386. lines += opts.addNewlines(leading, node) || 0;
  37387. const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter;
  37388. if (needs(node, parent))
  37389. lines++;
  37390. }
  37391. this.newline(lines);
  37392. }
  37393. _getComments(leading, node) {
  37394. return node && (leading ? node.leadingComments : node.trailingComments) || [];
  37395. }
  37396. _printComment(comment2, skipNewLines) {
  37397. if (!this.format.shouldPrintComment(comment2.value))
  37398. return;
  37399. if (comment2.ignore)
  37400. return;
  37401. if (this._printedComments.has(comment2))
  37402. return;
  37403. this._printedComments.add(comment2);
  37404. const isBlockComment = comment2.type === "CommentBlock";
  37405. const printNewLines = isBlockComment && !skipNewLines && !this._noLineTerminator;
  37406. if (printNewLines && this._buf.hasContent())
  37407. this.newline(1);
  37408. if (!this.endsWith("[") && !this.endsWith("{"))
  37409. this.space();
  37410. let val = !isBlockComment && !this._noLineTerminator ? `//${comment2.value}
  37411. ` : `/*${comment2.value}*/`;
  37412. if (isBlockComment && this.format.indent.adjustMultilineComment) {
  37413. var _comment$loc;
  37414. const offset2 = (_comment$loc = comment2.loc) == null ? void 0 : _comment$loc.start.column;
  37415. if (offset2) {
  37416. const newlineRegex = new RegExp("\\n\\s{1," + offset2 + "}", "g");
  37417. val = val.replace(newlineRegex, "\n");
  37418. }
  37419. const indentSize = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn());
  37420. val = val.replace(/\n(?!$)/g, `
  37421. ${" ".repeat(indentSize)}`);
  37422. }
  37423. if (this.endsWith("/"))
  37424. this._space();
  37425. this.withSource("start", comment2.loc, () => {
  37426. this._append(val);
  37427. });
  37428. if (printNewLines)
  37429. this.newline(1);
  37430. }
  37431. _printComments(comments, inlinePureAnnotation) {
  37432. if (!(comments != null && comments.length))
  37433. return;
  37434. if (inlinePureAnnotation && comments.length === 1 && PURE_ANNOTATION_RE.test(comments[0].value)) {
  37435. this._printComment(comments[0], this._buf.hasContent() && !this.endsWith("\n"));
  37436. } else {
  37437. for (const comment2 of comments) {
  37438. this._printComment(comment2);
  37439. }
  37440. }
  37441. }
  37442. printAssertions(node) {
  37443. var _node$assertions;
  37444. if ((_node$assertions = node.assertions) != null && _node$assertions.length) {
  37445. this.space();
  37446. this.word("assert");
  37447. this.space();
  37448. this.token("{");
  37449. this.space();
  37450. this.printList(node.assertions, node);
  37451. this.space();
  37452. this.token("}");
  37453. }
  37454. }
  37455. };
  37456. Object.assign(Printer.prototype, generatorFunctions);
  37457. {
  37458. Printer.prototype.Noop = function Noop() {
  37459. };
  37460. }
  37461. var _default = Printer;
  37462. exports.default = _default;
  37463. function commaSeparator() {
  37464. this.token(",");
  37465. this.space();
  37466. }
  37467. }
  37468. });
  37469. // node_modules/estree-to-babel/node_modules/@babel/generator/lib/index.js
  37470. var require_lib6 = __commonJS({
  37471. "node_modules/estree-to-babel/node_modules/@babel/generator/lib/index.js"(exports) {
  37472. "use strict";
  37473. Object.defineProperty(exports, "__esModule", {
  37474. value: true
  37475. });
  37476. exports.default = generate2;
  37477. exports.CodeGenerator = void 0;
  37478. var _sourceMap = require_source_map2();
  37479. var _printer = require_printer();
  37480. var Generator = class extends _printer.default {
  37481. constructor(ast, opts = {}, code2) {
  37482. const format = normalizeOptions(code2, opts);
  37483. const map = opts.sourceMaps ? new _sourceMap.default(opts, code2) : null;
  37484. super(format, map);
  37485. this.ast = void 0;
  37486. this.ast = ast;
  37487. }
  37488. generate() {
  37489. return super.generate(this.ast);
  37490. }
  37491. };
  37492. function normalizeOptions(code2, opts) {
  37493. const format = {
  37494. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  37495. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  37496. shouldPrintComment: opts.shouldPrintComment,
  37497. retainLines: opts.retainLines,
  37498. retainFunctionParens: opts.retainFunctionParens,
  37499. comments: opts.comments == null || opts.comments,
  37500. compact: opts.compact,
  37501. minified: opts.minified,
  37502. concise: opts.concise,
  37503. indent: {
  37504. adjustMultilineComment: true,
  37505. style: " ",
  37506. base: 0
  37507. },
  37508. decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
  37509. jsescOption: Object.assign({
  37510. quotes: "double",
  37511. wrap: true,
  37512. minimal: false
  37513. }, opts.jsescOption),
  37514. recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType
  37515. };
  37516. {
  37517. format.jsonCompatibleStrings = opts.jsonCompatibleStrings;
  37518. }
  37519. if (format.minified) {
  37520. format.compact = true;
  37521. format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
  37522. } else {
  37523. format.shouldPrintComment = format.shouldPrintComment || ((value) => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0);
  37524. }
  37525. if (format.compact === "auto") {
  37526. format.compact = code2.length > 5e5;
  37527. if (format.compact) {
  37528. console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${opts.filename} as it exceeds the max of ${"500KB"}.`);
  37529. }
  37530. }
  37531. if (format.compact) {
  37532. format.indent.adjustMultilineComment = false;
  37533. }
  37534. return format;
  37535. }
  37536. var CodeGenerator = class {
  37537. constructor(ast, opts, code2) {
  37538. this._generator = void 0;
  37539. this._generator = new Generator(ast, opts, code2);
  37540. }
  37541. generate() {
  37542. return this._generator.generate();
  37543. }
  37544. };
  37545. exports.CodeGenerator = CodeGenerator;
  37546. function generate2(ast, opts, code2) {
  37547. const gen = new Generator(ast, opts, code2);
  37548. return gen.generate();
  37549. }
  37550. }
  37551. });
  37552. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/ancestry.js
  37553. var require_ancestry = __commonJS({
  37554. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/ancestry.js"(exports) {
  37555. "use strict";
  37556. Object.defineProperty(exports, "__esModule", {
  37557. value: true
  37558. });
  37559. exports.findParent = findParent;
  37560. exports.find = find2;
  37561. exports.getFunctionParent = getFunctionParent;
  37562. exports.getStatementParent = getStatementParent;
  37563. exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
  37564. exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
  37565. exports.getAncestry = getAncestry;
  37566. exports.isAncestor = isAncestor;
  37567. exports.isDescendant = isDescendant;
  37568. exports.inType = inType;
  37569. var t2 = require_lib4();
  37570. var _index = require_path();
  37571. function findParent(callback) {
  37572. let path = this;
  37573. while (path = path.parentPath) {
  37574. if (callback(path))
  37575. return path;
  37576. }
  37577. return null;
  37578. }
  37579. function find2(callback) {
  37580. let path = this;
  37581. do {
  37582. if (callback(path))
  37583. return path;
  37584. } while (path = path.parentPath);
  37585. return null;
  37586. }
  37587. function getFunctionParent() {
  37588. return this.findParent((p) => p.isFunction());
  37589. }
  37590. function getStatementParent() {
  37591. let path = this;
  37592. do {
  37593. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  37594. break;
  37595. } else {
  37596. path = path.parentPath;
  37597. }
  37598. } while (path);
  37599. if (path && (path.isProgram() || path.isFile())) {
  37600. throw new Error("File/Program node, we can't possibly find a statement parent to this");
  37601. }
  37602. return path;
  37603. }
  37604. function getEarliestCommonAncestorFrom(paths) {
  37605. return this.getDeepestCommonAncestorFrom(paths, function(deepest, i, ancestries) {
  37606. let earliest;
  37607. const keys2 = t2.VISITOR_KEYS[deepest.type];
  37608. for (const ancestry of ancestries) {
  37609. const path = ancestry[i + 1];
  37610. if (!earliest) {
  37611. earliest = path;
  37612. continue;
  37613. }
  37614. if (path.listKey && earliest.listKey === path.listKey) {
  37615. if (path.key < earliest.key) {
  37616. earliest = path;
  37617. continue;
  37618. }
  37619. }
  37620. const earliestKeyIndex = keys2.indexOf(earliest.parentKey);
  37621. const currentKeyIndex = keys2.indexOf(path.parentKey);
  37622. if (earliestKeyIndex > currentKeyIndex) {
  37623. earliest = path;
  37624. }
  37625. }
  37626. return earliest;
  37627. });
  37628. }
  37629. function getDeepestCommonAncestorFrom(paths, filter) {
  37630. if (!paths.length) {
  37631. return this;
  37632. }
  37633. if (paths.length === 1) {
  37634. return paths[0];
  37635. }
  37636. let minDepth = Infinity;
  37637. let lastCommonIndex, lastCommon;
  37638. const ancestries = paths.map((path) => {
  37639. const ancestry = [];
  37640. do {
  37641. ancestry.unshift(path);
  37642. } while ((path = path.parentPath) && path !== this);
  37643. if (ancestry.length < minDepth) {
  37644. minDepth = ancestry.length;
  37645. }
  37646. return ancestry;
  37647. });
  37648. const first = ancestries[0];
  37649. depthLoop:
  37650. for (let i = 0; i < minDepth; i++) {
  37651. const shouldMatch = first[i];
  37652. for (const ancestry of ancestries) {
  37653. if (ancestry[i] !== shouldMatch) {
  37654. break depthLoop;
  37655. }
  37656. }
  37657. lastCommonIndex = i;
  37658. lastCommon = shouldMatch;
  37659. }
  37660. if (lastCommon) {
  37661. if (filter) {
  37662. return filter(lastCommon, lastCommonIndex, ancestries);
  37663. } else {
  37664. return lastCommon;
  37665. }
  37666. } else {
  37667. throw new Error("Couldn't find intersection");
  37668. }
  37669. }
  37670. function getAncestry() {
  37671. let path = this;
  37672. const paths = [];
  37673. do {
  37674. paths.push(path);
  37675. } while (path = path.parentPath);
  37676. return paths;
  37677. }
  37678. function isAncestor(maybeDescendant) {
  37679. return maybeDescendant.isDescendant(this);
  37680. }
  37681. function isDescendant(maybeAncestor) {
  37682. return !!this.findParent((parent) => parent === maybeAncestor);
  37683. }
  37684. function inType(...candidateTypes) {
  37685. let path = this;
  37686. while (path) {
  37687. for (const type of candidateTypes) {
  37688. if (path.node.type === type)
  37689. return true;
  37690. }
  37691. path = path.parentPath;
  37692. }
  37693. return false;
  37694. }
  37695. }
  37696. });
  37697. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
  37698. var require_inferer_reference = __commonJS({
  37699. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js"(exports) {
  37700. "use strict";
  37701. Object.defineProperty(exports, "__esModule", {
  37702. value: true
  37703. });
  37704. exports.default = _default;
  37705. var t2 = require_lib4();
  37706. function _default(node) {
  37707. if (!this.isReferenced())
  37708. return;
  37709. const binding = this.scope.getBinding(node.name);
  37710. if (binding) {
  37711. if (binding.identifier.typeAnnotation) {
  37712. return binding.identifier.typeAnnotation;
  37713. } else {
  37714. return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
  37715. }
  37716. }
  37717. if (node.name === "undefined") {
  37718. return t2.voidTypeAnnotation();
  37719. } else if (node.name === "NaN" || node.name === "Infinity") {
  37720. return t2.numberTypeAnnotation();
  37721. } else if (node.name === "arguments") {
  37722. }
  37723. }
  37724. function getTypeAnnotationBindingConstantViolations(binding, path, name2) {
  37725. const types2 = [];
  37726. const functionConstantViolations = [];
  37727. let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
  37728. const testType = getConditionalAnnotation(binding, path, name2);
  37729. if (testType) {
  37730. const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
  37731. constantViolations = constantViolations.filter((path2) => testConstantViolations.indexOf(path2) < 0);
  37732. types2.push(testType.typeAnnotation);
  37733. }
  37734. if (constantViolations.length) {
  37735. constantViolations = constantViolations.concat(functionConstantViolations);
  37736. for (const violation of constantViolations) {
  37737. types2.push(violation.getTypeAnnotation());
  37738. }
  37739. }
  37740. if (!types2.length) {
  37741. return;
  37742. }
  37743. if (t2.isTSTypeAnnotation(types2[0]) && t2.createTSUnionType) {
  37744. return t2.createTSUnionType(types2);
  37745. }
  37746. if (t2.createFlowUnionType) {
  37747. return t2.createFlowUnionType(types2);
  37748. }
  37749. return t2.createUnionTypeAnnotation(types2);
  37750. }
  37751. function getConstantViolationsBefore(binding, path, functions) {
  37752. const violations = binding.constantViolations.slice();
  37753. violations.unshift(binding.path);
  37754. return violations.filter((violation) => {
  37755. violation = violation.resolve();
  37756. const status = violation._guessExecutionStatusRelativeTo(path);
  37757. if (functions && status === "unknown")
  37758. functions.push(violation);
  37759. return status === "before";
  37760. });
  37761. }
  37762. function inferAnnotationFromBinaryExpression(name2, path) {
  37763. const operator = path.node.operator;
  37764. const right = path.get("right").resolve();
  37765. const left = path.get("left").resolve();
  37766. let target;
  37767. if (left.isIdentifier({
  37768. name: name2
  37769. })) {
  37770. target = right;
  37771. } else if (right.isIdentifier({
  37772. name: name2
  37773. })) {
  37774. target = left;
  37775. }
  37776. if (target) {
  37777. if (operator === "===") {
  37778. return target.getTypeAnnotation();
  37779. }
  37780. if (t2.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  37781. return t2.numberTypeAnnotation();
  37782. }
  37783. return;
  37784. }
  37785. if (operator !== "===" && operator !== "==")
  37786. return;
  37787. let typeofPath;
  37788. let typePath;
  37789. if (left.isUnaryExpression({
  37790. operator: "typeof"
  37791. })) {
  37792. typeofPath = left;
  37793. typePath = right;
  37794. } else if (right.isUnaryExpression({
  37795. operator: "typeof"
  37796. })) {
  37797. typeofPath = right;
  37798. typePath = left;
  37799. }
  37800. if (!typeofPath)
  37801. return;
  37802. if (!typeofPath.get("argument").isIdentifier({
  37803. name: name2
  37804. }))
  37805. return;
  37806. typePath = typePath.resolve();
  37807. if (!typePath.isLiteral())
  37808. return;
  37809. const typeValue = typePath.node.value;
  37810. if (typeof typeValue !== "string")
  37811. return;
  37812. return t2.createTypeAnnotationBasedOnTypeof(typeValue);
  37813. }
  37814. function getParentConditionalPath(binding, path, name2) {
  37815. let parentPath;
  37816. while (parentPath = path.parentPath) {
  37817. if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
  37818. if (path.key === "test") {
  37819. return;
  37820. }
  37821. return parentPath;
  37822. }
  37823. if (parentPath.isFunction()) {
  37824. if (parentPath.parentPath.scope.getBinding(name2) !== binding)
  37825. return;
  37826. }
  37827. path = parentPath;
  37828. }
  37829. }
  37830. function getConditionalAnnotation(binding, path, name2) {
  37831. const ifStatement = getParentConditionalPath(binding, path, name2);
  37832. if (!ifStatement)
  37833. return;
  37834. const test = ifStatement.get("test");
  37835. const paths = [test];
  37836. const types2 = [];
  37837. for (let i = 0; i < paths.length; i++) {
  37838. const path2 = paths[i];
  37839. if (path2.isLogicalExpression()) {
  37840. if (path2.node.operator === "&&") {
  37841. paths.push(path2.get("left"));
  37842. paths.push(path2.get("right"));
  37843. }
  37844. } else if (path2.isBinaryExpression()) {
  37845. const type = inferAnnotationFromBinaryExpression(name2, path2);
  37846. if (type)
  37847. types2.push(type);
  37848. }
  37849. }
  37850. if (types2.length) {
  37851. if (t2.isTSTypeAnnotation(types2[0]) && t2.createTSUnionType) {
  37852. return {
  37853. typeAnnotation: t2.createTSUnionType(types2),
  37854. ifStatement
  37855. };
  37856. }
  37857. if (t2.createFlowUnionType) {
  37858. return {
  37859. typeAnnotation: t2.createFlowUnionType(types2),
  37860. ifStatement
  37861. };
  37862. }
  37863. return {
  37864. typeAnnotation: t2.createUnionTypeAnnotation(types2),
  37865. ifStatement
  37866. };
  37867. }
  37868. return getConditionalAnnotation(ifStatement, name2);
  37869. }
  37870. }
  37871. });
  37872. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/inferers.js
  37873. var require_inferers = __commonJS({
  37874. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/inferers.js"(exports) {
  37875. "use strict";
  37876. Object.defineProperty(exports, "__esModule", {
  37877. value: true
  37878. });
  37879. exports.VariableDeclarator = VariableDeclarator;
  37880. exports.TypeCastExpression = TypeCastExpression;
  37881. exports.NewExpression = NewExpression;
  37882. exports.TemplateLiteral = TemplateLiteral;
  37883. exports.UnaryExpression = UnaryExpression;
  37884. exports.BinaryExpression = BinaryExpression2;
  37885. exports.LogicalExpression = LogicalExpression;
  37886. exports.ConditionalExpression = ConditionalExpression;
  37887. exports.SequenceExpression = SequenceExpression;
  37888. exports.ParenthesizedExpression = ParenthesizedExpression;
  37889. exports.AssignmentExpression = AssignmentExpression;
  37890. exports.UpdateExpression = UpdateExpression;
  37891. exports.StringLiteral = StringLiteral;
  37892. exports.NumericLiteral = NumericLiteral;
  37893. exports.BooleanLiteral = BooleanLiteral;
  37894. exports.NullLiteral = NullLiteral;
  37895. exports.RegExpLiteral = RegExpLiteral;
  37896. exports.ObjectExpression = ObjectExpression;
  37897. exports.ArrayExpression = ArrayExpression2;
  37898. exports.RestElement = RestElement2;
  37899. exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
  37900. exports.CallExpression = CallExpression;
  37901. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  37902. Object.defineProperty(exports, "Identifier", {
  37903. enumerable: true,
  37904. get: function() {
  37905. return _infererReference.default;
  37906. }
  37907. });
  37908. var t2 = require_lib4();
  37909. var _infererReference = require_inferer_reference();
  37910. function VariableDeclarator() {
  37911. var _type;
  37912. const id = this.get("id");
  37913. if (!id.isIdentifier())
  37914. return;
  37915. const init = this.get("init");
  37916. let type = init.getTypeAnnotation();
  37917. if (((_type = type) == null ? void 0 : _type.type) === "AnyTypeAnnotation") {
  37918. if (init.isCallExpression() && init.get("callee").isIdentifier({
  37919. name: "Array"
  37920. }) && !init.scope.hasBinding("Array", true)) {
  37921. type = ArrayExpression2();
  37922. }
  37923. }
  37924. return type;
  37925. }
  37926. function TypeCastExpression(node) {
  37927. return node.typeAnnotation;
  37928. }
  37929. TypeCastExpression.validParent = true;
  37930. function NewExpression(node) {
  37931. if (this.get("callee").isIdentifier()) {
  37932. return t2.genericTypeAnnotation(node.callee);
  37933. }
  37934. }
  37935. function TemplateLiteral() {
  37936. return t2.stringTypeAnnotation();
  37937. }
  37938. function UnaryExpression(node) {
  37939. const operator = node.operator;
  37940. if (operator === "void") {
  37941. return t2.voidTypeAnnotation();
  37942. } else if (t2.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
  37943. return t2.numberTypeAnnotation();
  37944. } else if (t2.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
  37945. return t2.stringTypeAnnotation();
  37946. } else if (t2.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
  37947. return t2.booleanTypeAnnotation();
  37948. }
  37949. }
  37950. function BinaryExpression2(node) {
  37951. const operator = node.operator;
  37952. if (t2.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  37953. return t2.numberTypeAnnotation();
  37954. } else if (t2.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
  37955. return t2.booleanTypeAnnotation();
  37956. } else if (operator === "+") {
  37957. const right = this.get("right");
  37958. const left = this.get("left");
  37959. if (left.isBaseType("number") && right.isBaseType("number")) {
  37960. return t2.numberTypeAnnotation();
  37961. } else if (left.isBaseType("string") || right.isBaseType("string")) {
  37962. return t2.stringTypeAnnotation();
  37963. }
  37964. return t2.unionTypeAnnotation([t2.stringTypeAnnotation(), t2.numberTypeAnnotation()]);
  37965. }
  37966. }
  37967. function LogicalExpression() {
  37968. const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
  37969. if (t2.isTSTypeAnnotation(argumentTypes[0]) && t2.createTSUnionType) {
  37970. return t2.createTSUnionType(argumentTypes);
  37971. }
  37972. if (t2.createFlowUnionType) {
  37973. return t2.createFlowUnionType(argumentTypes);
  37974. }
  37975. return t2.createUnionTypeAnnotation(argumentTypes);
  37976. }
  37977. function ConditionalExpression() {
  37978. const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
  37979. if (t2.isTSTypeAnnotation(argumentTypes[0]) && t2.createTSUnionType) {
  37980. return t2.createTSUnionType(argumentTypes);
  37981. }
  37982. if (t2.createFlowUnionType) {
  37983. return t2.createFlowUnionType(argumentTypes);
  37984. }
  37985. return t2.createUnionTypeAnnotation(argumentTypes);
  37986. }
  37987. function SequenceExpression() {
  37988. return this.get("expressions").pop().getTypeAnnotation();
  37989. }
  37990. function ParenthesizedExpression() {
  37991. return this.get("expression").getTypeAnnotation();
  37992. }
  37993. function AssignmentExpression() {
  37994. return this.get("right").getTypeAnnotation();
  37995. }
  37996. function UpdateExpression(node) {
  37997. const operator = node.operator;
  37998. if (operator === "++" || operator === "--") {
  37999. return t2.numberTypeAnnotation();
  38000. }
  38001. }
  38002. function StringLiteral() {
  38003. return t2.stringTypeAnnotation();
  38004. }
  38005. function NumericLiteral() {
  38006. return t2.numberTypeAnnotation();
  38007. }
  38008. function BooleanLiteral() {
  38009. return t2.booleanTypeAnnotation();
  38010. }
  38011. function NullLiteral() {
  38012. return t2.nullLiteralTypeAnnotation();
  38013. }
  38014. function RegExpLiteral() {
  38015. return t2.genericTypeAnnotation(t2.identifier("RegExp"));
  38016. }
  38017. function ObjectExpression() {
  38018. return t2.genericTypeAnnotation(t2.identifier("Object"));
  38019. }
  38020. function ArrayExpression2() {
  38021. return t2.genericTypeAnnotation(t2.identifier("Array"));
  38022. }
  38023. function RestElement2() {
  38024. return ArrayExpression2();
  38025. }
  38026. RestElement2.validParent = true;
  38027. function Func() {
  38028. return t2.genericTypeAnnotation(t2.identifier("Function"));
  38029. }
  38030. var isArrayFrom = t2.buildMatchMemberExpression("Array.from");
  38031. var isObjectKeys = t2.buildMatchMemberExpression("Object.keys");
  38032. var isObjectValues = t2.buildMatchMemberExpression("Object.values");
  38033. var isObjectEntries = t2.buildMatchMemberExpression("Object.entries");
  38034. function CallExpression() {
  38035. const {
  38036. callee
  38037. } = this.node;
  38038. if (isObjectKeys(callee)) {
  38039. return t2.arrayTypeAnnotation(t2.stringTypeAnnotation());
  38040. } else if (isArrayFrom(callee) || isObjectValues(callee)) {
  38041. return t2.arrayTypeAnnotation(t2.anyTypeAnnotation());
  38042. } else if (isObjectEntries(callee)) {
  38043. return t2.arrayTypeAnnotation(t2.tupleTypeAnnotation([t2.stringTypeAnnotation(), t2.anyTypeAnnotation()]));
  38044. }
  38045. return resolveCall(this.get("callee"));
  38046. }
  38047. function TaggedTemplateExpression() {
  38048. return resolveCall(this.get("tag"));
  38049. }
  38050. function resolveCall(callee) {
  38051. callee = callee.resolve();
  38052. if (callee.isFunction()) {
  38053. if (callee.is("async")) {
  38054. if (callee.is("generator")) {
  38055. return t2.genericTypeAnnotation(t2.identifier("AsyncIterator"));
  38056. } else {
  38057. return t2.genericTypeAnnotation(t2.identifier("Promise"));
  38058. }
  38059. } else {
  38060. if (callee.node.returnType) {
  38061. return callee.node.returnType;
  38062. } else {
  38063. }
  38064. }
  38065. }
  38066. }
  38067. }
  38068. });
  38069. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/index.js
  38070. var require_inference = __commonJS({
  38071. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/inference/index.js"(exports) {
  38072. "use strict";
  38073. Object.defineProperty(exports, "__esModule", {
  38074. value: true
  38075. });
  38076. exports.getTypeAnnotation = getTypeAnnotation;
  38077. exports._getTypeAnnotation = _getTypeAnnotation;
  38078. exports.isBaseType = isBaseType;
  38079. exports.couldBeBaseType = couldBeBaseType;
  38080. exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
  38081. exports.isGenericType = isGenericType;
  38082. var inferers = require_inferers();
  38083. var t2 = require_lib4();
  38084. function getTypeAnnotation() {
  38085. if (this.typeAnnotation)
  38086. return this.typeAnnotation;
  38087. let type = this._getTypeAnnotation() || t2.anyTypeAnnotation();
  38088. if (t2.isTypeAnnotation(type))
  38089. type = type.typeAnnotation;
  38090. return this.typeAnnotation = type;
  38091. }
  38092. var typeAnnotationInferringNodes = /* @__PURE__ */ new WeakSet();
  38093. function _getTypeAnnotation() {
  38094. const node = this.node;
  38095. if (!node) {
  38096. if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
  38097. const declar = this.parentPath.parentPath;
  38098. const declarParent = declar.parentPath;
  38099. if (declar.key === "left" && declarParent.isForInStatement()) {
  38100. return t2.stringTypeAnnotation();
  38101. }
  38102. if (declar.key === "left" && declarParent.isForOfStatement()) {
  38103. return t2.anyTypeAnnotation();
  38104. }
  38105. return t2.voidTypeAnnotation();
  38106. } else {
  38107. return;
  38108. }
  38109. }
  38110. if (node.typeAnnotation) {
  38111. return node.typeAnnotation;
  38112. }
  38113. if (typeAnnotationInferringNodes.has(node)) {
  38114. return;
  38115. }
  38116. typeAnnotationInferringNodes.add(node);
  38117. try {
  38118. var _inferer;
  38119. let inferer = inferers[node.type];
  38120. if (inferer) {
  38121. return inferer.call(this, node);
  38122. }
  38123. inferer = inferers[this.parentPath.type];
  38124. if ((_inferer = inferer) != null && _inferer.validParent) {
  38125. return this.parentPath.getTypeAnnotation();
  38126. }
  38127. } finally {
  38128. typeAnnotationInferringNodes.delete(node);
  38129. }
  38130. }
  38131. function isBaseType(baseName, soft) {
  38132. return _isBaseType(baseName, this.getTypeAnnotation(), soft);
  38133. }
  38134. function _isBaseType(baseName, type, soft) {
  38135. if (baseName === "string") {
  38136. return t2.isStringTypeAnnotation(type);
  38137. } else if (baseName === "number") {
  38138. return t2.isNumberTypeAnnotation(type);
  38139. } else if (baseName === "boolean") {
  38140. return t2.isBooleanTypeAnnotation(type);
  38141. } else if (baseName === "any") {
  38142. return t2.isAnyTypeAnnotation(type);
  38143. } else if (baseName === "mixed") {
  38144. return t2.isMixedTypeAnnotation(type);
  38145. } else if (baseName === "empty") {
  38146. return t2.isEmptyTypeAnnotation(type);
  38147. } else if (baseName === "void") {
  38148. return t2.isVoidTypeAnnotation(type);
  38149. } else {
  38150. if (soft) {
  38151. return false;
  38152. } else {
  38153. throw new Error(`Unknown base type ${baseName}`);
  38154. }
  38155. }
  38156. }
  38157. function couldBeBaseType(name2) {
  38158. const type = this.getTypeAnnotation();
  38159. if (t2.isAnyTypeAnnotation(type))
  38160. return true;
  38161. if (t2.isUnionTypeAnnotation(type)) {
  38162. for (const type2 of type.types) {
  38163. if (t2.isAnyTypeAnnotation(type2) || _isBaseType(name2, type2, true)) {
  38164. return true;
  38165. }
  38166. }
  38167. return false;
  38168. } else {
  38169. return _isBaseType(name2, type, true);
  38170. }
  38171. }
  38172. function baseTypeStrictlyMatches(rightArg) {
  38173. const left = this.getTypeAnnotation();
  38174. const right = rightArg.getTypeAnnotation();
  38175. if (!t2.isAnyTypeAnnotation(left) && t2.isFlowBaseAnnotation(left)) {
  38176. return right.type === left.type;
  38177. }
  38178. return false;
  38179. }
  38180. function isGenericType(genericName) {
  38181. const type = this.getTypeAnnotation();
  38182. return t2.isGenericTypeAnnotation(type) && t2.isIdentifier(type.id, {
  38183. name: genericName
  38184. });
  38185. }
  38186. }
  38187. });
  38188. // node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  38189. var require_identifier3 = __commonJS({
  38190. "node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  38191. "use strict";
  38192. Object.defineProperty(exports, "__esModule", {
  38193. value: true
  38194. });
  38195. exports.isIdentifierStart = isIdentifierStart2;
  38196. exports.isIdentifierChar = isIdentifierChar2;
  38197. exports.isIdentifierName = isIdentifierName;
  38198. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  38199. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  38200. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  38201. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  38202. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  38203. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  38204. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  38205. function isInAstralSet2(code2, set) {
  38206. let pos = 65536;
  38207. for (let i = 0, length = set.length; i < length; i += 2) {
  38208. pos += set[i];
  38209. if (pos > code2)
  38210. return false;
  38211. pos += set[i + 1];
  38212. if (pos >= code2)
  38213. return true;
  38214. }
  38215. return false;
  38216. }
  38217. function isIdentifierStart2(code2) {
  38218. if (code2 < 65)
  38219. return code2 === 36;
  38220. if (code2 <= 90)
  38221. return true;
  38222. if (code2 < 97)
  38223. return code2 === 95;
  38224. if (code2 <= 122)
  38225. return true;
  38226. if (code2 <= 65535) {
  38227. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  38228. }
  38229. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  38230. }
  38231. function isIdentifierChar2(code2) {
  38232. if (code2 < 48)
  38233. return code2 === 36;
  38234. if (code2 < 58)
  38235. return true;
  38236. if (code2 < 65)
  38237. return false;
  38238. if (code2 <= 90)
  38239. return true;
  38240. if (code2 < 97)
  38241. return code2 === 95;
  38242. if (code2 <= 122)
  38243. return true;
  38244. if (code2 <= 65535) {
  38245. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  38246. }
  38247. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  38248. }
  38249. function isIdentifierName(name2) {
  38250. let isFirst = true;
  38251. for (let i = 0; i < name2.length; i++) {
  38252. let cp = name2.charCodeAt(i);
  38253. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  38254. const trail = name2.charCodeAt(++i);
  38255. if ((trail & 64512) === 56320) {
  38256. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  38257. }
  38258. }
  38259. if (isFirst) {
  38260. isFirst = false;
  38261. if (!isIdentifierStart2(cp)) {
  38262. return false;
  38263. }
  38264. } else if (!isIdentifierChar2(cp)) {
  38265. return false;
  38266. }
  38267. }
  38268. return !isFirst;
  38269. }
  38270. }
  38271. });
  38272. // node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  38273. var require_keyword3 = __commonJS({
  38274. "node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  38275. "use strict";
  38276. Object.defineProperty(exports, "__esModule", {
  38277. value: true
  38278. });
  38279. exports.isReservedWord = isReservedWord;
  38280. exports.isStrictReservedWord = isStrictReservedWord;
  38281. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  38282. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  38283. exports.isKeyword = isKeyword;
  38284. var reservedWords2 = {
  38285. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  38286. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  38287. strictBind: ["eval", "arguments"]
  38288. };
  38289. var keywords2 = new Set(reservedWords2.keyword);
  38290. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  38291. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  38292. function isReservedWord(word, inModule) {
  38293. return inModule && word === "await" || word === "enum";
  38294. }
  38295. function isStrictReservedWord(word, inModule) {
  38296. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  38297. }
  38298. function isStrictBindOnlyReservedWord(word) {
  38299. return reservedWordsStrictBindSet.has(word);
  38300. }
  38301. function isStrictBindReservedWord(word, inModule) {
  38302. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  38303. }
  38304. function isKeyword(word) {
  38305. return keywords2.has(word);
  38306. }
  38307. }
  38308. });
  38309. // node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/index.js
  38310. var require_lib7 = __commonJS({
  38311. "node_modules/@babel/highlight/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  38312. "use strict";
  38313. Object.defineProperty(exports, "__esModule", {
  38314. value: true
  38315. });
  38316. Object.defineProperty(exports, "isIdentifierName", {
  38317. enumerable: true,
  38318. get: function() {
  38319. return _identifier.isIdentifierName;
  38320. }
  38321. });
  38322. Object.defineProperty(exports, "isIdentifierChar", {
  38323. enumerable: true,
  38324. get: function() {
  38325. return _identifier.isIdentifierChar;
  38326. }
  38327. });
  38328. Object.defineProperty(exports, "isIdentifierStart", {
  38329. enumerable: true,
  38330. get: function() {
  38331. return _identifier.isIdentifierStart;
  38332. }
  38333. });
  38334. Object.defineProperty(exports, "isReservedWord", {
  38335. enumerable: true,
  38336. get: function() {
  38337. return _keyword.isReservedWord;
  38338. }
  38339. });
  38340. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  38341. enumerable: true,
  38342. get: function() {
  38343. return _keyword.isStrictBindOnlyReservedWord;
  38344. }
  38345. });
  38346. Object.defineProperty(exports, "isStrictBindReservedWord", {
  38347. enumerable: true,
  38348. get: function() {
  38349. return _keyword.isStrictBindReservedWord;
  38350. }
  38351. });
  38352. Object.defineProperty(exports, "isStrictReservedWord", {
  38353. enumerable: true,
  38354. get: function() {
  38355. return _keyword.isStrictReservedWord;
  38356. }
  38357. });
  38358. Object.defineProperty(exports, "isKeyword", {
  38359. enumerable: true,
  38360. get: function() {
  38361. return _keyword.isKeyword;
  38362. }
  38363. });
  38364. var _identifier = require_identifier3();
  38365. var _keyword = require_keyword3();
  38366. }
  38367. });
  38368. // node_modules/js-tokens/index.js
  38369. var require_js_tokens = __commonJS({
  38370. "node_modules/js-tokens/index.js"(exports) {
  38371. Object.defineProperty(exports, "__esModule", {
  38372. value: true
  38373. });
  38374. 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;
  38375. exports.matchToToken = function(match) {
  38376. var token = { type: "invalid", value: match[0], closed: void 0 };
  38377. if (match[1])
  38378. token.type = "string", token.closed = !!(match[3] || match[4]);
  38379. else if (match[5])
  38380. token.type = "comment";
  38381. else if (match[6])
  38382. token.type = "comment", token.closed = !!match[7];
  38383. else if (match[8])
  38384. token.type = "regex";
  38385. else if (match[9])
  38386. token.type = "number";
  38387. else if (match[10])
  38388. token.type = "name";
  38389. else if (match[11])
  38390. token.type = "punctuator";
  38391. else if (match[12])
  38392. token.type = "whitespace";
  38393. return token;
  38394. };
  38395. }
  38396. });
  38397. // node_modules/escape-string-regexp/index.js
  38398. var require_escape_string_regexp = __commonJS({
  38399. "node_modules/escape-string-regexp/index.js"(exports, module2) {
  38400. "use strict";
  38401. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  38402. module2.exports = function(str) {
  38403. if (typeof str !== "string") {
  38404. throw new TypeError("Expected a string");
  38405. }
  38406. return str.replace(matchOperatorsRe, "\\$&");
  38407. };
  38408. }
  38409. });
  38410. // node_modules/@babel/highlight/node_modules/color-name/index.js
  38411. var require_color_name = __commonJS({
  38412. "node_modules/@babel/highlight/node_modules/color-name/index.js"(exports, module2) {
  38413. "use strict";
  38414. module2.exports = {
  38415. "aliceblue": [240, 248, 255],
  38416. "antiquewhite": [250, 235, 215],
  38417. "aqua": [0, 255, 255],
  38418. "aquamarine": [127, 255, 212],
  38419. "azure": [240, 255, 255],
  38420. "beige": [245, 245, 220],
  38421. "bisque": [255, 228, 196],
  38422. "black": [0, 0, 0],
  38423. "blanchedalmond": [255, 235, 205],
  38424. "blue": [0, 0, 255],
  38425. "blueviolet": [138, 43, 226],
  38426. "brown": [165, 42, 42],
  38427. "burlywood": [222, 184, 135],
  38428. "cadetblue": [95, 158, 160],
  38429. "chartreuse": [127, 255, 0],
  38430. "chocolate": [210, 105, 30],
  38431. "coral": [255, 127, 80],
  38432. "cornflowerblue": [100, 149, 237],
  38433. "cornsilk": [255, 248, 220],
  38434. "crimson": [220, 20, 60],
  38435. "cyan": [0, 255, 255],
  38436. "darkblue": [0, 0, 139],
  38437. "darkcyan": [0, 139, 139],
  38438. "darkgoldenrod": [184, 134, 11],
  38439. "darkgray": [169, 169, 169],
  38440. "darkgreen": [0, 100, 0],
  38441. "darkgrey": [169, 169, 169],
  38442. "darkkhaki": [189, 183, 107],
  38443. "darkmagenta": [139, 0, 139],
  38444. "darkolivegreen": [85, 107, 47],
  38445. "darkorange": [255, 140, 0],
  38446. "darkorchid": [153, 50, 204],
  38447. "darkred": [139, 0, 0],
  38448. "darksalmon": [233, 150, 122],
  38449. "darkseagreen": [143, 188, 143],
  38450. "darkslateblue": [72, 61, 139],
  38451. "darkslategray": [47, 79, 79],
  38452. "darkslategrey": [47, 79, 79],
  38453. "darkturquoise": [0, 206, 209],
  38454. "darkviolet": [148, 0, 211],
  38455. "deeppink": [255, 20, 147],
  38456. "deepskyblue": [0, 191, 255],
  38457. "dimgray": [105, 105, 105],
  38458. "dimgrey": [105, 105, 105],
  38459. "dodgerblue": [30, 144, 255],
  38460. "firebrick": [178, 34, 34],
  38461. "floralwhite": [255, 250, 240],
  38462. "forestgreen": [34, 139, 34],
  38463. "fuchsia": [255, 0, 255],
  38464. "gainsboro": [220, 220, 220],
  38465. "ghostwhite": [248, 248, 255],
  38466. "gold": [255, 215, 0],
  38467. "goldenrod": [218, 165, 32],
  38468. "gray": [128, 128, 128],
  38469. "green": [0, 128, 0],
  38470. "greenyellow": [173, 255, 47],
  38471. "grey": [128, 128, 128],
  38472. "honeydew": [240, 255, 240],
  38473. "hotpink": [255, 105, 180],
  38474. "indianred": [205, 92, 92],
  38475. "indigo": [75, 0, 130],
  38476. "ivory": [255, 255, 240],
  38477. "khaki": [240, 230, 140],
  38478. "lavender": [230, 230, 250],
  38479. "lavenderblush": [255, 240, 245],
  38480. "lawngreen": [124, 252, 0],
  38481. "lemonchiffon": [255, 250, 205],
  38482. "lightblue": [173, 216, 230],
  38483. "lightcoral": [240, 128, 128],
  38484. "lightcyan": [224, 255, 255],
  38485. "lightgoldenrodyellow": [250, 250, 210],
  38486. "lightgray": [211, 211, 211],
  38487. "lightgreen": [144, 238, 144],
  38488. "lightgrey": [211, 211, 211],
  38489. "lightpink": [255, 182, 193],
  38490. "lightsalmon": [255, 160, 122],
  38491. "lightseagreen": [32, 178, 170],
  38492. "lightskyblue": [135, 206, 250],
  38493. "lightslategray": [119, 136, 153],
  38494. "lightslategrey": [119, 136, 153],
  38495. "lightsteelblue": [176, 196, 222],
  38496. "lightyellow": [255, 255, 224],
  38497. "lime": [0, 255, 0],
  38498. "limegreen": [50, 205, 50],
  38499. "linen": [250, 240, 230],
  38500. "magenta": [255, 0, 255],
  38501. "maroon": [128, 0, 0],
  38502. "mediumaquamarine": [102, 205, 170],
  38503. "mediumblue": [0, 0, 205],
  38504. "mediumorchid": [186, 85, 211],
  38505. "mediumpurple": [147, 112, 219],
  38506. "mediumseagreen": [60, 179, 113],
  38507. "mediumslateblue": [123, 104, 238],
  38508. "mediumspringgreen": [0, 250, 154],
  38509. "mediumturquoise": [72, 209, 204],
  38510. "mediumvioletred": [199, 21, 133],
  38511. "midnightblue": [25, 25, 112],
  38512. "mintcream": [245, 255, 250],
  38513. "mistyrose": [255, 228, 225],
  38514. "moccasin": [255, 228, 181],
  38515. "navajowhite": [255, 222, 173],
  38516. "navy": [0, 0, 128],
  38517. "oldlace": [253, 245, 230],
  38518. "olive": [128, 128, 0],
  38519. "olivedrab": [107, 142, 35],
  38520. "orange": [255, 165, 0],
  38521. "orangered": [255, 69, 0],
  38522. "orchid": [218, 112, 214],
  38523. "palegoldenrod": [238, 232, 170],
  38524. "palegreen": [152, 251, 152],
  38525. "paleturquoise": [175, 238, 238],
  38526. "palevioletred": [219, 112, 147],
  38527. "papayawhip": [255, 239, 213],
  38528. "peachpuff": [255, 218, 185],
  38529. "peru": [205, 133, 63],
  38530. "pink": [255, 192, 203],
  38531. "plum": [221, 160, 221],
  38532. "powderblue": [176, 224, 230],
  38533. "purple": [128, 0, 128],
  38534. "rebeccapurple": [102, 51, 153],
  38535. "red": [255, 0, 0],
  38536. "rosybrown": [188, 143, 143],
  38537. "royalblue": [65, 105, 225],
  38538. "saddlebrown": [139, 69, 19],
  38539. "salmon": [250, 128, 114],
  38540. "sandybrown": [244, 164, 96],
  38541. "seagreen": [46, 139, 87],
  38542. "seashell": [255, 245, 238],
  38543. "sienna": [160, 82, 45],
  38544. "silver": [192, 192, 192],
  38545. "skyblue": [135, 206, 235],
  38546. "slateblue": [106, 90, 205],
  38547. "slategray": [112, 128, 144],
  38548. "slategrey": [112, 128, 144],
  38549. "snow": [255, 250, 250],
  38550. "springgreen": [0, 255, 127],
  38551. "steelblue": [70, 130, 180],
  38552. "tan": [210, 180, 140],
  38553. "teal": [0, 128, 128],
  38554. "thistle": [216, 191, 216],
  38555. "tomato": [255, 99, 71],
  38556. "turquoise": [64, 224, 208],
  38557. "violet": [238, 130, 238],
  38558. "wheat": [245, 222, 179],
  38559. "white": [255, 255, 255],
  38560. "whitesmoke": [245, 245, 245],
  38561. "yellow": [255, 255, 0],
  38562. "yellowgreen": [154, 205, 50]
  38563. };
  38564. }
  38565. });
  38566. // node_modules/@babel/highlight/node_modules/color-convert/conversions.js
  38567. var require_conversions = __commonJS({
  38568. "node_modules/@babel/highlight/node_modules/color-convert/conversions.js"(exports, module2) {
  38569. var cssKeywords = require_color_name();
  38570. var reverseKeywords = {};
  38571. for (key in cssKeywords) {
  38572. if (cssKeywords.hasOwnProperty(key)) {
  38573. reverseKeywords[cssKeywords[key]] = key;
  38574. }
  38575. }
  38576. var key;
  38577. var convert2 = module2.exports = {
  38578. rgb: { channels: 3, labels: "rgb" },
  38579. hsl: { channels: 3, labels: "hsl" },
  38580. hsv: { channels: 3, labels: "hsv" },
  38581. hwb: { channels: 3, labels: "hwb" },
  38582. cmyk: { channels: 4, labels: "cmyk" },
  38583. xyz: { channels: 3, labels: "xyz" },
  38584. lab: { channels: 3, labels: "lab" },
  38585. lch: { channels: 3, labels: "lch" },
  38586. hex: { channels: 1, labels: ["hex"] },
  38587. keyword: { channels: 1, labels: ["keyword"] },
  38588. ansi16: { channels: 1, labels: ["ansi16"] },
  38589. ansi256: { channels: 1, labels: ["ansi256"] },
  38590. hcg: { channels: 3, labels: ["h", "c", "g"] },
  38591. apple: { channels: 3, labels: ["r16", "g16", "b16"] },
  38592. gray: { channels: 1, labels: ["gray"] }
  38593. };
  38594. for (model in convert2) {
  38595. if (convert2.hasOwnProperty(model)) {
  38596. if (!("channels" in convert2[model])) {
  38597. throw new Error("missing channels property: " + model);
  38598. }
  38599. if (!("labels" in convert2[model])) {
  38600. throw new Error("missing channel labels property: " + model);
  38601. }
  38602. if (convert2[model].labels.length !== convert2[model].channels) {
  38603. throw new Error("channel and label counts mismatch: " + model);
  38604. }
  38605. channels = convert2[model].channels;
  38606. labels = convert2[model].labels;
  38607. delete convert2[model].channels;
  38608. delete convert2[model].labels;
  38609. Object.defineProperty(convert2[model], "channels", { value: channels });
  38610. Object.defineProperty(convert2[model], "labels", { value: labels });
  38611. }
  38612. }
  38613. var channels;
  38614. var labels;
  38615. var model;
  38616. convert2.rgb.hsl = function(rgb) {
  38617. var r = rgb[0] / 255;
  38618. var g = rgb[1] / 255;
  38619. var b = rgb[2] / 255;
  38620. var min = Math.min(r, g, b);
  38621. var max = Math.max(r, g, b);
  38622. var delta = max - min;
  38623. var h;
  38624. var s;
  38625. var l;
  38626. if (max === min) {
  38627. h = 0;
  38628. } else if (r === max) {
  38629. h = (g - b) / delta;
  38630. } else if (g === max) {
  38631. h = 2 + (b - r) / delta;
  38632. } else if (b === max) {
  38633. h = 4 + (r - g) / delta;
  38634. }
  38635. h = Math.min(h * 60, 360);
  38636. if (h < 0) {
  38637. h += 360;
  38638. }
  38639. l = (min + max) / 2;
  38640. if (max === min) {
  38641. s = 0;
  38642. } else if (l <= 0.5) {
  38643. s = delta / (max + min);
  38644. } else {
  38645. s = delta / (2 - max - min);
  38646. }
  38647. return [h, s * 100, l * 100];
  38648. };
  38649. convert2.rgb.hsv = function(rgb) {
  38650. var rdif;
  38651. var gdif;
  38652. var bdif;
  38653. var h;
  38654. var s;
  38655. var r = rgb[0] / 255;
  38656. var g = rgb[1] / 255;
  38657. var b = rgb[2] / 255;
  38658. var v = Math.max(r, g, b);
  38659. var diff = v - Math.min(r, g, b);
  38660. var diffc = function(c) {
  38661. return (v - c) / 6 / diff + 1 / 2;
  38662. };
  38663. if (diff === 0) {
  38664. h = s = 0;
  38665. } else {
  38666. s = diff / v;
  38667. rdif = diffc(r);
  38668. gdif = diffc(g);
  38669. bdif = diffc(b);
  38670. if (r === v) {
  38671. h = bdif - gdif;
  38672. } else if (g === v) {
  38673. h = 1 / 3 + rdif - bdif;
  38674. } else if (b === v) {
  38675. h = 2 / 3 + gdif - rdif;
  38676. }
  38677. if (h < 0) {
  38678. h += 1;
  38679. } else if (h > 1) {
  38680. h -= 1;
  38681. }
  38682. }
  38683. return [
  38684. h * 360,
  38685. s * 100,
  38686. v * 100
  38687. ];
  38688. };
  38689. convert2.rgb.hwb = function(rgb) {
  38690. var r = rgb[0];
  38691. var g = rgb[1];
  38692. var b = rgb[2];
  38693. var h = convert2.rgb.hsl(rgb)[0];
  38694. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  38695. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  38696. return [h, w * 100, b * 100];
  38697. };
  38698. convert2.rgb.cmyk = function(rgb) {
  38699. var r = rgb[0] / 255;
  38700. var g = rgb[1] / 255;
  38701. var b = rgb[2] / 255;
  38702. var c;
  38703. var m;
  38704. var y;
  38705. var k;
  38706. k = Math.min(1 - r, 1 - g, 1 - b);
  38707. c = (1 - r - k) / (1 - k) || 0;
  38708. m = (1 - g - k) / (1 - k) || 0;
  38709. y = (1 - b - k) / (1 - k) || 0;
  38710. return [c * 100, m * 100, y * 100, k * 100];
  38711. };
  38712. function comparativeDistance(x, y) {
  38713. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  38714. }
  38715. convert2.rgb.keyword = function(rgb) {
  38716. var reversed = reverseKeywords[rgb];
  38717. if (reversed) {
  38718. return reversed;
  38719. }
  38720. var currentClosestDistance = Infinity;
  38721. var currentClosestKeyword;
  38722. for (var keyword in cssKeywords) {
  38723. if (cssKeywords.hasOwnProperty(keyword)) {
  38724. var value = cssKeywords[keyword];
  38725. var distance = comparativeDistance(rgb, value);
  38726. if (distance < currentClosestDistance) {
  38727. currentClosestDistance = distance;
  38728. currentClosestKeyword = keyword;
  38729. }
  38730. }
  38731. }
  38732. return currentClosestKeyword;
  38733. };
  38734. convert2.keyword.rgb = function(keyword) {
  38735. return cssKeywords[keyword];
  38736. };
  38737. convert2.rgb.xyz = function(rgb) {
  38738. var r = rgb[0] / 255;
  38739. var g = rgb[1] / 255;
  38740. var b = rgb[2] / 255;
  38741. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  38742. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  38743. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  38744. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  38745. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  38746. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  38747. return [x * 100, y * 100, z * 100];
  38748. };
  38749. convert2.rgb.lab = function(rgb) {
  38750. var xyz = convert2.rgb.xyz(rgb);
  38751. var x = xyz[0];
  38752. var y = xyz[1];
  38753. var z = xyz[2];
  38754. var l;
  38755. var a;
  38756. var b;
  38757. x /= 95.047;
  38758. y /= 100;
  38759. z /= 108.883;
  38760. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  38761. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  38762. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  38763. l = 116 * y - 16;
  38764. a = 500 * (x - y);
  38765. b = 200 * (y - z);
  38766. return [l, a, b];
  38767. };
  38768. convert2.hsl.rgb = function(hsl) {
  38769. var h = hsl[0] / 360;
  38770. var s = hsl[1] / 100;
  38771. var l = hsl[2] / 100;
  38772. var t1;
  38773. var t2;
  38774. var t3;
  38775. var rgb;
  38776. var val;
  38777. if (s === 0) {
  38778. val = l * 255;
  38779. return [val, val, val];
  38780. }
  38781. if (l < 0.5) {
  38782. t2 = l * (1 + s);
  38783. } else {
  38784. t2 = l + s - l * s;
  38785. }
  38786. t1 = 2 * l - t2;
  38787. rgb = [0, 0, 0];
  38788. for (var i = 0; i < 3; i++) {
  38789. t3 = h + 1 / 3 * -(i - 1);
  38790. if (t3 < 0) {
  38791. t3++;
  38792. }
  38793. if (t3 > 1) {
  38794. t3--;
  38795. }
  38796. if (6 * t3 < 1) {
  38797. val = t1 + (t2 - t1) * 6 * t3;
  38798. } else if (2 * t3 < 1) {
  38799. val = t2;
  38800. } else if (3 * t3 < 2) {
  38801. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  38802. } else {
  38803. val = t1;
  38804. }
  38805. rgb[i] = val * 255;
  38806. }
  38807. return rgb;
  38808. };
  38809. convert2.hsl.hsv = function(hsl) {
  38810. var h = hsl[0];
  38811. var s = hsl[1] / 100;
  38812. var l = hsl[2] / 100;
  38813. var smin = s;
  38814. var lmin = Math.max(l, 0.01);
  38815. var sv;
  38816. var v;
  38817. l *= 2;
  38818. s *= l <= 1 ? l : 2 - l;
  38819. smin *= lmin <= 1 ? lmin : 2 - lmin;
  38820. v = (l + s) / 2;
  38821. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  38822. return [h, sv * 100, v * 100];
  38823. };
  38824. convert2.hsv.rgb = function(hsv) {
  38825. var h = hsv[0] / 60;
  38826. var s = hsv[1] / 100;
  38827. var v = hsv[2] / 100;
  38828. var hi = Math.floor(h) % 6;
  38829. var f = h - Math.floor(h);
  38830. var p = 255 * v * (1 - s);
  38831. var q = 255 * v * (1 - s * f);
  38832. var t2 = 255 * v * (1 - s * (1 - f));
  38833. v *= 255;
  38834. switch (hi) {
  38835. case 0:
  38836. return [v, t2, p];
  38837. case 1:
  38838. return [q, v, p];
  38839. case 2:
  38840. return [p, v, t2];
  38841. case 3:
  38842. return [p, q, v];
  38843. case 4:
  38844. return [t2, p, v];
  38845. case 5:
  38846. return [v, p, q];
  38847. }
  38848. };
  38849. convert2.hsv.hsl = function(hsv) {
  38850. var h = hsv[0];
  38851. var s = hsv[1] / 100;
  38852. var v = hsv[2] / 100;
  38853. var vmin = Math.max(v, 0.01);
  38854. var lmin;
  38855. var sl;
  38856. var l;
  38857. l = (2 - s) * v;
  38858. lmin = (2 - s) * vmin;
  38859. sl = s * vmin;
  38860. sl /= lmin <= 1 ? lmin : 2 - lmin;
  38861. sl = sl || 0;
  38862. l /= 2;
  38863. return [h, sl * 100, l * 100];
  38864. };
  38865. convert2.hwb.rgb = function(hwb) {
  38866. var h = hwb[0] / 360;
  38867. var wh = hwb[1] / 100;
  38868. var bl = hwb[2] / 100;
  38869. var ratio = wh + bl;
  38870. var i;
  38871. var v;
  38872. var f;
  38873. var n;
  38874. if (ratio > 1) {
  38875. wh /= ratio;
  38876. bl /= ratio;
  38877. }
  38878. i = Math.floor(6 * h);
  38879. v = 1 - bl;
  38880. f = 6 * h - i;
  38881. if ((i & 1) !== 0) {
  38882. f = 1 - f;
  38883. }
  38884. n = wh + f * (v - wh);
  38885. var r;
  38886. var g;
  38887. var b;
  38888. switch (i) {
  38889. default:
  38890. case 6:
  38891. case 0:
  38892. r = v;
  38893. g = n;
  38894. b = wh;
  38895. break;
  38896. case 1:
  38897. r = n;
  38898. g = v;
  38899. b = wh;
  38900. break;
  38901. case 2:
  38902. r = wh;
  38903. g = v;
  38904. b = n;
  38905. break;
  38906. case 3:
  38907. r = wh;
  38908. g = n;
  38909. b = v;
  38910. break;
  38911. case 4:
  38912. r = n;
  38913. g = wh;
  38914. b = v;
  38915. break;
  38916. case 5:
  38917. r = v;
  38918. g = wh;
  38919. b = n;
  38920. break;
  38921. }
  38922. return [r * 255, g * 255, b * 255];
  38923. };
  38924. convert2.cmyk.rgb = function(cmyk) {
  38925. var c = cmyk[0] / 100;
  38926. var m = cmyk[1] / 100;
  38927. var y = cmyk[2] / 100;
  38928. var k = cmyk[3] / 100;
  38929. var r;
  38930. var g;
  38931. var b;
  38932. r = 1 - Math.min(1, c * (1 - k) + k);
  38933. g = 1 - Math.min(1, m * (1 - k) + k);
  38934. b = 1 - Math.min(1, y * (1 - k) + k);
  38935. return [r * 255, g * 255, b * 255];
  38936. };
  38937. convert2.xyz.rgb = function(xyz) {
  38938. var x = xyz[0] / 100;
  38939. var y = xyz[1] / 100;
  38940. var z = xyz[2] / 100;
  38941. var r;
  38942. var g;
  38943. var b;
  38944. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  38945. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  38946. b = x * 0.0557 + y * -0.204 + z * 1.057;
  38947. r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
  38948. g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
  38949. b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
  38950. r = Math.min(Math.max(0, r), 1);
  38951. g = Math.min(Math.max(0, g), 1);
  38952. b = Math.min(Math.max(0, b), 1);
  38953. return [r * 255, g * 255, b * 255];
  38954. };
  38955. convert2.xyz.lab = function(xyz) {
  38956. var x = xyz[0];
  38957. var y = xyz[1];
  38958. var z = xyz[2];
  38959. var l;
  38960. var a;
  38961. var b;
  38962. x /= 95.047;
  38963. y /= 100;
  38964. z /= 108.883;
  38965. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  38966. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  38967. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  38968. l = 116 * y - 16;
  38969. a = 500 * (x - y);
  38970. b = 200 * (y - z);
  38971. return [l, a, b];
  38972. };
  38973. convert2.lab.xyz = function(lab) {
  38974. var l = lab[0];
  38975. var a = lab[1];
  38976. var b = lab[2];
  38977. var x;
  38978. var y;
  38979. var z;
  38980. y = (l + 16) / 116;
  38981. x = a / 500 + y;
  38982. z = y - b / 200;
  38983. var y2 = Math.pow(y, 3);
  38984. var x2 = Math.pow(x, 3);
  38985. var z2 = Math.pow(z, 3);
  38986. y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
  38987. x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
  38988. z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
  38989. x *= 95.047;
  38990. y *= 100;
  38991. z *= 108.883;
  38992. return [x, y, z];
  38993. };
  38994. convert2.lab.lch = function(lab) {
  38995. var l = lab[0];
  38996. var a = lab[1];
  38997. var b = lab[2];
  38998. var hr;
  38999. var h;
  39000. var c;
  39001. hr = Math.atan2(b, a);
  39002. h = hr * 360 / 2 / Math.PI;
  39003. if (h < 0) {
  39004. h += 360;
  39005. }
  39006. c = Math.sqrt(a * a + b * b);
  39007. return [l, c, h];
  39008. };
  39009. convert2.lch.lab = function(lch) {
  39010. var l = lch[0];
  39011. var c = lch[1];
  39012. var h = lch[2];
  39013. var a;
  39014. var b;
  39015. var hr;
  39016. hr = h / 360 * 2 * Math.PI;
  39017. a = c * Math.cos(hr);
  39018. b = c * Math.sin(hr);
  39019. return [l, a, b];
  39020. };
  39021. convert2.rgb.ansi16 = function(args) {
  39022. var r = args[0];
  39023. var g = args[1];
  39024. var b = args[2];
  39025. var value = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args)[2];
  39026. value = Math.round(value / 50);
  39027. if (value === 0) {
  39028. return 30;
  39029. }
  39030. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  39031. if (value === 2) {
  39032. ansi += 60;
  39033. }
  39034. return ansi;
  39035. };
  39036. convert2.hsv.ansi16 = function(args) {
  39037. return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
  39038. };
  39039. convert2.rgb.ansi256 = function(args) {
  39040. var r = args[0];
  39041. var g = args[1];
  39042. var b = args[2];
  39043. if (r === g && g === b) {
  39044. if (r < 8) {
  39045. return 16;
  39046. }
  39047. if (r > 248) {
  39048. return 231;
  39049. }
  39050. return Math.round((r - 8) / 247 * 24) + 232;
  39051. }
  39052. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  39053. return ansi;
  39054. };
  39055. convert2.ansi16.rgb = function(args) {
  39056. var color4 = args % 10;
  39057. if (color4 === 0 || color4 === 7) {
  39058. if (args > 50) {
  39059. color4 += 3.5;
  39060. }
  39061. color4 = color4 / 10.5 * 255;
  39062. return [color4, color4, color4];
  39063. }
  39064. var mult = (~~(args > 50) + 1) * 0.5;
  39065. var r = (color4 & 1) * mult * 255;
  39066. var g = (color4 >> 1 & 1) * mult * 255;
  39067. var b = (color4 >> 2 & 1) * mult * 255;
  39068. return [r, g, b];
  39069. };
  39070. convert2.ansi256.rgb = function(args) {
  39071. if (args >= 232) {
  39072. var c = (args - 232) * 10 + 8;
  39073. return [c, c, c];
  39074. }
  39075. args -= 16;
  39076. var rem;
  39077. var r = Math.floor(args / 36) / 5 * 255;
  39078. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  39079. var b = rem % 6 / 5 * 255;
  39080. return [r, g, b];
  39081. };
  39082. convert2.rgb.hex = function(args) {
  39083. var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
  39084. var string3 = integer.toString(16).toUpperCase();
  39085. return "000000".substring(string3.length) + string3;
  39086. };
  39087. convert2.hex.rgb = function(args) {
  39088. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  39089. if (!match) {
  39090. return [0, 0, 0];
  39091. }
  39092. var colorString = match[0];
  39093. if (match[0].length === 3) {
  39094. colorString = colorString.split("").map(function(char) {
  39095. return char + char;
  39096. }).join("");
  39097. }
  39098. var integer = parseInt(colorString, 16);
  39099. var r = integer >> 16 & 255;
  39100. var g = integer >> 8 & 255;
  39101. var b = integer & 255;
  39102. return [r, g, b];
  39103. };
  39104. convert2.rgb.hcg = function(rgb) {
  39105. var r = rgb[0] / 255;
  39106. var g = rgb[1] / 255;
  39107. var b = rgb[2] / 255;
  39108. var max = Math.max(Math.max(r, g), b);
  39109. var min = Math.min(Math.min(r, g), b);
  39110. var chroma = max - min;
  39111. var grayscale;
  39112. var hue;
  39113. if (chroma < 1) {
  39114. grayscale = min / (1 - chroma);
  39115. } else {
  39116. grayscale = 0;
  39117. }
  39118. if (chroma <= 0) {
  39119. hue = 0;
  39120. } else if (max === r) {
  39121. hue = (g - b) / chroma % 6;
  39122. } else if (max === g) {
  39123. hue = 2 + (b - r) / chroma;
  39124. } else {
  39125. hue = 4 + (r - g) / chroma + 4;
  39126. }
  39127. hue /= 6;
  39128. hue %= 1;
  39129. return [hue * 360, chroma * 100, grayscale * 100];
  39130. };
  39131. convert2.hsl.hcg = function(hsl) {
  39132. var s = hsl[1] / 100;
  39133. var l = hsl[2] / 100;
  39134. var c = 1;
  39135. var f = 0;
  39136. if (l < 0.5) {
  39137. c = 2 * s * l;
  39138. } else {
  39139. c = 2 * s * (1 - l);
  39140. }
  39141. if (c < 1) {
  39142. f = (l - 0.5 * c) / (1 - c);
  39143. }
  39144. return [hsl[0], c * 100, f * 100];
  39145. };
  39146. convert2.hsv.hcg = function(hsv) {
  39147. var s = hsv[1] / 100;
  39148. var v = hsv[2] / 100;
  39149. var c = s * v;
  39150. var f = 0;
  39151. if (c < 1) {
  39152. f = (v - c) / (1 - c);
  39153. }
  39154. return [hsv[0], c * 100, f * 100];
  39155. };
  39156. convert2.hcg.rgb = function(hcg) {
  39157. var h = hcg[0] / 360;
  39158. var c = hcg[1] / 100;
  39159. var g = hcg[2] / 100;
  39160. if (c === 0) {
  39161. return [g * 255, g * 255, g * 255];
  39162. }
  39163. var pure = [0, 0, 0];
  39164. var hi = h % 1 * 6;
  39165. var v = hi % 1;
  39166. var w = 1 - v;
  39167. var mg = 0;
  39168. switch (Math.floor(hi)) {
  39169. case 0:
  39170. pure[0] = 1;
  39171. pure[1] = v;
  39172. pure[2] = 0;
  39173. break;
  39174. case 1:
  39175. pure[0] = w;
  39176. pure[1] = 1;
  39177. pure[2] = 0;
  39178. break;
  39179. case 2:
  39180. pure[0] = 0;
  39181. pure[1] = 1;
  39182. pure[2] = v;
  39183. break;
  39184. case 3:
  39185. pure[0] = 0;
  39186. pure[1] = w;
  39187. pure[2] = 1;
  39188. break;
  39189. case 4:
  39190. pure[0] = v;
  39191. pure[1] = 0;
  39192. pure[2] = 1;
  39193. break;
  39194. default:
  39195. pure[0] = 1;
  39196. pure[1] = 0;
  39197. pure[2] = w;
  39198. }
  39199. mg = (1 - c) * g;
  39200. return [
  39201. (c * pure[0] + mg) * 255,
  39202. (c * pure[1] + mg) * 255,
  39203. (c * pure[2] + mg) * 255
  39204. ];
  39205. };
  39206. convert2.hcg.hsv = function(hcg) {
  39207. var c = hcg[1] / 100;
  39208. var g = hcg[2] / 100;
  39209. var v = c + g * (1 - c);
  39210. var f = 0;
  39211. if (v > 0) {
  39212. f = c / v;
  39213. }
  39214. return [hcg[0], f * 100, v * 100];
  39215. };
  39216. convert2.hcg.hsl = function(hcg) {
  39217. var c = hcg[1] / 100;
  39218. var g = hcg[2] / 100;
  39219. var l = g * (1 - c) + 0.5 * c;
  39220. var s = 0;
  39221. if (l > 0 && l < 0.5) {
  39222. s = c / (2 * l);
  39223. } else if (l >= 0.5 && l < 1) {
  39224. s = c / (2 * (1 - l));
  39225. }
  39226. return [hcg[0], s * 100, l * 100];
  39227. };
  39228. convert2.hcg.hwb = function(hcg) {
  39229. var c = hcg[1] / 100;
  39230. var g = hcg[2] / 100;
  39231. var v = c + g * (1 - c);
  39232. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  39233. };
  39234. convert2.hwb.hcg = function(hwb) {
  39235. var w = hwb[1] / 100;
  39236. var b = hwb[2] / 100;
  39237. var v = 1 - b;
  39238. var c = v - w;
  39239. var g = 0;
  39240. if (c < 1) {
  39241. g = (v - c) / (1 - c);
  39242. }
  39243. return [hwb[0], c * 100, g * 100];
  39244. };
  39245. convert2.apple.rgb = function(apple) {
  39246. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  39247. };
  39248. convert2.rgb.apple = function(rgb) {
  39249. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  39250. };
  39251. convert2.gray.rgb = function(args) {
  39252. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  39253. };
  39254. convert2.gray.hsl = convert2.gray.hsv = function(args) {
  39255. return [0, 0, args[0]];
  39256. };
  39257. convert2.gray.hwb = function(gray) {
  39258. return [0, 100, gray[0]];
  39259. };
  39260. convert2.gray.cmyk = function(gray) {
  39261. return [0, 0, 0, gray[0]];
  39262. };
  39263. convert2.gray.lab = function(gray) {
  39264. return [gray[0], 0, 0];
  39265. };
  39266. convert2.gray.hex = function(gray) {
  39267. var val = Math.round(gray[0] / 100 * 255) & 255;
  39268. var integer = (val << 16) + (val << 8) + val;
  39269. var string3 = integer.toString(16).toUpperCase();
  39270. return "000000".substring(string3.length) + string3;
  39271. };
  39272. convert2.rgb.gray = function(rgb) {
  39273. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  39274. return [val / 255 * 100];
  39275. };
  39276. }
  39277. });
  39278. // node_modules/@babel/highlight/node_modules/color-convert/route.js
  39279. var require_route = __commonJS({
  39280. "node_modules/@babel/highlight/node_modules/color-convert/route.js"(exports, module2) {
  39281. var conversions = require_conversions();
  39282. function buildGraph() {
  39283. var graph = {};
  39284. var models = Object.keys(conversions);
  39285. for (var len = models.length, i = 0; i < len; i++) {
  39286. graph[models[i]] = {
  39287. distance: -1,
  39288. parent: null
  39289. };
  39290. }
  39291. return graph;
  39292. }
  39293. function deriveBFS(fromModel) {
  39294. var graph = buildGraph();
  39295. var queue = [fromModel];
  39296. graph[fromModel].distance = 0;
  39297. while (queue.length) {
  39298. var current2 = queue.pop();
  39299. var adjacents = Object.keys(conversions[current2]);
  39300. for (var len = adjacents.length, i = 0; i < len; i++) {
  39301. var adjacent = adjacents[i];
  39302. var node = graph[adjacent];
  39303. if (node.distance === -1) {
  39304. node.distance = graph[current2].distance + 1;
  39305. node.parent = current2;
  39306. queue.unshift(adjacent);
  39307. }
  39308. }
  39309. }
  39310. return graph;
  39311. }
  39312. function link2(from, to) {
  39313. return function(args) {
  39314. return to(from(args));
  39315. };
  39316. }
  39317. function wrapConversion(toModel, graph) {
  39318. var path = [graph[toModel].parent, toModel];
  39319. var fn = conversions[graph[toModel].parent][toModel];
  39320. var cur = graph[toModel].parent;
  39321. while (graph[cur].parent) {
  39322. path.unshift(graph[cur].parent);
  39323. fn = link2(conversions[graph[cur].parent][cur], fn);
  39324. cur = graph[cur].parent;
  39325. }
  39326. fn.conversion = path;
  39327. return fn;
  39328. }
  39329. module2.exports = function(fromModel) {
  39330. var graph = deriveBFS(fromModel);
  39331. var conversion = {};
  39332. var models = Object.keys(graph);
  39333. for (var len = models.length, i = 0; i < len; i++) {
  39334. var toModel = models[i];
  39335. var node = graph[toModel];
  39336. if (node.parent === null) {
  39337. continue;
  39338. }
  39339. conversion[toModel] = wrapConversion(toModel, graph);
  39340. }
  39341. return conversion;
  39342. };
  39343. }
  39344. });
  39345. // node_modules/@babel/highlight/node_modules/color-convert/index.js
  39346. var require_color_convert = __commonJS({
  39347. "node_modules/@babel/highlight/node_modules/color-convert/index.js"(exports, module2) {
  39348. var conversions = require_conversions();
  39349. var route = require_route();
  39350. var convert2 = {};
  39351. var models = Object.keys(conversions);
  39352. function wrapRaw(fn) {
  39353. var wrappedFn = function(args) {
  39354. if (args === void 0 || args === null) {
  39355. return args;
  39356. }
  39357. if (arguments.length > 1) {
  39358. args = Array.prototype.slice.call(arguments);
  39359. }
  39360. return fn(args);
  39361. };
  39362. if ("conversion" in fn) {
  39363. wrappedFn.conversion = fn.conversion;
  39364. }
  39365. return wrappedFn;
  39366. }
  39367. function wrapRounded(fn) {
  39368. var wrappedFn = function(args) {
  39369. if (args === void 0 || args === null) {
  39370. return args;
  39371. }
  39372. if (arguments.length > 1) {
  39373. args = Array.prototype.slice.call(arguments);
  39374. }
  39375. var result = fn(args);
  39376. if (typeof result === "object") {
  39377. for (var len = result.length, i = 0; i < len; i++) {
  39378. result[i] = Math.round(result[i]);
  39379. }
  39380. }
  39381. return result;
  39382. };
  39383. if ("conversion" in fn) {
  39384. wrappedFn.conversion = fn.conversion;
  39385. }
  39386. return wrappedFn;
  39387. }
  39388. models.forEach(function(fromModel) {
  39389. convert2[fromModel] = {};
  39390. Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels });
  39391. Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
  39392. var routes = route(fromModel);
  39393. var routeModels = Object.keys(routes);
  39394. routeModels.forEach(function(toModel) {
  39395. var fn = routes[toModel];
  39396. convert2[fromModel][toModel] = wrapRounded(fn);
  39397. convert2[fromModel][toModel].raw = wrapRaw(fn);
  39398. });
  39399. });
  39400. module2.exports = convert2;
  39401. }
  39402. });
  39403. // node_modules/@babel/highlight/node_modules/ansi-styles/index.js
  39404. var require_ansi_styles = __commonJS({
  39405. "node_modules/@babel/highlight/node_modules/ansi-styles/index.js"(exports, module2) {
  39406. "use strict";
  39407. var colorConvert = require_color_convert();
  39408. var wrapAnsi16 = (fn, offset2) => function() {
  39409. const code2 = fn.apply(colorConvert, arguments);
  39410. return `\x1B[${code2 + offset2}m`;
  39411. };
  39412. var wrapAnsi256 = (fn, offset2) => function() {
  39413. const code2 = fn.apply(colorConvert, arguments);
  39414. return `\x1B[${38 + offset2};5;${code2}m`;
  39415. };
  39416. var wrapAnsi16m = (fn, offset2) => function() {
  39417. const rgb = fn.apply(colorConvert, arguments);
  39418. return `\x1B[${38 + offset2};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  39419. };
  39420. function assembleStyles() {
  39421. const codes = /* @__PURE__ */ new Map();
  39422. const styles = {
  39423. modifier: {
  39424. reset: [0, 0],
  39425. bold: [1, 22],
  39426. dim: [2, 22],
  39427. italic: [3, 23],
  39428. underline: [4, 24],
  39429. inverse: [7, 27],
  39430. hidden: [8, 28],
  39431. strikethrough: [9, 29]
  39432. },
  39433. color: {
  39434. black: [30, 39],
  39435. red: [31, 39],
  39436. green: [32, 39],
  39437. yellow: [33, 39],
  39438. blue: [34, 39],
  39439. magenta: [35, 39],
  39440. cyan: [36, 39],
  39441. white: [37, 39],
  39442. gray: [90, 39],
  39443. redBright: [91, 39],
  39444. greenBright: [92, 39],
  39445. yellowBright: [93, 39],
  39446. blueBright: [94, 39],
  39447. magentaBright: [95, 39],
  39448. cyanBright: [96, 39],
  39449. whiteBright: [97, 39]
  39450. },
  39451. bgColor: {
  39452. bgBlack: [40, 49],
  39453. bgRed: [41, 49],
  39454. bgGreen: [42, 49],
  39455. bgYellow: [43, 49],
  39456. bgBlue: [44, 49],
  39457. bgMagenta: [45, 49],
  39458. bgCyan: [46, 49],
  39459. bgWhite: [47, 49],
  39460. bgBlackBright: [100, 49],
  39461. bgRedBright: [101, 49],
  39462. bgGreenBright: [102, 49],
  39463. bgYellowBright: [103, 49],
  39464. bgBlueBright: [104, 49],
  39465. bgMagentaBright: [105, 49],
  39466. bgCyanBright: [106, 49],
  39467. bgWhiteBright: [107, 49]
  39468. }
  39469. };
  39470. styles.color.grey = styles.color.gray;
  39471. for (const groupName of Object.keys(styles)) {
  39472. const group = styles[groupName];
  39473. for (const styleName of Object.keys(group)) {
  39474. const style2 = group[styleName];
  39475. styles[styleName] = {
  39476. open: `\x1B[${style2[0]}m`,
  39477. close: `\x1B[${style2[1]}m`
  39478. };
  39479. group[styleName] = styles[styleName];
  39480. codes.set(style2[0], style2[1]);
  39481. }
  39482. Object.defineProperty(styles, groupName, {
  39483. value: group,
  39484. enumerable: false
  39485. });
  39486. Object.defineProperty(styles, "codes", {
  39487. value: codes,
  39488. enumerable: false
  39489. });
  39490. }
  39491. const ansi2ansi = (n) => n;
  39492. const rgb2rgb = (r, g, b) => [r, g, b];
  39493. styles.color.close = "\x1B[39m";
  39494. styles.bgColor.close = "\x1B[49m";
  39495. styles.color.ansi = {
  39496. ansi: wrapAnsi16(ansi2ansi, 0)
  39497. };
  39498. styles.color.ansi256 = {
  39499. ansi256: wrapAnsi256(ansi2ansi, 0)
  39500. };
  39501. styles.color.ansi16m = {
  39502. rgb: wrapAnsi16m(rgb2rgb, 0)
  39503. };
  39504. styles.bgColor.ansi = {
  39505. ansi: wrapAnsi16(ansi2ansi, 10)
  39506. };
  39507. styles.bgColor.ansi256 = {
  39508. ansi256: wrapAnsi256(ansi2ansi, 10)
  39509. };
  39510. styles.bgColor.ansi16m = {
  39511. rgb: wrapAnsi16m(rgb2rgb, 10)
  39512. };
  39513. for (let key of Object.keys(colorConvert)) {
  39514. if (typeof colorConvert[key] !== "object") {
  39515. continue;
  39516. }
  39517. const suite = colorConvert[key];
  39518. if (key === "ansi16") {
  39519. key = "ansi";
  39520. }
  39521. if ("ansi16" in suite) {
  39522. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  39523. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  39524. }
  39525. if ("ansi256" in suite) {
  39526. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  39527. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  39528. }
  39529. if ("rgb" in suite) {
  39530. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  39531. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  39532. }
  39533. }
  39534. return styles;
  39535. }
  39536. Object.defineProperty(module2, "exports", {
  39537. enumerable: true,
  39538. get: assembleStyles
  39539. });
  39540. }
  39541. });
  39542. // node_modules/@babel/highlight/node_modules/has-flag/index.js
  39543. var require_has_flag2 = __commonJS({
  39544. "node_modules/@babel/highlight/node_modules/has-flag/index.js"(exports, module2) {
  39545. "use strict";
  39546. module2.exports = (flag, argv) => {
  39547. argv = argv || process.argv;
  39548. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  39549. const pos = argv.indexOf(prefix + flag);
  39550. const terminatorPos = argv.indexOf("--");
  39551. return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  39552. };
  39553. }
  39554. });
  39555. // node_modules/@babel/highlight/node_modules/supports-color/index.js
  39556. var require_supports_color2 = __commonJS({
  39557. "node_modules/@babel/highlight/node_modules/supports-color/index.js"(exports, module2) {
  39558. "use strict";
  39559. var os = require("os");
  39560. var hasFlag = require_has_flag2();
  39561. var env = process.env;
  39562. var forceColor;
  39563. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
  39564. forceColor = false;
  39565. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  39566. forceColor = true;
  39567. }
  39568. if ("FORCE_COLOR" in env) {
  39569. forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  39570. }
  39571. function translateLevel(level) {
  39572. if (level === 0) {
  39573. return false;
  39574. }
  39575. return {
  39576. level,
  39577. hasBasic: true,
  39578. has256: level >= 2,
  39579. has16m: level >= 3
  39580. };
  39581. }
  39582. function supportsColor(stream) {
  39583. if (forceColor === false) {
  39584. return 0;
  39585. }
  39586. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  39587. return 3;
  39588. }
  39589. if (hasFlag("color=256")) {
  39590. return 2;
  39591. }
  39592. if (stream && !stream.isTTY && forceColor !== true) {
  39593. return 0;
  39594. }
  39595. const min = forceColor ? 1 : 0;
  39596. if (process.platform === "win32") {
  39597. const osRelease = os.release().split(".");
  39598. if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  39599. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  39600. }
  39601. return 1;
  39602. }
  39603. if ("CI" in env) {
  39604. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  39605. return 1;
  39606. }
  39607. return min;
  39608. }
  39609. if ("TEAMCITY_VERSION" in env) {
  39610. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  39611. }
  39612. if (env.COLORTERM === "truecolor") {
  39613. return 3;
  39614. }
  39615. if ("TERM_PROGRAM" in env) {
  39616. const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  39617. switch (env.TERM_PROGRAM) {
  39618. case "iTerm.app":
  39619. return version2 >= 3 ? 3 : 2;
  39620. case "Apple_Terminal":
  39621. return 2;
  39622. }
  39623. }
  39624. if (/-256(color)?$/i.test(env.TERM)) {
  39625. return 2;
  39626. }
  39627. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  39628. return 1;
  39629. }
  39630. if ("COLORTERM" in env) {
  39631. return 1;
  39632. }
  39633. if (env.TERM === "dumb") {
  39634. return min;
  39635. }
  39636. return min;
  39637. }
  39638. function getSupportLevel(stream) {
  39639. const level = supportsColor(stream);
  39640. return translateLevel(level);
  39641. }
  39642. module2.exports = {
  39643. supportsColor: getSupportLevel,
  39644. stdout: getSupportLevel(process.stdout),
  39645. stderr: getSupportLevel(process.stderr)
  39646. };
  39647. }
  39648. });
  39649. // node_modules/@babel/highlight/node_modules/chalk/templates.js
  39650. var require_templates = __commonJS({
  39651. "node_modules/@babel/highlight/node_modules/chalk/templates.js"(exports, module2) {
  39652. "use strict";
  39653. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  39654. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  39655. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  39656. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  39657. var ESCAPES = /* @__PURE__ */ new Map([
  39658. ["n", "\n"],
  39659. ["r", "\r"],
  39660. ["t", " "],
  39661. ["b", "\b"],
  39662. ["f", "\f"],
  39663. ["v", "\v"],
  39664. ["0", "\0"],
  39665. ["\\", "\\"],
  39666. ["e", "\x1B"],
  39667. ["a", "\x07"]
  39668. ]);
  39669. function unescape(c) {
  39670. if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
  39671. return String.fromCharCode(parseInt(c.slice(1), 16));
  39672. }
  39673. return ESCAPES.get(c) || c;
  39674. }
  39675. function parseArguments(name2, args) {
  39676. const results = [];
  39677. const chunks = args.trim().split(/\s*,\s*/g);
  39678. let matches;
  39679. for (const chunk of chunks) {
  39680. if (!isNaN(chunk)) {
  39681. results.push(Number(chunk));
  39682. } else if (matches = chunk.match(STRING_REGEX)) {
  39683. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  39684. } else {
  39685. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
  39686. }
  39687. }
  39688. return results;
  39689. }
  39690. function parseStyle2(style2) {
  39691. STYLE_REGEX.lastIndex = 0;
  39692. const results = [];
  39693. let matches;
  39694. while ((matches = STYLE_REGEX.exec(style2)) !== null) {
  39695. const name2 = matches[1];
  39696. if (matches[2]) {
  39697. const args = parseArguments(name2, matches[2]);
  39698. results.push([name2].concat(args));
  39699. } else {
  39700. results.push([name2]);
  39701. }
  39702. }
  39703. return results;
  39704. }
  39705. function buildStyle(chalk, styles) {
  39706. const enabled = {};
  39707. for (const layer of styles) {
  39708. for (const style2 of layer.styles) {
  39709. enabled[style2[0]] = layer.inverse ? null : style2.slice(1);
  39710. }
  39711. }
  39712. let current2 = chalk;
  39713. for (const styleName of Object.keys(enabled)) {
  39714. if (Array.isArray(enabled[styleName])) {
  39715. if (!(styleName in current2)) {
  39716. throw new Error(`Unknown Chalk style: ${styleName}`);
  39717. }
  39718. if (enabled[styleName].length > 0) {
  39719. current2 = current2[styleName].apply(current2, enabled[styleName]);
  39720. } else {
  39721. current2 = current2[styleName];
  39722. }
  39723. }
  39724. }
  39725. return current2;
  39726. }
  39727. module2.exports = (chalk, tmp) => {
  39728. const styles = [];
  39729. const chunks = [];
  39730. let chunk = [];
  39731. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style2, close, chr) => {
  39732. if (escapeChar) {
  39733. chunk.push(unescape(escapeChar));
  39734. } else if (style2) {
  39735. const str = chunk.join("");
  39736. chunk = [];
  39737. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  39738. styles.push({ inverse, styles: parseStyle2(style2) });
  39739. } else if (close) {
  39740. if (styles.length === 0) {
  39741. throw new Error("Found extraneous } in Chalk template literal");
  39742. }
  39743. chunks.push(buildStyle(chalk, styles)(chunk.join("")));
  39744. chunk = [];
  39745. styles.pop();
  39746. } else {
  39747. chunk.push(chr);
  39748. }
  39749. });
  39750. chunks.push(chunk.join(""));
  39751. if (styles.length > 0) {
  39752. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
  39753. throw new Error(errMsg);
  39754. }
  39755. return chunks.join("");
  39756. };
  39757. }
  39758. });
  39759. // node_modules/@babel/highlight/node_modules/chalk/index.js
  39760. var require_chalk = __commonJS({
  39761. "node_modules/@babel/highlight/node_modules/chalk/index.js"(exports, module2) {
  39762. "use strict";
  39763. var escapeStringRegexp = require_escape_string_regexp();
  39764. var ansiStyles = require_ansi_styles();
  39765. var stdoutColor = require_supports_color2().stdout;
  39766. var template = require_templates();
  39767. var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
  39768. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  39769. var skipModels = /* @__PURE__ */ new Set(["gray"]);
  39770. var styles = /* @__PURE__ */ Object.create(null);
  39771. function applyOptions(obj, options) {
  39772. options = options || {};
  39773. const scLevel = stdoutColor ? stdoutColor.level : 0;
  39774. obj.level = options.level === void 0 ? scLevel : options.level;
  39775. obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
  39776. }
  39777. function Chalk(options) {
  39778. if (!this || !(this instanceof Chalk) || this.template) {
  39779. const chalk = {};
  39780. applyOptions(chalk, options);
  39781. chalk.template = function() {
  39782. const args = [].slice.call(arguments);
  39783. return chalkTag.apply(null, [chalk.template].concat(args));
  39784. };
  39785. Object.setPrototypeOf(chalk, Chalk.prototype);
  39786. Object.setPrototypeOf(chalk.template, chalk);
  39787. chalk.template.constructor = Chalk;
  39788. return chalk.template;
  39789. }
  39790. applyOptions(this, options);
  39791. }
  39792. if (isSimpleWindowsTerm) {
  39793. ansiStyles.blue.open = "\x1B[94m";
  39794. }
  39795. for (const key of Object.keys(ansiStyles)) {
  39796. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
  39797. styles[key] = {
  39798. get() {
  39799. const codes = ansiStyles[key];
  39800. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  39801. }
  39802. };
  39803. }
  39804. styles.visible = {
  39805. get() {
  39806. return build.call(this, this._styles || [], true, "visible");
  39807. }
  39808. };
  39809. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
  39810. for (const model of Object.keys(ansiStyles.color.ansi)) {
  39811. if (skipModels.has(model)) {
  39812. continue;
  39813. }
  39814. styles[model] = {
  39815. get() {
  39816. const level = this.level;
  39817. return function() {
  39818. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  39819. const codes = {
  39820. open,
  39821. close: ansiStyles.color.close,
  39822. closeRe: ansiStyles.color.closeRe
  39823. };
  39824. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  39825. };
  39826. }
  39827. };
  39828. }
  39829. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
  39830. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  39831. if (skipModels.has(model)) {
  39832. continue;
  39833. }
  39834. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  39835. styles[bgModel] = {
  39836. get() {
  39837. const level = this.level;
  39838. return function() {
  39839. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  39840. const codes = {
  39841. open,
  39842. close: ansiStyles.bgColor.close,
  39843. closeRe: ansiStyles.bgColor.closeRe
  39844. };
  39845. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  39846. };
  39847. }
  39848. };
  39849. }
  39850. var proto = Object.defineProperties(() => {
  39851. }, styles);
  39852. function build(_styles, _empty, key) {
  39853. const builder = function() {
  39854. return applyStyle.apply(builder, arguments);
  39855. };
  39856. builder._styles = _styles;
  39857. builder._empty = _empty;
  39858. const self2 = this;
  39859. Object.defineProperty(builder, "level", {
  39860. enumerable: true,
  39861. get() {
  39862. return self2.level;
  39863. },
  39864. set(level) {
  39865. self2.level = level;
  39866. }
  39867. });
  39868. Object.defineProperty(builder, "enabled", {
  39869. enumerable: true,
  39870. get() {
  39871. return self2.enabled;
  39872. },
  39873. set(enabled) {
  39874. self2.enabled = enabled;
  39875. }
  39876. });
  39877. builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
  39878. builder.__proto__ = proto;
  39879. return builder;
  39880. }
  39881. function applyStyle() {
  39882. const args = arguments;
  39883. const argsLen = args.length;
  39884. let str = String(arguments[0]);
  39885. if (argsLen === 0) {
  39886. return "";
  39887. }
  39888. if (argsLen > 1) {
  39889. for (let a = 1; a < argsLen; a++) {
  39890. str += " " + args[a];
  39891. }
  39892. }
  39893. if (!this.enabled || this.level <= 0 || !str) {
  39894. return this._empty ? "" : str;
  39895. }
  39896. const originalDim = ansiStyles.dim.open;
  39897. if (isSimpleWindowsTerm && this.hasGrey) {
  39898. ansiStyles.dim.open = "";
  39899. }
  39900. for (const code2 of this._styles.slice().reverse()) {
  39901. str = code2.open + str.replace(code2.closeRe, code2.open) + code2.close;
  39902. str = str.replace(/\r?\n/g, `${code2.close}$&${code2.open}`);
  39903. }
  39904. ansiStyles.dim.open = originalDim;
  39905. return str;
  39906. }
  39907. function chalkTag(chalk, strings) {
  39908. if (!Array.isArray(strings)) {
  39909. return [].slice.call(arguments, 1).join(" ");
  39910. }
  39911. const args = [].slice.call(arguments, 2);
  39912. const parts = [strings.raw[0]];
  39913. for (let i = 1; i < strings.length; i++) {
  39914. parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
  39915. parts.push(String(strings.raw[i]));
  39916. }
  39917. return template(chalk, parts.join(""));
  39918. }
  39919. Object.defineProperties(Chalk.prototype, styles);
  39920. module2.exports = Chalk();
  39921. module2.exports.supportsColor = stdoutColor;
  39922. module2.exports.default = module2.exports;
  39923. }
  39924. });
  39925. // node_modules/@babel/highlight/lib/index.js
  39926. var require_lib8 = __commonJS({
  39927. "node_modules/@babel/highlight/lib/index.js"(exports) {
  39928. "use strict";
  39929. Object.defineProperty(exports, "__esModule", {
  39930. value: true
  39931. });
  39932. exports.shouldHighlight = shouldHighlight;
  39933. exports.getChalk = getChalk;
  39934. exports.default = highlight;
  39935. var _helperValidatorIdentifier = require_lib7();
  39936. var jsTokens = require_js_tokens();
  39937. var Chalk = require_chalk();
  39938. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  39939. function getDefs(chalk) {
  39940. return {
  39941. keyword: chalk.cyan,
  39942. capitalized: chalk.yellow,
  39943. jsxIdentifier: chalk.yellow,
  39944. punctuator: chalk.yellow,
  39945. number: chalk.magenta,
  39946. string: chalk.green,
  39947. regex: chalk.magenta,
  39948. comment: chalk.grey,
  39949. invalid: chalk.white.bgRed.bold
  39950. };
  39951. }
  39952. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  39953. var BRACKET = /^[()[\]{}]$/;
  39954. var tokenize;
  39955. {
  39956. const JSX_TAG = /^[a-z][\w-]*$/i;
  39957. const getTokenType = function(token, offset2, text5) {
  39958. if (token.type === "name") {
  39959. if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
  39960. return "keyword";
  39961. }
  39962. if (JSX_TAG.test(token.value) && (text5[offset2 - 1] === "<" || text5.substr(offset2 - 2, 2) == "</")) {
  39963. return "jsxIdentifier";
  39964. }
  39965. if (token.value[0] !== token.value[0].toLowerCase()) {
  39966. return "capitalized";
  39967. }
  39968. }
  39969. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  39970. return "bracket";
  39971. }
  39972. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  39973. return "punctuator";
  39974. }
  39975. return token.type;
  39976. };
  39977. tokenize = function* (text5) {
  39978. let match;
  39979. while (match = jsTokens.default.exec(text5)) {
  39980. const token = jsTokens.matchToToken(match);
  39981. yield {
  39982. type: getTokenType(token, match.index, text5),
  39983. value: token.value
  39984. };
  39985. }
  39986. };
  39987. }
  39988. function highlightTokens(defs, text5) {
  39989. let highlighted = "";
  39990. for (const {
  39991. type,
  39992. value
  39993. } of tokenize(text5)) {
  39994. const colorize = defs[type];
  39995. if (colorize) {
  39996. highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
  39997. } else {
  39998. highlighted += value;
  39999. }
  40000. }
  40001. return highlighted;
  40002. }
  40003. function shouldHighlight(options) {
  40004. return !!Chalk.supportsColor || options.forceColor;
  40005. }
  40006. function getChalk(options) {
  40007. return options.forceColor ? new Chalk.constructor({
  40008. enabled: true,
  40009. level: 1
  40010. }) : Chalk;
  40011. }
  40012. function highlight(code2, options = {}) {
  40013. if (shouldHighlight(options)) {
  40014. const chalk = getChalk(options);
  40015. const defs = getDefs(chalk);
  40016. return highlightTokens(defs, code2);
  40017. } else {
  40018. return code2;
  40019. }
  40020. }
  40021. }
  40022. });
  40023. // node_modules/@babel/code-frame/lib/index.js
  40024. var require_lib9 = __commonJS({
  40025. "node_modules/@babel/code-frame/lib/index.js"(exports) {
  40026. "use strict";
  40027. Object.defineProperty(exports, "__esModule", {
  40028. value: true
  40029. });
  40030. exports.codeFrameColumns = codeFrameColumns;
  40031. exports.default = _default;
  40032. var _highlight = _interopRequireWildcard(require_lib8());
  40033. function _getRequireWildcardCache() {
  40034. if (typeof WeakMap !== "function")
  40035. return null;
  40036. var cache = /* @__PURE__ */ new WeakMap();
  40037. _getRequireWildcardCache = function() {
  40038. return cache;
  40039. };
  40040. return cache;
  40041. }
  40042. function _interopRequireWildcard(obj) {
  40043. if (obj && obj.__esModule) {
  40044. return obj;
  40045. }
  40046. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  40047. return { default: obj };
  40048. }
  40049. var cache = _getRequireWildcardCache();
  40050. if (cache && cache.has(obj)) {
  40051. return cache.get(obj);
  40052. }
  40053. var newObj = {};
  40054. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  40055. for (var key in obj) {
  40056. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  40057. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  40058. if (desc && (desc.get || desc.set)) {
  40059. Object.defineProperty(newObj, key, desc);
  40060. } else {
  40061. newObj[key] = obj[key];
  40062. }
  40063. }
  40064. }
  40065. newObj.default = obj;
  40066. if (cache) {
  40067. cache.set(obj, newObj);
  40068. }
  40069. return newObj;
  40070. }
  40071. var deprecationWarningShown = false;
  40072. function getDefs(chalk) {
  40073. return {
  40074. gutter: chalk.grey,
  40075. marker: chalk.red.bold,
  40076. message: chalk.red.bold
  40077. };
  40078. }
  40079. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  40080. function getMarkerLines(loc, source, opts) {
  40081. const startLoc = Object.assign({
  40082. column: 0,
  40083. line: -1
  40084. }, loc.start);
  40085. const endLoc = Object.assign({}, startLoc, loc.end);
  40086. const {
  40087. linesAbove = 2,
  40088. linesBelow = 3
  40089. } = opts || {};
  40090. const startLine = startLoc.line;
  40091. const startColumn = startLoc.column;
  40092. const endLine = endLoc.line;
  40093. const endColumn = endLoc.column;
  40094. let start3 = Math.max(startLine - (linesAbove + 1), 0);
  40095. let end = Math.min(source.length, endLine + linesBelow);
  40096. if (startLine === -1) {
  40097. start3 = 0;
  40098. }
  40099. if (endLine === -1) {
  40100. end = source.length;
  40101. }
  40102. const lineDiff = endLine - startLine;
  40103. const markerLines = {};
  40104. if (lineDiff) {
  40105. for (let i = 0; i <= lineDiff; i++) {
  40106. const lineNumber = i + startLine;
  40107. if (!startColumn) {
  40108. markerLines[lineNumber] = true;
  40109. } else if (i === 0) {
  40110. const sourceLength = source[lineNumber - 1].length;
  40111. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  40112. } else if (i === lineDiff) {
  40113. markerLines[lineNumber] = [0, endColumn];
  40114. } else {
  40115. const sourceLength = source[lineNumber - i].length;
  40116. markerLines[lineNumber] = [0, sourceLength];
  40117. }
  40118. }
  40119. } else {
  40120. if (startColumn === endColumn) {
  40121. if (startColumn) {
  40122. markerLines[startLine] = [startColumn, 0];
  40123. } else {
  40124. markerLines[startLine] = true;
  40125. }
  40126. } else {
  40127. markerLines[startLine] = [startColumn, endColumn - startColumn];
  40128. }
  40129. }
  40130. return {
  40131. start: start3,
  40132. end,
  40133. markerLines
  40134. };
  40135. }
  40136. function codeFrameColumns(rawLines, loc, opts = {}) {
  40137. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  40138. const chalk = (0, _highlight.getChalk)(opts);
  40139. const defs = getDefs(chalk);
  40140. const maybeHighlight = (chalkFn, string3) => {
  40141. return highlighted ? chalkFn(string3) : string3;
  40142. };
  40143. const lines = rawLines.split(NEWLINE);
  40144. const {
  40145. start: start3,
  40146. end,
  40147. markerLines
  40148. } = getMarkerLines(loc, lines, opts);
  40149. const hasColumns = loc.start && typeof loc.start.column === "number";
  40150. const numberMaxWidth = String(end).length;
  40151. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  40152. let frame = highlightedLines.split(NEWLINE).slice(start3, end).map((line, index2) => {
  40153. const number2 = start3 + 1 + index2;
  40154. const paddedNumber = ` ${number2}`.slice(-numberMaxWidth);
  40155. const gutter = ` ${paddedNumber} |`;
  40156. const hasMarker = markerLines[number2];
  40157. const lastMarkerLine = !markerLines[number2 + 1];
  40158. if (hasMarker) {
  40159. let markerLine = "";
  40160. if (Array.isArray(hasMarker)) {
  40161. const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  40162. const numberOfMarkers = hasMarker[1] || 1;
  40163. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  40164. if (lastMarkerLine && opts.message) {
  40165. markerLine += " " + maybeHighlight(defs.message, opts.message);
  40166. }
  40167. }
  40168. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
  40169. } else {
  40170. return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
  40171. }
  40172. }).join("\n");
  40173. if (opts.message && !hasColumns) {
  40174. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  40175. ${frame}`;
  40176. }
  40177. if (highlighted) {
  40178. return chalk.reset(frame);
  40179. } else {
  40180. return frame;
  40181. }
  40182. }
  40183. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  40184. if (!deprecationWarningShown) {
  40185. deprecationWarningShown = true;
  40186. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  40187. if (process.emitWarning) {
  40188. process.emitWarning(message, "DeprecationWarning");
  40189. } else {
  40190. const deprecationError = new Error(message);
  40191. deprecationError.name = "DeprecationWarning";
  40192. console.warn(new Error(message));
  40193. }
  40194. }
  40195. colNumber = Math.max(colNumber, 0);
  40196. const location = {
  40197. start: {
  40198. column: colNumber,
  40199. line: lineNumber
  40200. }
  40201. };
  40202. return codeFrameColumns(rawLines, location, opts);
  40203. }
  40204. }
  40205. });
  40206. // node_modules/estree-to-babel/node_modules/@babel/parser/lib/index.js
  40207. var require_lib10 = __commonJS({
  40208. "node_modules/estree-to-babel/node_modules/@babel/parser/lib/index.js"(exports) {
  40209. "use strict";
  40210. Object.defineProperty(exports, "__esModule", { value: true });
  40211. var beforeExpr2 = true;
  40212. var startsExpr2 = true;
  40213. var isLoop = true;
  40214. var isAssign = true;
  40215. var prefix = true;
  40216. var postfix = true;
  40217. var TokenType3 = class {
  40218. constructor(label, conf = {}) {
  40219. this.label = void 0;
  40220. this.keyword = void 0;
  40221. this.beforeExpr = void 0;
  40222. this.startsExpr = void 0;
  40223. this.rightAssociative = void 0;
  40224. this.isLoop = void 0;
  40225. this.isAssign = void 0;
  40226. this.prefix = void 0;
  40227. this.postfix = void 0;
  40228. this.binop = void 0;
  40229. this.updateContext = void 0;
  40230. this.label = label;
  40231. this.keyword = conf.keyword;
  40232. this.beforeExpr = !!conf.beforeExpr;
  40233. this.startsExpr = !!conf.startsExpr;
  40234. this.rightAssociative = !!conf.rightAssociative;
  40235. this.isLoop = !!conf.isLoop;
  40236. this.isAssign = !!conf.isAssign;
  40237. this.prefix = !!conf.prefix;
  40238. this.postfix = !!conf.postfix;
  40239. this.binop = conf.binop != null ? conf.binop : null;
  40240. this.updateContext = null;
  40241. }
  40242. };
  40243. var keywords$12 = /* @__PURE__ */ new Map();
  40244. function createKeyword(name2, options = {}) {
  40245. options.keyword = name2;
  40246. const token = new TokenType3(name2, options);
  40247. keywords$12.set(name2, token);
  40248. return token;
  40249. }
  40250. function createBinop(name2, binop2) {
  40251. return new TokenType3(name2, {
  40252. beforeExpr: beforeExpr2,
  40253. binop: binop2
  40254. });
  40255. }
  40256. var types$12 = {
  40257. num: new TokenType3("num", {
  40258. startsExpr: startsExpr2
  40259. }),
  40260. bigint: new TokenType3("bigint", {
  40261. startsExpr: startsExpr2
  40262. }),
  40263. decimal: new TokenType3("decimal", {
  40264. startsExpr: startsExpr2
  40265. }),
  40266. regexp: new TokenType3("regexp", {
  40267. startsExpr: startsExpr2
  40268. }),
  40269. string: new TokenType3("string", {
  40270. startsExpr: startsExpr2
  40271. }),
  40272. name: new TokenType3("name", {
  40273. startsExpr: startsExpr2
  40274. }),
  40275. privateName: new TokenType3("#name", {
  40276. startsExpr: startsExpr2
  40277. }),
  40278. eof: new TokenType3("eof"),
  40279. bracketL: new TokenType3("[", {
  40280. beforeExpr: beforeExpr2,
  40281. startsExpr: startsExpr2
  40282. }),
  40283. bracketHashL: new TokenType3("#[", {
  40284. beforeExpr: beforeExpr2,
  40285. startsExpr: startsExpr2
  40286. }),
  40287. bracketBarL: new TokenType3("[|", {
  40288. beforeExpr: beforeExpr2,
  40289. startsExpr: startsExpr2
  40290. }),
  40291. bracketR: new TokenType3("]"),
  40292. bracketBarR: new TokenType3("|]"),
  40293. braceL: new TokenType3("{", {
  40294. beforeExpr: beforeExpr2,
  40295. startsExpr: startsExpr2
  40296. }),
  40297. braceBarL: new TokenType3("{|", {
  40298. beforeExpr: beforeExpr2,
  40299. startsExpr: startsExpr2
  40300. }),
  40301. braceHashL: new TokenType3("#{", {
  40302. beforeExpr: beforeExpr2,
  40303. startsExpr: startsExpr2
  40304. }),
  40305. braceR: new TokenType3("}"),
  40306. braceBarR: new TokenType3("|}"),
  40307. parenL: new TokenType3("(", {
  40308. beforeExpr: beforeExpr2,
  40309. startsExpr: startsExpr2
  40310. }),
  40311. parenR: new TokenType3(")"),
  40312. comma: new TokenType3(",", {
  40313. beforeExpr: beforeExpr2
  40314. }),
  40315. semi: new TokenType3(";", {
  40316. beforeExpr: beforeExpr2
  40317. }),
  40318. colon: new TokenType3(":", {
  40319. beforeExpr: beforeExpr2
  40320. }),
  40321. doubleColon: new TokenType3("::", {
  40322. beforeExpr: beforeExpr2
  40323. }),
  40324. dot: new TokenType3("."),
  40325. question: new TokenType3("?", {
  40326. beforeExpr: beforeExpr2
  40327. }),
  40328. questionDot: new TokenType3("?."),
  40329. arrow: new TokenType3("=>", {
  40330. beforeExpr: beforeExpr2
  40331. }),
  40332. template: new TokenType3("template"),
  40333. ellipsis: new TokenType3("...", {
  40334. beforeExpr: beforeExpr2
  40335. }),
  40336. backQuote: new TokenType3("`", {
  40337. startsExpr: startsExpr2
  40338. }),
  40339. dollarBraceL: new TokenType3("${", {
  40340. beforeExpr: beforeExpr2,
  40341. startsExpr: startsExpr2
  40342. }),
  40343. at: new TokenType3("@"),
  40344. hash: new TokenType3("#", {
  40345. startsExpr: startsExpr2
  40346. }),
  40347. interpreterDirective: new TokenType3("#!..."),
  40348. eq: new TokenType3("=", {
  40349. beforeExpr: beforeExpr2,
  40350. isAssign
  40351. }),
  40352. assign: new TokenType3("_=", {
  40353. beforeExpr: beforeExpr2,
  40354. isAssign
  40355. }),
  40356. incDec: new TokenType3("++/--", {
  40357. prefix,
  40358. postfix,
  40359. startsExpr: startsExpr2
  40360. }),
  40361. bang: new TokenType3("!", {
  40362. beforeExpr: beforeExpr2,
  40363. prefix,
  40364. startsExpr: startsExpr2
  40365. }),
  40366. tilde: new TokenType3("~", {
  40367. beforeExpr: beforeExpr2,
  40368. prefix,
  40369. startsExpr: startsExpr2
  40370. }),
  40371. pipeline: createBinop("|>", 0),
  40372. nullishCoalescing: createBinop("??", 1),
  40373. logicalOR: createBinop("||", 1),
  40374. logicalAND: createBinop("&&", 2),
  40375. bitwiseOR: createBinop("|", 3),
  40376. bitwiseXOR: createBinop("^", 4),
  40377. bitwiseAND: createBinop("&", 5),
  40378. equality: createBinop("==/!=/===/!==", 6),
  40379. relational: createBinop("</>/<=/>=", 7),
  40380. bitShift: createBinop("<</>>/>>>", 8),
  40381. plusMin: new TokenType3("+/-", {
  40382. beforeExpr: beforeExpr2,
  40383. binop: 9,
  40384. prefix,
  40385. startsExpr: startsExpr2
  40386. }),
  40387. modulo: new TokenType3("%", {
  40388. beforeExpr: beforeExpr2,
  40389. binop: 10,
  40390. startsExpr: startsExpr2
  40391. }),
  40392. star: new TokenType3("*", {
  40393. binop: 10
  40394. }),
  40395. slash: createBinop("/", 10),
  40396. exponent: new TokenType3("**", {
  40397. beforeExpr: beforeExpr2,
  40398. binop: 11,
  40399. rightAssociative: true
  40400. }),
  40401. _break: createKeyword("break"),
  40402. _case: createKeyword("case", {
  40403. beforeExpr: beforeExpr2
  40404. }),
  40405. _catch: createKeyword("catch"),
  40406. _continue: createKeyword("continue"),
  40407. _debugger: createKeyword("debugger"),
  40408. _default: createKeyword("default", {
  40409. beforeExpr: beforeExpr2
  40410. }),
  40411. _do: createKeyword("do", {
  40412. isLoop,
  40413. beforeExpr: beforeExpr2
  40414. }),
  40415. _else: createKeyword("else", {
  40416. beforeExpr: beforeExpr2
  40417. }),
  40418. _finally: createKeyword("finally"),
  40419. _for: createKeyword("for", {
  40420. isLoop
  40421. }),
  40422. _function: createKeyword("function", {
  40423. startsExpr: startsExpr2
  40424. }),
  40425. _if: createKeyword("if"),
  40426. _return: createKeyword("return", {
  40427. beforeExpr: beforeExpr2
  40428. }),
  40429. _switch: createKeyword("switch"),
  40430. _throw: createKeyword("throw", {
  40431. beforeExpr: beforeExpr2,
  40432. prefix,
  40433. startsExpr: startsExpr2
  40434. }),
  40435. _try: createKeyword("try"),
  40436. _var: createKeyword("var"),
  40437. _const: createKeyword("const"),
  40438. _while: createKeyword("while", {
  40439. isLoop
  40440. }),
  40441. _with: createKeyword("with"),
  40442. _new: createKeyword("new", {
  40443. beforeExpr: beforeExpr2,
  40444. startsExpr: startsExpr2
  40445. }),
  40446. _this: createKeyword("this", {
  40447. startsExpr: startsExpr2
  40448. }),
  40449. _super: createKeyword("super", {
  40450. startsExpr: startsExpr2
  40451. }),
  40452. _class: createKeyword("class", {
  40453. startsExpr: startsExpr2
  40454. }),
  40455. _extends: createKeyword("extends", {
  40456. beforeExpr: beforeExpr2
  40457. }),
  40458. _export: createKeyword("export"),
  40459. _import: createKeyword("import", {
  40460. startsExpr: startsExpr2
  40461. }),
  40462. _null: createKeyword("null", {
  40463. startsExpr: startsExpr2
  40464. }),
  40465. _true: createKeyword("true", {
  40466. startsExpr: startsExpr2
  40467. }),
  40468. _false: createKeyword("false", {
  40469. startsExpr: startsExpr2
  40470. }),
  40471. _in: createKeyword("in", {
  40472. beforeExpr: beforeExpr2,
  40473. binop: 7
  40474. }),
  40475. _instanceof: createKeyword("instanceof", {
  40476. beforeExpr: beforeExpr2,
  40477. binop: 7
  40478. }),
  40479. _typeof: createKeyword("typeof", {
  40480. beforeExpr: beforeExpr2,
  40481. prefix,
  40482. startsExpr: startsExpr2
  40483. }),
  40484. _void: createKeyword("void", {
  40485. beforeExpr: beforeExpr2,
  40486. prefix,
  40487. startsExpr: startsExpr2
  40488. }),
  40489. _delete: createKeyword("delete", {
  40490. beforeExpr: beforeExpr2,
  40491. prefix,
  40492. startsExpr: startsExpr2
  40493. })
  40494. };
  40495. var lineBreak2 = /\r\n?|[\n\u2028\u2029]/;
  40496. var lineBreakG2 = new RegExp(lineBreak2.source, "g");
  40497. function isNewLine2(code2) {
  40498. switch (code2) {
  40499. case 10:
  40500. case 13:
  40501. case 8232:
  40502. case 8233:
  40503. return true;
  40504. default:
  40505. return false;
  40506. }
  40507. }
  40508. var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  40509. function isWhitespace(code2) {
  40510. switch (code2) {
  40511. case 9:
  40512. case 11:
  40513. case 12:
  40514. case 32:
  40515. case 160:
  40516. case 5760:
  40517. case 8192:
  40518. case 8193:
  40519. case 8194:
  40520. case 8195:
  40521. case 8196:
  40522. case 8197:
  40523. case 8198:
  40524. case 8199:
  40525. case 8200:
  40526. case 8201:
  40527. case 8202:
  40528. case 8239:
  40529. case 8287:
  40530. case 12288:
  40531. case 65279:
  40532. return true;
  40533. default:
  40534. return false;
  40535. }
  40536. }
  40537. var Position3 = class {
  40538. constructor(line, col) {
  40539. this.line = void 0;
  40540. this.column = void 0;
  40541. this.line = line;
  40542. this.column = col;
  40543. }
  40544. };
  40545. var SourceLocation3 = class {
  40546. constructor(start3, end) {
  40547. this.start = void 0;
  40548. this.end = void 0;
  40549. this.filename = void 0;
  40550. this.identifierName = void 0;
  40551. this.start = start3;
  40552. this.end = end;
  40553. }
  40554. };
  40555. function getLineInfo2(input, offset2) {
  40556. let line = 1;
  40557. let lineStart = 0;
  40558. let match;
  40559. lineBreakG2.lastIndex = 0;
  40560. while ((match = lineBreakG2.exec(input)) && match.index < offset2) {
  40561. line++;
  40562. lineStart = lineBreakG2.lastIndex;
  40563. }
  40564. return new Position3(line, offset2 - lineStart);
  40565. }
  40566. var BaseParser = class {
  40567. constructor() {
  40568. this.sawUnambiguousESM = false;
  40569. this.ambiguousScriptDifferentAst = false;
  40570. }
  40571. hasPlugin(name2) {
  40572. return this.plugins.has(name2);
  40573. }
  40574. getPluginOption(plugin2, name2) {
  40575. if (this.hasPlugin(plugin2))
  40576. return this.plugins.get(plugin2)[name2];
  40577. }
  40578. };
  40579. function last(stack) {
  40580. return stack[stack.length - 1];
  40581. }
  40582. var CommentsParser = class extends BaseParser {
  40583. addComment(comment2) {
  40584. if (this.filename)
  40585. comment2.loc.filename = this.filename;
  40586. this.state.trailingComments.push(comment2);
  40587. this.state.leadingComments.push(comment2);
  40588. }
  40589. adjustCommentsAfterTrailingComma(node, elements, takeAllComments) {
  40590. if (this.state.leadingComments.length === 0) {
  40591. return;
  40592. }
  40593. let lastElement = null;
  40594. let i = elements.length;
  40595. while (lastElement === null && i > 0) {
  40596. lastElement = elements[--i];
  40597. }
  40598. if (lastElement === null) {
  40599. return;
  40600. }
  40601. for (let j = 0; j < this.state.leadingComments.length; j++) {
  40602. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  40603. this.state.leadingComments.splice(j, 1);
  40604. j--;
  40605. }
  40606. }
  40607. const newTrailingComments = [];
  40608. for (let i2 = 0; i2 < this.state.leadingComments.length; i2++) {
  40609. const leadingComment = this.state.leadingComments[i2];
  40610. if (leadingComment.end < node.end) {
  40611. newTrailingComments.push(leadingComment);
  40612. if (!takeAllComments) {
  40613. this.state.leadingComments.splice(i2, 1);
  40614. i2--;
  40615. }
  40616. } else {
  40617. if (node.trailingComments === void 0) {
  40618. node.trailingComments = [];
  40619. }
  40620. node.trailingComments.push(leadingComment);
  40621. }
  40622. }
  40623. if (takeAllComments)
  40624. this.state.leadingComments = [];
  40625. if (newTrailingComments.length > 0) {
  40626. lastElement.trailingComments = newTrailingComments;
  40627. } else if (lastElement.trailingComments !== void 0) {
  40628. lastElement.trailingComments = [];
  40629. }
  40630. }
  40631. processComment(node) {
  40632. if (node.type === "Program" && node.body.length > 0)
  40633. return;
  40634. const stack = this.state.commentStack;
  40635. let firstChild, lastChild, trailingComments, i, j;
  40636. if (this.state.trailingComments.length > 0) {
  40637. if (this.state.trailingComments[0].start >= node.end) {
  40638. trailingComments = this.state.trailingComments;
  40639. this.state.trailingComments = [];
  40640. } else {
  40641. this.state.trailingComments.length = 0;
  40642. }
  40643. } else if (stack.length > 0) {
  40644. const lastInStack = last(stack);
  40645. if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
  40646. trailingComments = lastInStack.trailingComments;
  40647. delete lastInStack.trailingComments;
  40648. }
  40649. }
  40650. if (stack.length > 0 && last(stack).start >= node.start) {
  40651. firstChild = stack.pop();
  40652. }
  40653. while (stack.length > 0 && last(stack).start >= node.start) {
  40654. lastChild = stack.pop();
  40655. }
  40656. if (!lastChild && firstChild)
  40657. lastChild = firstChild;
  40658. if (firstChild) {
  40659. switch (node.type) {
  40660. case "ObjectExpression":
  40661. this.adjustCommentsAfterTrailingComma(node, node.properties);
  40662. break;
  40663. case "ObjectPattern":
  40664. this.adjustCommentsAfterTrailingComma(node, node.properties, true);
  40665. break;
  40666. case "CallExpression":
  40667. this.adjustCommentsAfterTrailingComma(node, node.arguments);
  40668. break;
  40669. case "ArrayExpression":
  40670. this.adjustCommentsAfterTrailingComma(node, node.elements);
  40671. break;
  40672. case "ArrayPattern":
  40673. this.adjustCommentsAfterTrailingComma(node, node.elements, true);
  40674. break;
  40675. }
  40676. } else if (this.state.commentPreviousNode && (this.state.commentPreviousNode.type === "ImportSpecifier" && node.type !== "ImportSpecifier" || this.state.commentPreviousNode.type === "ExportSpecifier" && node.type !== "ExportSpecifier")) {
  40677. this.adjustCommentsAfterTrailingComma(node, [this.state.commentPreviousNode]);
  40678. }
  40679. if (lastChild) {
  40680. if (lastChild.leadingComments) {
  40681. if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {
  40682. node.leadingComments = lastChild.leadingComments;
  40683. delete lastChild.leadingComments;
  40684. } else {
  40685. for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
  40686. if (lastChild.leadingComments[i].end <= node.start) {
  40687. node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
  40688. break;
  40689. }
  40690. }
  40691. }
  40692. }
  40693. } else if (this.state.leadingComments.length > 0) {
  40694. if (last(this.state.leadingComments).end <= node.start) {
  40695. if (this.state.commentPreviousNode) {
  40696. for (j = 0; j < this.state.leadingComments.length; j++) {
  40697. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  40698. this.state.leadingComments.splice(j, 1);
  40699. j--;
  40700. }
  40701. }
  40702. }
  40703. if (this.state.leadingComments.length > 0) {
  40704. node.leadingComments = this.state.leadingComments;
  40705. this.state.leadingComments = [];
  40706. }
  40707. } else {
  40708. for (i = 0; i < this.state.leadingComments.length; i++) {
  40709. if (this.state.leadingComments[i].end > node.start) {
  40710. break;
  40711. }
  40712. }
  40713. const leadingComments = this.state.leadingComments.slice(0, i);
  40714. if (leadingComments.length) {
  40715. node.leadingComments = leadingComments;
  40716. }
  40717. trailingComments = this.state.leadingComments.slice(i);
  40718. if (trailingComments.length === 0) {
  40719. trailingComments = null;
  40720. }
  40721. }
  40722. }
  40723. this.state.commentPreviousNode = node;
  40724. if (trailingComments) {
  40725. if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
  40726. node.innerComments = trailingComments;
  40727. } else {
  40728. const firstTrailingCommentIndex = trailingComments.findIndex((comment2) => comment2.end >= node.end);
  40729. if (firstTrailingCommentIndex > 0) {
  40730. node.innerComments = trailingComments.slice(0, firstTrailingCommentIndex);
  40731. node.trailingComments = trailingComments.slice(firstTrailingCommentIndex);
  40732. } else {
  40733. node.trailingComments = trailingComments;
  40734. }
  40735. }
  40736. }
  40737. stack.push(node);
  40738. }
  40739. };
  40740. var ErrorCodes = Object.freeze({
  40741. SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
  40742. SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  40743. });
  40744. var ErrorMessages = makeErrorTemplates({
  40745. AccessorIsGenerator: "A %0ter cannot be a generator.",
  40746. ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
  40747. AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
  40748. AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
  40749. AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
  40750. AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
  40751. AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
  40752. AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
  40753. BadGetterArity: "A 'get' accesor must not have any formal parameters.",
  40754. BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
  40755. BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
  40756. ConstructorClassField: "Classes may not have a field named 'constructor'.",
  40757. ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
  40758. ConstructorIsAccessor: "Class constructor may not be an accessor.",
  40759. ConstructorIsAsync: "Constructor can't be an async function.",
  40760. ConstructorIsGenerator: "Constructor can't be a generator.",
  40761. DeclarationMissingInitializer: "'%0' require an initialization value.",
  40762. DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
  40763. DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
  40764. DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
  40765. DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
  40766. DecoratorStaticBlock: "Decorators can't be used with a static block.",
  40767. DeletePrivateField: "Deleting a private field is not allowed.",
  40768. DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
  40769. DuplicateConstructor: "Duplicate constructor in the same class.",
  40770. DuplicateDefaultExport: "Only one default export allowed per module.",
  40771. DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
  40772. DuplicateProto: "Redefinition of __proto__ property.",
  40773. DuplicateRegExpFlags: "Duplicate regular expression flag.",
  40774. ElementAfterRest: "Rest element must be last element.",
  40775. EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
  40776. ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
  40777. ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
  40778. ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.",
  40779. ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
  40780. ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
  40781. GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
  40782. IllegalBreakContinue: "Unsyntactic %0.",
  40783. IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
  40784. IllegalReturn: "'return' outside of function.",
  40785. ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
  40786. ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
  40787. ImportCallArity: "`import()` requires exactly %0.",
  40788. ImportCallNotNewExpression: "Cannot use new with import(...).",
  40789. ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
  40790. InvalidBigIntLiteral: "Invalid BigIntLiteral.",
  40791. InvalidCodePoint: "Code point out of bounds.",
  40792. InvalidDecimal: "Invalid decimal.",
  40793. InvalidDigit: "Expected number in radix %0.",
  40794. InvalidEscapeSequence: "Bad character escape sequence.",
  40795. InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
  40796. InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
  40797. InvalidIdentifier: "Invalid identifier %0.",
  40798. InvalidLhs: "Invalid left-hand side in %0.",
  40799. InvalidLhsBinding: "Binding invalid left-hand side in %0.",
  40800. InvalidNumber: "Invalid number.",
  40801. InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
  40802. InvalidOrUnexpectedToken: "Unexpected character '%0'.",
  40803. InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
  40804. InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
  40805. InvalidPropertyBindingPattern: "Binding member expression.",
  40806. InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
  40807. InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
  40808. LabelRedeclaration: "Label '%0' is already declared.",
  40809. LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
  40810. LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
  40811. MalformedRegExpFlags: "Invalid regular expression flag.",
  40812. MissingClassName: "A class name is required.",
  40813. MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
  40814. MissingSemicolon: "Missing semicolon.",
  40815. MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
  40816. MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
  40817. ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
  40818. ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
  40819. ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.',
  40820. ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.",
  40821. ModuleExportUndefined: "Export '%0' is not defined.",
  40822. MultipleDefaultsInSwitch: "Multiple default clauses.",
  40823. NewlineAfterThrow: "Illegal newline after throw.",
  40824. NoCatchOrFinally: "Missing catch or finally clause.",
  40825. NumberIdentifier: "Identifier directly after number.",
  40826. NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
  40827. ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
  40828. OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
  40829. OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
  40830. OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
  40831. ParamDupe: "Argument name clash.",
  40832. PatternHasAccessor: "Object pattern can't contain getter or setter.",
  40833. PatternHasMethod: "Object pattern can't contain methods.",
  40834. PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
  40835. PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
  40836. PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
  40837. PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
  40838. PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
  40839. PrimaryTopicRequiresSmartPipeline: "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
  40840. PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
  40841. PrivateNameRedeclaration: "Duplicate private name #%0.",
  40842. RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  40843. RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  40844. RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  40845. RecordNoProto: "'__proto__' is not allowed in Record expressions.",
  40846. RestTrailingComma: "Unexpected trailing comma after rest element.",
  40847. SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
  40848. StaticPrototype: "Classes may not have static property named prototype.",
  40849. StrictDelete: "Deleting local variable in strict mode.",
  40850. StrictEvalArguments: "Assigning to '%0' in strict mode.",
  40851. StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
  40852. StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
  40853. StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
  40854. StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
  40855. StrictWith: "'with' in strict mode.",
  40856. SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
  40857. SuperPrivateField: "Private fields can't be accessed on super.",
  40858. TrailingDecorator: "Decorators must be attached to a class element.",
  40859. TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  40860. TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  40861. TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  40862. UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
  40863. UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
  40864. UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
  40865. UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
  40866. UnexpectedKeyword: "Unexpected keyword '%0'.",
  40867. UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
  40868. UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
  40869. UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
  40870. UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
  40871. UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
  40872. UnexpectedReservedWord: "Unexpected reserved word '%0'.",
  40873. UnexpectedSuper: "'super' is only allowed in object methods and classes.",
  40874. UnexpectedToken: "Unexpected token '%0'.",
  40875. UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
  40876. UnsupportedBind: "Binding should be performed on object property.",
  40877. UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
  40878. UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
  40879. UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
  40880. UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
  40881. UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
  40882. UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
  40883. UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
  40884. UnterminatedComment: "Unterminated comment.",
  40885. UnterminatedRegExp: "Unterminated regular expression.",
  40886. UnterminatedString: "Unterminated string constant.",
  40887. UnterminatedTemplate: "Unterminated template.",
  40888. VarRedeclaration: "Identifier '%0' has already been declared.",
  40889. YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
  40890. YieldInParameter: "Yield expression is not allowed in formal parameters.",
  40891. ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
  40892. }, ErrorCodes.SyntaxError);
  40893. var SourceTypeModuleErrorMessages = makeErrorTemplates({
  40894. ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`,
  40895. ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'`
  40896. }, ErrorCodes.SourceTypeModuleError);
  40897. function makeErrorTemplates(messages2, code2) {
  40898. const templates = {};
  40899. Object.keys(messages2).forEach((reasonCode) => {
  40900. templates[reasonCode] = Object.freeze({
  40901. code: code2,
  40902. reasonCode,
  40903. template: messages2[reasonCode]
  40904. });
  40905. });
  40906. return Object.freeze(templates);
  40907. }
  40908. var ParserError = class extends CommentsParser {
  40909. getLocationForPosition(pos) {
  40910. let loc;
  40911. if (pos === this.state.start)
  40912. loc = this.state.startLoc;
  40913. else if (pos === this.state.lastTokStart)
  40914. loc = this.state.lastTokStartLoc;
  40915. else if (pos === this.state.end)
  40916. loc = this.state.endLoc;
  40917. else if (pos === this.state.lastTokEnd)
  40918. loc = this.state.lastTokEndLoc;
  40919. else
  40920. loc = getLineInfo2(this.input, pos);
  40921. return loc;
  40922. }
  40923. raise(pos, {
  40924. code: code2,
  40925. reasonCode,
  40926. template
  40927. }, ...params) {
  40928. return this.raiseWithData(pos, {
  40929. code: code2,
  40930. reasonCode
  40931. }, template, ...params);
  40932. }
  40933. raiseOverwrite(pos, {
  40934. code: code2,
  40935. template
  40936. }, ...params) {
  40937. const loc = this.getLocationForPosition(pos);
  40938. const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  40939. if (this.options.errorRecovery) {
  40940. const errors = this.state.errors;
  40941. for (let i = errors.length - 1; i >= 0; i--) {
  40942. const error = errors[i];
  40943. if (error.pos === pos) {
  40944. return Object.assign(error, {
  40945. message
  40946. });
  40947. } else if (error.pos < pos) {
  40948. break;
  40949. }
  40950. }
  40951. }
  40952. return this._raise({
  40953. code: code2,
  40954. loc,
  40955. pos
  40956. }, message);
  40957. }
  40958. raiseWithData(pos, data2, errorTemplate, ...params) {
  40959. const loc = this.getLocationForPosition(pos);
  40960. const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  40961. return this._raise(Object.assign({
  40962. loc,
  40963. pos
  40964. }, data2), message);
  40965. }
  40966. _raise(errorContext, message) {
  40967. const err = new SyntaxError(message);
  40968. Object.assign(err, errorContext);
  40969. if (this.options.errorRecovery) {
  40970. if (!this.isLookahead)
  40971. this.state.errors.push(err);
  40972. return err;
  40973. } else {
  40974. throw err;
  40975. }
  40976. }
  40977. };
  40978. var estree = (superClass) => class extends superClass {
  40979. parseRegExpLiteral({
  40980. pattern,
  40981. flags
  40982. }) {
  40983. let regex2 = null;
  40984. try {
  40985. regex2 = new RegExp(pattern, flags);
  40986. } catch (e) {
  40987. }
  40988. const node = this.estreeParseLiteral(regex2);
  40989. node.regex = {
  40990. pattern,
  40991. flags
  40992. };
  40993. return node;
  40994. }
  40995. parseBigIntLiteral(value) {
  40996. let bigInt;
  40997. try {
  40998. bigInt = BigInt(value);
  40999. } catch (_unused) {
  41000. bigInt = null;
  41001. }
  41002. const node = this.estreeParseLiteral(bigInt);
  41003. node.bigint = String(node.value || value);
  41004. return node;
  41005. }
  41006. parseDecimalLiteral(value) {
  41007. const decimal = null;
  41008. const node = this.estreeParseLiteral(decimal);
  41009. node.decimal = String(node.value || value);
  41010. return node;
  41011. }
  41012. estreeParseLiteral(value) {
  41013. return this.parseLiteral(value, "Literal");
  41014. }
  41015. parseStringLiteral(value) {
  41016. return this.estreeParseLiteral(value);
  41017. }
  41018. parseNumericLiteral(value) {
  41019. return this.estreeParseLiteral(value);
  41020. }
  41021. parseNullLiteral() {
  41022. return this.estreeParseLiteral(null);
  41023. }
  41024. parseBooleanLiteral(value) {
  41025. return this.estreeParseLiteral(value);
  41026. }
  41027. directiveToStmt(directive) {
  41028. const directiveLiteral = directive.value;
  41029. const stmt = this.startNodeAt(directive.start, directive.loc.start);
  41030. const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  41031. expression.value = directiveLiteral.extra.expressionValue;
  41032. expression.raw = directiveLiteral.extra.raw;
  41033. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  41034. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  41035. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  41036. }
  41037. initFunction(node, isAsync) {
  41038. super.initFunction(node, isAsync);
  41039. node.expression = false;
  41040. }
  41041. checkDeclaration(node) {
  41042. if (node != null && this.isObjectProperty(node)) {
  41043. this.checkDeclaration(node.value);
  41044. } else {
  41045. super.checkDeclaration(node);
  41046. }
  41047. }
  41048. getObjectOrClassMethodParams(method) {
  41049. return method.value.params;
  41050. }
  41051. isValidDirective(stmt) {
  41052. var _stmt$expression$extr;
  41053. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
  41054. }
  41055. stmtToDirective(stmt) {
  41056. const directive = super.stmtToDirective(stmt);
  41057. const value = stmt.expression.value;
  41058. this.addExtra(directive.value, "expressionValue", value);
  41059. return directive;
  41060. }
  41061. parseBlockBody(node, ...args) {
  41062. super.parseBlockBody(node, ...args);
  41063. const directiveStatements = node.directives.map((d) => this.directiveToStmt(d));
  41064. node.body = directiveStatements.concat(node.body);
  41065. delete node.directives;
  41066. }
  41067. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  41068. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  41069. if (method.typeParameters) {
  41070. method.value.typeParameters = method.typeParameters;
  41071. delete method.typeParameters;
  41072. }
  41073. classBody.body.push(method);
  41074. }
  41075. parseMaybePrivateName(...args) {
  41076. const node = super.parseMaybePrivateName(...args);
  41077. if (node.type === "PrivateName" && this.getPluginOption("estree", "classFeatures")) {
  41078. return this.convertPrivateNameToPrivateIdentifier(node);
  41079. }
  41080. return node;
  41081. }
  41082. convertPrivateNameToPrivateIdentifier(node) {
  41083. const name2 = super.getPrivateNameSV(node);
  41084. node = node;
  41085. delete node.id;
  41086. node.name = name2;
  41087. node.type = "PrivateIdentifier";
  41088. return node;
  41089. }
  41090. isPrivateName(node) {
  41091. if (!this.getPluginOption("estree", "classFeatures")) {
  41092. return super.isPrivateName(node);
  41093. }
  41094. return node.type === "PrivateIdentifier";
  41095. }
  41096. getPrivateNameSV(node) {
  41097. if (!this.getPluginOption("estree", "classFeatures")) {
  41098. return super.getPrivateNameSV(node);
  41099. }
  41100. return node.name;
  41101. }
  41102. parseLiteral(value, type) {
  41103. const node = super.parseLiteral(value, type);
  41104. node.raw = node.extra.raw;
  41105. delete node.extra;
  41106. return node;
  41107. }
  41108. parseFunctionBody(node, allowExpression, isMethod = false) {
  41109. super.parseFunctionBody(node, allowExpression, isMethod);
  41110. node.expression = node.body.type !== "BlockStatement";
  41111. }
  41112. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  41113. let funcNode = this.startNode();
  41114. funcNode.kind = node.kind;
  41115. funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  41116. funcNode.type = "FunctionExpression";
  41117. delete funcNode.kind;
  41118. node.value = funcNode;
  41119. if (type === "ClassPrivateMethod") {
  41120. node.computed = false;
  41121. }
  41122. type = "MethodDefinition";
  41123. return this.finishNode(node, type);
  41124. }
  41125. parseClassProperty(...args) {
  41126. const propertyNode = super.parseClassProperty(...args);
  41127. if (this.getPluginOption("estree", "classFeatures")) {
  41128. propertyNode.type = "PropertyDefinition";
  41129. }
  41130. return propertyNode;
  41131. }
  41132. parseClassPrivateProperty(...args) {
  41133. const propertyNode = super.parseClassPrivateProperty(...args);
  41134. if (this.getPluginOption("estree", "classFeatures")) {
  41135. propertyNode.type = "PropertyDefinition";
  41136. propertyNode.computed = false;
  41137. }
  41138. return propertyNode;
  41139. }
  41140. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  41141. const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
  41142. if (node) {
  41143. node.type = "Property";
  41144. if (node.kind === "method")
  41145. node.kind = "init";
  41146. node.shorthand = false;
  41147. }
  41148. return node;
  41149. }
  41150. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  41151. const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  41152. if (node) {
  41153. node.kind = "init";
  41154. node.type = "Property";
  41155. }
  41156. return node;
  41157. }
  41158. toAssignable(node, isLHS = false) {
  41159. if (node != null && this.isObjectProperty(node)) {
  41160. this.toAssignable(node.value, isLHS);
  41161. return node;
  41162. }
  41163. return super.toAssignable(node, isLHS);
  41164. }
  41165. toAssignableObjectExpressionProp(prop, ...args) {
  41166. if (prop.kind === "get" || prop.kind === "set") {
  41167. this.raise(prop.key.start, ErrorMessages.PatternHasAccessor);
  41168. } else if (prop.method) {
  41169. this.raise(prop.key.start, ErrorMessages.PatternHasMethod);
  41170. } else {
  41171. super.toAssignableObjectExpressionProp(prop, ...args);
  41172. }
  41173. }
  41174. finishCallExpression(node, optional) {
  41175. super.finishCallExpression(node, optional);
  41176. if (node.callee.type === "Import") {
  41177. node.type = "ImportExpression";
  41178. node.source = node.arguments[0];
  41179. if (this.hasPlugin("importAssertions")) {
  41180. var _node$arguments$;
  41181. node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null;
  41182. }
  41183. delete node.arguments;
  41184. delete node.callee;
  41185. }
  41186. return node;
  41187. }
  41188. toReferencedArguments(node) {
  41189. if (node.type === "ImportExpression") {
  41190. return;
  41191. }
  41192. super.toReferencedArguments(node);
  41193. }
  41194. parseExport(node) {
  41195. super.parseExport(node);
  41196. switch (node.type) {
  41197. case "ExportAllDeclaration":
  41198. node.exported = null;
  41199. break;
  41200. case "ExportNamedDeclaration":
  41201. if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
  41202. node.type = "ExportAllDeclaration";
  41203. node.exported = node.specifiers[0].exported;
  41204. delete node.specifiers;
  41205. }
  41206. break;
  41207. }
  41208. return node;
  41209. }
  41210. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  41211. const node = super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  41212. if (state.optionalChainMember) {
  41213. if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
  41214. node.type = node.type.substring(8);
  41215. }
  41216. if (state.stop) {
  41217. const chain = this.startNodeAtNode(node);
  41218. chain.expression = node;
  41219. return this.finishNode(chain, "ChainExpression");
  41220. }
  41221. } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
  41222. node.optional = false;
  41223. }
  41224. return node;
  41225. }
  41226. hasPropertyAsPrivateName(node) {
  41227. if (node.type === "ChainExpression") {
  41228. node = node.expression;
  41229. }
  41230. return super.hasPropertyAsPrivateName(node);
  41231. }
  41232. isOptionalChain(node) {
  41233. return node.type === "ChainExpression";
  41234. }
  41235. isObjectProperty(node) {
  41236. return node.type === "Property" && node.kind === "init" && !node.method;
  41237. }
  41238. isObjectMethod(node) {
  41239. return node.method || node.kind === "get" || node.kind === "set";
  41240. }
  41241. };
  41242. var TokContext3 = class {
  41243. constructor(token, isExpr, preserveSpace) {
  41244. this.token = void 0;
  41245. this.isExpr = void 0;
  41246. this.preserveSpace = void 0;
  41247. this.token = token;
  41248. this.isExpr = !!isExpr;
  41249. this.preserveSpace = !!preserveSpace;
  41250. }
  41251. };
  41252. var types2 = {
  41253. braceStatement: new TokContext3("{", false),
  41254. braceExpression: new TokContext3("{", true),
  41255. recordExpression: new TokContext3("#{", true),
  41256. templateQuasi: new TokContext3("${", false),
  41257. parenStatement: new TokContext3("(", false),
  41258. parenExpression: new TokContext3("(", true),
  41259. template: new TokContext3("`", true, true),
  41260. functionExpression: new TokContext3("function", true),
  41261. functionStatement: new TokContext3("function", false)
  41262. };
  41263. types$12.parenR.updateContext = types$12.braceR.updateContext = function() {
  41264. if (this.state.context.length === 1) {
  41265. this.state.exprAllowed = true;
  41266. return;
  41267. }
  41268. let out = this.state.context.pop();
  41269. if (out === types2.braceStatement && this.curContext().token === "function") {
  41270. out = this.state.context.pop();
  41271. }
  41272. this.state.exprAllowed = !out.isExpr;
  41273. };
  41274. types$12.name.updateContext = function(prevType) {
  41275. let allowed = false;
  41276. if (prevType !== types$12.dot) {
  41277. if (this.state.value === "of" && !this.state.exprAllowed && prevType !== types$12._function && prevType !== types$12._class) {
  41278. allowed = true;
  41279. }
  41280. }
  41281. this.state.exprAllowed = allowed;
  41282. };
  41283. types$12.braceL.updateContext = function(prevType) {
  41284. this.state.context.push(this.braceIsBlock(prevType) ? types2.braceStatement : types2.braceExpression);
  41285. this.state.exprAllowed = true;
  41286. };
  41287. types$12.dollarBraceL.updateContext = function() {
  41288. this.state.context.push(types2.templateQuasi);
  41289. this.state.exprAllowed = true;
  41290. };
  41291. types$12.parenL.updateContext = function(prevType) {
  41292. const statementParens = prevType === types$12._if || prevType === types$12._for || prevType === types$12._with || prevType === types$12._while;
  41293. this.state.context.push(statementParens ? types2.parenStatement : types2.parenExpression);
  41294. this.state.exprAllowed = true;
  41295. };
  41296. types$12.incDec.updateContext = function() {
  41297. };
  41298. types$12._function.updateContext = types$12._class.updateContext = function(prevType) {
  41299. if (prevType.beforeExpr && prevType !== types$12.semi && prevType !== types$12._else && !(prevType === types$12._return && this.hasPrecedingLineBreak()) && !((prevType === types$12.colon || prevType === types$12.braceL) && this.curContext() === types2.b_stat)) {
  41300. this.state.context.push(types2.functionExpression);
  41301. } else {
  41302. this.state.context.push(types2.functionStatement);
  41303. }
  41304. this.state.exprAllowed = false;
  41305. };
  41306. types$12.backQuote.updateContext = function() {
  41307. if (this.curContext() === types2.template) {
  41308. this.state.context.pop();
  41309. } else {
  41310. this.state.context.push(types2.template);
  41311. }
  41312. this.state.exprAllowed = false;
  41313. };
  41314. types$12.braceHashL.updateContext = function() {
  41315. this.state.context.push(types2.recordExpression);
  41316. this.state.exprAllowed = true;
  41317. };
  41318. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  41319. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  41320. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  41321. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  41322. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  41323. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  41324. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  41325. function isInAstralSet2(code2, set) {
  41326. let pos = 65536;
  41327. for (let i = 0, length = set.length; i < length; i += 2) {
  41328. pos += set[i];
  41329. if (pos > code2)
  41330. return false;
  41331. pos += set[i + 1];
  41332. if (pos >= code2)
  41333. return true;
  41334. }
  41335. return false;
  41336. }
  41337. function isIdentifierStart2(code2) {
  41338. if (code2 < 65)
  41339. return code2 === 36;
  41340. if (code2 <= 90)
  41341. return true;
  41342. if (code2 < 97)
  41343. return code2 === 95;
  41344. if (code2 <= 122)
  41345. return true;
  41346. if (code2 <= 65535) {
  41347. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  41348. }
  41349. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  41350. }
  41351. function isIdentifierChar2(code2) {
  41352. if (code2 < 48)
  41353. return code2 === 36;
  41354. if (code2 < 58)
  41355. return true;
  41356. if (code2 < 65)
  41357. return false;
  41358. if (code2 <= 90)
  41359. return true;
  41360. if (code2 < 97)
  41361. return code2 === 95;
  41362. if (code2 <= 122)
  41363. return true;
  41364. if (code2 <= 65535) {
  41365. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  41366. }
  41367. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  41368. }
  41369. var reservedWords2 = {
  41370. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  41371. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  41372. strictBind: ["eval", "arguments"]
  41373. };
  41374. var keywords2 = new Set(reservedWords2.keyword);
  41375. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  41376. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  41377. function isReservedWord(word, inModule) {
  41378. return inModule && word === "await" || word === "enum";
  41379. }
  41380. function isStrictReservedWord(word, inModule) {
  41381. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  41382. }
  41383. function isStrictBindOnlyReservedWord(word) {
  41384. return reservedWordsStrictBindSet.has(word);
  41385. }
  41386. function isStrictBindReservedWord(word, inModule) {
  41387. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  41388. }
  41389. function isKeyword(word) {
  41390. return keywords2.has(word);
  41391. }
  41392. function isIteratorStart(current2, next) {
  41393. return current2 === 64 && next === 64;
  41394. }
  41395. var SCOPE_OTHER = 0;
  41396. var SCOPE_PROGRAM = 1;
  41397. var SCOPE_FUNCTION2 = 2;
  41398. var SCOPE_ARROW2 = 4;
  41399. var SCOPE_SIMPLE_CATCH2 = 8;
  41400. var SCOPE_SUPER2 = 16;
  41401. var SCOPE_DIRECT_SUPER2 = 32;
  41402. var SCOPE_CLASS = 64;
  41403. var SCOPE_STATIC_BLOCK = 128;
  41404. var SCOPE_TS_MODULE = 256;
  41405. var SCOPE_VAR2 = SCOPE_PROGRAM | SCOPE_FUNCTION2 | SCOPE_TS_MODULE;
  41406. var BIND_KIND_VALUE = 1;
  41407. var BIND_KIND_TYPE = 2;
  41408. var BIND_SCOPE_VAR = 4;
  41409. var BIND_SCOPE_LEXICAL = 8;
  41410. var BIND_SCOPE_FUNCTION = 16;
  41411. var BIND_FLAGS_NONE = 64;
  41412. var BIND_FLAGS_CLASS = 128;
  41413. var BIND_FLAGS_TS_ENUM = 256;
  41414. var BIND_FLAGS_TS_CONST_ENUM = 512;
  41415. var BIND_FLAGS_TS_EXPORT_ONLY = 1024;
  41416. var BIND_FLAGS_FLOW_DECLARE_FN = 2048;
  41417. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS;
  41418. var BIND_LEXICAL2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0;
  41419. var BIND_VAR2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0;
  41420. var BIND_FUNCTION2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0;
  41421. var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS;
  41422. var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0;
  41423. var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM;
  41424. var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  41425. var BIND_NONE2 = 0 | 0 | 0 | BIND_FLAGS_NONE;
  41426. var BIND_OUTSIDE2 = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE;
  41427. var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM;
  41428. var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  41429. var BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
  41430. var CLASS_ELEMENT_FLAG_STATIC = 4;
  41431. var CLASS_ELEMENT_KIND_GETTER = 2;
  41432. var CLASS_ELEMENT_KIND_SETTER = 1;
  41433. var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  41434. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC;
  41435. var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC;
  41436. var CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER;
  41437. var CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER;
  41438. var CLASS_ELEMENT_OTHER = 0;
  41439. var Scope4 = class {
  41440. constructor(flags) {
  41441. this.flags = void 0;
  41442. this.var = [];
  41443. this.lexical = [];
  41444. this.functions = [];
  41445. this.flags = flags;
  41446. }
  41447. };
  41448. var ScopeHandler = class {
  41449. constructor(raise2, inModule) {
  41450. this.scopeStack = [];
  41451. this.undefinedExports = /* @__PURE__ */ new Map();
  41452. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  41453. this.raise = raise2;
  41454. this.inModule = inModule;
  41455. }
  41456. get inFunction() {
  41457. return (this.currentVarScope().flags & SCOPE_FUNCTION2) > 0;
  41458. }
  41459. get allowSuper() {
  41460. return (this.currentThisScope().flags & SCOPE_SUPER2) > 0;
  41461. }
  41462. get allowDirectSuper() {
  41463. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER2) > 0;
  41464. }
  41465. get inClass() {
  41466. return (this.currentThisScope().flags & SCOPE_CLASS) > 0;
  41467. }
  41468. get inStaticBlock() {
  41469. return (this.currentThisScope().flags & SCOPE_STATIC_BLOCK) > 0;
  41470. }
  41471. get inNonArrowFunction() {
  41472. return (this.currentThisScope().flags & SCOPE_FUNCTION2) > 0;
  41473. }
  41474. get treatFunctionsAsVar() {
  41475. return this.treatFunctionsAsVarInScope(this.currentScope());
  41476. }
  41477. createScope(flags) {
  41478. return new Scope4(flags);
  41479. }
  41480. enter(flags) {
  41481. this.scopeStack.push(this.createScope(flags));
  41482. }
  41483. exit() {
  41484. this.scopeStack.pop();
  41485. }
  41486. treatFunctionsAsVarInScope(scope) {
  41487. return !!(scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_PROGRAM);
  41488. }
  41489. declareName(name2, bindingType, pos) {
  41490. let scope = this.currentScope();
  41491. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  41492. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  41493. if (bindingType & BIND_SCOPE_FUNCTION) {
  41494. scope.functions.push(name2);
  41495. } else {
  41496. scope.lexical.push(name2);
  41497. }
  41498. if (bindingType & BIND_SCOPE_LEXICAL) {
  41499. this.maybeExportDefined(scope, name2);
  41500. }
  41501. } else if (bindingType & BIND_SCOPE_VAR) {
  41502. for (let i = this.scopeStack.length - 1; i >= 0; --i) {
  41503. scope = this.scopeStack[i];
  41504. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  41505. scope.var.push(name2);
  41506. this.maybeExportDefined(scope, name2);
  41507. if (scope.flags & SCOPE_VAR2)
  41508. break;
  41509. }
  41510. }
  41511. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  41512. this.undefinedExports.delete(name2);
  41513. }
  41514. }
  41515. maybeExportDefined(scope, name2) {
  41516. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  41517. this.undefinedExports.delete(name2);
  41518. }
  41519. }
  41520. checkRedeclarationInScope(scope, name2, bindingType, pos) {
  41521. if (this.isRedeclaredInScope(scope, name2, bindingType)) {
  41522. this.raise(pos, ErrorMessages.VarRedeclaration, name2);
  41523. }
  41524. }
  41525. isRedeclaredInScope(scope, name2, bindingType) {
  41526. if (!(bindingType & BIND_KIND_VALUE))
  41527. return false;
  41528. if (bindingType & BIND_SCOPE_LEXICAL) {
  41529. return scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
  41530. }
  41531. if (bindingType & BIND_SCOPE_FUNCTION) {
  41532. return scope.lexical.indexOf(name2) > -1 || !this.treatFunctionsAsVarInScope(scope) && scope.var.indexOf(name2) > -1;
  41533. }
  41534. return scope.lexical.indexOf(name2) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH2 && scope.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name2) > -1;
  41535. }
  41536. checkLocalExport(id) {
  41537. 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) {
  41538. this.undefinedExports.set(id.name, id.start);
  41539. }
  41540. }
  41541. currentScope() {
  41542. return this.scopeStack[this.scopeStack.length - 1];
  41543. }
  41544. currentVarScope() {
  41545. for (let i = this.scopeStack.length - 1; ; i--) {
  41546. const scope = this.scopeStack[i];
  41547. if (scope.flags & SCOPE_VAR2) {
  41548. return scope;
  41549. }
  41550. }
  41551. }
  41552. currentThisScope() {
  41553. for (let i = this.scopeStack.length - 1; ; i--) {
  41554. const scope = this.scopeStack[i];
  41555. if ((scope.flags & SCOPE_VAR2 || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW2)) {
  41556. return scope;
  41557. }
  41558. }
  41559. }
  41560. };
  41561. var FlowScope = class extends Scope4 {
  41562. constructor(...args) {
  41563. super(...args);
  41564. this.declareFunctions = [];
  41565. }
  41566. };
  41567. var FlowScopeHandler = class extends ScopeHandler {
  41568. createScope(flags) {
  41569. return new FlowScope(flags);
  41570. }
  41571. declareName(name2, bindingType, pos) {
  41572. const scope = this.currentScope();
  41573. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  41574. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  41575. this.maybeExportDefined(scope, name2);
  41576. scope.declareFunctions.push(name2);
  41577. return;
  41578. }
  41579. super.declareName(...arguments);
  41580. }
  41581. isRedeclaredInScope(scope, name2, bindingType) {
  41582. if (super.isRedeclaredInScope(...arguments))
  41583. return true;
  41584. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  41585. return !scope.declareFunctions.includes(name2) && (scope.lexical.includes(name2) || scope.functions.includes(name2));
  41586. }
  41587. return false;
  41588. }
  41589. checkLocalExport(id) {
  41590. if (this.scopeStack[0].declareFunctions.indexOf(id.name) === -1) {
  41591. super.checkLocalExport(id);
  41592. }
  41593. }
  41594. };
  41595. var reservedTypes = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  41596. var FlowErrors = makeErrorTemplates({
  41597. AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
  41598. AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
  41599. AssignReservedType: "Cannot overwrite reserved type %0.",
  41600. DeclareClassElement: "The `declare` modifier can only appear on class fields.",
  41601. DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
  41602. DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
  41603. EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
  41604. EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
  41605. EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
  41606. EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  41607. EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  41608. EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
  41609. EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
  41610. EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
  41611. EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
  41612. EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
  41613. EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
  41614. GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
  41615. ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
  41616. InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
  41617. InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
  41618. InexactVariance: "Explicit inexact syntax cannot have variance.",
  41619. InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
  41620. MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
  41621. NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
  41622. NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
  41623. OptionalBindingPattern: "A binding pattern parameter cannot be optional in an implementation signature.",
  41624. SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
  41625. SpreadVariance: "Spread properties cannot have variance.",
  41626. ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
  41627. ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
  41628. ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
  41629. ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
  41630. ThisParamNoDefault: "The `this` parameter may not have a default value.",
  41631. TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  41632. TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
  41633. UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
  41634. UnexpectedReservedType: "Unexpected reserved type %0.",
  41635. UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
  41636. UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
  41637. UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
  41638. UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
  41639. UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
  41640. UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
  41641. UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.",
  41642. UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
  41643. UnterminatedFlowComment: "Unterminated flow-comment."
  41644. }, ErrorCodes.SyntaxError);
  41645. function isEsModuleType(bodyElement) {
  41646. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  41647. }
  41648. function hasTypeImportKind(node) {
  41649. return node.importKind === "type" || node.importKind === "typeof";
  41650. }
  41651. function isMaybeDefaultImport(state) {
  41652. return (state.type === types$12.name || !!state.type.keyword) && state.value !== "from";
  41653. }
  41654. var exportSuggestions = {
  41655. const: "declare export var",
  41656. let: "declare export var",
  41657. type: "export type",
  41658. interface: "export interface"
  41659. };
  41660. function partition(list3, test) {
  41661. const list1 = [];
  41662. const list22 = [];
  41663. for (let i = 0; i < list3.length; i++) {
  41664. (test(list3[i], i, list3) ? list1 : list22).push(list3[i]);
  41665. }
  41666. return [list1, list22];
  41667. }
  41668. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  41669. var flow3 = (superClass) => class extends superClass {
  41670. constructor(...args) {
  41671. super(...args);
  41672. this.flowPragma = void 0;
  41673. }
  41674. getScopeHandler() {
  41675. return FlowScopeHandler;
  41676. }
  41677. shouldParseTypes() {
  41678. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  41679. }
  41680. shouldParseEnums() {
  41681. return !!this.getPluginOption("flow", "enums");
  41682. }
  41683. finishToken(type, val) {
  41684. if (type !== types$12.string && type !== types$12.semi && type !== types$12.interpreterDirective) {
  41685. if (this.flowPragma === void 0) {
  41686. this.flowPragma = null;
  41687. }
  41688. }
  41689. return super.finishToken(type, val);
  41690. }
  41691. addComment(comment2) {
  41692. if (this.flowPragma === void 0) {
  41693. const matches = FLOW_PRAGMA_REGEX.exec(comment2.value);
  41694. if (!matches)
  41695. ;
  41696. else if (matches[1] === "flow") {
  41697. this.flowPragma = "flow";
  41698. } else if (matches[1] === "noflow") {
  41699. this.flowPragma = "noflow";
  41700. } else {
  41701. throw new Error("Unexpected flow pragma");
  41702. }
  41703. }
  41704. return super.addComment(comment2);
  41705. }
  41706. flowParseTypeInitialiser(tok) {
  41707. const oldInType = this.state.inType;
  41708. this.state.inType = true;
  41709. this.expect(tok || types$12.colon);
  41710. const type = this.flowParseType();
  41711. this.state.inType = oldInType;
  41712. return type;
  41713. }
  41714. flowParsePredicate() {
  41715. const node = this.startNode();
  41716. const moduloPos = this.state.start;
  41717. this.next();
  41718. this.expectContextual("checks");
  41719. if (this.state.lastTokStart > moduloPos + 1) {
  41720. this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
  41721. }
  41722. if (this.eat(types$12.parenL)) {
  41723. node.value = this.parseExpression();
  41724. this.expect(types$12.parenR);
  41725. return this.finishNode(node, "DeclaredPredicate");
  41726. } else {
  41727. return this.finishNode(node, "InferredPredicate");
  41728. }
  41729. }
  41730. flowParseTypeAndPredicateInitialiser() {
  41731. const oldInType = this.state.inType;
  41732. this.state.inType = true;
  41733. this.expect(types$12.colon);
  41734. let type = null;
  41735. let predicate = null;
  41736. if (this.match(types$12.modulo)) {
  41737. this.state.inType = oldInType;
  41738. predicate = this.flowParsePredicate();
  41739. } else {
  41740. type = this.flowParseType();
  41741. this.state.inType = oldInType;
  41742. if (this.match(types$12.modulo)) {
  41743. predicate = this.flowParsePredicate();
  41744. }
  41745. }
  41746. return [type, predicate];
  41747. }
  41748. flowParseDeclareClass(node) {
  41749. this.next();
  41750. this.flowParseInterfaceish(node, true);
  41751. return this.finishNode(node, "DeclareClass");
  41752. }
  41753. flowParseDeclareFunction(node) {
  41754. this.next();
  41755. const id = node.id = this.parseIdentifier();
  41756. const typeNode = this.startNode();
  41757. const typeContainer = this.startNode();
  41758. if (this.isRelational("<")) {
  41759. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  41760. } else {
  41761. typeNode.typeParameters = null;
  41762. }
  41763. this.expect(types$12.parenL);
  41764. const tmp = this.flowParseFunctionTypeParams();
  41765. typeNode.params = tmp.params;
  41766. typeNode.rest = tmp.rest;
  41767. typeNode.this = tmp._this;
  41768. this.expect(types$12.parenR);
  41769. [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  41770. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  41771. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  41772. this.resetEndLocation(id);
  41773. this.semicolon();
  41774. this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start);
  41775. return this.finishNode(node, "DeclareFunction");
  41776. }
  41777. flowParseDeclare(node, insideModule) {
  41778. if (this.match(types$12._class)) {
  41779. return this.flowParseDeclareClass(node);
  41780. } else if (this.match(types$12._function)) {
  41781. return this.flowParseDeclareFunction(node);
  41782. } else if (this.match(types$12._var)) {
  41783. return this.flowParseDeclareVariable(node);
  41784. } else if (this.eatContextual("module")) {
  41785. if (this.match(types$12.dot)) {
  41786. return this.flowParseDeclareModuleExports(node);
  41787. } else {
  41788. if (insideModule) {
  41789. this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);
  41790. }
  41791. return this.flowParseDeclareModule(node);
  41792. }
  41793. } else if (this.isContextual("type")) {
  41794. return this.flowParseDeclareTypeAlias(node);
  41795. } else if (this.isContextual("opaque")) {
  41796. return this.flowParseDeclareOpaqueType(node);
  41797. } else if (this.isContextual("interface")) {
  41798. return this.flowParseDeclareInterface(node);
  41799. } else if (this.match(types$12._export)) {
  41800. return this.flowParseDeclareExportDeclaration(node, insideModule);
  41801. } else {
  41802. throw this.unexpected();
  41803. }
  41804. }
  41805. flowParseDeclareVariable(node) {
  41806. this.next();
  41807. node.id = this.flowParseTypeAnnotatableIdentifier(true);
  41808. this.scope.declareName(node.id.name, BIND_VAR2, node.id.start);
  41809. this.semicolon();
  41810. return this.finishNode(node, "DeclareVariable");
  41811. }
  41812. flowParseDeclareModule(node) {
  41813. this.scope.enter(SCOPE_OTHER);
  41814. if (this.match(types$12.string)) {
  41815. node.id = this.parseExprAtom();
  41816. } else {
  41817. node.id = this.parseIdentifier();
  41818. }
  41819. const bodyNode = node.body = this.startNode();
  41820. const body = bodyNode.body = [];
  41821. this.expect(types$12.braceL);
  41822. while (!this.match(types$12.braceR)) {
  41823. let bodyNode2 = this.startNode();
  41824. if (this.match(types$12._import)) {
  41825. this.next();
  41826. if (!this.isContextual("type") && !this.match(types$12._typeof)) {
  41827. this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule);
  41828. }
  41829. this.parseImport(bodyNode2);
  41830. } else {
  41831. this.expectContextual("declare", FlowErrors.UnsupportedStatementInDeclareModule);
  41832. bodyNode2 = this.flowParseDeclare(bodyNode2, true);
  41833. }
  41834. body.push(bodyNode2);
  41835. }
  41836. this.scope.exit();
  41837. this.expect(types$12.braceR);
  41838. this.finishNode(bodyNode, "BlockStatement");
  41839. let kind = null;
  41840. let hasModuleExport = false;
  41841. body.forEach((bodyElement) => {
  41842. if (isEsModuleType(bodyElement)) {
  41843. if (kind === "CommonJS") {
  41844. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  41845. }
  41846. kind = "ES";
  41847. } else if (bodyElement.type === "DeclareModuleExports") {
  41848. if (hasModuleExport) {
  41849. this.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports);
  41850. }
  41851. if (kind === "ES") {
  41852. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  41853. }
  41854. kind = "CommonJS";
  41855. hasModuleExport = true;
  41856. }
  41857. });
  41858. node.kind = kind || "CommonJS";
  41859. return this.finishNode(node, "DeclareModule");
  41860. }
  41861. flowParseDeclareExportDeclaration(node, insideModule) {
  41862. this.expect(types$12._export);
  41863. if (this.eat(types$12._default)) {
  41864. if (this.match(types$12._function) || this.match(types$12._class)) {
  41865. node.declaration = this.flowParseDeclare(this.startNode());
  41866. } else {
  41867. node.declaration = this.flowParseType();
  41868. this.semicolon();
  41869. }
  41870. node.default = true;
  41871. return this.finishNode(node, "DeclareExportDeclaration");
  41872. } else {
  41873. if (this.match(types$12._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
  41874. const label = this.state.value;
  41875. const suggestion = exportSuggestions[label];
  41876. throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion);
  41877. }
  41878. if (this.match(types$12._var) || this.match(types$12._function) || this.match(types$12._class) || this.isContextual("opaque")) {
  41879. node.declaration = this.flowParseDeclare(this.startNode());
  41880. node.default = false;
  41881. return this.finishNode(node, "DeclareExportDeclaration");
  41882. } else if (this.match(types$12.star) || this.match(types$12.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
  41883. node = this.parseExport(node);
  41884. if (node.type === "ExportNamedDeclaration") {
  41885. node.type = "ExportDeclaration";
  41886. node.default = false;
  41887. delete node.exportKind;
  41888. }
  41889. node.type = "Declare" + node.type;
  41890. return node;
  41891. }
  41892. }
  41893. throw this.unexpected();
  41894. }
  41895. flowParseDeclareModuleExports(node) {
  41896. this.next();
  41897. this.expectContextual("exports");
  41898. node.typeAnnotation = this.flowParseTypeAnnotation();
  41899. this.semicolon();
  41900. return this.finishNode(node, "DeclareModuleExports");
  41901. }
  41902. flowParseDeclareTypeAlias(node) {
  41903. this.next();
  41904. this.flowParseTypeAlias(node);
  41905. node.type = "DeclareTypeAlias";
  41906. return node;
  41907. }
  41908. flowParseDeclareOpaqueType(node) {
  41909. this.next();
  41910. this.flowParseOpaqueType(node, true);
  41911. node.type = "DeclareOpaqueType";
  41912. return node;
  41913. }
  41914. flowParseDeclareInterface(node) {
  41915. this.next();
  41916. this.flowParseInterfaceish(node);
  41917. return this.finishNode(node, "DeclareInterface");
  41918. }
  41919. flowParseInterfaceish(node, isClass = false) {
  41920. node.id = this.flowParseRestrictedIdentifier(!isClass, true);
  41921. this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION2 : BIND_LEXICAL2, node.id.start);
  41922. if (this.isRelational("<")) {
  41923. node.typeParameters = this.flowParseTypeParameterDeclaration();
  41924. } else {
  41925. node.typeParameters = null;
  41926. }
  41927. node.extends = [];
  41928. node.implements = [];
  41929. node.mixins = [];
  41930. if (this.eat(types$12._extends)) {
  41931. do {
  41932. node.extends.push(this.flowParseInterfaceExtends());
  41933. } while (!isClass && this.eat(types$12.comma));
  41934. }
  41935. if (this.isContextual("mixins")) {
  41936. this.next();
  41937. do {
  41938. node.mixins.push(this.flowParseInterfaceExtends());
  41939. } while (this.eat(types$12.comma));
  41940. }
  41941. if (this.isContextual("implements")) {
  41942. this.next();
  41943. do {
  41944. node.implements.push(this.flowParseInterfaceExtends());
  41945. } while (this.eat(types$12.comma));
  41946. }
  41947. node.body = this.flowParseObjectType({
  41948. allowStatic: isClass,
  41949. allowExact: false,
  41950. allowSpread: false,
  41951. allowProto: isClass,
  41952. allowInexact: false
  41953. });
  41954. }
  41955. flowParseInterfaceExtends() {
  41956. const node = this.startNode();
  41957. node.id = this.flowParseQualifiedTypeIdentifier();
  41958. if (this.isRelational("<")) {
  41959. node.typeParameters = this.flowParseTypeParameterInstantiation();
  41960. } else {
  41961. node.typeParameters = null;
  41962. }
  41963. return this.finishNode(node, "InterfaceExtends");
  41964. }
  41965. flowParseInterface(node) {
  41966. this.flowParseInterfaceish(node);
  41967. return this.finishNode(node, "InterfaceDeclaration");
  41968. }
  41969. checkNotUnderscore(word) {
  41970. if (word === "_") {
  41971. this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);
  41972. }
  41973. }
  41974. checkReservedType(word, startLoc, declaration) {
  41975. if (!reservedTypes.has(word))
  41976. return;
  41977. this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word);
  41978. }
  41979. flowParseRestrictedIdentifier(liberal, declaration) {
  41980. this.checkReservedType(this.state.value, this.state.start, declaration);
  41981. return this.parseIdentifier(liberal);
  41982. }
  41983. flowParseTypeAlias(node) {
  41984. node.id = this.flowParseRestrictedIdentifier(false, true);
  41985. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  41986. if (this.isRelational("<")) {
  41987. node.typeParameters = this.flowParseTypeParameterDeclaration();
  41988. } else {
  41989. node.typeParameters = null;
  41990. }
  41991. node.right = this.flowParseTypeInitialiser(types$12.eq);
  41992. this.semicolon();
  41993. return this.finishNode(node, "TypeAlias");
  41994. }
  41995. flowParseOpaqueType(node, declare) {
  41996. this.expectContextual("type");
  41997. node.id = this.flowParseRestrictedIdentifier(true, true);
  41998. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  41999. if (this.isRelational("<")) {
  42000. node.typeParameters = this.flowParseTypeParameterDeclaration();
  42001. } else {
  42002. node.typeParameters = null;
  42003. }
  42004. node.supertype = null;
  42005. if (this.match(types$12.colon)) {
  42006. node.supertype = this.flowParseTypeInitialiser(types$12.colon);
  42007. }
  42008. node.impltype = null;
  42009. if (!declare) {
  42010. node.impltype = this.flowParseTypeInitialiser(types$12.eq);
  42011. }
  42012. this.semicolon();
  42013. return this.finishNode(node, "OpaqueType");
  42014. }
  42015. flowParseTypeParameter(requireDefault = false) {
  42016. const nodeStart = this.state.start;
  42017. const node = this.startNode();
  42018. const variance = this.flowParseVariance();
  42019. const ident = this.flowParseTypeAnnotatableIdentifier();
  42020. node.name = ident.name;
  42021. node.variance = variance;
  42022. node.bound = ident.typeAnnotation;
  42023. if (this.match(types$12.eq)) {
  42024. this.eat(types$12.eq);
  42025. node.default = this.flowParseType();
  42026. } else {
  42027. if (requireDefault) {
  42028. this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);
  42029. }
  42030. }
  42031. return this.finishNode(node, "TypeParameter");
  42032. }
  42033. flowParseTypeParameterDeclaration() {
  42034. const oldInType = this.state.inType;
  42035. const node = this.startNode();
  42036. node.params = [];
  42037. this.state.inType = true;
  42038. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  42039. this.next();
  42040. } else {
  42041. this.unexpected();
  42042. }
  42043. let defaultRequired = false;
  42044. do {
  42045. const typeParameter = this.flowParseTypeParameter(defaultRequired);
  42046. node.params.push(typeParameter);
  42047. if (typeParameter.default) {
  42048. defaultRequired = true;
  42049. }
  42050. if (!this.isRelational(">")) {
  42051. this.expect(types$12.comma);
  42052. }
  42053. } while (!this.isRelational(">"));
  42054. this.expectRelational(">");
  42055. this.state.inType = oldInType;
  42056. return this.finishNode(node, "TypeParameterDeclaration");
  42057. }
  42058. flowParseTypeParameterInstantiation() {
  42059. const node = this.startNode();
  42060. const oldInType = this.state.inType;
  42061. node.params = [];
  42062. this.state.inType = true;
  42063. this.expectRelational("<");
  42064. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  42065. this.state.noAnonFunctionType = false;
  42066. while (!this.isRelational(">")) {
  42067. node.params.push(this.flowParseType());
  42068. if (!this.isRelational(">")) {
  42069. this.expect(types$12.comma);
  42070. }
  42071. }
  42072. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  42073. this.expectRelational(">");
  42074. this.state.inType = oldInType;
  42075. return this.finishNode(node, "TypeParameterInstantiation");
  42076. }
  42077. flowParseTypeParameterInstantiationCallOrNew() {
  42078. const node = this.startNode();
  42079. const oldInType = this.state.inType;
  42080. node.params = [];
  42081. this.state.inType = true;
  42082. this.expectRelational("<");
  42083. while (!this.isRelational(">")) {
  42084. node.params.push(this.flowParseTypeOrImplicitInstantiation());
  42085. if (!this.isRelational(">")) {
  42086. this.expect(types$12.comma);
  42087. }
  42088. }
  42089. this.expectRelational(">");
  42090. this.state.inType = oldInType;
  42091. return this.finishNode(node, "TypeParameterInstantiation");
  42092. }
  42093. flowParseInterfaceType() {
  42094. const node = this.startNode();
  42095. this.expectContextual("interface");
  42096. node.extends = [];
  42097. if (this.eat(types$12._extends)) {
  42098. do {
  42099. node.extends.push(this.flowParseInterfaceExtends());
  42100. } while (this.eat(types$12.comma));
  42101. }
  42102. node.body = this.flowParseObjectType({
  42103. allowStatic: false,
  42104. allowExact: false,
  42105. allowSpread: false,
  42106. allowProto: false,
  42107. allowInexact: false
  42108. });
  42109. return this.finishNode(node, "InterfaceTypeAnnotation");
  42110. }
  42111. flowParseObjectPropertyKey() {
  42112. return this.match(types$12.num) || this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  42113. }
  42114. flowParseObjectTypeIndexer(node, isStatic, variance) {
  42115. node.static = isStatic;
  42116. if (this.lookahead().type === types$12.colon) {
  42117. node.id = this.flowParseObjectPropertyKey();
  42118. node.key = this.flowParseTypeInitialiser();
  42119. } else {
  42120. node.id = null;
  42121. node.key = this.flowParseType();
  42122. }
  42123. this.expect(types$12.bracketR);
  42124. node.value = this.flowParseTypeInitialiser();
  42125. node.variance = variance;
  42126. return this.finishNode(node, "ObjectTypeIndexer");
  42127. }
  42128. flowParseObjectTypeInternalSlot(node, isStatic) {
  42129. node.static = isStatic;
  42130. node.id = this.flowParseObjectPropertyKey();
  42131. this.expect(types$12.bracketR);
  42132. this.expect(types$12.bracketR);
  42133. if (this.isRelational("<") || this.match(types$12.parenL)) {
  42134. node.method = true;
  42135. node.optional = false;
  42136. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  42137. } else {
  42138. node.method = false;
  42139. if (this.eat(types$12.question)) {
  42140. node.optional = true;
  42141. }
  42142. node.value = this.flowParseTypeInitialiser();
  42143. }
  42144. return this.finishNode(node, "ObjectTypeInternalSlot");
  42145. }
  42146. flowParseObjectTypeMethodish(node) {
  42147. node.params = [];
  42148. node.rest = null;
  42149. node.typeParameters = null;
  42150. node.this = null;
  42151. if (this.isRelational("<")) {
  42152. node.typeParameters = this.flowParseTypeParameterDeclaration();
  42153. }
  42154. this.expect(types$12.parenL);
  42155. if (this.match(types$12._this)) {
  42156. node.this = this.flowParseFunctionTypeParam(true);
  42157. node.this.name = null;
  42158. if (!this.match(types$12.parenR)) {
  42159. this.expect(types$12.comma);
  42160. }
  42161. }
  42162. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  42163. node.params.push(this.flowParseFunctionTypeParam(false));
  42164. if (!this.match(types$12.parenR)) {
  42165. this.expect(types$12.comma);
  42166. }
  42167. }
  42168. if (this.eat(types$12.ellipsis)) {
  42169. node.rest = this.flowParseFunctionTypeParam(false);
  42170. }
  42171. this.expect(types$12.parenR);
  42172. node.returnType = this.flowParseTypeInitialiser();
  42173. return this.finishNode(node, "FunctionTypeAnnotation");
  42174. }
  42175. flowParseObjectTypeCallProperty(node, isStatic) {
  42176. const valueNode = this.startNode();
  42177. node.static = isStatic;
  42178. node.value = this.flowParseObjectTypeMethodish(valueNode);
  42179. return this.finishNode(node, "ObjectTypeCallProperty");
  42180. }
  42181. flowParseObjectType({
  42182. allowStatic,
  42183. allowExact,
  42184. allowSpread,
  42185. allowProto,
  42186. allowInexact
  42187. }) {
  42188. const oldInType = this.state.inType;
  42189. this.state.inType = true;
  42190. const nodeStart = this.startNode();
  42191. nodeStart.callProperties = [];
  42192. nodeStart.properties = [];
  42193. nodeStart.indexers = [];
  42194. nodeStart.internalSlots = [];
  42195. let endDelim;
  42196. let exact;
  42197. let inexact = false;
  42198. if (allowExact && this.match(types$12.braceBarL)) {
  42199. this.expect(types$12.braceBarL);
  42200. endDelim = types$12.braceBarR;
  42201. exact = true;
  42202. } else {
  42203. this.expect(types$12.braceL);
  42204. endDelim = types$12.braceR;
  42205. exact = false;
  42206. }
  42207. nodeStart.exact = exact;
  42208. while (!this.match(endDelim)) {
  42209. let isStatic = false;
  42210. let protoStart = null;
  42211. let inexactStart = null;
  42212. const node = this.startNode();
  42213. if (allowProto && this.isContextual("proto")) {
  42214. const lookahead2 = this.lookahead();
  42215. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  42216. this.next();
  42217. protoStart = this.state.start;
  42218. allowStatic = false;
  42219. }
  42220. }
  42221. if (allowStatic && this.isContextual("static")) {
  42222. const lookahead2 = this.lookahead();
  42223. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  42224. this.next();
  42225. isStatic = true;
  42226. }
  42227. }
  42228. const variance = this.flowParseVariance();
  42229. if (this.eat(types$12.bracketL)) {
  42230. if (protoStart != null) {
  42231. this.unexpected(protoStart);
  42232. }
  42233. if (this.eat(types$12.bracketL)) {
  42234. if (variance) {
  42235. this.unexpected(variance.start);
  42236. }
  42237. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
  42238. } else {
  42239. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  42240. }
  42241. } else if (this.match(types$12.parenL) || this.isRelational("<")) {
  42242. if (protoStart != null) {
  42243. this.unexpected(protoStart);
  42244. }
  42245. if (variance) {
  42246. this.unexpected(variance.start);
  42247. }
  42248. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  42249. } else {
  42250. let kind = "init";
  42251. if (this.isContextual("get") || this.isContextual("set")) {
  42252. const lookahead2 = this.lookahead();
  42253. if (lookahead2.type === types$12.name || lookahead2.type === types$12.string || lookahead2.type === types$12.num) {
  42254. kind = this.state.value;
  42255. this.next();
  42256. }
  42257. }
  42258. const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  42259. if (propOrInexact === null) {
  42260. inexact = true;
  42261. inexactStart = this.state.lastTokStart;
  42262. } else {
  42263. nodeStart.properties.push(propOrInexact);
  42264. }
  42265. }
  42266. this.flowObjectTypeSemicolon();
  42267. if (inexactStart && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  42268. this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject);
  42269. }
  42270. }
  42271. this.expect(endDelim);
  42272. if (allowSpread) {
  42273. nodeStart.inexact = inexact;
  42274. }
  42275. const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  42276. this.state.inType = oldInType;
  42277. return out;
  42278. }
  42279. flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
  42280. if (this.eat(types$12.ellipsis)) {
  42281. const isInexactToken = this.match(types$12.comma) || this.match(types$12.semi) || this.match(types$12.braceR) || this.match(types$12.braceBarR);
  42282. if (isInexactToken) {
  42283. if (!allowSpread) {
  42284. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject);
  42285. } else if (!allowInexact) {
  42286. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);
  42287. }
  42288. if (variance) {
  42289. this.raise(variance.start, FlowErrors.InexactVariance);
  42290. }
  42291. return null;
  42292. }
  42293. if (!allowSpread) {
  42294. this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);
  42295. }
  42296. if (protoStart != null) {
  42297. this.unexpected(protoStart);
  42298. }
  42299. if (variance) {
  42300. this.raise(variance.start, FlowErrors.SpreadVariance);
  42301. }
  42302. node.argument = this.flowParseType();
  42303. return this.finishNode(node, "ObjectTypeSpreadProperty");
  42304. } else {
  42305. node.key = this.flowParseObjectPropertyKey();
  42306. node.static = isStatic;
  42307. node.proto = protoStart != null;
  42308. node.kind = kind;
  42309. let optional = false;
  42310. if (this.isRelational("<") || this.match(types$12.parenL)) {
  42311. node.method = true;
  42312. if (protoStart != null) {
  42313. this.unexpected(protoStart);
  42314. }
  42315. if (variance) {
  42316. this.unexpected(variance.start);
  42317. }
  42318. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  42319. if (kind === "get" || kind === "set") {
  42320. this.flowCheckGetterSetterParams(node);
  42321. }
  42322. if (!allowSpread && node.key.name === "constructor" && node.value.this) {
  42323. this.raise(node.value.this.start, FlowErrors.ThisParamBannedInConstructor);
  42324. }
  42325. } else {
  42326. if (kind !== "init")
  42327. this.unexpected();
  42328. node.method = false;
  42329. if (this.eat(types$12.question)) {
  42330. optional = true;
  42331. }
  42332. node.value = this.flowParseTypeInitialiser();
  42333. node.variance = variance;
  42334. }
  42335. node.optional = optional;
  42336. return this.finishNode(node, "ObjectTypeProperty");
  42337. }
  42338. }
  42339. flowCheckGetterSetterParams(property) {
  42340. const paramCount = property.kind === "get" ? 0 : 1;
  42341. const start3 = property.start;
  42342. const length = property.value.params.length + (property.value.rest ? 1 : 0);
  42343. if (property.value.this) {
  42344. this.raise(property.value.this.start, property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam);
  42345. }
  42346. if (length !== paramCount) {
  42347. if (property.kind === "get") {
  42348. this.raise(start3, ErrorMessages.BadGetterArity);
  42349. } else {
  42350. this.raise(start3, ErrorMessages.BadSetterArity);
  42351. }
  42352. }
  42353. if (property.kind === "set" && property.value.rest) {
  42354. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  42355. }
  42356. }
  42357. flowObjectTypeSemicolon() {
  42358. if (!this.eat(types$12.semi) && !this.eat(types$12.comma) && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  42359. this.unexpected();
  42360. }
  42361. }
  42362. flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
  42363. startPos = startPos || this.state.start;
  42364. startLoc = startLoc || this.state.startLoc;
  42365. let node = id || this.flowParseRestrictedIdentifier(true);
  42366. while (this.eat(types$12.dot)) {
  42367. const node2 = this.startNodeAt(startPos, startLoc);
  42368. node2.qualification = node;
  42369. node2.id = this.flowParseRestrictedIdentifier(true);
  42370. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  42371. }
  42372. return node;
  42373. }
  42374. flowParseGenericType(startPos, startLoc, id) {
  42375. const node = this.startNodeAt(startPos, startLoc);
  42376. node.typeParameters = null;
  42377. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  42378. if (this.isRelational("<")) {
  42379. node.typeParameters = this.flowParseTypeParameterInstantiation();
  42380. }
  42381. return this.finishNode(node, "GenericTypeAnnotation");
  42382. }
  42383. flowParseTypeofType() {
  42384. const node = this.startNode();
  42385. this.expect(types$12._typeof);
  42386. node.argument = this.flowParsePrimaryType();
  42387. return this.finishNode(node, "TypeofTypeAnnotation");
  42388. }
  42389. flowParseTupleType() {
  42390. const node = this.startNode();
  42391. node.types = [];
  42392. this.expect(types$12.bracketL);
  42393. while (this.state.pos < this.length && !this.match(types$12.bracketR)) {
  42394. node.types.push(this.flowParseType());
  42395. if (this.match(types$12.bracketR))
  42396. break;
  42397. this.expect(types$12.comma);
  42398. }
  42399. this.expect(types$12.bracketR);
  42400. return this.finishNode(node, "TupleTypeAnnotation");
  42401. }
  42402. flowParseFunctionTypeParam(first) {
  42403. let name2 = null;
  42404. let optional = false;
  42405. let typeAnnotation = null;
  42406. const node = this.startNode();
  42407. const lh = this.lookahead();
  42408. const isThis = this.state.type === types$12._this;
  42409. if (lh.type === types$12.colon || lh.type === types$12.question) {
  42410. if (isThis && !first) {
  42411. this.raise(node.start, FlowErrors.ThisParamMustBeFirst);
  42412. }
  42413. name2 = this.parseIdentifier(isThis);
  42414. if (this.eat(types$12.question)) {
  42415. optional = true;
  42416. if (isThis) {
  42417. this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional);
  42418. }
  42419. }
  42420. typeAnnotation = this.flowParseTypeInitialiser();
  42421. } else {
  42422. typeAnnotation = this.flowParseType();
  42423. }
  42424. node.name = name2;
  42425. node.optional = optional;
  42426. node.typeAnnotation = typeAnnotation;
  42427. return this.finishNode(node, "FunctionTypeParam");
  42428. }
  42429. reinterpretTypeAsFunctionTypeParam(type) {
  42430. const node = this.startNodeAt(type.start, type.loc.start);
  42431. node.name = null;
  42432. node.optional = false;
  42433. node.typeAnnotation = type;
  42434. return this.finishNode(node, "FunctionTypeParam");
  42435. }
  42436. flowParseFunctionTypeParams(params = []) {
  42437. let rest = null;
  42438. let _this = null;
  42439. if (this.match(types$12._this)) {
  42440. _this = this.flowParseFunctionTypeParam(true);
  42441. _this.name = null;
  42442. if (!this.match(types$12.parenR)) {
  42443. this.expect(types$12.comma);
  42444. }
  42445. }
  42446. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  42447. params.push(this.flowParseFunctionTypeParam(false));
  42448. if (!this.match(types$12.parenR)) {
  42449. this.expect(types$12.comma);
  42450. }
  42451. }
  42452. if (this.eat(types$12.ellipsis)) {
  42453. rest = this.flowParseFunctionTypeParam(false);
  42454. }
  42455. return {
  42456. params,
  42457. rest,
  42458. _this
  42459. };
  42460. }
  42461. flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
  42462. switch (id.name) {
  42463. case "any":
  42464. return this.finishNode(node, "AnyTypeAnnotation");
  42465. case "bool":
  42466. case "boolean":
  42467. return this.finishNode(node, "BooleanTypeAnnotation");
  42468. case "mixed":
  42469. return this.finishNode(node, "MixedTypeAnnotation");
  42470. case "empty":
  42471. return this.finishNode(node, "EmptyTypeAnnotation");
  42472. case "number":
  42473. return this.finishNode(node, "NumberTypeAnnotation");
  42474. case "string":
  42475. return this.finishNode(node, "StringTypeAnnotation");
  42476. case "symbol":
  42477. return this.finishNode(node, "SymbolTypeAnnotation");
  42478. default:
  42479. this.checkNotUnderscore(id.name);
  42480. return this.flowParseGenericType(startPos, startLoc, id);
  42481. }
  42482. }
  42483. flowParsePrimaryType() {
  42484. const startPos = this.state.start;
  42485. const startLoc = this.state.startLoc;
  42486. const node = this.startNode();
  42487. let tmp;
  42488. let type;
  42489. let isGroupedType = false;
  42490. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  42491. switch (this.state.type) {
  42492. case types$12.name:
  42493. if (this.isContextual("interface")) {
  42494. return this.flowParseInterfaceType();
  42495. }
  42496. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  42497. case types$12.braceL:
  42498. return this.flowParseObjectType({
  42499. allowStatic: false,
  42500. allowExact: false,
  42501. allowSpread: true,
  42502. allowProto: false,
  42503. allowInexact: true
  42504. });
  42505. case types$12.braceBarL:
  42506. return this.flowParseObjectType({
  42507. allowStatic: false,
  42508. allowExact: true,
  42509. allowSpread: true,
  42510. allowProto: false,
  42511. allowInexact: false
  42512. });
  42513. case types$12.bracketL:
  42514. this.state.noAnonFunctionType = false;
  42515. type = this.flowParseTupleType();
  42516. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  42517. return type;
  42518. case types$12.relational:
  42519. if (this.state.value === "<") {
  42520. node.typeParameters = this.flowParseTypeParameterDeclaration();
  42521. this.expect(types$12.parenL);
  42522. tmp = this.flowParseFunctionTypeParams();
  42523. node.params = tmp.params;
  42524. node.rest = tmp.rest;
  42525. node.this = tmp._this;
  42526. this.expect(types$12.parenR);
  42527. this.expect(types$12.arrow);
  42528. node.returnType = this.flowParseType();
  42529. return this.finishNode(node, "FunctionTypeAnnotation");
  42530. }
  42531. break;
  42532. case types$12.parenL:
  42533. this.next();
  42534. if (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  42535. if (this.match(types$12.name) || this.match(types$12._this)) {
  42536. const token = this.lookahead().type;
  42537. isGroupedType = token !== types$12.question && token !== types$12.colon;
  42538. } else {
  42539. isGroupedType = true;
  42540. }
  42541. }
  42542. if (isGroupedType) {
  42543. this.state.noAnonFunctionType = false;
  42544. type = this.flowParseType();
  42545. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  42546. if (this.state.noAnonFunctionType || !(this.match(types$12.comma) || this.match(types$12.parenR) && this.lookahead().type === types$12.arrow)) {
  42547. this.expect(types$12.parenR);
  42548. return type;
  42549. } else {
  42550. this.eat(types$12.comma);
  42551. }
  42552. }
  42553. if (type) {
  42554. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  42555. } else {
  42556. tmp = this.flowParseFunctionTypeParams();
  42557. }
  42558. node.params = tmp.params;
  42559. node.rest = tmp.rest;
  42560. node.this = tmp._this;
  42561. this.expect(types$12.parenR);
  42562. this.expect(types$12.arrow);
  42563. node.returnType = this.flowParseType();
  42564. node.typeParameters = null;
  42565. return this.finishNode(node, "FunctionTypeAnnotation");
  42566. case types$12.string:
  42567. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  42568. case types$12._true:
  42569. case types$12._false:
  42570. node.value = this.match(types$12._true);
  42571. this.next();
  42572. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  42573. case types$12.plusMin:
  42574. if (this.state.value === "-") {
  42575. this.next();
  42576. if (this.match(types$12.num)) {
  42577. return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
  42578. }
  42579. if (this.match(types$12.bigint)) {
  42580. return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
  42581. }
  42582. throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand);
  42583. }
  42584. throw this.unexpected();
  42585. case types$12.num:
  42586. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  42587. case types$12.bigint:
  42588. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  42589. case types$12._void:
  42590. this.next();
  42591. return this.finishNode(node, "VoidTypeAnnotation");
  42592. case types$12._null:
  42593. this.next();
  42594. return this.finishNode(node, "NullLiteralTypeAnnotation");
  42595. case types$12._this:
  42596. this.next();
  42597. return this.finishNode(node, "ThisTypeAnnotation");
  42598. case types$12.star:
  42599. this.next();
  42600. return this.finishNode(node, "ExistsTypeAnnotation");
  42601. default:
  42602. if (this.state.type.keyword === "typeof") {
  42603. return this.flowParseTypeofType();
  42604. } else if (this.state.type.keyword) {
  42605. const label = this.state.type.label;
  42606. this.next();
  42607. return super.createIdentifier(node, label);
  42608. }
  42609. }
  42610. throw this.unexpected();
  42611. }
  42612. flowParsePostfixType() {
  42613. const startPos = this.state.start;
  42614. const startLoc = this.state.startLoc;
  42615. let type = this.flowParsePrimaryType();
  42616. let seenOptionalIndexedAccess = false;
  42617. while ((this.match(types$12.bracketL) || this.match(types$12.questionDot)) && !this.canInsertSemicolon()) {
  42618. const node = this.startNodeAt(startPos, startLoc);
  42619. const optional = this.eat(types$12.questionDot);
  42620. seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
  42621. this.expect(types$12.bracketL);
  42622. if (!optional && this.match(types$12.bracketR)) {
  42623. node.elementType = type;
  42624. this.next();
  42625. type = this.finishNode(node, "ArrayTypeAnnotation");
  42626. } else {
  42627. node.objectType = type;
  42628. node.indexType = this.flowParseType();
  42629. this.expect(types$12.bracketR);
  42630. if (seenOptionalIndexedAccess) {
  42631. node.optional = optional;
  42632. type = this.finishNode(node, "OptionalIndexedAccessType");
  42633. } else {
  42634. type = this.finishNode(node, "IndexedAccessType");
  42635. }
  42636. }
  42637. }
  42638. return type;
  42639. }
  42640. flowParsePrefixType() {
  42641. const node = this.startNode();
  42642. if (this.eat(types$12.question)) {
  42643. node.typeAnnotation = this.flowParsePrefixType();
  42644. return this.finishNode(node, "NullableTypeAnnotation");
  42645. } else {
  42646. return this.flowParsePostfixType();
  42647. }
  42648. }
  42649. flowParseAnonFunctionWithoutParens() {
  42650. const param = this.flowParsePrefixType();
  42651. if (!this.state.noAnonFunctionType && this.eat(types$12.arrow)) {
  42652. const node = this.startNodeAt(param.start, param.loc.start);
  42653. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  42654. node.rest = null;
  42655. node.this = null;
  42656. node.returnType = this.flowParseType();
  42657. node.typeParameters = null;
  42658. return this.finishNode(node, "FunctionTypeAnnotation");
  42659. }
  42660. return param;
  42661. }
  42662. flowParseIntersectionType() {
  42663. const node = this.startNode();
  42664. this.eat(types$12.bitwiseAND);
  42665. const type = this.flowParseAnonFunctionWithoutParens();
  42666. node.types = [type];
  42667. while (this.eat(types$12.bitwiseAND)) {
  42668. node.types.push(this.flowParseAnonFunctionWithoutParens());
  42669. }
  42670. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  42671. }
  42672. flowParseUnionType() {
  42673. const node = this.startNode();
  42674. this.eat(types$12.bitwiseOR);
  42675. const type = this.flowParseIntersectionType();
  42676. node.types = [type];
  42677. while (this.eat(types$12.bitwiseOR)) {
  42678. node.types.push(this.flowParseIntersectionType());
  42679. }
  42680. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  42681. }
  42682. flowParseType() {
  42683. const oldInType = this.state.inType;
  42684. this.state.inType = true;
  42685. const type = this.flowParseUnionType();
  42686. this.state.inType = oldInType;
  42687. this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType;
  42688. return type;
  42689. }
  42690. flowParseTypeOrImplicitInstantiation() {
  42691. if (this.state.type === types$12.name && this.state.value === "_") {
  42692. const startPos = this.state.start;
  42693. const startLoc = this.state.startLoc;
  42694. const node = this.parseIdentifier();
  42695. return this.flowParseGenericType(startPos, startLoc, node);
  42696. } else {
  42697. return this.flowParseType();
  42698. }
  42699. }
  42700. flowParseTypeAnnotation() {
  42701. const node = this.startNode();
  42702. node.typeAnnotation = this.flowParseTypeInitialiser();
  42703. return this.finishNode(node, "TypeAnnotation");
  42704. }
  42705. flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  42706. const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  42707. if (this.match(types$12.colon)) {
  42708. ident.typeAnnotation = this.flowParseTypeAnnotation();
  42709. this.resetEndLocation(ident);
  42710. }
  42711. return ident;
  42712. }
  42713. typeCastToParameter(node) {
  42714. node.expression.typeAnnotation = node.typeAnnotation;
  42715. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  42716. return node.expression;
  42717. }
  42718. flowParseVariance() {
  42719. let variance = null;
  42720. if (this.match(types$12.plusMin)) {
  42721. variance = this.startNode();
  42722. if (this.state.value === "+") {
  42723. variance.kind = "plus";
  42724. } else {
  42725. variance.kind = "minus";
  42726. }
  42727. this.next();
  42728. this.finishNode(variance, "Variance");
  42729. }
  42730. return variance;
  42731. }
  42732. parseFunctionBody(node, allowExpressionBody, isMethod = false) {
  42733. if (allowExpressionBody) {
  42734. return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
  42735. }
  42736. return super.parseFunctionBody(node, false, isMethod);
  42737. }
  42738. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  42739. if (this.match(types$12.colon)) {
  42740. const typeNode = this.startNode();
  42741. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  42742. node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  42743. }
  42744. super.parseFunctionBodyAndFinish(node, type, isMethod);
  42745. }
  42746. parseStatement(context, topLevel) {
  42747. if (this.state.strict && this.match(types$12.name) && this.state.value === "interface") {
  42748. const lookahead2 = this.lookahead();
  42749. if (lookahead2.type === types$12.name || isKeyword(lookahead2.value)) {
  42750. const node = this.startNode();
  42751. this.next();
  42752. return this.flowParseInterface(node);
  42753. }
  42754. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  42755. const node = this.startNode();
  42756. this.next();
  42757. return this.flowParseEnumDeclaration(node);
  42758. }
  42759. const stmt = super.parseStatement(context, topLevel);
  42760. if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) {
  42761. this.flowPragma = null;
  42762. }
  42763. return stmt;
  42764. }
  42765. parseExpressionStatement(node, expr) {
  42766. if (expr.type === "Identifier") {
  42767. if (expr.name === "declare") {
  42768. if (this.match(types$12._class) || this.match(types$12.name) || this.match(types$12._function) || this.match(types$12._var) || this.match(types$12._export)) {
  42769. return this.flowParseDeclare(node);
  42770. }
  42771. } else if (this.match(types$12.name)) {
  42772. if (expr.name === "interface") {
  42773. return this.flowParseInterface(node);
  42774. } else if (expr.name === "type") {
  42775. return this.flowParseTypeAlias(node);
  42776. } else if (expr.name === "opaque") {
  42777. return this.flowParseOpaqueType(node, false);
  42778. }
  42779. }
  42780. }
  42781. return super.parseExpressionStatement(node, expr);
  42782. }
  42783. shouldParseExportDeclaration() {
  42784. return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || super.shouldParseExportDeclaration();
  42785. }
  42786. isExportDefaultSpecifier() {
  42787. if (this.match(types$12.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
  42788. return false;
  42789. }
  42790. return super.isExportDefaultSpecifier();
  42791. }
  42792. parseExportDefaultExpression() {
  42793. if (this.shouldParseEnums() && this.isContextual("enum")) {
  42794. const node = this.startNode();
  42795. this.next();
  42796. return this.flowParseEnumDeclaration(node);
  42797. }
  42798. return super.parseExportDefaultExpression();
  42799. }
  42800. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  42801. if (!this.match(types$12.question))
  42802. return expr;
  42803. if (refNeedsArrowPos) {
  42804. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  42805. if (!result.node) {
  42806. refNeedsArrowPos.start = result.error.pos || this.state.start;
  42807. return expr;
  42808. }
  42809. if (result.error)
  42810. this.state = result.failState;
  42811. return result.node;
  42812. }
  42813. this.expect(types$12.question);
  42814. const state = this.state.clone();
  42815. const originalNoArrowAt = this.state.noArrowAt;
  42816. const node = this.startNodeAt(startPos, startLoc);
  42817. let {
  42818. consequent,
  42819. failed
  42820. } = this.tryParseConditionalConsequent();
  42821. let [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  42822. if (failed || invalid2.length > 0) {
  42823. const noArrowAt = [...originalNoArrowAt];
  42824. if (invalid2.length > 0) {
  42825. this.state = state;
  42826. this.state.noArrowAt = noArrowAt;
  42827. for (let i = 0; i < invalid2.length; i++) {
  42828. noArrowAt.push(invalid2[i].start);
  42829. }
  42830. ({
  42831. consequent,
  42832. failed
  42833. } = this.tryParseConditionalConsequent());
  42834. [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  42835. }
  42836. if (failed && valid2.length > 1) {
  42837. this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);
  42838. }
  42839. if (failed && valid2.length === 1) {
  42840. this.state = state;
  42841. this.state.noArrowAt = noArrowAt.concat(valid2[0].start);
  42842. ({
  42843. consequent,
  42844. failed
  42845. } = this.tryParseConditionalConsequent());
  42846. }
  42847. }
  42848. this.getArrowLikeExpressions(consequent, true);
  42849. this.state.noArrowAt = originalNoArrowAt;
  42850. this.expect(types$12.colon);
  42851. node.test = expr;
  42852. node.consequent = consequent;
  42853. node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(void 0, void 0, void 0));
  42854. return this.finishNode(node, "ConditionalExpression");
  42855. }
  42856. tryParseConditionalConsequent() {
  42857. this.state.noArrowParamsConversionAt.push(this.state.start);
  42858. const consequent = this.parseMaybeAssignAllowIn();
  42859. const failed = !this.match(types$12.colon);
  42860. this.state.noArrowParamsConversionAt.pop();
  42861. return {
  42862. consequent,
  42863. failed
  42864. };
  42865. }
  42866. getArrowLikeExpressions(node, disallowInvalid) {
  42867. const stack = [node];
  42868. const arrows = [];
  42869. while (stack.length !== 0) {
  42870. const node2 = stack.pop();
  42871. if (node2.type === "ArrowFunctionExpression") {
  42872. if (node2.typeParameters || !node2.returnType) {
  42873. this.finishArrowValidation(node2);
  42874. } else {
  42875. arrows.push(node2);
  42876. }
  42877. stack.push(node2.body);
  42878. } else if (node2.type === "ConditionalExpression") {
  42879. stack.push(node2.consequent);
  42880. stack.push(node2.alternate);
  42881. }
  42882. }
  42883. if (disallowInvalid) {
  42884. arrows.forEach((node2) => this.finishArrowValidation(node2));
  42885. return [arrows, []];
  42886. }
  42887. return partition(arrows, (node2) => node2.params.every((param) => this.isAssignable(param, true)));
  42888. }
  42889. finishArrowValidation(node) {
  42890. var _node$extra;
  42891. this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false);
  42892. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  42893. super.checkParams(node, false, true);
  42894. this.scope.exit();
  42895. }
  42896. forwardNoArrowParamsConversionAt(node, parse5) {
  42897. let result;
  42898. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  42899. this.state.noArrowParamsConversionAt.push(this.state.start);
  42900. result = parse5();
  42901. this.state.noArrowParamsConversionAt.pop();
  42902. } else {
  42903. result = parse5();
  42904. }
  42905. return result;
  42906. }
  42907. parseParenItem(node, startPos, startLoc) {
  42908. node = super.parseParenItem(node, startPos, startLoc);
  42909. if (this.eat(types$12.question)) {
  42910. node.optional = true;
  42911. this.resetEndLocation(node);
  42912. }
  42913. if (this.match(types$12.colon)) {
  42914. const typeCastNode = this.startNodeAt(startPos, startLoc);
  42915. typeCastNode.expression = node;
  42916. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  42917. return this.finishNode(typeCastNode, "TypeCastExpression");
  42918. }
  42919. return node;
  42920. }
  42921. assertModuleNodeAllowed(node) {
  42922. if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
  42923. return;
  42924. }
  42925. super.assertModuleNodeAllowed(node);
  42926. }
  42927. parseExport(node) {
  42928. const decl = super.parseExport(node);
  42929. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  42930. decl.exportKind = decl.exportKind || "value";
  42931. }
  42932. return decl;
  42933. }
  42934. parseExportDeclaration(node) {
  42935. if (this.isContextual("type")) {
  42936. node.exportKind = "type";
  42937. const declarationNode = this.startNode();
  42938. this.next();
  42939. if (this.match(types$12.braceL)) {
  42940. node.specifiers = this.parseExportSpecifiers();
  42941. this.parseExportFrom(node);
  42942. return null;
  42943. } else {
  42944. return this.flowParseTypeAlias(declarationNode);
  42945. }
  42946. } else if (this.isContextual("opaque")) {
  42947. node.exportKind = "type";
  42948. const declarationNode = this.startNode();
  42949. this.next();
  42950. return this.flowParseOpaqueType(declarationNode, false);
  42951. } else if (this.isContextual("interface")) {
  42952. node.exportKind = "type";
  42953. const declarationNode = this.startNode();
  42954. this.next();
  42955. return this.flowParseInterface(declarationNode);
  42956. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  42957. node.exportKind = "value";
  42958. const declarationNode = this.startNode();
  42959. this.next();
  42960. return this.flowParseEnumDeclaration(declarationNode);
  42961. } else {
  42962. return super.parseExportDeclaration(node);
  42963. }
  42964. }
  42965. eatExportStar(node) {
  42966. if (super.eatExportStar(...arguments))
  42967. return true;
  42968. if (this.isContextual("type") && this.lookahead().type === types$12.star) {
  42969. node.exportKind = "type";
  42970. this.next();
  42971. this.next();
  42972. return true;
  42973. }
  42974. return false;
  42975. }
  42976. maybeParseExportNamespaceSpecifier(node) {
  42977. const pos = this.state.start;
  42978. const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
  42979. if (hasNamespace && node.exportKind === "type") {
  42980. this.unexpected(pos);
  42981. }
  42982. return hasNamespace;
  42983. }
  42984. parseClassId(node, isStatement, optionalId) {
  42985. super.parseClassId(node, isStatement, optionalId);
  42986. if (this.isRelational("<")) {
  42987. node.typeParameters = this.flowParseTypeParameterDeclaration();
  42988. }
  42989. }
  42990. parseClassMember(classBody, member, state) {
  42991. const pos = this.state.start;
  42992. if (this.isContextual("declare")) {
  42993. if (this.parseClassMemberFromModifier(classBody, member)) {
  42994. return;
  42995. }
  42996. member.declare = true;
  42997. }
  42998. super.parseClassMember(classBody, member, state);
  42999. if (member.declare) {
  43000. if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
  43001. this.raise(pos, FlowErrors.DeclareClassElement);
  43002. } else if (member.value) {
  43003. this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer);
  43004. }
  43005. }
  43006. }
  43007. isIterator(word) {
  43008. return word === "iterator" || word === "asyncIterator";
  43009. }
  43010. readIterator() {
  43011. const word = super.readWord1();
  43012. const fullWord = "@@" + word;
  43013. if (!this.isIterator(word) || !this.state.inType) {
  43014. this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, fullWord);
  43015. }
  43016. this.finishToken(types$12.name, fullWord);
  43017. }
  43018. getTokenFromCode(code2) {
  43019. const next = this.input.charCodeAt(this.state.pos + 1);
  43020. if (code2 === 123 && next === 124) {
  43021. return this.finishOp(types$12.braceBarL, 2);
  43022. } else if (this.state.inType && (code2 === 62 || code2 === 60)) {
  43023. return this.finishOp(types$12.relational, 1);
  43024. } else if (this.state.inType && code2 === 63) {
  43025. if (next === 46) {
  43026. return this.finishOp(types$12.questionDot, 2);
  43027. }
  43028. return this.finishOp(types$12.question, 1);
  43029. } else if (isIteratorStart(code2, next)) {
  43030. this.state.pos += 2;
  43031. return this.readIterator();
  43032. } else {
  43033. return super.getTokenFromCode(code2);
  43034. }
  43035. }
  43036. isAssignable(node, isBinding) {
  43037. switch (node.type) {
  43038. case "Identifier":
  43039. case "ObjectPattern":
  43040. case "ArrayPattern":
  43041. case "AssignmentPattern":
  43042. return true;
  43043. case "ObjectExpression": {
  43044. const last2 = node.properties.length - 1;
  43045. return node.properties.every((prop, i) => {
  43046. return prop.type !== "ObjectMethod" && (i === last2 || prop.type === "SpreadElement") && this.isAssignable(prop);
  43047. });
  43048. }
  43049. case "ObjectProperty":
  43050. return this.isAssignable(node.value);
  43051. case "SpreadElement":
  43052. return this.isAssignable(node.argument);
  43053. case "ArrayExpression":
  43054. return node.elements.every((element2) => this.isAssignable(element2));
  43055. case "AssignmentExpression":
  43056. return node.operator === "=";
  43057. case "ParenthesizedExpression":
  43058. case "TypeCastExpression":
  43059. return this.isAssignable(node.expression);
  43060. case "MemberExpression":
  43061. case "OptionalMemberExpression":
  43062. return !isBinding;
  43063. default:
  43064. return false;
  43065. }
  43066. }
  43067. toAssignable(node, isLHS = false) {
  43068. if (node.type === "TypeCastExpression") {
  43069. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  43070. } else {
  43071. return super.toAssignable(node, isLHS);
  43072. }
  43073. }
  43074. toAssignableList(exprList, trailingCommaPos, isLHS) {
  43075. for (let i = 0; i < exprList.length; i++) {
  43076. const expr = exprList[i];
  43077. if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
  43078. exprList[i] = this.typeCastToParameter(expr);
  43079. }
  43080. }
  43081. return super.toAssignableList(exprList, trailingCommaPos, isLHS);
  43082. }
  43083. toReferencedList(exprList, isParenthesizedExpr) {
  43084. for (let i = 0; i < exprList.length; i++) {
  43085. var _expr$extra;
  43086. const expr = exprList[i];
  43087. if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  43088. this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);
  43089. }
  43090. }
  43091. return exprList;
  43092. }
  43093. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  43094. const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
  43095. if (canBePattern && !this.state.maybeInArrowParameters) {
  43096. this.toReferencedList(node.elements);
  43097. }
  43098. return node;
  43099. }
  43100. checkLVal(expr, ...args) {
  43101. if (expr.type !== "TypeCastExpression") {
  43102. return super.checkLVal(expr, ...args);
  43103. }
  43104. }
  43105. parseClassProperty(node) {
  43106. if (this.match(types$12.colon)) {
  43107. node.typeAnnotation = this.flowParseTypeAnnotation();
  43108. }
  43109. return super.parseClassProperty(node);
  43110. }
  43111. parseClassPrivateProperty(node) {
  43112. if (this.match(types$12.colon)) {
  43113. node.typeAnnotation = this.flowParseTypeAnnotation();
  43114. }
  43115. return super.parseClassPrivateProperty(node);
  43116. }
  43117. isClassMethod() {
  43118. return this.isRelational("<") || super.isClassMethod();
  43119. }
  43120. isClassProperty() {
  43121. return this.match(types$12.colon) || super.isClassProperty();
  43122. }
  43123. isNonstaticConstructor(method) {
  43124. return !this.match(types$12.colon) && super.isNonstaticConstructor(method);
  43125. }
  43126. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  43127. if (method.variance) {
  43128. this.unexpected(method.variance.start);
  43129. }
  43130. delete method.variance;
  43131. if (this.isRelational("<")) {
  43132. method.typeParameters = this.flowParseTypeParameterDeclaration();
  43133. }
  43134. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  43135. if (method.params && isConstructor) {
  43136. const params = method.params;
  43137. if (params.length > 0 && this.isThisParam(params[0])) {
  43138. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  43139. }
  43140. } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
  43141. const params = method.value.params;
  43142. if (params.length > 0 && this.isThisParam(params[0])) {
  43143. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  43144. }
  43145. }
  43146. }
  43147. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  43148. if (method.variance) {
  43149. this.unexpected(method.variance.start);
  43150. }
  43151. delete method.variance;
  43152. if (this.isRelational("<")) {
  43153. method.typeParameters = this.flowParseTypeParameterDeclaration();
  43154. }
  43155. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  43156. }
  43157. parseClassSuper(node) {
  43158. super.parseClassSuper(node);
  43159. if (node.superClass && this.isRelational("<")) {
  43160. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  43161. }
  43162. if (this.isContextual("implements")) {
  43163. this.next();
  43164. const implemented = node.implements = [];
  43165. do {
  43166. const node2 = this.startNode();
  43167. node2.id = this.flowParseRestrictedIdentifier(true);
  43168. if (this.isRelational("<")) {
  43169. node2.typeParameters = this.flowParseTypeParameterInstantiation();
  43170. } else {
  43171. node2.typeParameters = null;
  43172. }
  43173. implemented.push(this.finishNode(node2, "ClassImplements"));
  43174. } while (this.eat(types$12.comma));
  43175. }
  43176. }
  43177. checkGetterSetterParams(method) {
  43178. super.checkGetterSetterParams(method);
  43179. const params = this.getObjectOrClassMethodParams(method);
  43180. if (params.length > 0) {
  43181. const param = params[0];
  43182. if (this.isThisParam(param) && method.kind === "get") {
  43183. this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam);
  43184. } else if (this.isThisParam(param)) {
  43185. this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam);
  43186. }
  43187. }
  43188. }
  43189. parsePropertyName(node, isPrivateNameAllowed) {
  43190. const variance = this.flowParseVariance();
  43191. const key = super.parsePropertyName(node, isPrivateNameAllowed);
  43192. node.variance = variance;
  43193. return key;
  43194. }
  43195. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  43196. if (prop.variance) {
  43197. this.unexpected(prop.variance.start);
  43198. }
  43199. delete prop.variance;
  43200. let typeParameters;
  43201. if (this.isRelational("<") && !isAccessor) {
  43202. typeParameters = this.flowParseTypeParameterDeclaration();
  43203. if (!this.match(types$12.parenL))
  43204. this.unexpected();
  43205. }
  43206. super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  43207. if (typeParameters) {
  43208. (prop.value || prop).typeParameters = typeParameters;
  43209. }
  43210. }
  43211. parseAssignableListItemTypes(param) {
  43212. if (this.eat(types$12.question)) {
  43213. if (param.type !== "Identifier") {
  43214. this.raise(param.start, FlowErrors.OptionalBindingPattern);
  43215. }
  43216. if (this.isThisParam(param)) {
  43217. this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional);
  43218. }
  43219. param.optional = true;
  43220. }
  43221. if (this.match(types$12.colon)) {
  43222. param.typeAnnotation = this.flowParseTypeAnnotation();
  43223. } else if (this.isThisParam(param)) {
  43224. this.raise(param.start, FlowErrors.ThisParamAnnotationRequired);
  43225. }
  43226. if (this.match(types$12.eq) && this.isThisParam(param)) {
  43227. this.raise(param.start, FlowErrors.ThisParamNoDefault);
  43228. }
  43229. this.resetEndLocation(param);
  43230. return param;
  43231. }
  43232. parseMaybeDefault(startPos, startLoc, left) {
  43233. const node = super.parseMaybeDefault(startPos, startLoc, left);
  43234. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  43235. this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);
  43236. }
  43237. return node;
  43238. }
  43239. shouldParseDefaultImport(node) {
  43240. if (!hasTypeImportKind(node)) {
  43241. return super.shouldParseDefaultImport(node);
  43242. }
  43243. return isMaybeDefaultImport(this.state);
  43244. }
  43245. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  43246. specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  43247. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  43248. node.specifiers.push(this.finishNode(specifier, type));
  43249. }
  43250. maybeParseDefaultImportSpecifier(node) {
  43251. node.importKind = "value";
  43252. let kind = null;
  43253. if (this.match(types$12._typeof)) {
  43254. kind = "typeof";
  43255. } else if (this.isContextual("type")) {
  43256. kind = "type";
  43257. }
  43258. if (kind) {
  43259. const lh = this.lookahead();
  43260. if (kind === "type" && lh.type === types$12.star) {
  43261. this.unexpected(lh.start);
  43262. }
  43263. if (isMaybeDefaultImport(lh) || lh.type === types$12.braceL || lh.type === types$12.star) {
  43264. this.next();
  43265. node.importKind = kind;
  43266. }
  43267. }
  43268. return super.maybeParseDefaultImportSpecifier(node);
  43269. }
  43270. parseImportSpecifier(node) {
  43271. const specifier = this.startNode();
  43272. const firstIdentIsString = this.match(types$12.string);
  43273. const firstIdent = this.parseModuleExportName();
  43274. let specifierTypeKind = null;
  43275. if (firstIdent.type === "Identifier") {
  43276. if (firstIdent.name === "type") {
  43277. specifierTypeKind = "type";
  43278. } else if (firstIdent.name === "typeof") {
  43279. specifierTypeKind = "typeof";
  43280. }
  43281. }
  43282. let isBinding = false;
  43283. if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
  43284. const as_ident = this.parseIdentifier(true);
  43285. if (specifierTypeKind !== null && !this.match(types$12.name) && !this.state.type.keyword) {
  43286. specifier.imported = as_ident;
  43287. specifier.importKind = specifierTypeKind;
  43288. specifier.local = as_ident.__clone();
  43289. } else {
  43290. specifier.imported = firstIdent;
  43291. specifier.importKind = null;
  43292. specifier.local = this.parseIdentifier();
  43293. }
  43294. } else if (specifierTypeKind !== null && (this.match(types$12.name) || this.state.type.keyword)) {
  43295. specifier.imported = this.parseIdentifier(true);
  43296. specifier.importKind = specifierTypeKind;
  43297. if (this.eatContextual("as")) {
  43298. specifier.local = this.parseIdentifier();
  43299. } else {
  43300. isBinding = true;
  43301. specifier.local = specifier.imported.__clone();
  43302. }
  43303. } else {
  43304. if (firstIdentIsString) {
  43305. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value);
  43306. }
  43307. isBinding = true;
  43308. specifier.imported = firstIdent;
  43309. specifier.importKind = null;
  43310. specifier.local = specifier.imported.__clone();
  43311. }
  43312. const nodeIsTypeImport = hasTypeImportKind(node);
  43313. const specifierIsTypeImport = hasTypeImportKind(specifier);
  43314. if (nodeIsTypeImport && specifierIsTypeImport) {
  43315. this.raise(specifier.start, FlowErrors.ImportTypeShorthandOnlyInPureImport);
  43316. }
  43317. if (nodeIsTypeImport || specifierIsTypeImport) {
  43318. this.checkReservedType(specifier.local.name, specifier.local.start, true);
  43319. }
  43320. if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
  43321. this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  43322. }
  43323. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  43324. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  43325. }
  43326. parseBindingAtom() {
  43327. switch (this.state.type) {
  43328. case types$12._this:
  43329. return this.parseIdentifier(true);
  43330. default:
  43331. return super.parseBindingAtom();
  43332. }
  43333. }
  43334. parseFunctionParams(node, allowModifiers) {
  43335. const kind = node.kind;
  43336. if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
  43337. node.typeParameters = this.flowParseTypeParameterDeclaration();
  43338. }
  43339. super.parseFunctionParams(node, allowModifiers);
  43340. }
  43341. parseVarId(decl, kind) {
  43342. super.parseVarId(decl, kind);
  43343. if (this.match(types$12.colon)) {
  43344. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  43345. this.resetEndLocation(decl.id);
  43346. }
  43347. }
  43348. parseAsyncArrowFromCallExpression(node, call) {
  43349. if (this.match(types$12.colon)) {
  43350. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  43351. this.state.noAnonFunctionType = true;
  43352. node.returnType = this.flowParseTypeAnnotation();
  43353. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  43354. }
  43355. return super.parseAsyncArrowFromCallExpression(node, call);
  43356. }
  43357. shouldParseAsyncArrow() {
  43358. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  43359. }
  43360. parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  43361. var _jsx;
  43362. let state = null;
  43363. let jsx2;
  43364. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  43365. state = this.state.clone();
  43366. jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos), state);
  43367. if (!jsx2.error)
  43368. return jsx2.node;
  43369. const {
  43370. context
  43371. } = this.state;
  43372. if (context[context.length - 1] === types2.j_oTag) {
  43373. context.length -= 2;
  43374. } else if (context[context.length - 1] === types2.j_expr) {
  43375. context.length -= 1;
  43376. }
  43377. }
  43378. if ((_jsx = jsx2) != null && _jsx.error || this.isRelational("<")) {
  43379. var _jsx2, _jsx3;
  43380. state = state || this.state.clone();
  43381. let typeParameters;
  43382. const arrow = this.tryParse((abort) => {
  43383. var _arrowExpression$extr;
  43384. typeParameters = this.flowParseTypeParameterDeclaration();
  43385. const arrowExpression2 = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
  43386. const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
  43387. this.resetStartLocationFromNode(result, typeParameters);
  43388. return result;
  43389. });
  43390. if (arrowExpression2.type !== "ArrowFunctionExpression" && (_arrowExpression$extr = arrowExpression2.extra) != null && _arrowExpression$extr.parenthesized) {
  43391. abort();
  43392. }
  43393. const expr = this.maybeUnwrapTypeCastExpression(arrowExpression2);
  43394. expr.typeParameters = typeParameters;
  43395. this.resetStartLocationFromNode(expr, typeParameters);
  43396. return arrowExpression2;
  43397. }, state);
  43398. let arrowExpression = null;
  43399. if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
  43400. if (!arrow.error && !arrow.aborted) {
  43401. if (arrow.node.async) {
  43402. this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction);
  43403. }
  43404. return arrow.node;
  43405. }
  43406. arrowExpression = arrow.node;
  43407. }
  43408. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  43409. this.state = jsx2.failState;
  43410. return jsx2.node;
  43411. }
  43412. if (arrowExpression) {
  43413. this.state = arrow.failState;
  43414. return arrowExpression;
  43415. }
  43416. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  43417. throw jsx2.error;
  43418. if (arrow.thrown)
  43419. throw arrow.error;
  43420. throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter);
  43421. }
  43422. return super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
  43423. }
  43424. parseArrow(node) {
  43425. if (this.match(types$12.colon)) {
  43426. const result = this.tryParse(() => {
  43427. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  43428. this.state.noAnonFunctionType = true;
  43429. const typeNode = this.startNode();
  43430. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  43431. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  43432. if (this.canInsertSemicolon())
  43433. this.unexpected();
  43434. if (!this.match(types$12.arrow))
  43435. this.unexpected();
  43436. return typeNode;
  43437. });
  43438. if (result.thrown)
  43439. return null;
  43440. if (result.error)
  43441. this.state = result.failState;
  43442. node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  43443. }
  43444. return super.parseArrow(node);
  43445. }
  43446. shouldParseArrow() {
  43447. return this.match(types$12.colon) || super.shouldParseArrow();
  43448. }
  43449. setArrowFunctionParameters(node, params) {
  43450. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  43451. node.params = params;
  43452. } else {
  43453. super.setArrowFunctionParameters(node, params);
  43454. }
  43455. }
  43456. checkParams(node, allowDuplicates, isArrowFunction) {
  43457. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  43458. return;
  43459. }
  43460. for (let i = 0; i < node.params.length; i++) {
  43461. if (this.isThisParam(node.params[i]) && i > 0) {
  43462. this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst);
  43463. }
  43464. }
  43465. return super.checkParams(...arguments);
  43466. }
  43467. parseParenAndDistinguishExpression(canBeArrow) {
  43468. return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  43469. }
  43470. parseSubscripts(base2, startPos, startLoc, noCalls) {
  43471. if (base2.type === "Identifier" && base2.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
  43472. this.next();
  43473. const node = this.startNodeAt(startPos, startLoc);
  43474. node.callee = base2;
  43475. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  43476. base2 = this.finishNode(node, "CallExpression");
  43477. } else if (base2.type === "Identifier" && base2.name === "async" && this.isRelational("<")) {
  43478. const state = this.state.clone();
  43479. const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state);
  43480. if (!arrow.error && !arrow.aborted)
  43481. return arrow.node;
  43482. const result = this.tryParse(() => super.parseSubscripts(base2, startPos, startLoc, noCalls), state);
  43483. if (result.node && !result.error)
  43484. return result.node;
  43485. if (arrow.node) {
  43486. this.state = arrow.failState;
  43487. return arrow.node;
  43488. }
  43489. if (result.node) {
  43490. this.state = result.failState;
  43491. return result.node;
  43492. }
  43493. throw arrow.error || result.error;
  43494. }
  43495. return super.parseSubscripts(base2, startPos, startLoc, noCalls);
  43496. }
  43497. parseSubscript(base2, startPos, startLoc, noCalls, subscriptState) {
  43498. if (this.match(types$12.questionDot) && this.isLookaheadToken_lt()) {
  43499. subscriptState.optionalChainMember = true;
  43500. if (noCalls) {
  43501. subscriptState.stop = true;
  43502. return base2;
  43503. }
  43504. this.next();
  43505. const node = this.startNodeAt(startPos, startLoc);
  43506. node.callee = base2;
  43507. node.typeArguments = this.flowParseTypeParameterInstantiation();
  43508. this.expect(types$12.parenL);
  43509. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  43510. node.optional = true;
  43511. return this.finishCallExpression(node, true);
  43512. } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
  43513. const node = this.startNodeAt(startPos, startLoc);
  43514. node.callee = base2;
  43515. const result = this.tryParse(() => {
  43516. node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
  43517. this.expect(types$12.parenL);
  43518. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  43519. if (subscriptState.optionalChainMember)
  43520. node.optional = false;
  43521. return this.finishCallExpression(node, subscriptState.optionalChainMember);
  43522. });
  43523. if (result.node) {
  43524. if (result.error)
  43525. this.state = result.failState;
  43526. return result.node;
  43527. }
  43528. }
  43529. return super.parseSubscript(base2, startPos, startLoc, noCalls, subscriptState);
  43530. }
  43531. parseNewArguments(node) {
  43532. let targs = null;
  43533. if (this.shouldParseTypes() && this.isRelational("<")) {
  43534. targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
  43535. }
  43536. node.typeArguments = targs;
  43537. super.parseNewArguments(node);
  43538. }
  43539. parseAsyncArrowWithTypeParameters(startPos, startLoc) {
  43540. const node = this.startNodeAt(startPos, startLoc);
  43541. this.parseFunctionParams(node);
  43542. if (!this.parseArrow(node))
  43543. return;
  43544. return this.parseArrowExpression(node, void 0, true);
  43545. }
  43546. readToken_mult_modulo(code2) {
  43547. const next = this.input.charCodeAt(this.state.pos + 1);
  43548. if (code2 === 42 && next === 47 && this.state.hasFlowComment) {
  43549. this.state.hasFlowComment = false;
  43550. this.state.pos += 2;
  43551. this.nextToken();
  43552. return;
  43553. }
  43554. super.readToken_mult_modulo(code2);
  43555. }
  43556. readToken_pipe_amp(code2) {
  43557. const next = this.input.charCodeAt(this.state.pos + 1);
  43558. if (code2 === 124 && next === 125) {
  43559. this.finishOp(types$12.braceBarR, 2);
  43560. return;
  43561. }
  43562. super.readToken_pipe_amp(code2);
  43563. }
  43564. parseTopLevel(file, program) {
  43565. const fileNode = super.parseTopLevel(file, program);
  43566. if (this.state.hasFlowComment) {
  43567. this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);
  43568. }
  43569. return fileNode;
  43570. }
  43571. skipBlockComment() {
  43572. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  43573. if (this.state.hasFlowComment) {
  43574. this.unexpected(null, FlowErrors.NestedFlowComment);
  43575. }
  43576. this.hasFlowCommentCompletion();
  43577. this.state.pos += this.skipFlowComment();
  43578. this.state.hasFlowComment = true;
  43579. return;
  43580. }
  43581. if (this.state.hasFlowComment) {
  43582. const end = this.input.indexOf("*-/", this.state.pos += 2);
  43583. if (end === -1) {
  43584. throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment);
  43585. }
  43586. this.state.pos = end + 3;
  43587. return;
  43588. }
  43589. super.skipBlockComment();
  43590. }
  43591. skipFlowComment() {
  43592. const {
  43593. pos
  43594. } = this.state;
  43595. let shiftToFirstNonWhiteSpace = 2;
  43596. while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
  43597. shiftToFirstNonWhiteSpace++;
  43598. }
  43599. const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
  43600. const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
  43601. if (ch2 === 58 && ch3 === 58) {
  43602. return shiftToFirstNonWhiteSpace + 2;
  43603. }
  43604. if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
  43605. return shiftToFirstNonWhiteSpace + 12;
  43606. }
  43607. if (ch2 === 58 && ch3 !== 58) {
  43608. return shiftToFirstNonWhiteSpace;
  43609. }
  43610. return false;
  43611. }
  43612. hasFlowCommentCompletion() {
  43613. const end = this.input.indexOf("*/", this.state.pos);
  43614. if (end === -1) {
  43615. throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment);
  43616. }
  43617. }
  43618. flowEnumErrorBooleanMemberNotInitialized(pos, {
  43619. enumName,
  43620. memberName
  43621. }) {
  43622. this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName);
  43623. }
  43624. flowEnumErrorInvalidMemberName(pos, {
  43625. enumName,
  43626. memberName
  43627. }) {
  43628. const suggestion = memberName[0].toUpperCase() + memberName.slice(1);
  43629. this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName);
  43630. }
  43631. flowEnumErrorDuplicateMemberName(pos, {
  43632. enumName,
  43633. memberName
  43634. }) {
  43635. this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);
  43636. }
  43637. flowEnumErrorInconsistentMemberValues(pos, {
  43638. enumName
  43639. }) {
  43640. this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);
  43641. }
  43642. flowEnumErrorInvalidExplicitType(pos, {
  43643. enumName,
  43644. suppliedType
  43645. }) {
  43646. return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType);
  43647. }
  43648. flowEnumErrorInvalidMemberInitializer(pos, {
  43649. enumName,
  43650. explicitType,
  43651. memberName
  43652. }) {
  43653. let message = null;
  43654. switch (explicitType) {
  43655. case "boolean":
  43656. case "number":
  43657. case "string":
  43658. message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;
  43659. break;
  43660. case "symbol":
  43661. message = FlowErrors.EnumInvalidMemberInitializerSymbolType;
  43662. break;
  43663. default:
  43664. message = FlowErrors.EnumInvalidMemberInitializerUnknownType;
  43665. }
  43666. return this.raise(pos, message, enumName, memberName, explicitType);
  43667. }
  43668. flowEnumErrorNumberMemberNotInitialized(pos, {
  43669. enumName,
  43670. memberName
  43671. }) {
  43672. this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName);
  43673. }
  43674. flowEnumErrorStringMemberInconsistentlyInitailized(pos, {
  43675. enumName
  43676. }) {
  43677. this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName);
  43678. }
  43679. flowEnumMemberInit() {
  43680. const startPos = this.state.start;
  43681. const endOfInit = () => this.match(types$12.comma) || this.match(types$12.braceR);
  43682. switch (this.state.type) {
  43683. case types$12.num: {
  43684. const literal2 = this.parseNumericLiteral(this.state.value);
  43685. if (endOfInit()) {
  43686. return {
  43687. type: "number",
  43688. pos: literal2.start,
  43689. value: literal2
  43690. };
  43691. }
  43692. return {
  43693. type: "invalid",
  43694. pos: startPos
  43695. };
  43696. }
  43697. case types$12.string: {
  43698. const literal2 = this.parseStringLiteral(this.state.value);
  43699. if (endOfInit()) {
  43700. return {
  43701. type: "string",
  43702. pos: literal2.start,
  43703. value: literal2
  43704. };
  43705. }
  43706. return {
  43707. type: "invalid",
  43708. pos: startPos
  43709. };
  43710. }
  43711. case types$12._true:
  43712. case types$12._false: {
  43713. const literal2 = this.parseBooleanLiteral(this.match(types$12._true));
  43714. if (endOfInit()) {
  43715. return {
  43716. type: "boolean",
  43717. pos: literal2.start,
  43718. value: literal2
  43719. };
  43720. }
  43721. return {
  43722. type: "invalid",
  43723. pos: startPos
  43724. };
  43725. }
  43726. default:
  43727. return {
  43728. type: "invalid",
  43729. pos: startPos
  43730. };
  43731. }
  43732. }
  43733. flowEnumMemberRaw() {
  43734. const pos = this.state.start;
  43735. const id = this.parseIdentifier(true);
  43736. const init = this.eat(types$12.eq) ? this.flowEnumMemberInit() : {
  43737. type: "none",
  43738. pos
  43739. };
  43740. return {
  43741. id,
  43742. init
  43743. };
  43744. }
  43745. flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
  43746. const {
  43747. explicitType
  43748. } = context;
  43749. if (explicitType === null) {
  43750. return;
  43751. }
  43752. if (explicitType !== expectedType) {
  43753. this.flowEnumErrorInvalidMemberInitializer(pos, context);
  43754. }
  43755. }
  43756. flowEnumMembers({
  43757. enumName,
  43758. explicitType
  43759. }) {
  43760. const seenNames = /* @__PURE__ */ new Set();
  43761. const members = {
  43762. booleanMembers: [],
  43763. numberMembers: [],
  43764. stringMembers: [],
  43765. defaultedMembers: []
  43766. };
  43767. let hasUnknownMembers = false;
  43768. while (!this.match(types$12.braceR)) {
  43769. if (this.eat(types$12.ellipsis)) {
  43770. hasUnknownMembers = true;
  43771. break;
  43772. }
  43773. const memberNode = this.startNode();
  43774. const {
  43775. id,
  43776. init
  43777. } = this.flowEnumMemberRaw();
  43778. const memberName = id.name;
  43779. if (memberName === "") {
  43780. continue;
  43781. }
  43782. if (/^[a-z]/.test(memberName)) {
  43783. this.flowEnumErrorInvalidMemberName(id.start, {
  43784. enumName,
  43785. memberName
  43786. });
  43787. }
  43788. if (seenNames.has(memberName)) {
  43789. this.flowEnumErrorDuplicateMemberName(id.start, {
  43790. enumName,
  43791. memberName
  43792. });
  43793. }
  43794. seenNames.add(memberName);
  43795. const context = {
  43796. enumName,
  43797. explicitType,
  43798. memberName
  43799. };
  43800. memberNode.id = id;
  43801. switch (init.type) {
  43802. case "boolean": {
  43803. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
  43804. memberNode.init = init.value;
  43805. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  43806. break;
  43807. }
  43808. case "number": {
  43809. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
  43810. memberNode.init = init.value;
  43811. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  43812. break;
  43813. }
  43814. case "string": {
  43815. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
  43816. memberNode.init = init.value;
  43817. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  43818. break;
  43819. }
  43820. case "invalid": {
  43821. throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
  43822. }
  43823. case "none": {
  43824. switch (explicitType) {
  43825. case "boolean":
  43826. this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
  43827. break;
  43828. case "number":
  43829. this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
  43830. break;
  43831. default:
  43832. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  43833. }
  43834. }
  43835. }
  43836. if (!this.match(types$12.braceR)) {
  43837. this.expect(types$12.comma);
  43838. }
  43839. }
  43840. return {
  43841. members,
  43842. hasUnknownMembers
  43843. };
  43844. }
  43845. flowEnumStringMembers(initializedMembers, defaultedMembers, {
  43846. enumName
  43847. }) {
  43848. if (initializedMembers.length === 0) {
  43849. return defaultedMembers;
  43850. } else if (defaultedMembers.length === 0) {
  43851. return initializedMembers;
  43852. } else if (defaultedMembers.length > initializedMembers.length) {
  43853. for (const member of initializedMembers) {
  43854. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  43855. enumName
  43856. });
  43857. }
  43858. return defaultedMembers;
  43859. } else {
  43860. for (const member of defaultedMembers) {
  43861. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  43862. enumName
  43863. });
  43864. }
  43865. return initializedMembers;
  43866. }
  43867. }
  43868. flowEnumParseExplicitType({
  43869. enumName
  43870. }) {
  43871. if (this.eatContextual("of")) {
  43872. if (!this.match(types$12.name)) {
  43873. throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
  43874. enumName,
  43875. suppliedType: null
  43876. });
  43877. }
  43878. const {
  43879. value
  43880. } = this.state;
  43881. this.next();
  43882. if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
  43883. this.flowEnumErrorInvalidExplicitType(this.state.start, {
  43884. enumName,
  43885. suppliedType: value
  43886. });
  43887. }
  43888. return value;
  43889. }
  43890. return null;
  43891. }
  43892. flowEnumBody(node, {
  43893. enumName,
  43894. nameLoc
  43895. }) {
  43896. const explicitType = this.flowEnumParseExplicitType({
  43897. enumName
  43898. });
  43899. this.expect(types$12.braceL);
  43900. const {
  43901. members,
  43902. hasUnknownMembers
  43903. } = this.flowEnumMembers({
  43904. enumName,
  43905. explicitType
  43906. });
  43907. node.hasUnknownMembers = hasUnknownMembers;
  43908. switch (explicitType) {
  43909. case "boolean":
  43910. node.explicitType = true;
  43911. node.members = members.booleanMembers;
  43912. this.expect(types$12.braceR);
  43913. return this.finishNode(node, "EnumBooleanBody");
  43914. case "number":
  43915. node.explicitType = true;
  43916. node.members = members.numberMembers;
  43917. this.expect(types$12.braceR);
  43918. return this.finishNode(node, "EnumNumberBody");
  43919. case "string":
  43920. node.explicitType = true;
  43921. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  43922. enumName
  43923. });
  43924. this.expect(types$12.braceR);
  43925. return this.finishNode(node, "EnumStringBody");
  43926. case "symbol":
  43927. node.members = members.defaultedMembers;
  43928. this.expect(types$12.braceR);
  43929. return this.finishNode(node, "EnumSymbolBody");
  43930. default: {
  43931. const empty3 = () => {
  43932. node.members = [];
  43933. this.expect(types$12.braceR);
  43934. return this.finishNode(node, "EnumStringBody");
  43935. };
  43936. node.explicitType = false;
  43937. const boolsLen = members.booleanMembers.length;
  43938. const numsLen = members.numberMembers.length;
  43939. const strsLen = members.stringMembers.length;
  43940. const defaultedLen = members.defaultedMembers.length;
  43941. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  43942. return empty3();
  43943. } else if (!boolsLen && !numsLen) {
  43944. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  43945. enumName
  43946. });
  43947. this.expect(types$12.braceR);
  43948. return this.finishNode(node, "EnumStringBody");
  43949. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  43950. for (const member of members.defaultedMembers) {
  43951. this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
  43952. enumName,
  43953. memberName: member.id.name
  43954. });
  43955. }
  43956. node.members = members.booleanMembers;
  43957. this.expect(types$12.braceR);
  43958. return this.finishNode(node, "EnumBooleanBody");
  43959. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  43960. for (const member of members.defaultedMembers) {
  43961. this.flowEnumErrorNumberMemberNotInitialized(member.start, {
  43962. enumName,
  43963. memberName: member.id.name
  43964. });
  43965. }
  43966. node.members = members.numberMembers;
  43967. this.expect(types$12.braceR);
  43968. return this.finishNode(node, "EnumNumberBody");
  43969. } else {
  43970. this.flowEnumErrorInconsistentMemberValues(nameLoc, {
  43971. enumName
  43972. });
  43973. return empty3();
  43974. }
  43975. }
  43976. }
  43977. }
  43978. flowParseEnumDeclaration(node) {
  43979. const id = this.parseIdentifier();
  43980. node.id = id;
  43981. node.body = this.flowEnumBody(this.startNode(), {
  43982. enumName: id.name,
  43983. nameLoc: id.start
  43984. });
  43985. return this.finishNode(node, "EnumDeclaration");
  43986. }
  43987. updateContext(prevType) {
  43988. if (this.match(types$12.name) && this.state.value === "of" && prevType === types$12.name && this.input.slice(this.state.lastTokStart, this.state.lastTokEnd) === "interface") {
  43989. this.state.exprAllowed = false;
  43990. } else {
  43991. super.updateContext(prevType);
  43992. }
  43993. }
  43994. isLookaheadToken_lt() {
  43995. const next = this.nextTokenStart();
  43996. if (this.input.charCodeAt(next) === 60) {
  43997. const afterNext = this.input.charCodeAt(next + 1);
  43998. return afterNext !== 60 && afterNext !== 61;
  43999. }
  44000. return false;
  44001. }
  44002. maybeUnwrapTypeCastExpression(node) {
  44003. return node.type === "TypeCastExpression" ? node.expression : node;
  44004. }
  44005. };
  44006. var entities = {
  44007. quot: '"',
  44008. amp: "&",
  44009. apos: "'",
  44010. lt: "<",
  44011. gt: ">",
  44012. nbsp: "\xA0",
  44013. iexcl: "\xA1",
  44014. cent: "\xA2",
  44015. pound: "\xA3",
  44016. curren: "\xA4",
  44017. yen: "\xA5",
  44018. brvbar: "\xA6",
  44019. sect: "\xA7",
  44020. uml: "\xA8",
  44021. copy: "\xA9",
  44022. ordf: "\xAA",
  44023. laquo: "\xAB",
  44024. not: "\xAC",
  44025. shy: "\xAD",
  44026. reg: "\xAE",
  44027. macr: "\xAF",
  44028. deg: "\xB0",
  44029. plusmn: "\xB1",
  44030. sup2: "\xB2",
  44031. sup3: "\xB3",
  44032. acute: "\xB4",
  44033. micro: "\xB5",
  44034. para: "\xB6",
  44035. middot: "\xB7",
  44036. cedil: "\xB8",
  44037. sup1: "\xB9",
  44038. ordm: "\xBA",
  44039. raquo: "\xBB",
  44040. frac14: "\xBC",
  44041. frac12: "\xBD",
  44042. frac34: "\xBE",
  44043. iquest: "\xBF",
  44044. Agrave: "\xC0",
  44045. Aacute: "\xC1",
  44046. Acirc: "\xC2",
  44047. Atilde: "\xC3",
  44048. Auml: "\xC4",
  44049. Aring: "\xC5",
  44050. AElig: "\xC6",
  44051. Ccedil: "\xC7",
  44052. Egrave: "\xC8",
  44053. Eacute: "\xC9",
  44054. Ecirc: "\xCA",
  44055. Euml: "\xCB",
  44056. Igrave: "\xCC",
  44057. Iacute: "\xCD",
  44058. Icirc: "\xCE",
  44059. Iuml: "\xCF",
  44060. ETH: "\xD0",
  44061. Ntilde: "\xD1",
  44062. Ograve: "\xD2",
  44063. Oacute: "\xD3",
  44064. Ocirc: "\xD4",
  44065. Otilde: "\xD5",
  44066. Ouml: "\xD6",
  44067. times: "\xD7",
  44068. Oslash: "\xD8",
  44069. Ugrave: "\xD9",
  44070. Uacute: "\xDA",
  44071. Ucirc: "\xDB",
  44072. Uuml: "\xDC",
  44073. Yacute: "\xDD",
  44074. THORN: "\xDE",
  44075. szlig: "\xDF",
  44076. agrave: "\xE0",
  44077. aacute: "\xE1",
  44078. acirc: "\xE2",
  44079. atilde: "\xE3",
  44080. auml: "\xE4",
  44081. aring: "\xE5",
  44082. aelig: "\xE6",
  44083. ccedil: "\xE7",
  44084. egrave: "\xE8",
  44085. eacute: "\xE9",
  44086. ecirc: "\xEA",
  44087. euml: "\xEB",
  44088. igrave: "\xEC",
  44089. iacute: "\xED",
  44090. icirc: "\xEE",
  44091. iuml: "\xEF",
  44092. eth: "\xF0",
  44093. ntilde: "\xF1",
  44094. ograve: "\xF2",
  44095. oacute: "\xF3",
  44096. ocirc: "\xF4",
  44097. otilde: "\xF5",
  44098. ouml: "\xF6",
  44099. divide: "\xF7",
  44100. oslash: "\xF8",
  44101. ugrave: "\xF9",
  44102. uacute: "\xFA",
  44103. ucirc: "\xFB",
  44104. uuml: "\xFC",
  44105. yacute: "\xFD",
  44106. thorn: "\xFE",
  44107. yuml: "\xFF",
  44108. OElig: "\u0152",
  44109. oelig: "\u0153",
  44110. Scaron: "\u0160",
  44111. scaron: "\u0161",
  44112. Yuml: "\u0178",
  44113. fnof: "\u0192",
  44114. circ: "\u02C6",
  44115. tilde: "\u02DC",
  44116. Alpha: "\u0391",
  44117. Beta: "\u0392",
  44118. Gamma: "\u0393",
  44119. Delta: "\u0394",
  44120. Epsilon: "\u0395",
  44121. Zeta: "\u0396",
  44122. Eta: "\u0397",
  44123. Theta: "\u0398",
  44124. Iota: "\u0399",
  44125. Kappa: "\u039A",
  44126. Lambda: "\u039B",
  44127. Mu: "\u039C",
  44128. Nu: "\u039D",
  44129. Xi: "\u039E",
  44130. Omicron: "\u039F",
  44131. Pi: "\u03A0",
  44132. Rho: "\u03A1",
  44133. Sigma: "\u03A3",
  44134. Tau: "\u03A4",
  44135. Upsilon: "\u03A5",
  44136. Phi: "\u03A6",
  44137. Chi: "\u03A7",
  44138. Psi: "\u03A8",
  44139. Omega: "\u03A9",
  44140. alpha: "\u03B1",
  44141. beta: "\u03B2",
  44142. gamma: "\u03B3",
  44143. delta: "\u03B4",
  44144. epsilon: "\u03B5",
  44145. zeta: "\u03B6",
  44146. eta: "\u03B7",
  44147. theta: "\u03B8",
  44148. iota: "\u03B9",
  44149. kappa: "\u03BA",
  44150. lambda: "\u03BB",
  44151. mu: "\u03BC",
  44152. nu: "\u03BD",
  44153. xi: "\u03BE",
  44154. omicron: "\u03BF",
  44155. pi: "\u03C0",
  44156. rho: "\u03C1",
  44157. sigmaf: "\u03C2",
  44158. sigma: "\u03C3",
  44159. tau: "\u03C4",
  44160. upsilon: "\u03C5",
  44161. phi: "\u03C6",
  44162. chi: "\u03C7",
  44163. psi: "\u03C8",
  44164. omega: "\u03C9",
  44165. thetasym: "\u03D1",
  44166. upsih: "\u03D2",
  44167. piv: "\u03D6",
  44168. ensp: "\u2002",
  44169. emsp: "\u2003",
  44170. thinsp: "\u2009",
  44171. zwnj: "\u200C",
  44172. zwj: "\u200D",
  44173. lrm: "\u200E",
  44174. rlm: "\u200F",
  44175. ndash: "\u2013",
  44176. mdash: "\u2014",
  44177. lsquo: "\u2018",
  44178. rsquo: "\u2019",
  44179. sbquo: "\u201A",
  44180. ldquo: "\u201C",
  44181. rdquo: "\u201D",
  44182. bdquo: "\u201E",
  44183. dagger: "\u2020",
  44184. Dagger: "\u2021",
  44185. bull: "\u2022",
  44186. hellip: "\u2026",
  44187. permil: "\u2030",
  44188. prime: "\u2032",
  44189. Prime: "\u2033",
  44190. lsaquo: "\u2039",
  44191. rsaquo: "\u203A",
  44192. oline: "\u203E",
  44193. frasl: "\u2044",
  44194. euro: "\u20AC",
  44195. image: "\u2111",
  44196. weierp: "\u2118",
  44197. real: "\u211C",
  44198. trade: "\u2122",
  44199. alefsym: "\u2135",
  44200. larr: "\u2190",
  44201. uarr: "\u2191",
  44202. rarr: "\u2192",
  44203. darr: "\u2193",
  44204. harr: "\u2194",
  44205. crarr: "\u21B5",
  44206. lArr: "\u21D0",
  44207. uArr: "\u21D1",
  44208. rArr: "\u21D2",
  44209. dArr: "\u21D3",
  44210. hArr: "\u21D4",
  44211. forall: "\u2200",
  44212. part: "\u2202",
  44213. exist: "\u2203",
  44214. empty: "\u2205",
  44215. nabla: "\u2207",
  44216. isin: "\u2208",
  44217. notin: "\u2209",
  44218. ni: "\u220B",
  44219. prod: "\u220F",
  44220. sum: "\u2211",
  44221. minus: "\u2212",
  44222. lowast: "\u2217",
  44223. radic: "\u221A",
  44224. prop: "\u221D",
  44225. infin: "\u221E",
  44226. ang: "\u2220",
  44227. and: "\u2227",
  44228. or: "\u2228",
  44229. cap: "\u2229",
  44230. cup: "\u222A",
  44231. int: "\u222B",
  44232. there4: "\u2234",
  44233. sim: "\u223C",
  44234. cong: "\u2245",
  44235. asymp: "\u2248",
  44236. ne: "\u2260",
  44237. equiv: "\u2261",
  44238. le: "\u2264",
  44239. ge: "\u2265",
  44240. sub: "\u2282",
  44241. sup: "\u2283",
  44242. nsub: "\u2284",
  44243. sube: "\u2286",
  44244. supe: "\u2287",
  44245. oplus: "\u2295",
  44246. otimes: "\u2297",
  44247. perp: "\u22A5",
  44248. sdot: "\u22C5",
  44249. lceil: "\u2308",
  44250. rceil: "\u2309",
  44251. lfloor: "\u230A",
  44252. rfloor: "\u230B",
  44253. lang: "\u2329",
  44254. rang: "\u232A",
  44255. loz: "\u25CA",
  44256. spades: "\u2660",
  44257. clubs: "\u2663",
  44258. hearts: "\u2665",
  44259. diams: "\u2666"
  44260. };
  44261. var State2 = class {
  44262. constructor() {
  44263. this.strict = void 0;
  44264. this.curLine = void 0;
  44265. this.startLoc = void 0;
  44266. this.endLoc = void 0;
  44267. this.errors = [];
  44268. this.potentialArrowAt = -1;
  44269. this.noArrowAt = [];
  44270. this.noArrowParamsConversionAt = [];
  44271. this.maybeInArrowParameters = false;
  44272. this.inPipeline = false;
  44273. this.inType = false;
  44274. this.noAnonFunctionType = false;
  44275. this.inPropertyName = false;
  44276. this.hasFlowComment = false;
  44277. this.isAmbientContext = false;
  44278. this.inAbstractClass = false;
  44279. this.topicContext = {
  44280. maxNumOfResolvableTopics: 0,
  44281. maxTopicIndex: null
  44282. };
  44283. this.soloAwait = false;
  44284. this.inFSharpPipelineDirectBody = false;
  44285. this.labels = [];
  44286. this.decoratorStack = [[]];
  44287. this.comments = [];
  44288. this.trailingComments = [];
  44289. this.leadingComments = [];
  44290. this.commentStack = [];
  44291. this.commentPreviousNode = null;
  44292. this.pos = 0;
  44293. this.lineStart = 0;
  44294. this.type = types$12.eof;
  44295. this.value = null;
  44296. this.start = 0;
  44297. this.end = 0;
  44298. this.lastTokEndLoc = null;
  44299. this.lastTokStartLoc = null;
  44300. this.lastTokStart = 0;
  44301. this.lastTokEnd = 0;
  44302. this.context = [types2.braceStatement];
  44303. this.exprAllowed = true;
  44304. this.containsEsc = false;
  44305. this.strictErrors = /* @__PURE__ */ new Map();
  44306. this.exportedIdentifiers = [];
  44307. this.tokensLength = 0;
  44308. }
  44309. init(options) {
  44310. this.strict = options.strictMode === false ? false : options.sourceType === "module";
  44311. this.curLine = options.startLine;
  44312. this.startLoc = this.endLoc = this.curPosition();
  44313. }
  44314. curPosition() {
  44315. return new Position3(this.curLine, this.pos - this.lineStart);
  44316. }
  44317. clone(skipArrays) {
  44318. const state = new State2();
  44319. const keys2 = Object.keys(this);
  44320. for (let i = 0, length = keys2.length; i < length; i++) {
  44321. const key = keys2[i];
  44322. let val = this[key];
  44323. if (!skipArrays && Array.isArray(val)) {
  44324. val = val.slice();
  44325. }
  44326. state[key] = val;
  44327. }
  44328. return state;
  44329. }
  44330. };
  44331. var HEX_NUMBER = /^[\da-fA-F]+$/;
  44332. var DECIMAL_NUMBER = /^\d+$/;
  44333. var JsxErrors = makeErrorTemplates({
  44334. AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
  44335. MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.",
  44336. MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
  44337. UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
  44338. UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
  44339. UnterminatedJsxContent: "Unterminated JSX contents.",
  44340. UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
  44341. }, ErrorCodes.SyntaxError);
  44342. types2.j_oTag = new TokContext3("<tag", false);
  44343. types2.j_cTag = new TokContext3("</tag", false);
  44344. types2.j_expr = new TokContext3("<tag>...</tag>", true, true);
  44345. types$12.jsxName = new TokenType3("jsxName");
  44346. types$12.jsxText = new TokenType3("jsxText", {
  44347. beforeExpr: true
  44348. });
  44349. types$12.jsxTagStart = new TokenType3("jsxTagStart", {
  44350. startsExpr: true
  44351. });
  44352. types$12.jsxTagEnd = new TokenType3("jsxTagEnd");
  44353. types$12.jsxTagStart.updateContext = function() {
  44354. this.state.context.push(types2.j_expr);
  44355. this.state.context.push(types2.j_oTag);
  44356. this.state.exprAllowed = false;
  44357. };
  44358. types$12.jsxTagEnd.updateContext = function(prevType) {
  44359. const out = this.state.context.pop();
  44360. if (out === types2.j_oTag && prevType === types$12.slash || out === types2.j_cTag) {
  44361. this.state.context.pop();
  44362. this.state.exprAllowed = this.curContext() === types2.j_expr;
  44363. } else {
  44364. this.state.exprAllowed = true;
  44365. }
  44366. };
  44367. function isFragment(object) {
  44368. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  44369. }
  44370. function getQualifiedJSXName(object) {
  44371. if (object.type === "JSXIdentifier") {
  44372. return object.name;
  44373. }
  44374. if (object.type === "JSXNamespacedName") {
  44375. return object.namespace.name + ":" + object.name.name;
  44376. }
  44377. if (object.type === "JSXMemberExpression") {
  44378. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  44379. }
  44380. throw new Error("Node had unexpected type: " + object.type);
  44381. }
  44382. var jsx = (superClass) => class extends superClass {
  44383. jsxReadToken() {
  44384. let out = "";
  44385. let chunkStart = this.state.pos;
  44386. for (; ; ) {
  44387. if (this.state.pos >= this.length) {
  44388. throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);
  44389. }
  44390. const ch = this.input.charCodeAt(this.state.pos);
  44391. switch (ch) {
  44392. case 60:
  44393. case 123:
  44394. if (this.state.pos === this.state.start) {
  44395. if (ch === 60 && this.state.exprAllowed) {
  44396. ++this.state.pos;
  44397. return this.finishToken(types$12.jsxTagStart);
  44398. }
  44399. return super.getTokenFromCode(ch);
  44400. }
  44401. out += this.input.slice(chunkStart, this.state.pos);
  44402. return this.finishToken(types$12.jsxText, out);
  44403. case 38:
  44404. out += this.input.slice(chunkStart, this.state.pos);
  44405. out += this.jsxReadEntity();
  44406. chunkStart = this.state.pos;
  44407. break;
  44408. case 62:
  44409. case 125:
  44410. default:
  44411. if (isNewLine2(ch)) {
  44412. out += this.input.slice(chunkStart, this.state.pos);
  44413. out += this.jsxReadNewLine(true);
  44414. chunkStart = this.state.pos;
  44415. } else {
  44416. ++this.state.pos;
  44417. }
  44418. }
  44419. }
  44420. }
  44421. jsxReadNewLine(normalizeCRLF) {
  44422. const ch = this.input.charCodeAt(this.state.pos);
  44423. let out;
  44424. ++this.state.pos;
  44425. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  44426. ++this.state.pos;
  44427. out = normalizeCRLF ? "\n" : "\r\n";
  44428. } else {
  44429. out = String.fromCharCode(ch);
  44430. }
  44431. ++this.state.curLine;
  44432. this.state.lineStart = this.state.pos;
  44433. return out;
  44434. }
  44435. jsxReadString(quote) {
  44436. let out = "";
  44437. let chunkStart = ++this.state.pos;
  44438. for (; ; ) {
  44439. if (this.state.pos >= this.length) {
  44440. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  44441. }
  44442. const ch = this.input.charCodeAt(this.state.pos);
  44443. if (ch === quote)
  44444. break;
  44445. if (ch === 38) {
  44446. out += this.input.slice(chunkStart, this.state.pos);
  44447. out += this.jsxReadEntity();
  44448. chunkStart = this.state.pos;
  44449. } else if (isNewLine2(ch)) {
  44450. out += this.input.slice(chunkStart, this.state.pos);
  44451. out += this.jsxReadNewLine(false);
  44452. chunkStart = this.state.pos;
  44453. } else {
  44454. ++this.state.pos;
  44455. }
  44456. }
  44457. out += this.input.slice(chunkStart, this.state.pos++);
  44458. return this.finishToken(types$12.string, out);
  44459. }
  44460. jsxReadEntity() {
  44461. let str = "";
  44462. let count = 0;
  44463. let entity;
  44464. let ch = this.input[this.state.pos];
  44465. const startPos = ++this.state.pos;
  44466. while (this.state.pos < this.length && count++ < 10) {
  44467. ch = this.input[this.state.pos++];
  44468. if (ch === ";") {
  44469. if (str[0] === "#") {
  44470. if (str[1] === "x") {
  44471. str = str.substr(2);
  44472. if (HEX_NUMBER.test(str)) {
  44473. entity = String.fromCodePoint(parseInt(str, 16));
  44474. }
  44475. } else {
  44476. str = str.substr(1);
  44477. if (DECIMAL_NUMBER.test(str)) {
  44478. entity = String.fromCodePoint(parseInt(str, 10));
  44479. }
  44480. }
  44481. } else {
  44482. entity = entities[str];
  44483. }
  44484. break;
  44485. }
  44486. str += ch;
  44487. }
  44488. if (!entity) {
  44489. this.state.pos = startPos;
  44490. return "&";
  44491. }
  44492. return entity;
  44493. }
  44494. jsxReadWord() {
  44495. let ch;
  44496. const start3 = this.state.pos;
  44497. do {
  44498. ch = this.input.charCodeAt(++this.state.pos);
  44499. } while (isIdentifierChar2(ch) || ch === 45);
  44500. return this.finishToken(types$12.jsxName, this.input.slice(start3, this.state.pos));
  44501. }
  44502. jsxParseIdentifier() {
  44503. const node = this.startNode();
  44504. if (this.match(types$12.jsxName)) {
  44505. node.name = this.state.value;
  44506. } else if (this.state.type.keyword) {
  44507. node.name = this.state.type.keyword;
  44508. } else {
  44509. this.unexpected();
  44510. }
  44511. this.next();
  44512. return this.finishNode(node, "JSXIdentifier");
  44513. }
  44514. jsxParseNamespacedName() {
  44515. const startPos = this.state.start;
  44516. const startLoc = this.state.startLoc;
  44517. const name2 = this.jsxParseIdentifier();
  44518. if (!this.eat(types$12.colon))
  44519. return name2;
  44520. const node = this.startNodeAt(startPos, startLoc);
  44521. node.namespace = name2;
  44522. node.name = this.jsxParseIdentifier();
  44523. return this.finishNode(node, "JSXNamespacedName");
  44524. }
  44525. jsxParseElementName() {
  44526. const startPos = this.state.start;
  44527. const startLoc = this.state.startLoc;
  44528. let node = this.jsxParseNamespacedName();
  44529. if (node.type === "JSXNamespacedName") {
  44530. return node;
  44531. }
  44532. while (this.eat(types$12.dot)) {
  44533. const newNode = this.startNodeAt(startPos, startLoc);
  44534. newNode.object = node;
  44535. newNode.property = this.jsxParseIdentifier();
  44536. node = this.finishNode(newNode, "JSXMemberExpression");
  44537. }
  44538. return node;
  44539. }
  44540. jsxParseAttributeValue() {
  44541. let node;
  44542. switch (this.state.type) {
  44543. case types$12.braceL:
  44544. node = this.startNode();
  44545. this.next();
  44546. node = this.jsxParseExpressionContainer(node);
  44547. if (node.expression.type === "JSXEmptyExpression") {
  44548. this.raise(node.start, JsxErrors.AttributeIsEmpty);
  44549. }
  44550. return node;
  44551. case types$12.jsxTagStart:
  44552. case types$12.string:
  44553. return this.parseExprAtom();
  44554. default:
  44555. throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);
  44556. }
  44557. }
  44558. jsxParseEmptyExpression() {
  44559. const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  44560. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  44561. }
  44562. jsxParseSpreadChild(node) {
  44563. this.next();
  44564. node.expression = this.parseExpression();
  44565. this.expect(types$12.braceR);
  44566. return this.finishNode(node, "JSXSpreadChild");
  44567. }
  44568. jsxParseExpressionContainer(node) {
  44569. if (this.match(types$12.braceR)) {
  44570. node.expression = this.jsxParseEmptyExpression();
  44571. } else {
  44572. const expression = this.parseExpression();
  44573. node.expression = expression;
  44574. }
  44575. this.expect(types$12.braceR);
  44576. return this.finishNode(node, "JSXExpressionContainer");
  44577. }
  44578. jsxParseAttribute() {
  44579. const node = this.startNode();
  44580. if (this.eat(types$12.braceL)) {
  44581. this.expect(types$12.ellipsis);
  44582. node.argument = this.parseMaybeAssignAllowIn();
  44583. this.expect(types$12.braceR);
  44584. return this.finishNode(node, "JSXSpreadAttribute");
  44585. }
  44586. node.name = this.jsxParseNamespacedName();
  44587. node.value = this.eat(types$12.eq) ? this.jsxParseAttributeValue() : null;
  44588. return this.finishNode(node, "JSXAttribute");
  44589. }
  44590. jsxParseOpeningElementAt(startPos, startLoc) {
  44591. const node = this.startNodeAt(startPos, startLoc);
  44592. if (this.match(types$12.jsxTagEnd)) {
  44593. this.expect(types$12.jsxTagEnd);
  44594. return this.finishNode(node, "JSXOpeningFragment");
  44595. }
  44596. node.name = this.jsxParseElementName();
  44597. return this.jsxParseOpeningElementAfterName(node);
  44598. }
  44599. jsxParseOpeningElementAfterName(node) {
  44600. const attributes = [];
  44601. while (!this.match(types$12.slash) && !this.match(types$12.jsxTagEnd)) {
  44602. attributes.push(this.jsxParseAttribute());
  44603. }
  44604. node.attributes = attributes;
  44605. node.selfClosing = this.eat(types$12.slash);
  44606. this.expect(types$12.jsxTagEnd);
  44607. return this.finishNode(node, "JSXOpeningElement");
  44608. }
  44609. jsxParseClosingElementAt(startPos, startLoc) {
  44610. const node = this.startNodeAt(startPos, startLoc);
  44611. if (this.match(types$12.jsxTagEnd)) {
  44612. this.expect(types$12.jsxTagEnd);
  44613. return this.finishNode(node, "JSXClosingFragment");
  44614. }
  44615. node.name = this.jsxParseElementName();
  44616. this.expect(types$12.jsxTagEnd);
  44617. return this.finishNode(node, "JSXClosingElement");
  44618. }
  44619. jsxParseElementAt(startPos, startLoc) {
  44620. const node = this.startNodeAt(startPos, startLoc);
  44621. const children = [];
  44622. const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  44623. let closingElement = null;
  44624. if (!openingElement.selfClosing) {
  44625. contents:
  44626. for (; ; ) {
  44627. switch (this.state.type) {
  44628. case types$12.jsxTagStart:
  44629. startPos = this.state.start;
  44630. startLoc = this.state.startLoc;
  44631. this.next();
  44632. if (this.eat(types$12.slash)) {
  44633. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  44634. break contents;
  44635. }
  44636. children.push(this.jsxParseElementAt(startPos, startLoc));
  44637. break;
  44638. case types$12.jsxText:
  44639. children.push(this.parseExprAtom());
  44640. break;
  44641. case types$12.braceL: {
  44642. const node2 = this.startNode();
  44643. this.next();
  44644. if (this.match(types$12.ellipsis)) {
  44645. children.push(this.jsxParseSpreadChild(node2));
  44646. } else {
  44647. children.push(this.jsxParseExpressionContainer(node2));
  44648. }
  44649. break;
  44650. }
  44651. default:
  44652. throw this.unexpected();
  44653. }
  44654. }
  44655. if (isFragment(openingElement) && !isFragment(closingElement)) {
  44656. this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment);
  44657. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  44658. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  44659. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  44660. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  44661. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  44662. }
  44663. }
  44664. }
  44665. if (isFragment(openingElement)) {
  44666. node.openingFragment = openingElement;
  44667. node.closingFragment = closingElement;
  44668. } else {
  44669. node.openingElement = openingElement;
  44670. node.closingElement = closingElement;
  44671. }
  44672. node.children = children;
  44673. if (this.isRelational("<")) {
  44674. throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements);
  44675. }
  44676. return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
  44677. }
  44678. jsxParseElement() {
  44679. const startPos = this.state.start;
  44680. const startLoc = this.state.startLoc;
  44681. this.next();
  44682. return this.jsxParseElementAt(startPos, startLoc);
  44683. }
  44684. parseExprAtom(refExpressionErrors) {
  44685. if (this.match(types$12.jsxText)) {
  44686. return this.parseLiteral(this.state.value, "JSXText");
  44687. } else if (this.match(types$12.jsxTagStart)) {
  44688. return this.jsxParseElement();
  44689. } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
  44690. this.finishToken(types$12.jsxTagStart);
  44691. return this.jsxParseElement();
  44692. } else {
  44693. return super.parseExprAtom(refExpressionErrors);
  44694. }
  44695. }
  44696. createLookaheadState(state) {
  44697. const lookaheadState = super.createLookaheadState(state);
  44698. lookaheadState.inPropertyName = state.inPropertyName;
  44699. return lookaheadState;
  44700. }
  44701. getTokenFromCode(code2) {
  44702. if (this.state.inPropertyName)
  44703. return super.getTokenFromCode(code2);
  44704. const context = this.curContext();
  44705. if (context === types2.j_expr) {
  44706. return this.jsxReadToken();
  44707. }
  44708. if (context === types2.j_oTag || context === types2.j_cTag) {
  44709. if (isIdentifierStart2(code2)) {
  44710. return this.jsxReadWord();
  44711. }
  44712. if (code2 === 62) {
  44713. ++this.state.pos;
  44714. return this.finishToken(types$12.jsxTagEnd);
  44715. }
  44716. if ((code2 === 34 || code2 === 39) && context === types2.j_oTag) {
  44717. return this.jsxReadString(code2);
  44718. }
  44719. }
  44720. if (code2 === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  44721. ++this.state.pos;
  44722. return this.finishToken(types$12.jsxTagStart);
  44723. }
  44724. return super.getTokenFromCode(code2);
  44725. }
  44726. updateContext(prevType) {
  44727. if (this.match(types$12.braceL)) {
  44728. const curContext = this.curContext();
  44729. if (curContext === types2.j_oTag) {
  44730. this.state.context.push(types2.braceExpression);
  44731. } else if (curContext === types2.j_expr) {
  44732. this.state.context.push(types2.templateQuasi);
  44733. } else {
  44734. super.updateContext(prevType);
  44735. }
  44736. this.state.exprAllowed = true;
  44737. } else if (this.match(types$12.slash) && prevType === types$12.jsxTagStart) {
  44738. this.state.context.length -= 2;
  44739. this.state.context.push(types2.j_cTag);
  44740. this.state.exprAllowed = false;
  44741. } else {
  44742. return super.updateContext(prevType);
  44743. }
  44744. }
  44745. };
  44746. var TypeScriptScope = class extends Scope4 {
  44747. constructor(...args) {
  44748. super(...args);
  44749. this.types = [];
  44750. this.enums = [];
  44751. this.constEnums = [];
  44752. this.classes = [];
  44753. this.exportOnlyBindings = [];
  44754. }
  44755. };
  44756. var TypeScriptScopeHandler = class extends ScopeHandler {
  44757. createScope(flags) {
  44758. return new TypeScriptScope(flags);
  44759. }
  44760. declareName(name2, bindingType, pos) {
  44761. const scope = this.currentScope();
  44762. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  44763. this.maybeExportDefined(scope, name2);
  44764. scope.exportOnlyBindings.push(name2);
  44765. return;
  44766. }
  44767. super.declareName(...arguments);
  44768. if (bindingType & BIND_KIND_TYPE) {
  44769. if (!(bindingType & BIND_KIND_VALUE)) {
  44770. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  44771. this.maybeExportDefined(scope, name2);
  44772. }
  44773. scope.types.push(name2);
  44774. }
  44775. if (bindingType & BIND_FLAGS_TS_ENUM)
  44776. scope.enums.push(name2);
  44777. if (bindingType & BIND_FLAGS_TS_CONST_ENUM)
  44778. scope.constEnums.push(name2);
  44779. if (bindingType & BIND_FLAGS_CLASS)
  44780. scope.classes.push(name2);
  44781. }
  44782. isRedeclaredInScope(scope, name2, bindingType) {
  44783. if (scope.enums.indexOf(name2) > -1) {
  44784. if (bindingType & BIND_FLAGS_TS_ENUM) {
  44785. const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  44786. const wasConst = scope.constEnums.indexOf(name2) > -1;
  44787. return isConst !== wasConst;
  44788. }
  44789. return true;
  44790. }
  44791. if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name2) > -1) {
  44792. if (scope.lexical.indexOf(name2) > -1) {
  44793. return !!(bindingType & BIND_KIND_VALUE);
  44794. } else {
  44795. return false;
  44796. }
  44797. }
  44798. if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name2) > -1) {
  44799. return true;
  44800. }
  44801. return super.isRedeclaredInScope(...arguments);
  44802. }
  44803. checkLocalExport(id) {
  44804. if (this.scopeStack[0].types.indexOf(id.name) === -1 && this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1) {
  44805. super.checkLocalExport(id);
  44806. }
  44807. }
  44808. };
  44809. var PARAM = 0;
  44810. var PARAM_YIELD = 1;
  44811. var PARAM_AWAIT = 2;
  44812. var PARAM_RETURN = 4;
  44813. var PARAM_IN = 8;
  44814. var ProductionParameterHandler = class {
  44815. constructor() {
  44816. this.stacks = [];
  44817. }
  44818. enter(flags) {
  44819. this.stacks.push(flags);
  44820. }
  44821. exit() {
  44822. this.stacks.pop();
  44823. }
  44824. currentFlags() {
  44825. return this.stacks[this.stacks.length - 1];
  44826. }
  44827. get hasAwait() {
  44828. return (this.currentFlags() & PARAM_AWAIT) > 0;
  44829. }
  44830. get hasYield() {
  44831. return (this.currentFlags() & PARAM_YIELD) > 0;
  44832. }
  44833. get hasReturn() {
  44834. return (this.currentFlags() & PARAM_RETURN) > 0;
  44835. }
  44836. get hasIn() {
  44837. return (this.currentFlags() & PARAM_IN) > 0;
  44838. }
  44839. };
  44840. function functionFlags2(isAsync, isGenerator) {
  44841. return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
  44842. }
  44843. function nonNull(x) {
  44844. if (x == null) {
  44845. throw new Error(`Unexpected ${x} value.`);
  44846. }
  44847. return x;
  44848. }
  44849. function assert(x) {
  44850. if (!x) {
  44851. throw new Error("Assert fail");
  44852. }
  44853. }
  44854. var TSErrors = makeErrorTemplates({
  44855. AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.",
  44856. AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
  44857. AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
  44858. ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
  44859. ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
  44860. ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
  44861. DeclareAccessor: "'declare' is not allowed in %0ters.",
  44862. DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
  44863. DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
  44864. DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
  44865. DuplicateModifier: "Duplicate modifier: '%0'.",
  44866. EmptyHeritageClauseType: "'%0' list cannot be empty.",
  44867. EmptyTypeArguments: "Type argument list cannot be empty.",
  44868. EmptyTypeParameters: "Type parameter list cannot be empty.",
  44869. ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
  44870. ImportAliasHasImportType: "An import alias can not use 'import type'.",
  44871. IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
  44872. IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
  44873. IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').",
  44874. IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
  44875. IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
  44876. IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
  44877. InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.",
  44878. InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
  44879. InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
  44880. MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
  44881. NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
  44882. NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
  44883. OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
  44884. OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
  44885. PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
  44886. PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
  44887. PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').",
  44888. ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
  44889. SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
  44890. SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
  44891. SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
  44892. StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
  44893. TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  44894. TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
  44895. UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
  44896. UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
  44897. UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
  44898. UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
  44899. UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
  44900. UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
  44901. UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."
  44902. }, ErrorCodes.SyntaxError);
  44903. function keywordTypeFromName(value) {
  44904. switch (value) {
  44905. case "any":
  44906. return "TSAnyKeyword";
  44907. case "boolean":
  44908. return "TSBooleanKeyword";
  44909. case "bigint":
  44910. return "TSBigIntKeyword";
  44911. case "never":
  44912. return "TSNeverKeyword";
  44913. case "number":
  44914. return "TSNumberKeyword";
  44915. case "object":
  44916. return "TSObjectKeyword";
  44917. case "string":
  44918. return "TSStringKeyword";
  44919. case "symbol":
  44920. return "TSSymbolKeyword";
  44921. case "undefined":
  44922. return "TSUndefinedKeyword";
  44923. case "unknown":
  44924. return "TSUnknownKeyword";
  44925. default:
  44926. return void 0;
  44927. }
  44928. }
  44929. function tsIsAccessModifier(modifier) {
  44930. return modifier === "private" || modifier === "public" || modifier === "protected";
  44931. }
  44932. var typescript = (superClass) => class extends superClass {
  44933. getScopeHandler() {
  44934. return TypeScriptScopeHandler;
  44935. }
  44936. tsIsIdentifier() {
  44937. return this.match(types$12.name);
  44938. }
  44939. tsTokenCanFollowModifier() {
  44940. return (this.match(types$12.bracketL) || this.match(types$12.braceL) || this.match(types$12.star) || this.match(types$12.ellipsis) || this.match(types$12.privateName) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
  44941. }
  44942. tsNextTokenCanFollowModifier() {
  44943. this.next();
  44944. return this.tsTokenCanFollowModifier();
  44945. }
  44946. tsParseModifier(allowedModifiers) {
  44947. if (!this.match(types$12.name)) {
  44948. return void 0;
  44949. }
  44950. const modifier = this.state.value;
  44951. if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  44952. return modifier;
  44953. }
  44954. return void 0;
  44955. }
  44956. tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate) {
  44957. const enforceOrder = (pos, modifier, before, after) => {
  44958. if (modifier === before && modified[after]) {
  44959. this.raise(pos, TSErrors.InvalidModifiersOrder, before, after);
  44960. }
  44961. };
  44962. const incompatible = (pos, modifier, mod1, mod2) => {
  44963. if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
  44964. this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2);
  44965. }
  44966. };
  44967. for (; ; ) {
  44968. const startPos = this.state.start;
  44969. const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []));
  44970. if (!modifier)
  44971. break;
  44972. if (tsIsAccessModifier(modifier)) {
  44973. if (modified.accessibility) {
  44974. this.raise(startPos, TSErrors.DuplicateAccessibilityModifier);
  44975. } else {
  44976. enforceOrder(startPos, modifier, modifier, "override");
  44977. enforceOrder(startPos, modifier, modifier, "static");
  44978. modified.accessibility = modifier;
  44979. }
  44980. } else {
  44981. if (Object.hasOwnProperty.call(modified, modifier)) {
  44982. this.raise(startPos, TSErrors.DuplicateModifier, modifier);
  44983. } else {
  44984. enforceOrder(startPos, modifier, "static", "readonly");
  44985. enforceOrder(startPos, modifier, "static", "override");
  44986. enforceOrder(startPos, modifier, "override", "readonly");
  44987. enforceOrder(startPos, modifier, "abstract", "override");
  44988. incompatible(startPos, modifier, "declare", "override");
  44989. incompatible(startPos, modifier, "static", "abstract");
  44990. }
  44991. modified[modifier] = true;
  44992. }
  44993. if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
  44994. this.raise(startPos, errorTemplate, modifier);
  44995. }
  44996. }
  44997. }
  44998. tsIsListTerminator(kind) {
  44999. switch (kind) {
  45000. case "EnumMembers":
  45001. case "TypeMembers":
  45002. return this.match(types$12.braceR);
  45003. case "HeritageClauseElement":
  45004. return this.match(types$12.braceL);
  45005. case "TupleElementTypes":
  45006. return this.match(types$12.bracketR);
  45007. case "TypeParametersOrArguments":
  45008. return this.isRelational(">");
  45009. }
  45010. throw new Error("Unreachable");
  45011. }
  45012. tsParseList(kind, parseElement) {
  45013. const result = [];
  45014. while (!this.tsIsListTerminator(kind)) {
  45015. result.push(parseElement());
  45016. }
  45017. return result;
  45018. }
  45019. tsParseDelimitedList(kind, parseElement) {
  45020. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
  45021. }
  45022. tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
  45023. const result = [];
  45024. for (; ; ) {
  45025. if (this.tsIsListTerminator(kind)) {
  45026. break;
  45027. }
  45028. const element2 = parseElement();
  45029. if (element2 == null) {
  45030. return void 0;
  45031. }
  45032. result.push(element2);
  45033. if (this.eat(types$12.comma)) {
  45034. continue;
  45035. }
  45036. if (this.tsIsListTerminator(kind)) {
  45037. break;
  45038. }
  45039. if (expectSuccess) {
  45040. this.expect(types$12.comma);
  45041. }
  45042. return void 0;
  45043. }
  45044. return result;
  45045. }
  45046. tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
  45047. if (!skipFirstToken) {
  45048. if (bracket) {
  45049. this.expect(types$12.bracketL);
  45050. } else {
  45051. this.expectRelational("<");
  45052. }
  45053. }
  45054. const result = this.tsParseDelimitedList(kind, parseElement);
  45055. if (bracket) {
  45056. this.expect(types$12.bracketR);
  45057. } else {
  45058. this.expectRelational(">");
  45059. }
  45060. return result;
  45061. }
  45062. tsParseImportType() {
  45063. const node = this.startNode();
  45064. this.expect(types$12._import);
  45065. this.expect(types$12.parenL);
  45066. if (!this.match(types$12.string)) {
  45067. this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);
  45068. }
  45069. node.argument = this.parseExprAtom();
  45070. this.expect(types$12.parenR);
  45071. if (this.eat(types$12.dot)) {
  45072. node.qualifier = this.tsParseEntityName(true);
  45073. }
  45074. if (this.isRelational("<")) {
  45075. node.typeParameters = this.tsParseTypeArguments();
  45076. }
  45077. return this.finishNode(node, "TSImportType");
  45078. }
  45079. tsParseEntityName(allowReservedWords) {
  45080. let entity = this.parseIdentifier();
  45081. while (this.eat(types$12.dot)) {
  45082. const node = this.startNodeAtNode(entity);
  45083. node.left = entity;
  45084. node.right = this.parseIdentifier(allowReservedWords);
  45085. entity = this.finishNode(node, "TSQualifiedName");
  45086. }
  45087. return entity;
  45088. }
  45089. tsParseTypeReference() {
  45090. const node = this.startNode();
  45091. node.typeName = this.tsParseEntityName(false);
  45092. if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
  45093. node.typeParameters = this.tsParseTypeArguments();
  45094. }
  45095. return this.finishNode(node, "TSTypeReference");
  45096. }
  45097. tsParseThisTypePredicate(lhs) {
  45098. this.next();
  45099. const node = this.startNodeAtNode(lhs);
  45100. node.parameterName = lhs;
  45101. node.typeAnnotation = this.tsParseTypeAnnotation(false);
  45102. node.asserts = false;
  45103. return this.finishNode(node, "TSTypePredicate");
  45104. }
  45105. tsParseThisTypeNode() {
  45106. const node = this.startNode();
  45107. this.next();
  45108. return this.finishNode(node, "TSThisType");
  45109. }
  45110. tsParseTypeQuery() {
  45111. const node = this.startNode();
  45112. this.expect(types$12._typeof);
  45113. if (this.match(types$12._import)) {
  45114. node.exprName = this.tsParseImportType();
  45115. } else {
  45116. node.exprName = this.tsParseEntityName(true);
  45117. }
  45118. return this.finishNode(node, "TSTypeQuery");
  45119. }
  45120. tsParseTypeParameter() {
  45121. const node = this.startNode();
  45122. node.name = this.parseIdentifierName(node.start);
  45123. node.constraint = this.tsEatThenParseType(types$12._extends);
  45124. node.default = this.tsEatThenParseType(types$12.eq);
  45125. return this.finishNode(node, "TSTypeParameter");
  45126. }
  45127. tsTryParseTypeParameters() {
  45128. if (this.isRelational("<")) {
  45129. return this.tsParseTypeParameters();
  45130. }
  45131. }
  45132. tsParseTypeParameters() {
  45133. const node = this.startNode();
  45134. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  45135. this.next();
  45136. } else {
  45137. this.unexpected();
  45138. }
  45139. node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
  45140. if (node.params.length === 0) {
  45141. this.raise(node.start, TSErrors.EmptyTypeParameters);
  45142. }
  45143. return this.finishNode(node, "TSTypeParameterDeclaration");
  45144. }
  45145. tsTryNextParseConstantContext() {
  45146. if (this.lookahead().type === types$12._const) {
  45147. this.next();
  45148. return this.tsParseTypeReference();
  45149. }
  45150. return null;
  45151. }
  45152. tsFillSignature(returnToken, signature) {
  45153. const returnTokenRequired = returnToken === types$12.arrow;
  45154. signature.typeParameters = this.tsTryParseTypeParameters();
  45155. this.expect(types$12.parenL);
  45156. signature.parameters = this.tsParseBindingListForSignature();
  45157. if (returnTokenRequired) {
  45158. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  45159. } else if (this.match(returnToken)) {
  45160. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  45161. }
  45162. }
  45163. tsParseBindingListForSignature() {
  45164. return this.parseBindingList(types$12.parenR, 41).map((pattern) => {
  45165. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  45166. this.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type);
  45167. }
  45168. return pattern;
  45169. });
  45170. }
  45171. tsParseTypeMemberSemicolon() {
  45172. if (!this.eat(types$12.comma) && !this.isLineTerminator()) {
  45173. this.expect(types$12.semi);
  45174. }
  45175. }
  45176. tsParseSignatureMember(kind, node) {
  45177. this.tsFillSignature(types$12.colon, node);
  45178. this.tsParseTypeMemberSemicolon();
  45179. return this.finishNode(node, kind);
  45180. }
  45181. tsIsUnambiguouslyIndexSignature() {
  45182. this.next();
  45183. return this.eat(types$12.name) && this.match(types$12.colon);
  45184. }
  45185. tsTryParseIndexSignature(node) {
  45186. if (!(this.match(types$12.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  45187. return void 0;
  45188. }
  45189. this.expect(types$12.bracketL);
  45190. const id = this.parseIdentifier();
  45191. id.typeAnnotation = this.tsParseTypeAnnotation();
  45192. this.resetEndLocation(id);
  45193. this.expect(types$12.bracketR);
  45194. node.parameters = [id];
  45195. const type = this.tsTryParseTypeAnnotation();
  45196. if (type)
  45197. node.typeAnnotation = type;
  45198. this.tsParseTypeMemberSemicolon();
  45199. return this.finishNode(node, "TSIndexSignature");
  45200. }
  45201. tsParsePropertyOrMethodSignature(node, readonly) {
  45202. if (this.eat(types$12.question))
  45203. node.optional = true;
  45204. const nodeAny = node;
  45205. if (this.match(types$12.parenL) || this.isRelational("<")) {
  45206. if (readonly) {
  45207. this.raise(node.start, TSErrors.ReadonlyForMethodSignature);
  45208. }
  45209. const method = nodeAny;
  45210. if (method.kind && this.isRelational("<")) {
  45211. this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters);
  45212. }
  45213. this.tsFillSignature(types$12.colon, method);
  45214. this.tsParseTypeMemberSemicolon();
  45215. if (method.kind === "get") {
  45216. if (method.parameters.length > 0) {
  45217. this.raise(this.state.pos, ErrorMessages.BadGetterArity);
  45218. if (this.isThisParam(method.parameters[0])) {
  45219. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  45220. }
  45221. }
  45222. } else if (method.kind === "set") {
  45223. if (method.parameters.length !== 1) {
  45224. this.raise(this.state.pos, ErrorMessages.BadSetterArity);
  45225. } else {
  45226. const firstParameter = method.parameters[0];
  45227. if (this.isThisParam(firstParameter)) {
  45228. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  45229. }
  45230. if (firstParameter.type === "Identifier" && firstParameter.optional) {
  45231. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveOptionalParameter);
  45232. }
  45233. if (firstParameter.type === "RestElement") {
  45234. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveRestParameter);
  45235. }
  45236. }
  45237. if (method.typeAnnotation) {
  45238. this.raise(method.typeAnnotation.start, TSErrors.SetAccesorCannotHaveReturnType);
  45239. }
  45240. } else {
  45241. method.kind = "method";
  45242. }
  45243. return this.finishNode(method, "TSMethodSignature");
  45244. } else {
  45245. const property = nodeAny;
  45246. if (readonly)
  45247. property.readonly = true;
  45248. const type = this.tsTryParseTypeAnnotation();
  45249. if (type)
  45250. property.typeAnnotation = type;
  45251. this.tsParseTypeMemberSemicolon();
  45252. return this.finishNode(property, "TSPropertySignature");
  45253. }
  45254. }
  45255. tsParseTypeMember() {
  45256. const node = this.startNode();
  45257. if (this.match(types$12.parenL) || this.isRelational("<")) {
  45258. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
  45259. }
  45260. if (this.match(types$12._new)) {
  45261. const id = this.startNode();
  45262. this.next();
  45263. if (this.match(types$12.parenL) || this.isRelational("<")) {
  45264. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
  45265. } else {
  45266. node.key = this.createIdentifier(id, "new");
  45267. return this.tsParsePropertyOrMethodSignature(node, false);
  45268. }
  45269. }
  45270. this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember);
  45271. const idx = this.tsTryParseIndexSignature(node);
  45272. if (idx) {
  45273. return idx;
  45274. }
  45275. this.parsePropertyName(node, false);
  45276. if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) {
  45277. node.kind = node.key.name;
  45278. this.parsePropertyName(node, false);
  45279. }
  45280. return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);
  45281. }
  45282. tsParseTypeLiteral() {
  45283. const node = this.startNode();
  45284. node.members = this.tsParseObjectTypeMembers();
  45285. return this.finishNode(node, "TSTypeLiteral");
  45286. }
  45287. tsParseObjectTypeMembers() {
  45288. this.expect(types$12.braceL);
  45289. const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  45290. this.expect(types$12.braceR);
  45291. return members;
  45292. }
  45293. tsIsStartOfMappedType() {
  45294. this.next();
  45295. if (this.eat(types$12.plusMin)) {
  45296. return this.isContextual("readonly");
  45297. }
  45298. if (this.isContextual("readonly")) {
  45299. this.next();
  45300. }
  45301. if (!this.match(types$12.bracketL)) {
  45302. return false;
  45303. }
  45304. this.next();
  45305. if (!this.tsIsIdentifier()) {
  45306. return false;
  45307. }
  45308. this.next();
  45309. return this.match(types$12._in);
  45310. }
  45311. tsParseMappedTypeParameter() {
  45312. const node = this.startNode();
  45313. node.name = this.parseIdentifierName(node.start);
  45314. node.constraint = this.tsExpectThenParseType(types$12._in);
  45315. return this.finishNode(node, "TSTypeParameter");
  45316. }
  45317. tsParseMappedType() {
  45318. const node = this.startNode();
  45319. this.expect(types$12.braceL);
  45320. if (this.match(types$12.plusMin)) {
  45321. node.readonly = this.state.value;
  45322. this.next();
  45323. this.expectContextual("readonly");
  45324. } else if (this.eatContextual("readonly")) {
  45325. node.readonly = true;
  45326. }
  45327. this.expect(types$12.bracketL);
  45328. node.typeParameter = this.tsParseMappedTypeParameter();
  45329. node.nameType = this.eatContextual("as") ? this.tsParseType() : null;
  45330. this.expect(types$12.bracketR);
  45331. if (this.match(types$12.plusMin)) {
  45332. node.optional = this.state.value;
  45333. this.next();
  45334. this.expect(types$12.question);
  45335. } else if (this.eat(types$12.question)) {
  45336. node.optional = true;
  45337. }
  45338. node.typeAnnotation = this.tsTryParseType();
  45339. this.semicolon();
  45340. this.expect(types$12.braceR);
  45341. return this.finishNode(node, "TSMappedType");
  45342. }
  45343. tsParseTupleType() {
  45344. const node = this.startNode();
  45345. node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  45346. let seenOptionalElement = false;
  45347. let labeledElements = null;
  45348. node.elementTypes.forEach((elementNode) => {
  45349. var _labeledElements;
  45350. let {
  45351. type
  45352. } = elementNode;
  45353. if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
  45354. this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);
  45355. }
  45356. seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
  45357. if (type === "TSRestType") {
  45358. elementNode = elementNode.typeAnnotation;
  45359. type = elementNode.type;
  45360. }
  45361. const isLabeled = type === "TSNamedTupleMember";
  45362. labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
  45363. if (labeledElements !== isLabeled) {
  45364. this.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements);
  45365. }
  45366. });
  45367. return this.finishNode(node, "TSTupleType");
  45368. }
  45369. tsParseTupleElementType() {
  45370. const {
  45371. start: startPos,
  45372. startLoc
  45373. } = this.state;
  45374. const rest = this.eat(types$12.ellipsis);
  45375. let type = this.tsParseType();
  45376. const optional = this.eat(types$12.question);
  45377. const labeled = this.eat(types$12.colon);
  45378. if (labeled) {
  45379. const labeledNode = this.startNodeAtNode(type);
  45380. labeledNode.optional = optional;
  45381. if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
  45382. labeledNode.label = type.typeName;
  45383. } else {
  45384. this.raise(type.start, TSErrors.InvalidTupleMemberLabel);
  45385. labeledNode.label = type;
  45386. }
  45387. labeledNode.elementType = this.tsParseType();
  45388. type = this.finishNode(labeledNode, "TSNamedTupleMember");
  45389. } else if (optional) {
  45390. const optionalTypeNode = this.startNodeAtNode(type);
  45391. optionalTypeNode.typeAnnotation = type;
  45392. type = this.finishNode(optionalTypeNode, "TSOptionalType");
  45393. }
  45394. if (rest) {
  45395. const restNode = this.startNodeAt(startPos, startLoc);
  45396. restNode.typeAnnotation = type;
  45397. type = this.finishNode(restNode, "TSRestType");
  45398. }
  45399. return type;
  45400. }
  45401. tsParseParenthesizedType() {
  45402. const node = this.startNode();
  45403. this.expect(types$12.parenL);
  45404. node.typeAnnotation = this.tsParseType();
  45405. this.expect(types$12.parenR);
  45406. return this.finishNode(node, "TSParenthesizedType");
  45407. }
  45408. tsParseFunctionOrConstructorType(type, abstract) {
  45409. const node = this.startNode();
  45410. if (type === "TSConstructorType") {
  45411. node.abstract = !!abstract;
  45412. if (abstract)
  45413. this.next();
  45414. this.next();
  45415. }
  45416. this.tsFillSignature(types$12.arrow, node);
  45417. return this.finishNode(node, type);
  45418. }
  45419. tsParseLiteralTypeNode() {
  45420. const node = this.startNode();
  45421. node.literal = (() => {
  45422. switch (this.state.type) {
  45423. case types$12.num:
  45424. case types$12.bigint:
  45425. case types$12.string:
  45426. case types$12._true:
  45427. case types$12._false:
  45428. return this.parseExprAtom();
  45429. default:
  45430. throw this.unexpected();
  45431. }
  45432. })();
  45433. return this.finishNode(node, "TSLiteralType");
  45434. }
  45435. tsParseTemplateLiteralType() {
  45436. const node = this.startNode();
  45437. node.literal = this.parseTemplate(false);
  45438. return this.finishNode(node, "TSLiteralType");
  45439. }
  45440. parseTemplateSubstitution() {
  45441. if (this.state.inType)
  45442. return this.tsParseType();
  45443. return super.parseTemplateSubstitution();
  45444. }
  45445. tsParseThisTypeOrThisTypePredicate() {
  45446. const thisKeyword = this.tsParseThisTypeNode();
  45447. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  45448. return this.tsParseThisTypePredicate(thisKeyword);
  45449. } else {
  45450. return thisKeyword;
  45451. }
  45452. }
  45453. tsParseNonArrayType() {
  45454. switch (this.state.type) {
  45455. case types$12.name:
  45456. case types$12._void:
  45457. case types$12._null: {
  45458. const type = this.match(types$12._void) ? "TSVoidKeyword" : this.match(types$12._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  45459. if (type !== void 0 && this.lookaheadCharCode() !== 46) {
  45460. const node = this.startNode();
  45461. this.next();
  45462. return this.finishNode(node, type);
  45463. }
  45464. return this.tsParseTypeReference();
  45465. }
  45466. case types$12.string:
  45467. case types$12.num:
  45468. case types$12.bigint:
  45469. case types$12._true:
  45470. case types$12._false:
  45471. return this.tsParseLiteralTypeNode();
  45472. case types$12.plusMin:
  45473. if (this.state.value === "-") {
  45474. const node = this.startNode();
  45475. const nextToken = this.lookahead();
  45476. if (nextToken.type !== types$12.num && nextToken.type !== types$12.bigint) {
  45477. throw this.unexpected();
  45478. }
  45479. node.literal = this.parseMaybeUnary();
  45480. return this.finishNode(node, "TSLiteralType");
  45481. }
  45482. break;
  45483. case types$12._this:
  45484. return this.tsParseThisTypeOrThisTypePredicate();
  45485. case types$12._typeof:
  45486. return this.tsParseTypeQuery();
  45487. case types$12._import:
  45488. return this.tsParseImportType();
  45489. case types$12.braceL:
  45490. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  45491. case types$12.bracketL:
  45492. return this.tsParseTupleType();
  45493. case types$12.parenL:
  45494. return this.tsParseParenthesizedType();
  45495. case types$12.backQuote:
  45496. return this.tsParseTemplateLiteralType();
  45497. }
  45498. throw this.unexpected();
  45499. }
  45500. tsParseArrayTypeOrHigher() {
  45501. let type = this.tsParseNonArrayType();
  45502. while (!this.hasPrecedingLineBreak() && this.eat(types$12.bracketL)) {
  45503. if (this.match(types$12.bracketR)) {
  45504. const node = this.startNodeAtNode(type);
  45505. node.elementType = type;
  45506. this.expect(types$12.bracketR);
  45507. type = this.finishNode(node, "TSArrayType");
  45508. } else {
  45509. const node = this.startNodeAtNode(type);
  45510. node.objectType = type;
  45511. node.indexType = this.tsParseType();
  45512. this.expect(types$12.bracketR);
  45513. type = this.finishNode(node, "TSIndexedAccessType");
  45514. }
  45515. }
  45516. return type;
  45517. }
  45518. tsParseTypeOperator(operator) {
  45519. const node = this.startNode();
  45520. this.expectContextual(operator);
  45521. node.operator = operator;
  45522. node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  45523. if (operator === "readonly") {
  45524. this.tsCheckTypeAnnotationForReadOnly(node);
  45525. }
  45526. return this.finishNode(node, "TSTypeOperator");
  45527. }
  45528. tsCheckTypeAnnotationForReadOnly(node) {
  45529. switch (node.typeAnnotation.type) {
  45530. case "TSTupleType":
  45531. case "TSArrayType":
  45532. return;
  45533. default:
  45534. this.raise(node.start, TSErrors.UnexpectedReadonly);
  45535. }
  45536. }
  45537. tsParseInferType() {
  45538. const node = this.startNode();
  45539. this.expectContextual("infer");
  45540. const typeParameter = this.startNode();
  45541. typeParameter.name = this.parseIdentifierName(typeParameter.start);
  45542. node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  45543. return this.finishNode(node, "TSInferType");
  45544. }
  45545. tsParseTypeOperatorOrHigher() {
  45546. const operator = ["keyof", "unique", "readonly"].find((kw2) => this.isContextual(kw2));
  45547. return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
  45548. }
  45549. tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  45550. const node = this.startNode();
  45551. const hasLeadingOperator = this.eat(operator);
  45552. const types3 = [];
  45553. do {
  45554. types3.push(parseConstituentType());
  45555. } while (this.eat(operator));
  45556. if (types3.length === 1 && !hasLeadingOperator) {
  45557. return types3[0];
  45558. }
  45559. node.types = types3;
  45560. return this.finishNode(node, kind);
  45561. }
  45562. tsParseIntersectionTypeOrHigher() {
  45563. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types$12.bitwiseAND);
  45564. }
  45565. tsParseUnionTypeOrHigher() {
  45566. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types$12.bitwiseOR);
  45567. }
  45568. tsIsStartOfFunctionType() {
  45569. if (this.isRelational("<")) {
  45570. return true;
  45571. }
  45572. return this.match(types$12.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  45573. }
  45574. tsSkipParameterStart() {
  45575. if (this.match(types$12.name) || this.match(types$12._this)) {
  45576. this.next();
  45577. return true;
  45578. }
  45579. if (this.match(types$12.braceL)) {
  45580. let braceStackCounter = 1;
  45581. this.next();
  45582. while (braceStackCounter > 0) {
  45583. if (this.match(types$12.braceL)) {
  45584. ++braceStackCounter;
  45585. } else if (this.match(types$12.braceR)) {
  45586. --braceStackCounter;
  45587. }
  45588. this.next();
  45589. }
  45590. return true;
  45591. }
  45592. if (this.match(types$12.bracketL)) {
  45593. let braceStackCounter = 1;
  45594. this.next();
  45595. while (braceStackCounter > 0) {
  45596. if (this.match(types$12.bracketL)) {
  45597. ++braceStackCounter;
  45598. } else if (this.match(types$12.bracketR)) {
  45599. --braceStackCounter;
  45600. }
  45601. this.next();
  45602. }
  45603. return true;
  45604. }
  45605. return false;
  45606. }
  45607. tsIsUnambiguouslyStartOfFunctionType() {
  45608. this.next();
  45609. if (this.match(types$12.parenR) || this.match(types$12.ellipsis)) {
  45610. return true;
  45611. }
  45612. if (this.tsSkipParameterStart()) {
  45613. if (this.match(types$12.colon) || this.match(types$12.comma) || this.match(types$12.question) || this.match(types$12.eq)) {
  45614. return true;
  45615. }
  45616. if (this.match(types$12.parenR)) {
  45617. this.next();
  45618. if (this.match(types$12.arrow)) {
  45619. return true;
  45620. }
  45621. }
  45622. }
  45623. return false;
  45624. }
  45625. tsParseTypeOrTypePredicateAnnotation(returnToken) {
  45626. return this.tsInType(() => {
  45627. const t2 = this.startNode();
  45628. this.expect(returnToken);
  45629. const node = this.startNode();
  45630. const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
  45631. if (asserts && this.match(types$12._this)) {
  45632. let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
  45633. if (thisTypePredicate.type === "TSThisType") {
  45634. node.parameterName = thisTypePredicate;
  45635. node.asserts = true;
  45636. node.typeAnnotation = null;
  45637. thisTypePredicate = this.finishNode(node, "TSTypePredicate");
  45638. } else {
  45639. this.resetStartLocationFromNode(thisTypePredicate, node);
  45640. thisTypePredicate.asserts = true;
  45641. }
  45642. t2.typeAnnotation = thisTypePredicate;
  45643. return this.finishNode(t2, "TSTypeAnnotation");
  45644. }
  45645. const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
  45646. if (!typePredicateVariable) {
  45647. if (!asserts) {
  45648. return this.tsParseTypeAnnotation(false, t2);
  45649. }
  45650. node.parameterName = this.parseIdentifier();
  45651. node.asserts = asserts;
  45652. node.typeAnnotation = null;
  45653. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  45654. return this.finishNode(t2, "TSTypeAnnotation");
  45655. }
  45656. const type = this.tsParseTypeAnnotation(false);
  45657. node.parameterName = typePredicateVariable;
  45658. node.typeAnnotation = type;
  45659. node.asserts = asserts;
  45660. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  45661. return this.finishNode(t2, "TSTypeAnnotation");
  45662. });
  45663. }
  45664. tsTryParseTypeOrTypePredicateAnnotation() {
  45665. return this.match(types$12.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types$12.colon) : void 0;
  45666. }
  45667. tsTryParseTypeAnnotation() {
  45668. return this.match(types$12.colon) ? this.tsParseTypeAnnotation() : void 0;
  45669. }
  45670. tsTryParseType() {
  45671. return this.tsEatThenParseType(types$12.colon);
  45672. }
  45673. tsParseTypePredicatePrefix() {
  45674. const id = this.parseIdentifier();
  45675. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  45676. this.next();
  45677. return id;
  45678. }
  45679. }
  45680. tsParseTypePredicateAsserts() {
  45681. if (!this.match(types$12.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
  45682. return false;
  45683. }
  45684. const containsEsc = this.state.containsEsc;
  45685. this.next();
  45686. if (!this.match(types$12.name) && !this.match(types$12._this)) {
  45687. return false;
  45688. }
  45689. if (containsEsc) {
  45690. this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts");
  45691. }
  45692. return true;
  45693. }
  45694. tsParseTypeAnnotation(eatColon = true, t2 = this.startNode()) {
  45695. this.tsInType(() => {
  45696. if (eatColon)
  45697. this.expect(types$12.colon);
  45698. t2.typeAnnotation = this.tsParseType();
  45699. });
  45700. return this.finishNode(t2, "TSTypeAnnotation");
  45701. }
  45702. tsParseType() {
  45703. assert(this.state.inType);
  45704. const type = this.tsParseNonConditionalType();
  45705. if (this.hasPrecedingLineBreak() || !this.eat(types$12._extends)) {
  45706. return type;
  45707. }
  45708. const node = this.startNodeAtNode(type);
  45709. node.checkType = type;
  45710. node.extendsType = this.tsParseNonConditionalType();
  45711. this.expect(types$12.question);
  45712. node.trueType = this.tsParseType();
  45713. this.expect(types$12.colon);
  45714. node.falseType = this.tsParseType();
  45715. return this.finishNode(node, "TSConditionalType");
  45716. }
  45717. isAbstractConstructorSignature() {
  45718. return this.isContextual("abstract") && this.lookahead().type === types$12._new;
  45719. }
  45720. tsParseNonConditionalType() {
  45721. if (this.tsIsStartOfFunctionType()) {
  45722. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  45723. }
  45724. if (this.match(types$12._new)) {
  45725. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  45726. } else if (this.isAbstractConstructorSignature()) {
  45727. return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
  45728. }
  45729. return this.tsParseUnionTypeOrHigher();
  45730. }
  45731. tsParseTypeAssertion() {
  45732. const node = this.startNode();
  45733. const _const = this.tsTryNextParseConstantContext();
  45734. node.typeAnnotation = _const || this.tsNextThenParseType();
  45735. this.expectRelational(">");
  45736. node.expression = this.parseMaybeUnary();
  45737. return this.finishNode(node, "TSTypeAssertion");
  45738. }
  45739. tsParseHeritageClause(descriptor) {
  45740. const originalStart = this.state.start;
  45741. const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
  45742. if (!delimitedList.length) {
  45743. this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);
  45744. }
  45745. return delimitedList;
  45746. }
  45747. tsParseExpressionWithTypeArguments() {
  45748. const node = this.startNode();
  45749. node.expression = this.tsParseEntityName(false);
  45750. if (this.isRelational("<")) {
  45751. node.typeParameters = this.tsParseTypeArguments();
  45752. }
  45753. return this.finishNode(node, "TSExpressionWithTypeArguments");
  45754. }
  45755. tsParseInterfaceDeclaration(node) {
  45756. node.id = this.parseIdentifier();
  45757. this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
  45758. node.typeParameters = this.tsTryParseTypeParameters();
  45759. if (this.eat(types$12._extends)) {
  45760. node.extends = this.tsParseHeritageClause("extends");
  45761. }
  45762. const body = this.startNode();
  45763. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  45764. node.body = this.finishNode(body, "TSInterfaceBody");
  45765. return this.finishNode(node, "TSInterfaceDeclaration");
  45766. }
  45767. tsParseTypeAliasDeclaration(node) {
  45768. node.id = this.parseIdentifier();
  45769. this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
  45770. node.typeParameters = this.tsTryParseTypeParameters();
  45771. node.typeAnnotation = this.tsInType(() => {
  45772. this.expect(types$12.eq);
  45773. if (this.isContextual("intrinsic") && this.lookahead().type !== types$12.dot) {
  45774. const node2 = this.startNode();
  45775. this.next();
  45776. return this.finishNode(node2, "TSIntrinsicKeyword");
  45777. }
  45778. return this.tsParseType();
  45779. });
  45780. this.semicolon();
  45781. return this.finishNode(node, "TSTypeAliasDeclaration");
  45782. }
  45783. tsInNoContext(cb) {
  45784. const oldContext = this.state.context;
  45785. this.state.context = [oldContext[0]];
  45786. try {
  45787. return cb();
  45788. } finally {
  45789. this.state.context = oldContext;
  45790. }
  45791. }
  45792. tsInType(cb) {
  45793. const oldInType = this.state.inType;
  45794. this.state.inType = true;
  45795. try {
  45796. return cb();
  45797. } finally {
  45798. this.state.inType = oldInType;
  45799. }
  45800. }
  45801. tsEatThenParseType(token) {
  45802. return !this.match(token) ? void 0 : this.tsNextThenParseType();
  45803. }
  45804. tsExpectThenParseType(token) {
  45805. return this.tsDoThenParseType(() => this.expect(token));
  45806. }
  45807. tsNextThenParseType() {
  45808. return this.tsDoThenParseType(() => this.next());
  45809. }
  45810. tsDoThenParseType(cb) {
  45811. return this.tsInType(() => {
  45812. cb();
  45813. return this.tsParseType();
  45814. });
  45815. }
  45816. tsParseEnumMember() {
  45817. const node = this.startNode();
  45818. node.id = this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  45819. if (this.eat(types$12.eq)) {
  45820. node.initializer = this.parseMaybeAssignAllowIn();
  45821. }
  45822. return this.finishNode(node, "TSEnumMember");
  45823. }
  45824. tsParseEnumDeclaration(node, isConst) {
  45825. if (isConst)
  45826. node.const = true;
  45827. node.id = this.parseIdentifier();
  45828. this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
  45829. this.expect(types$12.braceL);
  45830. node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  45831. this.expect(types$12.braceR);
  45832. return this.finishNode(node, "TSEnumDeclaration");
  45833. }
  45834. tsParseModuleBlock() {
  45835. const node = this.startNode();
  45836. this.scope.enter(SCOPE_OTHER);
  45837. this.expect(types$12.braceL);
  45838. this.parseBlockOrModuleBlockBody(node.body = [], void 0, true, types$12.braceR);
  45839. this.scope.exit();
  45840. return this.finishNode(node, "TSModuleBlock");
  45841. }
  45842. tsParseModuleOrNamespaceDeclaration(node, nested = false) {
  45843. node.id = this.parseIdentifier();
  45844. if (!nested) {
  45845. this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
  45846. }
  45847. if (this.eat(types$12.dot)) {
  45848. const inner = this.startNode();
  45849. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  45850. node.body = inner;
  45851. } else {
  45852. this.scope.enter(SCOPE_TS_MODULE);
  45853. this.prodParam.enter(PARAM);
  45854. node.body = this.tsParseModuleBlock();
  45855. this.prodParam.exit();
  45856. this.scope.exit();
  45857. }
  45858. return this.finishNode(node, "TSModuleDeclaration");
  45859. }
  45860. tsParseAmbientExternalModuleDeclaration(node) {
  45861. if (this.isContextual("global")) {
  45862. node.global = true;
  45863. node.id = this.parseIdentifier();
  45864. } else if (this.match(types$12.string)) {
  45865. node.id = this.parseExprAtom();
  45866. } else {
  45867. this.unexpected();
  45868. }
  45869. if (this.match(types$12.braceL)) {
  45870. this.scope.enter(SCOPE_TS_MODULE);
  45871. this.prodParam.enter(PARAM);
  45872. node.body = this.tsParseModuleBlock();
  45873. this.prodParam.exit();
  45874. this.scope.exit();
  45875. } else {
  45876. this.semicolon();
  45877. }
  45878. return this.finishNode(node, "TSModuleDeclaration");
  45879. }
  45880. tsParseImportEqualsDeclaration(node, isExport) {
  45881. node.isExport = isExport || false;
  45882. node.id = this.parseIdentifier();
  45883. this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL2);
  45884. this.expect(types$12.eq);
  45885. const moduleReference = this.tsParseModuleReference();
  45886. if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
  45887. this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType);
  45888. }
  45889. node.moduleReference = moduleReference;
  45890. this.semicolon();
  45891. return this.finishNode(node, "TSImportEqualsDeclaration");
  45892. }
  45893. tsIsExternalModuleReference() {
  45894. return this.isContextual("require") && this.lookaheadCharCode() === 40;
  45895. }
  45896. tsParseModuleReference() {
  45897. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  45898. }
  45899. tsParseExternalModuleReference() {
  45900. const node = this.startNode();
  45901. this.expectContextual("require");
  45902. this.expect(types$12.parenL);
  45903. if (!this.match(types$12.string)) {
  45904. throw this.unexpected();
  45905. }
  45906. node.expression = this.parseExprAtom();
  45907. this.expect(types$12.parenR);
  45908. return this.finishNode(node, "TSExternalModuleReference");
  45909. }
  45910. tsLookAhead(f) {
  45911. const state = this.state.clone();
  45912. const res = f();
  45913. this.state = state;
  45914. return res;
  45915. }
  45916. tsTryParseAndCatch(f) {
  45917. const result = this.tryParse((abort) => f() || abort());
  45918. if (result.aborted || !result.node)
  45919. return void 0;
  45920. if (result.error)
  45921. this.state = result.failState;
  45922. return result.node;
  45923. }
  45924. tsTryParse(f) {
  45925. const state = this.state.clone();
  45926. const result = f();
  45927. if (result !== void 0 && result !== false) {
  45928. return result;
  45929. } else {
  45930. this.state = state;
  45931. return void 0;
  45932. }
  45933. }
  45934. tsTryParseDeclare(nany) {
  45935. if (this.isLineTerminator()) {
  45936. return;
  45937. }
  45938. let starttype = this.state.type;
  45939. let kind;
  45940. if (this.isContextual("let")) {
  45941. starttype = types$12._var;
  45942. kind = "let";
  45943. }
  45944. return this.tsInAmbientContext(() => {
  45945. switch (starttype) {
  45946. case types$12._function:
  45947. nany.declare = true;
  45948. return this.parseFunctionStatement(nany, false, true);
  45949. case types$12._class:
  45950. nany.declare = true;
  45951. return this.parseClass(nany, true, false);
  45952. case types$12._const:
  45953. if (this.match(types$12._const) && this.isLookaheadContextual("enum")) {
  45954. this.expect(types$12._const);
  45955. this.expectContextual("enum");
  45956. return this.tsParseEnumDeclaration(nany, true);
  45957. }
  45958. case types$12._var:
  45959. kind = kind || this.state.value;
  45960. return this.parseVarStatement(nany, kind);
  45961. case types$12.name: {
  45962. const value = this.state.value;
  45963. if (value === "global") {
  45964. return this.tsParseAmbientExternalModuleDeclaration(nany);
  45965. } else {
  45966. return this.tsParseDeclaration(nany, value, true);
  45967. }
  45968. }
  45969. }
  45970. });
  45971. }
  45972. tsTryParseExportDeclaration() {
  45973. return this.tsParseDeclaration(this.startNode(), this.state.value, true);
  45974. }
  45975. tsParseExpressionStatement(node, expr) {
  45976. switch (expr.name) {
  45977. case "declare": {
  45978. const declaration = this.tsTryParseDeclare(node);
  45979. if (declaration) {
  45980. declaration.declare = true;
  45981. return declaration;
  45982. }
  45983. break;
  45984. }
  45985. case "global":
  45986. if (this.match(types$12.braceL)) {
  45987. this.scope.enter(SCOPE_TS_MODULE);
  45988. this.prodParam.enter(PARAM);
  45989. const mod = node;
  45990. mod.global = true;
  45991. mod.id = expr;
  45992. mod.body = this.tsParseModuleBlock();
  45993. this.scope.exit();
  45994. this.prodParam.exit();
  45995. return this.finishNode(mod, "TSModuleDeclaration");
  45996. }
  45997. break;
  45998. default:
  45999. return this.tsParseDeclaration(node, expr.name, false);
  46000. }
  46001. }
  46002. tsParseDeclaration(node, value, next) {
  46003. switch (value) {
  46004. case "abstract":
  46005. if (this.tsCheckLineTerminator(next) && (this.match(types$12._class) || this.match(types$12.name))) {
  46006. return this.tsParseAbstractDeclaration(node);
  46007. }
  46008. break;
  46009. case "enum":
  46010. if (next || this.match(types$12.name)) {
  46011. if (next)
  46012. this.next();
  46013. return this.tsParseEnumDeclaration(node, false);
  46014. }
  46015. break;
  46016. case "interface":
  46017. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  46018. return this.tsParseInterfaceDeclaration(node);
  46019. }
  46020. break;
  46021. case "module":
  46022. if (this.tsCheckLineTerminator(next)) {
  46023. if (this.match(types$12.string)) {
  46024. return this.tsParseAmbientExternalModuleDeclaration(node);
  46025. } else if (this.match(types$12.name)) {
  46026. return this.tsParseModuleOrNamespaceDeclaration(node);
  46027. }
  46028. }
  46029. break;
  46030. case "namespace":
  46031. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  46032. return this.tsParseModuleOrNamespaceDeclaration(node);
  46033. }
  46034. break;
  46035. case "type":
  46036. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  46037. return this.tsParseTypeAliasDeclaration(node);
  46038. }
  46039. break;
  46040. }
  46041. }
  46042. tsCheckLineTerminator(next) {
  46043. if (next) {
  46044. if (this.hasFollowingLineBreak())
  46045. return false;
  46046. this.next();
  46047. return true;
  46048. }
  46049. return !this.isLineTerminator();
  46050. }
  46051. tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
  46052. if (!this.isRelational("<")) {
  46053. return void 0;
  46054. }
  46055. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  46056. this.state.maybeInArrowParameters = true;
  46057. const res = this.tsTryParseAndCatch(() => {
  46058. const node = this.startNodeAt(startPos, startLoc);
  46059. node.typeParameters = this.tsParseTypeParameters();
  46060. super.parseFunctionParams(node);
  46061. node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
  46062. this.expect(types$12.arrow);
  46063. return node;
  46064. });
  46065. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  46066. if (!res) {
  46067. return void 0;
  46068. }
  46069. return this.parseArrowExpression(res, null, true);
  46070. }
  46071. tsParseTypeArguments() {
  46072. const node = this.startNode();
  46073. node.params = this.tsInType(() => this.tsInNoContext(() => {
  46074. this.expectRelational("<");
  46075. return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
  46076. }));
  46077. if (node.params.length === 0) {
  46078. this.raise(node.start, TSErrors.EmptyTypeArguments);
  46079. }
  46080. this.state.exprAllowed = false;
  46081. this.expectRelational(">");
  46082. return this.finishNode(node, "TSTypeParameterInstantiation");
  46083. }
  46084. tsIsDeclarationStart() {
  46085. if (this.match(types$12.name)) {
  46086. switch (this.state.value) {
  46087. case "abstract":
  46088. case "declare":
  46089. case "enum":
  46090. case "interface":
  46091. case "module":
  46092. case "namespace":
  46093. case "type":
  46094. return true;
  46095. }
  46096. }
  46097. return false;
  46098. }
  46099. isExportDefaultSpecifier() {
  46100. if (this.tsIsDeclarationStart())
  46101. return false;
  46102. return super.isExportDefaultSpecifier();
  46103. }
  46104. parseAssignableListItem(allowModifiers, decorators) {
  46105. const startPos = this.state.start;
  46106. const startLoc = this.state.startLoc;
  46107. let accessibility;
  46108. let readonly = false;
  46109. if (allowModifiers !== void 0) {
  46110. accessibility = this.parseAccessModifier();
  46111. readonly = !!this.tsParseModifier(["readonly"]);
  46112. if (allowModifiers === false && (accessibility || readonly)) {
  46113. this.raise(startPos, TSErrors.UnexpectedParameterModifier);
  46114. }
  46115. }
  46116. const left = this.parseMaybeDefault();
  46117. this.parseAssignableListItemTypes(left);
  46118. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  46119. if (accessibility || readonly) {
  46120. const pp2 = this.startNodeAt(startPos, startLoc);
  46121. if (decorators.length) {
  46122. pp2.decorators = decorators;
  46123. }
  46124. if (accessibility)
  46125. pp2.accessibility = accessibility;
  46126. if (readonly)
  46127. pp2.readonly = readonly;
  46128. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  46129. this.raise(pp2.start, TSErrors.UnsupportedParameterPropertyKind);
  46130. }
  46131. pp2.parameter = elt;
  46132. return this.finishNode(pp2, "TSParameterProperty");
  46133. }
  46134. if (decorators.length) {
  46135. left.decorators = decorators;
  46136. }
  46137. return elt;
  46138. }
  46139. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  46140. if (this.match(types$12.colon)) {
  46141. node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  46142. }
  46143. const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : void 0;
  46144. if (bodilessType && !this.match(types$12.braceL) && this.isLineTerminator()) {
  46145. this.finishNode(node, bodilessType);
  46146. return;
  46147. }
  46148. if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
  46149. this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);
  46150. if (node.declare) {
  46151. super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
  46152. return;
  46153. }
  46154. }
  46155. super.parseFunctionBodyAndFinish(node, type, isMethod);
  46156. }
  46157. registerFunctionStatementId(node) {
  46158. if (!node.body && node.id) {
  46159. this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
  46160. } else {
  46161. super.registerFunctionStatementId(...arguments);
  46162. }
  46163. }
  46164. tsCheckForInvalidTypeCasts(items) {
  46165. items.forEach((node) => {
  46166. if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
  46167. this.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation);
  46168. }
  46169. });
  46170. }
  46171. toReferencedList(exprList, isInParens) {
  46172. this.tsCheckForInvalidTypeCasts(exprList);
  46173. return exprList;
  46174. }
  46175. parseArrayLike(...args) {
  46176. const node = super.parseArrayLike(...args);
  46177. if (node.type === "ArrayExpression") {
  46178. this.tsCheckForInvalidTypeCasts(node.elements);
  46179. }
  46180. return node;
  46181. }
  46182. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  46183. if (!this.hasPrecedingLineBreak() && this.match(types$12.bang)) {
  46184. this.state.exprAllowed = false;
  46185. this.next();
  46186. const nonNullExpression = this.startNodeAt(startPos, startLoc);
  46187. nonNullExpression.expression = base2;
  46188. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  46189. }
  46190. if (this.isRelational("<")) {
  46191. const result = this.tsTryParseAndCatch(() => {
  46192. if (!noCalls && this.atPossibleAsyncArrow(base2)) {
  46193. const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
  46194. if (asyncArrowFn) {
  46195. return asyncArrowFn;
  46196. }
  46197. }
  46198. const node = this.startNodeAt(startPos, startLoc);
  46199. node.callee = base2;
  46200. const typeArguments = this.tsParseTypeArguments();
  46201. if (typeArguments) {
  46202. if (!noCalls && this.eat(types$12.parenL)) {
  46203. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  46204. this.tsCheckForInvalidTypeCasts(node.arguments);
  46205. node.typeParameters = typeArguments;
  46206. if (state.optionalChainMember) {
  46207. node.optional = false;
  46208. }
  46209. return this.finishCallExpression(node, state.optionalChainMember);
  46210. } else if (this.match(types$12.backQuote)) {
  46211. const result2 = this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  46212. result2.typeParameters = typeArguments;
  46213. return result2;
  46214. }
  46215. }
  46216. this.unexpected();
  46217. });
  46218. if (result)
  46219. return result;
  46220. }
  46221. return super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  46222. }
  46223. parseNewArguments(node) {
  46224. if (this.isRelational("<")) {
  46225. const typeParameters = this.tsTryParseAndCatch(() => {
  46226. const args = this.tsParseTypeArguments();
  46227. if (!this.match(types$12.parenL))
  46228. this.unexpected();
  46229. return args;
  46230. });
  46231. if (typeParameters) {
  46232. node.typeParameters = typeParameters;
  46233. }
  46234. }
  46235. super.parseNewArguments(node);
  46236. }
  46237. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  46238. if (nonNull(types$12._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
  46239. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  46240. node.expression = left;
  46241. const _const = this.tsTryNextParseConstantContext();
  46242. if (_const) {
  46243. node.typeAnnotation = _const;
  46244. } else {
  46245. node.typeAnnotation = this.tsNextThenParseType();
  46246. }
  46247. this.finishNode(node, "TSAsExpression");
  46248. this.reScan_lt_gt();
  46249. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  46250. }
  46251. return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);
  46252. }
  46253. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  46254. }
  46255. checkDuplicateExports() {
  46256. }
  46257. parseImport(node) {
  46258. node.importKind = "value";
  46259. if (this.match(types$12.name) || this.match(types$12.star) || this.match(types$12.braceL)) {
  46260. let ahead = this.lookahead();
  46261. if (this.isContextual("type") && ahead.type !== types$12.comma && !(ahead.type === types$12.name && ahead.value === "from") && ahead.type !== types$12.eq) {
  46262. node.importKind = "type";
  46263. this.next();
  46264. ahead = this.lookahead();
  46265. }
  46266. if (this.match(types$12.name) && ahead.type === types$12.eq) {
  46267. return this.tsParseImportEqualsDeclaration(node);
  46268. }
  46269. }
  46270. const importNode = super.parseImport(node);
  46271. if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
  46272. this.raise(importNode.start, TSErrors.TypeImportCannotSpecifyDefaultAndNamed);
  46273. }
  46274. return importNode;
  46275. }
  46276. parseExport(node) {
  46277. if (this.match(types$12._import)) {
  46278. this.next();
  46279. if (this.isContextual("type") && this.lookaheadCharCode() !== 61) {
  46280. node.importKind = "type";
  46281. this.next();
  46282. } else {
  46283. node.importKind = "value";
  46284. }
  46285. return this.tsParseImportEqualsDeclaration(node, true);
  46286. } else if (this.eat(types$12.eq)) {
  46287. const assign = node;
  46288. assign.expression = this.parseExpression();
  46289. this.semicolon();
  46290. return this.finishNode(assign, "TSExportAssignment");
  46291. } else if (this.eatContextual("as")) {
  46292. const decl = node;
  46293. this.expectContextual("namespace");
  46294. decl.id = this.parseIdentifier();
  46295. this.semicolon();
  46296. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  46297. } else {
  46298. if (this.isContextual("type") && this.lookahead().type === types$12.braceL) {
  46299. this.next();
  46300. node.exportKind = "type";
  46301. } else {
  46302. node.exportKind = "value";
  46303. }
  46304. return super.parseExport(node);
  46305. }
  46306. }
  46307. isAbstractClass() {
  46308. return this.isContextual("abstract") && this.lookahead().type === types$12._class;
  46309. }
  46310. parseExportDefaultExpression() {
  46311. if (this.isAbstractClass()) {
  46312. const cls = this.startNode();
  46313. this.next();
  46314. cls.abstract = true;
  46315. this.parseClass(cls, true, true);
  46316. return cls;
  46317. }
  46318. if (this.state.value === "interface") {
  46319. const result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
  46320. if (result)
  46321. return result;
  46322. }
  46323. return super.parseExportDefaultExpression();
  46324. }
  46325. parseStatementContent(context, topLevel) {
  46326. if (this.state.type === types$12._const) {
  46327. const ahead = this.lookahead();
  46328. if (ahead.type === types$12.name && ahead.value === "enum") {
  46329. const node = this.startNode();
  46330. this.expect(types$12._const);
  46331. this.expectContextual("enum");
  46332. return this.tsParseEnumDeclaration(node, true);
  46333. }
  46334. }
  46335. return super.parseStatementContent(context, topLevel);
  46336. }
  46337. parseAccessModifier() {
  46338. return this.tsParseModifier(["public", "protected", "private"]);
  46339. }
  46340. tsHasSomeModifiers(member, modifiers) {
  46341. return modifiers.some((modifier) => {
  46342. if (tsIsAccessModifier(modifier)) {
  46343. return member.accessibility === modifier;
  46344. }
  46345. return !!member[modifier];
  46346. });
  46347. }
  46348. parseClassMember(classBody, member, state) {
  46349. const invalidModifersForStaticBlocks = ["declare", "private", "public", "protected", "override", "abstract", "readonly"];
  46350. this.tsParseModifiers(member, invalidModifersForStaticBlocks.concat(["static"]));
  46351. const callParseClassMemberWithIsStatic = () => {
  46352. const isStatic = !!member.static;
  46353. if (isStatic && this.eat(types$12.braceL)) {
  46354. if (this.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {
  46355. this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier);
  46356. }
  46357. this.parseClassStaticBlock(classBody, member);
  46358. } else {
  46359. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  46360. }
  46361. };
  46362. if (member.declare) {
  46363. this.tsInAmbientContext(callParseClassMemberWithIsStatic);
  46364. } else {
  46365. callParseClassMemberWithIsStatic();
  46366. }
  46367. }
  46368. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  46369. const idx = this.tsTryParseIndexSignature(member);
  46370. if (idx) {
  46371. classBody.body.push(idx);
  46372. if (member.abstract) {
  46373. this.raise(member.start, TSErrors.IndexSignatureHasAbstract);
  46374. }
  46375. if (member.accessibility) {
  46376. this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility);
  46377. }
  46378. if (member.declare) {
  46379. this.raise(member.start, TSErrors.IndexSignatureHasDeclare);
  46380. }
  46381. if (member.override) {
  46382. this.raise(member.start, TSErrors.IndexSignatureHasOverride);
  46383. }
  46384. return;
  46385. }
  46386. if (!this.state.inAbstractClass && member.abstract) {
  46387. this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod);
  46388. }
  46389. if (member.override) {
  46390. if (!state.hadSuperClass) {
  46391. this.raise(member.start, TSErrors.OverrideNotInSubClass);
  46392. }
  46393. }
  46394. super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  46395. }
  46396. parsePostMemberNameModifiers(methodOrProp) {
  46397. const optional = this.eat(types$12.question);
  46398. if (optional)
  46399. methodOrProp.optional = true;
  46400. if (methodOrProp.readonly && this.match(types$12.parenL)) {
  46401. this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);
  46402. }
  46403. if (methodOrProp.declare && this.match(types$12.parenL)) {
  46404. this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);
  46405. }
  46406. }
  46407. parseExpressionStatement(node, expr) {
  46408. const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0;
  46409. return decl || super.parseExpressionStatement(node, expr);
  46410. }
  46411. shouldParseExportDeclaration() {
  46412. if (this.tsIsDeclarationStart())
  46413. return true;
  46414. return super.shouldParseExportDeclaration();
  46415. }
  46416. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  46417. if (!refNeedsArrowPos || !this.match(types$12.question)) {
  46418. return super.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
  46419. }
  46420. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  46421. if (!result.node) {
  46422. refNeedsArrowPos.start = result.error.pos || this.state.start;
  46423. return expr;
  46424. }
  46425. if (result.error)
  46426. this.state = result.failState;
  46427. return result.node;
  46428. }
  46429. parseParenItem(node, startPos, startLoc) {
  46430. node = super.parseParenItem(node, startPos, startLoc);
  46431. if (this.eat(types$12.question)) {
  46432. node.optional = true;
  46433. this.resetEndLocation(node);
  46434. }
  46435. if (this.match(types$12.colon)) {
  46436. const typeCastNode = this.startNodeAt(startPos, startLoc);
  46437. typeCastNode.expression = node;
  46438. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  46439. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  46440. }
  46441. return node;
  46442. }
  46443. parseExportDeclaration(node) {
  46444. const startPos = this.state.start;
  46445. const startLoc = this.state.startLoc;
  46446. const isDeclare = this.eatContextual("declare");
  46447. if (isDeclare && (this.isContextual("declare") || !this.shouldParseExportDeclaration())) {
  46448. throw this.raise(this.state.start, TSErrors.ExpectedAmbientAfterExportDeclare);
  46449. }
  46450. let declaration;
  46451. if (this.match(types$12.name)) {
  46452. declaration = this.tsTryParseExportDeclaration();
  46453. }
  46454. if (!declaration) {
  46455. declaration = super.parseExportDeclaration(node);
  46456. }
  46457. if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
  46458. node.exportKind = "type";
  46459. }
  46460. if (declaration && isDeclare) {
  46461. this.resetStartLocation(declaration, startPos, startLoc);
  46462. declaration.declare = true;
  46463. }
  46464. return declaration;
  46465. }
  46466. parseClassId(node, isStatement, optionalId) {
  46467. if ((!isStatement || optionalId) && this.isContextual("implements")) {
  46468. return;
  46469. }
  46470. super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  46471. const typeParameters = this.tsTryParseTypeParameters();
  46472. if (typeParameters)
  46473. node.typeParameters = typeParameters;
  46474. }
  46475. parseClassPropertyAnnotation(node) {
  46476. if (!node.optional && this.eat(types$12.bang)) {
  46477. node.definite = true;
  46478. }
  46479. const type = this.tsTryParseTypeAnnotation();
  46480. if (type)
  46481. node.typeAnnotation = type;
  46482. }
  46483. parseClassProperty(node) {
  46484. this.parseClassPropertyAnnotation(node);
  46485. if (this.state.isAmbientContext && this.match(types$12.eq)) {
  46486. this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
  46487. }
  46488. return super.parseClassProperty(node);
  46489. }
  46490. parseClassPrivateProperty(node) {
  46491. if (node.abstract) {
  46492. this.raise(node.start, TSErrors.PrivateElementHasAbstract);
  46493. }
  46494. if (node.accessibility) {
  46495. this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility);
  46496. }
  46497. this.parseClassPropertyAnnotation(node);
  46498. return super.parseClassPrivateProperty(node);
  46499. }
  46500. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  46501. const typeParameters = this.tsTryParseTypeParameters();
  46502. if (typeParameters && isConstructor) {
  46503. this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);
  46504. }
  46505. if (method.declare && (method.kind === "get" || method.kind === "set")) {
  46506. this.raise(method.start, TSErrors.DeclareAccessor, method.kind);
  46507. }
  46508. if (typeParameters)
  46509. method.typeParameters = typeParameters;
  46510. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  46511. }
  46512. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  46513. const typeParameters = this.tsTryParseTypeParameters();
  46514. if (typeParameters)
  46515. method.typeParameters = typeParameters;
  46516. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  46517. }
  46518. parseClassSuper(node) {
  46519. super.parseClassSuper(node);
  46520. if (node.superClass && this.isRelational("<")) {
  46521. node.superTypeParameters = this.tsParseTypeArguments();
  46522. }
  46523. if (this.eatContextual("implements")) {
  46524. node.implements = this.tsParseHeritageClause("implements");
  46525. }
  46526. }
  46527. parseObjPropValue(prop, ...args) {
  46528. const typeParameters = this.tsTryParseTypeParameters();
  46529. if (typeParameters)
  46530. prop.typeParameters = typeParameters;
  46531. super.parseObjPropValue(prop, ...args);
  46532. }
  46533. parseFunctionParams(node, allowModifiers) {
  46534. const typeParameters = this.tsTryParseTypeParameters();
  46535. if (typeParameters)
  46536. node.typeParameters = typeParameters;
  46537. super.parseFunctionParams(node, allowModifiers);
  46538. }
  46539. parseVarId(decl, kind) {
  46540. super.parseVarId(decl, kind);
  46541. if (decl.id.type === "Identifier" && this.eat(types$12.bang)) {
  46542. decl.definite = true;
  46543. }
  46544. const type = this.tsTryParseTypeAnnotation();
  46545. if (type) {
  46546. decl.id.typeAnnotation = type;
  46547. this.resetEndLocation(decl.id);
  46548. }
  46549. }
  46550. parseAsyncArrowFromCallExpression(node, call) {
  46551. if (this.match(types$12.colon)) {
  46552. node.returnType = this.tsParseTypeAnnotation();
  46553. }
  46554. return super.parseAsyncArrowFromCallExpression(node, call);
  46555. }
  46556. parseMaybeAssign(...args) {
  46557. var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
  46558. let state;
  46559. let jsx2;
  46560. let typeCast;
  46561. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  46562. state = this.state.clone();
  46563. jsx2 = this.tryParse(() => super.parseMaybeAssign(...args), state);
  46564. if (!jsx2.error)
  46565. return jsx2.node;
  46566. const {
  46567. context
  46568. } = this.state;
  46569. if (context[context.length - 1] === types2.j_oTag) {
  46570. context.length -= 2;
  46571. } else if (context[context.length - 1] === types2.j_expr) {
  46572. context.length -= 1;
  46573. }
  46574. }
  46575. if (!((_jsx = jsx2) != null && _jsx.error) && !this.isRelational("<")) {
  46576. return super.parseMaybeAssign(...args);
  46577. }
  46578. let typeParameters;
  46579. state = state || this.state.clone();
  46580. const arrow = this.tryParse((abort) => {
  46581. var _expr$extra, _typeParameters;
  46582. typeParameters = this.tsParseTypeParameters();
  46583. const expr = super.parseMaybeAssign(...args);
  46584. if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
  46585. abort();
  46586. }
  46587. if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
  46588. this.resetStartLocationFromNode(expr, typeParameters);
  46589. }
  46590. expr.typeParameters = typeParameters;
  46591. return expr;
  46592. }, state);
  46593. if (!arrow.error && !arrow.aborted)
  46594. return arrow.node;
  46595. if (!jsx2) {
  46596. assert(!this.hasPlugin("jsx"));
  46597. typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);
  46598. if (!typeCast.error)
  46599. return typeCast.node;
  46600. }
  46601. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  46602. this.state = jsx2.failState;
  46603. return jsx2.node;
  46604. }
  46605. if (arrow.node) {
  46606. this.state = arrow.failState;
  46607. return arrow.node;
  46608. }
  46609. if ((_typeCast = typeCast) != null && _typeCast.node) {
  46610. this.state = typeCast.failState;
  46611. return typeCast.node;
  46612. }
  46613. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  46614. throw jsx2.error;
  46615. if (arrow.thrown)
  46616. throw arrow.error;
  46617. if ((_typeCast2 = typeCast) != null && _typeCast2.thrown)
  46618. throw typeCast.error;
  46619. throw ((_jsx4 = jsx2) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
  46620. }
  46621. parseMaybeUnary(refExpressionErrors) {
  46622. if (!this.hasPlugin("jsx") && this.isRelational("<")) {
  46623. return this.tsParseTypeAssertion();
  46624. } else {
  46625. return super.parseMaybeUnary(refExpressionErrors);
  46626. }
  46627. }
  46628. parseArrow(node) {
  46629. if (this.match(types$12.colon)) {
  46630. const result = this.tryParse((abort) => {
  46631. const returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  46632. if (this.canInsertSemicolon() || !this.match(types$12.arrow))
  46633. abort();
  46634. return returnType;
  46635. });
  46636. if (result.aborted)
  46637. return;
  46638. if (!result.thrown) {
  46639. if (result.error)
  46640. this.state = result.failState;
  46641. node.returnType = result.node;
  46642. }
  46643. }
  46644. return super.parseArrow(node);
  46645. }
  46646. parseAssignableListItemTypes(param) {
  46647. if (this.eat(types$12.question)) {
  46648. if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) {
  46649. this.raise(param.start, TSErrors.PatternIsOptional);
  46650. }
  46651. param.optional = true;
  46652. }
  46653. const type = this.tsTryParseTypeAnnotation();
  46654. if (type)
  46655. param.typeAnnotation = type;
  46656. this.resetEndLocation(param);
  46657. return param;
  46658. }
  46659. toAssignable(node, isLHS = false) {
  46660. switch (node.type) {
  46661. case "TSTypeCastExpression":
  46662. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  46663. case "TSParameterProperty":
  46664. return super.toAssignable(node, isLHS);
  46665. case "ParenthesizedExpression":
  46666. return this.toAssignableParenthesizedExpression(node, isLHS);
  46667. case "TSAsExpression":
  46668. case "TSNonNullExpression":
  46669. case "TSTypeAssertion":
  46670. node.expression = this.toAssignable(node.expression, isLHS);
  46671. return node;
  46672. default:
  46673. return super.toAssignable(node, isLHS);
  46674. }
  46675. }
  46676. toAssignableParenthesizedExpression(node, isLHS) {
  46677. switch (node.expression.type) {
  46678. case "TSAsExpression":
  46679. case "TSNonNullExpression":
  46680. case "TSTypeAssertion":
  46681. case "ParenthesizedExpression":
  46682. node.expression = this.toAssignable(node.expression, isLHS);
  46683. return node;
  46684. default:
  46685. return super.toAssignable(node, isLHS);
  46686. }
  46687. }
  46688. checkLVal(expr, contextDescription, ...args) {
  46689. var _expr$extra2;
  46690. switch (expr.type) {
  46691. case "TSTypeCastExpression":
  46692. return;
  46693. case "TSParameterProperty":
  46694. this.checkLVal(expr.parameter, "parameter property", ...args);
  46695. return;
  46696. case "TSAsExpression":
  46697. case "TSTypeAssertion":
  46698. if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) {
  46699. this.raise(expr.start, ErrorMessages.InvalidLhs, contextDescription);
  46700. break;
  46701. }
  46702. this.checkLVal(expr.expression, "parenthesized expression", ...args);
  46703. return;
  46704. case "TSNonNullExpression":
  46705. this.checkLVal(expr.expression, contextDescription, ...args);
  46706. return;
  46707. default:
  46708. super.checkLVal(expr, contextDescription, ...args);
  46709. return;
  46710. }
  46711. }
  46712. parseBindingAtom() {
  46713. switch (this.state.type) {
  46714. case types$12._this:
  46715. return this.parseIdentifier(true);
  46716. default:
  46717. return super.parseBindingAtom();
  46718. }
  46719. }
  46720. parseMaybeDecoratorArguments(expr) {
  46721. if (this.isRelational("<")) {
  46722. const typeArguments = this.tsParseTypeArguments();
  46723. if (this.match(types$12.parenL)) {
  46724. const call = super.parseMaybeDecoratorArguments(expr);
  46725. call.typeParameters = typeArguments;
  46726. return call;
  46727. }
  46728. this.unexpected(this.state.start, types$12.parenL);
  46729. }
  46730. return super.parseMaybeDecoratorArguments(expr);
  46731. }
  46732. checkCommaAfterRest(close) {
  46733. if (this.state.isAmbientContext && this.match(types$12.comma) && this.lookaheadCharCode() === close) {
  46734. this.next();
  46735. } else {
  46736. super.checkCommaAfterRest(close);
  46737. }
  46738. }
  46739. isClassMethod() {
  46740. return this.isRelational("<") || super.isClassMethod();
  46741. }
  46742. isClassProperty() {
  46743. return this.match(types$12.bang) || this.match(types$12.colon) || super.isClassProperty();
  46744. }
  46745. parseMaybeDefault(...args) {
  46746. const node = super.parseMaybeDefault(...args);
  46747. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  46748. this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign);
  46749. }
  46750. return node;
  46751. }
  46752. getTokenFromCode(code2) {
  46753. if (this.state.inType && (code2 === 62 || code2 === 60)) {
  46754. return this.finishOp(types$12.relational, 1);
  46755. } else {
  46756. return super.getTokenFromCode(code2);
  46757. }
  46758. }
  46759. reScan_lt_gt() {
  46760. if (this.match(types$12.relational)) {
  46761. const code2 = this.input.charCodeAt(this.state.start);
  46762. if (code2 === 60 || code2 === 62) {
  46763. this.state.pos -= 1;
  46764. this.readToken_lt_gt(code2);
  46765. }
  46766. }
  46767. }
  46768. toAssignableList(exprList) {
  46769. for (let i = 0; i < exprList.length; i++) {
  46770. const expr = exprList[i];
  46771. if (!expr)
  46772. continue;
  46773. switch (expr.type) {
  46774. case "TSTypeCastExpression":
  46775. exprList[i] = this.typeCastToParameter(expr);
  46776. break;
  46777. case "TSAsExpression":
  46778. case "TSTypeAssertion":
  46779. if (!this.state.maybeInArrowParameters) {
  46780. exprList[i] = this.typeCastToParameter(expr);
  46781. } else {
  46782. this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);
  46783. }
  46784. break;
  46785. }
  46786. }
  46787. return super.toAssignableList(...arguments);
  46788. }
  46789. typeCastToParameter(node) {
  46790. node.expression.typeAnnotation = node.typeAnnotation;
  46791. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  46792. return node.expression;
  46793. }
  46794. shouldParseArrow() {
  46795. return this.match(types$12.colon) || super.shouldParseArrow();
  46796. }
  46797. shouldParseAsyncArrow() {
  46798. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  46799. }
  46800. canHaveLeadingDecorator() {
  46801. return super.canHaveLeadingDecorator() || this.isAbstractClass();
  46802. }
  46803. jsxParseOpeningElementAfterName(node) {
  46804. if (this.isRelational("<")) {
  46805. const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
  46806. if (typeArguments)
  46807. node.typeParameters = typeArguments;
  46808. }
  46809. return super.jsxParseOpeningElementAfterName(node);
  46810. }
  46811. getGetterSetterExpectedParamCount(method) {
  46812. const baseCount = super.getGetterSetterExpectedParamCount(method);
  46813. const params = this.getObjectOrClassMethodParams(method);
  46814. const firstParam = params[0];
  46815. const hasContextParam = firstParam && this.isThisParam(firstParam);
  46816. return hasContextParam ? baseCount + 1 : baseCount;
  46817. }
  46818. parseCatchClauseParam() {
  46819. const param = super.parseCatchClauseParam();
  46820. const type = this.tsTryParseTypeAnnotation();
  46821. if (type) {
  46822. param.typeAnnotation = type;
  46823. this.resetEndLocation(param);
  46824. }
  46825. return param;
  46826. }
  46827. tsInAmbientContext(cb) {
  46828. const oldIsAmbientContext = this.state.isAmbientContext;
  46829. this.state.isAmbientContext = true;
  46830. try {
  46831. return cb();
  46832. } finally {
  46833. this.state.isAmbientContext = oldIsAmbientContext;
  46834. }
  46835. }
  46836. parseClass(node, ...args) {
  46837. const oldInAbstractClass = this.state.inAbstractClass;
  46838. this.state.inAbstractClass = !!node.abstract;
  46839. try {
  46840. return super.parseClass(node, ...args);
  46841. } finally {
  46842. this.state.inAbstractClass = oldInAbstractClass;
  46843. }
  46844. }
  46845. tsParseAbstractDeclaration(node) {
  46846. if (this.match(types$12._class)) {
  46847. node.abstract = true;
  46848. return this.parseClass(node, true, false);
  46849. } else if (this.isContextual("interface")) {
  46850. if (!this.hasFollowingLineBreak()) {
  46851. node.abstract = true;
  46852. this.raise(node.start, TSErrors.NonClassMethodPropertyHasAbstractModifer);
  46853. this.next();
  46854. return this.tsParseInterfaceDeclaration(node);
  46855. }
  46856. } else {
  46857. this.unexpected(null, types$12._class);
  46858. }
  46859. }
  46860. parseMethod(...args) {
  46861. const method = super.parseMethod(...args);
  46862. if (method.abstract) {
  46863. const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
  46864. if (hasBody) {
  46865. const {
  46866. key
  46867. } = method;
  46868. this.raise(method.start, TSErrors.AbstractMethodHasImplementation, key.type === "Identifier" ? key.name : `[${this.input.slice(key.start, key.end)}]`);
  46869. }
  46870. }
  46871. return method;
  46872. }
  46873. shouldParseAsAmbientContext() {
  46874. return !!this.getPluginOption("typescript", "dts");
  46875. }
  46876. parse() {
  46877. if (this.shouldParseAsAmbientContext()) {
  46878. this.state.isAmbientContext = true;
  46879. }
  46880. return super.parse();
  46881. }
  46882. getExpression() {
  46883. if (this.shouldParseAsAmbientContext()) {
  46884. this.state.isAmbientContext = true;
  46885. }
  46886. return super.getExpression();
  46887. }
  46888. };
  46889. types$12.placeholder = new TokenType3("%%", {
  46890. startsExpr: true
  46891. });
  46892. var PlaceHolderErrors = makeErrorTemplates({
  46893. ClassNameIsRequired: "A class name is required."
  46894. }, ErrorCodes.SyntaxError);
  46895. var placeholders = (superClass) => class extends superClass {
  46896. parsePlaceholder(expectedNode) {
  46897. if (this.match(types$12.placeholder)) {
  46898. const node = this.startNode();
  46899. this.next();
  46900. this.assertNoSpace("Unexpected space in placeholder.");
  46901. node.name = super.parseIdentifier(true);
  46902. this.assertNoSpace("Unexpected space in placeholder.");
  46903. this.expect(types$12.placeholder);
  46904. return this.finishPlaceholder(node, expectedNode);
  46905. }
  46906. }
  46907. finishPlaceholder(node, expectedNode) {
  46908. const isFinished = !!(node.expectedNode && node.type === "Placeholder");
  46909. node.expectedNode = expectedNode;
  46910. return isFinished ? node : this.finishNode(node, "Placeholder");
  46911. }
  46912. getTokenFromCode(code2) {
  46913. if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  46914. return this.finishOp(types$12.placeholder, 2);
  46915. }
  46916. return super.getTokenFromCode(...arguments);
  46917. }
  46918. parseExprAtom() {
  46919. return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
  46920. }
  46921. parseIdentifier() {
  46922. return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
  46923. }
  46924. checkReservedWord(word) {
  46925. if (word !== void 0)
  46926. super.checkReservedWord(...arguments);
  46927. }
  46928. parseBindingAtom() {
  46929. return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
  46930. }
  46931. checkLVal(expr) {
  46932. if (expr.type !== "Placeholder")
  46933. super.checkLVal(...arguments);
  46934. }
  46935. toAssignable(node) {
  46936. if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
  46937. node.expectedNode = "Pattern";
  46938. return node;
  46939. }
  46940. return super.toAssignable(...arguments);
  46941. }
  46942. isLet(context) {
  46943. if (super.isLet(context)) {
  46944. return true;
  46945. }
  46946. if (!this.isContextual("let")) {
  46947. return false;
  46948. }
  46949. if (context)
  46950. return false;
  46951. const nextToken = this.lookahead();
  46952. if (nextToken.type === types$12.placeholder) {
  46953. return true;
  46954. }
  46955. return false;
  46956. }
  46957. verifyBreakContinue(node) {
  46958. if (node.label && node.label.type === "Placeholder")
  46959. return;
  46960. super.verifyBreakContinue(...arguments);
  46961. }
  46962. parseExpressionStatement(node, expr) {
  46963. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  46964. return super.parseExpressionStatement(...arguments);
  46965. }
  46966. if (this.match(types$12.colon)) {
  46967. const stmt = node;
  46968. stmt.label = this.finishPlaceholder(expr, "Identifier");
  46969. this.next();
  46970. stmt.body = this.parseStatement("label");
  46971. return this.finishNode(stmt, "LabeledStatement");
  46972. }
  46973. this.semicolon();
  46974. node.name = expr.name;
  46975. return this.finishPlaceholder(node, "Statement");
  46976. }
  46977. parseBlock() {
  46978. return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
  46979. }
  46980. parseFunctionId() {
  46981. return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
  46982. }
  46983. parseClass(node, isStatement, optionalId) {
  46984. const type = isStatement ? "ClassDeclaration" : "ClassExpression";
  46985. this.next();
  46986. this.takeDecorators(node);
  46987. const oldStrict = this.state.strict;
  46988. const placeholder = this.parsePlaceholder("Identifier");
  46989. if (placeholder) {
  46990. if (this.match(types$12._extends) || this.match(types$12.placeholder) || this.match(types$12.braceL)) {
  46991. node.id = placeholder;
  46992. } else if (optionalId || !isStatement) {
  46993. node.id = null;
  46994. node.body = this.finishPlaceholder(placeholder, "ClassBody");
  46995. return this.finishNode(node, type);
  46996. } else {
  46997. this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired);
  46998. }
  46999. } else {
  47000. this.parseClassId(node, isStatement, optionalId);
  47001. }
  47002. this.parseClassSuper(node);
  47003. node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
  47004. return this.finishNode(node, type);
  47005. }
  47006. parseExport(node) {
  47007. const placeholder = this.parsePlaceholder("Identifier");
  47008. if (!placeholder)
  47009. return super.parseExport(...arguments);
  47010. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  47011. node.specifiers = [];
  47012. node.source = null;
  47013. node.declaration = this.finishPlaceholder(placeholder, "Declaration");
  47014. return this.finishNode(node, "ExportNamedDeclaration");
  47015. }
  47016. this.expectPlugin("exportDefaultFrom");
  47017. const specifier = this.startNode();
  47018. specifier.exported = placeholder;
  47019. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  47020. return super.parseExport(node);
  47021. }
  47022. isExportDefaultSpecifier() {
  47023. if (this.match(types$12._default)) {
  47024. const next = this.nextTokenStart();
  47025. if (this.isUnparsedContextual(next, "from")) {
  47026. if (this.input.startsWith(types$12.placeholder.label, this.nextTokenStartSince(next + 4))) {
  47027. return true;
  47028. }
  47029. }
  47030. }
  47031. return super.isExportDefaultSpecifier();
  47032. }
  47033. maybeParseExportDefaultSpecifier(node) {
  47034. if (node.specifiers && node.specifiers.length > 0) {
  47035. return true;
  47036. }
  47037. return super.maybeParseExportDefaultSpecifier(...arguments);
  47038. }
  47039. checkExport(node) {
  47040. const {
  47041. specifiers
  47042. } = node;
  47043. if (specifiers != null && specifiers.length) {
  47044. node.specifiers = specifiers.filter((node2) => node2.exported.type === "Placeholder");
  47045. }
  47046. super.checkExport(node);
  47047. node.specifiers = specifiers;
  47048. }
  47049. parseImport(node) {
  47050. const placeholder = this.parsePlaceholder("Identifier");
  47051. if (!placeholder)
  47052. return super.parseImport(...arguments);
  47053. node.specifiers = [];
  47054. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  47055. node.source = this.finishPlaceholder(placeholder, "StringLiteral");
  47056. this.semicolon();
  47057. return this.finishNode(node, "ImportDeclaration");
  47058. }
  47059. const specifier = this.startNodeAtNode(placeholder);
  47060. specifier.local = placeholder;
  47061. this.finishNode(specifier, "ImportDefaultSpecifier");
  47062. node.specifiers.push(specifier);
  47063. if (this.eat(types$12.comma)) {
  47064. const hasStarImport = this.maybeParseStarImportSpecifier(node);
  47065. if (!hasStarImport)
  47066. this.parseNamedImportSpecifiers(node);
  47067. }
  47068. this.expectContextual("from");
  47069. node.source = this.parseImportSource();
  47070. this.semicolon();
  47071. return this.finishNode(node, "ImportDeclaration");
  47072. }
  47073. parseImportSource() {
  47074. return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
  47075. }
  47076. };
  47077. var v8intrinsic = (superClass) => class extends superClass {
  47078. parseV8Intrinsic() {
  47079. if (this.match(types$12.modulo)) {
  47080. const v8IntrinsicStart = this.state.start;
  47081. const node = this.startNode();
  47082. this.eat(types$12.modulo);
  47083. if (this.match(types$12.name)) {
  47084. const name2 = this.parseIdentifierName(this.state.start);
  47085. const identifier = this.createIdentifier(node, name2);
  47086. identifier.type = "V8IntrinsicIdentifier";
  47087. if (this.match(types$12.parenL)) {
  47088. return identifier;
  47089. }
  47090. }
  47091. this.unexpected(v8IntrinsicStart);
  47092. }
  47093. }
  47094. parseExprAtom() {
  47095. return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);
  47096. }
  47097. };
  47098. function hasPlugin(plugins, name2) {
  47099. return plugins.some((plugin2) => {
  47100. if (Array.isArray(plugin2)) {
  47101. return plugin2[0] === name2;
  47102. } else {
  47103. return plugin2 === name2;
  47104. }
  47105. });
  47106. }
  47107. function getPluginOption(plugins, name2, option) {
  47108. const plugin2 = plugins.find((plugin3) => {
  47109. if (Array.isArray(plugin3)) {
  47110. return plugin3[0] === name2;
  47111. } else {
  47112. return plugin3 === name2;
  47113. }
  47114. });
  47115. if (plugin2 && Array.isArray(plugin2)) {
  47116. return plugin2[1][option];
  47117. }
  47118. return null;
  47119. }
  47120. var PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
  47121. var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
  47122. function validatePlugins(plugins) {
  47123. if (hasPlugin(plugins, "decorators")) {
  47124. if (hasPlugin(plugins, "decorators-legacy")) {
  47125. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  47126. }
  47127. const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  47128. if (decoratorsBeforeExport == null) {
  47129. 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'.");
  47130. } else if (typeof decoratorsBeforeExport !== "boolean") {
  47131. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  47132. }
  47133. }
  47134. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  47135. throw new Error("Cannot combine flow and typescript plugins.");
  47136. }
  47137. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  47138. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  47139. }
  47140. if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
  47141. throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map((p) => `'${p}'`).join(", "));
  47142. }
  47143. if (hasPlugin(plugins, "moduleAttributes")) {
  47144. {
  47145. if (hasPlugin(plugins, "importAssertions")) {
  47146. throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
  47147. }
  47148. const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
  47149. if (moduleAttributesVerionPluginOption !== "may-2020") {
  47150. throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
  47151. }
  47152. }
  47153. }
  47154. if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
  47155. throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
  47156. }
  47157. if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
  47158. const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
  47159. error.missingPlugins = "doExpressions";
  47160. throw error;
  47161. }
  47162. }
  47163. var mixinPlugins = {
  47164. estree,
  47165. jsx,
  47166. flow: flow3,
  47167. typescript,
  47168. v8intrinsic,
  47169. placeholders
  47170. };
  47171. var mixinPluginNames = Object.keys(mixinPlugins);
  47172. var defaultOptions2 = {
  47173. sourceType: "script",
  47174. sourceFilename: void 0,
  47175. startLine: 1,
  47176. allowAwaitOutsideFunction: false,
  47177. allowReturnOutsideFunction: false,
  47178. allowImportExportEverywhere: false,
  47179. allowSuperOutsideMethod: false,
  47180. allowUndeclaredExports: false,
  47181. plugins: [],
  47182. strictMode: null,
  47183. ranges: false,
  47184. tokens: false,
  47185. createParenthesizedExpressions: false,
  47186. errorRecovery: false
  47187. };
  47188. function getOptions2(opts) {
  47189. const options = {};
  47190. for (const key of Object.keys(defaultOptions2)) {
  47191. options[key] = opts && opts[key] != null ? opts[key] : defaultOptions2[key];
  47192. }
  47193. return options;
  47194. }
  47195. var _isDigit = function isDigit(code2) {
  47196. return code2 >= 48 && code2 <= 57;
  47197. };
  47198. var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set(["g", "m", "s", "i", "y", "u"]);
  47199. var forbiddenNumericSeparatorSiblings = {
  47200. decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
  47201. hex: [46, 88, 95, 120]
  47202. };
  47203. var allowedNumericSeparatorSiblings = {};
  47204. allowedNumericSeparatorSiblings.bin = [48, 49];
  47205. allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
  47206. allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
  47207. allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
  47208. var Token3 = class {
  47209. constructor(state) {
  47210. this.type = state.type;
  47211. this.value = state.value;
  47212. this.start = state.start;
  47213. this.end = state.end;
  47214. this.loc = new SourceLocation3(state.startLoc, state.endLoc);
  47215. }
  47216. };
  47217. var Tokenizer = class extends ParserError {
  47218. constructor(options, input) {
  47219. super();
  47220. this.isLookahead = void 0;
  47221. this.tokens = [];
  47222. this.state = new State2();
  47223. this.state.init(options);
  47224. this.input = input;
  47225. this.length = input.length;
  47226. this.isLookahead = false;
  47227. }
  47228. pushToken(token) {
  47229. this.tokens.length = this.state.tokensLength;
  47230. this.tokens.push(token);
  47231. ++this.state.tokensLength;
  47232. }
  47233. next() {
  47234. this.checkKeywordEscapes();
  47235. if (this.options.tokens) {
  47236. this.pushToken(new Token3(this.state));
  47237. }
  47238. this.state.lastTokEnd = this.state.end;
  47239. this.state.lastTokStart = this.state.start;
  47240. this.state.lastTokEndLoc = this.state.endLoc;
  47241. this.state.lastTokStartLoc = this.state.startLoc;
  47242. this.nextToken();
  47243. }
  47244. eat(type) {
  47245. if (this.match(type)) {
  47246. this.next();
  47247. return true;
  47248. } else {
  47249. return false;
  47250. }
  47251. }
  47252. match(type) {
  47253. return this.state.type === type;
  47254. }
  47255. createLookaheadState(state) {
  47256. return {
  47257. pos: state.pos,
  47258. value: null,
  47259. type: state.type,
  47260. start: state.start,
  47261. end: state.end,
  47262. lastTokEnd: state.end,
  47263. context: [this.curContext()],
  47264. exprAllowed: state.exprAllowed,
  47265. inType: state.inType
  47266. };
  47267. }
  47268. lookahead() {
  47269. const old = this.state;
  47270. this.state = this.createLookaheadState(old);
  47271. this.isLookahead = true;
  47272. this.nextToken();
  47273. this.isLookahead = false;
  47274. const curr = this.state;
  47275. this.state = old;
  47276. return curr;
  47277. }
  47278. nextTokenStart() {
  47279. return this.nextTokenStartSince(this.state.pos);
  47280. }
  47281. nextTokenStartSince(pos) {
  47282. skipWhiteSpace2.lastIndex = pos;
  47283. const skip = skipWhiteSpace2.exec(this.input);
  47284. return pos + skip[0].length;
  47285. }
  47286. lookaheadCharCode() {
  47287. return this.input.charCodeAt(this.nextTokenStart());
  47288. }
  47289. codePointAtPos(pos) {
  47290. let cp = this.input.charCodeAt(pos);
  47291. if ((cp & 64512) === 55296 && ++pos < this.input.length) {
  47292. const trail = this.input.charCodeAt(pos);
  47293. if ((trail & 64512) === 56320) {
  47294. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  47295. }
  47296. }
  47297. return cp;
  47298. }
  47299. setStrict(strict) {
  47300. this.state.strict = strict;
  47301. if (strict) {
  47302. this.state.strictErrors.forEach((message, pos) => this.raise(pos, message));
  47303. this.state.strictErrors.clear();
  47304. }
  47305. }
  47306. curContext() {
  47307. return this.state.context[this.state.context.length - 1];
  47308. }
  47309. nextToken() {
  47310. const curContext = this.curContext();
  47311. if (!curContext.preserveSpace)
  47312. this.skipSpace();
  47313. this.state.start = this.state.pos;
  47314. if (!this.isLookahead)
  47315. this.state.startLoc = this.state.curPosition();
  47316. if (this.state.pos >= this.length) {
  47317. this.finishToken(types$12.eof);
  47318. return;
  47319. }
  47320. if (curContext === types2.template) {
  47321. this.readTmplToken();
  47322. } else {
  47323. this.getTokenFromCode(this.codePointAtPos(this.state.pos));
  47324. }
  47325. }
  47326. pushComment(block, text5, start3, end, startLoc, endLoc) {
  47327. const comment2 = {
  47328. type: block ? "CommentBlock" : "CommentLine",
  47329. value: text5,
  47330. start: start3,
  47331. end,
  47332. loc: new SourceLocation3(startLoc, endLoc)
  47333. };
  47334. if (this.options.tokens)
  47335. this.pushToken(comment2);
  47336. this.state.comments.push(comment2);
  47337. this.addComment(comment2);
  47338. }
  47339. skipBlockComment() {
  47340. let startLoc;
  47341. if (!this.isLookahead)
  47342. startLoc = this.state.curPosition();
  47343. const start3 = this.state.pos;
  47344. const end = this.input.indexOf("*/", this.state.pos + 2);
  47345. if (end === -1)
  47346. throw this.raise(start3, ErrorMessages.UnterminatedComment);
  47347. this.state.pos = end + 2;
  47348. lineBreakG2.lastIndex = start3;
  47349. let match;
  47350. while ((match = lineBreakG2.exec(this.input)) && match.index < this.state.pos) {
  47351. ++this.state.curLine;
  47352. this.state.lineStart = match.index + match[0].length;
  47353. }
  47354. if (this.isLookahead)
  47355. return;
  47356. this.pushComment(true, this.input.slice(start3 + 2, end), start3, this.state.pos, startLoc, this.state.curPosition());
  47357. }
  47358. skipLineComment(startSkip) {
  47359. const start3 = this.state.pos;
  47360. let startLoc;
  47361. if (!this.isLookahead)
  47362. startLoc = this.state.curPosition();
  47363. let ch = this.input.charCodeAt(this.state.pos += startSkip);
  47364. if (this.state.pos < this.length) {
  47365. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  47366. ch = this.input.charCodeAt(this.state.pos);
  47367. }
  47368. }
  47369. if (this.isLookahead)
  47370. return;
  47371. this.pushComment(false, this.input.slice(start3 + startSkip, this.state.pos), start3, this.state.pos, startLoc, this.state.curPosition());
  47372. }
  47373. skipSpace() {
  47374. loop:
  47375. while (this.state.pos < this.length) {
  47376. const ch = this.input.charCodeAt(this.state.pos);
  47377. switch (ch) {
  47378. case 32:
  47379. case 160:
  47380. case 9:
  47381. ++this.state.pos;
  47382. break;
  47383. case 13:
  47384. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  47385. ++this.state.pos;
  47386. }
  47387. case 10:
  47388. case 8232:
  47389. case 8233:
  47390. ++this.state.pos;
  47391. ++this.state.curLine;
  47392. this.state.lineStart = this.state.pos;
  47393. break;
  47394. case 47:
  47395. switch (this.input.charCodeAt(this.state.pos + 1)) {
  47396. case 42:
  47397. this.skipBlockComment();
  47398. break;
  47399. case 47:
  47400. this.skipLineComment(2);
  47401. break;
  47402. default:
  47403. break loop;
  47404. }
  47405. break;
  47406. default:
  47407. if (isWhitespace(ch)) {
  47408. ++this.state.pos;
  47409. } else {
  47410. break loop;
  47411. }
  47412. }
  47413. }
  47414. }
  47415. finishToken(type, val) {
  47416. this.state.end = this.state.pos;
  47417. const prevType = this.state.type;
  47418. this.state.type = type;
  47419. this.state.value = val;
  47420. if (!this.isLookahead) {
  47421. this.state.endLoc = this.state.curPosition();
  47422. this.updateContext(prevType);
  47423. }
  47424. }
  47425. readToken_numberSign() {
  47426. if (this.state.pos === 0 && this.readToken_interpreter()) {
  47427. return;
  47428. }
  47429. const nextPos = this.state.pos + 1;
  47430. const next = this.codePointAtPos(nextPos);
  47431. if (next >= 48 && next <= 57) {
  47432. throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash);
  47433. }
  47434. if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
  47435. this.expectPlugin("recordAndTuple");
  47436. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
  47437. throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType);
  47438. }
  47439. if (next === 123) {
  47440. this.finishToken(types$12.braceHashL);
  47441. } else {
  47442. this.finishToken(types$12.bracketHashL);
  47443. }
  47444. this.state.pos += 2;
  47445. } else if (isIdentifierStart2(next)) {
  47446. ++this.state.pos;
  47447. this.finishToken(types$12.privateName, this.readWord1(next));
  47448. } else if (next === 92) {
  47449. ++this.state.pos;
  47450. this.finishToken(types$12.privateName, this.readWord1());
  47451. } else {
  47452. this.finishOp(types$12.hash, 1);
  47453. }
  47454. }
  47455. readToken_dot() {
  47456. const next = this.input.charCodeAt(this.state.pos + 1);
  47457. if (next >= 48 && next <= 57) {
  47458. this.readNumber(true);
  47459. return;
  47460. }
  47461. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  47462. this.state.pos += 3;
  47463. this.finishToken(types$12.ellipsis);
  47464. } else {
  47465. ++this.state.pos;
  47466. this.finishToken(types$12.dot);
  47467. }
  47468. }
  47469. readToken_slash() {
  47470. if (this.state.exprAllowed && !this.state.inType) {
  47471. ++this.state.pos;
  47472. this.readRegexp();
  47473. return;
  47474. }
  47475. const next = this.input.charCodeAt(this.state.pos + 1);
  47476. if (next === 61) {
  47477. this.finishOp(types$12.assign, 2);
  47478. } else {
  47479. this.finishOp(types$12.slash, 1);
  47480. }
  47481. }
  47482. readToken_interpreter() {
  47483. if (this.state.pos !== 0 || this.length < 2)
  47484. return false;
  47485. let ch = this.input.charCodeAt(this.state.pos + 1);
  47486. if (ch !== 33)
  47487. return false;
  47488. const start3 = this.state.pos;
  47489. this.state.pos += 1;
  47490. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  47491. ch = this.input.charCodeAt(this.state.pos);
  47492. }
  47493. const value = this.input.slice(start3 + 2, this.state.pos);
  47494. this.finishToken(types$12.interpreterDirective, value);
  47495. return true;
  47496. }
  47497. readToken_mult_modulo(code2) {
  47498. let type = code2 === 42 ? types$12.star : types$12.modulo;
  47499. let width = 1;
  47500. let next = this.input.charCodeAt(this.state.pos + 1);
  47501. const exprAllowed = this.state.exprAllowed;
  47502. if (code2 === 42 && next === 42) {
  47503. width++;
  47504. next = this.input.charCodeAt(this.state.pos + 2);
  47505. type = types$12.exponent;
  47506. }
  47507. if (next === 61 && !exprAllowed) {
  47508. width++;
  47509. type = types$12.assign;
  47510. }
  47511. this.finishOp(type, width);
  47512. }
  47513. readToken_pipe_amp(code2) {
  47514. const next = this.input.charCodeAt(this.state.pos + 1);
  47515. if (next === code2) {
  47516. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  47517. this.finishOp(types$12.assign, 3);
  47518. } else {
  47519. this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
  47520. }
  47521. return;
  47522. }
  47523. if (code2 === 124) {
  47524. if (next === 62) {
  47525. this.finishOp(types$12.pipeline, 2);
  47526. return;
  47527. }
  47528. if (this.hasPlugin("recordAndTuple") && next === 125) {
  47529. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  47530. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType);
  47531. }
  47532. this.finishOp(types$12.braceBarR, 2);
  47533. return;
  47534. }
  47535. if (this.hasPlugin("recordAndTuple") && next === 93) {
  47536. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  47537. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType);
  47538. }
  47539. this.finishOp(types$12.bracketBarR, 2);
  47540. return;
  47541. }
  47542. }
  47543. if (next === 61) {
  47544. this.finishOp(types$12.assign, 2);
  47545. return;
  47546. }
  47547. this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
  47548. }
  47549. readToken_caret() {
  47550. const next = this.input.charCodeAt(this.state.pos + 1);
  47551. if (next === 61) {
  47552. this.finishOp(types$12.assign, 2);
  47553. } else {
  47554. this.finishOp(types$12.bitwiseXOR, 1);
  47555. }
  47556. }
  47557. readToken_plus_min(code2) {
  47558. const next = this.input.charCodeAt(this.state.pos + 1);
  47559. if (next === code2) {
  47560. if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || this.hasPrecedingLineBreak())) {
  47561. this.skipLineComment(3);
  47562. this.skipSpace();
  47563. this.nextToken();
  47564. return;
  47565. }
  47566. this.finishOp(types$12.incDec, 2);
  47567. return;
  47568. }
  47569. if (next === 61) {
  47570. this.finishOp(types$12.assign, 2);
  47571. } else {
  47572. this.finishOp(types$12.plusMin, 1);
  47573. }
  47574. }
  47575. readToken_lt_gt(code2) {
  47576. const next = this.input.charCodeAt(this.state.pos + 1);
  47577. let size = 1;
  47578. if (next === code2) {
  47579. size = code2 === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  47580. if (this.input.charCodeAt(this.state.pos + size) === 61) {
  47581. this.finishOp(types$12.assign, size + 1);
  47582. return;
  47583. }
  47584. this.finishOp(types$12.bitShift, size);
  47585. return;
  47586. }
  47587. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
  47588. this.skipLineComment(4);
  47589. this.skipSpace();
  47590. this.nextToken();
  47591. return;
  47592. }
  47593. if (next === 61) {
  47594. size = 2;
  47595. }
  47596. this.finishOp(types$12.relational, size);
  47597. }
  47598. readToken_eq_excl(code2) {
  47599. const next = this.input.charCodeAt(this.state.pos + 1);
  47600. if (next === 61) {
  47601. this.finishOp(types$12.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  47602. return;
  47603. }
  47604. if (code2 === 61 && next === 62) {
  47605. this.state.pos += 2;
  47606. this.finishToken(types$12.arrow);
  47607. return;
  47608. }
  47609. this.finishOp(code2 === 61 ? types$12.eq : types$12.bang, 1);
  47610. }
  47611. readToken_question() {
  47612. const next = this.input.charCodeAt(this.state.pos + 1);
  47613. const next2 = this.input.charCodeAt(this.state.pos + 2);
  47614. if (next === 63) {
  47615. if (next2 === 61) {
  47616. this.finishOp(types$12.assign, 3);
  47617. } else {
  47618. this.finishOp(types$12.nullishCoalescing, 2);
  47619. }
  47620. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  47621. this.state.pos += 2;
  47622. this.finishToken(types$12.questionDot);
  47623. } else {
  47624. ++this.state.pos;
  47625. this.finishToken(types$12.question);
  47626. }
  47627. }
  47628. getTokenFromCode(code2) {
  47629. switch (code2) {
  47630. case 46:
  47631. this.readToken_dot();
  47632. return;
  47633. case 40:
  47634. ++this.state.pos;
  47635. this.finishToken(types$12.parenL);
  47636. return;
  47637. case 41:
  47638. ++this.state.pos;
  47639. this.finishToken(types$12.parenR);
  47640. return;
  47641. case 59:
  47642. ++this.state.pos;
  47643. this.finishToken(types$12.semi);
  47644. return;
  47645. case 44:
  47646. ++this.state.pos;
  47647. this.finishToken(types$12.comma);
  47648. return;
  47649. case 91:
  47650. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  47651. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  47652. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType);
  47653. }
  47654. this.finishToken(types$12.bracketBarL);
  47655. this.state.pos += 2;
  47656. } else {
  47657. ++this.state.pos;
  47658. this.finishToken(types$12.bracketL);
  47659. }
  47660. return;
  47661. case 93:
  47662. ++this.state.pos;
  47663. this.finishToken(types$12.bracketR);
  47664. return;
  47665. case 123:
  47666. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  47667. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  47668. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType);
  47669. }
  47670. this.finishToken(types$12.braceBarL);
  47671. this.state.pos += 2;
  47672. } else {
  47673. ++this.state.pos;
  47674. this.finishToken(types$12.braceL);
  47675. }
  47676. return;
  47677. case 125:
  47678. ++this.state.pos;
  47679. this.finishToken(types$12.braceR);
  47680. return;
  47681. case 58:
  47682. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  47683. this.finishOp(types$12.doubleColon, 2);
  47684. } else {
  47685. ++this.state.pos;
  47686. this.finishToken(types$12.colon);
  47687. }
  47688. return;
  47689. case 63:
  47690. this.readToken_question();
  47691. return;
  47692. case 96:
  47693. ++this.state.pos;
  47694. this.finishToken(types$12.backQuote);
  47695. return;
  47696. case 48: {
  47697. const next = this.input.charCodeAt(this.state.pos + 1);
  47698. if (next === 120 || next === 88) {
  47699. this.readRadixNumber(16);
  47700. return;
  47701. }
  47702. if (next === 111 || next === 79) {
  47703. this.readRadixNumber(8);
  47704. return;
  47705. }
  47706. if (next === 98 || next === 66) {
  47707. this.readRadixNumber(2);
  47708. return;
  47709. }
  47710. }
  47711. case 49:
  47712. case 50:
  47713. case 51:
  47714. case 52:
  47715. case 53:
  47716. case 54:
  47717. case 55:
  47718. case 56:
  47719. case 57:
  47720. this.readNumber(false);
  47721. return;
  47722. case 34:
  47723. case 39:
  47724. this.readString(code2);
  47725. return;
  47726. case 47:
  47727. this.readToken_slash();
  47728. return;
  47729. case 37:
  47730. case 42:
  47731. this.readToken_mult_modulo(code2);
  47732. return;
  47733. case 124:
  47734. case 38:
  47735. this.readToken_pipe_amp(code2);
  47736. return;
  47737. case 94:
  47738. this.readToken_caret();
  47739. return;
  47740. case 43:
  47741. case 45:
  47742. this.readToken_plus_min(code2);
  47743. return;
  47744. case 60:
  47745. case 62:
  47746. this.readToken_lt_gt(code2);
  47747. return;
  47748. case 61:
  47749. case 33:
  47750. this.readToken_eq_excl(code2);
  47751. return;
  47752. case 126:
  47753. this.finishOp(types$12.tilde, 1);
  47754. return;
  47755. case 64:
  47756. ++this.state.pos;
  47757. this.finishToken(types$12.at);
  47758. return;
  47759. case 35:
  47760. this.readToken_numberSign();
  47761. return;
  47762. case 92:
  47763. this.readWord();
  47764. return;
  47765. default:
  47766. if (isIdentifierStart2(code2)) {
  47767. this.readWord(code2);
  47768. return;
  47769. }
  47770. }
  47771. throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code2));
  47772. }
  47773. finishOp(type, size) {
  47774. const str = this.input.slice(this.state.pos, this.state.pos + size);
  47775. this.state.pos += size;
  47776. this.finishToken(type, str);
  47777. }
  47778. readRegexp() {
  47779. const start3 = this.state.pos;
  47780. let escaped, inClass;
  47781. for (; ; ) {
  47782. if (this.state.pos >= this.length) {
  47783. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  47784. }
  47785. const ch = this.input.charAt(this.state.pos);
  47786. if (lineBreak2.test(ch)) {
  47787. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  47788. }
  47789. if (escaped) {
  47790. escaped = false;
  47791. } else {
  47792. if (ch === "[") {
  47793. inClass = true;
  47794. } else if (ch === "]" && inClass) {
  47795. inClass = false;
  47796. } else if (ch === "/" && !inClass) {
  47797. break;
  47798. }
  47799. escaped = ch === "\\";
  47800. }
  47801. ++this.state.pos;
  47802. }
  47803. const content3 = this.input.slice(start3, this.state.pos);
  47804. ++this.state.pos;
  47805. let mods = "";
  47806. while (this.state.pos < this.length) {
  47807. const char = this.input[this.state.pos];
  47808. const charCode = this.codePointAtPos(this.state.pos);
  47809. if (VALID_REGEX_FLAGS.has(char)) {
  47810. if (mods.indexOf(char) > -1) {
  47811. this.raise(this.state.pos + 1, ErrorMessages.DuplicateRegExpFlags);
  47812. }
  47813. } else if (isIdentifierChar2(charCode) || charCode === 92) {
  47814. this.raise(this.state.pos + 1, ErrorMessages.MalformedRegExpFlags);
  47815. } else {
  47816. break;
  47817. }
  47818. ++this.state.pos;
  47819. mods += char;
  47820. }
  47821. this.finishToken(types$12.regexp, {
  47822. pattern: content3,
  47823. flags: mods
  47824. });
  47825. }
  47826. readInt(radix, len, forceLen, allowNumSeparator = true) {
  47827. const start3 = this.state.pos;
  47828. const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  47829. const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
  47830. let invalid2 = false;
  47831. let total = 0;
  47832. for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  47833. const code2 = this.input.charCodeAt(this.state.pos);
  47834. let val;
  47835. if (code2 === 95) {
  47836. const prev = this.input.charCodeAt(this.state.pos - 1);
  47837. const next = this.input.charCodeAt(this.state.pos + 1);
  47838. if (allowedSiblings.indexOf(next) === -1) {
  47839. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  47840. } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
  47841. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  47842. }
  47843. if (!allowNumSeparator) {
  47844. this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence);
  47845. }
  47846. ++this.state.pos;
  47847. continue;
  47848. }
  47849. if (code2 >= 97) {
  47850. val = code2 - 97 + 10;
  47851. } else if (code2 >= 65) {
  47852. val = code2 - 65 + 10;
  47853. } else if (_isDigit(code2)) {
  47854. val = code2 - 48;
  47855. } else {
  47856. val = Infinity;
  47857. }
  47858. if (val >= radix) {
  47859. if (this.options.errorRecovery && val <= 9) {
  47860. val = 0;
  47861. this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix);
  47862. } else if (forceLen) {
  47863. val = 0;
  47864. invalid2 = true;
  47865. } else {
  47866. break;
  47867. }
  47868. }
  47869. ++this.state.pos;
  47870. total = total * radix + val;
  47871. }
  47872. if (this.state.pos === start3 || len != null && this.state.pos - start3 !== len || invalid2) {
  47873. return null;
  47874. }
  47875. return total;
  47876. }
  47877. readRadixNumber(radix) {
  47878. const start3 = this.state.pos;
  47879. let isBigInt = false;
  47880. this.state.pos += 2;
  47881. const val = this.readInt(radix);
  47882. if (val == null) {
  47883. this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix);
  47884. }
  47885. const next = this.input.charCodeAt(this.state.pos);
  47886. if (next === 110) {
  47887. ++this.state.pos;
  47888. isBigInt = true;
  47889. } else if (next === 109) {
  47890. throw this.raise(start3, ErrorMessages.InvalidDecimal);
  47891. }
  47892. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  47893. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  47894. }
  47895. if (isBigInt) {
  47896. const str = this.input.slice(start3, this.state.pos).replace(/[_n]/g, "");
  47897. this.finishToken(types$12.bigint, str);
  47898. return;
  47899. }
  47900. this.finishToken(types$12.num, val);
  47901. }
  47902. readNumber(startsWithDot) {
  47903. const start3 = this.state.pos;
  47904. let isFloat = false;
  47905. let isBigInt = false;
  47906. let isDecimal2 = false;
  47907. let hasExponent = false;
  47908. let isOctal = false;
  47909. if (!startsWithDot && this.readInt(10) === null) {
  47910. this.raise(start3, ErrorMessages.InvalidNumber);
  47911. }
  47912. const hasLeadingZero = this.state.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  47913. if (hasLeadingZero) {
  47914. const integer = this.input.slice(start3, this.state.pos);
  47915. this.recordStrictModeErrors(start3, ErrorMessages.StrictOctalLiteral);
  47916. if (!this.state.strict) {
  47917. const underscorePos = integer.indexOf("_");
  47918. if (underscorePos > 0) {
  47919. this.raise(underscorePos + start3, ErrorMessages.ZeroDigitNumericSeparator);
  47920. }
  47921. }
  47922. isOctal = hasLeadingZero && !/[89]/.test(integer);
  47923. }
  47924. let next = this.input.charCodeAt(this.state.pos);
  47925. if (next === 46 && !isOctal) {
  47926. ++this.state.pos;
  47927. this.readInt(10);
  47928. isFloat = true;
  47929. next = this.input.charCodeAt(this.state.pos);
  47930. }
  47931. if ((next === 69 || next === 101) && !isOctal) {
  47932. next = this.input.charCodeAt(++this.state.pos);
  47933. if (next === 43 || next === 45) {
  47934. ++this.state.pos;
  47935. }
  47936. if (this.readInt(10) === null) {
  47937. this.raise(start3, ErrorMessages.InvalidOrMissingExponent);
  47938. }
  47939. isFloat = true;
  47940. hasExponent = true;
  47941. next = this.input.charCodeAt(this.state.pos);
  47942. }
  47943. if (next === 110) {
  47944. if (isFloat || hasLeadingZero) {
  47945. this.raise(start3, ErrorMessages.InvalidBigIntLiteral);
  47946. }
  47947. ++this.state.pos;
  47948. isBigInt = true;
  47949. }
  47950. if (next === 109) {
  47951. this.expectPlugin("decimal", this.state.pos);
  47952. if (hasExponent || hasLeadingZero) {
  47953. this.raise(start3, ErrorMessages.InvalidDecimal);
  47954. }
  47955. ++this.state.pos;
  47956. isDecimal2 = true;
  47957. }
  47958. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  47959. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  47960. }
  47961. const str = this.input.slice(start3, this.state.pos).replace(/[_mn]/g, "");
  47962. if (isBigInt) {
  47963. this.finishToken(types$12.bigint, str);
  47964. return;
  47965. }
  47966. if (isDecimal2) {
  47967. this.finishToken(types$12.decimal, str);
  47968. return;
  47969. }
  47970. const val = isOctal ? parseInt(str, 8) : parseFloat(str);
  47971. this.finishToken(types$12.num, val);
  47972. }
  47973. readCodePoint(throwOnInvalid) {
  47974. const ch = this.input.charCodeAt(this.state.pos);
  47975. let code2;
  47976. if (ch === 123) {
  47977. const codePos = ++this.state.pos;
  47978. code2 = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
  47979. ++this.state.pos;
  47980. if (code2 !== null && code2 > 1114111) {
  47981. if (throwOnInvalid) {
  47982. this.raise(codePos, ErrorMessages.InvalidCodePoint);
  47983. } else {
  47984. return null;
  47985. }
  47986. }
  47987. } else {
  47988. code2 = this.readHexChar(4, false, throwOnInvalid);
  47989. }
  47990. return code2;
  47991. }
  47992. readString(quote) {
  47993. let out = "", chunkStart = ++this.state.pos;
  47994. for (; ; ) {
  47995. if (this.state.pos >= this.length) {
  47996. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  47997. }
  47998. const ch = this.input.charCodeAt(this.state.pos);
  47999. if (ch === quote)
  48000. break;
  48001. if (ch === 92) {
  48002. out += this.input.slice(chunkStart, this.state.pos);
  48003. out += this.readEscapedChar(false);
  48004. chunkStart = this.state.pos;
  48005. } else if (ch === 8232 || ch === 8233) {
  48006. ++this.state.pos;
  48007. ++this.state.curLine;
  48008. this.state.lineStart = this.state.pos;
  48009. } else if (isNewLine2(ch)) {
  48010. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  48011. } else {
  48012. ++this.state.pos;
  48013. }
  48014. }
  48015. out += this.input.slice(chunkStart, this.state.pos++);
  48016. this.finishToken(types$12.string, out);
  48017. }
  48018. readTmplToken() {
  48019. let out = "", chunkStart = this.state.pos, containsInvalid = false;
  48020. for (; ; ) {
  48021. if (this.state.pos >= this.length) {
  48022. throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate);
  48023. }
  48024. const ch = this.input.charCodeAt(this.state.pos);
  48025. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  48026. if (this.state.pos === this.state.start && this.match(types$12.template)) {
  48027. if (ch === 36) {
  48028. this.state.pos += 2;
  48029. this.finishToken(types$12.dollarBraceL);
  48030. return;
  48031. } else {
  48032. ++this.state.pos;
  48033. this.finishToken(types$12.backQuote);
  48034. return;
  48035. }
  48036. }
  48037. out += this.input.slice(chunkStart, this.state.pos);
  48038. this.finishToken(types$12.template, containsInvalid ? null : out);
  48039. return;
  48040. }
  48041. if (ch === 92) {
  48042. out += this.input.slice(chunkStart, this.state.pos);
  48043. const escaped = this.readEscapedChar(true);
  48044. if (escaped === null) {
  48045. containsInvalid = true;
  48046. } else {
  48047. out += escaped;
  48048. }
  48049. chunkStart = this.state.pos;
  48050. } else if (isNewLine2(ch)) {
  48051. out += this.input.slice(chunkStart, this.state.pos);
  48052. ++this.state.pos;
  48053. switch (ch) {
  48054. case 13:
  48055. if (this.input.charCodeAt(this.state.pos) === 10) {
  48056. ++this.state.pos;
  48057. }
  48058. case 10:
  48059. out += "\n";
  48060. break;
  48061. default:
  48062. out += String.fromCharCode(ch);
  48063. break;
  48064. }
  48065. ++this.state.curLine;
  48066. this.state.lineStart = this.state.pos;
  48067. chunkStart = this.state.pos;
  48068. } else {
  48069. ++this.state.pos;
  48070. }
  48071. }
  48072. }
  48073. recordStrictModeErrors(pos, message) {
  48074. if (this.state.strict && !this.state.strictErrors.has(pos)) {
  48075. this.raise(pos, message);
  48076. } else {
  48077. this.state.strictErrors.set(pos, message);
  48078. }
  48079. }
  48080. readEscapedChar(inTemplate) {
  48081. const throwOnInvalid = !inTemplate;
  48082. const ch = this.input.charCodeAt(++this.state.pos);
  48083. ++this.state.pos;
  48084. switch (ch) {
  48085. case 110:
  48086. return "\n";
  48087. case 114:
  48088. return "\r";
  48089. case 120: {
  48090. const code2 = this.readHexChar(2, false, throwOnInvalid);
  48091. return code2 === null ? null : String.fromCharCode(code2);
  48092. }
  48093. case 117: {
  48094. const code2 = this.readCodePoint(throwOnInvalid);
  48095. return code2 === null ? null : String.fromCodePoint(code2);
  48096. }
  48097. case 116:
  48098. return " ";
  48099. case 98:
  48100. return "\b";
  48101. case 118:
  48102. return "\v";
  48103. case 102:
  48104. return "\f";
  48105. case 13:
  48106. if (this.input.charCodeAt(this.state.pos) === 10) {
  48107. ++this.state.pos;
  48108. }
  48109. case 10:
  48110. this.state.lineStart = this.state.pos;
  48111. ++this.state.curLine;
  48112. case 8232:
  48113. case 8233:
  48114. return "";
  48115. case 56:
  48116. case 57:
  48117. if (inTemplate) {
  48118. return null;
  48119. } else {
  48120. this.recordStrictModeErrors(this.state.pos - 1, ErrorMessages.StrictNumericEscape);
  48121. }
  48122. default:
  48123. if (ch >= 48 && ch <= 55) {
  48124. const codePos = this.state.pos - 1;
  48125. const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
  48126. let octalStr = match[0];
  48127. let octal = parseInt(octalStr, 8);
  48128. if (octal > 255) {
  48129. octalStr = octalStr.slice(0, -1);
  48130. octal = parseInt(octalStr, 8);
  48131. }
  48132. this.state.pos += octalStr.length - 1;
  48133. const next = this.input.charCodeAt(this.state.pos);
  48134. if (octalStr !== "0" || next === 56 || next === 57) {
  48135. if (inTemplate) {
  48136. return null;
  48137. } else {
  48138. this.recordStrictModeErrors(codePos, ErrorMessages.StrictNumericEscape);
  48139. }
  48140. }
  48141. return String.fromCharCode(octal);
  48142. }
  48143. return String.fromCharCode(ch);
  48144. }
  48145. }
  48146. readHexChar(len, forceLen, throwOnInvalid) {
  48147. const codePos = this.state.pos;
  48148. const n = this.readInt(16, len, forceLen, false);
  48149. if (n === null) {
  48150. if (throwOnInvalid) {
  48151. this.raise(codePos, ErrorMessages.InvalidEscapeSequence);
  48152. } else {
  48153. this.state.pos = codePos - 1;
  48154. }
  48155. }
  48156. return n;
  48157. }
  48158. readWord1(firstCode) {
  48159. this.state.containsEsc = false;
  48160. let word = "";
  48161. const start3 = this.state.pos;
  48162. let chunkStart = this.state.pos;
  48163. if (firstCode !== void 0) {
  48164. this.state.pos += firstCode <= 65535 ? 1 : 2;
  48165. }
  48166. while (this.state.pos < this.length) {
  48167. const ch = this.codePointAtPos(this.state.pos);
  48168. if (isIdentifierChar2(ch)) {
  48169. this.state.pos += ch <= 65535 ? 1 : 2;
  48170. } else if (ch === 92) {
  48171. this.state.containsEsc = true;
  48172. word += this.input.slice(chunkStart, this.state.pos);
  48173. const escStart = this.state.pos;
  48174. const identifierCheck = this.state.pos === start3 ? isIdentifierStart2 : isIdentifierChar2;
  48175. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  48176. this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape);
  48177. chunkStart = this.state.pos - 1;
  48178. continue;
  48179. }
  48180. ++this.state.pos;
  48181. const esc = this.readCodePoint(true);
  48182. if (esc !== null) {
  48183. if (!identifierCheck(esc)) {
  48184. this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier);
  48185. }
  48186. word += String.fromCodePoint(esc);
  48187. }
  48188. chunkStart = this.state.pos;
  48189. } else {
  48190. break;
  48191. }
  48192. }
  48193. return word + this.input.slice(chunkStart, this.state.pos);
  48194. }
  48195. readWord(firstCode) {
  48196. const word = this.readWord1(firstCode);
  48197. const type = keywords$12.get(word) || types$12.name;
  48198. this.finishToken(type, word);
  48199. }
  48200. checkKeywordEscapes() {
  48201. const kw2 = this.state.type.keyword;
  48202. if (kw2 && this.state.containsEsc) {
  48203. this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, kw2);
  48204. }
  48205. }
  48206. braceIsBlock(prevType) {
  48207. const parent = this.curContext();
  48208. if (parent === types2.functionExpression || parent === types2.functionStatement) {
  48209. return true;
  48210. }
  48211. if (prevType === types$12.colon && (parent === types2.braceStatement || parent === types2.braceExpression)) {
  48212. return !parent.isExpr;
  48213. }
  48214. if (prevType === types$12._return || prevType === types$12.name && this.state.exprAllowed) {
  48215. return this.hasPrecedingLineBreak();
  48216. }
  48217. if (prevType === types$12._else || prevType === types$12.semi || prevType === types$12.eof || prevType === types$12.parenR || prevType === types$12.arrow) {
  48218. return true;
  48219. }
  48220. if (prevType === types$12.braceL) {
  48221. return parent === types2.braceStatement;
  48222. }
  48223. if (prevType === types$12._var || prevType === types$12._const || prevType === types$12.name) {
  48224. return false;
  48225. }
  48226. if (prevType === types$12.relational) {
  48227. return true;
  48228. }
  48229. return !this.state.exprAllowed;
  48230. }
  48231. updateContext(prevType) {
  48232. const type = this.state.type;
  48233. let update;
  48234. if (type.keyword && (prevType === types$12.dot || prevType === types$12.questionDot)) {
  48235. this.state.exprAllowed = false;
  48236. } else if (update = type.updateContext) {
  48237. update.call(this, prevType);
  48238. } else {
  48239. this.state.exprAllowed = type.beforeExpr;
  48240. }
  48241. }
  48242. };
  48243. var ClassScope = class {
  48244. constructor() {
  48245. this.privateNames = /* @__PURE__ */ new Set();
  48246. this.loneAccessors = /* @__PURE__ */ new Map();
  48247. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  48248. }
  48249. };
  48250. var ClassScopeHandler = class {
  48251. constructor(raise2) {
  48252. this.stack = [];
  48253. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  48254. this.raise = raise2;
  48255. }
  48256. current() {
  48257. return this.stack[this.stack.length - 1];
  48258. }
  48259. enter() {
  48260. this.stack.push(new ClassScope());
  48261. }
  48262. exit() {
  48263. const oldClassScope = this.stack.pop();
  48264. const current2 = this.current();
  48265. for (const [name2, pos] of Array.from(oldClassScope.undefinedPrivateNames)) {
  48266. if (current2) {
  48267. if (!current2.undefinedPrivateNames.has(name2)) {
  48268. current2.undefinedPrivateNames.set(name2, pos);
  48269. }
  48270. } else {
  48271. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  48272. }
  48273. }
  48274. }
  48275. declarePrivateName(name2, elementType, pos) {
  48276. const classScope = this.current();
  48277. let redefined = classScope.privateNames.has(name2);
  48278. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  48279. const accessor = redefined && classScope.loneAccessors.get(name2);
  48280. if (accessor) {
  48281. const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  48282. const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  48283. const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  48284. const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  48285. redefined = oldKind === newKind || oldStatic !== newStatic;
  48286. if (!redefined)
  48287. classScope.loneAccessors.delete(name2);
  48288. } else if (!redefined) {
  48289. classScope.loneAccessors.set(name2, elementType);
  48290. }
  48291. }
  48292. if (redefined) {
  48293. this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name2);
  48294. }
  48295. classScope.privateNames.add(name2);
  48296. classScope.undefinedPrivateNames.delete(name2);
  48297. }
  48298. usePrivateName(name2, pos) {
  48299. let classScope;
  48300. for (classScope of this.stack) {
  48301. if (classScope.privateNames.has(name2))
  48302. return;
  48303. }
  48304. if (classScope) {
  48305. classScope.undefinedPrivateNames.set(name2, pos);
  48306. } else {
  48307. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  48308. }
  48309. }
  48310. };
  48311. var kExpression = 0;
  48312. var kMaybeArrowParameterDeclaration = 1;
  48313. var kMaybeAsyncArrowParameterDeclaration = 2;
  48314. var kParameterDeclaration = 3;
  48315. var ExpressionScope = class {
  48316. constructor(type = kExpression) {
  48317. this.type = void 0;
  48318. this.type = type;
  48319. }
  48320. canBeArrowParameterDeclaration() {
  48321. return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
  48322. }
  48323. isCertainlyParameterDeclaration() {
  48324. return this.type === kParameterDeclaration;
  48325. }
  48326. };
  48327. var ArrowHeadParsingScope = class extends ExpressionScope {
  48328. constructor(type) {
  48329. super(type);
  48330. this.errors = /* @__PURE__ */ new Map();
  48331. }
  48332. recordDeclarationError(pos, template) {
  48333. this.errors.set(pos, template);
  48334. }
  48335. clearDeclarationError(pos) {
  48336. this.errors.delete(pos);
  48337. }
  48338. iterateErrors(iterator) {
  48339. this.errors.forEach(iterator);
  48340. }
  48341. };
  48342. var ExpressionScopeHandler = class {
  48343. constructor(raise2) {
  48344. this.stack = [new ExpressionScope()];
  48345. this.raise = raise2;
  48346. }
  48347. enter(scope) {
  48348. this.stack.push(scope);
  48349. }
  48350. exit() {
  48351. this.stack.pop();
  48352. }
  48353. recordParameterInitializerError(pos, template) {
  48354. const {
  48355. stack
  48356. } = this;
  48357. let i = stack.length - 1;
  48358. let scope = stack[i];
  48359. while (!scope.isCertainlyParameterDeclaration()) {
  48360. if (scope.canBeArrowParameterDeclaration()) {
  48361. scope.recordDeclarationError(pos, template);
  48362. } else {
  48363. return;
  48364. }
  48365. scope = stack[--i];
  48366. }
  48367. this.raise(pos, template);
  48368. }
  48369. recordParenthesizedIdentifierError(pos, template) {
  48370. const {
  48371. stack
  48372. } = this;
  48373. const scope = stack[stack.length - 1];
  48374. if (scope.isCertainlyParameterDeclaration()) {
  48375. this.raise(pos, template);
  48376. } else if (scope.canBeArrowParameterDeclaration()) {
  48377. scope.recordDeclarationError(pos, template);
  48378. } else {
  48379. return;
  48380. }
  48381. }
  48382. recordAsyncArrowParametersError(pos, template) {
  48383. const {
  48384. stack
  48385. } = this;
  48386. let i = stack.length - 1;
  48387. let scope = stack[i];
  48388. while (scope.canBeArrowParameterDeclaration()) {
  48389. if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
  48390. scope.recordDeclarationError(pos, template);
  48391. }
  48392. scope = stack[--i];
  48393. }
  48394. }
  48395. validateAsPattern() {
  48396. const {
  48397. stack
  48398. } = this;
  48399. const currentScope = stack[stack.length - 1];
  48400. if (!currentScope.canBeArrowParameterDeclaration())
  48401. return;
  48402. currentScope.iterateErrors((template, pos) => {
  48403. this.raise(pos, template);
  48404. let i = stack.length - 2;
  48405. let scope = stack[i];
  48406. while (scope.canBeArrowParameterDeclaration()) {
  48407. scope.clearDeclarationError(pos);
  48408. scope = stack[--i];
  48409. }
  48410. });
  48411. }
  48412. };
  48413. function newParameterDeclarationScope() {
  48414. return new ExpressionScope(kParameterDeclaration);
  48415. }
  48416. function newArrowHeadScope() {
  48417. return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
  48418. }
  48419. function newAsyncArrowScope() {
  48420. return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
  48421. }
  48422. function newExpressionScope() {
  48423. return new ExpressionScope();
  48424. }
  48425. var UtilParser = class extends Tokenizer {
  48426. addExtra(node, key, val) {
  48427. if (!node)
  48428. return;
  48429. const extra = node.extra = node.extra || {};
  48430. extra[key] = val;
  48431. }
  48432. isRelational(op) {
  48433. return this.match(types$12.relational) && this.state.value === op;
  48434. }
  48435. expectRelational(op) {
  48436. if (this.isRelational(op)) {
  48437. this.next();
  48438. } else {
  48439. this.unexpected(null, types$12.relational);
  48440. }
  48441. }
  48442. isContextual(name2) {
  48443. return this.match(types$12.name) && this.state.value === name2 && !this.state.containsEsc;
  48444. }
  48445. isUnparsedContextual(nameStart, name2) {
  48446. const nameEnd = nameStart + name2.length;
  48447. if (this.input.slice(nameStart, nameEnd) === name2) {
  48448. const nextCh = this.input.charCodeAt(nameEnd);
  48449. return !(isIdentifierChar2(nextCh) || (nextCh & 64512) === 55296);
  48450. }
  48451. return false;
  48452. }
  48453. isLookaheadContextual(name2) {
  48454. const next = this.nextTokenStart();
  48455. return this.isUnparsedContextual(next, name2);
  48456. }
  48457. eatContextual(name2) {
  48458. return this.isContextual(name2) && this.eat(types$12.name);
  48459. }
  48460. expectContextual(name2, template) {
  48461. if (!this.eatContextual(name2))
  48462. this.unexpected(null, template);
  48463. }
  48464. canInsertSemicolon() {
  48465. return this.match(types$12.eof) || this.match(types$12.braceR) || this.hasPrecedingLineBreak();
  48466. }
  48467. hasPrecedingLineBreak() {
  48468. return lineBreak2.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  48469. }
  48470. hasFollowingLineBreak() {
  48471. return lineBreak2.test(this.input.slice(this.state.end, this.nextTokenStart()));
  48472. }
  48473. isLineTerminator() {
  48474. return this.eat(types$12.semi) || this.canInsertSemicolon();
  48475. }
  48476. semicolon(allowAsi = true) {
  48477. if (allowAsi ? this.isLineTerminator() : this.eat(types$12.semi))
  48478. return;
  48479. this.raise(this.state.lastTokEnd, ErrorMessages.MissingSemicolon);
  48480. }
  48481. expect(type, pos) {
  48482. this.eat(type) || this.unexpected(pos, type);
  48483. }
  48484. assertNoSpace(message = "Unexpected space.") {
  48485. if (this.state.start > this.state.lastTokEnd) {
  48486. this.raise(this.state.lastTokEnd, {
  48487. code: ErrorCodes.SyntaxError,
  48488. reasonCode: "UnexpectedSpace",
  48489. template: message
  48490. });
  48491. }
  48492. }
  48493. unexpected(pos, messageOrType = {
  48494. code: ErrorCodes.SyntaxError,
  48495. reasonCode: "UnexpectedToken",
  48496. template: "Unexpected token"
  48497. }) {
  48498. if (messageOrType instanceof TokenType3) {
  48499. messageOrType = {
  48500. code: ErrorCodes.SyntaxError,
  48501. reasonCode: "UnexpectedToken",
  48502. template: `Unexpected token, expected "${messageOrType.label}"`
  48503. };
  48504. }
  48505. throw this.raise(pos != null ? pos : this.state.start, messageOrType);
  48506. }
  48507. expectPlugin(name2, pos) {
  48508. if (!this.hasPlugin(name2)) {
  48509. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  48510. missingPlugin: [name2]
  48511. }, `This experimental syntax requires enabling the parser plugin: '${name2}'`);
  48512. }
  48513. return true;
  48514. }
  48515. expectOnePlugin(names, pos) {
  48516. if (!names.some((n) => this.hasPlugin(n))) {
  48517. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  48518. missingPlugin: names
  48519. }, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`);
  48520. }
  48521. }
  48522. tryParse(fn, oldState = this.state.clone()) {
  48523. const abortSignal = {
  48524. node: null
  48525. };
  48526. try {
  48527. const node = fn((node2 = null) => {
  48528. abortSignal.node = node2;
  48529. throw abortSignal;
  48530. });
  48531. if (this.state.errors.length > oldState.errors.length) {
  48532. const failState = this.state;
  48533. this.state = oldState;
  48534. this.state.tokensLength = failState.tokensLength;
  48535. return {
  48536. node,
  48537. error: failState.errors[oldState.errors.length],
  48538. thrown: false,
  48539. aborted: false,
  48540. failState
  48541. };
  48542. }
  48543. return {
  48544. node,
  48545. error: null,
  48546. thrown: false,
  48547. aborted: false,
  48548. failState: null
  48549. };
  48550. } catch (error) {
  48551. const failState = this.state;
  48552. this.state = oldState;
  48553. if (error instanceof SyntaxError) {
  48554. return {
  48555. node: null,
  48556. error,
  48557. thrown: true,
  48558. aborted: false,
  48559. failState
  48560. };
  48561. }
  48562. if (error === abortSignal) {
  48563. return {
  48564. node: abortSignal.node,
  48565. error: null,
  48566. thrown: false,
  48567. aborted: true,
  48568. failState
  48569. };
  48570. }
  48571. throw error;
  48572. }
  48573. }
  48574. checkExpressionErrors(refExpressionErrors, andThrow) {
  48575. if (!refExpressionErrors)
  48576. return false;
  48577. const {
  48578. shorthandAssign,
  48579. doubleProto
  48580. } = refExpressionErrors;
  48581. if (!andThrow)
  48582. return shorthandAssign >= 0 || doubleProto >= 0;
  48583. if (shorthandAssign >= 0) {
  48584. this.unexpected(shorthandAssign);
  48585. }
  48586. if (doubleProto >= 0) {
  48587. this.raise(doubleProto, ErrorMessages.DuplicateProto);
  48588. }
  48589. }
  48590. isLiteralPropertyName() {
  48591. return this.match(types$12.name) || !!this.state.type.keyword || this.match(types$12.string) || this.match(types$12.num) || this.match(types$12.bigint) || this.match(types$12.decimal);
  48592. }
  48593. isPrivateName(node) {
  48594. return node.type === "PrivateName";
  48595. }
  48596. getPrivateNameSV(node) {
  48597. return node.id.name;
  48598. }
  48599. hasPropertyAsPrivateName(node) {
  48600. return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
  48601. }
  48602. isOptionalChain(node) {
  48603. return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression";
  48604. }
  48605. isObjectProperty(node) {
  48606. return node.type === "ObjectProperty";
  48607. }
  48608. isObjectMethod(node) {
  48609. return node.type === "ObjectMethod";
  48610. }
  48611. initializeScopes(inModule = this.options.sourceType === "module") {
  48612. const oldLabels = this.state.labels;
  48613. this.state.labels = [];
  48614. const oldExportedIdentifiers = this.state.exportedIdentifiers;
  48615. this.state.exportedIdentifiers = [];
  48616. const oldInModule = this.inModule;
  48617. this.inModule = inModule;
  48618. const oldScope = this.scope;
  48619. const ScopeHandler2 = this.getScopeHandler();
  48620. this.scope = new ScopeHandler2(this.raise.bind(this), this.inModule);
  48621. const oldProdParam = this.prodParam;
  48622. this.prodParam = new ProductionParameterHandler();
  48623. const oldClassScope = this.classScope;
  48624. this.classScope = new ClassScopeHandler(this.raise.bind(this));
  48625. const oldExpressionScope = this.expressionScope;
  48626. this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
  48627. return () => {
  48628. this.state.labels = oldLabels;
  48629. this.state.exportedIdentifiers = oldExportedIdentifiers;
  48630. this.inModule = oldInModule;
  48631. this.scope = oldScope;
  48632. this.prodParam = oldProdParam;
  48633. this.classScope = oldClassScope;
  48634. this.expressionScope = oldExpressionScope;
  48635. };
  48636. }
  48637. enterInitialScopes() {
  48638. let paramFlags = PARAM;
  48639. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  48640. paramFlags |= PARAM_AWAIT;
  48641. }
  48642. this.scope.enter(SCOPE_PROGRAM);
  48643. this.prodParam.enter(paramFlags);
  48644. }
  48645. };
  48646. var ExpressionErrors = class {
  48647. constructor() {
  48648. this.shorthandAssign = -1;
  48649. this.doubleProto = -1;
  48650. }
  48651. };
  48652. var Node3 = class {
  48653. constructor(parser, pos, loc) {
  48654. this.type = void 0;
  48655. this.start = void 0;
  48656. this.end = void 0;
  48657. this.loc = void 0;
  48658. this.range = void 0;
  48659. this.leadingComments = void 0;
  48660. this.trailingComments = void 0;
  48661. this.innerComments = void 0;
  48662. this.extra = void 0;
  48663. this.type = "";
  48664. this.start = pos;
  48665. this.end = 0;
  48666. this.loc = new SourceLocation3(loc);
  48667. if (parser != null && parser.options.ranges)
  48668. this.range = [pos, 0];
  48669. if (parser != null && parser.filename)
  48670. this.loc.filename = parser.filename;
  48671. }
  48672. __clone() {
  48673. const newNode = new Node3();
  48674. const keys2 = Object.keys(this);
  48675. for (let i = 0, length = keys2.length; i < length; i++) {
  48676. const key = keys2[i];
  48677. if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
  48678. newNode[key] = this[key];
  48679. }
  48680. }
  48681. return newNode;
  48682. }
  48683. };
  48684. var NodeUtils = class extends UtilParser {
  48685. startNode() {
  48686. return new Node3(this, this.state.start, this.state.startLoc);
  48687. }
  48688. startNodeAt(pos, loc) {
  48689. return new Node3(this, pos, loc);
  48690. }
  48691. startNodeAtNode(type) {
  48692. return this.startNodeAt(type.start, type.loc.start);
  48693. }
  48694. finishNode(node, type) {
  48695. return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  48696. }
  48697. finishNodeAt(node, type, pos, loc) {
  48698. node.type = type;
  48699. node.end = pos;
  48700. node.loc.end = loc;
  48701. if (this.options.ranges)
  48702. node.range[1] = pos;
  48703. this.processComment(node);
  48704. return node;
  48705. }
  48706. resetStartLocation(node, start3, startLoc) {
  48707. node.start = start3;
  48708. node.loc.start = startLoc;
  48709. if (this.options.ranges)
  48710. node.range[0] = start3;
  48711. }
  48712. resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) {
  48713. node.end = end;
  48714. node.loc.end = endLoc;
  48715. if (this.options.ranges)
  48716. node.range[1] = end;
  48717. }
  48718. resetStartLocationFromNode(node, locationNode) {
  48719. this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
  48720. }
  48721. };
  48722. var unwrapParenthesizedExpression = (node) => {
  48723. return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
  48724. };
  48725. var LValParser = class extends NodeUtils {
  48726. toAssignable(node, isLHS = false) {
  48727. var _node$extra, _node$extra3;
  48728. let parenthesized = void 0;
  48729. if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) {
  48730. parenthesized = unwrapParenthesizedExpression(node);
  48731. if (isLHS) {
  48732. if (parenthesized.type === "Identifier") {
  48733. this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  48734. } else if (parenthesized.type !== "MemberExpression") {
  48735. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  48736. }
  48737. } else {
  48738. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  48739. }
  48740. }
  48741. switch (node.type) {
  48742. case "Identifier":
  48743. case "ObjectPattern":
  48744. case "ArrayPattern":
  48745. case "AssignmentPattern":
  48746. break;
  48747. case "ObjectExpression":
  48748. node.type = "ObjectPattern";
  48749. for (let i = 0, length = node.properties.length, last2 = length - 1; i < length; i++) {
  48750. var _node$extra2;
  48751. const prop = node.properties[i];
  48752. const isLast = i === last2;
  48753. this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  48754. if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingComma) {
  48755. this.raiseRestNotLast(node.extra.trailingComma);
  48756. }
  48757. }
  48758. break;
  48759. case "ObjectProperty":
  48760. this.toAssignable(node.value, isLHS);
  48761. break;
  48762. case "SpreadElement": {
  48763. this.checkToRestConversion(node);
  48764. node.type = "RestElement";
  48765. const arg = node.argument;
  48766. this.toAssignable(arg, isLHS);
  48767. break;
  48768. }
  48769. case "ArrayExpression":
  48770. node.type = "ArrayPattern";
  48771. this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS);
  48772. break;
  48773. case "AssignmentExpression":
  48774. if (node.operator !== "=") {
  48775. this.raise(node.left.end, ErrorMessages.MissingEqInAssignment);
  48776. }
  48777. node.type = "AssignmentPattern";
  48778. delete node.operator;
  48779. this.toAssignable(node.left, isLHS);
  48780. break;
  48781. case "ParenthesizedExpression":
  48782. this.toAssignable(parenthesized, isLHS);
  48783. break;
  48784. }
  48785. return node;
  48786. }
  48787. toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  48788. if (prop.type === "ObjectMethod") {
  48789. const error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod;
  48790. this.raise(prop.key.start, error);
  48791. } else if (prop.type === "SpreadElement" && !isLast) {
  48792. this.raiseRestNotLast(prop.start);
  48793. } else {
  48794. this.toAssignable(prop, isLHS);
  48795. }
  48796. }
  48797. toAssignableList(exprList, trailingCommaPos, isLHS) {
  48798. let end = exprList.length;
  48799. if (end) {
  48800. const last2 = exprList[end - 1];
  48801. if ((last2 == null ? void 0 : last2.type) === "RestElement") {
  48802. --end;
  48803. } else if ((last2 == null ? void 0 : last2.type) === "SpreadElement") {
  48804. last2.type = "RestElement";
  48805. let arg = last2.argument;
  48806. this.toAssignable(arg, isLHS);
  48807. arg = unwrapParenthesizedExpression(arg);
  48808. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
  48809. this.unexpected(arg.start);
  48810. }
  48811. if (trailingCommaPos) {
  48812. this.raiseTrailingCommaAfterRest(trailingCommaPos);
  48813. }
  48814. --end;
  48815. }
  48816. }
  48817. for (let i = 0; i < end; i++) {
  48818. const elt = exprList[i];
  48819. if (elt) {
  48820. this.toAssignable(elt, isLHS);
  48821. if (elt.type === "RestElement") {
  48822. this.raiseRestNotLast(elt.start);
  48823. }
  48824. }
  48825. }
  48826. return exprList;
  48827. }
  48828. toReferencedList(exprList, isParenthesizedExpr) {
  48829. return exprList;
  48830. }
  48831. toReferencedListDeep(exprList, isParenthesizedExpr) {
  48832. this.toReferencedList(exprList, isParenthesizedExpr);
  48833. for (const expr of exprList) {
  48834. if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
  48835. this.toReferencedListDeep(expr.elements);
  48836. }
  48837. }
  48838. }
  48839. parseSpread(refExpressionErrors, refNeedsArrowPos) {
  48840. const node = this.startNode();
  48841. this.next();
  48842. node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, void 0, refNeedsArrowPos);
  48843. return this.finishNode(node, "SpreadElement");
  48844. }
  48845. parseRestBinding() {
  48846. const node = this.startNode();
  48847. this.next();
  48848. node.argument = this.parseBindingAtom();
  48849. return this.finishNode(node, "RestElement");
  48850. }
  48851. parseBindingAtom() {
  48852. switch (this.state.type) {
  48853. case types$12.bracketL: {
  48854. const node = this.startNode();
  48855. this.next();
  48856. node.elements = this.parseBindingList(types$12.bracketR, 93, true);
  48857. return this.finishNode(node, "ArrayPattern");
  48858. }
  48859. case types$12.braceL:
  48860. return this.parseObjectLike(types$12.braceR, true);
  48861. }
  48862. return this.parseIdentifier();
  48863. }
  48864. parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
  48865. const elts = [];
  48866. let first = true;
  48867. while (!this.eat(close)) {
  48868. if (first) {
  48869. first = false;
  48870. } else {
  48871. this.expect(types$12.comma);
  48872. }
  48873. if (allowEmpty && this.match(types$12.comma)) {
  48874. elts.push(null);
  48875. } else if (this.eat(close)) {
  48876. break;
  48877. } else if (this.match(types$12.ellipsis)) {
  48878. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
  48879. this.checkCommaAfterRest(closeCharCode);
  48880. this.expect(close);
  48881. break;
  48882. } else {
  48883. const decorators = [];
  48884. if (this.match(types$12.at) && this.hasPlugin("decorators")) {
  48885. this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator);
  48886. }
  48887. while (this.match(types$12.at)) {
  48888. decorators.push(this.parseDecorator());
  48889. }
  48890. elts.push(this.parseAssignableListItem(allowModifiers, decorators));
  48891. }
  48892. }
  48893. return elts;
  48894. }
  48895. parseAssignableListItem(allowModifiers, decorators) {
  48896. const left = this.parseMaybeDefault();
  48897. this.parseAssignableListItemTypes(left);
  48898. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  48899. if (decorators.length) {
  48900. left.decorators = decorators;
  48901. }
  48902. return elt;
  48903. }
  48904. parseAssignableListItemTypes(param) {
  48905. return param;
  48906. }
  48907. parseMaybeDefault(startPos, startLoc, left) {
  48908. var _startLoc, _startPos, _left;
  48909. startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
  48910. startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
  48911. left = (_left = left) != null ? _left : this.parseBindingAtom();
  48912. if (!this.eat(types$12.eq))
  48913. return left;
  48914. const node = this.startNodeAt(startPos, startLoc);
  48915. node.left = left;
  48916. node.right = this.parseMaybeAssignAllowIn();
  48917. return this.finishNode(node, "AssignmentPattern");
  48918. }
  48919. checkLVal(expr, contextDescription, bindingType = BIND_NONE2, checkClashes, disallowLetBinding, strictModeChanged = false) {
  48920. switch (expr.type) {
  48921. case "Identifier": {
  48922. const {
  48923. name: name2
  48924. } = expr;
  48925. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name2, this.inModule) : isStrictBindOnlyReservedWord(name2))) {
  48926. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name2);
  48927. }
  48928. if (checkClashes) {
  48929. if (checkClashes.has(name2)) {
  48930. this.raise(expr.start, ErrorMessages.ParamDupe);
  48931. } else {
  48932. checkClashes.add(name2);
  48933. }
  48934. }
  48935. if (disallowLetBinding && name2 === "let") {
  48936. this.raise(expr.start, ErrorMessages.LetInLexicalBinding);
  48937. }
  48938. if (!(bindingType & BIND_NONE2)) {
  48939. this.scope.declareName(name2, bindingType, expr.start);
  48940. }
  48941. break;
  48942. }
  48943. case "MemberExpression":
  48944. if (bindingType !== BIND_NONE2) {
  48945. this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern);
  48946. }
  48947. break;
  48948. case "ObjectPattern":
  48949. for (let prop of expr.properties) {
  48950. if (this.isObjectProperty(prop))
  48951. prop = prop.value;
  48952. else if (this.isObjectMethod(prop))
  48953. continue;
  48954. this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  48955. }
  48956. break;
  48957. case "ArrayPattern":
  48958. for (const elem of expr.elements) {
  48959. if (elem) {
  48960. this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  48961. }
  48962. }
  48963. break;
  48964. case "AssignmentPattern":
  48965. this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
  48966. break;
  48967. case "RestElement":
  48968. this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
  48969. break;
  48970. case "ParenthesizedExpression":
  48971. this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
  48972. break;
  48973. default: {
  48974. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription);
  48975. }
  48976. }
  48977. }
  48978. checkToRestConversion(node) {
  48979. if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
  48980. this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern);
  48981. }
  48982. }
  48983. checkCommaAfterRest(close) {
  48984. if (this.match(types$12.comma)) {
  48985. if (this.lookaheadCharCode() === close) {
  48986. this.raiseTrailingCommaAfterRest(this.state.start);
  48987. } else {
  48988. this.raiseRestNotLast(this.state.start);
  48989. }
  48990. }
  48991. }
  48992. raiseRestNotLast(pos) {
  48993. throw this.raise(pos, ErrorMessages.ElementAfterRest);
  48994. }
  48995. raiseTrailingCommaAfterRest(pos) {
  48996. this.raise(pos, ErrorMessages.RestTrailingComma);
  48997. }
  48998. };
  48999. var ExpressionParser = class extends LValParser {
  49000. checkProto(prop, isRecord, protoRef, refExpressionErrors) {
  49001. if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
  49002. return;
  49003. }
  49004. const key = prop.key;
  49005. const name2 = key.type === "Identifier" ? key.name : key.value;
  49006. if (name2 === "__proto__") {
  49007. if (isRecord) {
  49008. this.raise(key.start, ErrorMessages.RecordNoProto);
  49009. return;
  49010. }
  49011. if (protoRef.used) {
  49012. if (refExpressionErrors) {
  49013. if (refExpressionErrors.doubleProto === -1) {
  49014. refExpressionErrors.doubleProto = key.start;
  49015. }
  49016. } else {
  49017. this.raise(key.start, ErrorMessages.DuplicateProto);
  49018. }
  49019. }
  49020. protoRef.used = true;
  49021. }
  49022. }
  49023. shouldExitDescending(expr, potentialArrowAt) {
  49024. return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
  49025. }
  49026. getExpression() {
  49027. let paramFlags = PARAM;
  49028. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  49029. paramFlags |= PARAM_AWAIT;
  49030. }
  49031. this.scope.enter(SCOPE_PROGRAM);
  49032. this.prodParam.enter(paramFlags);
  49033. this.nextToken();
  49034. const expr = this.parseExpression();
  49035. if (!this.match(types$12.eof)) {
  49036. this.unexpected();
  49037. }
  49038. expr.comments = this.state.comments;
  49039. expr.errors = this.state.errors;
  49040. if (this.options.tokens) {
  49041. expr.tokens = this.tokens;
  49042. }
  49043. return expr;
  49044. }
  49045. parseExpression(disallowIn, refExpressionErrors) {
  49046. if (disallowIn) {
  49047. return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  49048. }
  49049. return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  49050. }
  49051. parseExpressionBase(refExpressionErrors) {
  49052. const startPos = this.state.start;
  49053. const startLoc = this.state.startLoc;
  49054. const expr = this.parseMaybeAssign(refExpressionErrors);
  49055. if (this.match(types$12.comma)) {
  49056. const node = this.startNodeAt(startPos, startLoc);
  49057. node.expressions = [expr];
  49058. while (this.eat(types$12.comma)) {
  49059. node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
  49060. }
  49061. this.toReferencedList(node.expressions);
  49062. return this.finishNode(node, "SequenceExpression");
  49063. }
  49064. return expr;
  49065. }
  49066. parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  49067. return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
  49068. }
  49069. parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  49070. return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
  49071. }
  49072. parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  49073. const startPos = this.state.start;
  49074. const startLoc = this.state.startLoc;
  49075. if (this.isContextual("yield")) {
  49076. if (this.prodParam.hasYield) {
  49077. this.state.exprAllowed = true;
  49078. let left2 = this.parseYield();
  49079. if (afterLeftParse) {
  49080. left2 = afterLeftParse.call(this, left2, startPos, startLoc);
  49081. }
  49082. return left2;
  49083. }
  49084. }
  49085. let ownExpressionErrors;
  49086. if (refExpressionErrors) {
  49087. ownExpressionErrors = false;
  49088. } else {
  49089. refExpressionErrors = new ExpressionErrors();
  49090. ownExpressionErrors = true;
  49091. }
  49092. if (this.match(types$12.parenL) || this.match(types$12.name)) {
  49093. this.state.potentialArrowAt = this.state.start;
  49094. }
  49095. let left = this.parseMaybeConditional(refExpressionErrors, refNeedsArrowPos);
  49096. if (afterLeftParse) {
  49097. left = afterLeftParse.call(this, left, startPos, startLoc);
  49098. }
  49099. if (this.state.type.isAssign) {
  49100. const node = this.startNodeAt(startPos, startLoc);
  49101. const operator = this.state.value;
  49102. node.operator = operator;
  49103. if (this.match(types$12.eq)) {
  49104. node.left = this.toAssignable(left, true);
  49105. refExpressionErrors.doubleProto = -1;
  49106. } else {
  49107. node.left = left;
  49108. }
  49109. if (refExpressionErrors.shorthandAssign >= node.left.start) {
  49110. refExpressionErrors.shorthandAssign = -1;
  49111. }
  49112. this.checkLVal(left, "assignment expression");
  49113. this.next();
  49114. node.right = this.parseMaybeAssign();
  49115. return this.finishNode(node, "AssignmentExpression");
  49116. } else if (ownExpressionErrors) {
  49117. this.checkExpressionErrors(refExpressionErrors, true);
  49118. }
  49119. return left;
  49120. }
  49121. parseMaybeConditional(refExpressionErrors, refNeedsArrowPos) {
  49122. const startPos = this.state.start;
  49123. const startLoc = this.state.startLoc;
  49124. const potentialArrowAt = this.state.potentialArrowAt;
  49125. const expr = this.parseExprOps(refExpressionErrors);
  49126. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  49127. return expr;
  49128. }
  49129. return this.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
  49130. }
  49131. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  49132. if (this.eat(types$12.question)) {
  49133. const node = this.startNodeAt(startPos, startLoc);
  49134. node.test = expr;
  49135. node.consequent = this.parseMaybeAssignAllowIn();
  49136. this.expect(types$12.colon);
  49137. node.alternate = this.parseMaybeAssign();
  49138. return this.finishNode(node, "ConditionalExpression");
  49139. }
  49140. return expr;
  49141. }
  49142. parseExprOps(refExpressionErrors) {
  49143. const startPos = this.state.start;
  49144. const startLoc = this.state.startLoc;
  49145. const potentialArrowAt = this.state.potentialArrowAt;
  49146. const expr = this.parseMaybeUnary(refExpressionErrors);
  49147. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  49148. return expr;
  49149. }
  49150. return this.parseExprOp(expr, startPos, startLoc, -1);
  49151. }
  49152. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  49153. let prec = this.state.type.binop;
  49154. if (prec != null && (this.prodParam.hasIn || !this.match(types$12._in))) {
  49155. if (prec > minPrec) {
  49156. const op = this.state.type;
  49157. if (op === types$12.pipeline) {
  49158. this.expectPlugin("pipelineOperator");
  49159. if (this.state.inFSharpPipelineDirectBody) {
  49160. return left;
  49161. }
  49162. this.state.inPipeline = true;
  49163. this.checkPipelineAtInfixOperator(left, leftStartPos);
  49164. }
  49165. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  49166. node.left = left;
  49167. node.operator = this.state.value;
  49168. const logical = op === types$12.logicalOR || op === types$12.logicalAND;
  49169. const coalesce = op === types$12.nullishCoalescing;
  49170. if (coalesce) {
  49171. prec = types$12.logicalAND.binop;
  49172. }
  49173. this.next();
  49174. if (op === types$12.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
  49175. if (this.match(types$12.name) && this.state.value === "await" && this.prodParam.hasAwait) {
  49176. throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody);
  49177. }
  49178. }
  49179. node.right = this.parseExprOpRightExpr(op, prec);
  49180. this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
  49181. const nextOp = this.state.type;
  49182. if (coalesce && (nextOp === types$12.logicalOR || nextOp === types$12.logicalAND) || logical && nextOp === types$12.nullishCoalescing) {
  49183. throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical);
  49184. }
  49185. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  49186. }
  49187. }
  49188. return left;
  49189. }
  49190. parseExprOpRightExpr(op, prec) {
  49191. const startPos = this.state.start;
  49192. const startLoc = this.state.startLoc;
  49193. switch (op) {
  49194. case types$12.pipeline:
  49195. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  49196. case "smart":
  49197. return this.withTopicPermittingContext(() => {
  49198. return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
  49199. });
  49200. case "fsharp":
  49201. return this.withSoloAwaitPermittingContext(() => {
  49202. return this.parseFSharpPipelineBody(prec);
  49203. });
  49204. }
  49205. default:
  49206. return this.parseExprOpBaseRightExpr(op, prec);
  49207. }
  49208. }
  49209. parseExprOpBaseRightExpr(op, prec) {
  49210. const startPos = this.state.start;
  49211. const startLoc = this.state.startLoc;
  49212. return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec);
  49213. }
  49214. checkExponentialAfterUnary(node) {
  49215. if (this.match(types$12.exponent)) {
  49216. this.raise(node.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation);
  49217. }
  49218. }
  49219. parseMaybeUnary(refExpressionErrors, sawUnary) {
  49220. const startPos = this.state.start;
  49221. const startLoc = this.state.startLoc;
  49222. const isAwait = this.isContextual("await");
  49223. if (isAwait && this.isAwaitAllowed()) {
  49224. this.next();
  49225. const expr2 = this.parseAwait(startPos, startLoc);
  49226. if (!sawUnary)
  49227. this.checkExponentialAfterUnary(expr2);
  49228. return expr2;
  49229. }
  49230. if (this.isContextual("module") && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) {
  49231. return this.parseModuleExpression();
  49232. }
  49233. const update = this.match(types$12.incDec);
  49234. const node = this.startNode();
  49235. if (this.state.type.prefix) {
  49236. node.operator = this.state.value;
  49237. node.prefix = true;
  49238. if (this.match(types$12._throw)) {
  49239. this.expectPlugin("throwExpressions");
  49240. }
  49241. const isDelete = this.match(types$12._delete);
  49242. this.next();
  49243. node.argument = this.parseMaybeUnary(null, true);
  49244. this.checkExpressionErrors(refExpressionErrors, true);
  49245. if (this.state.strict && isDelete) {
  49246. const arg = node.argument;
  49247. if (arg.type === "Identifier") {
  49248. this.raise(node.start, ErrorMessages.StrictDelete);
  49249. } else if (this.hasPropertyAsPrivateName(arg)) {
  49250. this.raise(node.start, ErrorMessages.DeletePrivateField);
  49251. }
  49252. }
  49253. if (!update) {
  49254. if (!sawUnary)
  49255. this.checkExponentialAfterUnary(node);
  49256. return this.finishNode(node, "UnaryExpression");
  49257. }
  49258. }
  49259. const expr = this.parseUpdate(node, update, refExpressionErrors);
  49260. if (isAwait) {
  49261. const startsExpr3 = this.hasPlugin("v8intrinsic") ? this.state.type.startsExpr : this.state.type.startsExpr && !this.match(types$12.modulo);
  49262. if (startsExpr3 && !this.isAmbiguousAwait()) {
  49263. this.raiseOverwrite(startPos, this.hasPlugin("topLevelAwait") ? ErrorMessages.AwaitNotInAsyncContext : ErrorMessages.AwaitNotInAsyncFunction);
  49264. return this.parseAwait(startPos, startLoc);
  49265. }
  49266. }
  49267. return expr;
  49268. }
  49269. parseUpdate(node, update, refExpressionErrors) {
  49270. if (update) {
  49271. this.checkLVal(node.argument, "prefix operation");
  49272. return this.finishNode(node, "UpdateExpression");
  49273. }
  49274. const startPos = this.state.start;
  49275. const startLoc = this.state.startLoc;
  49276. let expr = this.parseExprSubscripts(refExpressionErrors);
  49277. if (this.checkExpressionErrors(refExpressionErrors, false))
  49278. return expr;
  49279. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  49280. const node2 = this.startNodeAt(startPos, startLoc);
  49281. node2.operator = this.state.value;
  49282. node2.prefix = false;
  49283. node2.argument = expr;
  49284. this.checkLVal(expr, "postfix operation");
  49285. this.next();
  49286. expr = this.finishNode(node2, "UpdateExpression");
  49287. }
  49288. return expr;
  49289. }
  49290. parseExprSubscripts(refExpressionErrors) {
  49291. const startPos = this.state.start;
  49292. const startLoc = this.state.startLoc;
  49293. const potentialArrowAt = this.state.potentialArrowAt;
  49294. const expr = this.parseExprAtom(refExpressionErrors);
  49295. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  49296. return expr;
  49297. }
  49298. return this.parseSubscripts(expr, startPos, startLoc);
  49299. }
  49300. parseSubscripts(base2, startPos, startLoc, noCalls) {
  49301. const state = {
  49302. optionalChainMember: false,
  49303. maybeAsyncArrow: this.atPossibleAsyncArrow(base2),
  49304. stop: false
  49305. };
  49306. do {
  49307. base2 = this.parseSubscript(base2, startPos, startLoc, noCalls, state);
  49308. state.maybeAsyncArrow = false;
  49309. } while (!state.stop);
  49310. return base2;
  49311. }
  49312. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  49313. if (!noCalls && this.eat(types$12.doubleColon)) {
  49314. return this.parseBind(base2, startPos, startLoc, noCalls, state);
  49315. } else if (this.match(types$12.backQuote)) {
  49316. return this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  49317. }
  49318. let optional = false;
  49319. if (this.match(types$12.questionDot)) {
  49320. if (noCalls && this.lookaheadCharCode() === 40) {
  49321. state.stop = true;
  49322. return base2;
  49323. }
  49324. state.optionalChainMember = optional = true;
  49325. this.next();
  49326. }
  49327. if (!noCalls && this.match(types$12.parenL)) {
  49328. return this.parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional);
  49329. } else if (optional || this.match(types$12.bracketL) || this.eat(types$12.dot)) {
  49330. return this.parseMember(base2, startPos, startLoc, state, optional);
  49331. } else {
  49332. state.stop = true;
  49333. return base2;
  49334. }
  49335. }
  49336. parseMember(base2, startPos, startLoc, state, optional) {
  49337. const node = this.startNodeAt(startPos, startLoc);
  49338. const computed = this.eat(types$12.bracketL);
  49339. node.object = base2;
  49340. node.computed = computed;
  49341. const privateName = !computed && this.match(types$12.privateName) && this.state.value;
  49342. const property = computed ? this.parseExpression() : privateName ? this.parsePrivateName() : this.parseIdentifier(true);
  49343. if (privateName !== false) {
  49344. if (node.object.type === "Super") {
  49345. this.raise(startPos, ErrorMessages.SuperPrivateField);
  49346. }
  49347. this.classScope.usePrivateName(privateName, property.start);
  49348. }
  49349. node.property = property;
  49350. if (computed) {
  49351. this.expect(types$12.bracketR);
  49352. }
  49353. if (state.optionalChainMember) {
  49354. node.optional = optional;
  49355. return this.finishNode(node, "OptionalMemberExpression");
  49356. } else {
  49357. return this.finishNode(node, "MemberExpression");
  49358. }
  49359. }
  49360. parseBind(base2, startPos, startLoc, noCalls, state) {
  49361. const node = this.startNodeAt(startPos, startLoc);
  49362. node.object = base2;
  49363. node.callee = this.parseNoCallExpr();
  49364. state.stop = true;
  49365. return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
  49366. }
  49367. parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional) {
  49368. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  49369. this.state.maybeInArrowParameters = true;
  49370. this.next();
  49371. let node = this.startNodeAt(startPos, startLoc);
  49372. node.callee = base2;
  49373. if (state.maybeAsyncArrow) {
  49374. this.expressionScope.enter(newAsyncArrowScope());
  49375. }
  49376. if (state.optionalChainMember) {
  49377. node.optional = optional;
  49378. }
  49379. if (optional) {
  49380. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  49381. } else {
  49382. node.arguments = this.parseCallExpressionArguments(types$12.parenR, state.maybeAsyncArrow, base2.type === "Import", base2.type !== "Super", node);
  49383. }
  49384. this.finishCallExpression(node, state.optionalChainMember);
  49385. if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  49386. state.stop = true;
  49387. this.expressionScope.validateAsPattern();
  49388. this.expressionScope.exit();
  49389. node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
  49390. } else {
  49391. if (state.maybeAsyncArrow) {
  49392. this.expressionScope.exit();
  49393. }
  49394. this.toReferencedArguments(node);
  49395. }
  49396. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  49397. return node;
  49398. }
  49399. toReferencedArguments(node, isParenthesizedExpr) {
  49400. this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
  49401. }
  49402. parseTaggedTemplateExpression(base2, startPos, startLoc, state) {
  49403. const node = this.startNodeAt(startPos, startLoc);
  49404. node.tag = base2;
  49405. node.quasi = this.parseTemplate(true);
  49406. if (state.optionalChainMember) {
  49407. this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate);
  49408. }
  49409. return this.finishNode(node, "TaggedTemplateExpression");
  49410. }
  49411. atPossibleAsyncArrow(base2) {
  49412. return base2.type === "Identifier" && base2.name === "async" && this.state.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && base2.start === this.state.potentialArrowAt;
  49413. }
  49414. finishCallExpression(node, optional) {
  49415. if (node.callee.type === "Import") {
  49416. if (node.arguments.length === 2) {
  49417. {
  49418. if (!this.hasPlugin("moduleAttributes")) {
  49419. this.expectPlugin("importAssertions");
  49420. }
  49421. }
  49422. }
  49423. if (node.arguments.length === 0 || node.arguments.length > 2) {
  49424. this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
  49425. } else {
  49426. for (const arg of node.arguments) {
  49427. if (arg.type === "SpreadElement") {
  49428. this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument);
  49429. }
  49430. }
  49431. }
  49432. }
  49433. return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
  49434. }
  49435. parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder, nodeForExtra) {
  49436. const elts = [];
  49437. let first = true;
  49438. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  49439. this.state.inFSharpPipelineDirectBody = false;
  49440. while (!this.eat(close)) {
  49441. if (first) {
  49442. first = false;
  49443. } else {
  49444. this.expect(types$12.comma);
  49445. if (this.match(close)) {
  49446. if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
  49447. this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma);
  49448. }
  49449. if (nodeForExtra) {
  49450. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  49451. }
  49452. this.next();
  49453. break;
  49454. }
  49455. }
  49456. elts.push(this.parseExprListItem(false, possibleAsyncArrow ? new ExpressionErrors() : void 0, possibleAsyncArrow ? {
  49457. start: 0
  49458. } : void 0, allowPlaceholder));
  49459. }
  49460. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  49461. return elts;
  49462. }
  49463. shouldParseAsyncArrow() {
  49464. return this.match(types$12.arrow) && !this.canInsertSemicolon();
  49465. }
  49466. parseAsyncArrowFromCallExpression(node, call) {
  49467. var _call$extra;
  49468. this.expect(types$12.arrow);
  49469. this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
  49470. return node;
  49471. }
  49472. parseNoCallExpr() {
  49473. const startPos = this.state.start;
  49474. const startLoc = this.state.startLoc;
  49475. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  49476. }
  49477. parseExprAtom(refExpressionErrors) {
  49478. if (this.state.type === types$12.slash)
  49479. this.readRegexp();
  49480. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  49481. let node;
  49482. switch (this.state.type) {
  49483. case types$12._super:
  49484. return this.parseSuper();
  49485. case types$12._import:
  49486. node = this.startNode();
  49487. this.next();
  49488. if (this.match(types$12.dot)) {
  49489. return this.parseImportMetaProperty(node);
  49490. }
  49491. if (!this.match(types$12.parenL)) {
  49492. this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport);
  49493. }
  49494. return this.finishNode(node, "Import");
  49495. case types$12._this:
  49496. node = this.startNode();
  49497. this.next();
  49498. return this.finishNode(node, "ThisExpression");
  49499. case types$12.name: {
  49500. const containsEsc = this.state.containsEsc;
  49501. const id = this.parseIdentifier();
  49502. if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
  49503. if (this.match(types$12._function)) {
  49504. const last2 = this.state.context.length - 1;
  49505. if (this.state.context[last2] !== types2.functionStatement) {
  49506. throw new Error("Internal error");
  49507. }
  49508. this.state.context[last2] = types2.functionExpression;
  49509. this.next();
  49510. return this.parseFunction(this.startNodeAtNode(id), void 0, true);
  49511. } else if (this.match(types$12.name)) {
  49512. if (this.lookaheadCharCode() === 61) {
  49513. return this.parseAsyncArrowUnaryFunction(id);
  49514. } else {
  49515. return id;
  49516. }
  49517. } else if (this.match(types$12._do)) {
  49518. return this.parseDo(true);
  49519. }
  49520. }
  49521. if (canBeArrow && this.match(types$12.arrow) && !this.canInsertSemicolon()) {
  49522. this.next();
  49523. return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
  49524. }
  49525. return id;
  49526. }
  49527. case types$12._do: {
  49528. return this.parseDo(false);
  49529. }
  49530. case types$12.regexp: {
  49531. return this.parseRegExpLiteral(this.state.value);
  49532. }
  49533. case types$12.num:
  49534. return this.parseNumericLiteral(this.state.value);
  49535. case types$12.bigint:
  49536. return this.parseBigIntLiteral(this.state.value);
  49537. case types$12.decimal:
  49538. return this.parseDecimalLiteral(this.state.value);
  49539. case types$12.string:
  49540. return this.parseStringLiteral(this.state.value);
  49541. case types$12._null:
  49542. return this.parseNullLiteral();
  49543. case types$12._true:
  49544. return this.parseBooleanLiteral(true);
  49545. case types$12._false:
  49546. return this.parseBooleanLiteral(false);
  49547. case types$12.parenL:
  49548. return this.parseParenAndDistinguishExpression(canBeArrow);
  49549. case types$12.bracketBarL:
  49550. case types$12.bracketHashL: {
  49551. return this.parseArrayLike(this.state.type === types$12.bracketBarL ? types$12.bracketBarR : types$12.bracketR, false, true, refExpressionErrors);
  49552. }
  49553. case types$12.bracketL: {
  49554. return this.parseArrayLike(types$12.bracketR, true, false, refExpressionErrors);
  49555. }
  49556. case types$12.braceBarL:
  49557. case types$12.braceHashL: {
  49558. return this.parseObjectLike(this.state.type === types$12.braceBarL ? types$12.braceBarR : types$12.braceR, false, true, refExpressionErrors);
  49559. }
  49560. case types$12.braceL: {
  49561. return this.parseObjectLike(types$12.braceR, false, false, refExpressionErrors);
  49562. }
  49563. case types$12._function:
  49564. return this.parseFunctionOrFunctionSent();
  49565. case types$12.at:
  49566. this.parseDecorators();
  49567. case types$12._class:
  49568. node = this.startNode();
  49569. this.takeDecorators(node);
  49570. return this.parseClass(node, false);
  49571. case types$12._new:
  49572. return this.parseNewOrNewTarget();
  49573. case types$12.backQuote:
  49574. return this.parseTemplate(false);
  49575. case types$12.doubleColon: {
  49576. node = this.startNode();
  49577. this.next();
  49578. node.object = null;
  49579. const callee = node.callee = this.parseNoCallExpr();
  49580. if (callee.type === "MemberExpression") {
  49581. return this.finishNode(node, "BindExpression");
  49582. } else {
  49583. throw this.raise(callee.start, ErrorMessages.UnsupportedBind);
  49584. }
  49585. }
  49586. case types$12.privateName: {
  49587. const start3 = this.state.start;
  49588. const value = this.state.value;
  49589. node = this.parsePrivateName();
  49590. if (this.match(types$12._in)) {
  49591. this.expectPlugin("privateIn");
  49592. this.classScope.usePrivateName(value, node.start);
  49593. } else if (this.hasPlugin("privateIn")) {
  49594. this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, value);
  49595. } else {
  49596. throw this.unexpected(start3);
  49597. }
  49598. return node;
  49599. }
  49600. case types$12.hash: {
  49601. if (this.state.inPipeline) {
  49602. node = this.startNode();
  49603. if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
  49604. this.raise(node.start, ErrorMessages.PrimaryTopicRequiresSmartPipeline);
  49605. }
  49606. this.next();
  49607. if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
  49608. this.raise(node.start, ErrorMessages.PrimaryTopicNotAllowed);
  49609. }
  49610. this.registerTopicReference();
  49611. return this.finishNode(node, "PipelinePrimaryTopicReference");
  49612. }
  49613. }
  49614. case types$12.relational: {
  49615. if (this.state.value === "<") {
  49616. const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
  49617. if (isIdentifierStart2(lookaheadCh) || lookaheadCh === 62) {
  49618. this.expectOnePlugin(["jsx", "flow", "typescript"]);
  49619. }
  49620. }
  49621. }
  49622. default:
  49623. throw this.unexpected();
  49624. }
  49625. }
  49626. parseAsyncArrowUnaryFunction(id) {
  49627. const node = this.startNodeAtNode(id);
  49628. this.prodParam.enter(functionFlags2(true, this.prodParam.hasYield));
  49629. const params = [this.parseIdentifier()];
  49630. this.prodParam.exit();
  49631. if (this.hasPrecedingLineBreak()) {
  49632. this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow);
  49633. }
  49634. this.expect(types$12.arrow);
  49635. this.parseArrowExpression(node, params, true);
  49636. return node;
  49637. }
  49638. parseDo(isAsync) {
  49639. this.expectPlugin("doExpressions");
  49640. if (isAsync) {
  49641. this.expectPlugin("asyncDoExpressions");
  49642. }
  49643. const node = this.startNode();
  49644. node.async = isAsync;
  49645. this.next();
  49646. const oldLabels = this.state.labels;
  49647. this.state.labels = [];
  49648. if (isAsync) {
  49649. this.prodParam.enter(PARAM_AWAIT);
  49650. node.body = this.parseBlock();
  49651. this.prodParam.exit();
  49652. } else {
  49653. node.body = this.parseBlock();
  49654. }
  49655. this.state.labels = oldLabels;
  49656. return this.finishNode(node, "DoExpression");
  49657. }
  49658. parseSuper() {
  49659. const node = this.startNode();
  49660. this.next();
  49661. if (this.match(types$12.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  49662. this.raise(node.start, ErrorMessages.SuperNotAllowed);
  49663. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  49664. this.raise(node.start, ErrorMessages.UnexpectedSuper);
  49665. }
  49666. if (!this.match(types$12.parenL) && !this.match(types$12.bracketL) && !this.match(types$12.dot)) {
  49667. this.raise(node.start, ErrorMessages.UnsupportedSuper);
  49668. }
  49669. return this.finishNode(node, "Super");
  49670. }
  49671. parseMaybePrivateName(isPrivateNameAllowed) {
  49672. const isPrivate = this.match(types$12.privateName);
  49673. if (isPrivate) {
  49674. if (!isPrivateNameAllowed) {
  49675. this.raise(this.state.start + 1, ErrorMessages.UnexpectedPrivateField);
  49676. }
  49677. return this.parsePrivateName();
  49678. } else {
  49679. return this.parseIdentifier(true);
  49680. }
  49681. }
  49682. parsePrivateName() {
  49683. const node = this.startNode();
  49684. const id = this.startNodeAt(this.state.start + 1, new Position3(this.state.curLine, this.state.start + 1 - this.state.lineStart));
  49685. const name2 = this.state.value;
  49686. this.next();
  49687. node.id = this.createIdentifier(id, name2);
  49688. return this.finishNode(node, "PrivateName");
  49689. }
  49690. parseFunctionOrFunctionSent() {
  49691. const node = this.startNode();
  49692. this.next();
  49693. if (this.prodParam.hasYield && this.match(types$12.dot)) {
  49694. const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
  49695. this.next();
  49696. return this.parseMetaProperty(node, meta, "sent");
  49697. }
  49698. return this.parseFunction(node);
  49699. }
  49700. parseMetaProperty(node, meta, propertyName) {
  49701. node.meta = meta;
  49702. if (meta.name === "function" && propertyName === "sent") {
  49703. if (this.isContextual(propertyName)) {
  49704. this.expectPlugin("functionSent");
  49705. } else if (!this.hasPlugin("functionSent")) {
  49706. this.unexpected();
  49707. }
  49708. }
  49709. const containsEsc = this.state.containsEsc;
  49710. node.property = this.parseIdentifier(true);
  49711. if (node.property.name !== propertyName || containsEsc) {
  49712. this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName);
  49713. }
  49714. return this.finishNode(node, "MetaProperty");
  49715. }
  49716. parseImportMetaProperty(node) {
  49717. const id = this.createIdentifier(this.startNodeAtNode(node), "import");
  49718. this.next();
  49719. if (this.isContextual("meta")) {
  49720. if (!this.inModule) {
  49721. this.raise(id.start, SourceTypeModuleErrorMessages.ImportMetaOutsideModule);
  49722. }
  49723. this.sawUnambiguousESM = true;
  49724. }
  49725. return this.parseMetaProperty(node, id, "meta");
  49726. }
  49727. parseLiteralAtNode(value, type, node) {
  49728. this.addExtra(node, "rawValue", value);
  49729. this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
  49730. node.value = value;
  49731. this.next();
  49732. return this.finishNode(node, type);
  49733. }
  49734. parseLiteral(value, type) {
  49735. const node = this.startNode();
  49736. return this.parseLiteralAtNode(value, type, node);
  49737. }
  49738. parseStringLiteral(value) {
  49739. return this.parseLiteral(value, "StringLiteral");
  49740. }
  49741. parseNumericLiteral(value) {
  49742. return this.parseLiteral(value, "NumericLiteral");
  49743. }
  49744. parseBigIntLiteral(value) {
  49745. return this.parseLiteral(value, "BigIntLiteral");
  49746. }
  49747. parseDecimalLiteral(value) {
  49748. return this.parseLiteral(value, "DecimalLiteral");
  49749. }
  49750. parseRegExpLiteral(value) {
  49751. const node = this.parseLiteral(value.value, "RegExpLiteral");
  49752. node.pattern = value.pattern;
  49753. node.flags = value.flags;
  49754. return node;
  49755. }
  49756. parseBooleanLiteral(value) {
  49757. const node = this.startNode();
  49758. node.value = value;
  49759. this.next();
  49760. return this.finishNode(node, "BooleanLiteral");
  49761. }
  49762. parseNullLiteral() {
  49763. const node = this.startNode();
  49764. this.next();
  49765. return this.finishNode(node, "NullLiteral");
  49766. }
  49767. parseParenAndDistinguishExpression(canBeArrow) {
  49768. const startPos = this.state.start;
  49769. const startLoc = this.state.startLoc;
  49770. let val;
  49771. this.next();
  49772. this.expressionScope.enter(newArrowHeadScope());
  49773. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  49774. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  49775. this.state.maybeInArrowParameters = true;
  49776. this.state.inFSharpPipelineDirectBody = false;
  49777. const innerStartPos = this.state.start;
  49778. const innerStartLoc = this.state.startLoc;
  49779. const exprList = [];
  49780. const refExpressionErrors = new ExpressionErrors();
  49781. const refNeedsArrowPos = {
  49782. start: 0
  49783. };
  49784. let first = true;
  49785. let spreadStart;
  49786. let optionalCommaStart;
  49787. while (!this.match(types$12.parenR)) {
  49788. if (first) {
  49789. first = false;
  49790. } else {
  49791. this.expect(types$12.comma, refNeedsArrowPos.start || null);
  49792. if (this.match(types$12.parenR)) {
  49793. optionalCommaStart = this.state.start;
  49794. break;
  49795. }
  49796. }
  49797. if (this.match(types$12.ellipsis)) {
  49798. const spreadNodeStartPos = this.state.start;
  49799. const spreadNodeStartLoc = this.state.startLoc;
  49800. spreadStart = this.state.start;
  49801. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
  49802. this.checkCommaAfterRest(41);
  49803. break;
  49804. } else {
  49805. exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos));
  49806. }
  49807. }
  49808. const innerEndPos = this.state.lastTokEnd;
  49809. const innerEndLoc = this.state.lastTokEndLoc;
  49810. this.expect(types$12.parenR);
  49811. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  49812. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  49813. let arrowNode = this.startNodeAt(startPos, startLoc);
  49814. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  49815. this.expressionScope.validateAsPattern();
  49816. this.expressionScope.exit();
  49817. this.parseArrowExpression(arrowNode, exprList, false);
  49818. return arrowNode;
  49819. }
  49820. this.expressionScope.exit();
  49821. if (!exprList.length) {
  49822. this.unexpected(this.state.lastTokStart);
  49823. }
  49824. if (optionalCommaStart)
  49825. this.unexpected(optionalCommaStart);
  49826. if (spreadStart)
  49827. this.unexpected(spreadStart);
  49828. this.checkExpressionErrors(refExpressionErrors, true);
  49829. if (refNeedsArrowPos.start)
  49830. this.unexpected(refNeedsArrowPos.start);
  49831. this.toReferencedListDeep(exprList, true);
  49832. if (exprList.length > 1) {
  49833. val = this.startNodeAt(innerStartPos, innerStartLoc);
  49834. val.expressions = exprList;
  49835. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  49836. } else {
  49837. val = exprList[0];
  49838. }
  49839. if (!this.options.createParenthesizedExpressions) {
  49840. this.addExtra(val, "parenthesized", true);
  49841. this.addExtra(val, "parenStart", startPos);
  49842. return val;
  49843. }
  49844. const parenExpression = this.startNodeAt(startPos, startLoc);
  49845. parenExpression.expression = val;
  49846. this.finishNode(parenExpression, "ParenthesizedExpression");
  49847. return parenExpression;
  49848. }
  49849. shouldParseArrow() {
  49850. return !this.canInsertSemicolon();
  49851. }
  49852. parseArrow(node) {
  49853. if (this.eat(types$12.arrow)) {
  49854. return node;
  49855. }
  49856. }
  49857. parseParenItem(node, startPos, startLoc) {
  49858. return node;
  49859. }
  49860. parseNewOrNewTarget() {
  49861. const node = this.startNode();
  49862. this.next();
  49863. if (this.match(types$12.dot)) {
  49864. const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
  49865. this.next();
  49866. const metaProp = this.parseMetaProperty(node, meta, "target");
  49867. if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
  49868. this.raise(metaProp.start, ErrorMessages.UnexpectedNewTarget);
  49869. }
  49870. return metaProp;
  49871. }
  49872. return this.parseNew(node);
  49873. }
  49874. parseNew(node) {
  49875. node.callee = this.parseNoCallExpr();
  49876. if (node.callee.type === "Import") {
  49877. this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression);
  49878. } else if (this.isOptionalChain(node.callee)) {
  49879. this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew);
  49880. } else if (this.eat(types$12.questionDot)) {
  49881. this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew);
  49882. }
  49883. this.parseNewArguments(node);
  49884. return this.finishNode(node, "NewExpression");
  49885. }
  49886. parseNewArguments(node) {
  49887. if (this.eat(types$12.parenL)) {
  49888. const args = this.parseExprList(types$12.parenR);
  49889. this.toReferencedList(args);
  49890. node.arguments = args;
  49891. } else {
  49892. node.arguments = [];
  49893. }
  49894. }
  49895. parseTemplateElement(isTagged) {
  49896. const elem = this.startNode();
  49897. if (this.state.value === null) {
  49898. if (!isTagged) {
  49899. this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate);
  49900. }
  49901. }
  49902. elem.value = {
  49903. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  49904. cooked: this.state.value
  49905. };
  49906. this.next();
  49907. elem.tail = this.match(types$12.backQuote);
  49908. return this.finishNode(elem, "TemplateElement");
  49909. }
  49910. parseTemplate(isTagged) {
  49911. const node = this.startNode();
  49912. this.next();
  49913. node.expressions = [];
  49914. let curElt = this.parseTemplateElement(isTagged);
  49915. node.quasis = [curElt];
  49916. while (!curElt.tail) {
  49917. this.expect(types$12.dollarBraceL);
  49918. node.expressions.push(this.parseTemplateSubstitution());
  49919. this.expect(types$12.braceR);
  49920. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  49921. }
  49922. this.next();
  49923. return this.finishNode(node, "TemplateLiteral");
  49924. }
  49925. parseTemplateSubstitution() {
  49926. return this.parseExpression();
  49927. }
  49928. parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
  49929. if (isRecord) {
  49930. this.expectPlugin("recordAndTuple");
  49931. }
  49932. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  49933. this.state.inFSharpPipelineDirectBody = false;
  49934. const propHash = /* @__PURE__ */ Object.create(null);
  49935. let first = true;
  49936. const node = this.startNode();
  49937. node.properties = [];
  49938. this.next();
  49939. while (!this.match(close)) {
  49940. if (first) {
  49941. first = false;
  49942. } else {
  49943. this.expect(types$12.comma);
  49944. if (this.match(close)) {
  49945. this.addExtra(node, "trailingComma", this.state.lastTokStart);
  49946. break;
  49947. }
  49948. }
  49949. const prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);
  49950. if (!isPattern) {
  49951. this.checkProto(prop, isRecord, propHash, refExpressionErrors);
  49952. }
  49953. if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
  49954. this.raise(prop.start, ErrorMessages.InvalidRecordProperty);
  49955. }
  49956. if (prop.shorthand) {
  49957. this.addExtra(prop, "shorthand", true);
  49958. }
  49959. node.properties.push(prop);
  49960. }
  49961. this.state.exprAllowed = false;
  49962. this.next();
  49963. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  49964. let type = "ObjectExpression";
  49965. if (isPattern) {
  49966. type = "ObjectPattern";
  49967. } else if (isRecord) {
  49968. type = "RecordExpression";
  49969. }
  49970. return this.finishNode(node, type);
  49971. }
  49972. maybeAsyncOrAccessorProp(prop) {
  49973. return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(types$12.bracketL) || this.match(types$12.star));
  49974. }
  49975. parsePropertyDefinition(isPattern, refExpressionErrors) {
  49976. let decorators = [];
  49977. if (this.match(types$12.at)) {
  49978. if (this.hasPlugin("decorators")) {
  49979. this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator);
  49980. }
  49981. while (this.match(types$12.at)) {
  49982. decorators.push(this.parseDecorator());
  49983. }
  49984. }
  49985. const prop = this.startNode();
  49986. let isGenerator = false;
  49987. let isAsync = false;
  49988. let isAccessor = false;
  49989. let startPos;
  49990. let startLoc;
  49991. if (this.match(types$12.ellipsis)) {
  49992. if (decorators.length)
  49993. this.unexpected();
  49994. if (isPattern) {
  49995. this.next();
  49996. prop.argument = this.parseIdentifier();
  49997. this.checkCommaAfterRest(125);
  49998. return this.finishNode(prop, "RestElement");
  49999. }
  50000. return this.parseSpread();
  50001. }
  50002. if (decorators.length) {
  50003. prop.decorators = decorators;
  50004. decorators = [];
  50005. }
  50006. prop.method = false;
  50007. if (isPattern || refExpressionErrors) {
  50008. startPos = this.state.start;
  50009. startLoc = this.state.startLoc;
  50010. }
  50011. if (!isPattern) {
  50012. isGenerator = this.eat(types$12.star);
  50013. }
  50014. const containsEsc = this.state.containsEsc;
  50015. const key = this.parsePropertyName(prop, false);
  50016. if (!isPattern && !isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
  50017. const keyName = key.name;
  50018. if (keyName === "async" && !this.hasPrecedingLineBreak()) {
  50019. isAsync = true;
  50020. isGenerator = this.eat(types$12.star);
  50021. this.parsePropertyName(prop, false);
  50022. }
  50023. if (keyName === "get" || keyName === "set") {
  50024. isAccessor = true;
  50025. prop.kind = keyName;
  50026. if (this.match(types$12.star)) {
  50027. isGenerator = true;
  50028. this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName);
  50029. this.next();
  50030. }
  50031. this.parsePropertyName(prop, false);
  50032. }
  50033. }
  50034. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  50035. return prop;
  50036. }
  50037. getGetterSetterExpectedParamCount(method) {
  50038. return method.kind === "get" ? 0 : 1;
  50039. }
  50040. getObjectOrClassMethodParams(method) {
  50041. return method.params;
  50042. }
  50043. checkGetterSetterParams(method) {
  50044. var _params;
  50045. const paramCount = this.getGetterSetterExpectedParamCount(method);
  50046. const params = this.getObjectOrClassMethodParams(method);
  50047. const start3 = method.start;
  50048. if (params.length !== paramCount) {
  50049. if (method.kind === "get") {
  50050. this.raise(start3, ErrorMessages.BadGetterArity);
  50051. } else {
  50052. this.raise(start3, ErrorMessages.BadSetterArity);
  50053. }
  50054. }
  50055. if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
  50056. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  50057. }
  50058. }
  50059. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  50060. if (isAccessor) {
  50061. this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
  50062. this.checkGetterSetterParams(prop);
  50063. return prop;
  50064. }
  50065. if (isAsync || isGenerator || this.match(types$12.parenL)) {
  50066. if (isPattern)
  50067. this.unexpected();
  50068. prop.kind = "method";
  50069. prop.method = true;
  50070. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  50071. }
  50072. }
  50073. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  50074. prop.shorthand = false;
  50075. if (this.eat(types$12.colon)) {
  50076. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
  50077. return this.finishNode(prop, "ObjectProperty");
  50078. }
  50079. if (!prop.computed && prop.key.type === "Identifier") {
  50080. this.checkReservedWord(prop.key.name, prop.key.start, true, false);
  50081. if (isPattern) {
  50082. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  50083. } else if (this.match(types$12.eq) && refExpressionErrors) {
  50084. if (refExpressionErrors.shorthandAssign === -1) {
  50085. refExpressionErrors.shorthandAssign = this.state.start;
  50086. }
  50087. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  50088. } else {
  50089. prop.value = prop.key.__clone();
  50090. }
  50091. prop.shorthand = true;
  50092. return this.finishNode(prop, "ObjectProperty");
  50093. }
  50094. }
  50095. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  50096. const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  50097. if (!node)
  50098. this.unexpected();
  50099. return node;
  50100. }
  50101. parsePropertyName(prop, isPrivateNameAllowed) {
  50102. if (this.eat(types$12.bracketL)) {
  50103. prop.computed = true;
  50104. prop.key = this.parseMaybeAssignAllowIn();
  50105. this.expect(types$12.bracketR);
  50106. } else {
  50107. const oldInPropertyName = this.state.inPropertyName;
  50108. this.state.inPropertyName = true;
  50109. const type = this.state.type;
  50110. prop.key = type === types$12.num || type === types$12.string || type === types$12.bigint || type === types$12.decimal ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
  50111. if (type !== types$12.privateName) {
  50112. prop.computed = false;
  50113. }
  50114. this.state.inPropertyName = oldInPropertyName;
  50115. }
  50116. return prop.key;
  50117. }
  50118. initFunction(node, isAsync) {
  50119. node.id = null;
  50120. node.generator = false;
  50121. node.async = !!isAsync;
  50122. }
  50123. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  50124. this.initFunction(node, isAsync);
  50125. node.generator = !!isGenerator;
  50126. const allowModifiers = isConstructor;
  50127. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_SUPER2 | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  50128. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  50129. this.parseFunctionParams(node, allowModifiers);
  50130. this.parseFunctionBodyAndFinish(node, type, true);
  50131. this.prodParam.exit();
  50132. this.scope.exit();
  50133. return node;
  50134. }
  50135. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  50136. if (isTuple) {
  50137. this.expectPlugin("recordAndTuple");
  50138. }
  50139. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  50140. this.state.inFSharpPipelineDirectBody = false;
  50141. const node = this.startNode();
  50142. this.next();
  50143. node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
  50144. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  50145. return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
  50146. }
  50147. parseArrowExpression(node, params, isAsync, trailingCommaPos) {
  50148. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  50149. let flags = functionFlags2(isAsync, false);
  50150. if (!this.match(types$12.bracketL) && this.prodParam.hasIn) {
  50151. flags |= PARAM_IN;
  50152. }
  50153. this.prodParam.enter(flags);
  50154. this.initFunction(node, isAsync);
  50155. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  50156. if (params) {
  50157. this.state.maybeInArrowParameters = true;
  50158. this.setArrowFunctionParameters(node, params, trailingCommaPos);
  50159. }
  50160. this.state.maybeInArrowParameters = false;
  50161. this.parseFunctionBody(node, true);
  50162. this.prodParam.exit();
  50163. this.scope.exit();
  50164. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  50165. return this.finishNode(node, "ArrowFunctionExpression");
  50166. }
  50167. setArrowFunctionParameters(node, params, trailingCommaPos) {
  50168. node.params = this.toAssignableList(params, trailingCommaPos, false);
  50169. }
  50170. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  50171. this.parseFunctionBody(node, false, isMethod);
  50172. this.finishNode(node, type);
  50173. }
  50174. parseFunctionBody(node, allowExpression, isMethod = false) {
  50175. const isExpression = allowExpression && !this.match(types$12.braceL);
  50176. this.expressionScope.enter(newExpressionScope());
  50177. if (isExpression) {
  50178. node.body = this.parseMaybeAssign();
  50179. this.checkParams(node, false, allowExpression, false);
  50180. } else {
  50181. const oldStrict = this.state.strict;
  50182. const oldLabels = this.state.labels;
  50183. this.state.labels = [];
  50184. this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
  50185. node.body = this.parseBlock(true, false, (hasStrictModeDirective) => {
  50186. const nonSimple = !this.isSimpleParamList(node.params);
  50187. if (hasStrictModeDirective && nonSimple) {
  50188. const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
  50189. this.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective);
  50190. }
  50191. const strictModeChanged = !oldStrict && this.state.strict;
  50192. this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
  50193. if (this.state.strict && node.id) {
  50194. this.checkLVal(node.id, "function name", BIND_OUTSIDE2, void 0, void 0, strictModeChanged);
  50195. }
  50196. });
  50197. this.prodParam.exit();
  50198. this.expressionScope.exit();
  50199. this.state.labels = oldLabels;
  50200. }
  50201. }
  50202. isSimpleParamList(params) {
  50203. for (let i = 0, len = params.length; i < len; i++) {
  50204. if (params[i].type !== "Identifier")
  50205. return false;
  50206. }
  50207. return true;
  50208. }
  50209. checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
  50210. const checkClashes = /* @__PURE__ */ new Set();
  50211. for (const param of node.params) {
  50212. this.checkLVal(param, "function parameter list", BIND_VAR2, allowDuplicates ? null : checkClashes, void 0, strictModeChanged);
  50213. }
  50214. }
  50215. parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
  50216. const elts = [];
  50217. let first = true;
  50218. while (!this.eat(close)) {
  50219. if (first) {
  50220. first = false;
  50221. } else {
  50222. this.expect(types$12.comma);
  50223. if (this.match(close)) {
  50224. if (nodeForExtra) {
  50225. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  50226. }
  50227. this.next();
  50228. break;
  50229. }
  50230. }
  50231. elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
  50232. }
  50233. return elts;
  50234. }
  50235. parseExprListItem(allowEmpty, refExpressionErrors, refNeedsArrowPos, allowPlaceholder) {
  50236. let elt;
  50237. if (this.match(types$12.comma)) {
  50238. if (!allowEmpty) {
  50239. this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ",");
  50240. }
  50241. elt = null;
  50242. } else if (this.match(types$12.ellipsis)) {
  50243. const spreadNodeStartPos = this.state.start;
  50244. const spreadNodeStartLoc = this.state.startLoc;
  50245. elt = this.parseParenItem(this.parseSpread(refExpressionErrors, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc);
  50246. } else if (this.match(types$12.question)) {
  50247. this.expectPlugin("partialApplication");
  50248. if (!allowPlaceholder) {
  50249. this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder);
  50250. }
  50251. const node = this.startNode();
  50252. this.next();
  50253. elt = this.finishNode(node, "ArgumentPlaceholder");
  50254. } else {
  50255. elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos);
  50256. }
  50257. return elt;
  50258. }
  50259. parseIdentifier(liberal) {
  50260. const node = this.startNode();
  50261. const name2 = this.parseIdentifierName(node.start, liberal);
  50262. return this.createIdentifier(node, name2);
  50263. }
  50264. createIdentifier(node, name2) {
  50265. node.name = name2;
  50266. node.loc.identifierName = name2;
  50267. return this.finishNode(node, "Identifier");
  50268. }
  50269. parseIdentifierName(pos, liberal) {
  50270. let name2;
  50271. const {
  50272. start: start3,
  50273. type
  50274. } = this.state;
  50275. if (type === types$12.name) {
  50276. name2 = this.state.value;
  50277. } else if (type.keyword) {
  50278. name2 = type.keyword;
  50279. const curContext = this.curContext();
  50280. if ((type === types$12._class || type === types$12._function) && (curContext === types2.functionStatement || curContext === types2.functionExpression)) {
  50281. this.state.context.pop();
  50282. }
  50283. } else {
  50284. throw this.unexpected();
  50285. }
  50286. if (liberal) {
  50287. this.state.type = types$12.name;
  50288. } else {
  50289. this.checkReservedWord(name2, start3, !!type.keyword, false);
  50290. }
  50291. this.next();
  50292. return name2;
  50293. }
  50294. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  50295. if (this.prodParam.hasYield && word === "yield") {
  50296. this.raise(startLoc, ErrorMessages.YieldBindingIdentifier);
  50297. return;
  50298. }
  50299. if (word === "await") {
  50300. if (this.prodParam.hasAwait) {
  50301. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier);
  50302. return;
  50303. } else if (this.scope.inStaticBlock && !this.scope.inNonArrowFunction) {
  50304. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifierInStaticBlock);
  50305. return;
  50306. } else {
  50307. this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier);
  50308. }
  50309. }
  50310. if (this.scope.inClass && !this.scope.inNonArrowFunction && word === "arguments") {
  50311. this.raise(startLoc, ErrorMessages.ArgumentsInClass);
  50312. return;
  50313. }
  50314. if (checkKeywords && isKeyword(word)) {
  50315. this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word);
  50316. return;
  50317. }
  50318. const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  50319. if (reservedTest(word, this.inModule)) {
  50320. this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word);
  50321. }
  50322. }
  50323. isAwaitAllowed() {
  50324. if (this.prodParam.hasAwait)
  50325. return true;
  50326. if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
  50327. return true;
  50328. }
  50329. return false;
  50330. }
  50331. parseAwait(startPos, startLoc) {
  50332. const node = this.startNodeAt(startPos, startLoc);
  50333. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter);
  50334. if (this.eat(types$12.star)) {
  50335. this.raise(node.start, ErrorMessages.ObsoleteAwaitStar);
  50336. }
  50337. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  50338. if (this.isAmbiguousAwait()) {
  50339. this.ambiguousScriptDifferentAst = true;
  50340. } else {
  50341. this.sawUnambiguousESM = true;
  50342. }
  50343. }
  50344. if (!this.state.soloAwait) {
  50345. node.argument = this.parseMaybeUnary(null, true);
  50346. }
  50347. return this.finishNode(node, "AwaitExpression");
  50348. }
  50349. isAmbiguousAwait() {
  50350. return this.hasPrecedingLineBreak() || this.match(types$12.plusMin) || this.match(types$12.parenL) || this.match(types$12.bracketL) || this.match(types$12.backQuote) || this.match(types$12.regexp) || this.match(types$12.slash) || this.hasPlugin("v8intrinsic") && this.match(types$12.modulo);
  50351. }
  50352. parseYield() {
  50353. const node = this.startNode();
  50354. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter);
  50355. this.next();
  50356. if (this.match(types$12.semi) || !this.match(types$12.star) && !this.state.type.startsExpr || this.hasPrecedingLineBreak()) {
  50357. node.delegate = false;
  50358. node.argument = null;
  50359. } else {
  50360. node.delegate = this.eat(types$12.star);
  50361. node.argument = this.parseMaybeAssign();
  50362. }
  50363. return this.finishNode(node, "YieldExpression");
  50364. }
  50365. checkPipelineAtInfixOperator(left, leftStartPos) {
  50366. if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  50367. if (left.type === "SequenceExpression") {
  50368. this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression);
  50369. }
  50370. }
  50371. }
  50372. parseSmartPipelineBody(childExpression, startPos, startLoc) {
  50373. this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);
  50374. return this.parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc);
  50375. }
  50376. checkSmartPipelineBodyEarlyErrors(childExpression, startPos) {
  50377. if (this.match(types$12.arrow)) {
  50378. throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow);
  50379. } else if (childExpression.type === "SequenceExpression") {
  50380. this.raise(startPos, ErrorMessages.PipelineBodySequenceExpression);
  50381. }
  50382. }
  50383. parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc) {
  50384. const bodyNode = this.startNodeAt(startPos, startLoc);
  50385. const isSimpleReference = this.isSimpleReference(childExpression);
  50386. if (isSimpleReference) {
  50387. bodyNode.callee = childExpression;
  50388. } else {
  50389. if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
  50390. this.raise(startPos, ErrorMessages.PipelineTopicUnused);
  50391. }
  50392. bodyNode.expression = childExpression;
  50393. }
  50394. return this.finishNode(bodyNode, isSimpleReference ? "PipelineBareFunction" : "PipelineTopicExpression");
  50395. }
  50396. isSimpleReference(expression) {
  50397. switch (expression.type) {
  50398. case "MemberExpression":
  50399. return !expression.computed && this.isSimpleReference(expression.object);
  50400. case "Identifier":
  50401. return true;
  50402. default:
  50403. return false;
  50404. }
  50405. }
  50406. withTopicPermittingContext(callback) {
  50407. const outerContextTopicState = this.state.topicContext;
  50408. this.state.topicContext = {
  50409. maxNumOfResolvableTopics: 1,
  50410. maxTopicIndex: null
  50411. };
  50412. try {
  50413. return callback();
  50414. } finally {
  50415. this.state.topicContext = outerContextTopicState;
  50416. }
  50417. }
  50418. withTopicForbiddingContext(callback) {
  50419. const outerContextTopicState = this.state.topicContext;
  50420. this.state.topicContext = {
  50421. maxNumOfResolvableTopics: 0,
  50422. maxTopicIndex: null
  50423. };
  50424. try {
  50425. return callback();
  50426. } finally {
  50427. this.state.topicContext = outerContextTopicState;
  50428. }
  50429. }
  50430. withSoloAwaitPermittingContext(callback) {
  50431. const outerContextSoloAwaitState = this.state.soloAwait;
  50432. this.state.soloAwait = true;
  50433. try {
  50434. return callback();
  50435. } finally {
  50436. this.state.soloAwait = outerContextSoloAwaitState;
  50437. }
  50438. }
  50439. allowInAnd(callback) {
  50440. const flags = this.prodParam.currentFlags();
  50441. const prodParamToSet = PARAM_IN & ~flags;
  50442. if (prodParamToSet) {
  50443. this.prodParam.enter(flags | PARAM_IN);
  50444. try {
  50445. return callback();
  50446. } finally {
  50447. this.prodParam.exit();
  50448. }
  50449. }
  50450. return callback();
  50451. }
  50452. disallowInAnd(callback) {
  50453. const flags = this.prodParam.currentFlags();
  50454. const prodParamToClear = PARAM_IN & flags;
  50455. if (prodParamToClear) {
  50456. this.prodParam.enter(flags & ~PARAM_IN);
  50457. try {
  50458. return callback();
  50459. } finally {
  50460. this.prodParam.exit();
  50461. }
  50462. }
  50463. return callback();
  50464. }
  50465. registerTopicReference() {
  50466. this.state.topicContext.maxTopicIndex = 0;
  50467. }
  50468. primaryTopicReferenceIsAllowedInCurrentTopicContext() {
  50469. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  50470. }
  50471. topicReferenceWasUsedInCurrentTopicContext() {
  50472. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  50473. }
  50474. parseFSharpPipelineBody(prec) {
  50475. const startPos = this.state.start;
  50476. const startLoc = this.state.startLoc;
  50477. this.state.potentialArrowAt = this.state.start;
  50478. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  50479. this.state.inFSharpPipelineDirectBody = true;
  50480. const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec);
  50481. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  50482. return ret;
  50483. }
  50484. parseModuleExpression() {
  50485. this.expectPlugin("moduleBlocks");
  50486. const node = this.startNode();
  50487. this.next();
  50488. this.eat(types$12.braceL);
  50489. const revertScopes = this.initializeScopes(true);
  50490. this.enterInitialScopes();
  50491. const program = this.startNode();
  50492. try {
  50493. node.body = this.parseProgram(program, types$12.braceR, "module");
  50494. } finally {
  50495. revertScopes();
  50496. }
  50497. this.eat(types$12.braceR);
  50498. return this.finishNode(node, "ModuleExpression");
  50499. }
  50500. };
  50501. var loopLabel2 = {
  50502. kind: "loop"
  50503. };
  50504. var switchLabel2 = {
  50505. kind: "switch"
  50506. };
  50507. var FUNC_NO_FLAGS = 0;
  50508. var FUNC_STATEMENT2 = 1;
  50509. var FUNC_HANGING_STATEMENT2 = 2;
  50510. var FUNC_NULLABLE_ID2 = 4;
  50511. var loneSurrogate2 = /[\uD800-\uDFFF]/u;
  50512. var keywordRelationalOperator2 = /in(?:stanceof)?/y;
  50513. function babel7CompatTokens(tokens) {
  50514. {
  50515. for (let i = 0; i < tokens.length; i++) {
  50516. const token = tokens[i];
  50517. if (token.type === types$12.privateName) {
  50518. const {
  50519. loc,
  50520. start: start3,
  50521. value,
  50522. end
  50523. } = token;
  50524. const hashEndPos = start3 + 1;
  50525. const hashEndLoc = new Position3(loc.start.line, loc.start.column + 1);
  50526. tokens.splice(i, 1, new Token3({
  50527. type: types$12.hash,
  50528. value: "#",
  50529. start: start3,
  50530. end: hashEndPos,
  50531. startLoc: loc.start,
  50532. endLoc: hashEndLoc
  50533. }), new Token3({
  50534. type: types$12.name,
  50535. value,
  50536. start: hashEndPos,
  50537. end,
  50538. startLoc: hashEndLoc,
  50539. endLoc: loc.end
  50540. }));
  50541. }
  50542. }
  50543. }
  50544. return tokens;
  50545. }
  50546. var StatementParser = class extends ExpressionParser {
  50547. parseTopLevel(file, program) {
  50548. file.program = this.parseProgram(program);
  50549. file.comments = this.state.comments;
  50550. if (this.options.tokens)
  50551. file.tokens = babel7CompatTokens(this.tokens);
  50552. return this.finishNode(file, "File");
  50553. }
  50554. parseProgram(program, end = types$12.eof, sourceType = this.options.sourceType) {
  50555. program.sourceType = sourceType;
  50556. program.interpreter = this.parseInterpreterDirective();
  50557. this.parseBlockBody(program, true, true, end);
  50558. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  50559. for (const [name2] of Array.from(this.scope.undefinedExports)) {
  50560. const pos = this.scope.undefinedExports.get(name2);
  50561. this.raise(pos, ErrorMessages.ModuleExportUndefined, name2);
  50562. }
  50563. }
  50564. return this.finishNode(program, "Program");
  50565. }
  50566. stmtToDirective(stmt) {
  50567. const expr = stmt.expression;
  50568. const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
  50569. const directive = this.startNodeAt(stmt.start, stmt.loc.start);
  50570. const raw = this.input.slice(expr.start, expr.end);
  50571. const val = directiveLiteral.value = raw.slice(1, -1);
  50572. this.addExtra(directiveLiteral, "raw", raw);
  50573. this.addExtra(directiveLiteral, "rawValue", val);
  50574. directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
  50575. return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
  50576. }
  50577. parseInterpreterDirective() {
  50578. if (!this.match(types$12.interpreterDirective)) {
  50579. return null;
  50580. }
  50581. const node = this.startNode();
  50582. node.value = this.state.value;
  50583. this.next();
  50584. return this.finishNode(node, "InterpreterDirective");
  50585. }
  50586. isLet(context) {
  50587. if (!this.isContextual("let")) {
  50588. return false;
  50589. }
  50590. return this.isLetKeyword(context);
  50591. }
  50592. isLetKeyword(context) {
  50593. const next = this.nextTokenStart();
  50594. const nextCh = this.codePointAtPos(next);
  50595. if (nextCh === 92 || nextCh === 91) {
  50596. return true;
  50597. }
  50598. if (context)
  50599. return false;
  50600. if (nextCh === 123)
  50601. return true;
  50602. if (isIdentifierStart2(nextCh)) {
  50603. keywordRelationalOperator2.lastIndex = next;
  50604. const matched = keywordRelationalOperator2.exec(this.input);
  50605. if (matched !== null) {
  50606. const endCh = this.codePointAtPos(next + matched[0].length);
  50607. if (!isIdentifierChar2(endCh) && endCh !== 92) {
  50608. return false;
  50609. }
  50610. }
  50611. return true;
  50612. }
  50613. return false;
  50614. }
  50615. parseStatement(context, topLevel) {
  50616. if (this.match(types$12.at)) {
  50617. this.parseDecorators(true);
  50618. }
  50619. return this.parseStatementContent(context, topLevel);
  50620. }
  50621. parseStatementContent(context, topLevel) {
  50622. let starttype = this.state.type;
  50623. const node = this.startNode();
  50624. let kind;
  50625. if (this.isLet(context)) {
  50626. starttype = types$12._var;
  50627. kind = "let";
  50628. }
  50629. switch (starttype) {
  50630. case types$12._break:
  50631. case types$12._continue:
  50632. return this.parseBreakContinueStatement(node, starttype.keyword);
  50633. case types$12._debugger:
  50634. return this.parseDebuggerStatement(node);
  50635. case types$12._do:
  50636. return this.parseDoStatement(node);
  50637. case types$12._for:
  50638. return this.parseForStatement(node);
  50639. case types$12._function:
  50640. if (this.lookaheadCharCode() === 46)
  50641. break;
  50642. if (context) {
  50643. if (this.state.strict) {
  50644. this.raise(this.state.start, ErrorMessages.StrictFunction);
  50645. } else if (context !== "if" && context !== "label") {
  50646. this.raise(this.state.start, ErrorMessages.SloppyFunction);
  50647. }
  50648. }
  50649. return this.parseFunctionStatement(node, false, !context);
  50650. case types$12._class:
  50651. if (context)
  50652. this.unexpected();
  50653. return this.parseClass(node, true);
  50654. case types$12._if:
  50655. return this.parseIfStatement(node);
  50656. case types$12._return:
  50657. return this.parseReturnStatement(node);
  50658. case types$12._switch:
  50659. return this.parseSwitchStatement(node);
  50660. case types$12._throw:
  50661. return this.parseThrowStatement(node);
  50662. case types$12._try:
  50663. return this.parseTryStatement(node);
  50664. case types$12._const:
  50665. case types$12._var:
  50666. kind = kind || this.state.value;
  50667. if (context && kind !== "var") {
  50668. this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration);
  50669. }
  50670. return this.parseVarStatement(node, kind);
  50671. case types$12._while:
  50672. return this.parseWhileStatement(node);
  50673. case types$12._with:
  50674. return this.parseWithStatement(node);
  50675. case types$12.braceL:
  50676. return this.parseBlock();
  50677. case types$12.semi:
  50678. return this.parseEmptyStatement(node);
  50679. case types$12._import: {
  50680. const nextTokenCharCode = this.lookaheadCharCode();
  50681. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  50682. break;
  50683. }
  50684. }
  50685. case types$12._export: {
  50686. if (!this.options.allowImportExportEverywhere && !topLevel) {
  50687. this.raise(this.state.start, ErrorMessages.UnexpectedImportExport);
  50688. }
  50689. this.next();
  50690. let result;
  50691. if (starttype === types$12._import) {
  50692. result = this.parseImport(node);
  50693. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  50694. this.sawUnambiguousESM = true;
  50695. }
  50696. } else {
  50697. result = this.parseExport(node);
  50698. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  50699. this.sawUnambiguousESM = true;
  50700. }
  50701. }
  50702. this.assertModuleNodeAllowed(node);
  50703. return result;
  50704. }
  50705. default: {
  50706. if (this.isAsyncFunction()) {
  50707. if (context) {
  50708. this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext);
  50709. }
  50710. this.next();
  50711. return this.parseFunctionStatement(node, true, !context);
  50712. }
  50713. }
  50714. }
  50715. const maybeName = this.state.value;
  50716. const expr = this.parseExpression();
  50717. if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) {
  50718. return this.parseLabeledStatement(node, maybeName, expr, context);
  50719. } else {
  50720. return this.parseExpressionStatement(node, expr);
  50721. }
  50722. }
  50723. assertModuleNodeAllowed(node) {
  50724. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  50725. this.raise(node.start, SourceTypeModuleErrorMessages.ImportOutsideModule);
  50726. }
  50727. }
  50728. takeDecorators(node) {
  50729. const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  50730. if (decorators.length) {
  50731. node.decorators = decorators;
  50732. this.resetStartLocationFromNode(node, decorators[0]);
  50733. this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
  50734. }
  50735. }
  50736. canHaveLeadingDecorator() {
  50737. return this.match(types$12._class);
  50738. }
  50739. parseDecorators(allowExport) {
  50740. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  50741. while (this.match(types$12.at)) {
  50742. const decorator = this.parseDecorator();
  50743. currentContextDecorators.push(decorator);
  50744. }
  50745. if (this.match(types$12._export)) {
  50746. if (!allowExport) {
  50747. this.unexpected();
  50748. }
  50749. if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  50750. this.raise(this.state.start, ErrorMessages.DecoratorExportClass);
  50751. }
  50752. } else if (!this.canHaveLeadingDecorator()) {
  50753. throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator);
  50754. }
  50755. }
  50756. parseDecorator() {
  50757. this.expectOnePlugin(["decorators-legacy", "decorators"]);
  50758. const node = this.startNode();
  50759. this.next();
  50760. if (this.hasPlugin("decorators")) {
  50761. this.state.decoratorStack.push([]);
  50762. const startPos = this.state.start;
  50763. const startLoc = this.state.startLoc;
  50764. let expr;
  50765. if (this.eat(types$12.parenL)) {
  50766. expr = this.parseExpression();
  50767. this.expect(types$12.parenR);
  50768. } else {
  50769. expr = this.parseIdentifier(false);
  50770. while (this.eat(types$12.dot)) {
  50771. const node2 = this.startNodeAt(startPos, startLoc);
  50772. node2.object = expr;
  50773. node2.property = this.parseIdentifier(true);
  50774. node2.computed = false;
  50775. expr = this.finishNode(node2, "MemberExpression");
  50776. }
  50777. }
  50778. node.expression = this.parseMaybeDecoratorArguments(expr);
  50779. this.state.decoratorStack.pop();
  50780. } else {
  50781. node.expression = this.parseExprSubscripts();
  50782. }
  50783. return this.finishNode(node, "Decorator");
  50784. }
  50785. parseMaybeDecoratorArguments(expr) {
  50786. if (this.eat(types$12.parenL)) {
  50787. const node = this.startNodeAtNode(expr);
  50788. node.callee = expr;
  50789. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  50790. this.toReferencedList(node.arguments);
  50791. return this.finishNode(node, "CallExpression");
  50792. }
  50793. return expr;
  50794. }
  50795. parseBreakContinueStatement(node, keyword) {
  50796. const isBreak = keyword === "break";
  50797. this.next();
  50798. if (this.isLineTerminator()) {
  50799. node.label = null;
  50800. } else {
  50801. node.label = this.parseIdentifier();
  50802. this.semicolon();
  50803. }
  50804. this.verifyBreakContinue(node, keyword);
  50805. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  50806. }
  50807. verifyBreakContinue(node, keyword) {
  50808. const isBreak = keyword === "break";
  50809. let i;
  50810. for (i = 0; i < this.state.labels.length; ++i) {
  50811. const lab = this.state.labels[i];
  50812. if (node.label == null || lab.name === node.label.name) {
  50813. if (lab.kind != null && (isBreak || lab.kind === "loop"))
  50814. break;
  50815. if (node.label && isBreak)
  50816. break;
  50817. }
  50818. }
  50819. if (i === this.state.labels.length) {
  50820. this.raise(node.start, ErrorMessages.IllegalBreakContinue, keyword);
  50821. }
  50822. }
  50823. parseDebuggerStatement(node) {
  50824. this.next();
  50825. this.semicolon();
  50826. return this.finishNode(node, "DebuggerStatement");
  50827. }
  50828. parseHeaderExpression() {
  50829. this.expect(types$12.parenL);
  50830. const val = this.parseExpression();
  50831. this.expect(types$12.parenR);
  50832. return val;
  50833. }
  50834. parseDoStatement(node) {
  50835. this.next();
  50836. this.state.labels.push(loopLabel2);
  50837. node.body = this.withTopicForbiddingContext(() => this.parseStatement("do"));
  50838. this.state.labels.pop();
  50839. this.expect(types$12._while);
  50840. node.test = this.parseHeaderExpression();
  50841. this.eat(types$12.semi);
  50842. return this.finishNode(node, "DoWhileStatement");
  50843. }
  50844. parseForStatement(node) {
  50845. this.next();
  50846. this.state.labels.push(loopLabel2);
  50847. let awaitAt = -1;
  50848. if (this.isAwaitAllowed() && this.eatContextual("await")) {
  50849. awaitAt = this.state.lastTokStart;
  50850. }
  50851. this.scope.enter(SCOPE_OTHER);
  50852. this.expect(types$12.parenL);
  50853. if (this.match(types$12.semi)) {
  50854. if (awaitAt > -1) {
  50855. this.unexpected(awaitAt);
  50856. }
  50857. return this.parseFor(node, null);
  50858. }
  50859. const startsWithLet = this.isContextual("let");
  50860. const isLet = startsWithLet && this.isLetKeyword();
  50861. if (this.match(types$12._var) || this.match(types$12._const) || isLet) {
  50862. const init2 = this.startNode();
  50863. const kind = isLet ? "let" : this.state.value;
  50864. this.next();
  50865. this.parseVar(init2, true, kind);
  50866. this.finishNode(init2, "VariableDeclaration");
  50867. if ((this.match(types$12._in) || this.isContextual("of")) && init2.declarations.length === 1) {
  50868. return this.parseForIn(node, init2, awaitAt);
  50869. }
  50870. if (awaitAt > -1) {
  50871. this.unexpected(awaitAt);
  50872. }
  50873. return this.parseFor(node, init2);
  50874. }
  50875. const startsWithUnescapedName = this.match(types$12.name) && !this.state.containsEsc;
  50876. const refExpressionErrors = new ExpressionErrors();
  50877. const init = this.parseExpression(true, refExpressionErrors);
  50878. const isForOf = this.isContextual("of");
  50879. if (isForOf) {
  50880. if (startsWithLet) {
  50881. this.raise(init.start, ErrorMessages.ForOfLet);
  50882. } else if (awaitAt === -1 && startsWithUnescapedName && init.type === "Identifier" && init.name === "async") {
  50883. this.raise(init.start, ErrorMessages.ForOfAsync);
  50884. }
  50885. }
  50886. if (isForOf || this.match(types$12._in)) {
  50887. this.toAssignable(init, true);
  50888. const description = isForOf ? "for-of statement" : "for-in statement";
  50889. this.checkLVal(init, description);
  50890. return this.parseForIn(node, init, awaitAt);
  50891. } else {
  50892. this.checkExpressionErrors(refExpressionErrors, true);
  50893. }
  50894. if (awaitAt > -1) {
  50895. this.unexpected(awaitAt);
  50896. }
  50897. return this.parseFor(node, init);
  50898. }
  50899. parseFunctionStatement(node, isAsync, declarationPosition) {
  50900. this.next();
  50901. return this.parseFunction(node, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), isAsync);
  50902. }
  50903. parseIfStatement(node) {
  50904. this.next();
  50905. node.test = this.parseHeaderExpression();
  50906. node.consequent = this.parseStatement("if");
  50907. node.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null;
  50908. return this.finishNode(node, "IfStatement");
  50909. }
  50910. parseReturnStatement(node) {
  50911. if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
  50912. this.raise(this.state.start, ErrorMessages.IllegalReturn);
  50913. }
  50914. this.next();
  50915. if (this.isLineTerminator()) {
  50916. node.argument = null;
  50917. } else {
  50918. node.argument = this.parseExpression();
  50919. this.semicolon();
  50920. }
  50921. return this.finishNode(node, "ReturnStatement");
  50922. }
  50923. parseSwitchStatement(node) {
  50924. this.next();
  50925. node.discriminant = this.parseHeaderExpression();
  50926. const cases = node.cases = [];
  50927. this.expect(types$12.braceL);
  50928. this.state.labels.push(switchLabel2);
  50929. this.scope.enter(SCOPE_OTHER);
  50930. let cur;
  50931. for (let sawDefault; !this.match(types$12.braceR); ) {
  50932. if (this.match(types$12._case) || this.match(types$12._default)) {
  50933. const isCase = this.match(types$12._case);
  50934. if (cur)
  50935. this.finishNode(cur, "SwitchCase");
  50936. cases.push(cur = this.startNode());
  50937. cur.consequent = [];
  50938. this.next();
  50939. if (isCase) {
  50940. cur.test = this.parseExpression();
  50941. } else {
  50942. if (sawDefault) {
  50943. this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch);
  50944. }
  50945. sawDefault = true;
  50946. cur.test = null;
  50947. }
  50948. this.expect(types$12.colon);
  50949. } else {
  50950. if (cur) {
  50951. cur.consequent.push(this.parseStatement(null));
  50952. } else {
  50953. this.unexpected();
  50954. }
  50955. }
  50956. }
  50957. this.scope.exit();
  50958. if (cur)
  50959. this.finishNode(cur, "SwitchCase");
  50960. this.next();
  50961. this.state.labels.pop();
  50962. return this.finishNode(node, "SwitchStatement");
  50963. }
  50964. parseThrowStatement(node) {
  50965. this.next();
  50966. if (this.hasPrecedingLineBreak()) {
  50967. this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow);
  50968. }
  50969. node.argument = this.parseExpression();
  50970. this.semicolon();
  50971. return this.finishNode(node, "ThrowStatement");
  50972. }
  50973. parseCatchClauseParam() {
  50974. const param = this.parseBindingAtom();
  50975. const simple = param.type === "Identifier";
  50976. this.scope.enter(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  50977. this.checkLVal(param, "catch clause", BIND_LEXICAL2);
  50978. return param;
  50979. }
  50980. parseTryStatement(node) {
  50981. this.next();
  50982. node.block = this.parseBlock();
  50983. node.handler = null;
  50984. if (this.match(types$12._catch)) {
  50985. const clause = this.startNode();
  50986. this.next();
  50987. if (this.match(types$12.parenL)) {
  50988. this.expect(types$12.parenL);
  50989. clause.param = this.parseCatchClauseParam();
  50990. this.expect(types$12.parenR);
  50991. } else {
  50992. clause.param = null;
  50993. this.scope.enter(SCOPE_OTHER);
  50994. }
  50995. clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false));
  50996. this.scope.exit();
  50997. node.handler = this.finishNode(clause, "CatchClause");
  50998. }
  50999. node.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null;
  51000. if (!node.handler && !node.finalizer) {
  51001. this.raise(node.start, ErrorMessages.NoCatchOrFinally);
  51002. }
  51003. return this.finishNode(node, "TryStatement");
  51004. }
  51005. parseVarStatement(node, kind) {
  51006. this.next();
  51007. this.parseVar(node, false, kind);
  51008. this.semicolon();
  51009. return this.finishNode(node, "VariableDeclaration");
  51010. }
  51011. parseWhileStatement(node) {
  51012. this.next();
  51013. node.test = this.parseHeaderExpression();
  51014. this.state.labels.push(loopLabel2);
  51015. node.body = this.withTopicForbiddingContext(() => this.parseStatement("while"));
  51016. this.state.labels.pop();
  51017. return this.finishNode(node, "WhileStatement");
  51018. }
  51019. parseWithStatement(node) {
  51020. if (this.state.strict) {
  51021. this.raise(this.state.start, ErrorMessages.StrictWith);
  51022. }
  51023. this.next();
  51024. node.object = this.parseHeaderExpression();
  51025. node.body = this.withTopicForbiddingContext(() => this.parseStatement("with"));
  51026. return this.finishNode(node, "WithStatement");
  51027. }
  51028. parseEmptyStatement(node) {
  51029. this.next();
  51030. return this.finishNode(node, "EmptyStatement");
  51031. }
  51032. parseLabeledStatement(node, maybeName, expr, context) {
  51033. for (const label of this.state.labels) {
  51034. if (label.name === maybeName) {
  51035. this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName);
  51036. }
  51037. }
  51038. const kind = this.state.type.isLoop ? "loop" : this.match(types$12._switch) ? "switch" : null;
  51039. for (let i = this.state.labels.length - 1; i >= 0; i--) {
  51040. const label = this.state.labels[i];
  51041. if (label.statementStart === node.start) {
  51042. label.statementStart = this.state.start;
  51043. label.kind = kind;
  51044. } else {
  51045. break;
  51046. }
  51047. }
  51048. this.state.labels.push({
  51049. name: maybeName,
  51050. kind,
  51051. statementStart: this.state.start
  51052. });
  51053. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  51054. this.state.labels.pop();
  51055. node.label = expr;
  51056. return this.finishNode(node, "LabeledStatement");
  51057. }
  51058. parseExpressionStatement(node, expr) {
  51059. node.expression = expr;
  51060. this.semicolon();
  51061. return this.finishNode(node, "ExpressionStatement");
  51062. }
  51063. parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
  51064. const node = this.startNode();
  51065. if (allowDirectives) {
  51066. this.state.strictErrors.clear();
  51067. }
  51068. this.expect(types$12.braceL);
  51069. if (createNewLexicalScope) {
  51070. this.scope.enter(SCOPE_OTHER);
  51071. }
  51072. this.parseBlockBody(node, allowDirectives, false, types$12.braceR, afterBlockParse);
  51073. if (createNewLexicalScope) {
  51074. this.scope.exit();
  51075. }
  51076. return this.finishNode(node, "BlockStatement");
  51077. }
  51078. isValidDirective(stmt) {
  51079. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  51080. }
  51081. parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
  51082. const body = node.body = [];
  51083. const directives = node.directives = [];
  51084. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : void 0, topLevel, end, afterBlockParse);
  51085. }
  51086. parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
  51087. const oldStrict = this.state.strict;
  51088. let hasStrictModeDirective = false;
  51089. let parsedNonDirective = false;
  51090. while (!this.match(end)) {
  51091. const stmt = this.parseStatement(null, topLevel);
  51092. if (directives && !parsedNonDirective) {
  51093. if (this.isValidDirective(stmt)) {
  51094. const directive = this.stmtToDirective(stmt);
  51095. directives.push(directive);
  51096. if (!hasStrictModeDirective && directive.value.value === "use strict") {
  51097. hasStrictModeDirective = true;
  51098. this.setStrict(true);
  51099. }
  51100. continue;
  51101. }
  51102. parsedNonDirective = true;
  51103. this.state.strictErrors.clear();
  51104. }
  51105. body.push(stmt);
  51106. }
  51107. if (afterBlockParse) {
  51108. afterBlockParse.call(this, hasStrictModeDirective);
  51109. }
  51110. if (!oldStrict) {
  51111. this.setStrict(false);
  51112. }
  51113. this.next();
  51114. }
  51115. parseFor(node, init) {
  51116. node.init = init;
  51117. this.semicolon(false);
  51118. node.test = this.match(types$12.semi) ? null : this.parseExpression();
  51119. this.semicolon(false);
  51120. node.update = this.match(types$12.parenR) ? null : this.parseExpression();
  51121. this.expect(types$12.parenR);
  51122. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  51123. this.scope.exit();
  51124. this.state.labels.pop();
  51125. return this.finishNode(node, "ForStatement");
  51126. }
  51127. parseForIn(node, init, awaitAt) {
  51128. const isForIn = this.match(types$12._in);
  51129. this.next();
  51130. if (isForIn) {
  51131. if (awaitAt > -1)
  51132. this.unexpected(awaitAt);
  51133. } else {
  51134. node.await = awaitAt > -1;
  51135. }
  51136. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  51137. this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of");
  51138. } else if (init.type === "AssignmentPattern") {
  51139. this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop");
  51140. }
  51141. node.left = init;
  51142. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
  51143. this.expect(types$12.parenR);
  51144. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  51145. this.scope.exit();
  51146. this.state.labels.pop();
  51147. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  51148. }
  51149. parseVar(node, isFor, kind) {
  51150. const declarations = node.declarations = [];
  51151. const isTypescript = this.hasPlugin("typescript");
  51152. node.kind = kind;
  51153. for (; ; ) {
  51154. const decl = this.startNode();
  51155. this.parseVarId(decl, kind);
  51156. if (this.eat(types$12.eq)) {
  51157. decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
  51158. } else {
  51159. if (kind === "const" && !(this.match(types$12._in) || this.isContextual("of"))) {
  51160. if (!isTypescript) {
  51161. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations");
  51162. }
  51163. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types$12._in) || this.isContextual("of")))) {
  51164. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns");
  51165. }
  51166. decl.init = null;
  51167. }
  51168. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  51169. if (!this.eat(types$12.comma))
  51170. break;
  51171. }
  51172. return node;
  51173. }
  51174. parseVarId(decl, kind) {
  51175. decl.id = this.parseBindingAtom();
  51176. this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, void 0, kind !== "var");
  51177. }
  51178. parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
  51179. const isStatement = statement & FUNC_STATEMENT2;
  51180. const isHangingStatement = statement & FUNC_HANGING_STATEMENT2;
  51181. const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID2);
  51182. this.initFunction(node, isAsync);
  51183. if (this.match(types$12.star) && isHangingStatement) {
  51184. this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext);
  51185. }
  51186. node.generator = this.eat(types$12.star);
  51187. if (isStatement) {
  51188. node.id = this.parseFunctionId(requireId);
  51189. }
  51190. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  51191. this.state.maybeInArrowParameters = false;
  51192. this.scope.enter(SCOPE_FUNCTION2);
  51193. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  51194. if (!isStatement) {
  51195. node.id = this.parseFunctionId();
  51196. }
  51197. this.parseFunctionParams(node, false);
  51198. this.withTopicForbiddingContext(() => {
  51199. this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  51200. });
  51201. this.prodParam.exit();
  51202. this.scope.exit();
  51203. if (isStatement && !isHangingStatement) {
  51204. this.registerFunctionStatementId(node);
  51205. }
  51206. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  51207. return node;
  51208. }
  51209. parseFunctionId(requireId) {
  51210. return requireId || this.match(types$12.name) ? this.parseIdentifier() : null;
  51211. }
  51212. parseFunctionParams(node, allowModifiers) {
  51213. this.expect(types$12.parenL);
  51214. this.expressionScope.enter(newParameterDeclarationScope());
  51215. node.params = this.parseBindingList(types$12.parenR, 41, false, allowModifiers);
  51216. this.expressionScope.exit();
  51217. }
  51218. registerFunctionStatementId(node) {
  51219. if (!node.id)
  51220. return;
  51221. this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2, node.id.start);
  51222. }
  51223. parseClass(node, isStatement, optionalId) {
  51224. this.next();
  51225. this.takeDecorators(node);
  51226. const oldStrict = this.state.strict;
  51227. this.state.strict = true;
  51228. this.parseClassId(node, isStatement, optionalId);
  51229. this.parseClassSuper(node);
  51230. node.body = this.parseClassBody(!!node.superClass, oldStrict);
  51231. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  51232. }
  51233. isClassProperty() {
  51234. return this.match(types$12.eq) || this.match(types$12.semi) || this.match(types$12.braceR);
  51235. }
  51236. isClassMethod() {
  51237. return this.match(types$12.parenL);
  51238. }
  51239. isNonstaticConstructor(method) {
  51240. return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
  51241. }
  51242. parseClassBody(hadSuperClass, oldStrict) {
  51243. this.classScope.enter();
  51244. const state = {
  51245. hadConstructor: false,
  51246. hadSuperClass
  51247. };
  51248. let decorators = [];
  51249. const classBody = this.startNode();
  51250. classBody.body = [];
  51251. this.expect(types$12.braceL);
  51252. this.withTopicForbiddingContext(() => {
  51253. while (!this.match(types$12.braceR)) {
  51254. if (this.eat(types$12.semi)) {
  51255. if (decorators.length > 0) {
  51256. throw this.raise(this.state.lastTokEnd, ErrorMessages.DecoratorSemicolon);
  51257. }
  51258. continue;
  51259. }
  51260. if (this.match(types$12.at)) {
  51261. decorators.push(this.parseDecorator());
  51262. continue;
  51263. }
  51264. const member = this.startNode();
  51265. if (decorators.length) {
  51266. member.decorators = decorators;
  51267. this.resetStartLocationFromNode(member, decorators[0]);
  51268. decorators = [];
  51269. }
  51270. this.parseClassMember(classBody, member, state);
  51271. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  51272. this.raise(member.start, ErrorMessages.DecoratorConstructor);
  51273. }
  51274. }
  51275. });
  51276. this.state.strict = oldStrict;
  51277. this.next();
  51278. if (decorators.length) {
  51279. throw this.raise(this.state.start, ErrorMessages.TrailingDecorator);
  51280. }
  51281. this.classScope.exit();
  51282. return this.finishNode(classBody, "ClassBody");
  51283. }
  51284. parseClassMemberFromModifier(classBody, member) {
  51285. const key = this.parseIdentifier(true);
  51286. if (this.isClassMethod()) {
  51287. const method = member;
  51288. method.kind = "method";
  51289. method.computed = false;
  51290. method.key = key;
  51291. method.static = false;
  51292. this.pushClassMethod(classBody, method, false, false, false, false);
  51293. return true;
  51294. } else if (this.isClassProperty()) {
  51295. const prop = member;
  51296. prop.computed = false;
  51297. prop.key = key;
  51298. prop.static = false;
  51299. classBody.body.push(this.parseClassProperty(prop));
  51300. return true;
  51301. }
  51302. return false;
  51303. }
  51304. parseClassMember(classBody, member, state) {
  51305. const isStatic = this.isContextual("static");
  51306. if (isStatic) {
  51307. if (this.parseClassMemberFromModifier(classBody, member)) {
  51308. return;
  51309. }
  51310. if (this.eat(types$12.braceL)) {
  51311. this.parseClassStaticBlock(classBody, member);
  51312. return;
  51313. }
  51314. }
  51315. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  51316. }
  51317. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  51318. const publicMethod = member;
  51319. const privateMethod = member;
  51320. const publicProp = member;
  51321. const privateProp = member;
  51322. const method = publicMethod;
  51323. const publicMember = publicMethod;
  51324. member.static = isStatic;
  51325. if (this.eat(types$12.star)) {
  51326. method.kind = "method";
  51327. const isPrivateName = this.match(types$12.privateName);
  51328. this.parseClassElementName(method);
  51329. if (isPrivateName) {
  51330. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  51331. return;
  51332. }
  51333. if (this.isNonstaticConstructor(publicMethod)) {
  51334. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator);
  51335. }
  51336. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  51337. return;
  51338. }
  51339. const containsEsc = this.state.containsEsc;
  51340. const isPrivate = this.match(types$12.privateName);
  51341. const key = this.parseClassElementName(member);
  51342. const isSimple = key.type === "Identifier";
  51343. const maybeQuestionTokenStart = this.state.start;
  51344. this.parsePostMemberNameModifiers(publicMember);
  51345. if (this.isClassMethod()) {
  51346. method.kind = "method";
  51347. if (isPrivate) {
  51348. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  51349. return;
  51350. }
  51351. const isConstructor = this.isNonstaticConstructor(publicMethod);
  51352. let allowsDirectSuper = false;
  51353. if (isConstructor) {
  51354. publicMethod.kind = "constructor";
  51355. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  51356. this.raise(key.start, ErrorMessages.DuplicateConstructor);
  51357. }
  51358. if (isConstructor && this.hasPlugin("typescript") && member.override) {
  51359. this.raise(key.start, ErrorMessages.OverrideOnConstructor);
  51360. }
  51361. state.hadConstructor = true;
  51362. allowsDirectSuper = state.hadSuperClass;
  51363. }
  51364. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  51365. } else if (this.isClassProperty()) {
  51366. if (isPrivate) {
  51367. this.pushClassPrivateProperty(classBody, privateProp);
  51368. } else {
  51369. this.pushClassProperty(classBody, publicProp);
  51370. }
  51371. } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) {
  51372. const isGenerator = this.eat(types$12.star);
  51373. if (publicMember.optional) {
  51374. this.unexpected(maybeQuestionTokenStart);
  51375. }
  51376. method.kind = "method";
  51377. const isPrivate2 = this.match(types$12.privateName);
  51378. this.parseClassElementName(method);
  51379. this.parsePostMemberNameModifiers(publicMember);
  51380. if (isPrivate2) {
  51381. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  51382. } else {
  51383. if (this.isNonstaticConstructor(publicMethod)) {
  51384. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync);
  51385. }
  51386. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  51387. }
  51388. } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types$12.star) && this.isLineTerminator())) {
  51389. method.kind = key.name;
  51390. const isPrivate2 = this.match(types$12.privateName);
  51391. this.parseClassElementName(publicMethod);
  51392. if (isPrivate2) {
  51393. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  51394. } else {
  51395. if (this.isNonstaticConstructor(publicMethod)) {
  51396. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor);
  51397. }
  51398. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  51399. }
  51400. this.checkGetterSetterParams(publicMethod);
  51401. } else if (this.isLineTerminator()) {
  51402. if (isPrivate) {
  51403. this.pushClassPrivateProperty(classBody, privateProp);
  51404. } else {
  51405. this.pushClassProperty(classBody, publicProp);
  51406. }
  51407. } else {
  51408. this.unexpected();
  51409. }
  51410. }
  51411. parseClassElementName(member) {
  51412. const {
  51413. type,
  51414. value,
  51415. start: start3
  51416. } = this.state;
  51417. if ((type === types$12.name || type === types$12.string) && member.static && value === "prototype") {
  51418. this.raise(start3, ErrorMessages.StaticPrototype);
  51419. }
  51420. if (type === types$12.privateName && value === "constructor") {
  51421. this.raise(start3, ErrorMessages.ConstructorClassPrivateField);
  51422. }
  51423. return this.parsePropertyName(member, true);
  51424. }
  51425. parseClassStaticBlock(classBody, member) {
  51426. var _member$decorators;
  51427. this.expectPlugin("classStaticBlock", member.start);
  51428. this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER2);
  51429. const oldLabels = this.state.labels;
  51430. this.state.labels = [];
  51431. this.prodParam.enter(PARAM);
  51432. const body = member.body = [];
  51433. this.parseBlockOrModuleBlockBody(body, void 0, false, types$12.braceR);
  51434. this.prodParam.exit();
  51435. this.scope.exit();
  51436. this.state.labels = oldLabels;
  51437. classBody.body.push(this.finishNode(member, "StaticBlock"));
  51438. if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
  51439. this.raise(member.start, ErrorMessages.DecoratorStaticBlock);
  51440. }
  51441. }
  51442. pushClassProperty(classBody, prop) {
  51443. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  51444. this.raise(prop.key.start, ErrorMessages.ConstructorClassField);
  51445. }
  51446. classBody.body.push(this.parseClassProperty(prop));
  51447. }
  51448. pushClassPrivateProperty(classBody, prop) {
  51449. const node = this.parseClassPrivateProperty(prop);
  51450. classBody.body.push(node);
  51451. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.start);
  51452. }
  51453. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  51454. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  51455. }
  51456. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  51457. const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  51458. classBody.body.push(node);
  51459. const 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;
  51460. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.start);
  51461. }
  51462. parsePostMemberNameModifiers(methodOrProp) {
  51463. }
  51464. parseClassPrivateProperty(node) {
  51465. this.parseInitializer(node);
  51466. this.semicolon();
  51467. return this.finishNode(node, "ClassPrivateProperty");
  51468. }
  51469. parseClassProperty(node) {
  51470. this.parseInitializer(node);
  51471. this.semicolon();
  51472. return this.finishNode(node, "ClassProperty");
  51473. }
  51474. parseInitializer(node) {
  51475. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER2);
  51476. this.expressionScope.enter(newExpressionScope());
  51477. this.prodParam.enter(PARAM);
  51478. node.value = this.eat(types$12.eq) ? this.parseMaybeAssignAllowIn() : null;
  51479. this.expressionScope.exit();
  51480. this.prodParam.exit();
  51481. this.scope.exit();
  51482. }
  51483. parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) {
  51484. if (this.match(types$12.name)) {
  51485. node.id = this.parseIdentifier();
  51486. if (isStatement) {
  51487. this.checkLVal(node.id, "class name", bindingType);
  51488. }
  51489. } else {
  51490. if (optionalId || !isStatement) {
  51491. node.id = null;
  51492. } else {
  51493. this.unexpected(null, ErrorMessages.MissingClassName);
  51494. }
  51495. }
  51496. }
  51497. parseClassSuper(node) {
  51498. node.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts() : null;
  51499. }
  51500. parseExport(node) {
  51501. const hasDefault = this.maybeParseExportDefaultSpecifier(node);
  51502. const parseAfterDefault = !hasDefault || this.eat(types$12.comma);
  51503. const hasStar = parseAfterDefault && this.eatExportStar(node);
  51504. const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
  51505. const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types$12.comma));
  51506. const isFromRequired = hasDefault || hasStar;
  51507. if (hasStar && !hasNamespace) {
  51508. if (hasDefault)
  51509. this.unexpected();
  51510. this.parseExportFrom(node, true);
  51511. return this.finishNode(node, "ExportAllDeclaration");
  51512. }
  51513. const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
  51514. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
  51515. throw this.unexpected(null, types$12.braceL);
  51516. }
  51517. let hasDeclaration;
  51518. if (isFromRequired || hasSpecifiers) {
  51519. hasDeclaration = false;
  51520. this.parseExportFrom(node, isFromRequired);
  51521. } else {
  51522. hasDeclaration = this.maybeParseExportDeclaration(node);
  51523. }
  51524. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  51525. this.checkExport(node, true, false, !!node.source);
  51526. return this.finishNode(node, "ExportNamedDeclaration");
  51527. }
  51528. if (this.eat(types$12._default)) {
  51529. node.declaration = this.parseExportDefaultExpression();
  51530. this.checkExport(node, true, true);
  51531. return this.finishNode(node, "ExportDefaultDeclaration");
  51532. }
  51533. throw this.unexpected(null, types$12.braceL);
  51534. }
  51535. eatExportStar(node) {
  51536. return this.eat(types$12.star);
  51537. }
  51538. maybeParseExportDefaultSpecifier(node) {
  51539. if (this.isExportDefaultSpecifier()) {
  51540. this.expectPlugin("exportDefaultFrom");
  51541. const specifier = this.startNode();
  51542. specifier.exported = this.parseIdentifier(true);
  51543. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  51544. return true;
  51545. }
  51546. return false;
  51547. }
  51548. maybeParseExportNamespaceSpecifier(node) {
  51549. if (this.isContextual("as")) {
  51550. if (!node.specifiers)
  51551. node.specifiers = [];
  51552. const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
  51553. this.next();
  51554. specifier.exported = this.parseModuleExportName();
  51555. node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  51556. return true;
  51557. }
  51558. return false;
  51559. }
  51560. maybeParseExportNamedSpecifiers(node) {
  51561. if (this.match(types$12.braceL)) {
  51562. if (!node.specifiers)
  51563. node.specifiers = [];
  51564. node.specifiers.push(...this.parseExportSpecifiers());
  51565. node.source = null;
  51566. node.declaration = null;
  51567. return true;
  51568. }
  51569. return false;
  51570. }
  51571. maybeParseExportDeclaration(node) {
  51572. if (this.shouldParseExportDeclaration()) {
  51573. node.specifiers = [];
  51574. node.source = null;
  51575. node.declaration = this.parseExportDeclaration(node);
  51576. return true;
  51577. }
  51578. return false;
  51579. }
  51580. isAsyncFunction() {
  51581. if (!this.isContextual("async"))
  51582. return false;
  51583. const next = this.nextTokenStart();
  51584. return !lineBreak2.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  51585. }
  51586. parseExportDefaultExpression() {
  51587. const expr = this.startNode();
  51588. const isAsync = this.isAsyncFunction();
  51589. if (this.match(types$12._function) || isAsync) {
  51590. this.next();
  51591. if (isAsync) {
  51592. this.next();
  51593. }
  51594. return this.parseFunction(expr, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, isAsync);
  51595. } else if (this.match(types$12._class)) {
  51596. return this.parseClass(expr, true, true);
  51597. } else if (this.match(types$12.at)) {
  51598. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  51599. this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport);
  51600. }
  51601. this.parseDecorators(false);
  51602. return this.parseClass(expr, true, true);
  51603. } else if (this.match(types$12._const) || this.match(types$12._var) || this.isLet()) {
  51604. throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport);
  51605. } else {
  51606. const res = this.parseMaybeAssignAllowIn();
  51607. this.semicolon();
  51608. return res;
  51609. }
  51610. }
  51611. parseExportDeclaration(node) {
  51612. return this.parseStatement(null);
  51613. }
  51614. isExportDefaultSpecifier() {
  51615. if (this.match(types$12.name)) {
  51616. const value = this.state.value;
  51617. if (value === "async" && !this.state.containsEsc || value === "let") {
  51618. return false;
  51619. }
  51620. if ((value === "type" || value === "interface") && !this.state.containsEsc) {
  51621. const l = this.lookahead();
  51622. if (l.type === types$12.name && l.value !== "from" || l.type === types$12.braceL) {
  51623. this.expectOnePlugin(["flow", "typescript"]);
  51624. return false;
  51625. }
  51626. }
  51627. } else if (!this.match(types$12._default)) {
  51628. return false;
  51629. }
  51630. const next = this.nextTokenStart();
  51631. const hasFrom = this.isUnparsedContextual(next, "from");
  51632. if (this.input.charCodeAt(next) === 44 || this.match(types$12.name) && hasFrom) {
  51633. return true;
  51634. }
  51635. if (this.match(types$12._default) && hasFrom) {
  51636. const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
  51637. return nextAfterFrom === 34 || nextAfterFrom === 39;
  51638. }
  51639. return false;
  51640. }
  51641. parseExportFrom(node, expect) {
  51642. if (this.eatContextual("from")) {
  51643. node.source = this.parseImportSource();
  51644. this.checkExport(node);
  51645. const assertions = this.maybeParseImportAssertions();
  51646. if (assertions) {
  51647. node.assertions = assertions;
  51648. }
  51649. } else {
  51650. if (expect) {
  51651. this.unexpected();
  51652. } else {
  51653. node.source = null;
  51654. }
  51655. }
  51656. this.semicolon();
  51657. }
  51658. shouldParseExportDeclaration() {
  51659. if (this.match(types$12.at)) {
  51660. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  51661. if (this.hasPlugin("decorators")) {
  51662. if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  51663. this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport);
  51664. } else {
  51665. return true;
  51666. }
  51667. }
  51668. }
  51669. 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();
  51670. }
  51671. checkExport(node, checkNames, isDefault, isFrom) {
  51672. if (checkNames) {
  51673. if (isDefault) {
  51674. this.checkDuplicateExports(node, "default");
  51675. if (this.hasPlugin("exportDefaultFrom")) {
  51676. var _declaration$extra;
  51677. const declaration = node.declaration;
  51678. if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
  51679. this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier);
  51680. }
  51681. }
  51682. } else if (node.specifiers && node.specifiers.length) {
  51683. for (const specifier of node.specifiers) {
  51684. const {
  51685. exported
  51686. } = specifier;
  51687. const exportedName = exported.type === "Identifier" ? exported.name : exported.value;
  51688. this.checkDuplicateExports(specifier, exportedName);
  51689. if (!isFrom && specifier.local) {
  51690. const {
  51691. local
  51692. } = specifier;
  51693. if (local.type !== "Identifier") {
  51694. this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.value, exportedName);
  51695. } else {
  51696. this.checkReservedWord(local.name, local.start, true, false);
  51697. this.scope.checkLocalExport(local);
  51698. }
  51699. }
  51700. }
  51701. } else if (node.declaration) {
  51702. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  51703. const id = node.declaration.id;
  51704. if (!id)
  51705. throw new Error("Assertion failure");
  51706. this.checkDuplicateExports(node, id.name);
  51707. } else if (node.declaration.type === "VariableDeclaration") {
  51708. for (const declaration of node.declaration.declarations) {
  51709. this.checkDeclaration(declaration.id);
  51710. }
  51711. }
  51712. }
  51713. }
  51714. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  51715. if (currentContextDecorators.length) {
  51716. throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport);
  51717. }
  51718. }
  51719. checkDeclaration(node) {
  51720. if (node.type === "Identifier") {
  51721. this.checkDuplicateExports(node, node.name);
  51722. } else if (node.type === "ObjectPattern") {
  51723. for (const prop of node.properties) {
  51724. this.checkDeclaration(prop);
  51725. }
  51726. } else if (node.type === "ArrayPattern") {
  51727. for (const elem of node.elements) {
  51728. if (elem) {
  51729. this.checkDeclaration(elem);
  51730. }
  51731. }
  51732. } else if (node.type === "ObjectProperty") {
  51733. this.checkDeclaration(node.value);
  51734. } else if (node.type === "RestElement") {
  51735. this.checkDeclaration(node.argument);
  51736. } else if (node.type === "AssignmentPattern") {
  51737. this.checkDeclaration(node.left);
  51738. }
  51739. }
  51740. checkDuplicateExports(node, name2) {
  51741. if (this.state.exportedIdentifiers.indexOf(name2) > -1) {
  51742. this.raise(node.start, name2 === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name2);
  51743. }
  51744. this.state.exportedIdentifiers.push(name2);
  51745. }
  51746. parseExportSpecifiers() {
  51747. const nodes = [];
  51748. let first = true;
  51749. this.expect(types$12.braceL);
  51750. while (!this.eat(types$12.braceR)) {
  51751. if (first) {
  51752. first = false;
  51753. } else {
  51754. this.expect(types$12.comma);
  51755. if (this.eat(types$12.braceR))
  51756. break;
  51757. }
  51758. const node = this.startNode();
  51759. node.local = this.parseModuleExportName();
  51760. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local.__clone();
  51761. nodes.push(this.finishNode(node, "ExportSpecifier"));
  51762. }
  51763. return nodes;
  51764. }
  51765. parseModuleExportName() {
  51766. if (this.match(types$12.string)) {
  51767. const result = this.parseStringLiteral(this.state.value);
  51768. const surrogate = result.value.match(loneSurrogate2);
  51769. if (surrogate) {
  51770. this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16));
  51771. }
  51772. return result;
  51773. }
  51774. return this.parseIdentifier(true);
  51775. }
  51776. parseImport(node) {
  51777. node.specifiers = [];
  51778. if (!this.match(types$12.string)) {
  51779. const hasDefault = this.maybeParseDefaultImportSpecifier(node);
  51780. const parseNext = !hasDefault || this.eat(types$12.comma);
  51781. const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
  51782. if (parseNext && !hasStar)
  51783. this.parseNamedImportSpecifiers(node);
  51784. this.expectContextual("from");
  51785. }
  51786. node.source = this.parseImportSource();
  51787. const assertions = this.maybeParseImportAssertions();
  51788. if (assertions) {
  51789. node.assertions = assertions;
  51790. } else {
  51791. const attributes = this.maybeParseModuleAttributes();
  51792. if (attributes) {
  51793. node.attributes = attributes;
  51794. }
  51795. }
  51796. this.semicolon();
  51797. return this.finishNode(node, "ImportDeclaration");
  51798. }
  51799. parseImportSource() {
  51800. if (!this.match(types$12.string))
  51801. this.unexpected();
  51802. return this.parseExprAtom();
  51803. }
  51804. shouldParseDefaultImport(node) {
  51805. return this.match(types$12.name);
  51806. }
  51807. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  51808. specifier.local = this.parseIdentifier();
  51809. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  51810. node.specifiers.push(this.finishNode(specifier, type));
  51811. }
  51812. parseAssertEntries() {
  51813. const attrs = [];
  51814. const attrNames = /* @__PURE__ */ new Set();
  51815. do {
  51816. if (this.match(types$12.braceR)) {
  51817. break;
  51818. }
  51819. const node = this.startNode();
  51820. const keyName = this.state.value;
  51821. if (this.match(types$12.string)) {
  51822. node.key = this.parseStringLiteral(keyName);
  51823. } else {
  51824. node.key = this.parseIdentifier(true);
  51825. }
  51826. this.expect(types$12.colon);
  51827. if (keyName !== "type") {
  51828. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, keyName);
  51829. }
  51830. if (attrNames.has(keyName)) {
  51831. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName);
  51832. }
  51833. attrNames.add(keyName);
  51834. if (!this.match(types$12.string)) {
  51835. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  51836. }
  51837. node.value = this.parseStringLiteral(this.state.value);
  51838. this.finishNode(node, "ImportAttribute");
  51839. attrs.push(node);
  51840. } while (this.eat(types$12.comma));
  51841. return attrs;
  51842. }
  51843. maybeParseModuleAttributes() {
  51844. if (this.match(types$12._with) && !this.hasPrecedingLineBreak()) {
  51845. this.expectPlugin("moduleAttributes");
  51846. this.next();
  51847. } else {
  51848. if (this.hasPlugin("moduleAttributes"))
  51849. return [];
  51850. return null;
  51851. }
  51852. const attrs = [];
  51853. const attributes = /* @__PURE__ */ new Set();
  51854. do {
  51855. const node = this.startNode();
  51856. node.key = this.parseIdentifier(true);
  51857. if (node.key.name !== "type") {
  51858. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name);
  51859. }
  51860. if (attributes.has(node.key.name)) {
  51861. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name);
  51862. }
  51863. attributes.add(node.key.name);
  51864. this.expect(types$12.colon);
  51865. if (!this.match(types$12.string)) {
  51866. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  51867. }
  51868. node.value = this.parseStringLiteral(this.state.value);
  51869. this.finishNode(node, "ImportAttribute");
  51870. attrs.push(node);
  51871. } while (this.eat(types$12.comma));
  51872. return attrs;
  51873. }
  51874. maybeParseImportAssertions() {
  51875. if (this.isContextual("assert") && !this.hasPrecedingLineBreak()) {
  51876. this.expectPlugin("importAssertions");
  51877. this.next();
  51878. } else {
  51879. if (this.hasPlugin("importAssertions"))
  51880. return [];
  51881. return null;
  51882. }
  51883. this.eat(types$12.braceL);
  51884. const attrs = this.parseAssertEntries();
  51885. this.eat(types$12.braceR);
  51886. return attrs;
  51887. }
  51888. maybeParseDefaultImportSpecifier(node) {
  51889. if (this.shouldParseDefaultImport(node)) {
  51890. this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
  51891. return true;
  51892. }
  51893. return false;
  51894. }
  51895. maybeParseStarImportSpecifier(node) {
  51896. if (this.match(types$12.star)) {
  51897. const specifier = this.startNode();
  51898. this.next();
  51899. this.expectContextual("as");
  51900. this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
  51901. return true;
  51902. }
  51903. return false;
  51904. }
  51905. parseNamedImportSpecifiers(node) {
  51906. let first = true;
  51907. this.expect(types$12.braceL);
  51908. while (!this.eat(types$12.braceR)) {
  51909. if (first) {
  51910. first = false;
  51911. } else {
  51912. if (this.eat(types$12.colon)) {
  51913. throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport);
  51914. }
  51915. this.expect(types$12.comma);
  51916. if (this.eat(types$12.braceR))
  51917. break;
  51918. }
  51919. this.parseImportSpecifier(node);
  51920. }
  51921. }
  51922. parseImportSpecifier(node) {
  51923. const specifier = this.startNode();
  51924. const importedIsString = this.match(types$12.string);
  51925. specifier.imported = this.parseModuleExportName();
  51926. if (this.eatContextual("as")) {
  51927. specifier.local = this.parseIdentifier();
  51928. } else {
  51929. const {
  51930. imported
  51931. } = specifier;
  51932. if (importedIsString) {
  51933. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value);
  51934. }
  51935. this.checkReservedWord(imported.name, specifier.start, true, true);
  51936. specifier.local = imported.__clone();
  51937. }
  51938. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  51939. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  51940. }
  51941. isThisParam(param) {
  51942. return param.type === "Identifier" && param.name === "this";
  51943. }
  51944. };
  51945. var Parser3 = class extends StatementParser {
  51946. constructor(options, input) {
  51947. options = getOptions2(options);
  51948. super(options, input);
  51949. this.options = options;
  51950. this.initializeScopes();
  51951. this.plugins = pluginsMap(this.options.plugins);
  51952. this.filename = options.sourceFilename;
  51953. }
  51954. getScopeHandler() {
  51955. return ScopeHandler;
  51956. }
  51957. parse() {
  51958. this.enterInitialScopes();
  51959. const file = this.startNode();
  51960. const program = this.startNode();
  51961. this.nextToken();
  51962. file.errors = null;
  51963. this.parseTopLevel(file, program);
  51964. file.errors = this.state.errors;
  51965. return file;
  51966. }
  51967. };
  51968. function pluginsMap(plugins) {
  51969. const pluginMap = /* @__PURE__ */ new Map();
  51970. for (const plugin2 of plugins) {
  51971. const [name2, options] = Array.isArray(plugin2) ? plugin2 : [plugin2, {}];
  51972. if (!pluginMap.has(name2))
  51973. pluginMap.set(name2, options || {});
  51974. }
  51975. return pluginMap;
  51976. }
  51977. function parse4(input, options) {
  51978. var _options;
  51979. if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
  51980. options = Object.assign({}, options);
  51981. try {
  51982. options.sourceType = "module";
  51983. const parser = getParser(options, input);
  51984. const ast = parser.parse();
  51985. if (parser.sawUnambiguousESM) {
  51986. return ast;
  51987. }
  51988. if (parser.ambiguousScriptDifferentAst) {
  51989. try {
  51990. options.sourceType = "script";
  51991. return getParser(options, input).parse();
  51992. } catch (_unused) {
  51993. }
  51994. } else {
  51995. ast.program.sourceType = "script";
  51996. }
  51997. return ast;
  51998. } catch (moduleError) {
  51999. try {
  52000. options.sourceType = "script";
  52001. return getParser(options, input).parse();
  52002. } catch (_unused2) {
  52003. }
  52004. throw moduleError;
  52005. }
  52006. } else {
  52007. return getParser(options, input).parse();
  52008. }
  52009. }
  52010. function parseExpression(input, options) {
  52011. const parser = getParser(options, input);
  52012. if (parser.options.strictMode) {
  52013. parser.state.strict = true;
  52014. }
  52015. return parser.getExpression();
  52016. }
  52017. function getParser(options, input) {
  52018. let cls = Parser3;
  52019. if (options != null && options.plugins) {
  52020. validatePlugins(options.plugins);
  52021. cls = getParserClass(options.plugins);
  52022. }
  52023. return new cls(options, input);
  52024. }
  52025. var parserClassCache = {};
  52026. function getParserClass(pluginsFromOptions) {
  52027. const pluginList = mixinPluginNames.filter((name2) => hasPlugin(pluginsFromOptions, name2));
  52028. const key = pluginList.join("/");
  52029. let cls = parserClassCache[key];
  52030. if (!cls) {
  52031. cls = Parser3;
  52032. for (const plugin2 of pluginList) {
  52033. cls = mixinPlugins[plugin2](cls);
  52034. }
  52035. parserClassCache[key] = cls;
  52036. }
  52037. return cls;
  52038. }
  52039. exports.parse = parse4;
  52040. exports.parseExpression = parseExpression;
  52041. exports.tokTypes = types$12;
  52042. }
  52043. });
  52044. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/replacement.js
  52045. var require_replacement = __commonJS({
  52046. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/replacement.js"(exports) {
  52047. "use strict";
  52048. Object.defineProperty(exports, "__esModule", {
  52049. value: true
  52050. });
  52051. exports.replaceWithMultiple = replaceWithMultiple;
  52052. exports.replaceWithSourceString = replaceWithSourceString;
  52053. exports.replaceWith = replaceWith;
  52054. exports._replaceWith = _replaceWith;
  52055. exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
  52056. exports.replaceInline = replaceInline;
  52057. var _codeFrame = require_lib9();
  52058. var _index = require_lib14();
  52059. var _index2 = require_path();
  52060. var _cache = require_cache();
  52061. var _parser = require_lib10();
  52062. var t2 = require_lib4();
  52063. var hoistVariablesVisitor = {
  52064. Function(path) {
  52065. path.skip();
  52066. },
  52067. VariableDeclaration(path) {
  52068. if (path.node.kind !== "var")
  52069. return;
  52070. const bindings = path.getBindingIdentifiers();
  52071. for (const key of Object.keys(bindings)) {
  52072. path.scope.push({
  52073. id: bindings[key]
  52074. });
  52075. }
  52076. const exprs = [];
  52077. for (const declar of path.node.declarations) {
  52078. if (declar.init) {
  52079. exprs.push(t2.expressionStatement(t2.assignmentExpression("=", declar.id, declar.init)));
  52080. }
  52081. }
  52082. path.replaceWithMultiple(exprs);
  52083. }
  52084. };
  52085. function replaceWithMultiple(nodes) {
  52086. var _pathCache$get;
  52087. this.resync();
  52088. nodes = this._verifyNodeList(nodes);
  52089. t2.inheritLeadingComments(nodes[0], this.node);
  52090. t2.inheritTrailingComments(nodes[nodes.length - 1], this.node);
  52091. (_pathCache$get = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get.delete(this.node);
  52092. this.node = this.container[this.key] = null;
  52093. const paths = this.insertAfter(nodes);
  52094. if (this.node) {
  52095. this.requeue();
  52096. } else {
  52097. this.remove();
  52098. }
  52099. return paths;
  52100. }
  52101. function replaceWithSourceString(replacement) {
  52102. this.resync();
  52103. try {
  52104. replacement = `(${replacement})`;
  52105. replacement = (0, _parser.parse)(replacement);
  52106. } catch (err) {
  52107. const loc = err.loc;
  52108. if (loc) {
  52109. err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {
  52110. start: {
  52111. line: loc.line,
  52112. column: loc.column + 1
  52113. }
  52114. });
  52115. err.code = "BABEL_REPLACE_SOURCE_ERROR";
  52116. }
  52117. throw err;
  52118. }
  52119. replacement = replacement.program.body[0].expression;
  52120. _index.default.removeProperties(replacement);
  52121. return this.replaceWith(replacement);
  52122. }
  52123. function replaceWith(replacement) {
  52124. this.resync();
  52125. if (this.removed) {
  52126. throw new Error("You can't replace this node, we've already removed it");
  52127. }
  52128. if (replacement instanceof _index2.default) {
  52129. replacement = replacement.node;
  52130. }
  52131. if (!replacement) {
  52132. throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
  52133. }
  52134. if (this.node === replacement) {
  52135. return [this];
  52136. }
  52137. if (this.isProgram() && !t2.isProgram(replacement)) {
  52138. throw new Error("You can only replace a Program root node with another Program node");
  52139. }
  52140. if (Array.isArray(replacement)) {
  52141. throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
  52142. }
  52143. if (typeof replacement === "string") {
  52144. throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
  52145. }
  52146. let nodePath = "";
  52147. if (this.isNodeType("Statement") && t2.isExpression(replacement)) {
  52148. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
  52149. replacement = t2.expressionStatement(replacement);
  52150. nodePath = "expression";
  52151. }
  52152. }
  52153. if (this.isNodeType("Expression") && t2.isStatement(replacement)) {
  52154. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  52155. return this.replaceExpressionWithStatements([replacement]);
  52156. }
  52157. }
  52158. const oldNode = this.node;
  52159. if (oldNode) {
  52160. t2.inheritsComments(replacement, oldNode);
  52161. t2.removeComments(oldNode);
  52162. }
  52163. this._replaceWith(replacement);
  52164. this.type = replacement.type;
  52165. this.setScope();
  52166. this.requeue();
  52167. return [nodePath ? this.get(nodePath) : this];
  52168. }
  52169. function _replaceWith(node) {
  52170. var _pathCache$get2;
  52171. if (!this.container) {
  52172. throw new ReferenceError("Container is falsy");
  52173. }
  52174. if (this.inList) {
  52175. t2.validate(this.parent, this.key, [node]);
  52176. } else {
  52177. t2.validate(this.parent, this.key, node);
  52178. }
  52179. this.debug(`Replace with ${node == null ? void 0 : node.type}`);
  52180. (_pathCache$get2 = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get2.set(node, this).delete(this.node);
  52181. this.node = this.container[this.key] = node;
  52182. }
  52183. function replaceExpressionWithStatements(nodes) {
  52184. this.resync();
  52185. const toSequenceExpression = t2.toSequenceExpression(nodes, this.scope);
  52186. if (toSequenceExpression) {
  52187. return this.replaceWith(toSequenceExpression)[0].get("expressions");
  52188. }
  52189. const functionParent = this.getFunctionParent();
  52190. const isParentAsync = functionParent == null ? void 0 : functionParent.is("async");
  52191. const isParentGenerator = functionParent == null ? void 0 : functionParent.is("generator");
  52192. const container = t2.arrowFunctionExpression([], t2.blockStatement(nodes));
  52193. this.replaceWith(t2.callExpression(container, []));
  52194. this.traverse(hoistVariablesVisitor);
  52195. const completionRecords = this.get("callee").getCompletionRecords();
  52196. for (const path of completionRecords) {
  52197. if (!path.isExpressionStatement())
  52198. continue;
  52199. const loop = path.findParent((path2) => path2.isLoop());
  52200. if (loop) {
  52201. let uid = loop.getData("expressionReplacementReturnUid");
  52202. if (!uid) {
  52203. const callee2 = this.get("callee");
  52204. uid = callee2.scope.generateDeclaredUidIdentifier("ret");
  52205. callee2.get("body").pushContainer("body", t2.returnStatement(t2.cloneNode(uid)));
  52206. loop.setData("expressionReplacementReturnUid", uid);
  52207. } else {
  52208. uid = t2.identifier(uid.name);
  52209. }
  52210. path.get("expression").replaceWith(t2.assignmentExpression("=", t2.cloneNode(uid), path.node.expression));
  52211. } else {
  52212. path.replaceWith(t2.returnStatement(path.node.expression));
  52213. }
  52214. }
  52215. const callee = this.get("callee");
  52216. callee.arrowFunctionToExpression();
  52217. const needToAwaitFunction = isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", t2.FUNCTION_TYPES);
  52218. const needToYieldFunction = isParentGenerator && _index.default.hasType(this.get("callee.body").node, "YieldExpression", t2.FUNCTION_TYPES);
  52219. if (needToAwaitFunction) {
  52220. callee.set("async", true);
  52221. if (!needToYieldFunction) {
  52222. this.replaceWith(t2.awaitExpression(this.node));
  52223. }
  52224. }
  52225. if (needToYieldFunction) {
  52226. callee.set("generator", true);
  52227. this.replaceWith(t2.yieldExpression(this.node, true));
  52228. }
  52229. return callee.get("body.body");
  52230. }
  52231. function replaceInline(nodes) {
  52232. this.resync();
  52233. if (Array.isArray(nodes)) {
  52234. if (Array.isArray(this.container)) {
  52235. nodes = this._verifyNodeList(nodes);
  52236. const paths = this._containerInsertAfter(nodes);
  52237. this.remove();
  52238. return paths;
  52239. } else {
  52240. return this.replaceWithMultiple(nodes);
  52241. }
  52242. } else {
  52243. return this.replaceWith(nodes);
  52244. }
  52245. }
  52246. }
  52247. });
  52248. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/evaluation.js
  52249. var require_evaluation = __commonJS({
  52250. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/evaluation.js"(exports) {
  52251. "use strict";
  52252. Object.defineProperty(exports, "__esModule", {
  52253. value: true
  52254. });
  52255. exports.evaluateTruthy = evaluateTruthy;
  52256. exports.evaluate = evaluate;
  52257. var VALID_CALLEES = ["String", "Number", "Math"];
  52258. var INVALID_METHODS = ["random"];
  52259. function evaluateTruthy() {
  52260. const res = this.evaluate();
  52261. if (res.confident)
  52262. return !!res.value;
  52263. }
  52264. function deopt(path, state) {
  52265. if (!state.confident)
  52266. return;
  52267. state.deoptPath = path;
  52268. state.confident = false;
  52269. }
  52270. function evaluateCached(path, state) {
  52271. const {
  52272. node
  52273. } = path;
  52274. const {
  52275. seen
  52276. } = state;
  52277. if (seen.has(node)) {
  52278. const existing = seen.get(node);
  52279. if (existing.resolved) {
  52280. return existing.value;
  52281. } else {
  52282. deopt(path, state);
  52283. return;
  52284. }
  52285. } else {
  52286. const item = {
  52287. resolved: false
  52288. };
  52289. seen.set(node, item);
  52290. const val = _evaluate(path, state);
  52291. if (state.confident) {
  52292. item.resolved = true;
  52293. item.value = val;
  52294. }
  52295. return val;
  52296. }
  52297. }
  52298. function _evaluate(path, state) {
  52299. if (!state.confident)
  52300. return;
  52301. if (path.isSequenceExpression()) {
  52302. const exprs = path.get("expressions");
  52303. return evaluateCached(exprs[exprs.length - 1], state);
  52304. }
  52305. if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
  52306. return path.node.value;
  52307. }
  52308. if (path.isNullLiteral()) {
  52309. return null;
  52310. }
  52311. if (path.isTemplateLiteral()) {
  52312. return evaluateQuasis(path, path.node.quasis, state);
  52313. }
  52314. if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
  52315. const object = path.get("tag.object");
  52316. const {
  52317. node: {
  52318. name: name2
  52319. }
  52320. } = object;
  52321. const property = path.get("tag.property");
  52322. if (object.isIdentifier() && name2 === "String" && !path.scope.getBinding(name2) && property.isIdentifier() && property.node.name === "raw") {
  52323. return evaluateQuasis(path, path.node.quasi.quasis, state, true);
  52324. }
  52325. }
  52326. if (path.isConditionalExpression()) {
  52327. const testResult = evaluateCached(path.get("test"), state);
  52328. if (!state.confident)
  52329. return;
  52330. if (testResult) {
  52331. return evaluateCached(path.get("consequent"), state);
  52332. } else {
  52333. return evaluateCached(path.get("alternate"), state);
  52334. }
  52335. }
  52336. if (path.isExpressionWrapper()) {
  52337. return evaluateCached(path.get("expression"), state);
  52338. }
  52339. if (path.isMemberExpression() && !path.parentPath.isCallExpression({
  52340. callee: path.node
  52341. })) {
  52342. const property = path.get("property");
  52343. const object = path.get("object");
  52344. if (object.isLiteral() && property.isIdentifier()) {
  52345. const value = object.node.value;
  52346. const type = typeof value;
  52347. if (type === "number" || type === "string") {
  52348. return value[property.node.name];
  52349. }
  52350. }
  52351. }
  52352. if (path.isReferencedIdentifier()) {
  52353. const binding = path.scope.getBinding(path.node.name);
  52354. if (binding && binding.constantViolations.length > 0) {
  52355. return deopt(binding.path, state);
  52356. }
  52357. if (binding && path.node.start < binding.path.node.end) {
  52358. return deopt(binding.path, state);
  52359. }
  52360. if (binding != null && binding.hasValue) {
  52361. return binding.value;
  52362. } else {
  52363. if (path.node.name === "undefined") {
  52364. return binding ? deopt(binding.path, state) : void 0;
  52365. } else if (path.node.name === "Infinity") {
  52366. return binding ? deopt(binding.path, state) : Infinity;
  52367. } else if (path.node.name === "NaN") {
  52368. return binding ? deopt(binding.path, state) : NaN;
  52369. }
  52370. const resolved = path.resolve();
  52371. if (resolved === path) {
  52372. return deopt(path, state);
  52373. } else {
  52374. return evaluateCached(resolved, state);
  52375. }
  52376. }
  52377. }
  52378. if (path.isUnaryExpression({
  52379. prefix: true
  52380. })) {
  52381. if (path.node.operator === "void") {
  52382. return void 0;
  52383. }
  52384. const argument = path.get("argument");
  52385. if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
  52386. return "function";
  52387. }
  52388. const arg = evaluateCached(argument, state);
  52389. if (!state.confident)
  52390. return;
  52391. switch (path.node.operator) {
  52392. case "!":
  52393. return !arg;
  52394. case "+":
  52395. return +arg;
  52396. case "-":
  52397. return -arg;
  52398. case "~":
  52399. return ~arg;
  52400. case "typeof":
  52401. return typeof arg;
  52402. }
  52403. }
  52404. if (path.isArrayExpression()) {
  52405. const arr = [];
  52406. const elems = path.get("elements");
  52407. for (const elem of elems) {
  52408. const elemValue = elem.evaluate();
  52409. if (elemValue.confident) {
  52410. arr.push(elemValue.value);
  52411. } else {
  52412. return deopt(elemValue.deopt, state);
  52413. }
  52414. }
  52415. return arr;
  52416. }
  52417. if (path.isObjectExpression()) {
  52418. const obj = {};
  52419. const props = path.get("properties");
  52420. for (const prop of props) {
  52421. if (prop.isObjectMethod() || prop.isSpreadElement()) {
  52422. return deopt(prop, state);
  52423. }
  52424. const keyPath = prop.get("key");
  52425. let key = keyPath;
  52426. if (prop.node.computed) {
  52427. key = key.evaluate();
  52428. if (!key.confident) {
  52429. return deopt(key.deopt, state);
  52430. }
  52431. key = key.value;
  52432. } else if (key.isIdentifier()) {
  52433. key = key.node.name;
  52434. } else {
  52435. key = key.node.value;
  52436. }
  52437. const valuePath = prop.get("value");
  52438. let value = valuePath.evaluate();
  52439. if (!value.confident) {
  52440. return deopt(value.deopt, state);
  52441. }
  52442. value = value.value;
  52443. obj[key] = value;
  52444. }
  52445. return obj;
  52446. }
  52447. if (path.isLogicalExpression()) {
  52448. const wasConfident = state.confident;
  52449. const left = evaluateCached(path.get("left"), state);
  52450. const leftConfident = state.confident;
  52451. state.confident = wasConfident;
  52452. const right = evaluateCached(path.get("right"), state);
  52453. const rightConfident = state.confident;
  52454. switch (path.node.operator) {
  52455. case "||":
  52456. state.confident = leftConfident && (!!left || rightConfident);
  52457. if (!state.confident)
  52458. return;
  52459. return left || right;
  52460. case "&&":
  52461. state.confident = leftConfident && (!left || rightConfident);
  52462. if (!state.confident)
  52463. return;
  52464. return left && right;
  52465. }
  52466. }
  52467. if (path.isBinaryExpression()) {
  52468. const left = evaluateCached(path.get("left"), state);
  52469. if (!state.confident)
  52470. return;
  52471. const right = evaluateCached(path.get("right"), state);
  52472. if (!state.confident)
  52473. return;
  52474. switch (path.node.operator) {
  52475. case "-":
  52476. return left - right;
  52477. case "+":
  52478. return left + right;
  52479. case "/":
  52480. return left / right;
  52481. case "*":
  52482. return left * right;
  52483. case "%":
  52484. return left % right;
  52485. case "**":
  52486. return Math.pow(left, right);
  52487. case "<":
  52488. return left < right;
  52489. case ">":
  52490. return left > right;
  52491. case "<=":
  52492. return left <= right;
  52493. case ">=":
  52494. return left >= right;
  52495. case "==":
  52496. return left == right;
  52497. case "!=":
  52498. return left != right;
  52499. case "===":
  52500. return left === right;
  52501. case "!==":
  52502. return left !== right;
  52503. case "|":
  52504. return left | right;
  52505. case "&":
  52506. return left & right;
  52507. case "^":
  52508. return left ^ right;
  52509. case "<<":
  52510. return left << right;
  52511. case ">>":
  52512. return left >> right;
  52513. case ">>>":
  52514. return left >>> right;
  52515. }
  52516. }
  52517. if (path.isCallExpression()) {
  52518. const callee = path.get("callee");
  52519. let context;
  52520. let func;
  52521. if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
  52522. func = global[callee.node.name];
  52523. }
  52524. if (callee.isMemberExpression()) {
  52525. const object = callee.get("object");
  52526. const property = callee.get("property");
  52527. if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) {
  52528. context = global[object.node.name];
  52529. func = context[property.node.name];
  52530. }
  52531. if (object.isLiteral() && property.isIdentifier()) {
  52532. const type = typeof object.node.value;
  52533. if (type === "string" || type === "number") {
  52534. context = object.node.value;
  52535. func = context[property.node.name];
  52536. }
  52537. }
  52538. }
  52539. if (func) {
  52540. const args = path.get("arguments").map((arg) => evaluateCached(arg, state));
  52541. if (!state.confident)
  52542. return;
  52543. return func.apply(context, args);
  52544. }
  52545. }
  52546. deopt(path, state);
  52547. }
  52548. function evaluateQuasis(path, quasis, state, raw = false) {
  52549. let str = "";
  52550. let i = 0;
  52551. const exprs = path.get("expressions");
  52552. for (const elem of quasis) {
  52553. if (!state.confident)
  52554. break;
  52555. str += raw ? elem.value.raw : elem.value.cooked;
  52556. const expr = exprs[i++];
  52557. if (expr)
  52558. str += String(evaluateCached(expr, state));
  52559. }
  52560. if (!state.confident)
  52561. return;
  52562. return str;
  52563. }
  52564. function evaluate() {
  52565. const state = {
  52566. confident: true,
  52567. deoptPath: null,
  52568. seen: /* @__PURE__ */ new Map()
  52569. };
  52570. let value = evaluateCached(this, state);
  52571. if (!state.confident)
  52572. value = void 0;
  52573. return {
  52574. confident: state.confident,
  52575. deopt: state.deoptPath,
  52576. value
  52577. };
  52578. }
  52579. }
  52580. });
  52581. // node_modules/estree-to-babel/node_modules/@babel/helper-get-function-arity/lib/index.js
  52582. var require_lib11 = __commonJS({
  52583. "node_modules/estree-to-babel/node_modules/@babel/helper-get-function-arity/lib/index.js"(exports) {
  52584. "use strict";
  52585. Object.defineProperty(exports, "__esModule", {
  52586. value: true
  52587. });
  52588. exports.default = _default;
  52589. var t2 = _interopRequireWildcard(require_lib4());
  52590. function _getRequireWildcardCache() {
  52591. if (typeof WeakMap !== "function")
  52592. return null;
  52593. var cache = /* @__PURE__ */ new WeakMap();
  52594. _getRequireWildcardCache = function() {
  52595. return cache;
  52596. };
  52597. return cache;
  52598. }
  52599. function _interopRequireWildcard(obj) {
  52600. if (obj && obj.__esModule) {
  52601. return obj;
  52602. }
  52603. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  52604. return { default: obj };
  52605. }
  52606. var cache = _getRequireWildcardCache();
  52607. if (cache && cache.has(obj)) {
  52608. return cache.get(obj);
  52609. }
  52610. var newObj = {};
  52611. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  52612. for (var key in obj) {
  52613. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  52614. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  52615. if (desc && (desc.get || desc.set)) {
  52616. Object.defineProperty(newObj, key, desc);
  52617. } else {
  52618. newObj[key] = obj[key];
  52619. }
  52620. }
  52621. }
  52622. newObj.default = obj;
  52623. if (cache) {
  52624. cache.set(obj, newObj);
  52625. }
  52626. return newObj;
  52627. }
  52628. function _default(node) {
  52629. const params = node.params;
  52630. for (let i = 0; i < params.length; i++) {
  52631. const param = params[i];
  52632. if (t2.isAssignmentPattern(param) || t2.isRestElement(param)) {
  52633. return i;
  52634. }
  52635. }
  52636. return params.length;
  52637. }
  52638. }
  52639. });
  52640. // node_modules/estree-to-babel/node_modules/@babel/template/lib/formatters.js
  52641. var require_formatters = __commonJS({
  52642. "node_modules/estree-to-babel/node_modules/@babel/template/lib/formatters.js"(exports) {
  52643. "use strict";
  52644. Object.defineProperty(exports, "__esModule", {
  52645. value: true
  52646. });
  52647. exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0;
  52648. var t2 = _interopRequireWildcard(require_lib4());
  52649. function _getRequireWildcardCache() {
  52650. if (typeof WeakMap !== "function")
  52651. return null;
  52652. var cache = /* @__PURE__ */ new WeakMap();
  52653. _getRequireWildcardCache = function() {
  52654. return cache;
  52655. };
  52656. return cache;
  52657. }
  52658. function _interopRequireWildcard(obj) {
  52659. if (obj && obj.__esModule) {
  52660. return obj;
  52661. }
  52662. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  52663. return { default: obj };
  52664. }
  52665. var cache = _getRequireWildcardCache();
  52666. if (cache && cache.has(obj)) {
  52667. return cache.get(obj);
  52668. }
  52669. var newObj = {};
  52670. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  52671. for (var key in obj) {
  52672. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  52673. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  52674. if (desc && (desc.get || desc.set)) {
  52675. Object.defineProperty(newObj, key, desc);
  52676. } else {
  52677. newObj[key] = obj[key];
  52678. }
  52679. }
  52680. }
  52681. newObj.default = obj;
  52682. if (cache) {
  52683. cache.set(obj, newObj);
  52684. }
  52685. return newObj;
  52686. }
  52687. function makeStatementFormatter(fn) {
  52688. return {
  52689. code: (str) => `/* @babel/template */;
  52690. ${str}`,
  52691. validate: () => {
  52692. },
  52693. unwrap: (ast) => {
  52694. return fn(ast.program.body.slice(1));
  52695. }
  52696. };
  52697. }
  52698. var smart = makeStatementFormatter((body) => {
  52699. if (body.length > 1) {
  52700. return body;
  52701. } else {
  52702. return body[0];
  52703. }
  52704. });
  52705. exports.smart = smart;
  52706. var statements = makeStatementFormatter((body) => body);
  52707. exports.statements = statements;
  52708. var statement = makeStatementFormatter((body) => {
  52709. if (body.length === 0) {
  52710. throw new Error("Found nothing to return.");
  52711. }
  52712. if (body.length > 1) {
  52713. throw new Error("Found multiple statements but wanted one");
  52714. }
  52715. return body[0];
  52716. });
  52717. exports.statement = statement;
  52718. var expression = {
  52719. code: (str) => `(
  52720. ${str}
  52721. )`,
  52722. validate: (ast) => {
  52723. if (ast.program.body.length > 1) {
  52724. throw new Error("Found multiple statements but wanted one");
  52725. }
  52726. if (expression.unwrap(ast).start === 0) {
  52727. throw new Error("Parse result included parens.");
  52728. }
  52729. },
  52730. unwrap: ({
  52731. program: program2
  52732. }) => {
  52733. const [stmt] = program2.body;
  52734. t2.assertExpressionStatement(stmt);
  52735. return stmt.expression;
  52736. }
  52737. };
  52738. exports.expression = expression;
  52739. var program = {
  52740. code: (str) => str,
  52741. validate: () => {
  52742. },
  52743. unwrap: (ast) => ast.program
  52744. };
  52745. exports.program = program;
  52746. }
  52747. });
  52748. // node_modules/estree-to-babel/node_modules/@babel/template/lib/options.js
  52749. var require_options = __commonJS({
  52750. "node_modules/estree-to-babel/node_modules/@babel/template/lib/options.js"(exports) {
  52751. "use strict";
  52752. Object.defineProperty(exports, "__esModule", {
  52753. value: true
  52754. });
  52755. exports.merge = merge2;
  52756. exports.validate = validate;
  52757. exports.normalizeReplacements = normalizeReplacements;
  52758. function _objectWithoutPropertiesLoose(source, excluded) {
  52759. if (source == null)
  52760. return {};
  52761. var target = {};
  52762. var sourceKeys = Object.keys(source);
  52763. var key, i;
  52764. for (i = 0; i < sourceKeys.length; i++) {
  52765. key = sourceKeys[i];
  52766. if (excluded.indexOf(key) >= 0)
  52767. continue;
  52768. target[key] = source[key];
  52769. }
  52770. return target;
  52771. }
  52772. function merge2(a, b) {
  52773. const {
  52774. placeholderWhitelist = a.placeholderWhitelist,
  52775. placeholderPattern = a.placeholderPattern,
  52776. preserveComments = a.preserveComments,
  52777. syntacticPlaceholders = a.syntacticPlaceholders
  52778. } = b;
  52779. return {
  52780. parser: Object.assign({}, a.parser, b.parser),
  52781. placeholderWhitelist,
  52782. placeholderPattern,
  52783. preserveComments,
  52784. syntacticPlaceholders
  52785. };
  52786. }
  52787. function validate(opts) {
  52788. if (opts != null && typeof opts !== "object") {
  52789. throw new Error("Unknown template options.");
  52790. }
  52791. const _ref = opts || {}, {
  52792. placeholderWhitelist,
  52793. placeholderPattern,
  52794. preserveComments,
  52795. syntacticPlaceholders
  52796. } = _ref, parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]);
  52797. if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
  52798. throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
  52799. }
  52800. if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
  52801. throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
  52802. }
  52803. if (preserveComments != null && typeof preserveComments !== "boolean") {
  52804. throw new Error("'.preserveComments' must be a boolean, null, or undefined");
  52805. }
  52806. if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
  52807. throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
  52808. }
  52809. if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
  52810. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  52811. }
  52812. return {
  52813. parser,
  52814. placeholderWhitelist: placeholderWhitelist || void 0,
  52815. placeholderPattern: placeholderPattern == null ? void 0 : placeholderPattern,
  52816. preserveComments: preserveComments == null ? void 0 : preserveComments,
  52817. syntacticPlaceholders: syntacticPlaceholders == null ? void 0 : syntacticPlaceholders
  52818. };
  52819. }
  52820. function normalizeReplacements(replacements) {
  52821. if (Array.isArray(replacements)) {
  52822. return replacements.reduce((acc, replacement, i) => {
  52823. acc["$" + i] = replacement;
  52824. return acc;
  52825. }, {});
  52826. } else if (typeof replacements === "object" || replacements == null) {
  52827. return replacements || void 0;
  52828. }
  52829. throw new Error("Template replacements must be an array, object, null, or undefined");
  52830. }
  52831. }
  52832. });
  52833. // node_modules/estree-to-babel/node_modules/@babel/template/lib/parse.js
  52834. var require_parse = __commonJS({
  52835. "node_modules/estree-to-babel/node_modules/@babel/template/lib/parse.js"(exports) {
  52836. "use strict";
  52837. Object.defineProperty(exports, "__esModule", {
  52838. value: true
  52839. });
  52840. exports.default = parseAndBuildMetadata;
  52841. var t2 = _interopRequireWildcard(require_lib4());
  52842. var _parser = require_lib10();
  52843. var _codeFrame = require_lib9();
  52844. function _getRequireWildcardCache() {
  52845. if (typeof WeakMap !== "function")
  52846. return null;
  52847. var cache = /* @__PURE__ */ new WeakMap();
  52848. _getRequireWildcardCache = function() {
  52849. return cache;
  52850. };
  52851. return cache;
  52852. }
  52853. function _interopRequireWildcard(obj) {
  52854. if (obj && obj.__esModule) {
  52855. return obj;
  52856. }
  52857. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  52858. return { default: obj };
  52859. }
  52860. var cache = _getRequireWildcardCache();
  52861. if (cache && cache.has(obj)) {
  52862. return cache.get(obj);
  52863. }
  52864. var newObj = {};
  52865. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  52866. for (var key in obj) {
  52867. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  52868. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  52869. if (desc && (desc.get || desc.set)) {
  52870. Object.defineProperty(newObj, key, desc);
  52871. } else {
  52872. newObj[key] = obj[key];
  52873. }
  52874. }
  52875. }
  52876. newObj.default = obj;
  52877. if (cache) {
  52878. cache.set(obj, newObj);
  52879. }
  52880. return newObj;
  52881. }
  52882. var PATTERN = /^[_$A-Z0-9]+$/;
  52883. function parseAndBuildMetadata(formatter, code2, opts) {
  52884. const {
  52885. placeholderWhitelist,
  52886. placeholderPattern,
  52887. preserveComments,
  52888. syntacticPlaceholders
  52889. } = opts;
  52890. const ast = parseWithCodeFrame(code2, opts.parser, syntacticPlaceholders);
  52891. t2.removePropertiesDeep(ast, {
  52892. preserveComments
  52893. });
  52894. formatter.validate(ast);
  52895. const syntactic = {
  52896. placeholders: [],
  52897. placeholderNames: /* @__PURE__ */ new Set()
  52898. };
  52899. const legacy = {
  52900. placeholders: [],
  52901. placeholderNames: /* @__PURE__ */ new Set()
  52902. };
  52903. const isLegacyRef = {
  52904. value: void 0
  52905. };
  52906. t2.traverse(ast, placeholderVisitorHandler, {
  52907. syntactic,
  52908. legacy,
  52909. isLegacyRef,
  52910. placeholderWhitelist,
  52911. placeholderPattern,
  52912. syntacticPlaceholders
  52913. });
  52914. return Object.assign({
  52915. ast
  52916. }, isLegacyRef.value ? legacy : syntactic);
  52917. }
  52918. function placeholderVisitorHandler(node, ancestors, state) {
  52919. var _state$placeholderWhi;
  52920. let name2;
  52921. if (t2.isPlaceholder(node)) {
  52922. if (state.syntacticPlaceholders === false) {
  52923. throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");
  52924. } else {
  52925. name2 = node.name.name;
  52926. state.isLegacyRef.value = false;
  52927. }
  52928. } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
  52929. return;
  52930. } else if (t2.isIdentifier(node) || t2.isJSXIdentifier(node)) {
  52931. name2 = node.name;
  52932. state.isLegacyRef.value = true;
  52933. } else if (t2.isStringLiteral(node)) {
  52934. name2 = node.value;
  52935. state.isLegacyRef.value = true;
  52936. } else {
  52937. return;
  52938. }
  52939. if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
  52940. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  52941. }
  52942. if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name2)) && !((_state$placeholderWhi = state.placeholderWhitelist) == null ? void 0 : _state$placeholderWhi.has(name2))) {
  52943. return;
  52944. }
  52945. ancestors = ancestors.slice();
  52946. const {
  52947. node: parent,
  52948. key
  52949. } = ancestors[ancestors.length - 1];
  52950. let type;
  52951. if (t2.isStringLiteral(node) || t2.isPlaceholder(node, {
  52952. expectedNode: "StringLiteral"
  52953. })) {
  52954. type = "string";
  52955. } else if (t2.isNewExpression(parent) && key === "arguments" || t2.isCallExpression(parent) && key === "arguments" || t2.isFunction(parent) && key === "params") {
  52956. type = "param";
  52957. } else if (t2.isExpressionStatement(parent) && !t2.isPlaceholder(node)) {
  52958. type = "statement";
  52959. ancestors = ancestors.slice(0, -1);
  52960. } else if (t2.isStatement(node) && t2.isPlaceholder(node)) {
  52961. type = "statement";
  52962. } else {
  52963. type = "other";
  52964. }
  52965. const {
  52966. placeholders,
  52967. placeholderNames
  52968. } = state.isLegacyRef.value ? state.legacy : state.syntactic;
  52969. placeholders.push({
  52970. name: name2,
  52971. type,
  52972. resolve: (ast) => resolveAncestors(ast, ancestors),
  52973. isDuplicate: placeholderNames.has(name2)
  52974. });
  52975. placeholderNames.add(name2);
  52976. }
  52977. function resolveAncestors(ast, ancestors) {
  52978. let parent = ast;
  52979. for (let i = 0; i < ancestors.length - 1; i++) {
  52980. const {
  52981. key: key2,
  52982. index: index3
  52983. } = ancestors[i];
  52984. if (index3 === void 0) {
  52985. parent = parent[key2];
  52986. } else {
  52987. parent = parent[key2][index3];
  52988. }
  52989. }
  52990. const {
  52991. key,
  52992. index: index2
  52993. } = ancestors[ancestors.length - 1];
  52994. return {
  52995. parent,
  52996. key,
  52997. index: index2
  52998. };
  52999. }
  53000. function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
  53001. const plugins = (parserOpts.plugins || []).slice();
  53002. if (syntacticPlaceholders !== false) {
  53003. plugins.push("placeholders");
  53004. }
  53005. parserOpts = Object.assign({
  53006. allowReturnOutsideFunction: true,
  53007. allowSuperOutsideMethod: true,
  53008. sourceType: "module"
  53009. }, parserOpts, {
  53010. plugins
  53011. });
  53012. try {
  53013. return (0, _parser.parse)(code2, parserOpts);
  53014. } catch (err) {
  53015. const loc = err.loc;
  53016. if (loc) {
  53017. err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code2, {
  53018. start: loc
  53019. });
  53020. err.code = "BABEL_TEMPLATE_PARSE_ERROR";
  53021. }
  53022. throw err;
  53023. }
  53024. }
  53025. }
  53026. });
  53027. // node_modules/estree-to-babel/node_modules/@babel/template/lib/populate.js
  53028. var require_populate = __commonJS({
  53029. "node_modules/estree-to-babel/node_modules/@babel/template/lib/populate.js"(exports) {
  53030. "use strict";
  53031. Object.defineProperty(exports, "__esModule", {
  53032. value: true
  53033. });
  53034. exports.default = populatePlaceholders;
  53035. var t2 = _interopRequireWildcard(require_lib4());
  53036. function _getRequireWildcardCache() {
  53037. if (typeof WeakMap !== "function")
  53038. return null;
  53039. var cache = /* @__PURE__ */ new WeakMap();
  53040. _getRequireWildcardCache = function() {
  53041. return cache;
  53042. };
  53043. return cache;
  53044. }
  53045. function _interopRequireWildcard(obj) {
  53046. if (obj && obj.__esModule) {
  53047. return obj;
  53048. }
  53049. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  53050. return { default: obj };
  53051. }
  53052. var cache = _getRequireWildcardCache();
  53053. if (cache && cache.has(obj)) {
  53054. return cache.get(obj);
  53055. }
  53056. var newObj = {};
  53057. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  53058. for (var key in obj) {
  53059. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  53060. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  53061. if (desc && (desc.get || desc.set)) {
  53062. Object.defineProperty(newObj, key, desc);
  53063. } else {
  53064. newObj[key] = obj[key];
  53065. }
  53066. }
  53067. }
  53068. newObj.default = obj;
  53069. if (cache) {
  53070. cache.set(obj, newObj);
  53071. }
  53072. return newObj;
  53073. }
  53074. function populatePlaceholders(metadata, replacements) {
  53075. const ast = t2.cloneNode(metadata.ast);
  53076. if (replacements) {
  53077. metadata.placeholders.forEach((placeholder) => {
  53078. if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
  53079. const placeholderName = placeholder.name;
  53080. throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
  53081. placeholder you may want to consider passing one of the following options to @babel/template:
  53082. - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
  53083. - { placeholderPattern: /^${placeholderName}$/ }`);
  53084. }
  53085. });
  53086. Object.keys(replacements).forEach((key) => {
  53087. if (!metadata.placeholderNames.has(key)) {
  53088. throw new Error(`Unknown substitution "${key}" given`);
  53089. }
  53090. });
  53091. }
  53092. metadata.placeholders.slice().reverse().forEach((placeholder) => {
  53093. try {
  53094. applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
  53095. } catch (e) {
  53096. e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
  53097. throw e;
  53098. }
  53099. });
  53100. return ast;
  53101. }
  53102. function applyReplacement(placeholder, ast, replacement) {
  53103. if (placeholder.isDuplicate) {
  53104. if (Array.isArray(replacement)) {
  53105. replacement = replacement.map((node) => t2.cloneNode(node));
  53106. } else if (typeof replacement === "object") {
  53107. replacement = t2.cloneNode(replacement);
  53108. }
  53109. }
  53110. const {
  53111. parent,
  53112. key,
  53113. index: index2
  53114. } = placeholder.resolve(ast);
  53115. if (placeholder.type === "string") {
  53116. if (typeof replacement === "string") {
  53117. replacement = t2.stringLiteral(replacement);
  53118. }
  53119. if (!replacement || !t2.isStringLiteral(replacement)) {
  53120. throw new Error("Expected string substitution");
  53121. }
  53122. } else if (placeholder.type === "statement") {
  53123. if (index2 === void 0) {
  53124. if (!replacement) {
  53125. replacement = t2.emptyStatement();
  53126. } else if (Array.isArray(replacement)) {
  53127. replacement = t2.blockStatement(replacement);
  53128. } else if (typeof replacement === "string") {
  53129. replacement = t2.expressionStatement(t2.identifier(replacement));
  53130. } else if (!t2.isStatement(replacement)) {
  53131. replacement = t2.expressionStatement(replacement);
  53132. }
  53133. } else {
  53134. if (replacement && !Array.isArray(replacement)) {
  53135. if (typeof replacement === "string") {
  53136. replacement = t2.identifier(replacement);
  53137. }
  53138. if (!t2.isStatement(replacement)) {
  53139. replacement = t2.expressionStatement(replacement);
  53140. }
  53141. }
  53142. }
  53143. } else if (placeholder.type === "param") {
  53144. if (typeof replacement === "string") {
  53145. replacement = t2.identifier(replacement);
  53146. }
  53147. if (index2 === void 0)
  53148. throw new Error("Assertion failure.");
  53149. } else {
  53150. if (typeof replacement === "string") {
  53151. replacement = t2.identifier(replacement);
  53152. }
  53153. if (Array.isArray(replacement)) {
  53154. throw new Error("Cannot replace single expression with an array.");
  53155. }
  53156. }
  53157. if (index2 === void 0) {
  53158. t2.validate(parent, key, replacement);
  53159. parent[key] = replacement;
  53160. } else {
  53161. const items = parent[key].slice();
  53162. if (placeholder.type === "statement" || placeholder.type === "param") {
  53163. if (replacement == null) {
  53164. items.splice(index2, 1);
  53165. } else if (Array.isArray(replacement)) {
  53166. items.splice(index2, 1, ...replacement);
  53167. } else {
  53168. items[index2] = replacement;
  53169. }
  53170. } else {
  53171. items[index2] = replacement;
  53172. }
  53173. t2.validate(parent, key, items);
  53174. parent[key] = items;
  53175. }
  53176. }
  53177. }
  53178. });
  53179. // node_modules/estree-to-babel/node_modules/@babel/template/lib/string.js
  53180. var require_string = __commonJS({
  53181. "node_modules/estree-to-babel/node_modules/@babel/template/lib/string.js"(exports) {
  53182. "use strict";
  53183. Object.defineProperty(exports, "__esModule", {
  53184. value: true
  53185. });
  53186. exports.default = stringTemplate;
  53187. var _options = require_options();
  53188. var _parse = _interopRequireDefault(require_parse());
  53189. var _populate = _interopRequireDefault(require_populate());
  53190. function _interopRequireDefault(obj) {
  53191. return obj && obj.__esModule ? obj : { default: obj };
  53192. }
  53193. function stringTemplate(formatter, code2, opts) {
  53194. code2 = formatter.code(code2);
  53195. let metadata;
  53196. return (arg) => {
  53197. const replacements = (0, _options.normalizeReplacements)(arg);
  53198. if (!metadata)
  53199. metadata = (0, _parse.default)(formatter, code2, opts);
  53200. return formatter.unwrap((0, _populate.default)(metadata, replacements));
  53201. };
  53202. }
  53203. }
  53204. });
  53205. // node_modules/estree-to-babel/node_modules/@babel/template/lib/literal.js
  53206. var require_literal = __commonJS({
  53207. "node_modules/estree-to-babel/node_modules/@babel/template/lib/literal.js"(exports) {
  53208. "use strict";
  53209. Object.defineProperty(exports, "__esModule", {
  53210. value: true
  53211. });
  53212. exports.default = literalTemplate;
  53213. var _options = require_options();
  53214. var _parse = _interopRequireDefault(require_parse());
  53215. var _populate = _interopRequireDefault(require_populate());
  53216. function _interopRequireDefault(obj) {
  53217. return obj && obj.__esModule ? obj : { default: obj };
  53218. }
  53219. function literalTemplate(formatter, tpl, opts) {
  53220. const {
  53221. metadata,
  53222. names
  53223. } = buildLiteralData(formatter, tpl, opts);
  53224. return (arg) => {
  53225. const defaultReplacements = {};
  53226. arg.forEach((replacement, i) => {
  53227. defaultReplacements[names[i]] = replacement;
  53228. });
  53229. return (arg2) => {
  53230. const replacements = (0, _options.normalizeReplacements)(arg2);
  53231. if (replacements) {
  53232. Object.keys(replacements).forEach((key) => {
  53233. if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
  53234. throw new Error("Unexpected replacement overlap.");
  53235. }
  53236. });
  53237. }
  53238. return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
  53239. };
  53240. };
  53241. }
  53242. function buildLiteralData(formatter, tpl, opts) {
  53243. let names;
  53244. let nameSet;
  53245. let metadata;
  53246. let prefix = "";
  53247. do {
  53248. prefix += "$";
  53249. const result = buildTemplateCode(tpl, prefix);
  53250. names = result.names;
  53251. nameSet = new Set(names);
  53252. metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
  53253. parser: opts.parser,
  53254. placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
  53255. placeholderPattern: opts.placeholderPattern,
  53256. preserveComments: opts.preserveComments,
  53257. syntacticPlaceholders: opts.syntacticPlaceholders
  53258. });
  53259. } while (metadata.placeholders.some((placeholder) => placeholder.isDuplicate && nameSet.has(placeholder.name)));
  53260. return {
  53261. metadata,
  53262. names
  53263. };
  53264. }
  53265. function buildTemplateCode(tpl, prefix) {
  53266. const names = [];
  53267. let code2 = tpl[0];
  53268. for (let i = 1; i < tpl.length; i++) {
  53269. const value = `${prefix}${i - 1}`;
  53270. names.push(value);
  53271. code2 += value + tpl[i];
  53272. }
  53273. return {
  53274. names,
  53275. code: code2
  53276. };
  53277. }
  53278. }
  53279. });
  53280. // node_modules/estree-to-babel/node_modules/@babel/template/lib/builder.js
  53281. var require_builder3 = __commonJS({
  53282. "node_modules/estree-to-babel/node_modules/@babel/template/lib/builder.js"(exports) {
  53283. "use strict";
  53284. Object.defineProperty(exports, "__esModule", {
  53285. value: true
  53286. });
  53287. exports.default = createTemplateBuilder;
  53288. var _options = require_options();
  53289. var _string = _interopRequireDefault(require_string());
  53290. var _literal = _interopRequireDefault(require_literal());
  53291. function _interopRequireDefault(obj) {
  53292. return obj && obj.__esModule ? obj : { default: obj };
  53293. }
  53294. var NO_PLACEHOLDER = (0, _options.validate)({
  53295. placeholderPattern: false
  53296. });
  53297. function createTemplateBuilder(formatter, defaultOpts) {
  53298. const templateFnCache = /* @__PURE__ */ new WeakMap();
  53299. const templateAstCache = /* @__PURE__ */ new WeakMap();
  53300. const cachedOpts = defaultOpts || (0, _options.validate)(null);
  53301. return Object.assign((tpl, ...args) => {
  53302. if (typeof tpl === "string") {
  53303. if (args.length > 1)
  53304. throw new Error("Unexpected extra params.");
  53305. return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
  53306. } else if (Array.isArray(tpl)) {
  53307. let builder = templateFnCache.get(tpl);
  53308. if (!builder) {
  53309. builder = (0, _literal.default)(formatter, tpl, cachedOpts);
  53310. templateFnCache.set(tpl, builder);
  53311. }
  53312. return extendedTrace(builder(args));
  53313. } else if (typeof tpl === "object" && tpl) {
  53314. if (args.length > 0)
  53315. throw new Error("Unexpected extra params.");
  53316. return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
  53317. }
  53318. throw new Error(`Unexpected template param ${typeof tpl}`);
  53319. }, {
  53320. ast: (tpl, ...args) => {
  53321. if (typeof tpl === "string") {
  53322. if (args.length > 1)
  53323. throw new Error("Unexpected extra params.");
  53324. return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
  53325. } else if (Array.isArray(tpl)) {
  53326. let builder = templateAstCache.get(tpl);
  53327. if (!builder) {
  53328. builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
  53329. templateAstCache.set(tpl, builder);
  53330. }
  53331. return builder(args)();
  53332. }
  53333. throw new Error(`Unexpected template param ${typeof tpl}`);
  53334. }
  53335. });
  53336. }
  53337. function extendedTrace(fn) {
  53338. let rootStack = "";
  53339. try {
  53340. throw new Error();
  53341. } catch (error) {
  53342. if (error.stack) {
  53343. rootStack = error.stack.split("\n").slice(3).join("\n");
  53344. }
  53345. }
  53346. return (arg) => {
  53347. try {
  53348. return fn(arg);
  53349. } catch (err) {
  53350. err.stack += `
  53351. =============
  53352. ${rootStack}`;
  53353. throw err;
  53354. }
  53355. };
  53356. }
  53357. }
  53358. });
  53359. // node_modules/estree-to-babel/node_modules/@babel/template/lib/index.js
  53360. var require_lib12 = __commonJS({
  53361. "node_modules/estree-to-babel/node_modules/@babel/template/lib/index.js"(exports) {
  53362. "use strict";
  53363. Object.defineProperty(exports, "__esModule", {
  53364. value: true
  53365. });
  53366. exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0;
  53367. var formatters = _interopRequireWildcard(require_formatters());
  53368. var _builder = _interopRequireDefault(require_builder3());
  53369. function _interopRequireDefault(obj) {
  53370. return obj && obj.__esModule ? obj : { default: obj };
  53371. }
  53372. function _getRequireWildcardCache() {
  53373. if (typeof WeakMap !== "function")
  53374. return null;
  53375. var cache = /* @__PURE__ */ new WeakMap();
  53376. _getRequireWildcardCache = function() {
  53377. return cache;
  53378. };
  53379. return cache;
  53380. }
  53381. function _interopRequireWildcard(obj) {
  53382. if (obj && obj.__esModule) {
  53383. return obj;
  53384. }
  53385. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  53386. return { default: obj };
  53387. }
  53388. var cache = _getRequireWildcardCache();
  53389. if (cache && cache.has(obj)) {
  53390. return cache.get(obj);
  53391. }
  53392. var newObj = {};
  53393. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  53394. for (var key in obj) {
  53395. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  53396. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  53397. if (desc && (desc.get || desc.set)) {
  53398. Object.defineProperty(newObj, key, desc);
  53399. } else {
  53400. newObj[key] = obj[key];
  53401. }
  53402. }
  53403. }
  53404. newObj.default = obj;
  53405. if (cache) {
  53406. cache.set(obj, newObj);
  53407. }
  53408. return newObj;
  53409. }
  53410. var smart = (0, _builder.default)(formatters.smart);
  53411. exports.smart = smart;
  53412. var statement = (0, _builder.default)(formatters.statement);
  53413. exports.statement = statement;
  53414. var statements = (0, _builder.default)(formatters.statements);
  53415. exports.statements = statements;
  53416. var expression = (0, _builder.default)(formatters.expression);
  53417. exports.expression = expression;
  53418. var program = (0, _builder.default)(formatters.program);
  53419. exports.program = program;
  53420. var _default = Object.assign(smart.bind(void 0), {
  53421. smart,
  53422. statement,
  53423. statements,
  53424. expression,
  53425. program,
  53426. ast: smart.ast
  53427. });
  53428. exports.default = _default;
  53429. }
  53430. });
  53431. // node_modules/estree-to-babel/node_modules/@babel/helper-function-name/lib/index.js
  53432. var require_lib13 = __commonJS({
  53433. "node_modules/estree-to-babel/node_modules/@babel/helper-function-name/lib/index.js"(exports) {
  53434. "use strict";
  53435. Object.defineProperty(exports, "__esModule", {
  53436. value: true
  53437. });
  53438. exports.default = _default;
  53439. var _helperGetFunctionArity = require_lib11();
  53440. var _template = require_lib12();
  53441. var t2 = require_lib4();
  53442. var buildPropertyMethodAssignmentWrapper = (0, _template.default)(`
  53443. (function (FUNCTION_KEY) {
  53444. function FUNCTION_ID() {
  53445. return FUNCTION_KEY.apply(this, arguments);
  53446. }
  53447. FUNCTION_ID.toString = function () {
  53448. return FUNCTION_KEY.toString();
  53449. }
  53450. return FUNCTION_ID;
  53451. })(FUNCTION)
  53452. `);
  53453. var buildGeneratorPropertyMethodAssignmentWrapper = (0, _template.default)(`
  53454. (function (FUNCTION_KEY) {
  53455. function* FUNCTION_ID() {
  53456. return yield* FUNCTION_KEY.apply(this, arguments);
  53457. }
  53458. FUNCTION_ID.toString = function () {
  53459. return FUNCTION_KEY.toString();
  53460. };
  53461. return FUNCTION_ID;
  53462. })(FUNCTION)
  53463. `);
  53464. var visitor = {
  53465. "ReferencedIdentifier|BindingIdentifier"(path, state) {
  53466. if (path.node.name !== state.name)
  53467. return;
  53468. const localDeclar = path.scope.getBindingIdentifier(state.name);
  53469. if (localDeclar !== state.outerDeclar)
  53470. return;
  53471. state.selfReference = true;
  53472. path.stop();
  53473. }
  53474. };
  53475. function getNameFromLiteralId(id) {
  53476. if (t2.isNullLiteral(id)) {
  53477. return "null";
  53478. }
  53479. if (t2.isRegExpLiteral(id)) {
  53480. return `_${id.pattern}_${id.flags}`;
  53481. }
  53482. if (t2.isTemplateLiteral(id)) {
  53483. return id.quasis.map((quasi) => quasi.value.raw).join("");
  53484. }
  53485. if (id.value !== void 0) {
  53486. return id.value + "";
  53487. }
  53488. return "";
  53489. }
  53490. function wrap3(state, method, id, scope) {
  53491. if (state.selfReference) {
  53492. if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
  53493. scope.rename(id.name);
  53494. } else {
  53495. if (!t2.isFunction(method))
  53496. return;
  53497. let build = buildPropertyMethodAssignmentWrapper;
  53498. if (method.generator) {
  53499. build = buildGeneratorPropertyMethodAssignmentWrapper;
  53500. }
  53501. const template = build({
  53502. FUNCTION: method,
  53503. FUNCTION_ID: id,
  53504. FUNCTION_KEY: scope.generateUidIdentifier(id.name)
  53505. }).expression;
  53506. const params = template.callee.body.body[0].params;
  53507. for (let i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
  53508. params.push(scope.generateUidIdentifier("x"));
  53509. }
  53510. return template;
  53511. }
  53512. }
  53513. method.id = id;
  53514. scope.getProgramParent().references[id.name] = true;
  53515. }
  53516. function visit4(node, name2, scope) {
  53517. const state = {
  53518. selfAssignment: false,
  53519. selfReference: false,
  53520. outerDeclar: scope.getBindingIdentifier(name2),
  53521. references: [],
  53522. name: name2
  53523. };
  53524. const binding = scope.getOwnBinding(name2);
  53525. if (binding) {
  53526. if (binding.kind === "param") {
  53527. state.selfReference = true;
  53528. } else {
  53529. }
  53530. } else if (state.outerDeclar || scope.hasGlobal(name2)) {
  53531. scope.traverse(node, visitor, state);
  53532. }
  53533. return state;
  53534. }
  53535. function _default({
  53536. node,
  53537. parent,
  53538. scope,
  53539. id
  53540. }, localBinding = false) {
  53541. if (node.id)
  53542. return;
  53543. if ((t2.isObjectProperty(parent) || t2.isObjectMethod(parent, {
  53544. kind: "method"
  53545. })) && (!parent.computed || t2.isLiteral(parent.key))) {
  53546. id = parent.key;
  53547. } else if (t2.isVariableDeclarator(parent)) {
  53548. id = parent.id;
  53549. if (t2.isIdentifier(id) && !localBinding) {
  53550. const binding = scope.parent.getBinding(id.name);
  53551. if (binding && binding.constant && scope.getBinding(id.name) === binding) {
  53552. node.id = t2.cloneNode(id);
  53553. node.id[t2.NOT_LOCAL_BINDING] = true;
  53554. return;
  53555. }
  53556. }
  53557. } else if (t2.isAssignmentExpression(parent, {
  53558. operator: "="
  53559. })) {
  53560. id = parent.left;
  53561. } else if (!id) {
  53562. return;
  53563. }
  53564. let name2;
  53565. if (id && t2.isLiteral(id)) {
  53566. name2 = getNameFromLiteralId(id);
  53567. } else if (id && t2.isIdentifier(id)) {
  53568. name2 = id.name;
  53569. }
  53570. if (name2 === void 0) {
  53571. return;
  53572. }
  53573. name2 = t2.toBindingIdentifierName(name2);
  53574. id = t2.identifier(name2);
  53575. id[t2.NOT_LOCAL_BINDING] = true;
  53576. const state = visit4(node, name2, scope);
  53577. return wrap3(state, node, id, scope) || node;
  53578. }
  53579. }
  53580. });
  53581. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/conversion.js
  53582. var require_conversion = __commonJS({
  53583. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/conversion.js"(exports) {
  53584. "use strict";
  53585. Object.defineProperty(exports, "__esModule", {
  53586. value: true
  53587. });
  53588. exports.toComputedKey = toComputedKey;
  53589. exports.ensureBlock = ensureBlock;
  53590. exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
  53591. exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
  53592. exports.arrowFunctionToExpression = arrowFunctionToExpression;
  53593. var t2 = require_lib4();
  53594. var _helperFunctionName = require_lib13();
  53595. function toComputedKey() {
  53596. let key;
  53597. if (this.isMemberExpression()) {
  53598. key = this.node.property;
  53599. } else if (this.isProperty() || this.isMethod()) {
  53600. key = this.node.key;
  53601. } else {
  53602. throw new ReferenceError("todo");
  53603. }
  53604. if (!this.node.computed) {
  53605. if (t2.isIdentifier(key))
  53606. key = t2.stringLiteral(key.name);
  53607. }
  53608. return key;
  53609. }
  53610. function ensureBlock() {
  53611. const body = this.get("body");
  53612. const bodyNode = body.node;
  53613. if (Array.isArray(body)) {
  53614. throw new Error("Can't convert array path to a block statement");
  53615. }
  53616. if (!bodyNode) {
  53617. throw new Error("Can't convert node without a body");
  53618. }
  53619. if (body.isBlockStatement()) {
  53620. return bodyNode;
  53621. }
  53622. const statements = [];
  53623. let stringPath = "body";
  53624. let key;
  53625. let listKey;
  53626. if (body.isStatement()) {
  53627. listKey = "body";
  53628. key = 0;
  53629. statements.push(body.node);
  53630. } else {
  53631. stringPath += ".body.0";
  53632. if (this.isFunction()) {
  53633. key = "argument";
  53634. statements.push(t2.returnStatement(body.node));
  53635. } else {
  53636. key = "expression";
  53637. statements.push(t2.expressionStatement(body.node));
  53638. }
  53639. }
  53640. this.node.body = t2.blockStatement(statements);
  53641. const parentPath = this.get(stringPath);
  53642. body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
  53643. return this.node;
  53644. }
  53645. function arrowFunctionToShadowed() {
  53646. if (!this.isArrowFunctionExpression())
  53647. return;
  53648. this.arrowFunctionToExpression();
  53649. }
  53650. function unwrapFunctionEnvironment() {
  53651. if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
  53652. throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
  53653. }
  53654. hoistFunctionEnvironment(this);
  53655. }
  53656. function arrowFunctionToExpression({
  53657. allowInsertArrow = true,
  53658. specCompliant = false,
  53659. noNewArrows = !specCompliant
  53660. } = {}) {
  53661. if (!this.isArrowFunctionExpression()) {
  53662. throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
  53663. }
  53664. const thisBinding = hoistFunctionEnvironment(this, noNewArrows, allowInsertArrow);
  53665. this.ensureBlock();
  53666. this.node.type = "FunctionExpression";
  53667. if (!noNewArrows) {
  53668. const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
  53669. if (checkBinding) {
  53670. this.parentPath.scope.push({
  53671. id: checkBinding,
  53672. init: t2.objectExpression([])
  53673. });
  53674. }
  53675. this.get("body").unshiftContainer("body", t2.expressionStatement(t2.callExpression(this.hub.addHelper("newArrowCheck"), [t2.thisExpression(), checkBinding ? t2.identifier(checkBinding.name) : t2.identifier(thisBinding)])));
  53676. this.replaceWith(t2.callExpression(t2.memberExpression((0, _helperFunctionName.default)(this, true) || this.node, t2.identifier("bind")), [checkBinding ? t2.identifier(checkBinding.name) : t2.thisExpression()]));
  53677. }
  53678. }
  53679. function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow = true) {
  53680. const thisEnvFn = fnPath.findParent((p) => {
  53681. return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
  53682. static: false
  53683. });
  53684. });
  53685. const inConstructor = (thisEnvFn == null ? void 0 : thisEnvFn.node.kind) === "constructor";
  53686. if (thisEnvFn.isClassProperty()) {
  53687. throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
  53688. }
  53689. const {
  53690. thisPaths,
  53691. argumentsPaths,
  53692. newTargetPaths,
  53693. superProps,
  53694. superCalls
  53695. } = getScopeInformation(fnPath);
  53696. if (inConstructor && superCalls.length > 0) {
  53697. if (!allowInsertArrow) {
  53698. throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
  53699. }
  53700. const allSuperCalls = [];
  53701. thisEnvFn.traverse({
  53702. Function(child) {
  53703. if (child.isArrowFunctionExpression())
  53704. return;
  53705. child.skip();
  53706. },
  53707. ClassProperty(child) {
  53708. child.skip();
  53709. },
  53710. CallExpression(child) {
  53711. if (!child.get("callee").isSuper())
  53712. return;
  53713. allSuperCalls.push(child);
  53714. }
  53715. });
  53716. const superBinding = getSuperBinding(thisEnvFn);
  53717. allSuperCalls.forEach((superCall) => {
  53718. const callee = t2.identifier(superBinding);
  53719. callee.loc = superCall.node.callee.loc;
  53720. superCall.get("callee").replaceWith(callee);
  53721. });
  53722. }
  53723. if (argumentsPaths.length > 0) {
  53724. const argumentsBinding = getBinding(thisEnvFn, "arguments", () => t2.identifier("arguments"));
  53725. argumentsPaths.forEach((argumentsChild) => {
  53726. const argsRef = t2.identifier(argumentsBinding);
  53727. argsRef.loc = argumentsChild.node.loc;
  53728. argumentsChild.replaceWith(argsRef);
  53729. });
  53730. }
  53731. if (newTargetPaths.length > 0) {
  53732. const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t2.metaProperty(t2.identifier("new"), t2.identifier("target")));
  53733. newTargetPaths.forEach((targetChild) => {
  53734. const targetRef = t2.identifier(newTargetBinding);
  53735. targetRef.loc = targetChild.node.loc;
  53736. targetChild.replaceWith(targetRef);
  53737. });
  53738. }
  53739. if (superProps.length > 0) {
  53740. if (!allowInsertArrow) {
  53741. throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
  53742. }
  53743. const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
  53744. flatSuperProps.forEach((superProp) => {
  53745. const key = superProp.node.computed ? "" : superProp.get("property").node.name;
  53746. const isAssignment = superProp.parentPath.isAssignmentExpression({
  53747. left: superProp.node
  53748. });
  53749. const isCall = superProp.parentPath.isCallExpression({
  53750. callee: superProp.node
  53751. });
  53752. const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
  53753. const args = [];
  53754. if (superProp.node.computed) {
  53755. args.push(superProp.get("property").node);
  53756. }
  53757. if (isAssignment) {
  53758. const value = superProp.parentPath.node.right;
  53759. args.push(value);
  53760. }
  53761. const call = t2.callExpression(t2.identifier(superBinding), args);
  53762. if (isCall) {
  53763. superProp.parentPath.unshiftContainer("arguments", t2.thisExpression());
  53764. superProp.replaceWith(t2.memberExpression(call, t2.identifier("call")));
  53765. thisPaths.push(superProp.parentPath.get("arguments.0"));
  53766. } else if (isAssignment) {
  53767. superProp.parentPath.replaceWith(call);
  53768. } else {
  53769. superProp.replaceWith(call);
  53770. }
  53771. });
  53772. }
  53773. let thisBinding;
  53774. if (thisPaths.length > 0 || !noNewArrows) {
  53775. thisBinding = getThisBinding(thisEnvFn, inConstructor);
  53776. if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
  53777. thisPaths.forEach((thisChild) => {
  53778. const thisRef = thisChild.isJSX() ? t2.jsxIdentifier(thisBinding) : t2.identifier(thisBinding);
  53779. thisRef.loc = thisChild.node.loc;
  53780. thisChild.replaceWith(thisRef);
  53781. });
  53782. if (!noNewArrows)
  53783. thisBinding = null;
  53784. }
  53785. }
  53786. return thisBinding;
  53787. }
  53788. function standardizeSuperProperty(superProp) {
  53789. if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
  53790. const assignmentPath = superProp.parentPath;
  53791. const op = assignmentPath.node.operator.slice(0, -1);
  53792. const value = assignmentPath.node.right;
  53793. assignmentPath.node.operator = "=";
  53794. if (superProp.node.computed) {
  53795. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  53796. assignmentPath.get("left").replaceWith(t2.memberExpression(superProp.node.object, t2.assignmentExpression("=", tmp, superProp.node.property), true));
  53797. assignmentPath.get("right").replaceWith(t2.binaryExpression(op, t2.memberExpression(superProp.node.object, t2.identifier(tmp.name), true), value));
  53798. } else {
  53799. assignmentPath.get("left").replaceWith(t2.memberExpression(superProp.node.object, superProp.node.property));
  53800. assignmentPath.get("right").replaceWith(t2.binaryExpression(op, t2.memberExpression(superProp.node.object, t2.identifier(superProp.node.property.name)), value));
  53801. }
  53802. return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
  53803. } else if (superProp.parentPath.isUpdateExpression()) {
  53804. const updateExpr = superProp.parentPath;
  53805. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  53806. const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
  53807. const parts = [t2.assignmentExpression("=", tmp, t2.memberExpression(superProp.node.object, computedKey ? t2.assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t2.assignmentExpression("=", t2.memberExpression(superProp.node.object, computedKey ? t2.identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t2.binaryExpression("+", t2.identifier(tmp.name), t2.numericLiteral(1)))];
  53808. if (!superProp.parentPath.node.prefix) {
  53809. parts.push(t2.identifier(tmp.name));
  53810. }
  53811. updateExpr.replaceWith(t2.sequenceExpression(parts));
  53812. const left = updateExpr.get("expressions.0.right");
  53813. const right = updateExpr.get("expressions.1.left");
  53814. return [left, right];
  53815. }
  53816. return [superProp];
  53817. }
  53818. function hasSuperClass(thisEnvFn) {
  53819. return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
  53820. }
  53821. function getThisBinding(thisEnvFn, inConstructor) {
  53822. return getBinding(thisEnvFn, "this", (thisBinding) => {
  53823. if (!inConstructor || !hasSuperClass(thisEnvFn))
  53824. return t2.thisExpression();
  53825. const supers = /* @__PURE__ */ new WeakSet();
  53826. thisEnvFn.traverse({
  53827. Function(child) {
  53828. if (child.isArrowFunctionExpression())
  53829. return;
  53830. child.skip();
  53831. },
  53832. ClassProperty(child) {
  53833. child.skip();
  53834. },
  53835. CallExpression(child) {
  53836. if (!child.get("callee").isSuper())
  53837. return;
  53838. if (supers.has(child.node))
  53839. return;
  53840. supers.add(child.node);
  53841. child.replaceWithMultiple([child.node, t2.assignmentExpression("=", t2.identifier(thisBinding), t2.identifier("this"))]);
  53842. }
  53843. });
  53844. });
  53845. }
  53846. function getSuperBinding(thisEnvFn) {
  53847. return getBinding(thisEnvFn, "supercall", () => {
  53848. const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
  53849. return t2.arrowFunctionExpression([t2.restElement(argsBinding)], t2.callExpression(t2.super(), [t2.spreadElement(t2.identifier(argsBinding.name))]));
  53850. });
  53851. }
  53852. function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
  53853. const op = isAssignment ? "set" : "get";
  53854. return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
  53855. const argsList = [];
  53856. let fnBody;
  53857. if (propName) {
  53858. fnBody = t2.memberExpression(t2.super(), t2.identifier(propName));
  53859. } else {
  53860. const method = thisEnvFn.scope.generateUidIdentifier("prop");
  53861. argsList.unshift(method);
  53862. fnBody = t2.memberExpression(t2.super(), t2.identifier(method.name), true);
  53863. }
  53864. if (isAssignment) {
  53865. const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
  53866. argsList.push(valueIdent);
  53867. fnBody = t2.assignmentExpression("=", fnBody, t2.identifier(valueIdent.name));
  53868. }
  53869. return t2.arrowFunctionExpression(argsList, fnBody);
  53870. });
  53871. }
  53872. function getBinding(thisEnvFn, key, init) {
  53873. const cacheKey = "binding:" + key;
  53874. let data2 = thisEnvFn.getData(cacheKey);
  53875. if (!data2) {
  53876. const id = thisEnvFn.scope.generateUidIdentifier(key);
  53877. data2 = id.name;
  53878. thisEnvFn.setData(cacheKey, data2);
  53879. thisEnvFn.scope.push({
  53880. id,
  53881. init: init(data2)
  53882. });
  53883. }
  53884. return data2;
  53885. }
  53886. function getScopeInformation(fnPath) {
  53887. const thisPaths = [];
  53888. const argumentsPaths = [];
  53889. const newTargetPaths = [];
  53890. const superProps = [];
  53891. const superCalls = [];
  53892. fnPath.traverse({
  53893. ClassProperty(child) {
  53894. child.skip();
  53895. },
  53896. Function(child) {
  53897. if (child.isArrowFunctionExpression())
  53898. return;
  53899. child.skip();
  53900. },
  53901. ThisExpression(child) {
  53902. thisPaths.push(child);
  53903. },
  53904. JSXIdentifier(child) {
  53905. if (child.node.name !== "this")
  53906. return;
  53907. if (!child.parentPath.isJSXMemberExpression({
  53908. object: child.node
  53909. }) && !child.parentPath.isJSXOpeningElement({
  53910. name: child.node
  53911. })) {
  53912. return;
  53913. }
  53914. thisPaths.push(child);
  53915. },
  53916. CallExpression(child) {
  53917. if (child.get("callee").isSuper())
  53918. superCalls.push(child);
  53919. },
  53920. MemberExpression(child) {
  53921. if (child.get("object").isSuper())
  53922. superProps.push(child);
  53923. },
  53924. ReferencedIdentifier(child) {
  53925. if (child.node.name !== "arguments")
  53926. return;
  53927. argumentsPaths.push(child);
  53928. },
  53929. MetaProperty(child) {
  53930. if (!child.get("meta").isIdentifier({
  53931. name: "new"
  53932. }))
  53933. return;
  53934. if (!child.get("property").isIdentifier({
  53935. name: "target"
  53936. }))
  53937. return;
  53938. newTargetPaths.push(child);
  53939. }
  53940. });
  53941. return {
  53942. thisPaths,
  53943. argumentsPaths,
  53944. newTargetPaths,
  53945. superProps,
  53946. superCalls
  53947. };
  53948. }
  53949. }
  53950. });
  53951. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/introspection.js
  53952. var require_introspection = __commonJS({
  53953. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/introspection.js"(exports) {
  53954. "use strict";
  53955. Object.defineProperty(exports, "__esModule", {
  53956. value: true
  53957. });
  53958. exports.matchesPattern = matchesPattern;
  53959. exports.has = has;
  53960. exports.isStatic = isStatic;
  53961. exports.isnt = isnt;
  53962. exports.equals = equals;
  53963. exports.isNodeType = isNodeType;
  53964. exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
  53965. exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
  53966. exports.isCompletionRecord = isCompletionRecord;
  53967. exports.isStatementOrBlock = isStatementOrBlock;
  53968. exports.referencesImport = referencesImport;
  53969. exports.getSource = getSource;
  53970. exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
  53971. exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
  53972. exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
  53973. exports.resolve = resolve;
  53974. exports._resolve = _resolve;
  53975. exports.isConstantExpression = isConstantExpression;
  53976. exports.isInStrictMode = isInStrictMode;
  53977. exports.is = void 0;
  53978. var t2 = require_lib4();
  53979. function matchesPattern(pattern, allowPartial) {
  53980. return t2.matchesPattern(this.node, pattern, allowPartial);
  53981. }
  53982. function has(key) {
  53983. const val = this.node && this.node[key];
  53984. if (val && Array.isArray(val)) {
  53985. return !!val.length;
  53986. } else {
  53987. return !!val;
  53988. }
  53989. }
  53990. function isStatic() {
  53991. return this.scope.isStatic(this.node);
  53992. }
  53993. var is = has;
  53994. exports.is = is;
  53995. function isnt(key) {
  53996. return !this.has(key);
  53997. }
  53998. function equals(key, value) {
  53999. return this.node[key] === value;
  54000. }
  54001. function isNodeType(type) {
  54002. return t2.isType(this.type, type);
  54003. }
  54004. function canHaveVariableDeclarationOrExpression() {
  54005. return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
  54006. }
  54007. function canSwapBetweenExpressionAndStatement(replacement) {
  54008. if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
  54009. return false;
  54010. }
  54011. if (this.isExpression()) {
  54012. return t2.isBlockStatement(replacement);
  54013. } else if (this.isBlockStatement()) {
  54014. return t2.isExpression(replacement);
  54015. }
  54016. return false;
  54017. }
  54018. function isCompletionRecord(allowInsideFunction) {
  54019. let path = this;
  54020. let first = true;
  54021. do {
  54022. const container = path.container;
  54023. if (path.isFunction() && !first) {
  54024. return !!allowInsideFunction;
  54025. }
  54026. first = false;
  54027. if (Array.isArray(container) && path.key !== container.length - 1) {
  54028. return false;
  54029. }
  54030. } while ((path = path.parentPath) && !path.isProgram());
  54031. return true;
  54032. }
  54033. function isStatementOrBlock() {
  54034. if (this.parentPath.isLabeledStatement() || t2.isBlockStatement(this.container)) {
  54035. return false;
  54036. } else {
  54037. return t2.STATEMENT_OR_BLOCK_KEYS.includes(this.key);
  54038. }
  54039. }
  54040. function referencesImport(moduleSource, importName) {
  54041. if (!this.isReferencedIdentifier()) {
  54042. if ((this.isMemberExpression() || this.isOptionalMemberExpression()) && (this.node.computed ? t2.isStringLiteral(this.node.property, {
  54043. value: importName
  54044. }) : this.node.property.name === importName)) {
  54045. const object = this.get("object");
  54046. return object.isReferencedIdentifier() && object.referencesImport(moduleSource, "*");
  54047. }
  54048. return false;
  54049. }
  54050. const binding = this.scope.getBinding(this.node.name);
  54051. if (!binding || binding.kind !== "module")
  54052. return false;
  54053. const path = binding.path;
  54054. const parent = path.parentPath;
  54055. if (!parent.isImportDeclaration())
  54056. return false;
  54057. if (parent.node.source.value === moduleSource) {
  54058. if (!importName)
  54059. return true;
  54060. } else {
  54061. return false;
  54062. }
  54063. if (path.isImportDefaultSpecifier() && importName === "default") {
  54064. return true;
  54065. }
  54066. if (path.isImportNamespaceSpecifier() && importName === "*") {
  54067. return true;
  54068. }
  54069. if (path.isImportSpecifier() && t2.isIdentifier(path.node.imported, {
  54070. name: importName
  54071. })) {
  54072. return true;
  54073. }
  54074. return false;
  54075. }
  54076. function getSource() {
  54077. const node = this.node;
  54078. if (node.end) {
  54079. const code2 = this.hub.getCode();
  54080. if (code2)
  54081. return code2.slice(node.start, node.end);
  54082. }
  54083. return "";
  54084. }
  54085. function willIMaybeExecuteBefore(target) {
  54086. return this._guessExecutionStatusRelativeTo(target) !== "after";
  54087. }
  54088. function getOuterFunction(path) {
  54089. return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path;
  54090. }
  54091. function isExecutionUncertain(type, key) {
  54092. switch (type) {
  54093. case "LogicalExpression":
  54094. return key === "right";
  54095. case "ConditionalExpression":
  54096. case "IfStatement":
  54097. return key === "consequent" || key === "alternate";
  54098. case "WhileStatement":
  54099. case "DoWhileStatement":
  54100. case "ForInStatement":
  54101. case "ForOfStatement":
  54102. return key === "body";
  54103. case "ForStatement":
  54104. return key === "body" || key === "update";
  54105. case "SwitchStatement":
  54106. return key === "cases";
  54107. case "TryStatement":
  54108. return key === "handler";
  54109. case "AssignmentPattern":
  54110. return key === "right";
  54111. case "OptionalMemberExpression":
  54112. return key === "property";
  54113. case "OptionalCallExpression":
  54114. return key === "arguments";
  54115. default:
  54116. return false;
  54117. }
  54118. }
  54119. function isExecutionUncertainInList(paths, maxIndex) {
  54120. for (let i = 0; i < maxIndex; i++) {
  54121. const path = paths[i];
  54122. if (isExecutionUncertain(path.parent.type, path.parentKey)) {
  54123. return true;
  54124. }
  54125. }
  54126. return false;
  54127. }
  54128. function _guessExecutionStatusRelativeTo(target) {
  54129. const funcParent = {
  54130. this: getOuterFunction(this),
  54131. target: getOuterFunction(target)
  54132. };
  54133. if (funcParent.target.node !== funcParent.this.node) {
  54134. return this._guessExecutionStatusRelativeToDifferentFunctions(funcParent.target);
  54135. }
  54136. const paths = {
  54137. target: target.getAncestry(),
  54138. this: this.getAncestry()
  54139. };
  54140. if (paths.target.indexOf(this) >= 0)
  54141. return "after";
  54142. if (paths.this.indexOf(target) >= 0)
  54143. return "before";
  54144. let commonPath;
  54145. const commonIndex = {
  54146. target: 0,
  54147. this: 0
  54148. };
  54149. while (!commonPath && commonIndex.this < paths.this.length) {
  54150. const path = paths.this[commonIndex.this];
  54151. commonIndex.target = paths.target.indexOf(path);
  54152. if (commonIndex.target >= 0) {
  54153. commonPath = path;
  54154. } else {
  54155. commonIndex.this++;
  54156. }
  54157. }
  54158. if (!commonPath) {
  54159. throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");
  54160. }
  54161. if (isExecutionUncertainInList(paths.this, commonIndex.this - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
  54162. return "unknown";
  54163. }
  54164. const divergence = {
  54165. this: paths.this[commonIndex.this - 1],
  54166. target: paths.target[commonIndex.target - 1]
  54167. };
  54168. if (divergence.target.listKey && divergence.this.listKey && divergence.target.container === divergence.this.container) {
  54169. return divergence.target.key > divergence.this.key ? "before" : "after";
  54170. }
  54171. const keys2 = t2.VISITOR_KEYS[commonPath.type];
  54172. const keyPosition = {
  54173. this: keys2.indexOf(divergence.this.parentKey),
  54174. target: keys2.indexOf(divergence.target.parentKey)
  54175. };
  54176. return keyPosition.target > keyPosition.this ? "before" : "after";
  54177. }
  54178. var executionOrderCheckedNodes = /* @__PURE__ */ new WeakSet();
  54179. function _guessExecutionStatusRelativeToDifferentFunctions(target) {
  54180. if (!target.isFunctionDeclaration() || target.parentPath.isExportDeclaration()) {
  54181. return "unknown";
  54182. }
  54183. const binding = target.scope.getBinding(target.node.id.name);
  54184. if (!binding.references)
  54185. return "before";
  54186. const referencePaths = binding.referencePaths;
  54187. let allStatus;
  54188. for (const path of referencePaths) {
  54189. const childOfFunction = !!path.find((path2) => path2.node === target.node);
  54190. if (childOfFunction)
  54191. continue;
  54192. if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
  54193. return "unknown";
  54194. }
  54195. if (executionOrderCheckedNodes.has(path.node))
  54196. continue;
  54197. executionOrderCheckedNodes.add(path.node);
  54198. const status = this._guessExecutionStatusRelativeTo(path);
  54199. executionOrderCheckedNodes.delete(path.node);
  54200. if (allStatus && allStatus !== status) {
  54201. return "unknown";
  54202. } else {
  54203. allStatus = status;
  54204. }
  54205. }
  54206. return allStatus;
  54207. }
  54208. function resolve(dangerous, resolved) {
  54209. return this._resolve(dangerous, resolved) || this;
  54210. }
  54211. function _resolve(dangerous, resolved) {
  54212. if (resolved && resolved.indexOf(this) >= 0)
  54213. return;
  54214. resolved = resolved || [];
  54215. resolved.push(this);
  54216. if (this.isVariableDeclarator()) {
  54217. if (this.get("id").isIdentifier()) {
  54218. return this.get("init").resolve(dangerous, resolved);
  54219. } else {
  54220. }
  54221. } else if (this.isReferencedIdentifier()) {
  54222. const binding = this.scope.getBinding(this.node.name);
  54223. if (!binding)
  54224. return;
  54225. if (!binding.constant)
  54226. return;
  54227. if (binding.kind === "module")
  54228. return;
  54229. if (binding.path !== this) {
  54230. const ret = binding.path.resolve(dangerous, resolved);
  54231. if (this.find((parent) => parent.node === ret.node))
  54232. return;
  54233. return ret;
  54234. }
  54235. } else if (this.isTypeCastExpression()) {
  54236. return this.get("expression").resolve(dangerous, resolved);
  54237. } else if (dangerous && this.isMemberExpression()) {
  54238. const targetKey = this.toComputedKey();
  54239. if (!t2.isLiteral(targetKey))
  54240. return;
  54241. const targetName = targetKey.value;
  54242. const target = this.get("object").resolve(dangerous, resolved);
  54243. if (target.isObjectExpression()) {
  54244. const props = target.get("properties");
  54245. for (const prop of props) {
  54246. if (!prop.isProperty())
  54247. continue;
  54248. const key = prop.get("key");
  54249. let match = prop.isnt("computed") && key.isIdentifier({
  54250. name: targetName
  54251. });
  54252. match = match || key.isLiteral({
  54253. value: targetName
  54254. });
  54255. if (match)
  54256. return prop.get("value").resolve(dangerous, resolved);
  54257. }
  54258. } else if (target.isArrayExpression() && !isNaN(+targetName)) {
  54259. const elems = target.get("elements");
  54260. const elem = elems[targetName];
  54261. if (elem)
  54262. return elem.resolve(dangerous, resolved);
  54263. }
  54264. }
  54265. }
  54266. function isConstantExpression() {
  54267. if (this.isIdentifier()) {
  54268. const binding = this.scope.getBinding(this.node.name);
  54269. if (!binding)
  54270. return false;
  54271. return binding.constant;
  54272. }
  54273. if (this.isLiteral()) {
  54274. if (this.isRegExpLiteral()) {
  54275. return false;
  54276. }
  54277. if (this.isTemplateLiteral()) {
  54278. return this.get("expressions").every((expression) => expression.isConstantExpression());
  54279. }
  54280. return true;
  54281. }
  54282. if (this.isUnaryExpression()) {
  54283. if (this.node.operator !== "void") {
  54284. return false;
  54285. }
  54286. return this.get("argument").isConstantExpression();
  54287. }
  54288. if (this.isBinaryExpression()) {
  54289. return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
  54290. }
  54291. return false;
  54292. }
  54293. function isInStrictMode() {
  54294. const start3 = this.isProgram() ? this : this.parentPath;
  54295. const strictParent = start3.find((path) => {
  54296. if (path.isProgram({
  54297. sourceType: "module"
  54298. }))
  54299. return true;
  54300. if (path.isClass())
  54301. return true;
  54302. if (!path.isProgram() && !path.isFunction())
  54303. return false;
  54304. if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
  54305. return false;
  54306. }
  54307. const body = path.isFunction() ? path.node.body : path.node;
  54308. for (const directive of body.directives) {
  54309. if (directive.value.value === "use strict") {
  54310. return true;
  54311. }
  54312. }
  54313. });
  54314. return !!strictParent;
  54315. }
  54316. }
  54317. });
  54318. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/context.js
  54319. var require_context = __commonJS({
  54320. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/context.js"(exports) {
  54321. "use strict";
  54322. Object.defineProperty(exports, "__esModule", {
  54323. value: true
  54324. });
  54325. exports.call = call;
  54326. exports._call = _call;
  54327. exports.isBlacklisted = exports.isDenylisted = isDenylisted;
  54328. exports.visit = visit4;
  54329. exports.skip = skip;
  54330. exports.skipKey = skipKey;
  54331. exports.stop = stop;
  54332. exports.setScope = setScope;
  54333. exports.setContext = setContext;
  54334. exports.resync = resync;
  54335. exports._resyncParent = _resyncParent;
  54336. exports._resyncKey = _resyncKey;
  54337. exports._resyncList = _resyncList;
  54338. exports._resyncRemoved = _resyncRemoved;
  54339. exports.popContext = popContext;
  54340. exports.pushContext = pushContext;
  54341. exports.setup = setup;
  54342. exports.setKey = setKey;
  54343. exports.requeue = requeue;
  54344. exports._getQueueContexts = _getQueueContexts;
  54345. var _index = require_lib14();
  54346. var _index2 = require_path();
  54347. function call(key) {
  54348. const opts = this.opts;
  54349. this.debug(key);
  54350. if (this.node) {
  54351. if (this._call(opts[key]))
  54352. return true;
  54353. }
  54354. if (this.node) {
  54355. return this._call(opts[this.node.type] && opts[this.node.type][key]);
  54356. }
  54357. return false;
  54358. }
  54359. function _call(fns) {
  54360. if (!fns)
  54361. return false;
  54362. for (const fn of fns) {
  54363. if (!fn)
  54364. continue;
  54365. const node = this.node;
  54366. if (!node)
  54367. return true;
  54368. const ret = fn.call(this.state, this, this.state);
  54369. if (ret && typeof ret === "object" && typeof ret.then === "function") {
  54370. 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.`);
  54371. }
  54372. if (ret) {
  54373. throw new Error(`Unexpected return value from visitor method ${fn}`);
  54374. }
  54375. if (this.node !== node)
  54376. return true;
  54377. if (this._traverseFlags > 0)
  54378. return true;
  54379. }
  54380. return false;
  54381. }
  54382. function isDenylisted() {
  54383. var _this$opts$denylist;
  54384. const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
  54385. return denylist && denylist.indexOf(this.node.type) > -1;
  54386. }
  54387. function visit4() {
  54388. if (!this.node) {
  54389. return false;
  54390. }
  54391. if (this.isDenylisted()) {
  54392. return false;
  54393. }
  54394. if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
  54395. return false;
  54396. }
  54397. if (this.shouldSkip || this.call("enter") || this.shouldSkip) {
  54398. this.debug("Skip...");
  54399. return this.shouldStop;
  54400. }
  54401. this.debug("Recursing into...");
  54402. _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
  54403. this.call("exit");
  54404. return this.shouldStop;
  54405. }
  54406. function skip() {
  54407. this.shouldSkip = true;
  54408. }
  54409. function skipKey(key) {
  54410. if (this.skipKeys == null) {
  54411. this.skipKeys = {};
  54412. }
  54413. this.skipKeys[key] = true;
  54414. }
  54415. function stop() {
  54416. this._traverseFlags |= _index2.SHOULD_SKIP | _index2.SHOULD_STOP;
  54417. }
  54418. function setScope() {
  54419. if (this.opts && this.opts.noScope)
  54420. return;
  54421. let path = this.parentPath;
  54422. if (this.key === "key" && path.isMethod())
  54423. path = path.parentPath;
  54424. let target;
  54425. while (path && !target) {
  54426. if (path.opts && path.opts.noScope)
  54427. return;
  54428. target = path.scope;
  54429. path = path.parentPath;
  54430. }
  54431. this.scope = this.getScope(target);
  54432. if (this.scope)
  54433. this.scope.init();
  54434. }
  54435. function setContext(context) {
  54436. if (this.skipKeys != null) {
  54437. this.skipKeys = {};
  54438. }
  54439. this._traverseFlags = 0;
  54440. if (context) {
  54441. this.context = context;
  54442. this.state = context.state;
  54443. this.opts = context.opts;
  54444. }
  54445. this.setScope();
  54446. return this;
  54447. }
  54448. function resync() {
  54449. if (this.removed)
  54450. return;
  54451. this._resyncParent();
  54452. this._resyncList();
  54453. this._resyncKey();
  54454. }
  54455. function _resyncParent() {
  54456. if (this.parentPath) {
  54457. this.parent = this.parentPath.node;
  54458. }
  54459. }
  54460. function _resyncKey() {
  54461. if (!this.container)
  54462. return;
  54463. if (this.node === this.container[this.key])
  54464. return;
  54465. if (Array.isArray(this.container)) {
  54466. for (let i = 0; i < this.container.length; i++) {
  54467. if (this.container[i] === this.node) {
  54468. return this.setKey(i);
  54469. }
  54470. }
  54471. } else {
  54472. for (const key of Object.keys(this.container)) {
  54473. if (this.container[key] === this.node) {
  54474. return this.setKey(key);
  54475. }
  54476. }
  54477. }
  54478. this.key = null;
  54479. }
  54480. function _resyncList() {
  54481. if (!this.parent || !this.inList)
  54482. return;
  54483. const newContainer = this.parent[this.listKey];
  54484. if (this.container === newContainer)
  54485. return;
  54486. this.container = newContainer || null;
  54487. }
  54488. function _resyncRemoved() {
  54489. if (this.key == null || !this.container || this.container[this.key] !== this.node) {
  54490. this._markRemoved();
  54491. }
  54492. }
  54493. function popContext() {
  54494. this.contexts.pop();
  54495. if (this.contexts.length > 0) {
  54496. this.setContext(this.contexts[this.contexts.length - 1]);
  54497. } else {
  54498. this.setContext(void 0);
  54499. }
  54500. }
  54501. function pushContext(context) {
  54502. this.contexts.push(context);
  54503. this.setContext(context);
  54504. }
  54505. function setup(parentPath, container, listKey, key) {
  54506. this.listKey = listKey;
  54507. this.container = container;
  54508. this.parentPath = parentPath || this.parentPath;
  54509. this.setKey(key);
  54510. }
  54511. function setKey(key) {
  54512. var _this$node;
  54513. this.key = key;
  54514. this.node = this.container[this.key];
  54515. this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
  54516. }
  54517. function requeue(pathToQueue = this) {
  54518. if (pathToQueue.removed)
  54519. return;
  54520. ;
  54521. const contexts = this.contexts;
  54522. for (const context of contexts) {
  54523. context.maybeQueue(pathToQueue);
  54524. }
  54525. }
  54526. function _getQueueContexts() {
  54527. let path = this;
  54528. let contexts = this.contexts;
  54529. while (!contexts.length) {
  54530. path = path.parentPath;
  54531. if (!path)
  54532. break;
  54533. contexts = path.contexts;
  54534. }
  54535. return contexts;
  54536. }
  54537. }
  54538. });
  54539. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
  54540. var require_removal_hooks = __commonJS({
  54541. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports) {
  54542. "use strict";
  54543. Object.defineProperty(exports, "__esModule", {
  54544. value: true
  54545. });
  54546. exports.hooks = void 0;
  54547. var hooks = [function(self2, parent) {
  54548. const removeParent = self2.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self2.key === "declaration" && parent.isExportDeclaration() || self2.key === "body" && parent.isLabeledStatement() || self2.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self2.key === "expression" && parent.isExpressionStatement();
  54549. if (removeParent) {
  54550. parent.remove();
  54551. return true;
  54552. }
  54553. }, function(self2, parent) {
  54554. if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
  54555. parent.replaceWith(parent.node.expressions[0]);
  54556. return true;
  54557. }
  54558. }, function(self2, parent) {
  54559. if (parent.isBinary()) {
  54560. if (self2.key === "left") {
  54561. parent.replaceWith(parent.node.right);
  54562. } else {
  54563. parent.replaceWith(parent.node.left);
  54564. }
  54565. return true;
  54566. }
  54567. }, function(self2, parent) {
  54568. if (parent.isIfStatement() && (self2.key === "consequent" || self2.key === "alternate") || self2.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
  54569. self2.replaceWith({
  54570. type: "BlockStatement",
  54571. body: []
  54572. });
  54573. return true;
  54574. }
  54575. }];
  54576. exports.hooks = hooks;
  54577. }
  54578. });
  54579. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/removal.js
  54580. var require_removal = __commonJS({
  54581. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/removal.js"(exports) {
  54582. "use strict";
  54583. Object.defineProperty(exports, "__esModule", {
  54584. value: true
  54585. });
  54586. exports.remove = remove;
  54587. exports._removeFromScope = _removeFromScope;
  54588. exports._callRemovalHooks = _callRemovalHooks;
  54589. exports._remove = _remove;
  54590. exports._markRemoved = _markRemoved;
  54591. exports._assertUnremoved = _assertUnremoved;
  54592. var _removalHooks = require_removal_hooks();
  54593. var _cache = require_cache();
  54594. var _index = require_path();
  54595. function remove() {
  54596. var _this$opts;
  54597. this._assertUnremoved();
  54598. this.resync();
  54599. if (!((_this$opts = this.opts) != null && _this$opts.noScope)) {
  54600. this._removeFromScope();
  54601. }
  54602. if (this._callRemovalHooks()) {
  54603. this._markRemoved();
  54604. return;
  54605. }
  54606. this.shareCommentsWithSiblings();
  54607. this._remove();
  54608. this._markRemoved();
  54609. }
  54610. function _removeFromScope() {
  54611. const bindings = this.getBindingIdentifiers();
  54612. Object.keys(bindings).forEach((name2) => this.scope.removeBinding(name2));
  54613. }
  54614. function _callRemovalHooks() {
  54615. for (const fn of _removalHooks.hooks) {
  54616. if (fn(this, this.parentPath))
  54617. return true;
  54618. }
  54619. }
  54620. function _remove() {
  54621. if (Array.isArray(this.container)) {
  54622. this.container.splice(this.key, 1);
  54623. this.updateSiblingKeys(this.key, -1);
  54624. } else {
  54625. this._replaceWith(null);
  54626. }
  54627. }
  54628. function _markRemoved() {
  54629. this._traverseFlags |= _index.SHOULD_SKIP | _index.REMOVED;
  54630. if (this.parent)
  54631. _cache.path.get(this.parent).delete(this.node);
  54632. this.node = null;
  54633. }
  54634. function _assertUnremoved() {
  54635. if (this.removed) {
  54636. throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
  54637. }
  54638. }
  54639. }
  54640. });
  54641. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/hoister.js
  54642. var require_hoister = __commonJS({
  54643. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports) {
  54644. "use strict";
  54645. Object.defineProperty(exports, "__esModule", {
  54646. value: true
  54647. });
  54648. exports.default = void 0;
  54649. var t2 = require_lib4();
  54650. var referenceVisitor = {
  54651. ReferencedIdentifier(path, state) {
  54652. if (path.isJSXIdentifier() && t2.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
  54653. return;
  54654. }
  54655. if (path.node.name === "this") {
  54656. let scope = path.scope;
  54657. do {
  54658. if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
  54659. break;
  54660. }
  54661. } while (scope = scope.parent);
  54662. if (scope)
  54663. state.breakOnScopePaths.push(scope.path);
  54664. }
  54665. const binding = path.scope.getBinding(path.node.name);
  54666. if (!binding)
  54667. return;
  54668. for (const violation of binding.constantViolations) {
  54669. if (violation.scope !== binding.path.scope) {
  54670. state.mutableBinding = true;
  54671. path.stop();
  54672. return;
  54673. }
  54674. }
  54675. if (binding !== state.scope.getBinding(path.node.name))
  54676. return;
  54677. state.bindings[path.node.name] = binding;
  54678. }
  54679. };
  54680. var PathHoister = class {
  54681. constructor(path, scope) {
  54682. this.breakOnScopePaths = void 0;
  54683. this.bindings = void 0;
  54684. this.mutableBinding = void 0;
  54685. this.scopes = void 0;
  54686. this.scope = void 0;
  54687. this.path = void 0;
  54688. this.attachAfter = void 0;
  54689. this.breakOnScopePaths = [];
  54690. this.bindings = {};
  54691. this.mutableBinding = false;
  54692. this.scopes = [];
  54693. this.scope = scope;
  54694. this.path = path;
  54695. this.attachAfter = false;
  54696. }
  54697. isCompatibleScope(scope) {
  54698. for (const key of Object.keys(this.bindings)) {
  54699. const binding = this.bindings[key];
  54700. if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
  54701. return false;
  54702. }
  54703. }
  54704. return true;
  54705. }
  54706. getCompatibleScopes() {
  54707. let scope = this.path.scope;
  54708. do {
  54709. if (this.isCompatibleScope(scope)) {
  54710. this.scopes.push(scope);
  54711. } else {
  54712. break;
  54713. }
  54714. if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
  54715. break;
  54716. }
  54717. } while (scope = scope.parent);
  54718. }
  54719. getAttachmentPath() {
  54720. let path = this._getAttachmentPath();
  54721. if (!path)
  54722. return;
  54723. let targetScope = path.scope;
  54724. if (targetScope.path === path) {
  54725. targetScope = path.scope.parent;
  54726. }
  54727. if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
  54728. for (const name2 of Object.keys(this.bindings)) {
  54729. if (!targetScope.hasOwnBinding(name2))
  54730. continue;
  54731. const binding = this.bindings[name2];
  54732. if (binding.kind === "param" || binding.path.parentKey === "params") {
  54733. continue;
  54734. }
  54735. const bindingParentPath = this.getAttachmentParentForPath(binding.path);
  54736. if (bindingParentPath.key >= path.key) {
  54737. this.attachAfter = true;
  54738. path = binding.path;
  54739. for (const violationPath of binding.constantViolations) {
  54740. if (this.getAttachmentParentForPath(violationPath).key > path.key) {
  54741. path = violationPath;
  54742. }
  54743. }
  54744. }
  54745. }
  54746. }
  54747. return path;
  54748. }
  54749. _getAttachmentPath() {
  54750. const scopes = this.scopes;
  54751. const scope = scopes.pop();
  54752. if (!scope)
  54753. return;
  54754. if (scope.path.isFunction()) {
  54755. if (this.hasOwnParamBindings(scope)) {
  54756. if (this.scope === scope)
  54757. return;
  54758. const bodies = scope.path.get("body").get("body");
  54759. for (let i = 0; i < bodies.length; i++) {
  54760. if (bodies[i].node._blockHoist)
  54761. continue;
  54762. return bodies[i];
  54763. }
  54764. } else {
  54765. return this.getNextScopeAttachmentParent();
  54766. }
  54767. } else if (scope.path.isProgram()) {
  54768. return this.getNextScopeAttachmentParent();
  54769. }
  54770. }
  54771. getNextScopeAttachmentParent() {
  54772. const scope = this.scopes.pop();
  54773. if (scope)
  54774. return this.getAttachmentParentForPath(scope.path);
  54775. }
  54776. getAttachmentParentForPath(path) {
  54777. do {
  54778. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  54779. return path;
  54780. }
  54781. } while (path = path.parentPath);
  54782. }
  54783. hasOwnParamBindings(scope) {
  54784. for (const name2 of Object.keys(this.bindings)) {
  54785. if (!scope.hasOwnBinding(name2))
  54786. continue;
  54787. const binding = this.bindings[name2];
  54788. if (binding.kind === "param" && binding.constant)
  54789. return true;
  54790. }
  54791. return false;
  54792. }
  54793. run() {
  54794. this.path.traverse(referenceVisitor, this);
  54795. if (this.mutableBinding)
  54796. return;
  54797. this.getCompatibleScopes();
  54798. const attachTo = this.getAttachmentPath();
  54799. if (!attachTo)
  54800. return;
  54801. if (attachTo.getFunctionParent() === this.path.getFunctionParent())
  54802. return;
  54803. let uid = attachTo.scope.generateUidIdentifier("ref");
  54804. const declarator = t2.variableDeclarator(uid, this.path.node);
  54805. const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
  54806. const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t2.variableDeclaration("var", [declarator])]);
  54807. const parent = this.path.parentPath;
  54808. if (parent.isJSXElement() && this.path.container === parent.node.children) {
  54809. uid = t2.jsxExpressionContainer(uid);
  54810. }
  54811. this.path.replaceWith(t2.cloneNode(uid));
  54812. return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
  54813. }
  54814. };
  54815. exports.default = PathHoister;
  54816. }
  54817. });
  54818. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/modification.js
  54819. var require_modification = __commonJS({
  54820. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/modification.js"(exports) {
  54821. "use strict";
  54822. Object.defineProperty(exports, "__esModule", {
  54823. value: true
  54824. });
  54825. exports.insertBefore = insertBefore;
  54826. exports._containerInsert = _containerInsert;
  54827. exports._containerInsertBefore = _containerInsertBefore;
  54828. exports._containerInsertAfter = _containerInsertAfter;
  54829. exports.insertAfter = insertAfter;
  54830. exports.updateSiblingKeys = updateSiblingKeys;
  54831. exports._verifyNodeList = _verifyNodeList;
  54832. exports.unshiftContainer = unshiftContainer;
  54833. exports.pushContainer = pushContainer;
  54834. exports.hoist = hoist;
  54835. var _cache = require_cache();
  54836. var _hoister = require_hoister();
  54837. var _index = require_path();
  54838. var t2 = require_lib4();
  54839. function insertBefore(nodes_) {
  54840. this._assertUnremoved();
  54841. const nodes = this._verifyNodeList(nodes_);
  54842. const {
  54843. parentPath
  54844. } = this;
  54845. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  54846. return parentPath.insertBefore(nodes);
  54847. } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  54848. if (this.node)
  54849. nodes.push(this.node);
  54850. return this.replaceExpressionWithStatements(nodes);
  54851. } else if (Array.isArray(this.container)) {
  54852. return this._containerInsertBefore(nodes);
  54853. } else if (this.isStatementOrBlock()) {
  54854. const node = this.node;
  54855. const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  54856. this.replaceWith(t2.blockStatement(shouldInsertCurrentNode ? [node] : []));
  54857. return this.unshiftContainer("body", nodes);
  54858. } else {
  54859. 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?");
  54860. }
  54861. }
  54862. function _containerInsert(from, nodes) {
  54863. this.updateSiblingKeys(from, nodes.length);
  54864. const paths = [];
  54865. this.container.splice(from, 0, ...nodes);
  54866. for (let i = 0; i < nodes.length; i++) {
  54867. const to = from + i;
  54868. const path = this.getSibling(to);
  54869. paths.push(path);
  54870. if (this.context && this.context.queue) {
  54871. path.pushContext(this.context);
  54872. }
  54873. }
  54874. const contexts = this._getQueueContexts();
  54875. for (const path of paths) {
  54876. path.setScope();
  54877. path.debug("Inserted.");
  54878. for (const context of contexts) {
  54879. context.maybeQueue(path, true);
  54880. }
  54881. }
  54882. return paths;
  54883. }
  54884. function _containerInsertBefore(nodes) {
  54885. return this._containerInsert(this.key, nodes);
  54886. }
  54887. function _containerInsertAfter(nodes) {
  54888. return this._containerInsert(this.key + 1, nodes);
  54889. }
  54890. function insertAfter(nodes_) {
  54891. this._assertUnremoved();
  54892. const nodes = this._verifyNodeList(nodes_);
  54893. const {
  54894. parentPath
  54895. } = this;
  54896. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  54897. return parentPath.insertAfter(nodes.map((node) => {
  54898. return t2.isExpression(node) ? t2.expressionStatement(node) : node;
  54899. }));
  54900. } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  54901. if (this.node) {
  54902. const node = this.node;
  54903. let {
  54904. scope
  54905. } = this;
  54906. if (scope.path.isPattern()) {
  54907. t2.assertExpression(node);
  54908. this.replaceWith(t2.callExpression(t2.arrowFunctionExpression([], node), []));
  54909. this.get("callee.body").insertAfter(nodes);
  54910. return [this];
  54911. }
  54912. if (parentPath.isMethod({
  54913. computed: true,
  54914. key: node
  54915. })) {
  54916. scope = scope.parent;
  54917. }
  54918. const temp = scope.generateDeclaredUidIdentifier();
  54919. nodes.unshift(t2.expressionStatement(t2.assignmentExpression("=", t2.cloneNode(temp), node)));
  54920. nodes.push(t2.expressionStatement(t2.cloneNode(temp)));
  54921. }
  54922. return this.replaceExpressionWithStatements(nodes);
  54923. } else if (Array.isArray(this.container)) {
  54924. return this._containerInsertAfter(nodes);
  54925. } else if (this.isStatementOrBlock()) {
  54926. const node = this.node;
  54927. const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  54928. this.replaceWith(t2.blockStatement(shouldInsertCurrentNode ? [node] : []));
  54929. return this.pushContainer("body", nodes);
  54930. } else {
  54931. 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?");
  54932. }
  54933. }
  54934. function updateSiblingKeys(fromIndex, incrementBy) {
  54935. if (!this.parent)
  54936. return;
  54937. const paths = _cache.path.get(this.parent);
  54938. for (const [, path] of paths) {
  54939. if (path.key >= fromIndex) {
  54940. path.key += incrementBy;
  54941. }
  54942. }
  54943. }
  54944. function _verifyNodeList(nodes) {
  54945. if (!nodes) {
  54946. return [];
  54947. }
  54948. if (!Array.isArray(nodes)) {
  54949. nodes = [nodes];
  54950. }
  54951. for (let i = 0; i < nodes.length; i++) {
  54952. const node = nodes[i];
  54953. let msg;
  54954. if (!node) {
  54955. msg = "has falsy node";
  54956. } else if (typeof node !== "object") {
  54957. msg = "contains a non-object node";
  54958. } else if (!node.type) {
  54959. msg = "without a type";
  54960. } else if (node instanceof _index.default) {
  54961. msg = "has a NodePath when it expected a raw object";
  54962. }
  54963. if (msg) {
  54964. const type = Array.isArray(node) ? "array" : typeof node;
  54965. throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
  54966. }
  54967. }
  54968. return nodes;
  54969. }
  54970. function unshiftContainer(listKey, nodes) {
  54971. this._assertUnremoved();
  54972. nodes = this._verifyNodeList(nodes);
  54973. const path = _index.default.get({
  54974. parentPath: this,
  54975. parent: this.node,
  54976. container: this.node[listKey],
  54977. listKey,
  54978. key: 0
  54979. }).setContext(this.context);
  54980. return path._containerInsertBefore(nodes);
  54981. }
  54982. function pushContainer(listKey, nodes) {
  54983. this._assertUnremoved();
  54984. const verifiedNodes = this._verifyNodeList(nodes);
  54985. const container = this.node[listKey];
  54986. const path = _index.default.get({
  54987. parentPath: this,
  54988. parent: this.node,
  54989. container,
  54990. listKey,
  54991. key: container.length
  54992. }).setContext(this.context);
  54993. return path.replaceWithMultiple(verifiedNodes);
  54994. }
  54995. function hoist(scope = this.scope) {
  54996. const hoister = new _hoister.default(this, scope);
  54997. return hoister.run();
  54998. }
  54999. }
  55000. });
  55001. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/family.js
  55002. var require_family = __commonJS({
  55003. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/family.js"(exports) {
  55004. "use strict";
  55005. Object.defineProperty(exports, "__esModule", {
  55006. value: true
  55007. });
  55008. exports.getOpposite = getOpposite;
  55009. exports.getCompletionRecords = getCompletionRecords;
  55010. exports.getSibling = getSibling;
  55011. exports.getPrevSibling = getPrevSibling;
  55012. exports.getNextSibling = getNextSibling;
  55013. exports.getAllNextSiblings = getAllNextSiblings;
  55014. exports.getAllPrevSiblings = getAllPrevSiblings;
  55015. exports.get = get;
  55016. exports._getKey = _getKey;
  55017. exports._getPattern = _getPattern;
  55018. exports.getBindingIdentifiers = getBindingIdentifiers;
  55019. exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
  55020. exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
  55021. exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
  55022. var _index = require_path();
  55023. var t2 = require_lib4();
  55024. var NORMAL_COMPLETION = 0;
  55025. var BREAK_COMPLETION = 1;
  55026. function NormalCompletion(path) {
  55027. return {
  55028. type: NORMAL_COMPLETION,
  55029. path
  55030. };
  55031. }
  55032. function BreakCompletion(path) {
  55033. return {
  55034. type: BREAK_COMPLETION,
  55035. path
  55036. };
  55037. }
  55038. function getOpposite() {
  55039. if (this.key === "left") {
  55040. return this.getSibling("right");
  55041. } else if (this.key === "right") {
  55042. return this.getSibling("left");
  55043. }
  55044. return null;
  55045. }
  55046. function addCompletionRecords(path, records, context) {
  55047. if (path)
  55048. return records.concat(_getCompletionRecords(path, context));
  55049. return records;
  55050. }
  55051. function completionRecordForSwitch(cases, records, context) {
  55052. let lastNormalCompletions = [];
  55053. for (let i = 0; i < cases.length; i++) {
  55054. const casePath = cases[i];
  55055. const caseCompletions = _getCompletionRecords(casePath, context);
  55056. const normalCompletions = [];
  55057. const breakCompletions = [];
  55058. for (const c of caseCompletions) {
  55059. if (c.type === NORMAL_COMPLETION) {
  55060. normalCompletions.push(c);
  55061. }
  55062. if (c.type === BREAK_COMPLETION) {
  55063. breakCompletions.push(c);
  55064. }
  55065. }
  55066. if (normalCompletions.length) {
  55067. lastNormalCompletions = normalCompletions;
  55068. }
  55069. records = records.concat(breakCompletions);
  55070. }
  55071. records = records.concat(lastNormalCompletions);
  55072. return records;
  55073. }
  55074. function normalCompletionToBreak(completions) {
  55075. completions.forEach((c) => {
  55076. c.type = BREAK_COMPLETION;
  55077. });
  55078. }
  55079. function replaceBreakStatementInBreakCompletion(completions, reachable) {
  55080. completions.forEach((c) => {
  55081. if (c.path.isBreakStatement({
  55082. label: null
  55083. })) {
  55084. if (reachable) {
  55085. c.path.replaceWith(t2.unaryExpression("void", t2.numericLiteral(0)));
  55086. } else {
  55087. c.path.remove();
  55088. }
  55089. }
  55090. });
  55091. }
  55092. function getStatementListCompletion(paths, context) {
  55093. let completions = [];
  55094. if (context.canHaveBreak) {
  55095. let lastNormalCompletions = [];
  55096. for (let i = 0; i < paths.length; i++) {
  55097. const path = paths[i];
  55098. const newContext = Object.assign({}, context, {
  55099. inCaseClause: false
  55100. });
  55101. if (path.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
  55102. newContext.shouldPopulateBreak = true;
  55103. } else {
  55104. newContext.shouldPopulateBreak = false;
  55105. }
  55106. const statementCompletions = _getCompletionRecords(path, newContext);
  55107. if (statementCompletions.length > 0 && statementCompletions.every((c) => c.type === BREAK_COMPLETION)) {
  55108. if (lastNormalCompletions.length > 0 && statementCompletions.every((c) => c.path.isBreakStatement({
  55109. label: null
  55110. }))) {
  55111. normalCompletionToBreak(lastNormalCompletions);
  55112. completions = completions.concat(lastNormalCompletions);
  55113. if (lastNormalCompletions.some((c) => c.path.isDeclaration())) {
  55114. completions = completions.concat(statementCompletions);
  55115. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  55116. }
  55117. replaceBreakStatementInBreakCompletion(statementCompletions, false);
  55118. } else {
  55119. completions = completions.concat(statementCompletions);
  55120. if (!context.shouldPopulateBreak) {
  55121. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  55122. }
  55123. }
  55124. break;
  55125. }
  55126. if (i === paths.length - 1) {
  55127. completions = completions.concat(statementCompletions);
  55128. } else {
  55129. completions = completions.concat(statementCompletions.filter((c) => c.type === BREAK_COMPLETION));
  55130. lastNormalCompletions = statementCompletions.filter((c) => c.type === NORMAL_COMPLETION);
  55131. }
  55132. }
  55133. } else if (paths.length) {
  55134. completions = completions.concat(_getCompletionRecords(paths[paths.length - 1], context));
  55135. }
  55136. return completions;
  55137. }
  55138. function _getCompletionRecords(path, context) {
  55139. let records = [];
  55140. if (path.isIfStatement()) {
  55141. records = addCompletionRecords(path.get("consequent"), records, context);
  55142. records = addCompletionRecords(path.get("alternate"), records, context);
  55143. } else if (path.isDoExpression() || path.isFor() || path.isWhile() || path.isLabeledStatement()) {
  55144. records = addCompletionRecords(path.get("body"), records, context);
  55145. } else if (path.isProgram() || path.isBlockStatement()) {
  55146. records = records.concat(getStatementListCompletion(path.get("body"), context));
  55147. } else if (path.isFunction()) {
  55148. return _getCompletionRecords(path.get("body"), context);
  55149. } else if (path.isTryStatement()) {
  55150. records = addCompletionRecords(path.get("block"), records, context);
  55151. records = addCompletionRecords(path.get("handler"), records, context);
  55152. } else if (path.isCatchClause()) {
  55153. records = addCompletionRecords(path.get("body"), records, context);
  55154. } else if (path.isSwitchStatement()) {
  55155. records = completionRecordForSwitch(path.get("cases"), records, context);
  55156. } else if (path.isSwitchCase()) {
  55157. records = records.concat(getStatementListCompletion(path.get("consequent"), {
  55158. canHaveBreak: true,
  55159. shouldPopulateBreak: false,
  55160. inCaseClause: true
  55161. }));
  55162. } else if (path.isBreakStatement()) {
  55163. records.push(BreakCompletion(path));
  55164. } else {
  55165. records.push(NormalCompletion(path));
  55166. }
  55167. return records;
  55168. }
  55169. function getCompletionRecords() {
  55170. const records = _getCompletionRecords(this, {
  55171. canHaveBreak: false,
  55172. shouldPopulateBreak: false,
  55173. inCaseClause: false
  55174. });
  55175. return records.map((r) => r.path);
  55176. }
  55177. function getSibling(key) {
  55178. return _index.default.get({
  55179. parentPath: this.parentPath,
  55180. parent: this.parent,
  55181. container: this.container,
  55182. listKey: this.listKey,
  55183. key
  55184. }).setContext(this.context);
  55185. }
  55186. function getPrevSibling() {
  55187. return this.getSibling(this.key - 1);
  55188. }
  55189. function getNextSibling() {
  55190. return this.getSibling(this.key + 1);
  55191. }
  55192. function getAllNextSiblings() {
  55193. let _key = this.key;
  55194. let sibling = this.getSibling(++_key);
  55195. const siblings = [];
  55196. while (sibling.node) {
  55197. siblings.push(sibling);
  55198. sibling = this.getSibling(++_key);
  55199. }
  55200. return siblings;
  55201. }
  55202. function getAllPrevSiblings() {
  55203. let _key = this.key;
  55204. let sibling = this.getSibling(--_key);
  55205. const siblings = [];
  55206. while (sibling.node) {
  55207. siblings.push(sibling);
  55208. sibling = this.getSibling(--_key);
  55209. }
  55210. return siblings;
  55211. }
  55212. function get(key, context = true) {
  55213. if (context === true)
  55214. context = this.context;
  55215. const parts = key.split(".");
  55216. if (parts.length === 1) {
  55217. return this._getKey(key, context);
  55218. } else {
  55219. return this._getPattern(parts, context);
  55220. }
  55221. }
  55222. function _getKey(key, context) {
  55223. const node = this.node;
  55224. const container = node[key];
  55225. if (Array.isArray(container)) {
  55226. return container.map((_, i) => {
  55227. return _index.default.get({
  55228. listKey: key,
  55229. parentPath: this,
  55230. parent: node,
  55231. container,
  55232. key: i
  55233. }).setContext(context);
  55234. });
  55235. } else {
  55236. return _index.default.get({
  55237. parentPath: this,
  55238. parent: node,
  55239. container: node,
  55240. key
  55241. }).setContext(context);
  55242. }
  55243. }
  55244. function _getPattern(parts, context) {
  55245. let path = this;
  55246. for (const part of parts) {
  55247. if (part === ".") {
  55248. path = path.parentPath;
  55249. } else {
  55250. if (Array.isArray(path)) {
  55251. path = path[part];
  55252. } else {
  55253. path = path.get(part, context);
  55254. }
  55255. }
  55256. }
  55257. return path;
  55258. }
  55259. function getBindingIdentifiers(duplicates) {
  55260. return t2.getBindingIdentifiers(this.node, duplicates);
  55261. }
  55262. function getOuterBindingIdentifiers(duplicates) {
  55263. return t2.getOuterBindingIdentifiers(this.node, duplicates);
  55264. }
  55265. function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
  55266. const path = this;
  55267. let search2 = [].concat(path);
  55268. const ids = /* @__PURE__ */ Object.create(null);
  55269. while (search2.length) {
  55270. const id = search2.shift();
  55271. if (!id)
  55272. continue;
  55273. if (!id.node)
  55274. continue;
  55275. const keys2 = t2.getBindingIdentifiers.keys[id.node.type];
  55276. if (id.isIdentifier()) {
  55277. if (duplicates) {
  55278. const _ids = ids[id.node.name] = ids[id.node.name] || [];
  55279. _ids.push(id);
  55280. } else {
  55281. ids[id.node.name] = id;
  55282. }
  55283. continue;
  55284. }
  55285. if (id.isExportDeclaration()) {
  55286. const declaration = id.get("declaration");
  55287. if (declaration.isDeclaration()) {
  55288. search2.push(declaration);
  55289. }
  55290. continue;
  55291. }
  55292. if (outerOnly) {
  55293. if (id.isFunctionDeclaration()) {
  55294. search2.push(id.get("id"));
  55295. continue;
  55296. }
  55297. if (id.isFunctionExpression()) {
  55298. continue;
  55299. }
  55300. }
  55301. if (keys2) {
  55302. for (let i = 0; i < keys2.length; i++) {
  55303. const key = keys2[i];
  55304. const child = id.get(key);
  55305. if (Array.isArray(child) || child.node) {
  55306. search2 = search2.concat(child);
  55307. }
  55308. }
  55309. }
  55310. }
  55311. return ids;
  55312. }
  55313. function getOuterBindingIdentifierPaths(duplicates) {
  55314. return this.getBindingIdentifierPaths(duplicates, true);
  55315. }
  55316. }
  55317. });
  55318. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/comments.js
  55319. var require_comments = __commonJS({
  55320. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/comments.js"(exports) {
  55321. "use strict";
  55322. Object.defineProperty(exports, "__esModule", {
  55323. value: true
  55324. });
  55325. exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
  55326. exports.addComment = addComment;
  55327. exports.addComments = addComments;
  55328. var t2 = require_lib4();
  55329. function shareCommentsWithSiblings() {
  55330. if (typeof this.key === "string")
  55331. return;
  55332. const node = this.node;
  55333. if (!node)
  55334. return;
  55335. const trailing = node.trailingComments;
  55336. const leading = node.leadingComments;
  55337. if (!trailing && !leading)
  55338. return;
  55339. const prev = this.getSibling(this.key - 1);
  55340. const next = this.getSibling(this.key + 1);
  55341. const hasPrev = Boolean(prev.node);
  55342. const hasNext = Boolean(next.node);
  55343. if (hasPrev && !hasNext) {
  55344. prev.addComments("trailing", trailing);
  55345. } else if (hasNext && !hasPrev) {
  55346. next.addComments("leading", leading);
  55347. }
  55348. }
  55349. function addComment(type, content3, line) {
  55350. t2.addComment(this.node, type, content3, line);
  55351. }
  55352. function addComments(type, comments) {
  55353. t2.addComments(this.node, type, comments);
  55354. }
  55355. }
  55356. });
  55357. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/index.js
  55358. var require_path = __commonJS({
  55359. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/path/index.js"(exports) {
  55360. "use strict";
  55361. Object.defineProperty(exports, "__esModule", {
  55362. value: true
  55363. });
  55364. exports.default = exports.SHOULD_SKIP = exports.SHOULD_STOP = exports.REMOVED = void 0;
  55365. var virtualTypes = require_virtual_types();
  55366. var _debug = require_src();
  55367. var _index = require_lib14();
  55368. var _scope = require_scope();
  55369. var t2 = require_lib4();
  55370. var _cache = require_cache();
  55371. var _generator = require_lib6();
  55372. var NodePath_ancestry = require_ancestry();
  55373. var NodePath_inference = require_inference();
  55374. var NodePath_replacement = require_replacement();
  55375. var NodePath_evaluation = require_evaluation();
  55376. var NodePath_conversion = require_conversion();
  55377. var NodePath_introspection = require_introspection();
  55378. var NodePath_context = require_context();
  55379. var NodePath_removal = require_removal();
  55380. var NodePath_modification = require_modification();
  55381. var NodePath_family = require_family();
  55382. var NodePath_comments = require_comments();
  55383. var debug = _debug("babel");
  55384. var REMOVED = 1 << 0;
  55385. exports.REMOVED = REMOVED;
  55386. var SHOULD_STOP = 1 << 1;
  55387. exports.SHOULD_STOP = SHOULD_STOP;
  55388. var SHOULD_SKIP = 1 << 2;
  55389. exports.SHOULD_SKIP = SHOULD_SKIP;
  55390. var NodePath = class {
  55391. constructor(hub, parent) {
  55392. this.contexts = [];
  55393. this.state = null;
  55394. this.opts = null;
  55395. this._traverseFlags = 0;
  55396. this.skipKeys = null;
  55397. this.parentPath = null;
  55398. this.container = null;
  55399. this.listKey = null;
  55400. this.key = null;
  55401. this.node = null;
  55402. this.type = null;
  55403. this.parent = parent;
  55404. this.hub = hub;
  55405. this.data = null;
  55406. this.context = null;
  55407. this.scope = null;
  55408. }
  55409. static get({
  55410. hub,
  55411. parentPath,
  55412. parent,
  55413. container,
  55414. listKey,
  55415. key
  55416. }) {
  55417. if (!hub && parentPath) {
  55418. hub = parentPath.hub;
  55419. }
  55420. if (!parent) {
  55421. throw new Error("To get a node path the parent needs to exist");
  55422. }
  55423. const targetNode = container[key];
  55424. let paths = _cache.path.get(parent);
  55425. if (!paths) {
  55426. paths = /* @__PURE__ */ new Map();
  55427. _cache.path.set(parent, paths);
  55428. }
  55429. let path = paths.get(targetNode);
  55430. if (!path) {
  55431. path = new NodePath(hub, parent);
  55432. if (targetNode)
  55433. paths.set(targetNode, path);
  55434. }
  55435. path.setup(parentPath, container, listKey, key);
  55436. return path;
  55437. }
  55438. getScope(scope) {
  55439. return this.isScope() ? new _scope.default(this) : scope;
  55440. }
  55441. setData(key, val) {
  55442. if (this.data == null) {
  55443. this.data = /* @__PURE__ */ Object.create(null);
  55444. }
  55445. return this.data[key] = val;
  55446. }
  55447. getData(key, def) {
  55448. if (this.data == null) {
  55449. this.data = /* @__PURE__ */ Object.create(null);
  55450. }
  55451. let val = this.data[key];
  55452. if (val === void 0 && def !== void 0)
  55453. val = this.data[key] = def;
  55454. return val;
  55455. }
  55456. buildCodeFrameError(msg, Error2 = SyntaxError) {
  55457. return this.hub.buildError(this.node, msg, Error2);
  55458. }
  55459. traverse(visitor, state) {
  55460. (0, _index.default)(this.node, visitor, this.scope, state, this);
  55461. }
  55462. set(key, node) {
  55463. t2.validate(this.node, key, node);
  55464. this.node[key] = node;
  55465. }
  55466. getPathLocation() {
  55467. const parts = [];
  55468. let path = this;
  55469. do {
  55470. let key = path.key;
  55471. if (path.inList)
  55472. key = `${path.listKey}[${key}]`;
  55473. parts.unshift(key);
  55474. } while (path = path.parentPath);
  55475. return parts.join(".");
  55476. }
  55477. debug(message) {
  55478. if (!debug.enabled)
  55479. return;
  55480. debug(`${this.getPathLocation()} ${this.type}: ${message}`);
  55481. }
  55482. toString() {
  55483. return (0, _generator.default)(this.node).code;
  55484. }
  55485. get inList() {
  55486. return !!this.listKey;
  55487. }
  55488. set inList(inList) {
  55489. if (!inList) {
  55490. this.listKey = null;
  55491. }
  55492. }
  55493. get parentKey() {
  55494. return this.listKey || this.key;
  55495. }
  55496. get shouldSkip() {
  55497. return !!(this._traverseFlags & SHOULD_SKIP);
  55498. }
  55499. set shouldSkip(v) {
  55500. if (v) {
  55501. this._traverseFlags |= SHOULD_SKIP;
  55502. } else {
  55503. this._traverseFlags &= ~SHOULD_SKIP;
  55504. }
  55505. }
  55506. get shouldStop() {
  55507. return !!(this._traverseFlags & SHOULD_STOP);
  55508. }
  55509. set shouldStop(v) {
  55510. if (v) {
  55511. this._traverseFlags |= SHOULD_STOP;
  55512. } else {
  55513. this._traverseFlags &= ~SHOULD_STOP;
  55514. }
  55515. }
  55516. get removed() {
  55517. return !!(this._traverseFlags & REMOVED);
  55518. }
  55519. set removed(v) {
  55520. if (v) {
  55521. this._traverseFlags |= REMOVED;
  55522. } else {
  55523. this._traverseFlags &= ~REMOVED;
  55524. }
  55525. }
  55526. };
  55527. 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);
  55528. for (const type of t2.TYPES) {
  55529. const typeKey = `is${type}`;
  55530. const fn = t2[typeKey];
  55531. NodePath.prototype[typeKey] = function(opts) {
  55532. return fn(this.node, opts);
  55533. };
  55534. NodePath.prototype[`assert${type}`] = function(opts) {
  55535. if (!fn(this.node, opts)) {
  55536. throw new TypeError(`Expected node path of type ${type}`);
  55537. }
  55538. };
  55539. }
  55540. for (const type of Object.keys(virtualTypes)) {
  55541. if (type[0] === "_")
  55542. continue;
  55543. if (t2.TYPES.indexOf(type) < 0)
  55544. t2.TYPES.push(type);
  55545. const virtualType = virtualTypes[type];
  55546. NodePath.prototype[`is${type}`] = function(opts) {
  55547. return virtualType.checkPath(this, opts);
  55548. };
  55549. }
  55550. var _default = NodePath;
  55551. exports.default = _default;
  55552. }
  55553. });
  55554. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/context.js
  55555. var require_context2 = __commonJS({
  55556. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/context.js"(exports) {
  55557. "use strict";
  55558. Object.defineProperty(exports, "__esModule", {
  55559. value: true
  55560. });
  55561. exports.default = void 0;
  55562. var _path = require_path();
  55563. var t2 = require_lib4();
  55564. var testing = process.env.NODE_ENV === "test";
  55565. var TraversalContext = class {
  55566. constructor(scope, opts, state, parentPath) {
  55567. this.queue = null;
  55568. this.priorityQueue = null;
  55569. this.parentPath = parentPath;
  55570. this.scope = scope;
  55571. this.state = state;
  55572. this.opts = opts;
  55573. }
  55574. shouldVisit(node) {
  55575. const opts = this.opts;
  55576. if (opts.enter || opts.exit)
  55577. return true;
  55578. if (opts[node.type])
  55579. return true;
  55580. const keys2 = t2.VISITOR_KEYS[node.type];
  55581. if (!(keys2 != null && keys2.length))
  55582. return false;
  55583. for (const key of keys2) {
  55584. if (node[key])
  55585. return true;
  55586. }
  55587. return false;
  55588. }
  55589. create(node, obj, key, listKey) {
  55590. return _path.default.get({
  55591. parentPath: this.parentPath,
  55592. parent: node,
  55593. container: obj,
  55594. key,
  55595. listKey
  55596. });
  55597. }
  55598. maybeQueue(path, notPriority) {
  55599. if (this.trap) {
  55600. throw new Error("Infinite cycle detected");
  55601. }
  55602. if (this.queue) {
  55603. if (notPriority) {
  55604. this.queue.push(path);
  55605. } else {
  55606. this.priorityQueue.push(path);
  55607. }
  55608. }
  55609. }
  55610. visitMultiple(container, parent, listKey) {
  55611. if (container.length === 0)
  55612. return false;
  55613. const queue = [];
  55614. for (let key = 0; key < container.length; key++) {
  55615. const node = container[key];
  55616. if (node && this.shouldVisit(node)) {
  55617. queue.push(this.create(parent, container, key, listKey));
  55618. }
  55619. }
  55620. return this.visitQueue(queue);
  55621. }
  55622. visitSingle(node, key) {
  55623. if (this.shouldVisit(node[key])) {
  55624. return this.visitQueue([this.create(node, node, key)]);
  55625. } else {
  55626. return false;
  55627. }
  55628. }
  55629. visitQueue(queue) {
  55630. this.queue = queue;
  55631. this.priorityQueue = [];
  55632. const visited = /* @__PURE__ */ new WeakSet();
  55633. let stop = false;
  55634. for (const path of queue) {
  55635. path.resync();
  55636. if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
  55637. path.pushContext(this);
  55638. }
  55639. if (path.key === null)
  55640. continue;
  55641. if (testing && queue.length >= 1e4) {
  55642. this.trap = true;
  55643. }
  55644. const {
  55645. node
  55646. } = path;
  55647. if (visited.has(node))
  55648. continue;
  55649. if (node)
  55650. visited.add(node);
  55651. if (path.visit()) {
  55652. stop = true;
  55653. break;
  55654. }
  55655. if (this.priorityQueue.length) {
  55656. stop = this.visitQueue(this.priorityQueue);
  55657. this.priorityQueue = [];
  55658. this.queue = queue;
  55659. if (stop)
  55660. break;
  55661. }
  55662. }
  55663. for (const path of queue) {
  55664. path.popContext();
  55665. }
  55666. this.queue = null;
  55667. return stop;
  55668. }
  55669. visit(node, key) {
  55670. const nodes = node[key];
  55671. if (!nodes)
  55672. return false;
  55673. if (Array.isArray(nodes)) {
  55674. return this.visitMultiple(nodes, node, key);
  55675. } else {
  55676. return this.visitSingle(node, key);
  55677. }
  55678. }
  55679. };
  55680. exports.default = TraversalContext;
  55681. }
  55682. });
  55683. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/visitors.js
  55684. var require_visitors = __commonJS({
  55685. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/visitors.js"(exports) {
  55686. "use strict";
  55687. Object.defineProperty(exports, "__esModule", {
  55688. value: true
  55689. });
  55690. exports.explode = explode;
  55691. exports.verify = verify;
  55692. exports.merge = merge2;
  55693. var virtualTypes = require_virtual_types();
  55694. var t2 = require_lib4();
  55695. function explode(visitor) {
  55696. if (visitor._exploded)
  55697. return visitor;
  55698. visitor._exploded = true;
  55699. for (const nodeType of Object.keys(visitor)) {
  55700. if (shouldIgnoreKey(nodeType))
  55701. continue;
  55702. const parts = nodeType.split("|");
  55703. if (parts.length === 1)
  55704. continue;
  55705. const fns = visitor[nodeType];
  55706. delete visitor[nodeType];
  55707. for (const part of parts) {
  55708. visitor[part] = fns;
  55709. }
  55710. }
  55711. verify(visitor);
  55712. delete visitor.__esModule;
  55713. ensureEntranceObjects(visitor);
  55714. ensureCallbackArrays(visitor);
  55715. for (const nodeType of Object.keys(visitor)) {
  55716. if (shouldIgnoreKey(nodeType))
  55717. continue;
  55718. const wrapper = virtualTypes[nodeType];
  55719. if (!wrapper)
  55720. continue;
  55721. const fns = visitor[nodeType];
  55722. for (const type of Object.keys(fns)) {
  55723. fns[type] = wrapCheck(wrapper, fns[type]);
  55724. }
  55725. delete visitor[nodeType];
  55726. if (wrapper.types) {
  55727. for (const type of wrapper.types) {
  55728. if (visitor[type]) {
  55729. mergePair(visitor[type], fns);
  55730. } else {
  55731. visitor[type] = fns;
  55732. }
  55733. }
  55734. } else {
  55735. mergePair(visitor, fns);
  55736. }
  55737. }
  55738. for (const nodeType of Object.keys(visitor)) {
  55739. if (shouldIgnoreKey(nodeType))
  55740. continue;
  55741. const fns = visitor[nodeType];
  55742. let aliases = t2.FLIPPED_ALIAS_KEYS[nodeType];
  55743. const deprecatedKey = t2.DEPRECATED_KEYS[nodeType];
  55744. if (deprecatedKey) {
  55745. console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecatedKey}`);
  55746. aliases = [deprecatedKey];
  55747. }
  55748. if (!aliases)
  55749. continue;
  55750. delete visitor[nodeType];
  55751. for (const alias of aliases) {
  55752. const existing = visitor[alias];
  55753. if (existing) {
  55754. mergePair(existing, fns);
  55755. } else {
  55756. visitor[alias] = Object.assign({}, fns);
  55757. }
  55758. }
  55759. }
  55760. for (const nodeType of Object.keys(visitor)) {
  55761. if (shouldIgnoreKey(nodeType))
  55762. continue;
  55763. ensureCallbackArrays(visitor[nodeType]);
  55764. }
  55765. return visitor;
  55766. }
  55767. function verify(visitor) {
  55768. if (visitor._verified)
  55769. return;
  55770. if (typeof visitor === "function") {
  55771. throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");
  55772. }
  55773. for (const nodeType of Object.keys(visitor)) {
  55774. if (nodeType === "enter" || nodeType === "exit") {
  55775. validateVisitorMethods(nodeType, visitor[nodeType]);
  55776. }
  55777. if (shouldIgnoreKey(nodeType))
  55778. continue;
  55779. if (t2.TYPES.indexOf(nodeType) < 0) {
  55780. throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`);
  55781. }
  55782. const visitors = visitor[nodeType];
  55783. if (typeof visitors === "object") {
  55784. for (const visitorKey of Object.keys(visitors)) {
  55785. if (visitorKey === "enter" || visitorKey === "exit") {
  55786. validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
  55787. } else {
  55788. throw new Error(`You passed \`traverse()\` a visitor object with the property ${nodeType} that has the invalid property ${visitorKey}`);
  55789. }
  55790. }
  55791. }
  55792. }
  55793. visitor._verified = true;
  55794. }
  55795. function validateVisitorMethods(path, val) {
  55796. const fns = [].concat(val);
  55797. for (const fn of fns) {
  55798. if (typeof fn !== "function") {
  55799. throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
  55800. }
  55801. }
  55802. }
  55803. function merge2(visitors, states = [], wrapper) {
  55804. const rootVisitor = {};
  55805. for (let i = 0; i < visitors.length; i++) {
  55806. const visitor = visitors[i];
  55807. const state = states[i];
  55808. explode(visitor);
  55809. for (const type of Object.keys(visitor)) {
  55810. let visitorType = visitor[type];
  55811. if (state || wrapper) {
  55812. visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
  55813. }
  55814. const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
  55815. mergePair(nodeVisitor, visitorType);
  55816. }
  55817. }
  55818. return rootVisitor;
  55819. }
  55820. function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
  55821. const newVisitor = {};
  55822. for (const key of Object.keys(oldVisitor)) {
  55823. let fns = oldVisitor[key];
  55824. if (!Array.isArray(fns))
  55825. continue;
  55826. fns = fns.map(function(fn) {
  55827. let newFn = fn;
  55828. if (state) {
  55829. newFn = function(path) {
  55830. return fn.call(state, path, state);
  55831. };
  55832. }
  55833. if (wrapper) {
  55834. newFn = wrapper(state.key, key, newFn);
  55835. }
  55836. if (newFn !== fn) {
  55837. newFn.toString = () => fn.toString();
  55838. }
  55839. return newFn;
  55840. });
  55841. newVisitor[key] = fns;
  55842. }
  55843. return newVisitor;
  55844. }
  55845. function ensureEntranceObjects(obj) {
  55846. for (const key of Object.keys(obj)) {
  55847. if (shouldIgnoreKey(key))
  55848. continue;
  55849. const fns = obj[key];
  55850. if (typeof fns === "function") {
  55851. obj[key] = {
  55852. enter: fns
  55853. };
  55854. }
  55855. }
  55856. }
  55857. function ensureCallbackArrays(obj) {
  55858. if (obj.enter && !Array.isArray(obj.enter))
  55859. obj.enter = [obj.enter];
  55860. if (obj.exit && !Array.isArray(obj.exit))
  55861. obj.exit = [obj.exit];
  55862. }
  55863. function wrapCheck(wrapper, fn) {
  55864. const newFn = function(path) {
  55865. if (wrapper.checkPath(path)) {
  55866. return fn.apply(this, arguments);
  55867. }
  55868. };
  55869. newFn.toString = () => fn.toString();
  55870. return newFn;
  55871. }
  55872. function shouldIgnoreKey(key) {
  55873. if (key[0] === "_")
  55874. return true;
  55875. if (key === "enter" || key === "exit" || key === "shouldSkip")
  55876. return true;
  55877. if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") {
  55878. return true;
  55879. }
  55880. return false;
  55881. }
  55882. function mergePair(dest, src) {
  55883. for (const key of Object.keys(src)) {
  55884. dest[key] = [].concat(dest[key] || [], src[key]);
  55885. }
  55886. }
  55887. }
  55888. });
  55889. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/hub.js
  55890. var require_hub = __commonJS({
  55891. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/hub.js"(exports) {
  55892. "use strict";
  55893. Object.defineProperty(exports, "__esModule", {
  55894. value: true
  55895. });
  55896. exports.default = void 0;
  55897. var Hub = class {
  55898. getCode() {
  55899. }
  55900. getScope() {
  55901. }
  55902. addHelper() {
  55903. throw new Error("Helpers are not supported by the default hub.");
  55904. }
  55905. buildError(node, msg, Error2 = TypeError) {
  55906. return new Error2(msg);
  55907. }
  55908. };
  55909. exports.default = Hub;
  55910. }
  55911. });
  55912. // node_modules/estree-to-babel/node_modules/@babel/traverse/lib/index.js
  55913. var require_lib14 = __commonJS({
  55914. "node_modules/estree-to-babel/node_modules/@babel/traverse/lib/index.js"(exports) {
  55915. "use strict";
  55916. Object.defineProperty(exports, "__esModule", {
  55917. value: true
  55918. });
  55919. Object.defineProperty(exports, "NodePath", {
  55920. enumerable: true,
  55921. get: function() {
  55922. return _path.default;
  55923. }
  55924. });
  55925. Object.defineProperty(exports, "Scope", {
  55926. enumerable: true,
  55927. get: function() {
  55928. return _scope.default;
  55929. }
  55930. });
  55931. Object.defineProperty(exports, "Hub", {
  55932. enumerable: true,
  55933. get: function() {
  55934. return _hub.default;
  55935. }
  55936. });
  55937. exports.visitors = exports.default = void 0;
  55938. var _context = require_context2();
  55939. var visitors = require_visitors();
  55940. exports.visitors = visitors;
  55941. var t2 = require_lib4();
  55942. var cache = require_cache();
  55943. var _path = require_path();
  55944. var _scope = require_scope();
  55945. var _hub = require_hub();
  55946. function traverse(parent, opts = {}, scope, state, parentPath) {
  55947. if (!parent)
  55948. return;
  55949. if (!opts.noScope && !scope) {
  55950. if (parent.type !== "Program" && parent.type !== "File") {
  55951. 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.`);
  55952. }
  55953. }
  55954. if (!t2.VISITOR_KEYS[parent.type]) {
  55955. return;
  55956. }
  55957. visitors.explode(opts);
  55958. traverse.node(parent, opts, scope, state, parentPath);
  55959. }
  55960. var _default = traverse;
  55961. exports.default = _default;
  55962. traverse.visitors = visitors;
  55963. traverse.verify = visitors.verify;
  55964. traverse.explode = visitors.explode;
  55965. traverse.cheap = function(node, enter) {
  55966. return t2.traverseFast(node, enter);
  55967. };
  55968. traverse.node = function(node, opts, scope, state, parentPath, skipKeys) {
  55969. const keys2 = t2.VISITOR_KEYS[node.type];
  55970. if (!keys2)
  55971. return;
  55972. const context = new _context.default(scope, opts, state, parentPath);
  55973. for (const key of keys2) {
  55974. if (skipKeys && skipKeys[key])
  55975. continue;
  55976. if (context.visit(node, key))
  55977. return;
  55978. }
  55979. };
  55980. traverse.clearNode = function(node, opts) {
  55981. t2.removeProperties(node, opts);
  55982. cache.path.delete(node);
  55983. };
  55984. traverse.removeProperties = function(tree, opts) {
  55985. t2.traverseFast(tree, traverse.clearNode, opts);
  55986. return tree;
  55987. };
  55988. function hasDenylistedType(path, state) {
  55989. if (path.node.type === state.type) {
  55990. state.has = true;
  55991. path.stop();
  55992. }
  55993. }
  55994. traverse.hasType = function(tree, type, denylistTypes) {
  55995. if (denylistTypes != null && denylistTypes.includes(tree.type))
  55996. return false;
  55997. if (tree.type === type)
  55998. return true;
  55999. const state = {
  56000. has: false,
  56001. type
  56002. };
  56003. traverse(tree, {
  56004. noScope: true,
  56005. denylist: denylistTypes,
  56006. enter: hasDenylistedType
  56007. }, null, state);
  56008. return state.has;
  56009. };
  56010. traverse.cache = cache;
  56011. }
  56012. });
  56013. // node_modules/estree-to-babel/lib/traverse-object-expression.js
  56014. var require_traverse_object_expression = __commonJS({
  56015. "node_modules/estree-to-babel/lib/traverse-object-expression.js"(exports, module2) {
  56016. "use strict";
  56017. var { assign } = Object;
  56018. var {
  56019. isFunctionExpression,
  56020. ObjectMethod
  56021. } = require_lib4();
  56022. module2.exports = (propertiesPaths) => {
  56023. for (const propPath of propertiesPaths) {
  56024. const {
  56025. computed,
  56026. key,
  56027. value
  56028. } = propPath.node;
  56029. if (isFunctionExpression(value)) {
  56030. propPath.replaceWith(ObjectMethod("method", key, value.params, value.body, computed));
  56031. assign(propPath.node, {
  56032. id: null,
  56033. method: true,
  56034. generator: value.generator,
  56035. loc: getObjectMethodLoc(key, value),
  56036. async: value.async,
  56037. type: "ObjectMethod"
  56038. });
  56039. }
  56040. }
  56041. };
  56042. function getObjectMethodLoc(key, value) {
  56043. return {
  56044. start: key.loc.start,
  56045. end: value.loc.end
  56046. };
  56047. }
  56048. }
  56049. });
  56050. // node_modules/estree-to-babel/lib/set-class-method.js
  56051. var require_set_class_method = __commonJS({
  56052. "node_modules/estree-to-babel/lib/set-class-method.js"(exports, module2) {
  56053. "use strict";
  56054. var {
  56055. isPrivateName,
  56056. classPrivateMethod,
  56057. classMethod
  56058. } = require_lib4();
  56059. var { assign } = Object;
  56060. module2.exports = (path) => {
  56061. const { node } = path;
  56062. const {
  56063. key,
  56064. kind,
  56065. computed,
  56066. loc
  56067. } = node;
  56068. const {
  56069. body,
  56070. params,
  56071. expression,
  56072. generator
  56073. } = node.value;
  56074. const method = getClassMethod({
  56075. kind,
  56076. key,
  56077. params,
  56078. body,
  56079. computed,
  56080. nodeStatic: node.static
  56081. });
  56082. path.replaceWith(method);
  56083. assign(path.node, {
  56084. loc,
  56085. expression,
  56086. generator
  56087. });
  56088. };
  56089. function getClassMethod({ kind, key, params, body, computed, nodeStatic }) {
  56090. if (isPrivateName(key))
  56091. return classPrivateMethod(
  56092. kind,
  56093. key,
  56094. params,
  56095. body,
  56096. computed
  56097. );
  56098. return classMethod(
  56099. kind,
  56100. key,
  56101. params,
  56102. body,
  56103. computed,
  56104. nodeStatic
  56105. );
  56106. }
  56107. }
  56108. });
  56109. // node_modules/estree-to-babel/lib/set-class-private-property.js
  56110. var require_set_class_private_property = __commonJS({
  56111. "node_modules/estree-to-babel/lib/set-class-private-property.js"(exports, module2) {
  56112. "use strict";
  56113. module2.exports = (path) => {
  56114. path.node.type = "ClassPrivateProperty";
  56115. };
  56116. }
  56117. });
  56118. // node_modules/estree-to-babel/lib/set-class-private-name.js
  56119. var require_set_class_private_name = __commonJS({
  56120. "node_modules/estree-to-babel/lib/set-class-private-name.js"(exports, module2) {
  56121. "use strict";
  56122. var { Identifier } = require_lib4();
  56123. module2.exports = (path) => {
  56124. const { node } = path;
  56125. if (!node.name)
  56126. return;
  56127. node.id = Identifier(node.name);
  56128. delete node.name;
  56129. };
  56130. }
  56131. });
  56132. // node_modules/estree-to-babel/lib/set-literal.js
  56133. var require_set_literal = __commonJS({
  56134. "node_modules/estree-to-babel/lib/set-literal.js"(exports, module2) {
  56135. "use strict";
  56136. var isString = (a) => typeof a === "string";
  56137. var isNumber = (a) => typeof a === "number";
  56138. var isNull = (a) => a === null;
  56139. var isBool = (a) => typeof a === "boolean";
  56140. module2.exports = (node) => {
  56141. const { type, value } = node;
  56142. if (type !== "Literal")
  56143. return;
  56144. if (isNull(value)) {
  56145. node.type = "NullLiteral";
  56146. return;
  56147. }
  56148. if (isString(value)) {
  56149. node.type = "StringLiteral";
  56150. return;
  56151. }
  56152. if (isNumber(value)) {
  56153. node.type = "NumericLiteral";
  56154. return;
  56155. }
  56156. if (isBool(value)) {
  56157. node.type = "BooleanLiteral";
  56158. return;
  56159. }
  56160. if (node.regex) {
  56161. transformRegExp(node);
  56162. return;
  56163. }
  56164. };
  56165. function transformRegExp(node) {
  56166. node.type = "RegExpLiteral";
  56167. for (const key of Object.keys(node.regex)) {
  56168. node[key] = node.regex[key];
  56169. }
  56170. delete node.regex;
  56171. }
  56172. }
  56173. });
  56174. // node_modules/estree-to-babel/lib/convert-import-to-call.js
  56175. var require_convert_import_to_call = __commonJS({
  56176. "node_modules/estree-to-babel/lib/convert-import-to-call.js"(exports, module2) {
  56177. "use strict";
  56178. var {
  56179. CallExpression,
  56180. Identifier
  56181. } = require_lib4();
  56182. var setLiteral = require_set_literal();
  56183. module2.exports = (path) => {
  56184. const { source } = path.node;
  56185. setLiteral(source);
  56186. const callNode = CallExpression(Identifier("import"), [
  56187. source
  56188. ]);
  56189. path.replaceWith(callNode);
  56190. };
  56191. }
  56192. });
  56193. // node_modules/estree-to-babel/lib/convert-chain-expression.js
  56194. var require_convert_chain_expression = __commonJS({
  56195. "node_modules/estree-to-babel/lib/convert-chain-expression.js"(exports, module2) {
  56196. "use strict";
  56197. module2.exports = (path) => {
  56198. const expressionPath = path.get("expression");
  56199. const { expression } = path.node;
  56200. if (expressionPath.isCallExpression())
  56201. expression.stype = "OptionalCallExpression";
  56202. else
  56203. expression.type = "OptionalMemberExpression";
  56204. path.replaceWith(expression);
  56205. };
  56206. }
  56207. });
  56208. // node_modules/estree-to-babel/lib/convert-import-declaration.js
  56209. var require_convert_import_declaration = __commonJS({
  56210. "node_modules/estree-to-babel/lib/convert-import-declaration.js"(exports, module2) {
  56211. "use strict";
  56212. module2.exports = (path) => {
  56213. const { assertions = [] } = path.node;
  56214. path.node.assertions = assertions;
  56215. };
  56216. }
  56217. });
  56218. // node_modules/estree-to-babel/lib/convert-export-declaration.js
  56219. var require_convert_export_declaration = __commonJS({
  56220. "node_modules/estree-to-babel/lib/convert-export-declaration.js"(exports, module2) {
  56221. "use strict";
  56222. var { assign } = Object;
  56223. module2.exports = (path) => {
  56224. const { assertions = [] } = path.node;
  56225. assign(path.node, {
  56226. assertions
  56227. });
  56228. };
  56229. }
  56230. });
  56231. // node_modules/estree-to-babel/lib/ts.js
  56232. var require_ts = __commonJS({
  56233. "node_modules/estree-to-babel/lib/ts.js"(exports, module2) {
  56234. "use strict";
  56235. module2.exports.convertTSClassImplements = (path) => {
  56236. path.node.type = "TSExpressionWithTypeArguments";
  56237. };
  56238. module2.exports.convertPropertyDefinition = (path) => {
  56239. const { node } = path;
  56240. if (node.key.type === "PrivateIdentifier") {
  56241. const { key } = node;
  56242. node.type = "ClassPrivateProperty";
  56243. node.key = createPrivateName(key);
  56244. return;
  56245. }
  56246. path.node.type = "ClassProperty";
  56247. };
  56248. module2.exports.convertTSInterfaceHeritage = (path) => {
  56249. path.node.type = "TSExpressionWithTypeArguments";
  56250. let { expression } = path.node;
  56251. while (expression.type === "MemberExpression") {
  56252. const { object, property } = expression;
  56253. expression.type = "TSQualifiedName";
  56254. expression.left = object;
  56255. expression.right = property;
  56256. delete expression.object;
  56257. delete expression.property;
  56258. expression = object;
  56259. }
  56260. };
  56261. module2.exports.convertPrivateIdentifier = (path) => {
  56262. path.replaceWith(createPrivateName(path.node));
  56263. };
  56264. module2.exports.convertTSAbstractMethodDefinition = (path) => {
  56265. const { node } = path;
  56266. const {
  56267. generator,
  56268. async,
  56269. params,
  56270. id,
  56271. returnType
  56272. } = node.value;
  56273. const newNode = {
  56274. ...node,
  56275. abstract: true,
  56276. generator,
  56277. async,
  56278. params,
  56279. id,
  56280. returnType,
  56281. type: "TSDeclareMethod"
  56282. };
  56283. delete newNode.value;
  56284. path.replaceWith(newNode);
  56285. };
  56286. function createPrivateName(node) {
  56287. return {
  56288. type: "PrivateName",
  56289. id: {
  56290. ...node,
  56291. type: "Identifier"
  56292. }
  56293. };
  56294. }
  56295. }
  56296. });
  56297. // node_modules/estree-to-babel/lib/comments.js
  56298. var require_comments2 = __commonJS({
  56299. "node_modules/estree-to-babel/lib/comments.js"(exports, module2) {
  56300. "use strict";
  56301. module2.exports.convertNodeComments = (node) => {
  56302. const { comments } = node;
  56303. if (!comments)
  56304. return;
  56305. delete node.comments;
  56306. node.leadingComments = void 0;
  56307. node.trailingComments = void 0;
  56308. node.innerComments = void 0;
  56309. for (const comment2 of comments) {
  56310. const group = getCommentGroup(comment2);
  56311. if (!node[group])
  56312. node[group] = [];
  56313. delete comment2.leading;
  56314. delete comment2.trailing;
  56315. comment2.type = getCommentType(comment2);
  56316. node[group].push(comment2);
  56317. }
  56318. };
  56319. module2.exports.convertProgramComments = (comments) => {
  56320. for (const comment2 of comments) {
  56321. comment2.type = getCommentType(comment2);
  56322. }
  56323. return comments;
  56324. };
  56325. function getCommentType({ type }) {
  56326. return `Comment${type}`;
  56327. }
  56328. function getCommentGroup({ trailing, leading }) {
  56329. if (trailing)
  56330. return "trailingComments";
  56331. if (leading)
  56332. return "leadingComments";
  56333. return "innerComments";
  56334. }
  56335. }
  56336. });
  56337. // node_modules/estree-to-babel/lib/get-ast.js
  56338. var require_get_ast = __commonJS({
  56339. "node_modules/estree-to-babel/lib/get-ast.js"(exports, module2) {
  56340. "use strict";
  56341. var { convertProgramComments } = require_comments2();
  56342. module2.exports = (node) => {
  56343. if (node.type === "File")
  56344. return node;
  56345. const {
  56346. comments = [],
  56347. tokens,
  56348. ...program
  56349. } = node;
  56350. const ast = {
  56351. type: "File",
  56352. program: {
  56353. ...program,
  56354. directives: []
  56355. },
  56356. comments: convertProgramComments(comments),
  56357. tokens
  56358. };
  56359. return ast;
  56360. };
  56361. }
  56362. });
  56363. // node_modules/estree-to-babel/lib/estree-to-babel.js
  56364. var require_estree_to_babel = __commonJS({
  56365. "node_modules/estree-to-babel/lib/estree-to-babel.js"(exports, module2) {
  56366. "use strict";
  56367. var traverse = require_lib14().default;
  56368. var {
  56369. isObjectExpression,
  56370. isExportDeclaration
  56371. } = require_lib4();
  56372. var traverseObjectExpression = require_traverse_object_expression();
  56373. var setClassMethod = require_set_class_method();
  56374. var setClassPrivateProperty = require_set_class_private_property();
  56375. var setClassPrivateName = require_set_class_private_name();
  56376. var convertImportToCall = require_convert_import_to_call();
  56377. var convertChainExpression = require_convert_chain_expression();
  56378. var convertImportDeclaration = require_convert_import_declaration();
  56379. var convertExportDeclaration = require_convert_export_declaration();
  56380. var {
  56381. convertTSClassImplements,
  56382. convertTSInterfaceHeritage,
  56383. convertTSAbstractMethodDefinition,
  56384. convertPropertyDefinition,
  56385. convertPrivateIdentifier
  56386. } = require_ts();
  56387. var { convertNodeComments } = require_comments2();
  56388. var setLiteral = require_set_literal();
  56389. var getAST = require_get_ast();
  56390. module2.exports = (node) => {
  56391. const ast = getAST(node);
  56392. traverse(ast, {
  56393. noScope: true,
  56394. enter(path) {
  56395. const { node: node2 } = path;
  56396. const { type } = node2;
  56397. if (/Literal$/.test(type)) {
  56398. setLiteral(node2);
  56399. return setEsprimaRaw(node2);
  56400. }
  56401. if (type === "Property")
  56402. return setObjectProperty(node2);
  56403. if (type === "MethodDefinition")
  56404. return setClassMethod(path);
  56405. if (type === "FieldDefinition")
  56406. return setClassPrivateProperty(path);
  56407. if (type === "PrivateName")
  56408. return setClassPrivateName(path);
  56409. if (type === "ImportExpression")
  56410. return convertImportToCall(path);
  56411. if (type === "ImportDeclaration")
  56412. return convertImportDeclaration(path);
  56413. if (isExportDeclaration(path))
  56414. return convertExportDeclaration(path);
  56415. if (type === "ChainExpression")
  56416. return convertChainExpression(path);
  56417. if (type === "TSAbstractMethodDefinition")
  56418. return convertTSAbstractMethodDefinition(path);
  56419. if (type === "TSInterfaceHeritage")
  56420. return convertTSInterfaceHeritage(path);
  56421. if (type === "PropertyDefinition")
  56422. return convertPropertyDefinition(path);
  56423. if (type === "PrivateIdentifier")
  56424. return convertPrivateIdentifier(path);
  56425. if (type === "TSClassImplements")
  56426. return convertTSClassImplements(path);
  56427. },
  56428. exit(path) {
  56429. const { node: node2 } = path;
  56430. convertNodeComments(node2);
  56431. if (isObjectExpression(node2))
  56432. return traverseObjectExpression(path.get("properties"));
  56433. }
  56434. });
  56435. return ast;
  56436. };
  56437. function setObjectProperty(node) {
  56438. node.type = "ObjectProperty";
  56439. }
  56440. function setEsprimaRaw(node) {
  56441. const { raw } = node;
  56442. node.raw = raw || node.extra?.raw;
  56443. node.extra = node.extra || {
  56444. raw
  56445. };
  56446. }
  56447. }
  56448. });
  56449. // node_modules/@babel/traverse/lib/path/lib/virtual-types.js
  56450. var require_virtual_types2 = __commonJS({
  56451. "node_modules/@babel/traverse/lib/path/lib/virtual-types.js"(exports) {
  56452. "use strict";
  56453. Object.defineProperty(exports, "__esModule", {
  56454. value: true
  56455. });
  56456. exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0;
  56457. var t2 = require_lib2();
  56458. var ReferencedIdentifier = {
  56459. types: ["Identifier", "JSXIdentifier"],
  56460. checkPath(path, opts) {
  56461. const {
  56462. node,
  56463. parent
  56464. } = path;
  56465. if (!t2.isIdentifier(node, opts) && !t2.isJSXMemberExpression(parent, opts)) {
  56466. if (t2.isJSXIdentifier(node, opts)) {
  56467. if (t2.react.isCompatTag(node.name))
  56468. return false;
  56469. } else {
  56470. return false;
  56471. }
  56472. }
  56473. return t2.isReferenced(node, parent, path.parentPath.parent);
  56474. }
  56475. };
  56476. exports.ReferencedIdentifier = ReferencedIdentifier;
  56477. var ReferencedMemberExpression = {
  56478. types: ["MemberExpression"],
  56479. checkPath({
  56480. node,
  56481. parent
  56482. }) {
  56483. return t2.isMemberExpression(node) && t2.isReferenced(node, parent);
  56484. }
  56485. };
  56486. exports.ReferencedMemberExpression = ReferencedMemberExpression;
  56487. var BindingIdentifier = {
  56488. types: ["Identifier"],
  56489. checkPath(path) {
  56490. const {
  56491. node,
  56492. parent
  56493. } = path;
  56494. const grandparent = path.parentPath.parent;
  56495. return t2.isIdentifier(node) && t2.isBinding(node, parent, grandparent);
  56496. }
  56497. };
  56498. exports.BindingIdentifier = BindingIdentifier;
  56499. var Statement = {
  56500. types: ["Statement"],
  56501. checkPath({
  56502. node,
  56503. parent
  56504. }) {
  56505. if (t2.isStatement(node)) {
  56506. if (t2.isVariableDeclaration(node)) {
  56507. if (t2.isForXStatement(parent, {
  56508. left: node
  56509. }))
  56510. return false;
  56511. if (t2.isForStatement(parent, {
  56512. init: node
  56513. }))
  56514. return false;
  56515. }
  56516. return true;
  56517. } else {
  56518. return false;
  56519. }
  56520. }
  56521. };
  56522. exports.Statement = Statement;
  56523. var Expression = {
  56524. types: ["Expression"],
  56525. checkPath(path) {
  56526. if (path.isIdentifier()) {
  56527. return path.isReferencedIdentifier();
  56528. } else {
  56529. return t2.isExpression(path.node);
  56530. }
  56531. }
  56532. };
  56533. exports.Expression = Expression;
  56534. var Scope4 = {
  56535. types: ["Scopable", "Pattern"],
  56536. checkPath(path) {
  56537. return t2.isScope(path.node, path.parent);
  56538. }
  56539. };
  56540. exports.Scope = Scope4;
  56541. var Referenced = {
  56542. checkPath(path) {
  56543. return t2.isReferenced(path.node, path.parent);
  56544. }
  56545. };
  56546. exports.Referenced = Referenced;
  56547. var BlockScoped = {
  56548. checkPath(path) {
  56549. return t2.isBlockScoped(path.node);
  56550. }
  56551. };
  56552. exports.BlockScoped = BlockScoped;
  56553. var Var = {
  56554. types: ["VariableDeclaration"],
  56555. checkPath(path) {
  56556. return t2.isVar(path.node);
  56557. }
  56558. };
  56559. exports.Var = Var;
  56560. var User = {
  56561. checkPath(path) {
  56562. return path.node && !!path.node.loc;
  56563. }
  56564. };
  56565. exports.User = User;
  56566. var Generated = {
  56567. checkPath(path) {
  56568. return !path.isUser();
  56569. }
  56570. };
  56571. exports.Generated = Generated;
  56572. var Pure = {
  56573. checkPath(path, opts) {
  56574. return path.scope.isPure(path.node, opts);
  56575. }
  56576. };
  56577. exports.Pure = Pure;
  56578. var Flow = {
  56579. types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
  56580. checkPath({
  56581. node
  56582. }) {
  56583. if (t2.isFlow(node)) {
  56584. return true;
  56585. } else if (t2.isImportDeclaration(node)) {
  56586. return node.importKind === "type" || node.importKind === "typeof";
  56587. } else if (t2.isExportDeclaration(node)) {
  56588. return node.exportKind === "type";
  56589. } else if (t2.isImportSpecifier(node)) {
  56590. return node.importKind === "type" || node.importKind === "typeof";
  56591. } else {
  56592. return false;
  56593. }
  56594. }
  56595. };
  56596. exports.Flow = Flow;
  56597. var RestProperty = {
  56598. types: ["RestElement"],
  56599. checkPath(path) {
  56600. return path.parentPath && path.parentPath.isObjectPattern();
  56601. }
  56602. };
  56603. exports.RestProperty = RestProperty;
  56604. var SpreadProperty = {
  56605. types: ["RestElement"],
  56606. checkPath(path) {
  56607. return path.parentPath && path.parentPath.isObjectExpression();
  56608. }
  56609. };
  56610. exports.SpreadProperty = SpreadProperty;
  56611. var ExistentialTypeParam = {
  56612. types: ["ExistsTypeAnnotation"]
  56613. };
  56614. exports.ExistentialTypeParam = ExistentialTypeParam;
  56615. var NumericLiteralTypeAnnotation = {
  56616. types: ["NumberLiteralTypeAnnotation"]
  56617. };
  56618. exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
  56619. var ForAwaitStatement = {
  56620. types: ["ForOfStatement"],
  56621. checkPath({
  56622. node
  56623. }) {
  56624. return node.await === true;
  56625. }
  56626. };
  56627. exports.ForAwaitStatement = ForAwaitStatement;
  56628. }
  56629. });
  56630. // node_modules/@babel/traverse/lib/scope/binding.js
  56631. var require_binding2 = __commonJS({
  56632. "node_modules/@babel/traverse/lib/scope/binding.js"(exports) {
  56633. "use strict";
  56634. Object.defineProperty(exports, "__esModule", {
  56635. value: true
  56636. });
  56637. exports.default = void 0;
  56638. var Binding = class {
  56639. constructor({
  56640. identifier,
  56641. scope,
  56642. path,
  56643. kind
  56644. }) {
  56645. this.identifier = void 0;
  56646. this.scope = void 0;
  56647. this.path = void 0;
  56648. this.kind = void 0;
  56649. this.constantViolations = [];
  56650. this.constant = true;
  56651. this.referencePaths = [];
  56652. this.referenced = false;
  56653. this.references = 0;
  56654. this.identifier = identifier;
  56655. this.scope = scope;
  56656. this.path = path;
  56657. this.kind = kind;
  56658. this.clearValue();
  56659. }
  56660. deoptValue() {
  56661. this.clearValue();
  56662. this.hasDeoptedValue = true;
  56663. }
  56664. setValue(value) {
  56665. if (this.hasDeoptedValue)
  56666. return;
  56667. this.hasValue = true;
  56668. this.value = value;
  56669. }
  56670. clearValue() {
  56671. this.hasDeoptedValue = false;
  56672. this.hasValue = false;
  56673. this.value = null;
  56674. }
  56675. reassign(path) {
  56676. this.constant = false;
  56677. if (this.constantViolations.indexOf(path) !== -1) {
  56678. return;
  56679. }
  56680. this.constantViolations.push(path);
  56681. }
  56682. reference(path) {
  56683. if (this.referencePaths.indexOf(path) !== -1) {
  56684. return;
  56685. }
  56686. this.referenced = true;
  56687. this.references++;
  56688. this.referencePaths.push(path);
  56689. }
  56690. dereference() {
  56691. this.references--;
  56692. this.referenced = !!this.references;
  56693. }
  56694. };
  56695. exports.default = Binding;
  56696. }
  56697. });
  56698. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/shallowEqual.js
  56699. var require_shallowEqual3 = __commonJS({
  56700. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  56701. "use strict";
  56702. Object.defineProperty(exports, "__esModule", {
  56703. value: true
  56704. });
  56705. exports.default = shallowEqual;
  56706. function shallowEqual(actual, expected) {
  56707. const keys2 = Object.keys(expected);
  56708. for (const key of keys2) {
  56709. if (actual[key] !== expected[key]) {
  56710. return false;
  56711. }
  56712. }
  56713. return true;
  56714. }
  56715. }
  56716. });
  56717. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/generated/index.js
  56718. var require_generated11 = __commonJS({
  56719. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  56720. "use strict";
  56721. Object.defineProperty(exports, "__esModule", {
  56722. value: true
  56723. });
  56724. exports.isArrayExpression = isArrayExpression;
  56725. exports.isAssignmentExpression = isAssignmentExpression;
  56726. exports.isBinaryExpression = isBinaryExpression;
  56727. exports.isInterpreterDirective = isInterpreterDirective;
  56728. exports.isDirective = isDirective;
  56729. exports.isDirectiveLiteral = isDirectiveLiteral;
  56730. exports.isBlockStatement = isBlockStatement;
  56731. exports.isBreakStatement = isBreakStatement;
  56732. exports.isCallExpression = isCallExpression;
  56733. exports.isCatchClause = isCatchClause;
  56734. exports.isConditionalExpression = isConditionalExpression;
  56735. exports.isContinueStatement = isContinueStatement;
  56736. exports.isDebuggerStatement = isDebuggerStatement;
  56737. exports.isDoWhileStatement = isDoWhileStatement;
  56738. exports.isEmptyStatement = isEmptyStatement;
  56739. exports.isExpressionStatement = isExpressionStatement2;
  56740. exports.isFile = isFile;
  56741. exports.isForInStatement = isForInStatement;
  56742. exports.isForStatement = isForStatement;
  56743. exports.isFunctionDeclaration = isFunctionDeclaration;
  56744. exports.isFunctionExpression = isFunctionExpression;
  56745. exports.isIdentifier = isIdentifier2;
  56746. exports.isIfStatement = isIfStatement;
  56747. exports.isLabeledStatement = isLabeledStatement;
  56748. exports.isStringLiteral = isStringLiteral2;
  56749. exports.isNumericLiteral = isNumericLiteral;
  56750. exports.isNullLiteral = isNullLiteral;
  56751. exports.isBooleanLiteral = isBooleanLiteral2;
  56752. exports.isRegExpLiteral = isRegExpLiteral;
  56753. exports.isLogicalExpression = isLogicalExpression;
  56754. exports.isMemberExpression = isMemberExpression;
  56755. exports.isNewExpression = isNewExpression;
  56756. exports.isProgram = isProgram;
  56757. exports.isObjectExpression = isObjectExpression;
  56758. exports.isObjectMethod = isObjectMethod;
  56759. exports.isObjectProperty = isObjectProperty;
  56760. exports.isRestElement = isRestElement;
  56761. exports.isReturnStatement = isReturnStatement;
  56762. exports.isSequenceExpression = isSequenceExpression;
  56763. exports.isParenthesizedExpression = isParenthesizedExpression;
  56764. exports.isSwitchCase = isSwitchCase;
  56765. exports.isSwitchStatement = isSwitchStatement;
  56766. exports.isThisExpression = isThisExpression;
  56767. exports.isThrowStatement = isThrowStatement;
  56768. exports.isTryStatement = isTryStatement;
  56769. exports.isUnaryExpression = isUnaryExpression;
  56770. exports.isUpdateExpression = isUpdateExpression;
  56771. exports.isVariableDeclaration = isVariableDeclaration;
  56772. exports.isVariableDeclarator = isVariableDeclarator;
  56773. exports.isWhileStatement = isWhileStatement;
  56774. exports.isWithStatement = isWithStatement;
  56775. exports.isAssignmentPattern = isAssignmentPattern;
  56776. exports.isArrayPattern = isArrayPattern;
  56777. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  56778. exports.isClassBody = isClassBody;
  56779. exports.isClassExpression = isClassExpression;
  56780. exports.isClassDeclaration = isClassDeclaration;
  56781. exports.isExportAllDeclaration = isExportAllDeclaration;
  56782. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  56783. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  56784. exports.isExportSpecifier = isExportSpecifier;
  56785. exports.isForOfStatement = isForOfStatement;
  56786. exports.isImportDeclaration = isImportDeclaration;
  56787. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  56788. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  56789. exports.isImportSpecifier = isImportSpecifier;
  56790. exports.isMetaProperty = isMetaProperty;
  56791. exports.isClassMethod = isClassMethod;
  56792. exports.isObjectPattern = isObjectPattern;
  56793. exports.isSpreadElement = isSpreadElement;
  56794. exports.isSuper = isSuper;
  56795. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  56796. exports.isTemplateElement = isTemplateElement;
  56797. exports.isTemplateLiteral = isTemplateLiteral;
  56798. exports.isYieldExpression = isYieldExpression;
  56799. exports.isAwaitExpression = isAwaitExpression;
  56800. exports.isImport = isImport;
  56801. exports.isBigIntLiteral = isBigIntLiteral;
  56802. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  56803. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  56804. exports.isOptionalCallExpression = isOptionalCallExpression;
  56805. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  56806. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  56807. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  56808. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  56809. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  56810. exports.isClassImplements = isClassImplements;
  56811. exports.isDeclareClass = isDeclareClass;
  56812. exports.isDeclareFunction = isDeclareFunction;
  56813. exports.isDeclareInterface = isDeclareInterface;
  56814. exports.isDeclareModule = isDeclareModule;
  56815. exports.isDeclareModuleExports = isDeclareModuleExports;
  56816. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  56817. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  56818. exports.isDeclareVariable = isDeclareVariable;
  56819. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  56820. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  56821. exports.isDeclaredPredicate = isDeclaredPredicate;
  56822. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  56823. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  56824. exports.isFunctionTypeParam = isFunctionTypeParam;
  56825. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  56826. exports.isInferredPredicate = isInferredPredicate;
  56827. exports.isInterfaceExtends = isInterfaceExtends;
  56828. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  56829. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  56830. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  56831. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  56832. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  56833. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  56834. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  56835. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  56836. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  56837. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  56838. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  56839. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  56840. exports.isObjectTypeProperty = isObjectTypeProperty;
  56841. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  56842. exports.isOpaqueType = isOpaqueType;
  56843. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  56844. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  56845. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  56846. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  56847. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  56848. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  56849. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  56850. exports.isTypeAlias = isTypeAlias;
  56851. exports.isTypeAnnotation = isTypeAnnotation;
  56852. exports.isTypeCastExpression = isTypeCastExpression;
  56853. exports.isTypeParameter = isTypeParameter;
  56854. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  56855. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  56856. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  56857. exports.isVariance = isVariance;
  56858. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  56859. exports.isEnumDeclaration = isEnumDeclaration;
  56860. exports.isEnumBooleanBody = isEnumBooleanBody;
  56861. exports.isEnumNumberBody = isEnumNumberBody;
  56862. exports.isEnumStringBody = isEnumStringBody;
  56863. exports.isEnumSymbolBody = isEnumSymbolBody;
  56864. exports.isEnumBooleanMember = isEnumBooleanMember;
  56865. exports.isEnumNumberMember = isEnumNumberMember;
  56866. exports.isEnumStringMember = isEnumStringMember;
  56867. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  56868. exports.isIndexedAccessType = isIndexedAccessType;
  56869. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  56870. exports.isJSXAttribute = isJSXAttribute;
  56871. exports.isJSXClosingElement = isJSXClosingElement;
  56872. exports.isJSXElement = isJSXElement2;
  56873. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  56874. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  56875. exports.isJSXSpreadChild = isJSXSpreadChild;
  56876. exports.isJSXIdentifier = isJSXIdentifier2;
  56877. exports.isJSXMemberExpression = isJSXMemberExpression;
  56878. exports.isJSXNamespacedName = isJSXNamespacedName;
  56879. exports.isJSXOpeningElement = isJSXOpeningElement;
  56880. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  56881. exports.isJSXText = isJSXText;
  56882. exports.isJSXFragment = isJSXFragment2;
  56883. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  56884. exports.isJSXClosingFragment = isJSXClosingFragment;
  56885. exports.isNoop = isNoop;
  56886. exports.isPlaceholder = isPlaceholder;
  56887. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  56888. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  56889. exports.isBindExpression = isBindExpression;
  56890. exports.isClassProperty = isClassProperty;
  56891. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  56892. exports.isPipelineBareFunction = isPipelineBareFunction;
  56893. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  56894. exports.isClassPrivateProperty = isClassPrivateProperty;
  56895. exports.isClassPrivateMethod = isClassPrivateMethod;
  56896. exports.isImportAttribute = isImportAttribute;
  56897. exports.isDecorator = isDecorator;
  56898. exports.isDoExpression = isDoExpression;
  56899. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  56900. exports.isPrivateName = isPrivateName;
  56901. exports.isRecordExpression = isRecordExpression;
  56902. exports.isTupleExpression = isTupleExpression;
  56903. exports.isDecimalLiteral = isDecimalLiteral;
  56904. exports.isStaticBlock = isStaticBlock;
  56905. exports.isModuleExpression = isModuleExpression;
  56906. exports.isTSParameterProperty = isTSParameterProperty;
  56907. exports.isTSDeclareFunction = isTSDeclareFunction;
  56908. exports.isTSDeclareMethod = isTSDeclareMethod;
  56909. exports.isTSQualifiedName = isTSQualifiedName;
  56910. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  56911. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  56912. exports.isTSPropertySignature = isTSPropertySignature;
  56913. exports.isTSMethodSignature = isTSMethodSignature;
  56914. exports.isTSIndexSignature = isTSIndexSignature;
  56915. exports.isTSAnyKeyword = isTSAnyKeyword;
  56916. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  56917. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  56918. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  56919. exports.isTSNeverKeyword = isTSNeverKeyword;
  56920. exports.isTSNullKeyword = isTSNullKeyword;
  56921. exports.isTSNumberKeyword = isTSNumberKeyword;
  56922. exports.isTSObjectKeyword = isTSObjectKeyword;
  56923. exports.isTSStringKeyword = isTSStringKeyword;
  56924. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  56925. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  56926. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  56927. exports.isTSVoidKeyword = isTSVoidKeyword;
  56928. exports.isTSThisType = isTSThisType;
  56929. exports.isTSFunctionType = isTSFunctionType;
  56930. exports.isTSConstructorType = isTSConstructorType;
  56931. exports.isTSTypeReference = isTSTypeReference;
  56932. exports.isTSTypePredicate = isTSTypePredicate;
  56933. exports.isTSTypeQuery = isTSTypeQuery;
  56934. exports.isTSTypeLiteral = isTSTypeLiteral;
  56935. exports.isTSArrayType = isTSArrayType;
  56936. exports.isTSTupleType = isTSTupleType;
  56937. exports.isTSOptionalType = isTSOptionalType;
  56938. exports.isTSRestType = isTSRestType;
  56939. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  56940. exports.isTSUnionType = isTSUnionType;
  56941. exports.isTSIntersectionType = isTSIntersectionType;
  56942. exports.isTSConditionalType = isTSConditionalType;
  56943. exports.isTSInferType = isTSInferType;
  56944. exports.isTSParenthesizedType = isTSParenthesizedType;
  56945. exports.isTSTypeOperator = isTSTypeOperator;
  56946. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  56947. exports.isTSMappedType = isTSMappedType;
  56948. exports.isTSLiteralType = isTSLiteralType;
  56949. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  56950. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  56951. exports.isTSInterfaceBody = isTSInterfaceBody;
  56952. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  56953. exports.isTSAsExpression = isTSAsExpression;
  56954. exports.isTSTypeAssertion = isTSTypeAssertion;
  56955. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  56956. exports.isTSEnumMember = isTSEnumMember;
  56957. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  56958. exports.isTSModuleBlock = isTSModuleBlock;
  56959. exports.isTSImportType = isTSImportType;
  56960. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  56961. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  56962. exports.isTSNonNullExpression = isTSNonNullExpression;
  56963. exports.isTSExportAssignment = isTSExportAssignment;
  56964. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  56965. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  56966. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  56967. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  56968. exports.isTSTypeParameter = isTSTypeParameter;
  56969. exports.isExpression = isExpression;
  56970. exports.isBinary = isBinary;
  56971. exports.isScopable = isScopable;
  56972. exports.isBlockParent = isBlockParent;
  56973. exports.isBlock = isBlock;
  56974. exports.isStatement = isStatement;
  56975. exports.isTerminatorless = isTerminatorless;
  56976. exports.isCompletionStatement = isCompletionStatement;
  56977. exports.isConditional = isConditional;
  56978. exports.isLoop = isLoop;
  56979. exports.isWhile = isWhile;
  56980. exports.isExpressionWrapper = isExpressionWrapper;
  56981. exports.isFor = isFor;
  56982. exports.isForXStatement = isForXStatement;
  56983. exports.isFunction = isFunction;
  56984. exports.isFunctionParent = isFunctionParent;
  56985. exports.isPureish = isPureish;
  56986. exports.isDeclaration = isDeclaration2;
  56987. exports.isPatternLike = isPatternLike;
  56988. exports.isLVal = isLVal;
  56989. exports.isTSEntityName = isTSEntityName;
  56990. exports.isLiteral = isLiteral;
  56991. exports.isImmutable = isImmutable;
  56992. exports.isUserWhitespacable = isUserWhitespacable;
  56993. exports.isMethod = isMethod;
  56994. exports.isObjectMember = isObjectMember;
  56995. exports.isProperty = isProperty;
  56996. exports.isUnaryLike = isUnaryLike;
  56997. exports.isPattern = isPattern;
  56998. exports.isClass = isClass;
  56999. exports.isModuleDeclaration = isModuleDeclaration;
  57000. exports.isExportDeclaration = isExportDeclaration;
  57001. exports.isModuleSpecifier = isModuleSpecifier;
  57002. exports.isFlow = isFlow;
  57003. exports.isFlowType = isFlowType;
  57004. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  57005. exports.isFlowDeclaration = isFlowDeclaration;
  57006. exports.isFlowPredicate = isFlowPredicate;
  57007. exports.isEnumBody = isEnumBody;
  57008. exports.isEnumMember = isEnumMember;
  57009. exports.isJSX = isJSX;
  57010. exports.isPrivate = isPrivate;
  57011. exports.isTSTypeElement = isTSTypeElement;
  57012. exports.isTSType = isTSType;
  57013. exports.isTSBaseType = isTSBaseType;
  57014. exports.isNumberLiteral = isNumberLiteral;
  57015. exports.isRegexLiteral = isRegexLiteral;
  57016. exports.isRestProperty = isRestProperty;
  57017. exports.isSpreadProperty = isSpreadProperty;
  57018. var _shallowEqual = require_shallowEqual3();
  57019. function isArrayExpression(node, opts) {
  57020. if (!node)
  57021. return false;
  57022. const nodeType = node.type;
  57023. if (nodeType === "ArrayExpression") {
  57024. if (typeof opts === "undefined") {
  57025. return true;
  57026. } else {
  57027. return (0, _shallowEqual.default)(node, opts);
  57028. }
  57029. }
  57030. return false;
  57031. }
  57032. function isAssignmentExpression(node, opts) {
  57033. if (!node)
  57034. return false;
  57035. const nodeType = node.type;
  57036. if (nodeType === "AssignmentExpression") {
  57037. if (typeof opts === "undefined") {
  57038. return true;
  57039. } else {
  57040. return (0, _shallowEqual.default)(node, opts);
  57041. }
  57042. }
  57043. return false;
  57044. }
  57045. function isBinaryExpression(node, opts) {
  57046. if (!node)
  57047. return false;
  57048. const nodeType = node.type;
  57049. if (nodeType === "BinaryExpression") {
  57050. if (typeof opts === "undefined") {
  57051. return true;
  57052. } else {
  57053. return (0, _shallowEqual.default)(node, opts);
  57054. }
  57055. }
  57056. return false;
  57057. }
  57058. function isInterpreterDirective(node, opts) {
  57059. if (!node)
  57060. return false;
  57061. const nodeType = node.type;
  57062. if (nodeType === "InterpreterDirective") {
  57063. if (typeof opts === "undefined") {
  57064. return true;
  57065. } else {
  57066. return (0, _shallowEqual.default)(node, opts);
  57067. }
  57068. }
  57069. return false;
  57070. }
  57071. function isDirective(node, opts) {
  57072. if (!node)
  57073. return false;
  57074. const nodeType = node.type;
  57075. if (nodeType === "Directive") {
  57076. if (typeof opts === "undefined") {
  57077. return true;
  57078. } else {
  57079. return (0, _shallowEqual.default)(node, opts);
  57080. }
  57081. }
  57082. return false;
  57083. }
  57084. function isDirectiveLiteral(node, opts) {
  57085. if (!node)
  57086. return false;
  57087. const nodeType = node.type;
  57088. if (nodeType === "DirectiveLiteral") {
  57089. if (typeof opts === "undefined") {
  57090. return true;
  57091. } else {
  57092. return (0, _shallowEqual.default)(node, opts);
  57093. }
  57094. }
  57095. return false;
  57096. }
  57097. function isBlockStatement(node, opts) {
  57098. if (!node)
  57099. return false;
  57100. const nodeType = node.type;
  57101. if (nodeType === "BlockStatement") {
  57102. if (typeof opts === "undefined") {
  57103. return true;
  57104. } else {
  57105. return (0, _shallowEqual.default)(node, opts);
  57106. }
  57107. }
  57108. return false;
  57109. }
  57110. function isBreakStatement(node, opts) {
  57111. if (!node)
  57112. return false;
  57113. const nodeType = node.type;
  57114. if (nodeType === "BreakStatement") {
  57115. if (typeof opts === "undefined") {
  57116. return true;
  57117. } else {
  57118. return (0, _shallowEqual.default)(node, opts);
  57119. }
  57120. }
  57121. return false;
  57122. }
  57123. function isCallExpression(node, opts) {
  57124. if (!node)
  57125. return false;
  57126. const nodeType = node.type;
  57127. if (nodeType === "CallExpression") {
  57128. if (typeof opts === "undefined") {
  57129. return true;
  57130. } else {
  57131. return (0, _shallowEqual.default)(node, opts);
  57132. }
  57133. }
  57134. return false;
  57135. }
  57136. function isCatchClause(node, opts) {
  57137. if (!node)
  57138. return false;
  57139. const nodeType = node.type;
  57140. if (nodeType === "CatchClause") {
  57141. if (typeof opts === "undefined") {
  57142. return true;
  57143. } else {
  57144. return (0, _shallowEqual.default)(node, opts);
  57145. }
  57146. }
  57147. return false;
  57148. }
  57149. function isConditionalExpression(node, opts) {
  57150. if (!node)
  57151. return false;
  57152. const nodeType = node.type;
  57153. if (nodeType === "ConditionalExpression") {
  57154. if (typeof opts === "undefined") {
  57155. return true;
  57156. } else {
  57157. return (0, _shallowEqual.default)(node, opts);
  57158. }
  57159. }
  57160. return false;
  57161. }
  57162. function isContinueStatement(node, opts) {
  57163. if (!node)
  57164. return false;
  57165. const nodeType = node.type;
  57166. if (nodeType === "ContinueStatement") {
  57167. if (typeof opts === "undefined") {
  57168. return true;
  57169. } else {
  57170. return (0, _shallowEqual.default)(node, opts);
  57171. }
  57172. }
  57173. return false;
  57174. }
  57175. function isDebuggerStatement(node, opts) {
  57176. if (!node)
  57177. return false;
  57178. const nodeType = node.type;
  57179. if (nodeType === "DebuggerStatement") {
  57180. if (typeof opts === "undefined") {
  57181. return true;
  57182. } else {
  57183. return (0, _shallowEqual.default)(node, opts);
  57184. }
  57185. }
  57186. return false;
  57187. }
  57188. function isDoWhileStatement(node, opts) {
  57189. if (!node)
  57190. return false;
  57191. const nodeType = node.type;
  57192. if (nodeType === "DoWhileStatement") {
  57193. if (typeof opts === "undefined") {
  57194. return true;
  57195. } else {
  57196. return (0, _shallowEqual.default)(node, opts);
  57197. }
  57198. }
  57199. return false;
  57200. }
  57201. function isEmptyStatement(node, opts) {
  57202. if (!node)
  57203. return false;
  57204. const nodeType = node.type;
  57205. if (nodeType === "EmptyStatement") {
  57206. if (typeof opts === "undefined") {
  57207. return true;
  57208. } else {
  57209. return (0, _shallowEqual.default)(node, opts);
  57210. }
  57211. }
  57212. return false;
  57213. }
  57214. function isExpressionStatement2(node, opts) {
  57215. if (!node)
  57216. return false;
  57217. const nodeType = node.type;
  57218. if (nodeType === "ExpressionStatement") {
  57219. if (typeof opts === "undefined") {
  57220. return true;
  57221. } else {
  57222. return (0, _shallowEqual.default)(node, opts);
  57223. }
  57224. }
  57225. return false;
  57226. }
  57227. function isFile(node, opts) {
  57228. if (!node)
  57229. return false;
  57230. const nodeType = node.type;
  57231. if (nodeType === "File") {
  57232. if (typeof opts === "undefined") {
  57233. return true;
  57234. } else {
  57235. return (0, _shallowEqual.default)(node, opts);
  57236. }
  57237. }
  57238. return false;
  57239. }
  57240. function isForInStatement(node, opts) {
  57241. if (!node)
  57242. return false;
  57243. const nodeType = node.type;
  57244. if (nodeType === "ForInStatement") {
  57245. if (typeof opts === "undefined") {
  57246. return true;
  57247. } else {
  57248. return (0, _shallowEqual.default)(node, opts);
  57249. }
  57250. }
  57251. return false;
  57252. }
  57253. function isForStatement(node, opts) {
  57254. if (!node)
  57255. return false;
  57256. const nodeType = node.type;
  57257. if (nodeType === "ForStatement") {
  57258. if (typeof opts === "undefined") {
  57259. return true;
  57260. } else {
  57261. return (0, _shallowEqual.default)(node, opts);
  57262. }
  57263. }
  57264. return false;
  57265. }
  57266. function isFunctionDeclaration(node, opts) {
  57267. if (!node)
  57268. return false;
  57269. const nodeType = node.type;
  57270. if (nodeType === "FunctionDeclaration") {
  57271. if (typeof opts === "undefined") {
  57272. return true;
  57273. } else {
  57274. return (0, _shallowEqual.default)(node, opts);
  57275. }
  57276. }
  57277. return false;
  57278. }
  57279. function isFunctionExpression(node, opts) {
  57280. if (!node)
  57281. return false;
  57282. const nodeType = node.type;
  57283. if (nodeType === "FunctionExpression") {
  57284. if (typeof opts === "undefined") {
  57285. return true;
  57286. } else {
  57287. return (0, _shallowEqual.default)(node, opts);
  57288. }
  57289. }
  57290. return false;
  57291. }
  57292. function isIdentifier2(node, opts) {
  57293. if (!node)
  57294. return false;
  57295. const nodeType = node.type;
  57296. if (nodeType === "Identifier") {
  57297. if (typeof opts === "undefined") {
  57298. return true;
  57299. } else {
  57300. return (0, _shallowEqual.default)(node, opts);
  57301. }
  57302. }
  57303. return false;
  57304. }
  57305. function isIfStatement(node, opts) {
  57306. if (!node)
  57307. return false;
  57308. const nodeType = node.type;
  57309. if (nodeType === "IfStatement") {
  57310. if (typeof opts === "undefined") {
  57311. return true;
  57312. } else {
  57313. return (0, _shallowEqual.default)(node, opts);
  57314. }
  57315. }
  57316. return false;
  57317. }
  57318. function isLabeledStatement(node, opts) {
  57319. if (!node)
  57320. return false;
  57321. const nodeType = node.type;
  57322. if (nodeType === "LabeledStatement") {
  57323. if (typeof opts === "undefined") {
  57324. return true;
  57325. } else {
  57326. return (0, _shallowEqual.default)(node, opts);
  57327. }
  57328. }
  57329. return false;
  57330. }
  57331. function isStringLiteral2(node, opts) {
  57332. if (!node)
  57333. return false;
  57334. const nodeType = node.type;
  57335. if (nodeType === "StringLiteral") {
  57336. if (typeof opts === "undefined") {
  57337. return true;
  57338. } else {
  57339. return (0, _shallowEqual.default)(node, opts);
  57340. }
  57341. }
  57342. return false;
  57343. }
  57344. function isNumericLiteral(node, opts) {
  57345. if (!node)
  57346. return false;
  57347. const nodeType = node.type;
  57348. if (nodeType === "NumericLiteral") {
  57349. if (typeof opts === "undefined") {
  57350. return true;
  57351. } else {
  57352. return (0, _shallowEqual.default)(node, opts);
  57353. }
  57354. }
  57355. return false;
  57356. }
  57357. function isNullLiteral(node, opts) {
  57358. if (!node)
  57359. return false;
  57360. const nodeType = node.type;
  57361. if (nodeType === "NullLiteral") {
  57362. if (typeof opts === "undefined") {
  57363. return true;
  57364. } else {
  57365. return (0, _shallowEqual.default)(node, opts);
  57366. }
  57367. }
  57368. return false;
  57369. }
  57370. function isBooleanLiteral2(node, opts) {
  57371. if (!node)
  57372. return false;
  57373. const nodeType = node.type;
  57374. if (nodeType === "BooleanLiteral") {
  57375. if (typeof opts === "undefined") {
  57376. return true;
  57377. } else {
  57378. return (0, _shallowEqual.default)(node, opts);
  57379. }
  57380. }
  57381. return false;
  57382. }
  57383. function isRegExpLiteral(node, opts) {
  57384. if (!node)
  57385. return false;
  57386. const nodeType = node.type;
  57387. if (nodeType === "RegExpLiteral") {
  57388. if (typeof opts === "undefined") {
  57389. return true;
  57390. } else {
  57391. return (0, _shallowEqual.default)(node, opts);
  57392. }
  57393. }
  57394. return false;
  57395. }
  57396. function isLogicalExpression(node, opts) {
  57397. if (!node)
  57398. return false;
  57399. const nodeType = node.type;
  57400. if (nodeType === "LogicalExpression") {
  57401. if (typeof opts === "undefined") {
  57402. return true;
  57403. } else {
  57404. return (0, _shallowEqual.default)(node, opts);
  57405. }
  57406. }
  57407. return false;
  57408. }
  57409. function isMemberExpression(node, opts) {
  57410. if (!node)
  57411. return false;
  57412. const nodeType = node.type;
  57413. if (nodeType === "MemberExpression") {
  57414. if (typeof opts === "undefined") {
  57415. return true;
  57416. } else {
  57417. return (0, _shallowEqual.default)(node, opts);
  57418. }
  57419. }
  57420. return false;
  57421. }
  57422. function isNewExpression(node, opts) {
  57423. if (!node)
  57424. return false;
  57425. const nodeType = node.type;
  57426. if (nodeType === "NewExpression") {
  57427. if (typeof opts === "undefined") {
  57428. return true;
  57429. } else {
  57430. return (0, _shallowEqual.default)(node, opts);
  57431. }
  57432. }
  57433. return false;
  57434. }
  57435. function isProgram(node, opts) {
  57436. if (!node)
  57437. return false;
  57438. const nodeType = node.type;
  57439. if (nodeType === "Program") {
  57440. if (typeof opts === "undefined") {
  57441. return true;
  57442. } else {
  57443. return (0, _shallowEqual.default)(node, opts);
  57444. }
  57445. }
  57446. return false;
  57447. }
  57448. function isObjectExpression(node, opts) {
  57449. if (!node)
  57450. return false;
  57451. const nodeType = node.type;
  57452. if (nodeType === "ObjectExpression") {
  57453. if (typeof opts === "undefined") {
  57454. return true;
  57455. } else {
  57456. return (0, _shallowEqual.default)(node, opts);
  57457. }
  57458. }
  57459. return false;
  57460. }
  57461. function isObjectMethod(node, opts) {
  57462. if (!node)
  57463. return false;
  57464. const nodeType = node.type;
  57465. if (nodeType === "ObjectMethod") {
  57466. if (typeof opts === "undefined") {
  57467. return true;
  57468. } else {
  57469. return (0, _shallowEqual.default)(node, opts);
  57470. }
  57471. }
  57472. return false;
  57473. }
  57474. function isObjectProperty(node, opts) {
  57475. if (!node)
  57476. return false;
  57477. const nodeType = node.type;
  57478. if (nodeType === "ObjectProperty") {
  57479. if (typeof opts === "undefined") {
  57480. return true;
  57481. } else {
  57482. return (0, _shallowEqual.default)(node, opts);
  57483. }
  57484. }
  57485. return false;
  57486. }
  57487. function isRestElement(node, opts) {
  57488. if (!node)
  57489. return false;
  57490. const nodeType = node.type;
  57491. if (nodeType === "RestElement") {
  57492. if (typeof opts === "undefined") {
  57493. return true;
  57494. } else {
  57495. return (0, _shallowEqual.default)(node, opts);
  57496. }
  57497. }
  57498. return false;
  57499. }
  57500. function isReturnStatement(node, opts) {
  57501. if (!node)
  57502. return false;
  57503. const nodeType = node.type;
  57504. if (nodeType === "ReturnStatement") {
  57505. if (typeof opts === "undefined") {
  57506. return true;
  57507. } else {
  57508. return (0, _shallowEqual.default)(node, opts);
  57509. }
  57510. }
  57511. return false;
  57512. }
  57513. function isSequenceExpression(node, opts) {
  57514. if (!node)
  57515. return false;
  57516. const nodeType = node.type;
  57517. if (nodeType === "SequenceExpression") {
  57518. if (typeof opts === "undefined") {
  57519. return true;
  57520. } else {
  57521. return (0, _shallowEqual.default)(node, opts);
  57522. }
  57523. }
  57524. return false;
  57525. }
  57526. function isParenthesizedExpression(node, opts) {
  57527. if (!node)
  57528. return false;
  57529. const nodeType = node.type;
  57530. if (nodeType === "ParenthesizedExpression") {
  57531. if (typeof opts === "undefined") {
  57532. return true;
  57533. } else {
  57534. return (0, _shallowEqual.default)(node, opts);
  57535. }
  57536. }
  57537. return false;
  57538. }
  57539. function isSwitchCase(node, opts) {
  57540. if (!node)
  57541. return false;
  57542. const nodeType = node.type;
  57543. if (nodeType === "SwitchCase") {
  57544. if (typeof opts === "undefined") {
  57545. return true;
  57546. } else {
  57547. return (0, _shallowEqual.default)(node, opts);
  57548. }
  57549. }
  57550. return false;
  57551. }
  57552. function isSwitchStatement(node, opts) {
  57553. if (!node)
  57554. return false;
  57555. const nodeType = node.type;
  57556. if (nodeType === "SwitchStatement") {
  57557. if (typeof opts === "undefined") {
  57558. return true;
  57559. } else {
  57560. return (0, _shallowEqual.default)(node, opts);
  57561. }
  57562. }
  57563. return false;
  57564. }
  57565. function isThisExpression(node, opts) {
  57566. if (!node)
  57567. return false;
  57568. const nodeType = node.type;
  57569. if (nodeType === "ThisExpression") {
  57570. if (typeof opts === "undefined") {
  57571. return true;
  57572. } else {
  57573. return (0, _shallowEqual.default)(node, opts);
  57574. }
  57575. }
  57576. return false;
  57577. }
  57578. function isThrowStatement(node, opts) {
  57579. if (!node)
  57580. return false;
  57581. const nodeType = node.type;
  57582. if (nodeType === "ThrowStatement") {
  57583. if (typeof opts === "undefined") {
  57584. return true;
  57585. } else {
  57586. return (0, _shallowEqual.default)(node, opts);
  57587. }
  57588. }
  57589. return false;
  57590. }
  57591. function isTryStatement(node, opts) {
  57592. if (!node)
  57593. return false;
  57594. const nodeType = node.type;
  57595. if (nodeType === "TryStatement") {
  57596. if (typeof opts === "undefined") {
  57597. return true;
  57598. } else {
  57599. return (0, _shallowEqual.default)(node, opts);
  57600. }
  57601. }
  57602. return false;
  57603. }
  57604. function isUnaryExpression(node, opts) {
  57605. if (!node)
  57606. return false;
  57607. const nodeType = node.type;
  57608. if (nodeType === "UnaryExpression") {
  57609. if (typeof opts === "undefined") {
  57610. return true;
  57611. } else {
  57612. return (0, _shallowEqual.default)(node, opts);
  57613. }
  57614. }
  57615. return false;
  57616. }
  57617. function isUpdateExpression(node, opts) {
  57618. if (!node)
  57619. return false;
  57620. const nodeType = node.type;
  57621. if (nodeType === "UpdateExpression") {
  57622. if (typeof opts === "undefined") {
  57623. return true;
  57624. } else {
  57625. return (0, _shallowEqual.default)(node, opts);
  57626. }
  57627. }
  57628. return false;
  57629. }
  57630. function isVariableDeclaration(node, opts) {
  57631. if (!node)
  57632. return false;
  57633. const nodeType = node.type;
  57634. if (nodeType === "VariableDeclaration") {
  57635. if (typeof opts === "undefined") {
  57636. return true;
  57637. } else {
  57638. return (0, _shallowEqual.default)(node, opts);
  57639. }
  57640. }
  57641. return false;
  57642. }
  57643. function isVariableDeclarator(node, opts) {
  57644. if (!node)
  57645. return false;
  57646. const nodeType = node.type;
  57647. if (nodeType === "VariableDeclarator") {
  57648. if (typeof opts === "undefined") {
  57649. return true;
  57650. } else {
  57651. return (0, _shallowEqual.default)(node, opts);
  57652. }
  57653. }
  57654. return false;
  57655. }
  57656. function isWhileStatement(node, opts) {
  57657. if (!node)
  57658. return false;
  57659. const nodeType = node.type;
  57660. if (nodeType === "WhileStatement") {
  57661. if (typeof opts === "undefined") {
  57662. return true;
  57663. } else {
  57664. return (0, _shallowEqual.default)(node, opts);
  57665. }
  57666. }
  57667. return false;
  57668. }
  57669. function isWithStatement(node, opts) {
  57670. if (!node)
  57671. return false;
  57672. const nodeType = node.type;
  57673. if (nodeType === "WithStatement") {
  57674. if (typeof opts === "undefined") {
  57675. return true;
  57676. } else {
  57677. return (0, _shallowEqual.default)(node, opts);
  57678. }
  57679. }
  57680. return false;
  57681. }
  57682. function isAssignmentPattern(node, opts) {
  57683. if (!node)
  57684. return false;
  57685. const nodeType = node.type;
  57686. if (nodeType === "AssignmentPattern") {
  57687. if (typeof opts === "undefined") {
  57688. return true;
  57689. } else {
  57690. return (0, _shallowEqual.default)(node, opts);
  57691. }
  57692. }
  57693. return false;
  57694. }
  57695. function isArrayPattern(node, opts) {
  57696. if (!node)
  57697. return false;
  57698. const nodeType = node.type;
  57699. if (nodeType === "ArrayPattern") {
  57700. if (typeof opts === "undefined") {
  57701. return true;
  57702. } else {
  57703. return (0, _shallowEqual.default)(node, opts);
  57704. }
  57705. }
  57706. return false;
  57707. }
  57708. function isArrowFunctionExpression(node, opts) {
  57709. if (!node)
  57710. return false;
  57711. const nodeType = node.type;
  57712. if (nodeType === "ArrowFunctionExpression") {
  57713. if (typeof opts === "undefined") {
  57714. return true;
  57715. } else {
  57716. return (0, _shallowEqual.default)(node, opts);
  57717. }
  57718. }
  57719. return false;
  57720. }
  57721. function isClassBody(node, opts) {
  57722. if (!node)
  57723. return false;
  57724. const nodeType = node.type;
  57725. if (nodeType === "ClassBody") {
  57726. if (typeof opts === "undefined") {
  57727. return true;
  57728. } else {
  57729. return (0, _shallowEqual.default)(node, opts);
  57730. }
  57731. }
  57732. return false;
  57733. }
  57734. function isClassExpression(node, opts) {
  57735. if (!node)
  57736. return false;
  57737. const nodeType = node.type;
  57738. if (nodeType === "ClassExpression") {
  57739. if (typeof opts === "undefined") {
  57740. return true;
  57741. } else {
  57742. return (0, _shallowEqual.default)(node, opts);
  57743. }
  57744. }
  57745. return false;
  57746. }
  57747. function isClassDeclaration(node, opts) {
  57748. if (!node)
  57749. return false;
  57750. const nodeType = node.type;
  57751. if (nodeType === "ClassDeclaration") {
  57752. if (typeof opts === "undefined") {
  57753. return true;
  57754. } else {
  57755. return (0, _shallowEqual.default)(node, opts);
  57756. }
  57757. }
  57758. return false;
  57759. }
  57760. function isExportAllDeclaration(node, opts) {
  57761. if (!node)
  57762. return false;
  57763. const nodeType = node.type;
  57764. if (nodeType === "ExportAllDeclaration") {
  57765. if (typeof opts === "undefined") {
  57766. return true;
  57767. } else {
  57768. return (0, _shallowEqual.default)(node, opts);
  57769. }
  57770. }
  57771. return false;
  57772. }
  57773. function isExportDefaultDeclaration(node, opts) {
  57774. if (!node)
  57775. return false;
  57776. const nodeType = node.type;
  57777. if (nodeType === "ExportDefaultDeclaration") {
  57778. if (typeof opts === "undefined") {
  57779. return true;
  57780. } else {
  57781. return (0, _shallowEqual.default)(node, opts);
  57782. }
  57783. }
  57784. return false;
  57785. }
  57786. function isExportNamedDeclaration(node, opts) {
  57787. if (!node)
  57788. return false;
  57789. const nodeType = node.type;
  57790. if (nodeType === "ExportNamedDeclaration") {
  57791. if (typeof opts === "undefined") {
  57792. return true;
  57793. } else {
  57794. return (0, _shallowEqual.default)(node, opts);
  57795. }
  57796. }
  57797. return false;
  57798. }
  57799. function isExportSpecifier(node, opts) {
  57800. if (!node)
  57801. return false;
  57802. const nodeType = node.type;
  57803. if (nodeType === "ExportSpecifier") {
  57804. if (typeof opts === "undefined") {
  57805. return true;
  57806. } else {
  57807. return (0, _shallowEqual.default)(node, opts);
  57808. }
  57809. }
  57810. return false;
  57811. }
  57812. function isForOfStatement(node, opts) {
  57813. if (!node)
  57814. return false;
  57815. const nodeType = node.type;
  57816. if (nodeType === "ForOfStatement") {
  57817. if (typeof opts === "undefined") {
  57818. return true;
  57819. } else {
  57820. return (0, _shallowEqual.default)(node, opts);
  57821. }
  57822. }
  57823. return false;
  57824. }
  57825. function isImportDeclaration(node, opts) {
  57826. if (!node)
  57827. return false;
  57828. const nodeType = node.type;
  57829. if (nodeType === "ImportDeclaration") {
  57830. if (typeof opts === "undefined") {
  57831. return true;
  57832. } else {
  57833. return (0, _shallowEqual.default)(node, opts);
  57834. }
  57835. }
  57836. return false;
  57837. }
  57838. function isImportDefaultSpecifier(node, opts) {
  57839. if (!node)
  57840. return false;
  57841. const nodeType = node.type;
  57842. if (nodeType === "ImportDefaultSpecifier") {
  57843. if (typeof opts === "undefined") {
  57844. return true;
  57845. } else {
  57846. return (0, _shallowEqual.default)(node, opts);
  57847. }
  57848. }
  57849. return false;
  57850. }
  57851. function isImportNamespaceSpecifier(node, opts) {
  57852. if (!node)
  57853. return false;
  57854. const nodeType = node.type;
  57855. if (nodeType === "ImportNamespaceSpecifier") {
  57856. if (typeof opts === "undefined") {
  57857. return true;
  57858. } else {
  57859. return (0, _shallowEqual.default)(node, opts);
  57860. }
  57861. }
  57862. return false;
  57863. }
  57864. function isImportSpecifier(node, opts) {
  57865. if (!node)
  57866. return false;
  57867. const nodeType = node.type;
  57868. if (nodeType === "ImportSpecifier") {
  57869. if (typeof opts === "undefined") {
  57870. return true;
  57871. } else {
  57872. return (0, _shallowEqual.default)(node, opts);
  57873. }
  57874. }
  57875. return false;
  57876. }
  57877. function isMetaProperty(node, opts) {
  57878. if (!node)
  57879. return false;
  57880. const nodeType = node.type;
  57881. if (nodeType === "MetaProperty") {
  57882. if (typeof opts === "undefined") {
  57883. return true;
  57884. } else {
  57885. return (0, _shallowEqual.default)(node, opts);
  57886. }
  57887. }
  57888. return false;
  57889. }
  57890. function isClassMethod(node, opts) {
  57891. if (!node)
  57892. return false;
  57893. const nodeType = node.type;
  57894. if (nodeType === "ClassMethod") {
  57895. if (typeof opts === "undefined") {
  57896. return true;
  57897. } else {
  57898. return (0, _shallowEqual.default)(node, opts);
  57899. }
  57900. }
  57901. return false;
  57902. }
  57903. function isObjectPattern(node, opts) {
  57904. if (!node)
  57905. return false;
  57906. const nodeType = node.type;
  57907. if (nodeType === "ObjectPattern") {
  57908. if (typeof opts === "undefined") {
  57909. return true;
  57910. } else {
  57911. return (0, _shallowEqual.default)(node, opts);
  57912. }
  57913. }
  57914. return false;
  57915. }
  57916. function isSpreadElement(node, opts) {
  57917. if (!node)
  57918. return false;
  57919. const nodeType = node.type;
  57920. if (nodeType === "SpreadElement") {
  57921. if (typeof opts === "undefined") {
  57922. return true;
  57923. } else {
  57924. return (0, _shallowEqual.default)(node, opts);
  57925. }
  57926. }
  57927. return false;
  57928. }
  57929. function isSuper(node, opts) {
  57930. if (!node)
  57931. return false;
  57932. const nodeType = node.type;
  57933. if (nodeType === "Super") {
  57934. if (typeof opts === "undefined") {
  57935. return true;
  57936. } else {
  57937. return (0, _shallowEqual.default)(node, opts);
  57938. }
  57939. }
  57940. return false;
  57941. }
  57942. function isTaggedTemplateExpression(node, opts) {
  57943. if (!node)
  57944. return false;
  57945. const nodeType = node.type;
  57946. if (nodeType === "TaggedTemplateExpression") {
  57947. if (typeof opts === "undefined") {
  57948. return true;
  57949. } else {
  57950. return (0, _shallowEqual.default)(node, opts);
  57951. }
  57952. }
  57953. return false;
  57954. }
  57955. function isTemplateElement(node, opts) {
  57956. if (!node)
  57957. return false;
  57958. const nodeType = node.type;
  57959. if (nodeType === "TemplateElement") {
  57960. if (typeof opts === "undefined") {
  57961. return true;
  57962. } else {
  57963. return (0, _shallowEqual.default)(node, opts);
  57964. }
  57965. }
  57966. return false;
  57967. }
  57968. function isTemplateLiteral(node, opts) {
  57969. if (!node)
  57970. return false;
  57971. const nodeType = node.type;
  57972. if (nodeType === "TemplateLiteral") {
  57973. if (typeof opts === "undefined") {
  57974. return true;
  57975. } else {
  57976. return (0, _shallowEqual.default)(node, opts);
  57977. }
  57978. }
  57979. return false;
  57980. }
  57981. function isYieldExpression(node, opts) {
  57982. if (!node)
  57983. return false;
  57984. const nodeType = node.type;
  57985. if (nodeType === "YieldExpression") {
  57986. if (typeof opts === "undefined") {
  57987. return true;
  57988. } else {
  57989. return (0, _shallowEqual.default)(node, opts);
  57990. }
  57991. }
  57992. return false;
  57993. }
  57994. function isAwaitExpression(node, opts) {
  57995. if (!node)
  57996. return false;
  57997. const nodeType = node.type;
  57998. if (nodeType === "AwaitExpression") {
  57999. if (typeof opts === "undefined") {
  58000. return true;
  58001. } else {
  58002. return (0, _shallowEqual.default)(node, opts);
  58003. }
  58004. }
  58005. return false;
  58006. }
  58007. function isImport(node, opts) {
  58008. if (!node)
  58009. return false;
  58010. const nodeType = node.type;
  58011. if (nodeType === "Import") {
  58012. if (typeof opts === "undefined") {
  58013. return true;
  58014. } else {
  58015. return (0, _shallowEqual.default)(node, opts);
  58016. }
  58017. }
  58018. return false;
  58019. }
  58020. function isBigIntLiteral(node, opts) {
  58021. if (!node)
  58022. return false;
  58023. const nodeType = node.type;
  58024. if (nodeType === "BigIntLiteral") {
  58025. if (typeof opts === "undefined") {
  58026. return true;
  58027. } else {
  58028. return (0, _shallowEqual.default)(node, opts);
  58029. }
  58030. }
  58031. return false;
  58032. }
  58033. function isExportNamespaceSpecifier(node, opts) {
  58034. if (!node)
  58035. return false;
  58036. const nodeType = node.type;
  58037. if (nodeType === "ExportNamespaceSpecifier") {
  58038. if (typeof opts === "undefined") {
  58039. return true;
  58040. } else {
  58041. return (0, _shallowEqual.default)(node, opts);
  58042. }
  58043. }
  58044. return false;
  58045. }
  58046. function isOptionalMemberExpression(node, opts) {
  58047. if (!node)
  58048. return false;
  58049. const nodeType = node.type;
  58050. if (nodeType === "OptionalMemberExpression") {
  58051. if (typeof opts === "undefined") {
  58052. return true;
  58053. } else {
  58054. return (0, _shallowEqual.default)(node, opts);
  58055. }
  58056. }
  58057. return false;
  58058. }
  58059. function isOptionalCallExpression(node, opts) {
  58060. if (!node)
  58061. return false;
  58062. const nodeType = node.type;
  58063. if (nodeType === "OptionalCallExpression") {
  58064. if (typeof opts === "undefined") {
  58065. return true;
  58066. } else {
  58067. return (0, _shallowEqual.default)(node, opts);
  58068. }
  58069. }
  58070. return false;
  58071. }
  58072. function isAnyTypeAnnotation(node, opts) {
  58073. if (!node)
  58074. return false;
  58075. const nodeType = node.type;
  58076. if (nodeType === "AnyTypeAnnotation") {
  58077. if (typeof opts === "undefined") {
  58078. return true;
  58079. } else {
  58080. return (0, _shallowEqual.default)(node, opts);
  58081. }
  58082. }
  58083. return false;
  58084. }
  58085. function isArrayTypeAnnotation(node, opts) {
  58086. if (!node)
  58087. return false;
  58088. const nodeType = node.type;
  58089. if (nodeType === "ArrayTypeAnnotation") {
  58090. if (typeof opts === "undefined") {
  58091. return true;
  58092. } else {
  58093. return (0, _shallowEqual.default)(node, opts);
  58094. }
  58095. }
  58096. return false;
  58097. }
  58098. function isBooleanTypeAnnotation(node, opts) {
  58099. if (!node)
  58100. return false;
  58101. const nodeType = node.type;
  58102. if (nodeType === "BooleanTypeAnnotation") {
  58103. if (typeof opts === "undefined") {
  58104. return true;
  58105. } else {
  58106. return (0, _shallowEqual.default)(node, opts);
  58107. }
  58108. }
  58109. return false;
  58110. }
  58111. function isBooleanLiteralTypeAnnotation(node, opts) {
  58112. if (!node)
  58113. return false;
  58114. const nodeType = node.type;
  58115. if (nodeType === "BooleanLiteralTypeAnnotation") {
  58116. if (typeof opts === "undefined") {
  58117. return true;
  58118. } else {
  58119. return (0, _shallowEqual.default)(node, opts);
  58120. }
  58121. }
  58122. return false;
  58123. }
  58124. function isNullLiteralTypeAnnotation(node, opts) {
  58125. if (!node)
  58126. return false;
  58127. const nodeType = node.type;
  58128. if (nodeType === "NullLiteralTypeAnnotation") {
  58129. if (typeof opts === "undefined") {
  58130. return true;
  58131. } else {
  58132. return (0, _shallowEqual.default)(node, opts);
  58133. }
  58134. }
  58135. return false;
  58136. }
  58137. function isClassImplements(node, opts) {
  58138. if (!node)
  58139. return false;
  58140. const nodeType = node.type;
  58141. if (nodeType === "ClassImplements") {
  58142. if (typeof opts === "undefined") {
  58143. return true;
  58144. } else {
  58145. return (0, _shallowEqual.default)(node, opts);
  58146. }
  58147. }
  58148. return false;
  58149. }
  58150. function isDeclareClass(node, opts) {
  58151. if (!node)
  58152. return false;
  58153. const nodeType = node.type;
  58154. if (nodeType === "DeclareClass") {
  58155. if (typeof opts === "undefined") {
  58156. return true;
  58157. } else {
  58158. return (0, _shallowEqual.default)(node, opts);
  58159. }
  58160. }
  58161. return false;
  58162. }
  58163. function isDeclareFunction(node, opts) {
  58164. if (!node)
  58165. return false;
  58166. const nodeType = node.type;
  58167. if (nodeType === "DeclareFunction") {
  58168. if (typeof opts === "undefined") {
  58169. return true;
  58170. } else {
  58171. return (0, _shallowEqual.default)(node, opts);
  58172. }
  58173. }
  58174. return false;
  58175. }
  58176. function isDeclareInterface(node, opts) {
  58177. if (!node)
  58178. return false;
  58179. const nodeType = node.type;
  58180. if (nodeType === "DeclareInterface") {
  58181. if (typeof opts === "undefined") {
  58182. return true;
  58183. } else {
  58184. return (0, _shallowEqual.default)(node, opts);
  58185. }
  58186. }
  58187. return false;
  58188. }
  58189. function isDeclareModule(node, opts) {
  58190. if (!node)
  58191. return false;
  58192. const nodeType = node.type;
  58193. if (nodeType === "DeclareModule") {
  58194. if (typeof opts === "undefined") {
  58195. return true;
  58196. } else {
  58197. return (0, _shallowEqual.default)(node, opts);
  58198. }
  58199. }
  58200. return false;
  58201. }
  58202. function isDeclareModuleExports(node, opts) {
  58203. if (!node)
  58204. return false;
  58205. const nodeType = node.type;
  58206. if (nodeType === "DeclareModuleExports") {
  58207. if (typeof opts === "undefined") {
  58208. return true;
  58209. } else {
  58210. return (0, _shallowEqual.default)(node, opts);
  58211. }
  58212. }
  58213. return false;
  58214. }
  58215. function isDeclareTypeAlias(node, opts) {
  58216. if (!node)
  58217. return false;
  58218. const nodeType = node.type;
  58219. if (nodeType === "DeclareTypeAlias") {
  58220. if (typeof opts === "undefined") {
  58221. return true;
  58222. } else {
  58223. return (0, _shallowEqual.default)(node, opts);
  58224. }
  58225. }
  58226. return false;
  58227. }
  58228. function isDeclareOpaqueType(node, opts) {
  58229. if (!node)
  58230. return false;
  58231. const nodeType = node.type;
  58232. if (nodeType === "DeclareOpaqueType") {
  58233. if (typeof opts === "undefined") {
  58234. return true;
  58235. } else {
  58236. return (0, _shallowEqual.default)(node, opts);
  58237. }
  58238. }
  58239. return false;
  58240. }
  58241. function isDeclareVariable(node, opts) {
  58242. if (!node)
  58243. return false;
  58244. const nodeType = node.type;
  58245. if (nodeType === "DeclareVariable") {
  58246. if (typeof opts === "undefined") {
  58247. return true;
  58248. } else {
  58249. return (0, _shallowEqual.default)(node, opts);
  58250. }
  58251. }
  58252. return false;
  58253. }
  58254. function isDeclareExportDeclaration(node, opts) {
  58255. if (!node)
  58256. return false;
  58257. const nodeType = node.type;
  58258. if (nodeType === "DeclareExportDeclaration") {
  58259. if (typeof opts === "undefined") {
  58260. return true;
  58261. } else {
  58262. return (0, _shallowEqual.default)(node, opts);
  58263. }
  58264. }
  58265. return false;
  58266. }
  58267. function isDeclareExportAllDeclaration(node, opts) {
  58268. if (!node)
  58269. return false;
  58270. const nodeType = node.type;
  58271. if (nodeType === "DeclareExportAllDeclaration") {
  58272. if (typeof opts === "undefined") {
  58273. return true;
  58274. } else {
  58275. return (0, _shallowEqual.default)(node, opts);
  58276. }
  58277. }
  58278. return false;
  58279. }
  58280. function isDeclaredPredicate(node, opts) {
  58281. if (!node)
  58282. return false;
  58283. const nodeType = node.type;
  58284. if (nodeType === "DeclaredPredicate") {
  58285. if (typeof opts === "undefined") {
  58286. return true;
  58287. } else {
  58288. return (0, _shallowEqual.default)(node, opts);
  58289. }
  58290. }
  58291. return false;
  58292. }
  58293. function isExistsTypeAnnotation(node, opts) {
  58294. if (!node)
  58295. return false;
  58296. const nodeType = node.type;
  58297. if (nodeType === "ExistsTypeAnnotation") {
  58298. if (typeof opts === "undefined") {
  58299. return true;
  58300. } else {
  58301. return (0, _shallowEqual.default)(node, opts);
  58302. }
  58303. }
  58304. return false;
  58305. }
  58306. function isFunctionTypeAnnotation(node, opts) {
  58307. if (!node)
  58308. return false;
  58309. const nodeType = node.type;
  58310. if (nodeType === "FunctionTypeAnnotation") {
  58311. if (typeof opts === "undefined") {
  58312. return true;
  58313. } else {
  58314. return (0, _shallowEqual.default)(node, opts);
  58315. }
  58316. }
  58317. return false;
  58318. }
  58319. function isFunctionTypeParam(node, opts) {
  58320. if (!node)
  58321. return false;
  58322. const nodeType = node.type;
  58323. if (nodeType === "FunctionTypeParam") {
  58324. if (typeof opts === "undefined") {
  58325. return true;
  58326. } else {
  58327. return (0, _shallowEqual.default)(node, opts);
  58328. }
  58329. }
  58330. return false;
  58331. }
  58332. function isGenericTypeAnnotation(node, opts) {
  58333. if (!node)
  58334. return false;
  58335. const nodeType = node.type;
  58336. if (nodeType === "GenericTypeAnnotation") {
  58337. if (typeof opts === "undefined") {
  58338. return true;
  58339. } else {
  58340. return (0, _shallowEqual.default)(node, opts);
  58341. }
  58342. }
  58343. return false;
  58344. }
  58345. function isInferredPredicate(node, opts) {
  58346. if (!node)
  58347. return false;
  58348. const nodeType = node.type;
  58349. if (nodeType === "InferredPredicate") {
  58350. if (typeof opts === "undefined") {
  58351. return true;
  58352. } else {
  58353. return (0, _shallowEqual.default)(node, opts);
  58354. }
  58355. }
  58356. return false;
  58357. }
  58358. function isInterfaceExtends(node, opts) {
  58359. if (!node)
  58360. return false;
  58361. const nodeType = node.type;
  58362. if (nodeType === "InterfaceExtends") {
  58363. if (typeof opts === "undefined") {
  58364. return true;
  58365. } else {
  58366. return (0, _shallowEqual.default)(node, opts);
  58367. }
  58368. }
  58369. return false;
  58370. }
  58371. function isInterfaceDeclaration(node, opts) {
  58372. if (!node)
  58373. return false;
  58374. const nodeType = node.type;
  58375. if (nodeType === "InterfaceDeclaration") {
  58376. if (typeof opts === "undefined") {
  58377. return true;
  58378. } else {
  58379. return (0, _shallowEqual.default)(node, opts);
  58380. }
  58381. }
  58382. return false;
  58383. }
  58384. function isInterfaceTypeAnnotation(node, opts) {
  58385. if (!node)
  58386. return false;
  58387. const nodeType = node.type;
  58388. if (nodeType === "InterfaceTypeAnnotation") {
  58389. if (typeof opts === "undefined") {
  58390. return true;
  58391. } else {
  58392. return (0, _shallowEqual.default)(node, opts);
  58393. }
  58394. }
  58395. return false;
  58396. }
  58397. function isIntersectionTypeAnnotation(node, opts) {
  58398. if (!node)
  58399. return false;
  58400. const nodeType = node.type;
  58401. if (nodeType === "IntersectionTypeAnnotation") {
  58402. if (typeof opts === "undefined") {
  58403. return true;
  58404. } else {
  58405. return (0, _shallowEqual.default)(node, opts);
  58406. }
  58407. }
  58408. return false;
  58409. }
  58410. function isMixedTypeAnnotation(node, opts) {
  58411. if (!node)
  58412. return false;
  58413. const nodeType = node.type;
  58414. if (nodeType === "MixedTypeAnnotation") {
  58415. if (typeof opts === "undefined") {
  58416. return true;
  58417. } else {
  58418. return (0, _shallowEqual.default)(node, opts);
  58419. }
  58420. }
  58421. return false;
  58422. }
  58423. function isEmptyTypeAnnotation(node, opts) {
  58424. if (!node)
  58425. return false;
  58426. const nodeType = node.type;
  58427. if (nodeType === "EmptyTypeAnnotation") {
  58428. if (typeof opts === "undefined") {
  58429. return true;
  58430. } else {
  58431. return (0, _shallowEqual.default)(node, opts);
  58432. }
  58433. }
  58434. return false;
  58435. }
  58436. function isNullableTypeAnnotation(node, opts) {
  58437. if (!node)
  58438. return false;
  58439. const nodeType = node.type;
  58440. if (nodeType === "NullableTypeAnnotation") {
  58441. if (typeof opts === "undefined") {
  58442. return true;
  58443. } else {
  58444. return (0, _shallowEqual.default)(node, opts);
  58445. }
  58446. }
  58447. return false;
  58448. }
  58449. function isNumberLiteralTypeAnnotation(node, opts) {
  58450. if (!node)
  58451. return false;
  58452. const nodeType = node.type;
  58453. if (nodeType === "NumberLiteralTypeAnnotation") {
  58454. if (typeof opts === "undefined") {
  58455. return true;
  58456. } else {
  58457. return (0, _shallowEqual.default)(node, opts);
  58458. }
  58459. }
  58460. return false;
  58461. }
  58462. function isNumberTypeAnnotation(node, opts) {
  58463. if (!node)
  58464. return false;
  58465. const nodeType = node.type;
  58466. if (nodeType === "NumberTypeAnnotation") {
  58467. if (typeof opts === "undefined") {
  58468. return true;
  58469. } else {
  58470. return (0, _shallowEqual.default)(node, opts);
  58471. }
  58472. }
  58473. return false;
  58474. }
  58475. function isObjectTypeAnnotation(node, opts) {
  58476. if (!node)
  58477. return false;
  58478. const nodeType = node.type;
  58479. if (nodeType === "ObjectTypeAnnotation") {
  58480. if (typeof opts === "undefined") {
  58481. return true;
  58482. } else {
  58483. return (0, _shallowEqual.default)(node, opts);
  58484. }
  58485. }
  58486. return false;
  58487. }
  58488. function isObjectTypeInternalSlot(node, opts) {
  58489. if (!node)
  58490. return false;
  58491. const nodeType = node.type;
  58492. if (nodeType === "ObjectTypeInternalSlot") {
  58493. if (typeof opts === "undefined") {
  58494. return true;
  58495. } else {
  58496. return (0, _shallowEqual.default)(node, opts);
  58497. }
  58498. }
  58499. return false;
  58500. }
  58501. function isObjectTypeCallProperty(node, opts) {
  58502. if (!node)
  58503. return false;
  58504. const nodeType = node.type;
  58505. if (nodeType === "ObjectTypeCallProperty") {
  58506. if (typeof opts === "undefined") {
  58507. return true;
  58508. } else {
  58509. return (0, _shallowEqual.default)(node, opts);
  58510. }
  58511. }
  58512. return false;
  58513. }
  58514. function isObjectTypeIndexer(node, opts) {
  58515. if (!node)
  58516. return false;
  58517. const nodeType = node.type;
  58518. if (nodeType === "ObjectTypeIndexer") {
  58519. if (typeof opts === "undefined") {
  58520. return true;
  58521. } else {
  58522. return (0, _shallowEqual.default)(node, opts);
  58523. }
  58524. }
  58525. return false;
  58526. }
  58527. function isObjectTypeProperty(node, opts) {
  58528. if (!node)
  58529. return false;
  58530. const nodeType = node.type;
  58531. if (nodeType === "ObjectTypeProperty") {
  58532. if (typeof opts === "undefined") {
  58533. return true;
  58534. } else {
  58535. return (0, _shallowEqual.default)(node, opts);
  58536. }
  58537. }
  58538. return false;
  58539. }
  58540. function isObjectTypeSpreadProperty(node, opts) {
  58541. if (!node)
  58542. return false;
  58543. const nodeType = node.type;
  58544. if (nodeType === "ObjectTypeSpreadProperty") {
  58545. if (typeof opts === "undefined") {
  58546. return true;
  58547. } else {
  58548. return (0, _shallowEqual.default)(node, opts);
  58549. }
  58550. }
  58551. return false;
  58552. }
  58553. function isOpaqueType(node, opts) {
  58554. if (!node)
  58555. return false;
  58556. const nodeType = node.type;
  58557. if (nodeType === "OpaqueType") {
  58558. if (typeof opts === "undefined") {
  58559. return true;
  58560. } else {
  58561. return (0, _shallowEqual.default)(node, opts);
  58562. }
  58563. }
  58564. return false;
  58565. }
  58566. function isQualifiedTypeIdentifier(node, opts) {
  58567. if (!node)
  58568. return false;
  58569. const nodeType = node.type;
  58570. if (nodeType === "QualifiedTypeIdentifier") {
  58571. if (typeof opts === "undefined") {
  58572. return true;
  58573. } else {
  58574. return (0, _shallowEqual.default)(node, opts);
  58575. }
  58576. }
  58577. return false;
  58578. }
  58579. function isStringLiteralTypeAnnotation(node, opts) {
  58580. if (!node)
  58581. return false;
  58582. const nodeType = node.type;
  58583. if (nodeType === "StringLiteralTypeAnnotation") {
  58584. if (typeof opts === "undefined") {
  58585. return true;
  58586. } else {
  58587. return (0, _shallowEqual.default)(node, opts);
  58588. }
  58589. }
  58590. return false;
  58591. }
  58592. function isStringTypeAnnotation(node, opts) {
  58593. if (!node)
  58594. return false;
  58595. const nodeType = node.type;
  58596. if (nodeType === "StringTypeAnnotation") {
  58597. if (typeof opts === "undefined") {
  58598. return true;
  58599. } else {
  58600. return (0, _shallowEqual.default)(node, opts);
  58601. }
  58602. }
  58603. return false;
  58604. }
  58605. function isSymbolTypeAnnotation(node, opts) {
  58606. if (!node)
  58607. return false;
  58608. const nodeType = node.type;
  58609. if (nodeType === "SymbolTypeAnnotation") {
  58610. if (typeof opts === "undefined") {
  58611. return true;
  58612. } else {
  58613. return (0, _shallowEqual.default)(node, opts);
  58614. }
  58615. }
  58616. return false;
  58617. }
  58618. function isThisTypeAnnotation(node, opts) {
  58619. if (!node)
  58620. return false;
  58621. const nodeType = node.type;
  58622. if (nodeType === "ThisTypeAnnotation") {
  58623. if (typeof opts === "undefined") {
  58624. return true;
  58625. } else {
  58626. return (0, _shallowEqual.default)(node, opts);
  58627. }
  58628. }
  58629. return false;
  58630. }
  58631. function isTupleTypeAnnotation(node, opts) {
  58632. if (!node)
  58633. return false;
  58634. const nodeType = node.type;
  58635. if (nodeType === "TupleTypeAnnotation") {
  58636. if (typeof opts === "undefined") {
  58637. return true;
  58638. } else {
  58639. return (0, _shallowEqual.default)(node, opts);
  58640. }
  58641. }
  58642. return false;
  58643. }
  58644. function isTypeofTypeAnnotation(node, opts) {
  58645. if (!node)
  58646. return false;
  58647. const nodeType = node.type;
  58648. if (nodeType === "TypeofTypeAnnotation") {
  58649. if (typeof opts === "undefined") {
  58650. return true;
  58651. } else {
  58652. return (0, _shallowEqual.default)(node, opts);
  58653. }
  58654. }
  58655. return false;
  58656. }
  58657. function isTypeAlias(node, opts) {
  58658. if (!node)
  58659. return false;
  58660. const nodeType = node.type;
  58661. if (nodeType === "TypeAlias") {
  58662. if (typeof opts === "undefined") {
  58663. return true;
  58664. } else {
  58665. return (0, _shallowEqual.default)(node, opts);
  58666. }
  58667. }
  58668. return false;
  58669. }
  58670. function isTypeAnnotation(node, opts) {
  58671. if (!node)
  58672. return false;
  58673. const nodeType = node.type;
  58674. if (nodeType === "TypeAnnotation") {
  58675. if (typeof opts === "undefined") {
  58676. return true;
  58677. } else {
  58678. return (0, _shallowEqual.default)(node, opts);
  58679. }
  58680. }
  58681. return false;
  58682. }
  58683. function isTypeCastExpression(node, opts) {
  58684. if (!node)
  58685. return false;
  58686. const nodeType = node.type;
  58687. if (nodeType === "TypeCastExpression") {
  58688. if (typeof opts === "undefined") {
  58689. return true;
  58690. } else {
  58691. return (0, _shallowEqual.default)(node, opts);
  58692. }
  58693. }
  58694. return false;
  58695. }
  58696. function isTypeParameter(node, opts) {
  58697. if (!node)
  58698. return false;
  58699. const nodeType = node.type;
  58700. if (nodeType === "TypeParameter") {
  58701. if (typeof opts === "undefined") {
  58702. return true;
  58703. } else {
  58704. return (0, _shallowEqual.default)(node, opts);
  58705. }
  58706. }
  58707. return false;
  58708. }
  58709. function isTypeParameterDeclaration(node, opts) {
  58710. if (!node)
  58711. return false;
  58712. const nodeType = node.type;
  58713. if (nodeType === "TypeParameterDeclaration") {
  58714. if (typeof opts === "undefined") {
  58715. return true;
  58716. } else {
  58717. return (0, _shallowEqual.default)(node, opts);
  58718. }
  58719. }
  58720. return false;
  58721. }
  58722. function isTypeParameterInstantiation(node, opts) {
  58723. if (!node)
  58724. return false;
  58725. const nodeType = node.type;
  58726. if (nodeType === "TypeParameterInstantiation") {
  58727. if (typeof opts === "undefined") {
  58728. return true;
  58729. } else {
  58730. return (0, _shallowEqual.default)(node, opts);
  58731. }
  58732. }
  58733. return false;
  58734. }
  58735. function isUnionTypeAnnotation(node, opts) {
  58736. if (!node)
  58737. return false;
  58738. const nodeType = node.type;
  58739. if (nodeType === "UnionTypeAnnotation") {
  58740. if (typeof opts === "undefined") {
  58741. return true;
  58742. } else {
  58743. return (0, _shallowEqual.default)(node, opts);
  58744. }
  58745. }
  58746. return false;
  58747. }
  58748. function isVariance(node, opts) {
  58749. if (!node)
  58750. return false;
  58751. const nodeType = node.type;
  58752. if (nodeType === "Variance") {
  58753. if (typeof opts === "undefined") {
  58754. return true;
  58755. } else {
  58756. return (0, _shallowEqual.default)(node, opts);
  58757. }
  58758. }
  58759. return false;
  58760. }
  58761. function isVoidTypeAnnotation(node, opts) {
  58762. if (!node)
  58763. return false;
  58764. const nodeType = node.type;
  58765. if (nodeType === "VoidTypeAnnotation") {
  58766. if (typeof opts === "undefined") {
  58767. return true;
  58768. } else {
  58769. return (0, _shallowEqual.default)(node, opts);
  58770. }
  58771. }
  58772. return false;
  58773. }
  58774. function isEnumDeclaration(node, opts) {
  58775. if (!node)
  58776. return false;
  58777. const nodeType = node.type;
  58778. if (nodeType === "EnumDeclaration") {
  58779. if (typeof opts === "undefined") {
  58780. return true;
  58781. } else {
  58782. return (0, _shallowEqual.default)(node, opts);
  58783. }
  58784. }
  58785. return false;
  58786. }
  58787. function isEnumBooleanBody(node, opts) {
  58788. if (!node)
  58789. return false;
  58790. const nodeType = node.type;
  58791. if (nodeType === "EnumBooleanBody") {
  58792. if (typeof opts === "undefined") {
  58793. return true;
  58794. } else {
  58795. return (0, _shallowEqual.default)(node, opts);
  58796. }
  58797. }
  58798. return false;
  58799. }
  58800. function isEnumNumberBody(node, opts) {
  58801. if (!node)
  58802. return false;
  58803. const nodeType = node.type;
  58804. if (nodeType === "EnumNumberBody") {
  58805. if (typeof opts === "undefined") {
  58806. return true;
  58807. } else {
  58808. return (0, _shallowEqual.default)(node, opts);
  58809. }
  58810. }
  58811. return false;
  58812. }
  58813. function isEnumStringBody(node, opts) {
  58814. if (!node)
  58815. return false;
  58816. const nodeType = node.type;
  58817. if (nodeType === "EnumStringBody") {
  58818. if (typeof opts === "undefined") {
  58819. return true;
  58820. } else {
  58821. return (0, _shallowEqual.default)(node, opts);
  58822. }
  58823. }
  58824. return false;
  58825. }
  58826. function isEnumSymbolBody(node, opts) {
  58827. if (!node)
  58828. return false;
  58829. const nodeType = node.type;
  58830. if (nodeType === "EnumSymbolBody") {
  58831. if (typeof opts === "undefined") {
  58832. return true;
  58833. } else {
  58834. return (0, _shallowEqual.default)(node, opts);
  58835. }
  58836. }
  58837. return false;
  58838. }
  58839. function isEnumBooleanMember(node, opts) {
  58840. if (!node)
  58841. return false;
  58842. const nodeType = node.type;
  58843. if (nodeType === "EnumBooleanMember") {
  58844. if (typeof opts === "undefined") {
  58845. return true;
  58846. } else {
  58847. return (0, _shallowEqual.default)(node, opts);
  58848. }
  58849. }
  58850. return false;
  58851. }
  58852. function isEnumNumberMember(node, opts) {
  58853. if (!node)
  58854. return false;
  58855. const nodeType = node.type;
  58856. if (nodeType === "EnumNumberMember") {
  58857. if (typeof opts === "undefined") {
  58858. return true;
  58859. } else {
  58860. return (0, _shallowEqual.default)(node, opts);
  58861. }
  58862. }
  58863. return false;
  58864. }
  58865. function isEnumStringMember(node, opts) {
  58866. if (!node)
  58867. return false;
  58868. const nodeType = node.type;
  58869. if (nodeType === "EnumStringMember") {
  58870. if (typeof opts === "undefined") {
  58871. return true;
  58872. } else {
  58873. return (0, _shallowEqual.default)(node, opts);
  58874. }
  58875. }
  58876. return false;
  58877. }
  58878. function isEnumDefaultedMember(node, opts) {
  58879. if (!node)
  58880. return false;
  58881. const nodeType = node.type;
  58882. if (nodeType === "EnumDefaultedMember") {
  58883. if (typeof opts === "undefined") {
  58884. return true;
  58885. } else {
  58886. return (0, _shallowEqual.default)(node, opts);
  58887. }
  58888. }
  58889. return false;
  58890. }
  58891. function isIndexedAccessType(node, opts) {
  58892. if (!node)
  58893. return false;
  58894. const nodeType = node.type;
  58895. if (nodeType === "IndexedAccessType") {
  58896. if (typeof opts === "undefined") {
  58897. return true;
  58898. } else {
  58899. return (0, _shallowEqual.default)(node, opts);
  58900. }
  58901. }
  58902. return false;
  58903. }
  58904. function isOptionalIndexedAccessType(node, opts) {
  58905. if (!node)
  58906. return false;
  58907. const nodeType = node.type;
  58908. if (nodeType === "OptionalIndexedAccessType") {
  58909. if (typeof opts === "undefined") {
  58910. return true;
  58911. } else {
  58912. return (0, _shallowEqual.default)(node, opts);
  58913. }
  58914. }
  58915. return false;
  58916. }
  58917. function isJSXAttribute(node, opts) {
  58918. if (!node)
  58919. return false;
  58920. const nodeType = node.type;
  58921. if (nodeType === "JSXAttribute") {
  58922. if (typeof opts === "undefined") {
  58923. return true;
  58924. } else {
  58925. return (0, _shallowEqual.default)(node, opts);
  58926. }
  58927. }
  58928. return false;
  58929. }
  58930. function isJSXClosingElement(node, opts) {
  58931. if (!node)
  58932. return false;
  58933. const nodeType = node.type;
  58934. if (nodeType === "JSXClosingElement") {
  58935. if (typeof opts === "undefined") {
  58936. return true;
  58937. } else {
  58938. return (0, _shallowEqual.default)(node, opts);
  58939. }
  58940. }
  58941. return false;
  58942. }
  58943. function isJSXElement2(node, opts) {
  58944. if (!node)
  58945. return false;
  58946. const nodeType = node.type;
  58947. if (nodeType === "JSXElement") {
  58948. if (typeof opts === "undefined") {
  58949. return true;
  58950. } else {
  58951. return (0, _shallowEqual.default)(node, opts);
  58952. }
  58953. }
  58954. return false;
  58955. }
  58956. function isJSXEmptyExpression(node, opts) {
  58957. if (!node)
  58958. return false;
  58959. const nodeType = node.type;
  58960. if (nodeType === "JSXEmptyExpression") {
  58961. if (typeof opts === "undefined") {
  58962. return true;
  58963. } else {
  58964. return (0, _shallowEqual.default)(node, opts);
  58965. }
  58966. }
  58967. return false;
  58968. }
  58969. function isJSXExpressionContainer2(node, opts) {
  58970. if (!node)
  58971. return false;
  58972. const nodeType = node.type;
  58973. if (nodeType === "JSXExpressionContainer") {
  58974. if (typeof opts === "undefined") {
  58975. return true;
  58976. } else {
  58977. return (0, _shallowEqual.default)(node, opts);
  58978. }
  58979. }
  58980. return false;
  58981. }
  58982. function isJSXSpreadChild(node, opts) {
  58983. if (!node)
  58984. return false;
  58985. const nodeType = node.type;
  58986. if (nodeType === "JSXSpreadChild") {
  58987. if (typeof opts === "undefined") {
  58988. return true;
  58989. } else {
  58990. return (0, _shallowEqual.default)(node, opts);
  58991. }
  58992. }
  58993. return false;
  58994. }
  58995. function isJSXIdentifier2(node, opts) {
  58996. if (!node)
  58997. return false;
  58998. const nodeType = node.type;
  58999. if (nodeType === "JSXIdentifier") {
  59000. if (typeof opts === "undefined") {
  59001. return true;
  59002. } else {
  59003. return (0, _shallowEqual.default)(node, opts);
  59004. }
  59005. }
  59006. return false;
  59007. }
  59008. function isJSXMemberExpression(node, opts) {
  59009. if (!node)
  59010. return false;
  59011. const nodeType = node.type;
  59012. if (nodeType === "JSXMemberExpression") {
  59013. if (typeof opts === "undefined") {
  59014. return true;
  59015. } else {
  59016. return (0, _shallowEqual.default)(node, opts);
  59017. }
  59018. }
  59019. return false;
  59020. }
  59021. function isJSXNamespacedName(node, opts) {
  59022. if (!node)
  59023. return false;
  59024. const nodeType = node.type;
  59025. if (nodeType === "JSXNamespacedName") {
  59026. if (typeof opts === "undefined") {
  59027. return true;
  59028. } else {
  59029. return (0, _shallowEqual.default)(node, opts);
  59030. }
  59031. }
  59032. return false;
  59033. }
  59034. function isJSXOpeningElement(node, opts) {
  59035. if (!node)
  59036. return false;
  59037. const nodeType = node.type;
  59038. if (nodeType === "JSXOpeningElement") {
  59039. if (typeof opts === "undefined") {
  59040. return true;
  59041. } else {
  59042. return (0, _shallowEqual.default)(node, opts);
  59043. }
  59044. }
  59045. return false;
  59046. }
  59047. function isJSXSpreadAttribute(node, opts) {
  59048. if (!node)
  59049. return false;
  59050. const nodeType = node.type;
  59051. if (nodeType === "JSXSpreadAttribute") {
  59052. if (typeof opts === "undefined") {
  59053. return true;
  59054. } else {
  59055. return (0, _shallowEqual.default)(node, opts);
  59056. }
  59057. }
  59058. return false;
  59059. }
  59060. function isJSXText(node, opts) {
  59061. if (!node)
  59062. return false;
  59063. const nodeType = node.type;
  59064. if (nodeType === "JSXText") {
  59065. if (typeof opts === "undefined") {
  59066. return true;
  59067. } else {
  59068. return (0, _shallowEqual.default)(node, opts);
  59069. }
  59070. }
  59071. return false;
  59072. }
  59073. function isJSXFragment2(node, opts) {
  59074. if (!node)
  59075. return false;
  59076. const nodeType = node.type;
  59077. if (nodeType === "JSXFragment") {
  59078. if (typeof opts === "undefined") {
  59079. return true;
  59080. } else {
  59081. return (0, _shallowEqual.default)(node, opts);
  59082. }
  59083. }
  59084. return false;
  59085. }
  59086. function isJSXOpeningFragment(node, opts) {
  59087. if (!node)
  59088. return false;
  59089. const nodeType = node.type;
  59090. if (nodeType === "JSXOpeningFragment") {
  59091. if (typeof opts === "undefined") {
  59092. return true;
  59093. } else {
  59094. return (0, _shallowEqual.default)(node, opts);
  59095. }
  59096. }
  59097. return false;
  59098. }
  59099. function isJSXClosingFragment(node, opts) {
  59100. if (!node)
  59101. return false;
  59102. const nodeType = node.type;
  59103. if (nodeType === "JSXClosingFragment") {
  59104. if (typeof opts === "undefined") {
  59105. return true;
  59106. } else {
  59107. return (0, _shallowEqual.default)(node, opts);
  59108. }
  59109. }
  59110. return false;
  59111. }
  59112. function isNoop(node, opts) {
  59113. if (!node)
  59114. return false;
  59115. const nodeType = node.type;
  59116. if (nodeType === "Noop") {
  59117. if (typeof opts === "undefined") {
  59118. return true;
  59119. } else {
  59120. return (0, _shallowEqual.default)(node, opts);
  59121. }
  59122. }
  59123. return false;
  59124. }
  59125. function isPlaceholder(node, opts) {
  59126. if (!node)
  59127. return false;
  59128. const nodeType = node.type;
  59129. if (nodeType === "Placeholder") {
  59130. if (typeof opts === "undefined") {
  59131. return true;
  59132. } else {
  59133. return (0, _shallowEqual.default)(node, opts);
  59134. }
  59135. }
  59136. return false;
  59137. }
  59138. function isV8IntrinsicIdentifier(node, opts) {
  59139. if (!node)
  59140. return false;
  59141. const nodeType = node.type;
  59142. if (nodeType === "V8IntrinsicIdentifier") {
  59143. if (typeof opts === "undefined") {
  59144. return true;
  59145. } else {
  59146. return (0, _shallowEqual.default)(node, opts);
  59147. }
  59148. }
  59149. return false;
  59150. }
  59151. function isArgumentPlaceholder(node, opts) {
  59152. if (!node)
  59153. return false;
  59154. const nodeType = node.type;
  59155. if (nodeType === "ArgumentPlaceholder") {
  59156. if (typeof opts === "undefined") {
  59157. return true;
  59158. } else {
  59159. return (0, _shallowEqual.default)(node, opts);
  59160. }
  59161. }
  59162. return false;
  59163. }
  59164. function isBindExpression(node, opts) {
  59165. if (!node)
  59166. return false;
  59167. const nodeType = node.type;
  59168. if (nodeType === "BindExpression") {
  59169. if (typeof opts === "undefined") {
  59170. return true;
  59171. } else {
  59172. return (0, _shallowEqual.default)(node, opts);
  59173. }
  59174. }
  59175. return false;
  59176. }
  59177. function isClassProperty(node, opts) {
  59178. if (!node)
  59179. return false;
  59180. const nodeType = node.type;
  59181. if (nodeType === "ClassProperty") {
  59182. if (typeof opts === "undefined") {
  59183. return true;
  59184. } else {
  59185. return (0, _shallowEqual.default)(node, opts);
  59186. }
  59187. }
  59188. return false;
  59189. }
  59190. function isPipelineTopicExpression(node, opts) {
  59191. if (!node)
  59192. return false;
  59193. const nodeType = node.type;
  59194. if (nodeType === "PipelineTopicExpression") {
  59195. if (typeof opts === "undefined") {
  59196. return true;
  59197. } else {
  59198. return (0, _shallowEqual.default)(node, opts);
  59199. }
  59200. }
  59201. return false;
  59202. }
  59203. function isPipelineBareFunction(node, opts) {
  59204. if (!node)
  59205. return false;
  59206. const nodeType = node.type;
  59207. if (nodeType === "PipelineBareFunction") {
  59208. if (typeof opts === "undefined") {
  59209. return true;
  59210. } else {
  59211. return (0, _shallowEqual.default)(node, opts);
  59212. }
  59213. }
  59214. return false;
  59215. }
  59216. function isPipelinePrimaryTopicReference(node, opts) {
  59217. if (!node)
  59218. return false;
  59219. const nodeType = node.type;
  59220. if (nodeType === "PipelinePrimaryTopicReference") {
  59221. if (typeof opts === "undefined") {
  59222. return true;
  59223. } else {
  59224. return (0, _shallowEqual.default)(node, opts);
  59225. }
  59226. }
  59227. return false;
  59228. }
  59229. function isClassPrivateProperty(node, opts) {
  59230. if (!node)
  59231. return false;
  59232. const nodeType = node.type;
  59233. if (nodeType === "ClassPrivateProperty") {
  59234. if (typeof opts === "undefined") {
  59235. return true;
  59236. } else {
  59237. return (0, _shallowEqual.default)(node, opts);
  59238. }
  59239. }
  59240. return false;
  59241. }
  59242. function isClassPrivateMethod(node, opts) {
  59243. if (!node)
  59244. return false;
  59245. const nodeType = node.type;
  59246. if (nodeType === "ClassPrivateMethod") {
  59247. if (typeof opts === "undefined") {
  59248. return true;
  59249. } else {
  59250. return (0, _shallowEqual.default)(node, opts);
  59251. }
  59252. }
  59253. return false;
  59254. }
  59255. function isImportAttribute(node, opts) {
  59256. if (!node)
  59257. return false;
  59258. const nodeType = node.type;
  59259. if (nodeType === "ImportAttribute") {
  59260. if (typeof opts === "undefined") {
  59261. return true;
  59262. } else {
  59263. return (0, _shallowEqual.default)(node, opts);
  59264. }
  59265. }
  59266. return false;
  59267. }
  59268. function isDecorator(node, opts) {
  59269. if (!node)
  59270. return false;
  59271. const nodeType = node.type;
  59272. if (nodeType === "Decorator") {
  59273. if (typeof opts === "undefined") {
  59274. return true;
  59275. } else {
  59276. return (0, _shallowEqual.default)(node, opts);
  59277. }
  59278. }
  59279. return false;
  59280. }
  59281. function isDoExpression(node, opts) {
  59282. if (!node)
  59283. return false;
  59284. const nodeType = node.type;
  59285. if (nodeType === "DoExpression") {
  59286. if (typeof opts === "undefined") {
  59287. return true;
  59288. } else {
  59289. return (0, _shallowEqual.default)(node, opts);
  59290. }
  59291. }
  59292. return false;
  59293. }
  59294. function isExportDefaultSpecifier(node, opts) {
  59295. if (!node)
  59296. return false;
  59297. const nodeType = node.type;
  59298. if (nodeType === "ExportDefaultSpecifier") {
  59299. if (typeof opts === "undefined") {
  59300. return true;
  59301. } else {
  59302. return (0, _shallowEqual.default)(node, opts);
  59303. }
  59304. }
  59305. return false;
  59306. }
  59307. function isPrivateName(node, opts) {
  59308. if (!node)
  59309. return false;
  59310. const nodeType = node.type;
  59311. if (nodeType === "PrivateName") {
  59312. if (typeof opts === "undefined") {
  59313. return true;
  59314. } else {
  59315. return (0, _shallowEqual.default)(node, opts);
  59316. }
  59317. }
  59318. return false;
  59319. }
  59320. function isRecordExpression(node, opts) {
  59321. if (!node)
  59322. return false;
  59323. const nodeType = node.type;
  59324. if (nodeType === "RecordExpression") {
  59325. if (typeof opts === "undefined") {
  59326. return true;
  59327. } else {
  59328. return (0, _shallowEqual.default)(node, opts);
  59329. }
  59330. }
  59331. return false;
  59332. }
  59333. function isTupleExpression(node, opts) {
  59334. if (!node)
  59335. return false;
  59336. const nodeType = node.type;
  59337. if (nodeType === "TupleExpression") {
  59338. if (typeof opts === "undefined") {
  59339. return true;
  59340. } else {
  59341. return (0, _shallowEqual.default)(node, opts);
  59342. }
  59343. }
  59344. return false;
  59345. }
  59346. function isDecimalLiteral(node, opts) {
  59347. if (!node)
  59348. return false;
  59349. const nodeType = node.type;
  59350. if (nodeType === "DecimalLiteral") {
  59351. if (typeof opts === "undefined") {
  59352. return true;
  59353. } else {
  59354. return (0, _shallowEqual.default)(node, opts);
  59355. }
  59356. }
  59357. return false;
  59358. }
  59359. function isStaticBlock(node, opts) {
  59360. if (!node)
  59361. return false;
  59362. const nodeType = node.type;
  59363. if (nodeType === "StaticBlock") {
  59364. if (typeof opts === "undefined") {
  59365. return true;
  59366. } else {
  59367. return (0, _shallowEqual.default)(node, opts);
  59368. }
  59369. }
  59370. return false;
  59371. }
  59372. function isModuleExpression(node, opts) {
  59373. if (!node)
  59374. return false;
  59375. const nodeType = node.type;
  59376. if (nodeType === "ModuleExpression") {
  59377. if (typeof opts === "undefined") {
  59378. return true;
  59379. } else {
  59380. return (0, _shallowEqual.default)(node, opts);
  59381. }
  59382. }
  59383. return false;
  59384. }
  59385. function isTSParameterProperty(node, opts) {
  59386. if (!node)
  59387. return false;
  59388. const nodeType = node.type;
  59389. if (nodeType === "TSParameterProperty") {
  59390. if (typeof opts === "undefined") {
  59391. return true;
  59392. } else {
  59393. return (0, _shallowEqual.default)(node, opts);
  59394. }
  59395. }
  59396. return false;
  59397. }
  59398. function isTSDeclareFunction(node, opts) {
  59399. if (!node)
  59400. return false;
  59401. const nodeType = node.type;
  59402. if (nodeType === "TSDeclareFunction") {
  59403. if (typeof opts === "undefined") {
  59404. return true;
  59405. } else {
  59406. return (0, _shallowEqual.default)(node, opts);
  59407. }
  59408. }
  59409. return false;
  59410. }
  59411. function isTSDeclareMethod(node, opts) {
  59412. if (!node)
  59413. return false;
  59414. const nodeType = node.type;
  59415. if (nodeType === "TSDeclareMethod") {
  59416. if (typeof opts === "undefined") {
  59417. return true;
  59418. } else {
  59419. return (0, _shallowEqual.default)(node, opts);
  59420. }
  59421. }
  59422. return false;
  59423. }
  59424. function isTSQualifiedName(node, opts) {
  59425. if (!node)
  59426. return false;
  59427. const nodeType = node.type;
  59428. if (nodeType === "TSQualifiedName") {
  59429. if (typeof opts === "undefined") {
  59430. return true;
  59431. } else {
  59432. return (0, _shallowEqual.default)(node, opts);
  59433. }
  59434. }
  59435. return false;
  59436. }
  59437. function isTSCallSignatureDeclaration(node, opts) {
  59438. if (!node)
  59439. return false;
  59440. const nodeType = node.type;
  59441. if (nodeType === "TSCallSignatureDeclaration") {
  59442. if (typeof opts === "undefined") {
  59443. return true;
  59444. } else {
  59445. return (0, _shallowEqual.default)(node, opts);
  59446. }
  59447. }
  59448. return false;
  59449. }
  59450. function isTSConstructSignatureDeclaration(node, opts) {
  59451. if (!node)
  59452. return false;
  59453. const nodeType = node.type;
  59454. if (nodeType === "TSConstructSignatureDeclaration") {
  59455. if (typeof opts === "undefined") {
  59456. return true;
  59457. } else {
  59458. return (0, _shallowEqual.default)(node, opts);
  59459. }
  59460. }
  59461. return false;
  59462. }
  59463. function isTSPropertySignature(node, opts) {
  59464. if (!node)
  59465. return false;
  59466. const nodeType = node.type;
  59467. if (nodeType === "TSPropertySignature") {
  59468. if (typeof opts === "undefined") {
  59469. return true;
  59470. } else {
  59471. return (0, _shallowEqual.default)(node, opts);
  59472. }
  59473. }
  59474. return false;
  59475. }
  59476. function isTSMethodSignature(node, opts) {
  59477. if (!node)
  59478. return false;
  59479. const nodeType = node.type;
  59480. if (nodeType === "TSMethodSignature") {
  59481. if (typeof opts === "undefined") {
  59482. return true;
  59483. } else {
  59484. return (0, _shallowEqual.default)(node, opts);
  59485. }
  59486. }
  59487. return false;
  59488. }
  59489. function isTSIndexSignature(node, opts) {
  59490. if (!node)
  59491. return false;
  59492. const nodeType = node.type;
  59493. if (nodeType === "TSIndexSignature") {
  59494. if (typeof opts === "undefined") {
  59495. return true;
  59496. } else {
  59497. return (0, _shallowEqual.default)(node, opts);
  59498. }
  59499. }
  59500. return false;
  59501. }
  59502. function isTSAnyKeyword(node, opts) {
  59503. if (!node)
  59504. return false;
  59505. const nodeType = node.type;
  59506. if (nodeType === "TSAnyKeyword") {
  59507. if (typeof opts === "undefined") {
  59508. return true;
  59509. } else {
  59510. return (0, _shallowEqual.default)(node, opts);
  59511. }
  59512. }
  59513. return false;
  59514. }
  59515. function isTSBooleanKeyword(node, opts) {
  59516. if (!node)
  59517. return false;
  59518. const nodeType = node.type;
  59519. if (nodeType === "TSBooleanKeyword") {
  59520. if (typeof opts === "undefined") {
  59521. return true;
  59522. } else {
  59523. return (0, _shallowEqual.default)(node, opts);
  59524. }
  59525. }
  59526. return false;
  59527. }
  59528. function isTSBigIntKeyword(node, opts) {
  59529. if (!node)
  59530. return false;
  59531. const nodeType = node.type;
  59532. if (nodeType === "TSBigIntKeyword") {
  59533. if (typeof opts === "undefined") {
  59534. return true;
  59535. } else {
  59536. return (0, _shallowEqual.default)(node, opts);
  59537. }
  59538. }
  59539. return false;
  59540. }
  59541. function isTSIntrinsicKeyword(node, opts) {
  59542. if (!node)
  59543. return false;
  59544. const nodeType = node.type;
  59545. if (nodeType === "TSIntrinsicKeyword") {
  59546. if (typeof opts === "undefined") {
  59547. return true;
  59548. } else {
  59549. return (0, _shallowEqual.default)(node, opts);
  59550. }
  59551. }
  59552. return false;
  59553. }
  59554. function isTSNeverKeyword(node, opts) {
  59555. if (!node)
  59556. return false;
  59557. const nodeType = node.type;
  59558. if (nodeType === "TSNeverKeyword") {
  59559. if (typeof opts === "undefined") {
  59560. return true;
  59561. } else {
  59562. return (0, _shallowEqual.default)(node, opts);
  59563. }
  59564. }
  59565. return false;
  59566. }
  59567. function isTSNullKeyword(node, opts) {
  59568. if (!node)
  59569. return false;
  59570. const nodeType = node.type;
  59571. if (nodeType === "TSNullKeyword") {
  59572. if (typeof opts === "undefined") {
  59573. return true;
  59574. } else {
  59575. return (0, _shallowEqual.default)(node, opts);
  59576. }
  59577. }
  59578. return false;
  59579. }
  59580. function isTSNumberKeyword(node, opts) {
  59581. if (!node)
  59582. return false;
  59583. const nodeType = node.type;
  59584. if (nodeType === "TSNumberKeyword") {
  59585. if (typeof opts === "undefined") {
  59586. return true;
  59587. } else {
  59588. return (0, _shallowEqual.default)(node, opts);
  59589. }
  59590. }
  59591. return false;
  59592. }
  59593. function isTSObjectKeyword(node, opts) {
  59594. if (!node)
  59595. return false;
  59596. const nodeType = node.type;
  59597. if (nodeType === "TSObjectKeyword") {
  59598. if (typeof opts === "undefined") {
  59599. return true;
  59600. } else {
  59601. return (0, _shallowEqual.default)(node, opts);
  59602. }
  59603. }
  59604. return false;
  59605. }
  59606. function isTSStringKeyword(node, opts) {
  59607. if (!node)
  59608. return false;
  59609. const nodeType = node.type;
  59610. if (nodeType === "TSStringKeyword") {
  59611. if (typeof opts === "undefined") {
  59612. return true;
  59613. } else {
  59614. return (0, _shallowEqual.default)(node, opts);
  59615. }
  59616. }
  59617. return false;
  59618. }
  59619. function isTSSymbolKeyword(node, opts) {
  59620. if (!node)
  59621. return false;
  59622. const nodeType = node.type;
  59623. if (nodeType === "TSSymbolKeyword") {
  59624. if (typeof opts === "undefined") {
  59625. return true;
  59626. } else {
  59627. return (0, _shallowEqual.default)(node, opts);
  59628. }
  59629. }
  59630. return false;
  59631. }
  59632. function isTSUndefinedKeyword(node, opts) {
  59633. if (!node)
  59634. return false;
  59635. const nodeType = node.type;
  59636. if (nodeType === "TSUndefinedKeyword") {
  59637. if (typeof opts === "undefined") {
  59638. return true;
  59639. } else {
  59640. return (0, _shallowEqual.default)(node, opts);
  59641. }
  59642. }
  59643. return false;
  59644. }
  59645. function isTSUnknownKeyword(node, opts) {
  59646. if (!node)
  59647. return false;
  59648. const nodeType = node.type;
  59649. if (nodeType === "TSUnknownKeyword") {
  59650. if (typeof opts === "undefined") {
  59651. return true;
  59652. } else {
  59653. return (0, _shallowEqual.default)(node, opts);
  59654. }
  59655. }
  59656. return false;
  59657. }
  59658. function isTSVoidKeyword(node, opts) {
  59659. if (!node)
  59660. return false;
  59661. const nodeType = node.type;
  59662. if (nodeType === "TSVoidKeyword") {
  59663. if (typeof opts === "undefined") {
  59664. return true;
  59665. } else {
  59666. return (0, _shallowEqual.default)(node, opts);
  59667. }
  59668. }
  59669. return false;
  59670. }
  59671. function isTSThisType(node, opts) {
  59672. if (!node)
  59673. return false;
  59674. const nodeType = node.type;
  59675. if (nodeType === "TSThisType") {
  59676. if (typeof opts === "undefined") {
  59677. return true;
  59678. } else {
  59679. return (0, _shallowEqual.default)(node, opts);
  59680. }
  59681. }
  59682. return false;
  59683. }
  59684. function isTSFunctionType(node, opts) {
  59685. if (!node)
  59686. return false;
  59687. const nodeType = node.type;
  59688. if (nodeType === "TSFunctionType") {
  59689. if (typeof opts === "undefined") {
  59690. return true;
  59691. } else {
  59692. return (0, _shallowEqual.default)(node, opts);
  59693. }
  59694. }
  59695. return false;
  59696. }
  59697. function isTSConstructorType(node, opts) {
  59698. if (!node)
  59699. return false;
  59700. const nodeType = node.type;
  59701. if (nodeType === "TSConstructorType") {
  59702. if (typeof opts === "undefined") {
  59703. return true;
  59704. } else {
  59705. return (0, _shallowEqual.default)(node, opts);
  59706. }
  59707. }
  59708. return false;
  59709. }
  59710. function isTSTypeReference(node, opts) {
  59711. if (!node)
  59712. return false;
  59713. const nodeType = node.type;
  59714. if (nodeType === "TSTypeReference") {
  59715. if (typeof opts === "undefined") {
  59716. return true;
  59717. } else {
  59718. return (0, _shallowEqual.default)(node, opts);
  59719. }
  59720. }
  59721. return false;
  59722. }
  59723. function isTSTypePredicate(node, opts) {
  59724. if (!node)
  59725. return false;
  59726. const nodeType = node.type;
  59727. if (nodeType === "TSTypePredicate") {
  59728. if (typeof opts === "undefined") {
  59729. return true;
  59730. } else {
  59731. return (0, _shallowEqual.default)(node, opts);
  59732. }
  59733. }
  59734. return false;
  59735. }
  59736. function isTSTypeQuery(node, opts) {
  59737. if (!node)
  59738. return false;
  59739. const nodeType = node.type;
  59740. if (nodeType === "TSTypeQuery") {
  59741. if (typeof opts === "undefined") {
  59742. return true;
  59743. } else {
  59744. return (0, _shallowEqual.default)(node, opts);
  59745. }
  59746. }
  59747. return false;
  59748. }
  59749. function isTSTypeLiteral(node, opts) {
  59750. if (!node)
  59751. return false;
  59752. const nodeType = node.type;
  59753. if (nodeType === "TSTypeLiteral") {
  59754. if (typeof opts === "undefined") {
  59755. return true;
  59756. } else {
  59757. return (0, _shallowEqual.default)(node, opts);
  59758. }
  59759. }
  59760. return false;
  59761. }
  59762. function isTSArrayType(node, opts) {
  59763. if (!node)
  59764. return false;
  59765. const nodeType = node.type;
  59766. if (nodeType === "TSArrayType") {
  59767. if (typeof opts === "undefined") {
  59768. return true;
  59769. } else {
  59770. return (0, _shallowEqual.default)(node, opts);
  59771. }
  59772. }
  59773. return false;
  59774. }
  59775. function isTSTupleType(node, opts) {
  59776. if (!node)
  59777. return false;
  59778. const nodeType = node.type;
  59779. if (nodeType === "TSTupleType") {
  59780. if (typeof opts === "undefined") {
  59781. return true;
  59782. } else {
  59783. return (0, _shallowEqual.default)(node, opts);
  59784. }
  59785. }
  59786. return false;
  59787. }
  59788. function isTSOptionalType(node, opts) {
  59789. if (!node)
  59790. return false;
  59791. const nodeType = node.type;
  59792. if (nodeType === "TSOptionalType") {
  59793. if (typeof opts === "undefined") {
  59794. return true;
  59795. } else {
  59796. return (0, _shallowEqual.default)(node, opts);
  59797. }
  59798. }
  59799. return false;
  59800. }
  59801. function isTSRestType(node, opts) {
  59802. if (!node)
  59803. return false;
  59804. const nodeType = node.type;
  59805. if (nodeType === "TSRestType") {
  59806. if (typeof opts === "undefined") {
  59807. return true;
  59808. } else {
  59809. return (0, _shallowEqual.default)(node, opts);
  59810. }
  59811. }
  59812. return false;
  59813. }
  59814. function isTSNamedTupleMember(node, opts) {
  59815. if (!node)
  59816. return false;
  59817. const nodeType = node.type;
  59818. if (nodeType === "TSNamedTupleMember") {
  59819. if (typeof opts === "undefined") {
  59820. return true;
  59821. } else {
  59822. return (0, _shallowEqual.default)(node, opts);
  59823. }
  59824. }
  59825. return false;
  59826. }
  59827. function isTSUnionType(node, opts) {
  59828. if (!node)
  59829. return false;
  59830. const nodeType = node.type;
  59831. if (nodeType === "TSUnionType") {
  59832. if (typeof opts === "undefined") {
  59833. return true;
  59834. } else {
  59835. return (0, _shallowEqual.default)(node, opts);
  59836. }
  59837. }
  59838. return false;
  59839. }
  59840. function isTSIntersectionType(node, opts) {
  59841. if (!node)
  59842. return false;
  59843. const nodeType = node.type;
  59844. if (nodeType === "TSIntersectionType") {
  59845. if (typeof opts === "undefined") {
  59846. return true;
  59847. } else {
  59848. return (0, _shallowEqual.default)(node, opts);
  59849. }
  59850. }
  59851. return false;
  59852. }
  59853. function isTSConditionalType(node, opts) {
  59854. if (!node)
  59855. return false;
  59856. const nodeType = node.type;
  59857. if (nodeType === "TSConditionalType") {
  59858. if (typeof opts === "undefined") {
  59859. return true;
  59860. } else {
  59861. return (0, _shallowEqual.default)(node, opts);
  59862. }
  59863. }
  59864. return false;
  59865. }
  59866. function isTSInferType(node, opts) {
  59867. if (!node)
  59868. return false;
  59869. const nodeType = node.type;
  59870. if (nodeType === "TSInferType") {
  59871. if (typeof opts === "undefined") {
  59872. return true;
  59873. } else {
  59874. return (0, _shallowEqual.default)(node, opts);
  59875. }
  59876. }
  59877. return false;
  59878. }
  59879. function isTSParenthesizedType(node, opts) {
  59880. if (!node)
  59881. return false;
  59882. const nodeType = node.type;
  59883. if (nodeType === "TSParenthesizedType") {
  59884. if (typeof opts === "undefined") {
  59885. return true;
  59886. } else {
  59887. return (0, _shallowEqual.default)(node, opts);
  59888. }
  59889. }
  59890. return false;
  59891. }
  59892. function isTSTypeOperator(node, opts) {
  59893. if (!node)
  59894. return false;
  59895. const nodeType = node.type;
  59896. if (nodeType === "TSTypeOperator") {
  59897. if (typeof opts === "undefined") {
  59898. return true;
  59899. } else {
  59900. return (0, _shallowEqual.default)(node, opts);
  59901. }
  59902. }
  59903. return false;
  59904. }
  59905. function isTSIndexedAccessType(node, opts) {
  59906. if (!node)
  59907. return false;
  59908. const nodeType = node.type;
  59909. if (nodeType === "TSIndexedAccessType") {
  59910. if (typeof opts === "undefined") {
  59911. return true;
  59912. } else {
  59913. return (0, _shallowEqual.default)(node, opts);
  59914. }
  59915. }
  59916. return false;
  59917. }
  59918. function isTSMappedType(node, opts) {
  59919. if (!node)
  59920. return false;
  59921. const nodeType = node.type;
  59922. if (nodeType === "TSMappedType") {
  59923. if (typeof opts === "undefined") {
  59924. return true;
  59925. } else {
  59926. return (0, _shallowEqual.default)(node, opts);
  59927. }
  59928. }
  59929. return false;
  59930. }
  59931. function isTSLiteralType(node, opts) {
  59932. if (!node)
  59933. return false;
  59934. const nodeType = node.type;
  59935. if (nodeType === "TSLiteralType") {
  59936. if (typeof opts === "undefined") {
  59937. return true;
  59938. } else {
  59939. return (0, _shallowEqual.default)(node, opts);
  59940. }
  59941. }
  59942. return false;
  59943. }
  59944. function isTSExpressionWithTypeArguments(node, opts) {
  59945. if (!node)
  59946. return false;
  59947. const nodeType = node.type;
  59948. if (nodeType === "TSExpressionWithTypeArguments") {
  59949. if (typeof opts === "undefined") {
  59950. return true;
  59951. } else {
  59952. return (0, _shallowEqual.default)(node, opts);
  59953. }
  59954. }
  59955. return false;
  59956. }
  59957. function isTSInterfaceDeclaration(node, opts) {
  59958. if (!node)
  59959. return false;
  59960. const nodeType = node.type;
  59961. if (nodeType === "TSInterfaceDeclaration") {
  59962. if (typeof opts === "undefined") {
  59963. return true;
  59964. } else {
  59965. return (0, _shallowEqual.default)(node, opts);
  59966. }
  59967. }
  59968. return false;
  59969. }
  59970. function isTSInterfaceBody(node, opts) {
  59971. if (!node)
  59972. return false;
  59973. const nodeType = node.type;
  59974. if (nodeType === "TSInterfaceBody") {
  59975. if (typeof opts === "undefined") {
  59976. return true;
  59977. } else {
  59978. return (0, _shallowEqual.default)(node, opts);
  59979. }
  59980. }
  59981. return false;
  59982. }
  59983. function isTSTypeAliasDeclaration(node, opts) {
  59984. if (!node)
  59985. return false;
  59986. const nodeType = node.type;
  59987. if (nodeType === "TSTypeAliasDeclaration") {
  59988. if (typeof opts === "undefined") {
  59989. return true;
  59990. } else {
  59991. return (0, _shallowEqual.default)(node, opts);
  59992. }
  59993. }
  59994. return false;
  59995. }
  59996. function isTSAsExpression(node, opts) {
  59997. if (!node)
  59998. return false;
  59999. const nodeType = node.type;
  60000. if (nodeType === "TSAsExpression") {
  60001. if (typeof opts === "undefined") {
  60002. return true;
  60003. } else {
  60004. return (0, _shallowEqual.default)(node, opts);
  60005. }
  60006. }
  60007. return false;
  60008. }
  60009. function isTSTypeAssertion(node, opts) {
  60010. if (!node)
  60011. return false;
  60012. const nodeType = node.type;
  60013. if (nodeType === "TSTypeAssertion") {
  60014. if (typeof opts === "undefined") {
  60015. return true;
  60016. } else {
  60017. return (0, _shallowEqual.default)(node, opts);
  60018. }
  60019. }
  60020. return false;
  60021. }
  60022. function isTSEnumDeclaration(node, opts) {
  60023. if (!node)
  60024. return false;
  60025. const nodeType = node.type;
  60026. if (nodeType === "TSEnumDeclaration") {
  60027. if (typeof opts === "undefined") {
  60028. return true;
  60029. } else {
  60030. return (0, _shallowEqual.default)(node, opts);
  60031. }
  60032. }
  60033. return false;
  60034. }
  60035. function isTSEnumMember(node, opts) {
  60036. if (!node)
  60037. return false;
  60038. const nodeType = node.type;
  60039. if (nodeType === "TSEnumMember") {
  60040. if (typeof opts === "undefined") {
  60041. return true;
  60042. } else {
  60043. return (0, _shallowEqual.default)(node, opts);
  60044. }
  60045. }
  60046. return false;
  60047. }
  60048. function isTSModuleDeclaration(node, opts) {
  60049. if (!node)
  60050. return false;
  60051. const nodeType = node.type;
  60052. if (nodeType === "TSModuleDeclaration") {
  60053. if (typeof opts === "undefined") {
  60054. return true;
  60055. } else {
  60056. return (0, _shallowEqual.default)(node, opts);
  60057. }
  60058. }
  60059. return false;
  60060. }
  60061. function isTSModuleBlock(node, opts) {
  60062. if (!node)
  60063. return false;
  60064. const nodeType = node.type;
  60065. if (nodeType === "TSModuleBlock") {
  60066. if (typeof opts === "undefined") {
  60067. return true;
  60068. } else {
  60069. return (0, _shallowEqual.default)(node, opts);
  60070. }
  60071. }
  60072. return false;
  60073. }
  60074. function isTSImportType(node, opts) {
  60075. if (!node)
  60076. return false;
  60077. const nodeType = node.type;
  60078. if (nodeType === "TSImportType") {
  60079. if (typeof opts === "undefined") {
  60080. return true;
  60081. } else {
  60082. return (0, _shallowEqual.default)(node, opts);
  60083. }
  60084. }
  60085. return false;
  60086. }
  60087. function isTSImportEqualsDeclaration(node, opts) {
  60088. if (!node)
  60089. return false;
  60090. const nodeType = node.type;
  60091. if (nodeType === "TSImportEqualsDeclaration") {
  60092. if (typeof opts === "undefined") {
  60093. return true;
  60094. } else {
  60095. return (0, _shallowEqual.default)(node, opts);
  60096. }
  60097. }
  60098. return false;
  60099. }
  60100. function isTSExternalModuleReference(node, opts) {
  60101. if (!node)
  60102. return false;
  60103. const nodeType = node.type;
  60104. if (nodeType === "TSExternalModuleReference") {
  60105. if (typeof opts === "undefined") {
  60106. return true;
  60107. } else {
  60108. return (0, _shallowEqual.default)(node, opts);
  60109. }
  60110. }
  60111. return false;
  60112. }
  60113. function isTSNonNullExpression(node, opts) {
  60114. if (!node)
  60115. return false;
  60116. const nodeType = node.type;
  60117. if (nodeType === "TSNonNullExpression") {
  60118. if (typeof opts === "undefined") {
  60119. return true;
  60120. } else {
  60121. return (0, _shallowEqual.default)(node, opts);
  60122. }
  60123. }
  60124. return false;
  60125. }
  60126. function isTSExportAssignment(node, opts) {
  60127. if (!node)
  60128. return false;
  60129. const nodeType = node.type;
  60130. if (nodeType === "TSExportAssignment") {
  60131. if (typeof opts === "undefined") {
  60132. return true;
  60133. } else {
  60134. return (0, _shallowEqual.default)(node, opts);
  60135. }
  60136. }
  60137. return false;
  60138. }
  60139. function isTSNamespaceExportDeclaration(node, opts) {
  60140. if (!node)
  60141. return false;
  60142. const nodeType = node.type;
  60143. if (nodeType === "TSNamespaceExportDeclaration") {
  60144. if (typeof opts === "undefined") {
  60145. return true;
  60146. } else {
  60147. return (0, _shallowEqual.default)(node, opts);
  60148. }
  60149. }
  60150. return false;
  60151. }
  60152. function isTSTypeAnnotation(node, opts) {
  60153. if (!node)
  60154. return false;
  60155. const nodeType = node.type;
  60156. if (nodeType === "TSTypeAnnotation") {
  60157. if (typeof opts === "undefined") {
  60158. return true;
  60159. } else {
  60160. return (0, _shallowEqual.default)(node, opts);
  60161. }
  60162. }
  60163. return false;
  60164. }
  60165. function isTSTypeParameterInstantiation(node, opts) {
  60166. if (!node)
  60167. return false;
  60168. const nodeType = node.type;
  60169. if (nodeType === "TSTypeParameterInstantiation") {
  60170. if (typeof opts === "undefined") {
  60171. return true;
  60172. } else {
  60173. return (0, _shallowEqual.default)(node, opts);
  60174. }
  60175. }
  60176. return false;
  60177. }
  60178. function isTSTypeParameterDeclaration(node, opts) {
  60179. if (!node)
  60180. return false;
  60181. const nodeType = node.type;
  60182. if (nodeType === "TSTypeParameterDeclaration") {
  60183. if (typeof opts === "undefined") {
  60184. return true;
  60185. } else {
  60186. return (0, _shallowEqual.default)(node, opts);
  60187. }
  60188. }
  60189. return false;
  60190. }
  60191. function isTSTypeParameter(node, opts) {
  60192. if (!node)
  60193. return false;
  60194. const nodeType = node.type;
  60195. if (nodeType === "TSTypeParameter") {
  60196. if (typeof opts === "undefined") {
  60197. return true;
  60198. } else {
  60199. return (0, _shallowEqual.default)(node, opts);
  60200. }
  60201. }
  60202. return false;
  60203. }
  60204. function isExpression(node, opts) {
  60205. if (!node)
  60206. return false;
  60207. const nodeType = node.type;
  60208. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  60209. if (typeof opts === "undefined") {
  60210. return true;
  60211. } else {
  60212. return (0, _shallowEqual.default)(node, opts);
  60213. }
  60214. }
  60215. return false;
  60216. }
  60217. function isBinary(node, opts) {
  60218. if (!node)
  60219. return false;
  60220. const nodeType = node.type;
  60221. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  60222. if (typeof opts === "undefined") {
  60223. return true;
  60224. } else {
  60225. return (0, _shallowEqual.default)(node, opts);
  60226. }
  60227. }
  60228. return false;
  60229. }
  60230. function isScopable(node, opts) {
  60231. if (!node)
  60232. return false;
  60233. const nodeType = node.type;
  60234. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  60235. if (typeof opts === "undefined") {
  60236. return true;
  60237. } else {
  60238. return (0, _shallowEqual.default)(node, opts);
  60239. }
  60240. }
  60241. return false;
  60242. }
  60243. function isBlockParent(node, opts) {
  60244. if (!node)
  60245. return false;
  60246. const nodeType = node.type;
  60247. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  60248. if (typeof opts === "undefined") {
  60249. return true;
  60250. } else {
  60251. return (0, _shallowEqual.default)(node, opts);
  60252. }
  60253. }
  60254. return false;
  60255. }
  60256. function isBlock(node, opts) {
  60257. if (!node)
  60258. return false;
  60259. const nodeType = node.type;
  60260. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  60261. if (typeof opts === "undefined") {
  60262. return true;
  60263. } else {
  60264. return (0, _shallowEqual.default)(node, opts);
  60265. }
  60266. }
  60267. return false;
  60268. }
  60269. function isStatement(node, opts) {
  60270. if (!node)
  60271. return false;
  60272. const nodeType = node.type;
  60273. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  60274. if (typeof opts === "undefined") {
  60275. return true;
  60276. } else {
  60277. return (0, _shallowEqual.default)(node, opts);
  60278. }
  60279. }
  60280. return false;
  60281. }
  60282. function isTerminatorless(node, opts) {
  60283. if (!node)
  60284. return false;
  60285. const nodeType = node.type;
  60286. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  60287. if (typeof opts === "undefined") {
  60288. return true;
  60289. } else {
  60290. return (0, _shallowEqual.default)(node, opts);
  60291. }
  60292. }
  60293. return false;
  60294. }
  60295. function isCompletionStatement(node, opts) {
  60296. if (!node)
  60297. return false;
  60298. const nodeType = node.type;
  60299. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  60300. if (typeof opts === "undefined") {
  60301. return true;
  60302. } else {
  60303. return (0, _shallowEqual.default)(node, opts);
  60304. }
  60305. }
  60306. return false;
  60307. }
  60308. function isConditional(node, opts) {
  60309. if (!node)
  60310. return false;
  60311. const nodeType = node.type;
  60312. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  60313. if (typeof opts === "undefined") {
  60314. return true;
  60315. } else {
  60316. return (0, _shallowEqual.default)(node, opts);
  60317. }
  60318. }
  60319. return false;
  60320. }
  60321. function isLoop(node, opts) {
  60322. if (!node)
  60323. return false;
  60324. const nodeType = node.type;
  60325. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  60326. if (typeof opts === "undefined") {
  60327. return true;
  60328. } else {
  60329. return (0, _shallowEqual.default)(node, opts);
  60330. }
  60331. }
  60332. return false;
  60333. }
  60334. function isWhile(node, opts) {
  60335. if (!node)
  60336. return false;
  60337. const nodeType = node.type;
  60338. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  60339. if (typeof opts === "undefined") {
  60340. return true;
  60341. } else {
  60342. return (0, _shallowEqual.default)(node, opts);
  60343. }
  60344. }
  60345. return false;
  60346. }
  60347. function isExpressionWrapper(node, opts) {
  60348. if (!node)
  60349. return false;
  60350. const nodeType = node.type;
  60351. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  60352. if (typeof opts === "undefined") {
  60353. return true;
  60354. } else {
  60355. return (0, _shallowEqual.default)(node, opts);
  60356. }
  60357. }
  60358. return false;
  60359. }
  60360. function isFor(node, opts) {
  60361. if (!node)
  60362. return false;
  60363. const nodeType = node.type;
  60364. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  60365. if (typeof opts === "undefined") {
  60366. return true;
  60367. } else {
  60368. return (0, _shallowEqual.default)(node, opts);
  60369. }
  60370. }
  60371. return false;
  60372. }
  60373. function isForXStatement(node, opts) {
  60374. if (!node)
  60375. return false;
  60376. const nodeType = node.type;
  60377. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  60378. if (typeof opts === "undefined") {
  60379. return true;
  60380. } else {
  60381. return (0, _shallowEqual.default)(node, opts);
  60382. }
  60383. }
  60384. return false;
  60385. }
  60386. function isFunction(node, opts) {
  60387. if (!node)
  60388. return false;
  60389. const nodeType = node.type;
  60390. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  60391. if (typeof opts === "undefined") {
  60392. return true;
  60393. } else {
  60394. return (0, _shallowEqual.default)(node, opts);
  60395. }
  60396. }
  60397. return false;
  60398. }
  60399. function isFunctionParent(node, opts) {
  60400. if (!node)
  60401. return false;
  60402. const nodeType = node.type;
  60403. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  60404. if (typeof opts === "undefined") {
  60405. return true;
  60406. } else {
  60407. return (0, _shallowEqual.default)(node, opts);
  60408. }
  60409. }
  60410. return false;
  60411. }
  60412. function isPureish(node, opts) {
  60413. if (!node)
  60414. return false;
  60415. const nodeType = node.type;
  60416. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  60417. if (typeof opts === "undefined") {
  60418. return true;
  60419. } else {
  60420. return (0, _shallowEqual.default)(node, opts);
  60421. }
  60422. }
  60423. return false;
  60424. }
  60425. function isDeclaration2(node, opts) {
  60426. if (!node)
  60427. return false;
  60428. const nodeType = node.type;
  60429. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  60430. if (typeof opts === "undefined") {
  60431. return true;
  60432. } else {
  60433. return (0, _shallowEqual.default)(node, opts);
  60434. }
  60435. }
  60436. return false;
  60437. }
  60438. function isPatternLike(node, opts) {
  60439. if (!node)
  60440. return false;
  60441. const nodeType = node.type;
  60442. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  60443. if (typeof opts === "undefined") {
  60444. return true;
  60445. } else {
  60446. return (0, _shallowEqual.default)(node, opts);
  60447. }
  60448. }
  60449. return false;
  60450. }
  60451. function isLVal(node, opts) {
  60452. if (!node)
  60453. return false;
  60454. const nodeType = node.type;
  60455. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  60456. if (typeof opts === "undefined") {
  60457. return true;
  60458. } else {
  60459. return (0, _shallowEqual.default)(node, opts);
  60460. }
  60461. }
  60462. return false;
  60463. }
  60464. function isTSEntityName(node, opts) {
  60465. if (!node)
  60466. return false;
  60467. const nodeType = node.type;
  60468. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  60469. if (typeof opts === "undefined") {
  60470. return true;
  60471. } else {
  60472. return (0, _shallowEqual.default)(node, opts);
  60473. }
  60474. }
  60475. return false;
  60476. }
  60477. function isLiteral(node, opts) {
  60478. if (!node)
  60479. return false;
  60480. const nodeType = node.type;
  60481. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  60482. if (typeof opts === "undefined") {
  60483. return true;
  60484. } else {
  60485. return (0, _shallowEqual.default)(node, opts);
  60486. }
  60487. }
  60488. return false;
  60489. }
  60490. function isImmutable(node, opts) {
  60491. if (!node)
  60492. return false;
  60493. const nodeType = node.type;
  60494. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  60495. if (typeof opts === "undefined") {
  60496. return true;
  60497. } else {
  60498. return (0, _shallowEqual.default)(node, opts);
  60499. }
  60500. }
  60501. return false;
  60502. }
  60503. function isUserWhitespacable(node, opts) {
  60504. if (!node)
  60505. return false;
  60506. const nodeType = node.type;
  60507. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  60508. if (typeof opts === "undefined") {
  60509. return true;
  60510. } else {
  60511. return (0, _shallowEqual.default)(node, opts);
  60512. }
  60513. }
  60514. return false;
  60515. }
  60516. function isMethod(node, opts) {
  60517. if (!node)
  60518. return false;
  60519. const nodeType = node.type;
  60520. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  60521. if (typeof opts === "undefined") {
  60522. return true;
  60523. } else {
  60524. return (0, _shallowEqual.default)(node, opts);
  60525. }
  60526. }
  60527. return false;
  60528. }
  60529. function isObjectMember(node, opts) {
  60530. if (!node)
  60531. return false;
  60532. const nodeType = node.type;
  60533. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  60534. if (typeof opts === "undefined") {
  60535. return true;
  60536. } else {
  60537. return (0, _shallowEqual.default)(node, opts);
  60538. }
  60539. }
  60540. return false;
  60541. }
  60542. function isProperty(node, opts) {
  60543. if (!node)
  60544. return false;
  60545. const nodeType = node.type;
  60546. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  60547. if (typeof opts === "undefined") {
  60548. return true;
  60549. } else {
  60550. return (0, _shallowEqual.default)(node, opts);
  60551. }
  60552. }
  60553. return false;
  60554. }
  60555. function isUnaryLike(node, opts) {
  60556. if (!node)
  60557. return false;
  60558. const nodeType = node.type;
  60559. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  60560. if (typeof opts === "undefined") {
  60561. return true;
  60562. } else {
  60563. return (0, _shallowEqual.default)(node, opts);
  60564. }
  60565. }
  60566. return false;
  60567. }
  60568. function isPattern(node, opts) {
  60569. if (!node)
  60570. return false;
  60571. const nodeType = node.type;
  60572. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  60573. if (typeof opts === "undefined") {
  60574. return true;
  60575. } else {
  60576. return (0, _shallowEqual.default)(node, opts);
  60577. }
  60578. }
  60579. return false;
  60580. }
  60581. function isClass(node, opts) {
  60582. if (!node)
  60583. return false;
  60584. const nodeType = node.type;
  60585. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  60586. if (typeof opts === "undefined") {
  60587. return true;
  60588. } else {
  60589. return (0, _shallowEqual.default)(node, opts);
  60590. }
  60591. }
  60592. return false;
  60593. }
  60594. function isModuleDeclaration(node, opts) {
  60595. if (!node)
  60596. return false;
  60597. const nodeType = node.type;
  60598. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  60599. if (typeof opts === "undefined") {
  60600. return true;
  60601. } else {
  60602. return (0, _shallowEqual.default)(node, opts);
  60603. }
  60604. }
  60605. return false;
  60606. }
  60607. function isExportDeclaration(node, opts) {
  60608. if (!node)
  60609. return false;
  60610. const nodeType = node.type;
  60611. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  60612. if (typeof opts === "undefined") {
  60613. return true;
  60614. } else {
  60615. return (0, _shallowEqual.default)(node, opts);
  60616. }
  60617. }
  60618. return false;
  60619. }
  60620. function isModuleSpecifier(node, opts) {
  60621. if (!node)
  60622. return false;
  60623. const nodeType = node.type;
  60624. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  60625. if (typeof opts === "undefined") {
  60626. return true;
  60627. } else {
  60628. return (0, _shallowEqual.default)(node, opts);
  60629. }
  60630. }
  60631. return false;
  60632. }
  60633. function isFlow(node, opts) {
  60634. if (!node)
  60635. return false;
  60636. const nodeType = node.type;
  60637. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  60638. if (typeof opts === "undefined") {
  60639. return true;
  60640. } else {
  60641. return (0, _shallowEqual.default)(node, opts);
  60642. }
  60643. }
  60644. return false;
  60645. }
  60646. function isFlowType(node, opts) {
  60647. if (!node)
  60648. return false;
  60649. const nodeType = node.type;
  60650. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  60651. if (typeof opts === "undefined") {
  60652. return true;
  60653. } else {
  60654. return (0, _shallowEqual.default)(node, opts);
  60655. }
  60656. }
  60657. return false;
  60658. }
  60659. function isFlowBaseAnnotation(node, opts) {
  60660. if (!node)
  60661. return false;
  60662. const nodeType = node.type;
  60663. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  60664. if (typeof opts === "undefined") {
  60665. return true;
  60666. } else {
  60667. return (0, _shallowEqual.default)(node, opts);
  60668. }
  60669. }
  60670. return false;
  60671. }
  60672. function isFlowDeclaration(node, opts) {
  60673. if (!node)
  60674. return false;
  60675. const nodeType = node.type;
  60676. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  60677. if (typeof opts === "undefined") {
  60678. return true;
  60679. } else {
  60680. return (0, _shallowEqual.default)(node, opts);
  60681. }
  60682. }
  60683. return false;
  60684. }
  60685. function isFlowPredicate(node, opts) {
  60686. if (!node)
  60687. return false;
  60688. const nodeType = node.type;
  60689. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  60690. if (typeof opts === "undefined") {
  60691. return true;
  60692. } else {
  60693. return (0, _shallowEqual.default)(node, opts);
  60694. }
  60695. }
  60696. return false;
  60697. }
  60698. function isEnumBody(node, opts) {
  60699. if (!node)
  60700. return false;
  60701. const nodeType = node.type;
  60702. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  60703. if (typeof opts === "undefined") {
  60704. return true;
  60705. } else {
  60706. return (0, _shallowEqual.default)(node, opts);
  60707. }
  60708. }
  60709. return false;
  60710. }
  60711. function isEnumMember(node, opts) {
  60712. if (!node)
  60713. return false;
  60714. const nodeType = node.type;
  60715. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  60716. if (typeof opts === "undefined") {
  60717. return true;
  60718. } else {
  60719. return (0, _shallowEqual.default)(node, opts);
  60720. }
  60721. }
  60722. return false;
  60723. }
  60724. function isJSX(node, opts) {
  60725. if (!node)
  60726. return false;
  60727. const nodeType = node.type;
  60728. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  60729. if (typeof opts === "undefined") {
  60730. return true;
  60731. } else {
  60732. return (0, _shallowEqual.default)(node, opts);
  60733. }
  60734. }
  60735. return false;
  60736. }
  60737. function isPrivate(node, opts) {
  60738. if (!node)
  60739. return false;
  60740. const nodeType = node.type;
  60741. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  60742. if (typeof opts === "undefined") {
  60743. return true;
  60744. } else {
  60745. return (0, _shallowEqual.default)(node, opts);
  60746. }
  60747. }
  60748. return false;
  60749. }
  60750. function isTSTypeElement(node, opts) {
  60751. if (!node)
  60752. return false;
  60753. const nodeType = node.type;
  60754. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  60755. if (typeof opts === "undefined") {
  60756. return true;
  60757. } else {
  60758. return (0, _shallowEqual.default)(node, opts);
  60759. }
  60760. }
  60761. return false;
  60762. }
  60763. function isTSType(node, opts) {
  60764. if (!node)
  60765. return false;
  60766. const nodeType = node.type;
  60767. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  60768. if (typeof opts === "undefined") {
  60769. return true;
  60770. } else {
  60771. return (0, _shallowEqual.default)(node, opts);
  60772. }
  60773. }
  60774. return false;
  60775. }
  60776. function isTSBaseType(node, opts) {
  60777. if (!node)
  60778. return false;
  60779. const nodeType = node.type;
  60780. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  60781. if (typeof opts === "undefined") {
  60782. return true;
  60783. } else {
  60784. return (0, _shallowEqual.default)(node, opts);
  60785. }
  60786. }
  60787. return false;
  60788. }
  60789. function isNumberLiteral(node, opts) {
  60790. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  60791. if (!node)
  60792. return false;
  60793. const nodeType = node.type;
  60794. if (nodeType === "NumberLiteral") {
  60795. if (typeof opts === "undefined") {
  60796. return true;
  60797. } else {
  60798. return (0, _shallowEqual.default)(node, opts);
  60799. }
  60800. }
  60801. return false;
  60802. }
  60803. function isRegexLiteral(node, opts) {
  60804. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  60805. if (!node)
  60806. return false;
  60807. const nodeType = node.type;
  60808. if (nodeType === "RegexLiteral") {
  60809. if (typeof opts === "undefined") {
  60810. return true;
  60811. } else {
  60812. return (0, _shallowEqual.default)(node, opts);
  60813. }
  60814. }
  60815. return false;
  60816. }
  60817. function isRestProperty(node, opts) {
  60818. console.trace("The node type RestProperty has been renamed to RestElement");
  60819. if (!node)
  60820. return false;
  60821. const nodeType = node.type;
  60822. if (nodeType === "RestProperty") {
  60823. if (typeof opts === "undefined") {
  60824. return true;
  60825. } else {
  60826. return (0, _shallowEqual.default)(node, opts);
  60827. }
  60828. }
  60829. return false;
  60830. }
  60831. function isSpreadProperty(node, opts) {
  60832. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  60833. if (!node)
  60834. return false;
  60835. const nodeType = node.type;
  60836. if (nodeType === "SpreadProperty") {
  60837. if (typeof opts === "undefined") {
  60838. return true;
  60839. } else {
  60840. return (0, _shallowEqual.default)(node, opts);
  60841. }
  60842. }
  60843. return false;
  60844. }
  60845. }
  60846. });
  60847. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/matchesPattern.js
  60848. var require_matchesPattern3 = __commonJS({
  60849. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  60850. "use strict";
  60851. Object.defineProperty(exports, "__esModule", {
  60852. value: true
  60853. });
  60854. exports.default = matchesPattern;
  60855. var _generated = require_generated11();
  60856. function matchesPattern(member, match, allowPartial) {
  60857. if (!(0, _generated.isMemberExpression)(member))
  60858. return false;
  60859. const parts = Array.isArray(match) ? match : match.split(".");
  60860. const nodes = [];
  60861. let node;
  60862. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  60863. nodes.push(node.property);
  60864. }
  60865. nodes.push(node);
  60866. if (nodes.length < parts.length)
  60867. return false;
  60868. if (!allowPartial && nodes.length > parts.length)
  60869. return false;
  60870. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  60871. const node2 = nodes[j];
  60872. let value;
  60873. if ((0, _generated.isIdentifier)(node2)) {
  60874. value = node2.name;
  60875. } else if ((0, _generated.isStringLiteral)(node2)) {
  60876. value = node2.value;
  60877. } else if ((0, _generated.isThisExpression)(node2)) {
  60878. value = "this";
  60879. } else {
  60880. return false;
  60881. }
  60882. if (parts[i] !== value)
  60883. return false;
  60884. }
  60885. return true;
  60886. }
  60887. }
  60888. });
  60889. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  60890. var require_buildMatchMemberExpression3 = __commonJS({
  60891. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  60892. "use strict";
  60893. Object.defineProperty(exports, "__esModule", {
  60894. value: true
  60895. });
  60896. exports.default = buildMatchMemberExpression;
  60897. var _matchesPattern = require_matchesPattern3();
  60898. function buildMatchMemberExpression(match, allowPartial) {
  60899. const parts = match.split(".");
  60900. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  60901. }
  60902. }
  60903. });
  60904. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  60905. var require_isReactComponent3 = __commonJS({
  60906. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  60907. "use strict";
  60908. Object.defineProperty(exports, "__esModule", {
  60909. value: true
  60910. });
  60911. exports.default = void 0;
  60912. var _buildMatchMemberExpression = require_buildMatchMemberExpression3();
  60913. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  60914. var _default = isReactComponent;
  60915. exports.default = _default;
  60916. }
  60917. });
  60918. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  60919. var require_isCompatTag3 = __commonJS({
  60920. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  60921. "use strict";
  60922. Object.defineProperty(exports, "__esModule", {
  60923. value: true
  60924. });
  60925. exports.default = isCompatTag;
  60926. function isCompatTag(tagName) {
  60927. return !!tagName && /^[a-z]/.test(tagName);
  60928. }
  60929. }
  60930. });
  60931. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isType.js
  60932. var require_isType3 = __commonJS({
  60933. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  60934. "use strict";
  60935. Object.defineProperty(exports, "__esModule", {
  60936. value: true
  60937. });
  60938. exports.default = isType;
  60939. var _definitions = require_definitions3();
  60940. function isType(nodeType, targetType) {
  60941. if (nodeType === targetType)
  60942. return true;
  60943. if (_definitions.ALIAS_KEYS[targetType])
  60944. return false;
  60945. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  60946. if (aliases) {
  60947. if (aliases[0] === nodeType)
  60948. return true;
  60949. for (const alias of aliases) {
  60950. if (nodeType === alias)
  60951. return true;
  60952. }
  60953. }
  60954. return false;
  60955. }
  60956. }
  60957. });
  60958. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  60959. var require_isPlaceholderType3 = __commonJS({
  60960. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  60961. "use strict";
  60962. Object.defineProperty(exports, "__esModule", {
  60963. value: true
  60964. });
  60965. exports.default = isPlaceholderType;
  60966. var _definitions = require_definitions3();
  60967. function isPlaceholderType(placeholderType, targetType) {
  60968. if (placeholderType === targetType)
  60969. return true;
  60970. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  60971. if (aliases) {
  60972. for (const alias of aliases) {
  60973. if (targetType === alias)
  60974. return true;
  60975. }
  60976. }
  60977. return false;
  60978. }
  60979. }
  60980. });
  60981. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/is.js
  60982. var require_is3 = __commonJS({
  60983. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/is.js"(exports) {
  60984. "use strict";
  60985. Object.defineProperty(exports, "__esModule", {
  60986. value: true
  60987. });
  60988. exports.default = is;
  60989. var _shallowEqual = require_shallowEqual3();
  60990. var _isType = require_isType3();
  60991. var _isPlaceholderType = require_isPlaceholderType3();
  60992. var _definitions = require_definitions3();
  60993. function is(type, node, opts) {
  60994. if (!node)
  60995. return false;
  60996. const matches = (0, _isType.default)(node.type, type);
  60997. if (!matches) {
  60998. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  60999. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  61000. }
  61001. return false;
  61002. }
  61003. if (typeof opts === "undefined") {
  61004. return true;
  61005. } else {
  61006. return (0, _shallowEqual.default)(node, opts);
  61007. }
  61008. }
  61009. }
  61010. });
  61011. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  61012. var require_identifier4 = __commonJS({
  61013. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  61014. "use strict";
  61015. Object.defineProperty(exports, "__esModule", {
  61016. value: true
  61017. });
  61018. exports.isIdentifierStart = isIdentifierStart2;
  61019. exports.isIdentifierChar = isIdentifierChar2;
  61020. exports.isIdentifierName = isIdentifierName;
  61021. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  61022. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  61023. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  61024. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  61025. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  61026. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  61027. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  61028. function isInAstralSet2(code2, set) {
  61029. let pos = 65536;
  61030. for (let i = 0, length = set.length; i < length; i += 2) {
  61031. pos += set[i];
  61032. if (pos > code2)
  61033. return false;
  61034. pos += set[i + 1];
  61035. if (pos >= code2)
  61036. return true;
  61037. }
  61038. return false;
  61039. }
  61040. function isIdentifierStart2(code2) {
  61041. if (code2 < 65)
  61042. return code2 === 36;
  61043. if (code2 <= 90)
  61044. return true;
  61045. if (code2 < 97)
  61046. return code2 === 95;
  61047. if (code2 <= 122)
  61048. return true;
  61049. if (code2 <= 65535) {
  61050. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  61051. }
  61052. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  61053. }
  61054. function isIdentifierChar2(code2) {
  61055. if (code2 < 48)
  61056. return code2 === 36;
  61057. if (code2 < 58)
  61058. return true;
  61059. if (code2 < 65)
  61060. return false;
  61061. if (code2 <= 90)
  61062. return true;
  61063. if (code2 < 97)
  61064. return code2 === 95;
  61065. if (code2 <= 122)
  61066. return true;
  61067. if (code2 <= 65535) {
  61068. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  61069. }
  61070. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  61071. }
  61072. function isIdentifierName(name2) {
  61073. let isFirst = true;
  61074. for (let i = 0; i < name2.length; i++) {
  61075. let cp = name2.charCodeAt(i);
  61076. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  61077. const trail = name2.charCodeAt(++i);
  61078. if ((trail & 64512) === 56320) {
  61079. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  61080. }
  61081. }
  61082. if (isFirst) {
  61083. isFirst = false;
  61084. if (!isIdentifierStart2(cp)) {
  61085. return false;
  61086. }
  61087. } else if (!isIdentifierChar2(cp)) {
  61088. return false;
  61089. }
  61090. }
  61091. return !isFirst;
  61092. }
  61093. }
  61094. });
  61095. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  61096. var require_keyword4 = __commonJS({
  61097. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  61098. "use strict";
  61099. Object.defineProperty(exports, "__esModule", {
  61100. value: true
  61101. });
  61102. exports.isReservedWord = isReservedWord;
  61103. exports.isStrictReservedWord = isStrictReservedWord;
  61104. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  61105. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  61106. exports.isKeyword = isKeyword;
  61107. var reservedWords2 = {
  61108. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  61109. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  61110. strictBind: ["eval", "arguments"]
  61111. };
  61112. var keywords2 = new Set(reservedWords2.keyword);
  61113. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  61114. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  61115. function isReservedWord(word, inModule) {
  61116. return inModule && word === "await" || word === "enum";
  61117. }
  61118. function isStrictReservedWord(word, inModule) {
  61119. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  61120. }
  61121. function isStrictBindOnlyReservedWord(word) {
  61122. return reservedWordsStrictBindSet.has(word);
  61123. }
  61124. function isStrictBindReservedWord(word, inModule) {
  61125. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  61126. }
  61127. function isKeyword(word) {
  61128. return keywords2.has(word);
  61129. }
  61130. }
  61131. });
  61132. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/index.js
  61133. var require_lib15 = __commonJS({
  61134. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  61135. "use strict";
  61136. Object.defineProperty(exports, "__esModule", {
  61137. value: true
  61138. });
  61139. Object.defineProperty(exports, "isIdentifierName", {
  61140. enumerable: true,
  61141. get: function() {
  61142. return _identifier.isIdentifierName;
  61143. }
  61144. });
  61145. Object.defineProperty(exports, "isIdentifierChar", {
  61146. enumerable: true,
  61147. get: function() {
  61148. return _identifier.isIdentifierChar;
  61149. }
  61150. });
  61151. Object.defineProperty(exports, "isIdentifierStart", {
  61152. enumerable: true,
  61153. get: function() {
  61154. return _identifier.isIdentifierStart;
  61155. }
  61156. });
  61157. Object.defineProperty(exports, "isReservedWord", {
  61158. enumerable: true,
  61159. get: function() {
  61160. return _keyword.isReservedWord;
  61161. }
  61162. });
  61163. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  61164. enumerable: true,
  61165. get: function() {
  61166. return _keyword.isStrictBindOnlyReservedWord;
  61167. }
  61168. });
  61169. Object.defineProperty(exports, "isStrictBindReservedWord", {
  61170. enumerable: true,
  61171. get: function() {
  61172. return _keyword.isStrictBindReservedWord;
  61173. }
  61174. });
  61175. Object.defineProperty(exports, "isStrictReservedWord", {
  61176. enumerable: true,
  61177. get: function() {
  61178. return _keyword.isStrictReservedWord;
  61179. }
  61180. });
  61181. Object.defineProperty(exports, "isKeyword", {
  61182. enumerable: true,
  61183. get: function() {
  61184. return _keyword.isKeyword;
  61185. }
  61186. });
  61187. var _identifier = require_identifier4();
  61188. var _keyword = require_keyword4();
  61189. }
  61190. });
  61191. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  61192. var require_isValidIdentifier3 = __commonJS({
  61193. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  61194. "use strict";
  61195. Object.defineProperty(exports, "__esModule", {
  61196. value: true
  61197. });
  61198. exports.default = isValidIdentifier;
  61199. var _helperValidatorIdentifier = require_lib15();
  61200. function isValidIdentifier(name2, reserved = true) {
  61201. if (typeof name2 !== "string")
  61202. return false;
  61203. if (reserved) {
  61204. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  61205. return false;
  61206. }
  61207. }
  61208. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  61209. }
  61210. }
  61211. });
  61212. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/index.js
  61213. var require_constants3 = __commonJS({
  61214. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/index.js"(exports) {
  61215. "use strict";
  61216. Object.defineProperty(exports, "__esModule", {
  61217. value: true
  61218. });
  61219. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  61220. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  61221. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  61222. var FLATTENABLE_KEYS = ["body", "expressions"];
  61223. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  61224. var FOR_INIT_KEYS = ["left", "init"];
  61225. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  61226. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  61227. exports.COMMENT_KEYS = COMMENT_KEYS;
  61228. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  61229. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  61230. var UPDATE_OPERATORS = ["++", "--"];
  61231. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  61232. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  61233. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  61234. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  61235. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  61236. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  61237. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  61238. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  61239. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  61240. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  61241. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  61242. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  61243. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  61244. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  61245. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  61246. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  61247. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  61248. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  61249. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  61250. var STRING_UNARY_OPERATORS = ["typeof"];
  61251. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  61252. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  61253. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  61254. var INHERIT_KEYS = {
  61255. optional: ["typeAnnotation", "typeParameters", "returnType"],
  61256. force: ["start", "loc", "end"]
  61257. };
  61258. exports.INHERIT_KEYS = INHERIT_KEYS;
  61259. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  61260. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  61261. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  61262. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  61263. }
  61264. });
  61265. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/validate.js
  61266. var require_validate3 = __commonJS({
  61267. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  61268. "use strict";
  61269. Object.defineProperty(exports, "__esModule", {
  61270. value: true
  61271. });
  61272. exports.default = validate;
  61273. exports.validateField = validateField;
  61274. exports.validateChild = validateChild;
  61275. var _definitions = require_definitions3();
  61276. function validate(node, key, val) {
  61277. if (!node)
  61278. return;
  61279. const fields = _definitions.NODE_FIELDS[node.type];
  61280. if (!fields)
  61281. return;
  61282. const field = fields[key];
  61283. validateField(node, key, val, field);
  61284. validateChild(node, key, val);
  61285. }
  61286. function validateField(node, key, val, field) {
  61287. if (!(field != null && field.validate))
  61288. return;
  61289. if (field.optional && val == null)
  61290. return;
  61291. field.validate(node, key, val);
  61292. }
  61293. function validateChild(node, key, val) {
  61294. if (val == null)
  61295. return;
  61296. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  61297. if (!validate2)
  61298. return;
  61299. validate2(node, key, val);
  61300. }
  61301. }
  61302. });
  61303. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/utils.js
  61304. var require_utils3 = __commonJS({
  61305. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  61306. "use strict";
  61307. Object.defineProperty(exports, "__esModule", {
  61308. value: true
  61309. });
  61310. exports.validate = validate;
  61311. exports.typeIs = typeIs;
  61312. exports.validateType = validateType;
  61313. exports.validateOptional = validateOptional;
  61314. exports.validateOptionalType = validateOptionalType;
  61315. exports.arrayOf = arrayOf;
  61316. exports.arrayOfType = arrayOfType;
  61317. exports.validateArrayOfType = validateArrayOfType;
  61318. exports.assertEach = assertEach;
  61319. exports.assertOneOf = assertOneOf;
  61320. exports.assertNodeType = assertNodeType;
  61321. exports.assertNodeOrValueType = assertNodeOrValueType;
  61322. exports.assertValueType = assertValueType;
  61323. exports.assertShape = assertShape;
  61324. exports.assertOptionalChainStart = assertOptionalChainStart;
  61325. exports.chain = chain;
  61326. exports.default = defineType;
  61327. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  61328. var _is = require_is3();
  61329. var _validate = require_validate3();
  61330. var VISITOR_KEYS = {};
  61331. exports.VISITOR_KEYS = VISITOR_KEYS;
  61332. var ALIAS_KEYS = {};
  61333. exports.ALIAS_KEYS = ALIAS_KEYS;
  61334. var FLIPPED_ALIAS_KEYS = {};
  61335. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  61336. var NODE_FIELDS = {};
  61337. exports.NODE_FIELDS = NODE_FIELDS;
  61338. var BUILDER_KEYS = {};
  61339. exports.BUILDER_KEYS = BUILDER_KEYS;
  61340. var DEPRECATED_KEYS = {};
  61341. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  61342. var NODE_PARENT_VALIDATIONS = {};
  61343. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  61344. function getType(val) {
  61345. if (Array.isArray(val)) {
  61346. return "array";
  61347. } else if (val === null) {
  61348. return "null";
  61349. } else {
  61350. return typeof val;
  61351. }
  61352. }
  61353. function validate(validate2) {
  61354. return {
  61355. validate: validate2
  61356. };
  61357. }
  61358. function typeIs(typeName) {
  61359. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  61360. }
  61361. function validateType(typeName) {
  61362. return validate(typeIs(typeName));
  61363. }
  61364. function validateOptional(validate2) {
  61365. return {
  61366. validate: validate2,
  61367. optional: true
  61368. };
  61369. }
  61370. function validateOptionalType(typeName) {
  61371. return {
  61372. validate: typeIs(typeName),
  61373. optional: true
  61374. };
  61375. }
  61376. function arrayOf(elementType) {
  61377. return chain(assertValueType("array"), assertEach(elementType));
  61378. }
  61379. function arrayOfType(typeName) {
  61380. return arrayOf(typeIs(typeName));
  61381. }
  61382. function validateArrayOfType(typeName) {
  61383. return validate(arrayOfType(typeName));
  61384. }
  61385. function assertEach(callback) {
  61386. function validator(node, key, val) {
  61387. if (!Array.isArray(val))
  61388. return;
  61389. for (let i = 0; i < val.length; i++) {
  61390. const subkey = `${key}[${i}]`;
  61391. const v = val[i];
  61392. callback(node, subkey, v);
  61393. if (process.env.BABEL_TYPES_8_BREAKING)
  61394. (0, _validate.validateChild)(node, subkey, v);
  61395. }
  61396. }
  61397. validator.each = callback;
  61398. return validator;
  61399. }
  61400. function assertOneOf(...values) {
  61401. function validate2(node, key, val) {
  61402. if (values.indexOf(val) < 0) {
  61403. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  61404. }
  61405. }
  61406. validate2.oneOf = values;
  61407. return validate2;
  61408. }
  61409. function assertNodeType(...types2) {
  61410. function validate2(node, key, val) {
  61411. for (const type of types2) {
  61412. if ((0, _is.default)(type, val)) {
  61413. (0, _validate.validateChild)(node, key, val);
  61414. return;
  61415. }
  61416. }
  61417. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  61418. }
  61419. validate2.oneOfNodeTypes = types2;
  61420. return validate2;
  61421. }
  61422. function assertNodeOrValueType(...types2) {
  61423. function validate2(node, key, val) {
  61424. for (const type of types2) {
  61425. if (getType(val) === type || (0, _is.default)(type, val)) {
  61426. (0, _validate.validateChild)(node, key, val);
  61427. return;
  61428. }
  61429. }
  61430. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  61431. }
  61432. validate2.oneOfNodeOrValueTypes = types2;
  61433. return validate2;
  61434. }
  61435. function assertValueType(type) {
  61436. function validate2(node, key, val) {
  61437. const valid2 = getType(val) === type;
  61438. if (!valid2) {
  61439. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  61440. }
  61441. }
  61442. validate2.type = type;
  61443. return validate2;
  61444. }
  61445. function assertShape(shape) {
  61446. function validate2(node, key, val) {
  61447. const errors = [];
  61448. for (const property of Object.keys(shape)) {
  61449. try {
  61450. (0, _validate.validateField)(node, property, val[property], shape[property]);
  61451. } catch (error) {
  61452. if (error instanceof TypeError) {
  61453. errors.push(error.message);
  61454. continue;
  61455. }
  61456. throw error;
  61457. }
  61458. }
  61459. if (errors.length) {
  61460. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  61461. ${errors.join("\n")}`);
  61462. }
  61463. }
  61464. validate2.shapeOf = shape;
  61465. return validate2;
  61466. }
  61467. function assertOptionalChainStart() {
  61468. function validate2(node) {
  61469. var _current;
  61470. let current2 = node;
  61471. while (node) {
  61472. const {
  61473. type
  61474. } = current2;
  61475. if (type === "OptionalCallExpression") {
  61476. if (current2.optional)
  61477. return;
  61478. current2 = current2.callee;
  61479. continue;
  61480. }
  61481. if (type === "OptionalMemberExpression") {
  61482. if (current2.optional)
  61483. return;
  61484. current2 = current2.object;
  61485. continue;
  61486. }
  61487. break;
  61488. }
  61489. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  61490. }
  61491. return validate2;
  61492. }
  61493. function chain(...fns) {
  61494. function validate2(...args) {
  61495. for (const fn of fns) {
  61496. fn(...args);
  61497. }
  61498. }
  61499. validate2.chainOf = fns;
  61500. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  61501. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  61502. }
  61503. return validate2;
  61504. }
  61505. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  61506. var validFieldKeys = ["default", "optional", "validate"];
  61507. function defineType(type, opts = {}) {
  61508. const inherits = opts.inherits && store[opts.inherits] || {};
  61509. let fields = opts.fields;
  61510. if (!fields) {
  61511. fields = {};
  61512. if (inherits.fields) {
  61513. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  61514. for (const key of keys2) {
  61515. const field = inherits.fields[key];
  61516. const def = field.default;
  61517. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  61518. throw new Error("field defaults can only be primitives or empty arrays currently");
  61519. }
  61520. fields[key] = {
  61521. default: Array.isArray(def) ? [] : def,
  61522. optional: field.optional,
  61523. validate: field.validate
  61524. };
  61525. }
  61526. }
  61527. }
  61528. const visitor = opts.visitor || inherits.visitor || [];
  61529. const aliases = opts.aliases || inherits.aliases || [];
  61530. const builder = opts.builder || inherits.builder || opts.visitor || [];
  61531. for (const k of Object.keys(opts)) {
  61532. if (validTypeOpts.indexOf(k) === -1) {
  61533. throw new Error(`Unknown type option "${k}" on ${type}`);
  61534. }
  61535. }
  61536. if (opts.deprecatedAlias) {
  61537. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  61538. }
  61539. for (const key of visitor.concat(builder)) {
  61540. fields[key] = fields[key] || {};
  61541. }
  61542. for (const key of Object.keys(fields)) {
  61543. const field = fields[key];
  61544. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  61545. field.optional = true;
  61546. }
  61547. if (field.default === void 0) {
  61548. field.default = null;
  61549. } else if (!field.validate && field.default != null) {
  61550. field.validate = assertValueType(getType(field.default));
  61551. }
  61552. for (const k of Object.keys(field)) {
  61553. if (validFieldKeys.indexOf(k) === -1) {
  61554. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  61555. }
  61556. }
  61557. }
  61558. VISITOR_KEYS[type] = opts.visitor = visitor;
  61559. BUILDER_KEYS[type] = opts.builder = builder;
  61560. NODE_FIELDS[type] = opts.fields = fields;
  61561. ALIAS_KEYS[type] = opts.aliases = aliases;
  61562. aliases.forEach((alias) => {
  61563. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  61564. FLIPPED_ALIAS_KEYS[alias].push(type);
  61565. });
  61566. if (opts.validate) {
  61567. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  61568. }
  61569. store[type] = opts;
  61570. }
  61571. var store = {};
  61572. }
  61573. });
  61574. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/core.js
  61575. var require_core3 = __commonJS({
  61576. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  61577. "use strict";
  61578. Object.defineProperty(exports, "__esModule", {
  61579. value: true
  61580. });
  61581. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  61582. var _is = require_is3();
  61583. var _isValidIdentifier = require_isValidIdentifier3();
  61584. var _helperValidatorIdentifier = require_lib15();
  61585. var _constants = require_constants3();
  61586. var _utils = require_utils3();
  61587. (0, _utils.default)("ArrayExpression", {
  61588. fields: {
  61589. elements: {
  61590. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  61591. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  61592. }
  61593. },
  61594. visitor: ["elements"],
  61595. aliases: ["Expression"]
  61596. });
  61597. (0, _utils.default)("AssignmentExpression", {
  61598. fields: {
  61599. operator: {
  61600. validate: function() {
  61601. if (!process.env.BABEL_TYPES_8_BREAKING) {
  61602. return (0, _utils.assertValueType)("string");
  61603. }
  61604. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  61605. const pattern = (0, _utils.assertOneOf)("=");
  61606. return function(node, key, val) {
  61607. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  61608. validator(node, key, val);
  61609. };
  61610. }()
  61611. },
  61612. left: {
  61613. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  61614. },
  61615. right: {
  61616. validate: (0, _utils.assertNodeType)("Expression")
  61617. }
  61618. },
  61619. builder: ["operator", "left", "right"],
  61620. visitor: ["left", "right"],
  61621. aliases: ["Expression"]
  61622. });
  61623. (0, _utils.default)("BinaryExpression", {
  61624. builder: ["operator", "left", "right"],
  61625. fields: {
  61626. operator: {
  61627. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  61628. },
  61629. left: {
  61630. validate: function() {
  61631. const expression = (0, _utils.assertNodeType)("Expression");
  61632. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  61633. const validator = function(node, key, val) {
  61634. const validator2 = node.operator === "in" ? inOp : expression;
  61635. validator2(node, key, val);
  61636. };
  61637. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  61638. return validator;
  61639. }()
  61640. },
  61641. right: {
  61642. validate: (0, _utils.assertNodeType)("Expression")
  61643. }
  61644. },
  61645. visitor: ["left", "right"],
  61646. aliases: ["Binary", "Expression"]
  61647. });
  61648. (0, _utils.default)("InterpreterDirective", {
  61649. builder: ["value"],
  61650. fields: {
  61651. value: {
  61652. validate: (0, _utils.assertValueType)("string")
  61653. }
  61654. }
  61655. });
  61656. (0, _utils.default)("Directive", {
  61657. visitor: ["value"],
  61658. fields: {
  61659. value: {
  61660. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  61661. }
  61662. }
  61663. });
  61664. (0, _utils.default)("DirectiveLiteral", {
  61665. builder: ["value"],
  61666. fields: {
  61667. value: {
  61668. validate: (0, _utils.assertValueType)("string")
  61669. }
  61670. }
  61671. });
  61672. (0, _utils.default)("BlockStatement", {
  61673. builder: ["body", "directives"],
  61674. visitor: ["directives", "body"],
  61675. fields: {
  61676. directives: {
  61677. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  61678. default: []
  61679. },
  61680. body: {
  61681. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  61682. }
  61683. },
  61684. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  61685. });
  61686. (0, _utils.default)("BreakStatement", {
  61687. visitor: ["label"],
  61688. fields: {
  61689. label: {
  61690. validate: (0, _utils.assertNodeType)("Identifier"),
  61691. optional: true
  61692. }
  61693. },
  61694. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  61695. });
  61696. (0, _utils.default)("CallExpression", {
  61697. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  61698. builder: ["callee", "arguments"],
  61699. aliases: ["Expression"],
  61700. fields: Object.assign({
  61701. callee: {
  61702. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  61703. },
  61704. arguments: {
  61705. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  61706. }
  61707. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  61708. optional: {
  61709. validate: (0, _utils.assertOneOf)(true, false),
  61710. optional: true
  61711. }
  61712. } : {}, {
  61713. typeArguments: {
  61714. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  61715. optional: true
  61716. },
  61717. typeParameters: {
  61718. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  61719. optional: true
  61720. }
  61721. })
  61722. });
  61723. (0, _utils.default)("CatchClause", {
  61724. visitor: ["param", "body"],
  61725. fields: {
  61726. param: {
  61727. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  61728. optional: true
  61729. },
  61730. body: {
  61731. validate: (0, _utils.assertNodeType)("BlockStatement")
  61732. }
  61733. },
  61734. aliases: ["Scopable", "BlockParent"]
  61735. });
  61736. (0, _utils.default)("ConditionalExpression", {
  61737. visitor: ["test", "consequent", "alternate"],
  61738. fields: {
  61739. test: {
  61740. validate: (0, _utils.assertNodeType)("Expression")
  61741. },
  61742. consequent: {
  61743. validate: (0, _utils.assertNodeType)("Expression")
  61744. },
  61745. alternate: {
  61746. validate: (0, _utils.assertNodeType)("Expression")
  61747. }
  61748. },
  61749. aliases: ["Expression", "Conditional"]
  61750. });
  61751. (0, _utils.default)("ContinueStatement", {
  61752. visitor: ["label"],
  61753. fields: {
  61754. label: {
  61755. validate: (0, _utils.assertNodeType)("Identifier"),
  61756. optional: true
  61757. }
  61758. },
  61759. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  61760. });
  61761. (0, _utils.default)("DebuggerStatement", {
  61762. aliases: ["Statement"]
  61763. });
  61764. (0, _utils.default)("DoWhileStatement", {
  61765. visitor: ["test", "body"],
  61766. fields: {
  61767. test: {
  61768. validate: (0, _utils.assertNodeType)("Expression")
  61769. },
  61770. body: {
  61771. validate: (0, _utils.assertNodeType)("Statement")
  61772. }
  61773. },
  61774. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  61775. });
  61776. (0, _utils.default)("EmptyStatement", {
  61777. aliases: ["Statement"]
  61778. });
  61779. (0, _utils.default)("ExpressionStatement", {
  61780. visitor: ["expression"],
  61781. fields: {
  61782. expression: {
  61783. validate: (0, _utils.assertNodeType)("Expression")
  61784. }
  61785. },
  61786. aliases: ["Statement", "ExpressionWrapper"]
  61787. });
  61788. (0, _utils.default)("File", {
  61789. builder: ["program", "comments", "tokens"],
  61790. visitor: ["program"],
  61791. fields: {
  61792. program: {
  61793. validate: (0, _utils.assertNodeType)("Program")
  61794. },
  61795. comments: {
  61796. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  61797. }, {
  61798. each: {
  61799. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  61800. }
  61801. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  61802. optional: true
  61803. },
  61804. tokens: {
  61805. validate: (0, _utils.assertEach)(Object.assign(() => {
  61806. }, {
  61807. type: "any"
  61808. })),
  61809. optional: true
  61810. }
  61811. }
  61812. });
  61813. (0, _utils.default)("ForInStatement", {
  61814. visitor: ["left", "right", "body"],
  61815. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  61816. fields: {
  61817. left: {
  61818. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  61819. },
  61820. right: {
  61821. validate: (0, _utils.assertNodeType)("Expression")
  61822. },
  61823. body: {
  61824. validate: (0, _utils.assertNodeType)("Statement")
  61825. }
  61826. }
  61827. });
  61828. (0, _utils.default)("ForStatement", {
  61829. visitor: ["init", "test", "update", "body"],
  61830. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  61831. fields: {
  61832. init: {
  61833. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  61834. optional: true
  61835. },
  61836. test: {
  61837. validate: (0, _utils.assertNodeType)("Expression"),
  61838. optional: true
  61839. },
  61840. update: {
  61841. validate: (0, _utils.assertNodeType)("Expression"),
  61842. optional: true
  61843. },
  61844. body: {
  61845. validate: (0, _utils.assertNodeType)("Statement")
  61846. }
  61847. }
  61848. });
  61849. var functionCommon = {
  61850. params: {
  61851. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  61852. },
  61853. generator: {
  61854. default: false
  61855. },
  61856. async: {
  61857. default: false
  61858. }
  61859. };
  61860. exports.functionCommon = functionCommon;
  61861. var functionTypeAnnotationCommon = {
  61862. returnType: {
  61863. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  61864. optional: true
  61865. },
  61866. typeParameters: {
  61867. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  61868. optional: true
  61869. }
  61870. };
  61871. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  61872. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  61873. declare: {
  61874. validate: (0, _utils.assertValueType)("boolean"),
  61875. optional: true
  61876. },
  61877. id: {
  61878. validate: (0, _utils.assertNodeType)("Identifier"),
  61879. optional: true
  61880. }
  61881. });
  61882. exports.functionDeclarationCommon = functionDeclarationCommon;
  61883. (0, _utils.default)("FunctionDeclaration", {
  61884. builder: ["id", "params", "body", "generator", "async"],
  61885. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  61886. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  61887. body: {
  61888. validate: (0, _utils.assertNodeType)("BlockStatement")
  61889. }
  61890. }),
  61891. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  61892. validate: function() {
  61893. if (!process.env.BABEL_TYPES_8_BREAKING)
  61894. return () => {
  61895. };
  61896. const identifier = (0, _utils.assertNodeType)("Identifier");
  61897. return function(parent, key, node) {
  61898. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  61899. identifier(node, "id", node.id);
  61900. }
  61901. };
  61902. }()
  61903. });
  61904. (0, _utils.default)("FunctionExpression", {
  61905. inherits: "FunctionDeclaration",
  61906. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  61907. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  61908. id: {
  61909. validate: (0, _utils.assertNodeType)("Identifier"),
  61910. optional: true
  61911. },
  61912. body: {
  61913. validate: (0, _utils.assertNodeType)("BlockStatement")
  61914. }
  61915. })
  61916. });
  61917. var patternLikeCommon = {
  61918. typeAnnotation: {
  61919. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  61920. optional: true
  61921. },
  61922. decorators: {
  61923. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  61924. }
  61925. };
  61926. exports.patternLikeCommon = patternLikeCommon;
  61927. (0, _utils.default)("Identifier", {
  61928. builder: ["name"],
  61929. visitor: ["typeAnnotation", "decorators"],
  61930. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  61931. fields: Object.assign({}, patternLikeCommon, {
  61932. name: {
  61933. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  61934. if (!process.env.BABEL_TYPES_8_BREAKING)
  61935. return;
  61936. if (!(0, _isValidIdentifier.default)(val, false)) {
  61937. throw new TypeError(`"${val}" is not a valid identifier name`);
  61938. }
  61939. }, {
  61940. type: "string"
  61941. }))
  61942. },
  61943. optional: {
  61944. validate: (0, _utils.assertValueType)("boolean"),
  61945. optional: true
  61946. }
  61947. }),
  61948. validate(parent, key, node) {
  61949. if (!process.env.BABEL_TYPES_8_BREAKING)
  61950. return;
  61951. const match = /\.(\w+)$/.exec(key);
  61952. if (!match)
  61953. return;
  61954. const [, parentKey] = match;
  61955. const nonComp = {
  61956. computed: false
  61957. };
  61958. if (parentKey === "property") {
  61959. if ((0, _is.default)("MemberExpression", parent, nonComp))
  61960. return;
  61961. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  61962. return;
  61963. } else if (parentKey === "key") {
  61964. if ((0, _is.default)("Property", parent, nonComp))
  61965. return;
  61966. if ((0, _is.default)("Method", parent, nonComp))
  61967. return;
  61968. } else if (parentKey === "exported") {
  61969. if ((0, _is.default)("ExportSpecifier", parent))
  61970. return;
  61971. } else if (parentKey === "imported") {
  61972. if ((0, _is.default)("ImportSpecifier", parent, {
  61973. imported: node
  61974. }))
  61975. return;
  61976. } else if (parentKey === "meta") {
  61977. if ((0, _is.default)("MetaProperty", parent, {
  61978. meta: node
  61979. }))
  61980. return;
  61981. }
  61982. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  61983. throw new TypeError(`"${node.name}" is not a valid identifier`);
  61984. }
  61985. }
  61986. });
  61987. (0, _utils.default)("IfStatement", {
  61988. visitor: ["test", "consequent", "alternate"],
  61989. aliases: ["Statement", "Conditional"],
  61990. fields: {
  61991. test: {
  61992. validate: (0, _utils.assertNodeType)("Expression")
  61993. },
  61994. consequent: {
  61995. validate: (0, _utils.assertNodeType)("Statement")
  61996. },
  61997. alternate: {
  61998. optional: true,
  61999. validate: (0, _utils.assertNodeType)("Statement")
  62000. }
  62001. }
  62002. });
  62003. (0, _utils.default)("LabeledStatement", {
  62004. visitor: ["label", "body"],
  62005. aliases: ["Statement"],
  62006. fields: {
  62007. label: {
  62008. validate: (0, _utils.assertNodeType)("Identifier")
  62009. },
  62010. body: {
  62011. validate: (0, _utils.assertNodeType)("Statement")
  62012. }
  62013. }
  62014. });
  62015. (0, _utils.default)("StringLiteral", {
  62016. builder: ["value"],
  62017. fields: {
  62018. value: {
  62019. validate: (0, _utils.assertValueType)("string")
  62020. }
  62021. },
  62022. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62023. });
  62024. (0, _utils.default)("NumericLiteral", {
  62025. builder: ["value"],
  62026. deprecatedAlias: "NumberLiteral",
  62027. fields: {
  62028. value: {
  62029. validate: (0, _utils.assertValueType)("number")
  62030. }
  62031. },
  62032. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62033. });
  62034. (0, _utils.default)("NullLiteral", {
  62035. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62036. });
  62037. (0, _utils.default)("BooleanLiteral", {
  62038. builder: ["value"],
  62039. fields: {
  62040. value: {
  62041. validate: (0, _utils.assertValueType)("boolean")
  62042. }
  62043. },
  62044. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62045. });
  62046. (0, _utils.default)("RegExpLiteral", {
  62047. builder: ["pattern", "flags"],
  62048. deprecatedAlias: "RegexLiteral",
  62049. aliases: ["Expression", "Pureish", "Literal"],
  62050. fields: {
  62051. pattern: {
  62052. validate: (0, _utils.assertValueType)("string")
  62053. },
  62054. flags: {
  62055. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  62056. if (!process.env.BABEL_TYPES_8_BREAKING)
  62057. return;
  62058. const invalid2 = /[^gimsuy]/.exec(val);
  62059. if (invalid2) {
  62060. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  62061. }
  62062. }, {
  62063. type: "string"
  62064. })),
  62065. default: ""
  62066. }
  62067. }
  62068. });
  62069. (0, _utils.default)("LogicalExpression", {
  62070. builder: ["operator", "left", "right"],
  62071. visitor: ["left", "right"],
  62072. aliases: ["Binary", "Expression"],
  62073. fields: {
  62074. operator: {
  62075. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  62076. },
  62077. left: {
  62078. validate: (0, _utils.assertNodeType)("Expression")
  62079. },
  62080. right: {
  62081. validate: (0, _utils.assertNodeType)("Expression")
  62082. }
  62083. }
  62084. });
  62085. (0, _utils.default)("MemberExpression", {
  62086. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  62087. visitor: ["object", "property"],
  62088. aliases: ["Expression", "LVal"],
  62089. fields: Object.assign({
  62090. object: {
  62091. validate: (0, _utils.assertNodeType)("Expression")
  62092. },
  62093. property: {
  62094. validate: function() {
  62095. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  62096. const computed = (0, _utils.assertNodeType)("Expression");
  62097. const validator = function(node, key, val) {
  62098. const validator2 = node.computed ? computed : normal;
  62099. validator2(node, key, val);
  62100. };
  62101. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  62102. return validator;
  62103. }()
  62104. },
  62105. computed: {
  62106. default: false
  62107. }
  62108. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  62109. optional: {
  62110. validate: (0, _utils.assertOneOf)(true, false),
  62111. optional: true
  62112. }
  62113. } : {})
  62114. });
  62115. (0, _utils.default)("NewExpression", {
  62116. inherits: "CallExpression"
  62117. });
  62118. (0, _utils.default)("Program", {
  62119. visitor: ["directives", "body"],
  62120. builder: ["body", "directives", "sourceType", "interpreter"],
  62121. fields: {
  62122. sourceFile: {
  62123. validate: (0, _utils.assertValueType)("string")
  62124. },
  62125. sourceType: {
  62126. validate: (0, _utils.assertOneOf)("script", "module"),
  62127. default: "script"
  62128. },
  62129. interpreter: {
  62130. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  62131. default: null,
  62132. optional: true
  62133. },
  62134. directives: {
  62135. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  62136. default: []
  62137. },
  62138. body: {
  62139. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  62140. }
  62141. },
  62142. aliases: ["Scopable", "BlockParent", "Block"]
  62143. });
  62144. (0, _utils.default)("ObjectExpression", {
  62145. visitor: ["properties"],
  62146. aliases: ["Expression"],
  62147. fields: {
  62148. properties: {
  62149. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  62150. }
  62151. }
  62152. });
  62153. (0, _utils.default)("ObjectMethod", {
  62154. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  62155. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  62156. kind: Object.assign({
  62157. validate: (0, _utils.assertOneOf)("method", "get", "set")
  62158. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  62159. default: "method"
  62160. } : {}),
  62161. computed: {
  62162. default: false
  62163. },
  62164. key: {
  62165. validate: function() {
  62166. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  62167. const computed = (0, _utils.assertNodeType)("Expression");
  62168. const validator = function(node, key, val) {
  62169. const validator2 = node.computed ? computed : normal;
  62170. validator2(node, key, val);
  62171. };
  62172. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  62173. return validator;
  62174. }()
  62175. },
  62176. decorators: {
  62177. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62178. optional: true
  62179. },
  62180. body: {
  62181. validate: (0, _utils.assertNodeType)("BlockStatement")
  62182. }
  62183. }),
  62184. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  62185. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  62186. });
  62187. (0, _utils.default)("ObjectProperty", {
  62188. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  62189. fields: {
  62190. computed: {
  62191. default: false
  62192. },
  62193. key: {
  62194. validate: function() {
  62195. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  62196. const computed = (0, _utils.assertNodeType)("Expression");
  62197. const validator = function(node, key, val) {
  62198. const validator2 = node.computed ? computed : normal;
  62199. validator2(node, key, val);
  62200. };
  62201. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  62202. return validator;
  62203. }()
  62204. },
  62205. value: {
  62206. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  62207. },
  62208. shorthand: {
  62209. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  62210. if (!process.env.BABEL_TYPES_8_BREAKING)
  62211. return;
  62212. if (val && node.computed) {
  62213. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  62214. }
  62215. }, {
  62216. type: "boolean"
  62217. }), function(node, key, val) {
  62218. if (!process.env.BABEL_TYPES_8_BREAKING)
  62219. return;
  62220. if (val && !(0, _is.default)("Identifier", node.key)) {
  62221. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  62222. }
  62223. }),
  62224. default: false
  62225. },
  62226. decorators: {
  62227. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62228. optional: true
  62229. }
  62230. },
  62231. visitor: ["key", "value", "decorators"],
  62232. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  62233. validate: function() {
  62234. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  62235. const expression = (0, _utils.assertNodeType)("Expression");
  62236. return function(parent, key, node) {
  62237. if (!process.env.BABEL_TYPES_8_BREAKING)
  62238. return;
  62239. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  62240. validator(node, "value", node.value);
  62241. };
  62242. }()
  62243. });
  62244. (0, _utils.default)("RestElement", {
  62245. visitor: ["argument", "typeAnnotation"],
  62246. builder: ["argument"],
  62247. aliases: ["LVal", "PatternLike"],
  62248. deprecatedAlias: "RestProperty",
  62249. fields: Object.assign({}, patternLikeCommon, {
  62250. argument: {
  62251. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  62252. }
  62253. }),
  62254. validate(parent, key) {
  62255. if (!process.env.BABEL_TYPES_8_BREAKING)
  62256. return;
  62257. const match = /(\w+)\[(\d+)\]/.exec(key);
  62258. if (!match)
  62259. throw new Error("Internal Babel error: malformed key.");
  62260. const [, listKey, index2] = match;
  62261. if (parent[listKey].length > index2 + 1) {
  62262. throw new TypeError(`RestElement must be last element of ${listKey}`);
  62263. }
  62264. }
  62265. });
  62266. (0, _utils.default)("ReturnStatement", {
  62267. visitor: ["argument"],
  62268. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  62269. fields: {
  62270. argument: {
  62271. validate: (0, _utils.assertNodeType)("Expression"),
  62272. optional: true
  62273. }
  62274. }
  62275. });
  62276. (0, _utils.default)("SequenceExpression", {
  62277. visitor: ["expressions"],
  62278. fields: {
  62279. expressions: {
  62280. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  62281. }
  62282. },
  62283. aliases: ["Expression"]
  62284. });
  62285. (0, _utils.default)("ParenthesizedExpression", {
  62286. visitor: ["expression"],
  62287. aliases: ["Expression", "ExpressionWrapper"],
  62288. fields: {
  62289. expression: {
  62290. validate: (0, _utils.assertNodeType)("Expression")
  62291. }
  62292. }
  62293. });
  62294. (0, _utils.default)("SwitchCase", {
  62295. visitor: ["test", "consequent"],
  62296. fields: {
  62297. test: {
  62298. validate: (0, _utils.assertNodeType)("Expression"),
  62299. optional: true
  62300. },
  62301. consequent: {
  62302. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  62303. }
  62304. }
  62305. });
  62306. (0, _utils.default)("SwitchStatement", {
  62307. visitor: ["discriminant", "cases"],
  62308. aliases: ["Statement", "BlockParent", "Scopable"],
  62309. fields: {
  62310. discriminant: {
  62311. validate: (0, _utils.assertNodeType)("Expression")
  62312. },
  62313. cases: {
  62314. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  62315. }
  62316. }
  62317. });
  62318. (0, _utils.default)("ThisExpression", {
  62319. aliases: ["Expression"]
  62320. });
  62321. (0, _utils.default)("ThrowStatement", {
  62322. visitor: ["argument"],
  62323. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  62324. fields: {
  62325. argument: {
  62326. validate: (0, _utils.assertNodeType)("Expression")
  62327. }
  62328. }
  62329. });
  62330. (0, _utils.default)("TryStatement", {
  62331. visitor: ["block", "handler", "finalizer"],
  62332. aliases: ["Statement"],
  62333. fields: {
  62334. block: {
  62335. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  62336. if (!process.env.BABEL_TYPES_8_BREAKING)
  62337. return;
  62338. if (!node.handler && !node.finalizer) {
  62339. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  62340. }
  62341. }, {
  62342. oneOfNodeTypes: ["BlockStatement"]
  62343. }))
  62344. },
  62345. handler: {
  62346. optional: true,
  62347. validate: (0, _utils.assertNodeType)("CatchClause")
  62348. },
  62349. finalizer: {
  62350. optional: true,
  62351. validate: (0, _utils.assertNodeType)("BlockStatement")
  62352. }
  62353. }
  62354. });
  62355. (0, _utils.default)("UnaryExpression", {
  62356. builder: ["operator", "argument", "prefix"],
  62357. fields: {
  62358. prefix: {
  62359. default: true
  62360. },
  62361. argument: {
  62362. validate: (0, _utils.assertNodeType)("Expression")
  62363. },
  62364. operator: {
  62365. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  62366. }
  62367. },
  62368. visitor: ["argument"],
  62369. aliases: ["UnaryLike", "Expression"]
  62370. });
  62371. (0, _utils.default)("UpdateExpression", {
  62372. builder: ["operator", "argument", "prefix"],
  62373. fields: {
  62374. prefix: {
  62375. default: false
  62376. },
  62377. argument: {
  62378. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  62379. },
  62380. operator: {
  62381. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  62382. }
  62383. },
  62384. visitor: ["argument"],
  62385. aliases: ["Expression"]
  62386. });
  62387. (0, _utils.default)("VariableDeclaration", {
  62388. builder: ["kind", "declarations"],
  62389. visitor: ["declarations"],
  62390. aliases: ["Statement", "Declaration"],
  62391. fields: {
  62392. declare: {
  62393. validate: (0, _utils.assertValueType)("boolean"),
  62394. optional: true
  62395. },
  62396. kind: {
  62397. validate: (0, _utils.assertOneOf)("var", "let", "const")
  62398. },
  62399. declarations: {
  62400. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  62401. }
  62402. },
  62403. validate(parent, key, node) {
  62404. if (!process.env.BABEL_TYPES_8_BREAKING)
  62405. return;
  62406. if (!(0, _is.default)("ForXStatement", parent, {
  62407. left: node
  62408. }))
  62409. return;
  62410. if (node.declarations.length !== 1) {
  62411. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  62412. }
  62413. }
  62414. });
  62415. (0, _utils.default)("VariableDeclarator", {
  62416. visitor: ["id", "init"],
  62417. fields: {
  62418. id: {
  62419. validate: function() {
  62420. if (!process.env.BABEL_TYPES_8_BREAKING) {
  62421. return (0, _utils.assertNodeType)("LVal");
  62422. }
  62423. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  62424. const without = (0, _utils.assertNodeType)("Identifier");
  62425. return function(node, key, val) {
  62426. const validator = node.init ? normal : without;
  62427. validator(node, key, val);
  62428. };
  62429. }()
  62430. },
  62431. definite: {
  62432. optional: true,
  62433. validate: (0, _utils.assertValueType)("boolean")
  62434. },
  62435. init: {
  62436. optional: true,
  62437. validate: (0, _utils.assertNodeType)("Expression")
  62438. }
  62439. }
  62440. });
  62441. (0, _utils.default)("WhileStatement", {
  62442. visitor: ["test", "body"],
  62443. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  62444. fields: {
  62445. test: {
  62446. validate: (0, _utils.assertNodeType)("Expression")
  62447. },
  62448. body: {
  62449. validate: (0, _utils.assertNodeType)("Statement")
  62450. }
  62451. }
  62452. });
  62453. (0, _utils.default)("WithStatement", {
  62454. visitor: ["object", "body"],
  62455. aliases: ["Statement"],
  62456. fields: {
  62457. object: {
  62458. validate: (0, _utils.assertNodeType)("Expression")
  62459. },
  62460. body: {
  62461. validate: (0, _utils.assertNodeType)("Statement")
  62462. }
  62463. }
  62464. });
  62465. (0, _utils.default)("AssignmentPattern", {
  62466. visitor: ["left", "right", "decorators"],
  62467. builder: ["left", "right"],
  62468. aliases: ["Pattern", "PatternLike", "LVal"],
  62469. fields: Object.assign({}, patternLikeCommon, {
  62470. left: {
  62471. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  62472. },
  62473. right: {
  62474. validate: (0, _utils.assertNodeType)("Expression")
  62475. },
  62476. decorators: {
  62477. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62478. optional: true
  62479. }
  62480. })
  62481. });
  62482. (0, _utils.default)("ArrayPattern", {
  62483. visitor: ["elements", "typeAnnotation"],
  62484. builder: ["elements"],
  62485. aliases: ["Pattern", "PatternLike", "LVal"],
  62486. fields: Object.assign({}, patternLikeCommon, {
  62487. elements: {
  62488. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  62489. },
  62490. decorators: {
  62491. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62492. optional: true
  62493. }
  62494. })
  62495. });
  62496. (0, _utils.default)("ArrowFunctionExpression", {
  62497. builder: ["params", "body", "async"],
  62498. visitor: ["params", "body", "returnType", "typeParameters"],
  62499. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  62500. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  62501. expression: {
  62502. validate: (0, _utils.assertValueType)("boolean")
  62503. },
  62504. body: {
  62505. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  62506. }
  62507. })
  62508. });
  62509. (0, _utils.default)("ClassBody", {
  62510. visitor: ["body"],
  62511. fields: {
  62512. body: {
  62513. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  62514. }
  62515. }
  62516. });
  62517. (0, _utils.default)("ClassExpression", {
  62518. builder: ["id", "superClass", "body", "decorators"],
  62519. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  62520. aliases: ["Scopable", "Class", "Expression"],
  62521. fields: {
  62522. id: {
  62523. validate: (0, _utils.assertNodeType)("Identifier"),
  62524. optional: true
  62525. },
  62526. typeParameters: {
  62527. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  62528. optional: true
  62529. },
  62530. body: {
  62531. validate: (0, _utils.assertNodeType)("ClassBody")
  62532. },
  62533. superClass: {
  62534. optional: true,
  62535. validate: (0, _utils.assertNodeType)("Expression")
  62536. },
  62537. superTypeParameters: {
  62538. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  62539. optional: true
  62540. },
  62541. implements: {
  62542. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  62543. optional: true
  62544. },
  62545. decorators: {
  62546. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62547. optional: true
  62548. },
  62549. mixins: {
  62550. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  62551. optional: true
  62552. }
  62553. }
  62554. });
  62555. (0, _utils.default)("ClassDeclaration", {
  62556. inherits: "ClassExpression",
  62557. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  62558. fields: {
  62559. id: {
  62560. validate: (0, _utils.assertNodeType)("Identifier")
  62561. },
  62562. typeParameters: {
  62563. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  62564. optional: true
  62565. },
  62566. body: {
  62567. validate: (0, _utils.assertNodeType)("ClassBody")
  62568. },
  62569. superClass: {
  62570. optional: true,
  62571. validate: (0, _utils.assertNodeType)("Expression")
  62572. },
  62573. superTypeParameters: {
  62574. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  62575. optional: true
  62576. },
  62577. implements: {
  62578. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  62579. optional: true
  62580. },
  62581. decorators: {
  62582. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62583. optional: true
  62584. },
  62585. mixins: {
  62586. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  62587. optional: true
  62588. },
  62589. declare: {
  62590. validate: (0, _utils.assertValueType)("boolean"),
  62591. optional: true
  62592. },
  62593. abstract: {
  62594. validate: (0, _utils.assertValueType)("boolean"),
  62595. optional: true
  62596. }
  62597. },
  62598. validate: function() {
  62599. const identifier = (0, _utils.assertNodeType)("Identifier");
  62600. return function(parent, key, node) {
  62601. if (!process.env.BABEL_TYPES_8_BREAKING)
  62602. return;
  62603. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  62604. identifier(node, "id", node.id);
  62605. }
  62606. };
  62607. }()
  62608. });
  62609. (0, _utils.default)("ExportAllDeclaration", {
  62610. visitor: ["source"],
  62611. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  62612. fields: {
  62613. source: {
  62614. validate: (0, _utils.assertNodeType)("StringLiteral")
  62615. },
  62616. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  62617. assertions: {
  62618. optional: true,
  62619. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  62620. }
  62621. }
  62622. });
  62623. (0, _utils.default)("ExportDefaultDeclaration", {
  62624. visitor: ["declaration"],
  62625. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  62626. fields: {
  62627. declaration: {
  62628. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  62629. }
  62630. }
  62631. });
  62632. (0, _utils.default)("ExportNamedDeclaration", {
  62633. visitor: ["declaration", "specifiers", "source"],
  62634. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  62635. fields: {
  62636. declaration: {
  62637. optional: true,
  62638. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  62639. if (!process.env.BABEL_TYPES_8_BREAKING)
  62640. return;
  62641. if (val && node.specifiers.length) {
  62642. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  62643. }
  62644. }, {
  62645. oneOfNodeTypes: ["Declaration"]
  62646. }), function(node, key, val) {
  62647. if (!process.env.BABEL_TYPES_8_BREAKING)
  62648. return;
  62649. if (val && node.source) {
  62650. throw new TypeError("Cannot export a declaration from a source");
  62651. }
  62652. })
  62653. },
  62654. assertions: {
  62655. optional: true,
  62656. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  62657. },
  62658. specifiers: {
  62659. default: [],
  62660. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  62661. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  62662. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  62663. if (!process.env.BABEL_TYPES_8_BREAKING)
  62664. return sourced;
  62665. return function(node, key, val) {
  62666. const validator = node.source ? sourced : sourceless;
  62667. validator(node, key, val);
  62668. };
  62669. }()))
  62670. },
  62671. source: {
  62672. validate: (0, _utils.assertNodeType)("StringLiteral"),
  62673. optional: true
  62674. },
  62675. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  62676. }
  62677. });
  62678. (0, _utils.default)("ExportSpecifier", {
  62679. visitor: ["local", "exported"],
  62680. aliases: ["ModuleSpecifier"],
  62681. fields: {
  62682. local: {
  62683. validate: (0, _utils.assertNodeType)("Identifier")
  62684. },
  62685. exported: {
  62686. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  62687. }
  62688. }
  62689. });
  62690. (0, _utils.default)("ForOfStatement", {
  62691. visitor: ["left", "right", "body"],
  62692. builder: ["left", "right", "body", "await"],
  62693. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  62694. fields: {
  62695. left: {
  62696. validate: function() {
  62697. if (!process.env.BABEL_TYPES_8_BREAKING) {
  62698. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  62699. }
  62700. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  62701. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  62702. return function(node, key, val) {
  62703. if ((0, _is.default)("VariableDeclaration", val)) {
  62704. declaration(node, key, val);
  62705. } else {
  62706. lval(node, key, val);
  62707. }
  62708. };
  62709. }()
  62710. },
  62711. right: {
  62712. validate: (0, _utils.assertNodeType)("Expression")
  62713. },
  62714. body: {
  62715. validate: (0, _utils.assertNodeType)("Statement")
  62716. },
  62717. await: {
  62718. default: false
  62719. }
  62720. }
  62721. });
  62722. (0, _utils.default)("ImportDeclaration", {
  62723. visitor: ["specifiers", "source"],
  62724. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  62725. fields: {
  62726. assertions: {
  62727. optional: true,
  62728. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  62729. },
  62730. specifiers: {
  62731. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  62732. },
  62733. source: {
  62734. validate: (0, _utils.assertNodeType)("StringLiteral")
  62735. },
  62736. importKind: {
  62737. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  62738. optional: true
  62739. }
  62740. }
  62741. });
  62742. (0, _utils.default)("ImportDefaultSpecifier", {
  62743. visitor: ["local"],
  62744. aliases: ["ModuleSpecifier"],
  62745. fields: {
  62746. local: {
  62747. validate: (0, _utils.assertNodeType)("Identifier")
  62748. }
  62749. }
  62750. });
  62751. (0, _utils.default)("ImportNamespaceSpecifier", {
  62752. visitor: ["local"],
  62753. aliases: ["ModuleSpecifier"],
  62754. fields: {
  62755. local: {
  62756. validate: (0, _utils.assertNodeType)("Identifier")
  62757. }
  62758. }
  62759. });
  62760. (0, _utils.default)("ImportSpecifier", {
  62761. visitor: ["local", "imported"],
  62762. aliases: ["ModuleSpecifier"],
  62763. fields: {
  62764. local: {
  62765. validate: (0, _utils.assertNodeType)("Identifier")
  62766. },
  62767. imported: {
  62768. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  62769. },
  62770. importKind: {
  62771. validate: (0, _utils.assertOneOf)("type", "typeof"),
  62772. optional: true
  62773. }
  62774. }
  62775. });
  62776. (0, _utils.default)("MetaProperty", {
  62777. visitor: ["meta", "property"],
  62778. aliases: ["Expression"],
  62779. fields: {
  62780. meta: {
  62781. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  62782. if (!process.env.BABEL_TYPES_8_BREAKING)
  62783. return;
  62784. let property;
  62785. switch (val.name) {
  62786. case "function":
  62787. property = "sent";
  62788. break;
  62789. case "new":
  62790. property = "target";
  62791. break;
  62792. case "import":
  62793. property = "meta";
  62794. break;
  62795. }
  62796. if (!(0, _is.default)("Identifier", node.property, {
  62797. name: property
  62798. })) {
  62799. throw new TypeError("Unrecognised MetaProperty");
  62800. }
  62801. }, {
  62802. oneOfNodeTypes: ["Identifier"]
  62803. }))
  62804. },
  62805. property: {
  62806. validate: (0, _utils.assertNodeType)("Identifier")
  62807. }
  62808. }
  62809. });
  62810. var classMethodOrPropertyCommon = {
  62811. abstract: {
  62812. validate: (0, _utils.assertValueType)("boolean"),
  62813. optional: true
  62814. },
  62815. accessibility: {
  62816. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  62817. optional: true
  62818. },
  62819. static: {
  62820. default: false
  62821. },
  62822. override: {
  62823. default: false
  62824. },
  62825. computed: {
  62826. default: false
  62827. },
  62828. optional: {
  62829. validate: (0, _utils.assertValueType)("boolean"),
  62830. optional: true
  62831. },
  62832. key: {
  62833. validate: (0, _utils.chain)(function() {
  62834. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  62835. const computed = (0, _utils.assertNodeType)("Expression");
  62836. return function(node, key, val) {
  62837. const validator = node.computed ? computed : normal;
  62838. validator(node, key, val);
  62839. };
  62840. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  62841. }
  62842. };
  62843. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  62844. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  62845. params: {
  62846. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  62847. },
  62848. kind: {
  62849. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  62850. default: "method"
  62851. },
  62852. access: {
  62853. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  62854. optional: true
  62855. },
  62856. decorators: {
  62857. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  62858. optional: true
  62859. }
  62860. });
  62861. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  62862. (0, _utils.default)("ClassMethod", {
  62863. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  62864. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  62865. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  62866. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  62867. body: {
  62868. validate: (0, _utils.assertNodeType)("BlockStatement")
  62869. }
  62870. })
  62871. });
  62872. (0, _utils.default)("ObjectPattern", {
  62873. visitor: ["properties", "typeAnnotation", "decorators"],
  62874. builder: ["properties"],
  62875. aliases: ["Pattern", "PatternLike", "LVal"],
  62876. fields: Object.assign({}, patternLikeCommon, {
  62877. properties: {
  62878. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  62879. }
  62880. })
  62881. });
  62882. (0, _utils.default)("SpreadElement", {
  62883. visitor: ["argument"],
  62884. aliases: ["UnaryLike"],
  62885. deprecatedAlias: "SpreadProperty",
  62886. fields: {
  62887. argument: {
  62888. validate: (0, _utils.assertNodeType)("Expression")
  62889. }
  62890. }
  62891. });
  62892. (0, _utils.default)("Super", {
  62893. aliases: ["Expression"]
  62894. });
  62895. (0, _utils.default)("TaggedTemplateExpression", {
  62896. visitor: ["tag", "quasi"],
  62897. aliases: ["Expression"],
  62898. fields: {
  62899. tag: {
  62900. validate: (0, _utils.assertNodeType)("Expression")
  62901. },
  62902. quasi: {
  62903. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  62904. },
  62905. typeParameters: {
  62906. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  62907. optional: true
  62908. }
  62909. }
  62910. });
  62911. (0, _utils.default)("TemplateElement", {
  62912. builder: ["value", "tail"],
  62913. fields: {
  62914. value: {
  62915. validate: (0, _utils.assertShape)({
  62916. raw: {
  62917. validate: (0, _utils.assertValueType)("string")
  62918. },
  62919. cooked: {
  62920. validate: (0, _utils.assertValueType)("string"),
  62921. optional: true
  62922. }
  62923. })
  62924. },
  62925. tail: {
  62926. default: false
  62927. }
  62928. }
  62929. });
  62930. (0, _utils.default)("TemplateLiteral", {
  62931. visitor: ["quasis", "expressions"],
  62932. aliases: ["Expression", "Literal"],
  62933. fields: {
  62934. quasis: {
  62935. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  62936. },
  62937. expressions: {
  62938. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  62939. if (node.quasis.length !== val.length + 1) {
  62940. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  62941. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  62942. }
  62943. })
  62944. }
  62945. }
  62946. });
  62947. (0, _utils.default)("YieldExpression", {
  62948. builder: ["argument", "delegate"],
  62949. visitor: ["argument"],
  62950. aliases: ["Expression", "Terminatorless"],
  62951. fields: {
  62952. delegate: {
  62953. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  62954. if (!process.env.BABEL_TYPES_8_BREAKING)
  62955. return;
  62956. if (val && !node.argument) {
  62957. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  62958. }
  62959. }, {
  62960. type: "boolean"
  62961. })),
  62962. default: false
  62963. },
  62964. argument: {
  62965. optional: true,
  62966. validate: (0, _utils.assertNodeType)("Expression")
  62967. }
  62968. }
  62969. });
  62970. (0, _utils.default)("AwaitExpression", {
  62971. builder: ["argument"],
  62972. visitor: ["argument"],
  62973. aliases: ["Expression", "Terminatorless"],
  62974. fields: {
  62975. argument: {
  62976. validate: (0, _utils.assertNodeType)("Expression")
  62977. }
  62978. }
  62979. });
  62980. (0, _utils.default)("Import", {
  62981. aliases: ["Expression"]
  62982. });
  62983. (0, _utils.default)("BigIntLiteral", {
  62984. builder: ["value"],
  62985. fields: {
  62986. value: {
  62987. validate: (0, _utils.assertValueType)("string")
  62988. }
  62989. },
  62990. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  62991. });
  62992. (0, _utils.default)("ExportNamespaceSpecifier", {
  62993. visitor: ["exported"],
  62994. aliases: ["ModuleSpecifier"],
  62995. fields: {
  62996. exported: {
  62997. validate: (0, _utils.assertNodeType)("Identifier")
  62998. }
  62999. }
  63000. });
  63001. (0, _utils.default)("OptionalMemberExpression", {
  63002. builder: ["object", "property", "computed", "optional"],
  63003. visitor: ["object", "property"],
  63004. aliases: ["Expression"],
  63005. fields: {
  63006. object: {
  63007. validate: (0, _utils.assertNodeType)("Expression")
  63008. },
  63009. property: {
  63010. validate: function() {
  63011. const normal = (0, _utils.assertNodeType)("Identifier");
  63012. const computed = (0, _utils.assertNodeType)("Expression");
  63013. const validator = function(node, key, val) {
  63014. const validator2 = node.computed ? computed : normal;
  63015. validator2(node, key, val);
  63016. };
  63017. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  63018. return validator;
  63019. }()
  63020. },
  63021. computed: {
  63022. default: false
  63023. },
  63024. optional: {
  63025. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  63026. }
  63027. }
  63028. });
  63029. (0, _utils.default)("OptionalCallExpression", {
  63030. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  63031. builder: ["callee", "arguments", "optional"],
  63032. aliases: ["Expression"],
  63033. fields: {
  63034. callee: {
  63035. validate: (0, _utils.assertNodeType)("Expression")
  63036. },
  63037. arguments: {
  63038. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  63039. },
  63040. optional: {
  63041. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  63042. },
  63043. typeArguments: {
  63044. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  63045. optional: true
  63046. },
  63047. typeParameters: {
  63048. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  63049. optional: true
  63050. }
  63051. }
  63052. });
  63053. }
  63054. });
  63055. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/flow.js
  63056. var require_flow4 = __commonJS({
  63057. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/flow.js"() {
  63058. "use strict";
  63059. var _utils = require_utils3();
  63060. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  63061. (0, _utils.default)(name2, {
  63062. builder: ["id", "typeParameters", "extends", "body"],
  63063. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  63064. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63065. fields: {
  63066. id: (0, _utils.validateType)("Identifier"),
  63067. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  63068. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  63069. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  63070. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  63071. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  63072. }
  63073. });
  63074. };
  63075. (0, _utils.default)("AnyTypeAnnotation", {
  63076. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63077. });
  63078. (0, _utils.default)("ArrayTypeAnnotation", {
  63079. visitor: ["elementType"],
  63080. aliases: ["Flow", "FlowType"],
  63081. fields: {
  63082. elementType: (0, _utils.validateType)("FlowType")
  63083. }
  63084. });
  63085. (0, _utils.default)("BooleanTypeAnnotation", {
  63086. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63087. });
  63088. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  63089. builder: ["value"],
  63090. aliases: ["Flow", "FlowType"],
  63091. fields: {
  63092. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63093. }
  63094. });
  63095. (0, _utils.default)("NullLiteralTypeAnnotation", {
  63096. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63097. });
  63098. (0, _utils.default)("ClassImplements", {
  63099. visitor: ["id", "typeParameters"],
  63100. aliases: ["Flow"],
  63101. fields: {
  63102. id: (0, _utils.validateType)("Identifier"),
  63103. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  63104. }
  63105. });
  63106. defineInterfaceishType("DeclareClass");
  63107. (0, _utils.default)("DeclareFunction", {
  63108. visitor: ["id"],
  63109. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63110. fields: {
  63111. id: (0, _utils.validateType)("Identifier"),
  63112. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  63113. }
  63114. });
  63115. defineInterfaceishType("DeclareInterface");
  63116. (0, _utils.default)("DeclareModule", {
  63117. builder: ["id", "body", "kind"],
  63118. visitor: ["id", "body"],
  63119. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63120. fields: {
  63121. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  63122. body: (0, _utils.validateType)("BlockStatement"),
  63123. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  63124. }
  63125. });
  63126. (0, _utils.default)("DeclareModuleExports", {
  63127. visitor: ["typeAnnotation"],
  63128. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63129. fields: {
  63130. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  63131. }
  63132. });
  63133. (0, _utils.default)("DeclareTypeAlias", {
  63134. visitor: ["id", "typeParameters", "right"],
  63135. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63136. fields: {
  63137. id: (0, _utils.validateType)("Identifier"),
  63138. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63139. right: (0, _utils.validateType)("FlowType")
  63140. }
  63141. });
  63142. (0, _utils.default)("DeclareOpaqueType", {
  63143. visitor: ["id", "typeParameters", "supertype"],
  63144. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63145. fields: {
  63146. id: (0, _utils.validateType)("Identifier"),
  63147. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63148. supertype: (0, _utils.validateOptionalType)("FlowType")
  63149. }
  63150. });
  63151. (0, _utils.default)("DeclareVariable", {
  63152. visitor: ["id"],
  63153. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63154. fields: {
  63155. id: (0, _utils.validateType)("Identifier")
  63156. }
  63157. });
  63158. (0, _utils.default)("DeclareExportDeclaration", {
  63159. visitor: ["declaration", "specifiers", "source"],
  63160. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63161. fields: {
  63162. declaration: (0, _utils.validateOptionalType)("Flow"),
  63163. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  63164. source: (0, _utils.validateOptionalType)("StringLiteral"),
  63165. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  63166. }
  63167. });
  63168. (0, _utils.default)("DeclareExportAllDeclaration", {
  63169. visitor: ["source"],
  63170. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63171. fields: {
  63172. source: (0, _utils.validateType)("StringLiteral"),
  63173. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  63174. }
  63175. });
  63176. (0, _utils.default)("DeclaredPredicate", {
  63177. visitor: ["value"],
  63178. aliases: ["Flow", "FlowPredicate"],
  63179. fields: {
  63180. value: (0, _utils.validateType)("Flow")
  63181. }
  63182. });
  63183. (0, _utils.default)("ExistsTypeAnnotation", {
  63184. aliases: ["Flow", "FlowType"]
  63185. });
  63186. (0, _utils.default)("FunctionTypeAnnotation", {
  63187. visitor: ["typeParameters", "params", "rest", "returnType"],
  63188. aliases: ["Flow", "FlowType"],
  63189. fields: {
  63190. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63191. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  63192. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  63193. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  63194. returnType: (0, _utils.validateType)("FlowType")
  63195. }
  63196. });
  63197. (0, _utils.default)("FunctionTypeParam", {
  63198. visitor: ["name", "typeAnnotation"],
  63199. aliases: ["Flow"],
  63200. fields: {
  63201. name: (0, _utils.validateOptionalType)("Identifier"),
  63202. typeAnnotation: (0, _utils.validateType)("FlowType"),
  63203. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  63204. }
  63205. });
  63206. (0, _utils.default)("GenericTypeAnnotation", {
  63207. visitor: ["id", "typeParameters"],
  63208. aliases: ["Flow", "FlowType"],
  63209. fields: {
  63210. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  63211. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  63212. }
  63213. });
  63214. (0, _utils.default)("InferredPredicate", {
  63215. aliases: ["Flow", "FlowPredicate"]
  63216. });
  63217. (0, _utils.default)("InterfaceExtends", {
  63218. visitor: ["id", "typeParameters"],
  63219. aliases: ["Flow"],
  63220. fields: {
  63221. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  63222. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  63223. }
  63224. });
  63225. defineInterfaceishType("InterfaceDeclaration");
  63226. (0, _utils.default)("InterfaceTypeAnnotation", {
  63227. visitor: ["extends", "body"],
  63228. aliases: ["Flow", "FlowType"],
  63229. fields: {
  63230. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  63231. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  63232. }
  63233. });
  63234. (0, _utils.default)("IntersectionTypeAnnotation", {
  63235. visitor: ["types"],
  63236. aliases: ["Flow", "FlowType"],
  63237. fields: {
  63238. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  63239. }
  63240. });
  63241. (0, _utils.default)("MixedTypeAnnotation", {
  63242. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63243. });
  63244. (0, _utils.default)("EmptyTypeAnnotation", {
  63245. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63246. });
  63247. (0, _utils.default)("NullableTypeAnnotation", {
  63248. visitor: ["typeAnnotation"],
  63249. aliases: ["Flow", "FlowType"],
  63250. fields: {
  63251. typeAnnotation: (0, _utils.validateType)("FlowType")
  63252. }
  63253. });
  63254. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  63255. builder: ["value"],
  63256. aliases: ["Flow", "FlowType"],
  63257. fields: {
  63258. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  63259. }
  63260. });
  63261. (0, _utils.default)("NumberTypeAnnotation", {
  63262. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63263. });
  63264. (0, _utils.default)("ObjectTypeAnnotation", {
  63265. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  63266. aliases: ["Flow", "FlowType"],
  63267. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  63268. fields: {
  63269. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  63270. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  63271. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  63272. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  63273. exact: {
  63274. validate: (0, _utils.assertValueType)("boolean"),
  63275. default: false
  63276. },
  63277. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  63278. }
  63279. });
  63280. (0, _utils.default)("ObjectTypeInternalSlot", {
  63281. visitor: ["id", "value", "optional", "static", "method"],
  63282. aliases: ["Flow", "UserWhitespacable"],
  63283. fields: {
  63284. id: (0, _utils.validateType)("Identifier"),
  63285. value: (0, _utils.validateType)("FlowType"),
  63286. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63287. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63288. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63289. }
  63290. });
  63291. (0, _utils.default)("ObjectTypeCallProperty", {
  63292. visitor: ["value"],
  63293. aliases: ["Flow", "UserWhitespacable"],
  63294. fields: {
  63295. value: (0, _utils.validateType)("FlowType"),
  63296. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63297. }
  63298. });
  63299. (0, _utils.default)("ObjectTypeIndexer", {
  63300. visitor: ["id", "key", "value", "variance"],
  63301. aliases: ["Flow", "UserWhitespacable"],
  63302. fields: {
  63303. id: (0, _utils.validateOptionalType)("Identifier"),
  63304. key: (0, _utils.validateType)("FlowType"),
  63305. value: (0, _utils.validateType)("FlowType"),
  63306. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63307. variance: (0, _utils.validateOptionalType)("Variance")
  63308. }
  63309. });
  63310. (0, _utils.default)("ObjectTypeProperty", {
  63311. visitor: ["key", "value", "variance"],
  63312. aliases: ["Flow", "UserWhitespacable"],
  63313. fields: {
  63314. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  63315. value: (0, _utils.validateType)("FlowType"),
  63316. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  63317. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63318. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63319. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63320. variance: (0, _utils.validateOptionalType)("Variance"),
  63321. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63322. }
  63323. });
  63324. (0, _utils.default)("ObjectTypeSpreadProperty", {
  63325. visitor: ["argument"],
  63326. aliases: ["Flow", "UserWhitespacable"],
  63327. fields: {
  63328. argument: (0, _utils.validateType)("FlowType")
  63329. }
  63330. });
  63331. (0, _utils.default)("OpaqueType", {
  63332. visitor: ["id", "typeParameters", "supertype", "impltype"],
  63333. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63334. fields: {
  63335. id: (0, _utils.validateType)("Identifier"),
  63336. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63337. supertype: (0, _utils.validateOptionalType)("FlowType"),
  63338. impltype: (0, _utils.validateType)("FlowType")
  63339. }
  63340. });
  63341. (0, _utils.default)("QualifiedTypeIdentifier", {
  63342. visitor: ["id", "qualification"],
  63343. aliases: ["Flow"],
  63344. fields: {
  63345. id: (0, _utils.validateType)("Identifier"),
  63346. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  63347. }
  63348. });
  63349. (0, _utils.default)("StringLiteralTypeAnnotation", {
  63350. builder: ["value"],
  63351. aliases: ["Flow", "FlowType"],
  63352. fields: {
  63353. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  63354. }
  63355. });
  63356. (0, _utils.default)("StringTypeAnnotation", {
  63357. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63358. });
  63359. (0, _utils.default)("SymbolTypeAnnotation", {
  63360. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63361. });
  63362. (0, _utils.default)("ThisTypeAnnotation", {
  63363. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63364. });
  63365. (0, _utils.default)("TupleTypeAnnotation", {
  63366. visitor: ["types"],
  63367. aliases: ["Flow", "FlowType"],
  63368. fields: {
  63369. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  63370. }
  63371. });
  63372. (0, _utils.default)("TypeofTypeAnnotation", {
  63373. visitor: ["argument"],
  63374. aliases: ["Flow", "FlowType"],
  63375. fields: {
  63376. argument: (0, _utils.validateType)("FlowType")
  63377. }
  63378. });
  63379. (0, _utils.default)("TypeAlias", {
  63380. visitor: ["id", "typeParameters", "right"],
  63381. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  63382. fields: {
  63383. id: (0, _utils.validateType)("Identifier"),
  63384. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  63385. right: (0, _utils.validateType)("FlowType")
  63386. }
  63387. });
  63388. (0, _utils.default)("TypeAnnotation", {
  63389. aliases: ["Flow"],
  63390. visitor: ["typeAnnotation"],
  63391. fields: {
  63392. typeAnnotation: (0, _utils.validateType)("FlowType")
  63393. }
  63394. });
  63395. (0, _utils.default)("TypeCastExpression", {
  63396. visitor: ["expression", "typeAnnotation"],
  63397. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  63398. fields: {
  63399. expression: (0, _utils.validateType)("Expression"),
  63400. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  63401. }
  63402. });
  63403. (0, _utils.default)("TypeParameter", {
  63404. aliases: ["Flow"],
  63405. visitor: ["bound", "default", "variance"],
  63406. fields: {
  63407. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  63408. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  63409. default: (0, _utils.validateOptionalType)("FlowType"),
  63410. variance: (0, _utils.validateOptionalType)("Variance")
  63411. }
  63412. });
  63413. (0, _utils.default)("TypeParameterDeclaration", {
  63414. aliases: ["Flow"],
  63415. visitor: ["params"],
  63416. fields: {
  63417. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  63418. }
  63419. });
  63420. (0, _utils.default)("TypeParameterInstantiation", {
  63421. aliases: ["Flow"],
  63422. visitor: ["params"],
  63423. fields: {
  63424. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  63425. }
  63426. });
  63427. (0, _utils.default)("UnionTypeAnnotation", {
  63428. visitor: ["types"],
  63429. aliases: ["Flow", "FlowType"],
  63430. fields: {
  63431. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  63432. }
  63433. });
  63434. (0, _utils.default)("Variance", {
  63435. aliases: ["Flow"],
  63436. builder: ["kind"],
  63437. fields: {
  63438. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  63439. }
  63440. });
  63441. (0, _utils.default)("VoidTypeAnnotation", {
  63442. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  63443. });
  63444. (0, _utils.default)("EnumDeclaration", {
  63445. aliases: ["Statement", "Declaration"],
  63446. visitor: ["id", "body"],
  63447. fields: {
  63448. id: (0, _utils.validateType)("Identifier"),
  63449. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  63450. }
  63451. });
  63452. (0, _utils.default)("EnumBooleanBody", {
  63453. aliases: ["EnumBody"],
  63454. visitor: ["members"],
  63455. fields: {
  63456. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63457. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  63458. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63459. }
  63460. });
  63461. (0, _utils.default)("EnumNumberBody", {
  63462. aliases: ["EnumBody"],
  63463. visitor: ["members"],
  63464. fields: {
  63465. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63466. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  63467. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63468. }
  63469. });
  63470. (0, _utils.default)("EnumStringBody", {
  63471. aliases: ["EnumBody"],
  63472. visitor: ["members"],
  63473. fields: {
  63474. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  63475. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  63476. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63477. }
  63478. });
  63479. (0, _utils.default)("EnumSymbolBody", {
  63480. aliases: ["EnumBody"],
  63481. visitor: ["members"],
  63482. fields: {
  63483. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  63484. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63485. }
  63486. });
  63487. (0, _utils.default)("EnumBooleanMember", {
  63488. aliases: ["EnumMember"],
  63489. visitor: ["id"],
  63490. fields: {
  63491. id: (0, _utils.validateType)("Identifier"),
  63492. init: (0, _utils.validateType)("BooleanLiteral")
  63493. }
  63494. });
  63495. (0, _utils.default)("EnumNumberMember", {
  63496. aliases: ["EnumMember"],
  63497. visitor: ["id", "init"],
  63498. fields: {
  63499. id: (0, _utils.validateType)("Identifier"),
  63500. init: (0, _utils.validateType)("NumericLiteral")
  63501. }
  63502. });
  63503. (0, _utils.default)("EnumStringMember", {
  63504. aliases: ["EnumMember"],
  63505. visitor: ["id", "init"],
  63506. fields: {
  63507. id: (0, _utils.validateType)("Identifier"),
  63508. init: (0, _utils.validateType)("StringLiteral")
  63509. }
  63510. });
  63511. (0, _utils.default)("EnumDefaultedMember", {
  63512. aliases: ["EnumMember"],
  63513. visitor: ["id"],
  63514. fields: {
  63515. id: (0, _utils.validateType)("Identifier")
  63516. }
  63517. });
  63518. (0, _utils.default)("IndexedAccessType", {
  63519. visitor: ["objectType", "indexType"],
  63520. aliases: ["Flow", "FlowType"],
  63521. fields: {
  63522. objectType: (0, _utils.validateType)("FlowType"),
  63523. indexType: (0, _utils.validateType)("FlowType")
  63524. }
  63525. });
  63526. (0, _utils.default)("OptionalIndexedAccessType", {
  63527. visitor: ["objectType", "indexType"],
  63528. aliases: ["Flow", "FlowType"],
  63529. fields: {
  63530. objectType: (0, _utils.validateType)("FlowType"),
  63531. indexType: (0, _utils.validateType)("FlowType"),
  63532. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  63533. }
  63534. });
  63535. }
  63536. });
  63537. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/jsx.js
  63538. var require_jsx4 = __commonJS({
  63539. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/jsx.js"() {
  63540. "use strict";
  63541. var _utils = require_utils3();
  63542. (0, _utils.default)("JSXAttribute", {
  63543. visitor: ["name", "value"],
  63544. aliases: ["JSX", "Immutable"],
  63545. fields: {
  63546. name: {
  63547. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  63548. },
  63549. value: {
  63550. optional: true,
  63551. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  63552. }
  63553. }
  63554. });
  63555. (0, _utils.default)("JSXClosingElement", {
  63556. visitor: ["name"],
  63557. aliases: ["JSX", "Immutable"],
  63558. fields: {
  63559. name: {
  63560. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  63561. }
  63562. }
  63563. });
  63564. (0, _utils.default)("JSXElement", {
  63565. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  63566. visitor: ["openingElement", "children", "closingElement"],
  63567. aliases: ["JSX", "Immutable", "Expression"],
  63568. fields: {
  63569. openingElement: {
  63570. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  63571. },
  63572. closingElement: {
  63573. optional: true,
  63574. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  63575. },
  63576. children: {
  63577. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  63578. },
  63579. selfClosing: {
  63580. validate: (0, _utils.assertValueType)("boolean"),
  63581. optional: true
  63582. }
  63583. }
  63584. });
  63585. (0, _utils.default)("JSXEmptyExpression", {
  63586. aliases: ["JSX"]
  63587. });
  63588. (0, _utils.default)("JSXExpressionContainer", {
  63589. visitor: ["expression"],
  63590. aliases: ["JSX", "Immutable"],
  63591. fields: {
  63592. expression: {
  63593. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  63594. }
  63595. }
  63596. });
  63597. (0, _utils.default)("JSXSpreadChild", {
  63598. visitor: ["expression"],
  63599. aliases: ["JSX", "Immutable"],
  63600. fields: {
  63601. expression: {
  63602. validate: (0, _utils.assertNodeType)("Expression")
  63603. }
  63604. }
  63605. });
  63606. (0, _utils.default)("JSXIdentifier", {
  63607. builder: ["name"],
  63608. aliases: ["JSX"],
  63609. fields: {
  63610. name: {
  63611. validate: (0, _utils.assertValueType)("string")
  63612. }
  63613. }
  63614. });
  63615. (0, _utils.default)("JSXMemberExpression", {
  63616. visitor: ["object", "property"],
  63617. aliases: ["JSX"],
  63618. fields: {
  63619. object: {
  63620. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  63621. },
  63622. property: {
  63623. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  63624. }
  63625. }
  63626. });
  63627. (0, _utils.default)("JSXNamespacedName", {
  63628. visitor: ["namespace", "name"],
  63629. aliases: ["JSX"],
  63630. fields: {
  63631. namespace: {
  63632. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  63633. },
  63634. name: {
  63635. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  63636. }
  63637. }
  63638. });
  63639. (0, _utils.default)("JSXOpeningElement", {
  63640. builder: ["name", "attributes", "selfClosing"],
  63641. visitor: ["name", "attributes"],
  63642. aliases: ["JSX", "Immutable"],
  63643. fields: {
  63644. name: {
  63645. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  63646. },
  63647. selfClosing: {
  63648. default: false
  63649. },
  63650. attributes: {
  63651. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  63652. },
  63653. typeParameters: {
  63654. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  63655. optional: true
  63656. }
  63657. }
  63658. });
  63659. (0, _utils.default)("JSXSpreadAttribute", {
  63660. visitor: ["argument"],
  63661. aliases: ["JSX"],
  63662. fields: {
  63663. argument: {
  63664. validate: (0, _utils.assertNodeType)("Expression")
  63665. }
  63666. }
  63667. });
  63668. (0, _utils.default)("JSXText", {
  63669. aliases: ["JSX", "Immutable"],
  63670. builder: ["value"],
  63671. fields: {
  63672. value: {
  63673. validate: (0, _utils.assertValueType)("string")
  63674. }
  63675. }
  63676. });
  63677. (0, _utils.default)("JSXFragment", {
  63678. builder: ["openingFragment", "closingFragment", "children"],
  63679. visitor: ["openingFragment", "children", "closingFragment"],
  63680. aliases: ["JSX", "Immutable", "Expression"],
  63681. fields: {
  63682. openingFragment: {
  63683. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  63684. },
  63685. closingFragment: {
  63686. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  63687. },
  63688. children: {
  63689. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  63690. }
  63691. }
  63692. });
  63693. (0, _utils.default)("JSXOpeningFragment", {
  63694. aliases: ["JSX", "Immutable"]
  63695. });
  63696. (0, _utils.default)("JSXClosingFragment", {
  63697. aliases: ["JSX", "Immutable"]
  63698. });
  63699. }
  63700. });
  63701. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/placeholders.js
  63702. var require_placeholders3 = __commonJS({
  63703. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  63704. "use strict";
  63705. Object.defineProperty(exports, "__esModule", {
  63706. value: true
  63707. });
  63708. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  63709. var _utils = require_utils3();
  63710. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  63711. exports.PLACEHOLDERS = PLACEHOLDERS;
  63712. var PLACEHOLDERS_ALIAS = {
  63713. Declaration: ["Statement"],
  63714. Pattern: ["PatternLike", "LVal"]
  63715. };
  63716. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  63717. for (const type of PLACEHOLDERS) {
  63718. const alias = _utils.ALIAS_KEYS[type];
  63719. if (alias != null && alias.length)
  63720. PLACEHOLDERS_ALIAS[type] = alias;
  63721. }
  63722. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  63723. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  63724. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  63725. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  63726. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  63727. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  63728. }
  63729. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  63730. });
  63731. });
  63732. }
  63733. });
  63734. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/misc.js
  63735. var require_misc3 = __commonJS({
  63736. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/misc.js"() {
  63737. "use strict";
  63738. var _utils = require_utils3();
  63739. var _placeholders = require_placeholders3();
  63740. {
  63741. (0, _utils.default)("Noop", {
  63742. visitor: []
  63743. });
  63744. }
  63745. (0, _utils.default)("Placeholder", {
  63746. visitor: [],
  63747. builder: ["expectedNode", "name"],
  63748. fields: {
  63749. name: {
  63750. validate: (0, _utils.assertNodeType)("Identifier")
  63751. },
  63752. expectedNode: {
  63753. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  63754. }
  63755. }
  63756. });
  63757. (0, _utils.default)("V8IntrinsicIdentifier", {
  63758. builder: ["name"],
  63759. fields: {
  63760. name: {
  63761. validate: (0, _utils.assertValueType)("string")
  63762. }
  63763. }
  63764. });
  63765. }
  63766. });
  63767. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/experimental.js
  63768. var require_experimental3 = __commonJS({
  63769. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/experimental.js"() {
  63770. "use strict";
  63771. var _utils = require_utils3();
  63772. var _core = require_core3();
  63773. (0, _utils.default)("ArgumentPlaceholder", {});
  63774. (0, _utils.default)("BindExpression", {
  63775. visitor: ["object", "callee"],
  63776. aliases: ["Expression"],
  63777. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  63778. object: {
  63779. validate: Object.assign(() => {
  63780. }, {
  63781. oneOfNodeTypes: ["Expression"]
  63782. })
  63783. },
  63784. callee: {
  63785. validate: Object.assign(() => {
  63786. }, {
  63787. oneOfNodeTypes: ["Expression"]
  63788. })
  63789. }
  63790. } : {
  63791. object: {
  63792. validate: (0, _utils.assertNodeType)("Expression")
  63793. },
  63794. callee: {
  63795. validate: (0, _utils.assertNodeType)("Expression")
  63796. }
  63797. }
  63798. });
  63799. (0, _utils.default)("ClassProperty", {
  63800. visitor: ["key", "value", "typeAnnotation", "decorators"],
  63801. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  63802. aliases: ["Property"],
  63803. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  63804. value: {
  63805. validate: (0, _utils.assertNodeType)("Expression"),
  63806. optional: true
  63807. },
  63808. definite: {
  63809. validate: (0, _utils.assertValueType)("boolean"),
  63810. optional: true
  63811. },
  63812. typeAnnotation: {
  63813. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  63814. optional: true
  63815. },
  63816. decorators: {
  63817. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  63818. optional: true
  63819. },
  63820. readonly: {
  63821. validate: (0, _utils.assertValueType)("boolean"),
  63822. optional: true
  63823. },
  63824. declare: {
  63825. validate: (0, _utils.assertValueType)("boolean"),
  63826. optional: true
  63827. }
  63828. })
  63829. });
  63830. (0, _utils.default)("PipelineTopicExpression", {
  63831. builder: ["expression"],
  63832. visitor: ["expression"],
  63833. fields: {
  63834. expression: {
  63835. validate: (0, _utils.assertNodeType)("Expression")
  63836. }
  63837. }
  63838. });
  63839. (0, _utils.default)("PipelineBareFunction", {
  63840. builder: ["callee"],
  63841. visitor: ["callee"],
  63842. fields: {
  63843. callee: {
  63844. validate: (0, _utils.assertNodeType)("Expression")
  63845. }
  63846. }
  63847. });
  63848. (0, _utils.default)("PipelinePrimaryTopicReference", {
  63849. aliases: ["Expression"]
  63850. });
  63851. (0, _utils.default)("ClassPrivateProperty", {
  63852. visitor: ["key", "value", "decorators"],
  63853. builder: ["key", "value", "decorators", "static"],
  63854. aliases: ["Property", "Private"],
  63855. fields: {
  63856. key: {
  63857. validate: (0, _utils.assertNodeType)("PrivateName")
  63858. },
  63859. value: {
  63860. validate: (0, _utils.assertNodeType)("Expression"),
  63861. optional: true
  63862. },
  63863. typeAnnotation: {
  63864. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  63865. optional: true
  63866. },
  63867. decorators: {
  63868. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  63869. optional: true
  63870. }
  63871. }
  63872. });
  63873. (0, _utils.default)("ClassPrivateMethod", {
  63874. builder: ["kind", "key", "params", "body", "static"],
  63875. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  63876. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  63877. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  63878. key: {
  63879. validate: (0, _utils.assertNodeType)("PrivateName")
  63880. },
  63881. body: {
  63882. validate: (0, _utils.assertNodeType)("BlockStatement")
  63883. }
  63884. })
  63885. });
  63886. (0, _utils.default)("ImportAttribute", {
  63887. visitor: ["key", "value"],
  63888. fields: {
  63889. key: {
  63890. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  63891. },
  63892. value: {
  63893. validate: (0, _utils.assertNodeType)("StringLiteral")
  63894. }
  63895. }
  63896. });
  63897. (0, _utils.default)("Decorator", {
  63898. visitor: ["expression"],
  63899. fields: {
  63900. expression: {
  63901. validate: (0, _utils.assertNodeType)("Expression")
  63902. }
  63903. }
  63904. });
  63905. (0, _utils.default)("DoExpression", {
  63906. visitor: ["body"],
  63907. builder: ["body", "async"],
  63908. aliases: ["Expression"],
  63909. fields: {
  63910. body: {
  63911. validate: (0, _utils.assertNodeType)("BlockStatement")
  63912. },
  63913. async: {
  63914. validate: (0, _utils.assertValueType)("boolean"),
  63915. default: false
  63916. }
  63917. }
  63918. });
  63919. (0, _utils.default)("ExportDefaultSpecifier", {
  63920. visitor: ["exported"],
  63921. aliases: ["ModuleSpecifier"],
  63922. fields: {
  63923. exported: {
  63924. validate: (0, _utils.assertNodeType)("Identifier")
  63925. }
  63926. }
  63927. });
  63928. (0, _utils.default)("PrivateName", {
  63929. visitor: ["id"],
  63930. aliases: ["Private"],
  63931. fields: {
  63932. id: {
  63933. validate: (0, _utils.assertNodeType)("Identifier")
  63934. }
  63935. }
  63936. });
  63937. (0, _utils.default)("RecordExpression", {
  63938. visitor: ["properties"],
  63939. aliases: ["Expression"],
  63940. fields: {
  63941. properties: {
  63942. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  63943. }
  63944. }
  63945. });
  63946. (0, _utils.default)("TupleExpression", {
  63947. fields: {
  63948. elements: {
  63949. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  63950. default: []
  63951. }
  63952. },
  63953. visitor: ["elements"],
  63954. aliases: ["Expression"]
  63955. });
  63956. (0, _utils.default)("DecimalLiteral", {
  63957. builder: ["value"],
  63958. fields: {
  63959. value: {
  63960. validate: (0, _utils.assertValueType)("string")
  63961. }
  63962. },
  63963. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  63964. });
  63965. (0, _utils.default)("StaticBlock", {
  63966. visitor: ["body"],
  63967. fields: {
  63968. body: {
  63969. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  63970. }
  63971. },
  63972. aliases: ["Scopable", "BlockParent"]
  63973. });
  63974. (0, _utils.default)("ModuleExpression", {
  63975. visitor: ["body"],
  63976. fields: {
  63977. body: {
  63978. validate: (0, _utils.assertNodeType)("Program")
  63979. }
  63980. },
  63981. aliases: ["Expression"]
  63982. });
  63983. }
  63984. });
  63985. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/typescript.js
  63986. var require_typescript4 = __commonJS({
  63987. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/typescript.js"() {
  63988. "use strict";
  63989. var _utils = require_utils3();
  63990. var _core = require_core3();
  63991. var bool = (0, _utils.assertValueType)("boolean");
  63992. var tSFunctionTypeAnnotationCommon = {
  63993. returnType: {
  63994. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  63995. optional: true
  63996. },
  63997. typeParameters: {
  63998. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  63999. optional: true
  64000. }
  64001. };
  64002. (0, _utils.default)("TSParameterProperty", {
  64003. aliases: ["LVal"],
  64004. visitor: ["parameter"],
  64005. fields: {
  64006. accessibility: {
  64007. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  64008. optional: true
  64009. },
  64010. readonly: {
  64011. validate: (0, _utils.assertValueType)("boolean"),
  64012. optional: true
  64013. },
  64014. parameter: {
  64015. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  64016. }
  64017. }
  64018. });
  64019. (0, _utils.default)("TSDeclareFunction", {
  64020. aliases: ["Statement", "Declaration"],
  64021. visitor: ["id", "typeParameters", "params", "returnType"],
  64022. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  64023. });
  64024. (0, _utils.default)("TSDeclareMethod", {
  64025. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  64026. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  64027. });
  64028. (0, _utils.default)("TSQualifiedName", {
  64029. aliases: ["TSEntityName"],
  64030. visitor: ["left", "right"],
  64031. fields: {
  64032. left: (0, _utils.validateType)("TSEntityName"),
  64033. right: (0, _utils.validateType)("Identifier")
  64034. }
  64035. });
  64036. var signatureDeclarationCommon = {
  64037. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  64038. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  64039. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  64040. };
  64041. var callConstructSignatureDeclaration = {
  64042. aliases: ["TSTypeElement"],
  64043. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  64044. fields: signatureDeclarationCommon
  64045. };
  64046. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  64047. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  64048. var namedTypeElementCommon = {
  64049. key: (0, _utils.validateType)("Expression"),
  64050. computed: (0, _utils.validate)(bool),
  64051. optional: (0, _utils.validateOptional)(bool)
  64052. };
  64053. (0, _utils.default)("TSPropertySignature", {
  64054. aliases: ["TSTypeElement"],
  64055. visitor: ["key", "typeAnnotation", "initializer"],
  64056. fields: Object.assign({}, namedTypeElementCommon, {
  64057. readonly: (0, _utils.validateOptional)(bool),
  64058. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  64059. initializer: (0, _utils.validateOptionalType)("Expression")
  64060. })
  64061. });
  64062. (0, _utils.default)("TSMethodSignature", {
  64063. aliases: ["TSTypeElement"],
  64064. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  64065. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  64066. kind: {
  64067. validate: (0, _utils.assertOneOf)("method", "get", "set")
  64068. }
  64069. })
  64070. });
  64071. (0, _utils.default)("TSIndexSignature", {
  64072. aliases: ["TSTypeElement"],
  64073. visitor: ["parameters", "typeAnnotation"],
  64074. fields: {
  64075. readonly: (0, _utils.validateOptional)(bool),
  64076. static: (0, _utils.validateOptional)(bool),
  64077. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  64078. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  64079. }
  64080. });
  64081. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  64082. for (const type of tsKeywordTypes) {
  64083. (0, _utils.default)(type, {
  64084. aliases: ["TSType", "TSBaseType"],
  64085. visitor: [],
  64086. fields: {}
  64087. });
  64088. }
  64089. (0, _utils.default)("TSThisType", {
  64090. aliases: ["TSType", "TSBaseType"],
  64091. visitor: [],
  64092. fields: {}
  64093. });
  64094. var fnOrCtrBase = {
  64095. aliases: ["TSType"],
  64096. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  64097. };
  64098. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  64099. fields: signatureDeclarationCommon
  64100. }));
  64101. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  64102. fields: Object.assign({}, signatureDeclarationCommon, {
  64103. abstract: (0, _utils.validateOptional)(bool)
  64104. })
  64105. }));
  64106. (0, _utils.default)("TSTypeReference", {
  64107. aliases: ["TSType"],
  64108. visitor: ["typeName", "typeParameters"],
  64109. fields: {
  64110. typeName: (0, _utils.validateType)("TSEntityName"),
  64111. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  64112. }
  64113. });
  64114. (0, _utils.default)("TSTypePredicate", {
  64115. aliases: ["TSType"],
  64116. visitor: ["parameterName", "typeAnnotation"],
  64117. builder: ["parameterName", "typeAnnotation", "asserts"],
  64118. fields: {
  64119. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  64120. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  64121. asserts: (0, _utils.validateOptional)(bool)
  64122. }
  64123. });
  64124. (0, _utils.default)("TSTypeQuery", {
  64125. aliases: ["TSType"],
  64126. visitor: ["exprName"],
  64127. fields: {
  64128. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  64129. }
  64130. });
  64131. (0, _utils.default)("TSTypeLiteral", {
  64132. aliases: ["TSType"],
  64133. visitor: ["members"],
  64134. fields: {
  64135. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  64136. }
  64137. });
  64138. (0, _utils.default)("TSArrayType", {
  64139. aliases: ["TSType"],
  64140. visitor: ["elementType"],
  64141. fields: {
  64142. elementType: (0, _utils.validateType)("TSType")
  64143. }
  64144. });
  64145. (0, _utils.default)("TSTupleType", {
  64146. aliases: ["TSType"],
  64147. visitor: ["elementTypes"],
  64148. fields: {
  64149. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  64150. }
  64151. });
  64152. (0, _utils.default)("TSOptionalType", {
  64153. aliases: ["TSType"],
  64154. visitor: ["typeAnnotation"],
  64155. fields: {
  64156. typeAnnotation: (0, _utils.validateType)("TSType")
  64157. }
  64158. });
  64159. (0, _utils.default)("TSRestType", {
  64160. aliases: ["TSType"],
  64161. visitor: ["typeAnnotation"],
  64162. fields: {
  64163. typeAnnotation: (0, _utils.validateType)("TSType")
  64164. }
  64165. });
  64166. (0, _utils.default)("TSNamedTupleMember", {
  64167. visitor: ["label", "elementType"],
  64168. builder: ["label", "elementType", "optional"],
  64169. fields: {
  64170. label: (0, _utils.validateType)("Identifier"),
  64171. optional: {
  64172. validate: bool,
  64173. default: false
  64174. },
  64175. elementType: (0, _utils.validateType)("TSType")
  64176. }
  64177. });
  64178. var unionOrIntersection = {
  64179. aliases: ["TSType"],
  64180. visitor: ["types"],
  64181. fields: {
  64182. types: (0, _utils.validateArrayOfType)("TSType")
  64183. }
  64184. };
  64185. (0, _utils.default)("TSUnionType", unionOrIntersection);
  64186. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  64187. (0, _utils.default)("TSConditionalType", {
  64188. aliases: ["TSType"],
  64189. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  64190. fields: {
  64191. checkType: (0, _utils.validateType)("TSType"),
  64192. extendsType: (0, _utils.validateType)("TSType"),
  64193. trueType: (0, _utils.validateType)("TSType"),
  64194. falseType: (0, _utils.validateType)("TSType")
  64195. }
  64196. });
  64197. (0, _utils.default)("TSInferType", {
  64198. aliases: ["TSType"],
  64199. visitor: ["typeParameter"],
  64200. fields: {
  64201. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  64202. }
  64203. });
  64204. (0, _utils.default)("TSParenthesizedType", {
  64205. aliases: ["TSType"],
  64206. visitor: ["typeAnnotation"],
  64207. fields: {
  64208. typeAnnotation: (0, _utils.validateType)("TSType")
  64209. }
  64210. });
  64211. (0, _utils.default)("TSTypeOperator", {
  64212. aliases: ["TSType"],
  64213. visitor: ["typeAnnotation"],
  64214. fields: {
  64215. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  64216. typeAnnotation: (0, _utils.validateType)("TSType")
  64217. }
  64218. });
  64219. (0, _utils.default)("TSIndexedAccessType", {
  64220. aliases: ["TSType"],
  64221. visitor: ["objectType", "indexType"],
  64222. fields: {
  64223. objectType: (0, _utils.validateType)("TSType"),
  64224. indexType: (0, _utils.validateType)("TSType")
  64225. }
  64226. });
  64227. (0, _utils.default)("TSMappedType", {
  64228. aliases: ["TSType"],
  64229. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  64230. fields: {
  64231. readonly: (0, _utils.validateOptional)(bool),
  64232. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  64233. optional: (0, _utils.validateOptional)(bool),
  64234. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  64235. nameType: (0, _utils.validateOptionalType)("TSType")
  64236. }
  64237. });
  64238. (0, _utils.default)("TSLiteralType", {
  64239. aliases: ["TSType", "TSBaseType"],
  64240. visitor: ["literal"],
  64241. fields: {
  64242. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  64243. }
  64244. });
  64245. (0, _utils.default)("TSExpressionWithTypeArguments", {
  64246. aliases: ["TSType"],
  64247. visitor: ["expression", "typeParameters"],
  64248. fields: {
  64249. expression: (0, _utils.validateType)("TSEntityName"),
  64250. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  64251. }
  64252. });
  64253. (0, _utils.default)("TSInterfaceDeclaration", {
  64254. aliases: ["Statement", "Declaration"],
  64255. visitor: ["id", "typeParameters", "extends", "body"],
  64256. fields: {
  64257. declare: (0, _utils.validateOptional)(bool),
  64258. id: (0, _utils.validateType)("Identifier"),
  64259. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  64260. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  64261. body: (0, _utils.validateType)("TSInterfaceBody")
  64262. }
  64263. });
  64264. (0, _utils.default)("TSInterfaceBody", {
  64265. visitor: ["body"],
  64266. fields: {
  64267. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  64268. }
  64269. });
  64270. (0, _utils.default)("TSTypeAliasDeclaration", {
  64271. aliases: ["Statement", "Declaration"],
  64272. visitor: ["id", "typeParameters", "typeAnnotation"],
  64273. fields: {
  64274. declare: (0, _utils.validateOptional)(bool),
  64275. id: (0, _utils.validateType)("Identifier"),
  64276. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  64277. typeAnnotation: (0, _utils.validateType)("TSType")
  64278. }
  64279. });
  64280. (0, _utils.default)("TSAsExpression", {
  64281. aliases: ["Expression"],
  64282. visitor: ["expression", "typeAnnotation"],
  64283. fields: {
  64284. expression: (0, _utils.validateType)("Expression"),
  64285. typeAnnotation: (0, _utils.validateType)("TSType")
  64286. }
  64287. });
  64288. (0, _utils.default)("TSTypeAssertion", {
  64289. aliases: ["Expression"],
  64290. visitor: ["typeAnnotation", "expression"],
  64291. fields: {
  64292. typeAnnotation: (0, _utils.validateType)("TSType"),
  64293. expression: (0, _utils.validateType)("Expression")
  64294. }
  64295. });
  64296. (0, _utils.default)("TSEnumDeclaration", {
  64297. aliases: ["Statement", "Declaration"],
  64298. visitor: ["id", "members"],
  64299. fields: {
  64300. declare: (0, _utils.validateOptional)(bool),
  64301. const: (0, _utils.validateOptional)(bool),
  64302. id: (0, _utils.validateType)("Identifier"),
  64303. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  64304. initializer: (0, _utils.validateOptionalType)("Expression")
  64305. }
  64306. });
  64307. (0, _utils.default)("TSEnumMember", {
  64308. visitor: ["id", "initializer"],
  64309. fields: {
  64310. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  64311. initializer: (0, _utils.validateOptionalType)("Expression")
  64312. }
  64313. });
  64314. (0, _utils.default)("TSModuleDeclaration", {
  64315. aliases: ["Statement", "Declaration"],
  64316. visitor: ["id", "body"],
  64317. fields: {
  64318. declare: (0, _utils.validateOptional)(bool),
  64319. global: (0, _utils.validateOptional)(bool),
  64320. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  64321. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  64322. }
  64323. });
  64324. (0, _utils.default)("TSModuleBlock", {
  64325. aliases: ["Scopable", "Block", "BlockParent"],
  64326. visitor: ["body"],
  64327. fields: {
  64328. body: (0, _utils.validateArrayOfType)("Statement")
  64329. }
  64330. });
  64331. (0, _utils.default)("TSImportType", {
  64332. aliases: ["TSType"],
  64333. visitor: ["argument", "qualifier", "typeParameters"],
  64334. fields: {
  64335. argument: (0, _utils.validateType)("StringLiteral"),
  64336. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  64337. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  64338. }
  64339. });
  64340. (0, _utils.default)("TSImportEqualsDeclaration", {
  64341. aliases: ["Statement"],
  64342. visitor: ["id", "moduleReference"],
  64343. fields: {
  64344. isExport: (0, _utils.validate)(bool),
  64345. id: (0, _utils.validateType)("Identifier"),
  64346. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  64347. }
  64348. });
  64349. (0, _utils.default)("TSExternalModuleReference", {
  64350. visitor: ["expression"],
  64351. fields: {
  64352. expression: (0, _utils.validateType)("StringLiteral")
  64353. }
  64354. });
  64355. (0, _utils.default)("TSNonNullExpression", {
  64356. aliases: ["Expression"],
  64357. visitor: ["expression"],
  64358. fields: {
  64359. expression: (0, _utils.validateType)("Expression")
  64360. }
  64361. });
  64362. (0, _utils.default)("TSExportAssignment", {
  64363. aliases: ["Statement"],
  64364. visitor: ["expression"],
  64365. fields: {
  64366. expression: (0, _utils.validateType)("Expression")
  64367. }
  64368. });
  64369. (0, _utils.default)("TSNamespaceExportDeclaration", {
  64370. aliases: ["Statement"],
  64371. visitor: ["id"],
  64372. fields: {
  64373. id: (0, _utils.validateType)("Identifier")
  64374. }
  64375. });
  64376. (0, _utils.default)("TSTypeAnnotation", {
  64377. visitor: ["typeAnnotation"],
  64378. fields: {
  64379. typeAnnotation: {
  64380. validate: (0, _utils.assertNodeType)("TSType")
  64381. }
  64382. }
  64383. });
  64384. (0, _utils.default)("TSTypeParameterInstantiation", {
  64385. visitor: ["params"],
  64386. fields: {
  64387. params: {
  64388. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  64389. }
  64390. }
  64391. });
  64392. (0, _utils.default)("TSTypeParameterDeclaration", {
  64393. visitor: ["params"],
  64394. fields: {
  64395. params: {
  64396. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  64397. }
  64398. }
  64399. });
  64400. (0, _utils.default)("TSTypeParameter", {
  64401. builder: ["constraint", "default", "name"],
  64402. visitor: ["constraint", "default"],
  64403. fields: {
  64404. name: {
  64405. validate: (0, _utils.assertValueType)("string")
  64406. },
  64407. constraint: {
  64408. validate: (0, _utils.assertNodeType)("TSType"),
  64409. optional: true
  64410. },
  64411. default: {
  64412. validate: (0, _utils.assertNodeType)("TSType"),
  64413. optional: true
  64414. }
  64415. }
  64416. });
  64417. }
  64418. });
  64419. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/index.js
  64420. var require_definitions3 = __commonJS({
  64421. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  64422. "use strict";
  64423. Object.defineProperty(exports, "__esModule", {
  64424. value: true
  64425. });
  64426. Object.defineProperty(exports, "VISITOR_KEYS", {
  64427. enumerable: true,
  64428. get: function() {
  64429. return _utils.VISITOR_KEYS;
  64430. }
  64431. });
  64432. Object.defineProperty(exports, "ALIAS_KEYS", {
  64433. enumerable: true,
  64434. get: function() {
  64435. return _utils.ALIAS_KEYS;
  64436. }
  64437. });
  64438. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  64439. enumerable: true,
  64440. get: function() {
  64441. return _utils.FLIPPED_ALIAS_KEYS;
  64442. }
  64443. });
  64444. Object.defineProperty(exports, "NODE_FIELDS", {
  64445. enumerable: true,
  64446. get: function() {
  64447. return _utils.NODE_FIELDS;
  64448. }
  64449. });
  64450. Object.defineProperty(exports, "BUILDER_KEYS", {
  64451. enumerable: true,
  64452. get: function() {
  64453. return _utils.BUILDER_KEYS;
  64454. }
  64455. });
  64456. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  64457. enumerable: true,
  64458. get: function() {
  64459. return _utils.DEPRECATED_KEYS;
  64460. }
  64461. });
  64462. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  64463. enumerable: true,
  64464. get: function() {
  64465. return _utils.NODE_PARENT_VALIDATIONS;
  64466. }
  64467. });
  64468. Object.defineProperty(exports, "PLACEHOLDERS", {
  64469. enumerable: true,
  64470. get: function() {
  64471. return _placeholders.PLACEHOLDERS;
  64472. }
  64473. });
  64474. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  64475. enumerable: true,
  64476. get: function() {
  64477. return _placeholders.PLACEHOLDERS_ALIAS;
  64478. }
  64479. });
  64480. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  64481. enumerable: true,
  64482. get: function() {
  64483. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  64484. }
  64485. });
  64486. exports.TYPES = void 0;
  64487. var _toFastProperties = require_to_fast_properties();
  64488. require_core3();
  64489. require_flow4();
  64490. require_jsx4();
  64491. require_misc3();
  64492. require_experimental3();
  64493. require_typescript4();
  64494. var _utils = require_utils3();
  64495. var _placeholders = require_placeholders3();
  64496. _toFastProperties(_utils.VISITOR_KEYS);
  64497. _toFastProperties(_utils.ALIAS_KEYS);
  64498. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  64499. _toFastProperties(_utils.NODE_FIELDS);
  64500. _toFastProperties(_utils.BUILDER_KEYS);
  64501. _toFastProperties(_utils.DEPRECATED_KEYS);
  64502. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  64503. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  64504. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  64505. exports.TYPES = TYPES;
  64506. }
  64507. });
  64508. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/builder.js
  64509. var require_builder4 = __commonJS({
  64510. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  64511. "use strict";
  64512. Object.defineProperty(exports, "__esModule", {
  64513. value: true
  64514. });
  64515. exports.default = builder;
  64516. var _definitions = require_definitions3();
  64517. var _validate = require_validate3();
  64518. function builder(type, ...args) {
  64519. const keys2 = _definitions.BUILDER_KEYS[type];
  64520. const countArgs = args.length;
  64521. if (countArgs > keys2.length) {
  64522. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  64523. }
  64524. const node = {
  64525. type
  64526. };
  64527. let i = 0;
  64528. keys2.forEach((key) => {
  64529. const field = _definitions.NODE_FIELDS[type][key];
  64530. let arg;
  64531. if (i < countArgs)
  64532. arg = args[i];
  64533. if (arg === void 0) {
  64534. arg = Array.isArray(field.default) ? [] : field.default;
  64535. }
  64536. node[key] = arg;
  64537. i++;
  64538. });
  64539. for (const key of Object.keys(node)) {
  64540. (0, _validate.default)(node, key, node[key]);
  64541. }
  64542. return node;
  64543. }
  64544. }
  64545. });
  64546. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/index.js
  64547. var require_generated12 = __commonJS({
  64548. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  64549. "use strict";
  64550. Object.defineProperty(exports, "__esModule", {
  64551. value: true
  64552. });
  64553. exports.arrayExpression = arrayExpression;
  64554. exports.assignmentExpression = assignmentExpression;
  64555. exports.binaryExpression = binaryExpression;
  64556. exports.interpreterDirective = interpreterDirective;
  64557. exports.directive = directive;
  64558. exports.directiveLiteral = directiveLiteral;
  64559. exports.blockStatement = blockStatement;
  64560. exports.breakStatement = breakStatement;
  64561. exports.callExpression = callExpression;
  64562. exports.catchClause = catchClause;
  64563. exports.conditionalExpression = conditionalExpression;
  64564. exports.continueStatement = continueStatement;
  64565. exports.debuggerStatement = debuggerStatement;
  64566. exports.doWhileStatement = doWhileStatement;
  64567. exports.emptyStatement = emptyStatement;
  64568. exports.expressionStatement = expressionStatement;
  64569. exports.file = file;
  64570. exports.forInStatement = forInStatement;
  64571. exports.forStatement = forStatement;
  64572. exports.functionDeclaration = functionDeclaration;
  64573. exports.functionExpression = functionExpression;
  64574. exports.identifier = identifier;
  64575. exports.ifStatement = ifStatement;
  64576. exports.labeledStatement = labeledStatement;
  64577. exports.stringLiteral = stringLiteral;
  64578. exports.numericLiteral = numericLiteral;
  64579. exports.nullLiteral = nullLiteral;
  64580. exports.booleanLiteral = booleanLiteral;
  64581. exports.regExpLiteral = regExpLiteral;
  64582. exports.logicalExpression = logicalExpression;
  64583. exports.memberExpression = memberExpression;
  64584. exports.newExpression = newExpression;
  64585. exports.program = program;
  64586. exports.objectExpression = objectExpression;
  64587. exports.objectMethod = objectMethod;
  64588. exports.objectProperty = objectProperty;
  64589. exports.restElement = restElement;
  64590. exports.returnStatement = returnStatement;
  64591. exports.sequenceExpression = sequenceExpression;
  64592. exports.parenthesizedExpression = parenthesizedExpression;
  64593. exports.switchCase = switchCase;
  64594. exports.switchStatement = switchStatement;
  64595. exports.thisExpression = thisExpression;
  64596. exports.throwStatement = throwStatement;
  64597. exports.tryStatement = tryStatement;
  64598. exports.unaryExpression = unaryExpression;
  64599. exports.updateExpression = updateExpression;
  64600. exports.variableDeclaration = variableDeclaration;
  64601. exports.variableDeclarator = variableDeclarator;
  64602. exports.whileStatement = whileStatement;
  64603. exports.withStatement = withStatement;
  64604. exports.assignmentPattern = assignmentPattern;
  64605. exports.arrayPattern = arrayPattern;
  64606. exports.arrowFunctionExpression = arrowFunctionExpression;
  64607. exports.classBody = classBody;
  64608. exports.classExpression = classExpression;
  64609. exports.classDeclaration = classDeclaration;
  64610. exports.exportAllDeclaration = exportAllDeclaration;
  64611. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  64612. exports.exportNamedDeclaration = exportNamedDeclaration;
  64613. exports.exportSpecifier = exportSpecifier;
  64614. exports.forOfStatement = forOfStatement;
  64615. exports.importDeclaration = importDeclaration;
  64616. exports.importDefaultSpecifier = importDefaultSpecifier;
  64617. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  64618. exports.importSpecifier = importSpecifier;
  64619. exports.metaProperty = metaProperty;
  64620. exports.classMethod = classMethod;
  64621. exports.objectPattern = objectPattern;
  64622. exports.spreadElement = spreadElement;
  64623. exports.super = _super;
  64624. exports.taggedTemplateExpression = taggedTemplateExpression;
  64625. exports.templateElement = templateElement;
  64626. exports.templateLiteral = templateLiteral;
  64627. exports.yieldExpression = yieldExpression;
  64628. exports.awaitExpression = awaitExpression;
  64629. exports.import = _import;
  64630. exports.bigIntLiteral = bigIntLiteral;
  64631. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  64632. exports.optionalMemberExpression = optionalMemberExpression;
  64633. exports.optionalCallExpression = optionalCallExpression;
  64634. exports.anyTypeAnnotation = anyTypeAnnotation;
  64635. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  64636. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  64637. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  64638. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  64639. exports.classImplements = classImplements;
  64640. exports.declareClass = declareClass;
  64641. exports.declareFunction = declareFunction;
  64642. exports.declareInterface = declareInterface;
  64643. exports.declareModule = declareModule;
  64644. exports.declareModuleExports = declareModuleExports;
  64645. exports.declareTypeAlias = declareTypeAlias;
  64646. exports.declareOpaqueType = declareOpaqueType;
  64647. exports.declareVariable = declareVariable;
  64648. exports.declareExportDeclaration = declareExportDeclaration;
  64649. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  64650. exports.declaredPredicate = declaredPredicate;
  64651. exports.existsTypeAnnotation = existsTypeAnnotation;
  64652. exports.functionTypeAnnotation = functionTypeAnnotation;
  64653. exports.functionTypeParam = functionTypeParam;
  64654. exports.genericTypeAnnotation = genericTypeAnnotation;
  64655. exports.inferredPredicate = inferredPredicate;
  64656. exports.interfaceExtends = interfaceExtends;
  64657. exports.interfaceDeclaration = interfaceDeclaration;
  64658. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  64659. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  64660. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  64661. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  64662. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  64663. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  64664. exports.numberTypeAnnotation = numberTypeAnnotation;
  64665. exports.objectTypeAnnotation = objectTypeAnnotation;
  64666. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  64667. exports.objectTypeCallProperty = objectTypeCallProperty;
  64668. exports.objectTypeIndexer = objectTypeIndexer;
  64669. exports.objectTypeProperty = objectTypeProperty;
  64670. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  64671. exports.opaqueType = opaqueType;
  64672. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  64673. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  64674. exports.stringTypeAnnotation = stringTypeAnnotation;
  64675. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  64676. exports.thisTypeAnnotation = thisTypeAnnotation;
  64677. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  64678. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  64679. exports.typeAlias = typeAlias;
  64680. exports.typeAnnotation = typeAnnotation;
  64681. exports.typeCastExpression = typeCastExpression;
  64682. exports.typeParameter = typeParameter;
  64683. exports.typeParameterDeclaration = typeParameterDeclaration;
  64684. exports.typeParameterInstantiation = typeParameterInstantiation;
  64685. exports.unionTypeAnnotation = unionTypeAnnotation;
  64686. exports.variance = variance;
  64687. exports.voidTypeAnnotation = voidTypeAnnotation;
  64688. exports.enumDeclaration = enumDeclaration;
  64689. exports.enumBooleanBody = enumBooleanBody;
  64690. exports.enumNumberBody = enumNumberBody;
  64691. exports.enumStringBody = enumStringBody;
  64692. exports.enumSymbolBody = enumSymbolBody;
  64693. exports.enumBooleanMember = enumBooleanMember;
  64694. exports.enumNumberMember = enumNumberMember;
  64695. exports.enumStringMember = enumStringMember;
  64696. exports.enumDefaultedMember = enumDefaultedMember;
  64697. exports.indexedAccessType = indexedAccessType;
  64698. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  64699. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  64700. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  64701. exports.jSXElement = exports.jsxElement = jsxElement;
  64702. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  64703. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  64704. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  64705. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  64706. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  64707. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  64708. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  64709. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  64710. exports.jSXText = exports.jsxText = jsxText2;
  64711. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  64712. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  64713. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  64714. exports.noop = noop;
  64715. exports.placeholder = placeholder;
  64716. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  64717. exports.argumentPlaceholder = argumentPlaceholder;
  64718. exports.bindExpression = bindExpression;
  64719. exports.classProperty = classProperty;
  64720. exports.pipelineTopicExpression = pipelineTopicExpression;
  64721. exports.pipelineBareFunction = pipelineBareFunction;
  64722. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  64723. exports.classPrivateProperty = classPrivateProperty;
  64724. exports.classPrivateMethod = classPrivateMethod;
  64725. exports.importAttribute = importAttribute;
  64726. exports.decorator = decorator;
  64727. exports.doExpression = doExpression;
  64728. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  64729. exports.privateName = privateName;
  64730. exports.recordExpression = recordExpression;
  64731. exports.tupleExpression = tupleExpression;
  64732. exports.decimalLiteral = decimalLiteral;
  64733. exports.staticBlock = staticBlock;
  64734. exports.moduleExpression = moduleExpression;
  64735. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  64736. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  64737. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  64738. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  64739. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  64740. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  64741. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  64742. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  64743. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  64744. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  64745. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  64746. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  64747. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  64748. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  64749. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  64750. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  64751. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  64752. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  64753. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  64754. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  64755. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  64756. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  64757. exports.tSThisType = exports.tsThisType = tsThisType;
  64758. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  64759. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  64760. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  64761. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  64762. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  64763. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  64764. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  64765. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  64766. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  64767. exports.tSRestType = exports.tsRestType = tsRestType;
  64768. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  64769. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  64770. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  64771. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  64772. exports.tSInferType = exports.tsInferType = tsInferType;
  64773. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  64774. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  64775. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  64776. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  64777. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  64778. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  64779. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  64780. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  64781. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  64782. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  64783. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  64784. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  64785. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  64786. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  64787. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  64788. exports.tSImportType = exports.tsImportType = tsImportType;
  64789. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  64790. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  64791. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  64792. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  64793. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  64794. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  64795. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  64796. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  64797. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  64798. exports.numberLiteral = NumberLiteral;
  64799. exports.regexLiteral = RegexLiteral;
  64800. exports.restProperty = RestProperty;
  64801. exports.spreadProperty = SpreadProperty;
  64802. var _builder = require_builder4();
  64803. function arrayExpression(elements) {
  64804. return (0, _builder.default)("ArrayExpression", ...arguments);
  64805. }
  64806. function assignmentExpression(operator, left, right) {
  64807. return (0, _builder.default)("AssignmentExpression", ...arguments);
  64808. }
  64809. function binaryExpression(operator, left, right) {
  64810. return (0, _builder.default)("BinaryExpression", ...arguments);
  64811. }
  64812. function interpreterDirective(value) {
  64813. return (0, _builder.default)("InterpreterDirective", ...arguments);
  64814. }
  64815. function directive(value) {
  64816. return (0, _builder.default)("Directive", ...arguments);
  64817. }
  64818. function directiveLiteral(value) {
  64819. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  64820. }
  64821. function blockStatement(body, directives) {
  64822. return (0, _builder.default)("BlockStatement", ...arguments);
  64823. }
  64824. function breakStatement(label) {
  64825. return (0, _builder.default)("BreakStatement", ...arguments);
  64826. }
  64827. function callExpression(callee, _arguments) {
  64828. return (0, _builder.default)("CallExpression", ...arguments);
  64829. }
  64830. function catchClause(param, body) {
  64831. return (0, _builder.default)("CatchClause", ...arguments);
  64832. }
  64833. function conditionalExpression(test, consequent, alternate) {
  64834. return (0, _builder.default)("ConditionalExpression", ...arguments);
  64835. }
  64836. function continueStatement(label) {
  64837. return (0, _builder.default)("ContinueStatement", ...arguments);
  64838. }
  64839. function debuggerStatement() {
  64840. return (0, _builder.default)("DebuggerStatement", ...arguments);
  64841. }
  64842. function doWhileStatement(test, body) {
  64843. return (0, _builder.default)("DoWhileStatement", ...arguments);
  64844. }
  64845. function emptyStatement() {
  64846. return (0, _builder.default)("EmptyStatement", ...arguments);
  64847. }
  64848. function expressionStatement(expression) {
  64849. return (0, _builder.default)("ExpressionStatement", ...arguments);
  64850. }
  64851. function file(program2, comments, tokens) {
  64852. return (0, _builder.default)("File", ...arguments);
  64853. }
  64854. function forInStatement(left, right, body) {
  64855. return (0, _builder.default)("ForInStatement", ...arguments);
  64856. }
  64857. function forStatement(init, test, update, body) {
  64858. return (0, _builder.default)("ForStatement", ...arguments);
  64859. }
  64860. function functionDeclaration(id, params, body, generator, async) {
  64861. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  64862. }
  64863. function functionExpression(id, params, body, generator, async) {
  64864. return (0, _builder.default)("FunctionExpression", ...arguments);
  64865. }
  64866. function identifier(name2) {
  64867. return (0, _builder.default)("Identifier", ...arguments);
  64868. }
  64869. function ifStatement(test, consequent, alternate) {
  64870. return (0, _builder.default)("IfStatement", ...arguments);
  64871. }
  64872. function labeledStatement(label, body) {
  64873. return (0, _builder.default)("LabeledStatement", ...arguments);
  64874. }
  64875. function stringLiteral(value) {
  64876. return (0, _builder.default)("StringLiteral", ...arguments);
  64877. }
  64878. function numericLiteral(value) {
  64879. return (0, _builder.default)("NumericLiteral", ...arguments);
  64880. }
  64881. function nullLiteral() {
  64882. return (0, _builder.default)("NullLiteral", ...arguments);
  64883. }
  64884. function booleanLiteral(value) {
  64885. return (0, _builder.default)("BooleanLiteral", ...arguments);
  64886. }
  64887. function regExpLiteral(pattern, flags) {
  64888. return (0, _builder.default)("RegExpLiteral", ...arguments);
  64889. }
  64890. function logicalExpression(operator, left, right) {
  64891. return (0, _builder.default)("LogicalExpression", ...arguments);
  64892. }
  64893. function memberExpression(object, property, computed, optional) {
  64894. return (0, _builder.default)("MemberExpression", ...arguments);
  64895. }
  64896. function newExpression(callee, _arguments) {
  64897. return (0, _builder.default)("NewExpression", ...arguments);
  64898. }
  64899. function program(body, directives, sourceType, interpreter) {
  64900. return (0, _builder.default)("Program", ...arguments);
  64901. }
  64902. function objectExpression(properties) {
  64903. return (0, _builder.default)("ObjectExpression", ...arguments);
  64904. }
  64905. function objectMethod(kind, key, params, body, computed, generator, async) {
  64906. return (0, _builder.default)("ObjectMethod", ...arguments);
  64907. }
  64908. function objectProperty(key, value, computed, shorthand, decorators) {
  64909. return (0, _builder.default)("ObjectProperty", ...arguments);
  64910. }
  64911. function restElement(argument) {
  64912. return (0, _builder.default)("RestElement", ...arguments);
  64913. }
  64914. function returnStatement(argument) {
  64915. return (0, _builder.default)("ReturnStatement", ...arguments);
  64916. }
  64917. function sequenceExpression(expressions) {
  64918. return (0, _builder.default)("SequenceExpression", ...arguments);
  64919. }
  64920. function parenthesizedExpression(expression) {
  64921. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  64922. }
  64923. function switchCase(test, consequent) {
  64924. return (0, _builder.default)("SwitchCase", ...arguments);
  64925. }
  64926. function switchStatement(discriminant, cases) {
  64927. return (0, _builder.default)("SwitchStatement", ...arguments);
  64928. }
  64929. function thisExpression() {
  64930. return (0, _builder.default)("ThisExpression", ...arguments);
  64931. }
  64932. function throwStatement(argument) {
  64933. return (0, _builder.default)("ThrowStatement", ...arguments);
  64934. }
  64935. function tryStatement(block, handler, finalizer) {
  64936. return (0, _builder.default)("TryStatement", ...arguments);
  64937. }
  64938. function unaryExpression(operator, argument, prefix) {
  64939. return (0, _builder.default)("UnaryExpression", ...arguments);
  64940. }
  64941. function updateExpression(operator, argument, prefix) {
  64942. return (0, _builder.default)("UpdateExpression", ...arguments);
  64943. }
  64944. function variableDeclaration(kind, declarations) {
  64945. return (0, _builder.default)("VariableDeclaration", ...arguments);
  64946. }
  64947. function variableDeclarator(id, init) {
  64948. return (0, _builder.default)("VariableDeclarator", ...arguments);
  64949. }
  64950. function whileStatement(test, body) {
  64951. return (0, _builder.default)("WhileStatement", ...arguments);
  64952. }
  64953. function withStatement(object, body) {
  64954. return (0, _builder.default)("WithStatement", ...arguments);
  64955. }
  64956. function assignmentPattern(left, right) {
  64957. return (0, _builder.default)("AssignmentPattern", ...arguments);
  64958. }
  64959. function arrayPattern(elements) {
  64960. return (0, _builder.default)("ArrayPattern", ...arguments);
  64961. }
  64962. function arrowFunctionExpression(params, body, async) {
  64963. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  64964. }
  64965. function classBody(body) {
  64966. return (0, _builder.default)("ClassBody", ...arguments);
  64967. }
  64968. function classExpression(id, superClass, body, decorators) {
  64969. return (0, _builder.default)("ClassExpression", ...arguments);
  64970. }
  64971. function classDeclaration(id, superClass, body, decorators) {
  64972. return (0, _builder.default)("ClassDeclaration", ...arguments);
  64973. }
  64974. function exportAllDeclaration(source) {
  64975. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  64976. }
  64977. function exportDefaultDeclaration(declaration) {
  64978. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  64979. }
  64980. function exportNamedDeclaration(declaration, specifiers, source) {
  64981. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  64982. }
  64983. function exportSpecifier(local, exported) {
  64984. return (0, _builder.default)("ExportSpecifier", ...arguments);
  64985. }
  64986. function forOfStatement(left, right, body, _await) {
  64987. return (0, _builder.default)("ForOfStatement", ...arguments);
  64988. }
  64989. function importDeclaration(specifiers, source) {
  64990. return (0, _builder.default)("ImportDeclaration", ...arguments);
  64991. }
  64992. function importDefaultSpecifier(local) {
  64993. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  64994. }
  64995. function importNamespaceSpecifier(local) {
  64996. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  64997. }
  64998. function importSpecifier(local, imported) {
  64999. return (0, _builder.default)("ImportSpecifier", ...arguments);
  65000. }
  65001. function metaProperty(meta, property) {
  65002. return (0, _builder.default)("MetaProperty", ...arguments);
  65003. }
  65004. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  65005. return (0, _builder.default)("ClassMethod", ...arguments);
  65006. }
  65007. function objectPattern(properties) {
  65008. return (0, _builder.default)("ObjectPattern", ...arguments);
  65009. }
  65010. function spreadElement(argument) {
  65011. return (0, _builder.default)("SpreadElement", ...arguments);
  65012. }
  65013. function _super() {
  65014. return (0, _builder.default)("Super", ...arguments);
  65015. }
  65016. function taggedTemplateExpression(tag, quasi) {
  65017. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  65018. }
  65019. function templateElement(value, tail) {
  65020. return (0, _builder.default)("TemplateElement", ...arguments);
  65021. }
  65022. function templateLiteral(quasis, expressions) {
  65023. return (0, _builder.default)("TemplateLiteral", ...arguments);
  65024. }
  65025. function yieldExpression(argument, delegate) {
  65026. return (0, _builder.default)("YieldExpression", ...arguments);
  65027. }
  65028. function awaitExpression(argument) {
  65029. return (0, _builder.default)("AwaitExpression", ...arguments);
  65030. }
  65031. function _import() {
  65032. return (0, _builder.default)("Import", ...arguments);
  65033. }
  65034. function bigIntLiteral(value) {
  65035. return (0, _builder.default)("BigIntLiteral", ...arguments);
  65036. }
  65037. function exportNamespaceSpecifier(exported) {
  65038. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  65039. }
  65040. function optionalMemberExpression(object, property, computed, optional) {
  65041. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  65042. }
  65043. function optionalCallExpression(callee, _arguments, optional) {
  65044. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  65045. }
  65046. function anyTypeAnnotation() {
  65047. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  65048. }
  65049. function arrayTypeAnnotation(elementType) {
  65050. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  65051. }
  65052. function booleanTypeAnnotation() {
  65053. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  65054. }
  65055. function booleanLiteralTypeAnnotation(value) {
  65056. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  65057. }
  65058. function nullLiteralTypeAnnotation() {
  65059. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  65060. }
  65061. function classImplements(id, typeParameters) {
  65062. return (0, _builder.default)("ClassImplements", ...arguments);
  65063. }
  65064. function declareClass(id, typeParameters, _extends, body) {
  65065. return (0, _builder.default)("DeclareClass", ...arguments);
  65066. }
  65067. function declareFunction(id) {
  65068. return (0, _builder.default)("DeclareFunction", ...arguments);
  65069. }
  65070. function declareInterface(id, typeParameters, _extends, body) {
  65071. return (0, _builder.default)("DeclareInterface", ...arguments);
  65072. }
  65073. function declareModule(id, body, kind) {
  65074. return (0, _builder.default)("DeclareModule", ...arguments);
  65075. }
  65076. function declareModuleExports(typeAnnotation2) {
  65077. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  65078. }
  65079. function declareTypeAlias(id, typeParameters, right) {
  65080. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  65081. }
  65082. function declareOpaqueType(id, typeParameters, supertype) {
  65083. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  65084. }
  65085. function declareVariable(id) {
  65086. return (0, _builder.default)("DeclareVariable", ...arguments);
  65087. }
  65088. function declareExportDeclaration(declaration, specifiers, source) {
  65089. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  65090. }
  65091. function declareExportAllDeclaration(source) {
  65092. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  65093. }
  65094. function declaredPredicate(value) {
  65095. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  65096. }
  65097. function existsTypeAnnotation() {
  65098. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  65099. }
  65100. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  65101. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  65102. }
  65103. function functionTypeParam(name2, typeAnnotation2) {
  65104. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  65105. }
  65106. function genericTypeAnnotation(id, typeParameters) {
  65107. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  65108. }
  65109. function inferredPredicate() {
  65110. return (0, _builder.default)("InferredPredicate", ...arguments);
  65111. }
  65112. function interfaceExtends(id, typeParameters) {
  65113. return (0, _builder.default)("InterfaceExtends", ...arguments);
  65114. }
  65115. function interfaceDeclaration(id, typeParameters, _extends, body) {
  65116. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  65117. }
  65118. function interfaceTypeAnnotation(_extends, body) {
  65119. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  65120. }
  65121. function intersectionTypeAnnotation(types2) {
  65122. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  65123. }
  65124. function mixedTypeAnnotation() {
  65125. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  65126. }
  65127. function emptyTypeAnnotation() {
  65128. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  65129. }
  65130. function nullableTypeAnnotation(typeAnnotation2) {
  65131. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  65132. }
  65133. function numberLiteralTypeAnnotation(value) {
  65134. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  65135. }
  65136. function numberTypeAnnotation() {
  65137. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  65138. }
  65139. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  65140. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  65141. }
  65142. function objectTypeInternalSlot(id, value, optional, _static, method) {
  65143. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  65144. }
  65145. function objectTypeCallProperty(value) {
  65146. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  65147. }
  65148. function objectTypeIndexer(id, key, value, variance2) {
  65149. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  65150. }
  65151. function objectTypeProperty(key, value, variance2) {
  65152. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  65153. }
  65154. function objectTypeSpreadProperty(argument) {
  65155. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  65156. }
  65157. function opaqueType(id, typeParameters, supertype, impltype) {
  65158. return (0, _builder.default)("OpaqueType", ...arguments);
  65159. }
  65160. function qualifiedTypeIdentifier(id, qualification) {
  65161. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  65162. }
  65163. function stringLiteralTypeAnnotation(value) {
  65164. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  65165. }
  65166. function stringTypeAnnotation() {
  65167. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  65168. }
  65169. function symbolTypeAnnotation() {
  65170. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  65171. }
  65172. function thisTypeAnnotation() {
  65173. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  65174. }
  65175. function tupleTypeAnnotation(types2) {
  65176. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  65177. }
  65178. function typeofTypeAnnotation(argument) {
  65179. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  65180. }
  65181. function typeAlias(id, typeParameters, right) {
  65182. return (0, _builder.default)("TypeAlias", ...arguments);
  65183. }
  65184. function typeAnnotation(typeAnnotation2) {
  65185. return (0, _builder.default)("TypeAnnotation", ...arguments);
  65186. }
  65187. function typeCastExpression(expression, typeAnnotation2) {
  65188. return (0, _builder.default)("TypeCastExpression", ...arguments);
  65189. }
  65190. function typeParameter(bound, _default, variance2) {
  65191. return (0, _builder.default)("TypeParameter", ...arguments);
  65192. }
  65193. function typeParameterDeclaration(params) {
  65194. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  65195. }
  65196. function typeParameterInstantiation(params) {
  65197. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  65198. }
  65199. function unionTypeAnnotation(types2) {
  65200. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  65201. }
  65202. function variance(kind) {
  65203. return (0, _builder.default)("Variance", ...arguments);
  65204. }
  65205. function voidTypeAnnotation() {
  65206. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  65207. }
  65208. function enumDeclaration(id, body) {
  65209. return (0, _builder.default)("EnumDeclaration", ...arguments);
  65210. }
  65211. function enumBooleanBody(members) {
  65212. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  65213. }
  65214. function enumNumberBody(members) {
  65215. return (0, _builder.default)("EnumNumberBody", ...arguments);
  65216. }
  65217. function enumStringBody(members) {
  65218. return (0, _builder.default)("EnumStringBody", ...arguments);
  65219. }
  65220. function enumSymbolBody(members) {
  65221. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  65222. }
  65223. function enumBooleanMember(id) {
  65224. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  65225. }
  65226. function enumNumberMember(id, init) {
  65227. return (0, _builder.default)("EnumNumberMember", ...arguments);
  65228. }
  65229. function enumStringMember(id, init) {
  65230. return (0, _builder.default)("EnumStringMember", ...arguments);
  65231. }
  65232. function enumDefaultedMember(id) {
  65233. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  65234. }
  65235. function indexedAccessType(objectType, indexType) {
  65236. return (0, _builder.default)("IndexedAccessType", ...arguments);
  65237. }
  65238. function optionalIndexedAccessType(objectType, indexType) {
  65239. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  65240. }
  65241. function jsxAttribute(name2, value) {
  65242. return (0, _builder.default)("JSXAttribute", ...arguments);
  65243. }
  65244. function jsxClosingElement(name2) {
  65245. return (0, _builder.default)("JSXClosingElement", ...arguments);
  65246. }
  65247. function jsxElement(openingElement, closingElement, children, selfClosing) {
  65248. return (0, _builder.default)("JSXElement", ...arguments);
  65249. }
  65250. function jsxEmptyExpression() {
  65251. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  65252. }
  65253. function jsxExpressionContainer(expression) {
  65254. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  65255. }
  65256. function jsxSpreadChild(expression) {
  65257. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  65258. }
  65259. function jsxIdentifier(name2) {
  65260. return (0, _builder.default)("JSXIdentifier", ...arguments);
  65261. }
  65262. function jsxMemberExpression(object, property) {
  65263. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  65264. }
  65265. function jsxNamespacedName(namespace, name2) {
  65266. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  65267. }
  65268. function jsxOpeningElement(name2, attributes, selfClosing) {
  65269. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  65270. }
  65271. function jsxSpreadAttribute(argument) {
  65272. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  65273. }
  65274. function jsxText2(value) {
  65275. return (0, _builder.default)("JSXText", ...arguments);
  65276. }
  65277. function jsxFragment(openingFragment, closingFragment, children) {
  65278. return (0, _builder.default)("JSXFragment", ...arguments);
  65279. }
  65280. function jsxOpeningFragment() {
  65281. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  65282. }
  65283. function jsxClosingFragment() {
  65284. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  65285. }
  65286. function noop() {
  65287. return (0, _builder.default)("Noop", ...arguments);
  65288. }
  65289. function placeholder(expectedNode, name2) {
  65290. return (0, _builder.default)("Placeholder", ...arguments);
  65291. }
  65292. function v8IntrinsicIdentifier(name2) {
  65293. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  65294. }
  65295. function argumentPlaceholder() {
  65296. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  65297. }
  65298. function bindExpression(object, callee) {
  65299. return (0, _builder.default)("BindExpression", ...arguments);
  65300. }
  65301. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  65302. return (0, _builder.default)("ClassProperty", ...arguments);
  65303. }
  65304. function pipelineTopicExpression(expression) {
  65305. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  65306. }
  65307. function pipelineBareFunction(callee) {
  65308. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  65309. }
  65310. function pipelinePrimaryTopicReference() {
  65311. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  65312. }
  65313. function classPrivateProperty(key, value, decorators, _static) {
  65314. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  65315. }
  65316. function classPrivateMethod(kind, key, params, body, _static) {
  65317. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  65318. }
  65319. function importAttribute(key, value) {
  65320. return (0, _builder.default)("ImportAttribute", ...arguments);
  65321. }
  65322. function decorator(expression) {
  65323. return (0, _builder.default)("Decorator", ...arguments);
  65324. }
  65325. function doExpression(body, async) {
  65326. return (0, _builder.default)("DoExpression", ...arguments);
  65327. }
  65328. function exportDefaultSpecifier(exported) {
  65329. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  65330. }
  65331. function privateName(id) {
  65332. return (0, _builder.default)("PrivateName", ...arguments);
  65333. }
  65334. function recordExpression(properties) {
  65335. return (0, _builder.default)("RecordExpression", ...arguments);
  65336. }
  65337. function tupleExpression(elements) {
  65338. return (0, _builder.default)("TupleExpression", ...arguments);
  65339. }
  65340. function decimalLiteral(value) {
  65341. return (0, _builder.default)("DecimalLiteral", ...arguments);
  65342. }
  65343. function staticBlock(body) {
  65344. return (0, _builder.default)("StaticBlock", ...arguments);
  65345. }
  65346. function moduleExpression(body) {
  65347. return (0, _builder.default)("ModuleExpression", ...arguments);
  65348. }
  65349. function tsParameterProperty(parameter) {
  65350. return (0, _builder.default)("TSParameterProperty", ...arguments);
  65351. }
  65352. function tsDeclareFunction(id, typeParameters, params, returnType) {
  65353. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  65354. }
  65355. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  65356. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  65357. }
  65358. function tsQualifiedName(left, right) {
  65359. return (0, _builder.default)("TSQualifiedName", ...arguments);
  65360. }
  65361. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  65362. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  65363. }
  65364. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  65365. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  65366. }
  65367. function tsPropertySignature(key, typeAnnotation2, initializer) {
  65368. return (0, _builder.default)("TSPropertySignature", ...arguments);
  65369. }
  65370. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  65371. return (0, _builder.default)("TSMethodSignature", ...arguments);
  65372. }
  65373. function tsIndexSignature(parameters, typeAnnotation2) {
  65374. return (0, _builder.default)("TSIndexSignature", ...arguments);
  65375. }
  65376. function tsAnyKeyword() {
  65377. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  65378. }
  65379. function tsBooleanKeyword() {
  65380. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  65381. }
  65382. function tsBigIntKeyword() {
  65383. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  65384. }
  65385. function tsIntrinsicKeyword() {
  65386. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  65387. }
  65388. function tsNeverKeyword() {
  65389. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  65390. }
  65391. function tsNullKeyword() {
  65392. return (0, _builder.default)("TSNullKeyword", ...arguments);
  65393. }
  65394. function tsNumberKeyword() {
  65395. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  65396. }
  65397. function tsObjectKeyword() {
  65398. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  65399. }
  65400. function tsStringKeyword() {
  65401. return (0, _builder.default)("TSStringKeyword", ...arguments);
  65402. }
  65403. function tsSymbolKeyword() {
  65404. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  65405. }
  65406. function tsUndefinedKeyword() {
  65407. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  65408. }
  65409. function tsUnknownKeyword() {
  65410. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  65411. }
  65412. function tsVoidKeyword() {
  65413. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  65414. }
  65415. function tsThisType() {
  65416. return (0, _builder.default)("TSThisType", ...arguments);
  65417. }
  65418. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  65419. return (0, _builder.default)("TSFunctionType", ...arguments);
  65420. }
  65421. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  65422. return (0, _builder.default)("TSConstructorType", ...arguments);
  65423. }
  65424. function tsTypeReference(typeName, typeParameters) {
  65425. return (0, _builder.default)("TSTypeReference", ...arguments);
  65426. }
  65427. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  65428. return (0, _builder.default)("TSTypePredicate", ...arguments);
  65429. }
  65430. function tsTypeQuery(exprName) {
  65431. return (0, _builder.default)("TSTypeQuery", ...arguments);
  65432. }
  65433. function tsTypeLiteral(members) {
  65434. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  65435. }
  65436. function tsArrayType(elementType) {
  65437. return (0, _builder.default)("TSArrayType", ...arguments);
  65438. }
  65439. function tsTupleType(elementTypes) {
  65440. return (0, _builder.default)("TSTupleType", ...arguments);
  65441. }
  65442. function tsOptionalType(typeAnnotation2) {
  65443. return (0, _builder.default)("TSOptionalType", ...arguments);
  65444. }
  65445. function tsRestType(typeAnnotation2) {
  65446. return (0, _builder.default)("TSRestType", ...arguments);
  65447. }
  65448. function tsNamedTupleMember(label, elementType, optional) {
  65449. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  65450. }
  65451. function tsUnionType(types2) {
  65452. return (0, _builder.default)("TSUnionType", ...arguments);
  65453. }
  65454. function tsIntersectionType(types2) {
  65455. return (0, _builder.default)("TSIntersectionType", ...arguments);
  65456. }
  65457. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  65458. return (0, _builder.default)("TSConditionalType", ...arguments);
  65459. }
  65460. function tsInferType(typeParameter2) {
  65461. return (0, _builder.default)("TSInferType", ...arguments);
  65462. }
  65463. function tsParenthesizedType(typeAnnotation2) {
  65464. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  65465. }
  65466. function tsTypeOperator(typeAnnotation2) {
  65467. return (0, _builder.default)("TSTypeOperator", ...arguments);
  65468. }
  65469. function tsIndexedAccessType(objectType, indexType) {
  65470. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  65471. }
  65472. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  65473. return (0, _builder.default)("TSMappedType", ...arguments);
  65474. }
  65475. function tsLiteralType(literal2) {
  65476. return (0, _builder.default)("TSLiteralType", ...arguments);
  65477. }
  65478. function tsExpressionWithTypeArguments(expression, typeParameters) {
  65479. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  65480. }
  65481. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  65482. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  65483. }
  65484. function tsInterfaceBody(body) {
  65485. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  65486. }
  65487. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  65488. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  65489. }
  65490. function tsAsExpression(expression, typeAnnotation2) {
  65491. return (0, _builder.default)("TSAsExpression", ...arguments);
  65492. }
  65493. function tsTypeAssertion(typeAnnotation2, expression) {
  65494. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  65495. }
  65496. function tsEnumDeclaration(id, members) {
  65497. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  65498. }
  65499. function tsEnumMember(id, initializer) {
  65500. return (0, _builder.default)("TSEnumMember", ...arguments);
  65501. }
  65502. function tsModuleDeclaration(id, body) {
  65503. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  65504. }
  65505. function tsModuleBlock(body) {
  65506. return (0, _builder.default)("TSModuleBlock", ...arguments);
  65507. }
  65508. function tsImportType(argument, qualifier, typeParameters) {
  65509. return (0, _builder.default)("TSImportType", ...arguments);
  65510. }
  65511. function tsImportEqualsDeclaration(id, moduleReference) {
  65512. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  65513. }
  65514. function tsExternalModuleReference(expression) {
  65515. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  65516. }
  65517. function tsNonNullExpression(expression) {
  65518. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  65519. }
  65520. function tsExportAssignment(expression) {
  65521. return (0, _builder.default)("TSExportAssignment", ...arguments);
  65522. }
  65523. function tsNamespaceExportDeclaration(id) {
  65524. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  65525. }
  65526. function tsTypeAnnotation(typeAnnotation2) {
  65527. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  65528. }
  65529. function tsTypeParameterInstantiation(params) {
  65530. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  65531. }
  65532. function tsTypeParameterDeclaration(params) {
  65533. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  65534. }
  65535. function tsTypeParameter(constraint, _default, name2) {
  65536. return (0, _builder.default)("TSTypeParameter", ...arguments);
  65537. }
  65538. function NumberLiteral(...args) {
  65539. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  65540. return (0, _builder.default)("NumberLiteral", ...args);
  65541. }
  65542. function RegexLiteral(...args) {
  65543. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  65544. return (0, _builder.default)("RegexLiteral", ...args);
  65545. }
  65546. function RestProperty(...args) {
  65547. console.trace("The node type RestProperty has been renamed to RestElement");
  65548. return (0, _builder.default)("RestProperty", ...args);
  65549. }
  65550. function SpreadProperty(...args) {
  65551. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  65552. return (0, _builder.default)("SpreadProperty", ...args);
  65553. }
  65554. }
  65555. });
  65556. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  65557. var require_cleanJSXElementLiteralChild3 = __commonJS({
  65558. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  65559. "use strict";
  65560. Object.defineProperty(exports, "__esModule", {
  65561. value: true
  65562. });
  65563. exports.default = cleanJSXElementLiteralChild;
  65564. var _generated = require_generated12();
  65565. function cleanJSXElementLiteralChild(child, args) {
  65566. const lines = child.value.split(/\r\n|\n|\r/);
  65567. let lastNonEmptyLine = 0;
  65568. for (let i = 0; i < lines.length; i++) {
  65569. if (lines[i].match(/[^ \t]/)) {
  65570. lastNonEmptyLine = i;
  65571. }
  65572. }
  65573. let str = "";
  65574. for (let i = 0; i < lines.length; i++) {
  65575. const line = lines[i];
  65576. const isFirstLine = i === 0;
  65577. const isLastLine = i === lines.length - 1;
  65578. const isLastNonEmptyLine = i === lastNonEmptyLine;
  65579. let trimmedLine = line.replace(/\t/g, " ");
  65580. if (!isFirstLine) {
  65581. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  65582. }
  65583. if (!isLastLine) {
  65584. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  65585. }
  65586. if (trimmedLine) {
  65587. if (!isLastNonEmptyLine) {
  65588. trimmedLine += " ";
  65589. }
  65590. str += trimmedLine;
  65591. }
  65592. }
  65593. if (str)
  65594. args.push((0, _generated.stringLiteral)(str));
  65595. }
  65596. }
  65597. });
  65598. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/react/buildChildren.js
  65599. var require_buildChildren3 = __commonJS({
  65600. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  65601. "use strict";
  65602. Object.defineProperty(exports, "__esModule", {
  65603. value: true
  65604. });
  65605. exports.default = buildChildren;
  65606. var _generated = require_generated11();
  65607. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild3();
  65608. function buildChildren(node) {
  65609. const elements = [];
  65610. for (let i = 0; i < node.children.length; i++) {
  65611. let child = node.children[i];
  65612. if ((0, _generated.isJSXText)(child)) {
  65613. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  65614. continue;
  65615. }
  65616. if ((0, _generated.isJSXExpressionContainer)(child))
  65617. child = child.expression;
  65618. if ((0, _generated.isJSXEmptyExpression)(child))
  65619. continue;
  65620. elements.push(child);
  65621. }
  65622. return elements;
  65623. }
  65624. }
  65625. });
  65626. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNode.js
  65627. var require_isNode3 = __commonJS({
  65628. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  65629. "use strict";
  65630. Object.defineProperty(exports, "__esModule", {
  65631. value: true
  65632. });
  65633. exports.default = isNode;
  65634. var _definitions = require_definitions3();
  65635. function isNode(node) {
  65636. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  65637. }
  65638. }
  65639. });
  65640. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/assertNode.js
  65641. var require_assertNode3 = __commonJS({
  65642. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  65643. "use strict";
  65644. Object.defineProperty(exports, "__esModule", {
  65645. value: true
  65646. });
  65647. exports.default = assertNode2;
  65648. var _isNode = require_isNode3();
  65649. function assertNode2(node) {
  65650. if (!(0, _isNode.default)(node)) {
  65651. var _node$type;
  65652. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  65653. throw new TypeError(`Not a valid node of type "${type}"`);
  65654. }
  65655. }
  65656. }
  65657. });
  65658. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/generated/index.js
  65659. var require_generated13 = __commonJS({
  65660. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  65661. "use strict";
  65662. Object.defineProperty(exports, "__esModule", {
  65663. value: true
  65664. });
  65665. exports.assertArrayExpression = assertArrayExpression;
  65666. exports.assertAssignmentExpression = assertAssignmentExpression;
  65667. exports.assertBinaryExpression = assertBinaryExpression;
  65668. exports.assertInterpreterDirective = assertInterpreterDirective;
  65669. exports.assertDirective = assertDirective;
  65670. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  65671. exports.assertBlockStatement = assertBlockStatement;
  65672. exports.assertBreakStatement = assertBreakStatement;
  65673. exports.assertCallExpression = assertCallExpression;
  65674. exports.assertCatchClause = assertCatchClause;
  65675. exports.assertConditionalExpression = assertConditionalExpression;
  65676. exports.assertContinueStatement = assertContinueStatement;
  65677. exports.assertDebuggerStatement = assertDebuggerStatement;
  65678. exports.assertDoWhileStatement = assertDoWhileStatement;
  65679. exports.assertEmptyStatement = assertEmptyStatement;
  65680. exports.assertExpressionStatement = assertExpressionStatement;
  65681. exports.assertFile = assertFile;
  65682. exports.assertForInStatement = assertForInStatement;
  65683. exports.assertForStatement = assertForStatement;
  65684. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  65685. exports.assertFunctionExpression = assertFunctionExpression;
  65686. exports.assertIdentifier = assertIdentifier;
  65687. exports.assertIfStatement = assertIfStatement;
  65688. exports.assertLabeledStatement = assertLabeledStatement;
  65689. exports.assertStringLiteral = assertStringLiteral;
  65690. exports.assertNumericLiteral = assertNumericLiteral;
  65691. exports.assertNullLiteral = assertNullLiteral;
  65692. exports.assertBooleanLiteral = assertBooleanLiteral;
  65693. exports.assertRegExpLiteral = assertRegExpLiteral;
  65694. exports.assertLogicalExpression = assertLogicalExpression;
  65695. exports.assertMemberExpression = assertMemberExpression;
  65696. exports.assertNewExpression = assertNewExpression;
  65697. exports.assertProgram = assertProgram;
  65698. exports.assertObjectExpression = assertObjectExpression;
  65699. exports.assertObjectMethod = assertObjectMethod;
  65700. exports.assertObjectProperty = assertObjectProperty;
  65701. exports.assertRestElement = assertRestElement;
  65702. exports.assertReturnStatement = assertReturnStatement;
  65703. exports.assertSequenceExpression = assertSequenceExpression;
  65704. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  65705. exports.assertSwitchCase = assertSwitchCase;
  65706. exports.assertSwitchStatement = assertSwitchStatement;
  65707. exports.assertThisExpression = assertThisExpression;
  65708. exports.assertThrowStatement = assertThrowStatement;
  65709. exports.assertTryStatement = assertTryStatement;
  65710. exports.assertUnaryExpression = assertUnaryExpression;
  65711. exports.assertUpdateExpression = assertUpdateExpression;
  65712. exports.assertVariableDeclaration = assertVariableDeclaration;
  65713. exports.assertVariableDeclarator = assertVariableDeclarator;
  65714. exports.assertWhileStatement = assertWhileStatement;
  65715. exports.assertWithStatement = assertWithStatement;
  65716. exports.assertAssignmentPattern = assertAssignmentPattern;
  65717. exports.assertArrayPattern = assertArrayPattern;
  65718. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  65719. exports.assertClassBody = assertClassBody;
  65720. exports.assertClassExpression = assertClassExpression;
  65721. exports.assertClassDeclaration = assertClassDeclaration;
  65722. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  65723. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  65724. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  65725. exports.assertExportSpecifier = assertExportSpecifier;
  65726. exports.assertForOfStatement = assertForOfStatement;
  65727. exports.assertImportDeclaration = assertImportDeclaration;
  65728. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  65729. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  65730. exports.assertImportSpecifier = assertImportSpecifier;
  65731. exports.assertMetaProperty = assertMetaProperty;
  65732. exports.assertClassMethod = assertClassMethod;
  65733. exports.assertObjectPattern = assertObjectPattern;
  65734. exports.assertSpreadElement = assertSpreadElement;
  65735. exports.assertSuper = assertSuper;
  65736. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  65737. exports.assertTemplateElement = assertTemplateElement;
  65738. exports.assertTemplateLiteral = assertTemplateLiteral;
  65739. exports.assertYieldExpression = assertYieldExpression;
  65740. exports.assertAwaitExpression = assertAwaitExpression;
  65741. exports.assertImport = assertImport;
  65742. exports.assertBigIntLiteral = assertBigIntLiteral;
  65743. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  65744. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  65745. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  65746. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  65747. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  65748. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  65749. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  65750. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  65751. exports.assertClassImplements = assertClassImplements;
  65752. exports.assertDeclareClass = assertDeclareClass;
  65753. exports.assertDeclareFunction = assertDeclareFunction;
  65754. exports.assertDeclareInterface = assertDeclareInterface;
  65755. exports.assertDeclareModule = assertDeclareModule;
  65756. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  65757. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  65758. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  65759. exports.assertDeclareVariable = assertDeclareVariable;
  65760. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  65761. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  65762. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  65763. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  65764. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  65765. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  65766. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  65767. exports.assertInferredPredicate = assertInferredPredicate;
  65768. exports.assertInterfaceExtends = assertInterfaceExtends;
  65769. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  65770. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  65771. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  65772. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  65773. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  65774. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  65775. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  65776. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  65777. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  65778. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  65779. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  65780. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  65781. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  65782. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  65783. exports.assertOpaqueType = assertOpaqueType;
  65784. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  65785. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  65786. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  65787. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  65788. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  65789. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  65790. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  65791. exports.assertTypeAlias = assertTypeAlias;
  65792. exports.assertTypeAnnotation = assertTypeAnnotation;
  65793. exports.assertTypeCastExpression = assertTypeCastExpression;
  65794. exports.assertTypeParameter = assertTypeParameter;
  65795. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  65796. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  65797. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  65798. exports.assertVariance = assertVariance;
  65799. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  65800. exports.assertEnumDeclaration = assertEnumDeclaration;
  65801. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  65802. exports.assertEnumNumberBody = assertEnumNumberBody;
  65803. exports.assertEnumStringBody = assertEnumStringBody;
  65804. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  65805. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  65806. exports.assertEnumNumberMember = assertEnumNumberMember;
  65807. exports.assertEnumStringMember = assertEnumStringMember;
  65808. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  65809. exports.assertIndexedAccessType = assertIndexedAccessType;
  65810. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  65811. exports.assertJSXAttribute = assertJSXAttribute;
  65812. exports.assertJSXClosingElement = assertJSXClosingElement;
  65813. exports.assertJSXElement = assertJSXElement;
  65814. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  65815. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  65816. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  65817. exports.assertJSXIdentifier = assertJSXIdentifier;
  65818. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  65819. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  65820. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  65821. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  65822. exports.assertJSXText = assertJSXText;
  65823. exports.assertJSXFragment = assertJSXFragment;
  65824. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  65825. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  65826. exports.assertNoop = assertNoop;
  65827. exports.assertPlaceholder = assertPlaceholder;
  65828. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  65829. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  65830. exports.assertBindExpression = assertBindExpression;
  65831. exports.assertClassProperty = assertClassProperty;
  65832. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  65833. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  65834. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  65835. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  65836. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  65837. exports.assertImportAttribute = assertImportAttribute;
  65838. exports.assertDecorator = assertDecorator;
  65839. exports.assertDoExpression = assertDoExpression;
  65840. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  65841. exports.assertPrivateName = assertPrivateName;
  65842. exports.assertRecordExpression = assertRecordExpression;
  65843. exports.assertTupleExpression = assertTupleExpression;
  65844. exports.assertDecimalLiteral = assertDecimalLiteral;
  65845. exports.assertStaticBlock = assertStaticBlock;
  65846. exports.assertModuleExpression = assertModuleExpression;
  65847. exports.assertTSParameterProperty = assertTSParameterProperty;
  65848. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  65849. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  65850. exports.assertTSQualifiedName = assertTSQualifiedName;
  65851. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  65852. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  65853. exports.assertTSPropertySignature = assertTSPropertySignature;
  65854. exports.assertTSMethodSignature = assertTSMethodSignature;
  65855. exports.assertTSIndexSignature = assertTSIndexSignature;
  65856. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  65857. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  65858. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  65859. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  65860. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  65861. exports.assertTSNullKeyword = assertTSNullKeyword;
  65862. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  65863. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  65864. exports.assertTSStringKeyword = assertTSStringKeyword;
  65865. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  65866. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  65867. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  65868. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  65869. exports.assertTSThisType = assertTSThisType;
  65870. exports.assertTSFunctionType = assertTSFunctionType;
  65871. exports.assertTSConstructorType = assertTSConstructorType;
  65872. exports.assertTSTypeReference = assertTSTypeReference;
  65873. exports.assertTSTypePredicate = assertTSTypePredicate;
  65874. exports.assertTSTypeQuery = assertTSTypeQuery;
  65875. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  65876. exports.assertTSArrayType = assertTSArrayType;
  65877. exports.assertTSTupleType = assertTSTupleType;
  65878. exports.assertTSOptionalType = assertTSOptionalType;
  65879. exports.assertTSRestType = assertTSRestType;
  65880. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  65881. exports.assertTSUnionType = assertTSUnionType;
  65882. exports.assertTSIntersectionType = assertTSIntersectionType;
  65883. exports.assertTSConditionalType = assertTSConditionalType;
  65884. exports.assertTSInferType = assertTSInferType;
  65885. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  65886. exports.assertTSTypeOperator = assertTSTypeOperator;
  65887. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  65888. exports.assertTSMappedType = assertTSMappedType;
  65889. exports.assertTSLiteralType = assertTSLiteralType;
  65890. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  65891. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  65892. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  65893. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  65894. exports.assertTSAsExpression = assertTSAsExpression;
  65895. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  65896. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  65897. exports.assertTSEnumMember = assertTSEnumMember;
  65898. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  65899. exports.assertTSModuleBlock = assertTSModuleBlock;
  65900. exports.assertTSImportType = assertTSImportType;
  65901. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  65902. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  65903. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  65904. exports.assertTSExportAssignment = assertTSExportAssignment;
  65905. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  65906. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  65907. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  65908. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  65909. exports.assertTSTypeParameter = assertTSTypeParameter;
  65910. exports.assertExpression = assertExpression;
  65911. exports.assertBinary = assertBinary;
  65912. exports.assertScopable = assertScopable;
  65913. exports.assertBlockParent = assertBlockParent;
  65914. exports.assertBlock = assertBlock;
  65915. exports.assertStatement = assertStatement;
  65916. exports.assertTerminatorless = assertTerminatorless;
  65917. exports.assertCompletionStatement = assertCompletionStatement;
  65918. exports.assertConditional = assertConditional;
  65919. exports.assertLoop = assertLoop;
  65920. exports.assertWhile = assertWhile;
  65921. exports.assertExpressionWrapper = assertExpressionWrapper;
  65922. exports.assertFor = assertFor;
  65923. exports.assertForXStatement = assertForXStatement;
  65924. exports.assertFunction = assertFunction;
  65925. exports.assertFunctionParent = assertFunctionParent;
  65926. exports.assertPureish = assertPureish;
  65927. exports.assertDeclaration = assertDeclaration;
  65928. exports.assertPatternLike = assertPatternLike;
  65929. exports.assertLVal = assertLVal;
  65930. exports.assertTSEntityName = assertTSEntityName;
  65931. exports.assertLiteral = assertLiteral;
  65932. exports.assertImmutable = assertImmutable;
  65933. exports.assertUserWhitespacable = assertUserWhitespacable;
  65934. exports.assertMethod = assertMethod;
  65935. exports.assertObjectMember = assertObjectMember;
  65936. exports.assertProperty = assertProperty;
  65937. exports.assertUnaryLike = assertUnaryLike;
  65938. exports.assertPattern = assertPattern;
  65939. exports.assertClass = assertClass;
  65940. exports.assertModuleDeclaration = assertModuleDeclaration;
  65941. exports.assertExportDeclaration = assertExportDeclaration;
  65942. exports.assertModuleSpecifier = assertModuleSpecifier;
  65943. exports.assertFlow = assertFlow;
  65944. exports.assertFlowType = assertFlowType;
  65945. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  65946. exports.assertFlowDeclaration = assertFlowDeclaration;
  65947. exports.assertFlowPredicate = assertFlowPredicate;
  65948. exports.assertEnumBody = assertEnumBody;
  65949. exports.assertEnumMember = assertEnumMember;
  65950. exports.assertJSX = assertJSX;
  65951. exports.assertPrivate = assertPrivate;
  65952. exports.assertTSTypeElement = assertTSTypeElement;
  65953. exports.assertTSType = assertTSType;
  65954. exports.assertTSBaseType = assertTSBaseType;
  65955. exports.assertNumberLiteral = assertNumberLiteral;
  65956. exports.assertRegexLiteral = assertRegexLiteral;
  65957. exports.assertRestProperty = assertRestProperty;
  65958. exports.assertSpreadProperty = assertSpreadProperty;
  65959. var _is = require_is3();
  65960. function assert(type, node, opts) {
  65961. if (!(0, _is.default)(type, node, opts)) {
  65962. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  65963. }
  65964. }
  65965. function assertArrayExpression(node, opts) {
  65966. assert("ArrayExpression", node, opts);
  65967. }
  65968. function assertAssignmentExpression(node, opts) {
  65969. assert("AssignmentExpression", node, opts);
  65970. }
  65971. function assertBinaryExpression(node, opts) {
  65972. assert("BinaryExpression", node, opts);
  65973. }
  65974. function assertInterpreterDirective(node, opts) {
  65975. assert("InterpreterDirective", node, opts);
  65976. }
  65977. function assertDirective(node, opts) {
  65978. assert("Directive", node, opts);
  65979. }
  65980. function assertDirectiveLiteral(node, opts) {
  65981. assert("DirectiveLiteral", node, opts);
  65982. }
  65983. function assertBlockStatement(node, opts) {
  65984. assert("BlockStatement", node, opts);
  65985. }
  65986. function assertBreakStatement(node, opts) {
  65987. assert("BreakStatement", node, opts);
  65988. }
  65989. function assertCallExpression(node, opts) {
  65990. assert("CallExpression", node, opts);
  65991. }
  65992. function assertCatchClause(node, opts) {
  65993. assert("CatchClause", node, opts);
  65994. }
  65995. function assertConditionalExpression(node, opts) {
  65996. assert("ConditionalExpression", node, opts);
  65997. }
  65998. function assertContinueStatement(node, opts) {
  65999. assert("ContinueStatement", node, opts);
  66000. }
  66001. function assertDebuggerStatement(node, opts) {
  66002. assert("DebuggerStatement", node, opts);
  66003. }
  66004. function assertDoWhileStatement(node, opts) {
  66005. assert("DoWhileStatement", node, opts);
  66006. }
  66007. function assertEmptyStatement(node, opts) {
  66008. assert("EmptyStatement", node, opts);
  66009. }
  66010. function assertExpressionStatement(node, opts) {
  66011. assert("ExpressionStatement", node, opts);
  66012. }
  66013. function assertFile(node, opts) {
  66014. assert("File", node, opts);
  66015. }
  66016. function assertForInStatement(node, opts) {
  66017. assert("ForInStatement", node, opts);
  66018. }
  66019. function assertForStatement(node, opts) {
  66020. assert("ForStatement", node, opts);
  66021. }
  66022. function assertFunctionDeclaration(node, opts) {
  66023. assert("FunctionDeclaration", node, opts);
  66024. }
  66025. function assertFunctionExpression(node, opts) {
  66026. assert("FunctionExpression", node, opts);
  66027. }
  66028. function assertIdentifier(node, opts) {
  66029. assert("Identifier", node, opts);
  66030. }
  66031. function assertIfStatement(node, opts) {
  66032. assert("IfStatement", node, opts);
  66033. }
  66034. function assertLabeledStatement(node, opts) {
  66035. assert("LabeledStatement", node, opts);
  66036. }
  66037. function assertStringLiteral(node, opts) {
  66038. assert("StringLiteral", node, opts);
  66039. }
  66040. function assertNumericLiteral(node, opts) {
  66041. assert("NumericLiteral", node, opts);
  66042. }
  66043. function assertNullLiteral(node, opts) {
  66044. assert("NullLiteral", node, opts);
  66045. }
  66046. function assertBooleanLiteral(node, opts) {
  66047. assert("BooleanLiteral", node, opts);
  66048. }
  66049. function assertRegExpLiteral(node, opts) {
  66050. assert("RegExpLiteral", node, opts);
  66051. }
  66052. function assertLogicalExpression(node, opts) {
  66053. assert("LogicalExpression", node, opts);
  66054. }
  66055. function assertMemberExpression(node, opts) {
  66056. assert("MemberExpression", node, opts);
  66057. }
  66058. function assertNewExpression(node, opts) {
  66059. assert("NewExpression", node, opts);
  66060. }
  66061. function assertProgram(node, opts) {
  66062. assert("Program", node, opts);
  66063. }
  66064. function assertObjectExpression(node, opts) {
  66065. assert("ObjectExpression", node, opts);
  66066. }
  66067. function assertObjectMethod(node, opts) {
  66068. assert("ObjectMethod", node, opts);
  66069. }
  66070. function assertObjectProperty(node, opts) {
  66071. assert("ObjectProperty", node, opts);
  66072. }
  66073. function assertRestElement(node, opts) {
  66074. assert("RestElement", node, opts);
  66075. }
  66076. function assertReturnStatement(node, opts) {
  66077. assert("ReturnStatement", node, opts);
  66078. }
  66079. function assertSequenceExpression(node, opts) {
  66080. assert("SequenceExpression", node, opts);
  66081. }
  66082. function assertParenthesizedExpression(node, opts) {
  66083. assert("ParenthesizedExpression", node, opts);
  66084. }
  66085. function assertSwitchCase(node, opts) {
  66086. assert("SwitchCase", node, opts);
  66087. }
  66088. function assertSwitchStatement(node, opts) {
  66089. assert("SwitchStatement", node, opts);
  66090. }
  66091. function assertThisExpression(node, opts) {
  66092. assert("ThisExpression", node, opts);
  66093. }
  66094. function assertThrowStatement(node, opts) {
  66095. assert("ThrowStatement", node, opts);
  66096. }
  66097. function assertTryStatement(node, opts) {
  66098. assert("TryStatement", node, opts);
  66099. }
  66100. function assertUnaryExpression(node, opts) {
  66101. assert("UnaryExpression", node, opts);
  66102. }
  66103. function assertUpdateExpression(node, opts) {
  66104. assert("UpdateExpression", node, opts);
  66105. }
  66106. function assertVariableDeclaration(node, opts) {
  66107. assert("VariableDeclaration", node, opts);
  66108. }
  66109. function assertVariableDeclarator(node, opts) {
  66110. assert("VariableDeclarator", node, opts);
  66111. }
  66112. function assertWhileStatement(node, opts) {
  66113. assert("WhileStatement", node, opts);
  66114. }
  66115. function assertWithStatement(node, opts) {
  66116. assert("WithStatement", node, opts);
  66117. }
  66118. function assertAssignmentPattern(node, opts) {
  66119. assert("AssignmentPattern", node, opts);
  66120. }
  66121. function assertArrayPattern(node, opts) {
  66122. assert("ArrayPattern", node, opts);
  66123. }
  66124. function assertArrowFunctionExpression(node, opts) {
  66125. assert("ArrowFunctionExpression", node, opts);
  66126. }
  66127. function assertClassBody(node, opts) {
  66128. assert("ClassBody", node, opts);
  66129. }
  66130. function assertClassExpression(node, opts) {
  66131. assert("ClassExpression", node, opts);
  66132. }
  66133. function assertClassDeclaration(node, opts) {
  66134. assert("ClassDeclaration", node, opts);
  66135. }
  66136. function assertExportAllDeclaration(node, opts) {
  66137. assert("ExportAllDeclaration", node, opts);
  66138. }
  66139. function assertExportDefaultDeclaration(node, opts) {
  66140. assert("ExportDefaultDeclaration", node, opts);
  66141. }
  66142. function assertExportNamedDeclaration(node, opts) {
  66143. assert("ExportNamedDeclaration", node, opts);
  66144. }
  66145. function assertExportSpecifier(node, opts) {
  66146. assert("ExportSpecifier", node, opts);
  66147. }
  66148. function assertForOfStatement(node, opts) {
  66149. assert("ForOfStatement", node, opts);
  66150. }
  66151. function assertImportDeclaration(node, opts) {
  66152. assert("ImportDeclaration", node, opts);
  66153. }
  66154. function assertImportDefaultSpecifier(node, opts) {
  66155. assert("ImportDefaultSpecifier", node, opts);
  66156. }
  66157. function assertImportNamespaceSpecifier(node, opts) {
  66158. assert("ImportNamespaceSpecifier", node, opts);
  66159. }
  66160. function assertImportSpecifier(node, opts) {
  66161. assert("ImportSpecifier", node, opts);
  66162. }
  66163. function assertMetaProperty(node, opts) {
  66164. assert("MetaProperty", node, opts);
  66165. }
  66166. function assertClassMethod(node, opts) {
  66167. assert("ClassMethod", node, opts);
  66168. }
  66169. function assertObjectPattern(node, opts) {
  66170. assert("ObjectPattern", node, opts);
  66171. }
  66172. function assertSpreadElement(node, opts) {
  66173. assert("SpreadElement", node, opts);
  66174. }
  66175. function assertSuper(node, opts) {
  66176. assert("Super", node, opts);
  66177. }
  66178. function assertTaggedTemplateExpression(node, opts) {
  66179. assert("TaggedTemplateExpression", node, opts);
  66180. }
  66181. function assertTemplateElement(node, opts) {
  66182. assert("TemplateElement", node, opts);
  66183. }
  66184. function assertTemplateLiteral(node, opts) {
  66185. assert("TemplateLiteral", node, opts);
  66186. }
  66187. function assertYieldExpression(node, opts) {
  66188. assert("YieldExpression", node, opts);
  66189. }
  66190. function assertAwaitExpression(node, opts) {
  66191. assert("AwaitExpression", node, opts);
  66192. }
  66193. function assertImport(node, opts) {
  66194. assert("Import", node, opts);
  66195. }
  66196. function assertBigIntLiteral(node, opts) {
  66197. assert("BigIntLiteral", node, opts);
  66198. }
  66199. function assertExportNamespaceSpecifier(node, opts) {
  66200. assert("ExportNamespaceSpecifier", node, opts);
  66201. }
  66202. function assertOptionalMemberExpression(node, opts) {
  66203. assert("OptionalMemberExpression", node, opts);
  66204. }
  66205. function assertOptionalCallExpression(node, opts) {
  66206. assert("OptionalCallExpression", node, opts);
  66207. }
  66208. function assertAnyTypeAnnotation(node, opts) {
  66209. assert("AnyTypeAnnotation", node, opts);
  66210. }
  66211. function assertArrayTypeAnnotation(node, opts) {
  66212. assert("ArrayTypeAnnotation", node, opts);
  66213. }
  66214. function assertBooleanTypeAnnotation(node, opts) {
  66215. assert("BooleanTypeAnnotation", node, opts);
  66216. }
  66217. function assertBooleanLiteralTypeAnnotation(node, opts) {
  66218. assert("BooleanLiteralTypeAnnotation", node, opts);
  66219. }
  66220. function assertNullLiteralTypeAnnotation(node, opts) {
  66221. assert("NullLiteralTypeAnnotation", node, opts);
  66222. }
  66223. function assertClassImplements(node, opts) {
  66224. assert("ClassImplements", node, opts);
  66225. }
  66226. function assertDeclareClass(node, opts) {
  66227. assert("DeclareClass", node, opts);
  66228. }
  66229. function assertDeclareFunction(node, opts) {
  66230. assert("DeclareFunction", node, opts);
  66231. }
  66232. function assertDeclareInterface(node, opts) {
  66233. assert("DeclareInterface", node, opts);
  66234. }
  66235. function assertDeclareModule(node, opts) {
  66236. assert("DeclareModule", node, opts);
  66237. }
  66238. function assertDeclareModuleExports(node, opts) {
  66239. assert("DeclareModuleExports", node, opts);
  66240. }
  66241. function assertDeclareTypeAlias(node, opts) {
  66242. assert("DeclareTypeAlias", node, opts);
  66243. }
  66244. function assertDeclareOpaqueType(node, opts) {
  66245. assert("DeclareOpaqueType", node, opts);
  66246. }
  66247. function assertDeclareVariable(node, opts) {
  66248. assert("DeclareVariable", node, opts);
  66249. }
  66250. function assertDeclareExportDeclaration(node, opts) {
  66251. assert("DeclareExportDeclaration", node, opts);
  66252. }
  66253. function assertDeclareExportAllDeclaration(node, opts) {
  66254. assert("DeclareExportAllDeclaration", node, opts);
  66255. }
  66256. function assertDeclaredPredicate(node, opts) {
  66257. assert("DeclaredPredicate", node, opts);
  66258. }
  66259. function assertExistsTypeAnnotation(node, opts) {
  66260. assert("ExistsTypeAnnotation", node, opts);
  66261. }
  66262. function assertFunctionTypeAnnotation(node, opts) {
  66263. assert("FunctionTypeAnnotation", node, opts);
  66264. }
  66265. function assertFunctionTypeParam(node, opts) {
  66266. assert("FunctionTypeParam", node, opts);
  66267. }
  66268. function assertGenericTypeAnnotation(node, opts) {
  66269. assert("GenericTypeAnnotation", node, opts);
  66270. }
  66271. function assertInferredPredicate(node, opts) {
  66272. assert("InferredPredicate", node, opts);
  66273. }
  66274. function assertInterfaceExtends(node, opts) {
  66275. assert("InterfaceExtends", node, opts);
  66276. }
  66277. function assertInterfaceDeclaration(node, opts) {
  66278. assert("InterfaceDeclaration", node, opts);
  66279. }
  66280. function assertInterfaceTypeAnnotation(node, opts) {
  66281. assert("InterfaceTypeAnnotation", node, opts);
  66282. }
  66283. function assertIntersectionTypeAnnotation(node, opts) {
  66284. assert("IntersectionTypeAnnotation", node, opts);
  66285. }
  66286. function assertMixedTypeAnnotation(node, opts) {
  66287. assert("MixedTypeAnnotation", node, opts);
  66288. }
  66289. function assertEmptyTypeAnnotation(node, opts) {
  66290. assert("EmptyTypeAnnotation", node, opts);
  66291. }
  66292. function assertNullableTypeAnnotation(node, opts) {
  66293. assert("NullableTypeAnnotation", node, opts);
  66294. }
  66295. function assertNumberLiteralTypeAnnotation(node, opts) {
  66296. assert("NumberLiteralTypeAnnotation", node, opts);
  66297. }
  66298. function assertNumberTypeAnnotation(node, opts) {
  66299. assert("NumberTypeAnnotation", node, opts);
  66300. }
  66301. function assertObjectTypeAnnotation(node, opts) {
  66302. assert("ObjectTypeAnnotation", node, opts);
  66303. }
  66304. function assertObjectTypeInternalSlot(node, opts) {
  66305. assert("ObjectTypeInternalSlot", node, opts);
  66306. }
  66307. function assertObjectTypeCallProperty(node, opts) {
  66308. assert("ObjectTypeCallProperty", node, opts);
  66309. }
  66310. function assertObjectTypeIndexer(node, opts) {
  66311. assert("ObjectTypeIndexer", node, opts);
  66312. }
  66313. function assertObjectTypeProperty(node, opts) {
  66314. assert("ObjectTypeProperty", node, opts);
  66315. }
  66316. function assertObjectTypeSpreadProperty(node, opts) {
  66317. assert("ObjectTypeSpreadProperty", node, opts);
  66318. }
  66319. function assertOpaqueType(node, opts) {
  66320. assert("OpaqueType", node, opts);
  66321. }
  66322. function assertQualifiedTypeIdentifier(node, opts) {
  66323. assert("QualifiedTypeIdentifier", node, opts);
  66324. }
  66325. function assertStringLiteralTypeAnnotation(node, opts) {
  66326. assert("StringLiteralTypeAnnotation", node, opts);
  66327. }
  66328. function assertStringTypeAnnotation(node, opts) {
  66329. assert("StringTypeAnnotation", node, opts);
  66330. }
  66331. function assertSymbolTypeAnnotation(node, opts) {
  66332. assert("SymbolTypeAnnotation", node, opts);
  66333. }
  66334. function assertThisTypeAnnotation(node, opts) {
  66335. assert("ThisTypeAnnotation", node, opts);
  66336. }
  66337. function assertTupleTypeAnnotation(node, opts) {
  66338. assert("TupleTypeAnnotation", node, opts);
  66339. }
  66340. function assertTypeofTypeAnnotation(node, opts) {
  66341. assert("TypeofTypeAnnotation", node, opts);
  66342. }
  66343. function assertTypeAlias(node, opts) {
  66344. assert("TypeAlias", node, opts);
  66345. }
  66346. function assertTypeAnnotation(node, opts) {
  66347. assert("TypeAnnotation", node, opts);
  66348. }
  66349. function assertTypeCastExpression(node, opts) {
  66350. assert("TypeCastExpression", node, opts);
  66351. }
  66352. function assertTypeParameter(node, opts) {
  66353. assert("TypeParameter", node, opts);
  66354. }
  66355. function assertTypeParameterDeclaration(node, opts) {
  66356. assert("TypeParameterDeclaration", node, opts);
  66357. }
  66358. function assertTypeParameterInstantiation(node, opts) {
  66359. assert("TypeParameterInstantiation", node, opts);
  66360. }
  66361. function assertUnionTypeAnnotation(node, opts) {
  66362. assert("UnionTypeAnnotation", node, opts);
  66363. }
  66364. function assertVariance(node, opts) {
  66365. assert("Variance", node, opts);
  66366. }
  66367. function assertVoidTypeAnnotation(node, opts) {
  66368. assert("VoidTypeAnnotation", node, opts);
  66369. }
  66370. function assertEnumDeclaration(node, opts) {
  66371. assert("EnumDeclaration", node, opts);
  66372. }
  66373. function assertEnumBooleanBody(node, opts) {
  66374. assert("EnumBooleanBody", node, opts);
  66375. }
  66376. function assertEnumNumberBody(node, opts) {
  66377. assert("EnumNumberBody", node, opts);
  66378. }
  66379. function assertEnumStringBody(node, opts) {
  66380. assert("EnumStringBody", node, opts);
  66381. }
  66382. function assertEnumSymbolBody(node, opts) {
  66383. assert("EnumSymbolBody", node, opts);
  66384. }
  66385. function assertEnumBooleanMember(node, opts) {
  66386. assert("EnumBooleanMember", node, opts);
  66387. }
  66388. function assertEnumNumberMember(node, opts) {
  66389. assert("EnumNumberMember", node, opts);
  66390. }
  66391. function assertEnumStringMember(node, opts) {
  66392. assert("EnumStringMember", node, opts);
  66393. }
  66394. function assertEnumDefaultedMember(node, opts) {
  66395. assert("EnumDefaultedMember", node, opts);
  66396. }
  66397. function assertIndexedAccessType(node, opts) {
  66398. assert("IndexedAccessType", node, opts);
  66399. }
  66400. function assertOptionalIndexedAccessType(node, opts) {
  66401. assert("OptionalIndexedAccessType", node, opts);
  66402. }
  66403. function assertJSXAttribute(node, opts) {
  66404. assert("JSXAttribute", node, opts);
  66405. }
  66406. function assertJSXClosingElement(node, opts) {
  66407. assert("JSXClosingElement", node, opts);
  66408. }
  66409. function assertJSXElement(node, opts) {
  66410. assert("JSXElement", node, opts);
  66411. }
  66412. function assertJSXEmptyExpression(node, opts) {
  66413. assert("JSXEmptyExpression", node, opts);
  66414. }
  66415. function assertJSXExpressionContainer(node, opts) {
  66416. assert("JSXExpressionContainer", node, opts);
  66417. }
  66418. function assertJSXSpreadChild(node, opts) {
  66419. assert("JSXSpreadChild", node, opts);
  66420. }
  66421. function assertJSXIdentifier(node, opts) {
  66422. assert("JSXIdentifier", node, opts);
  66423. }
  66424. function assertJSXMemberExpression(node, opts) {
  66425. assert("JSXMemberExpression", node, opts);
  66426. }
  66427. function assertJSXNamespacedName(node, opts) {
  66428. assert("JSXNamespacedName", node, opts);
  66429. }
  66430. function assertJSXOpeningElement(node, opts) {
  66431. assert("JSXOpeningElement", node, opts);
  66432. }
  66433. function assertJSXSpreadAttribute(node, opts) {
  66434. assert("JSXSpreadAttribute", node, opts);
  66435. }
  66436. function assertJSXText(node, opts) {
  66437. assert("JSXText", node, opts);
  66438. }
  66439. function assertJSXFragment(node, opts) {
  66440. assert("JSXFragment", node, opts);
  66441. }
  66442. function assertJSXOpeningFragment(node, opts) {
  66443. assert("JSXOpeningFragment", node, opts);
  66444. }
  66445. function assertJSXClosingFragment(node, opts) {
  66446. assert("JSXClosingFragment", node, opts);
  66447. }
  66448. function assertNoop(node, opts) {
  66449. assert("Noop", node, opts);
  66450. }
  66451. function assertPlaceholder(node, opts) {
  66452. assert("Placeholder", node, opts);
  66453. }
  66454. function assertV8IntrinsicIdentifier(node, opts) {
  66455. assert("V8IntrinsicIdentifier", node, opts);
  66456. }
  66457. function assertArgumentPlaceholder(node, opts) {
  66458. assert("ArgumentPlaceholder", node, opts);
  66459. }
  66460. function assertBindExpression(node, opts) {
  66461. assert("BindExpression", node, opts);
  66462. }
  66463. function assertClassProperty(node, opts) {
  66464. assert("ClassProperty", node, opts);
  66465. }
  66466. function assertPipelineTopicExpression(node, opts) {
  66467. assert("PipelineTopicExpression", node, opts);
  66468. }
  66469. function assertPipelineBareFunction(node, opts) {
  66470. assert("PipelineBareFunction", node, opts);
  66471. }
  66472. function assertPipelinePrimaryTopicReference(node, opts) {
  66473. assert("PipelinePrimaryTopicReference", node, opts);
  66474. }
  66475. function assertClassPrivateProperty(node, opts) {
  66476. assert("ClassPrivateProperty", node, opts);
  66477. }
  66478. function assertClassPrivateMethod(node, opts) {
  66479. assert("ClassPrivateMethod", node, opts);
  66480. }
  66481. function assertImportAttribute(node, opts) {
  66482. assert("ImportAttribute", node, opts);
  66483. }
  66484. function assertDecorator(node, opts) {
  66485. assert("Decorator", node, opts);
  66486. }
  66487. function assertDoExpression(node, opts) {
  66488. assert("DoExpression", node, opts);
  66489. }
  66490. function assertExportDefaultSpecifier(node, opts) {
  66491. assert("ExportDefaultSpecifier", node, opts);
  66492. }
  66493. function assertPrivateName(node, opts) {
  66494. assert("PrivateName", node, opts);
  66495. }
  66496. function assertRecordExpression(node, opts) {
  66497. assert("RecordExpression", node, opts);
  66498. }
  66499. function assertTupleExpression(node, opts) {
  66500. assert("TupleExpression", node, opts);
  66501. }
  66502. function assertDecimalLiteral(node, opts) {
  66503. assert("DecimalLiteral", node, opts);
  66504. }
  66505. function assertStaticBlock(node, opts) {
  66506. assert("StaticBlock", node, opts);
  66507. }
  66508. function assertModuleExpression(node, opts) {
  66509. assert("ModuleExpression", node, opts);
  66510. }
  66511. function assertTSParameterProperty(node, opts) {
  66512. assert("TSParameterProperty", node, opts);
  66513. }
  66514. function assertTSDeclareFunction(node, opts) {
  66515. assert("TSDeclareFunction", node, opts);
  66516. }
  66517. function assertTSDeclareMethod(node, opts) {
  66518. assert("TSDeclareMethod", node, opts);
  66519. }
  66520. function assertTSQualifiedName(node, opts) {
  66521. assert("TSQualifiedName", node, opts);
  66522. }
  66523. function assertTSCallSignatureDeclaration(node, opts) {
  66524. assert("TSCallSignatureDeclaration", node, opts);
  66525. }
  66526. function assertTSConstructSignatureDeclaration(node, opts) {
  66527. assert("TSConstructSignatureDeclaration", node, opts);
  66528. }
  66529. function assertTSPropertySignature(node, opts) {
  66530. assert("TSPropertySignature", node, opts);
  66531. }
  66532. function assertTSMethodSignature(node, opts) {
  66533. assert("TSMethodSignature", node, opts);
  66534. }
  66535. function assertTSIndexSignature(node, opts) {
  66536. assert("TSIndexSignature", node, opts);
  66537. }
  66538. function assertTSAnyKeyword(node, opts) {
  66539. assert("TSAnyKeyword", node, opts);
  66540. }
  66541. function assertTSBooleanKeyword(node, opts) {
  66542. assert("TSBooleanKeyword", node, opts);
  66543. }
  66544. function assertTSBigIntKeyword(node, opts) {
  66545. assert("TSBigIntKeyword", node, opts);
  66546. }
  66547. function assertTSIntrinsicKeyword(node, opts) {
  66548. assert("TSIntrinsicKeyword", node, opts);
  66549. }
  66550. function assertTSNeverKeyword(node, opts) {
  66551. assert("TSNeverKeyword", node, opts);
  66552. }
  66553. function assertTSNullKeyword(node, opts) {
  66554. assert("TSNullKeyword", node, opts);
  66555. }
  66556. function assertTSNumberKeyword(node, opts) {
  66557. assert("TSNumberKeyword", node, opts);
  66558. }
  66559. function assertTSObjectKeyword(node, opts) {
  66560. assert("TSObjectKeyword", node, opts);
  66561. }
  66562. function assertTSStringKeyword(node, opts) {
  66563. assert("TSStringKeyword", node, opts);
  66564. }
  66565. function assertTSSymbolKeyword(node, opts) {
  66566. assert("TSSymbolKeyword", node, opts);
  66567. }
  66568. function assertTSUndefinedKeyword(node, opts) {
  66569. assert("TSUndefinedKeyword", node, opts);
  66570. }
  66571. function assertTSUnknownKeyword(node, opts) {
  66572. assert("TSUnknownKeyword", node, opts);
  66573. }
  66574. function assertTSVoidKeyword(node, opts) {
  66575. assert("TSVoidKeyword", node, opts);
  66576. }
  66577. function assertTSThisType(node, opts) {
  66578. assert("TSThisType", node, opts);
  66579. }
  66580. function assertTSFunctionType(node, opts) {
  66581. assert("TSFunctionType", node, opts);
  66582. }
  66583. function assertTSConstructorType(node, opts) {
  66584. assert("TSConstructorType", node, opts);
  66585. }
  66586. function assertTSTypeReference(node, opts) {
  66587. assert("TSTypeReference", node, opts);
  66588. }
  66589. function assertTSTypePredicate(node, opts) {
  66590. assert("TSTypePredicate", node, opts);
  66591. }
  66592. function assertTSTypeQuery(node, opts) {
  66593. assert("TSTypeQuery", node, opts);
  66594. }
  66595. function assertTSTypeLiteral(node, opts) {
  66596. assert("TSTypeLiteral", node, opts);
  66597. }
  66598. function assertTSArrayType(node, opts) {
  66599. assert("TSArrayType", node, opts);
  66600. }
  66601. function assertTSTupleType(node, opts) {
  66602. assert("TSTupleType", node, opts);
  66603. }
  66604. function assertTSOptionalType(node, opts) {
  66605. assert("TSOptionalType", node, opts);
  66606. }
  66607. function assertTSRestType(node, opts) {
  66608. assert("TSRestType", node, opts);
  66609. }
  66610. function assertTSNamedTupleMember(node, opts) {
  66611. assert("TSNamedTupleMember", node, opts);
  66612. }
  66613. function assertTSUnionType(node, opts) {
  66614. assert("TSUnionType", node, opts);
  66615. }
  66616. function assertTSIntersectionType(node, opts) {
  66617. assert("TSIntersectionType", node, opts);
  66618. }
  66619. function assertTSConditionalType(node, opts) {
  66620. assert("TSConditionalType", node, opts);
  66621. }
  66622. function assertTSInferType(node, opts) {
  66623. assert("TSInferType", node, opts);
  66624. }
  66625. function assertTSParenthesizedType(node, opts) {
  66626. assert("TSParenthesizedType", node, opts);
  66627. }
  66628. function assertTSTypeOperator(node, opts) {
  66629. assert("TSTypeOperator", node, opts);
  66630. }
  66631. function assertTSIndexedAccessType(node, opts) {
  66632. assert("TSIndexedAccessType", node, opts);
  66633. }
  66634. function assertTSMappedType(node, opts) {
  66635. assert("TSMappedType", node, opts);
  66636. }
  66637. function assertTSLiteralType(node, opts) {
  66638. assert("TSLiteralType", node, opts);
  66639. }
  66640. function assertTSExpressionWithTypeArguments(node, opts) {
  66641. assert("TSExpressionWithTypeArguments", node, opts);
  66642. }
  66643. function assertTSInterfaceDeclaration(node, opts) {
  66644. assert("TSInterfaceDeclaration", node, opts);
  66645. }
  66646. function assertTSInterfaceBody(node, opts) {
  66647. assert("TSInterfaceBody", node, opts);
  66648. }
  66649. function assertTSTypeAliasDeclaration(node, opts) {
  66650. assert("TSTypeAliasDeclaration", node, opts);
  66651. }
  66652. function assertTSAsExpression(node, opts) {
  66653. assert("TSAsExpression", node, opts);
  66654. }
  66655. function assertTSTypeAssertion(node, opts) {
  66656. assert("TSTypeAssertion", node, opts);
  66657. }
  66658. function assertTSEnumDeclaration(node, opts) {
  66659. assert("TSEnumDeclaration", node, opts);
  66660. }
  66661. function assertTSEnumMember(node, opts) {
  66662. assert("TSEnumMember", node, opts);
  66663. }
  66664. function assertTSModuleDeclaration(node, opts) {
  66665. assert("TSModuleDeclaration", node, opts);
  66666. }
  66667. function assertTSModuleBlock(node, opts) {
  66668. assert("TSModuleBlock", node, opts);
  66669. }
  66670. function assertTSImportType(node, opts) {
  66671. assert("TSImportType", node, opts);
  66672. }
  66673. function assertTSImportEqualsDeclaration(node, opts) {
  66674. assert("TSImportEqualsDeclaration", node, opts);
  66675. }
  66676. function assertTSExternalModuleReference(node, opts) {
  66677. assert("TSExternalModuleReference", node, opts);
  66678. }
  66679. function assertTSNonNullExpression(node, opts) {
  66680. assert("TSNonNullExpression", node, opts);
  66681. }
  66682. function assertTSExportAssignment(node, opts) {
  66683. assert("TSExportAssignment", node, opts);
  66684. }
  66685. function assertTSNamespaceExportDeclaration(node, opts) {
  66686. assert("TSNamespaceExportDeclaration", node, opts);
  66687. }
  66688. function assertTSTypeAnnotation(node, opts) {
  66689. assert("TSTypeAnnotation", node, opts);
  66690. }
  66691. function assertTSTypeParameterInstantiation(node, opts) {
  66692. assert("TSTypeParameterInstantiation", node, opts);
  66693. }
  66694. function assertTSTypeParameterDeclaration(node, opts) {
  66695. assert("TSTypeParameterDeclaration", node, opts);
  66696. }
  66697. function assertTSTypeParameter(node, opts) {
  66698. assert("TSTypeParameter", node, opts);
  66699. }
  66700. function assertExpression(node, opts) {
  66701. assert("Expression", node, opts);
  66702. }
  66703. function assertBinary(node, opts) {
  66704. assert("Binary", node, opts);
  66705. }
  66706. function assertScopable(node, opts) {
  66707. assert("Scopable", node, opts);
  66708. }
  66709. function assertBlockParent(node, opts) {
  66710. assert("BlockParent", node, opts);
  66711. }
  66712. function assertBlock(node, opts) {
  66713. assert("Block", node, opts);
  66714. }
  66715. function assertStatement(node, opts) {
  66716. assert("Statement", node, opts);
  66717. }
  66718. function assertTerminatorless(node, opts) {
  66719. assert("Terminatorless", node, opts);
  66720. }
  66721. function assertCompletionStatement(node, opts) {
  66722. assert("CompletionStatement", node, opts);
  66723. }
  66724. function assertConditional(node, opts) {
  66725. assert("Conditional", node, opts);
  66726. }
  66727. function assertLoop(node, opts) {
  66728. assert("Loop", node, opts);
  66729. }
  66730. function assertWhile(node, opts) {
  66731. assert("While", node, opts);
  66732. }
  66733. function assertExpressionWrapper(node, opts) {
  66734. assert("ExpressionWrapper", node, opts);
  66735. }
  66736. function assertFor(node, opts) {
  66737. assert("For", node, opts);
  66738. }
  66739. function assertForXStatement(node, opts) {
  66740. assert("ForXStatement", node, opts);
  66741. }
  66742. function assertFunction(node, opts) {
  66743. assert("Function", node, opts);
  66744. }
  66745. function assertFunctionParent(node, opts) {
  66746. assert("FunctionParent", node, opts);
  66747. }
  66748. function assertPureish(node, opts) {
  66749. assert("Pureish", node, opts);
  66750. }
  66751. function assertDeclaration(node, opts) {
  66752. assert("Declaration", node, opts);
  66753. }
  66754. function assertPatternLike(node, opts) {
  66755. assert("PatternLike", node, opts);
  66756. }
  66757. function assertLVal(node, opts) {
  66758. assert("LVal", node, opts);
  66759. }
  66760. function assertTSEntityName(node, opts) {
  66761. assert("TSEntityName", node, opts);
  66762. }
  66763. function assertLiteral(node, opts) {
  66764. assert("Literal", node, opts);
  66765. }
  66766. function assertImmutable(node, opts) {
  66767. assert("Immutable", node, opts);
  66768. }
  66769. function assertUserWhitespacable(node, opts) {
  66770. assert("UserWhitespacable", node, opts);
  66771. }
  66772. function assertMethod(node, opts) {
  66773. assert("Method", node, opts);
  66774. }
  66775. function assertObjectMember(node, opts) {
  66776. assert("ObjectMember", node, opts);
  66777. }
  66778. function assertProperty(node, opts) {
  66779. assert("Property", node, opts);
  66780. }
  66781. function assertUnaryLike(node, opts) {
  66782. assert("UnaryLike", node, opts);
  66783. }
  66784. function assertPattern(node, opts) {
  66785. assert("Pattern", node, opts);
  66786. }
  66787. function assertClass(node, opts) {
  66788. assert("Class", node, opts);
  66789. }
  66790. function assertModuleDeclaration(node, opts) {
  66791. assert("ModuleDeclaration", node, opts);
  66792. }
  66793. function assertExportDeclaration(node, opts) {
  66794. assert("ExportDeclaration", node, opts);
  66795. }
  66796. function assertModuleSpecifier(node, opts) {
  66797. assert("ModuleSpecifier", node, opts);
  66798. }
  66799. function assertFlow(node, opts) {
  66800. assert("Flow", node, opts);
  66801. }
  66802. function assertFlowType(node, opts) {
  66803. assert("FlowType", node, opts);
  66804. }
  66805. function assertFlowBaseAnnotation(node, opts) {
  66806. assert("FlowBaseAnnotation", node, opts);
  66807. }
  66808. function assertFlowDeclaration(node, opts) {
  66809. assert("FlowDeclaration", node, opts);
  66810. }
  66811. function assertFlowPredicate(node, opts) {
  66812. assert("FlowPredicate", node, opts);
  66813. }
  66814. function assertEnumBody(node, opts) {
  66815. assert("EnumBody", node, opts);
  66816. }
  66817. function assertEnumMember(node, opts) {
  66818. assert("EnumMember", node, opts);
  66819. }
  66820. function assertJSX(node, opts) {
  66821. assert("JSX", node, opts);
  66822. }
  66823. function assertPrivate(node, opts) {
  66824. assert("Private", node, opts);
  66825. }
  66826. function assertTSTypeElement(node, opts) {
  66827. assert("TSTypeElement", node, opts);
  66828. }
  66829. function assertTSType(node, opts) {
  66830. assert("TSType", node, opts);
  66831. }
  66832. function assertTSBaseType(node, opts) {
  66833. assert("TSBaseType", node, opts);
  66834. }
  66835. function assertNumberLiteral(node, opts) {
  66836. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  66837. assert("NumberLiteral", node, opts);
  66838. }
  66839. function assertRegexLiteral(node, opts) {
  66840. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  66841. assert("RegexLiteral", node, opts);
  66842. }
  66843. function assertRestProperty(node, opts) {
  66844. console.trace("The node type RestProperty has been renamed to RestElement");
  66845. assert("RestProperty", node, opts);
  66846. }
  66847. function assertSpreadProperty(node, opts) {
  66848. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  66849. assert("SpreadProperty", node, opts);
  66850. }
  66851. }
  66852. });
  66853. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  66854. var require_createTypeAnnotationBasedOnTypeof3 = __commonJS({
  66855. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  66856. "use strict";
  66857. Object.defineProperty(exports, "__esModule", {
  66858. value: true
  66859. });
  66860. exports.default = createTypeAnnotationBasedOnTypeof;
  66861. var _generated = require_generated12();
  66862. function createTypeAnnotationBasedOnTypeof(type) {
  66863. if (type === "string") {
  66864. return (0, _generated.stringTypeAnnotation)();
  66865. } else if (type === "number") {
  66866. return (0, _generated.numberTypeAnnotation)();
  66867. } else if (type === "undefined") {
  66868. return (0, _generated.voidTypeAnnotation)();
  66869. } else if (type === "boolean") {
  66870. return (0, _generated.booleanTypeAnnotation)();
  66871. } else if (type === "function") {
  66872. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  66873. } else if (type === "object") {
  66874. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  66875. } else if (type === "symbol") {
  66876. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  66877. } else if (type === "bigint") {
  66878. return (0, _generated.anyTypeAnnotation)();
  66879. } else {
  66880. throw new Error("Invalid typeof value: " + type);
  66881. }
  66882. }
  66883. }
  66884. });
  66885. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  66886. var require_removeTypeDuplicates5 = __commonJS({
  66887. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  66888. "use strict";
  66889. Object.defineProperty(exports, "__esModule", {
  66890. value: true
  66891. });
  66892. exports.default = removeTypeDuplicates;
  66893. var _generated = require_generated11();
  66894. function getQualifiedName(node) {
  66895. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  66896. }
  66897. function removeTypeDuplicates(nodes) {
  66898. const generics = {};
  66899. const bases = {};
  66900. const typeGroups = [];
  66901. const types2 = [];
  66902. for (let i = 0; i < nodes.length; i++) {
  66903. const node = nodes[i];
  66904. if (!node)
  66905. continue;
  66906. if (types2.indexOf(node) >= 0) {
  66907. continue;
  66908. }
  66909. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  66910. return [node];
  66911. }
  66912. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  66913. bases[node.type] = node;
  66914. continue;
  66915. }
  66916. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  66917. if (typeGroups.indexOf(node.types) < 0) {
  66918. nodes = nodes.concat(node.types);
  66919. typeGroups.push(node.types);
  66920. }
  66921. continue;
  66922. }
  66923. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  66924. const name2 = getQualifiedName(node.id);
  66925. if (generics[name2]) {
  66926. let existing = generics[name2];
  66927. if (existing.typeParameters) {
  66928. if (node.typeParameters) {
  66929. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  66930. }
  66931. } else {
  66932. existing = node.typeParameters;
  66933. }
  66934. } else {
  66935. generics[name2] = node;
  66936. }
  66937. continue;
  66938. }
  66939. types2.push(node);
  66940. }
  66941. for (const type of Object.keys(bases)) {
  66942. types2.push(bases[type]);
  66943. }
  66944. for (const name2 of Object.keys(generics)) {
  66945. types2.push(generics[name2]);
  66946. }
  66947. return types2;
  66948. }
  66949. }
  66950. });
  66951. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  66952. var require_createFlowUnionType3 = __commonJS({
  66953. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  66954. "use strict";
  66955. Object.defineProperty(exports, "__esModule", {
  66956. value: true
  66957. });
  66958. exports.default = createFlowUnionType;
  66959. var _generated = require_generated12();
  66960. var _removeTypeDuplicates = require_removeTypeDuplicates5();
  66961. function createFlowUnionType(types2) {
  66962. const flattened = (0, _removeTypeDuplicates.default)(types2);
  66963. if (flattened.length === 1) {
  66964. return flattened[0];
  66965. } else {
  66966. return (0, _generated.unionTypeAnnotation)(flattened);
  66967. }
  66968. }
  66969. }
  66970. });
  66971. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  66972. var require_removeTypeDuplicates6 = __commonJS({
  66973. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  66974. "use strict";
  66975. Object.defineProperty(exports, "__esModule", {
  66976. value: true
  66977. });
  66978. exports.default = removeTypeDuplicates;
  66979. var _generated = require_generated11();
  66980. function removeTypeDuplicates(nodes) {
  66981. const generics = {};
  66982. const bases = {};
  66983. const typeGroups = [];
  66984. const types2 = [];
  66985. for (let i = 0; i < nodes.length; i++) {
  66986. const node = nodes[i];
  66987. if (!node)
  66988. continue;
  66989. if (types2.indexOf(node) >= 0) {
  66990. continue;
  66991. }
  66992. if ((0, _generated.isTSAnyKeyword)(node)) {
  66993. return [node];
  66994. }
  66995. if ((0, _generated.isTSBaseType)(node)) {
  66996. bases[node.type] = node;
  66997. continue;
  66998. }
  66999. if ((0, _generated.isTSUnionType)(node)) {
  67000. if (typeGroups.indexOf(node.types) < 0) {
  67001. nodes = nodes.concat(node.types);
  67002. typeGroups.push(node.types);
  67003. }
  67004. continue;
  67005. }
  67006. types2.push(node);
  67007. }
  67008. for (const type of Object.keys(bases)) {
  67009. types2.push(bases[type]);
  67010. }
  67011. for (const name2 of Object.keys(generics)) {
  67012. types2.push(generics[name2]);
  67013. }
  67014. return types2;
  67015. }
  67016. }
  67017. });
  67018. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  67019. var require_createTSUnionType3 = __commonJS({
  67020. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  67021. "use strict";
  67022. Object.defineProperty(exports, "__esModule", {
  67023. value: true
  67024. });
  67025. exports.default = createTSUnionType;
  67026. var _generated = require_generated12();
  67027. var _removeTypeDuplicates = require_removeTypeDuplicates6();
  67028. function createTSUnionType(typeAnnotations) {
  67029. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  67030. const flattened = (0, _removeTypeDuplicates.default)(types2);
  67031. if (flattened.length === 1) {
  67032. return flattened[0];
  67033. } else {
  67034. return (0, _generated.tsUnionType)(flattened);
  67035. }
  67036. }
  67037. }
  67038. });
  67039. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/uppercase.js
  67040. var require_uppercase3 = __commonJS({
  67041. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  67042. "use strict";
  67043. Object.defineProperty(exports, "__esModule", {
  67044. value: true
  67045. });
  67046. Object.defineProperty(exports, "ArrayExpression", {
  67047. enumerable: true,
  67048. get: function() {
  67049. return _index.arrayExpression;
  67050. }
  67051. });
  67052. Object.defineProperty(exports, "AssignmentExpression", {
  67053. enumerable: true,
  67054. get: function() {
  67055. return _index.assignmentExpression;
  67056. }
  67057. });
  67058. Object.defineProperty(exports, "BinaryExpression", {
  67059. enumerable: true,
  67060. get: function() {
  67061. return _index.binaryExpression;
  67062. }
  67063. });
  67064. Object.defineProperty(exports, "InterpreterDirective", {
  67065. enumerable: true,
  67066. get: function() {
  67067. return _index.interpreterDirective;
  67068. }
  67069. });
  67070. Object.defineProperty(exports, "Directive", {
  67071. enumerable: true,
  67072. get: function() {
  67073. return _index.directive;
  67074. }
  67075. });
  67076. Object.defineProperty(exports, "DirectiveLiteral", {
  67077. enumerable: true,
  67078. get: function() {
  67079. return _index.directiveLiteral;
  67080. }
  67081. });
  67082. Object.defineProperty(exports, "BlockStatement", {
  67083. enumerable: true,
  67084. get: function() {
  67085. return _index.blockStatement;
  67086. }
  67087. });
  67088. Object.defineProperty(exports, "BreakStatement", {
  67089. enumerable: true,
  67090. get: function() {
  67091. return _index.breakStatement;
  67092. }
  67093. });
  67094. Object.defineProperty(exports, "CallExpression", {
  67095. enumerable: true,
  67096. get: function() {
  67097. return _index.callExpression;
  67098. }
  67099. });
  67100. Object.defineProperty(exports, "CatchClause", {
  67101. enumerable: true,
  67102. get: function() {
  67103. return _index.catchClause;
  67104. }
  67105. });
  67106. Object.defineProperty(exports, "ConditionalExpression", {
  67107. enumerable: true,
  67108. get: function() {
  67109. return _index.conditionalExpression;
  67110. }
  67111. });
  67112. Object.defineProperty(exports, "ContinueStatement", {
  67113. enumerable: true,
  67114. get: function() {
  67115. return _index.continueStatement;
  67116. }
  67117. });
  67118. Object.defineProperty(exports, "DebuggerStatement", {
  67119. enumerable: true,
  67120. get: function() {
  67121. return _index.debuggerStatement;
  67122. }
  67123. });
  67124. Object.defineProperty(exports, "DoWhileStatement", {
  67125. enumerable: true,
  67126. get: function() {
  67127. return _index.doWhileStatement;
  67128. }
  67129. });
  67130. Object.defineProperty(exports, "EmptyStatement", {
  67131. enumerable: true,
  67132. get: function() {
  67133. return _index.emptyStatement;
  67134. }
  67135. });
  67136. Object.defineProperty(exports, "ExpressionStatement", {
  67137. enumerable: true,
  67138. get: function() {
  67139. return _index.expressionStatement;
  67140. }
  67141. });
  67142. Object.defineProperty(exports, "File", {
  67143. enumerable: true,
  67144. get: function() {
  67145. return _index.file;
  67146. }
  67147. });
  67148. Object.defineProperty(exports, "ForInStatement", {
  67149. enumerable: true,
  67150. get: function() {
  67151. return _index.forInStatement;
  67152. }
  67153. });
  67154. Object.defineProperty(exports, "ForStatement", {
  67155. enumerable: true,
  67156. get: function() {
  67157. return _index.forStatement;
  67158. }
  67159. });
  67160. Object.defineProperty(exports, "FunctionDeclaration", {
  67161. enumerable: true,
  67162. get: function() {
  67163. return _index.functionDeclaration;
  67164. }
  67165. });
  67166. Object.defineProperty(exports, "FunctionExpression", {
  67167. enumerable: true,
  67168. get: function() {
  67169. return _index.functionExpression;
  67170. }
  67171. });
  67172. Object.defineProperty(exports, "Identifier", {
  67173. enumerable: true,
  67174. get: function() {
  67175. return _index.identifier;
  67176. }
  67177. });
  67178. Object.defineProperty(exports, "IfStatement", {
  67179. enumerable: true,
  67180. get: function() {
  67181. return _index.ifStatement;
  67182. }
  67183. });
  67184. Object.defineProperty(exports, "LabeledStatement", {
  67185. enumerable: true,
  67186. get: function() {
  67187. return _index.labeledStatement;
  67188. }
  67189. });
  67190. Object.defineProperty(exports, "StringLiteral", {
  67191. enumerable: true,
  67192. get: function() {
  67193. return _index.stringLiteral;
  67194. }
  67195. });
  67196. Object.defineProperty(exports, "NumericLiteral", {
  67197. enumerable: true,
  67198. get: function() {
  67199. return _index.numericLiteral;
  67200. }
  67201. });
  67202. Object.defineProperty(exports, "NullLiteral", {
  67203. enumerable: true,
  67204. get: function() {
  67205. return _index.nullLiteral;
  67206. }
  67207. });
  67208. Object.defineProperty(exports, "BooleanLiteral", {
  67209. enumerable: true,
  67210. get: function() {
  67211. return _index.booleanLiteral;
  67212. }
  67213. });
  67214. Object.defineProperty(exports, "RegExpLiteral", {
  67215. enumerable: true,
  67216. get: function() {
  67217. return _index.regExpLiteral;
  67218. }
  67219. });
  67220. Object.defineProperty(exports, "LogicalExpression", {
  67221. enumerable: true,
  67222. get: function() {
  67223. return _index.logicalExpression;
  67224. }
  67225. });
  67226. Object.defineProperty(exports, "MemberExpression", {
  67227. enumerable: true,
  67228. get: function() {
  67229. return _index.memberExpression;
  67230. }
  67231. });
  67232. Object.defineProperty(exports, "NewExpression", {
  67233. enumerable: true,
  67234. get: function() {
  67235. return _index.newExpression;
  67236. }
  67237. });
  67238. Object.defineProperty(exports, "Program", {
  67239. enumerable: true,
  67240. get: function() {
  67241. return _index.program;
  67242. }
  67243. });
  67244. Object.defineProperty(exports, "ObjectExpression", {
  67245. enumerable: true,
  67246. get: function() {
  67247. return _index.objectExpression;
  67248. }
  67249. });
  67250. Object.defineProperty(exports, "ObjectMethod", {
  67251. enumerable: true,
  67252. get: function() {
  67253. return _index.objectMethod;
  67254. }
  67255. });
  67256. Object.defineProperty(exports, "ObjectProperty", {
  67257. enumerable: true,
  67258. get: function() {
  67259. return _index.objectProperty;
  67260. }
  67261. });
  67262. Object.defineProperty(exports, "RestElement", {
  67263. enumerable: true,
  67264. get: function() {
  67265. return _index.restElement;
  67266. }
  67267. });
  67268. Object.defineProperty(exports, "ReturnStatement", {
  67269. enumerable: true,
  67270. get: function() {
  67271. return _index.returnStatement;
  67272. }
  67273. });
  67274. Object.defineProperty(exports, "SequenceExpression", {
  67275. enumerable: true,
  67276. get: function() {
  67277. return _index.sequenceExpression;
  67278. }
  67279. });
  67280. Object.defineProperty(exports, "ParenthesizedExpression", {
  67281. enumerable: true,
  67282. get: function() {
  67283. return _index.parenthesizedExpression;
  67284. }
  67285. });
  67286. Object.defineProperty(exports, "SwitchCase", {
  67287. enumerable: true,
  67288. get: function() {
  67289. return _index.switchCase;
  67290. }
  67291. });
  67292. Object.defineProperty(exports, "SwitchStatement", {
  67293. enumerable: true,
  67294. get: function() {
  67295. return _index.switchStatement;
  67296. }
  67297. });
  67298. Object.defineProperty(exports, "ThisExpression", {
  67299. enumerable: true,
  67300. get: function() {
  67301. return _index.thisExpression;
  67302. }
  67303. });
  67304. Object.defineProperty(exports, "ThrowStatement", {
  67305. enumerable: true,
  67306. get: function() {
  67307. return _index.throwStatement;
  67308. }
  67309. });
  67310. Object.defineProperty(exports, "TryStatement", {
  67311. enumerable: true,
  67312. get: function() {
  67313. return _index.tryStatement;
  67314. }
  67315. });
  67316. Object.defineProperty(exports, "UnaryExpression", {
  67317. enumerable: true,
  67318. get: function() {
  67319. return _index.unaryExpression;
  67320. }
  67321. });
  67322. Object.defineProperty(exports, "UpdateExpression", {
  67323. enumerable: true,
  67324. get: function() {
  67325. return _index.updateExpression;
  67326. }
  67327. });
  67328. Object.defineProperty(exports, "VariableDeclaration", {
  67329. enumerable: true,
  67330. get: function() {
  67331. return _index.variableDeclaration;
  67332. }
  67333. });
  67334. Object.defineProperty(exports, "VariableDeclarator", {
  67335. enumerable: true,
  67336. get: function() {
  67337. return _index.variableDeclarator;
  67338. }
  67339. });
  67340. Object.defineProperty(exports, "WhileStatement", {
  67341. enumerable: true,
  67342. get: function() {
  67343. return _index.whileStatement;
  67344. }
  67345. });
  67346. Object.defineProperty(exports, "WithStatement", {
  67347. enumerable: true,
  67348. get: function() {
  67349. return _index.withStatement;
  67350. }
  67351. });
  67352. Object.defineProperty(exports, "AssignmentPattern", {
  67353. enumerable: true,
  67354. get: function() {
  67355. return _index.assignmentPattern;
  67356. }
  67357. });
  67358. Object.defineProperty(exports, "ArrayPattern", {
  67359. enumerable: true,
  67360. get: function() {
  67361. return _index.arrayPattern;
  67362. }
  67363. });
  67364. Object.defineProperty(exports, "ArrowFunctionExpression", {
  67365. enumerable: true,
  67366. get: function() {
  67367. return _index.arrowFunctionExpression;
  67368. }
  67369. });
  67370. Object.defineProperty(exports, "ClassBody", {
  67371. enumerable: true,
  67372. get: function() {
  67373. return _index.classBody;
  67374. }
  67375. });
  67376. Object.defineProperty(exports, "ClassExpression", {
  67377. enumerable: true,
  67378. get: function() {
  67379. return _index.classExpression;
  67380. }
  67381. });
  67382. Object.defineProperty(exports, "ClassDeclaration", {
  67383. enumerable: true,
  67384. get: function() {
  67385. return _index.classDeclaration;
  67386. }
  67387. });
  67388. Object.defineProperty(exports, "ExportAllDeclaration", {
  67389. enumerable: true,
  67390. get: function() {
  67391. return _index.exportAllDeclaration;
  67392. }
  67393. });
  67394. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  67395. enumerable: true,
  67396. get: function() {
  67397. return _index.exportDefaultDeclaration;
  67398. }
  67399. });
  67400. Object.defineProperty(exports, "ExportNamedDeclaration", {
  67401. enumerable: true,
  67402. get: function() {
  67403. return _index.exportNamedDeclaration;
  67404. }
  67405. });
  67406. Object.defineProperty(exports, "ExportSpecifier", {
  67407. enumerable: true,
  67408. get: function() {
  67409. return _index.exportSpecifier;
  67410. }
  67411. });
  67412. Object.defineProperty(exports, "ForOfStatement", {
  67413. enumerable: true,
  67414. get: function() {
  67415. return _index.forOfStatement;
  67416. }
  67417. });
  67418. Object.defineProperty(exports, "ImportDeclaration", {
  67419. enumerable: true,
  67420. get: function() {
  67421. return _index.importDeclaration;
  67422. }
  67423. });
  67424. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  67425. enumerable: true,
  67426. get: function() {
  67427. return _index.importDefaultSpecifier;
  67428. }
  67429. });
  67430. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  67431. enumerable: true,
  67432. get: function() {
  67433. return _index.importNamespaceSpecifier;
  67434. }
  67435. });
  67436. Object.defineProperty(exports, "ImportSpecifier", {
  67437. enumerable: true,
  67438. get: function() {
  67439. return _index.importSpecifier;
  67440. }
  67441. });
  67442. Object.defineProperty(exports, "MetaProperty", {
  67443. enumerable: true,
  67444. get: function() {
  67445. return _index.metaProperty;
  67446. }
  67447. });
  67448. Object.defineProperty(exports, "ClassMethod", {
  67449. enumerable: true,
  67450. get: function() {
  67451. return _index.classMethod;
  67452. }
  67453. });
  67454. Object.defineProperty(exports, "ObjectPattern", {
  67455. enumerable: true,
  67456. get: function() {
  67457. return _index.objectPattern;
  67458. }
  67459. });
  67460. Object.defineProperty(exports, "SpreadElement", {
  67461. enumerable: true,
  67462. get: function() {
  67463. return _index.spreadElement;
  67464. }
  67465. });
  67466. Object.defineProperty(exports, "Super", {
  67467. enumerable: true,
  67468. get: function() {
  67469. return _index.super;
  67470. }
  67471. });
  67472. Object.defineProperty(exports, "TaggedTemplateExpression", {
  67473. enumerable: true,
  67474. get: function() {
  67475. return _index.taggedTemplateExpression;
  67476. }
  67477. });
  67478. Object.defineProperty(exports, "TemplateElement", {
  67479. enumerable: true,
  67480. get: function() {
  67481. return _index.templateElement;
  67482. }
  67483. });
  67484. Object.defineProperty(exports, "TemplateLiteral", {
  67485. enumerable: true,
  67486. get: function() {
  67487. return _index.templateLiteral;
  67488. }
  67489. });
  67490. Object.defineProperty(exports, "YieldExpression", {
  67491. enumerable: true,
  67492. get: function() {
  67493. return _index.yieldExpression;
  67494. }
  67495. });
  67496. Object.defineProperty(exports, "AwaitExpression", {
  67497. enumerable: true,
  67498. get: function() {
  67499. return _index.awaitExpression;
  67500. }
  67501. });
  67502. Object.defineProperty(exports, "Import", {
  67503. enumerable: true,
  67504. get: function() {
  67505. return _index.import;
  67506. }
  67507. });
  67508. Object.defineProperty(exports, "BigIntLiteral", {
  67509. enumerable: true,
  67510. get: function() {
  67511. return _index.bigIntLiteral;
  67512. }
  67513. });
  67514. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  67515. enumerable: true,
  67516. get: function() {
  67517. return _index.exportNamespaceSpecifier;
  67518. }
  67519. });
  67520. Object.defineProperty(exports, "OptionalMemberExpression", {
  67521. enumerable: true,
  67522. get: function() {
  67523. return _index.optionalMemberExpression;
  67524. }
  67525. });
  67526. Object.defineProperty(exports, "OptionalCallExpression", {
  67527. enumerable: true,
  67528. get: function() {
  67529. return _index.optionalCallExpression;
  67530. }
  67531. });
  67532. Object.defineProperty(exports, "AnyTypeAnnotation", {
  67533. enumerable: true,
  67534. get: function() {
  67535. return _index.anyTypeAnnotation;
  67536. }
  67537. });
  67538. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  67539. enumerable: true,
  67540. get: function() {
  67541. return _index.arrayTypeAnnotation;
  67542. }
  67543. });
  67544. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  67545. enumerable: true,
  67546. get: function() {
  67547. return _index.booleanTypeAnnotation;
  67548. }
  67549. });
  67550. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  67551. enumerable: true,
  67552. get: function() {
  67553. return _index.booleanLiteralTypeAnnotation;
  67554. }
  67555. });
  67556. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  67557. enumerable: true,
  67558. get: function() {
  67559. return _index.nullLiteralTypeAnnotation;
  67560. }
  67561. });
  67562. Object.defineProperty(exports, "ClassImplements", {
  67563. enumerable: true,
  67564. get: function() {
  67565. return _index.classImplements;
  67566. }
  67567. });
  67568. Object.defineProperty(exports, "DeclareClass", {
  67569. enumerable: true,
  67570. get: function() {
  67571. return _index.declareClass;
  67572. }
  67573. });
  67574. Object.defineProperty(exports, "DeclareFunction", {
  67575. enumerable: true,
  67576. get: function() {
  67577. return _index.declareFunction;
  67578. }
  67579. });
  67580. Object.defineProperty(exports, "DeclareInterface", {
  67581. enumerable: true,
  67582. get: function() {
  67583. return _index.declareInterface;
  67584. }
  67585. });
  67586. Object.defineProperty(exports, "DeclareModule", {
  67587. enumerable: true,
  67588. get: function() {
  67589. return _index.declareModule;
  67590. }
  67591. });
  67592. Object.defineProperty(exports, "DeclareModuleExports", {
  67593. enumerable: true,
  67594. get: function() {
  67595. return _index.declareModuleExports;
  67596. }
  67597. });
  67598. Object.defineProperty(exports, "DeclareTypeAlias", {
  67599. enumerable: true,
  67600. get: function() {
  67601. return _index.declareTypeAlias;
  67602. }
  67603. });
  67604. Object.defineProperty(exports, "DeclareOpaqueType", {
  67605. enumerable: true,
  67606. get: function() {
  67607. return _index.declareOpaqueType;
  67608. }
  67609. });
  67610. Object.defineProperty(exports, "DeclareVariable", {
  67611. enumerable: true,
  67612. get: function() {
  67613. return _index.declareVariable;
  67614. }
  67615. });
  67616. Object.defineProperty(exports, "DeclareExportDeclaration", {
  67617. enumerable: true,
  67618. get: function() {
  67619. return _index.declareExportDeclaration;
  67620. }
  67621. });
  67622. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  67623. enumerable: true,
  67624. get: function() {
  67625. return _index.declareExportAllDeclaration;
  67626. }
  67627. });
  67628. Object.defineProperty(exports, "DeclaredPredicate", {
  67629. enumerable: true,
  67630. get: function() {
  67631. return _index.declaredPredicate;
  67632. }
  67633. });
  67634. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  67635. enumerable: true,
  67636. get: function() {
  67637. return _index.existsTypeAnnotation;
  67638. }
  67639. });
  67640. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  67641. enumerable: true,
  67642. get: function() {
  67643. return _index.functionTypeAnnotation;
  67644. }
  67645. });
  67646. Object.defineProperty(exports, "FunctionTypeParam", {
  67647. enumerable: true,
  67648. get: function() {
  67649. return _index.functionTypeParam;
  67650. }
  67651. });
  67652. Object.defineProperty(exports, "GenericTypeAnnotation", {
  67653. enumerable: true,
  67654. get: function() {
  67655. return _index.genericTypeAnnotation;
  67656. }
  67657. });
  67658. Object.defineProperty(exports, "InferredPredicate", {
  67659. enumerable: true,
  67660. get: function() {
  67661. return _index.inferredPredicate;
  67662. }
  67663. });
  67664. Object.defineProperty(exports, "InterfaceExtends", {
  67665. enumerable: true,
  67666. get: function() {
  67667. return _index.interfaceExtends;
  67668. }
  67669. });
  67670. Object.defineProperty(exports, "InterfaceDeclaration", {
  67671. enumerable: true,
  67672. get: function() {
  67673. return _index.interfaceDeclaration;
  67674. }
  67675. });
  67676. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  67677. enumerable: true,
  67678. get: function() {
  67679. return _index.interfaceTypeAnnotation;
  67680. }
  67681. });
  67682. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  67683. enumerable: true,
  67684. get: function() {
  67685. return _index.intersectionTypeAnnotation;
  67686. }
  67687. });
  67688. Object.defineProperty(exports, "MixedTypeAnnotation", {
  67689. enumerable: true,
  67690. get: function() {
  67691. return _index.mixedTypeAnnotation;
  67692. }
  67693. });
  67694. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  67695. enumerable: true,
  67696. get: function() {
  67697. return _index.emptyTypeAnnotation;
  67698. }
  67699. });
  67700. Object.defineProperty(exports, "NullableTypeAnnotation", {
  67701. enumerable: true,
  67702. get: function() {
  67703. return _index.nullableTypeAnnotation;
  67704. }
  67705. });
  67706. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  67707. enumerable: true,
  67708. get: function() {
  67709. return _index.numberLiteralTypeAnnotation;
  67710. }
  67711. });
  67712. Object.defineProperty(exports, "NumberTypeAnnotation", {
  67713. enumerable: true,
  67714. get: function() {
  67715. return _index.numberTypeAnnotation;
  67716. }
  67717. });
  67718. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  67719. enumerable: true,
  67720. get: function() {
  67721. return _index.objectTypeAnnotation;
  67722. }
  67723. });
  67724. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  67725. enumerable: true,
  67726. get: function() {
  67727. return _index.objectTypeInternalSlot;
  67728. }
  67729. });
  67730. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  67731. enumerable: true,
  67732. get: function() {
  67733. return _index.objectTypeCallProperty;
  67734. }
  67735. });
  67736. Object.defineProperty(exports, "ObjectTypeIndexer", {
  67737. enumerable: true,
  67738. get: function() {
  67739. return _index.objectTypeIndexer;
  67740. }
  67741. });
  67742. Object.defineProperty(exports, "ObjectTypeProperty", {
  67743. enumerable: true,
  67744. get: function() {
  67745. return _index.objectTypeProperty;
  67746. }
  67747. });
  67748. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  67749. enumerable: true,
  67750. get: function() {
  67751. return _index.objectTypeSpreadProperty;
  67752. }
  67753. });
  67754. Object.defineProperty(exports, "OpaqueType", {
  67755. enumerable: true,
  67756. get: function() {
  67757. return _index.opaqueType;
  67758. }
  67759. });
  67760. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  67761. enumerable: true,
  67762. get: function() {
  67763. return _index.qualifiedTypeIdentifier;
  67764. }
  67765. });
  67766. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  67767. enumerable: true,
  67768. get: function() {
  67769. return _index.stringLiteralTypeAnnotation;
  67770. }
  67771. });
  67772. Object.defineProperty(exports, "StringTypeAnnotation", {
  67773. enumerable: true,
  67774. get: function() {
  67775. return _index.stringTypeAnnotation;
  67776. }
  67777. });
  67778. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  67779. enumerable: true,
  67780. get: function() {
  67781. return _index.symbolTypeAnnotation;
  67782. }
  67783. });
  67784. Object.defineProperty(exports, "ThisTypeAnnotation", {
  67785. enumerable: true,
  67786. get: function() {
  67787. return _index.thisTypeAnnotation;
  67788. }
  67789. });
  67790. Object.defineProperty(exports, "TupleTypeAnnotation", {
  67791. enumerable: true,
  67792. get: function() {
  67793. return _index.tupleTypeAnnotation;
  67794. }
  67795. });
  67796. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  67797. enumerable: true,
  67798. get: function() {
  67799. return _index.typeofTypeAnnotation;
  67800. }
  67801. });
  67802. Object.defineProperty(exports, "TypeAlias", {
  67803. enumerable: true,
  67804. get: function() {
  67805. return _index.typeAlias;
  67806. }
  67807. });
  67808. Object.defineProperty(exports, "TypeAnnotation", {
  67809. enumerable: true,
  67810. get: function() {
  67811. return _index.typeAnnotation;
  67812. }
  67813. });
  67814. Object.defineProperty(exports, "TypeCastExpression", {
  67815. enumerable: true,
  67816. get: function() {
  67817. return _index.typeCastExpression;
  67818. }
  67819. });
  67820. Object.defineProperty(exports, "TypeParameter", {
  67821. enumerable: true,
  67822. get: function() {
  67823. return _index.typeParameter;
  67824. }
  67825. });
  67826. Object.defineProperty(exports, "TypeParameterDeclaration", {
  67827. enumerable: true,
  67828. get: function() {
  67829. return _index.typeParameterDeclaration;
  67830. }
  67831. });
  67832. Object.defineProperty(exports, "TypeParameterInstantiation", {
  67833. enumerable: true,
  67834. get: function() {
  67835. return _index.typeParameterInstantiation;
  67836. }
  67837. });
  67838. Object.defineProperty(exports, "UnionTypeAnnotation", {
  67839. enumerable: true,
  67840. get: function() {
  67841. return _index.unionTypeAnnotation;
  67842. }
  67843. });
  67844. Object.defineProperty(exports, "Variance", {
  67845. enumerable: true,
  67846. get: function() {
  67847. return _index.variance;
  67848. }
  67849. });
  67850. Object.defineProperty(exports, "VoidTypeAnnotation", {
  67851. enumerable: true,
  67852. get: function() {
  67853. return _index.voidTypeAnnotation;
  67854. }
  67855. });
  67856. Object.defineProperty(exports, "EnumDeclaration", {
  67857. enumerable: true,
  67858. get: function() {
  67859. return _index.enumDeclaration;
  67860. }
  67861. });
  67862. Object.defineProperty(exports, "EnumBooleanBody", {
  67863. enumerable: true,
  67864. get: function() {
  67865. return _index.enumBooleanBody;
  67866. }
  67867. });
  67868. Object.defineProperty(exports, "EnumNumberBody", {
  67869. enumerable: true,
  67870. get: function() {
  67871. return _index.enumNumberBody;
  67872. }
  67873. });
  67874. Object.defineProperty(exports, "EnumStringBody", {
  67875. enumerable: true,
  67876. get: function() {
  67877. return _index.enumStringBody;
  67878. }
  67879. });
  67880. Object.defineProperty(exports, "EnumSymbolBody", {
  67881. enumerable: true,
  67882. get: function() {
  67883. return _index.enumSymbolBody;
  67884. }
  67885. });
  67886. Object.defineProperty(exports, "EnumBooleanMember", {
  67887. enumerable: true,
  67888. get: function() {
  67889. return _index.enumBooleanMember;
  67890. }
  67891. });
  67892. Object.defineProperty(exports, "EnumNumberMember", {
  67893. enumerable: true,
  67894. get: function() {
  67895. return _index.enumNumberMember;
  67896. }
  67897. });
  67898. Object.defineProperty(exports, "EnumStringMember", {
  67899. enumerable: true,
  67900. get: function() {
  67901. return _index.enumStringMember;
  67902. }
  67903. });
  67904. Object.defineProperty(exports, "EnumDefaultedMember", {
  67905. enumerable: true,
  67906. get: function() {
  67907. return _index.enumDefaultedMember;
  67908. }
  67909. });
  67910. Object.defineProperty(exports, "IndexedAccessType", {
  67911. enumerable: true,
  67912. get: function() {
  67913. return _index.indexedAccessType;
  67914. }
  67915. });
  67916. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  67917. enumerable: true,
  67918. get: function() {
  67919. return _index.optionalIndexedAccessType;
  67920. }
  67921. });
  67922. Object.defineProperty(exports, "JSXAttribute", {
  67923. enumerable: true,
  67924. get: function() {
  67925. return _index.jsxAttribute;
  67926. }
  67927. });
  67928. Object.defineProperty(exports, "JSXClosingElement", {
  67929. enumerable: true,
  67930. get: function() {
  67931. return _index.jsxClosingElement;
  67932. }
  67933. });
  67934. Object.defineProperty(exports, "JSXElement", {
  67935. enumerable: true,
  67936. get: function() {
  67937. return _index.jsxElement;
  67938. }
  67939. });
  67940. Object.defineProperty(exports, "JSXEmptyExpression", {
  67941. enumerable: true,
  67942. get: function() {
  67943. return _index.jsxEmptyExpression;
  67944. }
  67945. });
  67946. Object.defineProperty(exports, "JSXExpressionContainer", {
  67947. enumerable: true,
  67948. get: function() {
  67949. return _index.jsxExpressionContainer;
  67950. }
  67951. });
  67952. Object.defineProperty(exports, "JSXSpreadChild", {
  67953. enumerable: true,
  67954. get: function() {
  67955. return _index.jsxSpreadChild;
  67956. }
  67957. });
  67958. Object.defineProperty(exports, "JSXIdentifier", {
  67959. enumerable: true,
  67960. get: function() {
  67961. return _index.jsxIdentifier;
  67962. }
  67963. });
  67964. Object.defineProperty(exports, "JSXMemberExpression", {
  67965. enumerable: true,
  67966. get: function() {
  67967. return _index.jsxMemberExpression;
  67968. }
  67969. });
  67970. Object.defineProperty(exports, "JSXNamespacedName", {
  67971. enumerable: true,
  67972. get: function() {
  67973. return _index.jsxNamespacedName;
  67974. }
  67975. });
  67976. Object.defineProperty(exports, "JSXOpeningElement", {
  67977. enumerable: true,
  67978. get: function() {
  67979. return _index.jsxOpeningElement;
  67980. }
  67981. });
  67982. Object.defineProperty(exports, "JSXSpreadAttribute", {
  67983. enumerable: true,
  67984. get: function() {
  67985. return _index.jsxSpreadAttribute;
  67986. }
  67987. });
  67988. Object.defineProperty(exports, "JSXText", {
  67989. enumerable: true,
  67990. get: function() {
  67991. return _index.jsxText;
  67992. }
  67993. });
  67994. Object.defineProperty(exports, "JSXFragment", {
  67995. enumerable: true,
  67996. get: function() {
  67997. return _index.jsxFragment;
  67998. }
  67999. });
  68000. Object.defineProperty(exports, "JSXOpeningFragment", {
  68001. enumerable: true,
  68002. get: function() {
  68003. return _index.jsxOpeningFragment;
  68004. }
  68005. });
  68006. Object.defineProperty(exports, "JSXClosingFragment", {
  68007. enumerable: true,
  68008. get: function() {
  68009. return _index.jsxClosingFragment;
  68010. }
  68011. });
  68012. Object.defineProperty(exports, "Noop", {
  68013. enumerable: true,
  68014. get: function() {
  68015. return _index.noop;
  68016. }
  68017. });
  68018. Object.defineProperty(exports, "Placeholder", {
  68019. enumerable: true,
  68020. get: function() {
  68021. return _index.placeholder;
  68022. }
  68023. });
  68024. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  68025. enumerable: true,
  68026. get: function() {
  68027. return _index.v8IntrinsicIdentifier;
  68028. }
  68029. });
  68030. Object.defineProperty(exports, "ArgumentPlaceholder", {
  68031. enumerable: true,
  68032. get: function() {
  68033. return _index.argumentPlaceholder;
  68034. }
  68035. });
  68036. Object.defineProperty(exports, "BindExpression", {
  68037. enumerable: true,
  68038. get: function() {
  68039. return _index.bindExpression;
  68040. }
  68041. });
  68042. Object.defineProperty(exports, "ClassProperty", {
  68043. enumerable: true,
  68044. get: function() {
  68045. return _index.classProperty;
  68046. }
  68047. });
  68048. Object.defineProperty(exports, "PipelineTopicExpression", {
  68049. enumerable: true,
  68050. get: function() {
  68051. return _index.pipelineTopicExpression;
  68052. }
  68053. });
  68054. Object.defineProperty(exports, "PipelineBareFunction", {
  68055. enumerable: true,
  68056. get: function() {
  68057. return _index.pipelineBareFunction;
  68058. }
  68059. });
  68060. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  68061. enumerable: true,
  68062. get: function() {
  68063. return _index.pipelinePrimaryTopicReference;
  68064. }
  68065. });
  68066. Object.defineProperty(exports, "ClassPrivateProperty", {
  68067. enumerable: true,
  68068. get: function() {
  68069. return _index.classPrivateProperty;
  68070. }
  68071. });
  68072. Object.defineProperty(exports, "ClassPrivateMethod", {
  68073. enumerable: true,
  68074. get: function() {
  68075. return _index.classPrivateMethod;
  68076. }
  68077. });
  68078. Object.defineProperty(exports, "ImportAttribute", {
  68079. enumerable: true,
  68080. get: function() {
  68081. return _index.importAttribute;
  68082. }
  68083. });
  68084. Object.defineProperty(exports, "Decorator", {
  68085. enumerable: true,
  68086. get: function() {
  68087. return _index.decorator;
  68088. }
  68089. });
  68090. Object.defineProperty(exports, "DoExpression", {
  68091. enumerable: true,
  68092. get: function() {
  68093. return _index.doExpression;
  68094. }
  68095. });
  68096. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  68097. enumerable: true,
  68098. get: function() {
  68099. return _index.exportDefaultSpecifier;
  68100. }
  68101. });
  68102. Object.defineProperty(exports, "PrivateName", {
  68103. enumerable: true,
  68104. get: function() {
  68105. return _index.privateName;
  68106. }
  68107. });
  68108. Object.defineProperty(exports, "RecordExpression", {
  68109. enumerable: true,
  68110. get: function() {
  68111. return _index.recordExpression;
  68112. }
  68113. });
  68114. Object.defineProperty(exports, "TupleExpression", {
  68115. enumerable: true,
  68116. get: function() {
  68117. return _index.tupleExpression;
  68118. }
  68119. });
  68120. Object.defineProperty(exports, "DecimalLiteral", {
  68121. enumerable: true,
  68122. get: function() {
  68123. return _index.decimalLiteral;
  68124. }
  68125. });
  68126. Object.defineProperty(exports, "StaticBlock", {
  68127. enumerable: true,
  68128. get: function() {
  68129. return _index.staticBlock;
  68130. }
  68131. });
  68132. Object.defineProperty(exports, "ModuleExpression", {
  68133. enumerable: true,
  68134. get: function() {
  68135. return _index.moduleExpression;
  68136. }
  68137. });
  68138. Object.defineProperty(exports, "TSParameterProperty", {
  68139. enumerable: true,
  68140. get: function() {
  68141. return _index.tsParameterProperty;
  68142. }
  68143. });
  68144. Object.defineProperty(exports, "TSDeclareFunction", {
  68145. enumerable: true,
  68146. get: function() {
  68147. return _index.tsDeclareFunction;
  68148. }
  68149. });
  68150. Object.defineProperty(exports, "TSDeclareMethod", {
  68151. enumerable: true,
  68152. get: function() {
  68153. return _index.tsDeclareMethod;
  68154. }
  68155. });
  68156. Object.defineProperty(exports, "TSQualifiedName", {
  68157. enumerable: true,
  68158. get: function() {
  68159. return _index.tsQualifiedName;
  68160. }
  68161. });
  68162. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  68163. enumerable: true,
  68164. get: function() {
  68165. return _index.tsCallSignatureDeclaration;
  68166. }
  68167. });
  68168. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  68169. enumerable: true,
  68170. get: function() {
  68171. return _index.tsConstructSignatureDeclaration;
  68172. }
  68173. });
  68174. Object.defineProperty(exports, "TSPropertySignature", {
  68175. enumerable: true,
  68176. get: function() {
  68177. return _index.tsPropertySignature;
  68178. }
  68179. });
  68180. Object.defineProperty(exports, "TSMethodSignature", {
  68181. enumerable: true,
  68182. get: function() {
  68183. return _index.tsMethodSignature;
  68184. }
  68185. });
  68186. Object.defineProperty(exports, "TSIndexSignature", {
  68187. enumerable: true,
  68188. get: function() {
  68189. return _index.tsIndexSignature;
  68190. }
  68191. });
  68192. Object.defineProperty(exports, "TSAnyKeyword", {
  68193. enumerable: true,
  68194. get: function() {
  68195. return _index.tsAnyKeyword;
  68196. }
  68197. });
  68198. Object.defineProperty(exports, "TSBooleanKeyword", {
  68199. enumerable: true,
  68200. get: function() {
  68201. return _index.tsBooleanKeyword;
  68202. }
  68203. });
  68204. Object.defineProperty(exports, "TSBigIntKeyword", {
  68205. enumerable: true,
  68206. get: function() {
  68207. return _index.tsBigIntKeyword;
  68208. }
  68209. });
  68210. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  68211. enumerable: true,
  68212. get: function() {
  68213. return _index.tsIntrinsicKeyword;
  68214. }
  68215. });
  68216. Object.defineProperty(exports, "TSNeverKeyword", {
  68217. enumerable: true,
  68218. get: function() {
  68219. return _index.tsNeverKeyword;
  68220. }
  68221. });
  68222. Object.defineProperty(exports, "TSNullKeyword", {
  68223. enumerable: true,
  68224. get: function() {
  68225. return _index.tsNullKeyword;
  68226. }
  68227. });
  68228. Object.defineProperty(exports, "TSNumberKeyword", {
  68229. enumerable: true,
  68230. get: function() {
  68231. return _index.tsNumberKeyword;
  68232. }
  68233. });
  68234. Object.defineProperty(exports, "TSObjectKeyword", {
  68235. enumerable: true,
  68236. get: function() {
  68237. return _index.tsObjectKeyword;
  68238. }
  68239. });
  68240. Object.defineProperty(exports, "TSStringKeyword", {
  68241. enumerable: true,
  68242. get: function() {
  68243. return _index.tsStringKeyword;
  68244. }
  68245. });
  68246. Object.defineProperty(exports, "TSSymbolKeyword", {
  68247. enumerable: true,
  68248. get: function() {
  68249. return _index.tsSymbolKeyword;
  68250. }
  68251. });
  68252. Object.defineProperty(exports, "TSUndefinedKeyword", {
  68253. enumerable: true,
  68254. get: function() {
  68255. return _index.tsUndefinedKeyword;
  68256. }
  68257. });
  68258. Object.defineProperty(exports, "TSUnknownKeyword", {
  68259. enumerable: true,
  68260. get: function() {
  68261. return _index.tsUnknownKeyword;
  68262. }
  68263. });
  68264. Object.defineProperty(exports, "TSVoidKeyword", {
  68265. enumerable: true,
  68266. get: function() {
  68267. return _index.tsVoidKeyword;
  68268. }
  68269. });
  68270. Object.defineProperty(exports, "TSThisType", {
  68271. enumerable: true,
  68272. get: function() {
  68273. return _index.tsThisType;
  68274. }
  68275. });
  68276. Object.defineProperty(exports, "TSFunctionType", {
  68277. enumerable: true,
  68278. get: function() {
  68279. return _index.tsFunctionType;
  68280. }
  68281. });
  68282. Object.defineProperty(exports, "TSConstructorType", {
  68283. enumerable: true,
  68284. get: function() {
  68285. return _index.tsConstructorType;
  68286. }
  68287. });
  68288. Object.defineProperty(exports, "TSTypeReference", {
  68289. enumerable: true,
  68290. get: function() {
  68291. return _index.tsTypeReference;
  68292. }
  68293. });
  68294. Object.defineProperty(exports, "TSTypePredicate", {
  68295. enumerable: true,
  68296. get: function() {
  68297. return _index.tsTypePredicate;
  68298. }
  68299. });
  68300. Object.defineProperty(exports, "TSTypeQuery", {
  68301. enumerable: true,
  68302. get: function() {
  68303. return _index.tsTypeQuery;
  68304. }
  68305. });
  68306. Object.defineProperty(exports, "TSTypeLiteral", {
  68307. enumerable: true,
  68308. get: function() {
  68309. return _index.tsTypeLiteral;
  68310. }
  68311. });
  68312. Object.defineProperty(exports, "TSArrayType", {
  68313. enumerable: true,
  68314. get: function() {
  68315. return _index.tsArrayType;
  68316. }
  68317. });
  68318. Object.defineProperty(exports, "TSTupleType", {
  68319. enumerable: true,
  68320. get: function() {
  68321. return _index.tsTupleType;
  68322. }
  68323. });
  68324. Object.defineProperty(exports, "TSOptionalType", {
  68325. enumerable: true,
  68326. get: function() {
  68327. return _index.tsOptionalType;
  68328. }
  68329. });
  68330. Object.defineProperty(exports, "TSRestType", {
  68331. enumerable: true,
  68332. get: function() {
  68333. return _index.tsRestType;
  68334. }
  68335. });
  68336. Object.defineProperty(exports, "TSNamedTupleMember", {
  68337. enumerable: true,
  68338. get: function() {
  68339. return _index.tsNamedTupleMember;
  68340. }
  68341. });
  68342. Object.defineProperty(exports, "TSUnionType", {
  68343. enumerable: true,
  68344. get: function() {
  68345. return _index.tsUnionType;
  68346. }
  68347. });
  68348. Object.defineProperty(exports, "TSIntersectionType", {
  68349. enumerable: true,
  68350. get: function() {
  68351. return _index.tsIntersectionType;
  68352. }
  68353. });
  68354. Object.defineProperty(exports, "TSConditionalType", {
  68355. enumerable: true,
  68356. get: function() {
  68357. return _index.tsConditionalType;
  68358. }
  68359. });
  68360. Object.defineProperty(exports, "TSInferType", {
  68361. enumerable: true,
  68362. get: function() {
  68363. return _index.tsInferType;
  68364. }
  68365. });
  68366. Object.defineProperty(exports, "TSParenthesizedType", {
  68367. enumerable: true,
  68368. get: function() {
  68369. return _index.tsParenthesizedType;
  68370. }
  68371. });
  68372. Object.defineProperty(exports, "TSTypeOperator", {
  68373. enumerable: true,
  68374. get: function() {
  68375. return _index.tsTypeOperator;
  68376. }
  68377. });
  68378. Object.defineProperty(exports, "TSIndexedAccessType", {
  68379. enumerable: true,
  68380. get: function() {
  68381. return _index.tsIndexedAccessType;
  68382. }
  68383. });
  68384. Object.defineProperty(exports, "TSMappedType", {
  68385. enumerable: true,
  68386. get: function() {
  68387. return _index.tsMappedType;
  68388. }
  68389. });
  68390. Object.defineProperty(exports, "TSLiteralType", {
  68391. enumerable: true,
  68392. get: function() {
  68393. return _index.tsLiteralType;
  68394. }
  68395. });
  68396. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  68397. enumerable: true,
  68398. get: function() {
  68399. return _index.tsExpressionWithTypeArguments;
  68400. }
  68401. });
  68402. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  68403. enumerable: true,
  68404. get: function() {
  68405. return _index.tsInterfaceDeclaration;
  68406. }
  68407. });
  68408. Object.defineProperty(exports, "TSInterfaceBody", {
  68409. enumerable: true,
  68410. get: function() {
  68411. return _index.tsInterfaceBody;
  68412. }
  68413. });
  68414. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  68415. enumerable: true,
  68416. get: function() {
  68417. return _index.tsTypeAliasDeclaration;
  68418. }
  68419. });
  68420. Object.defineProperty(exports, "TSAsExpression", {
  68421. enumerable: true,
  68422. get: function() {
  68423. return _index.tsAsExpression;
  68424. }
  68425. });
  68426. Object.defineProperty(exports, "TSTypeAssertion", {
  68427. enumerable: true,
  68428. get: function() {
  68429. return _index.tsTypeAssertion;
  68430. }
  68431. });
  68432. Object.defineProperty(exports, "TSEnumDeclaration", {
  68433. enumerable: true,
  68434. get: function() {
  68435. return _index.tsEnumDeclaration;
  68436. }
  68437. });
  68438. Object.defineProperty(exports, "TSEnumMember", {
  68439. enumerable: true,
  68440. get: function() {
  68441. return _index.tsEnumMember;
  68442. }
  68443. });
  68444. Object.defineProperty(exports, "TSModuleDeclaration", {
  68445. enumerable: true,
  68446. get: function() {
  68447. return _index.tsModuleDeclaration;
  68448. }
  68449. });
  68450. Object.defineProperty(exports, "TSModuleBlock", {
  68451. enumerable: true,
  68452. get: function() {
  68453. return _index.tsModuleBlock;
  68454. }
  68455. });
  68456. Object.defineProperty(exports, "TSImportType", {
  68457. enumerable: true,
  68458. get: function() {
  68459. return _index.tsImportType;
  68460. }
  68461. });
  68462. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  68463. enumerable: true,
  68464. get: function() {
  68465. return _index.tsImportEqualsDeclaration;
  68466. }
  68467. });
  68468. Object.defineProperty(exports, "TSExternalModuleReference", {
  68469. enumerable: true,
  68470. get: function() {
  68471. return _index.tsExternalModuleReference;
  68472. }
  68473. });
  68474. Object.defineProperty(exports, "TSNonNullExpression", {
  68475. enumerable: true,
  68476. get: function() {
  68477. return _index.tsNonNullExpression;
  68478. }
  68479. });
  68480. Object.defineProperty(exports, "TSExportAssignment", {
  68481. enumerable: true,
  68482. get: function() {
  68483. return _index.tsExportAssignment;
  68484. }
  68485. });
  68486. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  68487. enumerable: true,
  68488. get: function() {
  68489. return _index.tsNamespaceExportDeclaration;
  68490. }
  68491. });
  68492. Object.defineProperty(exports, "TSTypeAnnotation", {
  68493. enumerable: true,
  68494. get: function() {
  68495. return _index.tsTypeAnnotation;
  68496. }
  68497. });
  68498. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  68499. enumerable: true,
  68500. get: function() {
  68501. return _index.tsTypeParameterInstantiation;
  68502. }
  68503. });
  68504. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  68505. enumerable: true,
  68506. get: function() {
  68507. return _index.tsTypeParameterDeclaration;
  68508. }
  68509. });
  68510. Object.defineProperty(exports, "TSTypeParameter", {
  68511. enumerable: true,
  68512. get: function() {
  68513. return _index.tsTypeParameter;
  68514. }
  68515. });
  68516. Object.defineProperty(exports, "NumberLiteral", {
  68517. enumerable: true,
  68518. get: function() {
  68519. return _index.numberLiteral;
  68520. }
  68521. });
  68522. Object.defineProperty(exports, "RegexLiteral", {
  68523. enumerable: true,
  68524. get: function() {
  68525. return _index.regexLiteral;
  68526. }
  68527. });
  68528. Object.defineProperty(exports, "RestProperty", {
  68529. enumerable: true,
  68530. get: function() {
  68531. return _index.restProperty;
  68532. }
  68533. });
  68534. Object.defineProperty(exports, "SpreadProperty", {
  68535. enumerable: true,
  68536. get: function() {
  68537. return _index.spreadProperty;
  68538. }
  68539. });
  68540. var _index = require_generated12();
  68541. }
  68542. });
  68543. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneNode.js
  68544. var require_cloneNode3 = __commonJS({
  68545. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  68546. "use strict";
  68547. Object.defineProperty(exports, "__esModule", {
  68548. value: true
  68549. });
  68550. exports.default = cloneNode;
  68551. var _definitions = require_definitions3();
  68552. var _generated = require_generated11();
  68553. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  68554. function cloneIfNode(obj, deep, withoutLoc) {
  68555. if (obj && typeof obj.type === "string") {
  68556. return cloneNode(obj, deep, withoutLoc);
  68557. }
  68558. return obj;
  68559. }
  68560. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  68561. if (Array.isArray(obj)) {
  68562. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  68563. }
  68564. return cloneIfNode(obj, deep, withoutLoc);
  68565. }
  68566. function cloneNode(node, deep = true, withoutLoc = false) {
  68567. if (!node)
  68568. return node;
  68569. const {
  68570. type
  68571. } = node;
  68572. const newNode = {
  68573. type: node.type
  68574. };
  68575. if ((0, _generated.isIdentifier)(node)) {
  68576. newNode.name = node.name;
  68577. if (has(node, "optional") && typeof node.optional === "boolean") {
  68578. newNode.optional = node.optional;
  68579. }
  68580. if (has(node, "typeAnnotation")) {
  68581. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  68582. }
  68583. } else if (!has(_definitions.NODE_FIELDS, type)) {
  68584. throw new Error(`Unknown node type: "${type}"`);
  68585. } else {
  68586. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  68587. if (has(node, field)) {
  68588. if (deep) {
  68589. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  68590. } else {
  68591. newNode[field] = node[field];
  68592. }
  68593. }
  68594. }
  68595. }
  68596. if (has(node, "loc")) {
  68597. if (withoutLoc) {
  68598. newNode.loc = null;
  68599. } else {
  68600. newNode.loc = node.loc;
  68601. }
  68602. }
  68603. if (has(node, "leadingComments")) {
  68604. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  68605. }
  68606. if (has(node, "innerComments")) {
  68607. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  68608. }
  68609. if (has(node, "trailingComments")) {
  68610. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  68611. }
  68612. if (has(node, "extra")) {
  68613. newNode.extra = Object.assign({}, node.extra);
  68614. }
  68615. return newNode;
  68616. }
  68617. function maybeCloneComments(comments, deep, withoutLoc) {
  68618. if (!comments || !deep) {
  68619. return comments;
  68620. }
  68621. return comments.map(({
  68622. type,
  68623. value,
  68624. loc
  68625. }) => {
  68626. if (withoutLoc) {
  68627. return {
  68628. type,
  68629. value,
  68630. loc: null
  68631. };
  68632. }
  68633. return {
  68634. type,
  68635. value,
  68636. loc
  68637. };
  68638. });
  68639. }
  68640. }
  68641. });
  68642. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/clone.js
  68643. var require_clone3 = __commonJS({
  68644. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  68645. "use strict";
  68646. Object.defineProperty(exports, "__esModule", {
  68647. value: true
  68648. });
  68649. exports.default = clone;
  68650. var _cloneNode = require_cloneNode3();
  68651. function clone(node) {
  68652. return (0, _cloneNode.default)(node, false);
  68653. }
  68654. }
  68655. });
  68656. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeep.js
  68657. var require_cloneDeep3 = __commonJS({
  68658. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  68659. "use strict";
  68660. Object.defineProperty(exports, "__esModule", {
  68661. value: true
  68662. });
  68663. exports.default = cloneDeep2;
  68664. var _cloneNode = require_cloneNode3();
  68665. function cloneDeep2(node) {
  68666. return (0, _cloneNode.default)(node);
  68667. }
  68668. }
  68669. });
  68670. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  68671. var require_cloneDeepWithoutLoc3 = __commonJS({
  68672. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  68673. "use strict";
  68674. Object.defineProperty(exports, "__esModule", {
  68675. value: true
  68676. });
  68677. exports.default = cloneDeepWithoutLoc;
  68678. var _cloneNode = require_cloneNode3();
  68679. function cloneDeepWithoutLoc(node) {
  68680. return (0, _cloneNode.default)(node, true, true);
  68681. }
  68682. }
  68683. });
  68684. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  68685. var require_cloneWithoutLoc3 = __commonJS({
  68686. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  68687. "use strict";
  68688. Object.defineProperty(exports, "__esModule", {
  68689. value: true
  68690. });
  68691. exports.default = cloneWithoutLoc;
  68692. var _cloneNode = require_cloneNode3();
  68693. function cloneWithoutLoc(node) {
  68694. return (0, _cloneNode.default)(node, false, true);
  68695. }
  68696. }
  68697. });
  68698. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComments.js
  68699. var require_addComments3 = __commonJS({
  68700. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  68701. "use strict";
  68702. Object.defineProperty(exports, "__esModule", {
  68703. value: true
  68704. });
  68705. exports.default = addComments;
  68706. function addComments(node, type, comments) {
  68707. if (!comments || !node)
  68708. return node;
  68709. const key = `${type}Comments`;
  68710. if (node[key]) {
  68711. if (type === "leading") {
  68712. node[key] = comments.concat(node[key]);
  68713. } else {
  68714. node[key] = node[key].concat(comments);
  68715. }
  68716. } else {
  68717. node[key] = comments;
  68718. }
  68719. return node;
  68720. }
  68721. }
  68722. });
  68723. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComment.js
  68724. var require_addComment3 = __commonJS({
  68725. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  68726. "use strict";
  68727. Object.defineProperty(exports, "__esModule", {
  68728. value: true
  68729. });
  68730. exports.default = addComment;
  68731. var _addComments = require_addComments3();
  68732. function addComment(node, type, content3, line) {
  68733. return (0, _addComments.default)(node, type, [{
  68734. type: line ? "CommentLine" : "CommentBlock",
  68735. value: content3
  68736. }]);
  68737. }
  68738. }
  68739. });
  68740. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/inherit.js
  68741. var require_inherit3 = __commonJS({
  68742. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  68743. "use strict";
  68744. Object.defineProperty(exports, "__esModule", {
  68745. value: true
  68746. });
  68747. exports.default = inherit2;
  68748. function inherit2(key, child, parent) {
  68749. if (child && parent) {
  68750. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  68751. }
  68752. }
  68753. }
  68754. });
  68755. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  68756. var require_inheritInnerComments3 = __commonJS({
  68757. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  68758. "use strict";
  68759. Object.defineProperty(exports, "__esModule", {
  68760. value: true
  68761. });
  68762. exports.default = inheritInnerComments;
  68763. var _inherit = require_inherit3();
  68764. function inheritInnerComments(child, parent) {
  68765. (0, _inherit.default)("innerComments", child, parent);
  68766. }
  68767. }
  68768. });
  68769. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  68770. var require_inheritLeadingComments3 = __commonJS({
  68771. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  68772. "use strict";
  68773. Object.defineProperty(exports, "__esModule", {
  68774. value: true
  68775. });
  68776. exports.default = inheritLeadingComments;
  68777. var _inherit = require_inherit3();
  68778. function inheritLeadingComments(child, parent) {
  68779. (0, _inherit.default)("leadingComments", child, parent);
  68780. }
  68781. }
  68782. });
  68783. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  68784. var require_inheritTrailingComments3 = __commonJS({
  68785. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  68786. "use strict";
  68787. Object.defineProperty(exports, "__esModule", {
  68788. value: true
  68789. });
  68790. exports.default = inheritTrailingComments;
  68791. var _inherit = require_inherit3();
  68792. function inheritTrailingComments(child, parent) {
  68793. (0, _inherit.default)("trailingComments", child, parent);
  68794. }
  68795. }
  68796. });
  68797. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritsComments.js
  68798. var require_inheritsComments3 = __commonJS({
  68799. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  68800. "use strict";
  68801. Object.defineProperty(exports, "__esModule", {
  68802. value: true
  68803. });
  68804. exports.default = inheritsComments;
  68805. var _inheritTrailingComments = require_inheritTrailingComments3();
  68806. var _inheritLeadingComments = require_inheritLeadingComments3();
  68807. var _inheritInnerComments = require_inheritInnerComments3();
  68808. function inheritsComments(child, parent) {
  68809. (0, _inheritTrailingComments.default)(child, parent);
  68810. (0, _inheritLeadingComments.default)(child, parent);
  68811. (0, _inheritInnerComments.default)(child, parent);
  68812. return child;
  68813. }
  68814. }
  68815. });
  68816. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/removeComments.js
  68817. var require_removeComments3 = __commonJS({
  68818. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  68819. "use strict";
  68820. Object.defineProperty(exports, "__esModule", {
  68821. value: true
  68822. });
  68823. exports.default = removeComments;
  68824. var _constants = require_constants3();
  68825. function removeComments(node) {
  68826. _constants.COMMENT_KEYS.forEach((key) => {
  68827. node[key] = null;
  68828. });
  68829. return node;
  68830. }
  68831. }
  68832. });
  68833. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/generated/index.js
  68834. var require_generated14 = __commonJS({
  68835. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  68836. "use strict";
  68837. Object.defineProperty(exports, "__esModule", {
  68838. value: true
  68839. });
  68840. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  68841. var _definitions = require_definitions3();
  68842. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  68843. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  68844. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  68845. exports.BINARY_TYPES = BINARY_TYPES;
  68846. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  68847. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  68848. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  68849. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  68850. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  68851. exports.BLOCK_TYPES = BLOCK_TYPES;
  68852. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  68853. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  68854. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  68855. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  68856. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  68857. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  68858. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  68859. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  68860. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  68861. exports.LOOP_TYPES = LOOP_TYPES;
  68862. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  68863. exports.WHILE_TYPES = WHILE_TYPES;
  68864. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  68865. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  68866. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  68867. exports.FOR_TYPES = FOR_TYPES;
  68868. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  68869. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  68870. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  68871. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  68872. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  68873. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  68874. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  68875. exports.PUREISH_TYPES = PUREISH_TYPES;
  68876. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  68877. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  68878. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  68879. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  68880. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  68881. exports.LVAL_TYPES = LVAL_TYPES;
  68882. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  68883. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  68884. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  68885. exports.LITERAL_TYPES = LITERAL_TYPES;
  68886. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  68887. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  68888. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  68889. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  68890. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  68891. exports.METHOD_TYPES = METHOD_TYPES;
  68892. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  68893. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  68894. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  68895. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  68896. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  68897. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  68898. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  68899. exports.PATTERN_TYPES = PATTERN_TYPES;
  68900. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  68901. exports.CLASS_TYPES = CLASS_TYPES;
  68902. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  68903. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  68904. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  68905. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  68906. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  68907. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  68908. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  68909. exports.FLOW_TYPES = FLOW_TYPES;
  68910. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  68911. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  68912. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  68913. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  68914. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  68915. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  68916. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  68917. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  68918. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  68919. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  68920. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  68921. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  68922. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  68923. exports.JSX_TYPES = JSX_TYPES;
  68924. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  68925. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  68926. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  68927. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  68928. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  68929. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  68930. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  68931. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  68932. }
  68933. });
  68934. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBlock.js
  68935. var require_toBlock3 = __commonJS({
  68936. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  68937. "use strict";
  68938. Object.defineProperty(exports, "__esModule", {
  68939. value: true
  68940. });
  68941. exports.default = toBlock;
  68942. var _generated = require_generated11();
  68943. var _generated2 = require_generated12();
  68944. function toBlock(node, parent) {
  68945. if ((0, _generated.isBlockStatement)(node)) {
  68946. return node;
  68947. }
  68948. let blockNodes = [];
  68949. if ((0, _generated.isEmptyStatement)(node)) {
  68950. blockNodes = [];
  68951. } else {
  68952. if (!(0, _generated.isStatement)(node)) {
  68953. if ((0, _generated.isFunction)(parent)) {
  68954. node = (0, _generated2.returnStatement)(node);
  68955. } else {
  68956. node = (0, _generated2.expressionStatement)(node);
  68957. }
  68958. }
  68959. blockNodes = [node];
  68960. }
  68961. return (0, _generated2.blockStatement)(blockNodes);
  68962. }
  68963. }
  68964. });
  68965. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/ensureBlock.js
  68966. var require_ensureBlock3 = __commonJS({
  68967. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  68968. "use strict";
  68969. Object.defineProperty(exports, "__esModule", {
  68970. value: true
  68971. });
  68972. exports.default = ensureBlock;
  68973. var _toBlock = require_toBlock3();
  68974. function ensureBlock(node, key = "body") {
  68975. return node[key] = (0, _toBlock.default)(node[key], node);
  68976. }
  68977. }
  68978. });
  68979. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toIdentifier.js
  68980. var require_toIdentifier3 = __commonJS({
  68981. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  68982. "use strict";
  68983. Object.defineProperty(exports, "__esModule", {
  68984. value: true
  68985. });
  68986. exports.default = toIdentifier2;
  68987. var _isValidIdentifier = require_isValidIdentifier3();
  68988. var _helperValidatorIdentifier = require_lib15();
  68989. function toIdentifier2(input) {
  68990. input = input + "";
  68991. let name2 = "";
  68992. for (const c of input) {
  68993. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  68994. }
  68995. name2 = name2.replace(/^[-0-9]+/, "");
  68996. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  68997. return c ? c.toUpperCase() : "";
  68998. });
  68999. if (!(0, _isValidIdentifier.default)(name2)) {
  69000. name2 = `_${name2}`;
  69001. }
  69002. return name2 || "_";
  69003. }
  69004. }
  69005. });
  69006. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  69007. var require_toBindingIdentifierName3 = __commonJS({
  69008. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  69009. "use strict";
  69010. Object.defineProperty(exports, "__esModule", {
  69011. value: true
  69012. });
  69013. exports.default = toBindingIdentifierName;
  69014. var _toIdentifier = require_toIdentifier3();
  69015. function toBindingIdentifierName(name2) {
  69016. name2 = (0, _toIdentifier.default)(name2);
  69017. if (name2 === "eval" || name2 === "arguments")
  69018. name2 = "_" + name2;
  69019. return name2;
  69020. }
  69021. }
  69022. });
  69023. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toComputedKey.js
  69024. var require_toComputedKey3 = __commonJS({
  69025. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  69026. "use strict";
  69027. Object.defineProperty(exports, "__esModule", {
  69028. value: true
  69029. });
  69030. exports.default = toComputedKey;
  69031. var _generated = require_generated11();
  69032. var _generated2 = require_generated12();
  69033. function toComputedKey(node, key = node.key || node.property) {
  69034. if (!node.computed && (0, _generated.isIdentifier)(key))
  69035. key = (0, _generated2.stringLiteral)(key.name);
  69036. return key;
  69037. }
  69038. }
  69039. });
  69040. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toExpression.js
  69041. var require_toExpression3 = __commonJS({
  69042. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  69043. "use strict";
  69044. Object.defineProperty(exports, "__esModule", {
  69045. value: true
  69046. });
  69047. exports.default = void 0;
  69048. var _generated = require_generated11();
  69049. var _default = toExpression;
  69050. exports.default = _default;
  69051. function toExpression(node) {
  69052. if ((0, _generated.isExpressionStatement)(node)) {
  69053. node = node.expression;
  69054. }
  69055. if ((0, _generated.isExpression)(node)) {
  69056. return node;
  69057. }
  69058. if ((0, _generated.isClass)(node)) {
  69059. node.type = "ClassExpression";
  69060. } else if ((0, _generated.isFunction)(node)) {
  69061. node.type = "FunctionExpression";
  69062. }
  69063. if (!(0, _generated.isExpression)(node)) {
  69064. throw new Error(`cannot turn ${node.type} to an expression`);
  69065. }
  69066. return node;
  69067. }
  69068. }
  69069. });
  69070. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverseFast.js
  69071. var require_traverseFast3 = __commonJS({
  69072. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  69073. "use strict";
  69074. Object.defineProperty(exports, "__esModule", {
  69075. value: true
  69076. });
  69077. exports.default = traverseFast;
  69078. var _definitions = require_definitions3();
  69079. function traverseFast(node, enter, opts) {
  69080. if (!node)
  69081. return;
  69082. const keys2 = _definitions.VISITOR_KEYS[node.type];
  69083. if (!keys2)
  69084. return;
  69085. opts = opts || {};
  69086. enter(node, opts);
  69087. for (const key of keys2) {
  69088. const subNode = node[key];
  69089. if (Array.isArray(subNode)) {
  69090. for (const node2 of subNode) {
  69091. traverseFast(node2, enter, opts);
  69092. }
  69093. } else {
  69094. traverseFast(subNode, enter, opts);
  69095. }
  69096. }
  69097. }
  69098. }
  69099. });
  69100. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removeProperties.js
  69101. var require_removeProperties3 = __commonJS({
  69102. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  69103. "use strict";
  69104. Object.defineProperty(exports, "__esModule", {
  69105. value: true
  69106. });
  69107. exports.default = removeProperties;
  69108. var _constants = require_constants3();
  69109. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  69110. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  69111. function removeProperties(node, opts = {}) {
  69112. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  69113. for (const key of map) {
  69114. if (node[key] != null)
  69115. node[key] = void 0;
  69116. }
  69117. for (const key of Object.keys(node)) {
  69118. if (key[0] === "_" && node[key] != null)
  69119. node[key] = void 0;
  69120. }
  69121. const symbols = Object.getOwnPropertySymbols(node);
  69122. for (const sym of symbols) {
  69123. node[sym] = null;
  69124. }
  69125. }
  69126. }
  69127. });
  69128. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  69129. var require_removePropertiesDeep3 = __commonJS({
  69130. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  69131. "use strict";
  69132. Object.defineProperty(exports, "__esModule", {
  69133. value: true
  69134. });
  69135. exports.default = removePropertiesDeep;
  69136. var _traverseFast = require_traverseFast3();
  69137. var _removeProperties = require_removeProperties3();
  69138. function removePropertiesDeep(tree, opts) {
  69139. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  69140. return tree;
  69141. }
  69142. }
  69143. });
  69144. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toKeyAlias.js
  69145. var require_toKeyAlias3 = __commonJS({
  69146. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  69147. "use strict";
  69148. Object.defineProperty(exports, "__esModule", {
  69149. value: true
  69150. });
  69151. exports.default = toKeyAlias;
  69152. var _generated = require_generated11();
  69153. var _cloneNode = require_cloneNode3();
  69154. var _removePropertiesDeep = require_removePropertiesDeep3();
  69155. function toKeyAlias(node, key = node.key) {
  69156. let alias;
  69157. if (node.kind === "method") {
  69158. return toKeyAlias.increment() + "";
  69159. } else if ((0, _generated.isIdentifier)(key)) {
  69160. alias = key.name;
  69161. } else if ((0, _generated.isStringLiteral)(key)) {
  69162. alias = JSON.stringify(key.value);
  69163. } else {
  69164. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  69165. }
  69166. if (node.computed) {
  69167. alias = `[${alias}]`;
  69168. }
  69169. if (node.static) {
  69170. alias = `static:${alias}`;
  69171. }
  69172. return alias;
  69173. }
  69174. toKeyAlias.uid = 0;
  69175. toKeyAlias.increment = function() {
  69176. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  69177. return toKeyAlias.uid = 0;
  69178. } else {
  69179. return toKeyAlias.uid++;
  69180. }
  69181. };
  69182. }
  69183. });
  69184. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  69185. var require_getBindingIdentifiers3 = __commonJS({
  69186. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  69187. "use strict";
  69188. Object.defineProperty(exports, "__esModule", {
  69189. value: true
  69190. });
  69191. exports.default = getBindingIdentifiers;
  69192. var _generated = require_generated11();
  69193. function getBindingIdentifiers(node, duplicates, outerOnly) {
  69194. let search2 = [].concat(node);
  69195. const ids = /* @__PURE__ */ Object.create(null);
  69196. while (search2.length) {
  69197. const id = search2.shift();
  69198. if (!id)
  69199. continue;
  69200. const keys2 = getBindingIdentifiers.keys[id.type];
  69201. if ((0, _generated.isIdentifier)(id)) {
  69202. if (duplicates) {
  69203. const _ids = ids[id.name] = ids[id.name] || [];
  69204. _ids.push(id);
  69205. } else {
  69206. ids[id.name] = id;
  69207. }
  69208. continue;
  69209. }
  69210. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  69211. if ((0, _generated.isDeclaration)(id.declaration)) {
  69212. search2.push(id.declaration);
  69213. }
  69214. continue;
  69215. }
  69216. if (outerOnly) {
  69217. if ((0, _generated.isFunctionDeclaration)(id)) {
  69218. search2.push(id.id);
  69219. continue;
  69220. }
  69221. if ((0, _generated.isFunctionExpression)(id)) {
  69222. continue;
  69223. }
  69224. }
  69225. if (keys2) {
  69226. for (let i = 0; i < keys2.length; i++) {
  69227. const key = keys2[i];
  69228. if (id[key]) {
  69229. search2 = search2.concat(id[key]);
  69230. }
  69231. }
  69232. }
  69233. }
  69234. return ids;
  69235. }
  69236. getBindingIdentifiers.keys = {
  69237. DeclareClass: ["id"],
  69238. DeclareFunction: ["id"],
  69239. DeclareModule: ["id"],
  69240. DeclareVariable: ["id"],
  69241. DeclareInterface: ["id"],
  69242. DeclareTypeAlias: ["id"],
  69243. DeclareOpaqueType: ["id"],
  69244. InterfaceDeclaration: ["id"],
  69245. TypeAlias: ["id"],
  69246. OpaqueType: ["id"],
  69247. CatchClause: ["param"],
  69248. LabeledStatement: ["label"],
  69249. UnaryExpression: ["argument"],
  69250. AssignmentExpression: ["left"],
  69251. ImportSpecifier: ["local"],
  69252. ImportNamespaceSpecifier: ["local"],
  69253. ImportDefaultSpecifier: ["local"],
  69254. ImportDeclaration: ["specifiers"],
  69255. ExportSpecifier: ["exported"],
  69256. ExportNamespaceSpecifier: ["exported"],
  69257. ExportDefaultSpecifier: ["exported"],
  69258. FunctionDeclaration: ["id", "params"],
  69259. FunctionExpression: ["id", "params"],
  69260. ArrowFunctionExpression: ["params"],
  69261. ObjectMethod: ["params"],
  69262. ClassMethod: ["params"],
  69263. ForInStatement: ["left"],
  69264. ForOfStatement: ["left"],
  69265. ClassDeclaration: ["id"],
  69266. ClassExpression: ["id"],
  69267. RestElement: ["argument"],
  69268. UpdateExpression: ["argument"],
  69269. ObjectProperty: ["value"],
  69270. AssignmentPattern: ["left"],
  69271. ArrayPattern: ["elements"],
  69272. ObjectPattern: ["properties"],
  69273. VariableDeclaration: ["declarations"],
  69274. VariableDeclarator: ["id"]
  69275. };
  69276. }
  69277. });
  69278. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  69279. var require_gatherSequenceExpressions3 = __commonJS({
  69280. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  69281. "use strict";
  69282. Object.defineProperty(exports, "__esModule", {
  69283. value: true
  69284. });
  69285. exports.default = gatherSequenceExpressions;
  69286. var _getBindingIdentifiers = require_getBindingIdentifiers3();
  69287. var _generated = require_generated11();
  69288. var _generated2 = require_generated12();
  69289. var _cloneNode = require_cloneNode3();
  69290. function gatherSequenceExpressions(nodes, scope, declars) {
  69291. const exprs = [];
  69292. let ensureLastUndefined = true;
  69293. for (const node of nodes) {
  69294. if (!(0, _generated.isEmptyStatement)(node)) {
  69295. ensureLastUndefined = false;
  69296. }
  69297. if ((0, _generated.isExpression)(node)) {
  69298. exprs.push(node);
  69299. } else if ((0, _generated.isExpressionStatement)(node)) {
  69300. exprs.push(node.expression);
  69301. } else if ((0, _generated.isVariableDeclaration)(node)) {
  69302. if (node.kind !== "var")
  69303. return;
  69304. for (const declar of node.declarations) {
  69305. const bindings = (0, _getBindingIdentifiers.default)(declar);
  69306. for (const key of Object.keys(bindings)) {
  69307. declars.push({
  69308. kind: node.kind,
  69309. id: (0, _cloneNode.default)(bindings[key])
  69310. });
  69311. }
  69312. if (declar.init) {
  69313. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  69314. }
  69315. }
  69316. ensureLastUndefined = true;
  69317. } else if ((0, _generated.isIfStatement)(node)) {
  69318. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  69319. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  69320. if (!consequent || !alternate)
  69321. return;
  69322. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  69323. } else if ((0, _generated.isBlockStatement)(node)) {
  69324. const body = gatherSequenceExpressions(node.body, scope, declars);
  69325. if (!body)
  69326. return;
  69327. exprs.push(body);
  69328. } else if ((0, _generated.isEmptyStatement)(node)) {
  69329. if (nodes.indexOf(node) === 0) {
  69330. ensureLastUndefined = true;
  69331. }
  69332. } else {
  69333. return;
  69334. }
  69335. }
  69336. if (ensureLastUndefined) {
  69337. exprs.push(scope.buildUndefinedNode());
  69338. }
  69339. if (exprs.length === 1) {
  69340. return exprs[0];
  69341. } else {
  69342. return (0, _generated2.sequenceExpression)(exprs);
  69343. }
  69344. }
  69345. }
  69346. });
  69347. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  69348. var require_toSequenceExpression3 = __commonJS({
  69349. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  69350. "use strict";
  69351. Object.defineProperty(exports, "__esModule", {
  69352. value: true
  69353. });
  69354. exports.default = toSequenceExpression;
  69355. var _gatherSequenceExpressions = require_gatherSequenceExpressions3();
  69356. function toSequenceExpression(nodes, scope) {
  69357. if (!(nodes != null && nodes.length))
  69358. return;
  69359. const declars = [];
  69360. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  69361. if (!result)
  69362. return;
  69363. for (const declar of declars) {
  69364. scope.push(declar);
  69365. }
  69366. return result;
  69367. }
  69368. }
  69369. });
  69370. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toStatement.js
  69371. var require_toStatement3 = __commonJS({
  69372. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  69373. "use strict";
  69374. Object.defineProperty(exports, "__esModule", {
  69375. value: true
  69376. });
  69377. exports.default = void 0;
  69378. var _generated = require_generated11();
  69379. var _generated2 = require_generated12();
  69380. var _default = toStatement;
  69381. exports.default = _default;
  69382. function toStatement(node, ignore3) {
  69383. if ((0, _generated.isStatement)(node)) {
  69384. return node;
  69385. }
  69386. let mustHaveId = false;
  69387. let newType;
  69388. if ((0, _generated.isClass)(node)) {
  69389. mustHaveId = true;
  69390. newType = "ClassDeclaration";
  69391. } else if ((0, _generated.isFunction)(node)) {
  69392. mustHaveId = true;
  69393. newType = "FunctionDeclaration";
  69394. } else if ((0, _generated.isAssignmentExpression)(node)) {
  69395. return (0, _generated2.expressionStatement)(node);
  69396. }
  69397. if (mustHaveId && !node.id) {
  69398. newType = false;
  69399. }
  69400. if (!newType) {
  69401. if (ignore3) {
  69402. return false;
  69403. } else {
  69404. throw new Error(`cannot turn ${node.type} to a statement`);
  69405. }
  69406. }
  69407. node.type = newType;
  69408. return node;
  69409. }
  69410. }
  69411. });
  69412. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/valueToNode.js
  69413. var require_valueToNode3 = __commonJS({
  69414. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  69415. "use strict";
  69416. Object.defineProperty(exports, "__esModule", {
  69417. value: true
  69418. });
  69419. exports.default = void 0;
  69420. var _isValidIdentifier = require_isValidIdentifier3();
  69421. var _generated = require_generated12();
  69422. var _default = valueToNode;
  69423. exports.default = _default;
  69424. var objectToString = Function.call.bind(Object.prototype.toString);
  69425. function isRegExp(value) {
  69426. return objectToString(value) === "[object RegExp]";
  69427. }
  69428. function isPlainObject2(value) {
  69429. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  69430. return false;
  69431. }
  69432. const proto = Object.getPrototypeOf(value);
  69433. return proto === null || Object.getPrototypeOf(proto) === null;
  69434. }
  69435. function valueToNode(value) {
  69436. if (value === void 0) {
  69437. return (0, _generated.identifier)("undefined");
  69438. }
  69439. if (value === true || value === false) {
  69440. return (0, _generated.booleanLiteral)(value);
  69441. }
  69442. if (value === null) {
  69443. return (0, _generated.nullLiteral)();
  69444. }
  69445. if (typeof value === "string") {
  69446. return (0, _generated.stringLiteral)(value);
  69447. }
  69448. if (typeof value === "number") {
  69449. let result;
  69450. if (Number.isFinite(value)) {
  69451. result = (0, _generated.numericLiteral)(Math.abs(value));
  69452. } else {
  69453. let numerator;
  69454. if (Number.isNaN(value)) {
  69455. numerator = (0, _generated.numericLiteral)(0);
  69456. } else {
  69457. numerator = (0, _generated.numericLiteral)(1);
  69458. }
  69459. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  69460. }
  69461. if (value < 0 || Object.is(value, -0)) {
  69462. result = (0, _generated.unaryExpression)("-", result);
  69463. }
  69464. return result;
  69465. }
  69466. if (isRegExp(value)) {
  69467. const pattern = value.source;
  69468. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  69469. return (0, _generated.regExpLiteral)(pattern, flags);
  69470. }
  69471. if (Array.isArray(value)) {
  69472. return (0, _generated.arrayExpression)(value.map(valueToNode));
  69473. }
  69474. if (isPlainObject2(value)) {
  69475. const props = [];
  69476. for (const key of Object.keys(value)) {
  69477. let nodeKey;
  69478. if ((0, _isValidIdentifier.default)(key)) {
  69479. nodeKey = (0, _generated.identifier)(key);
  69480. } else {
  69481. nodeKey = (0, _generated.stringLiteral)(key);
  69482. }
  69483. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  69484. }
  69485. return (0, _generated.objectExpression)(props);
  69486. }
  69487. throw new Error("don't know how to turn this value into a node");
  69488. }
  69489. }
  69490. });
  69491. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  69492. var require_appendToMemberExpression3 = __commonJS({
  69493. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  69494. "use strict";
  69495. Object.defineProperty(exports, "__esModule", {
  69496. value: true
  69497. });
  69498. exports.default = appendToMemberExpression;
  69499. var _generated = require_generated12();
  69500. function appendToMemberExpression(member, append, computed = false) {
  69501. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  69502. member.property = append;
  69503. member.computed = !!computed;
  69504. return member;
  69505. }
  69506. }
  69507. });
  69508. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/inherits.js
  69509. var require_inherits3 = __commonJS({
  69510. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  69511. "use strict";
  69512. Object.defineProperty(exports, "__esModule", {
  69513. value: true
  69514. });
  69515. exports.default = inherits;
  69516. var _constants = require_constants3();
  69517. var _inheritsComments = require_inheritsComments3();
  69518. function inherits(child, parent) {
  69519. if (!child || !parent)
  69520. return child;
  69521. for (const key of _constants.INHERIT_KEYS.optional) {
  69522. if (child[key] == null) {
  69523. child[key] = parent[key];
  69524. }
  69525. }
  69526. for (const key of Object.keys(parent)) {
  69527. if (key[0] === "_" && key !== "__clone")
  69528. child[key] = parent[key];
  69529. }
  69530. for (const key of _constants.INHERIT_KEYS.force) {
  69531. child[key] = parent[key];
  69532. }
  69533. (0, _inheritsComments.default)(child, parent);
  69534. return child;
  69535. }
  69536. }
  69537. });
  69538. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  69539. var require_prependToMemberExpression3 = __commonJS({
  69540. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  69541. "use strict";
  69542. Object.defineProperty(exports, "__esModule", {
  69543. value: true
  69544. });
  69545. exports.default = prependToMemberExpression;
  69546. var _generated = require_generated12();
  69547. function prependToMemberExpression(member, prepend) {
  69548. member.object = (0, _generated.memberExpression)(prepend, member.object);
  69549. return member;
  69550. }
  69551. }
  69552. });
  69553. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  69554. var require_getOuterBindingIdentifiers3 = __commonJS({
  69555. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  69556. "use strict";
  69557. Object.defineProperty(exports, "__esModule", {
  69558. value: true
  69559. });
  69560. exports.default = void 0;
  69561. var _getBindingIdentifiers = require_getBindingIdentifiers3();
  69562. var _default = getOuterBindingIdentifiers;
  69563. exports.default = _default;
  69564. function getOuterBindingIdentifiers(node, duplicates) {
  69565. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  69566. }
  69567. }
  69568. });
  69569. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverse.js
  69570. var require_traverse3 = __commonJS({
  69571. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  69572. "use strict";
  69573. Object.defineProperty(exports, "__esModule", {
  69574. value: true
  69575. });
  69576. exports.default = traverse;
  69577. var _definitions = require_definitions3();
  69578. function traverse(node, handlers2, state) {
  69579. if (typeof handlers2 === "function") {
  69580. handlers2 = {
  69581. enter: handlers2
  69582. };
  69583. }
  69584. const {
  69585. enter,
  69586. exit: exit2
  69587. } = handlers2;
  69588. traverseSimpleImpl(node, enter, exit2, state, []);
  69589. }
  69590. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  69591. const keys2 = _definitions.VISITOR_KEYS[node.type];
  69592. if (!keys2)
  69593. return;
  69594. if (enter)
  69595. enter(node, ancestors, state);
  69596. for (const key of keys2) {
  69597. const subNode = node[key];
  69598. if (Array.isArray(subNode)) {
  69599. for (let i = 0; i < subNode.length; i++) {
  69600. const child = subNode[i];
  69601. if (!child)
  69602. continue;
  69603. ancestors.push({
  69604. node,
  69605. key,
  69606. index: i
  69607. });
  69608. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  69609. ancestors.pop();
  69610. }
  69611. } else if (subNode) {
  69612. ancestors.push({
  69613. node,
  69614. key
  69615. });
  69616. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  69617. ancestors.pop();
  69618. }
  69619. }
  69620. if (exit2)
  69621. exit2(node, ancestors, state);
  69622. }
  69623. }
  69624. });
  69625. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBinding.js
  69626. var require_isBinding3 = __commonJS({
  69627. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  69628. "use strict";
  69629. Object.defineProperty(exports, "__esModule", {
  69630. value: true
  69631. });
  69632. exports.default = isBinding;
  69633. var _getBindingIdentifiers = require_getBindingIdentifiers3();
  69634. function isBinding(node, parent, grandparent) {
  69635. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  69636. return false;
  69637. }
  69638. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  69639. if (keys2) {
  69640. for (let i = 0; i < keys2.length; i++) {
  69641. const key = keys2[i];
  69642. const val = parent[key];
  69643. if (Array.isArray(val)) {
  69644. if (val.indexOf(node) >= 0)
  69645. return true;
  69646. } else {
  69647. if (val === node)
  69648. return true;
  69649. }
  69650. }
  69651. }
  69652. return false;
  69653. }
  69654. }
  69655. });
  69656. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isLet.js
  69657. var require_isLet3 = __commonJS({
  69658. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  69659. "use strict";
  69660. Object.defineProperty(exports, "__esModule", {
  69661. value: true
  69662. });
  69663. exports.default = isLet;
  69664. var _generated = require_generated11();
  69665. var _constants = require_constants3();
  69666. function isLet(node) {
  69667. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  69668. }
  69669. }
  69670. });
  69671. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBlockScoped.js
  69672. var require_isBlockScoped3 = __commonJS({
  69673. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  69674. "use strict";
  69675. Object.defineProperty(exports, "__esModule", {
  69676. value: true
  69677. });
  69678. exports.default = isBlockScoped;
  69679. var _generated = require_generated11();
  69680. var _isLet = require_isLet3();
  69681. function isBlockScoped(node) {
  69682. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  69683. }
  69684. }
  69685. });
  69686. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isImmutable.js
  69687. var require_isImmutable3 = __commonJS({
  69688. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  69689. "use strict";
  69690. Object.defineProperty(exports, "__esModule", {
  69691. value: true
  69692. });
  69693. exports.default = isImmutable;
  69694. var _isType = require_isType3();
  69695. var _generated = require_generated11();
  69696. function isImmutable(node) {
  69697. if ((0, _isType.default)(node.type, "Immutable"))
  69698. return true;
  69699. if ((0, _generated.isIdentifier)(node)) {
  69700. if (node.name === "undefined") {
  69701. return true;
  69702. } else {
  69703. return false;
  69704. }
  69705. }
  69706. return false;
  69707. }
  69708. }
  69709. });
  69710. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  69711. var require_isNodesEquivalent3 = __commonJS({
  69712. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  69713. "use strict";
  69714. Object.defineProperty(exports, "__esModule", {
  69715. value: true
  69716. });
  69717. exports.default = isNodesEquivalent;
  69718. var _definitions = require_definitions3();
  69719. function isNodesEquivalent(a, b) {
  69720. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  69721. return a === b;
  69722. }
  69723. if (a.type !== b.type) {
  69724. return false;
  69725. }
  69726. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  69727. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  69728. for (const field of fields) {
  69729. if (typeof a[field] !== typeof b[field]) {
  69730. return false;
  69731. }
  69732. if (a[field] == null && b[field] == null) {
  69733. continue;
  69734. } else if (a[field] == null || b[field] == null) {
  69735. return false;
  69736. }
  69737. if (Array.isArray(a[field])) {
  69738. if (!Array.isArray(b[field])) {
  69739. return false;
  69740. }
  69741. if (a[field].length !== b[field].length) {
  69742. return false;
  69743. }
  69744. for (let i = 0; i < a[field].length; i++) {
  69745. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  69746. return false;
  69747. }
  69748. }
  69749. continue;
  69750. }
  69751. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  69752. for (const key of Object.keys(a[field])) {
  69753. if (a[field][key] !== b[field][key]) {
  69754. return false;
  69755. }
  69756. }
  69757. continue;
  69758. }
  69759. if (!isNodesEquivalent(a[field], b[field])) {
  69760. return false;
  69761. }
  69762. }
  69763. return true;
  69764. }
  69765. }
  69766. });
  69767. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isReferenced.js
  69768. var require_isReferenced3 = __commonJS({
  69769. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  69770. "use strict";
  69771. Object.defineProperty(exports, "__esModule", {
  69772. value: true
  69773. });
  69774. exports.default = isReferenced;
  69775. function isReferenced(node, parent, grandparent) {
  69776. switch (parent.type) {
  69777. case "MemberExpression":
  69778. case "JSXMemberExpression":
  69779. case "OptionalMemberExpression":
  69780. if (parent.property === node) {
  69781. return !!parent.computed;
  69782. }
  69783. return parent.object === node;
  69784. case "VariableDeclarator":
  69785. return parent.init === node;
  69786. case "ArrowFunctionExpression":
  69787. return parent.body === node;
  69788. case "PrivateName":
  69789. return false;
  69790. case "ClassMethod":
  69791. case "ClassPrivateMethod":
  69792. case "ObjectMethod":
  69793. if (parent.params.includes(node)) {
  69794. return false;
  69795. }
  69796. case "ObjectProperty":
  69797. case "ClassProperty":
  69798. case "ClassPrivateProperty":
  69799. if (parent.key === node) {
  69800. return !!parent.computed;
  69801. }
  69802. if (parent.value === node) {
  69803. return !grandparent || grandparent.type !== "ObjectPattern";
  69804. }
  69805. return true;
  69806. case "ClassDeclaration":
  69807. case "ClassExpression":
  69808. return parent.superClass === node;
  69809. case "AssignmentExpression":
  69810. return parent.right === node;
  69811. case "AssignmentPattern":
  69812. return parent.right === node;
  69813. case "LabeledStatement":
  69814. return false;
  69815. case "CatchClause":
  69816. return false;
  69817. case "RestElement":
  69818. return false;
  69819. case "BreakStatement":
  69820. case "ContinueStatement":
  69821. return false;
  69822. case "FunctionDeclaration":
  69823. case "FunctionExpression":
  69824. return false;
  69825. case "ExportNamespaceSpecifier":
  69826. case "ExportDefaultSpecifier":
  69827. return false;
  69828. case "ExportSpecifier":
  69829. if (grandparent != null && grandparent.source) {
  69830. return false;
  69831. }
  69832. return parent.local === node;
  69833. case "ImportDefaultSpecifier":
  69834. case "ImportNamespaceSpecifier":
  69835. case "ImportSpecifier":
  69836. return false;
  69837. case "JSXAttribute":
  69838. return false;
  69839. case "ObjectPattern":
  69840. case "ArrayPattern":
  69841. return false;
  69842. case "MetaProperty":
  69843. return false;
  69844. case "ObjectTypeProperty":
  69845. return parent.key !== node;
  69846. case "TSEnumMember":
  69847. return parent.id !== node;
  69848. case "TSPropertySignature":
  69849. if (parent.key === node) {
  69850. return !!parent.computed;
  69851. }
  69852. return true;
  69853. }
  69854. return true;
  69855. }
  69856. }
  69857. });
  69858. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isScope.js
  69859. var require_isScope3 = __commonJS({
  69860. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  69861. "use strict";
  69862. Object.defineProperty(exports, "__esModule", {
  69863. value: true
  69864. });
  69865. exports.default = isScope;
  69866. var _generated = require_generated11();
  69867. function isScope(node, parent) {
  69868. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  69869. return false;
  69870. }
  69871. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  69872. return true;
  69873. }
  69874. return (0, _generated.isScopable)(node);
  69875. }
  69876. }
  69877. });
  69878. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  69879. var require_isSpecifierDefault3 = __commonJS({
  69880. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  69881. "use strict";
  69882. Object.defineProperty(exports, "__esModule", {
  69883. value: true
  69884. });
  69885. exports.default = isSpecifierDefault;
  69886. var _generated = require_generated11();
  69887. function isSpecifierDefault(specifier) {
  69888. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  69889. name: "default"
  69890. });
  69891. }
  69892. }
  69893. });
  69894. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  69895. var require_isValidES3Identifier3 = __commonJS({
  69896. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  69897. "use strict";
  69898. Object.defineProperty(exports, "__esModule", {
  69899. value: true
  69900. });
  69901. exports.default = isValidES3Identifier;
  69902. var _isValidIdentifier = require_isValidIdentifier3();
  69903. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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"]);
  69904. function isValidES3Identifier(name2) {
  69905. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  69906. }
  69907. }
  69908. });
  69909. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isVar.js
  69910. var require_isVar3 = __commonJS({
  69911. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  69912. "use strict";
  69913. Object.defineProperty(exports, "__esModule", {
  69914. value: true
  69915. });
  69916. exports.default = isVar;
  69917. var _generated = require_generated11();
  69918. var _constants = require_constants3();
  69919. function isVar(node) {
  69920. return (0, _generated.isVariableDeclaration)(node, {
  69921. kind: "var"
  69922. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  69923. }
  69924. }
  69925. });
  69926. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/ast-types/generated/index.js
  69927. var require_generated15 = __commonJS({
  69928. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  69929. }
  69930. });
  69931. // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/index.js
  69932. var require_lib16 = __commonJS({
  69933. "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/index.js"(exports) {
  69934. "use strict";
  69935. Object.defineProperty(exports, "__esModule", {
  69936. value: true
  69937. });
  69938. var _exportNames = {
  69939. react: true,
  69940. assertNode: true,
  69941. createTypeAnnotationBasedOnTypeof: true,
  69942. createUnionTypeAnnotation: true,
  69943. createFlowUnionType: true,
  69944. createTSUnionType: true,
  69945. cloneNode: true,
  69946. clone: true,
  69947. cloneDeep: true,
  69948. cloneDeepWithoutLoc: true,
  69949. cloneWithoutLoc: true,
  69950. addComment: true,
  69951. addComments: true,
  69952. inheritInnerComments: true,
  69953. inheritLeadingComments: true,
  69954. inheritsComments: true,
  69955. inheritTrailingComments: true,
  69956. removeComments: true,
  69957. ensureBlock: true,
  69958. toBindingIdentifierName: true,
  69959. toBlock: true,
  69960. toComputedKey: true,
  69961. toExpression: true,
  69962. toIdentifier: true,
  69963. toKeyAlias: true,
  69964. toSequenceExpression: true,
  69965. toStatement: true,
  69966. valueToNode: true,
  69967. appendToMemberExpression: true,
  69968. inherits: true,
  69969. prependToMemberExpression: true,
  69970. removeProperties: true,
  69971. removePropertiesDeep: true,
  69972. removeTypeDuplicates: true,
  69973. getBindingIdentifiers: true,
  69974. getOuterBindingIdentifiers: true,
  69975. traverse: true,
  69976. traverseFast: true,
  69977. shallowEqual: true,
  69978. is: true,
  69979. isBinding: true,
  69980. isBlockScoped: true,
  69981. isImmutable: true,
  69982. isLet: true,
  69983. isNode: true,
  69984. isNodesEquivalent: true,
  69985. isPlaceholderType: true,
  69986. isReferenced: true,
  69987. isScope: true,
  69988. isSpecifierDefault: true,
  69989. isType: true,
  69990. isValidES3Identifier: true,
  69991. isValidIdentifier: true,
  69992. isVar: true,
  69993. matchesPattern: true,
  69994. validate: true,
  69995. buildMatchMemberExpression: true
  69996. };
  69997. Object.defineProperty(exports, "assertNode", {
  69998. enumerable: true,
  69999. get: function() {
  70000. return _assertNode.default;
  70001. }
  70002. });
  70003. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  70004. enumerable: true,
  70005. get: function() {
  70006. return _createTypeAnnotationBasedOnTypeof.default;
  70007. }
  70008. });
  70009. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  70010. enumerable: true,
  70011. get: function() {
  70012. return _createFlowUnionType.default;
  70013. }
  70014. });
  70015. Object.defineProperty(exports, "createFlowUnionType", {
  70016. enumerable: true,
  70017. get: function() {
  70018. return _createFlowUnionType.default;
  70019. }
  70020. });
  70021. Object.defineProperty(exports, "createTSUnionType", {
  70022. enumerable: true,
  70023. get: function() {
  70024. return _createTSUnionType.default;
  70025. }
  70026. });
  70027. Object.defineProperty(exports, "cloneNode", {
  70028. enumerable: true,
  70029. get: function() {
  70030. return _cloneNode.default;
  70031. }
  70032. });
  70033. Object.defineProperty(exports, "clone", {
  70034. enumerable: true,
  70035. get: function() {
  70036. return _clone.default;
  70037. }
  70038. });
  70039. Object.defineProperty(exports, "cloneDeep", {
  70040. enumerable: true,
  70041. get: function() {
  70042. return _cloneDeep.default;
  70043. }
  70044. });
  70045. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  70046. enumerable: true,
  70047. get: function() {
  70048. return _cloneDeepWithoutLoc.default;
  70049. }
  70050. });
  70051. Object.defineProperty(exports, "cloneWithoutLoc", {
  70052. enumerable: true,
  70053. get: function() {
  70054. return _cloneWithoutLoc.default;
  70055. }
  70056. });
  70057. Object.defineProperty(exports, "addComment", {
  70058. enumerable: true,
  70059. get: function() {
  70060. return _addComment.default;
  70061. }
  70062. });
  70063. Object.defineProperty(exports, "addComments", {
  70064. enumerable: true,
  70065. get: function() {
  70066. return _addComments.default;
  70067. }
  70068. });
  70069. Object.defineProperty(exports, "inheritInnerComments", {
  70070. enumerable: true,
  70071. get: function() {
  70072. return _inheritInnerComments.default;
  70073. }
  70074. });
  70075. Object.defineProperty(exports, "inheritLeadingComments", {
  70076. enumerable: true,
  70077. get: function() {
  70078. return _inheritLeadingComments.default;
  70079. }
  70080. });
  70081. Object.defineProperty(exports, "inheritsComments", {
  70082. enumerable: true,
  70083. get: function() {
  70084. return _inheritsComments.default;
  70085. }
  70086. });
  70087. Object.defineProperty(exports, "inheritTrailingComments", {
  70088. enumerable: true,
  70089. get: function() {
  70090. return _inheritTrailingComments.default;
  70091. }
  70092. });
  70093. Object.defineProperty(exports, "removeComments", {
  70094. enumerable: true,
  70095. get: function() {
  70096. return _removeComments.default;
  70097. }
  70098. });
  70099. Object.defineProperty(exports, "ensureBlock", {
  70100. enumerable: true,
  70101. get: function() {
  70102. return _ensureBlock.default;
  70103. }
  70104. });
  70105. Object.defineProperty(exports, "toBindingIdentifierName", {
  70106. enumerable: true,
  70107. get: function() {
  70108. return _toBindingIdentifierName.default;
  70109. }
  70110. });
  70111. Object.defineProperty(exports, "toBlock", {
  70112. enumerable: true,
  70113. get: function() {
  70114. return _toBlock.default;
  70115. }
  70116. });
  70117. Object.defineProperty(exports, "toComputedKey", {
  70118. enumerable: true,
  70119. get: function() {
  70120. return _toComputedKey.default;
  70121. }
  70122. });
  70123. Object.defineProperty(exports, "toExpression", {
  70124. enumerable: true,
  70125. get: function() {
  70126. return _toExpression.default;
  70127. }
  70128. });
  70129. Object.defineProperty(exports, "toIdentifier", {
  70130. enumerable: true,
  70131. get: function() {
  70132. return _toIdentifier.default;
  70133. }
  70134. });
  70135. Object.defineProperty(exports, "toKeyAlias", {
  70136. enumerable: true,
  70137. get: function() {
  70138. return _toKeyAlias.default;
  70139. }
  70140. });
  70141. Object.defineProperty(exports, "toSequenceExpression", {
  70142. enumerable: true,
  70143. get: function() {
  70144. return _toSequenceExpression.default;
  70145. }
  70146. });
  70147. Object.defineProperty(exports, "toStatement", {
  70148. enumerable: true,
  70149. get: function() {
  70150. return _toStatement.default;
  70151. }
  70152. });
  70153. Object.defineProperty(exports, "valueToNode", {
  70154. enumerable: true,
  70155. get: function() {
  70156. return _valueToNode.default;
  70157. }
  70158. });
  70159. Object.defineProperty(exports, "appendToMemberExpression", {
  70160. enumerable: true,
  70161. get: function() {
  70162. return _appendToMemberExpression.default;
  70163. }
  70164. });
  70165. Object.defineProperty(exports, "inherits", {
  70166. enumerable: true,
  70167. get: function() {
  70168. return _inherits.default;
  70169. }
  70170. });
  70171. Object.defineProperty(exports, "prependToMemberExpression", {
  70172. enumerable: true,
  70173. get: function() {
  70174. return _prependToMemberExpression.default;
  70175. }
  70176. });
  70177. Object.defineProperty(exports, "removeProperties", {
  70178. enumerable: true,
  70179. get: function() {
  70180. return _removeProperties.default;
  70181. }
  70182. });
  70183. Object.defineProperty(exports, "removePropertiesDeep", {
  70184. enumerable: true,
  70185. get: function() {
  70186. return _removePropertiesDeep.default;
  70187. }
  70188. });
  70189. Object.defineProperty(exports, "removeTypeDuplicates", {
  70190. enumerable: true,
  70191. get: function() {
  70192. return _removeTypeDuplicates.default;
  70193. }
  70194. });
  70195. Object.defineProperty(exports, "getBindingIdentifiers", {
  70196. enumerable: true,
  70197. get: function() {
  70198. return _getBindingIdentifiers.default;
  70199. }
  70200. });
  70201. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  70202. enumerable: true,
  70203. get: function() {
  70204. return _getOuterBindingIdentifiers.default;
  70205. }
  70206. });
  70207. Object.defineProperty(exports, "traverse", {
  70208. enumerable: true,
  70209. get: function() {
  70210. return _traverse.default;
  70211. }
  70212. });
  70213. Object.defineProperty(exports, "traverseFast", {
  70214. enumerable: true,
  70215. get: function() {
  70216. return _traverseFast.default;
  70217. }
  70218. });
  70219. Object.defineProperty(exports, "shallowEqual", {
  70220. enumerable: true,
  70221. get: function() {
  70222. return _shallowEqual.default;
  70223. }
  70224. });
  70225. Object.defineProperty(exports, "is", {
  70226. enumerable: true,
  70227. get: function() {
  70228. return _is.default;
  70229. }
  70230. });
  70231. Object.defineProperty(exports, "isBinding", {
  70232. enumerable: true,
  70233. get: function() {
  70234. return _isBinding.default;
  70235. }
  70236. });
  70237. Object.defineProperty(exports, "isBlockScoped", {
  70238. enumerable: true,
  70239. get: function() {
  70240. return _isBlockScoped.default;
  70241. }
  70242. });
  70243. Object.defineProperty(exports, "isImmutable", {
  70244. enumerable: true,
  70245. get: function() {
  70246. return _isImmutable.default;
  70247. }
  70248. });
  70249. Object.defineProperty(exports, "isLet", {
  70250. enumerable: true,
  70251. get: function() {
  70252. return _isLet.default;
  70253. }
  70254. });
  70255. Object.defineProperty(exports, "isNode", {
  70256. enumerable: true,
  70257. get: function() {
  70258. return _isNode.default;
  70259. }
  70260. });
  70261. Object.defineProperty(exports, "isNodesEquivalent", {
  70262. enumerable: true,
  70263. get: function() {
  70264. return _isNodesEquivalent.default;
  70265. }
  70266. });
  70267. Object.defineProperty(exports, "isPlaceholderType", {
  70268. enumerable: true,
  70269. get: function() {
  70270. return _isPlaceholderType.default;
  70271. }
  70272. });
  70273. Object.defineProperty(exports, "isReferenced", {
  70274. enumerable: true,
  70275. get: function() {
  70276. return _isReferenced.default;
  70277. }
  70278. });
  70279. Object.defineProperty(exports, "isScope", {
  70280. enumerable: true,
  70281. get: function() {
  70282. return _isScope.default;
  70283. }
  70284. });
  70285. Object.defineProperty(exports, "isSpecifierDefault", {
  70286. enumerable: true,
  70287. get: function() {
  70288. return _isSpecifierDefault.default;
  70289. }
  70290. });
  70291. Object.defineProperty(exports, "isType", {
  70292. enumerable: true,
  70293. get: function() {
  70294. return _isType.default;
  70295. }
  70296. });
  70297. Object.defineProperty(exports, "isValidES3Identifier", {
  70298. enumerable: true,
  70299. get: function() {
  70300. return _isValidES3Identifier.default;
  70301. }
  70302. });
  70303. Object.defineProperty(exports, "isValidIdentifier", {
  70304. enumerable: true,
  70305. get: function() {
  70306. return _isValidIdentifier.default;
  70307. }
  70308. });
  70309. Object.defineProperty(exports, "isVar", {
  70310. enumerable: true,
  70311. get: function() {
  70312. return _isVar.default;
  70313. }
  70314. });
  70315. Object.defineProperty(exports, "matchesPattern", {
  70316. enumerable: true,
  70317. get: function() {
  70318. return _matchesPattern.default;
  70319. }
  70320. });
  70321. Object.defineProperty(exports, "validate", {
  70322. enumerable: true,
  70323. get: function() {
  70324. return _validate.default;
  70325. }
  70326. });
  70327. Object.defineProperty(exports, "buildMatchMemberExpression", {
  70328. enumerable: true,
  70329. get: function() {
  70330. return _buildMatchMemberExpression.default;
  70331. }
  70332. });
  70333. exports.react = void 0;
  70334. var _isReactComponent = require_isReactComponent3();
  70335. var _isCompatTag = require_isCompatTag3();
  70336. var _buildChildren = require_buildChildren3();
  70337. var _assertNode = require_assertNode3();
  70338. var _generated = require_generated13();
  70339. Object.keys(_generated).forEach(function(key) {
  70340. if (key === "default" || key === "__esModule")
  70341. return;
  70342. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70343. return;
  70344. if (key in exports && exports[key] === _generated[key])
  70345. return;
  70346. Object.defineProperty(exports, key, {
  70347. enumerable: true,
  70348. get: function() {
  70349. return _generated[key];
  70350. }
  70351. });
  70352. });
  70353. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof3();
  70354. var _createFlowUnionType = require_createFlowUnionType3();
  70355. var _createTSUnionType = require_createTSUnionType3();
  70356. var _generated2 = require_generated12();
  70357. Object.keys(_generated2).forEach(function(key) {
  70358. if (key === "default" || key === "__esModule")
  70359. return;
  70360. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70361. return;
  70362. if (key in exports && exports[key] === _generated2[key])
  70363. return;
  70364. Object.defineProperty(exports, key, {
  70365. enumerable: true,
  70366. get: function() {
  70367. return _generated2[key];
  70368. }
  70369. });
  70370. });
  70371. var _uppercase = require_uppercase3();
  70372. Object.keys(_uppercase).forEach(function(key) {
  70373. if (key === "default" || key === "__esModule")
  70374. return;
  70375. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70376. return;
  70377. if (key in exports && exports[key] === _uppercase[key])
  70378. return;
  70379. Object.defineProperty(exports, key, {
  70380. enumerable: true,
  70381. get: function() {
  70382. return _uppercase[key];
  70383. }
  70384. });
  70385. });
  70386. var _cloneNode = require_cloneNode3();
  70387. var _clone = require_clone3();
  70388. var _cloneDeep = require_cloneDeep3();
  70389. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc3();
  70390. var _cloneWithoutLoc = require_cloneWithoutLoc3();
  70391. var _addComment = require_addComment3();
  70392. var _addComments = require_addComments3();
  70393. var _inheritInnerComments = require_inheritInnerComments3();
  70394. var _inheritLeadingComments = require_inheritLeadingComments3();
  70395. var _inheritsComments = require_inheritsComments3();
  70396. var _inheritTrailingComments = require_inheritTrailingComments3();
  70397. var _removeComments = require_removeComments3();
  70398. var _generated3 = require_generated14();
  70399. Object.keys(_generated3).forEach(function(key) {
  70400. if (key === "default" || key === "__esModule")
  70401. return;
  70402. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70403. return;
  70404. if (key in exports && exports[key] === _generated3[key])
  70405. return;
  70406. Object.defineProperty(exports, key, {
  70407. enumerable: true,
  70408. get: function() {
  70409. return _generated3[key];
  70410. }
  70411. });
  70412. });
  70413. var _constants = require_constants3();
  70414. Object.keys(_constants).forEach(function(key) {
  70415. if (key === "default" || key === "__esModule")
  70416. return;
  70417. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70418. return;
  70419. if (key in exports && exports[key] === _constants[key])
  70420. return;
  70421. Object.defineProperty(exports, key, {
  70422. enumerable: true,
  70423. get: function() {
  70424. return _constants[key];
  70425. }
  70426. });
  70427. });
  70428. var _ensureBlock = require_ensureBlock3();
  70429. var _toBindingIdentifierName = require_toBindingIdentifierName3();
  70430. var _toBlock = require_toBlock3();
  70431. var _toComputedKey = require_toComputedKey3();
  70432. var _toExpression = require_toExpression3();
  70433. var _toIdentifier = require_toIdentifier3();
  70434. var _toKeyAlias = require_toKeyAlias3();
  70435. var _toSequenceExpression = require_toSequenceExpression3();
  70436. var _toStatement = require_toStatement3();
  70437. var _valueToNode = require_valueToNode3();
  70438. var _definitions = require_definitions3();
  70439. Object.keys(_definitions).forEach(function(key) {
  70440. if (key === "default" || key === "__esModule")
  70441. return;
  70442. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70443. return;
  70444. if (key in exports && exports[key] === _definitions[key])
  70445. return;
  70446. Object.defineProperty(exports, key, {
  70447. enumerable: true,
  70448. get: function() {
  70449. return _definitions[key];
  70450. }
  70451. });
  70452. });
  70453. var _appendToMemberExpression = require_appendToMemberExpression3();
  70454. var _inherits = require_inherits3();
  70455. var _prependToMemberExpression = require_prependToMemberExpression3();
  70456. var _removeProperties = require_removeProperties3();
  70457. var _removePropertiesDeep = require_removePropertiesDeep3();
  70458. var _removeTypeDuplicates = require_removeTypeDuplicates5();
  70459. var _getBindingIdentifiers = require_getBindingIdentifiers3();
  70460. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers3();
  70461. var _traverse = require_traverse3();
  70462. Object.keys(_traverse).forEach(function(key) {
  70463. if (key === "default" || key === "__esModule")
  70464. return;
  70465. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70466. return;
  70467. if (key in exports && exports[key] === _traverse[key])
  70468. return;
  70469. Object.defineProperty(exports, key, {
  70470. enumerable: true,
  70471. get: function() {
  70472. return _traverse[key];
  70473. }
  70474. });
  70475. });
  70476. var _traverseFast = require_traverseFast3();
  70477. var _shallowEqual = require_shallowEqual3();
  70478. var _is = require_is3();
  70479. var _isBinding = require_isBinding3();
  70480. var _isBlockScoped = require_isBlockScoped3();
  70481. var _isImmutable = require_isImmutable3();
  70482. var _isLet = require_isLet3();
  70483. var _isNode = require_isNode3();
  70484. var _isNodesEquivalent = require_isNodesEquivalent3();
  70485. var _isPlaceholderType = require_isPlaceholderType3();
  70486. var _isReferenced = require_isReferenced3();
  70487. var _isScope = require_isScope3();
  70488. var _isSpecifierDefault = require_isSpecifierDefault3();
  70489. var _isType = require_isType3();
  70490. var _isValidES3Identifier = require_isValidES3Identifier3();
  70491. var _isValidIdentifier = require_isValidIdentifier3();
  70492. var _isVar = require_isVar3();
  70493. var _matchesPattern = require_matchesPattern3();
  70494. var _validate = require_validate3();
  70495. var _buildMatchMemberExpression = require_buildMatchMemberExpression3();
  70496. var _generated4 = require_generated11();
  70497. Object.keys(_generated4).forEach(function(key) {
  70498. if (key === "default" || key === "__esModule")
  70499. return;
  70500. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70501. return;
  70502. if (key in exports && exports[key] === _generated4[key])
  70503. return;
  70504. Object.defineProperty(exports, key, {
  70505. enumerable: true,
  70506. get: function() {
  70507. return _generated4[key];
  70508. }
  70509. });
  70510. });
  70511. var _generated5 = require_generated15();
  70512. Object.keys(_generated5).forEach(function(key) {
  70513. if (key === "default" || key === "__esModule")
  70514. return;
  70515. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  70516. return;
  70517. if (key in exports && exports[key] === _generated5[key])
  70518. return;
  70519. Object.defineProperty(exports, key, {
  70520. enumerable: true,
  70521. get: function() {
  70522. return _generated5[key];
  70523. }
  70524. });
  70525. });
  70526. var react = {
  70527. isReactComponent: _isReactComponent.default,
  70528. isCompatTag: _isCompatTag.default,
  70529. buildChildren: _buildChildren.default
  70530. };
  70531. exports.react = react;
  70532. }
  70533. });
  70534. // node_modules/@babel/helper-split-export-declaration/lib/index.js
  70535. var require_lib17 = __commonJS({
  70536. "node_modules/@babel/helper-split-export-declaration/lib/index.js"(exports) {
  70537. "use strict";
  70538. Object.defineProperty(exports, "__esModule", {
  70539. value: true
  70540. });
  70541. exports.default = splitExportDeclaration;
  70542. var t2 = require_lib16();
  70543. function splitExportDeclaration(exportDeclaration) {
  70544. if (!exportDeclaration.isExportDeclaration()) {
  70545. throw new Error("Only export declarations can be split.");
  70546. }
  70547. const isDefault = exportDeclaration.isExportDefaultDeclaration();
  70548. const declaration = exportDeclaration.get("declaration");
  70549. const isClassDeclaration = declaration.isClassDeclaration();
  70550. if (isDefault) {
  70551. const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
  70552. const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
  70553. let id = declaration.node.id;
  70554. let needBindingRegistration = false;
  70555. if (!id) {
  70556. needBindingRegistration = true;
  70557. id = scope.generateUidIdentifier("default");
  70558. if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
  70559. declaration.node.id = t2.cloneNode(id);
  70560. }
  70561. }
  70562. const updatedDeclaration = standaloneDeclaration ? declaration : t2.variableDeclaration("var", [t2.variableDeclarator(t2.cloneNode(id), declaration.node)]);
  70563. const updatedExportDeclaration = t2.exportNamedDeclaration(null, [t2.exportSpecifier(t2.cloneNode(id), t2.identifier("default"))]);
  70564. exportDeclaration.insertAfter(updatedExportDeclaration);
  70565. exportDeclaration.replaceWith(updatedDeclaration);
  70566. if (needBindingRegistration) {
  70567. scope.registerDeclaration(exportDeclaration);
  70568. }
  70569. return exportDeclaration;
  70570. }
  70571. if (exportDeclaration.get("specifiers").length > 0) {
  70572. throw new Error("It doesn't make sense to split exported specifiers.");
  70573. }
  70574. const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
  70575. const specifiers = Object.keys(bindingIdentifiers).map((name2) => {
  70576. return t2.exportSpecifier(t2.identifier(name2), t2.identifier(name2));
  70577. });
  70578. const aliasDeclar = t2.exportNamedDeclaration(null, specifiers);
  70579. exportDeclaration.insertAfter(aliasDeclar);
  70580. exportDeclaration.replaceWith(declaration.node);
  70581. return exportDeclaration;
  70582. }
  70583. }
  70584. });
  70585. // node_modules/@babel/traverse/lib/scope/lib/renamer.js
  70586. var require_renamer2 = __commonJS({
  70587. "node_modules/@babel/traverse/lib/scope/lib/renamer.js"(exports) {
  70588. "use strict";
  70589. Object.defineProperty(exports, "__esModule", {
  70590. value: true
  70591. });
  70592. exports.default = void 0;
  70593. var _binding = require_binding2();
  70594. var _helperSplitExportDeclaration = require_lib17();
  70595. var t2 = require_lib2();
  70596. var renameVisitor = {
  70597. ReferencedIdentifier({
  70598. node
  70599. }, state) {
  70600. if (node.name === state.oldName) {
  70601. node.name = state.newName;
  70602. }
  70603. },
  70604. Scope(path, state) {
  70605. if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
  70606. skipAllButComputedMethodKey(path);
  70607. }
  70608. },
  70609. "AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
  70610. if (path.isVariableDeclaration())
  70611. return;
  70612. const ids = path.getOuterBindingIdentifiers();
  70613. for (const name2 in ids) {
  70614. if (name2 === state.oldName)
  70615. ids[name2].name = state.newName;
  70616. }
  70617. }
  70618. };
  70619. var Renamer = class {
  70620. constructor(binding, oldName, newName) {
  70621. this.newName = newName;
  70622. this.oldName = oldName;
  70623. this.binding = binding;
  70624. }
  70625. maybeConvertFromExportDeclaration(parentDeclar) {
  70626. const maybeExportDeclar = parentDeclar.parentPath;
  70627. if (!maybeExportDeclar.isExportDeclaration()) {
  70628. return;
  70629. }
  70630. if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
  70631. return;
  70632. }
  70633. (0, _helperSplitExportDeclaration.default)(maybeExportDeclar);
  70634. }
  70635. maybeConvertFromClassFunctionDeclaration(path) {
  70636. return;
  70637. if (!path.isFunctionDeclaration() && !path.isClassDeclaration())
  70638. return;
  70639. if (this.binding.kind !== "hoisted")
  70640. return;
  70641. path.node.id = t2.identifier(this.oldName);
  70642. path.node._blockHoist = 3;
  70643. path.replaceWith(t2.variableDeclaration("let", [t2.variableDeclarator(t2.identifier(this.newName), t2.toExpression(path.node))]));
  70644. }
  70645. maybeConvertFromClassFunctionExpression(path) {
  70646. return;
  70647. if (!path.isFunctionExpression() && !path.isClassExpression())
  70648. return;
  70649. if (this.binding.kind !== "local")
  70650. return;
  70651. path.node.id = t2.identifier(this.oldName);
  70652. this.binding.scope.parent.push({
  70653. id: t2.identifier(this.newName)
  70654. });
  70655. path.replaceWith(t2.assignmentExpression("=", t2.identifier(this.newName), path.node));
  70656. }
  70657. rename(block) {
  70658. const {
  70659. binding,
  70660. oldName,
  70661. newName
  70662. } = this;
  70663. const {
  70664. scope,
  70665. path
  70666. } = binding;
  70667. const parentDeclar = path.find((path2) => path2.isDeclaration() || path2.isFunctionExpression() || path2.isClassExpression());
  70668. if (parentDeclar) {
  70669. const bindingIds = parentDeclar.getOuterBindingIdentifiers();
  70670. if (bindingIds[oldName] === binding.identifier) {
  70671. this.maybeConvertFromExportDeclaration(parentDeclar);
  70672. }
  70673. }
  70674. const blockToTraverse = block || scope.block;
  70675. if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === "SwitchStatement") {
  70676. blockToTraverse.cases.forEach((c) => {
  70677. scope.traverse(c, renameVisitor, this);
  70678. });
  70679. } else {
  70680. scope.traverse(blockToTraverse, renameVisitor, this);
  70681. }
  70682. if (!block) {
  70683. scope.removeOwnBinding(oldName);
  70684. scope.bindings[newName] = binding;
  70685. this.binding.identifier.name = newName;
  70686. }
  70687. if (parentDeclar) {
  70688. this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
  70689. this.maybeConvertFromClassFunctionExpression(parentDeclar);
  70690. }
  70691. }
  70692. };
  70693. exports.default = Renamer;
  70694. function skipAllButComputedMethodKey(path) {
  70695. if (!path.isMethod() || !path.node.computed) {
  70696. path.skip();
  70697. return;
  70698. }
  70699. const keys2 = t2.VISITOR_KEYS[path.type];
  70700. for (const key of keys2) {
  70701. if (key !== "key")
  70702. path.skipKey(key);
  70703. }
  70704. }
  70705. }
  70706. });
  70707. // node_modules/@babel/traverse/lib/cache.js
  70708. var require_cache2 = __commonJS({
  70709. "node_modules/@babel/traverse/lib/cache.js"(exports) {
  70710. "use strict";
  70711. Object.defineProperty(exports, "__esModule", {
  70712. value: true
  70713. });
  70714. exports.clear = clear;
  70715. exports.clearPath = clearPath;
  70716. exports.clearScope = clearScope;
  70717. exports.scope = exports.path = void 0;
  70718. var path = /* @__PURE__ */ new WeakMap();
  70719. exports.path = path;
  70720. var scope = /* @__PURE__ */ new WeakMap();
  70721. exports.scope = scope;
  70722. function clear() {
  70723. clearPath();
  70724. clearScope();
  70725. }
  70726. function clearPath() {
  70727. exports.path = path = /* @__PURE__ */ new WeakMap();
  70728. }
  70729. function clearScope() {
  70730. exports.scope = scope = /* @__PURE__ */ new WeakMap();
  70731. }
  70732. }
  70733. });
  70734. // node_modules/@babel/traverse/lib/scope/index.js
  70735. var require_scope2 = __commonJS({
  70736. "node_modules/@babel/traverse/lib/scope/index.js"(exports) {
  70737. "use strict";
  70738. Object.defineProperty(exports, "__esModule", {
  70739. value: true
  70740. });
  70741. exports.default = void 0;
  70742. var _renamer = require_renamer2();
  70743. var _index = require_lib37();
  70744. var _binding = require_binding2();
  70745. var _globals = require_globals2();
  70746. var t2 = require_lib2();
  70747. var _cache = require_cache2();
  70748. function gatherNodeParts(node, parts) {
  70749. switch (node == null ? void 0 : node.type) {
  70750. default:
  70751. if (t2.isModuleDeclaration(node)) {
  70752. if ((t2.isExportAllDeclaration(node) || t2.isExportNamedDeclaration(node) || t2.isImportDeclaration(node)) && node.source) {
  70753. gatherNodeParts(node.source, parts);
  70754. } else if ((t2.isExportNamedDeclaration(node) || t2.isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {
  70755. for (const e of node.specifiers)
  70756. gatherNodeParts(e, parts);
  70757. } else if ((t2.isExportDefaultDeclaration(node) || t2.isExportNamedDeclaration(node)) && node.declaration) {
  70758. gatherNodeParts(node.declaration, parts);
  70759. }
  70760. } else if (t2.isModuleSpecifier(node)) {
  70761. gatherNodeParts(node.local, parts);
  70762. } else if (t2.isLiteral(node)) {
  70763. parts.push(node.value);
  70764. }
  70765. break;
  70766. case "MemberExpression":
  70767. case "OptionalMemberExpression":
  70768. case "JSXMemberExpression":
  70769. gatherNodeParts(node.object, parts);
  70770. gatherNodeParts(node.property, parts);
  70771. break;
  70772. case "Identifier":
  70773. case "JSXIdentifier":
  70774. parts.push(node.name);
  70775. break;
  70776. case "CallExpression":
  70777. case "OptionalCallExpression":
  70778. case "NewExpression":
  70779. gatherNodeParts(node.callee, parts);
  70780. break;
  70781. case "ObjectExpression":
  70782. case "ObjectPattern":
  70783. for (const e of node.properties) {
  70784. gatherNodeParts(e, parts);
  70785. }
  70786. break;
  70787. case "SpreadElement":
  70788. case "RestElement":
  70789. gatherNodeParts(node.argument, parts);
  70790. break;
  70791. case "ObjectProperty":
  70792. case "ObjectMethod":
  70793. case "ClassProperty":
  70794. case "ClassMethod":
  70795. case "ClassPrivateProperty":
  70796. case "ClassPrivateMethod":
  70797. gatherNodeParts(node.key, parts);
  70798. break;
  70799. case "ThisExpression":
  70800. parts.push("this");
  70801. break;
  70802. case "Super":
  70803. parts.push("super");
  70804. break;
  70805. case "Import":
  70806. parts.push("import");
  70807. break;
  70808. case "DoExpression":
  70809. parts.push("do");
  70810. break;
  70811. case "YieldExpression":
  70812. parts.push("yield");
  70813. gatherNodeParts(node.argument, parts);
  70814. break;
  70815. case "AwaitExpression":
  70816. parts.push("await");
  70817. gatherNodeParts(node.argument, parts);
  70818. break;
  70819. case "AssignmentExpression":
  70820. gatherNodeParts(node.left, parts);
  70821. break;
  70822. case "VariableDeclarator":
  70823. gatherNodeParts(node.id, parts);
  70824. break;
  70825. case "FunctionExpression":
  70826. case "FunctionDeclaration":
  70827. case "ClassExpression":
  70828. case "ClassDeclaration":
  70829. gatherNodeParts(node.id, parts);
  70830. break;
  70831. case "PrivateName":
  70832. gatherNodeParts(node.id, parts);
  70833. break;
  70834. case "ParenthesizedExpression":
  70835. gatherNodeParts(node.expression, parts);
  70836. break;
  70837. case "UnaryExpression":
  70838. case "UpdateExpression":
  70839. gatherNodeParts(node.argument, parts);
  70840. break;
  70841. case "MetaProperty":
  70842. gatherNodeParts(node.meta, parts);
  70843. gatherNodeParts(node.property, parts);
  70844. break;
  70845. case "JSXElement":
  70846. gatherNodeParts(node.openingElement, parts);
  70847. break;
  70848. case "JSXOpeningElement":
  70849. parts.push(node.name);
  70850. break;
  70851. case "JSXFragment":
  70852. gatherNodeParts(node.openingFragment, parts);
  70853. break;
  70854. case "JSXOpeningFragment":
  70855. parts.push("Fragment");
  70856. break;
  70857. case "JSXNamespacedName":
  70858. gatherNodeParts(node.namespace, parts);
  70859. gatherNodeParts(node.name, parts);
  70860. break;
  70861. }
  70862. }
  70863. var collectorVisitor = {
  70864. For(path) {
  70865. for (const key of t2.FOR_INIT_KEYS) {
  70866. const declar = path.get(key);
  70867. if (declar.isVar()) {
  70868. const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
  70869. parentScope.registerBinding("var", declar);
  70870. }
  70871. }
  70872. },
  70873. Declaration(path) {
  70874. if (path.isBlockScoped())
  70875. return;
  70876. if (path.isImportDeclaration())
  70877. return;
  70878. if (path.isExportDeclaration())
  70879. return;
  70880. const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
  70881. parent.registerDeclaration(path);
  70882. },
  70883. ImportDeclaration(path) {
  70884. const parent = path.scope.getBlockParent();
  70885. parent.registerDeclaration(path);
  70886. },
  70887. ReferencedIdentifier(path, state) {
  70888. state.references.push(path);
  70889. },
  70890. ForXStatement(path, state) {
  70891. const left = path.get("left");
  70892. if (left.isPattern() || left.isIdentifier()) {
  70893. state.constantViolations.push(path);
  70894. }
  70895. },
  70896. ExportDeclaration: {
  70897. exit(path) {
  70898. const {
  70899. node,
  70900. scope
  70901. } = path;
  70902. if (t2.isExportAllDeclaration(node))
  70903. return;
  70904. const declar = node.declaration;
  70905. if (t2.isClassDeclaration(declar) || t2.isFunctionDeclaration(declar)) {
  70906. const id = declar.id;
  70907. if (!id)
  70908. return;
  70909. const binding = scope.getBinding(id.name);
  70910. if (binding)
  70911. binding.reference(path);
  70912. } else if (t2.isVariableDeclaration(declar)) {
  70913. for (const decl of declar.declarations) {
  70914. for (const name2 of Object.keys(t2.getBindingIdentifiers(decl))) {
  70915. const binding = scope.getBinding(name2);
  70916. if (binding)
  70917. binding.reference(path);
  70918. }
  70919. }
  70920. }
  70921. }
  70922. },
  70923. LabeledStatement(path) {
  70924. path.scope.getBlockParent().registerDeclaration(path);
  70925. },
  70926. AssignmentExpression(path, state) {
  70927. state.assignments.push(path);
  70928. },
  70929. UpdateExpression(path, state) {
  70930. state.constantViolations.push(path);
  70931. },
  70932. UnaryExpression(path, state) {
  70933. if (path.node.operator === "delete") {
  70934. state.constantViolations.push(path);
  70935. }
  70936. },
  70937. BlockScoped(path) {
  70938. let scope = path.scope;
  70939. if (scope.path === path)
  70940. scope = scope.parent;
  70941. const parent = scope.getBlockParent();
  70942. parent.registerDeclaration(path);
  70943. if (path.isClassDeclaration() && path.node.id) {
  70944. const id = path.node.id;
  70945. const name2 = id.name;
  70946. path.scope.bindings[name2] = path.scope.parent.getBinding(name2);
  70947. }
  70948. },
  70949. CatchClause(path) {
  70950. path.scope.registerBinding("let", path);
  70951. },
  70952. Function(path) {
  70953. if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[t2.NOT_LOCAL_BINDING]) {
  70954. path.scope.registerBinding("local", path.get("id"), path);
  70955. }
  70956. const params = path.get("params");
  70957. for (const param of params) {
  70958. path.scope.registerBinding("param", param);
  70959. }
  70960. },
  70961. ClassExpression(path) {
  70962. if (path.has("id") && !path.get("id").node[t2.NOT_LOCAL_BINDING]) {
  70963. path.scope.registerBinding("local", path);
  70964. }
  70965. }
  70966. };
  70967. var uid = 0;
  70968. var Scope4 = class {
  70969. constructor(path) {
  70970. this.uid = void 0;
  70971. this.path = void 0;
  70972. this.block = void 0;
  70973. this.labels = void 0;
  70974. this.inited = void 0;
  70975. this.bindings = void 0;
  70976. this.references = void 0;
  70977. this.globals = void 0;
  70978. this.uids = void 0;
  70979. this.data = void 0;
  70980. this.crawling = void 0;
  70981. const {
  70982. node
  70983. } = path;
  70984. const cached = _cache.scope.get(node);
  70985. if ((cached == null ? void 0 : cached.path) === path) {
  70986. return cached;
  70987. }
  70988. _cache.scope.set(node, this);
  70989. this.uid = uid++;
  70990. this.block = node;
  70991. this.path = path;
  70992. this.labels = /* @__PURE__ */ new Map();
  70993. this.inited = false;
  70994. }
  70995. get parent() {
  70996. var _parent;
  70997. let parent, path = this.path;
  70998. do {
  70999. const isKey = path.key === "key";
  71000. path = path.parentPath;
  71001. if (isKey && path.isMethod())
  71002. path = path.parentPath;
  71003. if (path && path.isScope())
  71004. parent = path;
  71005. } while (path && !parent);
  71006. return (_parent = parent) == null ? void 0 : _parent.scope;
  71007. }
  71008. get parentBlock() {
  71009. return this.path.parent;
  71010. }
  71011. get hub() {
  71012. return this.path.hub;
  71013. }
  71014. traverse(node, opts, state) {
  71015. (0, _index.default)(node, opts, this, state, this.path);
  71016. }
  71017. generateDeclaredUidIdentifier(name2) {
  71018. const id = this.generateUidIdentifier(name2);
  71019. this.push({
  71020. id
  71021. });
  71022. return t2.cloneNode(id);
  71023. }
  71024. generateUidIdentifier(name2) {
  71025. return t2.identifier(this.generateUid(name2));
  71026. }
  71027. generateUid(name2 = "temp") {
  71028. name2 = t2.toIdentifier(name2).replace(/^_+/, "").replace(/[0-9]+$/g, "");
  71029. let uid2;
  71030. let i = 1;
  71031. do {
  71032. uid2 = this._generateUid(name2, i);
  71033. i++;
  71034. } while (this.hasLabel(uid2) || this.hasBinding(uid2) || this.hasGlobal(uid2) || this.hasReference(uid2));
  71035. const program = this.getProgramParent();
  71036. program.references[uid2] = true;
  71037. program.uids[uid2] = true;
  71038. return uid2;
  71039. }
  71040. _generateUid(name2, i) {
  71041. let id = name2;
  71042. if (i > 1)
  71043. id += i;
  71044. return `_${id}`;
  71045. }
  71046. generateUidBasedOnNode(node, defaultName) {
  71047. const parts = [];
  71048. gatherNodeParts(node, parts);
  71049. let id = parts.join("$");
  71050. id = id.replace(/^_/, "") || defaultName || "ref";
  71051. return this.generateUid(id.slice(0, 20));
  71052. }
  71053. generateUidIdentifierBasedOnNode(node, defaultName) {
  71054. return t2.identifier(this.generateUidBasedOnNode(node, defaultName));
  71055. }
  71056. isStatic(node) {
  71057. if (t2.isThisExpression(node) || t2.isSuper(node)) {
  71058. return true;
  71059. }
  71060. if (t2.isIdentifier(node)) {
  71061. const binding = this.getBinding(node.name);
  71062. if (binding) {
  71063. return binding.constant;
  71064. } else {
  71065. return this.hasBinding(node.name);
  71066. }
  71067. }
  71068. return false;
  71069. }
  71070. maybeGenerateMemoised(node, dontPush) {
  71071. if (this.isStatic(node)) {
  71072. return null;
  71073. } else {
  71074. const id = this.generateUidIdentifierBasedOnNode(node);
  71075. if (!dontPush) {
  71076. this.push({
  71077. id
  71078. });
  71079. return t2.cloneNode(id);
  71080. }
  71081. return id;
  71082. }
  71083. }
  71084. checkBlockScopedCollisions(local, kind, name2, id) {
  71085. if (kind === "param")
  71086. return;
  71087. if (local.kind === "local")
  71088. return;
  71089. const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
  71090. if (duplicate) {
  71091. throw this.hub.buildError(id, `Duplicate declaration "${name2}"`, TypeError);
  71092. }
  71093. }
  71094. rename(oldName, newName, block) {
  71095. const binding = this.getBinding(oldName);
  71096. if (binding) {
  71097. newName = newName || this.generateUidIdentifier(oldName).name;
  71098. return new _renamer.default(binding, oldName, newName).rename(block);
  71099. }
  71100. }
  71101. _renameFromMap(map, oldName, newName, value) {
  71102. if (map[oldName]) {
  71103. map[newName] = value;
  71104. map[oldName] = null;
  71105. }
  71106. }
  71107. dump() {
  71108. const sep = "-".repeat(60);
  71109. console.log(sep);
  71110. let scope = this;
  71111. do {
  71112. console.log("#", scope.block.type);
  71113. for (const name2 of Object.keys(scope.bindings)) {
  71114. const binding = scope.bindings[name2];
  71115. console.log(" -", name2, {
  71116. constant: binding.constant,
  71117. references: binding.references,
  71118. violations: binding.constantViolations.length,
  71119. kind: binding.kind
  71120. });
  71121. }
  71122. } while (scope = scope.parent);
  71123. console.log(sep);
  71124. }
  71125. toArray(node, i, arrayLikeIsIterable) {
  71126. if (t2.isIdentifier(node)) {
  71127. const binding = this.getBinding(node.name);
  71128. if (binding != null && binding.constant && binding.path.isGenericType("Array")) {
  71129. return node;
  71130. }
  71131. }
  71132. if (t2.isArrayExpression(node)) {
  71133. return node;
  71134. }
  71135. if (t2.isIdentifier(node, {
  71136. name: "arguments"
  71137. })) {
  71138. return t2.callExpression(t2.memberExpression(t2.memberExpression(t2.memberExpression(t2.identifier("Array"), t2.identifier("prototype")), t2.identifier("slice")), t2.identifier("call")), [node]);
  71139. }
  71140. let helperName;
  71141. const args = [node];
  71142. if (i === true) {
  71143. helperName = "toConsumableArray";
  71144. } else if (i) {
  71145. args.push(t2.numericLiteral(i));
  71146. helperName = "slicedToArray";
  71147. } else {
  71148. helperName = "toArray";
  71149. }
  71150. if (arrayLikeIsIterable) {
  71151. args.unshift(this.hub.addHelper(helperName));
  71152. helperName = "maybeArrayLike";
  71153. }
  71154. return t2.callExpression(this.hub.addHelper(helperName), args);
  71155. }
  71156. hasLabel(name2) {
  71157. return !!this.getLabel(name2);
  71158. }
  71159. getLabel(name2) {
  71160. return this.labels.get(name2);
  71161. }
  71162. registerLabel(path) {
  71163. this.labels.set(path.node.label.name, path);
  71164. }
  71165. registerDeclaration(path) {
  71166. if (path.isLabeledStatement()) {
  71167. this.registerLabel(path);
  71168. } else if (path.isFunctionDeclaration()) {
  71169. this.registerBinding("hoisted", path.get("id"), path);
  71170. } else if (path.isVariableDeclaration()) {
  71171. const declarations = path.get("declarations");
  71172. for (const declar of declarations) {
  71173. this.registerBinding(path.node.kind, declar);
  71174. }
  71175. } else if (path.isClassDeclaration()) {
  71176. this.registerBinding("let", path);
  71177. } else if (path.isImportDeclaration()) {
  71178. const specifiers = path.get("specifiers");
  71179. for (const specifier of specifiers) {
  71180. this.registerBinding("module", specifier);
  71181. }
  71182. } else if (path.isExportDeclaration()) {
  71183. const declar = path.get("declaration");
  71184. if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
  71185. this.registerDeclaration(declar);
  71186. }
  71187. } else {
  71188. this.registerBinding("unknown", path);
  71189. }
  71190. }
  71191. buildUndefinedNode() {
  71192. return t2.unaryExpression("void", t2.numericLiteral(0), true);
  71193. }
  71194. registerConstantViolation(path) {
  71195. const ids = path.getBindingIdentifiers();
  71196. for (const name2 of Object.keys(ids)) {
  71197. const binding = this.getBinding(name2);
  71198. if (binding)
  71199. binding.reassign(path);
  71200. }
  71201. }
  71202. registerBinding(kind, path, bindingPath = path) {
  71203. if (!kind)
  71204. throw new ReferenceError("no `kind`");
  71205. if (path.isVariableDeclaration()) {
  71206. const declarators = path.get("declarations");
  71207. for (const declar of declarators) {
  71208. this.registerBinding(kind, declar);
  71209. }
  71210. return;
  71211. }
  71212. const parent = this.getProgramParent();
  71213. const ids = path.getOuterBindingIdentifiers(true);
  71214. for (const name2 of Object.keys(ids)) {
  71215. parent.references[name2] = true;
  71216. for (const id of ids[name2]) {
  71217. const local = this.getOwnBinding(name2);
  71218. if (local) {
  71219. if (local.identifier === id)
  71220. continue;
  71221. this.checkBlockScopedCollisions(local, kind, name2, id);
  71222. }
  71223. if (local) {
  71224. this.registerConstantViolation(bindingPath);
  71225. } else {
  71226. this.bindings[name2] = new _binding.default({
  71227. identifier: id,
  71228. scope: this,
  71229. path: bindingPath,
  71230. kind
  71231. });
  71232. }
  71233. }
  71234. }
  71235. }
  71236. addGlobal(node) {
  71237. this.globals[node.name] = node;
  71238. }
  71239. hasUid(name2) {
  71240. let scope = this;
  71241. do {
  71242. if (scope.uids[name2])
  71243. return true;
  71244. } while (scope = scope.parent);
  71245. return false;
  71246. }
  71247. hasGlobal(name2) {
  71248. let scope = this;
  71249. do {
  71250. if (scope.globals[name2])
  71251. return true;
  71252. } while (scope = scope.parent);
  71253. return false;
  71254. }
  71255. hasReference(name2) {
  71256. return !!this.getProgramParent().references[name2];
  71257. }
  71258. isPure(node, constantsOnly) {
  71259. if (t2.isIdentifier(node)) {
  71260. const binding = this.getBinding(node.name);
  71261. if (!binding)
  71262. return false;
  71263. if (constantsOnly)
  71264. return binding.constant;
  71265. return true;
  71266. } else if (t2.isClass(node)) {
  71267. if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
  71268. return false;
  71269. }
  71270. return this.isPure(node.body, constantsOnly);
  71271. } else if (t2.isClassBody(node)) {
  71272. for (const method of node.body) {
  71273. if (!this.isPure(method, constantsOnly))
  71274. return false;
  71275. }
  71276. return true;
  71277. } else if (t2.isBinary(node)) {
  71278. return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
  71279. } else if (t2.isArrayExpression(node)) {
  71280. for (const elem of node.elements) {
  71281. if (!this.isPure(elem, constantsOnly))
  71282. return false;
  71283. }
  71284. return true;
  71285. } else if (t2.isObjectExpression(node)) {
  71286. for (const prop of node.properties) {
  71287. if (!this.isPure(prop, constantsOnly))
  71288. return false;
  71289. }
  71290. return true;
  71291. } else if (t2.isMethod(node)) {
  71292. if (node.computed && !this.isPure(node.key, constantsOnly))
  71293. return false;
  71294. if (node.kind === "get" || node.kind === "set")
  71295. return false;
  71296. return true;
  71297. } else if (t2.isProperty(node)) {
  71298. if (node.computed && !this.isPure(node.key, constantsOnly))
  71299. return false;
  71300. return this.isPure(node.value, constantsOnly);
  71301. } else if (t2.isUnaryExpression(node)) {
  71302. return this.isPure(node.argument, constantsOnly);
  71303. } else if (t2.isTaggedTemplateExpression(node)) {
  71304. return t2.matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
  71305. } else if (t2.isTemplateLiteral(node)) {
  71306. for (const expression of node.expressions) {
  71307. if (!this.isPure(expression, constantsOnly))
  71308. return false;
  71309. }
  71310. return true;
  71311. } else {
  71312. return t2.isPureish(node);
  71313. }
  71314. }
  71315. setData(key, val) {
  71316. return this.data[key] = val;
  71317. }
  71318. getData(key) {
  71319. let scope = this;
  71320. do {
  71321. const data2 = scope.data[key];
  71322. if (data2 != null)
  71323. return data2;
  71324. } while (scope = scope.parent);
  71325. }
  71326. removeData(key) {
  71327. let scope = this;
  71328. do {
  71329. const data2 = scope.data[key];
  71330. if (data2 != null)
  71331. scope.data[key] = null;
  71332. } while (scope = scope.parent);
  71333. }
  71334. init() {
  71335. if (!this.inited) {
  71336. this.inited = true;
  71337. this.crawl();
  71338. }
  71339. }
  71340. crawl() {
  71341. const path = this.path;
  71342. this.references = /* @__PURE__ */ Object.create(null);
  71343. this.bindings = /* @__PURE__ */ Object.create(null);
  71344. this.globals = /* @__PURE__ */ Object.create(null);
  71345. this.uids = /* @__PURE__ */ Object.create(null);
  71346. this.data = /* @__PURE__ */ Object.create(null);
  71347. const programParent = this.getProgramParent();
  71348. if (programParent.crawling)
  71349. return;
  71350. const state = {
  71351. references: [],
  71352. constantViolations: [],
  71353. assignments: []
  71354. };
  71355. this.crawling = true;
  71356. if (path.type !== "Program" && collectorVisitor._exploded) {
  71357. for (const visit4 of collectorVisitor.enter) {
  71358. visit4(path, state);
  71359. }
  71360. const typeVisitors = collectorVisitor[path.type];
  71361. if (typeVisitors) {
  71362. for (const visit4 of typeVisitors.enter) {
  71363. visit4(path, state);
  71364. }
  71365. }
  71366. }
  71367. path.traverse(collectorVisitor, state);
  71368. this.crawling = false;
  71369. for (const path2 of state.assignments) {
  71370. const ids = path2.getBindingIdentifiers();
  71371. for (const name2 of Object.keys(ids)) {
  71372. if (path2.scope.getBinding(name2))
  71373. continue;
  71374. programParent.addGlobal(ids[name2]);
  71375. }
  71376. path2.scope.registerConstantViolation(path2);
  71377. }
  71378. for (const ref2 of state.references) {
  71379. const binding = ref2.scope.getBinding(ref2.node.name);
  71380. if (binding) {
  71381. binding.reference(ref2);
  71382. } else {
  71383. programParent.addGlobal(ref2.node);
  71384. }
  71385. }
  71386. for (const path2 of state.constantViolations) {
  71387. path2.scope.registerConstantViolation(path2);
  71388. }
  71389. }
  71390. push(opts) {
  71391. let path = this.path;
  71392. if (!path.isBlockStatement() && !path.isProgram()) {
  71393. path = this.getBlockParent().path;
  71394. }
  71395. if (path.isSwitchStatement()) {
  71396. path = (this.getFunctionParent() || this.getProgramParent()).path;
  71397. }
  71398. if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
  71399. path.ensureBlock();
  71400. path = path.get("body");
  71401. }
  71402. const unique = opts.unique;
  71403. const kind = opts.kind || "var";
  71404. const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
  71405. const dataKey = `declaration:${kind}:${blockHoist}`;
  71406. let declarPath = !unique && path.getData(dataKey);
  71407. if (!declarPath) {
  71408. const declar = t2.variableDeclaration(kind, []);
  71409. declar._blockHoist = blockHoist;
  71410. [declarPath] = path.unshiftContainer("body", [declar]);
  71411. if (!unique)
  71412. path.setData(dataKey, declarPath);
  71413. }
  71414. const declarator = t2.variableDeclarator(opts.id, opts.init);
  71415. declarPath.node.declarations.push(declarator);
  71416. this.registerBinding(kind, declarPath.get("declarations").pop());
  71417. }
  71418. getProgramParent() {
  71419. let scope = this;
  71420. do {
  71421. if (scope.path.isProgram()) {
  71422. return scope;
  71423. }
  71424. } while (scope = scope.parent);
  71425. throw new Error("Couldn't find a Program");
  71426. }
  71427. getFunctionParent() {
  71428. let scope = this;
  71429. do {
  71430. if (scope.path.isFunctionParent()) {
  71431. return scope;
  71432. }
  71433. } while (scope = scope.parent);
  71434. return null;
  71435. }
  71436. getBlockParent() {
  71437. let scope = this;
  71438. do {
  71439. if (scope.path.isBlockParent()) {
  71440. return scope;
  71441. }
  71442. } while (scope = scope.parent);
  71443. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  71444. }
  71445. getAllBindings() {
  71446. const ids = /* @__PURE__ */ Object.create(null);
  71447. let scope = this;
  71448. do {
  71449. for (const key of Object.keys(scope.bindings)) {
  71450. if (key in ids === false) {
  71451. ids[key] = scope.bindings[key];
  71452. }
  71453. }
  71454. scope = scope.parent;
  71455. } while (scope);
  71456. return ids;
  71457. }
  71458. getAllBindingsOfKind(...kinds) {
  71459. const ids = /* @__PURE__ */ Object.create(null);
  71460. for (const kind of kinds) {
  71461. let scope = this;
  71462. do {
  71463. for (const name2 of Object.keys(scope.bindings)) {
  71464. const binding = scope.bindings[name2];
  71465. if (binding.kind === kind)
  71466. ids[name2] = binding;
  71467. }
  71468. scope = scope.parent;
  71469. } while (scope);
  71470. }
  71471. return ids;
  71472. }
  71473. bindingIdentifierEquals(name2, node) {
  71474. return this.getBindingIdentifier(name2) === node;
  71475. }
  71476. getBinding(name2) {
  71477. let scope = this;
  71478. let previousPath;
  71479. do {
  71480. const binding = scope.getOwnBinding(name2);
  71481. if (binding) {
  71482. var _previousPath;
  71483. if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param") {
  71484. } else {
  71485. return binding;
  71486. }
  71487. }
  71488. previousPath = scope.path;
  71489. } while (scope = scope.parent);
  71490. }
  71491. getOwnBinding(name2) {
  71492. return this.bindings[name2];
  71493. }
  71494. getBindingIdentifier(name2) {
  71495. var _this$getBinding;
  71496. return (_this$getBinding = this.getBinding(name2)) == null ? void 0 : _this$getBinding.identifier;
  71497. }
  71498. getOwnBindingIdentifier(name2) {
  71499. const binding = this.bindings[name2];
  71500. return binding == null ? void 0 : binding.identifier;
  71501. }
  71502. hasOwnBinding(name2) {
  71503. return !!this.getOwnBinding(name2);
  71504. }
  71505. hasBinding(name2, noGlobals) {
  71506. if (!name2)
  71507. return false;
  71508. if (this.hasOwnBinding(name2))
  71509. return true;
  71510. if (this.parentHasBinding(name2, noGlobals))
  71511. return true;
  71512. if (this.hasUid(name2))
  71513. return true;
  71514. if (!noGlobals && Scope4.globals.includes(name2))
  71515. return true;
  71516. if (!noGlobals && Scope4.contextVariables.includes(name2))
  71517. return true;
  71518. return false;
  71519. }
  71520. parentHasBinding(name2, noGlobals) {
  71521. var _this$parent;
  71522. return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name2, noGlobals);
  71523. }
  71524. moveBindingTo(name2, scope) {
  71525. const info = this.getBinding(name2);
  71526. if (info) {
  71527. info.scope.removeOwnBinding(name2);
  71528. info.scope = scope;
  71529. scope.bindings[name2] = info;
  71530. }
  71531. }
  71532. removeOwnBinding(name2) {
  71533. delete this.bindings[name2];
  71534. }
  71535. removeBinding(name2) {
  71536. var _this$getBinding2;
  71537. (_this$getBinding2 = this.getBinding(name2)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name2);
  71538. let scope = this;
  71539. do {
  71540. if (scope.uids[name2]) {
  71541. scope.uids[name2] = false;
  71542. }
  71543. } while (scope = scope.parent);
  71544. }
  71545. };
  71546. exports.default = Scope4;
  71547. Scope4.globals = Object.keys(_globals.builtin);
  71548. Scope4.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
  71549. }
  71550. });
  71551. // node_modules/@babel/generator/lib/source-map.js
  71552. var require_source_map3 = __commonJS({
  71553. "node_modules/@babel/generator/lib/source-map.js"(exports) {
  71554. "use strict";
  71555. Object.defineProperty(exports, "__esModule", {
  71556. value: true
  71557. });
  71558. exports.default = void 0;
  71559. var _sourceMap = require_source_map();
  71560. var SourceMap = class {
  71561. constructor(opts, code2) {
  71562. this._cachedMap = void 0;
  71563. this._code = void 0;
  71564. this._opts = void 0;
  71565. this._rawMappings = void 0;
  71566. this._lastGenLine = void 0;
  71567. this._lastSourceLine = void 0;
  71568. this._lastSourceColumn = void 0;
  71569. this._cachedMap = null;
  71570. this._code = code2;
  71571. this._opts = opts;
  71572. this._rawMappings = [];
  71573. }
  71574. get() {
  71575. if (!this._cachedMap) {
  71576. const map = this._cachedMap = new _sourceMap.SourceMapGenerator({
  71577. sourceRoot: this._opts.sourceRoot
  71578. });
  71579. const code2 = this._code;
  71580. if (typeof code2 === "string") {
  71581. map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code2);
  71582. } else if (typeof code2 === "object") {
  71583. Object.keys(code2).forEach((sourceFileName) => {
  71584. map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code2[sourceFileName]);
  71585. });
  71586. }
  71587. this._rawMappings.forEach((mapping) => map.addMapping(mapping), map);
  71588. }
  71589. return this._cachedMap.toJSON();
  71590. }
  71591. getRawMappings() {
  71592. return this._rawMappings.slice();
  71593. }
  71594. mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
  71595. if (this._lastGenLine !== generatedLine && line === null)
  71596. return;
  71597. if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
  71598. return;
  71599. }
  71600. this._cachedMap = null;
  71601. this._lastGenLine = generatedLine;
  71602. this._lastSourceLine = line;
  71603. this._lastSourceColumn = column;
  71604. this._rawMappings.push({
  71605. name: identifierName || void 0,
  71606. generated: {
  71607. line: generatedLine,
  71608. column: generatedColumn
  71609. },
  71610. source: line == null ? void 0 : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
  71611. original: line == null ? void 0 : {
  71612. line,
  71613. column
  71614. }
  71615. });
  71616. }
  71617. };
  71618. exports.default = SourceMap;
  71619. }
  71620. });
  71621. // node_modules/@babel/generator/lib/buffer.js
  71622. var require_buffer2 = __commonJS({
  71623. "node_modules/@babel/generator/lib/buffer.js"(exports) {
  71624. "use strict";
  71625. Object.defineProperty(exports, "__esModule", {
  71626. value: true
  71627. });
  71628. exports.default = void 0;
  71629. var SPACES_RE = /^[ \t]+$/;
  71630. var Buffer2 = class {
  71631. constructor(map) {
  71632. this._map = null;
  71633. this._buf = [];
  71634. this._last = "";
  71635. this._queue = [];
  71636. this._position = {
  71637. line: 1,
  71638. column: 0
  71639. };
  71640. this._sourcePosition = {
  71641. identifierName: null,
  71642. line: null,
  71643. column: null,
  71644. filename: null
  71645. };
  71646. this._disallowedPop = null;
  71647. this._map = map;
  71648. }
  71649. get() {
  71650. this._flush();
  71651. const map = this._map;
  71652. const result = {
  71653. code: this._buf.join("").trimRight(),
  71654. map: null,
  71655. rawMappings: map == null ? void 0 : map.getRawMappings()
  71656. };
  71657. if (map) {
  71658. Object.defineProperty(result, "map", {
  71659. configurable: true,
  71660. enumerable: true,
  71661. get() {
  71662. return this.map = map.get();
  71663. },
  71664. set(value) {
  71665. Object.defineProperty(this, "map", {
  71666. value,
  71667. writable: true
  71668. });
  71669. }
  71670. });
  71671. }
  71672. return result;
  71673. }
  71674. append(str) {
  71675. this._flush();
  71676. const {
  71677. line,
  71678. column,
  71679. filename,
  71680. identifierName,
  71681. force
  71682. } = this._sourcePosition;
  71683. this._append(str, line, column, identifierName, filename, force);
  71684. }
  71685. queue(str) {
  71686. if (str === "\n") {
  71687. while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
  71688. this._queue.shift();
  71689. }
  71690. }
  71691. const {
  71692. line,
  71693. column,
  71694. filename,
  71695. identifierName,
  71696. force
  71697. } = this._sourcePosition;
  71698. this._queue.unshift([str, line, column, identifierName, filename, force]);
  71699. }
  71700. _flush() {
  71701. let item;
  71702. while (item = this._queue.pop()) {
  71703. this._append(...item);
  71704. }
  71705. }
  71706. _append(str, line, column, identifierName, filename, force) {
  71707. this._buf.push(str);
  71708. this._last = str[str.length - 1];
  71709. let i = str.indexOf("\n");
  71710. let last = 0;
  71711. if (i !== 0) {
  71712. this._mark(line, column, identifierName, filename, force);
  71713. }
  71714. while (i !== -1) {
  71715. this._position.line++;
  71716. this._position.column = 0;
  71717. last = i + 1;
  71718. if (last < str.length) {
  71719. this._mark(++line, 0, identifierName, filename, force);
  71720. }
  71721. i = str.indexOf("\n", last);
  71722. }
  71723. this._position.column += str.length - last;
  71724. }
  71725. _mark(line, column, identifierName, filename, force) {
  71726. var _this$_map;
  71727. (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
  71728. }
  71729. removeTrailingNewline() {
  71730. if (this._queue.length > 0 && this._queue[0][0] === "\n") {
  71731. this._queue.shift();
  71732. }
  71733. }
  71734. removeLastSemicolon() {
  71735. if (this._queue.length > 0 && this._queue[0][0] === ";") {
  71736. this._queue.shift();
  71737. }
  71738. }
  71739. endsWith(suffix) {
  71740. if (suffix.length === 1) {
  71741. let last;
  71742. if (this._queue.length > 0) {
  71743. const str = this._queue[0][0];
  71744. last = str[str.length - 1];
  71745. } else {
  71746. last = this._last;
  71747. }
  71748. return last === suffix;
  71749. }
  71750. const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, "");
  71751. if (suffix.length <= end.length) {
  71752. return end.slice(-suffix.length) === suffix;
  71753. }
  71754. return false;
  71755. }
  71756. hasContent() {
  71757. return this._queue.length > 0 || !!this._last;
  71758. }
  71759. exactSource(loc, cb) {
  71760. this.source("start", loc, true);
  71761. cb();
  71762. this.source("end", loc);
  71763. this._disallowPop("start", loc);
  71764. }
  71765. source(prop, loc, force) {
  71766. if (prop && !loc)
  71767. return;
  71768. this._normalizePosition(prop, loc, this._sourcePosition, force);
  71769. }
  71770. withSource(prop, loc, cb) {
  71771. if (!this._map)
  71772. return cb();
  71773. const originalLine = this._sourcePosition.line;
  71774. const originalColumn = this._sourcePosition.column;
  71775. const originalFilename = this._sourcePosition.filename;
  71776. const originalIdentifierName = this._sourcePosition.identifierName;
  71777. this.source(prop, loc);
  71778. cb();
  71779. 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)) {
  71780. this._sourcePosition.line = originalLine;
  71781. this._sourcePosition.column = originalColumn;
  71782. this._sourcePosition.filename = originalFilename;
  71783. this._sourcePosition.identifierName = originalIdentifierName;
  71784. this._sourcePosition.force = false;
  71785. this._disallowedPop = null;
  71786. }
  71787. }
  71788. _disallowPop(prop, loc) {
  71789. if (prop && !loc)
  71790. return;
  71791. this._disallowedPop = this._normalizePosition(prop, loc);
  71792. }
  71793. _normalizePosition(prop, loc, targetObj, force) {
  71794. const pos = loc ? loc[prop] : null;
  71795. if (targetObj === void 0) {
  71796. targetObj = {
  71797. identifierName: null,
  71798. line: null,
  71799. column: null,
  71800. filename: null,
  71801. force: false
  71802. };
  71803. }
  71804. const origLine = targetObj.line;
  71805. const origColumn = targetObj.column;
  71806. const origFilename = targetObj.filename;
  71807. targetObj.identifierName = prop === "start" && (loc == null ? void 0 : loc.identifierName) || null;
  71808. targetObj.line = pos == null ? void 0 : pos.line;
  71809. targetObj.column = pos == null ? void 0 : pos.column;
  71810. targetObj.filename = loc == null ? void 0 : loc.filename;
  71811. if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
  71812. targetObj.force = force;
  71813. }
  71814. return targetObj;
  71815. }
  71816. getCurrentColumn() {
  71817. const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
  71818. const lastIndex = extra.lastIndexOf("\n");
  71819. return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
  71820. }
  71821. getCurrentLine() {
  71822. const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
  71823. let count = 0;
  71824. for (let i = 0; i < extra.length; i++) {
  71825. if (extra[i] === "\n")
  71826. count++;
  71827. }
  71828. return this._position.line + count;
  71829. }
  71830. };
  71831. exports.default = Buffer2;
  71832. }
  71833. });
  71834. // node_modules/@babel/generator/lib/node/whitespace.js
  71835. var require_whitespace2 = __commonJS({
  71836. "node_modules/@babel/generator/lib/node/whitespace.js"(exports) {
  71837. "use strict";
  71838. Object.defineProperty(exports, "__esModule", {
  71839. value: true
  71840. });
  71841. exports.list = exports.nodes = void 0;
  71842. var t2 = require_lib2();
  71843. function crawl(node, state = {}) {
  71844. if (t2.isMemberExpression(node) || t2.isOptionalMemberExpression(node)) {
  71845. crawl(node.object, state);
  71846. if (node.computed)
  71847. crawl(node.property, state);
  71848. } else if (t2.isBinary(node) || t2.isAssignmentExpression(node)) {
  71849. crawl(node.left, state);
  71850. crawl(node.right, state);
  71851. } else if (t2.isCallExpression(node) || t2.isOptionalCallExpression(node)) {
  71852. state.hasCall = true;
  71853. crawl(node.callee, state);
  71854. } else if (t2.isFunction(node)) {
  71855. state.hasFunction = true;
  71856. } else if (t2.isIdentifier(node)) {
  71857. state.hasHelper = state.hasHelper || isHelper(node.callee);
  71858. }
  71859. return state;
  71860. }
  71861. function isHelper(node) {
  71862. if (t2.isMemberExpression(node)) {
  71863. return isHelper(node.object) || isHelper(node.property);
  71864. } else if (t2.isIdentifier(node)) {
  71865. return node.name === "require" || node.name[0] === "_";
  71866. } else if (t2.isCallExpression(node)) {
  71867. return isHelper(node.callee);
  71868. } else if (t2.isBinary(node) || t2.isAssignmentExpression(node)) {
  71869. return t2.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
  71870. } else {
  71871. return false;
  71872. }
  71873. }
  71874. function isType(node) {
  71875. return t2.isLiteral(node) || t2.isObjectExpression(node) || t2.isArrayExpression(node) || t2.isIdentifier(node) || t2.isMemberExpression(node);
  71876. }
  71877. var nodes = {
  71878. AssignmentExpression(node) {
  71879. const state = crawl(node.right);
  71880. if (state.hasCall && state.hasHelper || state.hasFunction) {
  71881. return {
  71882. before: state.hasFunction,
  71883. after: true
  71884. };
  71885. }
  71886. },
  71887. SwitchCase(node, parent) {
  71888. return {
  71889. before: !!node.consequent.length || parent.cases[0] === node,
  71890. after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
  71891. };
  71892. },
  71893. LogicalExpression(node) {
  71894. if (t2.isFunction(node.left) || t2.isFunction(node.right)) {
  71895. return {
  71896. after: true
  71897. };
  71898. }
  71899. },
  71900. Literal(node) {
  71901. if (t2.isStringLiteral(node) && node.value === "use strict") {
  71902. return {
  71903. after: true
  71904. };
  71905. }
  71906. },
  71907. CallExpression(node) {
  71908. if (t2.isFunction(node.callee) || isHelper(node)) {
  71909. return {
  71910. before: true,
  71911. after: true
  71912. };
  71913. }
  71914. },
  71915. OptionalCallExpression(node) {
  71916. if (t2.isFunction(node.callee)) {
  71917. return {
  71918. before: true,
  71919. after: true
  71920. };
  71921. }
  71922. },
  71923. VariableDeclaration(node) {
  71924. for (let i = 0; i < node.declarations.length; i++) {
  71925. const declar = node.declarations[i];
  71926. let enabled = isHelper(declar.id) && !isType(declar.init);
  71927. if (!enabled) {
  71928. const state = crawl(declar.init);
  71929. enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
  71930. }
  71931. if (enabled) {
  71932. return {
  71933. before: true,
  71934. after: true
  71935. };
  71936. }
  71937. }
  71938. },
  71939. IfStatement(node) {
  71940. if (t2.isBlockStatement(node.consequent)) {
  71941. return {
  71942. before: true,
  71943. after: true
  71944. };
  71945. }
  71946. }
  71947. };
  71948. exports.nodes = nodes;
  71949. nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function(node, parent) {
  71950. if (parent.properties[0] === node) {
  71951. return {
  71952. before: true
  71953. };
  71954. }
  71955. };
  71956. nodes.ObjectTypeCallProperty = function(node, parent) {
  71957. var _parent$properties;
  71958. if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {
  71959. return {
  71960. before: true
  71961. };
  71962. }
  71963. };
  71964. nodes.ObjectTypeIndexer = function(node, parent) {
  71965. var _parent$properties2, _parent$callPropertie;
  71966. if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {
  71967. return {
  71968. before: true
  71969. };
  71970. }
  71971. };
  71972. nodes.ObjectTypeInternalSlot = function(node, parent) {
  71973. var _parent$properties3, _parent$callPropertie2, _parent$indexers;
  71974. if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {
  71975. return {
  71976. before: true
  71977. };
  71978. }
  71979. };
  71980. var list3 = {
  71981. VariableDeclaration(node) {
  71982. return node.declarations.map((decl) => decl.init);
  71983. },
  71984. ArrayExpression(node) {
  71985. return node.elements;
  71986. },
  71987. ObjectExpression(node) {
  71988. return node.properties;
  71989. }
  71990. };
  71991. exports.list = list3;
  71992. [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function([type, amounts]) {
  71993. if (typeof amounts === "boolean") {
  71994. amounts = {
  71995. after: amounts,
  71996. before: amounts
  71997. };
  71998. }
  71999. [type].concat(t2.FLIPPED_ALIAS_KEYS[type] || []).forEach(function(type2) {
  72000. nodes[type2] = function() {
  72001. return amounts;
  72002. };
  72003. });
  72004. });
  72005. }
  72006. });
  72007. // node_modules/@babel/generator/lib/node/parentheses.js
  72008. var require_parentheses2 = __commonJS({
  72009. "node_modules/@babel/generator/lib/node/parentheses.js"(exports) {
  72010. "use strict";
  72011. Object.defineProperty(exports, "__esModule", {
  72012. value: true
  72013. });
  72014. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  72015. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  72016. exports.UpdateExpression = UpdateExpression;
  72017. exports.ObjectExpression = ObjectExpression;
  72018. exports.DoExpression = DoExpression;
  72019. exports.Binary = Binary;
  72020. exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
  72021. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  72022. exports.TSAsExpression = TSAsExpression;
  72023. exports.TSTypeAssertion = TSTypeAssertion;
  72024. exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
  72025. exports.TSInferType = TSInferType;
  72026. exports.BinaryExpression = BinaryExpression2;
  72027. exports.SequenceExpression = SequenceExpression;
  72028. exports.AwaitExpression = exports.YieldExpression = YieldExpression;
  72029. exports.ClassExpression = ClassExpression;
  72030. exports.UnaryLike = UnaryLike;
  72031. exports.FunctionExpression = FunctionExpression;
  72032. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  72033. exports.ConditionalExpression = ConditionalExpression;
  72034. exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
  72035. exports.AssignmentExpression = AssignmentExpression;
  72036. exports.LogicalExpression = LogicalExpression;
  72037. exports.Identifier = Identifier;
  72038. var t2 = require_lib2();
  72039. var PRECEDENCE = {
  72040. "||": 0,
  72041. "??": 0,
  72042. "&&": 1,
  72043. "|": 2,
  72044. "^": 3,
  72045. "&": 4,
  72046. "==": 5,
  72047. "===": 5,
  72048. "!=": 5,
  72049. "!==": 5,
  72050. "<": 6,
  72051. ">": 6,
  72052. "<=": 6,
  72053. ">=": 6,
  72054. in: 6,
  72055. instanceof: 6,
  72056. ">>": 7,
  72057. "<<": 7,
  72058. ">>>": 7,
  72059. "+": 8,
  72060. "-": 8,
  72061. "*": 9,
  72062. "/": 9,
  72063. "%": 9,
  72064. "**": 10
  72065. };
  72066. var isClassExtendsClause = (node, parent) => (t2.isClassDeclaration(parent) || t2.isClassExpression(parent)) && parent.superClass === node;
  72067. var hasPostfixPart = (node, parent) => (t2.isMemberExpression(parent) || t2.isOptionalMemberExpression(parent)) && parent.object === node || (t2.isCallExpression(parent) || t2.isOptionalCallExpression(parent) || t2.isNewExpression(parent)) && parent.callee === node || t2.isTaggedTemplateExpression(parent) && parent.tag === node || t2.isTSNonNullExpression(parent);
  72068. function NullableTypeAnnotation(node, parent) {
  72069. return t2.isArrayTypeAnnotation(parent);
  72070. }
  72071. function FunctionTypeAnnotation(node, parent, printStack) {
  72072. return t2.isUnionTypeAnnotation(parent) || t2.isIntersectionTypeAnnotation(parent) || t2.isArrayTypeAnnotation(parent) || t2.isTypeAnnotation(parent) && t2.isArrowFunctionExpression(printStack[printStack.length - 3]);
  72073. }
  72074. function UpdateExpression(node, parent) {
  72075. return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
  72076. }
  72077. function ObjectExpression(node, parent, printStack) {
  72078. return isFirstInContext(printStack, {
  72079. expressionStatement: true,
  72080. arrowBody: true
  72081. });
  72082. }
  72083. function DoExpression(node, parent, printStack) {
  72084. return !node.async && isFirstInContext(printStack, {
  72085. expressionStatement: true
  72086. });
  72087. }
  72088. function Binary(node, parent) {
  72089. if (node.operator === "**" && t2.isBinaryExpression(parent, {
  72090. operator: "**"
  72091. })) {
  72092. return parent.left === node;
  72093. }
  72094. if (isClassExtendsClause(node, parent)) {
  72095. return true;
  72096. }
  72097. if (hasPostfixPart(node, parent) || t2.isUnaryLike(parent) || t2.isAwaitExpression(parent)) {
  72098. return true;
  72099. }
  72100. if (t2.isBinary(parent)) {
  72101. const parentOp = parent.operator;
  72102. const parentPos = PRECEDENCE[parentOp];
  72103. const nodeOp = node.operator;
  72104. const nodePos = PRECEDENCE[nodeOp];
  72105. if (parentPos === nodePos && parent.right === node && !t2.isLogicalExpression(parent) || parentPos > nodePos) {
  72106. return true;
  72107. }
  72108. }
  72109. }
  72110. function UnionTypeAnnotation(node, parent) {
  72111. return t2.isArrayTypeAnnotation(parent) || t2.isNullableTypeAnnotation(parent) || t2.isIntersectionTypeAnnotation(parent) || t2.isUnionTypeAnnotation(parent);
  72112. }
  72113. function OptionalIndexedAccessType(node, parent) {
  72114. return t2.isIndexedAccessType(parent, {
  72115. objectType: node
  72116. });
  72117. }
  72118. function TSAsExpression() {
  72119. return true;
  72120. }
  72121. function TSTypeAssertion() {
  72122. return true;
  72123. }
  72124. function TSUnionType(node, parent) {
  72125. return t2.isTSArrayType(parent) || t2.isTSOptionalType(parent) || t2.isTSIntersectionType(parent) || t2.isTSUnionType(parent) || t2.isTSRestType(parent);
  72126. }
  72127. function TSInferType(node, parent) {
  72128. return t2.isTSArrayType(parent) || t2.isTSOptionalType(parent);
  72129. }
  72130. function BinaryExpression2(node, parent) {
  72131. return node.operator === "in" && (t2.isVariableDeclarator(parent) || t2.isFor(parent));
  72132. }
  72133. function SequenceExpression(node, parent) {
  72134. if (t2.isForStatement(parent) || t2.isThrowStatement(parent) || t2.isReturnStatement(parent) || t2.isIfStatement(parent) && parent.test === node || t2.isWhileStatement(parent) && parent.test === node || t2.isForInStatement(parent) && parent.right === node || t2.isSwitchStatement(parent) && parent.discriminant === node || t2.isExpressionStatement(parent) && parent.expression === node) {
  72135. return false;
  72136. }
  72137. return true;
  72138. }
  72139. function YieldExpression(node, parent) {
  72140. return t2.isBinary(parent) || t2.isUnaryLike(parent) || hasPostfixPart(node, parent) || t2.isAwaitExpression(parent) && t2.isYieldExpression(node) || t2.isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
  72141. }
  72142. function ClassExpression(node, parent, printStack) {
  72143. return isFirstInContext(printStack, {
  72144. expressionStatement: true,
  72145. exportDefault: true
  72146. });
  72147. }
  72148. function UnaryLike(node, parent) {
  72149. return hasPostfixPart(node, parent) || t2.isBinaryExpression(parent, {
  72150. operator: "**",
  72151. left: node
  72152. }) || isClassExtendsClause(node, parent);
  72153. }
  72154. function FunctionExpression(node, parent, printStack) {
  72155. return isFirstInContext(printStack, {
  72156. expressionStatement: true,
  72157. exportDefault: true
  72158. });
  72159. }
  72160. function ArrowFunctionExpression(node, parent) {
  72161. return t2.isExportDeclaration(parent) || ConditionalExpression(node, parent);
  72162. }
  72163. function ConditionalExpression(node, parent) {
  72164. if (t2.isUnaryLike(parent) || t2.isBinary(parent) || t2.isConditionalExpression(parent, {
  72165. test: node
  72166. }) || t2.isAwaitExpression(parent) || t2.isTSTypeAssertion(parent) || t2.isTSAsExpression(parent)) {
  72167. return true;
  72168. }
  72169. return UnaryLike(node, parent);
  72170. }
  72171. function OptionalMemberExpression(node, parent) {
  72172. return t2.isCallExpression(parent, {
  72173. callee: node
  72174. }) || t2.isMemberExpression(parent, {
  72175. object: node
  72176. });
  72177. }
  72178. function AssignmentExpression(node, parent) {
  72179. if (t2.isObjectPattern(node.left)) {
  72180. return true;
  72181. } else {
  72182. return ConditionalExpression(node, parent);
  72183. }
  72184. }
  72185. function LogicalExpression(node, parent) {
  72186. switch (node.operator) {
  72187. case "||":
  72188. if (!t2.isLogicalExpression(parent))
  72189. return false;
  72190. return parent.operator === "??" || parent.operator === "&&";
  72191. case "&&":
  72192. return t2.isLogicalExpression(parent, {
  72193. operator: "??"
  72194. });
  72195. case "??":
  72196. return t2.isLogicalExpression(parent) && parent.operator !== "??";
  72197. }
  72198. }
  72199. function Identifier(node, parent, printStack) {
  72200. if (node.name === "let") {
  72201. const isFollowedByBracket = t2.isMemberExpression(parent, {
  72202. object: node,
  72203. computed: true
  72204. }) || t2.isOptionalMemberExpression(parent, {
  72205. object: node,
  72206. computed: true,
  72207. optional: false
  72208. });
  72209. return isFirstInContext(printStack, {
  72210. expressionStatement: isFollowedByBracket,
  72211. forHead: isFollowedByBracket,
  72212. forInHead: isFollowedByBracket,
  72213. forOfHead: true
  72214. });
  72215. }
  72216. return node.name === "async" && t2.isForOfStatement(parent) && node === parent.left;
  72217. }
  72218. function isFirstInContext(printStack, {
  72219. expressionStatement = false,
  72220. arrowBody = false,
  72221. exportDefault = false,
  72222. forHead = false,
  72223. forInHead = false,
  72224. forOfHead = false
  72225. }) {
  72226. let i = printStack.length - 1;
  72227. let node = printStack[i];
  72228. i--;
  72229. let parent = printStack[i];
  72230. while (i >= 0) {
  72231. if (expressionStatement && t2.isExpressionStatement(parent, {
  72232. expression: node
  72233. }) || exportDefault && t2.isExportDefaultDeclaration(parent, {
  72234. declaration: node
  72235. }) || arrowBody && t2.isArrowFunctionExpression(parent, {
  72236. body: node
  72237. }) || forHead && t2.isForStatement(parent, {
  72238. init: node
  72239. }) || forInHead && t2.isForInStatement(parent, {
  72240. left: node
  72241. }) || forOfHead && t2.isForOfStatement(parent, {
  72242. left: node
  72243. })) {
  72244. return true;
  72245. }
  72246. if (hasPostfixPart(node, parent) && !t2.isNewExpression(parent) || t2.isSequenceExpression(parent) && parent.expressions[0] === node || t2.isConditional(parent, {
  72247. test: node
  72248. }) || t2.isBinary(parent, {
  72249. left: node
  72250. }) || t2.isAssignmentExpression(parent, {
  72251. left: node
  72252. })) {
  72253. node = parent;
  72254. i--;
  72255. parent = printStack[i];
  72256. } else {
  72257. return false;
  72258. }
  72259. }
  72260. return false;
  72261. }
  72262. }
  72263. });
  72264. // node_modules/@babel/generator/lib/node/index.js
  72265. var require_node3 = __commonJS({
  72266. "node_modules/@babel/generator/lib/node/index.js"(exports) {
  72267. "use strict";
  72268. Object.defineProperty(exports, "__esModule", {
  72269. value: true
  72270. });
  72271. exports.needsWhitespace = needsWhitespace;
  72272. exports.needsWhitespaceBefore = needsWhitespaceBefore;
  72273. exports.needsWhitespaceAfter = needsWhitespaceAfter;
  72274. exports.needsParens = needsParens;
  72275. var whitespace2 = require_whitespace2();
  72276. var parens = require_parentheses2();
  72277. var t2 = require_lib2();
  72278. function expandAliases(obj) {
  72279. const newObj = {};
  72280. function add(type, func) {
  72281. const fn = newObj[type];
  72282. newObj[type] = fn ? function(node, parent, stack) {
  72283. const result = fn(node, parent, stack);
  72284. return result == null ? func(node, parent, stack) : result;
  72285. } : func;
  72286. }
  72287. for (const type of Object.keys(obj)) {
  72288. const aliases = t2.FLIPPED_ALIAS_KEYS[type];
  72289. if (aliases) {
  72290. for (const alias of aliases) {
  72291. add(alias, obj[type]);
  72292. }
  72293. } else {
  72294. add(type, obj[type]);
  72295. }
  72296. }
  72297. return newObj;
  72298. }
  72299. var expandedParens = expandAliases(parens);
  72300. var expandedWhitespaceNodes = expandAliases(whitespace2.nodes);
  72301. var expandedWhitespaceList = expandAliases(whitespace2.list);
  72302. function find2(obj, node, parent, printStack) {
  72303. const fn = obj[node.type];
  72304. return fn ? fn(node, parent, printStack) : null;
  72305. }
  72306. function isOrHasCallExpression(node) {
  72307. if (t2.isCallExpression(node)) {
  72308. return true;
  72309. }
  72310. return t2.isMemberExpression(node) && isOrHasCallExpression(node.object);
  72311. }
  72312. function needsWhitespace(node, parent, type) {
  72313. if (!node)
  72314. return 0;
  72315. if (t2.isExpressionStatement(node)) {
  72316. node = node.expression;
  72317. }
  72318. let linesInfo = find2(expandedWhitespaceNodes, node, parent);
  72319. if (!linesInfo) {
  72320. const items = find2(expandedWhitespaceList, node, parent);
  72321. if (items) {
  72322. for (let i = 0; i < items.length; i++) {
  72323. linesInfo = needsWhitespace(items[i], node, type);
  72324. if (linesInfo)
  72325. break;
  72326. }
  72327. }
  72328. }
  72329. if (typeof linesInfo === "object" && linesInfo !== null) {
  72330. return linesInfo[type] || 0;
  72331. }
  72332. return 0;
  72333. }
  72334. function needsWhitespaceBefore(node, parent) {
  72335. return needsWhitespace(node, parent, "before");
  72336. }
  72337. function needsWhitespaceAfter(node, parent) {
  72338. return needsWhitespace(node, parent, "after");
  72339. }
  72340. function needsParens(node, parent, printStack) {
  72341. if (!parent)
  72342. return false;
  72343. if (t2.isNewExpression(parent) && parent.callee === node) {
  72344. if (isOrHasCallExpression(node))
  72345. return true;
  72346. }
  72347. return find2(expandedParens, node, parent, printStack);
  72348. }
  72349. }
  72350. });
  72351. // node_modules/@babel/generator/lib/generators/template-literals.js
  72352. var require_template_literals2 = __commonJS({
  72353. "node_modules/@babel/generator/lib/generators/template-literals.js"(exports) {
  72354. "use strict";
  72355. Object.defineProperty(exports, "__esModule", {
  72356. value: true
  72357. });
  72358. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  72359. exports.TemplateElement = TemplateElement;
  72360. exports.TemplateLiteral = TemplateLiteral;
  72361. var t2 = require_lib2();
  72362. function TaggedTemplateExpression(node) {
  72363. this.print(node.tag, node);
  72364. this.print(node.typeParameters, node);
  72365. this.print(node.quasi, node);
  72366. }
  72367. function TemplateElement(node, parent) {
  72368. const isFirst = parent.quasis[0] === node;
  72369. const isLast = parent.quasis[parent.quasis.length - 1] === node;
  72370. const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
  72371. this.token(value);
  72372. }
  72373. function TemplateLiteral(node) {
  72374. const quasis = node.quasis;
  72375. for (let i = 0; i < quasis.length; i++) {
  72376. this.print(quasis[i], node);
  72377. if (i + 1 < quasis.length) {
  72378. this.print(node.expressions[i], node);
  72379. }
  72380. }
  72381. }
  72382. }
  72383. });
  72384. // node_modules/@babel/generator/lib/generators/expressions.js
  72385. var require_expressions2 = __commonJS({
  72386. "node_modules/@babel/generator/lib/generators/expressions.js"(exports) {
  72387. "use strict";
  72388. Object.defineProperty(exports, "__esModule", {
  72389. value: true
  72390. });
  72391. exports.UnaryExpression = UnaryExpression;
  72392. exports.DoExpression = DoExpression;
  72393. exports.ParenthesizedExpression = ParenthesizedExpression;
  72394. exports.UpdateExpression = UpdateExpression;
  72395. exports.ConditionalExpression = ConditionalExpression;
  72396. exports.NewExpression = NewExpression;
  72397. exports.SequenceExpression = SequenceExpression;
  72398. exports.ThisExpression = ThisExpression;
  72399. exports.Super = Super;
  72400. exports.Decorator = Decorator;
  72401. exports.OptionalMemberExpression = OptionalMemberExpression;
  72402. exports.OptionalCallExpression = OptionalCallExpression;
  72403. exports.CallExpression = CallExpression;
  72404. exports.Import = Import;
  72405. exports.EmptyStatement = EmptyStatement;
  72406. exports.ExpressionStatement = ExpressionStatement;
  72407. exports.AssignmentPattern = AssignmentPattern;
  72408. exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
  72409. exports.BindExpression = BindExpression;
  72410. exports.MemberExpression = MemberExpression;
  72411. exports.MetaProperty = MetaProperty;
  72412. exports.PrivateName = PrivateName;
  72413. exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
  72414. exports.ModuleExpression = ModuleExpression;
  72415. exports.AwaitExpression = exports.YieldExpression = void 0;
  72416. var t2 = require_lib2();
  72417. var n = require_node3();
  72418. function UnaryExpression(node) {
  72419. if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
  72420. this.word(node.operator);
  72421. this.space();
  72422. } else {
  72423. this.token(node.operator);
  72424. }
  72425. this.print(node.argument, node);
  72426. }
  72427. function DoExpression(node) {
  72428. if (node.async) {
  72429. this.word("async");
  72430. this.space();
  72431. }
  72432. this.word("do");
  72433. this.space();
  72434. this.print(node.body, node);
  72435. }
  72436. function ParenthesizedExpression(node) {
  72437. this.token("(");
  72438. this.print(node.expression, node);
  72439. this.token(")");
  72440. }
  72441. function UpdateExpression(node) {
  72442. if (node.prefix) {
  72443. this.token(node.operator);
  72444. this.print(node.argument, node);
  72445. } else {
  72446. this.startTerminatorless(true);
  72447. this.print(node.argument, node);
  72448. this.endTerminatorless();
  72449. this.token(node.operator);
  72450. }
  72451. }
  72452. function ConditionalExpression(node) {
  72453. this.print(node.test, node);
  72454. this.space();
  72455. this.token("?");
  72456. this.space();
  72457. this.print(node.consequent, node);
  72458. this.space();
  72459. this.token(":");
  72460. this.space();
  72461. this.print(node.alternate, node);
  72462. }
  72463. function NewExpression(node, parent) {
  72464. this.word("new");
  72465. this.space();
  72466. this.print(node.callee, node);
  72467. if (this.format.minified && node.arguments.length === 0 && !node.optional && !t2.isCallExpression(parent, {
  72468. callee: node
  72469. }) && !t2.isMemberExpression(parent) && !t2.isNewExpression(parent)) {
  72470. return;
  72471. }
  72472. this.print(node.typeArguments, node);
  72473. this.print(node.typeParameters, node);
  72474. if (node.optional) {
  72475. this.token("?.");
  72476. }
  72477. this.token("(");
  72478. this.printList(node.arguments, node);
  72479. this.token(")");
  72480. }
  72481. function SequenceExpression(node) {
  72482. this.printList(node.expressions, node);
  72483. }
  72484. function ThisExpression() {
  72485. this.word("this");
  72486. }
  72487. function Super() {
  72488. this.word("super");
  72489. }
  72490. function Decorator(node) {
  72491. this.token("@");
  72492. this.print(node.expression, node);
  72493. this.newline();
  72494. }
  72495. function OptionalMemberExpression(node) {
  72496. this.print(node.object, node);
  72497. if (!node.computed && t2.isMemberExpression(node.property)) {
  72498. throw new TypeError("Got a MemberExpression for MemberExpression property");
  72499. }
  72500. let computed = node.computed;
  72501. if (t2.isLiteral(node.property) && typeof node.property.value === "number") {
  72502. computed = true;
  72503. }
  72504. if (node.optional) {
  72505. this.token("?.");
  72506. }
  72507. if (computed) {
  72508. this.token("[");
  72509. this.print(node.property, node);
  72510. this.token("]");
  72511. } else {
  72512. if (!node.optional) {
  72513. this.token(".");
  72514. }
  72515. this.print(node.property, node);
  72516. }
  72517. }
  72518. function OptionalCallExpression(node) {
  72519. this.print(node.callee, node);
  72520. this.print(node.typeArguments, node);
  72521. this.print(node.typeParameters, node);
  72522. if (node.optional) {
  72523. this.token("?.");
  72524. }
  72525. this.token("(");
  72526. this.printList(node.arguments, node);
  72527. this.token(")");
  72528. }
  72529. function CallExpression(node) {
  72530. this.print(node.callee, node);
  72531. this.print(node.typeArguments, node);
  72532. this.print(node.typeParameters, node);
  72533. this.token("(");
  72534. this.printList(node.arguments, node);
  72535. this.token(")");
  72536. }
  72537. function Import() {
  72538. this.word("import");
  72539. }
  72540. function buildYieldAwait(keyword) {
  72541. return function(node) {
  72542. this.word(keyword);
  72543. if (node.delegate) {
  72544. this.token("*");
  72545. }
  72546. if (node.argument) {
  72547. this.space();
  72548. const terminatorState = this.startTerminatorless();
  72549. this.print(node.argument, node);
  72550. this.endTerminatorless(terminatorState);
  72551. }
  72552. };
  72553. }
  72554. var YieldExpression = buildYieldAwait("yield");
  72555. exports.YieldExpression = YieldExpression;
  72556. var AwaitExpression = buildYieldAwait("await");
  72557. exports.AwaitExpression = AwaitExpression;
  72558. function EmptyStatement() {
  72559. this.semicolon(true);
  72560. }
  72561. function ExpressionStatement(node) {
  72562. this.print(node.expression, node);
  72563. this.semicolon();
  72564. }
  72565. function AssignmentPattern(node) {
  72566. this.print(node.left, node);
  72567. if (node.left.optional)
  72568. this.token("?");
  72569. this.print(node.left.typeAnnotation, node);
  72570. this.space();
  72571. this.token("=");
  72572. this.space();
  72573. this.print(node.right, node);
  72574. }
  72575. function AssignmentExpression(node, parent) {
  72576. const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
  72577. if (parens) {
  72578. this.token("(");
  72579. }
  72580. this.print(node.left, node);
  72581. this.space();
  72582. if (node.operator === "in" || node.operator === "instanceof") {
  72583. this.word(node.operator);
  72584. } else {
  72585. this.token(node.operator);
  72586. }
  72587. this.space();
  72588. this.print(node.right, node);
  72589. if (parens) {
  72590. this.token(")");
  72591. }
  72592. }
  72593. function BindExpression(node) {
  72594. this.print(node.object, node);
  72595. this.token("::");
  72596. this.print(node.callee, node);
  72597. }
  72598. function MemberExpression(node) {
  72599. this.print(node.object, node);
  72600. if (!node.computed && t2.isMemberExpression(node.property)) {
  72601. throw new TypeError("Got a MemberExpression for MemberExpression property");
  72602. }
  72603. let computed = node.computed;
  72604. if (t2.isLiteral(node.property) && typeof node.property.value === "number") {
  72605. computed = true;
  72606. }
  72607. if (computed) {
  72608. this.token("[");
  72609. this.print(node.property, node);
  72610. this.token("]");
  72611. } else {
  72612. this.token(".");
  72613. this.print(node.property, node);
  72614. }
  72615. }
  72616. function MetaProperty(node) {
  72617. this.print(node.meta, node);
  72618. this.token(".");
  72619. this.print(node.property, node);
  72620. }
  72621. function PrivateName(node) {
  72622. this.token("#");
  72623. this.print(node.id, node);
  72624. }
  72625. function V8IntrinsicIdentifier(node) {
  72626. this.token("%");
  72627. this.word(node.name);
  72628. }
  72629. function ModuleExpression(node) {
  72630. this.word("module");
  72631. this.space();
  72632. this.token("{");
  72633. if (node.body.body.length === 0) {
  72634. this.token("}");
  72635. } else {
  72636. this.newline();
  72637. this.printSequence(node.body.body, node, {
  72638. indent: true
  72639. });
  72640. this.rightBrace();
  72641. }
  72642. }
  72643. }
  72644. });
  72645. // node_modules/@babel/generator/lib/generators/statements.js
  72646. var require_statements2 = __commonJS({
  72647. "node_modules/@babel/generator/lib/generators/statements.js"(exports) {
  72648. "use strict";
  72649. Object.defineProperty(exports, "__esModule", {
  72650. value: true
  72651. });
  72652. exports.WithStatement = WithStatement;
  72653. exports.IfStatement = IfStatement;
  72654. exports.ForStatement = ForStatement;
  72655. exports.WhileStatement = WhileStatement;
  72656. exports.DoWhileStatement = DoWhileStatement;
  72657. exports.LabeledStatement = LabeledStatement;
  72658. exports.TryStatement = TryStatement;
  72659. exports.CatchClause = CatchClause;
  72660. exports.SwitchStatement = SwitchStatement;
  72661. exports.SwitchCase = SwitchCase;
  72662. exports.DebuggerStatement = DebuggerStatement;
  72663. exports.VariableDeclaration = VariableDeclaration;
  72664. exports.VariableDeclarator = VariableDeclarator;
  72665. exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0;
  72666. var t2 = require_lib2();
  72667. function WithStatement(node) {
  72668. this.word("with");
  72669. this.space();
  72670. this.token("(");
  72671. this.print(node.object, node);
  72672. this.token(")");
  72673. this.printBlock(node);
  72674. }
  72675. function IfStatement(node) {
  72676. this.word("if");
  72677. this.space();
  72678. this.token("(");
  72679. this.print(node.test, node);
  72680. this.token(")");
  72681. this.space();
  72682. const needsBlock = node.alternate && t2.isIfStatement(getLastStatement(node.consequent));
  72683. if (needsBlock) {
  72684. this.token("{");
  72685. this.newline();
  72686. this.indent();
  72687. }
  72688. this.printAndIndentOnComments(node.consequent, node);
  72689. if (needsBlock) {
  72690. this.dedent();
  72691. this.newline();
  72692. this.token("}");
  72693. }
  72694. if (node.alternate) {
  72695. if (this.endsWith("}"))
  72696. this.space();
  72697. this.word("else");
  72698. this.space();
  72699. this.printAndIndentOnComments(node.alternate, node);
  72700. }
  72701. }
  72702. function getLastStatement(statement) {
  72703. if (!t2.isStatement(statement.body))
  72704. return statement;
  72705. return getLastStatement(statement.body);
  72706. }
  72707. function ForStatement(node) {
  72708. this.word("for");
  72709. this.space();
  72710. this.token("(");
  72711. this.inForStatementInitCounter++;
  72712. this.print(node.init, node);
  72713. this.inForStatementInitCounter--;
  72714. this.token(";");
  72715. if (node.test) {
  72716. this.space();
  72717. this.print(node.test, node);
  72718. }
  72719. this.token(";");
  72720. if (node.update) {
  72721. this.space();
  72722. this.print(node.update, node);
  72723. }
  72724. this.token(")");
  72725. this.printBlock(node);
  72726. }
  72727. function WhileStatement(node) {
  72728. this.word("while");
  72729. this.space();
  72730. this.token("(");
  72731. this.print(node.test, node);
  72732. this.token(")");
  72733. this.printBlock(node);
  72734. }
  72735. var buildForXStatement = function(op) {
  72736. return function(node) {
  72737. this.word("for");
  72738. this.space();
  72739. if (op === "of" && node.await) {
  72740. this.word("await");
  72741. this.space();
  72742. }
  72743. this.token("(");
  72744. this.print(node.left, node);
  72745. this.space();
  72746. this.word(op);
  72747. this.space();
  72748. this.print(node.right, node);
  72749. this.token(")");
  72750. this.printBlock(node);
  72751. };
  72752. };
  72753. var ForInStatement2 = buildForXStatement("in");
  72754. exports.ForInStatement = ForInStatement2;
  72755. var ForOfStatement = buildForXStatement("of");
  72756. exports.ForOfStatement = ForOfStatement;
  72757. function DoWhileStatement(node) {
  72758. this.word("do");
  72759. this.space();
  72760. this.print(node.body, node);
  72761. this.space();
  72762. this.word("while");
  72763. this.space();
  72764. this.token("(");
  72765. this.print(node.test, node);
  72766. this.token(")");
  72767. this.semicolon();
  72768. }
  72769. function buildLabelStatement(prefix, key = "label") {
  72770. return function(node) {
  72771. this.word(prefix);
  72772. const label = node[key];
  72773. if (label) {
  72774. this.space();
  72775. const isLabel = key == "label";
  72776. const terminatorState = this.startTerminatorless(isLabel);
  72777. this.print(label, node);
  72778. this.endTerminatorless(terminatorState);
  72779. }
  72780. this.semicolon();
  72781. };
  72782. }
  72783. var ContinueStatement = buildLabelStatement("continue");
  72784. exports.ContinueStatement = ContinueStatement;
  72785. var ReturnStatement = buildLabelStatement("return", "argument");
  72786. exports.ReturnStatement = ReturnStatement;
  72787. var BreakStatement = buildLabelStatement("break");
  72788. exports.BreakStatement = BreakStatement;
  72789. var ThrowStatement = buildLabelStatement("throw", "argument");
  72790. exports.ThrowStatement = ThrowStatement;
  72791. function LabeledStatement(node) {
  72792. this.print(node.label, node);
  72793. this.token(":");
  72794. this.space();
  72795. this.print(node.body, node);
  72796. }
  72797. function TryStatement(node) {
  72798. this.word("try");
  72799. this.space();
  72800. this.print(node.block, node);
  72801. this.space();
  72802. if (node.handlers) {
  72803. this.print(node.handlers[0], node);
  72804. } else {
  72805. this.print(node.handler, node);
  72806. }
  72807. if (node.finalizer) {
  72808. this.space();
  72809. this.word("finally");
  72810. this.space();
  72811. this.print(node.finalizer, node);
  72812. }
  72813. }
  72814. function CatchClause(node) {
  72815. this.word("catch");
  72816. this.space();
  72817. if (node.param) {
  72818. this.token("(");
  72819. this.print(node.param, node);
  72820. this.print(node.param.typeAnnotation, node);
  72821. this.token(")");
  72822. this.space();
  72823. }
  72824. this.print(node.body, node);
  72825. }
  72826. function SwitchStatement(node) {
  72827. this.word("switch");
  72828. this.space();
  72829. this.token("(");
  72830. this.print(node.discriminant, node);
  72831. this.token(")");
  72832. this.space();
  72833. this.token("{");
  72834. this.printSequence(node.cases, node, {
  72835. indent: true,
  72836. addNewlines(leading, cas) {
  72837. if (!leading && node.cases[node.cases.length - 1] === cas)
  72838. return -1;
  72839. }
  72840. });
  72841. this.token("}");
  72842. }
  72843. function SwitchCase(node) {
  72844. if (node.test) {
  72845. this.word("case");
  72846. this.space();
  72847. this.print(node.test, node);
  72848. this.token(":");
  72849. } else {
  72850. this.word("default");
  72851. this.token(":");
  72852. }
  72853. if (node.consequent.length) {
  72854. this.newline();
  72855. this.printSequence(node.consequent, node, {
  72856. indent: true
  72857. });
  72858. }
  72859. }
  72860. function DebuggerStatement() {
  72861. this.word("debugger");
  72862. this.semicolon();
  72863. }
  72864. function variableDeclarationIndent() {
  72865. this.token(",");
  72866. this.newline();
  72867. if (this.endsWith("\n"))
  72868. for (let i = 0; i < 4; i++)
  72869. this.space(true);
  72870. }
  72871. function constDeclarationIndent() {
  72872. this.token(",");
  72873. this.newline();
  72874. if (this.endsWith("\n"))
  72875. for (let i = 0; i < 6; i++)
  72876. this.space(true);
  72877. }
  72878. function VariableDeclaration(node, parent) {
  72879. if (node.declare) {
  72880. this.word("declare");
  72881. this.space();
  72882. }
  72883. this.word(node.kind);
  72884. this.space();
  72885. let hasInits = false;
  72886. if (!t2.isFor(parent)) {
  72887. for (const declar of node.declarations) {
  72888. if (declar.init) {
  72889. hasInits = true;
  72890. }
  72891. }
  72892. }
  72893. let separator;
  72894. if (hasInits) {
  72895. separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
  72896. }
  72897. this.printList(node.declarations, node, {
  72898. separator
  72899. });
  72900. if (t2.isFor(parent)) {
  72901. if (t2.isForStatement(parent)) {
  72902. if (parent.init === node)
  72903. return;
  72904. } else {
  72905. if (parent.left === node)
  72906. return;
  72907. }
  72908. }
  72909. this.semicolon();
  72910. }
  72911. function VariableDeclarator(node) {
  72912. this.print(node.id, node);
  72913. if (node.definite)
  72914. this.token("!");
  72915. this.print(node.id.typeAnnotation, node);
  72916. if (node.init) {
  72917. this.space();
  72918. this.token("=");
  72919. this.space();
  72920. this.print(node.init, node);
  72921. }
  72922. }
  72923. }
  72924. });
  72925. // node_modules/@babel/generator/lib/generators/classes.js
  72926. var require_classes2 = __commonJS({
  72927. "node_modules/@babel/generator/lib/generators/classes.js"(exports) {
  72928. "use strict";
  72929. Object.defineProperty(exports, "__esModule", {
  72930. value: true
  72931. });
  72932. exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
  72933. exports.ClassBody = ClassBody;
  72934. exports.ClassProperty = ClassProperty;
  72935. exports.ClassPrivateProperty = ClassPrivateProperty;
  72936. exports.ClassMethod = ClassMethod;
  72937. exports.ClassPrivateMethod = ClassPrivateMethod;
  72938. exports._classMethodHead = _classMethodHead;
  72939. exports.StaticBlock = StaticBlock;
  72940. var t2 = require_lib2();
  72941. function ClassDeclaration(node, parent) {
  72942. if (!this.format.decoratorsBeforeExport || !t2.isExportDefaultDeclaration(parent) && !t2.isExportNamedDeclaration(parent)) {
  72943. this.printJoin(node.decorators, node);
  72944. }
  72945. if (node.declare) {
  72946. this.word("declare");
  72947. this.space();
  72948. }
  72949. if (node.abstract) {
  72950. this.word("abstract");
  72951. this.space();
  72952. }
  72953. this.word("class");
  72954. if (node.id) {
  72955. this.space();
  72956. this.print(node.id, node);
  72957. }
  72958. this.print(node.typeParameters, node);
  72959. if (node.superClass) {
  72960. this.space();
  72961. this.word("extends");
  72962. this.space();
  72963. this.print(node.superClass, node);
  72964. this.print(node.superTypeParameters, node);
  72965. }
  72966. if (node.implements) {
  72967. this.space();
  72968. this.word("implements");
  72969. this.space();
  72970. this.printList(node.implements, node);
  72971. }
  72972. this.space();
  72973. this.print(node.body, node);
  72974. }
  72975. function ClassBody(node) {
  72976. this.token("{");
  72977. this.printInnerComments(node);
  72978. if (node.body.length === 0) {
  72979. this.token("}");
  72980. } else {
  72981. this.newline();
  72982. this.indent();
  72983. this.printSequence(node.body, node);
  72984. this.dedent();
  72985. if (!this.endsWith("\n"))
  72986. this.newline();
  72987. this.rightBrace();
  72988. }
  72989. }
  72990. function ClassProperty(node) {
  72991. this.printJoin(node.decorators, node);
  72992. this.source("end", node.key.loc);
  72993. this.tsPrintClassMemberModifiers(node, true);
  72994. if (node.computed) {
  72995. this.token("[");
  72996. this.print(node.key, node);
  72997. this.token("]");
  72998. } else {
  72999. this._variance(node);
  73000. this.print(node.key, node);
  73001. }
  73002. if (node.optional) {
  73003. this.token("?");
  73004. }
  73005. if (node.definite) {
  73006. this.token("!");
  73007. }
  73008. this.print(node.typeAnnotation, node);
  73009. if (node.value) {
  73010. this.space();
  73011. this.token("=");
  73012. this.space();
  73013. this.print(node.value, node);
  73014. }
  73015. this.semicolon();
  73016. }
  73017. function ClassPrivateProperty(node) {
  73018. this.printJoin(node.decorators, node);
  73019. if (node.static) {
  73020. this.word("static");
  73021. this.space();
  73022. }
  73023. this.print(node.key, node);
  73024. this.print(node.typeAnnotation, node);
  73025. if (node.value) {
  73026. this.space();
  73027. this.token("=");
  73028. this.space();
  73029. this.print(node.value, node);
  73030. }
  73031. this.semicolon();
  73032. }
  73033. function ClassMethod(node) {
  73034. this._classMethodHead(node);
  73035. this.space();
  73036. this.print(node.body, node);
  73037. }
  73038. function ClassPrivateMethod(node) {
  73039. this._classMethodHead(node);
  73040. this.space();
  73041. this.print(node.body, node);
  73042. }
  73043. function _classMethodHead(node) {
  73044. this.printJoin(node.decorators, node);
  73045. this.source("end", node.key.loc);
  73046. this.tsPrintClassMemberModifiers(node, false);
  73047. this._methodHead(node);
  73048. }
  73049. function StaticBlock(node) {
  73050. this.word("static");
  73051. this.space();
  73052. this.token("{");
  73053. if (node.body.length === 0) {
  73054. this.token("}");
  73055. } else {
  73056. this.newline();
  73057. this.printSequence(node.body, node, {
  73058. indent: true
  73059. });
  73060. this.rightBrace();
  73061. }
  73062. }
  73063. }
  73064. });
  73065. // node_modules/@babel/generator/lib/generators/methods.js
  73066. var require_methods2 = __commonJS({
  73067. "node_modules/@babel/generator/lib/generators/methods.js"(exports) {
  73068. "use strict";
  73069. Object.defineProperty(exports, "__esModule", {
  73070. value: true
  73071. });
  73072. exports._params = _params;
  73073. exports._parameters = _parameters;
  73074. exports._param = _param;
  73075. exports._methodHead = _methodHead;
  73076. exports._predicate = _predicate;
  73077. exports._functionHead = _functionHead;
  73078. exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
  73079. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  73080. var t2 = require_lib2();
  73081. function _params(node) {
  73082. this.print(node.typeParameters, node);
  73083. this.token("(");
  73084. this._parameters(node.params, node);
  73085. this.token(")");
  73086. this.print(node.returnType, node);
  73087. }
  73088. function _parameters(parameters, parent) {
  73089. for (let i = 0; i < parameters.length; i++) {
  73090. this._param(parameters[i], parent);
  73091. if (i < parameters.length - 1) {
  73092. this.token(",");
  73093. this.space();
  73094. }
  73095. }
  73096. }
  73097. function _param(parameter, parent) {
  73098. this.printJoin(parameter.decorators, parameter);
  73099. this.print(parameter, parent);
  73100. if (parameter.optional)
  73101. this.token("?");
  73102. this.print(parameter.typeAnnotation, parameter);
  73103. }
  73104. function _methodHead(node) {
  73105. const kind = node.kind;
  73106. const key = node.key;
  73107. if (kind === "get" || kind === "set") {
  73108. this.word(kind);
  73109. this.space();
  73110. }
  73111. if (node.async) {
  73112. this._catchUp("start", key.loc);
  73113. this.word("async");
  73114. this.space();
  73115. }
  73116. if (kind === "method" || kind === "init") {
  73117. if (node.generator) {
  73118. this.token("*");
  73119. }
  73120. }
  73121. if (node.computed) {
  73122. this.token("[");
  73123. this.print(key, node);
  73124. this.token("]");
  73125. } else {
  73126. this.print(key, node);
  73127. }
  73128. if (node.optional) {
  73129. this.token("?");
  73130. }
  73131. this._params(node);
  73132. }
  73133. function _predicate(node) {
  73134. if (node.predicate) {
  73135. if (!node.returnType) {
  73136. this.token(":");
  73137. }
  73138. this.space();
  73139. this.print(node.predicate, node);
  73140. }
  73141. }
  73142. function _functionHead(node) {
  73143. if (node.async) {
  73144. this.word("async");
  73145. this.space();
  73146. }
  73147. this.word("function");
  73148. if (node.generator)
  73149. this.token("*");
  73150. this.space();
  73151. if (node.id) {
  73152. this.print(node.id, node);
  73153. }
  73154. this._params(node);
  73155. this._predicate(node);
  73156. }
  73157. function FunctionExpression(node) {
  73158. this._functionHead(node);
  73159. this.space();
  73160. this.print(node.body, node);
  73161. }
  73162. function ArrowFunctionExpression(node) {
  73163. if (node.async) {
  73164. this.word("async");
  73165. this.space();
  73166. }
  73167. const firstParam = node.params[0];
  73168. if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && t2.isIdentifier(firstParam) && !hasTypesOrComments(node, firstParam)) {
  73169. this.print(firstParam, node);
  73170. } else {
  73171. this._params(node);
  73172. }
  73173. this._predicate(node);
  73174. this.space();
  73175. this.token("=>");
  73176. this.space();
  73177. this.print(node.body, node);
  73178. }
  73179. function hasTypesOrComments(node, param) {
  73180. var _param$leadingComment, _param$trailingCommen;
  73181. return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);
  73182. }
  73183. }
  73184. });
  73185. // node_modules/@babel/generator/lib/generators/modules.js
  73186. var require_modules2 = __commonJS({
  73187. "node_modules/@babel/generator/lib/generators/modules.js"(exports) {
  73188. "use strict";
  73189. Object.defineProperty(exports, "__esModule", {
  73190. value: true
  73191. });
  73192. exports.ImportSpecifier = ImportSpecifier;
  73193. exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
  73194. exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
  73195. exports.ExportSpecifier = ExportSpecifier;
  73196. exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
  73197. exports.ExportAllDeclaration = ExportAllDeclaration;
  73198. exports.ExportNamedDeclaration = ExportNamedDeclaration;
  73199. exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
  73200. exports.ImportDeclaration = ImportDeclaration;
  73201. exports.ImportAttribute = ImportAttribute;
  73202. exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
  73203. var t2 = require_lib2();
  73204. function ImportSpecifier(node) {
  73205. if (node.importKind === "type" || node.importKind === "typeof") {
  73206. this.word(node.importKind);
  73207. this.space();
  73208. }
  73209. this.print(node.imported, node);
  73210. if (node.local && node.local.name !== node.imported.name) {
  73211. this.space();
  73212. this.word("as");
  73213. this.space();
  73214. this.print(node.local, node);
  73215. }
  73216. }
  73217. function ImportDefaultSpecifier(node) {
  73218. this.print(node.local, node);
  73219. }
  73220. function ExportDefaultSpecifier(node) {
  73221. this.print(node.exported, node);
  73222. }
  73223. function ExportSpecifier(node) {
  73224. this.print(node.local, node);
  73225. if (node.exported && node.local.name !== node.exported.name) {
  73226. this.space();
  73227. this.word("as");
  73228. this.space();
  73229. this.print(node.exported, node);
  73230. }
  73231. }
  73232. function ExportNamespaceSpecifier(node) {
  73233. this.token("*");
  73234. this.space();
  73235. this.word("as");
  73236. this.space();
  73237. this.print(node.exported, node);
  73238. }
  73239. function ExportAllDeclaration(node) {
  73240. this.word("export");
  73241. this.space();
  73242. if (node.exportKind === "type") {
  73243. this.word("type");
  73244. this.space();
  73245. }
  73246. this.token("*");
  73247. this.space();
  73248. this.word("from");
  73249. this.space();
  73250. this.print(node.source, node);
  73251. this.printAssertions(node);
  73252. this.semicolon();
  73253. }
  73254. function ExportNamedDeclaration(node) {
  73255. if (this.format.decoratorsBeforeExport && t2.isClassDeclaration(node.declaration)) {
  73256. this.printJoin(node.declaration.decorators, node);
  73257. }
  73258. this.word("export");
  73259. this.space();
  73260. ExportDeclaration.apply(this, arguments);
  73261. }
  73262. function ExportDefaultDeclaration(node) {
  73263. if (this.format.decoratorsBeforeExport && t2.isClassDeclaration(node.declaration)) {
  73264. this.printJoin(node.declaration.decorators, node);
  73265. }
  73266. this.word("export");
  73267. this.space();
  73268. this.word("default");
  73269. this.space();
  73270. ExportDeclaration.apply(this, arguments);
  73271. }
  73272. function ExportDeclaration(node) {
  73273. if (node.declaration) {
  73274. const declar = node.declaration;
  73275. this.print(declar, node);
  73276. if (!t2.isStatement(declar))
  73277. this.semicolon();
  73278. } else {
  73279. if (node.exportKind === "type") {
  73280. this.word("type");
  73281. this.space();
  73282. }
  73283. const specifiers = node.specifiers.slice(0);
  73284. let hasSpecial = false;
  73285. for (; ; ) {
  73286. const first = specifiers[0];
  73287. if (t2.isExportDefaultSpecifier(first) || t2.isExportNamespaceSpecifier(first)) {
  73288. hasSpecial = true;
  73289. this.print(specifiers.shift(), node);
  73290. if (specifiers.length) {
  73291. this.token(",");
  73292. this.space();
  73293. }
  73294. } else {
  73295. break;
  73296. }
  73297. }
  73298. if (specifiers.length || !specifiers.length && !hasSpecial) {
  73299. this.token("{");
  73300. if (specifiers.length) {
  73301. this.space();
  73302. this.printList(specifiers, node);
  73303. this.space();
  73304. }
  73305. this.token("}");
  73306. }
  73307. if (node.source) {
  73308. this.space();
  73309. this.word("from");
  73310. this.space();
  73311. this.print(node.source, node);
  73312. this.printAssertions(node);
  73313. }
  73314. this.semicolon();
  73315. }
  73316. }
  73317. function ImportDeclaration(node) {
  73318. this.word("import");
  73319. this.space();
  73320. if (node.importKind === "type" || node.importKind === "typeof") {
  73321. this.word(node.importKind);
  73322. this.space();
  73323. }
  73324. const specifiers = node.specifiers.slice(0);
  73325. if (specifiers != null && specifiers.length) {
  73326. for (; ; ) {
  73327. const first = specifiers[0];
  73328. if (t2.isImportDefaultSpecifier(first) || t2.isImportNamespaceSpecifier(first)) {
  73329. this.print(specifiers.shift(), node);
  73330. if (specifiers.length) {
  73331. this.token(",");
  73332. this.space();
  73333. }
  73334. } else {
  73335. break;
  73336. }
  73337. }
  73338. if (specifiers.length) {
  73339. this.token("{");
  73340. this.space();
  73341. this.printList(specifiers, node);
  73342. this.space();
  73343. this.token("}");
  73344. }
  73345. this.space();
  73346. this.word("from");
  73347. this.space();
  73348. }
  73349. this.print(node.source, node);
  73350. this.printAssertions(node);
  73351. {
  73352. var _node$attributes;
  73353. if ((_node$attributes = node.attributes) != null && _node$attributes.length) {
  73354. this.space();
  73355. this.word("with");
  73356. this.space();
  73357. this.printList(node.attributes, node);
  73358. }
  73359. }
  73360. this.semicolon();
  73361. }
  73362. function ImportAttribute(node) {
  73363. this.print(node.key);
  73364. this.token(":");
  73365. this.space();
  73366. this.print(node.value);
  73367. }
  73368. function ImportNamespaceSpecifier(node) {
  73369. this.token("*");
  73370. this.space();
  73371. this.word("as");
  73372. this.space();
  73373. this.print(node.local, node);
  73374. }
  73375. }
  73376. });
  73377. // node_modules/@babel/generator/lib/generators/types.js
  73378. var require_types2 = __commonJS({
  73379. "node_modules/@babel/generator/lib/generators/types.js"(exports) {
  73380. "use strict";
  73381. Object.defineProperty(exports, "__esModule", {
  73382. value: true
  73383. });
  73384. exports.Identifier = Identifier;
  73385. exports.ArgumentPlaceholder = ArgumentPlaceholder;
  73386. exports.SpreadElement = exports.RestElement = RestElement2;
  73387. exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
  73388. exports.ObjectMethod = ObjectMethod;
  73389. exports.ObjectProperty = ObjectProperty;
  73390. exports.ArrayPattern = exports.ArrayExpression = ArrayExpression2;
  73391. exports.RecordExpression = RecordExpression;
  73392. exports.TupleExpression = TupleExpression;
  73393. exports.RegExpLiteral = RegExpLiteral;
  73394. exports.BooleanLiteral = BooleanLiteral;
  73395. exports.NullLiteral = NullLiteral;
  73396. exports.NumericLiteral = NumericLiteral;
  73397. exports.StringLiteral = StringLiteral;
  73398. exports.BigIntLiteral = BigIntLiteral;
  73399. exports.DecimalLiteral = DecimalLiteral;
  73400. exports.PipelineTopicExpression = PipelineTopicExpression;
  73401. exports.PipelineBareFunction = PipelineBareFunction;
  73402. exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
  73403. var t2 = require_lib2();
  73404. var _jsesc = require_jsesc();
  73405. function Identifier(node) {
  73406. this.exactSource(node.loc, () => {
  73407. this.word(node.name);
  73408. });
  73409. }
  73410. function ArgumentPlaceholder() {
  73411. this.token("?");
  73412. }
  73413. function RestElement2(node) {
  73414. this.token("...");
  73415. this.print(node.argument, node);
  73416. }
  73417. function ObjectExpression(node) {
  73418. const props = node.properties;
  73419. this.token("{");
  73420. this.printInnerComments(node);
  73421. if (props.length) {
  73422. this.space();
  73423. this.printList(props, node, {
  73424. indent: true,
  73425. statement: true
  73426. });
  73427. this.space();
  73428. }
  73429. this.token("}");
  73430. }
  73431. function ObjectMethod(node) {
  73432. this.printJoin(node.decorators, node);
  73433. this._methodHead(node);
  73434. this.space();
  73435. this.print(node.body, node);
  73436. }
  73437. function ObjectProperty(node) {
  73438. this.printJoin(node.decorators, node);
  73439. if (node.computed) {
  73440. this.token("[");
  73441. this.print(node.key, node);
  73442. this.token("]");
  73443. } else {
  73444. if (t2.isAssignmentPattern(node.value) && t2.isIdentifier(node.key) && node.key.name === node.value.left.name) {
  73445. this.print(node.value, node);
  73446. return;
  73447. }
  73448. this.print(node.key, node);
  73449. if (node.shorthand && t2.isIdentifier(node.key) && t2.isIdentifier(node.value) && node.key.name === node.value.name) {
  73450. return;
  73451. }
  73452. }
  73453. this.token(":");
  73454. this.space();
  73455. this.print(node.value, node);
  73456. }
  73457. function ArrayExpression2(node) {
  73458. const elems = node.elements;
  73459. const len = elems.length;
  73460. this.token("[");
  73461. this.printInnerComments(node);
  73462. for (let i = 0; i < elems.length; i++) {
  73463. const elem = elems[i];
  73464. if (elem) {
  73465. if (i > 0)
  73466. this.space();
  73467. this.print(elem, node);
  73468. if (i < len - 1)
  73469. this.token(",");
  73470. } else {
  73471. this.token(",");
  73472. }
  73473. }
  73474. this.token("]");
  73475. }
  73476. function RecordExpression(node) {
  73477. const props = node.properties;
  73478. let startToken;
  73479. let endToken;
  73480. if (this.format.recordAndTupleSyntaxType === "bar") {
  73481. startToken = "{|";
  73482. endToken = "|}";
  73483. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  73484. startToken = "#{";
  73485. endToken = "}";
  73486. } else {
  73487. throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
  73488. }
  73489. this.token(startToken);
  73490. this.printInnerComments(node);
  73491. if (props.length) {
  73492. this.space();
  73493. this.printList(props, node, {
  73494. indent: true,
  73495. statement: true
  73496. });
  73497. this.space();
  73498. }
  73499. this.token(endToken);
  73500. }
  73501. function TupleExpression(node) {
  73502. const elems = node.elements;
  73503. const len = elems.length;
  73504. let startToken;
  73505. let endToken;
  73506. if (this.format.recordAndTupleSyntaxType === "bar") {
  73507. startToken = "[|";
  73508. endToken = "|]";
  73509. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  73510. startToken = "#[";
  73511. endToken = "]";
  73512. } else {
  73513. throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
  73514. }
  73515. this.token(startToken);
  73516. this.printInnerComments(node);
  73517. for (let i = 0; i < elems.length; i++) {
  73518. const elem = elems[i];
  73519. if (elem) {
  73520. if (i > 0)
  73521. this.space();
  73522. this.print(elem, node);
  73523. if (i < len - 1)
  73524. this.token(",");
  73525. }
  73526. }
  73527. this.token(endToken);
  73528. }
  73529. function RegExpLiteral(node) {
  73530. this.word(`/${node.pattern}/${node.flags}`);
  73531. }
  73532. function BooleanLiteral(node) {
  73533. this.word(node.value ? "true" : "false");
  73534. }
  73535. function NullLiteral() {
  73536. this.word("null");
  73537. }
  73538. function NumericLiteral(node) {
  73539. const raw = this.getPossibleRaw(node);
  73540. const opts = this.format.jsescOption;
  73541. const value = node.value + "";
  73542. if (opts.numbers) {
  73543. this.number(_jsesc(node.value, opts));
  73544. } else if (raw == null) {
  73545. this.number(value);
  73546. } else if (this.format.minified) {
  73547. this.number(raw.length < value.length ? raw : value);
  73548. } else {
  73549. this.number(raw);
  73550. }
  73551. }
  73552. function StringLiteral(node) {
  73553. const raw = this.getPossibleRaw(node);
  73554. if (!this.format.minified && raw != null) {
  73555. this.token(raw);
  73556. return;
  73557. }
  73558. const val = _jsesc(node.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && {
  73559. json: true
  73560. }));
  73561. return this.token(val);
  73562. }
  73563. function BigIntLiteral(node) {
  73564. const raw = this.getPossibleRaw(node);
  73565. if (!this.format.minified && raw != null) {
  73566. this.word(raw);
  73567. return;
  73568. }
  73569. this.word(node.value + "n");
  73570. }
  73571. function DecimalLiteral(node) {
  73572. const raw = this.getPossibleRaw(node);
  73573. if (!this.format.minified && raw != null) {
  73574. this.word(raw);
  73575. return;
  73576. }
  73577. this.word(node.value + "m");
  73578. }
  73579. function PipelineTopicExpression(node) {
  73580. this.print(node.expression, node);
  73581. }
  73582. function PipelineBareFunction(node) {
  73583. this.print(node.callee, node);
  73584. }
  73585. function PipelinePrimaryTopicReference() {
  73586. this.token("#");
  73587. }
  73588. }
  73589. });
  73590. // node_modules/@babel/generator/lib/generators/flow.js
  73591. var require_flow5 = __commonJS({
  73592. "node_modules/@babel/generator/lib/generators/flow.js"(exports) {
  73593. "use strict";
  73594. Object.defineProperty(exports, "__esModule", {
  73595. value: true
  73596. });
  73597. exports.AnyTypeAnnotation = AnyTypeAnnotation;
  73598. exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
  73599. exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
  73600. exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
  73601. exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
  73602. exports.DeclareClass = DeclareClass;
  73603. exports.DeclareFunction = DeclareFunction;
  73604. exports.InferredPredicate = InferredPredicate;
  73605. exports.DeclaredPredicate = DeclaredPredicate;
  73606. exports.DeclareInterface = DeclareInterface;
  73607. exports.DeclareModule = DeclareModule;
  73608. exports.DeclareModuleExports = DeclareModuleExports;
  73609. exports.DeclareTypeAlias = DeclareTypeAlias;
  73610. exports.DeclareOpaqueType = DeclareOpaqueType;
  73611. exports.DeclareVariable = DeclareVariable;
  73612. exports.DeclareExportDeclaration = DeclareExportDeclaration;
  73613. exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
  73614. exports.EnumDeclaration = EnumDeclaration;
  73615. exports.EnumBooleanBody = EnumBooleanBody;
  73616. exports.EnumNumberBody = EnumNumberBody;
  73617. exports.EnumStringBody = EnumStringBody;
  73618. exports.EnumSymbolBody = EnumSymbolBody;
  73619. exports.EnumDefaultedMember = EnumDefaultedMember;
  73620. exports.EnumBooleanMember = EnumBooleanMember;
  73621. exports.EnumNumberMember = EnumNumberMember;
  73622. exports.EnumStringMember = EnumStringMember;
  73623. exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
  73624. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  73625. exports.FunctionTypeParam = FunctionTypeParam;
  73626. exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
  73627. exports._interfaceish = _interfaceish;
  73628. exports._variance = _variance;
  73629. exports.InterfaceDeclaration = InterfaceDeclaration;
  73630. exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
  73631. exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
  73632. exports.MixedTypeAnnotation = MixedTypeAnnotation;
  73633. exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
  73634. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  73635. exports.NumberTypeAnnotation = NumberTypeAnnotation;
  73636. exports.StringTypeAnnotation = StringTypeAnnotation;
  73637. exports.ThisTypeAnnotation = ThisTypeAnnotation;
  73638. exports.TupleTypeAnnotation = TupleTypeAnnotation;
  73639. exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
  73640. exports.TypeAlias = TypeAlias;
  73641. exports.TypeAnnotation = TypeAnnotation;
  73642. exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
  73643. exports.TypeParameter = TypeParameter;
  73644. exports.OpaqueType = OpaqueType;
  73645. exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
  73646. exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
  73647. exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
  73648. exports.ObjectTypeIndexer = ObjectTypeIndexer;
  73649. exports.ObjectTypeProperty = ObjectTypeProperty;
  73650. exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
  73651. exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
  73652. exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
  73653. exports.UnionTypeAnnotation = UnionTypeAnnotation;
  73654. exports.TypeCastExpression = TypeCastExpression;
  73655. exports.Variance = Variance;
  73656. exports.VoidTypeAnnotation = VoidTypeAnnotation;
  73657. exports.IndexedAccessType = IndexedAccessType;
  73658. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  73659. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  73660. enumerable: true,
  73661. get: function() {
  73662. return _types2.NumericLiteral;
  73663. }
  73664. });
  73665. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  73666. enumerable: true,
  73667. get: function() {
  73668. return _types2.StringLiteral;
  73669. }
  73670. });
  73671. var t2 = require_lib2();
  73672. var _modules = require_modules2();
  73673. var _types2 = require_types2();
  73674. function AnyTypeAnnotation() {
  73675. this.word("any");
  73676. }
  73677. function ArrayTypeAnnotation(node) {
  73678. this.print(node.elementType, node);
  73679. this.token("[");
  73680. this.token("]");
  73681. }
  73682. function BooleanTypeAnnotation() {
  73683. this.word("boolean");
  73684. }
  73685. function BooleanLiteralTypeAnnotation(node) {
  73686. this.word(node.value ? "true" : "false");
  73687. }
  73688. function NullLiteralTypeAnnotation() {
  73689. this.word("null");
  73690. }
  73691. function DeclareClass(node, parent) {
  73692. if (!t2.isDeclareExportDeclaration(parent)) {
  73693. this.word("declare");
  73694. this.space();
  73695. }
  73696. this.word("class");
  73697. this.space();
  73698. this._interfaceish(node);
  73699. }
  73700. function DeclareFunction(node, parent) {
  73701. if (!t2.isDeclareExportDeclaration(parent)) {
  73702. this.word("declare");
  73703. this.space();
  73704. }
  73705. this.word("function");
  73706. this.space();
  73707. this.print(node.id, node);
  73708. this.print(node.id.typeAnnotation.typeAnnotation, node);
  73709. if (node.predicate) {
  73710. this.space();
  73711. this.print(node.predicate, node);
  73712. }
  73713. this.semicolon();
  73714. }
  73715. function InferredPredicate() {
  73716. this.token("%");
  73717. this.word("checks");
  73718. }
  73719. function DeclaredPredicate(node) {
  73720. this.token("%");
  73721. this.word("checks");
  73722. this.token("(");
  73723. this.print(node.value, node);
  73724. this.token(")");
  73725. }
  73726. function DeclareInterface(node) {
  73727. this.word("declare");
  73728. this.space();
  73729. this.InterfaceDeclaration(node);
  73730. }
  73731. function DeclareModule(node) {
  73732. this.word("declare");
  73733. this.space();
  73734. this.word("module");
  73735. this.space();
  73736. this.print(node.id, node);
  73737. this.space();
  73738. this.print(node.body, node);
  73739. }
  73740. function DeclareModuleExports(node) {
  73741. this.word("declare");
  73742. this.space();
  73743. this.word("module");
  73744. this.token(".");
  73745. this.word("exports");
  73746. this.print(node.typeAnnotation, node);
  73747. }
  73748. function DeclareTypeAlias(node) {
  73749. this.word("declare");
  73750. this.space();
  73751. this.TypeAlias(node);
  73752. }
  73753. function DeclareOpaqueType(node, parent) {
  73754. if (!t2.isDeclareExportDeclaration(parent)) {
  73755. this.word("declare");
  73756. this.space();
  73757. }
  73758. this.OpaqueType(node);
  73759. }
  73760. function DeclareVariable(node, parent) {
  73761. if (!t2.isDeclareExportDeclaration(parent)) {
  73762. this.word("declare");
  73763. this.space();
  73764. }
  73765. this.word("var");
  73766. this.space();
  73767. this.print(node.id, node);
  73768. this.print(node.id.typeAnnotation, node);
  73769. this.semicolon();
  73770. }
  73771. function DeclareExportDeclaration(node) {
  73772. this.word("declare");
  73773. this.space();
  73774. this.word("export");
  73775. this.space();
  73776. if (node.default) {
  73777. this.word("default");
  73778. this.space();
  73779. }
  73780. FlowExportDeclaration.apply(this, arguments);
  73781. }
  73782. function DeclareExportAllDeclaration() {
  73783. this.word("declare");
  73784. this.space();
  73785. _modules.ExportAllDeclaration.apply(this, arguments);
  73786. }
  73787. function EnumDeclaration(node) {
  73788. const {
  73789. id,
  73790. body
  73791. } = node;
  73792. this.word("enum");
  73793. this.space();
  73794. this.print(id, node);
  73795. this.print(body, node);
  73796. }
  73797. function enumExplicitType(context, name2, hasExplicitType) {
  73798. if (hasExplicitType) {
  73799. context.space();
  73800. context.word("of");
  73801. context.space();
  73802. context.word(name2);
  73803. }
  73804. context.space();
  73805. }
  73806. function enumBody(context, node) {
  73807. const {
  73808. members
  73809. } = node;
  73810. context.token("{");
  73811. context.indent();
  73812. context.newline();
  73813. for (const member of members) {
  73814. context.print(member, node);
  73815. context.newline();
  73816. }
  73817. if (node.hasUnknownMembers) {
  73818. context.token("...");
  73819. context.newline();
  73820. }
  73821. context.dedent();
  73822. context.token("}");
  73823. }
  73824. function EnumBooleanBody(node) {
  73825. const {
  73826. explicitType
  73827. } = node;
  73828. enumExplicitType(this, "boolean", explicitType);
  73829. enumBody(this, node);
  73830. }
  73831. function EnumNumberBody(node) {
  73832. const {
  73833. explicitType
  73834. } = node;
  73835. enumExplicitType(this, "number", explicitType);
  73836. enumBody(this, node);
  73837. }
  73838. function EnumStringBody(node) {
  73839. const {
  73840. explicitType
  73841. } = node;
  73842. enumExplicitType(this, "string", explicitType);
  73843. enumBody(this, node);
  73844. }
  73845. function EnumSymbolBody(node) {
  73846. enumExplicitType(this, "symbol", true);
  73847. enumBody(this, node);
  73848. }
  73849. function EnumDefaultedMember(node) {
  73850. const {
  73851. id
  73852. } = node;
  73853. this.print(id, node);
  73854. this.token(",");
  73855. }
  73856. function enumInitializedMember(context, node) {
  73857. const {
  73858. id,
  73859. init
  73860. } = node;
  73861. context.print(id, node);
  73862. context.space();
  73863. context.token("=");
  73864. context.space();
  73865. context.print(init, node);
  73866. context.token(",");
  73867. }
  73868. function EnumBooleanMember(node) {
  73869. enumInitializedMember(this, node);
  73870. }
  73871. function EnumNumberMember(node) {
  73872. enumInitializedMember(this, node);
  73873. }
  73874. function EnumStringMember(node) {
  73875. enumInitializedMember(this, node);
  73876. }
  73877. function FlowExportDeclaration(node) {
  73878. if (node.declaration) {
  73879. const declar = node.declaration;
  73880. this.print(declar, node);
  73881. if (!t2.isStatement(declar))
  73882. this.semicolon();
  73883. } else {
  73884. this.token("{");
  73885. if (node.specifiers.length) {
  73886. this.space();
  73887. this.printList(node.specifiers, node);
  73888. this.space();
  73889. }
  73890. this.token("}");
  73891. if (node.source) {
  73892. this.space();
  73893. this.word("from");
  73894. this.space();
  73895. this.print(node.source, node);
  73896. }
  73897. this.semicolon();
  73898. }
  73899. }
  73900. function ExistsTypeAnnotation() {
  73901. this.token("*");
  73902. }
  73903. function FunctionTypeAnnotation(node, parent) {
  73904. this.print(node.typeParameters, node);
  73905. this.token("(");
  73906. if (node.this) {
  73907. this.word("this");
  73908. this.token(":");
  73909. this.space();
  73910. this.print(node.this.typeAnnotation, node);
  73911. if (node.params.length || node.rest) {
  73912. this.token(",");
  73913. this.space();
  73914. }
  73915. }
  73916. this.printList(node.params, node);
  73917. if (node.rest) {
  73918. if (node.params.length) {
  73919. this.token(",");
  73920. this.space();
  73921. }
  73922. this.token("...");
  73923. this.print(node.rest, node);
  73924. }
  73925. this.token(")");
  73926. if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) {
  73927. this.token(":");
  73928. } else {
  73929. this.space();
  73930. this.token("=>");
  73931. }
  73932. this.space();
  73933. this.print(node.returnType, node);
  73934. }
  73935. function FunctionTypeParam(node) {
  73936. this.print(node.name, node);
  73937. if (node.optional)
  73938. this.token("?");
  73939. if (node.name) {
  73940. this.token(":");
  73941. this.space();
  73942. }
  73943. this.print(node.typeAnnotation, node);
  73944. }
  73945. function InterfaceExtends(node) {
  73946. this.print(node.id, node);
  73947. this.print(node.typeParameters, node);
  73948. }
  73949. function _interfaceish(node) {
  73950. var _node$extends;
  73951. this.print(node.id, node);
  73952. this.print(node.typeParameters, node);
  73953. if ((_node$extends = node.extends) != null && _node$extends.length) {
  73954. this.space();
  73955. this.word("extends");
  73956. this.space();
  73957. this.printList(node.extends, node);
  73958. }
  73959. if (node.mixins && node.mixins.length) {
  73960. this.space();
  73961. this.word("mixins");
  73962. this.space();
  73963. this.printList(node.mixins, node);
  73964. }
  73965. if (node.implements && node.implements.length) {
  73966. this.space();
  73967. this.word("implements");
  73968. this.space();
  73969. this.printList(node.implements, node);
  73970. }
  73971. this.space();
  73972. this.print(node.body, node);
  73973. }
  73974. function _variance(node) {
  73975. if (node.variance) {
  73976. if (node.variance.kind === "plus") {
  73977. this.token("+");
  73978. } else if (node.variance.kind === "minus") {
  73979. this.token("-");
  73980. }
  73981. }
  73982. }
  73983. function InterfaceDeclaration(node) {
  73984. this.word("interface");
  73985. this.space();
  73986. this._interfaceish(node);
  73987. }
  73988. function andSeparator() {
  73989. this.space();
  73990. this.token("&");
  73991. this.space();
  73992. }
  73993. function InterfaceTypeAnnotation(node) {
  73994. this.word("interface");
  73995. if (node.extends && node.extends.length) {
  73996. this.space();
  73997. this.word("extends");
  73998. this.space();
  73999. this.printList(node.extends, node);
  74000. }
  74001. this.space();
  74002. this.print(node.body, node);
  74003. }
  74004. function IntersectionTypeAnnotation(node) {
  74005. this.printJoin(node.types, node, {
  74006. separator: andSeparator
  74007. });
  74008. }
  74009. function MixedTypeAnnotation() {
  74010. this.word("mixed");
  74011. }
  74012. function EmptyTypeAnnotation() {
  74013. this.word("empty");
  74014. }
  74015. function NullableTypeAnnotation(node) {
  74016. this.token("?");
  74017. this.print(node.typeAnnotation, node);
  74018. }
  74019. function NumberTypeAnnotation() {
  74020. this.word("number");
  74021. }
  74022. function StringTypeAnnotation() {
  74023. this.word("string");
  74024. }
  74025. function ThisTypeAnnotation() {
  74026. this.word("this");
  74027. }
  74028. function TupleTypeAnnotation(node) {
  74029. this.token("[");
  74030. this.printList(node.types, node);
  74031. this.token("]");
  74032. }
  74033. function TypeofTypeAnnotation(node) {
  74034. this.word("typeof");
  74035. this.space();
  74036. this.print(node.argument, node);
  74037. }
  74038. function TypeAlias(node) {
  74039. this.word("type");
  74040. this.space();
  74041. this.print(node.id, node);
  74042. this.print(node.typeParameters, node);
  74043. this.space();
  74044. this.token("=");
  74045. this.space();
  74046. this.print(node.right, node);
  74047. this.semicolon();
  74048. }
  74049. function TypeAnnotation(node) {
  74050. this.token(":");
  74051. this.space();
  74052. if (node.optional)
  74053. this.token("?");
  74054. this.print(node.typeAnnotation, node);
  74055. }
  74056. function TypeParameterInstantiation(node) {
  74057. this.token("<");
  74058. this.printList(node.params, node, {});
  74059. this.token(">");
  74060. }
  74061. function TypeParameter(node) {
  74062. this._variance(node);
  74063. this.word(node.name);
  74064. if (node.bound) {
  74065. this.print(node.bound, node);
  74066. }
  74067. if (node.default) {
  74068. this.space();
  74069. this.token("=");
  74070. this.space();
  74071. this.print(node.default, node);
  74072. }
  74073. }
  74074. function OpaqueType(node) {
  74075. this.word("opaque");
  74076. this.space();
  74077. this.word("type");
  74078. this.space();
  74079. this.print(node.id, node);
  74080. this.print(node.typeParameters, node);
  74081. if (node.supertype) {
  74082. this.token(":");
  74083. this.space();
  74084. this.print(node.supertype, node);
  74085. }
  74086. if (node.impltype) {
  74087. this.space();
  74088. this.token("=");
  74089. this.space();
  74090. this.print(node.impltype, node);
  74091. }
  74092. this.semicolon();
  74093. }
  74094. function ObjectTypeAnnotation(node) {
  74095. if (node.exact) {
  74096. this.token("{|");
  74097. } else {
  74098. this.token("{");
  74099. }
  74100. const props = [...node.properties, ...node.callProperties || [], ...node.indexers || [], ...node.internalSlots || []];
  74101. if (props.length) {
  74102. this.space();
  74103. this.printJoin(props, node, {
  74104. addNewlines(leading) {
  74105. if (leading && !props[0])
  74106. return 1;
  74107. },
  74108. indent: true,
  74109. statement: true,
  74110. iterator: () => {
  74111. if (props.length !== 1 || node.inexact) {
  74112. this.token(",");
  74113. this.space();
  74114. }
  74115. }
  74116. });
  74117. this.space();
  74118. }
  74119. if (node.inexact) {
  74120. this.indent();
  74121. this.token("...");
  74122. if (props.length) {
  74123. this.newline();
  74124. }
  74125. this.dedent();
  74126. }
  74127. if (node.exact) {
  74128. this.token("|}");
  74129. } else {
  74130. this.token("}");
  74131. }
  74132. }
  74133. function ObjectTypeInternalSlot(node) {
  74134. if (node.static) {
  74135. this.word("static");
  74136. this.space();
  74137. }
  74138. this.token("[");
  74139. this.token("[");
  74140. this.print(node.id, node);
  74141. this.token("]");
  74142. this.token("]");
  74143. if (node.optional)
  74144. this.token("?");
  74145. if (!node.method) {
  74146. this.token(":");
  74147. this.space();
  74148. }
  74149. this.print(node.value, node);
  74150. }
  74151. function ObjectTypeCallProperty(node) {
  74152. if (node.static) {
  74153. this.word("static");
  74154. this.space();
  74155. }
  74156. this.print(node.value, node);
  74157. }
  74158. function ObjectTypeIndexer(node) {
  74159. if (node.static) {
  74160. this.word("static");
  74161. this.space();
  74162. }
  74163. this._variance(node);
  74164. this.token("[");
  74165. if (node.id) {
  74166. this.print(node.id, node);
  74167. this.token(":");
  74168. this.space();
  74169. }
  74170. this.print(node.key, node);
  74171. this.token("]");
  74172. this.token(":");
  74173. this.space();
  74174. this.print(node.value, node);
  74175. }
  74176. function ObjectTypeProperty(node) {
  74177. if (node.proto) {
  74178. this.word("proto");
  74179. this.space();
  74180. }
  74181. if (node.static) {
  74182. this.word("static");
  74183. this.space();
  74184. }
  74185. if (node.kind === "get" || node.kind === "set") {
  74186. this.word(node.kind);
  74187. this.space();
  74188. }
  74189. this._variance(node);
  74190. this.print(node.key, node);
  74191. if (node.optional)
  74192. this.token("?");
  74193. if (!node.method) {
  74194. this.token(":");
  74195. this.space();
  74196. }
  74197. this.print(node.value, node);
  74198. }
  74199. function ObjectTypeSpreadProperty(node) {
  74200. this.token("...");
  74201. this.print(node.argument, node);
  74202. }
  74203. function QualifiedTypeIdentifier(node) {
  74204. this.print(node.qualification, node);
  74205. this.token(".");
  74206. this.print(node.id, node);
  74207. }
  74208. function SymbolTypeAnnotation() {
  74209. this.word("symbol");
  74210. }
  74211. function orSeparator() {
  74212. this.space();
  74213. this.token("|");
  74214. this.space();
  74215. }
  74216. function UnionTypeAnnotation(node) {
  74217. this.printJoin(node.types, node, {
  74218. separator: orSeparator
  74219. });
  74220. }
  74221. function TypeCastExpression(node) {
  74222. this.token("(");
  74223. this.print(node.expression, node);
  74224. this.print(node.typeAnnotation, node);
  74225. this.token(")");
  74226. }
  74227. function Variance(node) {
  74228. if (node.kind === "plus") {
  74229. this.token("+");
  74230. } else {
  74231. this.token("-");
  74232. }
  74233. }
  74234. function VoidTypeAnnotation() {
  74235. this.word("void");
  74236. }
  74237. function IndexedAccessType(node) {
  74238. this.print(node.objectType, node);
  74239. this.token("[");
  74240. this.print(node.indexType, node);
  74241. this.token("]");
  74242. }
  74243. function OptionalIndexedAccessType(node) {
  74244. this.print(node.objectType, node);
  74245. if (node.optional) {
  74246. this.token("?.");
  74247. }
  74248. this.token("[");
  74249. this.print(node.indexType, node);
  74250. this.token("]");
  74251. }
  74252. }
  74253. });
  74254. // node_modules/@babel/generator/lib/generators/base.js
  74255. var require_base2 = __commonJS({
  74256. "node_modules/@babel/generator/lib/generators/base.js"(exports) {
  74257. "use strict";
  74258. Object.defineProperty(exports, "__esModule", {
  74259. value: true
  74260. });
  74261. exports.File = File;
  74262. exports.Program = Program;
  74263. exports.BlockStatement = BlockStatement2;
  74264. exports.Directive = Directive;
  74265. exports.DirectiveLiteral = DirectiveLiteral;
  74266. exports.InterpreterDirective = InterpreterDirective;
  74267. exports.Placeholder = Placeholder;
  74268. var t2 = require_lib2();
  74269. function File(node) {
  74270. if (node.program) {
  74271. this.print(node.program.interpreter, node);
  74272. }
  74273. this.print(node.program, node);
  74274. }
  74275. function Program(node) {
  74276. this.printInnerComments(node, false);
  74277. this.printSequence(node.directives, node);
  74278. if (node.directives && node.directives.length)
  74279. this.newline();
  74280. this.printSequence(node.body, node);
  74281. }
  74282. function BlockStatement2(node) {
  74283. var _node$directives;
  74284. this.token("{");
  74285. this.printInnerComments(node);
  74286. const hasDirectives = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
  74287. if (node.body.length || hasDirectives) {
  74288. this.newline();
  74289. this.printSequence(node.directives, node, {
  74290. indent: true
  74291. });
  74292. if (hasDirectives)
  74293. this.newline();
  74294. this.printSequence(node.body, node, {
  74295. indent: true
  74296. });
  74297. this.removeTrailingNewline();
  74298. this.source("end", node.loc);
  74299. if (!this.endsWith("\n"))
  74300. this.newline();
  74301. this.rightBrace();
  74302. } else {
  74303. this.source("end", node.loc);
  74304. this.token("}");
  74305. }
  74306. }
  74307. function Directive(node) {
  74308. this.print(node.value, node);
  74309. this.semicolon();
  74310. }
  74311. var unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
  74312. var unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
  74313. function DirectiveLiteral(node) {
  74314. const raw = this.getPossibleRaw(node);
  74315. if (raw != null) {
  74316. this.token(raw);
  74317. return;
  74318. }
  74319. const {
  74320. value
  74321. } = node;
  74322. if (!unescapedDoubleQuoteRE.test(value)) {
  74323. this.token(`"${value}"`);
  74324. } else if (!unescapedSingleQuoteRE.test(value)) {
  74325. this.token(`'${value}'`);
  74326. } else {
  74327. throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");
  74328. }
  74329. }
  74330. function InterpreterDirective(node) {
  74331. this.token(`#!${node.value}
  74332. `);
  74333. }
  74334. function Placeholder(node) {
  74335. this.token("%%");
  74336. this.print(node.name);
  74337. this.token("%%");
  74338. if (node.expectedNode === "Statement") {
  74339. this.semicolon();
  74340. }
  74341. }
  74342. }
  74343. });
  74344. // node_modules/@babel/generator/lib/generators/jsx.js
  74345. var require_jsx5 = __commonJS({
  74346. "node_modules/@babel/generator/lib/generators/jsx.js"(exports) {
  74347. "use strict";
  74348. Object.defineProperty(exports, "__esModule", {
  74349. value: true
  74350. });
  74351. exports.JSXAttribute = JSXAttribute2;
  74352. exports.JSXIdentifier = JSXIdentifier2;
  74353. exports.JSXNamespacedName = JSXNamespacedName2;
  74354. exports.JSXMemberExpression = JSXMemberExpression2;
  74355. exports.JSXSpreadAttribute = JSXSpreadAttribute2;
  74356. exports.JSXExpressionContainer = JSXExpressionContainer2;
  74357. exports.JSXSpreadChild = JSXSpreadChild;
  74358. exports.JSXText = JSXText2;
  74359. exports.JSXElement = JSXElement2;
  74360. exports.JSXOpeningElement = JSXOpeningElement2;
  74361. exports.JSXClosingElement = JSXClosingElement2;
  74362. exports.JSXEmptyExpression = JSXEmptyExpression2;
  74363. exports.JSXFragment = JSXFragment2;
  74364. exports.JSXOpeningFragment = JSXOpeningFragment2;
  74365. exports.JSXClosingFragment = JSXClosingFragment2;
  74366. var t2 = require_lib2();
  74367. function JSXAttribute2(node) {
  74368. this.print(node.name, node);
  74369. if (node.value) {
  74370. this.token("=");
  74371. this.print(node.value, node);
  74372. }
  74373. }
  74374. function JSXIdentifier2(node) {
  74375. this.word(node.name);
  74376. }
  74377. function JSXNamespacedName2(node) {
  74378. this.print(node.namespace, node);
  74379. this.token(":");
  74380. this.print(node.name, node);
  74381. }
  74382. function JSXMemberExpression2(node) {
  74383. this.print(node.object, node);
  74384. this.token(".");
  74385. this.print(node.property, node);
  74386. }
  74387. function JSXSpreadAttribute2(node) {
  74388. this.token("{");
  74389. this.token("...");
  74390. this.print(node.argument, node);
  74391. this.token("}");
  74392. }
  74393. function JSXExpressionContainer2(node) {
  74394. this.token("{");
  74395. this.print(node.expression, node);
  74396. this.token("}");
  74397. }
  74398. function JSXSpreadChild(node) {
  74399. this.token("{");
  74400. this.token("...");
  74401. this.print(node.expression, node);
  74402. this.token("}");
  74403. }
  74404. function JSXText2(node) {
  74405. const raw = this.getPossibleRaw(node);
  74406. if (raw != null) {
  74407. this.token(raw);
  74408. } else {
  74409. this.token(node.value);
  74410. }
  74411. }
  74412. function JSXElement2(node) {
  74413. const open = node.openingElement;
  74414. this.print(open, node);
  74415. if (open.selfClosing)
  74416. return;
  74417. this.indent();
  74418. for (const child of node.children) {
  74419. this.print(child, node);
  74420. }
  74421. this.dedent();
  74422. this.print(node.closingElement, node);
  74423. }
  74424. function spaceSeparator() {
  74425. this.space();
  74426. }
  74427. function JSXOpeningElement2(node) {
  74428. this.token("<");
  74429. this.print(node.name, node);
  74430. this.print(node.typeParameters, node);
  74431. if (node.attributes.length > 0) {
  74432. this.space();
  74433. this.printJoin(node.attributes, node, {
  74434. separator: spaceSeparator
  74435. });
  74436. }
  74437. if (node.selfClosing) {
  74438. this.space();
  74439. this.token("/>");
  74440. } else {
  74441. this.token(">");
  74442. }
  74443. }
  74444. function JSXClosingElement2(node) {
  74445. this.token("</");
  74446. this.print(node.name, node);
  74447. this.token(">");
  74448. }
  74449. function JSXEmptyExpression2(node) {
  74450. this.printInnerComments(node);
  74451. }
  74452. function JSXFragment2(node) {
  74453. this.print(node.openingFragment, node);
  74454. this.indent();
  74455. for (const child of node.children) {
  74456. this.print(child, node);
  74457. }
  74458. this.dedent();
  74459. this.print(node.closingFragment, node);
  74460. }
  74461. function JSXOpeningFragment2() {
  74462. this.token("<");
  74463. this.token(">");
  74464. }
  74465. function JSXClosingFragment2() {
  74466. this.token("</");
  74467. this.token(">");
  74468. }
  74469. }
  74470. });
  74471. // node_modules/@babel/generator/lib/generators/typescript.js
  74472. var require_typescript5 = __commonJS({
  74473. "node_modules/@babel/generator/lib/generators/typescript.js"(exports) {
  74474. "use strict";
  74475. Object.defineProperty(exports, "__esModule", {
  74476. value: true
  74477. });
  74478. exports.TSTypeAnnotation = TSTypeAnnotation;
  74479. exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
  74480. exports.TSTypeParameter = TSTypeParameter;
  74481. exports.TSParameterProperty = TSParameterProperty;
  74482. exports.TSDeclareFunction = TSDeclareFunction;
  74483. exports.TSDeclareMethod = TSDeclareMethod;
  74484. exports.TSQualifiedName = TSQualifiedName;
  74485. exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
  74486. exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
  74487. exports.TSPropertySignature = TSPropertySignature;
  74488. exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
  74489. exports.TSMethodSignature = TSMethodSignature;
  74490. exports.TSIndexSignature = TSIndexSignature;
  74491. exports.TSAnyKeyword = TSAnyKeyword;
  74492. exports.TSBigIntKeyword = TSBigIntKeyword;
  74493. exports.TSUnknownKeyword = TSUnknownKeyword;
  74494. exports.TSNumberKeyword = TSNumberKeyword;
  74495. exports.TSObjectKeyword = TSObjectKeyword;
  74496. exports.TSBooleanKeyword = TSBooleanKeyword;
  74497. exports.TSStringKeyword = TSStringKeyword;
  74498. exports.TSSymbolKeyword = TSSymbolKeyword;
  74499. exports.TSVoidKeyword = TSVoidKeyword;
  74500. exports.TSUndefinedKeyword = TSUndefinedKeyword;
  74501. exports.TSNullKeyword = TSNullKeyword;
  74502. exports.TSNeverKeyword = TSNeverKeyword;
  74503. exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
  74504. exports.TSThisType = TSThisType;
  74505. exports.TSFunctionType = TSFunctionType;
  74506. exports.TSConstructorType = TSConstructorType;
  74507. exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
  74508. exports.TSTypeReference = TSTypeReference;
  74509. exports.TSTypePredicate = TSTypePredicate;
  74510. exports.TSTypeQuery = TSTypeQuery;
  74511. exports.TSTypeLiteral = TSTypeLiteral;
  74512. exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
  74513. exports.tsPrintBraced = tsPrintBraced;
  74514. exports.TSArrayType = TSArrayType;
  74515. exports.TSTupleType = TSTupleType;
  74516. exports.TSOptionalType = TSOptionalType;
  74517. exports.TSRestType = TSRestType;
  74518. exports.TSNamedTupleMember = TSNamedTupleMember;
  74519. exports.TSUnionType = TSUnionType;
  74520. exports.TSIntersectionType = TSIntersectionType;
  74521. exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType;
  74522. exports.TSConditionalType = TSConditionalType;
  74523. exports.TSInferType = TSInferType;
  74524. exports.TSParenthesizedType = TSParenthesizedType;
  74525. exports.TSTypeOperator = TSTypeOperator;
  74526. exports.TSIndexedAccessType = TSIndexedAccessType;
  74527. exports.TSMappedType = TSMappedType;
  74528. exports.TSLiteralType = TSLiteralType;
  74529. exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
  74530. exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
  74531. exports.TSInterfaceBody = TSInterfaceBody;
  74532. exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
  74533. exports.TSAsExpression = TSAsExpression;
  74534. exports.TSTypeAssertion = TSTypeAssertion;
  74535. exports.TSEnumDeclaration = TSEnumDeclaration;
  74536. exports.TSEnumMember = TSEnumMember;
  74537. exports.TSModuleDeclaration = TSModuleDeclaration;
  74538. exports.TSModuleBlock = TSModuleBlock;
  74539. exports.TSImportType = TSImportType;
  74540. exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
  74541. exports.TSExternalModuleReference = TSExternalModuleReference;
  74542. exports.TSNonNullExpression = TSNonNullExpression;
  74543. exports.TSExportAssignment = TSExportAssignment;
  74544. exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
  74545. exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
  74546. exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
  74547. var t2 = require_lib2();
  74548. function TSTypeAnnotation(node) {
  74549. this.token(":");
  74550. this.space();
  74551. if (node.optional)
  74552. this.token("?");
  74553. this.print(node.typeAnnotation, node);
  74554. }
  74555. function TSTypeParameterInstantiation(node) {
  74556. this.token("<");
  74557. this.printList(node.params, node, {});
  74558. this.token(">");
  74559. }
  74560. function TSTypeParameter(node) {
  74561. this.word(node.name);
  74562. if (node.constraint) {
  74563. this.space();
  74564. this.word("extends");
  74565. this.space();
  74566. this.print(node.constraint, node);
  74567. }
  74568. if (node.default) {
  74569. this.space();
  74570. this.token("=");
  74571. this.space();
  74572. this.print(node.default, node);
  74573. }
  74574. }
  74575. function TSParameterProperty(node) {
  74576. if (node.accessibility) {
  74577. this.word(node.accessibility);
  74578. this.space();
  74579. }
  74580. if (node.readonly) {
  74581. this.word("readonly");
  74582. this.space();
  74583. }
  74584. this._param(node.parameter);
  74585. }
  74586. function TSDeclareFunction(node) {
  74587. if (node.declare) {
  74588. this.word("declare");
  74589. this.space();
  74590. }
  74591. this._functionHead(node);
  74592. this.token(";");
  74593. }
  74594. function TSDeclareMethod(node) {
  74595. this._classMethodHead(node);
  74596. this.token(";");
  74597. }
  74598. function TSQualifiedName(node) {
  74599. this.print(node.left, node);
  74600. this.token(".");
  74601. this.print(node.right, node);
  74602. }
  74603. function TSCallSignatureDeclaration(node) {
  74604. this.tsPrintSignatureDeclarationBase(node);
  74605. this.token(";");
  74606. }
  74607. function TSConstructSignatureDeclaration(node) {
  74608. this.word("new");
  74609. this.space();
  74610. this.tsPrintSignatureDeclarationBase(node);
  74611. this.token(";");
  74612. }
  74613. function TSPropertySignature(node) {
  74614. const {
  74615. readonly,
  74616. initializer
  74617. } = node;
  74618. if (readonly) {
  74619. this.word("readonly");
  74620. this.space();
  74621. }
  74622. this.tsPrintPropertyOrMethodName(node);
  74623. this.print(node.typeAnnotation, node);
  74624. if (initializer) {
  74625. this.space();
  74626. this.token("=");
  74627. this.space();
  74628. this.print(initializer, node);
  74629. }
  74630. this.token(";");
  74631. }
  74632. function tsPrintPropertyOrMethodName(node) {
  74633. if (node.computed) {
  74634. this.token("[");
  74635. }
  74636. this.print(node.key, node);
  74637. if (node.computed) {
  74638. this.token("]");
  74639. }
  74640. if (node.optional) {
  74641. this.token("?");
  74642. }
  74643. }
  74644. function TSMethodSignature(node) {
  74645. const {
  74646. kind
  74647. } = node;
  74648. if (kind === "set" || kind === "get") {
  74649. this.word(kind);
  74650. this.space();
  74651. }
  74652. this.tsPrintPropertyOrMethodName(node);
  74653. this.tsPrintSignatureDeclarationBase(node);
  74654. this.token(";");
  74655. }
  74656. function TSIndexSignature(node) {
  74657. const {
  74658. readonly,
  74659. static: isStatic
  74660. } = node;
  74661. if (isStatic) {
  74662. this.word("static");
  74663. this.space();
  74664. }
  74665. if (readonly) {
  74666. this.word("readonly");
  74667. this.space();
  74668. }
  74669. this.token("[");
  74670. this._parameters(node.parameters, node);
  74671. this.token("]");
  74672. this.print(node.typeAnnotation, node);
  74673. this.token(";");
  74674. }
  74675. function TSAnyKeyword() {
  74676. this.word("any");
  74677. }
  74678. function TSBigIntKeyword() {
  74679. this.word("bigint");
  74680. }
  74681. function TSUnknownKeyword() {
  74682. this.word("unknown");
  74683. }
  74684. function TSNumberKeyword() {
  74685. this.word("number");
  74686. }
  74687. function TSObjectKeyword() {
  74688. this.word("object");
  74689. }
  74690. function TSBooleanKeyword() {
  74691. this.word("boolean");
  74692. }
  74693. function TSStringKeyword() {
  74694. this.word("string");
  74695. }
  74696. function TSSymbolKeyword() {
  74697. this.word("symbol");
  74698. }
  74699. function TSVoidKeyword() {
  74700. this.word("void");
  74701. }
  74702. function TSUndefinedKeyword() {
  74703. this.word("undefined");
  74704. }
  74705. function TSNullKeyword() {
  74706. this.word("null");
  74707. }
  74708. function TSNeverKeyword() {
  74709. this.word("never");
  74710. }
  74711. function TSIntrinsicKeyword() {
  74712. this.word("intrinsic");
  74713. }
  74714. function TSThisType() {
  74715. this.word("this");
  74716. }
  74717. function TSFunctionType(node) {
  74718. this.tsPrintFunctionOrConstructorType(node);
  74719. }
  74720. function TSConstructorType(node) {
  74721. if (node.abstract) {
  74722. this.word("abstract");
  74723. this.space();
  74724. }
  74725. this.word("new");
  74726. this.space();
  74727. this.tsPrintFunctionOrConstructorType(node);
  74728. }
  74729. function tsPrintFunctionOrConstructorType(node) {
  74730. const {
  74731. typeParameters,
  74732. parameters
  74733. } = node;
  74734. this.print(typeParameters, node);
  74735. this.token("(");
  74736. this._parameters(parameters, node);
  74737. this.token(")");
  74738. this.space();
  74739. this.token("=>");
  74740. this.space();
  74741. this.print(node.typeAnnotation.typeAnnotation, node);
  74742. }
  74743. function TSTypeReference(node) {
  74744. this.print(node.typeName, node);
  74745. this.print(node.typeParameters, node);
  74746. }
  74747. function TSTypePredicate(node) {
  74748. if (node.asserts) {
  74749. this.word("asserts");
  74750. this.space();
  74751. }
  74752. this.print(node.parameterName);
  74753. if (node.typeAnnotation) {
  74754. this.space();
  74755. this.word("is");
  74756. this.space();
  74757. this.print(node.typeAnnotation.typeAnnotation);
  74758. }
  74759. }
  74760. function TSTypeQuery(node) {
  74761. this.word("typeof");
  74762. this.space();
  74763. this.print(node.exprName);
  74764. }
  74765. function TSTypeLiteral(node) {
  74766. this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
  74767. }
  74768. function tsPrintTypeLiteralOrInterfaceBody(members, node) {
  74769. this.tsPrintBraced(members, node);
  74770. }
  74771. function tsPrintBraced(members, node) {
  74772. this.token("{");
  74773. if (members.length) {
  74774. this.indent();
  74775. this.newline();
  74776. for (const member of members) {
  74777. this.print(member, node);
  74778. this.newline();
  74779. }
  74780. this.dedent();
  74781. this.rightBrace();
  74782. } else {
  74783. this.token("}");
  74784. }
  74785. }
  74786. function TSArrayType(node) {
  74787. this.print(node.elementType, node);
  74788. this.token("[]");
  74789. }
  74790. function TSTupleType(node) {
  74791. this.token("[");
  74792. this.printList(node.elementTypes, node);
  74793. this.token("]");
  74794. }
  74795. function TSOptionalType(node) {
  74796. this.print(node.typeAnnotation, node);
  74797. this.token("?");
  74798. }
  74799. function TSRestType(node) {
  74800. this.token("...");
  74801. this.print(node.typeAnnotation, node);
  74802. }
  74803. function TSNamedTupleMember(node) {
  74804. this.print(node.label, node);
  74805. if (node.optional)
  74806. this.token("?");
  74807. this.token(":");
  74808. this.space();
  74809. this.print(node.elementType, node);
  74810. }
  74811. function TSUnionType(node) {
  74812. this.tsPrintUnionOrIntersectionType(node, "|");
  74813. }
  74814. function TSIntersectionType(node) {
  74815. this.tsPrintUnionOrIntersectionType(node, "&");
  74816. }
  74817. function tsPrintUnionOrIntersectionType(node, sep) {
  74818. this.printJoin(node.types, node, {
  74819. separator() {
  74820. this.space();
  74821. this.token(sep);
  74822. this.space();
  74823. }
  74824. });
  74825. }
  74826. function TSConditionalType(node) {
  74827. this.print(node.checkType);
  74828. this.space();
  74829. this.word("extends");
  74830. this.space();
  74831. this.print(node.extendsType);
  74832. this.space();
  74833. this.token("?");
  74834. this.space();
  74835. this.print(node.trueType);
  74836. this.space();
  74837. this.token(":");
  74838. this.space();
  74839. this.print(node.falseType);
  74840. }
  74841. function TSInferType(node) {
  74842. this.token("infer");
  74843. this.space();
  74844. this.print(node.typeParameter);
  74845. }
  74846. function TSParenthesizedType(node) {
  74847. this.token("(");
  74848. this.print(node.typeAnnotation, node);
  74849. this.token(")");
  74850. }
  74851. function TSTypeOperator(node) {
  74852. this.word(node.operator);
  74853. this.space();
  74854. this.print(node.typeAnnotation, node);
  74855. }
  74856. function TSIndexedAccessType(node) {
  74857. this.print(node.objectType, node);
  74858. this.token("[");
  74859. this.print(node.indexType, node);
  74860. this.token("]");
  74861. }
  74862. function TSMappedType(node) {
  74863. const {
  74864. nameType,
  74865. optional,
  74866. readonly,
  74867. typeParameter
  74868. } = node;
  74869. this.token("{");
  74870. this.space();
  74871. if (readonly) {
  74872. tokenIfPlusMinus(this, readonly);
  74873. this.word("readonly");
  74874. this.space();
  74875. }
  74876. this.token("[");
  74877. this.word(typeParameter.name);
  74878. this.space();
  74879. this.word("in");
  74880. this.space();
  74881. this.print(typeParameter.constraint, typeParameter);
  74882. if (nameType) {
  74883. this.space();
  74884. this.word("as");
  74885. this.space();
  74886. this.print(nameType, node);
  74887. }
  74888. this.token("]");
  74889. if (optional) {
  74890. tokenIfPlusMinus(this, optional);
  74891. this.token("?");
  74892. }
  74893. this.token(":");
  74894. this.space();
  74895. this.print(node.typeAnnotation, node);
  74896. this.space();
  74897. this.token("}");
  74898. }
  74899. function tokenIfPlusMinus(self2, tok) {
  74900. if (tok !== true) {
  74901. self2.token(tok);
  74902. }
  74903. }
  74904. function TSLiteralType(node) {
  74905. this.print(node.literal, node);
  74906. }
  74907. function TSExpressionWithTypeArguments(node) {
  74908. this.print(node.expression, node);
  74909. this.print(node.typeParameters, node);
  74910. }
  74911. function TSInterfaceDeclaration(node) {
  74912. const {
  74913. declare,
  74914. id,
  74915. typeParameters,
  74916. extends: extendz,
  74917. body
  74918. } = node;
  74919. if (declare) {
  74920. this.word("declare");
  74921. this.space();
  74922. }
  74923. this.word("interface");
  74924. this.space();
  74925. this.print(id, node);
  74926. this.print(typeParameters, node);
  74927. if (extendz != null && extendz.length) {
  74928. this.space();
  74929. this.word("extends");
  74930. this.space();
  74931. this.printList(extendz, node);
  74932. }
  74933. this.space();
  74934. this.print(body, node);
  74935. }
  74936. function TSInterfaceBody(node) {
  74937. this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
  74938. }
  74939. function TSTypeAliasDeclaration(node) {
  74940. const {
  74941. declare,
  74942. id,
  74943. typeParameters,
  74944. typeAnnotation
  74945. } = node;
  74946. if (declare) {
  74947. this.word("declare");
  74948. this.space();
  74949. }
  74950. this.word("type");
  74951. this.space();
  74952. this.print(id, node);
  74953. this.print(typeParameters, node);
  74954. this.space();
  74955. this.token("=");
  74956. this.space();
  74957. this.print(typeAnnotation, node);
  74958. this.token(";");
  74959. }
  74960. function TSAsExpression(node) {
  74961. const {
  74962. expression,
  74963. typeAnnotation
  74964. } = node;
  74965. this.print(expression, node);
  74966. this.space();
  74967. this.word("as");
  74968. this.space();
  74969. this.print(typeAnnotation, node);
  74970. }
  74971. function TSTypeAssertion(node) {
  74972. const {
  74973. typeAnnotation,
  74974. expression
  74975. } = node;
  74976. this.token("<");
  74977. this.print(typeAnnotation, node);
  74978. this.token(">");
  74979. this.space();
  74980. this.print(expression, node);
  74981. }
  74982. function TSEnumDeclaration(node) {
  74983. const {
  74984. declare,
  74985. const: isConst,
  74986. id,
  74987. members
  74988. } = node;
  74989. if (declare) {
  74990. this.word("declare");
  74991. this.space();
  74992. }
  74993. if (isConst) {
  74994. this.word("const");
  74995. this.space();
  74996. }
  74997. this.word("enum");
  74998. this.space();
  74999. this.print(id, node);
  75000. this.space();
  75001. this.tsPrintBraced(members, node);
  75002. }
  75003. function TSEnumMember(node) {
  75004. const {
  75005. id,
  75006. initializer
  75007. } = node;
  75008. this.print(id, node);
  75009. if (initializer) {
  75010. this.space();
  75011. this.token("=");
  75012. this.space();
  75013. this.print(initializer, node);
  75014. }
  75015. this.token(",");
  75016. }
  75017. function TSModuleDeclaration(node) {
  75018. const {
  75019. declare,
  75020. id
  75021. } = node;
  75022. if (declare) {
  75023. this.word("declare");
  75024. this.space();
  75025. }
  75026. if (!node.global) {
  75027. this.word(id.type === "Identifier" ? "namespace" : "module");
  75028. this.space();
  75029. }
  75030. this.print(id, node);
  75031. if (!node.body) {
  75032. this.token(";");
  75033. return;
  75034. }
  75035. let body = node.body;
  75036. while (body.type === "TSModuleDeclaration") {
  75037. this.token(".");
  75038. this.print(body.id, body);
  75039. body = body.body;
  75040. }
  75041. this.space();
  75042. this.print(body, node);
  75043. }
  75044. function TSModuleBlock(node) {
  75045. this.tsPrintBraced(node.body, node);
  75046. }
  75047. function TSImportType(node) {
  75048. const {
  75049. argument,
  75050. qualifier,
  75051. typeParameters
  75052. } = node;
  75053. this.word("import");
  75054. this.token("(");
  75055. this.print(argument, node);
  75056. this.token(")");
  75057. if (qualifier) {
  75058. this.token(".");
  75059. this.print(qualifier, node);
  75060. }
  75061. if (typeParameters) {
  75062. this.print(typeParameters, node);
  75063. }
  75064. }
  75065. function TSImportEqualsDeclaration(node) {
  75066. const {
  75067. isExport,
  75068. id,
  75069. moduleReference
  75070. } = node;
  75071. if (isExport) {
  75072. this.word("export");
  75073. this.space();
  75074. }
  75075. this.word("import");
  75076. this.space();
  75077. this.print(id, node);
  75078. this.space();
  75079. this.token("=");
  75080. this.space();
  75081. this.print(moduleReference, node);
  75082. this.token(";");
  75083. }
  75084. function TSExternalModuleReference(node) {
  75085. this.token("require(");
  75086. this.print(node.expression, node);
  75087. this.token(")");
  75088. }
  75089. function TSNonNullExpression(node) {
  75090. this.print(node.expression, node);
  75091. this.token("!");
  75092. }
  75093. function TSExportAssignment(node) {
  75094. this.word("export");
  75095. this.space();
  75096. this.token("=");
  75097. this.space();
  75098. this.print(node.expression, node);
  75099. this.token(";");
  75100. }
  75101. function TSNamespaceExportDeclaration(node) {
  75102. this.word("export");
  75103. this.space();
  75104. this.word("as");
  75105. this.space();
  75106. this.word("namespace");
  75107. this.space();
  75108. this.print(node.id, node);
  75109. }
  75110. function tsPrintSignatureDeclarationBase(node) {
  75111. const {
  75112. typeParameters,
  75113. parameters
  75114. } = node;
  75115. this.print(typeParameters, node);
  75116. this.token("(");
  75117. this._parameters(parameters, node);
  75118. this.token(")");
  75119. this.print(node.typeAnnotation, node);
  75120. }
  75121. function tsPrintClassMemberModifiers(node, isField) {
  75122. if (isField && node.declare) {
  75123. this.word("declare");
  75124. this.space();
  75125. }
  75126. if (node.accessibility) {
  75127. this.word(node.accessibility);
  75128. this.space();
  75129. }
  75130. if (node.static) {
  75131. this.word("static");
  75132. this.space();
  75133. }
  75134. if (node.override) {
  75135. this.word("override");
  75136. this.space();
  75137. }
  75138. if (node.abstract) {
  75139. this.word("abstract");
  75140. this.space();
  75141. }
  75142. if (isField && node.readonly) {
  75143. this.word("readonly");
  75144. this.space();
  75145. }
  75146. }
  75147. }
  75148. });
  75149. // node_modules/@babel/generator/lib/generators/index.js
  75150. var require_generators2 = __commonJS({
  75151. "node_modules/@babel/generator/lib/generators/index.js"(exports) {
  75152. "use strict";
  75153. Object.defineProperty(exports, "__esModule", {
  75154. value: true
  75155. });
  75156. var _templateLiterals = require_template_literals2();
  75157. Object.keys(_templateLiterals).forEach(function(key) {
  75158. if (key === "default" || key === "__esModule")
  75159. return;
  75160. if (key in exports && exports[key] === _templateLiterals[key])
  75161. return;
  75162. Object.defineProperty(exports, key, {
  75163. enumerable: true,
  75164. get: function() {
  75165. return _templateLiterals[key];
  75166. }
  75167. });
  75168. });
  75169. var _expressions = require_expressions2();
  75170. Object.keys(_expressions).forEach(function(key) {
  75171. if (key === "default" || key === "__esModule")
  75172. return;
  75173. if (key in exports && exports[key] === _expressions[key])
  75174. return;
  75175. Object.defineProperty(exports, key, {
  75176. enumerable: true,
  75177. get: function() {
  75178. return _expressions[key];
  75179. }
  75180. });
  75181. });
  75182. var _statements = require_statements2();
  75183. Object.keys(_statements).forEach(function(key) {
  75184. if (key === "default" || key === "__esModule")
  75185. return;
  75186. if (key in exports && exports[key] === _statements[key])
  75187. return;
  75188. Object.defineProperty(exports, key, {
  75189. enumerable: true,
  75190. get: function() {
  75191. return _statements[key];
  75192. }
  75193. });
  75194. });
  75195. var _classes = require_classes2();
  75196. Object.keys(_classes).forEach(function(key) {
  75197. if (key === "default" || key === "__esModule")
  75198. return;
  75199. if (key in exports && exports[key] === _classes[key])
  75200. return;
  75201. Object.defineProperty(exports, key, {
  75202. enumerable: true,
  75203. get: function() {
  75204. return _classes[key];
  75205. }
  75206. });
  75207. });
  75208. var _methods = require_methods2();
  75209. Object.keys(_methods).forEach(function(key) {
  75210. if (key === "default" || key === "__esModule")
  75211. return;
  75212. if (key in exports && exports[key] === _methods[key])
  75213. return;
  75214. Object.defineProperty(exports, key, {
  75215. enumerable: true,
  75216. get: function() {
  75217. return _methods[key];
  75218. }
  75219. });
  75220. });
  75221. var _modules = require_modules2();
  75222. Object.keys(_modules).forEach(function(key) {
  75223. if (key === "default" || key === "__esModule")
  75224. return;
  75225. if (key in exports && exports[key] === _modules[key])
  75226. return;
  75227. Object.defineProperty(exports, key, {
  75228. enumerable: true,
  75229. get: function() {
  75230. return _modules[key];
  75231. }
  75232. });
  75233. });
  75234. var _types = require_types2();
  75235. Object.keys(_types).forEach(function(key) {
  75236. if (key === "default" || key === "__esModule")
  75237. return;
  75238. if (key in exports && exports[key] === _types[key])
  75239. return;
  75240. Object.defineProperty(exports, key, {
  75241. enumerable: true,
  75242. get: function() {
  75243. return _types[key];
  75244. }
  75245. });
  75246. });
  75247. var _flow = require_flow5();
  75248. Object.keys(_flow).forEach(function(key) {
  75249. if (key === "default" || key === "__esModule")
  75250. return;
  75251. if (key in exports && exports[key] === _flow[key])
  75252. return;
  75253. Object.defineProperty(exports, key, {
  75254. enumerable: true,
  75255. get: function() {
  75256. return _flow[key];
  75257. }
  75258. });
  75259. });
  75260. var _base = require_base2();
  75261. Object.keys(_base).forEach(function(key) {
  75262. if (key === "default" || key === "__esModule")
  75263. return;
  75264. if (key in exports && exports[key] === _base[key])
  75265. return;
  75266. Object.defineProperty(exports, key, {
  75267. enumerable: true,
  75268. get: function() {
  75269. return _base[key];
  75270. }
  75271. });
  75272. });
  75273. var _jsx = require_jsx5();
  75274. Object.keys(_jsx).forEach(function(key) {
  75275. if (key === "default" || key === "__esModule")
  75276. return;
  75277. if (key in exports && exports[key] === _jsx[key])
  75278. return;
  75279. Object.defineProperty(exports, key, {
  75280. enumerable: true,
  75281. get: function() {
  75282. return _jsx[key];
  75283. }
  75284. });
  75285. });
  75286. var _typescript = require_typescript5();
  75287. Object.keys(_typescript).forEach(function(key) {
  75288. if (key === "default" || key === "__esModule")
  75289. return;
  75290. if (key in exports && exports[key] === _typescript[key])
  75291. return;
  75292. Object.defineProperty(exports, key, {
  75293. enumerable: true,
  75294. get: function() {
  75295. return _typescript[key];
  75296. }
  75297. });
  75298. });
  75299. }
  75300. });
  75301. // node_modules/@babel/generator/lib/printer.js
  75302. var require_printer2 = __commonJS({
  75303. "node_modules/@babel/generator/lib/printer.js"(exports) {
  75304. "use strict";
  75305. Object.defineProperty(exports, "__esModule", {
  75306. value: true
  75307. });
  75308. exports.default = void 0;
  75309. var _buffer = require_buffer2();
  75310. var n = require_node3();
  75311. var t2 = require_lib2();
  75312. var generatorFunctions = require_generators2();
  75313. var SCIENTIFIC_NOTATION = /e/i;
  75314. var ZERO_DECIMAL_INTEGER = /\.0+$/;
  75315. var NON_DECIMAL_LITERAL = /^0[box]/;
  75316. var PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
  75317. var Printer = class {
  75318. constructor(format, map) {
  75319. this.inForStatementInitCounter = 0;
  75320. this._printStack = [];
  75321. this._indent = 0;
  75322. this._insideAux = false;
  75323. this._parenPushNewlineState = null;
  75324. this._noLineTerminator = false;
  75325. this._printAuxAfterOnNextUserNode = false;
  75326. this._printedComments = /* @__PURE__ */ new WeakSet();
  75327. this._endsWithInteger = false;
  75328. this._endsWithWord = false;
  75329. this.format = format;
  75330. this._buf = new _buffer.default(map);
  75331. }
  75332. generate(ast) {
  75333. this.print(ast);
  75334. this._maybeAddAuxComment();
  75335. return this._buf.get();
  75336. }
  75337. indent() {
  75338. if (this.format.compact || this.format.concise)
  75339. return;
  75340. this._indent++;
  75341. }
  75342. dedent() {
  75343. if (this.format.compact || this.format.concise)
  75344. return;
  75345. this._indent--;
  75346. }
  75347. semicolon(force = false) {
  75348. this._maybeAddAuxComment();
  75349. this._append(";", !force);
  75350. }
  75351. rightBrace() {
  75352. if (this.format.minified) {
  75353. this._buf.removeLastSemicolon();
  75354. }
  75355. this.token("}");
  75356. }
  75357. space(force = false) {
  75358. if (this.format.compact)
  75359. return;
  75360. if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
  75361. this._space();
  75362. }
  75363. }
  75364. word(str) {
  75365. if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) {
  75366. this._space();
  75367. }
  75368. this._maybeAddAuxComment();
  75369. this._append(str);
  75370. this._endsWithWord = true;
  75371. }
  75372. number(str) {
  75373. this.word(str);
  75374. this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
  75375. }
  75376. token(str) {
  75377. if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
  75378. this._space();
  75379. }
  75380. this._maybeAddAuxComment();
  75381. this._append(str);
  75382. }
  75383. newline(i) {
  75384. if (this.format.retainLines || this.format.compact)
  75385. return;
  75386. if (this.format.concise) {
  75387. this.space();
  75388. return;
  75389. }
  75390. if (this.endsWith("\n\n"))
  75391. return;
  75392. if (typeof i !== "number")
  75393. i = 1;
  75394. i = Math.min(2, i);
  75395. if (this.endsWith("{\n") || this.endsWith(":\n"))
  75396. i--;
  75397. if (i <= 0)
  75398. return;
  75399. for (let j = 0; j < i; j++) {
  75400. this._newline();
  75401. }
  75402. }
  75403. endsWith(str) {
  75404. return this._buf.endsWith(str);
  75405. }
  75406. removeTrailingNewline() {
  75407. this._buf.removeTrailingNewline();
  75408. }
  75409. exactSource(loc, cb) {
  75410. this._catchUp("start", loc);
  75411. this._buf.exactSource(loc, cb);
  75412. }
  75413. source(prop, loc) {
  75414. this._catchUp(prop, loc);
  75415. this._buf.source(prop, loc);
  75416. }
  75417. withSource(prop, loc, cb) {
  75418. this._catchUp(prop, loc);
  75419. this._buf.withSource(prop, loc, cb);
  75420. }
  75421. _space() {
  75422. this._append(" ", true);
  75423. }
  75424. _newline() {
  75425. this._append("\n", true);
  75426. }
  75427. _append(str, queue = false) {
  75428. this._maybeAddParen(str);
  75429. this._maybeIndent(str);
  75430. if (queue)
  75431. this._buf.queue(str);
  75432. else
  75433. this._buf.append(str);
  75434. this._endsWithWord = false;
  75435. this._endsWithInteger = false;
  75436. }
  75437. _maybeIndent(str) {
  75438. if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
  75439. this._buf.queue(this._getIndent());
  75440. }
  75441. }
  75442. _maybeAddParen(str) {
  75443. const parenPushNewlineState = this._parenPushNewlineState;
  75444. if (!parenPushNewlineState)
  75445. return;
  75446. let i;
  75447. for (i = 0; i < str.length && str[i] === " "; i++)
  75448. continue;
  75449. if (i === str.length) {
  75450. return;
  75451. }
  75452. const cha = str[i];
  75453. if (cha !== "\n") {
  75454. if (cha !== "/" || i + 1 === str.length) {
  75455. this._parenPushNewlineState = null;
  75456. return;
  75457. }
  75458. const chaPost = str[i + 1];
  75459. if (chaPost === "*") {
  75460. if (PURE_ANNOTATION_RE.test(str.slice(i + 2, str.length - 2))) {
  75461. return;
  75462. }
  75463. } else if (chaPost !== "/") {
  75464. this._parenPushNewlineState = null;
  75465. return;
  75466. }
  75467. }
  75468. this.token("(");
  75469. this.indent();
  75470. parenPushNewlineState.printed = true;
  75471. }
  75472. _catchUp(prop, loc) {
  75473. if (!this.format.retainLines)
  75474. return;
  75475. const pos = loc ? loc[prop] : null;
  75476. if ((pos == null ? void 0 : pos.line) != null) {
  75477. const count = pos.line - this._buf.getCurrentLine();
  75478. for (let i = 0; i < count; i++) {
  75479. this._newline();
  75480. }
  75481. }
  75482. }
  75483. _getIndent() {
  75484. return this.format.indent.style.repeat(this._indent);
  75485. }
  75486. startTerminatorless(isLabel = false) {
  75487. if (isLabel) {
  75488. this._noLineTerminator = true;
  75489. return null;
  75490. } else {
  75491. return this._parenPushNewlineState = {
  75492. printed: false
  75493. };
  75494. }
  75495. }
  75496. endTerminatorless(state) {
  75497. this._noLineTerminator = false;
  75498. if (state != null && state.printed) {
  75499. this.dedent();
  75500. this.newline();
  75501. this.token(")");
  75502. }
  75503. }
  75504. print(node, parent) {
  75505. if (!node)
  75506. return;
  75507. const oldConcise = this.format.concise;
  75508. if (node._compact) {
  75509. this.format.concise = true;
  75510. }
  75511. const printMethod = this[node.type];
  75512. if (!printMethod) {
  75513. throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node == null ? void 0 : node.constructor.name)}`);
  75514. }
  75515. this._printStack.push(node);
  75516. const oldInAux = this._insideAux;
  75517. this._insideAux = !node.loc;
  75518. this._maybeAddAuxComment(this._insideAux && !oldInAux);
  75519. let needsParens = n.needsParens(node, parent, this._printStack);
  75520. if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
  75521. needsParens = true;
  75522. }
  75523. if (needsParens)
  75524. this.token("(");
  75525. this._printLeadingComments(node);
  75526. const loc = t2.isProgram(node) || t2.isFile(node) ? null : node.loc;
  75527. this.withSource("start", loc, () => {
  75528. printMethod.call(this, node, parent);
  75529. });
  75530. this._printTrailingComments(node);
  75531. if (needsParens)
  75532. this.token(")");
  75533. this._printStack.pop();
  75534. this.format.concise = oldConcise;
  75535. this._insideAux = oldInAux;
  75536. }
  75537. _maybeAddAuxComment(enteredPositionlessNode) {
  75538. if (enteredPositionlessNode)
  75539. this._printAuxBeforeComment();
  75540. if (!this._insideAux)
  75541. this._printAuxAfterComment();
  75542. }
  75543. _printAuxBeforeComment() {
  75544. if (this._printAuxAfterOnNextUserNode)
  75545. return;
  75546. this._printAuxAfterOnNextUserNode = true;
  75547. const comment2 = this.format.auxiliaryCommentBefore;
  75548. if (comment2) {
  75549. this._printComment({
  75550. type: "CommentBlock",
  75551. value: comment2
  75552. });
  75553. }
  75554. }
  75555. _printAuxAfterComment() {
  75556. if (!this._printAuxAfterOnNextUserNode)
  75557. return;
  75558. this._printAuxAfterOnNextUserNode = false;
  75559. const comment2 = this.format.auxiliaryCommentAfter;
  75560. if (comment2) {
  75561. this._printComment({
  75562. type: "CommentBlock",
  75563. value: comment2
  75564. });
  75565. }
  75566. }
  75567. getPossibleRaw(node) {
  75568. const extra = node.extra;
  75569. if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
  75570. return extra.raw;
  75571. }
  75572. }
  75573. printJoin(nodes, parent, opts = {}) {
  75574. if (!(nodes != null && nodes.length))
  75575. return;
  75576. if (opts.indent)
  75577. this.indent();
  75578. const newlineOpts = {
  75579. addNewlines: opts.addNewlines
  75580. };
  75581. for (let i = 0; i < nodes.length; i++) {
  75582. const node = nodes[i];
  75583. if (!node)
  75584. continue;
  75585. if (opts.statement)
  75586. this._printNewline(true, node, parent, newlineOpts);
  75587. this.print(node, parent);
  75588. if (opts.iterator) {
  75589. opts.iterator(node, i);
  75590. }
  75591. if (opts.separator && i < nodes.length - 1) {
  75592. opts.separator.call(this);
  75593. }
  75594. if (opts.statement)
  75595. this._printNewline(false, node, parent, newlineOpts);
  75596. }
  75597. if (opts.indent)
  75598. this.dedent();
  75599. }
  75600. printAndIndentOnComments(node, parent) {
  75601. const indent = node.leadingComments && node.leadingComments.length > 0;
  75602. if (indent)
  75603. this.indent();
  75604. this.print(node, parent);
  75605. if (indent)
  75606. this.dedent();
  75607. }
  75608. printBlock(parent) {
  75609. const node = parent.body;
  75610. if (!t2.isEmptyStatement(node)) {
  75611. this.space();
  75612. }
  75613. this.print(node, parent);
  75614. }
  75615. _printTrailingComments(node) {
  75616. this._printComments(this._getComments(false, node));
  75617. }
  75618. _printLeadingComments(node) {
  75619. this._printComments(this._getComments(true, node), true);
  75620. }
  75621. printInnerComments(node, indent = true) {
  75622. var _node$innerComments;
  75623. if (!((_node$innerComments = node.innerComments) != null && _node$innerComments.length))
  75624. return;
  75625. if (indent)
  75626. this.indent();
  75627. this._printComments(node.innerComments);
  75628. if (indent)
  75629. this.dedent();
  75630. }
  75631. printSequence(nodes, parent, opts = {}) {
  75632. opts.statement = true;
  75633. return this.printJoin(nodes, parent, opts);
  75634. }
  75635. printList(items, parent, opts = {}) {
  75636. if (opts.separator == null) {
  75637. opts.separator = commaSeparator;
  75638. }
  75639. return this.printJoin(items, parent, opts);
  75640. }
  75641. _printNewline(leading, node, parent, opts) {
  75642. if (this.format.retainLines || this.format.compact)
  75643. return;
  75644. if (this.format.concise) {
  75645. this.space();
  75646. return;
  75647. }
  75648. let lines = 0;
  75649. if (this._buf.hasContent()) {
  75650. if (!leading)
  75651. lines++;
  75652. if (opts.addNewlines)
  75653. lines += opts.addNewlines(leading, node) || 0;
  75654. const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter;
  75655. if (needs(node, parent))
  75656. lines++;
  75657. }
  75658. this.newline(lines);
  75659. }
  75660. _getComments(leading, node) {
  75661. return node && (leading ? node.leadingComments : node.trailingComments) || [];
  75662. }
  75663. _printComment(comment2, skipNewLines) {
  75664. if (!this.format.shouldPrintComment(comment2.value))
  75665. return;
  75666. if (comment2.ignore)
  75667. return;
  75668. if (this._printedComments.has(comment2))
  75669. return;
  75670. this._printedComments.add(comment2);
  75671. const isBlockComment = comment2.type === "CommentBlock";
  75672. const printNewLines = isBlockComment && !skipNewLines && !this._noLineTerminator;
  75673. if (printNewLines && this._buf.hasContent())
  75674. this.newline(1);
  75675. if (!this.endsWith("[") && !this.endsWith("{"))
  75676. this.space();
  75677. let val = !isBlockComment && !this._noLineTerminator ? `//${comment2.value}
  75678. ` : `/*${comment2.value}*/`;
  75679. if (isBlockComment && this.format.indent.adjustMultilineComment) {
  75680. var _comment$loc;
  75681. const offset2 = (_comment$loc = comment2.loc) == null ? void 0 : _comment$loc.start.column;
  75682. if (offset2) {
  75683. const newlineRegex = new RegExp("\\n\\s{1," + offset2 + "}", "g");
  75684. val = val.replace(newlineRegex, "\n");
  75685. }
  75686. const indentSize = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn());
  75687. val = val.replace(/\n(?!$)/g, `
  75688. ${" ".repeat(indentSize)}`);
  75689. }
  75690. if (this.endsWith("/"))
  75691. this._space();
  75692. this.withSource("start", comment2.loc, () => {
  75693. this._append(val);
  75694. });
  75695. if (printNewLines)
  75696. this.newline(1);
  75697. }
  75698. _printComments(comments, inlinePureAnnotation) {
  75699. if (!(comments != null && comments.length))
  75700. return;
  75701. if (inlinePureAnnotation && comments.length === 1 && PURE_ANNOTATION_RE.test(comments[0].value)) {
  75702. this._printComment(comments[0], this._buf.hasContent() && !this.endsWith("\n"));
  75703. } else {
  75704. for (const comment2 of comments) {
  75705. this._printComment(comment2);
  75706. }
  75707. }
  75708. }
  75709. printAssertions(node) {
  75710. var _node$assertions;
  75711. if ((_node$assertions = node.assertions) != null && _node$assertions.length) {
  75712. this.space();
  75713. this.word("assert");
  75714. this.space();
  75715. this.token("{");
  75716. this.space();
  75717. this.printList(node.assertions, node);
  75718. this.space();
  75719. this.token("}");
  75720. }
  75721. }
  75722. };
  75723. Object.assign(Printer.prototype, generatorFunctions);
  75724. {
  75725. Printer.prototype.Noop = function Noop() {
  75726. };
  75727. }
  75728. var _default = Printer;
  75729. exports.default = _default;
  75730. function commaSeparator() {
  75731. this.token(",");
  75732. this.space();
  75733. }
  75734. }
  75735. });
  75736. // node_modules/@babel/generator/lib/index.js
  75737. var require_lib18 = __commonJS({
  75738. "node_modules/@babel/generator/lib/index.js"(exports) {
  75739. "use strict";
  75740. Object.defineProperty(exports, "__esModule", {
  75741. value: true
  75742. });
  75743. exports.default = generate2;
  75744. exports.CodeGenerator = void 0;
  75745. var _sourceMap = require_source_map3();
  75746. var _printer = require_printer2();
  75747. var Generator = class extends _printer.default {
  75748. constructor(ast, opts = {}, code2) {
  75749. const format = normalizeOptions(code2, opts);
  75750. const map = opts.sourceMaps ? new _sourceMap.default(opts, code2) : null;
  75751. super(format, map);
  75752. this.ast = void 0;
  75753. this.ast = ast;
  75754. }
  75755. generate() {
  75756. return super.generate(this.ast);
  75757. }
  75758. };
  75759. function normalizeOptions(code2, opts) {
  75760. const format = {
  75761. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  75762. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  75763. shouldPrintComment: opts.shouldPrintComment,
  75764. retainLines: opts.retainLines,
  75765. retainFunctionParens: opts.retainFunctionParens,
  75766. comments: opts.comments == null || opts.comments,
  75767. compact: opts.compact,
  75768. minified: opts.minified,
  75769. concise: opts.concise,
  75770. indent: {
  75771. adjustMultilineComment: true,
  75772. style: " ",
  75773. base: 0
  75774. },
  75775. decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
  75776. jsescOption: Object.assign({
  75777. quotes: "double",
  75778. wrap: true,
  75779. minimal: false
  75780. }, opts.jsescOption),
  75781. recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType
  75782. };
  75783. {
  75784. format.jsonCompatibleStrings = opts.jsonCompatibleStrings;
  75785. }
  75786. if (format.minified) {
  75787. format.compact = true;
  75788. format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
  75789. } else {
  75790. format.shouldPrintComment = format.shouldPrintComment || ((value) => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0);
  75791. }
  75792. if (format.compact === "auto") {
  75793. format.compact = code2.length > 5e5;
  75794. if (format.compact) {
  75795. console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${opts.filename} as it exceeds the max of ${"500KB"}.`);
  75796. }
  75797. }
  75798. if (format.compact) {
  75799. format.indent.adjustMultilineComment = false;
  75800. }
  75801. return format;
  75802. }
  75803. var CodeGenerator = class {
  75804. constructor(ast, opts, code2) {
  75805. this._generator = void 0;
  75806. this._generator = new Generator(ast, opts, code2);
  75807. }
  75808. generate() {
  75809. return this._generator.generate();
  75810. }
  75811. };
  75812. exports.CodeGenerator = CodeGenerator;
  75813. function generate2(ast, opts, code2) {
  75814. const gen = new Generator(ast, opts, code2);
  75815. return gen.generate();
  75816. }
  75817. }
  75818. });
  75819. // node_modules/@babel/traverse/lib/path/ancestry.js
  75820. var require_ancestry2 = __commonJS({
  75821. "node_modules/@babel/traverse/lib/path/ancestry.js"(exports) {
  75822. "use strict";
  75823. Object.defineProperty(exports, "__esModule", {
  75824. value: true
  75825. });
  75826. exports.findParent = findParent;
  75827. exports.find = find2;
  75828. exports.getFunctionParent = getFunctionParent;
  75829. exports.getStatementParent = getStatementParent;
  75830. exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
  75831. exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
  75832. exports.getAncestry = getAncestry;
  75833. exports.isAncestor = isAncestor;
  75834. exports.isDescendant = isDescendant;
  75835. exports.inType = inType;
  75836. var t2 = require_lib2();
  75837. var _index = require_path2();
  75838. function findParent(callback) {
  75839. let path = this;
  75840. while (path = path.parentPath) {
  75841. if (callback(path))
  75842. return path;
  75843. }
  75844. return null;
  75845. }
  75846. function find2(callback) {
  75847. let path = this;
  75848. do {
  75849. if (callback(path))
  75850. return path;
  75851. } while (path = path.parentPath);
  75852. return null;
  75853. }
  75854. function getFunctionParent() {
  75855. return this.findParent((p) => p.isFunction());
  75856. }
  75857. function getStatementParent() {
  75858. let path = this;
  75859. do {
  75860. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  75861. break;
  75862. } else {
  75863. path = path.parentPath;
  75864. }
  75865. } while (path);
  75866. if (path && (path.isProgram() || path.isFile())) {
  75867. throw new Error("File/Program node, we can't possibly find a statement parent to this");
  75868. }
  75869. return path;
  75870. }
  75871. function getEarliestCommonAncestorFrom(paths) {
  75872. return this.getDeepestCommonAncestorFrom(paths, function(deepest, i, ancestries) {
  75873. let earliest;
  75874. const keys2 = t2.VISITOR_KEYS[deepest.type];
  75875. for (const ancestry of ancestries) {
  75876. const path = ancestry[i + 1];
  75877. if (!earliest) {
  75878. earliest = path;
  75879. continue;
  75880. }
  75881. if (path.listKey && earliest.listKey === path.listKey) {
  75882. if (path.key < earliest.key) {
  75883. earliest = path;
  75884. continue;
  75885. }
  75886. }
  75887. const earliestKeyIndex = keys2.indexOf(earliest.parentKey);
  75888. const currentKeyIndex = keys2.indexOf(path.parentKey);
  75889. if (earliestKeyIndex > currentKeyIndex) {
  75890. earliest = path;
  75891. }
  75892. }
  75893. return earliest;
  75894. });
  75895. }
  75896. function getDeepestCommonAncestorFrom(paths, filter) {
  75897. if (!paths.length) {
  75898. return this;
  75899. }
  75900. if (paths.length === 1) {
  75901. return paths[0];
  75902. }
  75903. let minDepth = Infinity;
  75904. let lastCommonIndex, lastCommon;
  75905. const ancestries = paths.map((path) => {
  75906. const ancestry = [];
  75907. do {
  75908. ancestry.unshift(path);
  75909. } while ((path = path.parentPath) && path !== this);
  75910. if (ancestry.length < minDepth) {
  75911. minDepth = ancestry.length;
  75912. }
  75913. return ancestry;
  75914. });
  75915. const first = ancestries[0];
  75916. depthLoop:
  75917. for (let i = 0; i < minDepth; i++) {
  75918. const shouldMatch = first[i];
  75919. for (const ancestry of ancestries) {
  75920. if (ancestry[i] !== shouldMatch) {
  75921. break depthLoop;
  75922. }
  75923. }
  75924. lastCommonIndex = i;
  75925. lastCommon = shouldMatch;
  75926. }
  75927. if (lastCommon) {
  75928. if (filter) {
  75929. return filter(lastCommon, lastCommonIndex, ancestries);
  75930. } else {
  75931. return lastCommon;
  75932. }
  75933. } else {
  75934. throw new Error("Couldn't find intersection");
  75935. }
  75936. }
  75937. function getAncestry() {
  75938. let path = this;
  75939. const paths = [];
  75940. do {
  75941. paths.push(path);
  75942. } while (path = path.parentPath);
  75943. return paths;
  75944. }
  75945. function isAncestor(maybeDescendant) {
  75946. return maybeDescendant.isDescendant(this);
  75947. }
  75948. function isDescendant(maybeAncestor) {
  75949. return !!this.findParent((parent) => parent === maybeAncestor);
  75950. }
  75951. function inType(...candidateTypes) {
  75952. let path = this;
  75953. while (path) {
  75954. for (const type of candidateTypes) {
  75955. if (path.node.type === type)
  75956. return true;
  75957. }
  75958. path = path.parentPath;
  75959. }
  75960. return false;
  75961. }
  75962. }
  75963. });
  75964. // node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
  75965. var require_inferer_reference2 = __commonJS({
  75966. "node_modules/@babel/traverse/lib/path/inference/inferer-reference.js"(exports) {
  75967. "use strict";
  75968. Object.defineProperty(exports, "__esModule", {
  75969. value: true
  75970. });
  75971. exports.default = _default;
  75972. var t2 = require_lib2();
  75973. function _default(node) {
  75974. if (!this.isReferenced())
  75975. return;
  75976. const binding = this.scope.getBinding(node.name);
  75977. if (binding) {
  75978. if (binding.identifier.typeAnnotation) {
  75979. return binding.identifier.typeAnnotation;
  75980. } else {
  75981. return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
  75982. }
  75983. }
  75984. if (node.name === "undefined") {
  75985. return t2.voidTypeAnnotation();
  75986. } else if (node.name === "NaN" || node.name === "Infinity") {
  75987. return t2.numberTypeAnnotation();
  75988. } else if (node.name === "arguments") {
  75989. }
  75990. }
  75991. function getTypeAnnotationBindingConstantViolations(binding, path, name2) {
  75992. const types2 = [];
  75993. const functionConstantViolations = [];
  75994. let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
  75995. const testType = getConditionalAnnotation(binding, path, name2);
  75996. if (testType) {
  75997. const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
  75998. constantViolations = constantViolations.filter((path2) => testConstantViolations.indexOf(path2) < 0);
  75999. types2.push(testType.typeAnnotation);
  76000. }
  76001. if (constantViolations.length) {
  76002. constantViolations = constantViolations.concat(functionConstantViolations);
  76003. for (const violation of constantViolations) {
  76004. types2.push(violation.getTypeAnnotation());
  76005. }
  76006. }
  76007. if (!types2.length) {
  76008. return;
  76009. }
  76010. if (t2.isTSTypeAnnotation(types2[0]) && t2.createTSUnionType) {
  76011. return t2.createTSUnionType(types2);
  76012. }
  76013. if (t2.createFlowUnionType) {
  76014. return t2.createFlowUnionType(types2);
  76015. }
  76016. return t2.createUnionTypeAnnotation(types2);
  76017. }
  76018. function getConstantViolationsBefore(binding, path, functions) {
  76019. const violations = binding.constantViolations.slice();
  76020. violations.unshift(binding.path);
  76021. return violations.filter((violation) => {
  76022. violation = violation.resolve();
  76023. const status = violation._guessExecutionStatusRelativeTo(path);
  76024. if (functions && status === "unknown")
  76025. functions.push(violation);
  76026. return status === "before";
  76027. });
  76028. }
  76029. function inferAnnotationFromBinaryExpression(name2, path) {
  76030. const operator = path.node.operator;
  76031. const right = path.get("right").resolve();
  76032. const left = path.get("left").resolve();
  76033. let target;
  76034. if (left.isIdentifier({
  76035. name: name2
  76036. })) {
  76037. target = right;
  76038. } else if (right.isIdentifier({
  76039. name: name2
  76040. })) {
  76041. target = left;
  76042. }
  76043. if (target) {
  76044. if (operator === "===") {
  76045. return target.getTypeAnnotation();
  76046. }
  76047. if (t2.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  76048. return t2.numberTypeAnnotation();
  76049. }
  76050. return;
  76051. }
  76052. if (operator !== "===" && operator !== "==")
  76053. return;
  76054. let typeofPath;
  76055. let typePath;
  76056. if (left.isUnaryExpression({
  76057. operator: "typeof"
  76058. })) {
  76059. typeofPath = left;
  76060. typePath = right;
  76061. } else if (right.isUnaryExpression({
  76062. operator: "typeof"
  76063. })) {
  76064. typeofPath = right;
  76065. typePath = left;
  76066. }
  76067. if (!typeofPath)
  76068. return;
  76069. if (!typeofPath.get("argument").isIdentifier({
  76070. name: name2
  76071. }))
  76072. return;
  76073. typePath = typePath.resolve();
  76074. if (!typePath.isLiteral())
  76075. return;
  76076. const typeValue = typePath.node.value;
  76077. if (typeof typeValue !== "string")
  76078. return;
  76079. return t2.createTypeAnnotationBasedOnTypeof(typeValue);
  76080. }
  76081. function getParentConditionalPath(binding, path, name2) {
  76082. let parentPath;
  76083. while (parentPath = path.parentPath) {
  76084. if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
  76085. if (path.key === "test") {
  76086. return;
  76087. }
  76088. return parentPath;
  76089. }
  76090. if (parentPath.isFunction()) {
  76091. if (parentPath.parentPath.scope.getBinding(name2) !== binding)
  76092. return;
  76093. }
  76094. path = parentPath;
  76095. }
  76096. }
  76097. function getConditionalAnnotation(binding, path, name2) {
  76098. const ifStatement = getParentConditionalPath(binding, path, name2);
  76099. if (!ifStatement)
  76100. return;
  76101. const test = ifStatement.get("test");
  76102. const paths = [test];
  76103. const types2 = [];
  76104. for (let i = 0; i < paths.length; i++) {
  76105. const path2 = paths[i];
  76106. if (path2.isLogicalExpression()) {
  76107. if (path2.node.operator === "&&") {
  76108. paths.push(path2.get("left"));
  76109. paths.push(path2.get("right"));
  76110. }
  76111. } else if (path2.isBinaryExpression()) {
  76112. const type = inferAnnotationFromBinaryExpression(name2, path2);
  76113. if (type)
  76114. types2.push(type);
  76115. }
  76116. }
  76117. if (types2.length) {
  76118. if (t2.isTSTypeAnnotation(types2[0]) && t2.createTSUnionType) {
  76119. return {
  76120. typeAnnotation: t2.createTSUnionType(types2),
  76121. ifStatement
  76122. };
  76123. }
  76124. if (t2.createFlowUnionType) {
  76125. return {
  76126. typeAnnotation: t2.createFlowUnionType(types2),
  76127. ifStatement
  76128. };
  76129. }
  76130. return {
  76131. typeAnnotation: t2.createUnionTypeAnnotation(types2),
  76132. ifStatement
  76133. };
  76134. }
  76135. return getConditionalAnnotation(ifStatement, name2);
  76136. }
  76137. }
  76138. });
  76139. // node_modules/@babel/traverse/lib/path/inference/inferers.js
  76140. var require_inferers2 = __commonJS({
  76141. "node_modules/@babel/traverse/lib/path/inference/inferers.js"(exports) {
  76142. "use strict";
  76143. Object.defineProperty(exports, "__esModule", {
  76144. value: true
  76145. });
  76146. exports.VariableDeclarator = VariableDeclarator;
  76147. exports.TypeCastExpression = TypeCastExpression;
  76148. exports.NewExpression = NewExpression;
  76149. exports.TemplateLiteral = TemplateLiteral;
  76150. exports.UnaryExpression = UnaryExpression;
  76151. exports.BinaryExpression = BinaryExpression2;
  76152. exports.LogicalExpression = LogicalExpression;
  76153. exports.ConditionalExpression = ConditionalExpression;
  76154. exports.SequenceExpression = SequenceExpression;
  76155. exports.ParenthesizedExpression = ParenthesizedExpression;
  76156. exports.AssignmentExpression = AssignmentExpression;
  76157. exports.UpdateExpression = UpdateExpression;
  76158. exports.StringLiteral = StringLiteral;
  76159. exports.NumericLiteral = NumericLiteral;
  76160. exports.BooleanLiteral = BooleanLiteral;
  76161. exports.NullLiteral = NullLiteral;
  76162. exports.RegExpLiteral = RegExpLiteral;
  76163. exports.ObjectExpression = ObjectExpression;
  76164. exports.ArrayExpression = ArrayExpression2;
  76165. exports.RestElement = RestElement2;
  76166. exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
  76167. exports.CallExpression = CallExpression;
  76168. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  76169. Object.defineProperty(exports, "Identifier", {
  76170. enumerable: true,
  76171. get: function() {
  76172. return _infererReference.default;
  76173. }
  76174. });
  76175. var t2 = require_lib2();
  76176. var _infererReference = require_inferer_reference2();
  76177. function VariableDeclarator() {
  76178. var _type;
  76179. const id = this.get("id");
  76180. if (!id.isIdentifier())
  76181. return;
  76182. const init = this.get("init");
  76183. let type = init.getTypeAnnotation();
  76184. if (((_type = type) == null ? void 0 : _type.type) === "AnyTypeAnnotation") {
  76185. if (init.isCallExpression() && init.get("callee").isIdentifier({
  76186. name: "Array"
  76187. }) && !init.scope.hasBinding("Array", true)) {
  76188. type = ArrayExpression2();
  76189. }
  76190. }
  76191. return type;
  76192. }
  76193. function TypeCastExpression(node) {
  76194. return node.typeAnnotation;
  76195. }
  76196. TypeCastExpression.validParent = true;
  76197. function NewExpression(node) {
  76198. if (this.get("callee").isIdentifier()) {
  76199. return t2.genericTypeAnnotation(node.callee);
  76200. }
  76201. }
  76202. function TemplateLiteral() {
  76203. return t2.stringTypeAnnotation();
  76204. }
  76205. function UnaryExpression(node) {
  76206. const operator = node.operator;
  76207. if (operator === "void") {
  76208. return t2.voidTypeAnnotation();
  76209. } else if (t2.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
  76210. return t2.numberTypeAnnotation();
  76211. } else if (t2.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
  76212. return t2.stringTypeAnnotation();
  76213. } else if (t2.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
  76214. return t2.booleanTypeAnnotation();
  76215. }
  76216. }
  76217. function BinaryExpression2(node) {
  76218. const operator = node.operator;
  76219. if (t2.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  76220. return t2.numberTypeAnnotation();
  76221. } else if (t2.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
  76222. return t2.booleanTypeAnnotation();
  76223. } else if (operator === "+") {
  76224. const right = this.get("right");
  76225. const left = this.get("left");
  76226. if (left.isBaseType("number") && right.isBaseType("number")) {
  76227. return t2.numberTypeAnnotation();
  76228. } else if (left.isBaseType("string") || right.isBaseType("string")) {
  76229. return t2.stringTypeAnnotation();
  76230. }
  76231. return t2.unionTypeAnnotation([t2.stringTypeAnnotation(), t2.numberTypeAnnotation()]);
  76232. }
  76233. }
  76234. function LogicalExpression() {
  76235. const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
  76236. if (t2.isTSTypeAnnotation(argumentTypes[0]) && t2.createTSUnionType) {
  76237. return t2.createTSUnionType(argumentTypes);
  76238. }
  76239. if (t2.createFlowUnionType) {
  76240. return t2.createFlowUnionType(argumentTypes);
  76241. }
  76242. return t2.createUnionTypeAnnotation(argumentTypes);
  76243. }
  76244. function ConditionalExpression() {
  76245. const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
  76246. if (t2.isTSTypeAnnotation(argumentTypes[0]) && t2.createTSUnionType) {
  76247. return t2.createTSUnionType(argumentTypes);
  76248. }
  76249. if (t2.createFlowUnionType) {
  76250. return t2.createFlowUnionType(argumentTypes);
  76251. }
  76252. return t2.createUnionTypeAnnotation(argumentTypes);
  76253. }
  76254. function SequenceExpression() {
  76255. return this.get("expressions").pop().getTypeAnnotation();
  76256. }
  76257. function ParenthesizedExpression() {
  76258. return this.get("expression").getTypeAnnotation();
  76259. }
  76260. function AssignmentExpression() {
  76261. return this.get("right").getTypeAnnotation();
  76262. }
  76263. function UpdateExpression(node) {
  76264. const operator = node.operator;
  76265. if (operator === "++" || operator === "--") {
  76266. return t2.numberTypeAnnotation();
  76267. }
  76268. }
  76269. function StringLiteral() {
  76270. return t2.stringTypeAnnotation();
  76271. }
  76272. function NumericLiteral() {
  76273. return t2.numberTypeAnnotation();
  76274. }
  76275. function BooleanLiteral() {
  76276. return t2.booleanTypeAnnotation();
  76277. }
  76278. function NullLiteral() {
  76279. return t2.nullLiteralTypeAnnotation();
  76280. }
  76281. function RegExpLiteral() {
  76282. return t2.genericTypeAnnotation(t2.identifier("RegExp"));
  76283. }
  76284. function ObjectExpression() {
  76285. return t2.genericTypeAnnotation(t2.identifier("Object"));
  76286. }
  76287. function ArrayExpression2() {
  76288. return t2.genericTypeAnnotation(t2.identifier("Array"));
  76289. }
  76290. function RestElement2() {
  76291. return ArrayExpression2();
  76292. }
  76293. RestElement2.validParent = true;
  76294. function Func() {
  76295. return t2.genericTypeAnnotation(t2.identifier("Function"));
  76296. }
  76297. var isArrayFrom = t2.buildMatchMemberExpression("Array.from");
  76298. var isObjectKeys = t2.buildMatchMemberExpression("Object.keys");
  76299. var isObjectValues = t2.buildMatchMemberExpression("Object.values");
  76300. var isObjectEntries = t2.buildMatchMemberExpression("Object.entries");
  76301. function CallExpression() {
  76302. const {
  76303. callee
  76304. } = this.node;
  76305. if (isObjectKeys(callee)) {
  76306. return t2.arrayTypeAnnotation(t2.stringTypeAnnotation());
  76307. } else if (isArrayFrom(callee) || isObjectValues(callee)) {
  76308. return t2.arrayTypeAnnotation(t2.anyTypeAnnotation());
  76309. } else if (isObjectEntries(callee)) {
  76310. return t2.arrayTypeAnnotation(t2.tupleTypeAnnotation([t2.stringTypeAnnotation(), t2.anyTypeAnnotation()]));
  76311. }
  76312. return resolveCall(this.get("callee"));
  76313. }
  76314. function TaggedTemplateExpression() {
  76315. return resolveCall(this.get("tag"));
  76316. }
  76317. function resolveCall(callee) {
  76318. callee = callee.resolve();
  76319. if (callee.isFunction()) {
  76320. if (callee.is("async")) {
  76321. if (callee.is("generator")) {
  76322. return t2.genericTypeAnnotation(t2.identifier("AsyncIterator"));
  76323. } else {
  76324. return t2.genericTypeAnnotation(t2.identifier("Promise"));
  76325. }
  76326. } else {
  76327. if (callee.node.returnType) {
  76328. return callee.node.returnType;
  76329. } else {
  76330. }
  76331. }
  76332. }
  76333. }
  76334. }
  76335. });
  76336. // node_modules/@babel/traverse/lib/path/inference/index.js
  76337. var require_inference2 = __commonJS({
  76338. "node_modules/@babel/traverse/lib/path/inference/index.js"(exports) {
  76339. "use strict";
  76340. Object.defineProperty(exports, "__esModule", {
  76341. value: true
  76342. });
  76343. exports.getTypeAnnotation = getTypeAnnotation;
  76344. exports._getTypeAnnotation = _getTypeAnnotation;
  76345. exports.isBaseType = isBaseType;
  76346. exports.couldBeBaseType = couldBeBaseType;
  76347. exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
  76348. exports.isGenericType = isGenericType;
  76349. var inferers = require_inferers2();
  76350. var t2 = require_lib2();
  76351. function getTypeAnnotation() {
  76352. if (this.typeAnnotation)
  76353. return this.typeAnnotation;
  76354. let type = this._getTypeAnnotation() || t2.anyTypeAnnotation();
  76355. if (t2.isTypeAnnotation(type))
  76356. type = type.typeAnnotation;
  76357. return this.typeAnnotation = type;
  76358. }
  76359. var typeAnnotationInferringNodes = /* @__PURE__ */ new WeakSet();
  76360. function _getTypeAnnotation() {
  76361. const node = this.node;
  76362. if (!node) {
  76363. if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
  76364. const declar = this.parentPath.parentPath;
  76365. const declarParent = declar.parentPath;
  76366. if (declar.key === "left" && declarParent.isForInStatement()) {
  76367. return t2.stringTypeAnnotation();
  76368. }
  76369. if (declar.key === "left" && declarParent.isForOfStatement()) {
  76370. return t2.anyTypeAnnotation();
  76371. }
  76372. return t2.voidTypeAnnotation();
  76373. } else {
  76374. return;
  76375. }
  76376. }
  76377. if (node.typeAnnotation) {
  76378. return node.typeAnnotation;
  76379. }
  76380. if (typeAnnotationInferringNodes.has(node)) {
  76381. return;
  76382. }
  76383. typeAnnotationInferringNodes.add(node);
  76384. try {
  76385. var _inferer;
  76386. let inferer = inferers[node.type];
  76387. if (inferer) {
  76388. return inferer.call(this, node);
  76389. }
  76390. inferer = inferers[this.parentPath.type];
  76391. if ((_inferer = inferer) != null && _inferer.validParent) {
  76392. return this.parentPath.getTypeAnnotation();
  76393. }
  76394. } finally {
  76395. typeAnnotationInferringNodes.delete(node);
  76396. }
  76397. }
  76398. function isBaseType(baseName, soft) {
  76399. return _isBaseType(baseName, this.getTypeAnnotation(), soft);
  76400. }
  76401. function _isBaseType(baseName, type, soft) {
  76402. if (baseName === "string") {
  76403. return t2.isStringTypeAnnotation(type);
  76404. } else if (baseName === "number") {
  76405. return t2.isNumberTypeAnnotation(type);
  76406. } else if (baseName === "boolean") {
  76407. return t2.isBooleanTypeAnnotation(type);
  76408. } else if (baseName === "any") {
  76409. return t2.isAnyTypeAnnotation(type);
  76410. } else if (baseName === "mixed") {
  76411. return t2.isMixedTypeAnnotation(type);
  76412. } else if (baseName === "empty") {
  76413. return t2.isEmptyTypeAnnotation(type);
  76414. } else if (baseName === "void") {
  76415. return t2.isVoidTypeAnnotation(type);
  76416. } else {
  76417. if (soft) {
  76418. return false;
  76419. } else {
  76420. throw new Error(`Unknown base type ${baseName}`);
  76421. }
  76422. }
  76423. }
  76424. function couldBeBaseType(name2) {
  76425. const type = this.getTypeAnnotation();
  76426. if (t2.isAnyTypeAnnotation(type))
  76427. return true;
  76428. if (t2.isUnionTypeAnnotation(type)) {
  76429. for (const type2 of type.types) {
  76430. if (t2.isAnyTypeAnnotation(type2) || _isBaseType(name2, type2, true)) {
  76431. return true;
  76432. }
  76433. }
  76434. return false;
  76435. } else {
  76436. return _isBaseType(name2, type, true);
  76437. }
  76438. }
  76439. function baseTypeStrictlyMatches(rightArg) {
  76440. const left = this.getTypeAnnotation();
  76441. const right = rightArg.getTypeAnnotation();
  76442. if (!t2.isAnyTypeAnnotation(left) && t2.isFlowBaseAnnotation(left)) {
  76443. return right.type === left.type;
  76444. }
  76445. return false;
  76446. }
  76447. function isGenericType(genericName) {
  76448. const type = this.getTypeAnnotation();
  76449. return t2.isGenericTypeAnnotation(type) && t2.isIdentifier(type.id, {
  76450. name: genericName
  76451. });
  76452. }
  76453. }
  76454. });
  76455. // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  76456. var require_identifier5 = __commonJS({
  76457. "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  76458. "use strict";
  76459. Object.defineProperty(exports, "__esModule", {
  76460. value: true
  76461. });
  76462. exports.isIdentifierStart = isIdentifierStart2;
  76463. exports.isIdentifierChar = isIdentifierChar2;
  76464. exports.isIdentifierName = isIdentifierName;
  76465. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  76466. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  76467. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  76468. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  76469. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  76470. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  76471. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  76472. function isInAstralSet2(code2, set) {
  76473. let pos = 65536;
  76474. for (let i = 0, length = set.length; i < length; i += 2) {
  76475. pos += set[i];
  76476. if (pos > code2)
  76477. return false;
  76478. pos += set[i + 1];
  76479. if (pos >= code2)
  76480. return true;
  76481. }
  76482. return false;
  76483. }
  76484. function isIdentifierStart2(code2) {
  76485. if (code2 < 65)
  76486. return code2 === 36;
  76487. if (code2 <= 90)
  76488. return true;
  76489. if (code2 < 97)
  76490. return code2 === 95;
  76491. if (code2 <= 122)
  76492. return true;
  76493. if (code2 <= 65535) {
  76494. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  76495. }
  76496. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  76497. }
  76498. function isIdentifierChar2(code2) {
  76499. if (code2 < 48)
  76500. return code2 === 36;
  76501. if (code2 < 58)
  76502. return true;
  76503. if (code2 < 65)
  76504. return false;
  76505. if (code2 <= 90)
  76506. return true;
  76507. if (code2 < 97)
  76508. return code2 === 95;
  76509. if (code2 <= 122)
  76510. return true;
  76511. if (code2 <= 65535) {
  76512. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  76513. }
  76514. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  76515. }
  76516. function isIdentifierName(name2) {
  76517. let isFirst = true;
  76518. for (let i = 0; i < name2.length; i++) {
  76519. let cp = name2.charCodeAt(i);
  76520. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  76521. const trail = name2.charCodeAt(++i);
  76522. if ((trail & 64512) === 56320) {
  76523. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  76524. }
  76525. }
  76526. if (isFirst) {
  76527. isFirst = false;
  76528. if (!isIdentifierStart2(cp)) {
  76529. return false;
  76530. }
  76531. } else if (!isIdentifierChar2(cp)) {
  76532. return false;
  76533. }
  76534. }
  76535. return !isFirst;
  76536. }
  76537. }
  76538. });
  76539. // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  76540. var require_keyword5 = __commonJS({
  76541. "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  76542. "use strict";
  76543. Object.defineProperty(exports, "__esModule", {
  76544. value: true
  76545. });
  76546. exports.isReservedWord = isReservedWord;
  76547. exports.isStrictReservedWord = isStrictReservedWord;
  76548. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  76549. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  76550. exports.isKeyword = isKeyword;
  76551. var reservedWords2 = {
  76552. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  76553. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  76554. strictBind: ["eval", "arguments"]
  76555. };
  76556. var keywords2 = new Set(reservedWords2.keyword);
  76557. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  76558. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  76559. function isReservedWord(word, inModule) {
  76560. return inModule && word === "await" || word === "enum";
  76561. }
  76562. function isStrictReservedWord(word, inModule) {
  76563. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  76564. }
  76565. function isStrictBindOnlyReservedWord(word) {
  76566. return reservedWordsStrictBindSet.has(word);
  76567. }
  76568. function isStrictBindReservedWord(word, inModule) {
  76569. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  76570. }
  76571. function isKeyword(word) {
  76572. return keywords2.has(word);
  76573. }
  76574. }
  76575. });
  76576. // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/index.js
  76577. var require_lib19 = __commonJS({
  76578. "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  76579. "use strict";
  76580. Object.defineProperty(exports, "__esModule", {
  76581. value: true
  76582. });
  76583. Object.defineProperty(exports, "isIdentifierName", {
  76584. enumerable: true,
  76585. get: function() {
  76586. return _identifier.isIdentifierName;
  76587. }
  76588. });
  76589. Object.defineProperty(exports, "isIdentifierChar", {
  76590. enumerable: true,
  76591. get: function() {
  76592. return _identifier.isIdentifierChar;
  76593. }
  76594. });
  76595. Object.defineProperty(exports, "isIdentifierStart", {
  76596. enumerable: true,
  76597. get: function() {
  76598. return _identifier.isIdentifierStart;
  76599. }
  76600. });
  76601. Object.defineProperty(exports, "isReservedWord", {
  76602. enumerable: true,
  76603. get: function() {
  76604. return _keyword.isReservedWord;
  76605. }
  76606. });
  76607. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  76608. enumerable: true,
  76609. get: function() {
  76610. return _keyword.isStrictBindOnlyReservedWord;
  76611. }
  76612. });
  76613. Object.defineProperty(exports, "isStrictBindReservedWord", {
  76614. enumerable: true,
  76615. get: function() {
  76616. return _keyword.isStrictBindReservedWord;
  76617. }
  76618. });
  76619. Object.defineProperty(exports, "isStrictReservedWord", {
  76620. enumerable: true,
  76621. get: function() {
  76622. return _keyword.isStrictReservedWord;
  76623. }
  76624. });
  76625. Object.defineProperty(exports, "isKeyword", {
  76626. enumerable: true,
  76627. get: function() {
  76628. return _keyword.isKeyword;
  76629. }
  76630. });
  76631. var _identifier = require_identifier5();
  76632. var _keyword = require_keyword5();
  76633. }
  76634. });
  76635. // node_modules/@babel/traverse/node_modules/color-name/index.js
  76636. var require_color_name2 = __commonJS({
  76637. "node_modules/@babel/traverse/node_modules/color-name/index.js"(exports, module2) {
  76638. "use strict";
  76639. module2.exports = {
  76640. "aliceblue": [240, 248, 255],
  76641. "antiquewhite": [250, 235, 215],
  76642. "aqua": [0, 255, 255],
  76643. "aquamarine": [127, 255, 212],
  76644. "azure": [240, 255, 255],
  76645. "beige": [245, 245, 220],
  76646. "bisque": [255, 228, 196],
  76647. "black": [0, 0, 0],
  76648. "blanchedalmond": [255, 235, 205],
  76649. "blue": [0, 0, 255],
  76650. "blueviolet": [138, 43, 226],
  76651. "brown": [165, 42, 42],
  76652. "burlywood": [222, 184, 135],
  76653. "cadetblue": [95, 158, 160],
  76654. "chartreuse": [127, 255, 0],
  76655. "chocolate": [210, 105, 30],
  76656. "coral": [255, 127, 80],
  76657. "cornflowerblue": [100, 149, 237],
  76658. "cornsilk": [255, 248, 220],
  76659. "crimson": [220, 20, 60],
  76660. "cyan": [0, 255, 255],
  76661. "darkblue": [0, 0, 139],
  76662. "darkcyan": [0, 139, 139],
  76663. "darkgoldenrod": [184, 134, 11],
  76664. "darkgray": [169, 169, 169],
  76665. "darkgreen": [0, 100, 0],
  76666. "darkgrey": [169, 169, 169],
  76667. "darkkhaki": [189, 183, 107],
  76668. "darkmagenta": [139, 0, 139],
  76669. "darkolivegreen": [85, 107, 47],
  76670. "darkorange": [255, 140, 0],
  76671. "darkorchid": [153, 50, 204],
  76672. "darkred": [139, 0, 0],
  76673. "darksalmon": [233, 150, 122],
  76674. "darkseagreen": [143, 188, 143],
  76675. "darkslateblue": [72, 61, 139],
  76676. "darkslategray": [47, 79, 79],
  76677. "darkslategrey": [47, 79, 79],
  76678. "darkturquoise": [0, 206, 209],
  76679. "darkviolet": [148, 0, 211],
  76680. "deeppink": [255, 20, 147],
  76681. "deepskyblue": [0, 191, 255],
  76682. "dimgray": [105, 105, 105],
  76683. "dimgrey": [105, 105, 105],
  76684. "dodgerblue": [30, 144, 255],
  76685. "firebrick": [178, 34, 34],
  76686. "floralwhite": [255, 250, 240],
  76687. "forestgreen": [34, 139, 34],
  76688. "fuchsia": [255, 0, 255],
  76689. "gainsboro": [220, 220, 220],
  76690. "ghostwhite": [248, 248, 255],
  76691. "gold": [255, 215, 0],
  76692. "goldenrod": [218, 165, 32],
  76693. "gray": [128, 128, 128],
  76694. "green": [0, 128, 0],
  76695. "greenyellow": [173, 255, 47],
  76696. "grey": [128, 128, 128],
  76697. "honeydew": [240, 255, 240],
  76698. "hotpink": [255, 105, 180],
  76699. "indianred": [205, 92, 92],
  76700. "indigo": [75, 0, 130],
  76701. "ivory": [255, 255, 240],
  76702. "khaki": [240, 230, 140],
  76703. "lavender": [230, 230, 250],
  76704. "lavenderblush": [255, 240, 245],
  76705. "lawngreen": [124, 252, 0],
  76706. "lemonchiffon": [255, 250, 205],
  76707. "lightblue": [173, 216, 230],
  76708. "lightcoral": [240, 128, 128],
  76709. "lightcyan": [224, 255, 255],
  76710. "lightgoldenrodyellow": [250, 250, 210],
  76711. "lightgray": [211, 211, 211],
  76712. "lightgreen": [144, 238, 144],
  76713. "lightgrey": [211, 211, 211],
  76714. "lightpink": [255, 182, 193],
  76715. "lightsalmon": [255, 160, 122],
  76716. "lightseagreen": [32, 178, 170],
  76717. "lightskyblue": [135, 206, 250],
  76718. "lightslategray": [119, 136, 153],
  76719. "lightslategrey": [119, 136, 153],
  76720. "lightsteelblue": [176, 196, 222],
  76721. "lightyellow": [255, 255, 224],
  76722. "lime": [0, 255, 0],
  76723. "limegreen": [50, 205, 50],
  76724. "linen": [250, 240, 230],
  76725. "magenta": [255, 0, 255],
  76726. "maroon": [128, 0, 0],
  76727. "mediumaquamarine": [102, 205, 170],
  76728. "mediumblue": [0, 0, 205],
  76729. "mediumorchid": [186, 85, 211],
  76730. "mediumpurple": [147, 112, 219],
  76731. "mediumseagreen": [60, 179, 113],
  76732. "mediumslateblue": [123, 104, 238],
  76733. "mediumspringgreen": [0, 250, 154],
  76734. "mediumturquoise": [72, 209, 204],
  76735. "mediumvioletred": [199, 21, 133],
  76736. "midnightblue": [25, 25, 112],
  76737. "mintcream": [245, 255, 250],
  76738. "mistyrose": [255, 228, 225],
  76739. "moccasin": [255, 228, 181],
  76740. "navajowhite": [255, 222, 173],
  76741. "navy": [0, 0, 128],
  76742. "oldlace": [253, 245, 230],
  76743. "olive": [128, 128, 0],
  76744. "olivedrab": [107, 142, 35],
  76745. "orange": [255, 165, 0],
  76746. "orangered": [255, 69, 0],
  76747. "orchid": [218, 112, 214],
  76748. "palegoldenrod": [238, 232, 170],
  76749. "palegreen": [152, 251, 152],
  76750. "paleturquoise": [175, 238, 238],
  76751. "palevioletred": [219, 112, 147],
  76752. "papayawhip": [255, 239, 213],
  76753. "peachpuff": [255, 218, 185],
  76754. "peru": [205, 133, 63],
  76755. "pink": [255, 192, 203],
  76756. "plum": [221, 160, 221],
  76757. "powderblue": [176, 224, 230],
  76758. "purple": [128, 0, 128],
  76759. "rebeccapurple": [102, 51, 153],
  76760. "red": [255, 0, 0],
  76761. "rosybrown": [188, 143, 143],
  76762. "royalblue": [65, 105, 225],
  76763. "saddlebrown": [139, 69, 19],
  76764. "salmon": [250, 128, 114],
  76765. "sandybrown": [244, 164, 96],
  76766. "seagreen": [46, 139, 87],
  76767. "seashell": [255, 245, 238],
  76768. "sienna": [160, 82, 45],
  76769. "silver": [192, 192, 192],
  76770. "skyblue": [135, 206, 235],
  76771. "slateblue": [106, 90, 205],
  76772. "slategray": [112, 128, 144],
  76773. "slategrey": [112, 128, 144],
  76774. "snow": [255, 250, 250],
  76775. "springgreen": [0, 255, 127],
  76776. "steelblue": [70, 130, 180],
  76777. "tan": [210, 180, 140],
  76778. "teal": [0, 128, 128],
  76779. "thistle": [216, 191, 216],
  76780. "tomato": [255, 99, 71],
  76781. "turquoise": [64, 224, 208],
  76782. "violet": [238, 130, 238],
  76783. "wheat": [245, 222, 179],
  76784. "white": [255, 255, 255],
  76785. "whitesmoke": [245, 245, 245],
  76786. "yellow": [255, 255, 0],
  76787. "yellowgreen": [154, 205, 50]
  76788. };
  76789. }
  76790. });
  76791. // node_modules/@babel/traverse/node_modules/color-convert/conversions.js
  76792. var require_conversions2 = __commonJS({
  76793. "node_modules/@babel/traverse/node_modules/color-convert/conversions.js"(exports, module2) {
  76794. var cssKeywords = require_color_name2();
  76795. var reverseKeywords = {};
  76796. for (key in cssKeywords) {
  76797. if (cssKeywords.hasOwnProperty(key)) {
  76798. reverseKeywords[cssKeywords[key]] = key;
  76799. }
  76800. }
  76801. var key;
  76802. var convert2 = module2.exports = {
  76803. rgb: { channels: 3, labels: "rgb" },
  76804. hsl: { channels: 3, labels: "hsl" },
  76805. hsv: { channels: 3, labels: "hsv" },
  76806. hwb: { channels: 3, labels: "hwb" },
  76807. cmyk: { channels: 4, labels: "cmyk" },
  76808. xyz: { channels: 3, labels: "xyz" },
  76809. lab: { channels: 3, labels: "lab" },
  76810. lch: { channels: 3, labels: "lch" },
  76811. hex: { channels: 1, labels: ["hex"] },
  76812. keyword: { channels: 1, labels: ["keyword"] },
  76813. ansi16: { channels: 1, labels: ["ansi16"] },
  76814. ansi256: { channels: 1, labels: ["ansi256"] },
  76815. hcg: { channels: 3, labels: ["h", "c", "g"] },
  76816. apple: { channels: 3, labels: ["r16", "g16", "b16"] },
  76817. gray: { channels: 1, labels: ["gray"] }
  76818. };
  76819. for (model in convert2) {
  76820. if (convert2.hasOwnProperty(model)) {
  76821. if (!("channels" in convert2[model])) {
  76822. throw new Error("missing channels property: " + model);
  76823. }
  76824. if (!("labels" in convert2[model])) {
  76825. throw new Error("missing channel labels property: " + model);
  76826. }
  76827. if (convert2[model].labels.length !== convert2[model].channels) {
  76828. throw new Error("channel and label counts mismatch: " + model);
  76829. }
  76830. channels = convert2[model].channels;
  76831. labels = convert2[model].labels;
  76832. delete convert2[model].channels;
  76833. delete convert2[model].labels;
  76834. Object.defineProperty(convert2[model], "channels", { value: channels });
  76835. Object.defineProperty(convert2[model], "labels", { value: labels });
  76836. }
  76837. }
  76838. var channels;
  76839. var labels;
  76840. var model;
  76841. convert2.rgb.hsl = function(rgb) {
  76842. var r = rgb[0] / 255;
  76843. var g = rgb[1] / 255;
  76844. var b = rgb[2] / 255;
  76845. var min = Math.min(r, g, b);
  76846. var max = Math.max(r, g, b);
  76847. var delta = max - min;
  76848. var h;
  76849. var s;
  76850. var l;
  76851. if (max === min) {
  76852. h = 0;
  76853. } else if (r === max) {
  76854. h = (g - b) / delta;
  76855. } else if (g === max) {
  76856. h = 2 + (b - r) / delta;
  76857. } else if (b === max) {
  76858. h = 4 + (r - g) / delta;
  76859. }
  76860. h = Math.min(h * 60, 360);
  76861. if (h < 0) {
  76862. h += 360;
  76863. }
  76864. l = (min + max) / 2;
  76865. if (max === min) {
  76866. s = 0;
  76867. } else if (l <= 0.5) {
  76868. s = delta / (max + min);
  76869. } else {
  76870. s = delta / (2 - max - min);
  76871. }
  76872. return [h, s * 100, l * 100];
  76873. };
  76874. convert2.rgb.hsv = function(rgb) {
  76875. var rdif;
  76876. var gdif;
  76877. var bdif;
  76878. var h;
  76879. var s;
  76880. var r = rgb[0] / 255;
  76881. var g = rgb[1] / 255;
  76882. var b = rgb[2] / 255;
  76883. var v = Math.max(r, g, b);
  76884. var diff = v - Math.min(r, g, b);
  76885. var diffc = function(c) {
  76886. return (v - c) / 6 / diff + 1 / 2;
  76887. };
  76888. if (diff === 0) {
  76889. h = s = 0;
  76890. } else {
  76891. s = diff / v;
  76892. rdif = diffc(r);
  76893. gdif = diffc(g);
  76894. bdif = diffc(b);
  76895. if (r === v) {
  76896. h = bdif - gdif;
  76897. } else if (g === v) {
  76898. h = 1 / 3 + rdif - bdif;
  76899. } else if (b === v) {
  76900. h = 2 / 3 + gdif - rdif;
  76901. }
  76902. if (h < 0) {
  76903. h += 1;
  76904. } else if (h > 1) {
  76905. h -= 1;
  76906. }
  76907. }
  76908. return [
  76909. h * 360,
  76910. s * 100,
  76911. v * 100
  76912. ];
  76913. };
  76914. convert2.rgb.hwb = function(rgb) {
  76915. var r = rgb[0];
  76916. var g = rgb[1];
  76917. var b = rgb[2];
  76918. var h = convert2.rgb.hsl(rgb)[0];
  76919. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  76920. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  76921. return [h, w * 100, b * 100];
  76922. };
  76923. convert2.rgb.cmyk = function(rgb) {
  76924. var r = rgb[0] / 255;
  76925. var g = rgb[1] / 255;
  76926. var b = rgb[2] / 255;
  76927. var c;
  76928. var m;
  76929. var y;
  76930. var k;
  76931. k = Math.min(1 - r, 1 - g, 1 - b);
  76932. c = (1 - r - k) / (1 - k) || 0;
  76933. m = (1 - g - k) / (1 - k) || 0;
  76934. y = (1 - b - k) / (1 - k) || 0;
  76935. return [c * 100, m * 100, y * 100, k * 100];
  76936. };
  76937. function comparativeDistance(x, y) {
  76938. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  76939. }
  76940. convert2.rgb.keyword = function(rgb) {
  76941. var reversed = reverseKeywords[rgb];
  76942. if (reversed) {
  76943. return reversed;
  76944. }
  76945. var currentClosestDistance = Infinity;
  76946. var currentClosestKeyword;
  76947. for (var keyword in cssKeywords) {
  76948. if (cssKeywords.hasOwnProperty(keyword)) {
  76949. var value = cssKeywords[keyword];
  76950. var distance = comparativeDistance(rgb, value);
  76951. if (distance < currentClosestDistance) {
  76952. currentClosestDistance = distance;
  76953. currentClosestKeyword = keyword;
  76954. }
  76955. }
  76956. }
  76957. return currentClosestKeyword;
  76958. };
  76959. convert2.keyword.rgb = function(keyword) {
  76960. return cssKeywords[keyword];
  76961. };
  76962. convert2.rgb.xyz = function(rgb) {
  76963. var r = rgb[0] / 255;
  76964. var g = rgb[1] / 255;
  76965. var b = rgb[2] / 255;
  76966. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  76967. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  76968. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  76969. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  76970. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  76971. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  76972. return [x * 100, y * 100, z * 100];
  76973. };
  76974. convert2.rgb.lab = function(rgb) {
  76975. var xyz = convert2.rgb.xyz(rgb);
  76976. var x = xyz[0];
  76977. var y = xyz[1];
  76978. var z = xyz[2];
  76979. var l;
  76980. var a;
  76981. var b;
  76982. x /= 95.047;
  76983. y /= 100;
  76984. z /= 108.883;
  76985. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  76986. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  76987. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  76988. l = 116 * y - 16;
  76989. a = 500 * (x - y);
  76990. b = 200 * (y - z);
  76991. return [l, a, b];
  76992. };
  76993. convert2.hsl.rgb = function(hsl) {
  76994. var h = hsl[0] / 360;
  76995. var s = hsl[1] / 100;
  76996. var l = hsl[2] / 100;
  76997. var t1;
  76998. var t2;
  76999. var t3;
  77000. var rgb;
  77001. var val;
  77002. if (s === 0) {
  77003. val = l * 255;
  77004. return [val, val, val];
  77005. }
  77006. if (l < 0.5) {
  77007. t2 = l * (1 + s);
  77008. } else {
  77009. t2 = l + s - l * s;
  77010. }
  77011. t1 = 2 * l - t2;
  77012. rgb = [0, 0, 0];
  77013. for (var i = 0; i < 3; i++) {
  77014. t3 = h + 1 / 3 * -(i - 1);
  77015. if (t3 < 0) {
  77016. t3++;
  77017. }
  77018. if (t3 > 1) {
  77019. t3--;
  77020. }
  77021. if (6 * t3 < 1) {
  77022. val = t1 + (t2 - t1) * 6 * t3;
  77023. } else if (2 * t3 < 1) {
  77024. val = t2;
  77025. } else if (3 * t3 < 2) {
  77026. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  77027. } else {
  77028. val = t1;
  77029. }
  77030. rgb[i] = val * 255;
  77031. }
  77032. return rgb;
  77033. };
  77034. convert2.hsl.hsv = function(hsl) {
  77035. var h = hsl[0];
  77036. var s = hsl[1] / 100;
  77037. var l = hsl[2] / 100;
  77038. var smin = s;
  77039. var lmin = Math.max(l, 0.01);
  77040. var sv;
  77041. var v;
  77042. l *= 2;
  77043. s *= l <= 1 ? l : 2 - l;
  77044. smin *= lmin <= 1 ? lmin : 2 - lmin;
  77045. v = (l + s) / 2;
  77046. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  77047. return [h, sv * 100, v * 100];
  77048. };
  77049. convert2.hsv.rgb = function(hsv) {
  77050. var h = hsv[0] / 60;
  77051. var s = hsv[1] / 100;
  77052. var v = hsv[2] / 100;
  77053. var hi = Math.floor(h) % 6;
  77054. var f = h - Math.floor(h);
  77055. var p = 255 * v * (1 - s);
  77056. var q = 255 * v * (1 - s * f);
  77057. var t2 = 255 * v * (1 - s * (1 - f));
  77058. v *= 255;
  77059. switch (hi) {
  77060. case 0:
  77061. return [v, t2, p];
  77062. case 1:
  77063. return [q, v, p];
  77064. case 2:
  77065. return [p, v, t2];
  77066. case 3:
  77067. return [p, q, v];
  77068. case 4:
  77069. return [t2, p, v];
  77070. case 5:
  77071. return [v, p, q];
  77072. }
  77073. };
  77074. convert2.hsv.hsl = function(hsv) {
  77075. var h = hsv[0];
  77076. var s = hsv[1] / 100;
  77077. var v = hsv[2] / 100;
  77078. var vmin = Math.max(v, 0.01);
  77079. var lmin;
  77080. var sl;
  77081. var l;
  77082. l = (2 - s) * v;
  77083. lmin = (2 - s) * vmin;
  77084. sl = s * vmin;
  77085. sl /= lmin <= 1 ? lmin : 2 - lmin;
  77086. sl = sl || 0;
  77087. l /= 2;
  77088. return [h, sl * 100, l * 100];
  77089. };
  77090. convert2.hwb.rgb = function(hwb) {
  77091. var h = hwb[0] / 360;
  77092. var wh = hwb[1] / 100;
  77093. var bl = hwb[2] / 100;
  77094. var ratio = wh + bl;
  77095. var i;
  77096. var v;
  77097. var f;
  77098. var n;
  77099. if (ratio > 1) {
  77100. wh /= ratio;
  77101. bl /= ratio;
  77102. }
  77103. i = Math.floor(6 * h);
  77104. v = 1 - bl;
  77105. f = 6 * h - i;
  77106. if ((i & 1) !== 0) {
  77107. f = 1 - f;
  77108. }
  77109. n = wh + f * (v - wh);
  77110. var r;
  77111. var g;
  77112. var b;
  77113. switch (i) {
  77114. default:
  77115. case 6:
  77116. case 0:
  77117. r = v;
  77118. g = n;
  77119. b = wh;
  77120. break;
  77121. case 1:
  77122. r = n;
  77123. g = v;
  77124. b = wh;
  77125. break;
  77126. case 2:
  77127. r = wh;
  77128. g = v;
  77129. b = n;
  77130. break;
  77131. case 3:
  77132. r = wh;
  77133. g = n;
  77134. b = v;
  77135. break;
  77136. case 4:
  77137. r = n;
  77138. g = wh;
  77139. b = v;
  77140. break;
  77141. case 5:
  77142. r = v;
  77143. g = wh;
  77144. b = n;
  77145. break;
  77146. }
  77147. return [r * 255, g * 255, b * 255];
  77148. };
  77149. convert2.cmyk.rgb = function(cmyk) {
  77150. var c = cmyk[0] / 100;
  77151. var m = cmyk[1] / 100;
  77152. var y = cmyk[2] / 100;
  77153. var k = cmyk[3] / 100;
  77154. var r;
  77155. var g;
  77156. var b;
  77157. r = 1 - Math.min(1, c * (1 - k) + k);
  77158. g = 1 - Math.min(1, m * (1 - k) + k);
  77159. b = 1 - Math.min(1, y * (1 - k) + k);
  77160. return [r * 255, g * 255, b * 255];
  77161. };
  77162. convert2.xyz.rgb = function(xyz) {
  77163. var x = xyz[0] / 100;
  77164. var y = xyz[1] / 100;
  77165. var z = xyz[2] / 100;
  77166. var r;
  77167. var g;
  77168. var b;
  77169. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  77170. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  77171. b = x * 0.0557 + y * -0.204 + z * 1.057;
  77172. r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
  77173. g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
  77174. b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
  77175. r = Math.min(Math.max(0, r), 1);
  77176. g = Math.min(Math.max(0, g), 1);
  77177. b = Math.min(Math.max(0, b), 1);
  77178. return [r * 255, g * 255, b * 255];
  77179. };
  77180. convert2.xyz.lab = function(xyz) {
  77181. var x = xyz[0];
  77182. var y = xyz[1];
  77183. var z = xyz[2];
  77184. var l;
  77185. var a;
  77186. var b;
  77187. x /= 95.047;
  77188. y /= 100;
  77189. z /= 108.883;
  77190. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  77191. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  77192. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  77193. l = 116 * y - 16;
  77194. a = 500 * (x - y);
  77195. b = 200 * (y - z);
  77196. return [l, a, b];
  77197. };
  77198. convert2.lab.xyz = function(lab) {
  77199. var l = lab[0];
  77200. var a = lab[1];
  77201. var b = lab[2];
  77202. var x;
  77203. var y;
  77204. var z;
  77205. y = (l + 16) / 116;
  77206. x = a / 500 + y;
  77207. z = y - b / 200;
  77208. var y2 = Math.pow(y, 3);
  77209. var x2 = Math.pow(x, 3);
  77210. var z2 = Math.pow(z, 3);
  77211. y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
  77212. x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
  77213. z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
  77214. x *= 95.047;
  77215. y *= 100;
  77216. z *= 108.883;
  77217. return [x, y, z];
  77218. };
  77219. convert2.lab.lch = function(lab) {
  77220. var l = lab[0];
  77221. var a = lab[1];
  77222. var b = lab[2];
  77223. var hr;
  77224. var h;
  77225. var c;
  77226. hr = Math.atan2(b, a);
  77227. h = hr * 360 / 2 / Math.PI;
  77228. if (h < 0) {
  77229. h += 360;
  77230. }
  77231. c = Math.sqrt(a * a + b * b);
  77232. return [l, c, h];
  77233. };
  77234. convert2.lch.lab = function(lch) {
  77235. var l = lch[0];
  77236. var c = lch[1];
  77237. var h = lch[2];
  77238. var a;
  77239. var b;
  77240. var hr;
  77241. hr = h / 360 * 2 * Math.PI;
  77242. a = c * Math.cos(hr);
  77243. b = c * Math.sin(hr);
  77244. return [l, a, b];
  77245. };
  77246. convert2.rgb.ansi16 = function(args) {
  77247. var r = args[0];
  77248. var g = args[1];
  77249. var b = args[2];
  77250. var value = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args)[2];
  77251. value = Math.round(value / 50);
  77252. if (value === 0) {
  77253. return 30;
  77254. }
  77255. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  77256. if (value === 2) {
  77257. ansi += 60;
  77258. }
  77259. return ansi;
  77260. };
  77261. convert2.hsv.ansi16 = function(args) {
  77262. return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
  77263. };
  77264. convert2.rgb.ansi256 = function(args) {
  77265. var r = args[0];
  77266. var g = args[1];
  77267. var b = args[2];
  77268. if (r === g && g === b) {
  77269. if (r < 8) {
  77270. return 16;
  77271. }
  77272. if (r > 248) {
  77273. return 231;
  77274. }
  77275. return Math.round((r - 8) / 247 * 24) + 232;
  77276. }
  77277. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  77278. return ansi;
  77279. };
  77280. convert2.ansi16.rgb = function(args) {
  77281. var color4 = args % 10;
  77282. if (color4 === 0 || color4 === 7) {
  77283. if (args > 50) {
  77284. color4 += 3.5;
  77285. }
  77286. color4 = color4 / 10.5 * 255;
  77287. return [color4, color4, color4];
  77288. }
  77289. var mult = (~~(args > 50) + 1) * 0.5;
  77290. var r = (color4 & 1) * mult * 255;
  77291. var g = (color4 >> 1 & 1) * mult * 255;
  77292. var b = (color4 >> 2 & 1) * mult * 255;
  77293. return [r, g, b];
  77294. };
  77295. convert2.ansi256.rgb = function(args) {
  77296. if (args >= 232) {
  77297. var c = (args - 232) * 10 + 8;
  77298. return [c, c, c];
  77299. }
  77300. args -= 16;
  77301. var rem;
  77302. var r = Math.floor(args / 36) / 5 * 255;
  77303. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  77304. var b = rem % 6 / 5 * 255;
  77305. return [r, g, b];
  77306. };
  77307. convert2.rgb.hex = function(args) {
  77308. var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
  77309. var string3 = integer.toString(16).toUpperCase();
  77310. return "000000".substring(string3.length) + string3;
  77311. };
  77312. convert2.hex.rgb = function(args) {
  77313. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  77314. if (!match) {
  77315. return [0, 0, 0];
  77316. }
  77317. var colorString = match[0];
  77318. if (match[0].length === 3) {
  77319. colorString = colorString.split("").map(function(char) {
  77320. return char + char;
  77321. }).join("");
  77322. }
  77323. var integer = parseInt(colorString, 16);
  77324. var r = integer >> 16 & 255;
  77325. var g = integer >> 8 & 255;
  77326. var b = integer & 255;
  77327. return [r, g, b];
  77328. };
  77329. convert2.rgb.hcg = function(rgb) {
  77330. var r = rgb[0] / 255;
  77331. var g = rgb[1] / 255;
  77332. var b = rgb[2] / 255;
  77333. var max = Math.max(Math.max(r, g), b);
  77334. var min = Math.min(Math.min(r, g), b);
  77335. var chroma = max - min;
  77336. var grayscale;
  77337. var hue;
  77338. if (chroma < 1) {
  77339. grayscale = min / (1 - chroma);
  77340. } else {
  77341. grayscale = 0;
  77342. }
  77343. if (chroma <= 0) {
  77344. hue = 0;
  77345. } else if (max === r) {
  77346. hue = (g - b) / chroma % 6;
  77347. } else if (max === g) {
  77348. hue = 2 + (b - r) / chroma;
  77349. } else {
  77350. hue = 4 + (r - g) / chroma + 4;
  77351. }
  77352. hue /= 6;
  77353. hue %= 1;
  77354. return [hue * 360, chroma * 100, grayscale * 100];
  77355. };
  77356. convert2.hsl.hcg = function(hsl) {
  77357. var s = hsl[1] / 100;
  77358. var l = hsl[2] / 100;
  77359. var c = 1;
  77360. var f = 0;
  77361. if (l < 0.5) {
  77362. c = 2 * s * l;
  77363. } else {
  77364. c = 2 * s * (1 - l);
  77365. }
  77366. if (c < 1) {
  77367. f = (l - 0.5 * c) / (1 - c);
  77368. }
  77369. return [hsl[0], c * 100, f * 100];
  77370. };
  77371. convert2.hsv.hcg = function(hsv) {
  77372. var s = hsv[1] / 100;
  77373. var v = hsv[2] / 100;
  77374. var c = s * v;
  77375. var f = 0;
  77376. if (c < 1) {
  77377. f = (v - c) / (1 - c);
  77378. }
  77379. return [hsv[0], c * 100, f * 100];
  77380. };
  77381. convert2.hcg.rgb = function(hcg) {
  77382. var h = hcg[0] / 360;
  77383. var c = hcg[1] / 100;
  77384. var g = hcg[2] / 100;
  77385. if (c === 0) {
  77386. return [g * 255, g * 255, g * 255];
  77387. }
  77388. var pure = [0, 0, 0];
  77389. var hi = h % 1 * 6;
  77390. var v = hi % 1;
  77391. var w = 1 - v;
  77392. var mg = 0;
  77393. switch (Math.floor(hi)) {
  77394. case 0:
  77395. pure[0] = 1;
  77396. pure[1] = v;
  77397. pure[2] = 0;
  77398. break;
  77399. case 1:
  77400. pure[0] = w;
  77401. pure[1] = 1;
  77402. pure[2] = 0;
  77403. break;
  77404. case 2:
  77405. pure[0] = 0;
  77406. pure[1] = 1;
  77407. pure[2] = v;
  77408. break;
  77409. case 3:
  77410. pure[0] = 0;
  77411. pure[1] = w;
  77412. pure[2] = 1;
  77413. break;
  77414. case 4:
  77415. pure[0] = v;
  77416. pure[1] = 0;
  77417. pure[2] = 1;
  77418. break;
  77419. default:
  77420. pure[0] = 1;
  77421. pure[1] = 0;
  77422. pure[2] = w;
  77423. }
  77424. mg = (1 - c) * g;
  77425. return [
  77426. (c * pure[0] + mg) * 255,
  77427. (c * pure[1] + mg) * 255,
  77428. (c * pure[2] + mg) * 255
  77429. ];
  77430. };
  77431. convert2.hcg.hsv = function(hcg) {
  77432. var c = hcg[1] / 100;
  77433. var g = hcg[2] / 100;
  77434. var v = c + g * (1 - c);
  77435. var f = 0;
  77436. if (v > 0) {
  77437. f = c / v;
  77438. }
  77439. return [hcg[0], f * 100, v * 100];
  77440. };
  77441. convert2.hcg.hsl = function(hcg) {
  77442. var c = hcg[1] / 100;
  77443. var g = hcg[2] / 100;
  77444. var l = g * (1 - c) + 0.5 * c;
  77445. var s = 0;
  77446. if (l > 0 && l < 0.5) {
  77447. s = c / (2 * l);
  77448. } else if (l >= 0.5 && l < 1) {
  77449. s = c / (2 * (1 - l));
  77450. }
  77451. return [hcg[0], s * 100, l * 100];
  77452. };
  77453. convert2.hcg.hwb = function(hcg) {
  77454. var c = hcg[1] / 100;
  77455. var g = hcg[2] / 100;
  77456. var v = c + g * (1 - c);
  77457. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  77458. };
  77459. convert2.hwb.hcg = function(hwb) {
  77460. var w = hwb[1] / 100;
  77461. var b = hwb[2] / 100;
  77462. var v = 1 - b;
  77463. var c = v - w;
  77464. var g = 0;
  77465. if (c < 1) {
  77466. g = (v - c) / (1 - c);
  77467. }
  77468. return [hwb[0], c * 100, g * 100];
  77469. };
  77470. convert2.apple.rgb = function(apple) {
  77471. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  77472. };
  77473. convert2.rgb.apple = function(rgb) {
  77474. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  77475. };
  77476. convert2.gray.rgb = function(args) {
  77477. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  77478. };
  77479. convert2.gray.hsl = convert2.gray.hsv = function(args) {
  77480. return [0, 0, args[0]];
  77481. };
  77482. convert2.gray.hwb = function(gray) {
  77483. return [0, 100, gray[0]];
  77484. };
  77485. convert2.gray.cmyk = function(gray) {
  77486. return [0, 0, 0, gray[0]];
  77487. };
  77488. convert2.gray.lab = function(gray) {
  77489. return [gray[0], 0, 0];
  77490. };
  77491. convert2.gray.hex = function(gray) {
  77492. var val = Math.round(gray[0] / 100 * 255) & 255;
  77493. var integer = (val << 16) + (val << 8) + val;
  77494. var string3 = integer.toString(16).toUpperCase();
  77495. return "000000".substring(string3.length) + string3;
  77496. };
  77497. convert2.rgb.gray = function(rgb) {
  77498. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  77499. return [val / 255 * 100];
  77500. };
  77501. }
  77502. });
  77503. // node_modules/@babel/traverse/node_modules/color-convert/route.js
  77504. var require_route2 = __commonJS({
  77505. "node_modules/@babel/traverse/node_modules/color-convert/route.js"(exports, module2) {
  77506. var conversions = require_conversions2();
  77507. function buildGraph() {
  77508. var graph = {};
  77509. var models = Object.keys(conversions);
  77510. for (var len = models.length, i = 0; i < len; i++) {
  77511. graph[models[i]] = {
  77512. distance: -1,
  77513. parent: null
  77514. };
  77515. }
  77516. return graph;
  77517. }
  77518. function deriveBFS(fromModel) {
  77519. var graph = buildGraph();
  77520. var queue = [fromModel];
  77521. graph[fromModel].distance = 0;
  77522. while (queue.length) {
  77523. var current2 = queue.pop();
  77524. var adjacents = Object.keys(conversions[current2]);
  77525. for (var len = adjacents.length, i = 0; i < len; i++) {
  77526. var adjacent = adjacents[i];
  77527. var node = graph[adjacent];
  77528. if (node.distance === -1) {
  77529. node.distance = graph[current2].distance + 1;
  77530. node.parent = current2;
  77531. queue.unshift(adjacent);
  77532. }
  77533. }
  77534. }
  77535. return graph;
  77536. }
  77537. function link2(from, to) {
  77538. return function(args) {
  77539. return to(from(args));
  77540. };
  77541. }
  77542. function wrapConversion(toModel, graph) {
  77543. var path = [graph[toModel].parent, toModel];
  77544. var fn = conversions[graph[toModel].parent][toModel];
  77545. var cur = graph[toModel].parent;
  77546. while (graph[cur].parent) {
  77547. path.unshift(graph[cur].parent);
  77548. fn = link2(conversions[graph[cur].parent][cur], fn);
  77549. cur = graph[cur].parent;
  77550. }
  77551. fn.conversion = path;
  77552. return fn;
  77553. }
  77554. module2.exports = function(fromModel) {
  77555. var graph = deriveBFS(fromModel);
  77556. var conversion = {};
  77557. var models = Object.keys(graph);
  77558. for (var len = models.length, i = 0; i < len; i++) {
  77559. var toModel = models[i];
  77560. var node = graph[toModel];
  77561. if (node.parent === null) {
  77562. continue;
  77563. }
  77564. conversion[toModel] = wrapConversion(toModel, graph);
  77565. }
  77566. return conversion;
  77567. };
  77568. }
  77569. });
  77570. // node_modules/@babel/traverse/node_modules/color-convert/index.js
  77571. var require_color_convert2 = __commonJS({
  77572. "node_modules/@babel/traverse/node_modules/color-convert/index.js"(exports, module2) {
  77573. var conversions = require_conversions2();
  77574. var route = require_route2();
  77575. var convert2 = {};
  77576. var models = Object.keys(conversions);
  77577. function wrapRaw(fn) {
  77578. var wrappedFn = function(args) {
  77579. if (args === void 0 || args === null) {
  77580. return args;
  77581. }
  77582. if (arguments.length > 1) {
  77583. args = Array.prototype.slice.call(arguments);
  77584. }
  77585. return fn(args);
  77586. };
  77587. if ("conversion" in fn) {
  77588. wrappedFn.conversion = fn.conversion;
  77589. }
  77590. return wrappedFn;
  77591. }
  77592. function wrapRounded(fn) {
  77593. var wrappedFn = function(args) {
  77594. if (args === void 0 || args === null) {
  77595. return args;
  77596. }
  77597. if (arguments.length > 1) {
  77598. args = Array.prototype.slice.call(arguments);
  77599. }
  77600. var result = fn(args);
  77601. if (typeof result === "object") {
  77602. for (var len = result.length, i = 0; i < len; i++) {
  77603. result[i] = Math.round(result[i]);
  77604. }
  77605. }
  77606. return result;
  77607. };
  77608. if ("conversion" in fn) {
  77609. wrappedFn.conversion = fn.conversion;
  77610. }
  77611. return wrappedFn;
  77612. }
  77613. models.forEach(function(fromModel) {
  77614. convert2[fromModel] = {};
  77615. Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels });
  77616. Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
  77617. var routes = route(fromModel);
  77618. var routeModels = Object.keys(routes);
  77619. routeModels.forEach(function(toModel) {
  77620. var fn = routes[toModel];
  77621. convert2[fromModel][toModel] = wrapRounded(fn);
  77622. convert2[fromModel][toModel].raw = wrapRaw(fn);
  77623. });
  77624. });
  77625. module2.exports = convert2;
  77626. }
  77627. });
  77628. // node_modules/@babel/traverse/node_modules/ansi-styles/index.js
  77629. var require_ansi_styles2 = __commonJS({
  77630. "node_modules/@babel/traverse/node_modules/ansi-styles/index.js"(exports, module2) {
  77631. "use strict";
  77632. var colorConvert = require_color_convert2();
  77633. var wrapAnsi16 = (fn, offset2) => function() {
  77634. const code2 = fn.apply(colorConvert, arguments);
  77635. return `\x1B[${code2 + offset2}m`;
  77636. };
  77637. var wrapAnsi256 = (fn, offset2) => function() {
  77638. const code2 = fn.apply(colorConvert, arguments);
  77639. return `\x1B[${38 + offset2};5;${code2}m`;
  77640. };
  77641. var wrapAnsi16m = (fn, offset2) => function() {
  77642. const rgb = fn.apply(colorConvert, arguments);
  77643. return `\x1B[${38 + offset2};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  77644. };
  77645. function assembleStyles() {
  77646. const codes = /* @__PURE__ */ new Map();
  77647. const styles = {
  77648. modifier: {
  77649. reset: [0, 0],
  77650. bold: [1, 22],
  77651. dim: [2, 22],
  77652. italic: [3, 23],
  77653. underline: [4, 24],
  77654. inverse: [7, 27],
  77655. hidden: [8, 28],
  77656. strikethrough: [9, 29]
  77657. },
  77658. color: {
  77659. black: [30, 39],
  77660. red: [31, 39],
  77661. green: [32, 39],
  77662. yellow: [33, 39],
  77663. blue: [34, 39],
  77664. magenta: [35, 39],
  77665. cyan: [36, 39],
  77666. white: [37, 39],
  77667. gray: [90, 39],
  77668. redBright: [91, 39],
  77669. greenBright: [92, 39],
  77670. yellowBright: [93, 39],
  77671. blueBright: [94, 39],
  77672. magentaBright: [95, 39],
  77673. cyanBright: [96, 39],
  77674. whiteBright: [97, 39]
  77675. },
  77676. bgColor: {
  77677. bgBlack: [40, 49],
  77678. bgRed: [41, 49],
  77679. bgGreen: [42, 49],
  77680. bgYellow: [43, 49],
  77681. bgBlue: [44, 49],
  77682. bgMagenta: [45, 49],
  77683. bgCyan: [46, 49],
  77684. bgWhite: [47, 49],
  77685. bgBlackBright: [100, 49],
  77686. bgRedBright: [101, 49],
  77687. bgGreenBright: [102, 49],
  77688. bgYellowBright: [103, 49],
  77689. bgBlueBright: [104, 49],
  77690. bgMagentaBright: [105, 49],
  77691. bgCyanBright: [106, 49],
  77692. bgWhiteBright: [107, 49]
  77693. }
  77694. };
  77695. styles.color.grey = styles.color.gray;
  77696. for (const groupName of Object.keys(styles)) {
  77697. const group = styles[groupName];
  77698. for (const styleName of Object.keys(group)) {
  77699. const style2 = group[styleName];
  77700. styles[styleName] = {
  77701. open: `\x1B[${style2[0]}m`,
  77702. close: `\x1B[${style2[1]}m`
  77703. };
  77704. group[styleName] = styles[styleName];
  77705. codes.set(style2[0], style2[1]);
  77706. }
  77707. Object.defineProperty(styles, groupName, {
  77708. value: group,
  77709. enumerable: false
  77710. });
  77711. Object.defineProperty(styles, "codes", {
  77712. value: codes,
  77713. enumerable: false
  77714. });
  77715. }
  77716. const ansi2ansi = (n) => n;
  77717. const rgb2rgb = (r, g, b) => [r, g, b];
  77718. styles.color.close = "\x1B[39m";
  77719. styles.bgColor.close = "\x1B[49m";
  77720. styles.color.ansi = {
  77721. ansi: wrapAnsi16(ansi2ansi, 0)
  77722. };
  77723. styles.color.ansi256 = {
  77724. ansi256: wrapAnsi256(ansi2ansi, 0)
  77725. };
  77726. styles.color.ansi16m = {
  77727. rgb: wrapAnsi16m(rgb2rgb, 0)
  77728. };
  77729. styles.bgColor.ansi = {
  77730. ansi: wrapAnsi16(ansi2ansi, 10)
  77731. };
  77732. styles.bgColor.ansi256 = {
  77733. ansi256: wrapAnsi256(ansi2ansi, 10)
  77734. };
  77735. styles.bgColor.ansi16m = {
  77736. rgb: wrapAnsi16m(rgb2rgb, 10)
  77737. };
  77738. for (let key of Object.keys(colorConvert)) {
  77739. if (typeof colorConvert[key] !== "object") {
  77740. continue;
  77741. }
  77742. const suite = colorConvert[key];
  77743. if (key === "ansi16") {
  77744. key = "ansi";
  77745. }
  77746. if ("ansi16" in suite) {
  77747. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  77748. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  77749. }
  77750. if ("ansi256" in suite) {
  77751. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  77752. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  77753. }
  77754. if ("rgb" in suite) {
  77755. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  77756. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  77757. }
  77758. }
  77759. return styles;
  77760. }
  77761. Object.defineProperty(module2, "exports", {
  77762. enumerable: true,
  77763. get: assembleStyles
  77764. });
  77765. }
  77766. });
  77767. // node_modules/@babel/traverse/node_modules/has-flag/index.js
  77768. var require_has_flag3 = __commonJS({
  77769. "node_modules/@babel/traverse/node_modules/has-flag/index.js"(exports, module2) {
  77770. "use strict";
  77771. module2.exports = (flag, argv) => {
  77772. argv = argv || process.argv;
  77773. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  77774. const pos = argv.indexOf(prefix + flag);
  77775. const terminatorPos = argv.indexOf("--");
  77776. return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  77777. };
  77778. }
  77779. });
  77780. // node_modules/@babel/traverse/node_modules/supports-color/index.js
  77781. var require_supports_color3 = __commonJS({
  77782. "node_modules/@babel/traverse/node_modules/supports-color/index.js"(exports, module2) {
  77783. "use strict";
  77784. var os = require("os");
  77785. var hasFlag = require_has_flag3();
  77786. var env = process.env;
  77787. var forceColor;
  77788. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
  77789. forceColor = false;
  77790. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  77791. forceColor = true;
  77792. }
  77793. if ("FORCE_COLOR" in env) {
  77794. forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  77795. }
  77796. function translateLevel(level) {
  77797. if (level === 0) {
  77798. return false;
  77799. }
  77800. return {
  77801. level,
  77802. hasBasic: true,
  77803. has256: level >= 2,
  77804. has16m: level >= 3
  77805. };
  77806. }
  77807. function supportsColor(stream) {
  77808. if (forceColor === false) {
  77809. return 0;
  77810. }
  77811. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  77812. return 3;
  77813. }
  77814. if (hasFlag("color=256")) {
  77815. return 2;
  77816. }
  77817. if (stream && !stream.isTTY && forceColor !== true) {
  77818. return 0;
  77819. }
  77820. const min = forceColor ? 1 : 0;
  77821. if (process.platform === "win32") {
  77822. const osRelease = os.release().split(".");
  77823. if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  77824. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  77825. }
  77826. return 1;
  77827. }
  77828. if ("CI" in env) {
  77829. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  77830. return 1;
  77831. }
  77832. return min;
  77833. }
  77834. if ("TEAMCITY_VERSION" in env) {
  77835. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  77836. }
  77837. if (env.COLORTERM === "truecolor") {
  77838. return 3;
  77839. }
  77840. if ("TERM_PROGRAM" in env) {
  77841. const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  77842. switch (env.TERM_PROGRAM) {
  77843. case "iTerm.app":
  77844. return version2 >= 3 ? 3 : 2;
  77845. case "Apple_Terminal":
  77846. return 2;
  77847. }
  77848. }
  77849. if (/-256(color)?$/i.test(env.TERM)) {
  77850. return 2;
  77851. }
  77852. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  77853. return 1;
  77854. }
  77855. if ("COLORTERM" in env) {
  77856. return 1;
  77857. }
  77858. if (env.TERM === "dumb") {
  77859. return min;
  77860. }
  77861. return min;
  77862. }
  77863. function getSupportLevel(stream) {
  77864. const level = supportsColor(stream);
  77865. return translateLevel(level);
  77866. }
  77867. module2.exports = {
  77868. supportsColor: getSupportLevel,
  77869. stdout: getSupportLevel(process.stdout),
  77870. stderr: getSupportLevel(process.stderr)
  77871. };
  77872. }
  77873. });
  77874. // node_modules/@babel/traverse/node_modules/chalk/templates.js
  77875. var require_templates2 = __commonJS({
  77876. "node_modules/@babel/traverse/node_modules/chalk/templates.js"(exports, module2) {
  77877. "use strict";
  77878. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  77879. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  77880. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  77881. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  77882. var ESCAPES = /* @__PURE__ */ new Map([
  77883. ["n", "\n"],
  77884. ["r", "\r"],
  77885. ["t", " "],
  77886. ["b", "\b"],
  77887. ["f", "\f"],
  77888. ["v", "\v"],
  77889. ["0", "\0"],
  77890. ["\\", "\\"],
  77891. ["e", "\x1B"],
  77892. ["a", "\x07"]
  77893. ]);
  77894. function unescape(c) {
  77895. if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
  77896. return String.fromCharCode(parseInt(c.slice(1), 16));
  77897. }
  77898. return ESCAPES.get(c) || c;
  77899. }
  77900. function parseArguments(name2, args) {
  77901. const results = [];
  77902. const chunks = args.trim().split(/\s*,\s*/g);
  77903. let matches;
  77904. for (const chunk of chunks) {
  77905. if (!isNaN(chunk)) {
  77906. results.push(Number(chunk));
  77907. } else if (matches = chunk.match(STRING_REGEX)) {
  77908. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  77909. } else {
  77910. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
  77911. }
  77912. }
  77913. return results;
  77914. }
  77915. function parseStyle2(style2) {
  77916. STYLE_REGEX.lastIndex = 0;
  77917. const results = [];
  77918. let matches;
  77919. while ((matches = STYLE_REGEX.exec(style2)) !== null) {
  77920. const name2 = matches[1];
  77921. if (matches[2]) {
  77922. const args = parseArguments(name2, matches[2]);
  77923. results.push([name2].concat(args));
  77924. } else {
  77925. results.push([name2]);
  77926. }
  77927. }
  77928. return results;
  77929. }
  77930. function buildStyle(chalk, styles) {
  77931. const enabled = {};
  77932. for (const layer of styles) {
  77933. for (const style2 of layer.styles) {
  77934. enabled[style2[0]] = layer.inverse ? null : style2.slice(1);
  77935. }
  77936. }
  77937. let current2 = chalk;
  77938. for (const styleName of Object.keys(enabled)) {
  77939. if (Array.isArray(enabled[styleName])) {
  77940. if (!(styleName in current2)) {
  77941. throw new Error(`Unknown Chalk style: ${styleName}`);
  77942. }
  77943. if (enabled[styleName].length > 0) {
  77944. current2 = current2[styleName].apply(current2, enabled[styleName]);
  77945. } else {
  77946. current2 = current2[styleName];
  77947. }
  77948. }
  77949. }
  77950. return current2;
  77951. }
  77952. module2.exports = (chalk, tmp) => {
  77953. const styles = [];
  77954. const chunks = [];
  77955. let chunk = [];
  77956. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style2, close, chr) => {
  77957. if (escapeChar) {
  77958. chunk.push(unescape(escapeChar));
  77959. } else if (style2) {
  77960. const str = chunk.join("");
  77961. chunk = [];
  77962. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  77963. styles.push({ inverse, styles: parseStyle2(style2) });
  77964. } else if (close) {
  77965. if (styles.length === 0) {
  77966. throw new Error("Found extraneous } in Chalk template literal");
  77967. }
  77968. chunks.push(buildStyle(chalk, styles)(chunk.join("")));
  77969. chunk = [];
  77970. styles.pop();
  77971. } else {
  77972. chunk.push(chr);
  77973. }
  77974. });
  77975. chunks.push(chunk.join(""));
  77976. if (styles.length > 0) {
  77977. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
  77978. throw new Error(errMsg);
  77979. }
  77980. return chunks.join("");
  77981. };
  77982. }
  77983. });
  77984. // node_modules/@babel/traverse/node_modules/chalk/index.js
  77985. var require_chalk2 = __commonJS({
  77986. "node_modules/@babel/traverse/node_modules/chalk/index.js"(exports, module2) {
  77987. "use strict";
  77988. var escapeStringRegexp = require_escape_string_regexp();
  77989. var ansiStyles = require_ansi_styles2();
  77990. var stdoutColor = require_supports_color3().stdout;
  77991. var template = require_templates2();
  77992. var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
  77993. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  77994. var skipModels = /* @__PURE__ */ new Set(["gray"]);
  77995. var styles = /* @__PURE__ */ Object.create(null);
  77996. function applyOptions(obj, options) {
  77997. options = options || {};
  77998. const scLevel = stdoutColor ? stdoutColor.level : 0;
  77999. obj.level = options.level === void 0 ? scLevel : options.level;
  78000. obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
  78001. }
  78002. function Chalk(options) {
  78003. if (!this || !(this instanceof Chalk) || this.template) {
  78004. const chalk = {};
  78005. applyOptions(chalk, options);
  78006. chalk.template = function() {
  78007. const args = [].slice.call(arguments);
  78008. return chalkTag.apply(null, [chalk.template].concat(args));
  78009. };
  78010. Object.setPrototypeOf(chalk, Chalk.prototype);
  78011. Object.setPrototypeOf(chalk.template, chalk);
  78012. chalk.template.constructor = Chalk;
  78013. return chalk.template;
  78014. }
  78015. applyOptions(this, options);
  78016. }
  78017. if (isSimpleWindowsTerm) {
  78018. ansiStyles.blue.open = "\x1B[94m";
  78019. }
  78020. for (const key of Object.keys(ansiStyles)) {
  78021. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
  78022. styles[key] = {
  78023. get() {
  78024. const codes = ansiStyles[key];
  78025. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  78026. }
  78027. };
  78028. }
  78029. styles.visible = {
  78030. get() {
  78031. return build.call(this, this._styles || [], true, "visible");
  78032. }
  78033. };
  78034. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
  78035. for (const model of Object.keys(ansiStyles.color.ansi)) {
  78036. if (skipModels.has(model)) {
  78037. continue;
  78038. }
  78039. styles[model] = {
  78040. get() {
  78041. const level = this.level;
  78042. return function() {
  78043. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  78044. const codes = {
  78045. open,
  78046. close: ansiStyles.color.close,
  78047. closeRe: ansiStyles.color.closeRe
  78048. };
  78049. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  78050. };
  78051. }
  78052. };
  78053. }
  78054. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
  78055. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  78056. if (skipModels.has(model)) {
  78057. continue;
  78058. }
  78059. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  78060. styles[bgModel] = {
  78061. get() {
  78062. const level = this.level;
  78063. return function() {
  78064. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  78065. const codes = {
  78066. open,
  78067. close: ansiStyles.bgColor.close,
  78068. closeRe: ansiStyles.bgColor.closeRe
  78069. };
  78070. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  78071. };
  78072. }
  78073. };
  78074. }
  78075. var proto = Object.defineProperties(() => {
  78076. }, styles);
  78077. function build(_styles, _empty, key) {
  78078. const builder = function() {
  78079. return applyStyle.apply(builder, arguments);
  78080. };
  78081. builder._styles = _styles;
  78082. builder._empty = _empty;
  78083. const self2 = this;
  78084. Object.defineProperty(builder, "level", {
  78085. enumerable: true,
  78086. get() {
  78087. return self2.level;
  78088. },
  78089. set(level) {
  78090. self2.level = level;
  78091. }
  78092. });
  78093. Object.defineProperty(builder, "enabled", {
  78094. enumerable: true,
  78095. get() {
  78096. return self2.enabled;
  78097. },
  78098. set(enabled) {
  78099. self2.enabled = enabled;
  78100. }
  78101. });
  78102. builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
  78103. builder.__proto__ = proto;
  78104. return builder;
  78105. }
  78106. function applyStyle() {
  78107. const args = arguments;
  78108. const argsLen = args.length;
  78109. let str = String(arguments[0]);
  78110. if (argsLen === 0) {
  78111. return "";
  78112. }
  78113. if (argsLen > 1) {
  78114. for (let a = 1; a < argsLen; a++) {
  78115. str += " " + args[a];
  78116. }
  78117. }
  78118. if (!this.enabled || this.level <= 0 || !str) {
  78119. return this._empty ? "" : str;
  78120. }
  78121. const originalDim = ansiStyles.dim.open;
  78122. if (isSimpleWindowsTerm && this.hasGrey) {
  78123. ansiStyles.dim.open = "";
  78124. }
  78125. for (const code2 of this._styles.slice().reverse()) {
  78126. str = code2.open + str.replace(code2.closeRe, code2.open) + code2.close;
  78127. str = str.replace(/\r?\n/g, `${code2.close}$&${code2.open}`);
  78128. }
  78129. ansiStyles.dim.open = originalDim;
  78130. return str;
  78131. }
  78132. function chalkTag(chalk, strings) {
  78133. if (!Array.isArray(strings)) {
  78134. return [].slice.call(arguments, 1).join(" ");
  78135. }
  78136. const args = [].slice.call(arguments, 2);
  78137. const parts = [strings.raw[0]];
  78138. for (let i = 1; i < strings.length; i++) {
  78139. parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
  78140. parts.push(String(strings.raw[i]));
  78141. }
  78142. return template(chalk, parts.join(""));
  78143. }
  78144. Object.defineProperties(Chalk.prototype, styles);
  78145. module2.exports = Chalk();
  78146. module2.exports.supportsColor = stdoutColor;
  78147. module2.exports.default = module2.exports;
  78148. }
  78149. });
  78150. // node_modules/@babel/traverse/node_modules/@babel/highlight/lib/index.js
  78151. var require_lib20 = __commonJS({
  78152. "node_modules/@babel/traverse/node_modules/@babel/highlight/lib/index.js"(exports) {
  78153. "use strict";
  78154. Object.defineProperty(exports, "__esModule", {
  78155. value: true
  78156. });
  78157. exports.shouldHighlight = shouldHighlight;
  78158. exports.getChalk = getChalk;
  78159. exports.default = highlight;
  78160. var _jsTokens = require_js_tokens();
  78161. var _helperValidatorIdentifier = require_lib19();
  78162. var _chalk = require_chalk2();
  78163. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  78164. function getDefs(chalk) {
  78165. return {
  78166. keyword: chalk.cyan,
  78167. capitalized: chalk.yellow,
  78168. jsxIdentifier: chalk.yellow,
  78169. punctuator: chalk.yellow,
  78170. number: chalk.magenta,
  78171. string: chalk.green,
  78172. regex: chalk.magenta,
  78173. comment: chalk.grey,
  78174. invalid: chalk.white.bgRed.bold
  78175. };
  78176. }
  78177. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  78178. var BRACKET = /^[()[\]{}]$/;
  78179. var tokenize;
  78180. {
  78181. const JSX_TAG = /^[a-z][\w-]*$/i;
  78182. const getTokenType = function(token, offset2, text5) {
  78183. if (token.type === "name") {
  78184. if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
  78185. return "keyword";
  78186. }
  78187. if (JSX_TAG.test(token.value) && (text5[offset2 - 1] === "<" || text5.substr(offset2 - 2, 2) == "</")) {
  78188. return "jsxIdentifier";
  78189. }
  78190. if (token.value[0] !== token.value[0].toLowerCase()) {
  78191. return "capitalized";
  78192. }
  78193. }
  78194. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  78195. return "bracket";
  78196. }
  78197. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  78198. return "punctuator";
  78199. }
  78200. return token.type;
  78201. };
  78202. tokenize = function* (text5) {
  78203. let match;
  78204. while (match = _jsTokens.default.exec(text5)) {
  78205. const token = _jsTokens.matchToToken(match);
  78206. yield {
  78207. type: getTokenType(token, match.index, text5),
  78208. value: token.value
  78209. };
  78210. }
  78211. };
  78212. }
  78213. function highlightTokens(defs, text5) {
  78214. let highlighted = "";
  78215. for (const {
  78216. type,
  78217. value
  78218. } of tokenize(text5)) {
  78219. const colorize = defs[type];
  78220. if (colorize) {
  78221. highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
  78222. } else {
  78223. highlighted += value;
  78224. }
  78225. }
  78226. return highlighted;
  78227. }
  78228. function shouldHighlight(options) {
  78229. return !!_chalk.supportsColor || options.forceColor;
  78230. }
  78231. function getChalk(options) {
  78232. return options.forceColor ? new _chalk.constructor({
  78233. enabled: true,
  78234. level: 1
  78235. }) : _chalk;
  78236. }
  78237. function highlight(code2, options = {}) {
  78238. if (shouldHighlight(options)) {
  78239. const chalk = getChalk(options);
  78240. const defs = getDefs(chalk);
  78241. return highlightTokens(defs, code2);
  78242. } else {
  78243. return code2;
  78244. }
  78245. }
  78246. }
  78247. });
  78248. // node_modules/@babel/traverse/node_modules/@babel/code-frame/lib/index.js
  78249. var require_lib21 = __commonJS({
  78250. "node_modules/@babel/traverse/node_modules/@babel/code-frame/lib/index.js"(exports) {
  78251. "use strict";
  78252. Object.defineProperty(exports, "__esModule", {
  78253. value: true
  78254. });
  78255. exports.codeFrameColumns = codeFrameColumns;
  78256. exports.default = _default;
  78257. var _highlight = require_lib20();
  78258. var deprecationWarningShown = false;
  78259. function getDefs(chalk) {
  78260. return {
  78261. gutter: chalk.grey,
  78262. marker: chalk.red.bold,
  78263. message: chalk.red.bold
  78264. };
  78265. }
  78266. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  78267. function getMarkerLines(loc, source, opts) {
  78268. const startLoc = Object.assign({
  78269. column: 0,
  78270. line: -1
  78271. }, loc.start);
  78272. const endLoc = Object.assign({}, startLoc, loc.end);
  78273. const {
  78274. linesAbove = 2,
  78275. linesBelow = 3
  78276. } = opts || {};
  78277. const startLine = startLoc.line;
  78278. const startColumn = startLoc.column;
  78279. const endLine = endLoc.line;
  78280. const endColumn = endLoc.column;
  78281. let start3 = Math.max(startLine - (linesAbove + 1), 0);
  78282. let end = Math.min(source.length, endLine + linesBelow);
  78283. if (startLine === -1) {
  78284. start3 = 0;
  78285. }
  78286. if (endLine === -1) {
  78287. end = source.length;
  78288. }
  78289. const lineDiff = endLine - startLine;
  78290. const markerLines = {};
  78291. if (lineDiff) {
  78292. for (let i = 0; i <= lineDiff; i++) {
  78293. const lineNumber = i + startLine;
  78294. if (!startColumn) {
  78295. markerLines[lineNumber] = true;
  78296. } else if (i === 0) {
  78297. const sourceLength = source[lineNumber - 1].length;
  78298. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  78299. } else if (i === lineDiff) {
  78300. markerLines[lineNumber] = [0, endColumn];
  78301. } else {
  78302. const sourceLength = source[lineNumber - i].length;
  78303. markerLines[lineNumber] = [0, sourceLength];
  78304. }
  78305. }
  78306. } else {
  78307. if (startColumn === endColumn) {
  78308. if (startColumn) {
  78309. markerLines[startLine] = [startColumn, 0];
  78310. } else {
  78311. markerLines[startLine] = true;
  78312. }
  78313. } else {
  78314. markerLines[startLine] = [startColumn, endColumn - startColumn];
  78315. }
  78316. }
  78317. return {
  78318. start: start3,
  78319. end,
  78320. markerLines
  78321. };
  78322. }
  78323. function codeFrameColumns(rawLines, loc, opts = {}) {
  78324. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  78325. const chalk = (0, _highlight.getChalk)(opts);
  78326. const defs = getDefs(chalk);
  78327. const maybeHighlight = (chalkFn, string3) => {
  78328. return highlighted ? chalkFn(string3) : string3;
  78329. };
  78330. const lines = rawLines.split(NEWLINE);
  78331. const {
  78332. start: start3,
  78333. end,
  78334. markerLines
  78335. } = getMarkerLines(loc, lines, opts);
  78336. const hasColumns = loc.start && typeof loc.start.column === "number";
  78337. const numberMaxWidth = String(end).length;
  78338. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  78339. let frame = highlightedLines.split(NEWLINE).slice(start3, end).map((line, index2) => {
  78340. const number2 = start3 + 1 + index2;
  78341. const paddedNumber = ` ${number2}`.slice(-numberMaxWidth);
  78342. const gutter = ` ${paddedNumber} |`;
  78343. const hasMarker = markerLines[number2];
  78344. const lastMarkerLine = !markerLines[number2 + 1];
  78345. if (hasMarker) {
  78346. let markerLine = "";
  78347. if (Array.isArray(hasMarker)) {
  78348. const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  78349. const numberOfMarkers = hasMarker[1] || 1;
  78350. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  78351. if (lastMarkerLine && opts.message) {
  78352. markerLine += " " + maybeHighlight(defs.message, opts.message);
  78353. }
  78354. }
  78355. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
  78356. } else {
  78357. return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
  78358. }
  78359. }).join("\n");
  78360. if (opts.message && !hasColumns) {
  78361. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  78362. ${frame}`;
  78363. }
  78364. if (highlighted) {
  78365. return chalk.reset(frame);
  78366. } else {
  78367. return frame;
  78368. }
  78369. }
  78370. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  78371. if (!deprecationWarningShown) {
  78372. deprecationWarningShown = true;
  78373. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  78374. if (process.emitWarning) {
  78375. process.emitWarning(message, "DeprecationWarning");
  78376. } else {
  78377. const deprecationError = new Error(message);
  78378. deprecationError.name = "DeprecationWarning";
  78379. console.warn(new Error(message));
  78380. }
  78381. }
  78382. colNumber = Math.max(colNumber, 0);
  78383. const location = {
  78384. start: {
  78385. column: colNumber,
  78386. line: lineNumber
  78387. }
  78388. };
  78389. return codeFrameColumns(rawLines, location, opts);
  78390. }
  78391. }
  78392. });
  78393. // node_modules/@babel/traverse/node_modules/@babel/parser/lib/index.js
  78394. var require_lib22 = __commonJS({
  78395. "node_modules/@babel/traverse/node_modules/@babel/parser/lib/index.js"(exports) {
  78396. "use strict";
  78397. Object.defineProperty(exports, "__esModule", { value: true });
  78398. var beforeExpr2 = true;
  78399. var startsExpr2 = true;
  78400. var isLoop = true;
  78401. var isAssign = true;
  78402. var prefix = true;
  78403. var postfix = true;
  78404. var TokenType3 = class {
  78405. constructor(label, conf = {}) {
  78406. this.label = void 0;
  78407. this.keyword = void 0;
  78408. this.beforeExpr = void 0;
  78409. this.startsExpr = void 0;
  78410. this.rightAssociative = void 0;
  78411. this.isLoop = void 0;
  78412. this.isAssign = void 0;
  78413. this.prefix = void 0;
  78414. this.postfix = void 0;
  78415. this.binop = void 0;
  78416. this.updateContext = void 0;
  78417. this.label = label;
  78418. this.keyword = conf.keyword;
  78419. this.beforeExpr = !!conf.beforeExpr;
  78420. this.startsExpr = !!conf.startsExpr;
  78421. this.rightAssociative = !!conf.rightAssociative;
  78422. this.isLoop = !!conf.isLoop;
  78423. this.isAssign = !!conf.isAssign;
  78424. this.prefix = !!conf.prefix;
  78425. this.postfix = !!conf.postfix;
  78426. this.binop = conf.binop != null ? conf.binop : null;
  78427. this.updateContext = null;
  78428. }
  78429. };
  78430. var keywords$12 = /* @__PURE__ */ new Map();
  78431. function createKeyword(name2, options = {}) {
  78432. options.keyword = name2;
  78433. const token = new TokenType3(name2, options);
  78434. keywords$12.set(name2, token);
  78435. return token;
  78436. }
  78437. function createBinop(name2, binop2) {
  78438. return new TokenType3(name2, {
  78439. beforeExpr: beforeExpr2,
  78440. binop: binop2
  78441. });
  78442. }
  78443. var types$12 = {
  78444. num: new TokenType3("num", {
  78445. startsExpr: startsExpr2
  78446. }),
  78447. bigint: new TokenType3("bigint", {
  78448. startsExpr: startsExpr2
  78449. }),
  78450. decimal: new TokenType3("decimal", {
  78451. startsExpr: startsExpr2
  78452. }),
  78453. regexp: new TokenType3("regexp", {
  78454. startsExpr: startsExpr2
  78455. }),
  78456. string: new TokenType3("string", {
  78457. startsExpr: startsExpr2
  78458. }),
  78459. name: new TokenType3("name", {
  78460. startsExpr: startsExpr2
  78461. }),
  78462. privateName: new TokenType3("#name", {
  78463. startsExpr: startsExpr2
  78464. }),
  78465. eof: new TokenType3("eof"),
  78466. bracketL: new TokenType3("[", {
  78467. beforeExpr: beforeExpr2,
  78468. startsExpr: startsExpr2
  78469. }),
  78470. bracketHashL: new TokenType3("#[", {
  78471. beforeExpr: beforeExpr2,
  78472. startsExpr: startsExpr2
  78473. }),
  78474. bracketBarL: new TokenType3("[|", {
  78475. beforeExpr: beforeExpr2,
  78476. startsExpr: startsExpr2
  78477. }),
  78478. bracketR: new TokenType3("]"),
  78479. bracketBarR: new TokenType3("|]"),
  78480. braceL: new TokenType3("{", {
  78481. beforeExpr: beforeExpr2,
  78482. startsExpr: startsExpr2
  78483. }),
  78484. braceBarL: new TokenType3("{|", {
  78485. beforeExpr: beforeExpr2,
  78486. startsExpr: startsExpr2
  78487. }),
  78488. braceHashL: new TokenType3("#{", {
  78489. beforeExpr: beforeExpr2,
  78490. startsExpr: startsExpr2
  78491. }),
  78492. braceR: new TokenType3("}", {
  78493. beforeExpr: beforeExpr2
  78494. }),
  78495. braceBarR: new TokenType3("|}"),
  78496. parenL: new TokenType3("(", {
  78497. beforeExpr: beforeExpr2,
  78498. startsExpr: startsExpr2
  78499. }),
  78500. parenR: new TokenType3(")"),
  78501. comma: new TokenType3(",", {
  78502. beforeExpr: beforeExpr2
  78503. }),
  78504. semi: new TokenType3(";", {
  78505. beforeExpr: beforeExpr2
  78506. }),
  78507. colon: new TokenType3(":", {
  78508. beforeExpr: beforeExpr2
  78509. }),
  78510. doubleColon: new TokenType3("::", {
  78511. beforeExpr: beforeExpr2
  78512. }),
  78513. dot: new TokenType3("."),
  78514. question: new TokenType3("?", {
  78515. beforeExpr: beforeExpr2
  78516. }),
  78517. questionDot: new TokenType3("?."),
  78518. arrow: new TokenType3("=>", {
  78519. beforeExpr: beforeExpr2
  78520. }),
  78521. template: new TokenType3("template"),
  78522. ellipsis: new TokenType3("...", {
  78523. beforeExpr: beforeExpr2
  78524. }),
  78525. backQuote: new TokenType3("`", {
  78526. startsExpr: startsExpr2
  78527. }),
  78528. dollarBraceL: new TokenType3("${", {
  78529. beforeExpr: beforeExpr2,
  78530. startsExpr: startsExpr2
  78531. }),
  78532. at: new TokenType3("@"),
  78533. hash: new TokenType3("#", {
  78534. startsExpr: startsExpr2
  78535. }),
  78536. interpreterDirective: new TokenType3("#!..."),
  78537. eq: new TokenType3("=", {
  78538. beforeExpr: beforeExpr2,
  78539. isAssign
  78540. }),
  78541. assign: new TokenType3("_=", {
  78542. beforeExpr: beforeExpr2,
  78543. isAssign
  78544. }),
  78545. slashAssign: new TokenType3("_=", {
  78546. beforeExpr: beforeExpr2,
  78547. isAssign
  78548. }),
  78549. incDec: new TokenType3("++/--", {
  78550. prefix,
  78551. postfix,
  78552. startsExpr: startsExpr2
  78553. }),
  78554. bang: new TokenType3("!", {
  78555. beforeExpr: beforeExpr2,
  78556. prefix,
  78557. startsExpr: startsExpr2
  78558. }),
  78559. tilde: new TokenType3("~", {
  78560. beforeExpr: beforeExpr2,
  78561. prefix,
  78562. startsExpr: startsExpr2
  78563. }),
  78564. pipeline: createBinop("|>", 0),
  78565. nullishCoalescing: createBinop("??", 1),
  78566. logicalOR: createBinop("||", 1),
  78567. logicalAND: createBinop("&&", 2),
  78568. bitwiseOR: createBinop("|", 3),
  78569. bitwiseXOR: createBinop("^", 4),
  78570. bitwiseAND: createBinop("&", 5),
  78571. equality: createBinop("==/!=/===/!==", 6),
  78572. relational: createBinop("</>/<=/>=", 7),
  78573. bitShift: createBinop("<</>>/>>>", 8),
  78574. plusMin: new TokenType3("+/-", {
  78575. beforeExpr: beforeExpr2,
  78576. binop: 9,
  78577. prefix,
  78578. startsExpr: startsExpr2
  78579. }),
  78580. modulo: new TokenType3("%", {
  78581. beforeExpr: beforeExpr2,
  78582. binop: 10,
  78583. startsExpr: startsExpr2
  78584. }),
  78585. star: new TokenType3("*", {
  78586. binop: 10
  78587. }),
  78588. slash: createBinop("/", 10),
  78589. exponent: new TokenType3("**", {
  78590. beforeExpr: beforeExpr2,
  78591. binop: 11,
  78592. rightAssociative: true
  78593. }),
  78594. _break: createKeyword("break"),
  78595. _case: createKeyword("case", {
  78596. beforeExpr: beforeExpr2
  78597. }),
  78598. _catch: createKeyword("catch"),
  78599. _continue: createKeyword("continue"),
  78600. _debugger: createKeyword("debugger"),
  78601. _default: createKeyword("default", {
  78602. beforeExpr: beforeExpr2
  78603. }),
  78604. _do: createKeyword("do", {
  78605. isLoop,
  78606. beforeExpr: beforeExpr2
  78607. }),
  78608. _else: createKeyword("else", {
  78609. beforeExpr: beforeExpr2
  78610. }),
  78611. _finally: createKeyword("finally"),
  78612. _for: createKeyword("for", {
  78613. isLoop
  78614. }),
  78615. _function: createKeyword("function", {
  78616. startsExpr: startsExpr2
  78617. }),
  78618. _if: createKeyword("if"),
  78619. _return: createKeyword("return", {
  78620. beforeExpr: beforeExpr2
  78621. }),
  78622. _switch: createKeyword("switch"),
  78623. _throw: createKeyword("throw", {
  78624. beforeExpr: beforeExpr2,
  78625. prefix,
  78626. startsExpr: startsExpr2
  78627. }),
  78628. _try: createKeyword("try"),
  78629. _var: createKeyword("var"),
  78630. _const: createKeyword("const"),
  78631. _while: createKeyword("while", {
  78632. isLoop
  78633. }),
  78634. _with: createKeyword("with"),
  78635. _new: createKeyword("new", {
  78636. beforeExpr: beforeExpr2,
  78637. startsExpr: startsExpr2
  78638. }),
  78639. _this: createKeyword("this", {
  78640. startsExpr: startsExpr2
  78641. }),
  78642. _super: createKeyword("super", {
  78643. startsExpr: startsExpr2
  78644. }),
  78645. _class: createKeyword("class", {
  78646. startsExpr: startsExpr2
  78647. }),
  78648. _extends: createKeyword("extends", {
  78649. beforeExpr: beforeExpr2
  78650. }),
  78651. _export: createKeyword("export"),
  78652. _import: createKeyword("import", {
  78653. startsExpr: startsExpr2
  78654. }),
  78655. _null: createKeyword("null", {
  78656. startsExpr: startsExpr2
  78657. }),
  78658. _true: createKeyword("true", {
  78659. startsExpr: startsExpr2
  78660. }),
  78661. _false: createKeyword("false", {
  78662. startsExpr: startsExpr2
  78663. }),
  78664. _in: createKeyword("in", {
  78665. beforeExpr: beforeExpr2,
  78666. binop: 7
  78667. }),
  78668. _instanceof: createKeyword("instanceof", {
  78669. beforeExpr: beforeExpr2,
  78670. binop: 7
  78671. }),
  78672. _typeof: createKeyword("typeof", {
  78673. beforeExpr: beforeExpr2,
  78674. prefix,
  78675. startsExpr: startsExpr2
  78676. }),
  78677. _void: createKeyword("void", {
  78678. beforeExpr: beforeExpr2,
  78679. prefix,
  78680. startsExpr: startsExpr2
  78681. }),
  78682. _delete: createKeyword("delete", {
  78683. beforeExpr: beforeExpr2,
  78684. prefix,
  78685. startsExpr: startsExpr2
  78686. })
  78687. };
  78688. var lineBreak2 = /\r\n?|[\n\u2028\u2029]/;
  78689. var lineBreakG2 = new RegExp(lineBreak2.source, "g");
  78690. function isNewLine2(code2) {
  78691. switch (code2) {
  78692. case 10:
  78693. case 13:
  78694. case 8232:
  78695. case 8233:
  78696. return true;
  78697. default:
  78698. return false;
  78699. }
  78700. }
  78701. var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  78702. function isWhitespace(code2) {
  78703. switch (code2) {
  78704. case 9:
  78705. case 11:
  78706. case 12:
  78707. case 32:
  78708. case 160:
  78709. case 5760:
  78710. case 8192:
  78711. case 8193:
  78712. case 8194:
  78713. case 8195:
  78714. case 8196:
  78715. case 8197:
  78716. case 8198:
  78717. case 8199:
  78718. case 8200:
  78719. case 8201:
  78720. case 8202:
  78721. case 8239:
  78722. case 8287:
  78723. case 12288:
  78724. case 65279:
  78725. return true;
  78726. default:
  78727. return false;
  78728. }
  78729. }
  78730. var Position3 = class {
  78731. constructor(line, col) {
  78732. this.line = void 0;
  78733. this.column = void 0;
  78734. this.line = line;
  78735. this.column = col;
  78736. }
  78737. };
  78738. var SourceLocation3 = class {
  78739. constructor(start3, end) {
  78740. this.start = void 0;
  78741. this.end = void 0;
  78742. this.filename = void 0;
  78743. this.identifierName = void 0;
  78744. this.start = start3;
  78745. this.end = end;
  78746. }
  78747. };
  78748. function getLineInfo2(input, offset2) {
  78749. let line = 1;
  78750. let lineStart = 0;
  78751. let match;
  78752. lineBreakG2.lastIndex = 0;
  78753. while ((match = lineBreakG2.exec(input)) && match.index < offset2) {
  78754. line++;
  78755. lineStart = lineBreakG2.lastIndex;
  78756. }
  78757. return new Position3(line, offset2 - lineStart);
  78758. }
  78759. var BaseParser = class {
  78760. constructor() {
  78761. this.sawUnambiguousESM = false;
  78762. this.ambiguousScriptDifferentAst = false;
  78763. }
  78764. hasPlugin(name2) {
  78765. return this.plugins.has(name2);
  78766. }
  78767. getPluginOption(plugin2, name2) {
  78768. if (this.hasPlugin(plugin2))
  78769. return this.plugins.get(plugin2)[name2];
  78770. }
  78771. };
  78772. function setTrailingComments(node, comments) {
  78773. if (node.trailingComments === void 0) {
  78774. node.trailingComments = comments;
  78775. } else {
  78776. node.trailingComments.unshift(...comments);
  78777. }
  78778. }
  78779. function setInnerComments(node, comments) {
  78780. if (node.innerComments === void 0) {
  78781. node.innerComments = comments;
  78782. } else if (comments !== void 0) {
  78783. node.innerComments.unshift(...comments);
  78784. }
  78785. }
  78786. function adjustInnerComments(node, elements, commentWS) {
  78787. let lastElement = null;
  78788. let i = elements.length;
  78789. while (lastElement === null && i > 0) {
  78790. lastElement = elements[--i];
  78791. }
  78792. if (lastElement === null || lastElement.start > commentWS.start) {
  78793. setInnerComments(node, commentWS.comments);
  78794. } else {
  78795. setTrailingComments(lastElement, commentWS.comments);
  78796. }
  78797. }
  78798. var CommentsParser = class extends BaseParser {
  78799. addComment(comment2) {
  78800. if (this.filename)
  78801. comment2.loc.filename = this.filename;
  78802. this.state.comments.push(comment2);
  78803. }
  78804. processComment(node) {
  78805. const {
  78806. commentStack
  78807. } = this.state;
  78808. const commentStackLength = commentStack.length;
  78809. if (commentStackLength === 0)
  78810. return;
  78811. let i = commentStackLength - 1;
  78812. const lastCommentWS = commentStack[i];
  78813. if (lastCommentWS.start === node.end) {
  78814. lastCommentWS.leadingNode = node;
  78815. i--;
  78816. }
  78817. const {
  78818. start: nodeStart
  78819. } = node;
  78820. for (; i >= 0; i--) {
  78821. const commentWS = commentStack[i];
  78822. const commentEnd = commentWS.end;
  78823. if (commentEnd > nodeStart) {
  78824. commentWS.containingNode = node;
  78825. this.finalizeComment(commentWS);
  78826. commentStack.splice(i, 1);
  78827. } else {
  78828. if (commentEnd === nodeStart) {
  78829. commentWS.trailingNode = node;
  78830. }
  78831. break;
  78832. }
  78833. }
  78834. }
  78835. finalizeComment(commentWS) {
  78836. const {
  78837. comments
  78838. } = commentWS;
  78839. if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {
  78840. if (commentWS.leadingNode !== null) {
  78841. setTrailingComments(commentWS.leadingNode, comments);
  78842. }
  78843. if (commentWS.trailingNode !== null) {
  78844. commentWS.trailingNode.leadingComments = comments;
  78845. }
  78846. } else {
  78847. const {
  78848. containingNode: node,
  78849. start: commentStart
  78850. } = commentWS;
  78851. if (this.input.charCodeAt(commentStart - 1) === 44) {
  78852. switch (node.type) {
  78853. case "ObjectExpression":
  78854. case "ObjectPattern":
  78855. case "RecordExpression":
  78856. adjustInnerComments(node, node.properties, commentWS);
  78857. break;
  78858. case "CallExpression":
  78859. case "OptionalCallExpression":
  78860. adjustInnerComments(node, node.arguments, commentWS);
  78861. break;
  78862. case "FunctionDeclaration":
  78863. case "FunctionExpression":
  78864. case "ArrowFunctionExpression":
  78865. case "ObjectMethod":
  78866. case "ClassMethod":
  78867. case "ClassPrivateMethod":
  78868. adjustInnerComments(node, node.params, commentWS);
  78869. break;
  78870. case "ArrayExpression":
  78871. case "ArrayPattern":
  78872. case "TupleExpression":
  78873. adjustInnerComments(node, node.elements, commentWS);
  78874. break;
  78875. case "ExportNamedDeclaration":
  78876. case "ImportDeclaration":
  78877. adjustInnerComments(node, node.specifiers, commentWS);
  78878. break;
  78879. default: {
  78880. setInnerComments(node, comments);
  78881. }
  78882. }
  78883. } else {
  78884. setInnerComments(node, comments);
  78885. }
  78886. }
  78887. }
  78888. finalizeRemainingComments() {
  78889. const {
  78890. commentStack
  78891. } = this.state;
  78892. for (let i = commentStack.length - 1; i >= 0; i--) {
  78893. this.finalizeComment(commentStack[i]);
  78894. }
  78895. this.state.commentStack = [];
  78896. }
  78897. resetPreviousNodeTrailingComments(node) {
  78898. const {
  78899. commentStack
  78900. } = this.state;
  78901. const {
  78902. length
  78903. } = commentStack;
  78904. if (length === 0)
  78905. return;
  78906. const commentWS = commentStack[length - 1];
  78907. if (commentWS.leadingNode === node) {
  78908. commentWS.leadingNode = null;
  78909. }
  78910. }
  78911. };
  78912. var ErrorCodes = Object.freeze({
  78913. SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
  78914. SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  78915. });
  78916. var ErrorMessages = makeErrorTemplates({
  78917. AccessorIsGenerator: "A %0ter cannot be a generator.",
  78918. ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
  78919. AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
  78920. AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
  78921. AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
  78922. AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
  78923. AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
  78924. AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
  78925. BadGetterArity: "A 'get' accesor must not have any formal parameters.",
  78926. BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
  78927. BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
  78928. ConstructorClassField: "Classes may not have a field named 'constructor'.",
  78929. ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
  78930. ConstructorIsAccessor: "Class constructor may not be an accessor.",
  78931. ConstructorIsAsync: "Constructor can't be an async function.",
  78932. ConstructorIsGenerator: "Constructor can't be a generator.",
  78933. DeclarationMissingInitializer: "'%0' require an initialization value.",
  78934. DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
  78935. DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
  78936. DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
  78937. DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
  78938. DecoratorStaticBlock: "Decorators can't be used with a static block.",
  78939. DeletePrivateField: "Deleting a private field is not allowed.",
  78940. DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
  78941. DuplicateConstructor: "Duplicate constructor in the same class.",
  78942. DuplicateDefaultExport: "Only one default export allowed per module.",
  78943. DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
  78944. DuplicateProto: "Redefinition of __proto__ property.",
  78945. DuplicateRegExpFlags: "Duplicate regular expression flag.",
  78946. ElementAfterRest: "Rest element must be last element.",
  78947. EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
  78948. ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
  78949. ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
  78950. ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.",
  78951. ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
  78952. ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
  78953. GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
  78954. IllegalBreakContinue: "Unsyntactic %0.",
  78955. IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
  78956. IllegalReturn: "'return' outside of function.",
  78957. ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
  78958. ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
  78959. ImportCallArity: "`import()` requires exactly %0.",
  78960. ImportCallNotNewExpression: "Cannot use new with import(...).",
  78961. ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
  78962. InvalidBigIntLiteral: "Invalid BigIntLiteral.",
  78963. InvalidCodePoint: "Code point out of bounds.",
  78964. InvalidDecimal: "Invalid decimal.",
  78965. InvalidDigit: "Expected number in radix %0.",
  78966. InvalidEscapeSequence: "Bad character escape sequence.",
  78967. InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
  78968. InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
  78969. InvalidIdentifier: "Invalid identifier %0.",
  78970. InvalidLhs: "Invalid left-hand side in %0.",
  78971. InvalidLhsBinding: "Binding invalid left-hand side in %0.",
  78972. InvalidNumber: "Invalid number.",
  78973. InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
  78974. InvalidOrUnexpectedToken: "Unexpected character '%0'.",
  78975. InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
  78976. InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
  78977. InvalidPropertyBindingPattern: "Binding member expression.",
  78978. InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
  78979. InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
  78980. LabelRedeclaration: "Label '%0' is already declared.",
  78981. LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
  78982. LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
  78983. MalformedRegExpFlags: "Invalid regular expression flag.",
  78984. MissingClassName: "A class name is required.",
  78985. MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
  78986. MissingSemicolon: "Missing semicolon.",
  78987. MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
  78988. MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
  78989. ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
  78990. ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
  78991. ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.',
  78992. ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.",
  78993. ModuleExportUndefined: "Export '%0' is not defined.",
  78994. MultipleDefaultsInSwitch: "Multiple default clauses.",
  78995. NewlineAfterThrow: "Illegal newline after throw.",
  78996. NoCatchOrFinally: "Missing catch or finally clause.",
  78997. NumberIdentifier: "Identifier directly after number.",
  78998. NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
  78999. ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
  79000. OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
  79001. OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
  79002. OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
  79003. ParamDupe: "Argument name clash.",
  79004. PatternHasAccessor: "Object pattern can't contain getter or setter.",
  79005. PatternHasMethod: "Object pattern can't contain methods.",
  79006. PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
  79007. PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
  79008. PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
  79009. PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
  79010. PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
  79011. PrimaryTopicRequiresSmartPipeline: "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
  79012. PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
  79013. PrivateNameRedeclaration: "Duplicate private name #%0.",
  79014. RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  79015. RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  79016. RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  79017. RecordNoProto: "'__proto__' is not allowed in Record expressions.",
  79018. RestTrailingComma: "Unexpected trailing comma after rest element.",
  79019. SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
  79020. StaticPrototype: "Classes may not have static property named prototype.",
  79021. StrictDelete: "Deleting local variable in strict mode.",
  79022. StrictEvalArguments: "Assigning to '%0' in strict mode.",
  79023. StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
  79024. StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
  79025. StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
  79026. StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
  79027. StrictWith: "'with' in strict mode.",
  79028. SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
  79029. SuperPrivateField: "Private fields can't be accessed on super.",
  79030. TrailingDecorator: "Decorators must be attached to a class element.",
  79031. TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  79032. TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  79033. TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  79034. UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
  79035. UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
  79036. UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
  79037. UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
  79038. UnexpectedKeyword: "Unexpected keyword '%0'.",
  79039. UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
  79040. UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
  79041. UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
  79042. UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
  79043. UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
  79044. UnexpectedReservedWord: "Unexpected reserved word '%0'.",
  79045. UnexpectedSuper: "'super' is only allowed in object methods and classes.",
  79046. UnexpectedToken: "Unexpected token '%0'.",
  79047. UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
  79048. UnsupportedBind: "Binding should be performed on object property.",
  79049. UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
  79050. UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
  79051. UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
  79052. UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
  79053. UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
  79054. UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
  79055. UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
  79056. UnterminatedComment: "Unterminated comment.",
  79057. UnterminatedRegExp: "Unterminated regular expression.",
  79058. UnterminatedString: "Unterminated string constant.",
  79059. UnterminatedTemplate: "Unterminated template.",
  79060. VarRedeclaration: "Identifier '%0' has already been declared.",
  79061. YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
  79062. YieldInParameter: "Yield expression is not allowed in formal parameters.",
  79063. ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
  79064. }, ErrorCodes.SyntaxError);
  79065. var SourceTypeModuleErrorMessages = makeErrorTemplates({
  79066. ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`,
  79067. ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'`
  79068. }, ErrorCodes.SourceTypeModuleError);
  79069. function makeErrorTemplates(messages2, code2) {
  79070. const templates = {};
  79071. Object.keys(messages2).forEach((reasonCode) => {
  79072. templates[reasonCode] = Object.freeze({
  79073. code: code2,
  79074. reasonCode,
  79075. template: messages2[reasonCode]
  79076. });
  79077. });
  79078. return Object.freeze(templates);
  79079. }
  79080. var ParserError = class extends CommentsParser {
  79081. getLocationForPosition(pos) {
  79082. let loc;
  79083. if (pos === this.state.start)
  79084. loc = this.state.startLoc;
  79085. else if (pos === this.state.lastTokStart)
  79086. loc = this.state.lastTokStartLoc;
  79087. else if (pos === this.state.end)
  79088. loc = this.state.endLoc;
  79089. else if (pos === this.state.lastTokEnd)
  79090. loc = this.state.lastTokEndLoc;
  79091. else
  79092. loc = getLineInfo2(this.input, pos);
  79093. return loc;
  79094. }
  79095. raise(pos, {
  79096. code: code2,
  79097. reasonCode,
  79098. template
  79099. }, ...params) {
  79100. return this.raiseWithData(pos, {
  79101. code: code2,
  79102. reasonCode
  79103. }, template, ...params);
  79104. }
  79105. raiseOverwrite(pos, {
  79106. code: code2,
  79107. template
  79108. }, ...params) {
  79109. const loc = this.getLocationForPosition(pos);
  79110. const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  79111. if (this.options.errorRecovery) {
  79112. const errors = this.state.errors;
  79113. for (let i = errors.length - 1; i >= 0; i--) {
  79114. const error = errors[i];
  79115. if (error.pos === pos) {
  79116. return Object.assign(error, {
  79117. message
  79118. });
  79119. } else if (error.pos < pos) {
  79120. break;
  79121. }
  79122. }
  79123. }
  79124. return this._raise({
  79125. code: code2,
  79126. loc,
  79127. pos
  79128. }, message);
  79129. }
  79130. raiseWithData(pos, data2, errorTemplate, ...params) {
  79131. const loc = this.getLocationForPosition(pos);
  79132. const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  79133. return this._raise(Object.assign({
  79134. loc,
  79135. pos
  79136. }, data2), message);
  79137. }
  79138. _raise(errorContext, message) {
  79139. const err = new SyntaxError(message);
  79140. Object.assign(err, errorContext);
  79141. if (this.options.errorRecovery) {
  79142. if (!this.isLookahead)
  79143. this.state.errors.push(err);
  79144. return err;
  79145. } else {
  79146. throw err;
  79147. }
  79148. }
  79149. };
  79150. var estree = (superClass) => class extends superClass {
  79151. parseRegExpLiteral({
  79152. pattern,
  79153. flags
  79154. }) {
  79155. let regex2 = null;
  79156. try {
  79157. regex2 = new RegExp(pattern, flags);
  79158. } catch (e) {
  79159. }
  79160. const node = this.estreeParseLiteral(regex2);
  79161. node.regex = {
  79162. pattern,
  79163. flags
  79164. };
  79165. return node;
  79166. }
  79167. parseBigIntLiteral(value) {
  79168. let bigInt;
  79169. try {
  79170. bigInt = BigInt(value);
  79171. } catch (_unused) {
  79172. bigInt = null;
  79173. }
  79174. const node = this.estreeParseLiteral(bigInt);
  79175. node.bigint = String(node.value || value);
  79176. return node;
  79177. }
  79178. parseDecimalLiteral(value) {
  79179. const decimal = null;
  79180. const node = this.estreeParseLiteral(decimal);
  79181. node.decimal = String(node.value || value);
  79182. return node;
  79183. }
  79184. estreeParseLiteral(value) {
  79185. return this.parseLiteral(value, "Literal");
  79186. }
  79187. parseStringLiteral(value) {
  79188. return this.estreeParseLiteral(value);
  79189. }
  79190. parseNumericLiteral(value) {
  79191. return this.estreeParseLiteral(value);
  79192. }
  79193. parseNullLiteral() {
  79194. return this.estreeParseLiteral(null);
  79195. }
  79196. parseBooleanLiteral(value) {
  79197. return this.estreeParseLiteral(value);
  79198. }
  79199. directiveToStmt(directive) {
  79200. const directiveLiteral = directive.value;
  79201. const stmt = this.startNodeAt(directive.start, directive.loc.start);
  79202. const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  79203. expression.value = directiveLiteral.extra.expressionValue;
  79204. expression.raw = directiveLiteral.extra.raw;
  79205. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  79206. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  79207. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  79208. }
  79209. initFunction(node, isAsync) {
  79210. super.initFunction(node, isAsync);
  79211. node.expression = false;
  79212. }
  79213. checkDeclaration(node) {
  79214. if (node != null && this.isObjectProperty(node)) {
  79215. this.checkDeclaration(node.value);
  79216. } else {
  79217. super.checkDeclaration(node);
  79218. }
  79219. }
  79220. getObjectOrClassMethodParams(method) {
  79221. return method.value.params;
  79222. }
  79223. isValidDirective(stmt) {
  79224. var _stmt$expression$extr;
  79225. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
  79226. }
  79227. stmtToDirective(stmt) {
  79228. const value = stmt.expression.value;
  79229. const directive = super.stmtToDirective(stmt);
  79230. this.addExtra(directive.value, "expressionValue", value);
  79231. return directive;
  79232. }
  79233. parseBlockBody(node, ...args) {
  79234. super.parseBlockBody(node, ...args);
  79235. const directiveStatements = node.directives.map((d) => this.directiveToStmt(d));
  79236. node.body = directiveStatements.concat(node.body);
  79237. delete node.directives;
  79238. }
  79239. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  79240. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  79241. if (method.typeParameters) {
  79242. method.value.typeParameters = method.typeParameters;
  79243. delete method.typeParameters;
  79244. }
  79245. classBody.body.push(method);
  79246. }
  79247. parseMaybePrivateName(...args) {
  79248. const node = super.parseMaybePrivateName(...args);
  79249. if (node.type === "PrivateName" && this.getPluginOption("estree", "classFeatures")) {
  79250. return this.convertPrivateNameToPrivateIdentifier(node);
  79251. }
  79252. return node;
  79253. }
  79254. convertPrivateNameToPrivateIdentifier(node) {
  79255. const name2 = super.getPrivateNameSV(node);
  79256. node = node;
  79257. delete node.id;
  79258. node.name = name2;
  79259. node.type = "PrivateIdentifier";
  79260. return node;
  79261. }
  79262. isPrivateName(node) {
  79263. if (!this.getPluginOption("estree", "classFeatures")) {
  79264. return super.isPrivateName(node);
  79265. }
  79266. return node.type === "PrivateIdentifier";
  79267. }
  79268. getPrivateNameSV(node) {
  79269. if (!this.getPluginOption("estree", "classFeatures")) {
  79270. return super.getPrivateNameSV(node);
  79271. }
  79272. return node.name;
  79273. }
  79274. parseLiteral(value, type) {
  79275. const node = super.parseLiteral(value, type);
  79276. node.raw = node.extra.raw;
  79277. delete node.extra;
  79278. return node;
  79279. }
  79280. parseFunctionBody(node, allowExpression, isMethod = false) {
  79281. super.parseFunctionBody(node, allowExpression, isMethod);
  79282. node.expression = node.body.type !== "BlockStatement";
  79283. }
  79284. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  79285. let funcNode = this.startNode();
  79286. funcNode.kind = node.kind;
  79287. funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  79288. funcNode.type = "FunctionExpression";
  79289. delete funcNode.kind;
  79290. node.value = funcNode;
  79291. if (type === "ClassPrivateMethod") {
  79292. node.computed = false;
  79293. }
  79294. type = "MethodDefinition";
  79295. return this.finishNode(node, type);
  79296. }
  79297. parseClassProperty(...args) {
  79298. const propertyNode = super.parseClassProperty(...args);
  79299. if (this.getPluginOption("estree", "classFeatures")) {
  79300. propertyNode.type = "PropertyDefinition";
  79301. }
  79302. return propertyNode;
  79303. }
  79304. parseClassPrivateProperty(...args) {
  79305. const propertyNode = super.parseClassPrivateProperty(...args);
  79306. if (this.getPluginOption("estree", "classFeatures")) {
  79307. propertyNode.type = "PropertyDefinition";
  79308. propertyNode.computed = false;
  79309. }
  79310. return propertyNode;
  79311. }
  79312. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  79313. const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
  79314. if (node) {
  79315. node.type = "Property";
  79316. if (node.kind === "method")
  79317. node.kind = "init";
  79318. node.shorthand = false;
  79319. }
  79320. return node;
  79321. }
  79322. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  79323. const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  79324. if (node) {
  79325. node.kind = "init";
  79326. node.type = "Property";
  79327. }
  79328. return node;
  79329. }
  79330. toAssignable(node, isLHS = false) {
  79331. if (node != null && this.isObjectProperty(node)) {
  79332. this.toAssignable(node.value, isLHS);
  79333. return node;
  79334. }
  79335. return super.toAssignable(node, isLHS);
  79336. }
  79337. toAssignableObjectExpressionProp(prop, ...args) {
  79338. if (prop.kind === "get" || prop.kind === "set") {
  79339. this.raise(prop.key.start, ErrorMessages.PatternHasAccessor);
  79340. } else if (prop.method) {
  79341. this.raise(prop.key.start, ErrorMessages.PatternHasMethod);
  79342. } else {
  79343. super.toAssignableObjectExpressionProp(prop, ...args);
  79344. }
  79345. }
  79346. finishCallExpression(node, optional) {
  79347. super.finishCallExpression(node, optional);
  79348. if (node.callee.type === "Import") {
  79349. node.type = "ImportExpression";
  79350. node.source = node.arguments[0];
  79351. if (this.hasPlugin("importAssertions")) {
  79352. var _node$arguments$;
  79353. node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null;
  79354. }
  79355. delete node.arguments;
  79356. delete node.callee;
  79357. }
  79358. return node;
  79359. }
  79360. toReferencedArguments(node) {
  79361. if (node.type === "ImportExpression") {
  79362. return;
  79363. }
  79364. super.toReferencedArguments(node);
  79365. }
  79366. parseExport(node) {
  79367. super.parseExport(node);
  79368. switch (node.type) {
  79369. case "ExportAllDeclaration":
  79370. node.exported = null;
  79371. break;
  79372. case "ExportNamedDeclaration":
  79373. if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
  79374. node.type = "ExportAllDeclaration";
  79375. node.exported = node.specifiers[0].exported;
  79376. delete node.specifiers;
  79377. }
  79378. break;
  79379. }
  79380. return node;
  79381. }
  79382. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  79383. const node = super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  79384. if (state.optionalChainMember) {
  79385. if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
  79386. node.type = node.type.substring(8);
  79387. }
  79388. if (state.stop) {
  79389. const chain = this.startNodeAtNode(node);
  79390. chain.expression = node;
  79391. return this.finishNode(chain, "ChainExpression");
  79392. }
  79393. } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
  79394. node.optional = false;
  79395. }
  79396. return node;
  79397. }
  79398. hasPropertyAsPrivateName(node) {
  79399. if (node.type === "ChainExpression") {
  79400. node = node.expression;
  79401. }
  79402. return super.hasPropertyAsPrivateName(node);
  79403. }
  79404. isOptionalChain(node) {
  79405. return node.type === "ChainExpression";
  79406. }
  79407. isObjectProperty(node) {
  79408. return node.type === "Property" && node.kind === "init" && !node.method;
  79409. }
  79410. isObjectMethod(node) {
  79411. return node.method || node.kind === "get" || node.kind === "set";
  79412. }
  79413. };
  79414. var TokContext3 = class {
  79415. constructor(token, preserveSpace) {
  79416. this.token = void 0;
  79417. this.preserveSpace = void 0;
  79418. this.token = token;
  79419. this.preserveSpace = !!preserveSpace;
  79420. }
  79421. };
  79422. var types2 = {
  79423. brace: new TokContext3("{"),
  79424. template: new TokContext3("`", true)
  79425. };
  79426. types$12.braceR.updateContext = (context) => {
  79427. context.pop();
  79428. };
  79429. types$12.braceL.updateContext = types$12.braceHashL.updateContext = types$12.dollarBraceL.updateContext = (context) => {
  79430. context.push(types2.brace);
  79431. };
  79432. types$12.backQuote.updateContext = (context) => {
  79433. if (context[context.length - 1] === types2.template) {
  79434. context.pop();
  79435. } else {
  79436. context.push(types2.template);
  79437. }
  79438. };
  79439. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  79440. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  79441. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  79442. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  79443. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  79444. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  79445. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  79446. function isInAstralSet2(code2, set) {
  79447. let pos = 65536;
  79448. for (let i = 0, length = set.length; i < length; i += 2) {
  79449. pos += set[i];
  79450. if (pos > code2)
  79451. return false;
  79452. pos += set[i + 1];
  79453. if (pos >= code2)
  79454. return true;
  79455. }
  79456. return false;
  79457. }
  79458. function isIdentifierStart2(code2) {
  79459. if (code2 < 65)
  79460. return code2 === 36;
  79461. if (code2 <= 90)
  79462. return true;
  79463. if (code2 < 97)
  79464. return code2 === 95;
  79465. if (code2 <= 122)
  79466. return true;
  79467. if (code2 <= 65535) {
  79468. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  79469. }
  79470. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  79471. }
  79472. function isIdentifierChar2(code2) {
  79473. if (code2 < 48)
  79474. return code2 === 36;
  79475. if (code2 < 58)
  79476. return true;
  79477. if (code2 < 65)
  79478. return false;
  79479. if (code2 <= 90)
  79480. return true;
  79481. if (code2 < 97)
  79482. return code2 === 95;
  79483. if (code2 <= 122)
  79484. return true;
  79485. if (code2 <= 65535) {
  79486. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  79487. }
  79488. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  79489. }
  79490. var reservedWords2 = {
  79491. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  79492. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  79493. strictBind: ["eval", "arguments"]
  79494. };
  79495. var keywords2 = new Set(reservedWords2.keyword);
  79496. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  79497. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  79498. function isReservedWord(word, inModule) {
  79499. return inModule && word === "await" || word === "enum";
  79500. }
  79501. function isStrictReservedWord(word, inModule) {
  79502. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  79503. }
  79504. function isStrictBindOnlyReservedWord(word) {
  79505. return reservedWordsStrictBindSet.has(word);
  79506. }
  79507. function isStrictBindReservedWord(word, inModule) {
  79508. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  79509. }
  79510. function isKeyword(word) {
  79511. return keywords2.has(word);
  79512. }
  79513. function isIteratorStart(current2, next) {
  79514. return current2 === 64 && next === 64;
  79515. }
  79516. var reservedWordLikeSet = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
  79517. function canBeReservedWord(word) {
  79518. return reservedWordLikeSet.has(word);
  79519. }
  79520. var SCOPE_OTHER = 0;
  79521. var SCOPE_PROGRAM = 1;
  79522. var SCOPE_FUNCTION2 = 2;
  79523. var SCOPE_ARROW2 = 4;
  79524. var SCOPE_SIMPLE_CATCH2 = 8;
  79525. var SCOPE_SUPER2 = 16;
  79526. var SCOPE_DIRECT_SUPER2 = 32;
  79527. var SCOPE_CLASS = 64;
  79528. var SCOPE_STATIC_BLOCK = 128;
  79529. var SCOPE_TS_MODULE = 256;
  79530. var SCOPE_VAR2 = SCOPE_PROGRAM | SCOPE_FUNCTION2 | SCOPE_TS_MODULE;
  79531. var BIND_KIND_VALUE = 1;
  79532. var BIND_KIND_TYPE = 2;
  79533. var BIND_SCOPE_VAR = 4;
  79534. var BIND_SCOPE_LEXICAL = 8;
  79535. var BIND_SCOPE_FUNCTION = 16;
  79536. var BIND_FLAGS_NONE = 64;
  79537. var BIND_FLAGS_CLASS = 128;
  79538. var BIND_FLAGS_TS_ENUM = 256;
  79539. var BIND_FLAGS_TS_CONST_ENUM = 512;
  79540. var BIND_FLAGS_TS_EXPORT_ONLY = 1024;
  79541. var BIND_FLAGS_FLOW_DECLARE_FN = 2048;
  79542. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS;
  79543. var BIND_LEXICAL2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0;
  79544. var BIND_VAR2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0;
  79545. var BIND_FUNCTION2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0;
  79546. var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS;
  79547. var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0;
  79548. var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM;
  79549. var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  79550. var BIND_NONE2 = 0 | 0 | 0 | BIND_FLAGS_NONE;
  79551. var BIND_OUTSIDE2 = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE;
  79552. var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM;
  79553. var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  79554. var BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
  79555. var CLASS_ELEMENT_FLAG_STATIC = 4;
  79556. var CLASS_ELEMENT_KIND_GETTER = 2;
  79557. var CLASS_ELEMENT_KIND_SETTER = 1;
  79558. var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  79559. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC;
  79560. var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC;
  79561. var CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER;
  79562. var CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER;
  79563. var CLASS_ELEMENT_OTHER = 0;
  79564. var Scope4 = class {
  79565. constructor(flags) {
  79566. this.var = /* @__PURE__ */ new Set();
  79567. this.lexical = /* @__PURE__ */ new Set();
  79568. this.functions = /* @__PURE__ */ new Set();
  79569. this.flags = flags;
  79570. }
  79571. };
  79572. var ScopeHandler = class {
  79573. constructor(raise2, inModule) {
  79574. this.scopeStack = [];
  79575. this.undefinedExports = /* @__PURE__ */ new Map();
  79576. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  79577. this.raise = raise2;
  79578. this.inModule = inModule;
  79579. }
  79580. get inFunction() {
  79581. return (this.currentVarScopeFlags() & SCOPE_FUNCTION2) > 0;
  79582. }
  79583. get allowSuper() {
  79584. return (this.currentThisScopeFlags() & SCOPE_SUPER2) > 0;
  79585. }
  79586. get allowDirectSuper() {
  79587. return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER2) > 0;
  79588. }
  79589. get inClass() {
  79590. return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;
  79591. }
  79592. get inClassAndNotInNonArrowFunction() {
  79593. const flags = this.currentThisScopeFlags();
  79594. return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION2) === 0;
  79595. }
  79596. get inStaticBlock() {
  79597. for (let i = this.scopeStack.length - 1; ; i--) {
  79598. const {
  79599. flags
  79600. } = this.scopeStack[i];
  79601. if (flags & SCOPE_STATIC_BLOCK) {
  79602. return true;
  79603. }
  79604. if (flags & (SCOPE_VAR2 | SCOPE_CLASS)) {
  79605. return false;
  79606. }
  79607. }
  79608. }
  79609. get inNonArrowFunction() {
  79610. return (this.currentThisScopeFlags() & SCOPE_FUNCTION2) > 0;
  79611. }
  79612. get treatFunctionsAsVar() {
  79613. return this.treatFunctionsAsVarInScope(this.currentScope());
  79614. }
  79615. createScope(flags) {
  79616. return new Scope4(flags);
  79617. }
  79618. enter(flags) {
  79619. this.scopeStack.push(this.createScope(flags));
  79620. }
  79621. exit() {
  79622. this.scopeStack.pop();
  79623. }
  79624. treatFunctionsAsVarInScope(scope) {
  79625. return !!(scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_PROGRAM);
  79626. }
  79627. declareName(name2, bindingType, pos) {
  79628. let scope = this.currentScope();
  79629. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  79630. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  79631. if (bindingType & BIND_SCOPE_FUNCTION) {
  79632. scope.functions.add(name2);
  79633. } else {
  79634. scope.lexical.add(name2);
  79635. }
  79636. if (bindingType & BIND_SCOPE_LEXICAL) {
  79637. this.maybeExportDefined(scope, name2);
  79638. }
  79639. } else if (bindingType & BIND_SCOPE_VAR) {
  79640. for (let i = this.scopeStack.length - 1; i >= 0; --i) {
  79641. scope = this.scopeStack[i];
  79642. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  79643. scope.var.add(name2);
  79644. this.maybeExportDefined(scope, name2);
  79645. if (scope.flags & SCOPE_VAR2)
  79646. break;
  79647. }
  79648. }
  79649. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  79650. this.undefinedExports.delete(name2);
  79651. }
  79652. }
  79653. maybeExportDefined(scope, name2) {
  79654. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  79655. this.undefinedExports.delete(name2);
  79656. }
  79657. }
  79658. checkRedeclarationInScope(scope, name2, bindingType, pos) {
  79659. if (this.isRedeclaredInScope(scope, name2, bindingType)) {
  79660. this.raise(pos, ErrorMessages.VarRedeclaration, name2);
  79661. }
  79662. }
  79663. isRedeclaredInScope(scope, name2, bindingType) {
  79664. if (!(bindingType & BIND_KIND_VALUE))
  79665. return false;
  79666. if (bindingType & BIND_SCOPE_LEXICAL) {
  79667. return scope.lexical.has(name2) || scope.functions.has(name2) || scope.var.has(name2);
  79668. }
  79669. if (bindingType & BIND_SCOPE_FUNCTION) {
  79670. return scope.lexical.has(name2) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name2);
  79671. }
  79672. return scope.lexical.has(name2) && !(scope.flags & SCOPE_SIMPLE_CATCH2 && scope.lexical.values().next().value === name2) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name2);
  79673. }
  79674. checkLocalExport(id) {
  79675. const {
  79676. name: name2
  79677. } = id;
  79678. const topLevelScope = this.scopeStack[0];
  79679. if (!topLevelScope.lexical.has(name2) && !topLevelScope.var.has(name2) && !topLevelScope.functions.has(name2)) {
  79680. this.undefinedExports.set(name2, id.start);
  79681. }
  79682. }
  79683. currentScope() {
  79684. return this.scopeStack[this.scopeStack.length - 1];
  79685. }
  79686. currentVarScopeFlags() {
  79687. for (let i = this.scopeStack.length - 1; ; i--) {
  79688. const {
  79689. flags
  79690. } = this.scopeStack[i];
  79691. if (flags & SCOPE_VAR2) {
  79692. return flags;
  79693. }
  79694. }
  79695. }
  79696. currentThisScopeFlags() {
  79697. for (let i = this.scopeStack.length - 1; ; i--) {
  79698. const {
  79699. flags
  79700. } = this.scopeStack[i];
  79701. if (flags & (SCOPE_VAR2 | SCOPE_CLASS) && !(flags & SCOPE_ARROW2)) {
  79702. return flags;
  79703. }
  79704. }
  79705. }
  79706. };
  79707. var FlowScope = class extends Scope4 {
  79708. constructor(...args) {
  79709. super(...args);
  79710. this.declareFunctions = /* @__PURE__ */ new Set();
  79711. }
  79712. };
  79713. var FlowScopeHandler = class extends ScopeHandler {
  79714. createScope(flags) {
  79715. return new FlowScope(flags);
  79716. }
  79717. declareName(name2, bindingType, pos) {
  79718. const scope = this.currentScope();
  79719. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  79720. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  79721. this.maybeExportDefined(scope, name2);
  79722. scope.declareFunctions.add(name2);
  79723. return;
  79724. }
  79725. super.declareName(...arguments);
  79726. }
  79727. isRedeclaredInScope(scope, name2, bindingType) {
  79728. if (super.isRedeclaredInScope(...arguments))
  79729. return true;
  79730. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  79731. return !scope.declareFunctions.has(name2) && (scope.lexical.has(name2) || scope.functions.has(name2));
  79732. }
  79733. return false;
  79734. }
  79735. checkLocalExport(id) {
  79736. if (!this.scopeStack[0].declareFunctions.has(id.name)) {
  79737. super.checkLocalExport(id);
  79738. }
  79739. }
  79740. };
  79741. var reservedTypes = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  79742. var FlowErrors = makeErrorTemplates({
  79743. AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
  79744. AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
  79745. AssignReservedType: "Cannot overwrite reserved type %0.",
  79746. DeclareClassElement: "The `declare` modifier can only appear on class fields.",
  79747. DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
  79748. DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
  79749. EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
  79750. EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
  79751. EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
  79752. EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  79753. EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  79754. EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
  79755. EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
  79756. EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
  79757. EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
  79758. EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
  79759. EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
  79760. GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
  79761. ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
  79762. InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
  79763. InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
  79764. InexactVariance: "Explicit inexact syntax cannot have variance.",
  79765. InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
  79766. MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
  79767. NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
  79768. NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
  79769. OptionalBindingPattern: "A binding pattern parameter cannot be optional in an implementation signature.",
  79770. SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
  79771. SpreadVariance: "Spread properties cannot have variance.",
  79772. ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
  79773. ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
  79774. ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
  79775. ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
  79776. ThisParamNoDefault: "The `this` parameter may not have a default value.",
  79777. TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  79778. TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
  79779. UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
  79780. UnexpectedReservedType: "Unexpected reserved type %0.",
  79781. UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
  79782. UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
  79783. UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
  79784. UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
  79785. UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
  79786. UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
  79787. UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.",
  79788. UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
  79789. UnterminatedFlowComment: "Unterminated flow-comment."
  79790. }, ErrorCodes.SyntaxError);
  79791. function isEsModuleType(bodyElement) {
  79792. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  79793. }
  79794. function hasTypeImportKind(node) {
  79795. return node.importKind === "type" || node.importKind === "typeof";
  79796. }
  79797. function isMaybeDefaultImport(state) {
  79798. return (state.type === types$12.name || !!state.type.keyword) && state.value !== "from";
  79799. }
  79800. var exportSuggestions = {
  79801. const: "declare export var",
  79802. let: "declare export var",
  79803. type: "export type",
  79804. interface: "export interface"
  79805. };
  79806. function partition(list3, test) {
  79807. const list1 = [];
  79808. const list22 = [];
  79809. for (let i = 0; i < list3.length; i++) {
  79810. (test(list3[i], i, list3) ? list1 : list22).push(list3[i]);
  79811. }
  79812. return [list1, list22];
  79813. }
  79814. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  79815. var flow3 = (superClass) => class extends superClass {
  79816. constructor(...args) {
  79817. super(...args);
  79818. this.flowPragma = void 0;
  79819. }
  79820. getScopeHandler() {
  79821. return FlowScopeHandler;
  79822. }
  79823. shouldParseTypes() {
  79824. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  79825. }
  79826. shouldParseEnums() {
  79827. return !!this.getPluginOption("flow", "enums");
  79828. }
  79829. finishToken(type, val) {
  79830. if (type !== types$12.string && type !== types$12.semi && type !== types$12.interpreterDirective) {
  79831. if (this.flowPragma === void 0) {
  79832. this.flowPragma = null;
  79833. }
  79834. }
  79835. return super.finishToken(type, val);
  79836. }
  79837. addComment(comment2) {
  79838. if (this.flowPragma === void 0) {
  79839. const matches = FLOW_PRAGMA_REGEX.exec(comment2.value);
  79840. if (!matches)
  79841. ;
  79842. else if (matches[1] === "flow") {
  79843. this.flowPragma = "flow";
  79844. } else if (matches[1] === "noflow") {
  79845. this.flowPragma = "noflow";
  79846. } else {
  79847. throw new Error("Unexpected flow pragma");
  79848. }
  79849. }
  79850. return super.addComment(comment2);
  79851. }
  79852. flowParseTypeInitialiser(tok) {
  79853. const oldInType = this.state.inType;
  79854. this.state.inType = true;
  79855. this.expect(tok || types$12.colon);
  79856. const type = this.flowParseType();
  79857. this.state.inType = oldInType;
  79858. return type;
  79859. }
  79860. flowParsePredicate() {
  79861. const node = this.startNode();
  79862. const moduloPos = this.state.start;
  79863. this.next();
  79864. this.expectContextual("checks");
  79865. if (this.state.lastTokStart > moduloPos + 1) {
  79866. this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
  79867. }
  79868. if (this.eat(types$12.parenL)) {
  79869. node.value = this.parseExpression();
  79870. this.expect(types$12.parenR);
  79871. return this.finishNode(node, "DeclaredPredicate");
  79872. } else {
  79873. return this.finishNode(node, "InferredPredicate");
  79874. }
  79875. }
  79876. flowParseTypeAndPredicateInitialiser() {
  79877. const oldInType = this.state.inType;
  79878. this.state.inType = true;
  79879. this.expect(types$12.colon);
  79880. let type = null;
  79881. let predicate = null;
  79882. if (this.match(types$12.modulo)) {
  79883. this.state.inType = oldInType;
  79884. predicate = this.flowParsePredicate();
  79885. } else {
  79886. type = this.flowParseType();
  79887. this.state.inType = oldInType;
  79888. if (this.match(types$12.modulo)) {
  79889. predicate = this.flowParsePredicate();
  79890. }
  79891. }
  79892. return [type, predicate];
  79893. }
  79894. flowParseDeclareClass(node) {
  79895. this.next();
  79896. this.flowParseInterfaceish(node, true);
  79897. return this.finishNode(node, "DeclareClass");
  79898. }
  79899. flowParseDeclareFunction(node) {
  79900. this.next();
  79901. const id = node.id = this.parseIdentifier();
  79902. const typeNode = this.startNode();
  79903. const typeContainer = this.startNode();
  79904. if (this.isRelational("<")) {
  79905. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  79906. } else {
  79907. typeNode.typeParameters = null;
  79908. }
  79909. this.expect(types$12.parenL);
  79910. const tmp = this.flowParseFunctionTypeParams();
  79911. typeNode.params = tmp.params;
  79912. typeNode.rest = tmp.rest;
  79913. typeNode.this = tmp._this;
  79914. this.expect(types$12.parenR);
  79915. [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  79916. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  79917. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  79918. this.resetEndLocation(id);
  79919. this.semicolon();
  79920. this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start);
  79921. return this.finishNode(node, "DeclareFunction");
  79922. }
  79923. flowParseDeclare(node, insideModule) {
  79924. if (this.match(types$12._class)) {
  79925. return this.flowParseDeclareClass(node);
  79926. } else if (this.match(types$12._function)) {
  79927. return this.flowParseDeclareFunction(node);
  79928. } else if (this.match(types$12._var)) {
  79929. return this.flowParseDeclareVariable(node);
  79930. } else if (this.eatContextual("module")) {
  79931. if (this.match(types$12.dot)) {
  79932. return this.flowParseDeclareModuleExports(node);
  79933. } else {
  79934. if (insideModule) {
  79935. this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);
  79936. }
  79937. return this.flowParseDeclareModule(node);
  79938. }
  79939. } else if (this.isContextual("type")) {
  79940. return this.flowParseDeclareTypeAlias(node);
  79941. } else if (this.isContextual("opaque")) {
  79942. return this.flowParseDeclareOpaqueType(node);
  79943. } else if (this.isContextual("interface")) {
  79944. return this.flowParseDeclareInterface(node);
  79945. } else if (this.match(types$12._export)) {
  79946. return this.flowParseDeclareExportDeclaration(node, insideModule);
  79947. } else {
  79948. throw this.unexpected();
  79949. }
  79950. }
  79951. flowParseDeclareVariable(node) {
  79952. this.next();
  79953. node.id = this.flowParseTypeAnnotatableIdentifier(true);
  79954. this.scope.declareName(node.id.name, BIND_VAR2, node.id.start);
  79955. this.semicolon();
  79956. return this.finishNode(node, "DeclareVariable");
  79957. }
  79958. flowParseDeclareModule(node) {
  79959. this.scope.enter(SCOPE_OTHER);
  79960. if (this.match(types$12.string)) {
  79961. node.id = this.parseExprAtom();
  79962. } else {
  79963. node.id = this.parseIdentifier();
  79964. }
  79965. const bodyNode = node.body = this.startNode();
  79966. const body = bodyNode.body = [];
  79967. this.expect(types$12.braceL);
  79968. while (!this.match(types$12.braceR)) {
  79969. let bodyNode2 = this.startNode();
  79970. if (this.match(types$12._import)) {
  79971. this.next();
  79972. if (!this.isContextual("type") && !this.match(types$12._typeof)) {
  79973. this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule);
  79974. }
  79975. this.parseImport(bodyNode2);
  79976. } else {
  79977. this.expectContextual("declare", FlowErrors.UnsupportedStatementInDeclareModule);
  79978. bodyNode2 = this.flowParseDeclare(bodyNode2, true);
  79979. }
  79980. body.push(bodyNode2);
  79981. }
  79982. this.scope.exit();
  79983. this.expect(types$12.braceR);
  79984. this.finishNode(bodyNode, "BlockStatement");
  79985. let kind = null;
  79986. let hasModuleExport = false;
  79987. body.forEach((bodyElement) => {
  79988. if (isEsModuleType(bodyElement)) {
  79989. if (kind === "CommonJS") {
  79990. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  79991. }
  79992. kind = "ES";
  79993. } else if (bodyElement.type === "DeclareModuleExports") {
  79994. if (hasModuleExport) {
  79995. this.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports);
  79996. }
  79997. if (kind === "ES") {
  79998. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  79999. }
  80000. kind = "CommonJS";
  80001. hasModuleExport = true;
  80002. }
  80003. });
  80004. node.kind = kind || "CommonJS";
  80005. return this.finishNode(node, "DeclareModule");
  80006. }
  80007. flowParseDeclareExportDeclaration(node, insideModule) {
  80008. this.expect(types$12._export);
  80009. if (this.eat(types$12._default)) {
  80010. if (this.match(types$12._function) || this.match(types$12._class)) {
  80011. node.declaration = this.flowParseDeclare(this.startNode());
  80012. } else {
  80013. node.declaration = this.flowParseType();
  80014. this.semicolon();
  80015. }
  80016. node.default = true;
  80017. return this.finishNode(node, "DeclareExportDeclaration");
  80018. } else {
  80019. if (this.match(types$12._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
  80020. const label = this.state.value;
  80021. const suggestion = exportSuggestions[label];
  80022. throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion);
  80023. }
  80024. if (this.match(types$12._var) || this.match(types$12._function) || this.match(types$12._class) || this.isContextual("opaque")) {
  80025. node.declaration = this.flowParseDeclare(this.startNode());
  80026. node.default = false;
  80027. return this.finishNode(node, "DeclareExportDeclaration");
  80028. } else if (this.match(types$12.star) || this.match(types$12.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
  80029. node = this.parseExport(node);
  80030. if (node.type === "ExportNamedDeclaration") {
  80031. node.type = "ExportDeclaration";
  80032. node.default = false;
  80033. delete node.exportKind;
  80034. }
  80035. node.type = "Declare" + node.type;
  80036. return node;
  80037. }
  80038. }
  80039. throw this.unexpected();
  80040. }
  80041. flowParseDeclareModuleExports(node) {
  80042. this.next();
  80043. this.expectContextual("exports");
  80044. node.typeAnnotation = this.flowParseTypeAnnotation();
  80045. this.semicolon();
  80046. return this.finishNode(node, "DeclareModuleExports");
  80047. }
  80048. flowParseDeclareTypeAlias(node) {
  80049. this.next();
  80050. this.flowParseTypeAlias(node);
  80051. node.type = "DeclareTypeAlias";
  80052. return node;
  80053. }
  80054. flowParseDeclareOpaqueType(node) {
  80055. this.next();
  80056. this.flowParseOpaqueType(node, true);
  80057. node.type = "DeclareOpaqueType";
  80058. return node;
  80059. }
  80060. flowParseDeclareInterface(node) {
  80061. this.next();
  80062. this.flowParseInterfaceish(node);
  80063. return this.finishNode(node, "DeclareInterface");
  80064. }
  80065. flowParseInterfaceish(node, isClass = false) {
  80066. node.id = this.flowParseRestrictedIdentifier(!isClass, true);
  80067. this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION2 : BIND_LEXICAL2, node.id.start);
  80068. if (this.isRelational("<")) {
  80069. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80070. } else {
  80071. node.typeParameters = null;
  80072. }
  80073. node.extends = [];
  80074. node.implements = [];
  80075. node.mixins = [];
  80076. if (this.eat(types$12._extends)) {
  80077. do {
  80078. node.extends.push(this.flowParseInterfaceExtends());
  80079. } while (!isClass && this.eat(types$12.comma));
  80080. }
  80081. if (this.isContextual("mixins")) {
  80082. this.next();
  80083. do {
  80084. node.mixins.push(this.flowParseInterfaceExtends());
  80085. } while (this.eat(types$12.comma));
  80086. }
  80087. if (this.isContextual("implements")) {
  80088. this.next();
  80089. do {
  80090. node.implements.push(this.flowParseInterfaceExtends());
  80091. } while (this.eat(types$12.comma));
  80092. }
  80093. node.body = this.flowParseObjectType({
  80094. allowStatic: isClass,
  80095. allowExact: false,
  80096. allowSpread: false,
  80097. allowProto: isClass,
  80098. allowInexact: false
  80099. });
  80100. }
  80101. flowParseInterfaceExtends() {
  80102. const node = this.startNode();
  80103. node.id = this.flowParseQualifiedTypeIdentifier();
  80104. if (this.isRelational("<")) {
  80105. node.typeParameters = this.flowParseTypeParameterInstantiation();
  80106. } else {
  80107. node.typeParameters = null;
  80108. }
  80109. return this.finishNode(node, "InterfaceExtends");
  80110. }
  80111. flowParseInterface(node) {
  80112. this.flowParseInterfaceish(node);
  80113. return this.finishNode(node, "InterfaceDeclaration");
  80114. }
  80115. checkNotUnderscore(word) {
  80116. if (word === "_") {
  80117. this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);
  80118. }
  80119. }
  80120. checkReservedType(word, startLoc, declaration) {
  80121. if (!reservedTypes.has(word))
  80122. return;
  80123. this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word);
  80124. }
  80125. flowParseRestrictedIdentifier(liberal, declaration) {
  80126. this.checkReservedType(this.state.value, this.state.start, declaration);
  80127. return this.parseIdentifier(liberal);
  80128. }
  80129. flowParseTypeAlias(node) {
  80130. node.id = this.flowParseRestrictedIdentifier(false, true);
  80131. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  80132. if (this.isRelational("<")) {
  80133. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80134. } else {
  80135. node.typeParameters = null;
  80136. }
  80137. node.right = this.flowParseTypeInitialiser(types$12.eq);
  80138. this.semicolon();
  80139. return this.finishNode(node, "TypeAlias");
  80140. }
  80141. flowParseOpaqueType(node, declare) {
  80142. this.expectContextual("type");
  80143. node.id = this.flowParseRestrictedIdentifier(true, true);
  80144. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  80145. if (this.isRelational("<")) {
  80146. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80147. } else {
  80148. node.typeParameters = null;
  80149. }
  80150. node.supertype = null;
  80151. if (this.match(types$12.colon)) {
  80152. node.supertype = this.flowParseTypeInitialiser(types$12.colon);
  80153. }
  80154. node.impltype = null;
  80155. if (!declare) {
  80156. node.impltype = this.flowParseTypeInitialiser(types$12.eq);
  80157. }
  80158. this.semicolon();
  80159. return this.finishNode(node, "OpaqueType");
  80160. }
  80161. flowParseTypeParameter(requireDefault = false) {
  80162. const nodeStart = this.state.start;
  80163. const node = this.startNode();
  80164. const variance = this.flowParseVariance();
  80165. const ident = this.flowParseTypeAnnotatableIdentifier();
  80166. node.name = ident.name;
  80167. node.variance = variance;
  80168. node.bound = ident.typeAnnotation;
  80169. if (this.match(types$12.eq)) {
  80170. this.eat(types$12.eq);
  80171. node.default = this.flowParseType();
  80172. } else {
  80173. if (requireDefault) {
  80174. this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);
  80175. }
  80176. }
  80177. return this.finishNode(node, "TypeParameter");
  80178. }
  80179. flowParseTypeParameterDeclaration() {
  80180. const oldInType = this.state.inType;
  80181. const node = this.startNode();
  80182. node.params = [];
  80183. this.state.inType = true;
  80184. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  80185. this.next();
  80186. } else {
  80187. this.unexpected();
  80188. }
  80189. let defaultRequired = false;
  80190. do {
  80191. const typeParameter = this.flowParseTypeParameter(defaultRequired);
  80192. node.params.push(typeParameter);
  80193. if (typeParameter.default) {
  80194. defaultRequired = true;
  80195. }
  80196. if (!this.isRelational(">")) {
  80197. this.expect(types$12.comma);
  80198. }
  80199. } while (!this.isRelational(">"));
  80200. this.expectRelational(">");
  80201. this.state.inType = oldInType;
  80202. return this.finishNode(node, "TypeParameterDeclaration");
  80203. }
  80204. flowParseTypeParameterInstantiation() {
  80205. const node = this.startNode();
  80206. const oldInType = this.state.inType;
  80207. node.params = [];
  80208. this.state.inType = true;
  80209. this.expectRelational("<");
  80210. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  80211. this.state.noAnonFunctionType = false;
  80212. while (!this.isRelational(">")) {
  80213. node.params.push(this.flowParseType());
  80214. if (!this.isRelational(">")) {
  80215. this.expect(types$12.comma);
  80216. }
  80217. }
  80218. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  80219. this.expectRelational(">");
  80220. this.state.inType = oldInType;
  80221. return this.finishNode(node, "TypeParameterInstantiation");
  80222. }
  80223. flowParseTypeParameterInstantiationCallOrNew() {
  80224. const node = this.startNode();
  80225. const oldInType = this.state.inType;
  80226. node.params = [];
  80227. this.state.inType = true;
  80228. this.expectRelational("<");
  80229. while (!this.isRelational(">")) {
  80230. node.params.push(this.flowParseTypeOrImplicitInstantiation());
  80231. if (!this.isRelational(">")) {
  80232. this.expect(types$12.comma);
  80233. }
  80234. }
  80235. this.expectRelational(">");
  80236. this.state.inType = oldInType;
  80237. return this.finishNode(node, "TypeParameterInstantiation");
  80238. }
  80239. flowParseInterfaceType() {
  80240. const node = this.startNode();
  80241. this.expectContextual("interface");
  80242. node.extends = [];
  80243. if (this.eat(types$12._extends)) {
  80244. do {
  80245. node.extends.push(this.flowParseInterfaceExtends());
  80246. } while (this.eat(types$12.comma));
  80247. }
  80248. node.body = this.flowParseObjectType({
  80249. allowStatic: false,
  80250. allowExact: false,
  80251. allowSpread: false,
  80252. allowProto: false,
  80253. allowInexact: false
  80254. });
  80255. return this.finishNode(node, "InterfaceTypeAnnotation");
  80256. }
  80257. flowParseObjectPropertyKey() {
  80258. return this.match(types$12.num) || this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  80259. }
  80260. flowParseObjectTypeIndexer(node, isStatic, variance) {
  80261. node.static = isStatic;
  80262. if (this.lookahead().type === types$12.colon) {
  80263. node.id = this.flowParseObjectPropertyKey();
  80264. node.key = this.flowParseTypeInitialiser();
  80265. } else {
  80266. node.id = null;
  80267. node.key = this.flowParseType();
  80268. }
  80269. this.expect(types$12.bracketR);
  80270. node.value = this.flowParseTypeInitialiser();
  80271. node.variance = variance;
  80272. return this.finishNode(node, "ObjectTypeIndexer");
  80273. }
  80274. flowParseObjectTypeInternalSlot(node, isStatic) {
  80275. node.static = isStatic;
  80276. node.id = this.flowParseObjectPropertyKey();
  80277. this.expect(types$12.bracketR);
  80278. this.expect(types$12.bracketR);
  80279. if (this.isRelational("<") || this.match(types$12.parenL)) {
  80280. node.method = true;
  80281. node.optional = false;
  80282. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  80283. } else {
  80284. node.method = false;
  80285. if (this.eat(types$12.question)) {
  80286. node.optional = true;
  80287. }
  80288. node.value = this.flowParseTypeInitialiser();
  80289. }
  80290. return this.finishNode(node, "ObjectTypeInternalSlot");
  80291. }
  80292. flowParseObjectTypeMethodish(node) {
  80293. node.params = [];
  80294. node.rest = null;
  80295. node.typeParameters = null;
  80296. node.this = null;
  80297. if (this.isRelational("<")) {
  80298. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80299. }
  80300. this.expect(types$12.parenL);
  80301. if (this.match(types$12._this)) {
  80302. node.this = this.flowParseFunctionTypeParam(true);
  80303. node.this.name = null;
  80304. if (!this.match(types$12.parenR)) {
  80305. this.expect(types$12.comma);
  80306. }
  80307. }
  80308. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  80309. node.params.push(this.flowParseFunctionTypeParam(false));
  80310. if (!this.match(types$12.parenR)) {
  80311. this.expect(types$12.comma);
  80312. }
  80313. }
  80314. if (this.eat(types$12.ellipsis)) {
  80315. node.rest = this.flowParseFunctionTypeParam(false);
  80316. }
  80317. this.expect(types$12.parenR);
  80318. node.returnType = this.flowParseTypeInitialiser();
  80319. return this.finishNode(node, "FunctionTypeAnnotation");
  80320. }
  80321. flowParseObjectTypeCallProperty(node, isStatic) {
  80322. const valueNode = this.startNode();
  80323. node.static = isStatic;
  80324. node.value = this.flowParseObjectTypeMethodish(valueNode);
  80325. return this.finishNode(node, "ObjectTypeCallProperty");
  80326. }
  80327. flowParseObjectType({
  80328. allowStatic,
  80329. allowExact,
  80330. allowSpread,
  80331. allowProto,
  80332. allowInexact
  80333. }) {
  80334. const oldInType = this.state.inType;
  80335. this.state.inType = true;
  80336. const nodeStart = this.startNode();
  80337. nodeStart.callProperties = [];
  80338. nodeStart.properties = [];
  80339. nodeStart.indexers = [];
  80340. nodeStart.internalSlots = [];
  80341. let endDelim;
  80342. let exact;
  80343. let inexact = false;
  80344. if (allowExact && this.match(types$12.braceBarL)) {
  80345. this.expect(types$12.braceBarL);
  80346. endDelim = types$12.braceBarR;
  80347. exact = true;
  80348. } else {
  80349. this.expect(types$12.braceL);
  80350. endDelim = types$12.braceR;
  80351. exact = false;
  80352. }
  80353. nodeStart.exact = exact;
  80354. while (!this.match(endDelim)) {
  80355. let isStatic = false;
  80356. let protoStart = null;
  80357. let inexactStart = null;
  80358. const node = this.startNode();
  80359. if (allowProto && this.isContextual("proto")) {
  80360. const lookahead2 = this.lookahead();
  80361. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  80362. this.next();
  80363. protoStart = this.state.start;
  80364. allowStatic = false;
  80365. }
  80366. }
  80367. if (allowStatic && this.isContextual("static")) {
  80368. const lookahead2 = this.lookahead();
  80369. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  80370. this.next();
  80371. isStatic = true;
  80372. }
  80373. }
  80374. const variance = this.flowParseVariance();
  80375. if (this.eat(types$12.bracketL)) {
  80376. if (protoStart != null) {
  80377. this.unexpected(protoStart);
  80378. }
  80379. if (this.eat(types$12.bracketL)) {
  80380. if (variance) {
  80381. this.unexpected(variance.start);
  80382. }
  80383. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
  80384. } else {
  80385. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  80386. }
  80387. } else if (this.match(types$12.parenL) || this.isRelational("<")) {
  80388. if (protoStart != null) {
  80389. this.unexpected(protoStart);
  80390. }
  80391. if (variance) {
  80392. this.unexpected(variance.start);
  80393. }
  80394. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  80395. } else {
  80396. let kind = "init";
  80397. if (this.isContextual("get") || this.isContextual("set")) {
  80398. const lookahead2 = this.lookahead();
  80399. if (lookahead2.type === types$12.name || lookahead2.type === types$12.string || lookahead2.type === types$12.num) {
  80400. kind = this.state.value;
  80401. this.next();
  80402. }
  80403. }
  80404. const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  80405. if (propOrInexact === null) {
  80406. inexact = true;
  80407. inexactStart = this.state.lastTokStart;
  80408. } else {
  80409. nodeStart.properties.push(propOrInexact);
  80410. }
  80411. }
  80412. this.flowObjectTypeSemicolon();
  80413. if (inexactStart && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  80414. this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject);
  80415. }
  80416. }
  80417. this.expect(endDelim);
  80418. if (allowSpread) {
  80419. nodeStart.inexact = inexact;
  80420. }
  80421. const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  80422. this.state.inType = oldInType;
  80423. return out;
  80424. }
  80425. flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
  80426. if (this.eat(types$12.ellipsis)) {
  80427. const isInexactToken = this.match(types$12.comma) || this.match(types$12.semi) || this.match(types$12.braceR) || this.match(types$12.braceBarR);
  80428. if (isInexactToken) {
  80429. if (!allowSpread) {
  80430. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject);
  80431. } else if (!allowInexact) {
  80432. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);
  80433. }
  80434. if (variance) {
  80435. this.raise(variance.start, FlowErrors.InexactVariance);
  80436. }
  80437. return null;
  80438. }
  80439. if (!allowSpread) {
  80440. this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);
  80441. }
  80442. if (protoStart != null) {
  80443. this.unexpected(protoStart);
  80444. }
  80445. if (variance) {
  80446. this.raise(variance.start, FlowErrors.SpreadVariance);
  80447. }
  80448. node.argument = this.flowParseType();
  80449. return this.finishNode(node, "ObjectTypeSpreadProperty");
  80450. } else {
  80451. node.key = this.flowParseObjectPropertyKey();
  80452. node.static = isStatic;
  80453. node.proto = protoStart != null;
  80454. node.kind = kind;
  80455. let optional = false;
  80456. if (this.isRelational("<") || this.match(types$12.parenL)) {
  80457. node.method = true;
  80458. if (protoStart != null) {
  80459. this.unexpected(protoStart);
  80460. }
  80461. if (variance) {
  80462. this.unexpected(variance.start);
  80463. }
  80464. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  80465. if (kind === "get" || kind === "set") {
  80466. this.flowCheckGetterSetterParams(node);
  80467. }
  80468. if (!allowSpread && node.key.name === "constructor" && node.value.this) {
  80469. this.raise(node.value.this.start, FlowErrors.ThisParamBannedInConstructor);
  80470. }
  80471. } else {
  80472. if (kind !== "init")
  80473. this.unexpected();
  80474. node.method = false;
  80475. if (this.eat(types$12.question)) {
  80476. optional = true;
  80477. }
  80478. node.value = this.flowParseTypeInitialiser();
  80479. node.variance = variance;
  80480. }
  80481. node.optional = optional;
  80482. return this.finishNode(node, "ObjectTypeProperty");
  80483. }
  80484. }
  80485. flowCheckGetterSetterParams(property) {
  80486. const paramCount = property.kind === "get" ? 0 : 1;
  80487. const start3 = property.start;
  80488. const length = property.value.params.length + (property.value.rest ? 1 : 0);
  80489. if (property.value.this) {
  80490. this.raise(property.value.this.start, property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam);
  80491. }
  80492. if (length !== paramCount) {
  80493. if (property.kind === "get") {
  80494. this.raise(start3, ErrorMessages.BadGetterArity);
  80495. } else {
  80496. this.raise(start3, ErrorMessages.BadSetterArity);
  80497. }
  80498. }
  80499. if (property.kind === "set" && property.value.rest) {
  80500. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  80501. }
  80502. }
  80503. flowObjectTypeSemicolon() {
  80504. if (!this.eat(types$12.semi) && !this.eat(types$12.comma) && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  80505. this.unexpected();
  80506. }
  80507. }
  80508. flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
  80509. startPos = startPos || this.state.start;
  80510. startLoc = startLoc || this.state.startLoc;
  80511. let node = id || this.flowParseRestrictedIdentifier(true);
  80512. while (this.eat(types$12.dot)) {
  80513. const node2 = this.startNodeAt(startPos, startLoc);
  80514. node2.qualification = node;
  80515. node2.id = this.flowParseRestrictedIdentifier(true);
  80516. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  80517. }
  80518. return node;
  80519. }
  80520. flowParseGenericType(startPos, startLoc, id) {
  80521. const node = this.startNodeAt(startPos, startLoc);
  80522. node.typeParameters = null;
  80523. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  80524. if (this.isRelational("<")) {
  80525. node.typeParameters = this.flowParseTypeParameterInstantiation();
  80526. }
  80527. return this.finishNode(node, "GenericTypeAnnotation");
  80528. }
  80529. flowParseTypeofType() {
  80530. const node = this.startNode();
  80531. this.expect(types$12._typeof);
  80532. node.argument = this.flowParsePrimaryType();
  80533. return this.finishNode(node, "TypeofTypeAnnotation");
  80534. }
  80535. flowParseTupleType() {
  80536. const node = this.startNode();
  80537. node.types = [];
  80538. this.expect(types$12.bracketL);
  80539. while (this.state.pos < this.length && !this.match(types$12.bracketR)) {
  80540. node.types.push(this.flowParseType());
  80541. if (this.match(types$12.bracketR))
  80542. break;
  80543. this.expect(types$12.comma);
  80544. }
  80545. this.expect(types$12.bracketR);
  80546. return this.finishNode(node, "TupleTypeAnnotation");
  80547. }
  80548. flowParseFunctionTypeParam(first) {
  80549. let name2 = null;
  80550. let optional = false;
  80551. let typeAnnotation = null;
  80552. const node = this.startNode();
  80553. const lh = this.lookahead();
  80554. const isThis = this.state.type === types$12._this;
  80555. if (lh.type === types$12.colon || lh.type === types$12.question) {
  80556. if (isThis && !first) {
  80557. this.raise(node.start, FlowErrors.ThisParamMustBeFirst);
  80558. }
  80559. name2 = this.parseIdentifier(isThis);
  80560. if (this.eat(types$12.question)) {
  80561. optional = true;
  80562. if (isThis) {
  80563. this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional);
  80564. }
  80565. }
  80566. typeAnnotation = this.flowParseTypeInitialiser();
  80567. } else {
  80568. typeAnnotation = this.flowParseType();
  80569. }
  80570. node.name = name2;
  80571. node.optional = optional;
  80572. node.typeAnnotation = typeAnnotation;
  80573. return this.finishNode(node, "FunctionTypeParam");
  80574. }
  80575. reinterpretTypeAsFunctionTypeParam(type) {
  80576. const node = this.startNodeAt(type.start, type.loc.start);
  80577. node.name = null;
  80578. node.optional = false;
  80579. node.typeAnnotation = type;
  80580. return this.finishNode(node, "FunctionTypeParam");
  80581. }
  80582. flowParseFunctionTypeParams(params = []) {
  80583. let rest = null;
  80584. let _this = null;
  80585. if (this.match(types$12._this)) {
  80586. _this = this.flowParseFunctionTypeParam(true);
  80587. _this.name = null;
  80588. if (!this.match(types$12.parenR)) {
  80589. this.expect(types$12.comma);
  80590. }
  80591. }
  80592. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  80593. params.push(this.flowParseFunctionTypeParam(false));
  80594. if (!this.match(types$12.parenR)) {
  80595. this.expect(types$12.comma);
  80596. }
  80597. }
  80598. if (this.eat(types$12.ellipsis)) {
  80599. rest = this.flowParseFunctionTypeParam(false);
  80600. }
  80601. return {
  80602. params,
  80603. rest,
  80604. _this
  80605. };
  80606. }
  80607. flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
  80608. switch (id.name) {
  80609. case "any":
  80610. return this.finishNode(node, "AnyTypeAnnotation");
  80611. case "bool":
  80612. case "boolean":
  80613. return this.finishNode(node, "BooleanTypeAnnotation");
  80614. case "mixed":
  80615. return this.finishNode(node, "MixedTypeAnnotation");
  80616. case "empty":
  80617. return this.finishNode(node, "EmptyTypeAnnotation");
  80618. case "number":
  80619. return this.finishNode(node, "NumberTypeAnnotation");
  80620. case "string":
  80621. return this.finishNode(node, "StringTypeAnnotation");
  80622. case "symbol":
  80623. return this.finishNode(node, "SymbolTypeAnnotation");
  80624. default:
  80625. this.checkNotUnderscore(id.name);
  80626. return this.flowParseGenericType(startPos, startLoc, id);
  80627. }
  80628. }
  80629. flowParsePrimaryType() {
  80630. const startPos = this.state.start;
  80631. const startLoc = this.state.startLoc;
  80632. const node = this.startNode();
  80633. let tmp;
  80634. let type;
  80635. let isGroupedType = false;
  80636. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  80637. switch (this.state.type) {
  80638. case types$12.name:
  80639. if (this.isContextual("interface")) {
  80640. return this.flowParseInterfaceType();
  80641. }
  80642. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  80643. case types$12.braceL:
  80644. return this.flowParseObjectType({
  80645. allowStatic: false,
  80646. allowExact: false,
  80647. allowSpread: true,
  80648. allowProto: false,
  80649. allowInexact: true
  80650. });
  80651. case types$12.braceBarL:
  80652. return this.flowParseObjectType({
  80653. allowStatic: false,
  80654. allowExact: true,
  80655. allowSpread: true,
  80656. allowProto: false,
  80657. allowInexact: false
  80658. });
  80659. case types$12.bracketL:
  80660. this.state.noAnonFunctionType = false;
  80661. type = this.flowParseTupleType();
  80662. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  80663. return type;
  80664. case types$12.relational:
  80665. if (this.state.value === "<") {
  80666. node.typeParameters = this.flowParseTypeParameterDeclaration();
  80667. this.expect(types$12.parenL);
  80668. tmp = this.flowParseFunctionTypeParams();
  80669. node.params = tmp.params;
  80670. node.rest = tmp.rest;
  80671. node.this = tmp._this;
  80672. this.expect(types$12.parenR);
  80673. this.expect(types$12.arrow);
  80674. node.returnType = this.flowParseType();
  80675. return this.finishNode(node, "FunctionTypeAnnotation");
  80676. }
  80677. break;
  80678. case types$12.parenL:
  80679. this.next();
  80680. if (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  80681. if (this.match(types$12.name) || this.match(types$12._this)) {
  80682. const token = this.lookahead().type;
  80683. isGroupedType = token !== types$12.question && token !== types$12.colon;
  80684. } else {
  80685. isGroupedType = true;
  80686. }
  80687. }
  80688. if (isGroupedType) {
  80689. this.state.noAnonFunctionType = false;
  80690. type = this.flowParseType();
  80691. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  80692. if (this.state.noAnonFunctionType || !(this.match(types$12.comma) || this.match(types$12.parenR) && this.lookahead().type === types$12.arrow)) {
  80693. this.expect(types$12.parenR);
  80694. return type;
  80695. } else {
  80696. this.eat(types$12.comma);
  80697. }
  80698. }
  80699. if (type) {
  80700. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  80701. } else {
  80702. tmp = this.flowParseFunctionTypeParams();
  80703. }
  80704. node.params = tmp.params;
  80705. node.rest = tmp.rest;
  80706. node.this = tmp._this;
  80707. this.expect(types$12.parenR);
  80708. this.expect(types$12.arrow);
  80709. node.returnType = this.flowParseType();
  80710. node.typeParameters = null;
  80711. return this.finishNode(node, "FunctionTypeAnnotation");
  80712. case types$12.string:
  80713. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  80714. case types$12._true:
  80715. case types$12._false:
  80716. node.value = this.match(types$12._true);
  80717. this.next();
  80718. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  80719. case types$12.plusMin:
  80720. if (this.state.value === "-") {
  80721. this.next();
  80722. if (this.match(types$12.num)) {
  80723. return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
  80724. }
  80725. if (this.match(types$12.bigint)) {
  80726. return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
  80727. }
  80728. throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand);
  80729. }
  80730. throw this.unexpected();
  80731. case types$12.num:
  80732. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  80733. case types$12.bigint:
  80734. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  80735. case types$12._void:
  80736. this.next();
  80737. return this.finishNode(node, "VoidTypeAnnotation");
  80738. case types$12._null:
  80739. this.next();
  80740. return this.finishNode(node, "NullLiteralTypeAnnotation");
  80741. case types$12._this:
  80742. this.next();
  80743. return this.finishNode(node, "ThisTypeAnnotation");
  80744. case types$12.star:
  80745. this.next();
  80746. return this.finishNode(node, "ExistsTypeAnnotation");
  80747. default:
  80748. if (this.state.type.keyword === "typeof") {
  80749. return this.flowParseTypeofType();
  80750. } else if (this.state.type.keyword) {
  80751. const label = this.state.type.label;
  80752. this.next();
  80753. return super.createIdentifier(node, label);
  80754. }
  80755. }
  80756. throw this.unexpected();
  80757. }
  80758. flowParsePostfixType() {
  80759. const startPos = this.state.start;
  80760. const startLoc = this.state.startLoc;
  80761. let type = this.flowParsePrimaryType();
  80762. let seenOptionalIndexedAccess = false;
  80763. while ((this.match(types$12.bracketL) || this.match(types$12.questionDot)) && !this.canInsertSemicolon()) {
  80764. const node = this.startNodeAt(startPos, startLoc);
  80765. const optional = this.eat(types$12.questionDot);
  80766. seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
  80767. this.expect(types$12.bracketL);
  80768. if (!optional && this.match(types$12.bracketR)) {
  80769. node.elementType = type;
  80770. this.next();
  80771. type = this.finishNode(node, "ArrayTypeAnnotation");
  80772. } else {
  80773. node.objectType = type;
  80774. node.indexType = this.flowParseType();
  80775. this.expect(types$12.bracketR);
  80776. if (seenOptionalIndexedAccess) {
  80777. node.optional = optional;
  80778. type = this.finishNode(node, "OptionalIndexedAccessType");
  80779. } else {
  80780. type = this.finishNode(node, "IndexedAccessType");
  80781. }
  80782. }
  80783. }
  80784. return type;
  80785. }
  80786. flowParsePrefixType() {
  80787. const node = this.startNode();
  80788. if (this.eat(types$12.question)) {
  80789. node.typeAnnotation = this.flowParsePrefixType();
  80790. return this.finishNode(node, "NullableTypeAnnotation");
  80791. } else {
  80792. return this.flowParsePostfixType();
  80793. }
  80794. }
  80795. flowParseAnonFunctionWithoutParens() {
  80796. const param = this.flowParsePrefixType();
  80797. if (!this.state.noAnonFunctionType && this.eat(types$12.arrow)) {
  80798. const node = this.startNodeAt(param.start, param.loc.start);
  80799. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  80800. node.rest = null;
  80801. node.this = null;
  80802. node.returnType = this.flowParseType();
  80803. node.typeParameters = null;
  80804. return this.finishNode(node, "FunctionTypeAnnotation");
  80805. }
  80806. return param;
  80807. }
  80808. flowParseIntersectionType() {
  80809. const node = this.startNode();
  80810. this.eat(types$12.bitwiseAND);
  80811. const type = this.flowParseAnonFunctionWithoutParens();
  80812. node.types = [type];
  80813. while (this.eat(types$12.bitwiseAND)) {
  80814. node.types.push(this.flowParseAnonFunctionWithoutParens());
  80815. }
  80816. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  80817. }
  80818. flowParseUnionType() {
  80819. const node = this.startNode();
  80820. this.eat(types$12.bitwiseOR);
  80821. const type = this.flowParseIntersectionType();
  80822. node.types = [type];
  80823. while (this.eat(types$12.bitwiseOR)) {
  80824. node.types.push(this.flowParseIntersectionType());
  80825. }
  80826. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  80827. }
  80828. flowParseType() {
  80829. const oldInType = this.state.inType;
  80830. this.state.inType = true;
  80831. const type = this.flowParseUnionType();
  80832. this.state.inType = oldInType;
  80833. return type;
  80834. }
  80835. flowParseTypeOrImplicitInstantiation() {
  80836. if (this.state.type === types$12.name && this.state.value === "_") {
  80837. const startPos = this.state.start;
  80838. const startLoc = this.state.startLoc;
  80839. const node = this.parseIdentifier();
  80840. return this.flowParseGenericType(startPos, startLoc, node);
  80841. } else {
  80842. return this.flowParseType();
  80843. }
  80844. }
  80845. flowParseTypeAnnotation() {
  80846. const node = this.startNode();
  80847. node.typeAnnotation = this.flowParseTypeInitialiser();
  80848. return this.finishNode(node, "TypeAnnotation");
  80849. }
  80850. flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  80851. const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  80852. if (this.match(types$12.colon)) {
  80853. ident.typeAnnotation = this.flowParseTypeAnnotation();
  80854. this.resetEndLocation(ident);
  80855. }
  80856. return ident;
  80857. }
  80858. typeCastToParameter(node) {
  80859. node.expression.typeAnnotation = node.typeAnnotation;
  80860. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  80861. return node.expression;
  80862. }
  80863. flowParseVariance() {
  80864. let variance = null;
  80865. if (this.match(types$12.plusMin)) {
  80866. variance = this.startNode();
  80867. if (this.state.value === "+") {
  80868. variance.kind = "plus";
  80869. } else {
  80870. variance.kind = "minus";
  80871. }
  80872. this.next();
  80873. this.finishNode(variance, "Variance");
  80874. }
  80875. return variance;
  80876. }
  80877. parseFunctionBody(node, allowExpressionBody, isMethod = false) {
  80878. if (allowExpressionBody) {
  80879. return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
  80880. }
  80881. return super.parseFunctionBody(node, false, isMethod);
  80882. }
  80883. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  80884. if (this.match(types$12.colon)) {
  80885. const typeNode = this.startNode();
  80886. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  80887. node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  80888. }
  80889. super.parseFunctionBodyAndFinish(node, type, isMethod);
  80890. }
  80891. parseStatement(context, topLevel) {
  80892. if (this.state.strict && this.match(types$12.name) && this.state.value === "interface") {
  80893. const lookahead2 = this.lookahead();
  80894. if (lookahead2.type === types$12.name || isKeyword(lookahead2.value)) {
  80895. const node = this.startNode();
  80896. this.next();
  80897. return this.flowParseInterface(node);
  80898. }
  80899. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  80900. const node = this.startNode();
  80901. this.next();
  80902. return this.flowParseEnumDeclaration(node);
  80903. }
  80904. const stmt = super.parseStatement(context, topLevel);
  80905. if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) {
  80906. this.flowPragma = null;
  80907. }
  80908. return stmt;
  80909. }
  80910. parseExpressionStatement(node, expr) {
  80911. if (expr.type === "Identifier") {
  80912. if (expr.name === "declare") {
  80913. if (this.match(types$12._class) || this.match(types$12.name) || this.match(types$12._function) || this.match(types$12._var) || this.match(types$12._export)) {
  80914. return this.flowParseDeclare(node);
  80915. }
  80916. } else if (this.match(types$12.name)) {
  80917. if (expr.name === "interface") {
  80918. return this.flowParseInterface(node);
  80919. } else if (expr.name === "type") {
  80920. return this.flowParseTypeAlias(node);
  80921. } else if (expr.name === "opaque") {
  80922. return this.flowParseOpaqueType(node, false);
  80923. }
  80924. }
  80925. }
  80926. return super.parseExpressionStatement(node, expr);
  80927. }
  80928. shouldParseExportDeclaration() {
  80929. return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || super.shouldParseExportDeclaration();
  80930. }
  80931. isExportDefaultSpecifier() {
  80932. if (this.match(types$12.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
  80933. return false;
  80934. }
  80935. return super.isExportDefaultSpecifier();
  80936. }
  80937. parseExportDefaultExpression() {
  80938. if (this.shouldParseEnums() && this.isContextual("enum")) {
  80939. const node = this.startNode();
  80940. this.next();
  80941. return this.flowParseEnumDeclaration(node);
  80942. }
  80943. return super.parseExportDefaultExpression();
  80944. }
  80945. parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  80946. if (!this.match(types$12.question))
  80947. return expr;
  80948. if (this.state.maybeInArrowParameters) {
  80949. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  80950. if (!result.node) {
  80951. if (result.error) {
  80952. super.setOptionalParametersError(refExpressionErrors, result.error);
  80953. }
  80954. return expr;
  80955. }
  80956. if (result.error)
  80957. this.state = result.failState;
  80958. return result.node;
  80959. }
  80960. this.expect(types$12.question);
  80961. const state = this.state.clone();
  80962. const originalNoArrowAt = this.state.noArrowAt;
  80963. const node = this.startNodeAt(startPos, startLoc);
  80964. let {
  80965. consequent,
  80966. failed
  80967. } = this.tryParseConditionalConsequent();
  80968. let [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  80969. if (failed || invalid2.length > 0) {
  80970. const noArrowAt = [...originalNoArrowAt];
  80971. if (invalid2.length > 0) {
  80972. this.state = state;
  80973. this.state.noArrowAt = noArrowAt;
  80974. for (let i = 0; i < invalid2.length; i++) {
  80975. noArrowAt.push(invalid2[i].start);
  80976. }
  80977. ({
  80978. consequent,
  80979. failed
  80980. } = this.tryParseConditionalConsequent());
  80981. [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  80982. }
  80983. if (failed && valid2.length > 1) {
  80984. this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);
  80985. }
  80986. if (failed && valid2.length === 1) {
  80987. this.state = state;
  80988. this.state.noArrowAt = noArrowAt.concat(valid2[0].start);
  80989. ({
  80990. consequent,
  80991. failed
  80992. } = this.tryParseConditionalConsequent());
  80993. }
  80994. }
  80995. this.getArrowLikeExpressions(consequent, true);
  80996. this.state.noArrowAt = originalNoArrowAt;
  80997. this.expect(types$12.colon);
  80998. node.test = expr;
  80999. node.consequent = consequent;
  81000. node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(void 0, void 0));
  81001. return this.finishNode(node, "ConditionalExpression");
  81002. }
  81003. tryParseConditionalConsequent() {
  81004. this.state.noArrowParamsConversionAt.push(this.state.start);
  81005. const consequent = this.parseMaybeAssignAllowIn();
  81006. const failed = !this.match(types$12.colon);
  81007. this.state.noArrowParamsConversionAt.pop();
  81008. return {
  81009. consequent,
  81010. failed
  81011. };
  81012. }
  81013. getArrowLikeExpressions(node, disallowInvalid) {
  81014. const stack = [node];
  81015. const arrows = [];
  81016. while (stack.length !== 0) {
  81017. const node2 = stack.pop();
  81018. if (node2.type === "ArrowFunctionExpression") {
  81019. if (node2.typeParameters || !node2.returnType) {
  81020. this.finishArrowValidation(node2);
  81021. } else {
  81022. arrows.push(node2);
  81023. }
  81024. stack.push(node2.body);
  81025. } else if (node2.type === "ConditionalExpression") {
  81026. stack.push(node2.consequent);
  81027. stack.push(node2.alternate);
  81028. }
  81029. }
  81030. if (disallowInvalid) {
  81031. arrows.forEach((node2) => this.finishArrowValidation(node2));
  81032. return [arrows, []];
  81033. }
  81034. return partition(arrows, (node2) => node2.params.every((param) => this.isAssignable(param, true)));
  81035. }
  81036. finishArrowValidation(node) {
  81037. var _node$extra;
  81038. this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false);
  81039. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  81040. super.checkParams(node, false, true);
  81041. this.scope.exit();
  81042. }
  81043. forwardNoArrowParamsConversionAt(node, parse5) {
  81044. let result;
  81045. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  81046. this.state.noArrowParamsConversionAt.push(this.state.start);
  81047. result = parse5();
  81048. this.state.noArrowParamsConversionAt.pop();
  81049. } else {
  81050. result = parse5();
  81051. }
  81052. return result;
  81053. }
  81054. parseParenItem(node, startPos, startLoc) {
  81055. node = super.parseParenItem(node, startPos, startLoc);
  81056. if (this.eat(types$12.question)) {
  81057. node.optional = true;
  81058. this.resetEndLocation(node);
  81059. }
  81060. if (this.match(types$12.colon)) {
  81061. const typeCastNode = this.startNodeAt(startPos, startLoc);
  81062. typeCastNode.expression = node;
  81063. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  81064. return this.finishNode(typeCastNode, "TypeCastExpression");
  81065. }
  81066. return node;
  81067. }
  81068. assertModuleNodeAllowed(node) {
  81069. if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
  81070. return;
  81071. }
  81072. super.assertModuleNodeAllowed(node);
  81073. }
  81074. parseExport(node) {
  81075. const decl = super.parseExport(node);
  81076. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  81077. decl.exportKind = decl.exportKind || "value";
  81078. }
  81079. return decl;
  81080. }
  81081. parseExportDeclaration(node) {
  81082. if (this.isContextual("type")) {
  81083. node.exportKind = "type";
  81084. const declarationNode = this.startNode();
  81085. this.next();
  81086. if (this.match(types$12.braceL)) {
  81087. node.specifiers = this.parseExportSpecifiers();
  81088. this.parseExportFrom(node);
  81089. return null;
  81090. } else {
  81091. return this.flowParseTypeAlias(declarationNode);
  81092. }
  81093. } else if (this.isContextual("opaque")) {
  81094. node.exportKind = "type";
  81095. const declarationNode = this.startNode();
  81096. this.next();
  81097. return this.flowParseOpaqueType(declarationNode, false);
  81098. } else if (this.isContextual("interface")) {
  81099. node.exportKind = "type";
  81100. const declarationNode = this.startNode();
  81101. this.next();
  81102. return this.flowParseInterface(declarationNode);
  81103. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  81104. node.exportKind = "value";
  81105. const declarationNode = this.startNode();
  81106. this.next();
  81107. return this.flowParseEnumDeclaration(declarationNode);
  81108. } else {
  81109. return super.parseExportDeclaration(node);
  81110. }
  81111. }
  81112. eatExportStar(node) {
  81113. if (super.eatExportStar(...arguments))
  81114. return true;
  81115. if (this.isContextual("type") && this.lookahead().type === types$12.star) {
  81116. node.exportKind = "type";
  81117. this.next();
  81118. this.next();
  81119. return true;
  81120. }
  81121. return false;
  81122. }
  81123. maybeParseExportNamespaceSpecifier(node) {
  81124. const pos = this.state.start;
  81125. const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
  81126. if (hasNamespace && node.exportKind === "type") {
  81127. this.unexpected(pos);
  81128. }
  81129. return hasNamespace;
  81130. }
  81131. parseClassId(node, isStatement, optionalId) {
  81132. super.parseClassId(node, isStatement, optionalId);
  81133. if (this.isRelational("<")) {
  81134. node.typeParameters = this.flowParseTypeParameterDeclaration();
  81135. }
  81136. }
  81137. parseClassMember(classBody, member, state) {
  81138. const pos = this.state.start;
  81139. if (this.isContextual("declare")) {
  81140. if (this.parseClassMemberFromModifier(classBody, member)) {
  81141. return;
  81142. }
  81143. member.declare = true;
  81144. }
  81145. super.parseClassMember(classBody, member, state);
  81146. if (member.declare) {
  81147. if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
  81148. this.raise(pos, FlowErrors.DeclareClassElement);
  81149. } else if (member.value) {
  81150. this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer);
  81151. }
  81152. }
  81153. }
  81154. isIterator(word) {
  81155. return word === "iterator" || word === "asyncIterator";
  81156. }
  81157. readIterator() {
  81158. const word = super.readWord1();
  81159. const fullWord = "@@" + word;
  81160. if (!this.isIterator(word) || !this.state.inType) {
  81161. this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, fullWord);
  81162. }
  81163. this.finishToken(types$12.name, fullWord);
  81164. }
  81165. getTokenFromCode(code2) {
  81166. const next = this.input.charCodeAt(this.state.pos + 1);
  81167. if (code2 === 123 && next === 124) {
  81168. return this.finishOp(types$12.braceBarL, 2);
  81169. } else if (this.state.inType && (code2 === 62 || code2 === 60)) {
  81170. return this.finishOp(types$12.relational, 1);
  81171. } else if (this.state.inType && code2 === 63) {
  81172. if (next === 46) {
  81173. return this.finishOp(types$12.questionDot, 2);
  81174. }
  81175. return this.finishOp(types$12.question, 1);
  81176. } else if (isIteratorStart(code2, next)) {
  81177. this.state.pos += 2;
  81178. return this.readIterator();
  81179. } else {
  81180. return super.getTokenFromCode(code2);
  81181. }
  81182. }
  81183. isAssignable(node, isBinding) {
  81184. switch (node.type) {
  81185. case "Identifier":
  81186. case "ObjectPattern":
  81187. case "ArrayPattern":
  81188. case "AssignmentPattern":
  81189. return true;
  81190. case "ObjectExpression": {
  81191. const last = node.properties.length - 1;
  81192. return node.properties.every((prop, i) => {
  81193. return prop.type !== "ObjectMethod" && (i === last || prop.type === "SpreadElement") && this.isAssignable(prop);
  81194. });
  81195. }
  81196. case "ObjectProperty":
  81197. return this.isAssignable(node.value);
  81198. case "SpreadElement":
  81199. return this.isAssignable(node.argument);
  81200. case "ArrayExpression":
  81201. return node.elements.every((element2) => this.isAssignable(element2));
  81202. case "AssignmentExpression":
  81203. return node.operator === "=";
  81204. case "ParenthesizedExpression":
  81205. case "TypeCastExpression":
  81206. return this.isAssignable(node.expression);
  81207. case "MemberExpression":
  81208. case "OptionalMemberExpression":
  81209. return !isBinding;
  81210. default:
  81211. return false;
  81212. }
  81213. }
  81214. toAssignable(node, isLHS = false) {
  81215. if (node.type === "TypeCastExpression") {
  81216. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  81217. } else {
  81218. return super.toAssignable(node, isLHS);
  81219. }
  81220. }
  81221. toAssignableList(exprList, trailingCommaPos, isLHS) {
  81222. for (let i = 0; i < exprList.length; i++) {
  81223. const expr = exprList[i];
  81224. if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
  81225. exprList[i] = this.typeCastToParameter(expr);
  81226. }
  81227. }
  81228. return super.toAssignableList(exprList, trailingCommaPos, isLHS);
  81229. }
  81230. toReferencedList(exprList, isParenthesizedExpr) {
  81231. for (let i = 0; i < exprList.length; i++) {
  81232. var _expr$extra;
  81233. const expr = exprList[i];
  81234. if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  81235. this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);
  81236. }
  81237. }
  81238. return exprList;
  81239. }
  81240. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  81241. const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
  81242. if (canBePattern && !this.state.maybeInArrowParameters) {
  81243. this.toReferencedList(node.elements);
  81244. }
  81245. return node;
  81246. }
  81247. checkLVal(expr, ...args) {
  81248. if (expr.type !== "TypeCastExpression") {
  81249. return super.checkLVal(expr, ...args);
  81250. }
  81251. }
  81252. parseClassProperty(node) {
  81253. if (this.match(types$12.colon)) {
  81254. node.typeAnnotation = this.flowParseTypeAnnotation();
  81255. }
  81256. return super.parseClassProperty(node);
  81257. }
  81258. parseClassPrivateProperty(node) {
  81259. if (this.match(types$12.colon)) {
  81260. node.typeAnnotation = this.flowParseTypeAnnotation();
  81261. }
  81262. return super.parseClassPrivateProperty(node);
  81263. }
  81264. isClassMethod() {
  81265. return this.isRelational("<") || super.isClassMethod();
  81266. }
  81267. isClassProperty() {
  81268. return this.match(types$12.colon) || super.isClassProperty();
  81269. }
  81270. isNonstaticConstructor(method) {
  81271. return !this.match(types$12.colon) && super.isNonstaticConstructor(method);
  81272. }
  81273. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  81274. if (method.variance) {
  81275. this.unexpected(method.variance.start);
  81276. }
  81277. delete method.variance;
  81278. if (this.isRelational("<")) {
  81279. method.typeParameters = this.flowParseTypeParameterDeclaration();
  81280. }
  81281. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  81282. if (method.params && isConstructor) {
  81283. const params = method.params;
  81284. if (params.length > 0 && this.isThisParam(params[0])) {
  81285. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  81286. }
  81287. } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
  81288. const params = method.value.params;
  81289. if (params.length > 0 && this.isThisParam(params[0])) {
  81290. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  81291. }
  81292. }
  81293. }
  81294. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  81295. if (method.variance) {
  81296. this.unexpected(method.variance.start);
  81297. }
  81298. delete method.variance;
  81299. if (this.isRelational("<")) {
  81300. method.typeParameters = this.flowParseTypeParameterDeclaration();
  81301. }
  81302. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  81303. }
  81304. parseClassSuper(node) {
  81305. super.parseClassSuper(node);
  81306. if (node.superClass && this.isRelational("<")) {
  81307. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  81308. }
  81309. if (this.isContextual("implements")) {
  81310. this.next();
  81311. const implemented = node.implements = [];
  81312. do {
  81313. const node2 = this.startNode();
  81314. node2.id = this.flowParseRestrictedIdentifier(true);
  81315. if (this.isRelational("<")) {
  81316. node2.typeParameters = this.flowParseTypeParameterInstantiation();
  81317. } else {
  81318. node2.typeParameters = null;
  81319. }
  81320. implemented.push(this.finishNode(node2, "ClassImplements"));
  81321. } while (this.eat(types$12.comma));
  81322. }
  81323. }
  81324. checkGetterSetterParams(method) {
  81325. super.checkGetterSetterParams(method);
  81326. const params = this.getObjectOrClassMethodParams(method);
  81327. if (params.length > 0) {
  81328. const param = params[0];
  81329. if (this.isThisParam(param) && method.kind === "get") {
  81330. this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam);
  81331. } else if (this.isThisParam(param)) {
  81332. this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam);
  81333. }
  81334. }
  81335. }
  81336. parsePropertyName(node, isPrivateNameAllowed) {
  81337. const variance = this.flowParseVariance();
  81338. const key = super.parsePropertyName(node, isPrivateNameAllowed);
  81339. node.variance = variance;
  81340. return key;
  81341. }
  81342. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  81343. if (prop.variance) {
  81344. this.unexpected(prop.variance.start);
  81345. }
  81346. delete prop.variance;
  81347. let typeParameters;
  81348. if (this.isRelational("<") && !isAccessor) {
  81349. typeParameters = this.flowParseTypeParameterDeclaration();
  81350. if (!this.match(types$12.parenL))
  81351. this.unexpected();
  81352. }
  81353. super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  81354. if (typeParameters) {
  81355. (prop.value || prop).typeParameters = typeParameters;
  81356. }
  81357. }
  81358. parseAssignableListItemTypes(param) {
  81359. if (this.eat(types$12.question)) {
  81360. if (param.type !== "Identifier") {
  81361. this.raise(param.start, FlowErrors.OptionalBindingPattern);
  81362. }
  81363. if (this.isThisParam(param)) {
  81364. this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional);
  81365. }
  81366. param.optional = true;
  81367. }
  81368. if (this.match(types$12.colon)) {
  81369. param.typeAnnotation = this.flowParseTypeAnnotation();
  81370. } else if (this.isThisParam(param)) {
  81371. this.raise(param.start, FlowErrors.ThisParamAnnotationRequired);
  81372. }
  81373. if (this.match(types$12.eq) && this.isThisParam(param)) {
  81374. this.raise(param.start, FlowErrors.ThisParamNoDefault);
  81375. }
  81376. this.resetEndLocation(param);
  81377. return param;
  81378. }
  81379. parseMaybeDefault(startPos, startLoc, left) {
  81380. const node = super.parseMaybeDefault(startPos, startLoc, left);
  81381. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  81382. this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);
  81383. }
  81384. return node;
  81385. }
  81386. shouldParseDefaultImport(node) {
  81387. if (!hasTypeImportKind(node)) {
  81388. return super.shouldParseDefaultImport(node);
  81389. }
  81390. return isMaybeDefaultImport(this.state);
  81391. }
  81392. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  81393. specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  81394. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  81395. node.specifiers.push(this.finishNode(specifier, type));
  81396. }
  81397. maybeParseDefaultImportSpecifier(node) {
  81398. node.importKind = "value";
  81399. let kind = null;
  81400. if (this.match(types$12._typeof)) {
  81401. kind = "typeof";
  81402. } else if (this.isContextual("type")) {
  81403. kind = "type";
  81404. }
  81405. if (kind) {
  81406. const lh = this.lookahead();
  81407. if (kind === "type" && lh.type === types$12.star) {
  81408. this.unexpected(lh.start);
  81409. }
  81410. if (isMaybeDefaultImport(lh) || lh.type === types$12.braceL || lh.type === types$12.star) {
  81411. this.next();
  81412. node.importKind = kind;
  81413. }
  81414. }
  81415. return super.maybeParseDefaultImportSpecifier(node);
  81416. }
  81417. parseImportSpecifier(node) {
  81418. const specifier = this.startNode();
  81419. const firstIdentIsString = this.match(types$12.string);
  81420. const firstIdent = this.parseModuleExportName();
  81421. let specifierTypeKind = null;
  81422. if (firstIdent.type === "Identifier") {
  81423. if (firstIdent.name === "type") {
  81424. specifierTypeKind = "type";
  81425. } else if (firstIdent.name === "typeof") {
  81426. specifierTypeKind = "typeof";
  81427. }
  81428. }
  81429. let isBinding = false;
  81430. if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
  81431. const as_ident = this.parseIdentifier(true);
  81432. if (specifierTypeKind !== null && !this.match(types$12.name) && !this.state.type.keyword) {
  81433. specifier.imported = as_ident;
  81434. specifier.importKind = specifierTypeKind;
  81435. specifier.local = as_ident.__clone();
  81436. } else {
  81437. specifier.imported = firstIdent;
  81438. specifier.importKind = null;
  81439. specifier.local = this.parseIdentifier();
  81440. }
  81441. } else if (specifierTypeKind !== null && (this.match(types$12.name) || this.state.type.keyword)) {
  81442. specifier.imported = this.parseIdentifier(true);
  81443. specifier.importKind = specifierTypeKind;
  81444. if (this.eatContextual("as")) {
  81445. specifier.local = this.parseIdentifier();
  81446. } else {
  81447. isBinding = true;
  81448. specifier.local = specifier.imported.__clone();
  81449. }
  81450. } else {
  81451. if (firstIdentIsString) {
  81452. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value);
  81453. }
  81454. isBinding = true;
  81455. specifier.imported = firstIdent;
  81456. specifier.importKind = null;
  81457. specifier.local = specifier.imported.__clone();
  81458. }
  81459. const nodeIsTypeImport = hasTypeImportKind(node);
  81460. const specifierIsTypeImport = hasTypeImportKind(specifier);
  81461. if (nodeIsTypeImport && specifierIsTypeImport) {
  81462. this.raise(specifier.start, FlowErrors.ImportTypeShorthandOnlyInPureImport);
  81463. }
  81464. if (nodeIsTypeImport || specifierIsTypeImport) {
  81465. this.checkReservedType(specifier.local.name, specifier.local.start, true);
  81466. }
  81467. if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
  81468. this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  81469. }
  81470. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  81471. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  81472. }
  81473. parseBindingAtom() {
  81474. switch (this.state.type) {
  81475. case types$12._this:
  81476. return this.parseIdentifier(true);
  81477. default:
  81478. return super.parseBindingAtom();
  81479. }
  81480. }
  81481. parseFunctionParams(node, allowModifiers) {
  81482. const kind = node.kind;
  81483. if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
  81484. node.typeParameters = this.flowParseTypeParameterDeclaration();
  81485. }
  81486. super.parseFunctionParams(node, allowModifiers);
  81487. }
  81488. parseVarId(decl, kind) {
  81489. super.parseVarId(decl, kind);
  81490. if (this.match(types$12.colon)) {
  81491. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  81492. this.resetEndLocation(decl.id);
  81493. }
  81494. }
  81495. parseAsyncArrowFromCallExpression(node, call) {
  81496. if (this.match(types$12.colon)) {
  81497. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  81498. this.state.noAnonFunctionType = true;
  81499. node.returnType = this.flowParseTypeAnnotation();
  81500. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  81501. }
  81502. return super.parseAsyncArrowFromCallExpression(node, call);
  81503. }
  81504. shouldParseAsyncArrow() {
  81505. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  81506. }
  81507. parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  81508. var _jsx;
  81509. let state = null;
  81510. let jsx2;
  81511. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  81512. state = this.state.clone();
  81513. jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state);
  81514. if (!jsx2.error)
  81515. return jsx2.node;
  81516. const {
  81517. context
  81518. } = this.state;
  81519. const curContext = context[context.length - 1];
  81520. if (curContext === types2.j_oTag) {
  81521. context.length -= 2;
  81522. } else if (curContext === types2.j_expr) {
  81523. context.length -= 1;
  81524. }
  81525. }
  81526. if ((_jsx = jsx2) != null && _jsx.error || this.isRelational("<")) {
  81527. var _jsx2, _jsx3;
  81528. state = state || this.state.clone();
  81529. let typeParameters;
  81530. const arrow = this.tryParse((abort) => {
  81531. var _arrowExpression$extr;
  81532. typeParameters = this.flowParseTypeParameterDeclaration();
  81533. const arrowExpression2 = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
  81534. const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  81535. this.resetStartLocationFromNode(result, typeParameters);
  81536. return result;
  81537. });
  81538. if (arrowExpression2.type !== "ArrowFunctionExpression" && (_arrowExpression$extr = arrowExpression2.extra) != null && _arrowExpression$extr.parenthesized) {
  81539. abort();
  81540. }
  81541. const expr = this.maybeUnwrapTypeCastExpression(arrowExpression2);
  81542. expr.typeParameters = typeParameters;
  81543. this.resetStartLocationFromNode(expr, typeParameters);
  81544. return arrowExpression2;
  81545. }, state);
  81546. let arrowExpression = null;
  81547. if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
  81548. if (!arrow.error && !arrow.aborted) {
  81549. if (arrow.node.async) {
  81550. this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction);
  81551. }
  81552. return arrow.node;
  81553. }
  81554. arrowExpression = arrow.node;
  81555. }
  81556. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  81557. this.state = jsx2.failState;
  81558. return jsx2.node;
  81559. }
  81560. if (arrowExpression) {
  81561. this.state = arrow.failState;
  81562. return arrowExpression;
  81563. }
  81564. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  81565. throw jsx2.error;
  81566. if (arrow.thrown)
  81567. throw arrow.error;
  81568. throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter);
  81569. }
  81570. return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  81571. }
  81572. parseArrow(node) {
  81573. if (this.match(types$12.colon)) {
  81574. const result = this.tryParse(() => {
  81575. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  81576. this.state.noAnonFunctionType = true;
  81577. const typeNode = this.startNode();
  81578. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  81579. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  81580. if (this.canInsertSemicolon())
  81581. this.unexpected();
  81582. if (!this.match(types$12.arrow))
  81583. this.unexpected();
  81584. return typeNode;
  81585. });
  81586. if (result.thrown)
  81587. return null;
  81588. if (result.error)
  81589. this.state = result.failState;
  81590. node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  81591. }
  81592. return super.parseArrow(node);
  81593. }
  81594. shouldParseArrow() {
  81595. return this.match(types$12.colon) || super.shouldParseArrow();
  81596. }
  81597. setArrowFunctionParameters(node, params) {
  81598. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  81599. node.params = params;
  81600. } else {
  81601. super.setArrowFunctionParameters(node, params);
  81602. }
  81603. }
  81604. checkParams(node, allowDuplicates, isArrowFunction) {
  81605. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  81606. return;
  81607. }
  81608. for (let i = 0; i < node.params.length; i++) {
  81609. if (this.isThisParam(node.params[i]) && i > 0) {
  81610. this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst);
  81611. }
  81612. }
  81613. return super.checkParams(...arguments);
  81614. }
  81615. parseParenAndDistinguishExpression(canBeArrow) {
  81616. return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  81617. }
  81618. parseSubscripts(base2, startPos, startLoc, noCalls) {
  81619. if (base2.type === "Identifier" && base2.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
  81620. this.next();
  81621. const node = this.startNodeAt(startPos, startLoc);
  81622. node.callee = base2;
  81623. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  81624. base2 = this.finishNode(node, "CallExpression");
  81625. } else if (base2.type === "Identifier" && base2.name === "async" && this.isRelational("<")) {
  81626. const state = this.state.clone();
  81627. const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state);
  81628. if (!arrow.error && !arrow.aborted)
  81629. return arrow.node;
  81630. const result = this.tryParse(() => super.parseSubscripts(base2, startPos, startLoc, noCalls), state);
  81631. if (result.node && !result.error)
  81632. return result.node;
  81633. if (arrow.node) {
  81634. this.state = arrow.failState;
  81635. return arrow.node;
  81636. }
  81637. if (result.node) {
  81638. this.state = result.failState;
  81639. return result.node;
  81640. }
  81641. throw arrow.error || result.error;
  81642. }
  81643. return super.parseSubscripts(base2, startPos, startLoc, noCalls);
  81644. }
  81645. parseSubscript(base2, startPos, startLoc, noCalls, subscriptState) {
  81646. if (this.match(types$12.questionDot) && this.isLookaheadToken_lt()) {
  81647. subscriptState.optionalChainMember = true;
  81648. if (noCalls) {
  81649. subscriptState.stop = true;
  81650. return base2;
  81651. }
  81652. this.next();
  81653. const node = this.startNodeAt(startPos, startLoc);
  81654. node.callee = base2;
  81655. node.typeArguments = this.flowParseTypeParameterInstantiation();
  81656. this.expect(types$12.parenL);
  81657. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  81658. node.optional = true;
  81659. return this.finishCallExpression(node, true);
  81660. } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
  81661. const node = this.startNodeAt(startPos, startLoc);
  81662. node.callee = base2;
  81663. const result = this.tryParse(() => {
  81664. node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
  81665. this.expect(types$12.parenL);
  81666. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  81667. if (subscriptState.optionalChainMember)
  81668. node.optional = false;
  81669. return this.finishCallExpression(node, subscriptState.optionalChainMember);
  81670. });
  81671. if (result.node) {
  81672. if (result.error)
  81673. this.state = result.failState;
  81674. return result.node;
  81675. }
  81676. }
  81677. return super.parseSubscript(base2, startPos, startLoc, noCalls, subscriptState);
  81678. }
  81679. parseNewArguments(node) {
  81680. let targs = null;
  81681. if (this.shouldParseTypes() && this.isRelational("<")) {
  81682. targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
  81683. }
  81684. node.typeArguments = targs;
  81685. super.parseNewArguments(node);
  81686. }
  81687. parseAsyncArrowWithTypeParameters(startPos, startLoc) {
  81688. const node = this.startNodeAt(startPos, startLoc);
  81689. this.parseFunctionParams(node);
  81690. if (!this.parseArrow(node))
  81691. return;
  81692. return this.parseArrowExpression(node, void 0, true);
  81693. }
  81694. readToken_mult_modulo(code2) {
  81695. const next = this.input.charCodeAt(this.state.pos + 1);
  81696. if (code2 === 42 && next === 47 && this.state.hasFlowComment) {
  81697. this.state.hasFlowComment = false;
  81698. this.state.pos += 2;
  81699. this.nextToken();
  81700. return;
  81701. }
  81702. super.readToken_mult_modulo(code2);
  81703. }
  81704. readToken_pipe_amp(code2) {
  81705. const next = this.input.charCodeAt(this.state.pos + 1);
  81706. if (code2 === 124 && next === 125) {
  81707. this.finishOp(types$12.braceBarR, 2);
  81708. return;
  81709. }
  81710. super.readToken_pipe_amp(code2);
  81711. }
  81712. parseTopLevel(file, program) {
  81713. const fileNode = super.parseTopLevel(file, program);
  81714. if (this.state.hasFlowComment) {
  81715. this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);
  81716. }
  81717. return fileNode;
  81718. }
  81719. skipBlockComment() {
  81720. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  81721. if (this.state.hasFlowComment) {
  81722. this.unexpected(null, FlowErrors.NestedFlowComment);
  81723. }
  81724. this.hasFlowCommentCompletion();
  81725. this.state.pos += this.skipFlowComment();
  81726. this.state.hasFlowComment = true;
  81727. return;
  81728. }
  81729. if (this.state.hasFlowComment) {
  81730. const end = this.input.indexOf("*-/", this.state.pos += 2);
  81731. if (end === -1) {
  81732. throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment);
  81733. }
  81734. this.state.pos = end + 3;
  81735. return;
  81736. }
  81737. return super.skipBlockComment();
  81738. }
  81739. skipFlowComment() {
  81740. const {
  81741. pos
  81742. } = this.state;
  81743. let shiftToFirstNonWhiteSpace = 2;
  81744. while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
  81745. shiftToFirstNonWhiteSpace++;
  81746. }
  81747. const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
  81748. const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
  81749. if (ch2 === 58 && ch3 === 58) {
  81750. return shiftToFirstNonWhiteSpace + 2;
  81751. }
  81752. if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
  81753. return shiftToFirstNonWhiteSpace + 12;
  81754. }
  81755. if (ch2 === 58 && ch3 !== 58) {
  81756. return shiftToFirstNonWhiteSpace;
  81757. }
  81758. return false;
  81759. }
  81760. hasFlowCommentCompletion() {
  81761. const end = this.input.indexOf("*/", this.state.pos);
  81762. if (end === -1) {
  81763. throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment);
  81764. }
  81765. }
  81766. flowEnumErrorBooleanMemberNotInitialized(pos, {
  81767. enumName,
  81768. memberName
  81769. }) {
  81770. this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName);
  81771. }
  81772. flowEnumErrorInvalidMemberName(pos, {
  81773. enumName,
  81774. memberName
  81775. }) {
  81776. const suggestion = memberName[0].toUpperCase() + memberName.slice(1);
  81777. this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName);
  81778. }
  81779. flowEnumErrorDuplicateMemberName(pos, {
  81780. enumName,
  81781. memberName
  81782. }) {
  81783. this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);
  81784. }
  81785. flowEnumErrorInconsistentMemberValues(pos, {
  81786. enumName
  81787. }) {
  81788. this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);
  81789. }
  81790. flowEnumErrorInvalidExplicitType(pos, {
  81791. enumName,
  81792. suppliedType
  81793. }) {
  81794. return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType);
  81795. }
  81796. flowEnumErrorInvalidMemberInitializer(pos, {
  81797. enumName,
  81798. explicitType,
  81799. memberName
  81800. }) {
  81801. let message = null;
  81802. switch (explicitType) {
  81803. case "boolean":
  81804. case "number":
  81805. case "string":
  81806. message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;
  81807. break;
  81808. case "symbol":
  81809. message = FlowErrors.EnumInvalidMemberInitializerSymbolType;
  81810. break;
  81811. default:
  81812. message = FlowErrors.EnumInvalidMemberInitializerUnknownType;
  81813. }
  81814. return this.raise(pos, message, enumName, memberName, explicitType);
  81815. }
  81816. flowEnumErrorNumberMemberNotInitialized(pos, {
  81817. enumName,
  81818. memberName
  81819. }) {
  81820. this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName);
  81821. }
  81822. flowEnumErrorStringMemberInconsistentlyInitailized(pos, {
  81823. enumName
  81824. }) {
  81825. this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName);
  81826. }
  81827. flowEnumMemberInit() {
  81828. const startPos = this.state.start;
  81829. const endOfInit = () => this.match(types$12.comma) || this.match(types$12.braceR);
  81830. switch (this.state.type) {
  81831. case types$12.num: {
  81832. const literal2 = this.parseNumericLiteral(this.state.value);
  81833. if (endOfInit()) {
  81834. return {
  81835. type: "number",
  81836. pos: literal2.start,
  81837. value: literal2
  81838. };
  81839. }
  81840. return {
  81841. type: "invalid",
  81842. pos: startPos
  81843. };
  81844. }
  81845. case types$12.string: {
  81846. const literal2 = this.parseStringLiteral(this.state.value);
  81847. if (endOfInit()) {
  81848. return {
  81849. type: "string",
  81850. pos: literal2.start,
  81851. value: literal2
  81852. };
  81853. }
  81854. return {
  81855. type: "invalid",
  81856. pos: startPos
  81857. };
  81858. }
  81859. case types$12._true:
  81860. case types$12._false: {
  81861. const literal2 = this.parseBooleanLiteral(this.match(types$12._true));
  81862. if (endOfInit()) {
  81863. return {
  81864. type: "boolean",
  81865. pos: literal2.start,
  81866. value: literal2
  81867. };
  81868. }
  81869. return {
  81870. type: "invalid",
  81871. pos: startPos
  81872. };
  81873. }
  81874. default:
  81875. return {
  81876. type: "invalid",
  81877. pos: startPos
  81878. };
  81879. }
  81880. }
  81881. flowEnumMemberRaw() {
  81882. const pos = this.state.start;
  81883. const id = this.parseIdentifier(true);
  81884. const init = this.eat(types$12.eq) ? this.flowEnumMemberInit() : {
  81885. type: "none",
  81886. pos
  81887. };
  81888. return {
  81889. id,
  81890. init
  81891. };
  81892. }
  81893. flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
  81894. const {
  81895. explicitType
  81896. } = context;
  81897. if (explicitType === null) {
  81898. return;
  81899. }
  81900. if (explicitType !== expectedType) {
  81901. this.flowEnumErrorInvalidMemberInitializer(pos, context);
  81902. }
  81903. }
  81904. flowEnumMembers({
  81905. enumName,
  81906. explicitType
  81907. }) {
  81908. const seenNames = /* @__PURE__ */ new Set();
  81909. const members = {
  81910. booleanMembers: [],
  81911. numberMembers: [],
  81912. stringMembers: [],
  81913. defaultedMembers: []
  81914. };
  81915. let hasUnknownMembers = false;
  81916. while (!this.match(types$12.braceR)) {
  81917. if (this.eat(types$12.ellipsis)) {
  81918. hasUnknownMembers = true;
  81919. break;
  81920. }
  81921. const memberNode = this.startNode();
  81922. const {
  81923. id,
  81924. init
  81925. } = this.flowEnumMemberRaw();
  81926. const memberName = id.name;
  81927. if (memberName === "") {
  81928. continue;
  81929. }
  81930. if (/^[a-z]/.test(memberName)) {
  81931. this.flowEnumErrorInvalidMemberName(id.start, {
  81932. enumName,
  81933. memberName
  81934. });
  81935. }
  81936. if (seenNames.has(memberName)) {
  81937. this.flowEnumErrorDuplicateMemberName(id.start, {
  81938. enumName,
  81939. memberName
  81940. });
  81941. }
  81942. seenNames.add(memberName);
  81943. const context = {
  81944. enumName,
  81945. explicitType,
  81946. memberName
  81947. };
  81948. memberNode.id = id;
  81949. switch (init.type) {
  81950. case "boolean": {
  81951. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
  81952. memberNode.init = init.value;
  81953. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  81954. break;
  81955. }
  81956. case "number": {
  81957. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
  81958. memberNode.init = init.value;
  81959. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  81960. break;
  81961. }
  81962. case "string": {
  81963. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
  81964. memberNode.init = init.value;
  81965. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  81966. break;
  81967. }
  81968. case "invalid": {
  81969. throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
  81970. }
  81971. case "none": {
  81972. switch (explicitType) {
  81973. case "boolean":
  81974. this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
  81975. break;
  81976. case "number":
  81977. this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
  81978. break;
  81979. default:
  81980. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  81981. }
  81982. }
  81983. }
  81984. if (!this.match(types$12.braceR)) {
  81985. this.expect(types$12.comma);
  81986. }
  81987. }
  81988. return {
  81989. members,
  81990. hasUnknownMembers
  81991. };
  81992. }
  81993. flowEnumStringMembers(initializedMembers, defaultedMembers, {
  81994. enumName
  81995. }) {
  81996. if (initializedMembers.length === 0) {
  81997. return defaultedMembers;
  81998. } else if (defaultedMembers.length === 0) {
  81999. return initializedMembers;
  82000. } else if (defaultedMembers.length > initializedMembers.length) {
  82001. for (const member of initializedMembers) {
  82002. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  82003. enumName
  82004. });
  82005. }
  82006. return defaultedMembers;
  82007. } else {
  82008. for (const member of defaultedMembers) {
  82009. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  82010. enumName
  82011. });
  82012. }
  82013. return initializedMembers;
  82014. }
  82015. }
  82016. flowEnumParseExplicitType({
  82017. enumName
  82018. }) {
  82019. if (this.eatContextual("of")) {
  82020. if (!this.match(types$12.name)) {
  82021. throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
  82022. enumName,
  82023. suppliedType: null
  82024. });
  82025. }
  82026. const {
  82027. value
  82028. } = this.state;
  82029. this.next();
  82030. if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
  82031. this.flowEnumErrorInvalidExplicitType(this.state.start, {
  82032. enumName,
  82033. suppliedType: value
  82034. });
  82035. }
  82036. return value;
  82037. }
  82038. return null;
  82039. }
  82040. flowEnumBody(node, {
  82041. enumName,
  82042. nameLoc
  82043. }) {
  82044. const explicitType = this.flowEnumParseExplicitType({
  82045. enumName
  82046. });
  82047. this.expect(types$12.braceL);
  82048. const {
  82049. members,
  82050. hasUnknownMembers
  82051. } = this.flowEnumMembers({
  82052. enumName,
  82053. explicitType
  82054. });
  82055. node.hasUnknownMembers = hasUnknownMembers;
  82056. switch (explicitType) {
  82057. case "boolean":
  82058. node.explicitType = true;
  82059. node.members = members.booleanMembers;
  82060. this.expect(types$12.braceR);
  82061. return this.finishNode(node, "EnumBooleanBody");
  82062. case "number":
  82063. node.explicitType = true;
  82064. node.members = members.numberMembers;
  82065. this.expect(types$12.braceR);
  82066. return this.finishNode(node, "EnumNumberBody");
  82067. case "string":
  82068. node.explicitType = true;
  82069. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  82070. enumName
  82071. });
  82072. this.expect(types$12.braceR);
  82073. return this.finishNode(node, "EnumStringBody");
  82074. case "symbol":
  82075. node.members = members.defaultedMembers;
  82076. this.expect(types$12.braceR);
  82077. return this.finishNode(node, "EnumSymbolBody");
  82078. default: {
  82079. const empty3 = () => {
  82080. node.members = [];
  82081. this.expect(types$12.braceR);
  82082. return this.finishNode(node, "EnumStringBody");
  82083. };
  82084. node.explicitType = false;
  82085. const boolsLen = members.booleanMembers.length;
  82086. const numsLen = members.numberMembers.length;
  82087. const strsLen = members.stringMembers.length;
  82088. const defaultedLen = members.defaultedMembers.length;
  82089. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  82090. return empty3();
  82091. } else if (!boolsLen && !numsLen) {
  82092. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  82093. enumName
  82094. });
  82095. this.expect(types$12.braceR);
  82096. return this.finishNode(node, "EnumStringBody");
  82097. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  82098. for (const member of members.defaultedMembers) {
  82099. this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
  82100. enumName,
  82101. memberName: member.id.name
  82102. });
  82103. }
  82104. node.members = members.booleanMembers;
  82105. this.expect(types$12.braceR);
  82106. return this.finishNode(node, "EnumBooleanBody");
  82107. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  82108. for (const member of members.defaultedMembers) {
  82109. this.flowEnumErrorNumberMemberNotInitialized(member.start, {
  82110. enumName,
  82111. memberName: member.id.name
  82112. });
  82113. }
  82114. node.members = members.numberMembers;
  82115. this.expect(types$12.braceR);
  82116. return this.finishNode(node, "EnumNumberBody");
  82117. } else {
  82118. this.flowEnumErrorInconsistentMemberValues(nameLoc, {
  82119. enumName
  82120. });
  82121. return empty3();
  82122. }
  82123. }
  82124. }
  82125. }
  82126. flowParseEnumDeclaration(node) {
  82127. const id = this.parseIdentifier();
  82128. node.id = id;
  82129. node.body = this.flowEnumBody(this.startNode(), {
  82130. enumName: id.name,
  82131. nameLoc: id.start
  82132. });
  82133. return this.finishNode(node, "EnumDeclaration");
  82134. }
  82135. isLookaheadToken_lt() {
  82136. const next = this.nextTokenStart();
  82137. if (this.input.charCodeAt(next) === 60) {
  82138. const afterNext = this.input.charCodeAt(next + 1);
  82139. return afterNext !== 60 && afterNext !== 61;
  82140. }
  82141. return false;
  82142. }
  82143. maybeUnwrapTypeCastExpression(node) {
  82144. return node.type === "TypeCastExpression" ? node.expression : node;
  82145. }
  82146. };
  82147. var entities = {
  82148. quot: '"',
  82149. amp: "&",
  82150. apos: "'",
  82151. lt: "<",
  82152. gt: ">",
  82153. nbsp: "\xA0",
  82154. iexcl: "\xA1",
  82155. cent: "\xA2",
  82156. pound: "\xA3",
  82157. curren: "\xA4",
  82158. yen: "\xA5",
  82159. brvbar: "\xA6",
  82160. sect: "\xA7",
  82161. uml: "\xA8",
  82162. copy: "\xA9",
  82163. ordf: "\xAA",
  82164. laquo: "\xAB",
  82165. not: "\xAC",
  82166. shy: "\xAD",
  82167. reg: "\xAE",
  82168. macr: "\xAF",
  82169. deg: "\xB0",
  82170. plusmn: "\xB1",
  82171. sup2: "\xB2",
  82172. sup3: "\xB3",
  82173. acute: "\xB4",
  82174. micro: "\xB5",
  82175. para: "\xB6",
  82176. middot: "\xB7",
  82177. cedil: "\xB8",
  82178. sup1: "\xB9",
  82179. ordm: "\xBA",
  82180. raquo: "\xBB",
  82181. frac14: "\xBC",
  82182. frac12: "\xBD",
  82183. frac34: "\xBE",
  82184. iquest: "\xBF",
  82185. Agrave: "\xC0",
  82186. Aacute: "\xC1",
  82187. Acirc: "\xC2",
  82188. Atilde: "\xC3",
  82189. Auml: "\xC4",
  82190. Aring: "\xC5",
  82191. AElig: "\xC6",
  82192. Ccedil: "\xC7",
  82193. Egrave: "\xC8",
  82194. Eacute: "\xC9",
  82195. Ecirc: "\xCA",
  82196. Euml: "\xCB",
  82197. Igrave: "\xCC",
  82198. Iacute: "\xCD",
  82199. Icirc: "\xCE",
  82200. Iuml: "\xCF",
  82201. ETH: "\xD0",
  82202. Ntilde: "\xD1",
  82203. Ograve: "\xD2",
  82204. Oacute: "\xD3",
  82205. Ocirc: "\xD4",
  82206. Otilde: "\xD5",
  82207. Ouml: "\xD6",
  82208. times: "\xD7",
  82209. Oslash: "\xD8",
  82210. Ugrave: "\xD9",
  82211. Uacute: "\xDA",
  82212. Ucirc: "\xDB",
  82213. Uuml: "\xDC",
  82214. Yacute: "\xDD",
  82215. THORN: "\xDE",
  82216. szlig: "\xDF",
  82217. agrave: "\xE0",
  82218. aacute: "\xE1",
  82219. acirc: "\xE2",
  82220. atilde: "\xE3",
  82221. auml: "\xE4",
  82222. aring: "\xE5",
  82223. aelig: "\xE6",
  82224. ccedil: "\xE7",
  82225. egrave: "\xE8",
  82226. eacute: "\xE9",
  82227. ecirc: "\xEA",
  82228. euml: "\xEB",
  82229. igrave: "\xEC",
  82230. iacute: "\xED",
  82231. icirc: "\xEE",
  82232. iuml: "\xEF",
  82233. eth: "\xF0",
  82234. ntilde: "\xF1",
  82235. ograve: "\xF2",
  82236. oacute: "\xF3",
  82237. ocirc: "\xF4",
  82238. otilde: "\xF5",
  82239. ouml: "\xF6",
  82240. divide: "\xF7",
  82241. oslash: "\xF8",
  82242. ugrave: "\xF9",
  82243. uacute: "\xFA",
  82244. ucirc: "\xFB",
  82245. uuml: "\xFC",
  82246. yacute: "\xFD",
  82247. thorn: "\xFE",
  82248. yuml: "\xFF",
  82249. OElig: "\u0152",
  82250. oelig: "\u0153",
  82251. Scaron: "\u0160",
  82252. scaron: "\u0161",
  82253. Yuml: "\u0178",
  82254. fnof: "\u0192",
  82255. circ: "\u02C6",
  82256. tilde: "\u02DC",
  82257. Alpha: "\u0391",
  82258. Beta: "\u0392",
  82259. Gamma: "\u0393",
  82260. Delta: "\u0394",
  82261. Epsilon: "\u0395",
  82262. Zeta: "\u0396",
  82263. Eta: "\u0397",
  82264. Theta: "\u0398",
  82265. Iota: "\u0399",
  82266. Kappa: "\u039A",
  82267. Lambda: "\u039B",
  82268. Mu: "\u039C",
  82269. Nu: "\u039D",
  82270. Xi: "\u039E",
  82271. Omicron: "\u039F",
  82272. Pi: "\u03A0",
  82273. Rho: "\u03A1",
  82274. Sigma: "\u03A3",
  82275. Tau: "\u03A4",
  82276. Upsilon: "\u03A5",
  82277. Phi: "\u03A6",
  82278. Chi: "\u03A7",
  82279. Psi: "\u03A8",
  82280. Omega: "\u03A9",
  82281. alpha: "\u03B1",
  82282. beta: "\u03B2",
  82283. gamma: "\u03B3",
  82284. delta: "\u03B4",
  82285. epsilon: "\u03B5",
  82286. zeta: "\u03B6",
  82287. eta: "\u03B7",
  82288. theta: "\u03B8",
  82289. iota: "\u03B9",
  82290. kappa: "\u03BA",
  82291. lambda: "\u03BB",
  82292. mu: "\u03BC",
  82293. nu: "\u03BD",
  82294. xi: "\u03BE",
  82295. omicron: "\u03BF",
  82296. pi: "\u03C0",
  82297. rho: "\u03C1",
  82298. sigmaf: "\u03C2",
  82299. sigma: "\u03C3",
  82300. tau: "\u03C4",
  82301. upsilon: "\u03C5",
  82302. phi: "\u03C6",
  82303. chi: "\u03C7",
  82304. psi: "\u03C8",
  82305. omega: "\u03C9",
  82306. thetasym: "\u03D1",
  82307. upsih: "\u03D2",
  82308. piv: "\u03D6",
  82309. ensp: "\u2002",
  82310. emsp: "\u2003",
  82311. thinsp: "\u2009",
  82312. zwnj: "\u200C",
  82313. zwj: "\u200D",
  82314. lrm: "\u200E",
  82315. rlm: "\u200F",
  82316. ndash: "\u2013",
  82317. mdash: "\u2014",
  82318. lsquo: "\u2018",
  82319. rsquo: "\u2019",
  82320. sbquo: "\u201A",
  82321. ldquo: "\u201C",
  82322. rdquo: "\u201D",
  82323. bdquo: "\u201E",
  82324. dagger: "\u2020",
  82325. Dagger: "\u2021",
  82326. bull: "\u2022",
  82327. hellip: "\u2026",
  82328. permil: "\u2030",
  82329. prime: "\u2032",
  82330. Prime: "\u2033",
  82331. lsaquo: "\u2039",
  82332. rsaquo: "\u203A",
  82333. oline: "\u203E",
  82334. frasl: "\u2044",
  82335. euro: "\u20AC",
  82336. image: "\u2111",
  82337. weierp: "\u2118",
  82338. real: "\u211C",
  82339. trade: "\u2122",
  82340. alefsym: "\u2135",
  82341. larr: "\u2190",
  82342. uarr: "\u2191",
  82343. rarr: "\u2192",
  82344. darr: "\u2193",
  82345. harr: "\u2194",
  82346. crarr: "\u21B5",
  82347. lArr: "\u21D0",
  82348. uArr: "\u21D1",
  82349. rArr: "\u21D2",
  82350. dArr: "\u21D3",
  82351. hArr: "\u21D4",
  82352. forall: "\u2200",
  82353. part: "\u2202",
  82354. exist: "\u2203",
  82355. empty: "\u2205",
  82356. nabla: "\u2207",
  82357. isin: "\u2208",
  82358. notin: "\u2209",
  82359. ni: "\u220B",
  82360. prod: "\u220F",
  82361. sum: "\u2211",
  82362. minus: "\u2212",
  82363. lowast: "\u2217",
  82364. radic: "\u221A",
  82365. prop: "\u221D",
  82366. infin: "\u221E",
  82367. ang: "\u2220",
  82368. and: "\u2227",
  82369. or: "\u2228",
  82370. cap: "\u2229",
  82371. cup: "\u222A",
  82372. int: "\u222B",
  82373. there4: "\u2234",
  82374. sim: "\u223C",
  82375. cong: "\u2245",
  82376. asymp: "\u2248",
  82377. ne: "\u2260",
  82378. equiv: "\u2261",
  82379. le: "\u2264",
  82380. ge: "\u2265",
  82381. sub: "\u2282",
  82382. sup: "\u2283",
  82383. nsub: "\u2284",
  82384. sube: "\u2286",
  82385. supe: "\u2287",
  82386. oplus: "\u2295",
  82387. otimes: "\u2297",
  82388. perp: "\u22A5",
  82389. sdot: "\u22C5",
  82390. lceil: "\u2308",
  82391. rceil: "\u2309",
  82392. lfloor: "\u230A",
  82393. rfloor: "\u230B",
  82394. lang: "\u2329",
  82395. rang: "\u232A",
  82396. loz: "\u25CA",
  82397. spades: "\u2660",
  82398. clubs: "\u2663",
  82399. hearts: "\u2665",
  82400. diams: "\u2666"
  82401. };
  82402. var State2 = class {
  82403. constructor() {
  82404. this.strict = void 0;
  82405. this.curLine = void 0;
  82406. this.startLoc = void 0;
  82407. this.endLoc = void 0;
  82408. this.errors = [];
  82409. this.potentialArrowAt = -1;
  82410. this.noArrowAt = [];
  82411. this.noArrowParamsConversionAt = [];
  82412. this.maybeInArrowParameters = false;
  82413. this.inPipeline = false;
  82414. this.inType = false;
  82415. this.noAnonFunctionType = false;
  82416. this.inPropertyName = false;
  82417. this.hasFlowComment = false;
  82418. this.isAmbientContext = false;
  82419. this.inAbstractClass = false;
  82420. this.topicContext = {
  82421. maxNumOfResolvableTopics: 0,
  82422. maxTopicIndex: null
  82423. };
  82424. this.soloAwait = false;
  82425. this.inFSharpPipelineDirectBody = false;
  82426. this.labels = [];
  82427. this.decoratorStack = [[]];
  82428. this.comments = [];
  82429. this.commentStack = [];
  82430. this.pos = 0;
  82431. this.lineStart = 0;
  82432. this.type = types$12.eof;
  82433. this.value = null;
  82434. this.start = 0;
  82435. this.end = 0;
  82436. this.lastTokEndLoc = null;
  82437. this.lastTokStartLoc = null;
  82438. this.lastTokStart = 0;
  82439. this.lastTokEnd = 0;
  82440. this.context = [types2.brace];
  82441. this.exprAllowed = true;
  82442. this.containsEsc = false;
  82443. this.strictErrors = /* @__PURE__ */ new Map();
  82444. this.tokensLength = 0;
  82445. }
  82446. init(options) {
  82447. this.strict = options.strictMode === false ? false : options.strictMode === true ? true : options.sourceType === "module";
  82448. this.curLine = options.startLine;
  82449. this.startLoc = this.endLoc = this.curPosition();
  82450. }
  82451. curPosition() {
  82452. return new Position3(this.curLine, this.pos - this.lineStart);
  82453. }
  82454. clone(skipArrays) {
  82455. const state = new State2();
  82456. const keys2 = Object.keys(this);
  82457. for (let i = 0, length = keys2.length; i < length; i++) {
  82458. const key = keys2[i];
  82459. let val = this[key];
  82460. if (!skipArrays && Array.isArray(val)) {
  82461. val = val.slice();
  82462. }
  82463. state[key] = val;
  82464. }
  82465. return state;
  82466. }
  82467. };
  82468. var HEX_NUMBER = /^[\da-fA-F]+$/;
  82469. var DECIMAL_NUMBER = /^\d+$/;
  82470. var JsxErrors = makeErrorTemplates({
  82471. AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
  82472. MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.",
  82473. MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
  82474. UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
  82475. UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
  82476. UnterminatedJsxContent: "Unterminated JSX contents.",
  82477. UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
  82478. }, ErrorCodes.SyntaxError);
  82479. types2.j_oTag = new TokContext3("<tag");
  82480. types2.j_cTag = new TokContext3("</tag");
  82481. types2.j_expr = new TokContext3("<tag>...</tag>", true);
  82482. types$12.jsxName = new TokenType3("jsxName");
  82483. types$12.jsxText = new TokenType3("jsxText", {
  82484. beforeExpr: true
  82485. });
  82486. types$12.jsxTagStart = new TokenType3("jsxTagStart", {
  82487. startsExpr: true
  82488. });
  82489. types$12.jsxTagEnd = new TokenType3("jsxTagEnd");
  82490. types$12.jsxTagStart.updateContext = (context) => {
  82491. context.push(types2.j_expr, types2.j_oTag);
  82492. };
  82493. function isFragment(object) {
  82494. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  82495. }
  82496. function getQualifiedJSXName(object) {
  82497. if (object.type === "JSXIdentifier") {
  82498. return object.name;
  82499. }
  82500. if (object.type === "JSXNamespacedName") {
  82501. return object.namespace.name + ":" + object.name.name;
  82502. }
  82503. if (object.type === "JSXMemberExpression") {
  82504. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  82505. }
  82506. throw new Error("Node had unexpected type: " + object.type);
  82507. }
  82508. var jsx = (superClass) => class extends superClass {
  82509. jsxReadToken() {
  82510. let out = "";
  82511. let chunkStart = this.state.pos;
  82512. for (; ; ) {
  82513. if (this.state.pos >= this.length) {
  82514. throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);
  82515. }
  82516. const ch = this.input.charCodeAt(this.state.pos);
  82517. switch (ch) {
  82518. case 60:
  82519. case 123:
  82520. if (this.state.pos === this.state.start) {
  82521. if (ch === 60 && this.state.exprAllowed) {
  82522. ++this.state.pos;
  82523. return this.finishToken(types$12.jsxTagStart);
  82524. }
  82525. return super.getTokenFromCode(ch);
  82526. }
  82527. out += this.input.slice(chunkStart, this.state.pos);
  82528. return this.finishToken(types$12.jsxText, out);
  82529. case 38:
  82530. out += this.input.slice(chunkStart, this.state.pos);
  82531. out += this.jsxReadEntity();
  82532. chunkStart = this.state.pos;
  82533. break;
  82534. case 62:
  82535. case 125:
  82536. default:
  82537. if (isNewLine2(ch)) {
  82538. out += this.input.slice(chunkStart, this.state.pos);
  82539. out += this.jsxReadNewLine(true);
  82540. chunkStart = this.state.pos;
  82541. } else {
  82542. ++this.state.pos;
  82543. }
  82544. }
  82545. }
  82546. }
  82547. jsxReadNewLine(normalizeCRLF) {
  82548. const ch = this.input.charCodeAt(this.state.pos);
  82549. let out;
  82550. ++this.state.pos;
  82551. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  82552. ++this.state.pos;
  82553. out = normalizeCRLF ? "\n" : "\r\n";
  82554. } else {
  82555. out = String.fromCharCode(ch);
  82556. }
  82557. ++this.state.curLine;
  82558. this.state.lineStart = this.state.pos;
  82559. return out;
  82560. }
  82561. jsxReadString(quote) {
  82562. let out = "";
  82563. let chunkStart = ++this.state.pos;
  82564. for (; ; ) {
  82565. if (this.state.pos >= this.length) {
  82566. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  82567. }
  82568. const ch = this.input.charCodeAt(this.state.pos);
  82569. if (ch === quote)
  82570. break;
  82571. if (ch === 38) {
  82572. out += this.input.slice(chunkStart, this.state.pos);
  82573. out += this.jsxReadEntity();
  82574. chunkStart = this.state.pos;
  82575. } else if (isNewLine2(ch)) {
  82576. out += this.input.slice(chunkStart, this.state.pos);
  82577. out += this.jsxReadNewLine(false);
  82578. chunkStart = this.state.pos;
  82579. } else {
  82580. ++this.state.pos;
  82581. }
  82582. }
  82583. out += this.input.slice(chunkStart, this.state.pos++);
  82584. return this.finishToken(types$12.string, out);
  82585. }
  82586. jsxReadEntity() {
  82587. let str = "";
  82588. let count = 0;
  82589. let entity;
  82590. let ch = this.input[this.state.pos];
  82591. const startPos = ++this.state.pos;
  82592. while (this.state.pos < this.length && count++ < 10) {
  82593. ch = this.input[this.state.pos++];
  82594. if (ch === ";") {
  82595. if (str[0] === "#") {
  82596. if (str[1] === "x") {
  82597. str = str.substr(2);
  82598. if (HEX_NUMBER.test(str)) {
  82599. entity = String.fromCodePoint(parseInt(str, 16));
  82600. }
  82601. } else {
  82602. str = str.substr(1);
  82603. if (DECIMAL_NUMBER.test(str)) {
  82604. entity = String.fromCodePoint(parseInt(str, 10));
  82605. }
  82606. }
  82607. } else {
  82608. entity = entities[str];
  82609. }
  82610. break;
  82611. }
  82612. str += ch;
  82613. }
  82614. if (!entity) {
  82615. this.state.pos = startPos;
  82616. return "&";
  82617. }
  82618. return entity;
  82619. }
  82620. jsxReadWord() {
  82621. let ch;
  82622. const start3 = this.state.pos;
  82623. do {
  82624. ch = this.input.charCodeAt(++this.state.pos);
  82625. } while (isIdentifierChar2(ch) || ch === 45);
  82626. return this.finishToken(types$12.jsxName, this.input.slice(start3, this.state.pos));
  82627. }
  82628. jsxParseIdentifier() {
  82629. const node = this.startNode();
  82630. if (this.match(types$12.jsxName)) {
  82631. node.name = this.state.value;
  82632. } else if (this.state.type.keyword) {
  82633. node.name = this.state.type.keyword;
  82634. } else {
  82635. this.unexpected();
  82636. }
  82637. this.next();
  82638. return this.finishNode(node, "JSXIdentifier");
  82639. }
  82640. jsxParseNamespacedName() {
  82641. const startPos = this.state.start;
  82642. const startLoc = this.state.startLoc;
  82643. const name2 = this.jsxParseIdentifier();
  82644. if (!this.eat(types$12.colon))
  82645. return name2;
  82646. const node = this.startNodeAt(startPos, startLoc);
  82647. node.namespace = name2;
  82648. node.name = this.jsxParseIdentifier();
  82649. return this.finishNode(node, "JSXNamespacedName");
  82650. }
  82651. jsxParseElementName() {
  82652. const startPos = this.state.start;
  82653. const startLoc = this.state.startLoc;
  82654. let node = this.jsxParseNamespacedName();
  82655. if (node.type === "JSXNamespacedName") {
  82656. return node;
  82657. }
  82658. while (this.eat(types$12.dot)) {
  82659. const newNode = this.startNodeAt(startPos, startLoc);
  82660. newNode.object = node;
  82661. newNode.property = this.jsxParseIdentifier();
  82662. node = this.finishNode(newNode, "JSXMemberExpression");
  82663. }
  82664. return node;
  82665. }
  82666. jsxParseAttributeValue() {
  82667. let node;
  82668. switch (this.state.type) {
  82669. case types$12.braceL:
  82670. node = this.startNode();
  82671. this.next();
  82672. node = this.jsxParseExpressionContainer(node);
  82673. if (node.expression.type === "JSXEmptyExpression") {
  82674. this.raise(node.start, JsxErrors.AttributeIsEmpty);
  82675. }
  82676. return node;
  82677. case types$12.jsxTagStart:
  82678. case types$12.string:
  82679. return this.parseExprAtom();
  82680. default:
  82681. throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);
  82682. }
  82683. }
  82684. jsxParseEmptyExpression() {
  82685. const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  82686. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  82687. }
  82688. jsxParseSpreadChild(node) {
  82689. this.next();
  82690. node.expression = this.parseExpression();
  82691. this.expect(types$12.braceR);
  82692. return this.finishNode(node, "JSXSpreadChild");
  82693. }
  82694. jsxParseExpressionContainer(node) {
  82695. if (this.match(types$12.braceR)) {
  82696. node.expression = this.jsxParseEmptyExpression();
  82697. } else {
  82698. const expression = this.parseExpression();
  82699. node.expression = expression;
  82700. }
  82701. this.expect(types$12.braceR);
  82702. return this.finishNode(node, "JSXExpressionContainer");
  82703. }
  82704. jsxParseAttribute() {
  82705. const node = this.startNode();
  82706. if (this.eat(types$12.braceL)) {
  82707. this.expect(types$12.ellipsis);
  82708. node.argument = this.parseMaybeAssignAllowIn();
  82709. this.expect(types$12.braceR);
  82710. return this.finishNode(node, "JSXSpreadAttribute");
  82711. }
  82712. node.name = this.jsxParseNamespacedName();
  82713. node.value = this.eat(types$12.eq) ? this.jsxParseAttributeValue() : null;
  82714. return this.finishNode(node, "JSXAttribute");
  82715. }
  82716. jsxParseOpeningElementAt(startPos, startLoc) {
  82717. const node = this.startNodeAt(startPos, startLoc);
  82718. if (this.match(types$12.jsxTagEnd)) {
  82719. this.expect(types$12.jsxTagEnd);
  82720. return this.finishNode(node, "JSXOpeningFragment");
  82721. }
  82722. node.name = this.jsxParseElementName();
  82723. return this.jsxParseOpeningElementAfterName(node);
  82724. }
  82725. jsxParseOpeningElementAfterName(node) {
  82726. const attributes = [];
  82727. while (!this.match(types$12.slash) && !this.match(types$12.jsxTagEnd)) {
  82728. attributes.push(this.jsxParseAttribute());
  82729. }
  82730. node.attributes = attributes;
  82731. node.selfClosing = this.eat(types$12.slash);
  82732. this.expect(types$12.jsxTagEnd);
  82733. return this.finishNode(node, "JSXOpeningElement");
  82734. }
  82735. jsxParseClosingElementAt(startPos, startLoc) {
  82736. const node = this.startNodeAt(startPos, startLoc);
  82737. if (this.match(types$12.jsxTagEnd)) {
  82738. this.expect(types$12.jsxTagEnd);
  82739. return this.finishNode(node, "JSXClosingFragment");
  82740. }
  82741. node.name = this.jsxParseElementName();
  82742. this.expect(types$12.jsxTagEnd);
  82743. return this.finishNode(node, "JSXClosingElement");
  82744. }
  82745. jsxParseElementAt(startPos, startLoc) {
  82746. const node = this.startNodeAt(startPos, startLoc);
  82747. const children = [];
  82748. const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  82749. let closingElement = null;
  82750. if (!openingElement.selfClosing) {
  82751. contents:
  82752. for (; ; ) {
  82753. switch (this.state.type) {
  82754. case types$12.jsxTagStart:
  82755. startPos = this.state.start;
  82756. startLoc = this.state.startLoc;
  82757. this.next();
  82758. if (this.eat(types$12.slash)) {
  82759. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  82760. break contents;
  82761. }
  82762. children.push(this.jsxParseElementAt(startPos, startLoc));
  82763. break;
  82764. case types$12.jsxText:
  82765. children.push(this.parseExprAtom());
  82766. break;
  82767. case types$12.braceL: {
  82768. const node2 = this.startNode();
  82769. this.next();
  82770. if (this.match(types$12.ellipsis)) {
  82771. children.push(this.jsxParseSpreadChild(node2));
  82772. } else {
  82773. children.push(this.jsxParseExpressionContainer(node2));
  82774. }
  82775. break;
  82776. }
  82777. default:
  82778. throw this.unexpected();
  82779. }
  82780. }
  82781. if (isFragment(openingElement) && !isFragment(closingElement)) {
  82782. this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment);
  82783. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  82784. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  82785. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  82786. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  82787. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  82788. }
  82789. }
  82790. }
  82791. if (isFragment(openingElement)) {
  82792. node.openingFragment = openingElement;
  82793. node.closingFragment = closingElement;
  82794. } else {
  82795. node.openingElement = openingElement;
  82796. node.closingElement = closingElement;
  82797. }
  82798. node.children = children;
  82799. if (this.isRelational("<")) {
  82800. throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements);
  82801. }
  82802. return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
  82803. }
  82804. jsxParseElement() {
  82805. const startPos = this.state.start;
  82806. const startLoc = this.state.startLoc;
  82807. this.next();
  82808. return this.jsxParseElementAt(startPos, startLoc);
  82809. }
  82810. parseExprAtom(refExpressionErrors) {
  82811. if (this.match(types$12.jsxText)) {
  82812. return this.parseLiteral(this.state.value, "JSXText");
  82813. } else if (this.match(types$12.jsxTagStart)) {
  82814. return this.jsxParseElement();
  82815. } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
  82816. this.finishToken(types$12.jsxTagStart);
  82817. return this.jsxParseElement();
  82818. } else {
  82819. return super.parseExprAtom(refExpressionErrors);
  82820. }
  82821. }
  82822. createLookaheadState(state) {
  82823. const lookaheadState = super.createLookaheadState(state);
  82824. lookaheadState.inPropertyName = state.inPropertyName;
  82825. return lookaheadState;
  82826. }
  82827. getTokenFromCode(code2) {
  82828. if (this.state.inPropertyName)
  82829. return super.getTokenFromCode(code2);
  82830. const context = this.curContext();
  82831. if (context === types2.j_expr) {
  82832. return this.jsxReadToken();
  82833. }
  82834. if (context === types2.j_oTag || context === types2.j_cTag) {
  82835. if (isIdentifierStart2(code2)) {
  82836. return this.jsxReadWord();
  82837. }
  82838. if (code2 === 62) {
  82839. ++this.state.pos;
  82840. return this.finishToken(types$12.jsxTagEnd);
  82841. }
  82842. if ((code2 === 34 || code2 === 39) && context === types2.j_oTag) {
  82843. return this.jsxReadString(code2);
  82844. }
  82845. }
  82846. if (code2 === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  82847. ++this.state.pos;
  82848. return this.finishToken(types$12.jsxTagStart);
  82849. }
  82850. return super.getTokenFromCode(code2);
  82851. }
  82852. updateContext(prevType) {
  82853. super.updateContext(prevType);
  82854. const {
  82855. context,
  82856. type
  82857. } = this.state;
  82858. if (type === types$12.slash && prevType === types$12.jsxTagStart) {
  82859. context.splice(-2, 2, types2.j_cTag);
  82860. this.state.exprAllowed = false;
  82861. } else if (type === types$12.jsxTagEnd) {
  82862. const out = context.pop();
  82863. if (out === types2.j_oTag && prevType === types$12.slash || out === types2.j_cTag) {
  82864. context.pop();
  82865. this.state.exprAllowed = context[context.length - 1] === types2.j_expr;
  82866. } else {
  82867. this.state.exprAllowed = true;
  82868. }
  82869. } else if (type.keyword && (prevType === types$12.dot || prevType === types$12.questionDot)) {
  82870. this.state.exprAllowed = false;
  82871. } else {
  82872. this.state.exprAllowed = type.beforeExpr;
  82873. }
  82874. }
  82875. };
  82876. var TypeScriptScope = class extends Scope4 {
  82877. constructor(...args) {
  82878. super(...args);
  82879. this.types = /* @__PURE__ */ new Set();
  82880. this.enums = /* @__PURE__ */ new Set();
  82881. this.constEnums = /* @__PURE__ */ new Set();
  82882. this.classes = /* @__PURE__ */ new Set();
  82883. this.exportOnlyBindings = /* @__PURE__ */ new Set();
  82884. }
  82885. };
  82886. var TypeScriptScopeHandler = class extends ScopeHandler {
  82887. createScope(flags) {
  82888. return new TypeScriptScope(flags);
  82889. }
  82890. declareName(name2, bindingType, pos) {
  82891. const scope = this.currentScope();
  82892. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  82893. this.maybeExportDefined(scope, name2);
  82894. scope.exportOnlyBindings.add(name2);
  82895. return;
  82896. }
  82897. super.declareName(...arguments);
  82898. if (bindingType & BIND_KIND_TYPE) {
  82899. if (!(bindingType & BIND_KIND_VALUE)) {
  82900. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  82901. this.maybeExportDefined(scope, name2);
  82902. }
  82903. scope.types.add(name2);
  82904. }
  82905. if (bindingType & BIND_FLAGS_TS_ENUM)
  82906. scope.enums.add(name2);
  82907. if (bindingType & BIND_FLAGS_TS_CONST_ENUM)
  82908. scope.constEnums.add(name2);
  82909. if (bindingType & BIND_FLAGS_CLASS)
  82910. scope.classes.add(name2);
  82911. }
  82912. isRedeclaredInScope(scope, name2, bindingType) {
  82913. if (scope.enums.has(name2)) {
  82914. if (bindingType & BIND_FLAGS_TS_ENUM) {
  82915. const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  82916. const wasConst = scope.constEnums.has(name2);
  82917. return isConst !== wasConst;
  82918. }
  82919. return true;
  82920. }
  82921. if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name2)) {
  82922. if (scope.lexical.has(name2)) {
  82923. return !!(bindingType & BIND_KIND_VALUE);
  82924. } else {
  82925. return false;
  82926. }
  82927. }
  82928. if (bindingType & BIND_KIND_TYPE && scope.types.has(name2)) {
  82929. return true;
  82930. }
  82931. return super.isRedeclaredInScope(...arguments);
  82932. }
  82933. checkLocalExport(id) {
  82934. const topLevelScope = this.scopeStack[0];
  82935. const {
  82936. name: name2
  82937. } = id;
  82938. if (!topLevelScope.types.has(name2) && !topLevelScope.exportOnlyBindings.has(name2)) {
  82939. super.checkLocalExport(id);
  82940. }
  82941. }
  82942. };
  82943. var PARAM = 0;
  82944. var PARAM_YIELD = 1;
  82945. var PARAM_AWAIT = 2;
  82946. var PARAM_RETURN = 4;
  82947. var PARAM_IN = 8;
  82948. var ProductionParameterHandler = class {
  82949. constructor() {
  82950. this.stacks = [];
  82951. }
  82952. enter(flags) {
  82953. this.stacks.push(flags);
  82954. }
  82955. exit() {
  82956. this.stacks.pop();
  82957. }
  82958. currentFlags() {
  82959. return this.stacks[this.stacks.length - 1];
  82960. }
  82961. get hasAwait() {
  82962. return (this.currentFlags() & PARAM_AWAIT) > 0;
  82963. }
  82964. get hasYield() {
  82965. return (this.currentFlags() & PARAM_YIELD) > 0;
  82966. }
  82967. get hasReturn() {
  82968. return (this.currentFlags() & PARAM_RETURN) > 0;
  82969. }
  82970. get hasIn() {
  82971. return (this.currentFlags() & PARAM_IN) > 0;
  82972. }
  82973. };
  82974. function functionFlags2(isAsync, isGenerator) {
  82975. return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
  82976. }
  82977. function nonNull(x) {
  82978. if (x == null) {
  82979. throw new Error(`Unexpected ${x} value.`);
  82980. }
  82981. return x;
  82982. }
  82983. function assert(x) {
  82984. if (!x) {
  82985. throw new Error("Assert fail");
  82986. }
  82987. }
  82988. var TSErrors = makeErrorTemplates({
  82989. AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.",
  82990. AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
  82991. AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
  82992. ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
  82993. ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
  82994. ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
  82995. DeclareAccessor: "'declare' is not allowed in %0ters.",
  82996. DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
  82997. DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
  82998. DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
  82999. DuplicateModifier: "Duplicate modifier: '%0'.",
  83000. EmptyHeritageClauseType: "'%0' list cannot be empty.",
  83001. EmptyTypeArguments: "Type argument list cannot be empty.",
  83002. EmptyTypeParameters: "Type parameter list cannot be empty.",
  83003. ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
  83004. ImportAliasHasImportType: "An import alias can not use 'import type'.",
  83005. IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
  83006. IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
  83007. IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').",
  83008. IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
  83009. IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
  83010. IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
  83011. InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.",
  83012. InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
  83013. InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
  83014. MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
  83015. NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
  83016. NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
  83017. OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
  83018. OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
  83019. PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
  83020. PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
  83021. PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').",
  83022. ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
  83023. SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
  83024. SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
  83025. SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
  83026. StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
  83027. TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  83028. TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
  83029. UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
  83030. UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
  83031. UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
  83032. UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
  83033. UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
  83034. UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
  83035. UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."
  83036. }, ErrorCodes.SyntaxError);
  83037. function keywordTypeFromName(value) {
  83038. switch (value) {
  83039. case "any":
  83040. return "TSAnyKeyword";
  83041. case "boolean":
  83042. return "TSBooleanKeyword";
  83043. case "bigint":
  83044. return "TSBigIntKeyword";
  83045. case "never":
  83046. return "TSNeverKeyword";
  83047. case "number":
  83048. return "TSNumberKeyword";
  83049. case "object":
  83050. return "TSObjectKeyword";
  83051. case "string":
  83052. return "TSStringKeyword";
  83053. case "symbol":
  83054. return "TSSymbolKeyword";
  83055. case "undefined":
  83056. return "TSUndefinedKeyword";
  83057. case "unknown":
  83058. return "TSUnknownKeyword";
  83059. default:
  83060. return void 0;
  83061. }
  83062. }
  83063. function tsIsAccessModifier(modifier) {
  83064. return modifier === "private" || modifier === "public" || modifier === "protected";
  83065. }
  83066. var typescript = (superClass) => class extends superClass {
  83067. getScopeHandler() {
  83068. return TypeScriptScopeHandler;
  83069. }
  83070. tsIsIdentifier() {
  83071. return this.match(types$12.name);
  83072. }
  83073. tsTokenCanFollowModifier() {
  83074. return (this.match(types$12.bracketL) || this.match(types$12.braceL) || this.match(types$12.star) || this.match(types$12.ellipsis) || this.match(types$12.privateName) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
  83075. }
  83076. tsNextTokenCanFollowModifier() {
  83077. this.next();
  83078. return this.tsTokenCanFollowModifier();
  83079. }
  83080. tsParseModifier(allowedModifiers) {
  83081. if (!this.match(types$12.name)) {
  83082. return void 0;
  83083. }
  83084. const modifier = this.state.value;
  83085. if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  83086. return modifier;
  83087. }
  83088. return void 0;
  83089. }
  83090. tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate) {
  83091. const enforceOrder = (pos, modifier, before, after) => {
  83092. if (modifier === before && modified[after]) {
  83093. this.raise(pos, TSErrors.InvalidModifiersOrder, before, after);
  83094. }
  83095. };
  83096. const incompatible = (pos, modifier, mod1, mod2) => {
  83097. if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
  83098. this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2);
  83099. }
  83100. };
  83101. for (; ; ) {
  83102. const startPos = this.state.start;
  83103. const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []));
  83104. if (!modifier)
  83105. break;
  83106. if (tsIsAccessModifier(modifier)) {
  83107. if (modified.accessibility) {
  83108. this.raise(startPos, TSErrors.DuplicateAccessibilityModifier);
  83109. } else {
  83110. enforceOrder(startPos, modifier, modifier, "override");
  83111. enforceOrder(startPos, modifier, modifier, "static");
  83112. enforceOrder(startPos, modifier, modifier, "readonly");
  83113. modified.accessibility = modifier;
  83114. }
  83115. } else {
  83116. if (Object.hasOwnProperty.call(modified, modifier)) {
  83117. this.raise(startPos, TSErrors.DuplicateModifier, modifier);
  83118. } else {
  83119. enforceOrder(startPos, modifier, "static", "readonly");
  83120. enforceOrder(startPos, modifier, "static", "override");
  83121. enforceOrder(startPos, modifier, "override", "readonly");
  83122. enforceOrder(startPos, modifier, "abstract", "override");
  83123. incompatible(startPos, modifier, "declare", "override");
  83124. incompatible(startPos, modifier, "static", "abstract");
  83125. }
  83126. modified[modifier] = true;
  83127. }
  83128. if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
  83129. this.raise(startPos, errorTemplate, modifier);
  83130. }
  83131. }
  83132. }
  83133. tsIsListTerminator(kind) {
  83134. switch (kind) {
  83135. case "EnumMembers":
  83136. case "TypeMembers":
  83137. return this.match(types$12.braceR);
  83138. case "HeritageClauseElement":
  83139. return this.match(types$12.braceL);
  83140. case "TupleElementTypes":
  83141. return this.match(types$12.bracketR);
  83142. case "TypeParametersOrArguments":
  83143. return this.isRelational(">");
  83144. }
  83145. throw new Error("Unreachable");
  83146. }
  83147. tsParseList(kind, parseElement) {
  83148. const result = [];
  83149. while (!this.tsIsListTerminator(kind)) {
  83150. result.push(parseElement());
  83151. }
  83152. return result;
  83153. }
  83154. tsParseDelimitedList(kind, parseElement) {
  83155. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
  83156. }
  83157. tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
  83158. const result = [];
  83159. for (; ; ) {
  83160. if (this.tsIsListTerminator(kind)) {
  83161. break;
  83162. }
  83163. const element2 = parseElement();
  83164. if (element2 == null) {
  83165. return void 0;
  83166. }
  83167. result.push(element2);
  83168. if (this.eat(types$12.comma)) {
  83169. continue;
  83170. }
  83171. if (this.tsIsListTerminator(kind)) {
  83172. break;
  83173. }
  83174. if (expectSuccess) {
  83175. this.expect(types$12.comma);
  83176. }
  83177. return void 0;
  83178. }
  83179. return result;
  83180. }
  83181. tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
  83182. if (!skipFirstToken) {
  83183. if (bracket) {
  83184. this.expect(types$12.bracketL);
  83185. } else {
  83186. this.expectRelational("<");
  83187. }
  83188. }
  83189. const result = this.tsParseDelimitedList(kind, parseElement);
  83190. if (bracket) {
  83191. this.expect(types$12.bracketR);
  83192. } else {
  83193. this.expectRelational(">");
  83194. }
  83195. return result;
  83196. }
  83197. tsParseImportType() {
  83198. const node = this.startNode();
  83199. this.expect(types$12._import);
  83200. this.expect(types$12.parenL);
  83201. if (!this.match(types$12.string)) {
  83202. this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);
  83203. }
  83204. node.argument = this.parseExprAtom();
  83205. this.expect(types$12.parenR);
  83206. if (this.eat(types$12.dot)) {
  83207. node.qualifier = this.tsParseEntityName(true);
  83208. }
  83209. if (this.isRelational("<")) {
  83210. node.typeParameters = this.tsParseTypeArguments();
  83211. }
  83212. return this.finishNode(node, "TSImportType");
  83213. }
  83214. tsParseEntityName(allowReservedWords) {
  83215. let entity = this.parseIdentifier();
  83216. while (this.eat(types$12.dot)) {
  83217. const node = this.startNodeAtNode(entity);
  83218. node.left = entity;
  83219. node.right = this.parseIdentifier(allowReservedWords);
  83220. entity = this.finishNode(node, "TSQualifiedName");
  83221. }
  83222. return entity;
  83223. }
  83224. tsParseTypeReference() {
  83225. const node = this.startNode();
  83226. node.typeName = this.tsParseEntityName(false);
  83227. if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
  83228. node.typeParameters = this.tsParseTypeArguments();
  83229. }
  83230. return this.finishNode(node, "TSTypeReference");
  83231. }
  83232. tsParseThisTypePredicate(lhs) {
  83233. this.next();
  83234. const node = this.startNodeAtNode(lhs);
  83235. node.parameterName = lhs;
  83236. node.typeAnnotation = this.tsParseTypeAnnotation(false);
  83237. node.asserts = false;
  83238. return this.finishNode(node, "TSTypePredicate");
  83239. }
  83240. tsParseThisTypeNode() {
  83241. const node = this.startNode();
  83242. this.next();
  83243. return this.finishNode(node, "TSThisType");
  83244. }
  83245. tsParseTypeQuery() {
  83246. const node = this.startNode();
  83247. this.expect(types$12._typeof);
  83248. if (this.match(types$12._import)) {
  83249. node.exprName = this.tsParseImportType();
  83250. } else {
  83251. node.exprName = this.tsParseEntityName(true);
  83252. }
  83253. return this.finishNode(node, "TSTypeQuery");
  83254. }
  83255. tsParseTypeParameter() {
  83256. const node = this.startNode();
  83257. node.name = this.tsParseTypeParameterName();
  83258. node.constraint = this.tsEatThenParseType(types$12._extends);
  83259. node.default = this.tsEatThenParseType(types$12.eq);
  83260. return this.finishNode(node, "TSTypeParameter");
  83261. }
  83262. tsTryParseTypeParameters() {
  83263. if (this.isRelational("<")) {
  83264. return this.tsParseTypeParameters();
  83265. }
  83266. }
  83267. tsParseTypeParameters() {
  83268. const node = this.startNode();
  83269. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  83270. this.next();
  83271. } else {
  83272. this.unexpected();
  83273. }
  83274. node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
  83275. if (node.params.length === 0) {
  83276. this.raise(node.start, TSErrors.EmptyTypeParameters);
  83277. }
  83278. return this.finishNode(node, "TSTypeParameterDeclaration");
  83279. }
  83280. tsTryNextParseConstantContext() {
  83281. if (this.lookahead().type === types$12._const) {
  83282. this.next();
  83283. return this.tsParseTypeReference();
  83284. }
  83285. return null;
  83286. }
  83287. tsFillSignature(returnToken, signature) {
  83288. const returnTokenRequired = returnToken === types$12.arrow;
  83289. signature.typeParameters = this.tsTryParseTypeParameters();
  83290. this.expect(types$12.parenL);
  83291. signature.parameters = this.tsParseBindingListForSignature();
  83292. if (returnTokenRequired) {
  83293. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  83294. } else if (this.match(returnToken)) {
  83295. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  83296. }
  83297. }
  83298. tsParseBindingListForSignature() {
  83299. return this.parseBindingList(types$12.parenR, 41).map((pattern) => {
  83300. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  83301. this.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type);
  83302. }
  83303. return pattern;
  83304. });
  83305. }
  83306. tsParseTypeMemberSemicolon() {
  83307. if (!this.eat(types$12.comma) && !this.isLineTerminator()) {
  83308. this.expect(types$12.semi);
  83309. }
  83310. }
  83311. tsParseSignatureMember(kind, node) {
  83312. this.tsFillSignature(types$12.colon, node);
  83313. this.tsParseTypeMemberSemicolon();
  83314. return this.finishNode(node, kind);
  83315. }
  83316. tsIsUnambiguouslyIndexSignature() {
  83317. this.next();
  83318. return this.eat(types$12.name) && this.match(types$12.colon);
  83319. }
  83320. tsTryParseIndexSignature(node) {
  83321. if (!(this.match(types$12.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  83322. return void 0;
  83323. }
  83324. this.expect(types$12.bracketL);
  83325. const id = this.parseIdentifier();
  83326. id.typeAnnotation = this.tsParseTypeAnnotation();
  83327. this.resetEndLocation(id);
  83328. this.expect(types$12.bracketR);
  83329. node.parameters = [id];
  83330. const type = this.tsTryParseTypeAnnotation();
  83331. if (type)
  83332. node.typeAnnotation = type;
  83333. this.tsParseTypeMemberSemicolon();
  83334. return this.finishNode(node, "TSIndexSignature");
  83335. }
  83336. tsParsePropertyOrMethodSignature(node, readonly) {
  83337. if (this.eat(types$12.question))
  83338. node.optional = true;
  83339. const nodeAny = node;
  83340. if (this.match(types$12.parenL) || this.isRelational("<")) {
  83341. if (readonly) {
  83342. this.raise(node.start, TSErrors.ReadonlyForMethodSignature);
  83343. }
  83344. const method = nodeAny;
  83345. if (method.kind && this.isRelational("<")) {
  83346. this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters);
  83347. }
  83348. this.tsFillSignature(types$12.colon, method);
  83349. this.tsParseTypeMemberSemicolon();
  83350. if (method.kind === "get") {
  83351. if (method.parameters.length > 0) {
  83352. this.raise(this.state.pos, ErrorMessages.BadGetterArity);
  83353. if (this.isThisParam(method.parameters[0])) {
  83354. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  83355. }
  83356. }
  83357. } else if (method.kind === "set") {
  83358. if (method.parameters.length !== 1) {
  83359. this.raise(this.state.pos, ErrorMessages.BadSetterArity);
  83360. } else {
  83361. const firstParameter = method.parameters[0];
  83362. if (this.isThisParam(firstParameter)) {
  83363. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  83364. }
  83365. if (firstParameter.type === "Identifier" && firstParameter.optional) {
  83366. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveOptionalParameter);
  83367. }
  83368. if (firstParameter.type === "RestElement") {
  83369. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveRestParameter);
  83370. }
  83371. }
  83372. if (method.typeAnnotation) {
  83373. this.raise(method.typeAnnotation.start, TSErrors.SetAccesorCannotHaveReturnType);
  83374. }
  83375. } else {
  83376. method.kind = "method";
  83377. }
  83378. return this.finishNode(method, "TSMethodSignature");
  83379. } else {
  83380. const property = nodeAny;
  83381. if (readonly)
  83382. property.readonly = true;
  83383. const type = this.tsTryParseTypeAnnotation();
  83384. if (type)
  83385. property.typeAnnotation = type;
  83386. this.tsParseTypeMemberSemicolon();
  83387. return this.finishNode(property, "TSPropertySignature");
  83388. }
  83389. }
  83390. tsParseTypeMember() {
  83391. const node = this.startNode();
  83392. if (this.match(types$12.parenL) || this.isRelational("<")) {
  83393. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
  83394. }
  83395. if (this.match(types$12._new)) {
  83396. const id = this.startNode();
  83397. this.next();
  83398. if (this.match(types$12.parenL) || this.isRelational("<")) {
  83399. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
  83400. } else {
  83401. node.key = this.createIdentifier(id, "new");
  83402. return this.tsParsePropertyOrMethodSignature(node, false);
  83403. }
  83404. }
  83405. this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember);
  83406. const idx = this.tsTryParseIndexSignature(node);
  83407. if (idx) {
  83408. return idx;
  83409. }
  83410. this.parsePropertyName(node, false);
  83411. if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) {
  83412. node.kind = node.key.name;
  83413. this.parsePropertyName(node, false);
  83414. }
  83415. return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);
  83416. }
  83417. tsParseTypeLiteral() {
  83418. const node = this.startNode();
  83419. node.members = this.tsParseObjectTypeMembers();
  83420. return this.finishNode(node, "TSTypeLiteral");
  83421. }
  83422. tsParseObjectTypeMembers() {
  83423. this.expect(types$12.braceL);
  83424. const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  83425. this.expect(types$12.braceR);
  83426. return members;
  83427. }
  83428. tsIsStartOfMappedType() {
  83429. this.next();
  83430. if (this.eat(types$12.plusMin)) {
  83431. return this.isContextual("readonly");
  83432. }
  83433. if (this.isContextual("readonly")) {
  83434. this.next();
  83435. }
  83436. if (!this.match(types$12.bracketL)) {
  83437. return false;
  83438. }
  83439. this.next();
  83440. if (!this.tsIsIdentifier()) {
  83441. return false;
  83442. }
  83443. this.next();
  83444. return this.match(types$12._in);
  83445. }
  83446. tsParseMappedTypeParameter() {
  83447. const node = this.startNode();
  83448. node.name = this.tsParseTypeParameterName();
  83449. node.constraint = this.tsExpectThenParseType(types$12._in);
  83450. return this.finishNode(node, "TSTypeParameter");
  83451. }
  83452. tsParseMappedType() {
  83453. const node = this.startNode();
  83454. this.expect(types$12.braceL);
  83455. if (this.match(types$12.plusMin)) {
  83456. node.readonly = this.state.value;
  83457. this.next();
  83458. this.expectContextual("readonly");
  83459. } else if (this.eatContextual("readonly")) {
  83460. node.readonly = true;
  83461. }
  83462. this.expect(types$12.bracketL);
  83463. node.typeParameter = this.tsParseMappedTypeParameter();
  83464. node.nameType = this.eatContextual("as") ? this.tsParseType() : null;
  83465. this.expect(types$12.bracketR);
  83466. if (this.match(types$12.plusMin)) {
  83467. node.optional = this.state.value;
  83468. this.next();
  83469. this.expect(types$12.question);
  83470. } else if (this.eat(types$12.question)) {
  83471. node.optional = true;
  83472. }
  83473. node.typeAnnotation = this.tsTryParseType();
  83474. this.semicolon();
  83475. this.expect(types$12.braceR);
  83476. return this.finishNode(node, "TSMappedType");
  83477. }
  83478. tsParseTupleType() {
  83479. const node = this.startNode();
  83480. node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  83481. let seenOptionalElement = false;
  83482. let labeledElements = null;
  83483. node.elementTypes.forEach((elementNode) => {
  83484. var _labeledElements;
  83485. let {
  83486. type
  83487. } = elementNode;
  83488. if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
  83489. this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);
  83490. }
  83491. seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
  83492. if (type === "TSRestType") {
  83493. elementNode = elementNode.typeAnnotation;
  83494. type = elementNode.type;
  83495. }
  83496. const isLabeled = type === "TSNamedTupleMember";
  83497. labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
  83498. if (labeledElements !== isLabeled) {
  83499. this.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements);
  83500. }
  83501. });
  83502. return this.finishNode(node, "TSTupleType");
  83503. }
  83504. tsParseTupleElementType() {
  83505. const {
  83506. start: startPos,
  83507. startLoc
  83508. } = this.state;
  83509. const rest = this.eat(types$12.ellipsis);
  83510. let type = this.tsParseType();
  83511. const optional = this.eat(types$12.question);
  83512. const labeled = this.eat(types$12.colon);
  83513. if (labeled) {
  83514. const labeledNode = this.startNodeAtNode(type);
  83515. labeledNode.optional = optional;
  83516. if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
  83517. labeledNode.label = type.typeName;
  83518. } else {
  83519. this.raise(type.start, TSErrors.InvalidTupleMemberLabel);
  83520. labeledNode.label = type;
  83521. }
  83522. labeledNode.elementType = this.tsParseType();
  83523. type = this.finishNode(labeledNode, "TSNamedTupleMember");
  83524. } else if (optional) {
  83525. const optionalTypeNode = this.startNodeAtNode(type);
  83526. optionalTypeNode.typeAnnotation = type;
  83527. type = this.finishNode(optionalTypeNode, "TSOptionalType");
  83528. }
  83529. if (rest) {
  83530. const restNode = this.startNodeAt(startPos, startLoc);
  83531. restNode.typeAnnotation = type;
  83532. type = this.finishNode(restNode, "TSRestType");
  83533. }
  83534. return type;
  83535. }
  83536. tsParseParenthesizedType() {
  83537. const node = this.startNode();
  83538. this.expect(types$12.parenL);
  83539. node.typeAnnotation = this.tsParseType();
  83540. this.expect(types$12.parenR);
  83541. return this.finishNode(node, "TSParenthesizedType");
  83542. }
  83543. tsParseFunctionOrConstructorType(type, abstract) {
  83544. const node = this.startNode();
  83545. if (type === "TSConstructorType") {
  83546. node.abstract = !!abstract;
  83547. if (abstract)
  83548. this.next();
  83549. this.next();
  83550. }
  83551. this.tsFillSignature(types$12.arrow, node);
  83552. return this.finishNode(node, type);
  83553. }
  83554. tsParseLiteralTypeNode() {
  83555. const node = this.startNode();
  83556. node.literal = (() => {
  83557. switch (this.state.type) {
  83558. case types$12.num:
  83559. case types$12.bigint:
  83560. case types$12.string:
  83561. case types$12._true:
  83562. case types$12._false:
  83563. return this.parseExprAtom();
  83564. default:
  83565. throw this.unexpected();
  83566. }
  83567. })();
  83568. return this.finishNode(node, "TSLiteralType");
  83569. }
  83570. tsParseTemplateLiteralType() {
  83571. const node = this.startNode();
  83572. node.literal = this.parseTemplate(false);
  83573. return this.finishNode(node, "TSLiteralType");
  83574. }
  83575. parseTemplateSubstitution() {
  83576. if (this.state.inType)
  83577. return this.tsParseType();
  83578. return super.parseTemplateSubstitution();
  83579. }
  83580. tsParseThisTypeOrThisTypePredicate() {
  83581. const thisKeyword = this.tsParseThisTypeNode();
  83582. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  83583. return this.tsParseThisTypePredicate(thisKeyword);
  83584. } else {
  83585. return thisKeyword;
  83586. }
  83587. }
  83588. tsParseNonArrayType() {
  83589. switch (this.state.type) {
  83590. case types$12.name:
  83591. case types$12._void:
  83592. case types$12._null: {
  83593. const type = this.match(types$12._void) ? "TSVoidKeyword" : this.match(types$12._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  83594. if (type !== void 0 && this.lookaheadCharCode() !== 46) {
  83595. const node = this.startNode();
  83596. this.next();
  83597. return this.finishNode(node, type);
  83598. }
  83599. return this.tsParseTypeReference();
  83600. }
  83601. case types$12.string:
  83602. case types$12.num:
  83603. case types$12.bigint:
  83604. case types$12._true:
  83605. case types$12._false:
  83606. return this.tsParseLiteralTypeNode();
  83607. case types$12.plusMin:
  83608. if (this.state.value === "-") {
  83609. const node = this.startNode();
  83610. const nextToken = this.lookahead();
  83611. if (nextToken.type !== types$12.num && nextToken.type !== types$12.bigint) {
  83612. throw this.unexpected();
  83613. }
  83614. node.literal = this.parseMaybeUnary();
  83615. return this.finishNode(node, "TSLiteralType");
  83616. }
  83617. break;
  83618. case types$12._this:
  83619. return this.tsParseThisTypeOrThisTypePredicate();
  83620. case types$12._typeof:
  83621. return this.tsParseTypeQuery();
  83622. case types$12._import:
  83623. return this.tsParseImportType();
  83624. case types$12.braceL:
  83625. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  83626. case types$12.bracketL:
  83627. return this.tsParseTupleType();
  83628. case types$12.parenL:
  83629. return this.tsParseParenthesizedType();
  83630. case types$12.backQuote:
  83631. return this.tsParseTemplateLiteralType();
  83632. }
  83633. throw this.unexpected();
  83634. }
  83635. tsParseArrayTypeOrHigher() {
  83636. let type = this.tsParseNonArrayType();
  83637. while (!this.hasPrecedingLineBreak() && this.eat(types$12.bracketL)) {
  83638. if (this.match(types$12.bracketR)) {
  83639. const node = this.startNodeAtNode(type);
  83640. node.elementType = type;
  83641. this.expect(types$12.bracketR);
  83642. type = this.finishNode(node, "TSArrayType");
  83643. } else {
  83644. const node = this.startNodeAtNode(type);
  83645. node.objectType = type;
  83646. node.indexType = this.tsParseType();
  83647. this.expect(types$12.bracketR);
  83648. type = this.finishNode(node, "TSIndexedAccessType");
  83649. }
  83650. }
  83651. return type;
  83652. }
  83653. tsParseTypeOperator(operator) {
  83654. const node = this.startNode();
  83655. this.expectContextual(operator);
  83656. node.operator = operator;
  83657. node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  83658. if (operator === "readonly") {
  83659. this.tsCheckTypeAnnotationForReadOnly(node);
  83660. }
  83661. return this.finishNode(node, "TSTypeOperator");
  83662. }
  83663. tsCheckTypeAnnotationForReadOnly(node) {
  83664. switch (node.typeAnnotation.type) {
  83665. case "TSTupleType":
  83666. case "TSArrayType":
  83667. return;
  83668. default:
  83669. this.raise(node.start, TSErrors.UnexpectedReadonly);
  83670. }
  83671. }
  83672. tsParseInferType() {
  83673. const node = this.startNode();
  83674. this.expectContextual("infer");
  83675. const typeParameter = this.startNode();
  83676. typeParameter.name = this.tsParseTypeParameterName();
  83677. node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  83678. return this.finishNode(node, "TSInferType");
  83679. }
  83680. tsParseTypeOperatorOrHigher() {
  83681. const operator = ["keyof", "unique", "readonly"].find((kw2) => this.isContextual(kw2));
  83682. return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
  83683. }
  83684. tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  83685. const node = this.startNode();
  83686. const hasLeadingOperator = this.eat(operator);
  83687. const types3 = [];
  83688. do {
  83689. types3.push(parseConstituentType());
  83690. } while (this.eat(operator));
  83691. if (types3.length === 1 && !hasLeadingOperator) {
  83692. return types3[0];
  83693. }
  83694. node.types = types3;
  83695. return this.finishNode(node, kind);
  83696. }
  83697. tsParseIntersectionTypeOrHigher() {
  83698. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types$12.bitwiseAND);
  83699. }
  83700. tsParseUnionTypeOrHigher() {
  83701. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types$12.bitwiseOR);
  83702. }
  83703. tsIsStartOfFunctionType() {
  83704. if (this.isRelational("<")) {
  83705. return true;
  83706. }
  83707. return this.match(types$12.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  83708. }
  83709. tsSkipParameterStart() {
  83710. if (this.match(types$12.name) || this.match(types$12._this)) {
  83711. this.next();
  83712. return true;
  83713. }
  83714. if (this.match(types$12.braceL)) {
  83715. let braceStackCounter = 1;
  83716. this.next();
  83717. while (braceStackCounter > 0) {
  83718. if (this.match(types$12.braceL)) {
  83719. ++braceStackCounter;
  83720. } else if (this.match(types$12.braceR)) {
  83721. --braceStackCounter;
  83722. }
  83723. this.next();
  83724. }
  83725. return true;
  83726. }
  83727. if (this.match(types$12.bracketL)) {
  83728. let braceStackCounter = 1;
  83729. this.next();
  83730. while (braceStackCounter > 0) {
  83731. if (this.match(types$12.bracketL)) {
  83732. ++braceStackCounter;
  83733. } else if (this.match(types$12.bracketR)) {
  83734. --braceStackCounter;
  83735. }
  83736. this.next();
  83737. }
  83738. return true;
  83739. }
  83740. return false;
  83741. }
  83742. tsIsUnambiguouslyStartOfFunctionType() {
  83743. this.next();
  83744. if (this.match(types$12.parenR) || this.match(types$12.ellipsis)) {
  83745. return true;
  83746. }
  83747. if (this.tsSkipParameterStart()) {
  83748. if (this.match(types$12.colon) || this.match(types$12.comma) || this.match(types$12.question) || this.match(types$12.eq)) {
  83749. return true;
  83750. }
  83751. if (this.match(types$12.parenR)) {
  83752. this.next();
  83753. if (this.match(types$12.arrow)) {
  83754. return true;
  83755. }
  83756. }
  83757. }
  83758. return false;
  83759. }
  83760. tsParseTypeOrTypePredicateAnnotation(returnToken) {
  83761. return this.tsInType(() => {
  83762. const t2 = this.startNode();
  83763. this.expect(returnToken);
  83764. const node = this.startNode();
  83765. const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
  83766. if (asserts && this.match(types$12._this)) {
  83767. let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
  83768. if (thisTypePredicate.type === "TSThisType") {
  83769. node.parameterName = thisTypePredicate;
  83770. node.asserts = true;
  83771. node.typeAnnotation = null;
  83772. thisTypePredicate = this.finishNode(node, "TSTypePredicate");
  83773. } else {
  83774. this.resetStartLocationFromNode(thisTypePredicate, node);
  83775. thisTypePredicate.asserts = true;
  83776. }
  83777. t2.typeAnnotation = thisTypePredicate;
  83778. return this.finishNode(t2, "TSTypeAnnotation");
  83779. }
  83780. const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
  83781. if (!typePredicateVariable) {
  83782. if (!asserts) {
  83783. return this.tsParseTypeAnnotation(false, t2);
  83784. }
  83785. node.parameterName = this.parseIdentifier();
  83786. node.asserts = asserts;
  83787. node.typeAnnotation = null;
  83788. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  83789. return this.finishNode(t2, "TSTypeAnnotation");
  83790. }
  83791. const type = this.tsParseTypeAnnotation(false);
  83792. node.parameterName = typePredicateVariable;
  83793. node.typeAnnotation = type;
  83794. node.asserts = asserts;
  83795. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  83796. return this.finishNode(t2, "TSTypeAnnotation");
  83797. });
  83798. }
  83799. tsTryParseTypeOrTypePredicateAnnotation() {
  83800. return this.match(types$12.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types$12.colon) : void 0;
  83801. }
  83802. tsTryParseTypeAnnotation() {
  83803. return this.match(types$12.colon) ? this.tsParseTypeAnnotation() : void 0;
  83804. }
  83805. tsTryParseType() {
  83806. return this.tsEatThenParseType(types$12.colon);
  83807. }
  83808. tsParseTypePredicatePrefix() {
  83809. const id = this.parseIdentifier();
  83810. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  83811. this.next();
  83812. return id;
  83813. }
  83814. }
  83815. tsParseTypePredicateAsserts() {
  83816. if (!this.match(types$12.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
  83817. return false;
  83818. }
  83819. const containsEsc = this.state.containsEsc;
  83820. this.next();
  83821. if (!this.match(types$12.name) && !this.match(types$12._this)) {
  83822. return false;
  83823. }
  83824. if (containsEsc) {
  83825. this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts");
  83826. }
  83827. return true;
  83828. }
  83829. tsParseTypeAnnotation(eatColon = true, t2 = this.startNode()) {
  83830. this.tsInType(() => {
  83831. if (eatColon)
  83832. this.expect(types$12.colon);
  83833. t2.typeAnnotation = this.tsParseType();
  83834. });
  83835. return this.finishNode(t2, "TSTypeAnnotation");
  83836. }
  83837. tsParseType() {
  83838. assert(this.state.inType);
  83839. const type = this.tsParseNonConditionalType();
  83840. if (this.hasPrecedingLineBreak() || !this.eat(types$12._extends)) {
  83841. return type;
  83842. }
  83843. const node = this.startNodeAtNode(type);
  83844. node.checkType = type;
  83845. node.extendsType = this.tsParseNonConditionalType();
  83846. this.expect(types$12.question);
  83847. node.trueType = this.tsParseType();
  83848. this.expect(types$12.colon);
  83849. node.falseType = this.tsParseType();
  83850. return this.finishNode(node, "TSConditionalType");
  83851. }
  83852. isAbstractConstructorSignature() {
  83853. return this.isContextual("abstract") && this.lookahead().type === types$12._new;
  83854. }
  83855. tsParseNonConditionalType() {
  83856. if (this.tsIsStartOfFunctionType()) {
  83857. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  83858. }
  83859. if (this.match(types$12._new)) {
  83860. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  83861. } else if (this.isAbstractConstructorSignature()) {
  83862. return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
  83863. }
  83864. return this.tsParseUnionTypeOrHigher();
  83865. }
  83866. tsParseTypeAssertion() {
  83867. const node = this.startNode();
  83868. const _const = this.tsTryNextParseConstantContext();
  83869. node.typeAnnotation = _const || this.tsNextThenParseType();
  83870. this.expectRelational(">");
  83871. node.expression = this.parseMaybeUnary();
  83872. return this.finishNode(node, "TSTypeAssertion");
  83873. }
  83874. tsParseHeritageClause(descriptor) {
  83875. const originalStart = this.state.start;
  83876. const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
  83877. if (!delimitedList.length) {
  83878. this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);
  83879. }
  83880. return delimitedList;
  83881. }
  83882. tsParseExpressionWithTypeArguments() {
  83883. const node = this.startNode();
  83884. node.expression = this.tsParseEntityName(false);
  83885. if (this.isRelational("<")) {
  83886. node.typeParameters = this.tsParseTypeArguments();
  83887. }
  83888. return this.finishNode(node, "TSExpressionWithTypeArguments");
  83889. }
  83890. tsParseInterfaceDeclaration(node) {
  83891. node.id = this.parseIdentifier();
  83892. this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
  83893. node.typeParameters = this.tsTryParseTypeParameters();
  83894. if (this.eat(types$12._extends)) {
  83895. node.extends = this.tsParseHeritageClause("extends");
  83896. }
  83897. const body = this.startNode();
  83898. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  83899. node.body = this.finishNode(body, "TSInterfaceBody");
  83900. return this.finishNode(node, "TSInterfaceDeclaration");
  83901. }
  83902. tsParseTypeAliasDeclaration(node) {
  83903. node.id = this.parseIdentifier();
  83904. this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
  83905. node.typeParameters = this.tsTryParseTypeParameters();
  83906. node.typeAnnotation = this.tsInType(() => {
  83907. this.expect(types$12.eq);
  83908. if (this.isContextual("intrinsic") && this.lookahead().type !== types$12.dot) {
  83909. const node2 = this.startNode();
  83910. this.next();
  83911. return this.finishNode(node2, "TSIntrinsicKeyword");
  83912. }
  83913. return this.tsParseType();
  83914. });
  83915. this.semicolon();
  83916. return this.finishNode(node, "TSTypeAliasDeclaration");
  83917. }
  83918. tsInNoContext(cb) {
  83919. const oldContext = this.state.context;
  83920. this.state.context = [oldContext[0]];
  83921. try {
  83922. return cb();
  83923. } finally {
  83924. this.state.context = oldContext;
  83925. }
  83926. }
  83927. tsInType(cb) {
  83928. const oldInType = this.state.inType;
  83929. this.state.inType = true;
  83930. try {
  83931. return cb();
  83932. } finally {
  83933. this.state.inType = oldInType;
  83934. }
  83935. }
  83936. tsEatThenParseType(token) {
  83937. return !this.match(token) ? void 0 : this.tsNextThenParseType();
  83938. }
  83939. tsExpectThenParseType(token) {
  83940. return this.tsDoThenParseType(() => this.expect(token));
  83941. }
  83942. tsNextThenParseType() {
  83943. return this.tsDoThenParseType(() => this.next());
  83944. }
  83945. tsDoThenParseType(cb) {
  83946. return this.tsInType(() => {
  83947. cb();
  83948. return this.tsParseType();
  83949. });
  83950. }
  83951. tsParseEnumMember() {
  83952. const node = this.startNode();
  83953. node.id = this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  83954. if (this.eat(types$12.eq)) {
  83955. node.initializer = this.parseMaybeAssignAllowIn();
  83956. }
  83957. return this.finishNode(node, "TSEnumMember");
  83958. }
  83959. tsParseEnumDeclaration(node, isConst) {
  83960. if (isConst)
  83961. node.const = true;
  83962. node.id = this.parseIdentifier();
  83963. this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
  83964. this.expect(types$12.braceL);
  83965. node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  83966. this.expect(types$12.braceR);
  83967. return this.finishNode(node, "TSEnumDeclaration");
  83968. }
  83969. tsParseModuleBlock() {
  83970. const node = this.startNode();
  83971. this.scope.enter(SCOPE_OTHER);
  83972. this.expect(types$12.braceL);
  83973. this.parseBlockOrModuleBlockBody(node.body = [], void 0, true, types$12.braceR);
  83974. this.scope.exit();
  83975. return this.finishNode(node, "TSModuleBlock");
  83976. }
  83977. tsParseModuleOrNamespaceDeclaration(node, nested = false) {
  83978. node.id = this.parseIdentifier();
  83979. if (!nested) {
  83980. this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
  83981. }
  83982. if (this.eat(types$12.dot)) {
  83983. const inner = this.startNode();
  83984. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  83985. node.body = inner;
  83986. } else {
  83987. this.scope.enter(SCOPE_TS_MODULE);
  83988. this.prodParam.enter(PARAM);
  83989. node.body = this.tsParseModuleBlock();
  83990. this.prodParam.exit();
  83991. this.scope.exit();
  83992. }
  83993. return this.finishNode(node, "TSModuleDeclaration");
  83994. }
  83995. tsParseAmbientExternalModuleDeclaration(node) {
  83996. if (this.isContextual("global")) {
  83997. node.global = true;
  83998. node.id = this.parseIdentifier();
  83999. } else if (this.match(types$12.string)) {
  84000. node.id = this.parseExprAtom();
  84001. } else {
  84002. this.unexpected();
  84003. }
  84004. if (this.match(types$12.braceL)) {
  84005. this.scope.enter(SCOPE_TS_MODULE);
  84006. this.prodParam.enter(PARAM);
  84007. node.body = this.tsParseModuleBlock();
  84008. this.prodParam.exit();
  84009. this.scope.exit();
  84010. } else {
  84011. this.semicolon();
  84012. }
  84013. return this.finishNode(node, "TSModuleDeclaration");
  84014. }
  84015. tsParseImportEqualsDeclaration(node, isExport) {
  84016. node.isExport = isExport || false;
  84017. node.id = this.parseIdentifier();
  84018. this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL2);
  84019. this.expect(types$12.eq);
  84020. const moduleReference = this.tsParseModuleReference();
  84021. if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
  84022. this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType);
  84023. }
  84024. node.moduleReference = moduleReference;
  84025. this.semicolon();
  84026. return this.finishNode(node, "TSImportEqualsDeclaration");
  84027. }
  84028. tsIsExternalModuleReference() {
  84029. return this.isContextual("require") && this.lookaheadCharCode() === 40;
  84030. }
  84031. tsParseModuleReference() {
  84032. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  84033. }
  84034. tsParseExternalModuleReference() {
  84035. const node = this.startNode();
  84036. this.expectContextual("require");
  84037. this.expect(types$12.parenL);
  84038. if (!this.match(types$12.string)) {
  84039. throw this.unexpected();
  84040. }
  84041. node.expression = this.parseExprAtom();
  84042. this.expect(types$12.parenR);
  84043. return this.finishNode(node, "TSExternalModuleReference");
  84044. }
  84045. tsLookAhead(f) {
  84046. const state = this.state.clone();
  84047. const res = f();
  84048. this.state = state;
  84049. return res;
  84050. }
  84051. tsTryParseAndCatch(f) {
  84052. const result = this.tryParse((abort) => f() || abort());
  84053. if (result.aborted || !result.node)
  84054. return void 0;
  84055. if (result.error)
  84056. this.state = result.failState;
  84057. return result.node;
  84058. }
  84059. tsTryParse(f) {
  84060. const state = this.state.clone();
  84061. const result = f();
  84062. if (result !== void 0 && result !== false) {
  84063. return result;
  84064. } else {
  84065. this.state = state;
  84066. return void 0;
  84067. }
  84068. }
  84069. tsTryParseDeclare(nany) {
  84070. if (this.isLineTerminator()) {
  84071. return;
  84072. }
  84073. let starttype = this.state.type;
  84074. let kind;
  84075. if (this.isContextual("let")) {
  84076. starttype = types$12._var;
  84077. kind = "let";
  84078. }
  84079. return this.tsInAmbientContext(() => {
  84080. switch (starttype) {
  84081. case types$12._function:
  84082. nany.declare = true;
  84083. return this.parseFunctionStatement(nany, false, true);
  84084. case types$12._class:
  84085. nany.declare = true;
  84086. return this.parseClass(nany, true, false);
  84087. case types$12._const:
  84088. if (this.match(types$12._const) && this.isLookaheadContextual("enum")) {
  84089. this.expect(types$12._const);
  84090. this.expectContextual("enum");
  84091. return this.tsParseEnumDeclaration(nany, true);
  84092. }
  84093. case types$12._var:
  84094. kind = kind || this.state.value;
  84095. return this.parseVarStatement(nany, kind);
  84096. case types$12.name: {
  84097. const value = this.state.value;
  84098. if (value === "global") {
  84099. return this.tsParseAmbientExternalModuleDeclaration(nany);
  84100. } else {
  84101. return this.tsParseDeclaration(nany, value, true);
  84102. }
  84103. }
  84104. }
  84105. });
  84106. }
  84107. tsTryParseExportDeclaration() {
  84108. return this.tsParseDeclaration(this.startNode(), this.state.value, true);
  84109. }
  84110. tsParseExpressionStatement(node, expr) {
  84111. switch (expr.name) {
  84112. case "declare": {
  84113. const declaration = this.tsTryParseDeclare(node);
  84114. if (declaration) {
  84115. declaration.declare = true;
  84116. return declaration;
  84117. }
  84118. break;
  84119. }
  84120. case "global":
  84121. if (this.match(types$12.braceL)) {
  84122. this.scope.enter(SCOPE_TS_MODULE);
  84123. this.prodParam.enter(PARAM);
  84124. const mod = node;
  84125. mod.global = true;
  84126. mod.id = expr;
  84127. mod.body = this.tsParseModuleBlock();
  84128. this.scope.exit();
  84129. this.prodParam.exit();
  84130. return this.finishNode(mod, "TSModuleDeclaration");
  84131. }
  84132. break;
  84133. default:
  84134. return this.tsParseDeclaration(node, expr.name, false);
  84135. }
  84136. }
  84137. tsParseDeclaration(node, value, next) {
  84138. switch (value) {
  84139. case "abstract":
  84140. if (this.tsCheckLineTerminator(next) && (this.match(types$12._class) || this.match(types$12.name))) {
  84141. return this.tsParseAbstractDeclaration(node);
  84142. }
  84143. break;
  84144. case "enum":
  84145. if (next || this.match(types$12.name)) {
  84146. if (next)
  84147. this.next();
  84148. return this.tsParseEnumDeclaration(node, false);
  84149. }
  84150. break;
  84151. case "interface":
  84152. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  84153. return this.tsParseInterfaceDeclaration(node);
  84154. }
  84155. break;
  84156. case "module":
  84157. if (this.tsCheckLineTerminator(next)) {
  84158. if (this.match(types$12.string)) {
  84159. return this.tsParseAmbientExternalModuleDeclaration(node);
  84160. } else if (this.match(types$12.name)) {
  84161. return this.tsParseModuleOrNamespaceDeclaration(node);
  84162. }
  84163. }
  84164. break;
  84165. case "namespace":
  84166. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  84167. return this.tsParseModuleOrNamespaceDeclaration(node);
  84168. }
  84169. break;
  84170. case "type":
  84171. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  84172. return this.tsParseTypeAliasDeclaration(node);
  84173. }
  84174. break;
  84175. }
  84176. }
  84177. tsCheckLineTerminator(next) {
  84178. if (next) {
  84179. if (this.hasFollowingLineBreak())
  84180. return false;
  84181. this.next();
  84182. return true;
  84183. }
  84184. return !this.isLineTerminator();
  84185. }
  84186. tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
  84187. if (!this.isRelational("<")) {
  84188. return void 0;
  84189. }
  84190. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  84191. this.state.maybeInArrowParameters = true;
  84192. const res = this.tsTryParseAndCatch(() => {
  84193. const node = this.startNodeAt(startPos, startLoc);
  84194. node.typeParameters = this.tsParseTypeParameters();
  84195. super.parseFunctionParams(node);
  84196. node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
  84197. this.expect(types$12.arrow);
  84198. return node;
  84199. });
  84200. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  84201. if (!res) {
  84202. return void 0;
  84203. }
  84204. return this.parseArrowExpression(res, null, true);
  84205. }
  84206. tsParseTypeArguments() {
  84207. const node = this.startNode();
  84208. node.params = this.tsInType(() => this.tsInNoContext(() => {
  84209. this.expectRelational("<");
  84210. return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
  84211. }));
  84212. if (node.params.length === 0) {
  84213. this.raise(node.start, TSErrors.EmptyTypeArguments);
  84214. }
  84215. this.expectRelational(">");
  84216. return this.finishNode(node, "TSTypeParameterInstantiation");
  84217. }
  84218. tsIsDeclarationStart() {
  84219. if (this.match(types$12.name)) {
  84220. switch (this.state.value) {
  84221. case "abstract":
  84222. case "declare":
  84223. case "enum":
  84224. case "interface":
  84225. case "module":
  84226. case "namespace":
  84227. case "type":
  84228. return true;
  84229. }
  84230. }
  84231. return false;
  84232. }
  84233. isExportDefaultSpecifier() {
  84234. if (this.tsIsDeclarationStart())
  84235. return false;
  84236. return super.isExportDefaultSpecifier();
  84237. }
  84238. parseAssignableListItem(allowModifiers, decorators) {
  84239. const startPos = this.state.start;
  84240. const startLoc = this.state.startLoc;
  84241. let accessibility;
  84242. let readonly = false;
  84243. let override = false;
  84244. if (allowModifiers !== void 0) {
  84245. const modified = {};
  84246. this.tsParseModifiers(modified, ["public", "private", "protected", "override", "readonly"]);
  84247. accessibility = modified.accessibility;
  84248. override = modified.override;
  84249. readonly = modified.readonly;
  84250. if (allowModifiers === false && (accessibility || readonly || override)) {
  84251. this.raise(startPos, TSErrors.UnexpectedParameterModifier);
  84252. }
  84253. }
  84254. const left = this.parseMaybeDefault();
  84255. this.parseAssignableListItemTypes(left);
  84256. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  84257. if (accessibility || readonly || override) {
  84258. const pp2 = this.startNodeAt(startPos, startLoc);
  84259. if (decorators.length) {
  84260. pp2.decorators = decorators;
  84261. }
  84262. if (accessibility)
  84263. pp2.accessibility = accessibility;
  84264. if (readonly)
  84265. pp2.readonly = readonly;
  84266. if (override)
  84267. pp2.override = override;
  84268. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  84269. this.raise(pp2.start, TSErrors.UnsupportedParameterPropertyKind);
  84270. }
  84271. pp2.parameter = elt;
  84272. return this.finishNode(pp2, "TSParameterProperty");
  84273. }
  84274. if (decorators.length) {
  84275. left.decorators = decorators;
  84276. }
  84277. return elt;
  84278. }
  84279. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  84280. if (this.match(types$12.colon)) {
  84281. node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  84282. }
  84283. const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : void 0;
  84284. if (bodilessType && !this.match(types$12.braceL) && this.isLineTerminator()) {
  84285. this.finishNode(node, bodilessType);
  84286. return;
  84287. }
  84288. if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
  84289. this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);
  84290. if (node.declare) {
  84291. super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
  84292. return;
  84293. }
  84294. }
  84295. super.parseFunctionBodyAndFinish(node, type, isMethod);
  84296. }
  84297. registerFunctionStatementId(node) {
  84298. if (!node.body && node.id) {
  84299. this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
  84300. } else {
  84301. super.registerFunctionStatementId(...arguments);
  84302. }
  84303. }
  84304. tsCheckForInvalidTypeCasts(items) {
  84305. items.forEach((node) => {
  84306. if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
  84307. this.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation);
  84308. }
  84309. });
  84310. }
  84311. toReferencedList(exprList, isInParens) {
  84312. this.tsCheckForInvalidTypeCasts(exprList);
  84313. return exprList;
  84314. }
  84315. parseArrayLike(...args) {
  84316. const node = super.parseArrayLike(...args);
  84317. if (node.type === "ArrayExpression") {
  84318. this.tsCheckForInvalidTypeCasts(node.elements);
  84319. }
  84320. return node;
  84321. }
  84322. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  84323. if (!this.hasPrecedingLineBreak() && this.match(types$12.bang)) {
  84324. this.state.exprAllowed = false;
  84325. this.next();
  84326. const nonNullExpression = this.startNodeAt(startPos, startLoc);
  84327. nonNullExpression.expression = base2;
  84328. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  84329. }
  84330. if (this.isRelational("<")) {
  84331. const result = this.tsTryParseAndCatch(() => {
  84332. if (!noCalls && this.atPossibleAsyncArrow(base2)) {
  84333. const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
  84334. if (asyncArrowFn) {
  84335. return asyncArrowFn;
  84336. }
  84337. }
  84338. const node = this.startNodeAt(startPos, startLoc);
  84339. node.callee = base2;
  84340. const typeArguments = this.tsParseTypeArguments();
  84341. if (typeArguments) {
  84342. if (!noCalls && this.eat(types$12.parenL)) {
  84343. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  84344. this.tsCheckForInvalidTypeCasts(node.arguments);
  84345. node.typeParameters = typeArguments;
  84346. if (state.optionalChainMember) {
  84347. node.optional = false;
  84348. }
  84349. return this.finishCallExpression(node, state.optionalChainMember);
  84350. } else if (this.match(types$12.backQuote)) {
  84351. const result2 = this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  84352. result2.typeParameters = typeArguments;
  84353. return result2;
  84354. }
  84355. }
  84356. this.unexpected();
  84357. });
  84358. if (result)
  84359. return result;
  84360. }
  84361. return super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  84362. }
  84363. parseNewArguments(node) {
  84364. if (this.isRelational("<")) {
  84365. const typeParameters = this.tsTryParseAndCatch(() => {
  84366. const args = this.tsParseTypeArguments();
  84367. if (!this.match(types$12.parenL))
  84368. this.unexpected();
  84369. return args;
  84370. });
  84371. if (typeParameters) {
  84372. node.typeParameters = typeParameters;
  84373. }
  84374. }
  84375. super.parseNewArguments(node);
  84376. }
  84377. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  84378. if (nonNull(types$12._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
  84379. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  84380. node.expression = left;
  84381. const _const = this.tsTryNextParseConstantContext();
  84382. if (_const) {
  84383. node.typeAnnotation = _const;
  84384. } else {
  84385. node.typeAnnotation = this.tsNextThenParseType();
  84386. }
  84387. this.finishNode(node, "TSAsExpression");
  84388. this.reScan_lt_gt();
  84389. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  84390. }
  84391. return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);
  84392. }
  84393. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  84394. }
  84395. checkDuplicateExports() {
  84396. }
  84397. parseImport(node) {
  84398. node.importKind = "value";
  84399. if (this.match(types$12.name) || this.match(types$12.star) || this.match(types$12.braceL)) {
  84400. let ahead = this.lookahead();
  84401. if (this.isContextual("type") && ahead.type !== types$12.comma && !(ahead.type === types$12.name && ahead.value === "from") && ahead.type !== types$12.eq) {
  84402. node.importKind = "type";
  84403. this.next();
  84404. ahead = this.lookahead();
  84405. }
  84406. if (this.match(types$12.name) && ahead.type === types$12.eq) {
  84407. return this.tsParseImportEqualsDeclaration(node);
  84408. }
  84409. }
  84410. const importNode = super.parseImport(node);
  84411. if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
  84412. this.raise(importNode.start, TSErrors.TypeImportCannotSpecifyDefaultAndNamed);
  84413. }
  84414. return importNode;
  84415. }
  84416. parseExport(node) {
  84417. if (this.match(types$12._import)) {
  84418. this.next();
  84419. if (this.isContextual("type") && this.lookaheadCharCode() !== 61) {
  84420. node.importKind = "type";
  84421. this.next();
  84422. } else {
  84423. node.importKind = "value";
  84424. }
  84425. return this.tsParseImportEqualsDeclaration(node, true);
  84426. } else if (this.eat(types$12.eq)) {
  84427. const assign = node;
  84428. assign.expression = this.parseExpression();
  84429. this.semicolon();
  84430. return this.finishNode(assign, "TSExportAssignment");
  84431. } else if (this.eatContextual("as")) {
  84432. const decl = node;
  84433. this.expectContextual("namespace");
  84434. decl.id = this.parseIdentifier();
  84435. this.semicolon();
  84436. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  84437. } else {
  84438. if (this.isContextual("type") && this.lookahead().type === types$12.braceL) {
  84439. this.next();
  84440. node.exportKind = "type";
  84441. } else {
  84442. node.exportKind = "value";
  84443. }
  84444. return super.parseExport(node);
  84445. }
  84446. }
  84447. isAbstractClass() {
  84448. return this.isContextual("abstract") && this.lookahead().type === types$12._class;
  84449. }
  84450. parseExportDefaultExpression() {
  84451. if (this.isAbstractClass()) {
  84452. const cls = this.startNode();
  84453. this.next();
  84454. cls.abstract = true;
  84455. this.parseClass(cls, true, true);
  84456. return cls;
  84457. }
  84458. if (this.state.value === "interface") {
  84459. const result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
  84460. if (result)
  84461. return result;
  84462. }
  84463. return super.parseExportDefaultExpression();
  84464. }
  84465. parseStatementContent(context, topLevel) {
  84466. if (this.state.type === types$12._const) {
  84467. const ahead = this.lookahead();
  84468. if (ahead.type === types$12.name && ahead.value === "enum") {
  84469. const node = this.startNode();
  84470. this.expect(types$12._const);
  84471. this.expectContextual("enum");
  84472. return this.tsParseEnumDeclaration(node, true);
  84473. }
  84474. }
  84475. return super.parseStatementContent(context, topLevel);
  84476. }
  84477. parseAccessModifier() {
  84478. return this.tsParseModifier(["public", "protected", "private"]);
  84479. }
  84480. tsHasSomeModifiers(member, modifiers) {
  84481. return modifiers.some((modifier) => {
  84482. if (tsIsAccessModifier(modifier)) {
  84483. return member.accessibility === modifier;
  84484. }
  84485. return !!member[modifier];
  84486. });
  84487. }
  84488. parseClassMember(classBody, member, state) {
  84489. const invalidModifersForStaticBlocks = ["declare", "private", "public", "protected", "override", "abstract", "readonly"];
  84490. this.tsParseModifiers(member, invalidModifersForStaticBlocks.concat(["static"]));
  84491. const callParseClassMemberWithIsStatic = () => {
  84492. const isStatic = !!member.static;
  84493. if (isStatic && this.eat(types$12.braceL)) {
  84494. if (this.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {
  84495. this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier);
  84496. }
  84497. this.parseClassStaticBlock(classBody, member);
  84498. } else {
  84499. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  84500. }
  84501. };
  84502. if (member.declare) {
  84503. this.tsInAmbientContext(callParseClassMemberWithIsStatic);
  84504. } else {
  84505. callParseClassMemberWithIsStatic();
  84506. }
  84507. }
  84508. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  84509. const idx = this.tsTryParseIndexSignature(member);
  84510. if (idx) {
  84511. classBody.body.push(idx);
  84512. if (member.abstract) {
  84513. this.raise(member.start, TSErrors.IndexSignatureHasAbstract);
  84514. }
  84515. if (member.accessibility) {
  84516. this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility);
  84517. }
  84518. if (member.declare) {
  84519. this.raise(member.start, TSErrors.IndexSignatureHasDeclare);
  84520. }
  84521. if (member.override) {
  84522. this.raise(member.start, TSErrors.IndexSignatureHasOverride);
  84523. }
  84524. return;
  84525. }
  84526. if (!this.state.inAbstractClass && member.abstract) {
  84527. this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod);
  84528. }
  84529. if (member.override) {
  84530. if (!state.hadSuperClass) {
  84531. this.raise(member.start, TSErrors.OverrideNotInSubClass);
  84532. }
  84533. }
  84534. super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  84535. }
  84536. parsePostMemberNameModifiers(methodOrProp) {
  84537. const optional = this.eat(types$12.question);
  84538. if (optional)
  84539. methodOrProp.optional = true;
  84540. if (methodOrProp.readonly && this.match(types$12.parenL)) {
  84541. this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);
  84542. }
  84543. if (methodOrProp.declare && this.match(types$12.parenL)) {
  84544. this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);
  84545. }
  84546. }
  84547. parseExpressionStatement(node, expr) {
  84548. const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0;
  84549. return decl || super.parseExpressionStatement(node, expr);
  84550. }
  84551. shouldParseExportDeclaration() {
  84552. if (this.tsIsDeclarationStart())
  84553. return true;
  84554. return super.shouldParseExportDeclaration();
  84555. }
  84556. parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  84557. if (!this.state.maybeInArrowParameters || !this.match(types$12.question)) {
  84558. return super.parseConditional(expr, startPos, startLoc, refExpressionErrors);
  84559. }
  84560. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  84561. if (!result.node) {
  84562. if (result.error) {
  84563. super.setOptionalParametersError(refExpressionErrors, result.error);
  84564. }
  84565. return expr;
  84566. }
  84567. if (result.error)
  84568. this.state = result.failState;
  84569. return result.node;
  84570. }
  84571. parseParenItem(node, startPos, startLoc) {
  84572. node = super.parseParenItem(node, startPos, startLoc);
  84573. if (this.eat(types$12.question)) {
  84574. node.optional = true;
  84575. this.resetEndLocation(node);
  84576. }
  84577. if (this.match(types$12.colon)) {
  84578. const typeCastNode = this.startNodeAt(startPos, startLoc);
  84579. typeCastNode.expression = node;
  84580. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  84581. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  84582. }
  84583. return node;
  84584. }
  84585. parseExportDeclaration(node) {
  84586. const startPos = this.state.start;
  84587. const startLoc = this.state.startLoc;
  84588. const isDeclare = this.eatContextual("declare");
  84589. if (isDeclare && (this.isContextual("declare") || !this.shouldParseExportDeclaration())) {
  84590. throw this.raise(this.state.start, TSErrors.ExpectedAmbientAfterExportDeclare);
  84591. }
  84592. let declaration;
  84593. if (this.match(types$12.name)) {
  84594. declaration = this.tsTryParseExportDeclaration();
  84595. }
  84596. if (!declaration) {
  84597. declaration = super.parseExportDeclaration(node);
  84598. }
  84599. if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
  84600. node.exportKind = "type";
  84601. }
  84602. if (declaration && isDeclare) {
  84603. this.resetStartLocation(declaration, startPos, startLoc);
  84604. declaration.declare = true;
  84605. }
  84606. return declaration;
  84607. }
  84608. parseClassId(node, isStatement, optionalId) {
  84609. if ((!isStatement || optionalId) && this.isContextual("implements")) {
  84610. return;
  84611. }
  84612. super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  84613. const typeParameters = this.tsTryParseTypeParameters();
  84614. if (typeParameters)
  84615. node.typeParameters = typeParameters;
  84616. }
  84617. parseClassPropertyAnnotation(node) {
  84618. if (!node.optional && this.eat(types$12.bang)) {
  84619. node.definite = true;
  84620. }
  84621. const type = this.tsTryParseTypeAnnotation();
  84622. if (type)
  84623. node.typeAnnotation = type;
  84624. }
  84625. parseClassProperty(node) {
  84626. this.parseClassPropertyAnnotation(node);
  84627. if (this.state.isAmbientContext && this.match(types$12.eq)) {
  84628. this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
  84629. }
  84630. return super.parseClassProperty(node);
  84631. }
  84632. parseClassPrivateProperty(node) {
  84633. if (node.abstract) {
  84634. this.raise(node.start, TSErrors.PrivateElementHasAbstract);
  84635. }
  84636. if (node.accessibility) {
  84637. this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility);
  84638. }
  84639. this.parseClassPropertyAnnotation(node);
  84640. return super.parseClassPrivateProperty(node);
  84641. }
  84642. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  84643. const typeParameters = this.tsTryParseTypeParameters();
  84644. if (typeParameters && isConstructor) {
  84645. this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);
  84646. }
  84647. if (method.declare && (method.kind === "get" || method.kind === "set")) {
  84648. this.raise(method.start, TSErrors.DeclareAccessor, method.kind);
  84649. }
  84650. if (typeParameters)
  84651. method.typeParameters = typeParameters;
  84652. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  84653. }
  84654. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  84655. const typeParameters = this.tsTryParseTypeParameters();
  84656. if (typeParameters)
  84657. method.typeParameters = typeParameters;
  84658. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  84659. }
  84660. parseClassSuper(node) {
  84661. super.parseClassSuper(node);
  84662. if (node.superClass && this.isRelational("<")) {
  84663. node.superTypeParameters = this.tsParseTypeArguments();
  84664. }
  84665. if (this.eatContextual("implements")) {
  84666. node.implements = this.tsParseHeritageClause("implements");
  84667. }
  84668. }
  84669. parseObjPropValue(prop, ...args) {
  84670. const typeParameters = this.tsTryParseTypeParameters();
  84671. if (typeParameters)
  84672. prop.typeParameters = typeParameters;
  84673. super.parseObjPropValue(prop, ...args);
  84674. }
  84675. parseFunctionParams(node, allowModifiers) {
  84676. const typeParameters = this.tsTryParseTypeParameters();
  84677. if (typeParameters)
  84678. node.typeParameters = typeParameters;
  84679. super.parseFunctionParams(node, allowModifiers);
  84680. }
  84681. parseVarId(decl, kind) {
  84682. super.parseVarId(decl, kind);
  84683. if (decl.id.type === "Identifier" && this.eat(types$12.bang)) {
  84684. decl.definite = true;
  84685. }
  84686. const type = this.tsTryParseTypeAnnotation();
  84687. if (type) {
  84688. decl.id.typeAnnotation = type;
  84689. this.resetEndLocation(decl.id);
  84690. }
  84691. }
  84692. parseAsyncArrowFromCallExpression(node, call) {
  84693. if (this.match(types$12.colon)) {
  84694. node.returnType = this.tsParseTypeAnnotation();
  84695. }
  84696. return super.parseAsyncArrowFromCallExpression(node, call);
  84697. }
  84698. parseMaybeAssign(...args) {
  84699. var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
  84700. let state;
  84701. let jsx2;
  84702. let typeCast;
  84703. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  84704. state = this.state.clone();
  84705. jsx2 = this.tryParse(() => super.parseMaybeAssign(...args), state);
  84706. if (!jsx2.error)
  84707. return jsx2.node;
  84708. const {
  84709. context
  84710. } = this.state;
  84711. if (context[context.length - 1] === types2.j_oTag) {
  84712. context.length -= 2;
  84713. } else if (context[context.length - 1] === types2.j_expr) {
  84714. context.length -= 1;
  84715. }
  84716. }
  84717. if (!((_jsx = jsx2) != null && _jsx.error) && !this.isRelational("<")) {
  84718. return super.parseMaybeAssign(...args);
  84719. }
  84720. let typeParameters;
  84721. state = state || this.state.clone();
  84722. const arrow = this.tryParse((abort) => {
  84723. var _expr$extra, _typeParameters;
  84724. typeParameters = this.tsParseTypeParameters();
  84725. const expr = super.parseMaybeAssign(...args);
  84726. if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
  84727. abort();
  84728. }
  84729. if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
  84730. this.resetStartLocationFromNode(expr, typeParameters);
  84731. }
  84732. expr.typeParameters = typeParameters;
  84733. return expr;
  84734. }, state);
  84735. if (!arrow.error && !arrow.aborted)
  84736. return arrow.node;
  84737. if (!jsx2) {
  84738. assert(!this.hasPlugin("jsx"));
  84739. typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);
  84740. if (!typeCast.error)
  84741. return typeCast.node;
  84742. }
  84743. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  84744. this.state = jsx2.failState;
  84745. return jsx2.node;
  84746. }
  84747. if (arrow.node) {
  84748. this.state = arrow.failState;
  84749. return arrow.node;
  84750. }
  84751. if ((_typeCast = typeCast) != null && _typeCast.node) {
  84752. this.state = typeCast.failState;
  84753. return typeCast.node;
  84754. }
  84755. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  84756. throw jsx2.error;
  84757. if (arrow.thrown)
  84758. throw arrow.error;
  84759. if ((_typeCast2 = typeCast) != null && _typeCast2.thrown)
  84760. throw typeCast.error;
  84761. throw ((_jsx4 = jsx2) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
  84762. }
  84763. parseMaybeUnary(refExpressionErrors) {
  84764. if (!this.hasPlugin("jsx") && this.isRelational("<")) {
  84765. return this.tsParseTypeAssertion();
  84766. } else {
  84767. return super.parseMaybeUnary(refExpressionErrors);
  84768. }
  84769. }
  84770. parseArrow(node) {
  84771. if (this.match(types$12.colon)) {
  84772. const result = this.tryParse((abort) => {
  84773. const returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  84774. if (this.canInsertSemicolon() || !this.match(types$12.arrow))
  84775. abort();
  84776. return returnType;
  84777. });
  84778. if (result.aborted)
  84779. return;
  84780. if (!result.thrown) {
  84781. if (result.error)
  84782. this.state = result.failState;
  84783. node.returnType = result.node;
  84784. }
  84785. }
  84786. return super.parseArrow(node);
  84787. }
  84788. parseAssignableListItemTypes(param) {
  84789. if (this.eat(types$12.question)) {
  84790. if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) {
  84791. this.raise(param.start, TSErrors.PatternIsOptional);
  84792. }
  84793. param.optional = true;
  84794. }
  84795. const type = this.tsTryParseTypeAnnotation();
  84796. if (type)
  84797. param.typeAnnotation = type;
  84798. this.resetEndLocation(param);
  84799. return param;
  84800. }
  84801. toAssignable(node, isLHS = false) {
  84802. switch (node.type) {
  84803. case "TSTypeCastExpression":
  84804. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  84805. case "TSParameterProperty":
  84806. return super.toAssignable(node, isLHS);
  84807. case "ParenthesizedExpression":
  84808. return this.toAssignableParenthesizedExpression(node, isLHS);
  84809. case "TSAsExpression":
  84810. case "TSNonNullExpression":
  84811. case "TSTypeAssertion":
  84812. node.expression = this.toAssignable(node.expression, isLHS);
  84813. return node;
  84814. default:
  84815. return super.toAssignable(node, isLHS);
  84816. }
  84817. }
  84818. toAssignableParenthesizedExpression(node, isLHS) {
  84819. switch (node.expression.type) {
  84820. case "TSAsExpression":
  84821. case "TSNonNullExpression":
  84822. case "TSTypeAssertion":
  84823. case "ParenthesizedExpression":
  84824. node.expression = this.toAssignable(node.expression, isLHS);
  84825. return node;
  84826. default:
  84827. return super.toAssignable(node, isLHS);
  84828. }
  84829. }
  84830. checkLVal(expr, contextDescription, ...args) {
  84831. var _expr$extra2;
  84832. switch (expr.type) {
  84833. case "TSTypeCastExpression":
  84834. return;
  84835. case "TSParameterProperty":
  84836. this.checkLVal(expr.parameter, "parameter property", ...args);
  84837. return;
  84838. case "TSAsExpression":
  84839. case "TSTypeAssertion":
  84840. if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) {
  84841. this.raise(expr.start, ErrorMessages.InvalidLhs, contextDescription);
  84842. break;
  84843. }
  84844. this.checkLVal(expr.expression, "parenthesized expression", ...args);
  84845. return;
  84846. case "TSNonNullExpression":
  84847. this.checkLVal(expr.expression, contextDescription, ...args);
  84848. return;
  84849. default:
  84850. super.checkLVal(expr, contextDescription, ...args);
  84851. return;
  84852. }
  84853. }
  84854. parseBindingAtom() {
  84855. switch (this.state.type) {
  84856. case types$12._this:
  84857. return this.parseIdentifier(true);
  84858. default:
  84859. return super.parseBindingAtom();
  84860. }
  84861. }
  84862. parseMaybeDecoratorArguments(expr) {
  84863. if (this.isRelational("<")) {
  84864. const typeArguments = this.tsParseTypeArguments();
  84865. if (this.match(types$12.parenL)) {
  84866. const call = super.parseMaybeDecoratorArguments(expr);
  84867. call.typeParameters = typeArguments;
  84868. return call;
  84869. }
  84870. this.unexpected(this.state.start, types$12.parenL);
  84871. }
  84872. return super.parseMaybeDecoratorArguments(expr);
  84873. }
  84874. checkCommaAfterRest(close) {
  84875. if (this.state.isAmbientContext && this.match(types$12.comma) && this.lookaheadCharCode() === close) {
  84876. this.next();
  84877. } else {
  84878. super.checkCommaAfterRest(close);
  84879. }
  84880. }
  84881. isClassMethod() {
  84882. return this.isRelational("<") || super.isClassMethod();
  84883. }
  84884. isClassProperty() {
  84885. return this.match(types$12.bang) || this.match(types$12.colon) || super.isClassProperty();
  84886. }
  84887. parseMaybeDefault(...args) {
  84888. const node = super.parseMaybeDefault(...args);
  84889. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  84890. this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign);
  84891. }
  84892. return node;
  84893. }
  84894. getTokenFromCode(code2) {
  84895. if (this.state.inType && (code2 === 62 || code2 === 60)) {
  84896. return this.finishOp(types$12.relational, 1);
  84897. } else {
  84898. return super.getTokenFromCode(code2);
  84899. }
  84900. }
  84901. reScan_lt_gt() {
  84902. if (this.match(types$12.relational)) {
  84903. const code2 = this.input.charCodeAt(this.state.start);
  84904. if (code2 === 60 || code2 === 62) {
  84905. this.state.pos -= 1;
  84906. this.readToken_lt_gt(code2);
  84907. }
  84908. }
  84909. }
  84910. toAssignableList(exprList) {
  84911. for (let i = 0; i < exprList.length; i++) {
  84912. const expr = exprList[i];
  84913. if (!expr)
  84914. continue;
  84915. switch (expr.type) {
  84916. case "TSTypeCastExpression":
  84917. exprList[i] = this.typeCastToParameter(expr);
  84918. break;
  84919. case "TSAsExpression":
  84920. case "TSTypeAssertion":
  84921. if (!this.state.maybeInArrowParameters) {
  84922. exprList[i] = this.typeCastToParameter(expr);
  84923. } else {
  84924. this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);
  84925. }
  84926. break;
  84927. }
  84928. }
  84929. return super.toAssignableList(...arguments);
  84930. }
  84931. typeCastToParameter(node) {
  84932. node.expression.typeAnnotation = node.typeAnnotation;
  84933. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  84934. return node.expression;
  84935. }
  84936. shouldParseArrow() {
  84937. return this.match(types$12.colon) || super.shouldParseArrow();
  84938. }
  84939. shouldParseAsyncArrow() {
  84940. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  84941. }
  84942. canHaveLeadingDecorator() {
  84943. return super.canHaveLeadingDecorator() || this.isAbstractClass();
  84944. }
  84945. jsxParseOpeningElementAfterName(node) {
  84946. if (this.isRelational("<")) {
  84947. const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
  84948. if (typeArguments)
  84949. node.typeParameters = typeArguments;
  84950. }
  84951. return super.jsxParseOpeningElementAfterName(node);
  84952. }
  84953. getGetterSetterExpectedParamCount(method) {
  84954. const baseCount = super.getGetterSetterExpectedParamCount(method);
  84955. const params = this.getObjectOrClassMethodParams(method);
  84956. const firstParam = params[0];
  84957. const hasContextParam = firstParam && this.isThisParam(firstParam);
  84958. return hasContextParam ? baseCount + 1 : baseCount;
  84959. }
  84960. parseCatchClauseParam() {
  84961. const param = super.parseCatchClauseParam();
  84962. const type = this.tsTryParseTypeAnnotation();
  84963. if (type) {
  84964. param.typeAnnotation = type;
  84965. this.resetEndLocation(param);
  84966. }
  84967. return param;
  84968. }
  84969. tsInAmbientContext(cb) {
  84970. const oldIsAmbientContext = this.state.isAmbientContext;
  84971. this.state.isAmbientContext = true;
  84972. try {
  84973. return cb();
  84974. } finally {
  84975. this.state.isAmbientContext = oldIsAmbientContext;
  84976. }
  84977. }
  84978. parseClass(node, ...args) {
  84979. const oldInAbstractClass = this.state.inAbstractClass;
  84980. this.state.inAbstractClass = !!node.abstract;
  84981. try {
  84982. return super.parseClass(node, ...args);
  84983. } finally {
  84984. this.state.inAbstractClass = oldInAbstractClass;
  84985. }
  84986. }
  84987. tsParseAbstractDeclaration(node) {
  84988. if (this.match(types$12._class)) {
  84989. node.abstract = true;
  84990. return this.parseClass(node, true, false);
  84991. } else if (this.isContextual("interface")) {
  84992. if (!this.hasFollowingLineBreak()) {
  84993. node.abstract = true;
  84994. this.raise(node.start, TSErrors.NonClassMethodPropertyHasAbstractModifer);
  84995. this.next();
  84996. return this.tsParseInterfaceDeclaration(node);
  84997. }
  84998. } else {
  84999. this.unexpected(null, types$12._class);
  85000. }
  85001. }
  85002. parseMethod(...args) {
  85003. const method = super.parseMethod(...args);
  85004. if (method.abstract) {
  85005. const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
  85006. if (hasBody) {
  85007. const {
  85008. key
  85009. } = method;
  85010. this.raise(method.start, TSErrors.AbstractMethodHasImplementation, key.type === "Identifier" ? key.name : `[${this.input.slice(key.start, key.end)}]`);
  85011. }
  85012. }
  85013. return method;
  85014. }
  85015. tsParseTypeParameterName() {
  85016. const typeName = this.parseIdentifier();
  85017. return typeName.name;
  85018. }
  85019. shouldParseAsAmbientContext() {
  85020. return !!this.getPluginOption("typescript", "dts");
  85021. }
  85022. parse() {
  85023. if (this.shouldParseAsAmbientContext()) {
  85024. this.state.isAmbientContext = true;
  85025. }
  85026. return super.parse();
  85027. }
  85028. getExpression() {
  85029. if (this.shouldParseAsAmbientContext()) {
  85030. this.state.isAmbientContext = true;
  85031. }
  85032. return super.getExpression();
  85033. }
  85034. };
  85035. types$12.placeholder = new TokenType3("%%", {
  85036. startsExpr: true
  85037. });
  85038. var PlaceHolderErrors = makeErrorTemplates({
  85039. ClassNameIsRequired: "A class name is required."
  85040. }, ErrorCodes.SyntaxError);
  85041. var placeholders = (superClass) => class extends superClass {
  85042. parsePlaceholder(expectedNode) {
  85043. if (this.match(types$12.placeholder)) {
  85044. const node = this.startNode();
  85045. this.next();
  85046. this.assertNoSpace("Unexpected space in placeholder.");
  85047. node.name = super.parseIdentifier(true);
  85048. this.assertNoSpace("Unexpected space in placeholder.");
  85049. this.expect(types$12.placeholder);
  85050. return this.finishPlaceholder(node, expectedNode);
  85051. }
  85052. }
  85053. finishPlaceholder(node, expectedNode) {
  85054. const isFinished = !!(node.expectedNode && node.type === "Placeholder");
  85055. node.expectedNode = expectedNode;
  85056. return isFinished ? node : this.finishNode(node, "Placeholder");
  85057. }
  85058. getTokenFromCode(code2) {
  85059. if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  85060. return this.finishOp(types$12.placeholder, 2);
  85061. }
  85062. return super.getTokenFromCode(...arguments);
  85063. }
  85064. parseExprAtom() {
  85065. return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
  85066. }
  85067. parseIdentifier() {
  85068. return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
  85069. }
  85070. checkReservedWord(word) {
  85071. if (word !== void 0)
  85072. super.checkReservedWord(...arguments);
  85073. }
  85074. parseBindingAtom() {
  85075. return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
  85076. }
  85077. checkLVal(expr) {
  85078. if (expr.type !== "Placeholder")
  85079. super.checkLVal(...arguments);
  85080. }
  85081. toAssignable(node) {
  85082. if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
  85083. node.expectedNode = "Pattern";
  85084. return node;
  85085. }
  85086. return super.toAssignable(...arguments);
  85087. }
  85088. isLet(context) {
  85089. if (super.isLet(context)) {
  85090. return true;
  85091. }
  85092. if (!this.isContextual("let")) {
  85093. return false;
  85094. }
  85095. if (context)
  85096. return false;
  85097. const nextToken = this.lookahead();
  85098. if (nextToken.type === types$12.placeholder) {
  85099. return true;
  85100. }
  85101. return false;
  85102. }
  85103. verifyBreakContinue(node) {
  85104. if (node.label && node.label.type === "Placeholder")
  85105. return;
  85106. super.verifyBreakContinue(...arguments);
  85107. }
  85108. parseExpressionStatement(node, expr) {
  85109. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  85110. return super.parseExpressionStatement(...arguments);
  85111. }
  85112. if (this.match(types$12.colon)) {
  85113. const stmt = node;
  85114. stmt.label = this.finishPlaceholder(expr, "Identifier");
  85115. this.next();
  85116. stmt.body = this.parseStatement("label");
  85117. return this.finishNode(stmt, "LabeledStatement");
  85118. }
  85119. this.semicolon();
  85120. node.name = expr.name;
  85121. return this.finishPlaceholder(node, "Statement");
  85122. }
  85123. parseBlock() {
  85124. return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
  85125. }
  85126. parseFunctionId() {
  85127. return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
  85128. }
  85129. parseClass(node, isStatement, optionalId) {
  85130. const type = isStatement ? "ClassDeclaration" : "ClassExpression";
  85131. this.next();
  85132. this.takeDecorators(node);
  85133. const oldStrict = this.state.strict;
  85134. const placeholder = this.parsePlaceholder("Identifier");
  85135. if (placeholder) {
  85136. if (this.match(types$12._extends) || this.match(types$12.placeholder) || this.match(types$12.braceL)) {
  85137. node.id = placeholder;
  85138. } else if (optionalId || !isStatement) {
  85139. node.id = null;
  85140. node.body = this.finishPlaceholder(placeholder, "ClassBody");
  85141. return this.finishNode(node, type);
  85142. } else {
  85143. this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired);
  85144. }
  85145. } else {
  85146. this.parseClassId(node, isStatement, optionalId);
  85147. }
  85148. this.parseClassSuper(node);
  85149. node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
  85150. return this.finishNode(node, type);
  85151. }
  85152. parseExport(node) {
  85153. const placeholder = this.parsePlaceholder("Identifier");
  85154. if (!placeholder)
  85155. return super.parseExport(...arguments);
  85156. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  85157. node.specifiers = [];
  85158. node.source = null;
  85159. node.declaration = this.finishPlaceholder(placeholder, "Declaration");
  85160. return this.finishNode(node, "ExportNamedDeclaration");
  85161. }
  85162. this.expectPlugin("exportDefaultFrom");
  85163. const specifier = this.startNode();
  85164. specifier.exported = placeholder;
  85165. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  85166. return super.parseExport(node);
  85167. }
  85168. isExportDefaultSpecifier() {
  85169. if (this.match(types$12._default)) {
  85170. const next = this.nextTokenStart();
  85171. if (this.isUnparsedContextual(next, "from")) {
  85172. if (this.input.startsWith(types$12.placeholder.label, this.nextTokenStartSince(next + 4))) {
  85173. return true;
  85174. }
  85175. }
  85176. }
  85177. return super.isExportDefaultSpecifier();
  85178. }
  85179. maybeParseExportDefaultSpecifier(node) {
  85180. if (node.specifiers && node.specifiers.length > 0) {
  85181. return true;
  85182. }
  85183. return super.maybeParseExportDefaultSpecifier(...arguments);
  85184. }
  85185. checkExport(node) {
  85186. const {
  85187. specifiers
  85188. } = node;
  85189. if (specifiers != null && specifiers.length) {
  85190. node.specifiers = specifiers.filter((node2) => node2.exported.type === "Placeholder");
  85191. }
  85192. super.checkExport(node);
  85193. node.specifiers = specifiers;
  85194. }
  85195. parseImport(node) {
  85196. const placeholder = this.parsePlaceholder("Identifier");
  85197. if (!placeholder)
  85198. return super.parseImport(...arguments);
  85199. node.specifiers = [];
  85200. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  85201. node.source = this.finishPlaceholder(placeholder, "StringLiteral");
  85202. this.semicolon();
  85203. return this.finishNode(node, "ImportDeclaration");
  85204. }
  85205. const specifier = this.startNodeAtNode(placeholder);
  85206. specifier.local = placeholder;
  85207. this.finishNode(specifier, "ImportDefaultSpecifier");
  85208. node.specifiers.push(specifier);
  85209. if (this.eat(types$12.comma)) {
  85210. const hasStarImport = this.maybeParseStarImportSpecifier(node);
  85211. if (!hasStarImport)
  85212. this.parseNamedImportSpecifiers(node);
  85213. }
  85214. this.expectContextual("from");
  85215. node.source = this.parseImportSource();
  85216. this.semicolon();
  85217. return this.finishNode(node, "ImportDeclaration");
  85218. }
  85219. parseImportSource() {
  85220. return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
  85221. }
  85222. };
  85223. var v8intrinsic = (superClass) => class extends superClass {
  85224. parseV8Intrinsic() {
  85225. if (this.match(types$12.modulo)) {
  85226. const v8IntrinsicStart = this.state.start;
  85227. const node = this.startNode();
  85228. this.eat(types$12.modulo);
  85229. if (this.match(types$12.name)) {
  85230. const name2 = this.parseIdentifierName(this.state.start);
  85231. const identifier = this.createIdentifier(node, name2);
  85232. identifier.type = "V8IntrinsicIdentifier";
  85233. if (this.match(types$12.parenL)) {
  85234. return identifier;
  85235. }
  85236. }
  85237. this.unexpected(v8IntrinsicStart);
  85238. }
  85239. }
  85240. parseExprAtom() {
  85241. return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);
  85242. }
  85243. };
  85244. function hasPlugin(plugins, name2) {
  85245. return plugins.some((plugin2) => {
  85246. if (Array.isArray(plugin2)) {
  85247. return plugin2[0] === name2;
  85248. } else {
  85249. return plugin2 === name2;
  85250. }
  85251. });
  85252. }
  85253. function getPluginOption(plugins, name2, option) {
  85254. const plugin2 = plugins.find((plugin3) => {
  85255. if (Array.isArray(plugin3)) {
  85256. return plugin3[0] === name2;
  85257. } else {
  85258. return plugin3 === name2;
  85259. }
  85260. });
  85261. if (plugin2 && Array.isArray(plugin2)) {
  85262. return plugin2[1][option];
  85263. }
  85264. return null;
  85265. }
  85266. var PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
  85267. var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
  85268. function validatePlugins(plugins) {
  85269. if (hasPlugin(plugins, "decorators")) {
  85270. if (hasPlugin(plugins, "decorators-legacy")) {
  85271. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  85272. }
  85273. const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  85274. if (decoratorsBeforeExport == null) {
  85275. 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'.");
  85276. } else if (typeof decoratorsBeforeExport !== "boolean") {
  85277. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  85278. }
  85279. }
  85280. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  85281. throw new Error("Cannot combine flow and typescript plugins.");
  85282. }
  85283. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  85284. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  85285. }
  85286. if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
  85287. throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map((p) => `'${p}'`).join(", "));
  85288. }
  85289. if (hasPlugin(plugins, "moduleAttributes")) {
  85290. {
  85291. if (hasPlugin(plugins, "importAssertions")) {
  85292. throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
  85293. }
  85294. const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
  85295. if (moduleAttributesVerionPluginOption !== "may-2020") {
  85296. throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
  85297. }
  85298. }
  85299. }
  85300. if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
  85301. throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
  85302. }
  85303. if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
  85304. const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
  85305. error.missingPlugins = "doExpressions";
  85306. throw error;
  85307. }
  85308. }
  85309. var mixinPlugins = {
  85310. estree,
  85311. jsx,
  85312. flow: flow3,
  85313. typescript,
  85314. v8intrinsic,
  85315. placeholders
  85316. };
  85317. var mixinPluginNames = Object.keys(mixinPlugins);
  85318. var defaultOptions2 = {
  85319. sourceType: "script",
  85320. sourceFilename: void 0,
  85321. startLine: 1,
  85322. allowAwaitOutsideFunction: false,
  85323. allowReturnOutsideFunction: false,
  85324. allowImportExportEverywhere: false,
  85325. allowSuperOutsideMethod: false,
  85326. allowUndeclaredExports: false,
  85327. plugins: [],
  85328. strictMode: null,
  85329. ranges: false,
  85330. tokens: false,
  85331. createParenthesizedExpressions: false,
  85332. errorRecovery: false
  85333. };
  85334. function getOptions2(opts) {
  85335. const options = {};
  85336. for (const key of Object.keys(defaultOptions2)) {
  85337. options[key] = opts && opts[key] != null ? opts[key] : defaultOptions2[key];
  85338. }
  85339. return options;
  85340. }
  85341. var _isDigit = function isDigit(code2) {
  85342. return code2 >= 48 && code2 <= 57;
  85343. };
  85344. var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100]);
  85345. var forbiddenNumericSeparatorSiblings = {
  85346. decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
  85347. hex: [46, 88, 95, 120]
  85348. };
  85349. var allowedNumericSeparatorSiblings = {};
  85350. allowedNumericSeparatorSiblings.bin = [48, 49];
  85351. allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
  85352. allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
  85353. allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
  85354. var Token3 = class {
  85355. constructor(state) {
  85356. this.type = state.type;
  85357. this.value = state.value;
  85358. this.start = state.start;
  85359. this.end = state.end;
  85360. this.loc = new SourceLocation3(state.startLoc, state.endLoc);
  85361. }
  85362. };
  85363. var Tokenizer = class extends ParserError {
  85364. constructor(options, input) {
  85365. super();
  85366. this.isLookahead = void 0;
  85367. this.tokens = [];
  85368. this.state = new State2();
  85369. this.state.init(options);
  85370. this.input = input;
  85371. this.length = input.length;
  85372. this.isLookahead = false;
  85373. }
  85374. pushToken(token) {
  85375. this.tokens.length = this.state.tokensLength;
  85376. this.tokens.push(token);
  85377. ++this.state.tokensLength;
  85378. }
  85379. next() {
  85380. this.checkKeywordEscapes();
  85381. if (this.options.tokens) {
  85382. this.pushToken(new Token3(this.state));
  85383. }
  85384. this.state.lastTokEnd = this.state.end;
  85385. this.state.lastTokStart = this.state.start;
  85386. this.state.lastTokEndLoc = this.state.endLoc;
  85387. this.state.lastTokStartLoc = this.state.startLoc;
  85388. this.nextToken();
  85389. }
  85390. eat(type) {
  85391. if (this.match(type)) {
  85392. this.next();
  85393. return true;
  85394. } else {
  85395. return false;
  85396. }
  85397. }
  85398. match(type) {
  85399. return this.state.type === type;
  85400. }
  85401. createLookaheadState(state) {
  85402. return {
  85403. pos: state.pos,
  85404. value: null,
  85405. type: state.type,
  85406. start: state.start,
  85407. end: state.end,
  85408. lastTokEnd: state.end,
  85409. context: [this.curContext()],
  85410. inType: state.inType
  85411. };
  85412. }
  85413. lookahead() {
  85414. const old = this.state;
  85415. this.state = this.createLookaheadState(old);
  85416. this.isLookahead = true;
  85417. this.nextToken();
  85418. this.isLookahead = false;
  85419. const curr = this.state;
  85420. this.state = old;
  85421. return curr;
  85422. }
  85423. nextTokenStart() {
  85424. return this.nextTokenStartSince(this.state.pos);
  85425. }
  85426. nextTokenStartSince(pos) {
  85427. skipWhiteSpace2.lastIndex = pos;
  85428. const skip = skipWhiteSpace2.exec(this.input);
  85429. return pos + skip[0].length;
  85430. }
  85431. lookaheadCharCode() {
  85432. return this.input.charCodeAt(this.nextTokenStart());
  85433. }
  85434. codePointAtPos(pos) {
  85435. let cp = this.input.charCodeAt(pos);
  85436. if ((cp & 64512) === 55296 && ++pos < this.input.length) {
  85437. const trail = this.input.charCodeAt(pos);
  85438. if ((trail & 64512) === 56320) {
  85439. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  85440. }
  85441. }
  85442. return cp;
  85443. }
  85444. setStrict(strict) {
  85445. this.state.strict = strict;
  85446. if (strict) {
  85447. this.state.strictErrors.forEach((message, pos) => this.raise(pos, message));
  85448. this.state.strictErrors.clear();
  85449. }
  85450. }
  85451. curContext() {
  85452. return this.state.context[this.state.context.length - 1];
  85453. }
  85454. nextToken() {
  85455. const curContext = this.curContext();
  85456. if (!curContext.preserveSpace)
  85457. this.skipSpace();
  85458. this.state.start = this.state.pos;
  85459. if (!this.isLookahead)
  85460. this.state.startLoc = this.state.curPosition();
  85461. if (this.state.pos >= this.length) {
  85462. this.finishToken(types$12.eof);
  85463. return;
  85464. }
  85465. if (curContext === types2.template) {
  85466. this.readTmplToken();
  85467. } else {
  85468. this.getTokenFromCode(this.codePointAtPos(this.state.pos));
  85469. }
  85470. }
  85471. skipBlockComment() {
  85472. let startLoc;
  85473. if (!this.isLookahead)
  85474. startLoc = this.state.curPosition();
  85475. const start3 = this.state.pos;
  85476. const end = this.input.indexOf("*/", this.state.pos + 2);
  85477. if (end === -1)
  85478. throw this.raise(start3, ErrorMessages.UnterminatedComment);
  85479. this.state.pos = end + 2;
  85480. lineBreakG2.lastIndex = start3;
  85481. let match;
  85482. while ((match = lineBreakG2.exec(this.input)) && match.index < this.state.pos) {
  85483. ++this.state.curLine;
  85484. this.state.lineStart = match.index + match[0].length;
  85485. }
  85486. if (this.isLookahead)
  85487. return;
  85488. const value = this.input.slice(start3 + 2, end);
  85489. const comment2 = {
  85490. type: "CommentBlock",
  85491. value,
  85492. start: start3,
  85493. end: end + 2,
  85494. loc: new SourceLocation3(startLoc, this.state.curPosition())
  85495. };
  85496. if (this.options.tokens)
  85497. this.pushToken(comment2);
  85498. return comment2;
  85499. }
  85500. skipLineComment(startSkip) {
  85501. const start3 = this.state.pos;
  85502. let startLoc;
  85503. if (!this.isLookahead)
  85504. startLoc = this.state.curPosition();
  85505. let ch = this.input.charCodeAt(this.state.pos += startSkip);
  85506. if (this.state.pos < this.length) {
  85507. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  85508. ch = this.input.charCodeAt(this.state.pos);
  85509. }
  85510. }
  85511. if (this.isLookahead)
  85512. return;
  85513. const end = this.state.pos;
  85514. const value = this.input.slice(start3 + startSkip, end);
  85515. const comment2 = {
  85516. type: "CommentLine",
  85517. value,
  85518. start: start3,
  85519. end,
  85520. loc: new SourceLocation3(startLoc, this.state.curPosition())
  85521. };
  85522. if (this.options.tokens)
  85523. this.pushToken(comment2);
  85524. return comment2;
  85525. }
  85526. skipSpace() {
  85527. const spaceStart = this.state.pos;
  85528. const comments = [];
  85529. loop:
  85530. while (this.state.pos < this.length) {
  85531. const ch = this.input.charCodeAt(this.state.pos);
  85532. switch (ch) {
  85533. case 32:
  85534. case 160:
  85535. case 9:
  85536. ++this.state.pos;
  85537. break;
  85538. case 13:
  85539. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  85540. ++this.state.pos;
  85541. }
  85542. case 10:
  85543. case 8232:
  85544. case 8233:
  85545. ++this.state.pos;
  85546. ++this.state.curLine;
  85547. this.state.lineStart = this.state.pos;
  85548. break;
  85549. case 47:
  85550. switch (this.input.charCodeAt(this.state.pos + 1)) {
  85551. case 42: {
  85552. const comment2 = this.skipBlockComment();
  85553. if (comment2 !== void 0) {
  85554. this.addComment(comment2);
  85555. comments.push(comment2);
  85556. }
  85557. break;
  85558. }
  85559. case 47: {
  85560. const comment2 = this.skipLineComment(2);
  85561. if (comment2 !== void 0) {
  85562. this.addComment(comment2);
  85563. comments.push(comment2);
  85564. }
  85565. break;
  85566. }
  85567. default:
  85568. break loop;
  85569. }
  85570. break;
  85571. default:
  85572. if (isWhitespace(ch)) {
  85573. ++this.state.pos;
  85574. } else if (ch === 45 && !this.inModule) {
  85575. const pos = this.state.pos;
  85576. if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) {
  85577. const comment2 = this.skipLineComment(3);
  85578. if (comment2 !== void 0) {
  85579. this.addComment(comment2);
  85580. comments.push(comment2);
  85581. }
  85582. } else {
  85583. break loop;
  85584. }
  85585. } else if (ch === 60 && !this.inModule) {
  85586. const pos = this.state.pos;
  85587. if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) {
  85588. const comment2 = this.skipLineComment(4);
  85589. if (comment2 !== void 0) {
  85590. this.addComment(comment2);
  85591. comments.push(comment2);
  85592. }
  85593. } else {
  85594. break loop;
  85595. }
  85596. } else {
  85597. break loop;
  85598. }
  85599. }
  85600. }
  85601. if (comments.length > 0) {
  85602. const end = this.state.pos;
  85603. const CommentWhitespace = {
  85604. start: spaceStart,
  85605. end,
  85606. comments,
  85607. leadingNode: null,
  85608. trailingNode: null,
  85609. containingNode: null
  85610. };
  85611. this.state.commentStack.push(CommentWhitespace);
  85612. }
  85613. }
  85614. finishToken(type, val) {
  85615. this.state.end = this.state.pos;
  85616. const prevType = this.state.type;
  85617. this.state.type = type;
  85618. this.state.value = val;
  85619. if (!this.isLookahead) {
  85620. this.state.endLoc = this.state.curPosition();
  85621. this.updateContext(prevType);
  85622. }
  85623. }
  85624. readToken_numberSign() {
  85625. if (this.state.pos === 0 && this.readToken_interpreter()) {
  85626. return;
  85627. }
  85628. const nextPos = this.state.pos + 1;
  85629. const next = this.codePointAtPos(nextPos);
  85630. if (next >= 48 && next <= 57) {
  85631. throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash);
  85632. }
  85633. if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
  85634. this.expectPlugin("recordAndTuple");
  85635. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
  85636. throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType);
  85637. }
  85638. this.state.pos += 2;
  85639. if (next === 123) {
  85640. this.finishToken(types$12.braceHashL);
  85641. } else {
  85642. this.finishToken(types$12.bracketHashL);
  85643. }
  85644. } else if (isIdentifierStart2(next)) {
  85645. ++this.state.pos;
  85646. this.finishToken(types$12.privateName, this.readWord1(next));
  85647. } else if (next === 92) {
  85648. ++this.state.pos;
  85649. this.finishToken(types$12.privateName, this.readWord1());
  85650. } else {
  85651. this.finishOp(types$12.hash, 1);
  85652. }
  85653. }
  85654. readToken_dot() {
  85655. const next = this.input.charCodeAt(this.state.pos + 1);
  85656. if (next >= 48 && next <= 57) {
  85657. this.readNumber(true);
  85658. return;
  85659. }
  85660. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  85661. this.state.pos += 3;
  85662. this.finishToken(types$12.ellipsis);
  85663. } else {
  85664. ++this.state.pos;
  85665. this.finishToken(types$12.dot);
  85666. }
  85667. }
  85668. readToken_slash() {
  85669. const next = this.input.charCodeAt(this.state.pos + 1);
  85670. if (next === 61) {
  85671. this.finishOp(types$12.slashAssign, 2);
  85672. } else {
  85673. this.finishOp(types$12.slash, 1);
  85674. }
  85675. }
  85676. readToken_interpreter() {
  85677. if (this.state.pos !== 0 || this.length < 2)
  85678. return false;
  85679. let ch = this.input.charCodeAt(this.state.pos + 1);
  85680. if (ch !== 33)
  85681. return false;
  85682. const start3 = this.state.pos;
  85683. this.state.pos += 1;
  85684. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  85685. ch = this.input.charCodeAt(this.state.pos);
  85686. }
  85687. const value = this.input.slice(start3 + 2, this.state.pos);
  85688. this.finishToken(types$12.interpreterDirective, value);
  85689. return true;
  85690. }
  85691. readToken_mult_modulo(code2) {
  85692. let type = code2 === 42 ? types$12.star : types$12.modulo;
  85693. let width = 1;
  85694. let next = this.input.charCodeAt(this.state.pos + 1);
  85695. if (code2 === 42 && next === 42) {
  85696. width++;
  85697. next = this.input.charCodeAt(this.state.pos + 2);
  85698. type = types$12.exponent;
  85699. }
  85700. if (next === 61 && !this.state.inType) {
  85701. width++;
  85702. type = types$12.assign;
  85703. }
  85704. this.finishOp(type, width);
  85705. }
  85706. readToken_pipe_amp(code2) {
  85707. const next = this.input.charCodeAt(this.state.pos + 1);
  85708. if (next === code2) {
  85709. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  85710. this.finishOp(types$12.assign, 3);
  85711. } else {
  85712. this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
  85713. }
  85714. return;
  85715. }
  85716. if (code2 === 124) {
  85717. if (next === 62) {
  85718. this.finishOp(types$12.pipeline, 2);
  85719. return;
  85720. }
  85721. if (this.hasPlugin("recordAndTuple") && next === 125) {
  85722. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  85723. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType);
  85724. }
  85725. this.state.pos += 2;
  85726. this.finishToken(types$12.braceBarR);
  85727. return;
  85728. }
  85729. if (this.hasPlugin("recordAndTuple") && next === 93) {
  85730. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  85731. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType);
  85732. }
  85733. this.state.pos += 2;
  85734. this.finishToken(types$12.bracketBarR);
  85735. return;
  85736. }
  85737. }
  85738. if (next === 61) {
  85739. this.finishOp(types$12.assign, 2);
  85740. return;
  85741. }
  85742. this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
  85743. }
  85744. readToken_caret() {
  85745. const next = this.input.charCodeAt(this.state.pos + 1);
  85746. if (next === 61) {
  85747. this.finishOp(types$12.assign, 2);
  85748. } else {
  85749. this.finishOp(types$12.bitwiseXOR, 1);
  85750. }
  85751. }
  85752. readToken_plus_min(code2) {
  85753. const next = this.input.charCodeAt(this.state.pos + 1);
  85754. if (next === code2) {
  85755. this.finishOp(types$12.incDec, 2);
  85756. return;
  85757. }
  85758. if (next === 61) {
  85759. this.finishOp(types$12.assign, 2);
  85760. } else {
  85761. this.finishOp(types$12.plusMin, 1);
  85762. }
  85763. }
  85764. readToken_lt_gt(code2) {
  85765. const next = this.input.charCodeAt(this.state.pos + 1);
  85766. let size = 1;
  85767. if (next === code2) {
  85768. size = code2 === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  85769. if (this.input.charCodeAt(this.state.pos + size) === 61) {
  85770. this.finishOp(types$12.assign, size + 1);
  85771. return;
  85772. }
  85773. this.finishOp(types$12.bitShift, size);
  85774. return;
  85775. }
  85776. if (next === 61) {
  85777. size = 2;
  85778. }
  85779. this.finishOp(types$12.relational, size);
  85780. }
  85781. readToken_eq_excl(code2) {
  85782. const next = this.input.charCodeAt(this.state.pos + 1);
  85783. if (next === 61) {
  85784. this.finishOp(types$12.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  85785. return;
  85786. }
  85787. if (code2 === 61 && next === 62) {
  85788. this.state.pos += 2;
  85789. this.finishToken(types$12.arrow);
  85790. return;
  85791. }
  85792. this.finishOp(code2 === 61 ? types$12.eq : types$12.bang, 1);
  85793. }
  85794. readToken_question() {
  85795. const next = this.input.charCodeAt(this.state.pos + 1);
  85796. const next2 = this.input.charCodeAt(this.state.pos + 2);
  85797. if (next === 63) {
  85798. if (next2 === 61) {
  85799. this.finishOp(types$12.assign, 3);
  85800. } else {
  85801. this.finishOp(types$12.nullishCoalescing, 2);
  85802. }
  85803. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  85804. this.state.pos += 2;
  85805. this.finishToken(types$12.questionDot);
  85806. } else {
  85807. ++this.state.pos;
  85808. this.finishToken(types$12.question);
  85809. }
  85810. }
  85811. getTokenFromCode(code2) {
  85812. switch (code2) {
  85813. case 46:
  85814. this.readToken_dot();
  85815. return;
  85816. case 40:
  85817. ++this.state.pos;
  85818. this.finishToken(types$12.parenL);
  85819. return;
  85820. case 41:
  85821. ++this.state.pos;
  85822. this.finishToken(types$12.parenR);
  85823. return;
  85824. case 59:
  85825. ++this.state.pos;
  85826. this.finishToken(types$12.semi);
  85827. return;
  85828. case 44:
  85829. ++this.state.pos;
  85830. this.finishToken(types$12.comma);
  85831. return;
  85832. case 91:
  85833. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  85834. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  85835. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType);
  85836. }
  85837. this.state.pos += 2;
  85838. this.finishToken(types$12.bracketBarL);
  85839. } else {
  85840. ++this.state.pos;
  85841. this.finishToken(types$12.bracketL);
  85842. }
  85843. return;
  85844. case 93:
  85845. ++this.state.pos;
  85846. this.finishToken(types$12.bracketR);
  85847. return;
  85848. case 123:
  85849. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  85850. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  85851. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType);
  85852. }
  85853. this.state.pos += 2;
  85854. this.finishToken(types$12.braceBarL);
  85855. } else {
  85856. ++this.state.pos;
  85857. this.finishToken(types$12.braceL);
  85858. }
  85859. return;
  85860. case 125:
  85861. ++this.state.pos;
  85862. this.finishToken(types$12.braceR);
  85863. return;
  85864. case 58:
  85865. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  85866. this.finishOp(types$12.doubleColon, 2);
  85867. } else {
  85868. ++this.state.pos;
  85869. this.finishToken(types$12.colon);
  85870. }
  85871. return;
  85872. case 63:
  85873. this.readToken_question();
  85874. return;
  85875. case 96:
  85876. ++this.state.pos;
  85877. this.finishToken(types$12.backQuote);
  85878. return;
  85879. case 48: {
  85880. const next = this.input.charCodeAt(this.state.pos + 1);
  85881. if (next === 120 || next === 88) {
  85882. this.readRadixNumber(16);
  85883. return;
  85884. }
  85885. if (next === 111 || next === 79) {
  85886. this.readRadixNumber(8);
  85887. return;
  85888. }
  85889. if (next === 98 || next === 66) {
  85890. this.readRadixNumber(2);
  85891. return;
  85892. }
  85893. }
  85894. case 49:
  85895. case 50:
  85896. case 51:
  85897. case 52:
  85898. case 53:
  85899. case 54:
  85900. case 55:
  85901. case 56:
  85902. case 57:
  85903. this.readNumber(false);
  85904. return;
  85905. case 34:
  85906. case 39:
  85907. this.readString(code2);
  85908. return;
  85909. case 47:
  85910. this.readToken_slash();
  85911. return;
  85912. case 37:
  85913. case 42:
  85914. this.readToken_mult_modulo(code2);
  85915. return;
  85916. case 124:
  85917. case 38:
  85918. this.readToken_pipe_amp(code2);
  85919. return;
  85920. case 94:
  85921. this.readToken_caret();
  85922. return;
  85923. case 43:
  85924. case 45:
  85925. this.readToken_plus_min(code2);
  85926. return;
  85927. case 60:
  85928. case 62:
  85929. this.readToken_lt_gt(code2);
  85930. return;
  85931. case 61:
  85932. case 33:
  85933. this.readToken_eq_excl(code2);
  85934. return;
  85935. case 126:
  85936. this.finishOp(types$12.tilde, 1);
  85937. return;
  85938. case 64:
  85939. ++this.state.pos;
  85940. this.finishToken(types$12.at);
  85941. return;
  85942. case 35:
  85943. this.readToken_numberSign();
  85944. return;
  85945. case 92:
  85946. this.readWord();
  85947. return;
  85948. default:
  85949. if (isIdentifierStart2(code2)) {
  85950. this.readWord(code2);
  85951. return;
  85952. }
  85953. }
  85954. throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code2));
  85955. }
  85956. finishOp(type, size) {
  85957. const str = this.input.slice(this.state.pos, this.state.pos + size);
  85958. this.state.pos += size;
  85959. this.finishToken(type, str);
  85960. }
  85961. readRegexp() {
  85962. const start3 = this.state.start + 1;
  85963. let escaped, inClass;
  85964. let {
  85965. pos
  85966. } = this.state;
  85967. for (; ; ++pos) {
  85968. if (pos >= this.length) {
  85969. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  85970. }
  85971. const ch = this.input.charCodeAt(pos);
  85972. if (isNewLine2(ch)) {
  85973. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  85974. }
  85975. if (escaped) {
  85976. escaped = false;
  85977. } else {
  85978. if (ch === 91) {
  85979. inClass = true;
  85980. } else if (ch === 93 && inClass) {
  85981. inClass = false;
  85982. } else if (ch === 47 && !inClass) {
  85983. break;
  85984. }
  85985. escaped = ch === 92;
  85986. }
  85987. }
  85988. const content3 = this.input.slice(start3, pos);
  85989. ++pos;
  85990. let mods = "";
  85991. while (pos < this.length) {
  85992. const cp = this.codePointAtPos(pos);
  85993. const char = String.fromCharCode(cp);
  85994. if (VALID_REGEX_FLAGS.has(cp)) {
  85995. if (mods.includes(char)) {
  85996. this.raise(pos + 1, ErrorMessages.DuplicateRegExpFlags);
  85997. }
  85998. } else if (isIdentifierChar2(cp) || cp === 92) {
  85999. this.raise(pos + 1, ErrorMessages.MalformedRegExpFlags);
  86000. } else {
  86001. break;
  86002. }
  86003. ++pos;
  86004. mods += char;
  86005. }
  86006. this.state.pos = pos;
  86007. this.finishToken(types$12.regexp, {
  86008. pattern: content3,
  86009. flags: mods
  86010. });
  86011. }
  86012. readInt(radix, len, forceLen, allowNumSeparator = true) {
  86013. const start3 = this.state.pos;
  86014. const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  86015. const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
  86016. let invalid2 = false;
  86017. let total = 0;
  86018. for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  86019. const code2 = this.input.charCodeAt(this.state.pos);
  86020. let val;
  86021. if (code2 === 95) {
  86022. const prev = this.input.charCodeAt(this.state.pos - 1);
  86023. const next = this.input.charCodeAt(this.state.pos + 1);
  86024. if (allowedSiblings.indexOf(next) === -1) {
  86025. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  86026. } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
  86027. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  86028. }
  86029. if (!allowNumSeparator) {
  86030. this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence);
  86031. }
  86032. ++this.state.pos;
  86033. continue;
  86034. }
  86035. if (code2 >= 97) {
  86036. val = code2 - 97 + 10;
  86037. } else if (code2 >= 65) {
  86038. val = code2 - 65 + 10;
  86039. } else if (_isDigit(code2)) {
  86040. val = code2 - 48;
  86041. } else {
  86042. val = Infinity;
  86043. }
  86044. if (val >= radix) {
  86045. if (this.options.errorRecovery && val <= 9) {
  86046. val = 0;
  86047. this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix);
  86048. } else if (forceLen) {
  86049. val = 0;
  86050. invalid2 = true;
  86051. } else {
  86052. break;
  86053. }
  86054. }
  86055. ++this.state.pos;
  86056. total = total * radix + val;
  86057. }
  86058. if (this.state.pos === start3 || len != null && this.state.pos - start3 !== len || invalid2) {
  86059. return null;
  86060. }
  86061. return total;
  86062. }
  86063. readRadixNumber(radix) {
  86064. const start3 = this.state.pos;
  86065. let isBigInt = false;
  86066. this.state.pos += 2;
  86067. const val = this.readInt(radix);
  86068. if (val == null) {
  86069. this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix);
  86070. }
  86071. const next = this.input.charCodeAt(this.state.pos);
  86072. if (next === 110) {
  86073. ++this.state.pos;
  86074. isBigInt = true;
  86075. } else if (next === 109) {
  86076. throw this.raise(start3, ErrorMessages.InvalidDecimal);
  86077. }
  86078. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  86079. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  86080. }
  86081. if (isBigInt) {
  86082. const str = this.input.slice(start3, this.state.pos).replace(/[_n]/g, "");
  86083. this.finishToken(types$12.bigint, str);
  86084. return;
  86085. }
  86086. this.finishToken(types$12.num, val);
  86087. }
  86088. readNumber(startsWithDot) {
  86089. const start3 = this.state.pos;
  86090. let isFloat = false;
  86091. let isBigInt = false;
  86092. let isDecimal2 = false;
  86093. let hasExponent = false;
  86094. let isOctal = false;
  86095. if (!startsWithDot && this.readInt(10) === null) {
  86096. this.raise(start3, ErrorMessages.InvalidNumber);
  86097. }
  86098. const hasLeadingZero = this.state.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  86099. if (hasLeadingZero) {
  86100. const integer = this.input.slice(start3, this.state.pos);
  86101. this.recordStrictModeErrors(start3, ErrorMessages.StrictOctalLiteral);
  86102. if (!this.state.strict) {
  86103. const underscorePos = integer.indexOf("_");
  86104. if (underscorePos > 0) {
  86105. this.raise(underscorePos + start3, ErrorMessages.ZeroDigitNumericSeparator);
  86106. }
  86107. }
  86108. isOctal = hasLeadingZero && !/[89]/.test(integer);
  86109. }
  86110. let next = this.input.charCodeAt(this.state.pos);
  86111. if (next === 46 && !isOctal) {
  86112. ++this.state.pos;
  86113. this.readInt(10);
  86114. isFloat = true;
  86115. next = this.input.charCodeAt(this.state.pos);
  86116. }
  86117. if ((next === 69 || next === 101) && !isOctal) {
  86118. next = this.input.charCodeAt(++this.state.pos);
  86119. if (next === 43 || next === 45) {
  86120. ++this.state.pos;
  86121. }
  86122. if (this.readInt(10) === null) {
  86123. this.raise(start3, ErrorMessages.InvalidOrMissingExponent);
  86124. }
  86125. isFloat = true;
  86126. hasExponent = true;
  86127. next = this.input.charCodeAt(this.state.pos);
  86128. }
  86129. if (next === 110) {
  86130. if (isFloat || hasLeadingZero) {
  86131. this.raise(start3, ErrorMessages.InvalidBigIntLiteral);
  86132. }
  86133. ++this.state.pos;
  86134. isBigInt = true;
  86135. }
  86136. if (next === 109) {
  86137. this.expectPlugin("decimal", this.state.pos);
  86138. if (hasExponent || hasLeadingZero) {
  86139. this.raise(start3, ErrorMessages.InvalidDecimal);
  86140. }
  86141. ++this.state.pos;
  86142. isDecimal2 = true;
  86143. }
  86144. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  86145. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  86146. }
  86147. const str = this.input.slice(start3, this.state.pos).replace(/[_mn]/g, "");
  86148. if (isBigInt) {
  86149. this.finishToken(types$12.bigint, str);
  86150. return;
  86151. }
  86152. if (isDecimal2) {
  86153. this.finishToken(types$12.decimal, str);
  86154. return;
  86155. }
  86156. const val = isOctal ? parseInt(str, 8) : parseFloat(str);
  86157. this.finishToken(types$12.num, val);
  86158. }
  86159. readCodePoint(throwOnInvalid) {
  86160. const ch = this.input.charCodeAt(this.state.pos);
  86161. let code2;
  86162. if (ch === 123) {
  86163. const codePos = ++this.state.pos;
  86164. code2 = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
  86165. ++this.state.pos;
  86166. if (code2 !== null && code2 > 1114111) {
  86167. if (throwOnInvalid) {
  86168. this.raise(codePos, ErrorMessages.InvalidCodePoint);
  86169. } else {
  86170. return null;
  86171. }
  86172. }
  86173. } else {
  86174. code2 = this.readHexChar(4, false, throwOnInvalid);
  86175. }
  86176. return code2;
  86177. }
  86178. readString(quote) {
  86179. let out = "", chunkStart = ++this.state.pos;
  86180. for (; ; ) {
  86181. if (this.state.pos >= this.length) {
  86182. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  86183. }
  86184. const ch = this.input.charCodeAt(this.state.pos);
  86185. if (ch === quote)
  86186. break;
  86187. if (ch === 92) {
  86188. out += this.input.slice(chunkStart, this.state.pos);
  86189. out += this.readEscapedChar(false);
  86190. chunkStart = this.state.pos;
  86191. } else if (ch === 8232 || ch === 8233) {
  86192. ++this.state.pos;
  86193. ++this.state.curLine;
  86194. this.state.lineStart = this.state.pos;
  86195. } else if (isNewLine2(ch)) {
  86196. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  86197. } else {
  86198. ++this.state.pos;
  86199. }
  86200. }
  86201. out += this.input.slice(chunkStart, this.state.pos++);
  86202. this.finishToken(types$12.string, out);
  86203. }
  86204. readTmplToken() {
  86205. let out = "", chunkStart = this.state.pos, containsInvalid = false;
  86206. for (; ; ) {
  86207. if (this.state.pos >= this.length) {
  86208. throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate);
  86209. }
  86210. const ch = this.input.charCodeAt(this.state.pos);
  86211. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  86212. if (this.state.pos === this.state.start && this.match(types$12.template)) {
  86213. if (ch === 36) {
  86214. this.state.pos += 2;
  86215. this.finishToken(types$12.dollarBraceL);
  86216. return;
  86217. } else {
  86218. ++this.state.pos;
  86219. this.finishToken(types$12.backQuote);
  86220. return;
  86221. }
  86222. }
  86223. out += this.input.slice(chunkStart, this.state.pos);
  86224. this.finishToken(types$12.template, containsInvalid ? null : out);
  86225. return;
  86226. }
  86227. if (ch === 92) {
  86228. out += this.input.slice(chunkStart, this.state.pos);
  86229. const escaped = this.readEscapedChar(true);
  86230. if (escaped === null) {
  86231. containsInvalid = true;
  86232. } else {
  86233. out += escaped;
  86234. }
  86235. chunkStart = this.state.pos;
  86236. } else if (isNewLine2(ch)) {
  86237. out += this.input.slice(chunkStart, this.state.pos);
  86238. ++this.state.pos;
  86239. switch (ch) {
  86240. case 13:
  86241. if (this.input.charCodeAt(this.state.pos) === 10) {
  86242. ++this.state.pos;
  86243. }
  86244. case 10:
  86245. out += "\n";
  86246. break;
  86247. default:
  86248. out += String.fromCharCode(ch);
  86249. break;
  86250. }
  86251. ++this.state.curLine;
  86252. this.state.lineStart = this.state.pos;
  86253. chunkStart = this.state.pos;
  86254. } else {
  86255. ++this.state.pos;
  86256. }
  86257. }
  86258. }
  86259. recordStrictModeErrors(pos, message) {
  86260. if (this.state.strict && !this.state.strictErrors.has(pos)) {
  86261. this.raise(pos, message);
  86262. } else {
  86263. this.state.strictErrors.set(pos, message);
  86264. }
  86265. }
  86266. readEscapedChar(inTemplate) {
  86267. const throwOnInvalid = !inTemplate;
  86268. const ch = this.input.charCodeAt(++this.state.pos);
  86269. ++this.state.pos;
  86270. switch (ch) {
  86271. case 110:
  86272. return "\n";
  86273. case 114:
  86274. return "\r";
  86275. case 120: {
  86276. const code2 = this.readHexChar(2, false, throwOnInvalid);
  86277. return code2 === null ? null : String.fromCharCode(code2);
  86278. }
  86279. case 117: {
  86280. const code2 = this.readCodePoint(throwOnInvalid);
  86281. return code2 === null ? null : String.fromCodePoint(code2);
  86282. }
  86283. case 116:
  86284. return " ";
  86285. case 98:
  86286. return "\b";
  86287. case 118:
  86288. return "\v";
  86289. case 102:
  86290. return "\f";
  86291. case 13:
  86292. if (this.input.charCodeAt(this.state.pos) === 10) {
  86293. ++this.state.pos;
  86294. }
  86295. case 10:
  86296. this.state.lineStart = this.state.pos;
  86297. ++this.state.curLine;
  86298. case 8232:
  86299. case 8233:
  86300. return "";
  86301. case 56:
  86302. case 57:
  86303. if (inTemplate) {
  86304. return null;
  86305. } else {
  86306. this.recordStrictModeErrors(this.state.pos - 1, ErrorMessages.StrictNumericEscape);
  86307. }
  86308. default:
  86309. if (ch >= 48 && ch <= 55) {
  86310. const codePos = this.state.pos - 1;
  86311. const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
  86312. let octalStr = match[0];
  86313. let octal = parseInt(octalStr, 8);
  86314. if (octal > 255) {
  86315. octalStr = octalStr.slice(0, -1);
  86316. octal = parseInt(octalStr, 8);
  86317. }
  86318. this.state.pos += octalStr.length - 1;
  86319. const next = this.input.charCodeAt(this.state.pos);
  86320. if (octalStr !== "0" || next === 56 || next === 57) {
  86321. if (inTemplate) {
  86322. return null;
  86323. } else {
  86324. this.recordStrictModeErrors(codePos, ErrorMessages.StrictNumericEscape);
  86325. }
  86326. }
  86327. return String.fromCharCode(octal);
  86328. }
  86329. return String.fromCharCode(ch);
  86330. }
  86331. }
  86332. readHexChar(len, forceLen, throwOnInvalid) {
  86333. const codePos = this.state.pos;
  86334. const n = this.readInt(16, len, forceLen, false);
  86335. if (n === null) {
  86336. if (throwOnInvalid) {
  86337. this.raise(codePos, ErrorMessages.InvalidEscapeSequence);
  86338. } else {
  86339. this.state.pos = codePos - 1;
  86340. }
  86341. }
  86342. return n;
  86343. }
  86344. readWord1(firstCode) {
  86345. this.state.containsEsc = false;
  86346. let word = "";
  86347. const start3 = this.state.pos;
  86348. let chunkStart = this.state.pos;
  86349. if (firstCode !== void 0) {
  86350. this.state.pos += firstCode <= 65535 ? 1 : 2;
  86351. }
  86352. while (this.state.pos < this.length) {
  86353. const ch = this.codePointAtPos(this.state.pos);
  86354. if (isIdentifierChar2(ch)) {
  86355. this.state.pos += ch <= 65535 ? 1 : 2;
  86356. } else if (ch === 92) {
  86357. this.state.containsEsc = true;
  86358. word += this.input.slice(chunkStart, this.state.pos);
  86359. const escStart = this.state.pos;
  86360. const identifierCheck = this.state.pos === start3 ? isIdentifierStart2 : isIdentifierChar2;
  86361. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  86362. this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape);
  86363. chunkStart = this.state.pos - 1;
  86364. continue;
  86365. }
  86366. ++this.state.pos;
  86367. const esc = this.readCodePoint(true);
  86368. if (esc !== null) {
  86369. if (!identifierCheck(esc)) {
  86370. this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier);
  86371. }
  86372. word += String.fromCodePoint(esc);
  86373. }
  86374. chunkStart = this.state.pos;
  86375. } else {
  86376. break;
  86377. }
  86378. }
  86379. return word + this.input.slice(chunkStart, this.state.pos);
  86380. }
  86381. readWord(firstCode) {
  86382. const word = this.readWord1(firstCode);
  86383. const type = keywords$12.get(word) || types$12.name;
  86384. this.finishToken(type, word);
  86385. }
  86386. checkKeywordEscapes() {
  86387. const kw2 = this.state.type.keyword;
  86388. if (kw2 && this.state.containsEsc) {
  86389. this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, kw2);
  86390. }
  86391. }
  86392. updateContext(prevType) {
  86393. var _this$state$type$upda, _this$state$type;
  86394. (_this$state$type$upda = (_this$state$type = this.state.type).updateContext) == null ? void 0 : _this$state$type$upda.call(_this$state$type, this.state.context);
  86395. }
  86396. };
  86397. var ClassScope = class {
  86398. constructor() {
  86399. this.privateNames = /* @__PURE__ */ new Set();
  86400. this.loneAccessors = /* @__PURE__ */ new Map();
  86401. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  86402. }
  86403. };
  86404. var ClassScopeHandler = class {
  86405. constructor(raise2) {
  86406. this.stack = [];
  86407. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  86408. this.raise = raise2;
  86409. }
  86410. current() {
  86411. return this.stack[this.stack.length - 1];
  86412. }
  86413. enter() {
  86414. this.stack.push(new ClassScope());
  86415. }
  86416. exit() {
  86417. const oldClassScope = this.stack.pop();
  86418. const current2 = this.current();
  86419. for (const [name2, pos] of Array.from(oldClassScope.undefinedPrivateNames)) {
  86420. if (current2) {
  86421. if (!current2.undefinedPrivateNames.has(name2)) {
  86422. current2.undefinedPrivateNames.set(name2, pos);
  86423. }
  86424. } else {
  86425. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  86426. }
  86427. }
  86428. }
  86429. declarePrivateName(name2, elementType, pos) {
  86430. const classScope = this.current();
  86431. let redefined = classScope.privateNames.has(name2);
  86432. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  86433. const accessor = redefined && classScope.loneAccessors.get(name2);
  86434. if (accessor) {
  86435. const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  86436. const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  86437. const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  86438. const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  86439. redefined = oldKind === newKind || oldStatic !== newStatic;
  86440. if (!redefined)
  86441. classScope.loneAccessors.delete(name2);
  86442. } else if (!redefined) {
  86443. classScope.loneAccessors.set(name2, elementType);
  86444. }
  86445. }
  86446. if (redefined) {
  86447. this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name2);
  86448. }
  86449. classScope.privateNames.add(name2);
  86450. classScope.undefinedPrivateNames.delete(name2);
  86451. }
  86452. usePrivateName(name2, pos) {
  86453. let classScope;
  86454. for (classScope of this.stack) {
  86455. if (classScope.privateNames.has(name2))
  86456. return;
  86457. }
  86458. if (classScope) {
  86459. classScope.undefinedPrivateNames.set(name2, pos);
  86460. } else {
  86461. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  86462. }
  86463. }
  86464. };
  86465. var kExpression = 0;
  86466. var kMaybeArrowParameterDeclaration = 1;
  86467. var kMaybeAsyncArrowParameterDeclaration = 2;
  86468. var kParameterDeclaration = 3;
  86469. var ExpressionScope = class {
  86470. constructor(type = kExpression) {
  86471. this.type = void 0;
  86472. this.type = type;
  86473. }
  86474. canBeArrowParameterDeclaration() {
  86475. return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
  86476. }
  86477. isCertainlyParameterDeclaration() {
  86478. return this.type === kParameterDeclaration;
  86479. }
  86480. };
  86481. var ArrowHeadParsingScope = class extends ExpressionScope {
  86482. constructor(type) {
  86483. super(type);
  86484. this.errors = /* @__PURE__ */ new Map();
  86485. }
  86486. recordDeclarationError(pos, template) {
  86487. this.errors.set(pos, template);
  86488. }
  86489. clearDeclarationError(pos) {
  86490. this.errors.delete(pos);
  86491. }
  86492. iterateErrors(iterator) {
  86493. this.errors.forEach(iterator);
  86494. }
  86495. };
  86496. var ExpressionScopeHandler = class {
  86497. constructor(raise2) {
  86498. this.stack = [new ExpressionScope()];
  86499. this.raise = raise2;
  86500. }
  86501. enter(scope) {
  86502. this.stack.push(scope);
  86503. }
  86504. exit() {
  86505. this.stack.pop();
  86506. }
  86507. recordParameterInitializerError(pos, template) {
  86508. const {
  86509. stack
  86510. } = this;
  86511. let i = stack.length - 1;
  86512. let scope = stack[i];
  86513. while (!scope.isCertainlyParameterDeclaration()) {
  86514. if (scope.canBeArrowParameterDeclaration()) {
  86515. scope.recordDeclarationError(pos, template);
  86516. } else {
  86517. return;
  86518. }
  86519. scope = stack[--i];
  86520. }
  86521. this.raise(pos, template);
  86522. }
  86523. recordParenthesizedIdentifierError(pos, template) {
  86524. const {
  86525. stack
  86526. } = this;
  86527. const scope = stack[stack.length - 1];
  86528. if (scope.isCertainlyParameterDeclaration()) {
  86529. this.raise(pos, template);
  86530. } else if (scope.canBeArrowParameterDeclaration()) {
  86531. scope.recordDeclarationError(pos, template);
  86532. } else {
  86533. return;
  86534. }
  86535. }
  86536. recordAsyncArrowParametersError(pos, template) {
  86537. const {
  86538. stack
  86539. } = this;
  86540. let i = stack.length - 1;
  86541. let scope = stack[i];
  86542. while (scope.canBeArrowParameterDeclaration()) {
  86543. if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
  86544. scope.recordDeclarationError(pos, template);
  86545. }
  86546. scope = stack[--i];
  86547. }
  86548. }
  86549. validateAsPattern() {
  86550. const {
  86551. stack
  86552. } = this;
  86553. const currentScope = stack[stack.length - 1];
  86554. if (!currentScope.canBeArrowParameterDeclaration())
  86555. return;
  86556. currentScope.iterateErrors((template, pos) => {
  86557. this.raise(pos, template);
  86558. let i = stack.length - 2;
  86559. let scope = stack[i];
  86560. while (scope.canBeArrowParameterDeclaration()) {
  86561. scope.clearDeclarationError(pos);
  86562. scope = stack[--i];
  86563. }
  86564. });
  86565. }
  86566. };
  86567. function newParameterDeclarationScope() {
  86568. return new ExpressionScope(kParameterDeclaration);
  86569. }
  86570. function newArrowHeadScope() {
  86571. return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
  86572. }
  86573. function newAsyncArrowScope() {
  86574. return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
  86575. }
  86576. function newExpressionScope() {
  86577. return new ExpressionScope();
  86578. }
  86579. var UtilParser = class extends Tokenizer {
  86580. addExtra(node, key, val) {
  86581. if (!node)
  86582. return;
  86583. const extra = node.extra = node.extra || {};
  86584. extra[key] = val;
  86585. }
  86586. isRelational(op) {
  86587. return this.match(types$12.relational) && this.state.value === op;
  86588. }
  86589. expectRelational(op) {
  86590. if (this.isRelational(op)) {
  86591. this.next();
  86592. } else {
  86593. this.unexpected(null, types$12.relational);
  86594. }
  86595. }
  86596. isContextual(name2) {
  86597. return this.match(types$12.name) && this.state.value === name2 && !this.state.containsEsc;
  86598. }
  86599. isUnparsedContextual(nameStart, name2) {
  86600. const nameEnd = nameStart + name2.length;
  86601. if (this.input.slice(nameStart, nameEnd) === name2) {
  86602. const nextCh = this.input.charCodeAt(nameEnd);
  86603. return !(isIdentifierChar2(nextCh) || (nextCh & 64512) === 55296);
  86604. }
  86605. return false;
  86606. }
  86607. isLookaheadContextual(name2) {
  86608. const next = this.nextTokenStart();
  86609. return this.isUnparsedContextual(next, name2);
  86610. }
  86611. eatContextual(name2) {
  86612. return this.isContextual(name2) && this.eat(types$12.name);
  86613. }
  86614. expectContextual(name2, template) {
  86615. if (!this.eatContextual(name2))
  86616. this.unexpected(null, template);
  86617. }
  86618. canInsertSemicolon() {
  86619. return this.match(types$12.eof) || this.match(types$12.braceR) || this.hasPrecedingLineBreak();
  86620. }
  86621. hasPrecedingLineBreak() {
  86622. return lineBreak2.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  86623. }
  86624. hasFollowingLineBreak() {
  86625. return lineBreak2.test(this.input.slice(this.state.end, this.nextTokenStart()));
  86626. }
  86627. isLineTerminator() {
  86628. return this.eat(types$12.semi) || this.canInsertSemicolon();
  86629. }
  86630. semicolon(allowAsi = true) {
  86631. if (allowAsi ? this.isLineTerminator() : this.eat(types$12.semi))
  86632. return;
  86633. this.raise(this.state.lastTokEnd, ErrorMessages.MissingSemicolon);
  86634. }
  86635. expect(type, pos) {
  86636. this.eat(type) || this.unexpected(pos, type);
  86637. }
  86638. assertNoSpace(message = "Unexpected space.") {
  86639. if (this.state.start > this.state.lastTokEnd) {
  86640. this.raise(this.state.lastTokEnd, {
  86641. code: ErrorCodes.SyntaxError,
  86642. reasonCode: "UnexpectedSpace",
  86643. template: message
  86644. });
  86645. }
  86646. }
  86647. unexpected(pos, messageOrType = {
  86648. code: ErrorCodes.SyntaxError,
  86649. reasonCode: "UnexpectedToken",
  86650. template: "Unexpected token"
  86651. }) {
  86652. if (messageOrType instanceof TokenType3) {
  86653. messageOrType = {
  86654. code: ErrorCodes.SyntaxError,
  86655. reasonCode: "UnexpectedToken",
  86656. template: `Unexpected token, expected "${messageOrType.label}"`
  86657. };
  86658. }
  86659. throw this.raise(pos != null ? pos : this.state.start, messageOrType);
  86660. }
  86661. expectPlugin(name2, pos) {
  86662. if (!this.hasPlugin(name2)) {
  86663. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  86664. missingPlugin: [name2]
  86665. }, `This experimental syntax requires enabling the parser plugin: '${name2}'`);
  86666. }
  86667. return true;
  86668. }
  86669. expectOnePlugin(names, pos) {
  86670. if (!names.some((n) => this.hasPlugin(n))) {
  86671. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  86672. missingPlugin: names
  86673. }, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`);
  86674. }
  86675. }
  86676. tryParse(fn, oldState = this.state.clone()) {
  86677. const abortSignal = {
  86678. node: null
  86679. };
  86680. try {
  86681. const node = fn((node2 = null) => {
  86682. abortSignal.node = node2;
  86683. throw abortSignal;
  86684. });
  86685. if (this.state.errors.length > oldState.errors.length) {
  86686. const failState = this.state;
  86687. this.state = oldState;
  86688. this.state.tokensLength = failState.tokensLength;
  86689. return {
  86690. node,
  86691. error: failState.errors[oldState.errors.length],
  86692. thrown: false,
  86693. aborted: false,
  86694. failState
  86695. };
  86696. }
  86697. return {
  86698. node,
  86699. error: null,
  86700. thrown: false,
  86701. aborted: false,
  86702. failState: null
  86703. };
  86704. } catch (error) {
  86705. const failState = this.state;
  86706. this.state = oldState;
  86707. if (error instanceof SyntaxError) {
  86708. return {
  86709. node: null,
  86710. error,
  86711. thrown: true,
  86712. aborted: false,
  86713. failState
  86714. };
  86715. }
  86716. if (error === abortSignal) {
  86717. return {
  86718. node: abortSignal.node,
  86719. error: null,
  86720. thrown: false,
  86721. aborted: true,
  86722. failState
  86723. };
  86724. }
  86725. throw error;
  86726. }
  86727. }
  86728. checkExpressionErrors(refExpressionErrors, andThrow) {
  86729. if (!refExpressionErrors)
  86730. return false;
  86731. const {
  86732. shorthandAssign,
  86733. doubleProto,
  86734. optionalParameters
  86735. } = refExpressionErrors;
  86736. if (!andThrow) {
  86737. return shorthandAssign >= 0 || doubleProto >= 0 || optionalParameters >= 0;
  86738. }
  86739. if (shorthandAssign >= 0) {
  86740. this.unexpected(shorthandAssign);
  86741. }
  86742. if (doubleProto >= 0) {
  86743. this.raise(doubleProto, ErrorMessages.DuplicateProto);
  86744. }
  86745. if (optionalParameters >= 0) {
  86746. this.unexpected(optionalParameters);
  86747. }
  86748. }
  86749. isLiteralPropertyName() {
  86750. return this.match(types$12.name) || !!this.state.type.keyword || this.match(types$12.string) || this.match(types$12.num) || this.match(types$12.bigint) || this.match(types$12.decimal);
  86751. }
  86752. isPrivateName(node) {
  86753. return node.type === "PrivateName";
  86754. }
  86755. getPrivateNameSV(node) {
  86756. return node.id.name;
  86757. }
  86758. hasPropertyAsPrivateName(node) {
  86759. return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
  86760. }
  86761. isOptionalChain(node) {
  86762. return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression";
  86763. }
  86764. isObjectProperty(node) {
  86765. return node.type === "ObjectProperty";
  86766. }
  86767. isObjectMethod(node) {
  86768. return node.type === "ObjectMethod";
  86769. }
  86770. initializeScopes(inModule = this.options.sourceType === "module") {
  86771. const oldLabels = this.state.labels;
  86772. this.state.labels = [];
  86773. const oldExportedIdentifiers = this.exportedIdentifiers;
  86774. this.exportedIdentifiers = /* @__PURE__ */ new Set();
  86775. const oldInModule = this.inModule;
  86776. this.inModule = inModule;
  86777. const oldScope = this.scope;
  86778. const ScopeHandler2 = this.getScopeHandler();
  86779. this.scope = new ScopeHandler2(this.raise.bind(this), this.inModule);
  86780. const oldProdParam = this.prodParam;
  86781. this.prodParam = new ProductionParameterHandler();
  86782. const oldClassScope = this.classScope;
  86783. this.classScope = new ClassScopeHandler(this.raise.bind(this));
  86784. const oldExpressionScope = this.expressionScope;
  86785. this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
  86786. return () => {
  86787. this.state.labels = oldLabels;
  86788. this.exportedIdentifiers = oldExportedIdentifiers;
  86789. this.inModule = oldInModule;
  86790. this.scope = oldScope;
  86791. this.prodParam = oldProdParam;
  86792. this.classScope = oldClassScope;
  86793. this.expressionScope = oldExpressionScope;
  86794. };
  86795. }
  86796. enterInitialScopes() {
  86797. let paramFlags = PARAM;
  86798. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  86799. paramFlags |= PARAM_AWAIT;
  86800. }
  86801. this.scope.enter(SCOPE_PROGRAM);
  86802. this.prodParam.enter(paramFlags);
  86803. }
  86804. };
  86805. var ExpressionErrors = class {
  86806. constructor() {
  86807. this.shorthandAssign = -1;
  86808. this.doubleProto = -1;
  86809. this.optionalParameters = -1;
  86810. }
  86811. };
  86812. var Node3 = class {
  86813. constructor(parser, pos, loc) {
  86814. this.type = void 0;
  86815. this.start = void 0;
  86816. this.end = void 0;
  86817. this.loc = void 0;
  86818. this.range = void 0;
  86819. this.leadingComments = void 0;
  86820. this.trailingComments = void 0;
  86821. this.innerComments = void 0;
  86822. this.extra = void 0;
  86823. this.type = "";
  86824. this.start = pos;
  86825. this.end = 0;
  86826. this.loc = new SourceLocation3(loc);
  86827. if (parser != null && parser.options.ranges)
  86828. this.range = [pos, 0];
  86829. if (parser != null && parser.filename)
  86830. this.loc.filename = parser.filename;
  86831. }
  86832. __clone() {
  86833. const newNode = new Node3();
  86834. const keys2 = Object.keys(this);
  86835. for (let i = 0, length = keys2.length; i < length; i++) {
  86836. const key = keys2[i];
  86837. if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
  86838. newNode[key] = this[key];
  86839. }
  86840. }
  86841. return newNode;
  86842. }
  86843. };
  86844. var NodeUtils = class extends UtilParser {
  86845. startNode() {
  86846. return new Node3(this, this.state.start, this.state.startLoc);
  86847. }
  86848. startNodeAt(pos, loc) {
  86849. return new Node3(this, pos, loc);
  86850. }
  86851. startNodeAtNode(type) {
  86852. return this.startNodeAt(type.start, type.loc.start);
  86853. }
  86854. finishNode(node, type) {
  86855. return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  86856. }
  86857. finishNodeAt(node, type, pos, loc) {
  86858. node.type = type;
  86859. node.end = pos;
  86860. node.loc.end = loc;
  86861. if (this.options.ranges)
  86862. node.range[1] = pos;
  86863. this.processComment(node);
  86864. return node;
  86865. }
  86866. resetStartLocation(node, start3, startLoc) {
  86867. node.start = start3;
  86868. node.loc.start = startLoc;
  86869. if (this.options.ranges)
  86870. node.range[0] = start3;
  86871. }
  86872. resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) {
  86873. node.end = end;
  86874. node.loc.end = endLoc;
  86875. if (this.options.ranges)
  86876. node.range[1] = end;
  86877. }
  86878. resetStartLocationFromNode(node, locationNode) {
  86879. this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
  86880. }
  86881. };
  86882. var unwrapParenthesizedExpression = (node) => {
  86883. return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
  86884. };
  86885. var LValParser = class extends NodeUtils {
  86886. toAssignable(node, isLHS = false) {
  86887. var _node$extra, _node$extra3;
  86888. let parenthesized = void 0;
  86889. if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) {
  86890. parenthesized = unwrapParenthesizedExpression(node);
  86891. if (isLHS) {
  86892. if (parenthesized.type === "Identifier") {
  86893. this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  86894. } else if (parenthesized.type !== "MemberExpression") {
  86895. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  86896. }
  86897. } else {
  86898. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  86899. }
  86900. }
  86901. switch (node.type) {
  86902. case "Identifier":
  86903. case "ObjectPattern":
  86904. case "ArrayPattern":
  86905. case "AssignmentPattern":
  86906. break;
  86907. case "ObjectExpression":
  86908. node.type = "ObjectPattern";
  86909. for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) {
  86910. var _node$extra2;
  86911. const prop = node.properties[i];
  86912. const isLast = i === last;
  86913. this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  86914. if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingComma) {
  86915. this.raiseRestNotLast(node.extra.trailingComma);
  86916. }
  86917. }
  86918. break;
  86919. case "ObjectProperty":
  86920. this.toAssignable(node.value, isLHS);
  86921. break;
  86922. case "SpreadElement": {
  86923. this.checkToRestConversion(node);
  86924. node.type = "RestElement";
  86925. const arg = node.argument;
  86926. this.toAssignable(arg, isLHS);
  86927. break;
  86928. }
  86929. case "ArrayExpression":
  86930. node.type = "ArrayPattern";
  86931. this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS);
  86932. break;
  86933. case "AssignmentExpression":
  86934. if (node.operator !== "=") {
  86935. this.raise(node.left.end, ErrorMessages.MissingEqInAssignment);
  86936. }
  86937. node.type = "AssignmentPattern";
  86938. delete node.operator;
  86939. this.toAssignable(node.left, isLHS);
  86940. break;
  86941. case "ParenthesizedExpression":
  86942. this.toAssignable(parenthesized, isLHS);
  86943. break;
  86944. }
  86945. return node;
  86946. }
  86947. toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  86948. if (prop.type === "ObjectMethod") {
  86949. const error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod;
  86950. this.raise(prop.key.start, error);
  86951. } else if (prop.type === "SpreadElement" && !isLast) {
  86952. this.raiseRestNotLast(prop.start);
  86953. } else {
  86954. this.toAssignable(prop, isLHS);
  86955. }
  86956. }
  86957. toAssignableList(exprList, trailingCommaPos, isLHS) {
  86958. let end = exprList.length;
  86959. if (end) {
  86960. const last = exprList[end - 1];
  86961. if ((last == null ? void 0 : last.type) === "RestElement") {
  86962. --end;
  86963. } else if ((last == null ? void 0 : last.type) === "SpreadElement") {
  86964. last.type = "RestElement";
  86965. let arg = last.argument;
  86966. this.toAssignable(arg, isLHS);
  86967. arg = unwrapParenthesizedExpression(arg);
  86968. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
  86969. this.unexpected(arg.start);
  86970. }
  86971. if (trailingCommaPos) {
  86972. this.raiseTrailingCommaAfterRest(trailingCommaPos);
  86973. }
  86974. --end;
  86975. }
  86976. }
  86977. for (let i = 0; i < end; i++) {
  86978. const elt = exprList[i];
  86979. if (elt) {
  86980. this.toAssignable(elt, isLHS);
  86981. if (elt.type === "RestElement") {
  86982. this.raiseRestNotLast(elt.start);
  86983. }
  86984. }
  86985. }
  86986. return exprList;
  86987. }
  86988. toReferencedList(exprList, isParenthesizedExpr) {
  86989. return exprList;
  86990. }
  86991. toReferencedListDeep(exprList, isParenthesizedExpr) {
  86992. this.toReferencedList(exprList, isParenthesizedExpr);
  86993. for (const expr of exprList) {
  86994. if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
  86995. this.toReferencedListDeep(expr.elements);
  86996. }
  86997. }
  86998. }
  86999. parseSpread(refExpressionErrors, refNeedsArrowPos) {
  87000. const node = this.startNode();
  87001. this.next();
  87002. node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, void 0, refNeedsArrowPos);
  87003. return this.finishNode(node, "SpreadElement");
  87004. }
  87005. parseRestBinding() {
  87006. const node = this.startNode();
  87007. this.next();
  87008. node.argument = this.parseBindingAtom();
  87009. return this.finishNode(node, "RestElement");
  87010. }
  87011. parseBindingAtom() {
  87012. switch (this.state.type) {
  87013. case types$12.bracketL: {
  87014. const node = this.startNode();
  87015. this.next();
  87016. node.elements = this.parseBindingList(types$12.bracketR, 93, true);
  87017. return this.finishNode(node, "ArrayPattern");
  87018. }
  87019. case types$12.braceL:
  87020. return this.parseObjectLike(types$12.braceR, true);
  87021. }
  87022. return this.parseIdentifier();
  87023. }
  87024. parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
  87025. const elts = [];
  87026. let first = true;
  87027. while (!this.eat(close)) {
  87028. if (first) {
  87029. first = false;
  87030. } else {
  87031. this.expect(types$12.comma);
  87032. }
  87033. if (allowEmpty && this.match(types$12.comma)) {
  87034. elts.push(null);
  87035. } else if (this.eat(close)) {
  87036. break;
  87037. } else if (this.match(types$12.ellipsis)) {
  87038. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
  87039. this.checkCommaAfterRest(closeCharCode);
  87040. this.expect(close);
  87041. break;
  87042. } else {
  87043. const decorators = [];
  87044. if (this.match(types$12.at) && this.hasPlugin("decorators")) {
  87045. this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator);
  87046. }
  87047. while (this.match(types$12.at)) {
  87048. decorators.push(this.parseDecorator());
  87049. }
  87050. elts.push(this.parseAssignableListItem(allowModifiers, decorators));
  87051. }
  87052. }
  87053. return elts;
  87054. }
  87055. parseAssignableListItem(allowModifiers, decorators) {
  87056. const left = this.parseMaybeDefault();
  87057. this.parseAssignableListItemTypes(left);
  87058. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  87059. if (decorators.length) {
  87060. left.decorators = decorators;
  87061. }
  87062. return elt;
  87063. }
  87064. parseAssignableListItemTypes(param) {
  87065. return param;
  87066. }
  87067. parseMaybeDefault(startPos, startLoc, left) {
  87068. var _startLoc, _startPos, _left;
  87069. startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
  87070. startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
  87071. left = (_left = left) != null ? _left : this.parseBindingAtom();
  87072. if (!this.eat(types$12.eq))
  87073. return left;
  87074. const node = this.startNodeAt(startPos, startLoc);
  87075. node.left = left;
  87076. node.right = this.parseMaybeAssignAllowIn();
  87077. return this.finishNode(node, "AssignmentPattern");
  87078. }
  87079. checkLVal(expr, contextDescription, bindingType = BIND_NONE2, checkClashes, disallowLetBinding, strictModeChanged = false) {
  87080. switch (expr.type) {
  87081. case "Identifier": {
  87082. const {
  87083. name: name2
  87084. } = expr;
  87085. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name2, this.inModule) : isStrictBindOnlyReservedWord(name2))) {
  87086. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name2);
  87087. }
  87088. if (checkClashes) {
  87089. if (checkClashes.has(name2)) {
  87090. this.raise(expr.start, ErrorMessages.ParamDupe);
  87091. } else {
  87092. checkClashes.add(name2);
  87093. }
  87094. }
  87095. if (disallowLetBinding && name2 === "let") {
  87096. this.raise(expr.start, ErrorMessages.LetInLexicalBinding);
  87097. }
  87098. if (!(bindingType & BIND_NONE2)) {
  87099. this.scope.declareName(name2, bindingType, expr.start);
  87100. }
  87101. break;
  87102. }
  87103. case "MemberExpression":
  87104. if (bindingType !== BIND_NONE2) {
  87105. this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern);
  87106. }
  87107. break;
  87108. case "ObjectPattern":
  87109. for (let prop of expr.properties) {
  87110. if (this.isObjectProperty(prop))
  87111. prop = prop.value;
  87112. else if (this.isObjectMethod(prop))
  87113. continue;
  87114. this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  87115. }
  87116. break;
  87117. case "ArrayPattern":
  87118. for (const elem of expr.elements) {
  87119. if (elem) {
  87120. this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  87121. }
  87122. }
  87123. break;
  87124. case "AssignmentPattern":
  87125. this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
  87126. break;
  87127. case "RestElement":
  87128. this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
  87129. break;
  87130. case "ParenthesizedExpression":
  87131. this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
  87132. break;
  87133. default: {
  87134. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription);
  87135. }
  87136. }
  87137. }
  87138. checkToRestConversion(node) {
  87139. if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
  87140. this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern);
  87141. }
  87142. }
  87143. checkCommaAfterRest(close) {
  87144. if (this.match(types$12.comma)) {
  87145. if (this.lookaheadCharCode() === close) {
  87146. this.raiseTrailingCommaAfterRest(this.state.start);
  87147. } else {
  87148. this.raiseRestNotLast(this.state.start);
  87149. }
  87150. }
  87151. }
  87152. raiseRestNotLast(pos) {
  87153. throw this.raise(pos, ErrorMessages.ElementAfterRest);
  87154. }
  87155. raiseTrailingCommaAfterRest(pos) {
  87156. this.raise(pos, ErrorMessages.RestTrailingComma);
  87157. }
  87158. };
  87159. var ExpressionParser = class extends LValParser {
  87160. checkProto(prop, isRecord, protoRef, refExpressionErrors) {
  87161. if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
  87162. return;
  87163. }
  87164. const key = prop.key;
  87165. const name2 = key.type === "Identifier" ? key.name : key.value;
  87166. if (name2 === "__proto__") {
  87167. if (isRecord) {
  87168. this.raise(key.start, ErrorMessages.RecordNoProto);
  87169. return;
  87170. }
  87171. if (protoRef.used) {
  87172. if (refExpressionErrors) {
  87173. if (refExpressionErrors.doubleProto === -1) {
  87174. refExpressionErrors.doubleProto = key.start;
  87175. }
  87176. } else {
  87177. this.raise(key.start, ErrorMessages.DuplicateProto);
  87178. }
  87179. }
  87180. protoRef.used = true;
  87181. }
  87182. }
  87183. shouldExitDescending(expr, potentialArrowAt) {
  87184. return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
  87185. }
  87186. getExpression() {
  87187. let paramFlags = PARAM;
  87188. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  87189. paramFlags |= PARAM_AWAIT;
  87190. }
  87191. this.scope.enter(SCOPE_PROGRAM);
  87192. this.prodParam.enter(paramFlags);
  87193. this.nextToken();
  87194. const expr = this.parseExpression();
  87195. if (!this.match(types$12.eof)) {
  87196. this.unexpected();
  87197. }
  87198. this.finalizeRemainingComments();
  87199. expr.comments = this.state.comments;
  87200. expr.errors = this.state.errors;
  87201. if (this.options.tokens) {
  87202. expr.tokens = this.tokens;
  87203. }
  87204. return expr;
  87205. }
  87206. parseExpression(disallowIn, refExpressionErrors) {
  87207. if (disallowIn) {
  87208. return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  87209. }
  87210. return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  87211. }
  87212. parseExpressionBase(refExpressionErrors) {
  87213. const startPos = this.state.start;
  87214. const startLoc = this.state.startLoc;
  87215. const expr = this.parseMaybeAssign(refExpressionErrors);
  87216. if (this.match(types$12.comma)) {
  87217. const node = this.startNodeAt(startPos, startLoc);
  87218. node.expressions = [expr];
  87219. while (this.eat(types$12.comma)) {
  87220. node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
  87221. }
  87222. this.toReferencedList(node.expressions);
  87223. return this.finishNode(node, "SequenceExpression");
  87224. }
  87225. return expr;
  87226. }
  87227. parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) {
  87228. return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
  87229. }
  87230. parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) {
  87231. return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
  87232. }
  87233. setOptionalParametersError(refExpressionErrors, resultError) {
  87234. var _resultError$pos;
  87235. refExpressionErrors.optionalParameters = (_resultError$pos = resultError == null ? void 0 : resultError.pos) != null ? _resultError$pos : this.state.start;
  87236. }
  87237. parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  87238. const startPos = this.state.start;
  87239. const startLoc = this.state.startLoc;
  87240. if (this.isContextual("yield")) {
  87241. if (this.prodParam.hasYield) {
  87242. let left2 = this.parseYield();
  87243. if (afterLeftParse) {
  87244. left2 = afterLeftParse.call(this, left2, startPos, startLoc);
  87245. }
  87246. return left2;
  87247. }
  87248. }
  87249. let ownExpressionErrors;
  87250. if (refExpressionErrors) {
  87251. ownExpressionErrors = false;
  87252. } else {
  87253. refExpressionErrors = new ExpressionErrors();
  87254. ownExpressionErrors = true;
  87255. }
  87256. if (this.match(types$12.parenL) || this.match(types$12.name)) {
  87257. this.state.potentialArrowAt = this.state.start;
  87258. }
  87259. let left = this.parseMaybeConditional(refExpressionErrors);
  87260. if (afterLeftParse) {
  87261. left = afterLeftParse.call(this, left, startPos, startLoc);
  87262. }
  87263. if (this.state.type.isAssign) {
  87264. const node = this.startNodeAt(startPos, startLoc);
  87265. const operator = this.state.value;
  87266. node.operator = operator;
  87267. if (this.match(types$12.eq)) {
  87268. node.left = this.toAssignable(left, true);
  87269. refExpressionErrors.doubleProto = -1;
  87270. } else {
  87271. node.left = left;
  87272. }
  87273. if (refExpressionErrors.shorthandAssign >= node.left.start) {
  87274. refExpressionErrors.shorthandAssign = -1;
  87275. }
  87276. this.checkLVal(left, "assignment expression");
  87277. this.next();
  87278. node.right = this.parseMaybeAssign();
  87279. return this.finishNode(node, "AssignmentExpression");
  87280. } else if (ownExpressionErrors) {
  87281. this.checkExpressionErrors(refExpressionErrors, true);
  87282. }
  87283. return left;
  87284. }
  87285. parseMaybeConditional(refExpressionErrors) {
  87286. const startPos = this.state.start;
  87287. const startLoc = this.state.startLoc;
  87288. const potentialArrowAt = this.state.potentialArrowAt;
  87289. const expr = this.parseExprOps(refExpressionErrors);
  87290. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  87291. return expr;
  87292. }
  87293. return this.parseConditional(expr, startPos, startLoc, refExpressionErrors);
  87294. }
  87295. parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  87296. if (this.eat(types$12.question)) {
  87297. const node = this.startNodeAt(startPos, startLoc);
  87298. node.test = expr;
  87299. node.consequent = this.parseMaybeAssignAllowIn();
  87300. this.expect(types$12.colon);
  87301. node.alternate = this.parseMaybeAssign();
  87302. return this.finishNode(node, "ConditionalExpression");
  87303. }
  87304. return expr;
  87305. }
  87306. parseExprOps(refExpressionErrors) {
  87307. const startPos = this.state.start;
  87308. const startLoc = this.state.startLoc;
  87309. const potentialArrowAt = this.state.potentialArrowAt;
  87310. const expr = this.parseMaybeUnary(refExpressionErrors);
  87311. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  87312. return expr;
  87313. }
  87314. return this.parseExprOp(expr, startPos, startLoc, -1);
  87315. }
  87316. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  87317. let prec = this.state.type.binop;
  87318. if (prec != null && (this.prodParam.hasIn || !this.match(types$12._in))) {
  87319. if (prec > minPrec) {
  87320. const op = this.state.type;
  87321. if (op === types$12.pipeline) {
  87322. this.expectPlugin("pipelineOperator");
  87323. if (this.state.inFSharpPipelineDirectBody) {
  87324. return left;
  87325. }
  87326. this.state.inPipeline = true;
  87327. this.checkPipelineAtInfixOperator(left, leftStartPos);
  87328. }
  87329. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  87330. node.left = left;
  87331. node.operator = this.state.value;
  87332. const logical = op === types$12.logicalOR || op === types$12.logicalAND;
  87333. const coalesce = op === types$12.nullishCoalescing;
  87334. if (coalesce) {
  87335. prec = types$12.logicalAND.binop;
  87336. }
  87337. this.next();
  87338. if (op === types$12.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
  87339. if (this.match(types$12.name) && this.state.value === "await" && this.prodParam.hasAwait) {
  87340. throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody);
  87341. }
  87342. }
  87343. node.right = this.parseExprOpRightExpr(op, prec);
  87344. this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
  87345. const nextOp = this.state.type;
  87346. if (coalesce && (nextOp === types$12.logicalOR || nextOp === types$12.logicalAND) || logical && nextOp === types$12.nullishCoalescing) {
  87347. throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical);
  87348. }
  87349. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  87350. }
  87351. }
  87352. return left;
  87353. }
  87354. parseExprOpRightExpr(op, prec) {
  87355. const startPos = this.state.start;
  87356. const startLoc = this.state.startLoc;
  87357. switch (op) {
  87358. case types$12.pipeline:
  87359. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  87360. case "smart":
  87361. return this.withTopicPermittingContext(() => {
  87362. return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
  87363. });
  87364. case "fsharp":
  87365. return this.withSoloAwaitPermittingContext(() => {
  87366. return this.parseFSharpPipelineBody(prec);
  87367. });
  87368. }
  87369. default:
  87370. return this.parseExprOpBaseRightExpr(op, prec);
  87371. }
  87372. }
  87373. parseExprOpBaseRightExpr(op, prec) {
  87374. const startPos = this.state.start;
  87375. const startLoc = this.state.startLoc;
  87376. return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec);
  87377. }
  87378. checkExponentialAfterUnary(node) {
  87379. if (this.match(types$12.exponent)) {
  87380. this.raise(node.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation);
  87381. }
  87382. }
  87383. parseMaybeUnary(refExpressionErrors, sawUnary) {
  87384. const startPos = this.state.start;
  87385. const startLoc = this.state.startLoc;
  87386. const isAwait = this.isContextual("await");
  87387. if (isAwait && this.isAwaitAllowed()) {
  87388. this.next();
  87389. const expr2 = this.parseAwait(startPos, startLoc);
  87390. if (!sawUnary)
  87391. this.checkExponentialAfterUnary(expr2);
  87392. return expr2;
  87393. }
  87394. const update = this.match(types$12.incDec);
  87395. const node = this.startNode();
  87396. if (this.state.type.prefix) {
  87397. node.operator = this.state.value;
  87398. node.prefix = true;
  87399. if (this.match(types$12._throw)) {
  87400. this.expectPlugin("throwExpressions");
  87401. }
  87402. const isDelete = this.match(types$12._delete);
  87403. this.next();
  87404. node.argument = this.parseMaybeUnary(null, true);
  87405. this.checkExpressionErrors(refExpressionErrors, true);
  87406. if (this.state.strict && isDelete) {
  87407. const arg = node.argument;
  87408. if (arg.type === "Identifier") {
  87409. this.raise(node.start, ErrorMessages.StrictDelete);
  87410. } else if (this.hasPropertyAsPrivateName(arg)) {
  87411. this.raise(node.start, ErrorMessages.DeletePrivateField);
  87412. }
  87413. }
  87414. if (!update) {
  87415. if (!sawUnary)
  87416. this.checkExponentialAfterUnary(node);
  87417. return this.finishNode(node, "UnaryExpression");
  87418. }
  87419. }
  87420. const expr = this.parseUpdate(node, update, refExpressionErrors);
  87421. if (isAwait) {
  87422. const startsExpr3 = this.hasPlugin("v8intrinsic") ? this.state.type.startsExpr : this.state.type.startsExpr && !this.match(types$12.modulo);
  87423. if (startsExpr3 && !this.isAmbiguousAwait()) {
  87424. this.raiseOverwrite(startPos, this.hasPlugin("topLevelAwait") ? ErrorMessages.AwaitNotInAsyncContext : ErrorMessages.AwaitNotInAsyncFunction);
  87425. return this.parseAwait(startPos, startLoc);
  87426. }
  87427. }
  87428. return expr;
  87429. }
  87430. parseUpdate(node, update, refExpressionErrors) {
  87431. if (update) {
  87432. this.checkLVal(node.argument, "prefix operation");
  87433. return this.finishNode(node, "UpdateExpression");
  87434. }
  87435. const startPos = this.state.start;
  87436. const startLoc = this.state.startLoc;
  87437. let expr = this.parseExprSubscripts(refExpressionErrors);
  87438. if (this.checkExpressionErrors(refExpressionErrors, false))
  87439. return expr;
  87440. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  87441. const node2 = this.startNodeAt(startPos, startLoc);
  87442. node2.operator = this.state.value;
  87443. node2.prefix = false;
  87444. node2.argument = expr;
  87445. this.checkLVal(expr, "postfix operation");
  87446. this.next();
  87447. expr = this.finishNode(node2, "UpdateExpression");
  87448. }
  87449. return expr;
  87450. }
  87451. parseExprSubscripts(refExpressionErrors) {
  87452. const startPos = this.state.start;
  87453. const startLoc = this.state.startLoc;
  87454. const potentialArrowAt = this.state.potentialArrowAt;
  87455. const expr = this.parseExprAtom(refExpressionErrors);
  87456. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  87457. return expr;
  87458. }
  87459. return this.parseSubscripts(expr, startPos, startLoc);
  87460. }
  87461. parseSubscripts(base2, startPos, startLoc, noCalls) {
  87462. const state = {
  87463. optionalChainMember: false,
  87464. maybeAsyncArrow: this.atPossibleAsyncArrow(base2),
  87465. stop: false
  87466. };
  87467. do {
  87468. base2 = this.parseSubscript(base2, startPos, startLoc, noCalls, state);
  87469. state.maybeAsyncArrow = false;
  87470. } while (!state.stop);
  87471. return base2;
  87472. }
  87473. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  87474. if (!noCalls && this.eat(types$12.doubleColon)) {
  87475. return this.parseBind(base2, startPos, startLoc, noCalls, state);
  87476. } else if (this.match(types$12.backQuote)) {
  87477. return this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  87478. }
  87479. let optional = false;
  87480. if (this.match(types$12.questionDot)) {
  87481. if (noCalls && this.lookaheadCharCode() === 40) {
  87482. state.stop = true;
  87483. return base2;
  87484. }
  87485. state.optionalChainMember = optional = true;
  87486. this.next();
  87487. }
  87488. if (!noCalls && this.match(types$12.parenL)) {
  87489. return this.parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional);
  87490. } else if (optional || this.match(types$12.bracketL) || this.eat(types$12.dot)) {
  87491. return this.parseMember(base2, startPos, startLoc, state, optional);
  87492. } else {
  87493. state.stop = true;
  87494. return base2;
  87495. }
  87496. }
  87497. parseMember(base2, startPos, startLoc, state, optional) {
  87498. const node = this.startNodeAt(startPos, startLoc);
  87499. const computed = this.eat(types$12.bracketL);
  87500. node.object = base2;
  87501. node.computed = computed;
  87502. const privateName = !computed && this.match(types$12.privateName) && this.state.value;
  87503. const property = computed ? this.parseExpression() : privateName ? this.parsePrivateName() : this.parseIdentifier(true);
  87504. if (privateName !== false) {
  87505. if (node.object.type === "Super") {
  87506. this.raise(startPos, ErrorMessages.SuperPrivateField);
  87507. }
  87508. this.classScope.usePrivateName(privateName, property.start);
  87509. }
  87510. node.property = property;
  87511. if (computed) {
  87512. this.expect(types$12.bracketR);
  87513. }
  87514. if (state.optionalChainMember) {
  87515. node.optional = optional;
  87516. return this.finishNode(node, "OptionalMemberExpression");
  87517. } else {
  87518. return this.finishNode(node, "MemberExpression");
  87519. }
  87520. }
  87521. parseBind(base2, startPos, startLoc, noCalls, state) {
  87522. const node = this.startNodeAt(startPos, startLoc);
  87523. node.object = base2;
  87524. node.callee = this.parseNoCallExpr();
  87525. state.stop = true;
  87526. return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
  87527. }
  87528. parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional) {
  87529. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  87530. let refExpressionErrors = null;
  87531. this.state.maybeInArrowParameters = true;
  87532. this.next();
  87533. let node = this.startNodeAt(startPos, startLoc);
  87534. node.callee = base2;
  87535. if (state.maybeAsyncArrow) {
  87536. this.expressionScope.enter(newAsyncArrowScope());
  87537. refExpressionErrors = new ExpressionErrors();
  87538. }
  87539. if (state.optionalChainMember) {
  87540. node.optional = optional;
  87541. }
  87542. if (optional) {
  87543. node.arguments = this.parseCallExpressionArguments(types$12.parenR);
  87544. } else {
  87545. node.arguments = this.parseCallExpressionArguments(types$12.parenR, base2.type === "Import", base2.type !== "Super", node, refExpressionErrors);
  87546. }
  87547. this.finishCallExpression(node, state.optionalChainMember);
  87548. if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  87549. state.stop = true;
  87550. this.expressionScope.validateAsPattern();
  87551. this.expressionScope.exit();
  87552. node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
  87553. } else {
  87554. if (state.maybeAsyncArrow) {
  87555. this.checkExpressionErrors(refExpressionErrors, true);
  87556. this.expressionScope.exit();
  87557. }
  87558. this.toReferencedArguments(node);
  87559. }
  87560. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  87561. return node;
  87562. }
  87563. toReferencedArguments(node, isParenthesizedExpr) {
  87564. this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
  87565. }
  87566. parseTaggedTemplateExpression(base2, startPos, startLoc, state) {
  87567. const node = this.startNodeAt(startPos, startLoc);
  87568. node.tag = base2;
  87569. node.quasi = this.parseTemplate(true);
  87570. if (state.optionalChainMember) {
  87571. this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate);
  87572. }
  87573. return this.finishNode(node, "TaggedTemplateExpression");
  87574. }
  87575. atPossibleAsyncArrow(base2) {
  87576. return base2.type === "Identifier" && base2.name === "async" && this.state.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && base2.start === this.state.potentialArrowAt;
  87577. }
  87578. finishCallExpression(node, optional) {
  87579. if (node.callee.type === "Import") {
  87580. if (node.arguments.length === 2) {
  87581. {
  87582. if (!this.hasPlugin("moduleAttributes")) {
  87583. this.expectPlugin("importAssertions");
  87584. }
  87585. }
  87586. }
  87587. if (node.arguments.length === 0 || node.arguments.length > 2) {
  87588. this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
  87589. } else {
  87590. for (const arg of node.arguments) {
  87591. if (arg.type === "SpreadElement") {
  87592. this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument);
  87593. }
  87594. }
  87595. }
  87596. }
  87597. return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
  87598. }
  87599. parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) {
  87600. const elts = [];
  87601. let first = true;
  87602. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  87603. this.state.inFSharpPipelineDirectBody = false;
  87604. while (!this.eat(close)) {
  87605. if (first) {
  87606. first = false;
  87607. } else {
  87608. this.expect(types$12.comma);
  87609. if (this.match(close)) {
  87610. if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
  87611. this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma);
  87612. }
  87613. if (nodeForExtra) {
  87614. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  87615. }
  87616. this.next();
  87617. break;
  87618. }
  87619. }
  87620. elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder));
  87621. }
  87622. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  87623. return elts;
  87624. }
  87625. shouldParseAsyncArrow() {
  87626. return this.match(types$12.arrow) && !this.canInsertSemicolon();
  87627. }
  87628. parseAsyncArrowFromCallExpression(node, call) {
  87629. var _call$extra;
  87630. this.resetPreviousNodeTrailingComments(call);
  87631. this.expect(types$12.arrow);
  87632. this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
  87633. setInnerComments(node, call.innerComments);
  87634. setInnerComments(node, call.callee.trailingComments);
  87635. return node;
  87636. }
  87637. parseNoCallExpr() {
  87638. const startPos = this.state.start;
  87639. const startLoc = this.state.startLoc;
  87640. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  87641. }
  87642. parseExprAtom(refExpressionErrors) {
  87643. let node;
  87644. switch (this.state.type) {
  87645. case types$12._super:
  87646. return this.parseSuper();
  87647. case types$12._import:
  87648. node = this.startNode();
  87649. this.next();
  87650. if (this.match(types$12.dot)) {
  87651. return this.parseImportMetaProperty(node);
  87652. }
  87653. if (!this.match(types$12.parenL)) {
  87654. this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport);
  87655. }
  87656. return this.finishNode(node, "Import");
  87657. case types$12._this:
  87658. node = this.startNode();
  87659. this.next();
  87660. return this.finishNode(node, "ThisExpression");
  87661. case types$12.name: {
  87662. if (this.isContextual("module") && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) {
  87663. return this.parseModuleExpression();
  87664. }
  87665. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  87666. const containsEsc = this.state.containsEsc;
  87667. const id = this.parseIdentifier();
  87668. if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
  87669. if (this.match(types$12._function)) {
  87670. this.resetPreviousNodeTrailingComments(id);
  87671. this.next();
  87672. return this.parseFunction(this.startNodeAtNode(id), void 0, true);
  87673. } else if (this.match(types$12.name)) {
  87674. if (this.lookaheadCharCode() === 61) {
  87675. return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
  87676. } else {
  87677. return id;
  87678. }
  87679. } else if (this.match(types$12._do)) {
  87680. this.resetPreviousNodeTrailingComments(id);
  87681. return this.parseDo(this.startNodeAtNode(id), true);
  87682. }
  87683. }
  87684. if (canBeArrow && this.match(types$12.arrow) && !this.canInsertSemicolon()) {
  87685. this.next();
  87686. return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
  87687. }
  87688. return id;
  87689. }
  87690. case types$12._do: {
  87691. return this.parseDo(this.startNode(), false);
  87692. }
  87693. case types$12.slash:
  87694. case types$12.slashAssign: {
  87695. this.readRegexp();
  87696. return this.parseRegExpLiteral(this.state.value);
  87697. }
  87698. case types$12.num:
  87699. return this.parseNumericLiteral(this.state.value);
  87700. case types$12.bigint:
  87701. return this.parseBigIntLiteral(this.state.value);
  87702. case types$12.decimal:
  87703. return this.parseDecimalLiteral(this.state.value);
  87704. case types$12.string:
  87705. return this.parseStringLiteral(this.state.value);
  87706. case types$12._null:
  87707. return this.parseNullLiteral();
  87708. case types$12._true:
  87709. return this.parseBooleanLiteral(true);
  87710. case types$12._false:
  87711. return this.parseBooleanLiteral(false);
  87712. case types$12.parenL: {
  87713. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  87714. return this.parseParenAndDistinguishExpression(canBeArrow);
  87715. }
  87716. case types$12.bracketBarL:
  87717. case types$12.bracketHashL: {
  87718. return this.parseArrayLike(this.state.type === types$12.bracketBarL ? types$12.bracketBarR : types$12.bracketR, false, true, refExpressionErrors);
  87719. }
  87720. case types$12.bracketL: {
  87721. return this.parseArrayLike(types$12.bracketR, true, false, refExpressionErrors);
  87722. }
  87723. case types$12.braceBarL:
  87724. case types$12.braceHashL: {
  87725. return this.parseObjectLike(this.state.type === types$12.braceBarL ? types$12.braceBarR : types$12.braceR, false, true, refExpressionErrors);
  87726. }
  87727. case types$12.braceL: {
  87728. return this.parseObjectLike(types$12.braceR, false, false, refExpressionErrors);
  87729. }
  87730. case types$12._function:
  87731. return this.parseFunctionOrFunctionSent();
  87732. case types$12.at:
  87733. this.parseDecorators();
  87734. case types$12._class:
  87735. node = this.startNode();
  87736. this.takeDecorators(node);
  87737. return this.parseClass(node, false);
  87738. case types$12._new:
  87739. return this.parseNewOrNewTarget();
  87740. case types$12.backQuote:
  87741. return this.parseTemplate(false);
  87742. case types$12.doubleColon: {
  87743. node = this.startNode();
  87744. this.next();
  87745. node.object = null;
  87746. const callee = node.callee = this.parseNoCallExpr();
  87747. if (callee.type === "MemberExpression") {
  87748. return this.finishNode(node, "BindExpression");
  87749. } else {
  87750. throw this.raise(callee.start, ErrorMessages.UnsupportedBind);
  87751. }
  87752. }
  87753. case types$12.privateName: {
  87754. const start3 = this.state.start;
  87755. const value = this.state.value;
  87756. node = this.parsePrivateName();
  87757. if (this.match(types$12._in)) {
  87758. this.expectPlugin("privateIn");
  87759. this.classScope.usePrivateName(value, node.start);
  87760. } else if (this.hasPlugin("privateIn")) {
  87761. this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, value);
  87762. } else {
  87763. throw this.unexpected(start3);
  87764. }
  87765. return node;
  87766. }
  87767. case types$12.hash: {
  87768. if (this.state.inPipeline) {
  87769. node = this.startNode();
  87770. if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
  87771. this.raise(node.start, ErrorMessages.PrimaryTopicRequiresSmartPipeline);
  87772. }
  87773. this.next();
  87774. if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
  87775. this.raise(node.start, ErrorMessages.PrimaryTopicNotAllowed);
  87776. }
  87777. this.registerTopicReference();
  87778. return this.finishNode(node, "PipelinePrimaryTopicReference");
  87779. }
  87780. }
  87781. case types$12.relational: {
  87782. if (this.state.value === "<") {
  87783. const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
  87784. if (isIdentifierStart2(lookaheadCh) || lookaheadCh === 62) {
  87785. this.expectOnePlugin(["jsx", "flow", "typescript"]);
  87786. }
  87787. }
  87788. }
  87789. default:
  87790. throw this.unexpected();
  87791. }
  87792. }
  87793. parseAsyncArrowUnaryFunction(node) {
  87794. this.prodParam.enter(functionFlags2(true, this.prodParam.hasYield));
  87795. const params = [this.parseIdentifier()];
  87796. this.prodParam.exit();
  87797. if (this.hasPrecedingLineBreak()) {
  87798. this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow);
  87799. }
  87800. this.expect(types$12.arrow);
  87801. this.parseArrowExpression(node, params, true);
  87802. return node;
  87803. }
  87804. parseDo(node, isAsync) {
  87805. this.expectPlugin("doExpressions");
  87806. if (isAsync) {
  87807. this.expectPlugin("asyncDoExpressions");
  87808. }
  87809. node.async = isAsync;
  87810. this.next();
  87811. const oldLabels = this.state.labels;
  87812. this.state.labels = [];
  87813. if (isAsync) {
  87814. this.prodParam.enter(PARAM_AWAIT);
  87815. node.body = this.parseBlock();
  87816. this.prodParam.exit();
  87817. } else {
  87818. node.body = this.parseBlock();
  87819. }
  87820. this.state.labels = oldLabels;
  87821. return this.finishNode(node, "DoExpression");
  87822. }
  87823. parseSuper() {
  87824. const node = this.startNode();
  87825. this.next();
  87826. if (this.match(types$12.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  87827. this.raise(node.start, ErrorMessages.SuperNotAllowed);
  87828. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  87829. this.raise(node.start, ErrorMessages.UnexpectedSuper);
  87830. }
  87831. if (!this.match(types$12.parenL) && !this.match(types$12.bracketL) && !this.match(types$12.dot)) {
  87832. this.raise(node.start, ErrorMessages.UnsupportedSuper);
  87833. }
  87834. return this.finishNode(node, "Super");
  87835. }
  87836. parseMaybePrivateName(isPrivateNameAllowed) {
  87837. const isPrivate = this.match(types$12.privateName);
  87838. if (isPrivate) {
  87839. if (!isPrivateNameAllowed) {
  87840. this.raise(this.state.start + 1, ErrorMessages.UnexpectedPrivateField);
  87841. }
  87842. return this.parsePrivateName();
  87843. } else {
  87844. return this.parseIdentifier(true);
  87845. }
  87846. }
  87847. parsePrivateName() {
  87848. const node = this.startNode();
  87849. const id = this.startNodeAt(this.state.start + 1, new Position3(this.state.curLine, this.state.start + 1 - this.state.lineStart));
  87850. const name2 = this.state.value;
  87851. this.next();
  87852. node.id = this.createIdentifier(id, name2);
  87853. return this.finishNode(node, "PrivateName");
  87854. }
  87855. parseFunctionOrFunctionSent() {
  87856. const node = this.startNode();
  87857. this.next();
  87858. if (this.prodParam.hasYield && this.match(types$12.dot)) {
  87859. const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
  87860. this.next();
  87861. return this.parseMetaProperty(node, meta, "sent");
  87862. }
  87863. return this.parseFunction(node);
  87864. }
  87865. parseMetaProperty(node, meta, propertyName) {
  87866. node.meta = meta;
  87867. if (meta.name === "function" && propertyName === "sent") {
  87868. if (this.isContextual(propertyName)) {
  87869. this.expectPlugin("functionSent");
  87870. } else if (!this.hasPlugin("functionSent")) {
  87871. this.unexpected();
  87872. }
  87873. }
  87874. const containsEsc = this.state.containsEsc;
  87875. node.property = this.parseIdentifier(true);
  87876. if (node.property.name !== propertyName || containsEsc) {
  87877. this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName);
  87878. }
  87879. return this.finishNode(node, "MetaProperty");
  87880. }
  87881. parseImportMetaProperty(node) {
  87882. const id = this.createIdentifier(this.startNodeAtNode(node), "import");
  87883. this.next();
  87884. if (this.isContextual("meta")) {
  87885. if (!this.inModule) {
  87886. this.raise(id.start, SourceTypeModuleErrorMessages.ImportMetaOutsideModule);
  87887. }
  87888. this.sawUnambiguousESM = true;
  87889. }
  87890. return this.parseMetaProperty(node, id, "meta");
  87891. }
  87892. parseLiteralAtNode(value, type, node) {
  87893. this.addExtra(node, "rawValue", value);
  87894. this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
  87895. node.value = value;
  87896. this.next();
  87897. return this.finishNode(node, type);
  87898. }
  87899. parseLiteral(value, type) {
  87900. const node = this.startNode();
  87901. return this.parseLiteralAtNode(value, type, node);
  87902. }
  87903. parseStringLiteral(value) {
  87904. return this.parseLiteral(value, "StringLiteral");
  87905. }
  87906. parseNumericLiteral(value) {
  87907. return this.parseLiteral(value, "NumericLiteral");
  87908. }
  87909. parseBigIntLiteral(value) {
  87910. return this.parseLiteral(value, "BigIntLiteral");
  87911. }
  87912. parseDecimalLiteral(value) {
  87913. return this.parseLiteral(value, "DecimalLiteral");
  87914. }
  87915. parseRegExpLiteral(value) {
  87916. const node = this.parseLiteral(value.value, "RegExpLiteral");
  87917. node.pattern = value.pattern;
  87918. node.flags = value.flags;
  87919. return node;
  87920. }
  87921. parseBooleanLiteral(value) {
  87922. const node = this.startNode();
  87923. node.value = value;
  87924. this.next();
  87925. return this.finishNode(node, "BooleanLiteral");
  87926. }
  87927. parseNullLiteral() {
  87928. const node = this.startNode();
  87929. this.next();
  87930. return this.finishNode(node, "NullLiteral");
  87931. }
  87932. parseParenAndDistinguishExpression(canBeArrow) {
  87933. const startPos = this.state.start;
  87934. const startLoc = this.state.startLoc;
  87935. let val;
  87936. this.next();
  87937. this.expressionScope.enter(newArrowHeadScope());
  87938. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  87939. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  87940. this.state.maybeInArrowParameters = true;
  87941. this.state.inFSharpPipelineDirectBody = false;
  87942. const innerStartPos = this.state.start;
  87943. const innerStartLoc = this.state.startLoc;
  87944. const exprList = [];
  87945. const refExpressionErrors = new ExpressionErrors();
  87946. let first = true;
  87947. let spreadStart;
  87948. let optionalCommaStart;
  87949. while (!this.match(types$12.parenR)) {
  87950. if (first) {
  87951. first = false;
  87952. } else {
  87953. this.expect(types$12.comma, refExpressionErrors.optionalParameters === -1 ? null : refExpressionErrors.optionalParameters);
  87954. if (this.match(types$12.parenR)) {
  87955. optionalCommaStart = this.state.start;
  87956. break;
  87957. }
  87958. }
  87959. if (this.match(types$12.ellipsis)) {
  87960. const spreadNodeStartPos = this.state.start;
  87961. const spreadNodeStartLoc = this.state.startLoc;
  87962. spreadStart = this.state.start;
  87963. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
  87964. this.checkCommaAfterRest(41);
  87965. break;
  87966. } else {
  87967. exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem));
  87968. }
  87969. }
  87970. const innerEndPos = this.state.lastTokEnd;
  87971. const innerEndLoc = this.state.lastTokEndLoc;
  87972. this.expect(types$12.parenR);
  87973. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  87974. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  87975. let arrowNode = this.startNodeAt(startPos, startLoc);
  87976. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  87977. this.expressionScope.validateAsPattern();
  87978. this.expressionScope.exit();
  87979. this.parseArrowExpression(arrowNode, exprList, false);
  87980. return arrowNode;
  87981. }
  87982. this.expressionScope.exit();
  87983. if (!exprList.length) {
  87984. this.unexpected(this.state.lastTokStart);
  87985. }
  87986. if (optionalCommaStart)
  87987. this.unexpected(optionalCommaStart);
  87988. if (spreadStart)
  87989. this.unexpected(spreadStart);
  87990. this.checkExpressionErrors(refExpressionErrors, true);
  87991. this.toReferencedListDeep(exprList, true);
  87992. if (exprList.length > 1) {
  87993. val = this.startNodeAt(innerStartPos, innerStartLoc);
  87994. val.expressions = exprList;
  87995. this.finishNode(val, "SequenceExpression");
  87996. val.end = innerEndPos;
  87997. val.loc.end = innerEndLoc;
  87998. } else {
  87999. val = exprList[0];
  88000. }
  88001. if (!this.options.createParenthesizedExpressions) {
  88002. this.addExtra(val, "parenthesized", true);
  88003. this.addExtra(val, "parenStart", startPos);
  88004. return val;
  88005. }
  88006. const parenExpression = this.startNodeAt(startPos, startLoc);
  88007. parenExpression.expression = val;
  88008. this.finishNode(parenExpression, "ParenthesizedExpression");
  88009. return parenExpression;
  88010. }
  88011. shouldParseArrow() {
  88012. return !this.canInsertSemicolon();
  88013. }
  88014. parseArrow(node) {
  88015. if (this.eat(types$12.arrow)) {
  88016. return node;
  88017. }
  88018. }
  88019. parseParenItem(node, startPos, startLoc) {
  88020. return node;
  88021. }
  88022. parseNewOrNewTarget() {
  88023. const node = this.startNode();
  88024. this.next();
  88025. if (this.match(types$12.dot)) {
  88026. const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
  88027. this.next();
  88028. const metaProp = this.parseMetaProperty(node, meta, "target");
  88029. if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
  88030. this.raise(metaProp.start, ErrorMessages.UnexpectedNewTarget);
  88031. }
  88032. return metaProp;
  88033. }
  88034. return this.parseNew(node);
  88035. }
  88036. parseNew(node) {
  88037. node.callee = this.parseNoCallExpr();
  88038. if (node.callee.type === "Import") {
  88039. this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression);
  88040. } else if (this.isOptionalChain(node.callee)) {
  88041. this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew);
  88042. } else if (this.eat(types$12.questionDot)) {
  88043. this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew);
  88044. }
  88045. this.parseNewArguments(node);
  88046. return this.finishNode(node, "NewExpression");
  88047. }
  88048. parseNewArguments(node) {
  88049. if (this.eat(types$12.parenL)) {
  88050. const args = this.parseExprList(types$12.parenR);
  88051. this.toReferencedList(args);
  88052. node.arguments = args;
  88053. } else {
  88054. node.arguments = [];
  88055. }
  88056. }
  88057. parseTemplateElement(isTagged) {
  88058. const elem = this.startNode();
  88059. if (this.state.value === null) {
  88060. if (!isTagged) {
  88061. this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate);
  88062. }
  88063. }
  88064. elem.value = {
  88065. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  88066. cooked: this.state.value
  88067. };
  88068. this.next();
  88069. elem.tail = this.match(types$12.backQuote);
  88070. return this.finishNode(elem, "TemplateElement");
  88071. }
  88072. parseTemplate(isTagged) {
  88073. const node = this.startNode();
  88074. this.next();
  88075. node.expressions = [];
  88076. let curElt = this.parseTemplateElement(isTagged);
  88077. node.quasis = [curElt];
  88078. while (!curElt.tail) {
  88079. this.expect(types$12.dollarBraceL);
  88080. node.expressions.push(this.parseTemplateSubstitution());
  88081. this.expect(types$12.braceR);
  88082. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  88083. }
  88084. this.next();
  88085. return this.finishNode(node, "TemplateLiteral");
  88086. }
  88087. parseTemplateSubstitution() {
  88088. return this.parseExpression();
  88089. }
  88090. parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
  88091. if (isRecord) {
  88092. this.expectPlugin("recordAndTuple");
  88093. }
  88094. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  88095. this.state.inFSharpPipelineDirectBody = false;
  88096. const propHash = /* @__PURE__ */ Object.create(null);
  88097. let first = true;
  88098. const node = this.startNode();
  88099. node.properties = [];
  88100. this.next();
  88101. while (!this.match(close)) {
  88102. if (first) {
  88103. first = false;
  88104. } else {
  88105. this.expect(types$12.comma);
  88106. if (this.match(close)) {
  88107. this.addExtra(node, "trailingComma", this.state.lastTokStart);
  88108. break;
  88109. }
  88110. }
  88111. const prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);
  88112. if (!isPattern) {
  88113. this.checkProto(prop, isRecord, propHash, refExpressionErrors);
  88114. }
  88115. if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
  88116. this.raise(prop.start, ErrorMessages.InvalidRecordProperty);
  88117. }
  88118. if (prop.shorthand) {
  88119. this.addExtra(prop, "shorthand", true);
  88120. }
  88121. node.properties.push(prop);
  88122. }
  88123. this.next();
  88124. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  88125. let type = "ObjectExpression";
  88126. if (isPattern) {
  88127. type = "ObjectPattern";
  88128. } else if (isRecord) {
  88129. type = "RecordExpression";
  88130. }
  88131. return this.finishNode(node, type);
  88132. }
  88133. maybeAsyncOrAccessorProp(prop) {
  88134. return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(types$12.bracketL) || this.match(types$12.star));
  88135. }
  88136. parsePropertyDefinition(isPattern, refExpressionErrors) {
  88137. let decorators = [];
  88138. if (this.match(types$12.at)) {
  88139. if (this.hasPlugin("decorators")) {
  88140. this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator);
  88141. }
  88142. while (this.match(types$12.at)) {
  88143. decorators.push(this.parseDecorator());
  88144. }
  88145. }
  88146. const prop = this.startNode();
  88147. let isGenerator = false;
  88148. let isAsync = false;
  88149. let isAccessor = false;
  88150. let startPos;
  88151. let startLoc;
  88152. if (this.match(types$12.ellipsis)) {
  88153. if (decorators.length)
  88154. this.unexpected();
  88155. if (isPattern) {
  88156. this.next();
  88157. prop.argument = this.parseIdentifier();
  88158. this.checkCommaAfterRest(125);
  88159. return this.finishNode(prop, "RestElement");
  88160. }
  88161. return this.parseSpread();
  88162. }
  88163. if (decorators.length) {
  88164. prop.decorators = decorators;
  88165. decorators = [];
  88166. }
  88167. prop.method = false;
  88168. if (isPattern || refExpressionErrors) {
  88169. startPos = this.state.start;
  88170. startLoc = this.state.startLoc;
  88171. }
  88172. if (!isPattern) {
  88173. isGenerator = this.eat(types$12.star);
  88174. }
  88175. const containsEsc = this.state.containsEsc;
  88176. const key = this.parsePropertyName(prop, false);
  88177. if (!isPattern && !isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
  88178. const keyName = key.name;
  88179. if (keyName === "async" && !this.hasPrecedingLineBreak()) {
  88180. isAsync = true;
  88181. this.resetPreviousNodeTrailingComments(key);
  88182. isGenerator = this.eat(types$12.star);
  88183. this.parsePropertyName(prop, false);
  88184. }
  88185. if (keyName === "get" || keyName === "set") {
  88186. isAccessor = true;
  88187. this.resetPreviousNodeTrailingComments(key);
  88188. prop.kind = keyName;
  88189. if (this.match(types$12.star)) {
  88190. isGenerator = true;
  88191. this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName);
  88192. this.next();
  88193. }
  88194. this.parsePropertyName(prop, false);
  88195. }
  88196. }
  88197. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  88198. return prop;
  88199. }
  88200. getGetterSetterExpectedParamCount(method) {
  88201. return method.kind === "get" ? 0 : 1;
  88202. }
  88203. getObjectOrClassMethodParams(method) {
  88204. return method.params;
  88205. }
  88206. checkGetterSetterParams(method) {
  88207. var _params;
  88208. const paramCount = this.getGetterSetterExpectedParamCount(method);
  88209. const params = this.getObjectOrClassMethodParams(method);
  88210. const start3 = method.start;
  88211. if (params.length !== paramCount) {
  88212. if (method.kind === "get") {
  88213. this.raise(start3, ErrorMessages.BadGetterArity);
  88214. } else {
  88215. this.raise(start3, ErrorMessages.BadSetterArity);
  88216. }
  88217. }
  88218. if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
  88219. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  88220. }
  88221. }
  88222. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  88223. if (isAccessor) {
  88224. this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
  88225. this.checkGetterSetterParams(prop);
  88226. return prop;
  88227. }
  88228. if (isAsync || isGenerator || this.match(types$12.parenL)) {
  88229. if (isPattern)
  88230. this.unexpected();
  88231. prop.kind = "method";
  88232. prop.method = true;
  88233. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  88234. }
  88235. }
  88236. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  88237. prop.shorthand = false;
  88238. if (this.eat(types$12.colon)) {
  88239. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
  88240. return this.finishNode(prop, "ObjectProperty");
  88241. }
  88242. if (!prop.computed && prop.key.type === "Identifier") {
  88243. this.checkReservedWord(prop.key.name, prop.key.start, true, false);
  88244. if (isPattern) {
  88245. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  88246. } else if (this.match(types$12.eq) && refExpressionErrors) {
  88247. if (refExpressionErrors.shorthandAssign === -1) {
  88248. refExpressionErrors.shorthandAssign = this.state.start;
  88249. }
  88250. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  88251. } else {
  88252. prop.value = prop.key.__clone();
  88253. }
  88254. prop.shorthand = true;
  88255. return this.finishNode(prop, "ObjectProperty");
  88256. }
  88257. }
  88258. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  88259. const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  88260. if (!node)
  88261. this.unexpected();
  88262. return node;
  88263. }
  88264. parsePropertyName(prop, isPrivateNameAllowed) {
  88265. if (this.eat(types$12.bracketL)) {
  88266. prop.computed = true;
  88267. prop.key = this.parseMaybeAssignAllowIn();
  88268. this.expect(types$12.bracketR);
  88269. } else {
  88270. const oldInPropertyName = this.state.inPropertyName;
  88271. this.state.inPropertyName = true;
  88272. const type = this.state.type;
  88273. prop.key = type === types$12.num || type === types$12.string || type === types$12.bigint || type === types$12.decimal ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
  88274. if (type !== types$12.privateName) {
  88275. prop.computed = false;
  88276. }
  88277. this.state.inPropertyName = oldInPropertyName;
  88278. }
  88279. return prop.key;
  88280. }
  88281. initFunction(node, isAsync) {
  88282. node.id = null;
  88283. node.generator = false;
  88284. node.async = !!isAsync;
  88285. }
  88286. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  88287. this.initFunction(node, isAsync);
  88288. node.generator = !!isGenerator;
  88289. const allowModifiers = isConstructor;
  88290. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_SUPER2 | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  88291. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  88292. this.parseFunctionParams(node, allowModifiers);
  88293. this.parseFunctionBodyAndFinish(node, type, true);
  88294. this.prodParam.exit();
  88295. this.scope.exit();
  88296. return node;
  88297. }
  88298. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  88299. if (isTuple) {
  88300. this.expectPlugin("recordAndTuple");
  88301. }
  88302. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  88303. this.state.inFSharpPipelineDirectBody = false;
  88304. const node = this.startNode();
  88305. this.next();
  88306. node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
  88307. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  88308. return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
  88309. }
  88310. parseArrowExpression(node, params, isAsync, trailingCommaPos) {
  88311. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  88312. let flags = functionFlags2(isAsync, false);
  88313. if (!this.match(types$12.bracketL) && this.prodParam.hasIn) {
  88314. flags |= PARAM_IN;
  88315. }
  88316. this.prodParam.enter(flags);
  88317. this.initFunction(node, isAsync);
  88318. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  88319. if (params) {
  88320. this.state.maybeInArrowParameters = true;
  88321. this.setArrowFunctionParameters(node, params, trailingCommaPos);
  88322. }
  88323. this.state.maybeInArrowParameters = false;
  88324. this.parseFunctionBody(node, true);
  88325. this.prodParam.exit();
  88326. this.scope.exit();
  88327. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  88328. return this.finishNode(node, "ArrowFunctionExpression");
  88329. }
  88330. setArrowFunctionParameters(node, params, trailingCommaPos) {
  88331. node.params = this.toAssignableList(params, trailingCommaPos, false);
  88332. }
  88333. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  88334. this.parseFunctionBody(node, false, isMethod);
  88335. this.finishNode(node, type);
  88336. }
  88337. parseFunctionBody(node, allowExpression, isMethod = false) {
  88338. const isExpression = allowExpression && !this.match(types$12.braceL);
  88339. this.expressionScope.enter(newExpressionScope());
  88340. if (isExpression) {
  88341. node.body = this.parseMaybeAssign();
  88342. this.checkParams(node, false, allowExpression, false);
  88343. } else {
  88344. const oldStrict = this.state.strict;
  88345. const oldLabels = this.state.labels;
  88346. this.state.labels = [];
  88347. this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
  88348. node.body = this.parseBlock(true, false, (hasStrictModeDirective) => {
  88349. const nonSimple = !this.isSimpleParamList(node.params);
  88350. if (hasStrictModeDirective && nonSimple) {
  88351. const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
  88352. this.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective);
  88353. }
  88354. const strictModeChanged = !oldStrict && this.state.strict;
  88355. this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
  88356. if (this.state.strict && node.id) {
  88357. this.checkLVal(node.id, "function name", BIND_OUTSIDE2, void 0, void 0, strictModeChanged);
  88358. }
  88359. });
  88360. this.prodParam.exit();
  88361. this.expressionScope.exit();
  88362. this.state.labels = oldLabels;
  88363. }
  88364. }
  88365. isSimpleParamList(params) {
  88366. for (let i = 0, len = params.length; i < len; i++) {
  88367. if (params[i].type !== "Identifier")
  88368. return false;
  88369. }
  88370. return true;
  88371. }
  88372. checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
  88373. const checkClashes = /* @__PURE__ */ new Set();
  88374. for (const param of node.params) {
  88375. this.checkLVal(param, "function parameter list", BIND_VAR2, allowDuplicates ? null : checkClashes, void 0, strictModeChanged);
  88376. }
  88377. }
  88378. parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
  88379. const elts = [];
  88380. let first = true;
  88381. while (!this.eat(close)) {
  88382. if (first) {
  88383. first = false;
  88384. } else {
  88385. this.expect(types$12.comma);
  88386. if (this.match(close)) {
  88387. if (nodeForExtra) {
  88388. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  88389. }
  88390. this.next();
  88391. break;
  88392. }
  88393. }
  88394. elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
  88395. }
  88396. return elts;
  88397. }
  88398. parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) {
  88399. let elt;
  88400. if (this.match(types$12.comma)) {
  88401. if (!allowEmpty) {
  88402. this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ",");
  88403. }
  88404. elt = null;
  88405. } else if (this.match(types$12.ellipsis)) {
  88406. const spreadNodeStartPos = this.state.start;
  88407. const spreadNodeStartLoc = this.state.startLoc;
  88408. elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartPos, spreadNodeStartLoc);
  88409. } else if (this.match(types$12.question)) {
  88410. this.expectPlugin("partialApplication");
  88411. if (!allowPlaceholder) {
  88412. this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder);
  88413. }
  88414. const node = this.startNode();
  88415. this.next();
  88416. elt = this.finishNode(node, "ArgumentPlaceholder");
  88417. } else {
  88418. elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem);
  88419. }
  88420. return elt;
  88421. }
  88422. parseIdentifier(liberal) {
  88423. const node = this.startNode();
  88424. const name2 = this.parseIdentifierName(node.start, liberal);
  88425. return this.createIdentifier(node, name2);
  88426. }
  88427. createIdentifier(node, name2) {
  88428. node.name = name2;
  88429. node.loc.identifierName = name2;
  88430. return this.finishNode(node, "Identifier");
  88431. }
  88432. parseIdentifierName(pos, liberal) {
  88433. let name2;
  88434. const {
  88435. start: start3,
  88436. type
  88437. } = this.state;
  88438. if (type === types$12.name) {
  88439. name2 = this.state.value;
  88440. } else if (type.keyword) {
  88441. name2 = type.keyword;
  88442. } else {
  88443. throw this.unexpected();
  88444. }
  88445. if (liberal) {
  88446. this.state.type = types$12.name;
  88447. } else {
  88448. this.checkReservedWord(name2, start3, !!type.keyword, false);
  88449. }
  88450. this.next();
  88451. return name2;
  88452. }
  88453. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  88454. if (word.length > 10) {
  88455. return;
  88456. }
  88457. if (!canBeReservedWord(word)) {
  88458. return;
  88459. }
  88460. if (word === "yield") {
  88461. if (this.prodParam.hasYield) {
  88462. this.raise(startLoc, ErrorMessages.YieldBindingIdentifier);
  88463. return;
  88464. }
  88465. } else if (word === "await") {
  88466. if (this.prodParam.hasAwait) {
  88467. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier);
  88468. return;
  88469. } else if (this.scope.inStaticBlock) {
  88470. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifierInStaticBlock);
  88471. return;
  88472. } else {
  88473. this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier);
  88474. }
  88475. } else if (word === "arguments") {
  88476. if (this.scope.inClassAndNotInNonArrowFunction) {
  88477. this.raise(startLoc, ErrorMessages.ArgumentsInClass);
  88478. return;
  88479. }
  88480. }
  88481. if (checkKeywords && isKeyword(word)) {
  88482. this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word);
  88483. return;
  88484. }
  88485. const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  88486. if (reservedTest(word, this.inModule)) {
  88487. this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word);
  88488. }
  88489. }
  88490. isAwaitAllowed() {
  88491. if (this.prodParam.hasAwait)
  88492. return true;
  88493. if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
  88494. return true;
  88495. }
  88496. return false;
  88497. }
  88498. parseAwait(startPos, startLoc) {
  88499. const node = this.startNodeAt(startPos, startLoc);
  88500. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter);
  88501. if (this.eat(types$12.star)) {
  88502. this.raise(node.start, ErrorMessages.ObsoleteAwaitStar);
  88503. }
  88504. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  88505. if (this.isAmbiguousAwait()) {
  88506. this.ambiguousScriptDifferentAst = true;
  88507. } else {
  88508. this.sawUnambiguousESM = true;
  88509. }
  88510. }
  88511. if (!this.state.soloAwait) {
  88512. node.argument = this.parseMaybeUnary(null, true);
  88513. }
  88514. return this.finishNode(node, "AwaitExpression");
  88515. }
  88516. isAmbiguousAwait() {
  88517. return this.hasPrecedingLineBreak() || this.match(types$12.plusMin) || this.match(types$12.parenL) || this.match(types$12.bracketL) || this.match(types$12.backQuote) || this.match(types$12.regexp) || this.match(types$12.slash) || this.hasPlugin("v8intrinsic") && this.match(types$12.modulo);
  88518. }
  88519. parseYield() {
  88520. const node = this.startNode();
  88521. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter);
  88522. this.next();
  88523. let delegating = false;
  88524. let argument = null;
  88525. if (!this.hasPrecedingLineBreak()) {
  88526. delegating = this.eat(types$12.star);
  88527. switch (this.state.type) {
  88528. case types$12.semi:
  88529. case types$12.eof:
  88530. case types$12.braceR:
  88531. case types$12.parenR:
  88532. case types$12.bracketR:
  88533. case types$12.braceBarR:
  88534. case types$12.colon:
  88535. case types$12.comma:
  88536. if (!delegating)
  88537. break;
  88538. default:
  88539. argument = this.parseMaybeAssign();
  88540. }
  88541. }
  88542. node.delegate = delegating;
  88543. node.argument = argument;
  88544. return this.finishNode(node, "YieldExpression");
  88545. }
  88546. checkPipelineAtInfixOperator(left, leftStartPos) {
  88547. if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  88548. if (left.type === "SequenceExpression") {
  88549. this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression);
  88550. }
  88551. }
  88552. }
  88553. parseSmartPipelineBody(childExpression, startPos, startLoc) {
  88554. this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);
  88555. return this.parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc);
  88556. }
  88557. checkSmartPipelineBodyEarlyErrors(childExpression, startPos) {
  88558. if (this.match(types$12.arrow)) {
  88559. throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow);
  88560. } else if (childExpression.type === "SequenceExpression") {
  88561. this.raise(startPos, ErrorMessages.PipelineBodySequenceExpression);
  88562. }
  88563. }
  88564. parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc) {
  88565. const bodyNode = this.startNodeAt(startPos, startLoc);
  88566. const isSimpleReference = this.isSimpleReference(childExpression);
  88567. if (isSimpleReference) {
  88568. bodyNode.callee = childExpression;
  88569. } else {
  88570. if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
  88571. this.raise(startPos, ErrorMessages.PipelineTopicUnused);
  88572. }
  88573. bodyNode.expression = childExpression;
  88574. }
  88575. return this.finishNode(bodyNode, isSimpleReference ? "PipelineBareFunction" : "PipelineTopicExpression");
  88576. }
  88577. isSimpleReference(expression) {
  88578. switch (expression.type) {
  88579. case "MemberExpression":
  88580. return !expression.computed && this.isSimpleReference(expression.object);
  88581. case "Identifier":
  88582. return true;
  88583. default:
  88584. return false;
  88585. }
  88586. }
  88587. withTopicPermittingContext(callback) {
  88588. const outerContextTopicState = this.state.topicContext;
  88589. this.state.topicContext = {
  88590. maxNumOfResolvableTopics: 1,
  88591. maxTopicIndex: null
  88592. };
  88593. try {
  88594. return callback();
  88595. } finally {
  88596. this.state.topicContext = outerContextTopicState;
  88597. }
  88598. }
  88599. withTopicForbiddingContext(callback) {
  88600. const outerContextTopicState = this.state.topicContext;
  88601. this.state.topicContext = {
  88602. maxNumOfResolvableTopics: 0,
  88603. maxTopicIndex: null
  88604. };
  88605. try {
  88606. return callback();
  88607. } finally {
  88608. this.state.topicContext = outerContextTopicState;
  88609. }
  88610. }
  88611. withSoloAwaitPermittingContext(callback) {
  88612. const outerContextSoloAwaitState = this.state.soloAwait;
  88613. this.state.soloAwait = true;
  88614. try {
  88615. return callback();
  88616. } finally {
  88617. this.state.soloAwait = outerContextSoloAwaitState;
  88618. }
  88619. }
  88620. allowInAnd(callback) {
  88621. const flags = this.prodParam.currentFlags();
  88622. const prodParamToSet = PARAM_IN & ~flags;
  88623. if (prodParamToSet) {
  88624. this.prodParam.enter(flags | PARAM_IN);
  88625. try {
  88626. return callback();
  88627. } finally {
  88628. this.prodParam.exit();
  88629. }
  88630. }
  88631. return callback();
  88632. }
  88633. disallowInAnd(callback) {
  88634. const flags = this.prodParam.currentFlags();
  88635. const prodParamToClear = PARAM_IN & flags;
  88636. if (prodParamToClear) {
  88637. this.prodParam.enter(flags & ~PARAM_IN);
  88638. try {
  88639. return callback();
  88640. } finally {
  88641. this.prodParam.exit();
  88642. }
  88643. }
  88644. return callback();
  88645. }
  88646. registerTopicReference() {
  88647. this.state.topicContext.maxTopicIndex = 0;
  88648. }
  88649. primaryTopicReferenceIsAllowedInCurrentTopicContext() {
  88650. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  88651. }
  88652. topicReferenceWasUsedInCurrentTopicContext() {
  88653. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  88654. }
  88655. parseFSharpPipelineBody(prec) {
  88656. const startPos = this.state.start;
  88657. const startLoc = this.state.startLoc;
  88658. this.state.potentialArrowAt = this.state.start;
  88659. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  88660. this.state.inFSharpPipelineDirectBody = true;
  88661. const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec);
  88662. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  88663. return ret;
  88664. }
  88665. parseModuleExpression() {
  88666. this.expectPlugin("moduleBlocks");
  88667. const node = this.startNode();
  88668. this.next();
  88669. this.eat(types$12.braceL);
  88670. const revertScopes = this.initializeScopes(true);
  88671. this.enterInitialScopes();
  88672. const program = this.startNode();
  88673. try {
  88674. node.body = this.parseProgram(program, types$12.braceR, "module");
  88675. } finally {
  88676. revertScopes();
  88677. }
  88678. this.eat(types$12.braceR);
  88679. return this.finishNode(node, "ModuleExpression");
  88680. }
  88681. };
  88682. var loopLabel2 = {
  88683. kind: "loop"
  88684. };
  88685. var switchLabel2 = {
  88686. kind: "switch"
  88687. };
  88688. var FUNC_NO_FLAGS = 0;
  88689. var FUNC_STATEMENT2 = 1;
  88690. var FUNC_HANGING_STATEMENT2 = 2;
  88691. var FUNC_NULLABLE_ID2 = 4;
  88692. var loneSurrogate2 = /[\uD800-\uDFFF]/u;
  88693. var keywordRelationalOperator2 = /in(?:stanceof)?/y;
  88694. function babel7CompatTokens(tokens) {
  88695. {
  88696. for (let i = 0; i < tokens.length; i++) {
  88697. const token = tokens[i];
  88698. if (token.type === types$12.privateName) {
  88699. const {
  88700. loc,
  88701. start: start3,
  88702. value,
  88703. end
  88704. } = token;
  88705. const hashEndPos = start3 + 1;
  88706. const hashEndLoc = new Position3(loc.start.line, loc.start.column + 1);
  88707. tokens.splice(i, 1, new Token3({
  88708. type: types$12.hash,
  88709. value: "#",
  88710. start: start3,
  88711. end: hashEndPos,
  88712. startLoc: loc.start,
  88713. endLoc: hashEndLoc
  88714. }), new Token3({
  88715. type: types$12.name,
  88716. value,
  88717. start: hashEndPos,
  88718. end,
  88719. startLoc: hashEndLoc,
  88720. endLoc: loc.end
  88721. }));
  88722. }
  88723. }
  88724. }
  88725. return tokens;
  88726. }
  88727. var StatementParser = class extends ExpressionParser {
  88728. parseTopLevel(file, program) {
  88729. file.program = this.parseProgram(program);
  88730. file.comments = this.state.comments;
  88731. if (this.options.tokens)
  88732. file.tokens = babel7CompatTokens(this.tokens);
  88733. return this.finishNode(file, "File");
  88734. }
  88735. parseProgram(program, end = types$12.eof, sourceType = this.options.sourceType) {
  88736. program.sourceType = sourceType;
  88737. program.interpreter = this.parseInterpreterDirective();
  88738. this.parseBlockBody(program, true, true, end);
  88739. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  88740. for (const [name2] of Array.from(this.scope.undefinedExports)) {
  88741. const pos = this.scope.undefinedExports.get(name2);
  88742. this.raise(pos, ErrorMessages.ModuleExportUndefined, name2);
  88743. }
  88744. }
  88745. return this.finishNode(program, "Program");
  88746. }
  88747. stmtToDirective(stmt) {
  88748. const directive = stmt;
  88749. directive.type = "Directive";
  88750. directive.value = directive.expression;
  88751. delete directive.expression;
  88752. const directiveLiteral = directive.value;
  88753. const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end);
  88754. const val = directiveLiteral.value = raw.slice(1, -1);
  88755. this.addExtra(directiveLiteral, "raw", raw);
  88756. this.addExtra(directiveLiteral, "rawValue", val);
  88757. directiveLiteral.type = "DirectiveLiteral";
  88758. return directive;
  88759. }
  88760. parseInterpreterDirective() {
  88761. if (!this.match(types$12.interpreterDirective)) {
  88762. return null;
  88763. }
  88764. const node = this.startNode();
  88765. node.value = this.state.value;
  88766. this.next();
  88767. return this.finishNode(node, "InterpreterDirective");
  88768. }
  88769. isLet(context) {
  88770. if (!this.isContextual("let")) {
  88771. return false;
  88772. }
  88773. return this.isLetKeyword(context);
  88774. }
  88775. isLetKeyword(context) {
  88776. const next = this.nextTokenStart();
  88777. const nextCh = this.codePointAtPos(next);
  88778. if (nextCh === 92 || nextCh === 91) {
  88779. return true;
  88780. }
  88781. if (context)
  88782. return false;
  88783. if (nextCh === 123)
  88784. return true;
  88785. if (isIdentifierStart2(nextCh)) {
  88786. keywordRelationalOperator2.lastIndex = next;
  88787. const matched = keywordRelationalOperator2.exec(this.input);
  88788. if (matched !== null) {
  88789. const endCh = this.codePointAtPos(next + matched[0].length);
  88790. if (!isIdentifierChar2(endCh) && endCh !== 92) {
  88791. return false;
  88792. }
  88793. }
  88794. return true;
  88795. }
  88796. return false;
  88797. }
  88798. parseStatement(context, topLevel) {
  88799. if (this.match(types$12.at)) {
  88800. this.parseDecorators(true);
  88801. }
  88802. return this.parseStatementContent(context, topLevel);
  88803. }
  88804. parseStatementContent(context, topLevel) {
  88805. let starttype = this.state.type;
  88806. const node = this.startNode();
  88807. let kind;
  88808. if (this.isLet(context)) {
  88809. starttype = types$12._var;
  88810. kind = "let";
  88811. }
  88812. switch (starttype) {
  88813. case types$12._break:
  88814. case types$12._continue:
  88815. return this.parseBreakContinueStatement(node, starttype.keyword);
  88816. case types$12._debugger:
  88817. return this.parseDebuggerStatement(node);
  88818. case types$12._do:
  88819. return this.parseDoStatement(node);
  88820. case types$12._for:
  88821. return this.parseForStatement(node);
  88822. case types$12._function:
  88823. if (this.lookaheadCharCode() === 46)
  88824. break;
  88825. if (context) {
  88826. if (this.state.strict) {
  88827. this.raise(this.state.start, ErrorMessages.StrictFunction);
  88828. } else if (context !== "if" && context !== "label") {
  88829. this.raise(this.state.start, ErrorMessages.SloppyFunction);
  88830. }
  88831. }
  88832. return this.parseFunctionStatement(node, false, !context);
  88833. case types$12._class:
  88834. if (context)
  88835. this.unexpected();
  88836. return this.parseClass(node, true);
  88837. case types$12._if:
  88838. return this.parseIfStatement(node);
  88839. case types$12._return:
  88840. return this.parseReturnStatement(node);
  88841. case types$12._switch:
  88842. return this.parseSwitchStatement(node);
  88843. case types$12._throw:
  88844. return this.parseThrowStatement(node);
  88845. case types$12._try:
  88846. return this.parseTryStatement(node);
  88847. case types$12._const:
  88848. case types$12._var:
  88849. kind = kind || this.state.value;
  88850. if (context && kind !== "var") {
  88851. this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration);
  88852. }
  88853. return this.parseVarStatement(node, kind);
  88854. case types$12._while:
  88855. return this.parseWhileStatement(node);
  88856. case types$12._with:
  88857. return this.parseWithStatement(node);
  88858. case types$12.braceL:
  88859. return this.parseBlock();
  88860. case types$12.semi:
  88861. return this.parseEmptyStatement(node);
  88862. case types$12._import: {
  88863. const nextTokenCharCode = this.lookaheadCharCode();
  88864. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  88865. break;
  88866. }
  88867. }
  88868. case types$12._export: {
  88869. if (!this.options.allowImportExportEverywhere && !topLevel) {
  88870. this.raise(this.state.start, ErrorMessages.UnexpectedImportExport);
  88871. }
  88872. this.next();
  88873. let result;
  88874. if (starttype === types$12._import) {
  88875. result = this.parseImport(node);
  88876. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  88877. this.sawUnambiguousESM = true;
  88878. }
  88879. } else {
  88880. result = this.parseExport(node);
  88881. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  88882. this.sawUnambiguousESM = true;
  88883. }
  88884. }
  88885. this.assertModuleNodeAllowed(node);
  88886. return result;
  88887. }
  88888. default: {
  88889. if (this.isAsyncFunction()) {
  88890. if (context) {
  88891. this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext);
  88892. }
  88893. this.next();
  88894. return this.parseFunctionStatement(node, true, !context);
  88895. }
  88896. }
  88897. }
  88898. const maybeName = this.state.value;
  88899. const expr = this.parseExpression();
  88900. if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) {
  88901. return this.parseLabeledStatement(node, maybeName, expr, context);
  88902. } else {
  88903. return this.parseExpressionStatement(node, expr);
  88904. }
  88905. }
  88906. assertModuleNodeAllowed(node) {
  88907. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  88908. this.raise(node.start, SourceTypeModuleErrorMessages.ImportOutsideModule);
  88909. }
  88910. }
  88911. takeDecorators(node) {
  88912. const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  88913. if (decorators.length) {
  88914. node.decorators = decorators;
  88915. this.resetStartLocationFromNode(node, decorators[0]);
  88916. this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
  88917. }
  88918. }
  88919. canHaveLeadingDecorator() {
  88920. return this.match(types$12._class);
  88921. }
  88922. parseDecorators(allowExport) {
  88923. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  88924. while (this.match(types$12.at)) {
  88925. const decorator = this.parseDecorator();
  88926. currentContextDecorators.push(decorator);
  88927. }
  88928. if (this.match(types$12._export)) {
  88929. if (!allowExport) {
  88930. this.unexpected();
  88931. }
  88932. if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  88933. this.raise(this.state.start, ErrorMessages.DecoratorExportClass);
  88934. }
  88935. } else if (!this.canHaveLeadingDecorator()) {
  88936. throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator);
  88937. }
  88938. }
  88939. parseDecorator() {
  88940. this.expectOnePlugin(["decorators-legacy", "decorators"]);
  88941. const node = this.startNode();
  88942. this.next();
  88943. if (this.hasPlugin("decorators")) {
  88944. this.state.decoratorStack.push([]);
  88945. const startPos = this.state.start;
  88946. const startLoc = this.state.startLoc;
  88947. let expr;
  88948. if (this.eat(types$12.parenL)) {
  88949. expr = this.parseExpression();
  88950. this.expect(types$12.parenR);
  88951. } else {
  88952. expr = this.parseIdentifier(false);
  88953. while (this.eat(types$12.dot)) {
  88954. const node2 = this.startNodeAt(startPos, startLoc);
  88955. node2.object = expr;
  88956. node2.property = this.parseIdentifier(true);
  88957. node2.computed = false;
  88958. expr = this.finishNode(node2, "MemberExpression");
  88959. }
  88960. }
  88961. node.expression = this.parseMaybeDecoratorArguments(expr);
  88962. this.state.decoratorStack.pop();
  88963. } else {
  88964. node.expression = this.parseExprSubscripts();
  88965. }
  88966. return this.finishNode(node, "Decorator");
  88967. }
  88968. parseMaybeDecoratorArguments(expr) {
  88969. if (this.eat(types$12.parenL)) {
  88970. const node = this.startNodeAtNode(expr);
  88971. node.callee = expr;
  88972. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  88973. this.toReferencedList(node.arguments);
  88974. return this.finishNode(node, "CallExpression");
  88975. }
  88976. return expr;
  88977. }
  88978. parseBreakContinueStatement(node, keyword) {
  88979. const isBreak = keyword === "break";
  88980. this.next();
  88981. if (this.isLineTerminator()) {
  88982. node.label = null;
  88983. } else {
  88984. node.label = this.parseIdentifier();
  88985. this.semicolon();
  88986. }
  88987. this.verifyBreakContinue(node, keyword);
  88988. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  88989. }
  88990. verifyBreakContinue(node, keyword) {
  88991. const isBreak = keyword === "break";
  88992. let i;
  88993. for (i = 0; i < this.state.labels.length; ++i) {
  88994. const lab = this.state.labels[i];
  88995. if (node.label == null || lab.name === node.label.name) {
  88996. if (lab.kind != null && (isBreak || lab.kind === "loop"))
  88997. break;
  88998. if (node.label && isBreak)
  88999. break;
  89000. }
  89001. }
  89002. if (i === this.state.labels.length) {
  89003. this.raise(node.start, ErrorMessages.IllegalBreakContinue, keyword);
  89004. }
  89005. }
  89006. parseDebuggerStatement(node) {
  89007. this.next();
  89008. this.semicolon();
  89009. return this.finishNode(node, "DebuggerStatement");
  89010. }
  89011. parseHeaderExpression() {
  89012. this.expect(types$12.parenL);
  89013. const val = this.parseExpression();
  89014. this.expect(types$12.parenR);
  89015. return val;
  89016. }
  89017. parseDoStatement(node) {
  89018. this.next();
  89019. this.state.labels.push(loopLabel2);
  89020. node.body = this.withTopicForbiddingContext(() => this.parseStatement("do"));
  89021. this.state.labels.pop();
  89022. this.expect(types$12._while);
  89023. node.test = this.parseHeaderExpression();
  89024. this.eat(types$12.semi);
  89025. return this.finishNode(node, "DoWhileStatement");
  89026. }
  89027. parseForStatement(node) {
  89028. this.next();
  89029. this.state.labels.push(loopLabel2);
  89030. let awaitAt = -1;
  89031. if (this.isAwaitAllowed() && this.eatContextual("await")) {
  89032. awaitAt = this.state.lastTokStart;
  89033. }
  89034. this.scope.enter(SCOPE_OTHER);
  89035. this.expect(types$12.parenL);
  89036. if (this.match(types$12.semi)) {
  89037. if (awaitAt > -1) {
  89038. this.unexpected(awaitAt);
  89039. }
  89040. return this.parseFor(node, null);
  89041. }
  89042. const startsWithLet = this.isContextual("let");
  89043. const isLet = startsWithLet && this.isLetKeyword();
  89044. if (this.match(types$12._var) || this.match(types$12._const) || isLet) {
  89045. const init2 = this.startNode();
  89046. const kind = isLet ? "let" : this.state.value;
  89047. this.next();
  89048. this.parseVar(init2, true, kind);
  89049. this.finishNode(init2, "VariableDeclaration");
  89050. if ((this.match(types$12._in) || this.isContextual("of")) && init2.declarations.length === 1) {
  89051. return this.parseForIn(node, init2, awaitAt);
  89052. }
  89053. if (awaitAt > -1) {
  89054. this.unexpected(awaitAt);
  89055. }
  89056. return this.parseFor(node, init2);
  89057. }
  89058. const startsWithUnescapedName = this.match(types$12.name) && !this.state.containsEsc;
  89059. const refExpressionErrors = new ExpressionErrors();
  89060. const init = this.parseExpression(true, refExpressionErrors);
  89061. const isForOf = this.isContextual("of");
  89062. if (isForOf) {
  89063. if (startsWithLet) {
  89064. this.raise(init.start, ErrorMessages.ForOfLet);
  89065. } else if (awaitAt === -1 && startsWithUnescapedName && init.type === "Identifier" && init.name === "async") {
  89066. this.raise(init.start, ErrorMessages.ForOfAsync);
  89067. }
  89068. }
  89069. if (isForOf || this.match(types$12._in)) {
  89070. this.toAssignable(init, true);
  89071. const description = isForOf ? "for-of statement" : "for-in statement";
  89072. this.checkLVal(init, description);
  89073. return this.parseForIn(node, init, awaitAt);
  89074. } else {
  89075. this.checkExpressionErrors(refExpressionErrors, true);
  89076. }
  89077. if (awaitAt > -1) {
  89078. this.unexpected(awaitAt);
  89079. }
  89080. return this.parseFor(node, init);
  89081. }
  89082. parseFunctionStatement(node, isAsync, declarationPosition) {
  89083. this.next();
  89084. return this.parseFunction(node, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), isAsync);
  89085. }
  89086. parseIfStatement(node) {
  89087. this.next();
  89088. node.test = this.parseHeaderExpression();
  89089. node.consequent = this.parseStatement("if");
  89090. node.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null;
  89091. return this.finishNode(node, "IfStatement");
  89092. }
  89093. parseReturnStatement(node) {
  89094. if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
  89095. this.raise(this.state.start, ErrorMessages.IllegalReturn);
  89096. }
  89097. this.next();
  89098. if (this.isLineTerminator()) {
  89099. node.argument = null;
  89100. } else {
  89101. node.argument = this.parseExpression();
  89102. this.semicolon();
  89103. }
  89104. return this.finishNode(node, "ReturnStatement");
  89105. }
  89106. parseSwitchStatement(node) {
  89107. this.next();
  89108. node.discriminant = this.parseHeaderExpression();
  89109. const cases = node.cases = [];
  89110. this.expect(types$12.braceL);
  89111. this.state.labels.push(switchLabel2);
  89112. this.scope.enter(SCOPE_OTHER);
  89113. let cur;
  89114. for (let sawDefault; !this.match(types$12.braceR); ) {
  89115. if (this.match(types$12._case) || this.match(types$12._default)) {
  89116. const isCase = this.match(types$12._case);
  89117. if (cur)
  89118. this.finishNode(cur, "SwitchCase");
  89119. cases.push(cur = this.startNode());
  89120. cur.consequent = [];
  89121. this.next();
  89122. if (isCase) {
  89123. cur.test = this.parseExpression();
  89124. } else {
  89125. if (sawDefault) {
  89126. this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch);
  89127. }
  89128. sawDefault = true;
  89129. cur.test = null;
  89130. }
  89131. this.expect(types$12.colon);
  89132. } else {
  89133. if (cur) {
  89134. cur.consequent.push(this.parseStatement(null));
  89135. } else {
  89136. this.unexpected();
  89137. }
  89138. }
  89139. }
  89140. this.scope.exit();
  89141. if (cur)
  89142. this.finishNode(cur, "SwitchCase");
  89143. this.next();
  89144. this.state.labels.pop();
  89145. return this.finishNode(node, "SwitchStatement");
  89146. }
  89147. parseThrowStatement(node) {
  89148. this.next();
  89149. if (this.hasPrecedingLineBreak()) {
  89150. this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow);
  89151. }
  89152. node.argument = this.parseExpression();
  89153. this.semicolon();
  89154. return this.finishNode(node, "ThrowStatement");
  89155. }
  89156. parseCatchClauseParam() {
  89157. const param = this.parseBindingAtom();
  89158. const simple = param.type === "Identifier";
  89159. this.scope.enter(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  89160. this.checkLVal(param, "catch clause", BIND_LEXICAL2);
  89161. return param;
  89162. }
  89163. parseTryStatement(node) {
  89164. this.next();
  89165. node.block = this.parseBlock();
  89166. node.handler = null;
  89167. if (this.match(types$12._catch)) {
  89168. const clause = this.startNode();
  89169. this.next();
  89170. if (this.match(types$12.parenL)) {
  89171. this.expect(types$12.parenL);
  89172. clause.param = this.parseCatchClauseParam();
  89173. this.expect(types$12.parenR);
  89174. } else {
  89175. clause.param = null;
  89176. this.scope.enter(SCOPE_OTHER);
  89177. }
  89178. clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false));
  89179. this.scope.exit();
  89180. node.handler = this.finishNode(clause, "CatchClause");
  89181. }
  89182. node.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null;
  89183. if (!node.handler && !node.finalizer) {
  89184. this.raise(node.start, ErrorMessages.NoCatchOrFinally);
  89185. }
  89186. return this.finishNode(node, "TryStatement");
  89187. }
  89188. parseVarStatement(node, kind) {
  89189. this.next();
  89190. this.parseVar(node, false, kind);
  89191. this.semicolon();
  89192. return this.finishNode(node, "VariableDeclaration");
  89193. }
  89194. parseWhileStatement(node) {
  89195. this.next();
  89196. node.test = this.parseHeaderExpression();
  89197. this.state.labels.push(loopLabel2);
  89198. node.body = this.withTopicForbiddingContext(() => this.parseStatement("while"));
  89199. this.state.labels.pop();
  89200. return this.finishNode(node, "WhileStatement");
  89201. }
  89202. parseWithStatement(node) {
  89203. if (this.state.strict) {
  89204. this.raise(this.state.start, ErrorMessages.StrictWith);
  89205. }
  89206. this.next();
  89207. node.object = this.parseHeaderExpression();
  89208. node.body = this.withTopicForbiddingContext(() => this.parseStatement("with"));
  89209. return this.finishNode(node, "WithStatement");
  89210. }
  89211. parseEmptyStatement(node) {
  89212. this.next();
  89213. return this.finishNode(node, "EmptyStatement");
  89214. }
  89215. parseLabeledStatement(node, maybeName, expr, context) {
  89216. for (const label of this.state.labels) {
  89217. if (label.name === maybeName) {
  89218. this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName);
  89219. }
  89220. }
  89221. const kind = this.state.type.isLoop ? "loop" : this.match(types$12._switch) ? "switch" : null;
  89222. for (let i = this.state.labels.length - 1; i >= 0; i--) {
  89223. const label = this.state.labels[i];
  89224. if (label.statementStart === node.start) {
  89225. label.statementStart = this.state.start;
  89226. label.kind = kind;
  89227. } else {
  89228. break;
  89229. }
  89230. }
  89231. this.state.labels.push({
  89232. name: maybeName,
  89233. kind,
  89234. statementStart: this.state.start
  89235. });
  89236. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  89237. this.state.labels.pop();
  89238. node.label = expr;
  89239. return this.finishNode(node, "LabeledStatement");
  89240. }
  89241. parseExpressionStatement(node, expr) {
  89242. node.expression = expr;
  89243. this.semicolon();
  89244. return this.finishNode(node, "ExpressionStatement");
  89245. }
  89246. parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
  89247. const node = this.startNode();
  89248. if (allowDirectives) {
  89249. this.state.strictErrors.clear();
  89250. }
  89251. this.expect(types$12.braceL);
  89252. if (createNewLexicalScope) {
  89253. this.scope.enter(SCOPE_OTHER);
  89254. }
  89255. this.parseBlockBody(node, allowDirectives, false, types$12.braceR, afterBlockParse);
  89256. if (createNewLexicalScope) {
  89257. this.scope.exit();
  89258. }
  89259. return this.finishNode(node, "BlockStatement");
  89260. }
  89261. isValidDirective(stmt) {
  89262. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  89263. }
  89264. parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
  89265. const body = node.body = [];
  89266. const directives = node.directives = [];
  89267. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : void 0, topLevel, end, afterBlockParse);
  89268. }
  89269. parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
  89270. const oldStrict = this.state.strict;
  89271. let hasStrictModeDirective = false;
  89272. let parsedNonDirective = false;
  89273. while (!this.match(end)) {
  89274. const stmt = this.parseStatement(null, topLevel);
  89275. if (directives && !parsedNonDirective) {
  89276. if (this.isValidDirective(stmt)) {
  89277. const directive = this.stmtToDirective(stmt);
  89278. directives.push(directive);
  89279. if (!hasStrictModeDirective && directive.value.value === "use strict") {
  89280. hasStrictModeDirective = true;
  89281. this.setStrict(true);
  89282. }
  89283. continue;
  89284. }
  89285. parsedNonDirective = true;
  89286. this.state.strictErrors.clear();
  89287. }
  89288. body.push(stmt);
  89289. }
  89290. if (afterBlockParse) {
  89291. afterBlockParse.call(this, hasStrictModeDirective);
  89292. }
  89293. if (!oldStrict) {
  89294. this.setStrict(false);
  89295. }
  89296. this.next();
  89297. }
  89298. parseFor(node, init) {
  89299. node.init = init;
  89300. this.semicolon(false);
  89301. node.test = this.match(types$12.semi) ? null : this.parseExpression();
  89302. this.semicolon(false);
  89303. node.update = this.match(types$12.parenR) ? null : this.parseExpression();
  89304. this.expect(types$12.parenR);
  89305. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  89306. this.scope.exit();
  89307. this.state.labels.pop();
  89308. return this.finishNode(node, "ForStatement");
  89309. }
  89310. parseForIn(node, init, awaitAt) {
  89311. const isForIn = this.match(types$12._in);
  89312. this.next();
  89313. if (isForIn) {
  89314. if (awaitAt > -1)
  89315. this.unexpected(awaitAt);
  89316. } else {
  89317. node.await = awaitAt > -1;
  89318. }
  89319. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  89320. this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of");
  89321. } else if (init.type === "AssignmentPattern") {
  89322. this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop");
  89323. }
  89324. node.left = init;
  89325. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
  89326. this.expect(types$12.parenR);
  89327. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  89328. this.scope.exit();
  89329. this.state.labels.pop();
  89330. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  89331. }
  89332. parseVar(node, isFor, kind) {
  89333. const declarations = node.declarations = [];
  89334. const isTypescript = this.hasPlugin("typescript");
  89335. node.kind = kind;
  89336. for (; ; ) {
  89337. const decl = this.startNode();
  89338. this.parseVarId(decl, kind);
  89339. if (this.eat(types$12.eq)) {
  89340. decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
  89341. } else {
  89342. if (kind === "const" && !(this.match(types$12._in) || this.isContextual("of"))) {
  89343. if (!isTypescript) {
  89344. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations");
  89345. }
  89346. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types$12._in) || this.isContextual("of")))) {
  89347. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns");
  89348. }
  89349. decl.init = null;
  89350. }
  89351. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  89352. if (!this.eat(types$12.comma))
  89353. break;
  89354. }
  89355. return node;
  89356. }
  89357. parseVarId(decl, kind) {
  89358. decl.id = this.parseBindingAtom();
  89359. this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, void 0, kind !== "var");
  89360. }
  89361. parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
  89362. const isStatement = statement & FUNC_STATEMENT2;
  89363. const isHangingStatement = statement & FUNC_HANGING_STATEMENT2;
  89364. const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID2);
  89365. this.initFunction(node, isAsync);
  89366. if (this.match(types$12.star) && isHangingStatement) {
  89367. this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext);
  89368. }
  89369. node.generator = this.eat(types$12.star);
  89370. if (isStatement) {
  89371. node.id = this.parseFunctionId(requireId);
  89372. }
  89373. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  89374. this.state.maybeInArrowParameters = false;
  89375. this.scope.enter(SCOPE_FUNCTION2);
  89376. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  89377. if (!isStatement) {
  89378. node.id = this.parseFunctionId();
  89379. }
  89380. this.parseFunctionParams(node, false);
  89381. this.withTopicForbiddingContext(() => {
  89382. this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  89383. });
  89384. this.prodParam.exit();
  89385. this.scope.exit();
  89386. if (isStatement && !isHangingStatement) {
  89387. this.registerFunctionStatementId(node);
  89388. }
  89389. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  89390. return node;
  89391. }
  89392. parseFunctionId(requireId) {
  89393. return requireId || this.match(types$12.name) ? this.parseIdentifier() : null;
  89394. }
  89395. parseFunctionParams(node, allowModifiers) {
  89396. this.expect(types$12.parenL);
  89397. this.expressionScope.enter(newParameterDeclarationScope());
  89398. node.params = this.parseBindingList(types$12.parenR, 41, false, allowModifiers);
  89399. this.expressionScope.exit();
  89400. }
  89401. registerFunctionStatementId(node) {
  89402. if (!node.id)
  89403. return;
  89404. this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2, node.id.start);
  89405. }
  89406. parseClass(node, isStatement, optionalId) {
  89407. this.next();
  89408. this.takeDecorators(node);
  89409. const oldStrict = this.state.strict;
  89410. this.state.strict = true;
  89411. this.parseClassId(node, isStatement, optionalId);
  89412. this.parseClassSuper(node);
  89413. node.body = this.parseClassBody(!!node.superClass, oldStrict);
  89414. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  89415. }
  89416. isClassProperty() {
  89417. return this.match(types$12.eq) || this.match(types$12.semi) || this.match(types$12.braceR);
  89418. }
  89419. isClassMethod() {
  89420. return this.match(types$12.parenL);
  89421. }
  89422. isNonstaticConstructor(method) {
  89423. return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
  89424. }
  89425. parseClassBody(hadSuperClass, oldStrict) {
  89426. this.classScope.enter();
  89427. const state = {
  89428. hadConstructor: false,
  89429. hadSuperClass
  89430. };
  89431. let decorators = [];
  89432. const classBody = this.startNode();
  89433. classBody.body = [];
  89434. this.expect(types$12.braceL);
  89435. this.withTopicForbiddingContext(() => {
  89436. while (!this.match(types$12.braceR)) {
  89437. if (this.eat(types$12.semi)) {
  89438. if (decorators.length > 0) {
  89439. throw this.raise(this.state.lastTokEnd, ErrorMessages.DecoratorSemicolon);
  89440. }
  89441. continue;
  89442. }
  89443. if (this.match(types$12.at)) {
  89444. decorators.push(this.parseDecorator());
  89445. continue;
  89446. }
  89447. const member = this.startNode();
  89448. if (decorators.length) {
  89449. member.decorators = decorators;
  89450. this.resetStartLocationFromNode(member, decorators[0]);
  89451. decorators = [];
  89452. }
  89453. this.parseClassMember(classBody, member, state);
  89454. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  89455. this.raise(member.start, ErrorMessages.DecoratorConstructor);
  89456. }
  89457. }
  89458. });
  89459. this.state.strict = oldStrict;
  89460. this.next();
  89461. if (decorators.length) {
  89462. throw this.raise(this.state.start, ErrorMessages.TrailingDecorator);
  89463. }
  89464. this.classScope.exit();
  89465. return this.finishNode(classBody, "ClassBody");
  89466. }
  89467. parseClassMemberFromModifier(classBody, member) {
  89468. const key = this.parseIdentifier(true);
  89469. if (this.isClassMethod()) {
  89470. const method = member;
  89471. method.kind = "method";
  89472. method.computed = false;
  89473. method.key = key;
  89474. method.static = false;
  89475. this.pushClassMethod(classBody, method, false, false, false, false);
  89476. return true;
  89477. } else if (this.isClassProperty()) {
  89478. const prop = member;
  89479. prop.computed = false;
  89480. prop.key = key;
  89481. prop.static = false;
  89482. classBody.body.push(this.parseClassProperty(prop));
  89483. return true;
  89484. }
  89485. this.resetPreviousNodeTrailingComments(key);
  89486. return false;
  89487. }
  89488. parseClassMember(classBody, member, state) {
  89489. const isStatic = this.isContextual("static");
  89490. if (isStatic) {
  89491. if (this.parseClassMemberFromModifier(classBody, member)) {
  89492. return;
  89493. }
  89494. if (this.eat(types$12.braceL)) {
  89495. this.parseClassStaticBlock(classBody, member);
  89496. return;
  89497. }
  89498. }
  89499. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  89500. }
  89501. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  89502. const publicMethod = member;
  89503. const privateMethod = member;
  89504. const publicProp = member;
  89505. const privateProp = member;
  89506. const method = publicMethod;
  89507. const publicMember = publicMethod;
  89508. member.static = isStatic;
  89509. if (this.eat(types$12.star)) {
  89510. method.kind = "method";
  89511. const isPrivateName = this.match(types$12.privateName);
  89512. this.parseClassElementName(method);
  89513. if (isPrivateName) {
  89514. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  89515. return;
  89516. }
  89517. if (this.isNonstaticConstructor(publicMethod)) {
  89518. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator);
  89519. }
  89520. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  89521. return;
  89522. }
  89523. const isContextual = this.match(types$12.name) && !this.state.containsEsc;
  89524. const isPrivate = this.match(types$12.privateName);
  89525. const key = this.parseClassElementName(member);
  89526. const maybeQuestionTokenStart = this.state.start;
  89527. this.parsePostMemberNameModifiers(publicMember);
  89528. if (this.isClassMethod()) {
  89529. method.kind = "method";
  89530. if (isPrivate) {
  89531. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  89532. return;
  89533. }
  89534. const isConstructor = this.isNonstaticConstructor(publicMethod);
  89535. let allowsDirectSuper = false;
  89536. if (isConstructor) {
  89537. publicMethod.kind = "constructor";
  89538. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  89539. this.raise(key.start, ErrorMessages.DuplicateConstructor);
  89540. }
  89541. if (isConstructor && this.hasPlugin("typescript") && member.override) {
  89542. this.raise(key.start, ErrorMessages.OverrideOnConstructor);
  89543. }
  89544. state.hadConstructor = true;
  89545. allowsDirectSuper = state.hadSuperClass;
  89546. }
  89547. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  89548. } else if (this.isClassProperty()) {
  89549. if (isPrivate) {
  89550. this.pushClassPrivateProperty(classBody, privateProp);
  89551. } else {
  89552. this.pushClassProperty(classBody, publicProp);
  89553. }
  89554. } else if (isContextual && key.name === "async" && !this.isLineTerminator()) {
  89555. this.resetPreviousNodeTrailingComments(key);
  89556. const isGenerator = this.eat(types$12.star);
  89557. if (publicMember.optional) {
  89558. this.unexpected(maybeQuestionTokenStart);
  89559. }
  89560. method.kind = "method";
  89561. const isPrivate2 = this.match(types$12.privateName);
  89562. this.parseClassElementName(method);
  89563. this.parsePostMemberNameModifiers(publicMember);
  89564. if (isPrivate2) {
  89565. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  89566. } else {
  89567. if (this.isNonstaticConstructor(publicMethod)) {
  89568. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync);
  89569. }
  89570. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  89571. }
  89572. } else if (isContextual && (key.name === "get" || key.name === "set") && !(this.match(types$12.star) && this.isLineTerminator())) {
  89573. this.resetPreviousNodeTrailingComments(key);
  89574. method.kind = key.name;
  89575. const isPrivate2 = this.match(types$12.privateName);
  89576. this.parseClassElementName(publicMethod);
  89577. if (isPrivate2) {
  89578. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  89579. } else {
  89580. if (this.isNonstaticConstructor(publicMethod)) {
  89581. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor);
  89582. }
  89583. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  89584. }
  89585. this.checkGetterSetterParams(publicMethod);
  89586. } else if (this.isLineTerminator()) {
  89587. if (isPrivate) {
  89588. this.pushClassPrivateProperty(classBody, privateProp);
  89589. } else {
  89590. this.pushClassProperty(classBody, publicProp);
  89591. }
  89592. } else {
  89593. this.unexpected();
  89594. }
  89595. }
  89596. parseClassElementName(member) {
  89597. const {
  89598. type,
  89599. value,
  89600. start: start3
  89601. } = this.state;
  89602. if ((type === types$12.name || type === types$12.string) && member.static && value === "prototype") {
  89603. this.raise(start3, ErrorMessages.StaticPrototype);
  89604. }
  89605. if (type === types$12.privateName && value === "constructor") {
  89606. this.raise(start3, ErrorMessages.ConstructorClassPrivateField);
  89607. }
  89608. return this.parsePropertyName(member, true);
  89609. }
  89610. parseClassStaticBlock(classBody, member) {
  89611. var _member$decorators;
  89612. this.expectPlugin("classStaticBlock", member.start);
  89613. this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER2);
  89614. const oldLabels = this.state.labels;
  89615. this.state.labels = [];
  89616. this.prodParam.enter(PARAM);
  89617. const body = member.body = [];
  89618. this.parseBlockOrModuleBlockBody(body, void 0, false, types$12.braceR);
  89619. this.prodParam.exit();
  89620. this.scope.exit();
  89621. this.state.labels = oldLabels;
  89622. classBody.body.push(this.finishNode(member, "StaticBlock"));
  89623. if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
  89624. this.raise(member.start, ErrorMessages.DecoratorStaticBlock);
  89625. }
  89626. }
  89627. pushClassProperty(classBody, prop) {
  89628. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  89629. this.raise(prop.key.start, ErrorMessages.ConstructorClassField);
  89630. }
  89631. classBody.body.push(this.parseClassProperty(prop));
  89632. }
  89633. pushClassPrivateProperty(classBody, prop) {
  89634. const node = this.parseClassPrivateProperty(prop);
  89635. classBody.body.push(node);
  89636. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.start);
  89637. }
  89638. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  89639. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  89640. }
  89641. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  89642. const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  89643. classBody.body.push(node);
  89644. const 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;
  89645. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.start);
  89646. }
  89647. parsePostMemberNameModifiers(methodOrProp) {
  89648. }
  89649. parseClassPrivateProperty(node) {
  89650. this.parseInitializer(node);
  89651. this.semicolon();
  89652. return this.finishNode(node, "ClassPrivateProperty");
  89653. }
  89654. parseClassProperty(node) {
  89655. this.parseInitializer(node);
  89656. this.semicolon();
  89657. return this.finishNode(node, "ClassProperty");
  89658. }
  89659. parseInitializer(node) {
  89660. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER2);
  89661. this.expressionScope.enter(newExpressionScope());
  89662. this.prodParam.enter(PARAM);
  89663. node.value = this.eat(types$12.eq) ? this.parseMaybeAssignAllowIn() : null;
  89664. this.expressionScope.exit();
  89665. this.prodParam.exit();
  89666. this.scope.exit();
  89667. }
  89668. parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) {
  89669. if (this.match(types$12.name)) {
  89670. node.id = this.parseIdentifier();
  89671. if (isStatement) {
  89672. this.checkLVal(node.id, "class name", bindingType);
  89673. }
  89674. } else {
  89675. if (optionalId || !isStatement) {
  89676. node.id = null;
  89677. } else {
  89678. this.unexpected(null, ErrorMessages.MissingClassName);
  89679. }
  89680. }
  89681. }
  89682. parseClassSuper(node) {
  89683. node.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts() : null;
  89684. }
  89685. parseExport(node) {
  89686. const hasDefault = this.maybeParseExportDefaultSpecifier(node);
  89687. const parseAfterDefault = !hasDefault || this.eat(types$12.comma);
  89688. const hasStar = parseAfterDefault && this.eatExportStar(node);
  89689. const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
  89690. const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types$12.comma));
  89691. const isFromRequired = hasDefault || hasStar;
  89692. if (hasStar && !hasNamespace) {
  89693. if (hasDefault)
  89694. this.unexpected();
  89695. this.parseExportFrom(node, true);
  89696. return this.finishNode(node, "ExportAllDeclaration");
  89697. }
  89698. const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
  89699. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
  89700. throw this.unexpected(null, types$12.braceL);
  89701. }
  89702. let hasDeclaration;
  89703. if (isFromRequired || hasSpecifiers) {
  89704. hasDeclaration = false;
  89705. this.parseExportFrom(node, isFromRequired);
  89706. } else {
  89707. hasDeclaration = this.maybeParseExportDeclaration(node);
  89708. }
  89709. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  89710. this.checkExport(node, true, false, !!node.source);
  89711. return this.finishNode(node, "ExportNamedDeclaration");
  89712. }
  89713. if (this.eat(types$12._default)) {
  89714. node.declaration = this.parseExportDefaultExpression();
  89715. this.checkExport(node, true, true);
  89716. return this.finishNode(node, "ExportDefaultDeclaration");
  89717. }
  89718. throw this.unexpected(null, types$12.braceL);
  89719. }
  89720. eatExportStar(node) {
  89721. return this.eat(types$12.star);
  89722. }
  89723. maybeParseExportDefaultSpecifier(node) {
  89724. if (this.isExportDefaultSpecifier()) {
  89725. this.expectPlugin("exportDefaultFrom");
  89726. const specifier = this.startNode();
  89727. specifier.exported = this.parseIdentifier(true);
  89728. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  89729. return true;
  89730. }
  89731. return false;
  89732. }
  89733. maybeParseExportNamespaceSpecifier(node) {
  89734. if (this.isContextual("as")) {
  89735. if (!node.specifiers)
  89736. node.specifiers = [];
  89737. const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
  89738. this.next();
  89739. specifier.exported = this.parseModuleExportName();
  89740. node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  89741. return true;
  89742. }
  89743. return false;
  89744. }
  89745. maybeParseExportNamedSpecifiers(node) {
  89746. if (this.match(types$12.braceL)) {
  89747. if (!node.specifiers)
  89748. node.specifiers = [];
  89749. node.specifiers.push(...this.parseExportSpecifiers());
  89750. node.source = null;
  89751. node.declaration = null;
  89752. return true;
  89753. }
  89754. return false;
  89755. }
  89756. maybeParseExportDeclaration(node) {
  89757. if (this.shouldParseExportDeclaration()) {
  89758. node.specifiers = [];
  89759. node.source = null;
  89760. node.declaration = this.parseExportDeclaration(node);
  89761. return true;
  89762. }
  89763. return false;
  89764. }
  89765. isAsyncFunction() {
  89766. if (!this.isContextual("async"))
  89767. return false;
  89768. const next = this.nextTokenStart();
  89769. return !lineBreak2.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  89770. }
  89771. parseExportDefaultExpression() {
  89772. const expr = this.startNode();
  89773. const isAsync = this.isAsyncFunction();
  89774. if (this.match(types$12._function) || isAsync) {
  89775. this.next();
  89776. if (isAsync) {
  89777. this.next();
  89778. }
  89779. return this.parseFunction(expr, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, isAsync);
  89780. } else if (this.match(types$12._class)) {
  89781. return this.parseClass(expr, true, true);
  89782. } else if (this.match(types$12.at)) {
  89783. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  89784. this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport);
  89785. }
  89786. this.parseDecorators(false);
  89787. return this.parseClass(expr, true, true);
  89788. } else if (this.match(types$12._const) || this.match(types$12._var) || this.isLet()) {
  89789. throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport);
  89790. } else {
  89791. const res = this.parseMaybeAssignAllowIn();
  89792. this.semicolon();
  89793. return res;
  89794. }
  89795. }
  89796. parseExportDeclaration(node) {
  89797. return this.parseStatement(null);
  89798. }
  89799. isExportDefaultSpecifier() {
  89800. if (this.match(types$12.name)) {
  89801. const value = this.state.value;
  89802. if (value === "async" && !this.state.containsEsc || value === "let") {
  89803. return false;
  89804. }
  89805. if ((value === "type" || value === "interface") && !this.state.containsEsc) {
  89806. const l = this.lookahead();
  89807. if (l.type === types$12.name && l.value !== "from" || l.type === types$12.braceL) {
  89808. this.expectOnePlugin(["flow", "typescript"]);
  89809. return false;
  89810. }
  89811. }
  89812. } else if (!this.match(types$12._default)) {
  89813. return false;
  89814. }
  89815. const next = this.nextTokenStart();
  89816. const hasFrom = this.isUnparsedContextual(next, "from");
  89817. if (this.input.charCodeAt(next) === 44 || this.match(types$12.name) && hasFrom) {
  89818. return true;
  89819. }
  89820. if (this.match(types$12._default) && hasFrom) {
  89821. const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
  89822. return nextAfterFrom === 34 || nextAfterFrom === 39;
  89823. }
  89824. return false;
  89825. }
  89826. parseExportFrom(node, expect) {
  89827. if (this.eatContextual("from")) {
  89828. node.source = this.parseImportSource();
  89829. this.checkExport(node);
  89830. const assertions = this.maybeParseImportAssertions();
  89831. if (assertions) {
  89832. node.assertions = assertions;
  89833. }
  89834. } else {
  89835. if (expect) {
  89836. this.unexpected();
  89837. } else {
  89838. node.source = null;
  89839. }
  89840. }
  89841. this.semicolon();
  89842. }
  89843. shouldParseExportDeclaration() {
  89844. if (this.match(types$12.at)) {
  89845. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  89846. if (this.hasPlugin("decorators")) {
  89847. if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  89848. this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport);
  89849. } else {
  89850. return true;
  89851. }
  89852. }
  89853. }
  89854. 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();
  89855. }
  89856. checkExport(node, checkNames, isDefault, isFrom) {
  89857. if (checkNames) {
  89858. if (isDefault) {
  89859. this.checkDuplicateExports(node, "default");
  89860. if (this.hasPlugin("exportDefaultFrom")) {
  89861. var _declaration$extra;
  89862. const declaration = node.declaration;
  89863. if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
  89864. this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier);
  89865. }
  89866. }
  89867. } else if (node.specifiers && node.specifiers.length) {
  89868. for (const specifier of node.specifiers) {
  89869. const {
  89870. exported
  89871. } = specifier;
  89872. const exportedName = exported.type === "Identifier" ? exported.name : exported.value;
  89873. this.checkDuplicateExports(specifier, exportedName);
  89874. if (!isFrom && specifier.local) {
  89875. const {
  89876. local
  89877. } = specifier;
  89878. if (local.type !== "Identifier") {
  89879. this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.value, exportedName);
  89880. } else {
  89881. this.checkReservedWord(local.name, local.start, true, false);
  89882. this.scope.checkLocalExport(local);
  89883. }
  89884. }
  89885. }
  89886. } else if (node.declaration) {
  89887. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  89888. const id = node.declaration.id;
  89889. if (!id)
  89890. throw new Error("Assertion failure");
  89891. this.checkDuplicateExports(node, id.name);
  89892. } else if (node.declaration.type === "VariableDeclaration") {
  89893. for (const declaration of node.declaration.declarations) {
  89894. this.checkDeclaration(declaration.id);
  89895. }
  89896. }
  89897. }
  89898. }
  89899. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  89900. if (currentContextDecorators.length) {
  89901. throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport);
  89902. }
  89903. }
  89904. checkDeclaration(node) {
  89905. if (node.type === "Identifier") {
  89906. this.checkDuplicateExports(node, node.name);
  89907. } else if (node.type === "ObjectPattern") {
  89908. for (const prop of node.properties) {
  89909. this.checkDeclaration(prop);
  89910. }
  89911. } else if (node.type === "ArrayPattern") {
  89912. for (const elem of node.elements) {
  89913. if (elem) {
  89914. this.checkDeclaration(elem);
  89915. }
  89916. }
  89917. } else if (node.type === "ObjectProperty") {
  89918. this.checkDeclaration(node.value);
  89919. } else if (node.type === "RestElement") {
  89920. this.checkDeclaration(node.argument);
  89921. } else if (node.type === "AssignmentPattern") {
  89922. this.checkDeclaration(node.left);
  89923. }
  89924. }
  89925. checkDuplicateExports(node, name2) {
  89926. if (this.exportedIdentifiers.has(name2)) {
  89927. this.raise(node.start, name2 === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name2);
  89928. }
  89929. this.exportedIdentifiers.add(name2);
  89930. }
  89931. parseExportSpecifiers() {
  89932. const nodes = [];
  89933. let first = true;
  89934. this.expect(types$12.braceL);
  89935. while (!this.eat(types$12.braceR)) {
  89936. if (first) {
  89937. first = false;
  89938. } else {
  89939. this.expect(types$12.comma);
  89940. if (this.eat(types$12.braceR))
  89941. break;
  89942. }
  89943. const node = this.startNode();
  89944. node.local = this.parseModuleExportName();
  89945. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local.__clone();
  89946. nodes.push(this.finishNode(node, "ExportSpecifier"));
  89947. }
  89948. return nodes;
  89949. }
  89950. parseModuleExportName() {
  89951. if (this.match(types$12.string)) {
  89952. const result = this.parseStringLiteral(this.state.value);
  89953. const surrogate = result.value.match(loneSurrogate2);
  89954. if (surrogate) {
  89955. this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16));
  89956. }
  89957. return result;
  89958. }
  89959. return this.parseIdentifier(true);
  89960. }
  89961. parseImport(node) {
  89962. node.specifiers = [];
  89963. if (!this.match(types$12.string)) {
  89964. const hasDefault = this.maybeParseDefaultImportSpecifier(node);
  89965. const parseNext = !hasDefault || this.eat(types$12.comma);
  89966. const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
  89967. if (parseNext && !hasStar)
  89968. this.parseNamedImportSpecifiers(node);
  89969. this.expectContextual("from");
  89970. }
  89971. node.source = this.parseImportSource();
  89972. const assertions = this.maybeParseImportAssertions();
  89973. if (assertions) {
  89974. node.assertions = assertions;
  89975. } else {
  89976. const attributes = this.maybeParseModuleAttributes();
  89977. if (attributes) {
  89978. node.attributes = attributes;
  89979. }
  89980. }
  89981. this.semicolon();
  89982. return this.finishNode(node, "ImportDeclaration");
  89983. }
  89984. parseImportSource() {
  89985. if (!this.match(types$12.string))
  89986. this.unexpected();
  89987. return this.parseExprAtom();
  89988. }
  89989. shouldParseDefaultImport(node) {
  89990. return this.match(types$12.name);
  89991. }
  89992. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  89993. specifier.local = this.parseIdentifier();
  89994. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  89995. node.specifiers.push(this.finishNode(specifier, type));
  89996. }
  89997. parseAssertEntries() {
  89998. const attrs = [];
  89999. const attrNames = /* @__PURE__ */ new Set();
  90000. do {
  90001. if (this.match(types$12.braceR)) {
  90002. break;
  90003. }
  90004. const node = this.startNode();
  90005. const keyName = this.state.value;
  90006. if (attrNames.has(keyName)) {
  90007. this.raise(this.state.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName);
  90008. }
  90009. attrNames.add(keyName);
  90010. if (this.match(types$12.string)) {
  90011. node.key = this.parseStringLiteral(keyName);
  90012. } else {
  90013. node.key = this.parseIdentifier(true);
  90014. }
  90015. this.expect(types$12.colon);
  90016. if (!this.match(types$12.string)) {
  90017. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  90018. }
  90019. node.value = this.parseStringLiteral(this.state.value);
  90020. this.finishNode(node, "ImportAttribute");
  90021. attrs.push(node);
  90022. } while (this.eat(types$12.comma));
  90023. return attrs;
  90024. }
  90025. maybeParseModuleAttributes() {
  90026. if (this.match(types$12._with) && !this.hasPrecedingLineBreak()) {
  90027. this.expectPlugin("moduleAttributes");
  90028. this.next();
  90029. } else {
  90030. if (this.hasPlugin("moduleAttributes"))
  90031. return [];
  90032. return null;
  90033. }
  90034. const attrs = [];
  90035. const attributes = /* @__PURE__ */ new Set();
  90036. do {
  90037. const node = this.startNode();
  90038. node.key = this.parseIdentifier(true);
  90039. if (node.key.name !== "type") {
  90040. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name);
  90041. }
  90042. if (attributes.has(node.key.name)) {
  90043. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name);
  90044. }
  90045. attributes.add(node.key.name);
  90046. this.expect(types$12.colon);
  90047. if (!this.match(types$12.string)) {
  90048. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  90049. }
  90050. node.value = this.parseStringLiteral(this.state.value);
  90051. this.finishNode(node, "ImportAttribute");
  90052. attrs.push(node);
  90053. } while (this.eat(types$12.comma));
  90054. return attrs;
  90055. }
  90056. maybeParseImportAssertions() {
  90057. if (this.isContextual("assert") && !this.hasPrecedingLineBreak()) {
  90058. this.expectPlugin("importAssertions");
  90059. this.next();
  90060. } else {
  90061. if (this.hasPlugin("importAssertions"))
  90062. return [];
  90063. return null;
  90064. }
  90065. this.eat(types$12.braceL);
  90066. const attrs = this.parseAssertEntries();
  90067. this.eat(types$12.braceR);
  90068. return attrs;
  90069. }
  90070. maybeParseDefaultImportSpecifier(node) {
  90071. if (this.shouldParseDefaultImport(node)) {
  90072. this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
  90073. return true;
  90074. }
  90075. return false;
  90076. }
  90077. maybeParseStarImportSpecifier(node) {
  90078. if (this.match(types$12.star)) {
  90079. const specifier = this.startNode();
  90080. this.next();
  90081. this.expectContextual("as");
  90082. this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
  90083. return true;
  90084. }
  90085. return false;
  90086. }
  90087. parseNamedImportSpecifiers(node) {
  90088. let first = true;
  90089. this.expect(types$12.braceL);
  90090. while (!this.eat(types$12.braceR)) {
  90091. if (first) {
  90092. first = false;
  90093. } else {
  90094. if (this.eat(types$12.colon)) {
  90095. throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport);
  90096. }
  90097. this.expect(types$12.comma);
  90098. if (this.eat(types$12.braceR))
  90099. break;
  90100. }
  90101. this.parseImportSpecifier(node);
  90102. }
  90103. }
  90104. parseImportSpecifier(node) {
  90105. const specifier = this.startNode();
  90106. const importedIsString = this.match(types$12.string);
  90107. specifier.imported = this.parseModuleExportName();
  90108. if (this.eatContextual("as")) {
  90109. specifier.local = this.parseIdentifier();
  90110. } else {
  90111. const {
  90112. imported
  90113. } = specifier;
  90114. if (importedIsString) {
  90115. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value);
  90116. }
  90117. this.checkReservedWord(imported.name, specifier.start, true, true);
  90118. specifier.local = imported.__clone();
  90119. }
  90120. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  90121. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  90122. }
  90123. isThisParam(param) {
  90124. return param.type === "Identifier" && param.name === "this";
  90125. }
  90126. };
  90127. var Parser3 = class extends StatementParser {
  90128. constructor(options, input) {
  90129. options = getOptions2(options);
  90130. super(options, input);
  90131. this.options = options;
  90132. this.initializeScopes();
  90133. this.plugins = pluginsMap(this.options.plugins);
  90134. this.filename = options.sourceFilename;
  90135. }
  90136. getScopeHandler() {
  90137. return ScopeHandler;
  90138. }
  90139. parse() {
  90140. this.enterInitialScopes();
  90141. const file = this.startNode();
  90142. const program = this.startNode();
  90143. this.nextToken();
  90144. file.errors = null;
  90145. this.parseTopLevel(file, program);
  90146. file.errors = this.state.errors;
  90147. return file;
  90148. }
  90149. };
  90150. function pluginsMap(plugins) {
  90151. const pluginMap = /* @__PURE__ */ new Map();
  90152. for (const plugin2 of plugins) {
  90153. const [name2, options] = Array.isArray(plugin2) ? plugin2 : [plugin2, {}];
  90154. if (!pluginMap.has(name2))
  90155. pluginMap.set(name2, options || {});
  90156. }
  90157. return pluginMap;
  90158. }
  90159. function parse4(input, options) {
  90160. var _options;
  90161. if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
  90162. options = Object.assign({}, options);
  90163. try {
  90164. options.sourceType = "module";
  90165. const parser = getParser(options, input);
  90166. const ast = parser.parse();
  90167. if (parser.sawUnambiguousESM) {
  90168. return ast;
  90169. }
  90170. if (parser.ambiguousScriptDifferentAst) {
  90171. try {
  90172. options.sourceType = "script";
  90173. return getParser(options, input).parse();
  90174. } catch (_unused) {
  90175. }
  90176. } else {
  90177. ast.program.sourceType = "script";
  90178. }
  90179. return ast;
  90180. } catch (moduleError) {
  90181. try {
  90182. options.sourceType = "script";
  90183. return getParser(options, input).parse();
  90184. } catch (_unused2) {
  90185. }
  90186. throw moduleError;
  90187. }
  90188. } else {
  90189. return getParser(options, input).parse();
  90190. }
  90191. }
  90192. function parseExpression(input, options) {
  90193. const parser = getParser(options, input);
  90194. if (parser.options.strictMode) {
  90195. parser.state.strict = true;
  90196. }
  90197. return parser.getExpression();
  90198. }
  90199. function getParser(options, input) {
  90200. let cls = Parser3;
  90201. if (options != null && options.plugins) {
  90202. validatePlugins(options.plugins);
  90203. cls = getParserClass(options.plugins);
  90204. }
  90205. return new cls(options, input);
  90206. }
  90207. var parserClassCache = {};
  90208. function getParserClass(pluginsFromOptions) {
  90209. const pluginList = mixinPluginNames.filter((name2) => hasPlugin(pluginsFromOptions, name2));
  90210. const key = pluginList.join("/");
  90211. let cls = parserClassCache[key];
  90212. if (!cls) {
  90213. cls = Parser3;
  90214. for (const plugin2 of pluginList) {
  90215. cls = mixinPlugins[plugin2](cls);
  90216. }
  90217. parserClassCache[key] = cls;
  90218. }
  90219. return cls;
  90220. }
  90221. exports.parse = parse4;
  90222. exports.parseExpression = parseExpression;
  90223. exports.tokTypes = types$12;
  90224. }
  90225. });
  90226. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/shallowEqual.js
  90227. var require_shallowEqual4 = __commonJS({
  90228. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  90229. "use strict";
  90230. Object.defineProperty(exports, "__esModule", {
  90231. value: true
  90232. });
  90233. exports.default = shallowEqual;
  90234. function shallowEqual(actual, expected) {
  90235. const keys2 = Object.keys(expected);
  90236. for (const key of keys2) {
  90237. if (actual[key] !== expected[key]) {
  90238. return false;
  90239. }
  90240. }
  90241. return true;
  90242. }
  90243. }
  90244. });
  90245. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/generated/index.js
  90246. var require_generated16 = __commonJS({
  90247. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  90248. "use strict";
  90249. Object.defineProperty(exports, "__esModule", {
  90250. value: true
  90251. });
  90252. exports.isArrayExpression = isArrayExpression;
  90253. exports.isAssignmentExpression = isAssignmentExpression;
  90254. exports.isBinaryExpression = isBinaryExpression;
  90255. exports.isInterpreterDirective = isInterpreterDirective;
  90256. exports.isDirective = isDirective;
  90257. exports.isDirectiveLiteral = isDirectiveLiteral;
  90258. exports.isBlockStatement = isBlockStatement;
  90259. exports.isBreakStatement = isBreakStatement;
  90260. exports.isCallExpression = isCallExpression;
  90261. exports.isCatchClause = isCatchClause;
  90262. exports.isConditionalExpression = isConditionalExpression;
  90263. exports.isContinueStatement = isContinueStatement;
  90264. exports.isDebuggerStatement = isDebuggerStatement;
  90265. exports.isDoWhileStatement = isDoWhileStatement;
  90266. exports.isEmptyStatement = isEmptyStatement;
  90267. exports.isExpressionStatement = isExpressionStatement2;
  90268. exports.isFile = isFile;
  90269. exports.isForInStatement = isForInStatement;
  90270. exports.isForStatement = isForStatement;
  90271. exports.isFunctionDeclaration = isFunctionDeclaration;
  90272. exports.isFunctionExpression = isFunctionExpression;
  90273. exports.isIdentifier = isIdentifier2;
  90274. exports.isIfStatement = isIfStatement;
  90275. exports.isLabeledStatement = isLabeledStatement;
  90276. exports.isStringLiteral = isStringLiteral2;
  90277. exports.isNumericLiteral = isNumericLiteral;
  90278. exports.isNullLiteral = isNullLiteral;
  90279. exports.isBooleanLiteral = isBooleanLiteral2;
  90280. exports.isRegExpLiteral = isRegExpLiteral;
  90281. exports.isLogicalExpression = isLogicalExpression;
  90282. exports.isMemberExpression = isMemberExpression;
  90283. exports.isNewExpression = isNewExpression;
  90284. exports.isProgram = isProgram;
  90285. exports.isObjectExpression = isObjectExpression;
  90286. exports.isObjectMethod = isObjectMethod;
  90287. exports.isObjectProperty = isObjectProperty;
  90288. exports.isRestElement = isRestElement;
  90289. exports.isReturnStatement = isReturnStatement;
  90290. exports.isSequenceExpression = isSequenceExpression;
  90291. exports.isParenthesizedExpression = isParenthesizedExpression;
  90292. exports.isSwitchCase = isSwitchCase;
  90293. exports.isSwitchStatement = isSwitchStatement;
  90294. exports.isThisExpression = isThisExpression;
  90295. exports.isThrowStatement = isThrowStatement;
  90296. exports.isTryStatement = isTryStatement;
  90297. exports.isUnaryExpression = isUnaryExpression;
  90298. exports.isUpdateExpression = isUpdateExpression;
  90299. exports.isVariableDeclaration = isVariableDeclaration;
  90300. exports.isVariableDeclarator = isVariableDeclarator;
  90301. exports.isWhileStatement = isWhileStatement;
  90302. exports.isWithStatement = isWithStatement;
  90303. exports.isAssignmentPattern = isAssignmentPattern;
  90304. exports.isArrayPattern = isArrayPattern;
  90305. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  90306. exports.isClassBody = isClassBody;
  90307. exports.isClassExpression = isClassExpression;
  90308. exports.isClassDeclaration = isClassDeclaration;
  90309. exports.isExportAllDeclaration = isExportAllDeclaration;
  90310. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  90311. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  90312. exports.isExportSpecifier = isExportSpecifier;
  90313. exports.isForOfStatement = isForOfStatement;
  90314. exports.isImportDeclaration = isImportDeclaration;
  90315. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  90316. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  90317. exports.isImportSpecifier = isImportSpecifier;
  90318. exports.isMetaProperty = isMetaProperty;
  90319. exports.isClassMethod = isClassMethod;
  90320. exports.isObjectPattern = isObjectPattern;
  90321. exports.isSpreadElement = isSpreadElement;
  90322. exports.isSuper = isSuper;
  90323. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  90324. exports.isTemplateElement = isTemplateElement;
  90325. exports.isTemplateLiteral = isTemplateLiteral;
  90326. exports.isYieldExpression = isYieldExpression;
  90327. exports.isAwaitExpression = isAwaitExpression;
  90328. exports.isImport = isImport;
  90329. exports.isBigIntLiteral = isBigIntLiteral;
  90330. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  90331. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  90332. exports.isOptionalCallExpression = isOptionalCallExpression;
  90333. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  90334. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  90335. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  90336. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  90337. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  90338. exports.isClassImplements = isClassImplements;
  90339. exports.isDeclareClass = isDeclareClass;
  90340. exports.isDeclareFunction = isDeclareFunction;
  90341. exports.isDeclareInterface = isDeclareInterface;
  90342. exports.isDeclareModule = isDeclareModule;
  90343. exports.isDeclareModuleExports = isDeclareModuleExports;
  90344. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  90345. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  90346. exports.isDeclareVariable = isDeclareVariable;
  90347. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  90348. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  90349. exports.isDeclaredPredicate = isDeclaredPredicate;
  90350. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  90351. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  90352. exports.isFunctionTypeParam = isFunctionTypeParam;
  90353. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  90354. exports.isInferredPredicate = isInferredPredicate;
  90355. exports.isInterfaceExtends = isInterfaceExtends;
  90356. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  90357. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  90358. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  90359. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  90360. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  90361. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  90362. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  90363. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  90364. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  90365. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  90366. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  90367. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  90368. exports.isObjectTypeProperty = isObjectTypeProperty;
  90369. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  90370. exports.isOpaqueType = isOpaqueType;
  90371. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  90372. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  90373. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  90374. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  90375. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  90376. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  90377. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  90378. exports.isTypeAlias = isTypeAlias;
  90379. exports.isTypeAnnotation = isTypeAnnotation;
  90380. exports.isTypeCastExpression = isTypeCastExpression;
  90381. exports.isTypeParameter = isTypeParameter;
  90382. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  90383. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  90384. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  90385. exports.isVariance = isVariance;
  90386. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  90387. exports.isEnumDeclaration = isEnumDeclaration;
  90388. exports.isEnumBooleanBody = isEnumBooleanBody;
  90389. exports.isEnumNumberBody = isEnumNumberBody;
  90390. exports.isEnumStringBody = isEnumStringBody;
  90391. exports.isEnumSymbolBody = isEnumSymbolBody;
  90392. exports.isEnumBooleanMember = isEnumBooleanMember;
  90393. exports.isEnumNumberMember = isEnumNumberMember;
  90394. exports.isEnumStringMember = isEnumStringMember;
  90395. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  90396. exports.isIndexedAccessType = isIndexedAccessType;
  90397. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  90398. exports.isJSXAttribute = isJSXAttribute;
  90399. exports.isJSXClosingElement = isJSXClosingElement;
  90400. exports.isJSXElement = isJSXElement2;
  90401. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  90402. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  90403. exports.isJSXSpreadChild = isJSXSpreadChild;
  90404. exports.isJSXIdentifier = isJSXIdentifier2;
  90405. exports.isJSXMemberExpression = isJSXMemberExpression;
  90406. exports.isJSXNamespacedName = isJSXNamespacedName;
  90407. exports.isJSXOpeningElement = isJSXOpeningElement;
  90408. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  90409. exports.isJSXText = isJSXText;
  90410. exports.isJSXFragment = isJSXFragment2;
  90411. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  90412. exports.isJSXClosingFragment = isJSXClosingFragment;
  90413. exports.isNoop = isNoop;
  90414. exports.isPlaceholder = isPlaceholder;
  90415. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  90416. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  90417. exports.isBindExpression = isBindExpression;
  90418. exports.isClassProperty = isClassProperty;
  90419. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  90420. exports.isPipelineBareFunction = isPipelineBareFunction;
  90421. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  90422. exports.isClassPrivateProperty = isClassPrivateProperty;
  90423. exports.isClassPrivateMethod = isClassPrivateMethod;
  90424. exports.isImportAttribute = isImportAttribute;
  90425. exports.isDecorator = isDecorator;
  90426. exports.isDoExpression = isDoExpression;
  90427. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  90428. exports.isPrivateName = isPrivateName;
  90429. exports.isRecordExpression = isRecordExpression;
  90430. exports.isTupleExpression = isTupleExpression;
  90431. exports.isDecimalLiteral = isDecimalLiteral;
  90432. exports.isStaticBlock = isStaticBlock;
  90433. exports.isModuleExpression = isModuleExpression;
  90434. exports.isTSParameterProperty = isTSParameterProperty;
  90435. exports.isTSDeclareFunction = isTSDeclareFunction;
  90436. exports.isTSDeclareMethod = isTSDeclareMethod;
  90437. exports.isTSQualifiedName = isTSQualifiedName;
  90438. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  90439. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  90440. exports.isTSPropertySignature = isTSPropertySignature;
  90441. exports.isTSMethodSignature = isTSMethodSignature;
  90442. exports.isTSIndexSignature = isTSIndexSignature;
  90443. exports.isTSAnyKeyword = isTSAnyKeyword;
  90444. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  90445. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  90446. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  90447. exports.isTSNeverKeyword = isTSNeverKeyword;
  90448. exports.isTSNullKeyword = isTSNullKeyword;
  90449. exports.isTSNumberKeyword = isTSNumberKeyword;
  90450. exports.isTSObjectKeyword = isTSObjectKeyword;
  90451. exports.isTSStringKeyword = isTSStringKeyword;
  90452. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  90453. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  90454. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  90455. exports.isTSVoidKeyword = isTSVoidKeyword;
  90456. exports.isTSThisType = isTSThisType;
  90457. exports.isTSFunctionType = isTSFunctionType;
  90458. exports.isTSConstructorType = isTSConstructorType;
  90459. exports.isTSTypeReference = isTSTypeReference;
  90460. exports.isTSTypePredicate = isTSTypePredicate;
  90461. exports.isTSTypeQuery = isTSTypeQuery;
  90462. exports.isTSTypeLiteral = isTSTypeLiteral;
  90463. exports.isTSArrayType = isTSArrayType;
  90464. exports.isTSTupleType = isTSTupleType;
  90465. exports.isTSOptionalType = isTSOptionalType;
  90466. exports.isTSRestType = isTSRestType;
  90467. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  90468. exports.isTSUnionType = isTSUnionType;
  90469. exports.isTSIntersectionType = isTSIntersectionType;
  90470. exports.isTSConditionalType = isTSConditionalType;
  90471. exports.isTSInferType = isTSInferType;
  90472. exports.isTSParenthesizedType = isTSParenthesizedType;
  90473. exports.isTSTypeOperator = isTSTypeOperator;
  90474. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  90475. exports.isTSMappedType = isTSMappedType;
  90476. exports.isTSLiteralType = isTSLiteralType;
  90477. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  90478. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  90479. exports.isTSInterfaceBody = isTSInterfaceBody;
  90480. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  90481. exports.isTSAsExpression = isTSAsExpression;
  90482. exports.isTSTypeAssertion = isTSTypeAssertion;
  90483. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  90484. exports.isTSEnumMember = isTSEnumMember;
  90485. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  90486. exports.isTSModuleBlock = isTSModuleBlock;
  90487. exports.isTSImportType = isTSImportType;
  90488. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  90489. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  90490. exports.isTSNonNullExpression = isTSNonNullExpression;
  90491. exports.isTSExportAssignment = isTSExportAssignment;
  90492. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  90493. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  90494. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  90495. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  90496. exports.isTSTypeParameter = isTSTypeParameter;
  90497. exports.isExpression = isExpression;
  90498. exports.isBinary = isBinary;
  90499. exports.isScopable = isScopable;
  90500. exports.isBlockParent = isBlockParent;
  90501. exports.isBlock = isBlock;
  90502. exports.isStatement = isStatement;
  90503. exports.isTerminatorless = isTerminatorless;
  90504. exports.isCompletionStatement = isCompletionStatement;
  90505. exports.isConditional = isConditional;
  90506. exports.isLoop = isLoop;
  90507. exports.isWhile = isWhile;
  90508. exports.isExpressionWrapper = isExpressionWrapper;
  90509. exports.isFor = isFor;
  90510. exports.isForXStatement = isForXStatement;
  90511. exports.isFunction = isFunction;
  90512. exports.isFunctionParent = isFunctionParent;
  90513. exports.isPureish = isPureish;
  90514. exports.isDeclaration = isDeclaration2;
  90515. exports.isPatternLike = isPatternLike;
  90516. exports.isLVal = isLVal;
  90517. exports.isTSEntityName = isTSEntityName;
  90518. exports.isLiteral = isLiteral;
  90519. exports.isImmutable = isImmutable;
  90520. exports.isUserWhitespacable = isUserWhitespacable;
  90521. exports.isMethod = isMethod;
  90522. exports.isObjectMember = isObjectMember;
  90523. exports.isProperty = isProperty;
  90524. exports.isUnaryLike = isUnaryLike;
  90525. exports.isPattern = isPattern;
  90526. exports.isClass = isClass;
  90527. exports.isModuleDeclaration = isModuleDeclaration;
  90528. exports.isExportDeclaration = isExportDeclaration;
  90529. exports.isModuleSpecifier = isModuleSpecifier;
  90530. exports.isFlow = isFlow;
  90531. exports.isFlowType = isFlowType;
  90532. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  90533. exports.isFlowDeclaration = isFlowDeclaration;
  90534. exports.isFlowPredicate = isFlowPredicate;
  90535. exports.isEnumBody = isEnumBody;
  90536. exports.isEnumMember = isEnumMember;
  90537. exports.isJSX = isJSX;
  90538. exports.isPrivate = isPrivate;
  90539. exports.isTSTypeElement = isTSTypeElement;
  90540. exports.isTSType = isTSType;
  90541. exports.isTSBaseType = isTSBaseType;
  90542. exports.isNumberLiteral = isNumberLiteral;
  90543. exports.isRegexLiteral = isRegexLiteral;
  90544. exports.isRestProperty = isRestProperty;
  90545. exports.isSpreadProperty = isSpreadProperty;
  90546. var _shallowEqual = require_shallowEqual4();
  90547. function isArrayExpression(node, opts) {
  90548. if (!node)
  90549. return false;
  90550. const nodeType = node.type;
  90551. if (nodeType === "ArrayExpression") {
  90552. if (typeof opts === "undefined") {
  90553. return true;
  90554. } else {
  90555. return (0, _shallowEqual.default)(node, opts);
  90556. }
  90557. }
  90558. return false;
  90559. }
  90560. function isAssignmentExpression(node, opts) {
  90561. if (!node)
  90562. return false;
  90563. const nodeType = node.type;
  90564. if (nodeType === "AssignmentExpression") {
  90565. if (typeof opts === "undefined") {
  90566. return true;
  90567. } else {
  90568. return (0, _shallowEqual.default)(node, opts);
  90569. }
  90570. }
  90571. return false;
  90572. }
  90573. function isBinaryExpression(node, opts) {
  90574. if (!node)
  90575. return false;
  90576. const nodeType = node.type;
  90577. if (nodeType === "BinaryExpression") {
  90578. if (typeof opts === "undefined") {
  90579. return true;
  90580. } else {
  90581. return (0, _shallowEqual.default)(node, opts);
  90582. }
  90583. }
  90584. return false;
  90585. }
  90586. function isInterpreterDirective(node, opts) {
  90587. if (!node)
  90588. return false;
  90589. const nodeType = node.type;
  90590. if (nodeType === "InterpreterDirective") {
  90591. if (typeof opts === "undefined") {
  90592. return true;
  90593. } else {
  90594. return (0, _shallowEqual.default)(node, opts);
  90595. }
  90596. }
  90597. return false;
  90598. }
  90599. function isDirective(node, opts) {
  90600. if (!node)
  90601. return false;
  90602. const nodeType = node.type;
  90603. if (nodeType === "Directive") {
  90604. if (typeof opts === "undefined") {
  90605. return true;
  90606. } else {
  90607. return (0, _shallowEqual.default)(node, opts);
  90608. }
  90609. }
  90610. return false;
  90611. }
  90612. function isDirectiveLiteral(node, opts) {
  90613. if (!node)
  90614. return false;
  90615. const nodeType = node.type;
  90616. if (nodeType === "DirectiveLiteral") {
  90617. if (typeof opts === "undefined") {
  90618. return true;
  90619. } else {
  90620. return (0, _shallowEqual.default)(node, opts);
  90621. }
  90622. }
  90623. return false;
  90624. }
  90625. function isBlockStatement(node, opts) {
  90626. if (!node)
  90627. return false;
  90628. const nodeType = node.type;
  90629. if (nodeType === "BlockStatement") {
  90630. if (typeof opts === "undefined") {
  90631. return true;
  90632. } else {
  90633. return (0, _shallowEqual.default)(node, opts);
  90634. }
  90635. }
  90636. return false;
  90637. }
  90638. function isBreakStatement(node, opts) {
  90639. if (!node)
  90640. return false;
  90641. const nodeType = node.type;
  90642. if (nodeType === "BreakStatement") {
  90643. if (typeof opts === "undefined") {
  90644. return true;
  90645. } else {
  90646. return (0, _shallowEqual.default)(node, opts);
  90647. }
  90648. }
  90649. return false;
  90650. }
  90651. function isCallExpression(node, opts) {
  90652. if (!node)
  90653. return false;
  90654. const nodeType = node.type;
  90655. if (nodeType === "CallExpression") {
  90656. if (typeof opts === "undefined") {
  90657. return true;
  90658. } else {
  90659. return (0, _shallowEqual.default)(node, opts);
  90660. }
  90661. }
  90662. return false;
  90663. }
  90664. function isCatchClause(node, opts) {
  90665. if (!node)
  90666. return false;
  90667. const nodeType = node.type;
  90668. if (nodeType === "CatchClause") {
  90669. if (typeof opts === "undefined") {
  90670. return true;
  90671. } else {
  90672. return (0, _shallowEqual.default)(node, opts);
  90673. }
  90674. }
  90675. return false;
  90676. }
  90677. function isConditionalExpression(node, opts) {
  90678. if (!node)
  90679. return false;
  90680. const nodeType = node.type;
  90681. if (nodeType === "ConditionalExpression") {
  90682. if (typeof opts === "undefined") {
  90683. return true;
  90684. } else {
  90685. return (0, _shallowEqual.default)(node, opts);
  90686. }
  90687. }
  90688. return false;
  90689. }
  90690. function isContinueStatement(node, opts) {
  90691. if (!node)
  90692. return false;
  90693. const nodeType = node.type;
  90694. if (nodeType === "ContinueStatement") {
  90695. if (typeof opts === "undefined") {
  90696. return true;
  90697. } else {
  90698. return (0, _shallowEqual.default)(node, opts);
  90699. }
  90700. }
  90701. return false;
  90702. }
  90703. function isDebuggerStatement(node, opts) {
  90704. if (!node)
  90705. return false;
  90706. const nodeType = node.type;
  90707. if (nodeType === "DebuggerStatement") {
  90708. if (typeof opts === "undefined") {
  90709. return true;
  90710. } else {
  90711. return (0, _shallowEqual.default)(node, opts);
  90712. }
  90713. }
  90714. return false;
  90715. }
  90716. function isDoWhileStatement(node, opts) {
  90717. if (!node)
  90718. return false;
  90719. const nodeType = node.type;
  90720. if (nodeType === "DoWhileStatement") {
  90721. if (typeof opts === "undefined") {
  90722. return true;
  90723. } else {
  90724. return (0, _shallowEqual.default)(node, opts);
  90725. }
  90726. }
  90727. return false;
  90728. }
  90729. function isEmptyStatement(node, opts) {
  90730. if (!node)
  90731. return false;
  90732. const nodeType = node.type;
  90733. if (nodeType === "EmptyStatement") {
  90734. if (typeof opts === "undefined") {
  90735. return true;
  90736. } else {
  90737. return (0, _shallowEqual.default)(node, opts);
  90738. }
  90739. }
  90740. return false;
  90741. }
  90742. function isExpressionStatement2(node, opts) {
  90743. if (!node)
  90744. return false;
  90745. const nodeType = node.type;
  90746. if (nodeType === "ExpressionStatement") {
  90747. if (typeof opts === "undefined") {
  90748. return true;
  90749. } else {
  90750. return (0, _shallowEqual.default)(node, opts);
  90751. }
  90752. }
  90753. return false;
  90754. }
  90755. function isFile(node, opts) {
  90756. if (!node)
  90757. return false;
  90758. const nodeType = node.type;
  90759. if (nodeType === "File") {
  90760. if (typeof opts === "undefined") {
  90761. return true;
  90762. } else {
  90763. return (0, _shallowEqual.default)(node, opts);
  90764. }
  90765. }
  90766. return false;
  90767. }
  90768. function isForInStatement(node, opts) {
  90769. if (!node)
  90770. return false;
  90771. const nodeType = node.type;
  90772. if (nodeType === "ForInStatement") {
  90773. if (typeof opts === "undefined") {
  90774. return true;
  90775. } else {
  90776. return (0, _shallowEqual.default)(node, opts);
  90777. }
  90778. }
  90779. return false;
  90780. }
  90781. function isForStatement(node, opts) {
  90782. if (!node)
  90783. return false;
  90784. const nodeType = node.type;
  90785. if (nodeType === "ForStatement") {
  90786. if (typeof opts === "undefined") {
  90787. return true;
  90788. } else {
  90789. return (0, _shallowEqual.default)(node, opts);
  90790. }
  90791. }
  90792. return false;
  90793. }
  90794. function isFunctionDeclaration(node, opts) {
  90795. if (!node)
  90796. return false;
  90797. const nodeType = node.type;
  90798. if (nodeType === "FunctionDeclaration") {
  90799. if (typeof opts === "undefined") {
  90800. return true;
  90801. } else {
  90802. return (0, _shallowEqual.default)(node, opts);
  90803. }
  90804. }
  90805. return false;
  90806. }
  90807. function isFunctionExpression(node, opts) {
  90808. if (!node)
  90809. return false;
  90810. const nodeType = node.type;
  90811. if (nodeType === "FunctionExpression") {
  90812. if (typeof opts === "undefined") {
  90813. return true;
  90814. } else {
  90815. return (0, _shallowEqual.default)(node, opts);
  90816. }
  90817. }
  90818. return false;
  90819. }
  90820. function isIdentifier2(node, opts) {
  90821. if (!node)
  90822. return false;
  90823. const nodeType = node.type;
  90824. if (nodeType === "Identifier") {
  90825. if (typeof opts === "undefined") {
  90826. return true;
  90827. } else {
  90828. return (0, _shallowEqual.default)(node, opts);
  90829. }
  90830. }
  90831. return false;
  90832. }
  90833. function isIfStatement(node, opts) {
  90834. if (!node)
  90835. return false;
  90836. const nodeType = node.type;
  90837. if (nodeType === "IfStatement") {
  90838. if (typeof opts === "undefined") {
  90839. return true;
  90840. } else {
  90841. return (0, _shallowEqual.default)(node, opts);
  90842. }
  90843. }
  90844. return false;
  90845. }
  90846. function isLabeledStatement(node, opts) {
  90847. if (!node)
  90848. return false;
  90849. const nodeType = node.type;
  90850. if (nodeType === "LabeledStatement") {
  90851. if (typeof opts === "undefined") {
  90852. return true;
  90853. } else {
  90854. return (0, _shallowEqual.default)(node, opts);
  90855. }
  90856. }
  90857. return false;
  90858. }
  90859. function isStringLiteral2(node, opts) {
  90860. if (!node)
  90861. return false;
  90862. const nodeType = node.type;
  90863. if (nodeType === "StringLiteral") {
  90864. if (typeof opts === "undefined") {
  90865. return true;
  90866. } else {
  90867. return (0, _shallowEqual.default)(node, opts);
  90868. }
  90869. }
  90870. return false;
  90871. }
  90872. function isNumericLiteral(node, opts) {
  90873. if (!node)
  90874. return false;
  90875. const nodeType = node.type;
  90876. if (nodeType === "NumericLiteral") {
  90877. if (typeof opts === "undefined") {
  90878. return true;
  90879. } else {
  90880. return (0, _shallowEqual.default)(node, opts);
  90881. }
  90882. }
  90883. return false;
  90884. }
  90885. function isNullLiteral(node, opts) {
  90886. if (!node)
  90887. return false;
  90888. const nodeType = node.type;
  90889. if (nodeType === "NullLiteral") {
  90890. if (typeof opts === "undefined") {
  90891. return true;
  90892. } else {
  90893. return (0, _shallowEqual.default)(node, opts);
  90894. }
  90895. }
  90896. return false;
  90897. }
  90898. function isBooleanLiteral2(node, opts) {
  90899. if (!node)
  90900. return false;
  90901. const nodeType = node.type;
  90902. if (nodeType === "BooleanLiteral") {
  90903. if (typeof opts === "undefined") {
  90904. return true;
  90905. } else {
  90906. return (0, _shallowEqual.default)(node, opts);
  90907. }
  90908. }
  90909. return false;
  90910. }
  90911. function isRegExpLiteral(node, opts) {
  90912. if (!node)
  90913. return false;
  90914. const nodeType = node.type;
  90915. if (nodeType === "RegExpLiteral") {
  90916. if (typeof opts === "undefined") {
  90917. return true;
  90918. } else {
  90919. return (0, _shallowEqual.default)(node, opts);
  90920. }
  90921. }
  90922. return false;
  90923. }
  90924. function isLogicalExpression(node, opts) {
  90925. if (!node)
  90926. return false;
  90927. const nodeType = node.type;
  90928. if (nodeType === "LogicalExpression") {
  90929. if (typeof opts === "undefined") {
  90930. return true;
  90931. } else {
  90932. return (0, _shallowEqual.default)(node, opts);
  90933. }
  90934. }
  90935. return false;
  90936. }
  90937. function isMemberExpression(node, opts) {
  90938. if (!node)
  90939. return false;
  90940. const nodeType = node.type;
  90941. if (nodeType === "MemberExpression") {
  90942. if (typeof opts === "undefined") {
  90943. return true;
  90944. } else {
  90945. return (0, _shallowEqual.default)(node, opts);
  90946. }
  90947. }
  90948. return false;
  90949. }
  90950. function isNewExpression(node, opts) {
  90951. if (!node)
  90952. return false;
  90953. const nodeType = node.type;
  90954. if (nodeType === "NewExpression") {
  90955. if (typeof opts === "undefined") {
  90956. return true;
  90957. } else {
  90958. return (0, _shallowEqual.default)(node, opts);
  90959. }
  90960. }
  90961. return false;
  90962. }
  90963. function isProgram(node, opts) {
  90964. if (!node)
  90965. return false;
  90966. const nodeType = node.type;
  90967. if (nodeType === "Program") {
  90968. if (typeof opts === "undefined") {
  90969. return true;
  90970. } else {
  90971. return (0, _shallowEqual.default)(node, opts);
  90972. }
  90973. }
  90974. return false;
  90975. }
  90976. function isObjectExpression(node, opts) {
  90977. if (!node)
  90978. return false;
  90979. const nodeType = node.type;
  90980. if (nodeType === "ObjectExpression") {
  90981. if (typeof opts === "undefined") {
  90982. return true;
  90983. } else {
  90984. return (0, _shallowEqual.default)(node, opts);
  90985. }
  90986. }
  90987. return false;
  90988. }
  90989. function isObjectMethod(node, opts) {
  90990. if (!node)
  90991. return false;
  90992. const nodeType = node.type;
  90993. if (nodeType === "ObjectMethod") {
  90994. if (typeof opts === "undefined") {
  90995. return true;
  90996. } else {
  90997. return (0, _shallowEqual.default)(node, opts);
  90998. }
  90999. }
  91000. return false;
  91001. }
  91002. function isObjectProperty(node, opts) {
  91003. if (!node)
  91004. return false;
  91005. const nodeType = node.type;
  91006. if (nodeType === "ObjectProperty") {
  91007. if (typeof opts === "undefined") {
  91008. return true;
  91009. } else {
  91010. return (0, _shallowEqual.default)(node, opts);
  91011. }
  91012. }
  91013. return false;
  91014. }
  91015. function isRestElement(node, opts) {
  91016. if (!node)
  91017. return false;
  91018. const nodeType = node.type;
  91019. if (nodeType === "RestElement") {
  91020. if (typeof opts === "undefined") {
  91021. return true;
  91022. } else {
  91023. return (0, _shallowEqual.default)(node, opts);
  91024. }
  91025. }
  91026. return false;
  91027. }
  91028. function isReturnStatement(node, opts) {
  91029. if (!node)
  91030. return false;
  91031. const nodeType = node.type;
  91032. if (nodeType === "ReturnStatement") {
  91033. if (typeof opts === "undefined") {
  91034. return true;
  91035. } else {
  91036. return (0, _shallowEqual.default)(node, opts);
  91037. }
  91038. }
  91039. return false;
  91040. }
  91041. function isSequenceExpression(node, opts) {
  91042. if (!node)
  91043. return false;
  91044. const nodeType = node.type;
  91045. if (nodeType === "SequenceExpression") {
  91046. if (typeof opts === "undefined") {
  91047. return true;
  91048. } else {
  91049. return (0, _shallowEqual.default)(node, opts);
  91050. }
  91051. }
  91052. return false;
  91053. }
  91054. function isParenthesizedExpression(node, opts) {
  91055. if (!node)
  91056. return false;
  91057. const nodeType = node.type;
  91058. if (nodeType === "ParenthesizedExpression") {
  91059. if (typeof opts === "undefined") {
  91060. return true;
  91061. } else {
  91062. return (0, _shallowEqual.default)(node, opts);
  91063. }
  91064. }
  91065. return false;
  91066. }
  91067. function isSwitchCase(node, opts) {
  91068. if (!node)
  91069. return false;
  91070. const nodeType = node.type;
  91071. if (nodeType === "SwitchCase") {
  91072. if (typeof opts === "undefined") {
  91073. return true;
  91074. } else {
  91075. return (0, _shallowEqual.default)(node, opts);
  91076. }
  91077. }
  91078. return false;
  91079. }
  91080. function isSwitchStatement(node, opts) {
  91081. if (!node)
  91082. return false;
  91083. const nodeType = node.type;
  91084. if (nodeType === "SwitchStatement") {
  91085. if (typeof opts === "undefined") {
  91086. return true;
  91087. } else {
  91088. return (0, _shallowEqual.default)(node, opts);
  91089. }
  91090. }
  91091. return false;
  91092. }
  91093. function isThisExpression(node, opts) {
  91094. if (!node)
  91095. return false;
  91096. const nodeType = node.type;
  91097. if (nodeType === "ThisExpression") {
  91098. if (typeof opts === "undefined") {
  91099. return true;
  91100. } else {
  91101. return (0, _shallowEqual.default)(node, opts);
  91102. }
  91103. }
  91104. return false;
  91105. }
  91106. function isThrowStatement(node, opts) {
  91107. if (!node)
  91108. return false;
  91109. const nodeType = node.type;
  91110. if (nodeType === "ThrowStatement") {
  91111. if (typeof opts === "undefined") {
  91112. return true;
  91113. } else {
  91114. return (0, _shallowEqual.default)(node, opts);
  91115. }
  91116. }
  91117. return false;
  91118. }
  91119. function isTryStatement(node, opts) {
  91120. if (!node)
  91121. return false;
  91122. const nodeType = node.type;
  91123. if (nodeType === "TryStatement") {
  91124. if (typeof opts === "undefined") {
  91125. return true;
  91126. } else {
  91127. return (0, _shallowEqual.default)(node, opts);
  91128. }
  91129. }
  91130. return false;
  91131. }
  91132. function isUnaryExpression(node, opts) {
  91133. if (!node)
  91134. return false;
  91135. const nodeType = node.type;
  91136. if (nodeType === "UnaryExpression") {
  91137. if (typeof opts === "undefined") {
  91138. return true;
  91139. } else {
  91140. return (0, _shallowEqual.default)(node, opts);
  91141. }
  91142. }
  91143. return false;
  91144. }
  91145. function isUpdateExpression(node, opts) {
  91146. if (!node)
  91147. return false;
  91148. const nodeType = node.type;
  91149. if (nodeType === "UpdateExpression") {
  91150. if (typeof opts === "undefined") {
  91151. return true;
  91152. } else {
  91153. return (0, _shallowEqual.default)(node, opts);
  91154. }
  91155. }
  91156. return false;
  91157. }
  91158. function isVariableDeclaration(node, opts) {
  91159. if (!node)
  91160. return false;
  91161. const nodeType = node.type;
  91162. if (nodeType === "VariableDeclaration") {
  91163. if (typeof opts === "undefined") {
  91164. return true;
  91165. } else {
  91166. return (0, _shallowEqual.default)(node, opts);
  91167. }
  91168. }
  91169. return false;
  91170. }
  91171. function isVariableDeclarator(node, opts) {
  91172. if (!node)
  91173. return false;
  91174. const nodeType = node.type;
  91175. if (nodeType === "VariableDeclarator") {
  91176. if (typeof opts === "undefined") {
  91177. return true;
  91178. } else {
  91179. return (0, _shallowEqual.default)(node, opts);
  91180. }
  91181. }
  91182. return false;
  91183. }
  91184. function isWhileStatement(node, opts) {
  91185. if (!node)
  91186. return false;
  91187. const nodeType = node.type;
  91188. if (nodeType === "WhileStatement") {
  91189. if (typeof opts === "undefined") {
  91190. return true;
  91191. } else {
  91192. return (0, _shallowEqual.default)(node, opts);
  91193. }
  91194. }
  91195. return false;
  91196. }
  91197. function isWithStatement(node, opts) {
  91198. if (!node)
  91199. return false;
  91200. const nodeType = node.type;
  91201. if (nodeType === "WithStatement") {
  91202. if (typeof opts === "undefined") {
  91203. return true;
  91204. } else {
  91205. return (0, _shallowEqual.default)(node, opts);
  91206. }
  91207. }
  91208. return false;
  91209. }
  91210. function isAssignmentPattern(node, opts) {
  91211. if (!node)
  91212. return false;
  91213. const nodeType = node.type;
  91214. if (nodeType === "AssignmentPattern") {
  91215. if (typeof opts === "undefined") {
  91216. return true;
  91217. } else {
  91218. return (0, _shallowEqual.default)(node, opts);
  91219. }
  91220. }
  91221. return false;
  91222. }
  91223. function isArrayPattern(node, opts) {
  91224. if (!node)
  91225. return false;
  91226. const nodeType = node.type;
  91227. if (nodeType === "ArrayPattern") {
  91228. if (typeof opts === "undefined") {
  91229. return true;
  91230. } else {
  91231. return (0, _shallowEqual.default)(node, opts);
  91232. }
  91233. }
  91234. return false;
  91235. }
  91236. function isArrowFunctionExpression(node, opts) {
  91237. if (!node)
  91238. return false;
  91239. const nodeType = node.type;
  91240. if (nodeType === "ArrowFunctionExpression") {
  91241. if (typeof opts === "undefined") {
  91242. return true;
  91243. } else {
  91244. return (0, _shallowEqual.default)(node, opts);
  91245. }
  91246. }
  91247. return false;
  91248. }
  91249. function isClassBody(node, opts) {
  91250. if (!node)
  91251. return false;
  91252. const nodeType = node.type;
  91253. if (nodeType === "ClassBody") {
  91254. if (typeof opts === "undefined") {
  91255. return true;
  91256. } else {
  91257. return (0, _shallowEqual.default)(node, opts);
  91258. }
  91259. }
  91260. return false;
  91261. }
  91262. function isClassExpression(node, opts) {
  91263. if (!node)
  91264. return false;
  91265. const nodeType = node.type;
  91266. if (nodeType === "ClassExpression") {
  91267. if (typeof opts === "undefined") {
  91268. return true;
  91269. } else {
  91270. return (0, _shallowEqual.default)(node, opts);
  91271. }
  91272. }
  91273. return false;
  91274. }
  91275. function isClassDeclaration(node, opts) {
  91276. if (!node)
  91277. return false;
  91278. const nodeType = node.type;
  91279. if (nodeType === "ClassDeclaration") {
  91280. if (typeof opts === "undefined") {
  91281. return true;
  91282. } else {
  91283. return (0, _shallowEqual.default)(node, opts);
  91284. }
  91285. }
  91286. return false;
  91287. }
  91288. function isExportAllDeclaration(node, opts) {
  91289. if (!node)
  91290. return false;
  91291. const nodeType = node.type;
  91292. if (nodeType === "ExportAllDeclaration") {
  91293. if (typeof opts === "undefined") {
  91294. return true;
  91295. } else {
  91296. return (0, _shallowEqual.default)(node, opts);
  91297. }
  91298. }
  91299. return false;
  91300. }
  91301. function isExportDefaultDeclaration(node, opts) {
  91302. if (!node)
  91303. return false;
  91304. const nodeType = node.type;
  91305. if (nodeType === "ExportDefaultDeclaration") {
  91306. if (typeof opts === "undefined") {
  91307. return true;
  91308. } else {
  91309. return (0, _shallowEqual.default)(node, opts);
  91310. }
  91311. }
  91312. return false;
  91313. }
  91314. function isExportNamedDeclaration(node, opts) {
  91315. if (!node)
  91316. return false;
  91317. const nodeType = node.type;
  91318. if (nodeType === "ExportNamedDeclaration") {
  91319. if (typeof opts === "undefined") {
  91320. return true;
  91321. } else {
  91322. return (0, _shallowEqual.default)(node, opts);
  91323. }
  91324. }
  91325. return false;
  91326. }
  91327. function isExportSpecifier(node, opts) {
  91328. if (!node)
  91329. return false;
  91330. const nodeType = node.type;
  91331. if (nodeType === "ExportSpecifier") {
  91332. if (typeof opts === "undefined") {
  91333. return true;
  91334. } else {
  91335. return (0, _shallowEqual.default)(node, opts);
  91336. }
  91337. }
  91338. return false;
  91339. }
  91340. function isForOfStatement(node, opts) {
  91341. if (!node)
  91342. return false;
  91343. const nodeType = node.type;
  91344. if (nodeType === "ForOfStatement") {
  91345. if (typeof opts === "undefined") {
  91346. return true;
  91347. } else {
  91348. return (0, _shallowEqual.default)(node, opts);
  91349. }
  91350. }
  91351. return false;
  91352. }
  91353. function isImportDeclaration(node, opts) {
  91354. if (!node)
  91355. return false;
  91356. const nodeType = node.type;
  91357. if (nodeType === "ImportDeclaration") {
  91358. if (typeof opts === "undefined") {
  91359. return true;
  91360. } else {
  91361. return (0, _shallowEqual.default)(node, opts);
  91362. }
  91363. }
  91364. return false;
  91365. }
  91366. function isImportDefaultSpecifier(node, opts) {
  91367. if (!node)
  91368. return false;
  91369. const nodeType = node.type;
  91370. if (nodeType === "ImportDefaultSpecifier") {
  91371. if (typeof opts === "undefined") {
  91372. return true;
  91373. } else {
  91374. return (0, _shallowEqual.default)(node, opts);
  91375. }
  91376. }
  91377. return false;
  91378. }
  91379. function isImportNamespaceSpecifier(node, opts) {
  91380. if (!node)
  91381. return false;
  91382. const nodeType = node.type;
  91383. if (nodeType === "ImportNamespaceSpecifier") {
  91384. if (typeof opts === "undefined") {
  91385. return true;
  91386. } else {
  91387. return (0, _shallowEqual.default)(node, opts);
  91388. }
  91389. }
  91390. return false;
  91391. }
  91392. function isImportSpecifier(node, opts) {
  91393. if (!node)
  91394. return false;
  91395. const nodeType = node.type;
  91396. if (nodeType === "ImportSpecifier") {
  91397. if (typeof opts === "undefined") {
  91398. return true;
  91399. } else {
  91400. return (0, _shallowEqual.default)(node, opts);
  91401. }
  91402. }
  91403. return false;
  91404. }
  91405. function isMetaProperty(node, opts) {
  91406. if (!node)
  91407. return false;
  91408. const nodeType = node.type;
  91409. if (nodeType === "MetaProperty") {
  91410. if (typeof opts === "undefined") {
  91411. return true;
  91412. } else {
  91413. return (0, _shallowEqual.default)(node, opts);
  91414. }
  91415. }
  91416. return false;
  91417. }
  91418. function isClassMethod(node, opts) {
  91419. if (!node)
  91420. return false;
  91421. const nodeType = node.type;
  91422. if (nodeType === "ClassMethod") {
  91423. if (typeof opts === "undefined") {
  91424. return true;
  91425. } else {
  91426. return (0, _shallowEqual.default)(node, opts);
  91427. }
  91428. }
  91429. return false;
  91430. }
  91431. function isObjectPattern(node, opts) {
  91432. if (!node)
  91433. return false;
  91434. const nodeType = node.type;
  91435. if (nodeType === "ObjectPattern") {
  91436. if (typeof opts === "undefined") {
  91437. return true;
  91438. } else {
  91439. return (0, _shallowEqual.default)(node, opts);
  91440. }
  91441. }
  91442. return false;
  91443. }
  91444. function isSpreadElement(node, opts) {
  91445. if (!node)
  91446. return false;
  91447. const nodeType = node.type;
  91448. if (nodeType === "SpreadElement") {
  91449. if (typeof opts === "undefined") {
  91450. return true;
  91451. } else {
  91452. return (0, _shallowEqual.default)(node, opts);
  91453. }
  91454. }
  91455. return false;
  91456. }
  91457. function isSuper(node, opts) {
  91458. if (!node)
  91459. return false;
  91460. const nodeType = node.type;
  91461. if (nodeType === "Super") {
  91462. if (typeof opts === "undefined") {
  91463. return true;
  91464. } else {
  91465. return (0, _shallowEqual.default)(node, opts);
  91466. }
  91467. }
  91468. return false;
  91469. }
  91470. function isTaggedTemplateExpression(node, opts) {
  91471. if (!node)
  91472. return false;
  91473. const nodeType = node.type;
  91474. if (nodeType === "TaggedTemplateExpression") {
  91475. if (typeof opts === "undefined") {
  91476. return true;
  91477. } else {
  91478. return (0, _shallowEqual.default)(node, opts);
  91479. }
  91480. }
  91481. return false;
  91482. }
  91483. function isTemplateElement(node, opts) {
  91484. if (!node)
  91485. return false;
  91486. const nodeType = node.type;
  91487. if (nodeType === "TemplateElement") {
  91488. if (typeof opts === "undefined") {
  91489. return true;
  91490. } else {
  91491. return (0, _shallowEqual.default)(node, opts);
  91492. }
  91493. }
  91494. return false;
  91495. }
  91496. function isTemplateLiteral(node, opts) {
  91497. if (!node)
  91498. return false;
  91499. const nodeType = node.type;
  91500. if (nodeType === "TemplateLiteral") {
  91501. if (typeof opts === "undefined") {
  91502. return true;
  91503. } else {
  91504. return (0, _shallowEqual.default)(node, opts);
  91505. }
  91506. }
  91507. return false;
  91508. }
  91509. function isYieldExpression(node, opts) {
  91510. if (!node)
  91511. return false;
  91512. const nodeType = node.type;
  91513. if (nodeType === "YieldExpression") {
  91514. if (typeof opts === "undefined") {
  91515. return true;
  91516. } else {
  91517. return (0, _shallowEqual.default)(node, opts);
  91518. }
  91519. }
  91520. return false;
  91521. }
  91522. function isAwaitExpression(node, opts) {
  91523. if (!node)
  91524. return false;
  91525. const nodeType = node.type;
  91526. if (nodeType === "AwaitExpression") {
  91527. if (typeof opts === "undefined") {
  91528. return true;
  91529. } else {
  91530. return (0, _shallowEqual.default)(node, opts);
  91531. }
  91532. }
  91533. return false;
  91534. }
  91535. function isImport(node, opts) {
  91536. if (!node)
  91537. return false;
  91538. const nodeType = node.type;
  91539. if (nodeType === "Import") {
  91540. if (typeof opts === "undefined") {
  91541. return true;
  91542. } else {
  91543. return (0, _shallowEqual.default)(node, opts);
  91544. }
  91545. }
  91546. return false;
  91547. }
  91548. function isBigIntLiteral(node, opts) {
  91549. if (!node)
  91550. return false;
  91551. const nodeType = node.type;
  91552. if (nodeType === "BigIntLiteral") {
  91553. if (typeof opts === "undefined") {
  91554. return true;
  91555. } else {
  91556. return (0, _shallowEqual.default)(node, opts);
  91557. }
  91558. }
  91559. return false;
  91560. }
  91561. function isExportNamespaceSpecifier(node, opts) {
  91562. if (!node)
  91563. return false;
  91564. const nodeType = node.type;
  91565. if (nodeType === "ExportNamespaceSpecifier") {
  91566. if (typeof opts === "undefined") {
  91567. return true;
  91568. } else {
  91569. return (0, _shallowEqual.default)(node, opts);
  91570. }
  91571. }
  91572. return false;
  91573. }
  91574. function isOptionalMemberExpression(node, opts) {
  91575. if (!node)
  91576. return false;
  91577. const nodeType = node.type;
  91578. if (nodeType === "OptionalMemberExpression") {
  91579. if (typeof opts === "undefined") {
  91580. return true;
  91581. } else {
  91582. return (0, _shallowEqual.default)(node, opts);
  91583. }
  91584. }
  91585. return false;
  91586. }
  91587. function isOptionalCallExpression(node, opts) {
  91588. if (!node)
  91589. return false;
  91590. const nodeType = node.type;
  91591. if (nodeType === "OptionalCallExpression") {
  91592. if (typeof opts === "undefined") {
  91593. return true;
  91594. } else {
  91595. return (0, _shallowEqual.default)(node, opts);
  91596. }
  91597. }
  91598. return false;
  91599. }
  91600. function isAnyTypeAnnotation(node, opts) {
  91601. if (!node)
  91602. return false;
  91603. const nodeType = node.type;
  91604. if (nodeType === "AnyTypeAnnotation") {
  91605. if (typeof opts === "undefined") {
  91606. return true;
  91607. } else {
  91608. return (0, _shallowEqual.default)(node, opts);
  91609. }
  91610. }
  91611. return false;
  91612. }
  91613. function isArrayTypeAnnotation(node, opts) {
  91614. if (!node)
  91615. return false;
  91616. const nodeType = node.type;
  91617. if (nodeType === "ArrayTypeAnnotation") {
  91618. if (typeof opts === "undefined") {
  91619. return true;
  91620. } else {
  91621. return (0, _shallowEqual.default)(node, opts);
  91622. }
  91623. }
  91624. return false;
  91625. }
  91626. function isBooleanTypeAnnotation(node, opts) {
  91627. if (!node)
  91628. return false;
  91629. const nodeType = node.type;
  91630. if (nodeType === "BooleanTypeAnnotation") {
  91631. if (typeof opts === "undefined") {
  91632. return true;
  91633. } else {
  91634. return (0, _shallowEqual.default)(node, opts);
  91635. }
  91636. }
  91637. return false;
  91638. }
  91639. function isBooleanLiteralTypeAnnotation(node, opts) {
  91640. if (!node)
  91641. return false;
  91642. const nodeType = node.type;
  91643. if (nodeType === "BooleanLiteralTypeAnnotation") {
  91644. if (typeof opts === "undefined") {
  91645. return true;
  91646. } else {
  91647. return (0, _shallowEqual.default)(node, opts);
  91648. }
  91649. }
  91650. return false;
  91651. }
  91652. function isNullLiteralTypeAnnotation(node, opts) {
  91653. if (!node)
  91654. return false;
  91655. const nodeType = node.type;
  91656. if (nodeType === "NullLiteralTypeAnnotation") {
  91657. if (typeof opts === "undefined") {
  91658. return true;
  91659. } else {
  91660. return (0, _shallowEqual.default)(node, opts);
  91661. }
  91662. }
  91663. return false;
  91664. }
  91665. function isClassImplements(node, opts) {
  91666. if (!node)
  91667. return false;
  91668. const nodeType = node.type;
  91669. if (nodeType === "ClassImplements") {
  91670. if (typeof opts === "undefined") {
  91671. return true;
  91672. } else {
  91673. return (0, _shallowEqual.default)(node, opts);
  91674. }
  91675. }
  91676. return false;
  91677. }
  91678. function isDeclareClass(node, opts) {
  91679. if (!node)
  91680. return false;
  91681. const nodeType = node.type;
  91682. if (nodeType === "DeclareClass") {
  91683. if (typeof opts === "undefined") {
  91684. return true;
  91685. } else {
  91686. return (0, _shallowEqual.default)(node, opts);
  91687. }
  91688. }
  91689. return false;
  91690. }
  91691. function isDeclareFunction(node, opts) {
  91692. if (!node)
  91693. return false;
  91694. const nodeType = node.type;
  91695. if (nodeType === "DeclareFunction") {
  91696. if (typeof opts === "undefined") {
  91697. return true;
  91698. } else {
  91699. return (0, _shallowEqual.default)(node, opts);
  91700. }
  91701. }
  91702. return false;
  91703. }
  91704. function isDeclareInterface(node, opts) {
  91705. if (!node)
  91706. return false;
  91707. const nodeType = node.type;
  91708. if (nodeType === "DeclareInterface") {
  91709. if (typeof opts === "undefined") {
  91710. return true;
  91711. } else {
  91712. return (0, _shallowEqual.default)(node, opts);
  91713. }
  91714. }
  91715. return false;
  91716. }
  91717. function isDeclareModule(node, opts) {
  91718. if (!node)
  91719. return false;
  91720. const nodeType = node.type;
  91721. if (nodeType === "DeclareModule") {
  91722. if (typeof opts === "undefined") {
  91723. return true;
  91724. } else {
  91725. return (0, _shallowEqual.default)(node, opts);
  91726. }
  91727. }
  91728. return false;
  91729. }
  91730. function isDeclareModuleExports(node, opts) {
  91731. if (!node)
  91732. return false;
  91733. const nodeType = node.type;
  91734. if (nodeType === "DeclareModuleExports") {
  91735. if (typeof opts === "undefined") {
  91736. return true;
  91737. } else {
  91738. return (0, _shallowEqual.default)(node, opts);
  91739. }
  91740. }
  91741. return false;
  91742. }
  91743. function isDeclareTypeAlias(node, opts) {
  91744. if (!node)
  91745. return false;
  91746. const nodeType = node.type;
  91747. if (nodeType === "DeclareTypeAlias") {
  91748. if (typeof opts === "undefined") {
  91749. return true;
  91750. } else {
  91751. return (0, _shallowEqual.default)(node, opts);
  91752. }
  91753. }
  91754. return false;
  91755. }
  91756. function isDeclareOpaqueType(node, opts) {
  91757. if (!node)
  91758. return false;
  91759. const nodeType = node.type;
  91760. if (nodeType === "DeclareOpaqueType") {
  91761. if (typeof opts === "undefined") {
  91762. return true;
  91763. } else {
  91764. return (0, _shallowEqual.default)(node, opts);
  91765. }
  91766. }
  91767. return false;
  91768. }
  91769. function isDeclareVariable(node, opts) {
  91770. if (!node)
  91771. return false;
  91772. const nodeType = node.type;
  91773. if (nodeType === "DeclareVariable") {
  91774. if (typeof opts === "undefined") {
  91775. return true;
  91776. } else {
  91777. return (0, _shallowEqual.default)(node, opts);
  91778. }
  91779. }
  91780. return false;
  91781. }
  91782. function isDeclareExportDeclaration(node, opts) {
  91783. if (!node)
  91784. return false;
  91785. const nodeType = node.type;
  91786. if (nodeType === "DeclareExportDeclaration") {
  91787. if (typeof opts === "undefined") {
  91788. return true;
  91789. } else {
  91790. return (0, _shallowEqual.default)(node, opts);
  91791. }
  91792. }
  91793. return false;
  91794. }
  91795. function isDeclareExportAllDeclaration(node, opts) {
  91796. if (!node)
  91797. return false;
  91798. const nodeType = node.type;
  91799. if (nodeType === "DeclareExportAllDeclaration") {
  91800. if (typeof opts === "undefined") {
  91801. return true;
  91802. } else {
  91803. return (0, _shallowEqual.default)(node, opts);
  91804. }
  91805. }
  91806. return false;
  91807. }
  91808. function isDeclaredPredicate(node, opts) {
  91809. if (!node)
  91810. return false;
  91811. const nodeType = node.type;
  91812. if (nodeType === "DeclaredPredicate") {
  91813. if (typeof opts === "undefined") {
  91814. return true;
  91815. } else {
  91816. return (0, _shallowEqual.default)(node, opts);
  91817. }
  91818. }
  91819. return false;
  91820. }
  91821. function isExistsTypeAnnotation(node, opts) {
  91822. if (!node)
  91823. return false;
  91824. const nodeType = node.type;
  91825. if (nodeType === "ExistsTypeAnnotation") {
  91826. if (typeof opts === "undefined") {
  91827. return true;
  91828. } else {
  91829. return (0, _shallowEqual.default)(node, opts);
  91830. }
  91831. }
  91832. return false;
  91833. }
  91834. function isFunctionTypeAnnotation(node, opts) {
  91835. if (!node)
  91836. return false;
  91837. const nodeType = node.type;
  91838. if (nodeType === "FunctionTypeAnnotation") {
  91839. if (typeof opts === "undefined") {
  91840. return true;
  91841. } else {
  91842. return (0, _shallowEqual.default)(node, opts);
  91843. }
  91844. }
  91845. return false;
  91846. }
  91847. function isFunctionTypeParam(node, opts) {
  91848. if (!node)
  91849. return false;
  91850. const nodeType = node.type;
  91851. if (nodeType === "FunctionTypeParam") {
  91852. if (typeof opts === "undefined") {
  91853. return true;
  91854. } else {
  91855. return (0, _shallowEqual.default)(node, opts);
  91856. }
  91857. }
  91858. return false;
  91859. }
  91860. function isGenericTypeAnnotation(node, opts) {
  91861. if (!node)
  91862. return false;
  91863. const nodeType = node.type;
  91864. if (nodeType === "GenericTypeAnnotation") {
  91865. if (typeof opts === "undefined") {
  91866. return true;
  91867. } else {
  91868. return (0, _shallowEqual.default)(node, opts);
  91869. }
  91870. }
  91871. return false;
  91872. }
  91873. function isInferredPredicate(node, opts) {
  91874. if (!node)
  91875. return false;
  91876. const nodeType = node.type;
  91877. if (nodeType === "InferredPredicate") {
  91878. if (typeof opts === "undefined") {
  91879. return true;
  91880. } else {
  91881. return (0, _shallowEqual.default)(node, opts);
  91882. }
  91883. }
  91884. return false;
  91885. }
  91886. function isInterfaceExtends(node, opts) {
  91887. if (!node)
  91888. return false;
  91889. const nodeType = node.type;
  91890. if (nodeType === "InterfaceExtends") {
  91891. if (typeof opts === "undefined") {
  91892. return true;
  91893. } else {
  91894. return (0, _shallowEqual.default)(node, opts);
  91895. }
  91896. }
  91897. return false;
  91898. }
  91899. function isInterfaceDeclaration(node, opts) {
  91900. if (!node)
  91901. return false;
  91902. const nodeType = node.type;
  91903. if (nodeType === "InterfaceDeclaration") {
  91904. if (typeof opts === "undefined") {
  91905. return true;
  91906. } else {
  91907. return (0, _shallowEqual.default)(node, opts);
  91908. }
  91909. }
  91910. return false;
  91911. }
  91912. function isInterfaceTypeAnnotation(node, opts) {
  91913. if (!node)
  91914. return false;
  91915. const nodeType = node.type;
  91916. if (nodeType === "InterfaceTypeAnnotation") {
  91917. if (typeof opts === "undefined") {
  91918. return true;
  91919. } else {
  91920. return (0, _shallowEqual.default)(node, opts);
  91921. }
  91922. }
  91923. return false;
  91924. }
  91925. function isIntersectionTypeAnnotation(node, opts) {
  91926. if (!node)
  91927. return false;
  91928. const nodeType = node.type;
  91929. if (nodeType === "IntersectionTypeAnnotation") {
  91930. if (typeof opts === "undefined") {
  91931. return true;
  91932. } else {
  91933. return (0, _shallowEqual.default)(node, opts);
  91934. }
  91935. }
  91936. return false;
  91937. }
  91938. function isMixedTypeAnnotation(node, opts) {
  91939. if (!node)
  91940. return false;
  91941. const nodeType = node.type;
  91942. if (nodeType === "MixedTypeAnnotation") {
  91943. if (typeof opts === "undefined") {
  91944. return true;
  91945. } else {
  91946. return (0, _shallowEqual.default)(node, opts);
  91947. }
  91948. }
  91949. return false;
  91950. }
  91951. function isEmptyTypeAnnotation(node, opts) {
  91952. if (!node)
  91953. return false;
  91954. const nodeType = node.type;
  91955. if (nodeType === "EmptyTypeAnnotation") {
  91956. if (typeof opts === "undefined") {
  91957. return true;
  91958. } else {
  91959. return (0, _shallowEqual.default)(node, opts);
  91960. }
  91961. }
  91962. return false;
  91963. }
  91964. function isNullableTypeAnnotation(node, opts) {
  91965. if (!node)
  91966. return false;
  91967. const nodeType = node.type;
  91968. if (nodeType === "NullableTypeAnnotation") {
  91969. if (typeof opts === "undefined") {
  91970. return true;
  91971. } else {
  91972. return (0, _shallowEqual.default)(node, opts);
  91973. }
  91974. }
  91975. return false;
  91976. }
  91977. function isNumberLiteralTypeAnnotation(node, opts) {
  91978. if (!node)
  91979. return false;
  91980. const nodeType = node.type;
  91981. if (nodeType === "NumberLiteralTypeAnnotation") {
  91982. if (typeof opts === "undefined") {
  91983. return true;
  91984. } else {
  91985. return (0, _shallowEqual.default)(node, opts);
  91986. }
  91987. }
  91988. return false;
  91989. }
  91990. function isNumberTypeAnnotation(node, opts) {
  91991. if (!node)
  91992. return false;
  91993. const nodeType = node.type;
  91994. if (nodeType === "NumberTypeAnnotation") {
  91995. if (typeof opts === "undefined") {
  91996. return true;
  91997. } else {
  91998. return (0, _shallowEqual.default)(node, opts);
  91999. }
  92000. }
  92001. return false;
  92002. }
  92003. function isObjectTypeAnnotation(node, opts) {
  92004. if (!node)
  92005. return false;
  92006. const nodeType = node.type;
  92007. if (nodeType === "ObjectTypeAnnotation") {
  92008. if (typeof opts === "undefined") {
  92009. return true;
  92010. } else {
  92011. return (0, _shallowEqual.default)(node, opts);
  92012. }
  92013. }
  92014. return false;
  92015. }
  92016. function isObjectTypeInternalSlot(node, opts) {
  92017. if (!node)
  92018. return false;
  92019. const nodeType = node.type;
  92020. if (nodeType === "ObjectTypeInternalSlot") {
  92021. if (typeof opts === "undefined") {
  92022. return true;
  92023. } else {
  92024. return (0, _shallowEqual.default)(node, opts);
  92025. }
  92026. }
  92027. return false;
  92028. }
  92029. function isObjectTypeCallProperty(node, opts) {
  92030. if (!node)
  92031. return false;
  92032. const nodeType = node.type;
  92033. if (nodeType === "ObjectTypeCallProperty") {
  92034. if (typeof opts === "undefined") {
  92035. return true;
  92036. } else {
  92037. return (0, _shallowEqual.default)(node, opts);
  92038. }
  92039. }
  92040. return false;
  92041. }
  92042. function isObjectTypeIndexer(node, opts) {
  92043. if (!node)
  92044. return false;
  92045. const nodeType = node.type;
  92046. if (nodeType === "ObjectTypeIndexer") {
  92047. if (typeof opts === "undefined") {
  92048. return true;
  92049. } else {
  92050. return (0, _shallowEqual.default)(node, opts);
  92051. }
  92052. }
  92053. return false;
  92054. }
  92055. function isObjectTypeProperty(node, opts) {
  92056. if (!node)
  92057. return false;
  92058. const nodeType = node.type;
  92059. if (nodeType === "ObjectTypeProperty") {
  92060. if (typeof opts === "undefined") {
  92061. return true;
  92062. } else {
  92063. return (0, _shallowEqual.default)(node, opts);
  92064. }
  92065. }
  92066. return false;
  92067. }
  92068. function isObjectTypeSpreadProperty(node, opts) {
  92069. if (!node)
  92070. return false;
  92071. const nodeType = node.type;
  92072. if (nodeType === "ObjectTypeSpreadProperty") {
  92073. if (typeof opts === "undefined") {
  92074. return true;
  92075. } else {
  92076. return (0, _shallowEqual.default)(node, opts);
  92077. }
  92078. }
  92079. return false;
  92080. }
  92081. function isOpaqueType(node, opts) {
  92082. if (!node)
  92083. return false;
  92084. const nodeType = node.type;
  92085. if (nodeType === "OpaqueType") {
  92086. if (typeof opts === "undefined") {
  92087. return true;
  92088. } else {
  92089. return (0, _shallowEqual.default)(node, opts);
  92090. }
  92091. }
  92092. return false;
  92093. }
  92094. function isQualifiedTypeIdentifier(node, opts) {
  92095. if (!node)
  92096. return false;
  92097. const nodeType = node.type;
  92098. if (nodeType === "QualifiedTypeIdentifier") {
  92099. if (typeof opts === "undefined") {
  92100. return true;
  92101. } else {
  92102. return (0, _shallowEqual.default)(node, opts);
  92103. }
  92104. }
  92105. return false;
  92106. }
  92107. function isStringLiteralTypeAnnotation(node, opts) {
  92108. if (!node)
  92109. return false;
  92110. const nodeType = node.type;
  92111. if (nodeType === "StringLiteralTypeAnnotation") {
  92112. if (typeof opts === "undefined") {
  92113. return true;
  92114. } else {
  92115. return (0, _shallowEqual.default)(node, opts);
  92116. }
  92117. }
  92118. return false;
  92119. }
  92120. function isStringTypeAnnotation(node, opts) {
  92121. if (!node)
  92122. return false;
  92123. const nodeType = node.type;
  92124. if (nodeType === "StringTypeAnnotation") {
  92125. if (typeof opts === "undefined") {
  92126. return true;
  92127. } else {
  92128. return (0, _shallowEqual.default)(node, opts);
  92129. }
  92130. }
  92131. return false;
  92132. }
  92133. function isSymbolTypeAnnotation(node, opts) {
  92134. if (!node)
  92135. return false;
  92136. const nodeType = node.type;
  92137. if (nodeType === "SymbolTypeAnnotation") {
  92138. if (typeof opts === "undefined") {
  92139. return true;
  92140. } else {
  92141. return (0, _shallowEqual.default)(node, opts);
  92142. }
  92143. }
  92144. return false;
  92145. }
  92146. function isThisTypeAnnotation(node, opts) {
  92147. if (!node)
  92148. return false;
  92149. const nodeType = node.type;
  92150. if (nodeType === "ThisTypeAnnotation") {
  92151. if (typeof opts === "undefined") {
  92152. return true;
  92153. } else {
  92154. return (0, _shallowEqual.default)(node, opts);
  92155. }
  92156. }
  92157. return false;
  92158. }
  92159. function isTupleTypeAnnotation(node, opts) {
  92160. if (!node)
  92161. return false;
  92162. const nodeType = node.type;
  92163. if (nodeType === "TupleTypeAnnotation") {
  92164. if (typeof opts === "undefined") {
  92165. return true;
  92166. } else {
  92167. return (0, _shallowEqual.default)(node, opts);
  92168. }
  92169. }
  92170. return false;
  92171. }
  92172. function isTypeofTypeAnnotation(node, opts) {
  92173. if (!node)
  92174. return false;
  92175. const nodeType = node.type;
  92176. if (nodeType === "TypeofTypeAnnotation") {
  92177. if (typeof opts === "undefined") {
  92178. return true;
  92179. } else {
  92180. return (0, _shallowEqual.default)(node, opts);
  92181. }
  92182. }
  92183. return false;
  92184. }
  92185. function isTypeAlias(node, opts) {
  92186. if (!node)
  92187. return false;
  92188. const nodeType = node.type;
  92189. if (nodeType === "TypeAlias") {
  92190. if (typeof opts === "undefined") {
  92191. return true;
  92192. } else {
  92193. return (0, _shallowEqual.default)(node, opts);
  92194. }
  92195. }
  92196. return false;
  92197. }
  92198. function isTypeAnnotation(node, opts) {
  92199. if (!node)
  92200. return false;
  92201. const nodeType = node.type;
  92202. if (nodeType === "TypeAnnotation") {
  92203. if (typeof opts === "undefined") {
  92204. return true;
  92205. } else {
  92206. return (0, _shallowEqual.default)(node, opts);
  92207. }
  92208. }
  92209. return false;
  92210. }
  92211. function isTypeCastExpression(node, opts) {
  92212. if (!node)
  92213. return false;
  92214. const nodeType = node.type;
  92215. if (nodeType === "TypeCastExpression") {
  92216. if (typeof opts === "undefined") {
  92217. return true;
  92218. } else {
  92219. return (0, _shallowEqual.default)(node, opts);
  92220. }
  92221. }
  92222. return false;
  92223. }
  92224. function isTypeParameter(node, opts) {
  92225. if (!node)
  92226. return false;
  92227. const nodeType = node.type;
  92228. if (nodeType === "TypeParameter") {
  92229. if (typeof opts === "undefined") {
  92230. return true;
  92231. } else {
  92232. return (0, _shallowEqual.default)(node, opts);
  92233. }
  92234. }
  92235. return false;
  92236. }
  92237. function isTypeParameterDeclaration(node, opts) {
  92238. if (!node)
  92239. return false;
  92240. const nodeType = node.type;
  92241. if (nodeType === "TypeParameterDeclaration") {
  92242. if (typeof opts === "undefined") {
  92243. return true;
  92244. } else {
  92245. return (0, _shallowEqual.default)(node, opts);
  92246. }
  92247. }
  92248. return false;
  92249. }
  92250. function isTypeParameterInstantiation(node, opts) {
  92251. if (!node)
  92252. return false;
  92253. const nodeType = node.type;
  92254. if (nodeType === "TypeParameterInstantiation") {
  92255. if (typeof opts === "undefined") {
  92256. return true;
  92257. } else {
  92258. return (0, _shallowEqual.default)(node, opts);
  92259. }
  92260. }
  92261. return false;
  92262. }
  92263. function isUnionTypeAnnotation(node, opts) {
  92264. if (!node)
  92265. return false;
  92266. const nodeType = node.type;
  92267. if (nodeType === "UnionTypeAnnotation") {
  92268. if (typeof opts === "undefined") {
  92269. return true;
  92270. } else {
  92271. return (0, _shallowEqual.default)(node, opts);
  92272. }
  92273. }
  92274. return false;
  92275. }
  92276. function isVariance(node, opts) {
  92277. if (!node)
  92278. return false;
  92279. const nodeType = node.type;
  92280. if (nodeType === "Variance") {
  92281. if (typeof opts === "undefined") {
  92282. return true;
  92283. } else {
  92284. return (0, _shallowEqual.default)(node, opts);
  92285. }
  92286. }
  92287. return false;
  92288. }
  92289. function isVoidTypeAnnotation(node, opts) {
  92290. if (!node)
  92291. return false;
  92292. const nodeType = node.type;
  92293. if (nodeType === "VoidTypeAnnotation") {
  92294. if (typeof opts === "undefined") {
  92295. return true;
  92296. } else {
  92297. return (0, _shallowEqual.default)(node, opts);
  92298. }
  92299. }
  92300. return false;
  92301. }
  92302. function isEnumDeclaration(node, opts) {
  92303. if (!node)
  92304. return false;
  92305. const nodeType = node.type;
  92306. if (nodeType === "EnumDeclaration") {
  92307. if (typeof opts === "undefined") {
  92308. return true;
  92309. } else {
  92310. return (0, _shallowEqual.default)(node, opts);
  92311. }
  92312. }
  92313. return false;
  92314. }
  92315. function isEnumBooleanBody(node, opts) {
  92316. if (!node)
  92317. return false;
  92318. const nodeType = node.type;
  92319. if (nodeType === "EnumBooleanBody") {
  92320. if (typeof opts === "undefined") {
  92321. return true;
  92322. } else {
  92323. return (0, _shallowEqual.default)(node, opts);
  92324. }
  92325. }
  92326. return false;
  92327. }
  92328. function isEnumNumberBody(node, opts) {
  92329. if (!node)
  92330. return false;
  92331. const nodeType = node.type;
  92332. if (nodeType === "EnumNumberBody") {
  92333. if (typeof opts === "undefined") {
  92334. return true;
  92335. } else {
  92336. return (0, _shallowEqual.default)(node, opts);
  92337. }
  92338. }
  92339. return false;
  92340. }
  92341. function isEnumStringBody(node, opts) {
  92342. if (!node)
  92343. return false;
  92344. const nodeType = node.type;
  92345. if (nodeType === "EnumStringBody") {
  92346. if (typeof opts === "undefined") {
  92347. return true;
  92348. } else {
  92349. return (0, _shallowEqual.default)(node, opts);
  92350. }
  92351. }
  92352. return false;
  92353. }
  92354. function isEnumSymbolBody(node, opts) {
  92355. if (!node)
  92356. return false;
  92357. const nodeType = node.type;
  92358. if (nodeType === "EnumSymbolBody") {
  92359. if (typeof opts === "undefined") {
  92360. return true;
  92361. } else {
  92362. return (0, _shallowEqual.default)(node, opts);
  92363. }
  92364. }
  92365. return false;
  92366. }
  92367. function isEnumBooleanMember(node, opts) {
  92368. if (!node)
  92369. return false;
  92370. const nodeType = node.type;
  92371. if (nodeType === "EnumBooleanMember") {
  92372. if (typeof opts === "undefined") {
  92373. return true;
  92374. } else {
  92375. return (0, _shallowEqual.default)(node, opts);
  92376. }
  92377. }
  92378. return false;
  92379. }
  92380. function isEnumNumberMember(node, opts) {
  92381. if (!node)
  92382. return false;
  92383. const nodeType = node.type;
  92384. if (nodeType === "EnumNumberMember") {
  92385. if (typeof opts === "undefined") {
  92386. return true;
  92387. } else {
  92388. return (0, _shallowEqual.default)(node, opts);
  92389. }
  92390. }
  92391. return false;
  92392. }
  92393. function isEnumStringMember(node, opts) {
  92394. if (!node)
  92395. return false;
  92396. const nodeType = node.type;
  92397. if (nodeType === "EnumStringMember") {
  92398. if (typeof opts === "undefined") {
  92399. return true;
  92400. } else {
  92401. return (0, _shallowEqual.default)(node, opts);
  92402. }
  92403. }
  92404. return false;
  92405. }
  92406. function isEnumDefaultedMember(node, opts) {
  92407. if (!node)
  92408. return false;
  92409. const nodeType = node.type;
  92410. if (nodeType === "EnumDefaultedMember") {
  92411. if (typeof opts === "undefined") {
  92412. return true;
  92413. } else {
  92414. return (0, _shallowEqual.default)(node, opts);
  92415. }
  92416. }
  92417. return false;
  92418. }
  92419. function isIndexedAccessType(node, opts) {
  92420. if (!node)
  92421. return false;
  92422. const nodeType = node.type;
  92423. if (nodeType === "IndexedAccessType") {
  92424. if (typeof opts === "undefined") {
  92425. return true;
  92426. } else {
  92427. return (0, _shallowEqual.default)(node, opts);
  92428. }
  92429. }
  92430. return false;
  92431. }
  92432. function isOptionalIndexedAccessType(node, opts) {
  92433. if (!node)
  92434. return false;
  92435. const nodeType = node.type;
  92436. if (nodeType === "OptionalIndexedAccessType") {
  92437. if (typeof opts === "undefined") {
  92438. return true;
  92439. } else {
  92440. return (0, _shallowEqual.default)(node, opts);
  92441. }
  92442. }
  92443. return false;
  92444. }
  92445. function isJSXAttribute(node, opts) {
  92446. if (!node)
  92447. return false;
  92448. const nodeType = node.type;
  92449. if (nodeType === "JSXAttribute") {
  92450. if (typeof opts === "undefined") {
  92451. return true;
  92452. } else {
  92453. return (0, _shallowEqual.default)(node, opts);
  92454. }
  92455. }
  92456. return false;
  92457. }
  92458. function isJSXClosingElement(node, opts) {
  92459. if (!node)
  92460. return false;
  92461. const nodeType = node.type;
  92462. if (nodeType === "JSXClosingElement") {
  92463. if (typeof opts === "undefined") {
  92464. return true;
  92465. } else {
  92466. return (0, _shallowEqual.default)(node, opts);
  92467. }
  92468. }
  92469. return false;
  92470. }
  92471. function isJSXElement2(node, opts) {
  92472. if (!node)
  92473. return false;
  92474. const nodeType = node.type;
  92475. if (nodeType === "JSXElement") {
  92476. if (typeof opts === "undefined") {
  92477. return true;
  92478. } else {
  92479. return (0, _shallowEqual.default)(node, opts);
  92480. }
  92481. }
  92482. return false;
  92483. }
  92484. function isJSXEmptyExpression(node, opts) {
  92485. if (!node)
  92486. return false;
  92487. const nodeType = node.type;
  92488. if (nodeType === "JSXEmptyExpression") {
  92489. if (typeof opts === "undefined") {
  92490. return true;
  92491. } else {
  92492. return (0, _shallowEqual.default)(node, opts);
  92493. }
  92494. }
  92495. return false;
  92496. }
  92497. function isJSXExpressionContainer2(node, opts) {
  92498. if (!node)
  92499. return false;
  92500. const nodeType = node.type;
  92501. if (nodeType === "JSXExpressionContainer") {
  92502. if (typeof opts === "undefined") {
  92503. return true;
  92504. } else {
  92505. return (0, _shallowEqual.default)(node, opts);
  92506. }
  92507. }
  92508. return false;
  92509. }
  92510. function isJSXSpreadChild(node, opts) {
  92511. if (!node)
  92512. return false;
  92513. const nodeType = node.type;
  92514. if (nodeType === "JSXSpreadChild") {
  92515. if (typeof opts === "undefined") {
  92516. return true;
  92517. } else {
  92518. return (0, _shallowEqual.default)(node, opts);
  92519. }
  92520. }
  92521. return false;
  92522. }
  92523. function isJSXIdentifier2(node, opts) {
  92524. if (!node)
  92525. return false;
  92526. const nodeType = node.type;
  92527. if (nodeType === "JSXIdentifier") {
  92528. if (typeof opts === "undefined") {
  92529. return true;
  92530. } else {
  92531. return (0, _shallowEqual.default)(node, opts);
  92532. }
  92533. }
  92534. return false;
  92535. }
  92536. function isJSXMemberExpression(node, opts) {
  92537. if (!node)
  92538. return false;
  92539. const nodeType = node.type;
  92540. if (nodeType === "JSXMemberExpression") {
  92541. if (typeof opts === "undefined") {
  92542. return true;
  92543. } else {
  92544. return (0, _shallowEqual.default)(node, opts);
  92545. }
  92546. }
  92547. return false;
  92548. }
  92549. function isJSXNamespacedName(node, opts) {
  92550. if (!node)
  92551. return false;
  92552. const nodeType = node.type;
  92553. if (nodeType === "JSXNamespacedName") {
  92554. if (typeof opts === "undefined") {
  92555. return true;
  92556. } else {
  92557. return (0, _shallowEqual.default)(node, opts);
  92558. }
  92559. }
  92560. return false;
  92561. }
  92562. function isJSXOpeningElement(node, opts) {
  92563. if (!node)
  92564. return false;
  92565. const nodeType = node.type;
  92566. if (nodeType === "JSXOpeningElement") {
  92567. if (typeof opts === "undefined") {
  92568. return true;
  92569. } else {
  92570. return (0, _shallowEqual.default)(node, opts);
  92571. }
  92572. }
  92573. return false;
  92574. }
  92575. function isJSXSpreadAttribute(node, opts) {
  92576. if (!node)
  92577. return false;
  92578. const nodeType = node.type;
  92579. if (nodeType === "JSXSpreadAttribute") {
  92580. if (typeof opts === "undefined") {
  92581. return true;
  92582. } else {
  92583. return (0, _shallowEqual.default)(node, opts);
  92584. }
  92585. }
  92586. return false;
  92587. }
  92588. function isJSXText(node, opts) {
  92589. if (!node)
  92590. return false;
  92591. const nodeType = node.type;
  92592. if (nodeType === "JSXText") {
  92593. if (typeof opts === "undefined") {
  92594. return true;
  92595. } else {
  92596. return (0, _shallowEqual.default)(node, opts);
  92597. }
  92598. }
  92599. return false;
  92600. }
  92601. function isJSXFragment2(node, opts) {
  92602. if (!node)
  92603. return false;
  92604. const nodeType = node.type;
  92605. if (nodeType === "JSXFragment") {
  92606. if (typeof opts === "undefined") {
  92607. return true;
  92608. } else {
  92609. return (0, _shallowEqual.default)(node, opts);
  92610. }
  92611. }
  92612. return false;
  92613. }
  92614. function isJSXOpeningFragment(node, opts) {
  92615. if (!node)
  92616. return false;
  92617. const nodeType = node.type;
  92618. if (nodeType === "JSXOpeningFragment") {
  92619. if (typeof opts === "undefined") {
  92620. return true;
  92621. } else {
  92622. return (0, _shallowEqual.default)(node, opts);
  92623. }
  92624. }
  92625. return false;
  92626. }
  92627. function isJSXClosingFragment(node, opts) {
  92628. if (!node)
  92629. return false;
  92630. const nodeType = node.type;
  92631. if (nodeType === "JSXClosingFragment") {
  92632. if (typeof opts === "undefined") {
  92633. return true;
  92634. } else {
  92635. return (0, _shallowEqual.default)(node, opts);
  92636. }
  92637. }
  92638. return false;
  92639. }
  92640. function isNoop(node, opts) {
  92641. if (!node)
  92642. return false;
  92643. const nodeType = node.type;
  92644. if (nodeType === "Noop") {
  92645. if (typeof opts === "undefined") {
  92646. return true;
  92647. } else {
  92648. return (0, _shallowEqual.default)(node, opts);
  92649. }
  92650. }
  92651. return false;
  92652. }
  92653. function isPlaceholder(node, opts) {
  92654. if (!node)
  92655. return false;
  92656. const nodeType = node.type;
  92657. if (nodeType === "Placeholder") {
  92658. if (typeof opts === "undefined") {
  92659. return true;
  92660. } else {
  92661. return (0, _shallowEqual.default)(node, opts);
  92662. }
  92663. }
  92664. return false;
  92665. }
  92666. function isV8IntrinsicIdentifier(node, opts) {
  92667. if (!node)
  92668. return false;
  92669. const nodeType = node.type;
  92670. if (nodeType === "V8IntrinsicIdentifier") {
  92671. if (typeof opts === "undefined") {
  92672. return true;
  92673. } else {
  92674. return (0, _shallowEqual.default)(node, opts);
  92675. }
  92676. }
  92677. return false;
  92678. }
  92679. function isArgumentPlaceholder(node, opts) {
  92680. if (!node)
  92681. return false;
  92682. const nodeType = node.type;
  92683. if (nodeType === "ArgumentPlaceholder") {
  92684. if (typeof opts === "undefined") {
  92685. return true;
  92686. } else {
  92687. return (0, _shallowEqual.default)(node, opts);
  92688. }
  92689. }
  92690. return false;
  92691. }
  92692. function isBindExpression(node, opts) {
  92693. if (!node)
  92694. return false;
  92695. const nodeType = node.type;
  92696. if (nodeType === "BindExpression") {
  92697. if (typeof opts === "undefined") {
  92698. return true;
  92699. } else {
  92700. return (0, _shallowEqual.default)(node, opts);
  92701. }
  92702. }
  92703. return false;
  92704. }
  92705. function isClassProperty(node, opts) {
  92706. if (!node)
  92707. return false;
  92708. const nodeType = node.type;
  92709. if (nodeType === "ClassProperty") {
  92710. if (typeof opts === "undefined") {
  92711. return true;
  92712. } else {
  92713. return (0, _shallowEqual.default)(node, opts);
  92714. }
  92715. }
  92716. return false;
  92717. }
  92718. function isPipelineTopicExpression(node, opts) {
  92719. if (!node)
  92720. return false;
  92721. const nodeType = node.type;
  92722. if (nodeType === "PipelineTopicExpression") {
  92723. if (typeof opts === "undefined") {
  92724. return true;
  92725. } else {
  92726. return (0, _shallowEqual.default)(node, opts);
  92727. }
  92728. }
  92729. return false;
  92730. }
  92731. function isPipelineBareFunction(node, opts) {
  92732. if (!node)
  92733. return false;
  92734. const nodeType = node.type;
  92735. if (nodeType === "PipelineBareFunction") {
  92736. if (typeof opts === "undefined") {
  92737. return true;
  92738. } else {
  92739. return (0, _shallowEqual.default)(node, opts);
  92740. }
  92741. }
  92742. return false;
  92743. }
  92744. function isPipelinePrimaryTopicReference(node, opts) {
  92745. if (!node)
  92746. return false;
  92747. const nodeType = node.type;
  92748. if (nodeType === "PipelinePrimaryTopicReference") {
  92749. if (typeof opts === "undefined") {
  92750. return true;
  92751. } else {
  92752. return (0, _shallowEqual.default)(node, opts);
  92753. }
  92754. }
  92755. return false;
  92756. }
  92757. function isClassPrivateProperty(node, opts) {
  92758. if (!node)
  92759. return false;
  92760. const nodeType = node.type;
  92761. if (nodeType === "ClassPrivateProperty") {
  92762. if (typeof opts === "undefined") {
  92763. return true;
  92764. } else {
  92765. return (0, _shallowEqual.default)(node, opts);
  92766. }
  92767. }
  92768. return false;
  92769. }
  92770. function isClassPrivateMethod(node, opts) {
  92771. if (!node)
  92772. return false;
  92773. const nodeType = node.type;
  92774. if (nodeType === "ClassPrivateMethod") {
  92775. if (typeof opts === "undefined") {
  92776. return true;
  92777. } else {
  92778. return (0, _shallowEqual.default)(node, opts);
  92779. }
  92780. }
  92781. return false;
  92782. }
  92783. function isImportAttribute(node, opts) {
  92784. if (!node)
  92785. return false;
  92786. const nodeType = node.type;
  92787. if (nodeType === "ImportAttribute") {
  92788. if (typeof opts === "undefined") {
  92789. return true;
  92790. } else {
  92791. return (0, _shallowEqual.default)(node, opts);
  92792. }
  92793. }
  92794. return false;
  92795. }
  92796. function isDecorator(node, opts) {
  92797. if (!node)
  92798. return false;
  92799. const nodeType = node.type;
  92800. if (nodeType === "Decorator") {
  92801. if (typeof opts === "undefined") {
  92802. return true;
  92803. } else {
  92804. return (0, _shallowEqual.default)(node, opts);
  92805. }
  92806. }
  92807. return false;
  92808. }
  92809. function isDoExpression(node, opts) {
  92810. if (!node)
  92811. return false;
  92812. const nodeType = node.type;
  92813. if (nodeType === "DoExpression") {
  92814. if (typeof opts === "undefined") {
  92815. return true;
  92816. } else {
  92817. return (0, _shallowEqual.default)(node, opts);
  92818. }
  92819. }
  92820. return false;
  92821. }
  92822. function isExportDefaultSpecifier(node, opts) {
  92823. if (!node)
  92824. return false;
  92825. const nodeType = node.type;
  92826. if (nodeType === "ExportDefaultSpecifier") {
  92827. if (typeof opts === "undefined") {
  92828. return true;
  92829. } else {
  92830. return (0, _shallowEqual.default)(node, opts);
  92831. }
  92832. }
  92833. return false;
  92834. }
  92835. function isPrivateName(node, opts) {
  92836. if (!node)
  92837. return false;
  92838. const nodeType = node.type;
  92839. if (nodeType === "PrivateName") {
  92840. if (typeof opts === "undefined") {
  92841. return true;
  92842. } else {
  92843. return (0, _shallowEqual.default)(node, opts);
  92844. }
  92845. }
  92846. return false;
  92847. }
  92848. function isRecordExpression(node, opts) {
  92849. if (!node)
  92850. return false;
  92851. const nodeType = node.type;
  92852. if (nodeType === "RecordExpression") {
  92853. if (typeof opts === "undefined") {
  92854. return true;
  92855. } else {
  92856. return (0, _shallowEqual.default)(node, opts);
  92857. }
  92858. }
  92859. return false;
  92860. }
  92861. function isTupleExpression(node, opts) {
  92862. if (!node)
  92863. return false;
  92864. const nodeType = node.type;
  92865. if (nodeType === "TupleExpression") {
  92866. if (typeof opts === "undefined") {
  92867. return true;
  92868. } else {
  92869. return (0, _shallowEqual.default)(node, opts);
  92870. }
  92871. }
  92872. return false;
  92873. }
  92874. function isDecimalLiteral(node, opts) {
  92875. if (!node)
  92876. return false;
  92877. const nodeType = node.type;
  92878. if (nodeType === "DecimalLiteral") {
  92879. if (typeof opts === "undefined") {
  92880. return true;
  92881. } else {
  92882. return (0, _shallowEqual.default)(node, opts);
  92883. }
  92884. }
  92885. return false;
  92886. }
  92887. function isStaticBlock(node, opts) {
  92888. if (!node)
  92889. return false;
  92890. const nodeType = node.type;
  92891. if (nodeType === "StaticBlock") {
  92892. if (typeof opts === "undefined") {
  92893. return true;
  92894. } else {
  92895. return (0, _shallowEqual.default)(node, opts);
  92896. }
  92897. }
  92898. return false;
  92899. }
  92900. function isModuleExpression(node, opts) {
  92901. if (!node)
  92902. return false;
  92903. const nodeType = node.type;
  92904. if (nodeType === "ModuleExpression") {
  92905. if (typeof opts === "undefined") {
  92906. return true;
  92907. } else {
  92908. return (0, _shallowEqual.default)(node, opts);
  92909. }
  92910. }
  92911. return false;
  92912. }
  92913. function isTSParameterProperty(node, opts) {
  92914. if (!node)
  92915. return false;
  92916. const nodeType = node.type;
  92917. if (nodeType === "TSParameterProperty") {
  92918. if (typeof opts === "undefined") {
  92919. return true;
  92920. } else {
  92921. return (0, _shallowEqual.default)(node, opts);
  92922. }
  92923. }
  92924. return false;
  92925. }
  92926. function isTSDeclareFunction(node, opts) {
  92927. if (!node)
  92928. return false;
  92929. const nodeType = node.type;
  92930. if (nodeType === "TSDeclareFunction") {
  92931. if (typeof opts === "undefined") {
  92932. return true;
  92933. } else {
  92934. return (0, _shallowEqual.default)(node, opts);
  92935. }
  92936. }
  92937. return false;
  92938. }
  92939. function isTSDeclareMethod(node, opts) {
  92940. if (!node)
  92941. return false;
  92942. const nodeType = node.type;
  92943. if (nodeType === "TSDeclareMethod") {
  92944. if (typeof opts === "undefined") {
  92945. return true;
  92946. } else {
  92947. return (0, _shallowEqual.default)(node, opts);
  92948. }
  92949. }
  92950. return false;
  92951. }
  92952. function isTSQualifiedName(node, opts) {
  92953. if (!node)
  92954. return false;
  92955. const nodeType = node.type;
  92956. if (nodeType === "TSQualifiedName") {
  92957. if (typeof opts === "undefined") {
  92958. return true;
  92959. } else {
  92960. return (0, _shallowEqual.default)(node, opts);
  92961. }
  92962. }
  92963. return false;
  92964. }
  92965. function isTSCallSignatureDeclaration(node, opts) {
  92966. if (!node)
  92967. return false;
  92968. const nodeType = node.type;
  92969. if (nodeType === "TSCallSignatureDeclaration") {
  92970. if (typeof opts === "undefined") {
  92971. return true;
  92972. } else {
  92973. return (0, _shallowEqual.default)(node, opts);
  92974. }
  92975. }
  92976. return false;
  92977. }
  92978. function isTSConstructSignatureDeclaration(node, opts) {
  92979. if (!node)
  92980. return false;
  92981. const nodeType = node.type;
  92982. if (nodeType === "TSConstructSignatureDeclaration") {
  92983. if (typeof opts === "undefined") {
  92984. return true;
  92985. } else {
  92986. return (0, _shallowEqual.default)(node, opts);
  92987. }
  92988. }
  92989. return false;
  92990. }
  92991. function isTSPropertySignature(node, opts) {
  92992. if (!node)
  92993. return false;
  92994. const nodeType = node.type;
  92995. if (nodeType === "TSPropertySignature") {
  92996. if (typeof opts === "undefined") {
  92997. return true;
  92998. } else {
  92999. return (0, _shallowEqual.default)(node, opts);
  93000. }
  93001. }
  93002. return false;
  93003. }
  93004. function isTSMethodSignature(node, opts) {
  93005. if (!node)
  93006. return false;
  93007. const nodeType = node.type;
  93008. if (nodeType === "TSMethodSignature") {
  93009. if (typeof opts === "undefined") {
  93010. return true;
  93011. } else {
  93012. return (0, _shallowEqual.default)(node, opts);
  93013. }
  93014. }
  93015. return false;
  93016. }
  93017. function isTSIndexSignature(node, opts) {
  93018. if (!node)
  93019. return false;
  93020. const nodeType = node.type;
  93021. if (nodeType === "TSIndexSignature") {
  93022. if (typeof opts === "undefined") {
  93023. return true;
  93024. } else {
  93025. return (0, _shallowEqual.default)(node, opts);
  93026. }
  93027. }
  93028. return false;
  93029. }
  93030. function isTSAnyKeyword(node, opts) {
  93031. if (!node)
  93032. return false;
  93033. const nodeType = node.type;
  93034. if (nodeType === "TSAnyKeyword") {
  93035. if (typeof opts === "undefined") {
  93036. return true;
  93037. } else {
  93038. return (0, _shallowEqual.default)(node, opts);
  93039. }
  93040. }
  93041. return false;
  93042. }
  93043. function isTSBooleanKeyword(node, opts) {
  93044. if (!node)
  93045. return false;
  93046. const nodeType = node.type;
  93047. if (nodeType === "TSBooleanKeyword") {
  93048. if (typeof opts === "undefined") {
  93049. return true;
  93050. } else {
  93051. return (0, _shallowEqual.default)(node, opts);
  93052. }
  93053. }
  93054. return false;
  93055. }
  93056. function isTSBigIntKeyword(node, opts) {
  93057. if (!node)
  93058. return false;
  93059. const nodeType = node.type;
  93060. if (nodeType === "TSBigIntKeyword") {
  93061. if (typeof opts === "undefined") {
  93062. return true;
  93063. } else {
  93064. return (0, _shallowEqual.default)(node, opts);
  93065. }
  93066. }
  93067. return false;
  93068. }
  93069. function isTSIntrinsicKeyword(node, opts) {
  93070. if (!node)
  93071. return false;
  93072. const nodeType = node.type;
  93073. if (nodeType === "TSIntrinsicKeyword") {
  93074. if (typeof opts === "undefined") {
  93075. return true;
  93076. } else {
  93077. return (0, _shallowEqual.default)(node, opts);
  93078. }
  93079. }
  93080. return false;
  93081. }
  93082. function isTSNeverKeyword(node, opts) {
  93083. if (!node)
  93084. return false;
  93085. const nodeType = node.type;
  93086. if (nodeType === "TSNeverKeyword") {
  93087. if (typeof opts === "undefined") {
  93088. return true;
  93089. } else {
  93090. return (0, _shallowEqual.default)(node, opts);
  93091. }
  93092. }
  93093. return false;
  93094. }
  93095. function isTSNullKeyword(node, opts) {
  93096. if (!node)
  93097. return false;
  93098. const nodeType = node.type;
  93099. if (nodeType === "TSNullKeyword") {
  93100. if (typeof opts === "undefined") {
  93101. return true;
  93102. } else {
  93103. return (0, _shallowEqual.default)(node, opts);
  93104. }
  93105. }
  93106. return false;
  93107. }
  93108. function isTSNumberKeyword(node, opts) {
  93109. if (!node)
  93110. return false;
  93111. const nodeType = node.type;
  93112. if (nodeType === "TSNumberKeyword") {
  93113. if (typeof opts === "undefined") {
  93114. return true;
  93115. } else {
  93116. return (0, _shallowEqual.default)(node, opts);
  93117. }
  93118. }
  93119. return false;
  93120. }
  93121. function isTSObjectKeyword(node, opts) {
  93122. if (!node)
  93123. return false;
  93124. const nodeType = node.type;
  93125. if (nodeType === "TSObjectKeyword") {
  93126. if (typeof opts === "undefined") {
  93127. return true;
  93128. } else {
  93129. return (0, _shallowEqual.default)(node, opts);
  93130. }
  93131. }
  93132. return false;
  93133. }
  93134. function isTSStringKeyword(node, opts) {
  93135. if (!node)
  93136. return false;
  93137. const nodeType = node.type;
  93138. if (nodeType === "TSStringKeyword") {
  93139. if (typeof opts === "undefined") {
  93140. return true;
  93141. } else {
  93142. return (0, _shallowEqual.default)(node, opts);
  93143. }
  93144. }
  93145. return false;
  93146. }
  93147. function isTSSymbolKeyword(node, opts) {
  93148. if (!node)
  93149. return false;
  93150. const nodeType = node.type;
  93151. if (nodeType === "TSSymbolKeyword") {
  93152. if (typeof opts === "undefined") {
  93153. return true;
  93154. } else {
  93155. return (0, _shallowEqual.default)(node, opts);
  93156. }
  93157. }
  93158. return false;
  93159. }
  93160. function isTSUndefinedKeyword(node, opts) {
  93161. if (!node)
  93162. return false;
  93163. const nodeType = node.type;
  93164. if (nodeType === "TSUndefinedKeyword") {
  93165. if (typeof opts === "undefined") {
  93166. return true;
  93167. } else {
  93168. return (0, _shallowEqual.default)(node, opts);
  93169. }
  93170. }
  93171. return false;
  93172. }
  93173. function isTSUnknownKeyword(node, opts) {
  93174. if (!node)
  93175. return false;
  93176. const nodeType = node.type;
  93177. if (nodeType === "TSUnknownKeyword") {
  93178. if (typeof opts === "undefined") {
  93179. return true;
  93180. } else {
  93181. return (0, _shallowEqual.default)(node, opts);
  93182. }
  93183. }
  93184. return false;
  93185. }
  93186. function isTSVoidKeyword(node, opts) {
  93187. if (!node)
  93188. return false;
  93189. const nodeType = node.type;
  93190. if (nodeType === "TSVoidKeyword") {
  93191. if (typeof opts === "undefined") {
  93192. return true;
  93193. } else {
  93194. return (0, _shallowEqual.default)(node, opts);
  93195. }
  93196. }
  93197. return false;
  93198. }
  93199. function isTSThisType(node, opts) {
  93200. if (!node)
  93201. return false;
  93202. const nodeType = node.type;
  93203. if (nodeType === "TSThisType") {
  93204. if (typeof opts === "undefined") {
  93205. return true;
  93206. } else {
  93207. return (0, _shallowEqual.default)(node, opts);
  93208. }
  93209. }
  93210. return false;
  93211. }
  93212. function isTSFunctionType(node, opts) {
  93213. if (!node)
  93214. return false;
  93215. const nodeType = node.type;
  93216. if (nodeType === "TSFunctionType") {
  93217. if (typeof opts === "undefined") {
  93218. return true;
  93219. } else {
  93220. return (0, _shallowEqual.default)(node, opts);
  93221. }
  93222. }
  93223. return false;
  93224. }
  93225. function isTSConstructorType(node, opts) {
  93226. if (!node)
  93227. return false;
  93228. const nodeType = node.type;
  93229. if (nodeType === "TSConstructorType") {
  93230. if (typeof opts === "undefined") {
  93231. return true;
  93232. } else {
  93233. return (0, _shallowEqual.default)(node, opts);
  93234. }
  93235. }
  93236. return false;
  93237. }
  93238. function isTSTypeReference(node, opts) {
  93239. if (!node)
  93240. return false;
  93241. const nodeType = node.type;
  93242. if (nodeType === "TSTypeReference") {
  93243. if (typeof opts === "undefined") {
  93244. return true;
  93245. } else {
  93246. return (0, _shallowEqual.default)(node, opts);
  93247. }
  93248. }
  93249. return false;
  93250. }
  93251. function isTSTypePredicate(node, opts) {
  93252. if (!node)
  93253. return false;
  93254. const nodeType = node.type;
  93255. if (nodeType === "TSTypePredicate") {
  93256. if (typeof opts === "undefined") {
  93257. return true;
  93258. } else {
  93259. return (0, _shallowEqual.default)(node, opts);
  93260. }
  93261. }
  93262. return false;
  93263. }
  93264. function isTSTypeQuery(node, opts) {
  93265. if (!node)
  93266. return false;
  93267. const nodeType = node.type;
  93268. if (nodeType === "TSTypeQuery") {
  93269. if (typeof opts === "undefined") {
  93270. return true;
  93271. } else {
  93272. return (0, _shallowEqual.default)(node, opts);
  93273. }
  93274. }
  93275. return false;
  93276. }
  93277. function isTSTypeLiteral(node, opts) {
  93278. if (!node)
  93279. return false;
  93280. const nodeType = node.type;
  93281. if (nodeType === "TSTypeLiteral") {
  93282. if (typeof opts === "undefined") {
  93283. return true;
  93284. } else {
  93285. return (0, _shallowEqual.default)(node, opts);
  93286. }
  93287. }
  93288. return false;
  93289. }
  93290. function isTSArrayType(node, opts) {
  93291. if (!node)
  93292. return false;
  93293. const nodeType = node.type;
  93294. if (nodeType === "TSArrayType") {
  93295. if (typeof opts === "undefined") {
  93296. return true;
  93297. } else {
  93298. return (0, _shallowEqual.default)(node, opts);
  93299. }
  93300. }
  93301. return false;
  93302. }
  93303. function isTSTupleType(node, opts) {
  93304. if (!node)
  93305. return false;
  93306. const nodeType = node.type;
  93307. if (nodeType === "TSTupleType") {
  93308. if (typeof opts === "undefined") {
  93309. return true;
  93310. } else {
  93311. return (0, _shallowEqual.default)(node, opts);
  93312. }
  93313. }
  93314. return false;
  93315. }
  93316. function isTSOptionalType(node, opts) {
  93317. if (!node)
  93318. return false;
  93319. const nodeType = node.type;
  93320. if (nodeType === "TSOptionalType") {
  93321. if (typeof opts === "undefined") {
  93322. return true;
  93323. } else {
  93324. return (0, _shallowEqual.default)(node, opts);
  93325. }
  93326. }
  93327. return false;
  93328. }
  93329. function isTSRestType(node, opts) {
  93330. if (!node)
  93331. return false;
  93332. const nodeType = node.type;
  93333. if (nodeType === "TSRestType") {
  93334. if (typeof opts === "undefined") {
  93335. return true;
  93336. } else {
  93337. return (0, _shallowEqual.default)(node, opts);
  93338. }
  93339. }
  93340. return false;
  93341. }
  93342. function isTSNamedTupleMember(node, opts) {
  93343. if (!node)
  93344. return false;
  93345. const nodeType = node.type;
  93346. if (nodeType === "TSNamedTupleMember") {
  93347. if (typeof opts === "undefined") {
  93348. return true;
  93349. } else {
  93350. return (0, _shallowEqual.default)(node, opts);
  93351. }
  93352. }
  93353. return false;
  93354. }
  93355. function isTSUnionType(node, opts) {
  93356. if (!node)
  93357. return false;
  93358. const nodeType = node.type;
  93359. if (nodeType === "TSUnionType") {
  93360. if (typeof opts === "undefined") {
  93361. return true;
  93362. } else {
  93363. return (0, _shallowEqual.default)(node, opts);
  93364. }
  93365. }
  93366. return false;
  93367. }
  93368. function isTSIntersectionType(node, opts) {
  93369. if (!node)
  93370. return false;
  93371. const nodeType = node.type;
  93372. if (nodeType === "TSIntersectionType") {
  93373. if (typeof opts === "undefined") {
  93374. return true;
  93375. } else {
  93376. return (0, _shallowEqual.default)(node, opts);
  93377. }
  93378. }
  93379. return false;
  93380. }
  93381. function isTSConditionalType(node, opts) {
  93382. if (!node)
  93383. return false;
  93384. const nodeType = node.type;
  93385. if (nodeType === "TSConditionalType") {
  93386. if (typeof opts === "undefined") {
  93387. return true;
  93388. } else {
  93389. return (0, _shallowEqual.default)(node, opts);
  93390. }
  93391. }
  93392. return false;
  93393. }
  93394. function isTSInferType(node, opts) {
  93395. if (!node)
  93396. return false;
  93397. const nodeType = node.type;
  93398. if (nodeType === "TSInferType") {
  93399. if (typeof opts === "undefined") {
  93400. return true;
  93401. } else {
  93402. return (0, _shallowEqual.default)(node, opts);
  93403. }
  93404. }
  93405. return false;
  93406. }
  93407. function isTSParenthesizedType(node, opts) {
  93408. if (!node)
  93409. return false;
  93410. const nodeType = node.type;
  93411. if (nodeType === "TSParenthesizedType") {
  93412. if (typeof opts === "undefined") {
  93413. return true;
  93414. } else {
  93415. return (0, _shallowEqual.default)(node, opts);
  93416. }
  93417. }
  93418. return false;
  93419. }
  93420. function isTSTypeOperator(node, opts) {
  93421. if (!node)
  93422. return false;
  93423. const nodeType = node.type;
  93424. if (nodeType === "TSTypeOperator") {
  93425. if (typeof opts === "undefined") {
  93426. return true;
  93427. } else {
  93428. return (0, _shallowEqual.default)(node, opts);
  93429. }
  93430. }
  93431. return false;
  93432. }
  93433. function isTSIndexedAccessType(node, opts) {
  93434. if (!node)
  93435. return false;
  93436. const nodeType = node.type;
  93437. if (nodeType === "TSIndexedAccessType") {
  93438. if (typeof opts === "undefined") {
  93439. return true;
  93440. } else {
  93441. return (0, _shallowEqual.default)(node, opts);
  93442. }
  93443. }
  93444. return false;
  93445. }
  93446. function isTSMappedType(node, opts) {
  93447. if (!node)
  93448. return false;
  93449. const nodeType = node.type;
  93450. if (nodeType === "TSMappedType") {
  93451. if (typeof opts === "undefined") {
  93452. return true;
  93453. } else {
  93454. return (0, _shallowEqual.default)(node, opts);
  93455. }
  93456. }
  93457. return false;
  93458. }
  93459. function isTSLiteralType(node, opts) {
  93460. if (!node)
  93461. return false;
  93462. const nodeType = node.type;
  93463. if (nodeType === "TSLiteralType") {
  93464. if (typeof opts === "undefined") {
  93465. return true;
  93466. } else {
  93467. return (0, _shallowEqual.default)(node, opts);
  93468. }
  93469. }
  93470. return false;
  93471. }
  93472. function isTSExpressionWithTypeArguments(node, opts) {
  93473. if (!node)
  93474. return false;
  93475. const nodeType = node.type;
  93476. if (nodeType === "TSExpressionWithTypeArguments") {
  93477. if (typeof opts === "undefined") {
  93478. return true;
  93479. } else {
  93480. return (0, _shallowEqual.default)(node, opts);
  93481. }
  93482. }
  93483. return false;
  93484. }
  93485. function isTSInterfaceDeclaration(node, opts) {
  93486. if (!node)
  93487. return false;
  93488. const nodeType = node.type;
  93489. if (nodeType === "TSInterfaceDeclaration") {
  93490. if (typeof opts === "undefined") {
  93491. return true;
  93492. } else {
  93493. return (0, _shallowEqual.default)(node, opts);
  93494. }
  93495. }
  93496. return false;
  93497. }
  93498. function isTSInterfaceBody(node, opts) {
  93499. if (!node)
  93500. return false;
  93501. const nodeType = node.type;
  93502. if (nodeType === "TSInterfaceBody") {
  93503. if (typeof opts === "undefined") {
  93504. return true;
  93505. } else {
  93506. return (0, _shallowEqual.default)(node, opts);
  93507. }
  93508. }
  93509. return false;
  93510. }
  93511. function isTSTypeAliasDeclaration(node, opts) {
  93512. if (!node)
  93513. return false;
  93514. const nodeType = node.type;
  93515. if (nodeType === "TSTypeAliasDeclaration") {
  93516. if (typeof opts === "undefined") {
  93517. return true;
  93518. } else {
  93519. return (0, _shallowEqual.default)(node, opts);
  93520. }
  93521. }
  93522. return false;
  93523. }
  93524. function isTSAsExpression(node, opts) {
  93525. if (!node)
  93526. return false;
  93527. const nodeType = node.type;
  93528. if (nodeType === "TSAsExpression") {
  93529. if (typeof opts === "undefined") {
  93530. return true;
  93531. } else {
  93532. return (0, _shallowEqual.default)(node, opts);
  93533. }
  93534. }
  93535. return false;
  93536. }
  93537. function isTSTypeAssertion(node, opts) {
  93538. if (!node)
  93539. return false;
  93540. const nodeType = node.type;
  93541. if (nodeType === "TSTypeAssertion") {
  93542. if (typeof opts === "undefined") {
  93543. return true;
  93544. } else {
  93545. return (0, _shallowEqual.default)(node, opts);
  93546. }
  93547. }
  93548. return false;
  93549. }
  93550. function isTSEnumDeclaration(node, opts) {
  93551. if (!node)
  93552. return false;
  93553. const nodeType = node.type;
  93554. if (nodeType === "TSEnumDeclaration") {
  93555. if (typeof opts === "undefined") {
  93556. return true;
  93557. } else {
  93558. return (0, _shallowEqual.default)(node, opts);
  93559. }
  93560. }
  93561. return false;
  93562. }
  93563. function isTSEnumMember(node, opts) {
  93564. if (!node)
  93565. return false;
  93566. const nodeType = node.type;
  93567. if (nodeType === "TSEnumMember") {
  93568. if (typeof opts === "undefined") {
  93569. return true;
  93570. } else {
  93571. return (0, _shallowEqual.default)(node, opts);
  93572. }
  93573. }
  93574. return false;
  93575. }
  93576. function isTSModuleDeclaration(node, opts) {
  93577. if (!node)
  93578. return false;
  93579. const nodeType = node.type;
  93580. if (nodeType === "TSModuleDeclaration") {
  93581. if (typeof opts === "undefined") {
  93582. return true;
  93583. } else {
  93584. return (0, _shallowEqual.default)(node, opts);
  93585. }
  93586. }
  93587. return false;
  93588. }
  93589. function isTSModuleBlock(node, opts) {
  93590. if (!node)
  93591. return false;
  93592. const nodeType = node.type;
  93593. if (nodeType === "TSModuleBlock") {
  93594. if (typeof opts === "undefined") {
  93595. return true;
  93596. } else {
  93597. return (0, _shallowEqual.default)(node, opts);
  93598. }
  93599. }
  93600. return false;
  93601. }
  93602. function isTSImportType(node, opts) {
  93603. if (!node)
  93604. return false;
  93605. const nodeType = node.type;
  93606. if (nodeType === "TSImportType") {
  93607. if (typeof opts === "undefined") {
  93608. return true;
  93609. } else {
  93610. return (0, _shallowEqual.default)(node, opts);
  93611. }
  93612. }
  93613. return false;
  93614. }
  93615. function isTSImportEqualsDeclaration(node, opts) {
  93616. if (!node)
  93617. return false;
  93618. const nodeType = node.type;
  93619. if (nodeType === "TSImportEqualsDeclaration") {
  93620. if (typeof opts === "undefined") {
  93621. return true;
  93622. } else {
  93623. return (0, _shallowEqual.default)(node, opts);
  93624. }
  93625. }
  93626. return false;
  93627. }
  93628. function isTSExternalModuleReference(node, opts) {
  93629. if (!node)
  93630. return false;
  93631. const nodeType = node.type;
  93632. if (nodeType === "TSExternalModuleReference") {
  93633. if (typeof opts === "undefined") {
  93634. return true;
  93635. } else {
  93636. return (0, _shallowEqual.default)(node, opts);
  93637. }
  93638. }
  93639. return false;
  93640. }
  93641. function isTSNonNullExpression(node, opts) {
  93642. if (!node)
  93643. return false;
  93644. const nodeType = node.type;
  93645. if (nodeType === "TSNonNullExpression") {
  93646. if (typeof opts === "undefined") {
  93647. return true;
  93648. } else {
  93649. return (0, _shallowEqual.default)(node, opts);
  93650. }
  93651. }
  93652. return false;
  93653. }
  93654. function isTSExportAssignment(node, opts) {
  93655. if (!node)
  93656. return false;
  93657. const nodeType = node.type;
  93658. if (nodeType === "TSExportAssignment") {
  93659. if (typeof opts === "undefined") {
  93660. return true;
  93661. } else {
  93662. return (0, _shallowEqual.default)(node, opts);
  93663. }
  93664. }
  93665. return false;
  93666. }
  93667. function isTSNamespaceExportDeclaration(node, opts) {
  93668. if (!node)
  93669. return false;
  93670. const nodeType = node.type;
  93671. if (nodeType === "TSNamespaceExportDeclaration") {
  93672. if (typeof opts === "undefined") {
  93673. return true;
  93674. } else {
  93675. return (0, _shallowEqual.default)(node, opts);
  93676. }
  93677. }
  93678. return false;
  93679. }
  93680. function isTSTypeAnnotation(node, opts) {
  93681. if (!node)
  93682. return false;
  93683. const nodeType = node.type;
  93684. if (nodeType === "TSTypeAnnotation") {
  93685. if (typeof opts === "undefined") {
  93686. return true;
  93687. } else {
  93688. return (0, _shallowEqual.default)(node, opts);
  93689. }
  93690. }
  93691. return false;
  93692. }
  93693. function isTSTypeParameterInstantiation(node, opts) {
  93694. if (!node)
  93695. return false;
  93696. const nodeType = node.type;
  93697. if (nodeType === "TSTypeParameterInstantiation") {
  93698. if (typeof opts === "undefined") {
  93699. return true;
  93700. } else {
  93701. return (0, _shallowEqual.default)(node, opts);
  93702. }
  93703. }
  93704. return false;
  93705. }
  93706. function isTSTypeParameterDeclaration(node, opts) {
  93707. if (!node)
  93708. return false;
  93709. const nodeType = node.type;
  93710. if (nodeType === "TSTypeParameterDeclaration") {
  93711. if (typeof opts === "undefined") {
  93712. return true;
  93713. } else {
  93714. return (0, _shallowEqual.default)(node, opts);
  93715. }
  93716. }
  93717. return false;
  93718. }
  93719. function isTSTypeParameter(node, opts) {
  93720. if (!node)
  93721. return false;
  93722. const nodeType = node.type;
  93723. if (nodeType === "TSTypeParameter") {
  93724. if (typeof opts === "undefined") {
  93725. return true;
  93726. } else {
  93727. return (0, _shallowEqual.default)(node, opts);
  93728. }
  93729. }
  93730. return false;
  93731. }
  93732. function isExpression(node, opts) {
  93733. if (!node)
  93734. return false;
  93735. const nodeType = node.type;
  93736. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  93737. if (typeof opts === "undefined") {
  93738. return true;
  93739. } else {
  93740. return (0, _shallowEqual.default)(node, opts);
  93741. }
  93742. }
  93743. return false;
  93744. }
  93745. function isBinary(node, opts) {
  93746. if (!node)
  93747. return false;
  93748. const nodeType = node.type;
  93749. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  93750. if (typeof opts === "undefined") {
  93751. return true;
  93752. } else {
  93753. return (0, _shallowEqual.default)(node, opts);
  93754. }
  93755. }
  93756. return false;
  93757. }
  93758. function isScopable(node, opts) {
  93759. if (!node)
  93760. return false;
  93761. const nodeType = node.type;
  93762. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  93763. if (typeof opts === "undefined") {
  93764. return true;
  93765. } else {
  93766. return (0, _shallowEqual.default)(node, opts);
  93767. }
  93768. }
  93769. return false;
  93770. }
  93771. function isBlockParent(node, opts) {
  93772. if (!node)
  93773. return false;
  93774. const nodeType = node.type;
  93775. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  93776. if (typeof opts === "undefined") {
  93777. return true;
  93778. } else {
  93779. return (0, _shallowEqual.default)(node, opts);
  93780. }
  93781. }
  93782. return false;
  93783. }
  93784. function isBlock(node, opts) {
  93785. if (!node)
  93786. return false;
  93787. const nodeType = node.type;
  93788. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  93789. if (typeof opts === "undefined") {
  93790. return true;
  93791. } else {
  93792. return (0, _shallowEqual.default)(node, opts);
  93793. }
  93794. }
  93795. return false;
  93796. }
  93797. function isStatement(node, opts) {
  93798. if (!node)
  93799. return false;
  93800. const nodeType = node.type;
  93801. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  93802. if (typeof opts === "undefined") {
  93803. return true;
  93804. } else {
  93805. return (0, _shallowEqual.default)(node, opts);
  93806. }
  93807. }
  93808. return false;
  93809. }
  93810. function isTerminatorless(node, opts) {
  93811. if (!node)
  93812. return false;
  93813. const nodeType = node.type;
  93814. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  93815. if (typeof opts === "undefined") {
  93816. return true;
  93817. } else {
  93818. return (0, _shallowEqual.default)(node, opts);
  93819. }
  93820. }
  93821. return false;
  93822. }
  93823. function isCompletionStatement(node, opts) {
  93824. if (!node)
  93825. return false;
  93826. const nodeType = node.type;
  93827. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  93828. if (typeof opts === "undefined") {
  93829. return true;
  93830. } else {
  93831. return (0, _shallowEqual.default)(node, opts);
  93832. }
  93833. }
  93834. return false;
  93835. }
  93836. function isConditional(node, opts) {
  93837. if (!node)
  93838. return false;
  93839. const nodeType = node.type;
  93840. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  93841. if (typeof opts === "undefined") {
  93842. return true;
  93843. } else {
  93844. return (0, _shallowEqual.default)(node, opts);
  93845. }
  93846. }
  93847. return false;
  93848. }
  93849. function isLoop(node, opts) {
  93850. if (!node)
  93851. return false;
  93852. const nodeType = node.type;
  93853. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  93854. if (typeof opts === "undefined") {
  93855. return true;
  93856. } else {
  93857. return (0, _shallowEqual.default)(node, opts);
  93858. }
  93859. }
  93860. return false;
  93861. }
  93862. function isWhile(node, opts) {
  93863. if (!node)
  93864. return false;
  93865. const nodeType = node.type;
  93866. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  93867. if (typeof opts === "undefined") {
  93868. return true;
  93869. } else {
  93870. return (0, _shallowEqual.default)(node, opts);
  93871. }
  93872. }
  93873. return false;
  93874. }
  93875. function isExpressionWrapper(node, opts) {
  93876. if (!node)
  93877. return false;
  93878. const nodeType = node.type;
  93879. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  93880. if (typeof opts === "undefined") {
  93881. return true;
  93882. } else {
  93883. return (0, _shallowEqual.default)(node, opts);
  93884. }
  93885. }
  93886. return false;
  93887. }
  93888. function isFor(node, opts) {
  93889. if (!node)
  93890. return false;
  93891. const nodeType = node.type;
  93892. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  93893. if (typeof opts === "undefined") {
  93894. return true;
  93895. } else {
  93896. return (0, _shallowEqual.default)(node, opts);
  93897. }
  93898. }
  93899. return false;
  93900. }
  93901. function isForXStatement(node, opts) {
  93902. if (!node)
  93903. return false;
  93904. const nodeType = node.type;
  93905. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  93906. if (typeof opts === "undefined") {
  93907. return true;
  93908. } else {
  93909. return (0, _shallowEqual.default)(node, opts);
  93910. }
  93911. }
  93912. return false;
  93913. }
  93914. function isFunction(node, opts) {
  93915. if (!node)
  93916. return false;
  93917. const nodeType = node.type;
  93918. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  93919. if (typeof opts === "undefined") {
  93920. return true;
  93921. } else {
  93922. return (0, _shallowEqual.default)(node, opts);
  93923. }
  93924. }
  93925. return false;
  93926. }
  93927. function isFunctionParent(node, opts) {
  93928. if (!node)
  93929. return false;
  93930. const nodeType = node.type;
  93931. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  93932. if (typeof opts === "undefined") {
  93933. return true;
  93934. } else {
  93935. return (0, _shallowEqual.default)(node, opts);
  93936. }
  93937. }
  93938. return false;
  93939. }
  93940. function isPureish(node, opts) {
  93941. if (!node)
  93942. return false;
  93943. const nodeType = node.type;
  93944. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  93945. if (typeof opts === "undefined") {
  93946. return true;
  93947. } else {
  93948. return (0, _shallowEqual.default)(node, opts);
  93949. }
  93950. }
  93951. return false;
  93952. }
  93953. function isDeclaration2(node, opts) {
  93954. if (!node)
  93955. return false;
  93956. const nodeType = node.type;
  93957. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  93958. if (typeof opts === "undefined") {
  93959. return true;
  93960. } else {
  93961. return (0, _shallowEqual.default)(node, opts);
  93962. }
  93963. }
  93964. return false;
  93965. }
  93966. function isPatternLike(node, opts) {
  93967. if (!node)
  93968. return false;
  93969. const nodeType = node.type;
  93970. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  93971. if (typeof opts === "undefined") {
  93972. return true;
  93973. } else {
  93974. return (0, _shallowEqual.default)(node, opts);
  93975. }
  93976. }
  93977. return false;
  93978. }
  93979. function isLVal(node, opts) {
  93980. if (!node)
  93981. return false;
  93982. const nodeType = node.type;
  93983. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  93984. if (typeof opts === "undefined") {
  93985. return true;
  93986. } else {
  93987. return (0, _shallowEqual.default)(node, opts);
  93988. }
  93989. }
  93990. return false;
  93991. }
  93992. function isTSEntityName(node, opts) {
  93993. if (!node)
  93994. return false;
  93995. const nodeType = node.type;
  93996. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  93997. if (typeof opts === "undefined") {
  93998. return true;
  93999. } else {
  94000. return (0, _shallowEqual.default)(node, opts);
  94001. }
  94002. }
  94003. return false;
  94004. }
  94005. function isLiteral(node, opts) {
  94006. if (!node)
  94007. return false;
  94008. const nodeType = node.type;
  94009. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  94010. if (typeof opts === "undefined") {
  94011. return true;
  94012. } else {
  94013. return (0, _shallowEqual.default)(node, opts);
  94014. }
  94015. }
  94016. return false;
  94017. }
  94018. function isImmutable(node, opts) {
  94019. if (!node)
  94020. return false;
  94021. const nodeType = node.type;
  94022. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  94023. if (typeof opts === "undefined") {
  94024. return true;
  94025. } else {
  94026. return (0, _shallowEqual.default)(node, opts);
  94027. }
  94028. }
  94029. return false;
  94030. }
  94031. function isUserWhitespacable(node, opts) {
  94032. if (!node)
  94033. return false;
  94034. const nodeType = node.type;
  94035. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  94036. if (typeof opts === "undefined") {
  94037. return true;
  94038. } else {
  94039. return (0, _shallowEqual.default)(node, opts);
  94040. }
  94041. }
  94042. return false;
  94043. }
  94044. function isMethod(node, opts) {
  94045. if (!node)
  94046. return false;
  94047. const nodeType = node.type;
  94048. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  94049. if (typeof opts === "undefined") {
  94050. return true;
  94051. } else {
  94052. return (0, _shallowEqual.default)(node, opts);
  94053. }
  94054. }
  94055. return false;
  94056. }
  94057. function isObjectMember(node, opts) {
  94058. if (!node)
  94059. return false;
  94060. const nodeType = node.type;
  94061. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  94062. if (typeof opts === "undefined") {
  94063. return true;
  94064. } else {
  94065. return (0, _shallowEqual.default)(node, opts);
  94066. }
  94067. }
  94068. return false;
  94069. }
  94070. function isProperty(node, opts) {
  94071. if (!node)
  94072. return false;
  94073. const nodeType = node.type;
  94074. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  94075. if (typeof opts === "undefined") {
  94076. return true;
  94077. } else {
  94078. return (0, _shallowEqual.default)(node, opts);
  94079. }
  94080. }
  94081. return false;
  94082. }
  94083. function isUnaryLike(node, opts) {
  94084. if (!node)
  94085. return false;
  94086. const nodeType = node.type;
  94087. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  94088. if (typeof opts === "undefined") {
  94089. return true;
  94090. } else {
  94091. return (0, _shallowEqual.default)(node, opts);
  94092. }
  94093. }
  94094. return false;
  94095. }
  94096. function isPattern(node, opts) {
  94097. if (!node)
  94098. return false;
  94099. const nodeType = node.type;
  94100. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  94101. if (typeof opts === "undefined") {
  94102. return true;
  94103. } else {
  94104. return (0, _shallowEqual.default)(node, opts);
  94105. }
  94106. }
  94107. return false;
  94108. }
  94109. function isClass(node, opts) {
  94110. if (!node)
  94111. return false;
  94112. const nodeType = node.type;
  94113. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  94114. if (typeof opts === "undefined") {
  94115. return true;
  94116. } else {
  94117. return (0, _shallowEqual.default)(node, opts);
  94118. }
  94119. }
  94120. return false;
  94121. }
  94122. function isModuleDeclaration(node, opts) {
  94123. if (!node)
  94124. return false;
  94125. const nodeType = node.type;
  94126. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  94127. if (typeof opts === "undefined") {
  94128. return true;
  94129. } else {
  94130. return (0, _shallowEqual.default)(node, opts);
  94131. }
  94132. }
  94133. return false;
  94134. }
  94135. function isExportDeclaration(node, opts) {
  94136. if (!node)
  94137. return false;
  94138. const nodeType = node.type;
  94139. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  94140. if (typeof opts === "undefined") {
  94141. return true;
  94142. } else {
  94143. return (0, _shallowEqual.default)(node, opts);
  94144. }
  94145. }
  94146. return false;
  94147. }
  94148. function isModuleSpecifier(node, opts) {
  94149. if (!node)
  94150. return false;
  94151. const nodeType = node.type;
  94152. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  94153. if (typeof opts === "undefined") {
  94154. return true;
  94155. } else {
  94156. return (0, _shallowEqual.default)(node, opts);
  94157. }
  94158. }
  94159. return false;
  94160. }
  94161. function isFlow(node, opts) {
  94162. if (!node)
  94163. return false;
  94164. const nodeType = node.type;
  94165. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  94166. if (typeof opts === "undefined") {
  94167. return true;
  94168. } else {
  94169. return (0, _shallowEqual.default)(node, opts);
  94170. }
  94171. }
  94172. return false;
  94173. }
  94174. function isFlowType(node, opts) {
  94175. if (!node)
  94176. return false;
  94177. const nodeType = node.type;
  94178. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  94179. if (typeof opts === "undefined") {
  94180. return true;
  94181. } else {
  94182. return (0, _shallowEqual.default)(node, opts);
  94183. }
  94184. }
  94185. return false;
  94186. }
  94187. function isFlowBaseAnnotation(node, opts) {
  94188. if (!node)
  94189. return false;
  94190. const nodeType = node.type;
  94191. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  94192. if (typeof opts === "undefined") {
  94193. return true;
  94194. } else {
  94195. return (0, _shallowEqual.default)(node, opts);
  94196. }
  94197. }
  94198. return false;
  94199. }
  94200. function isFlowDeclaration(node, opts) {
  94201. if (!node)
  94202. return false;
  94203. const nodeType = node.type;
  94204. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  94205. if (typeof opts === "undefined") {
  94206. return true;
  94207. } else {
  94208. return (0, _shallowEqual.default)(node, opts);
  94209. }
  94210. }
  94211. return false;
  94212. }
  94213. function isFlowPredicate(node, opts) {
  94214. if (!node)
  94215. return false;
  94216. const nodeType = node.type;
  94217. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  94218. if (typeof opts === "undefined") {
  94219. return true;
  94220. } else {
  94221. return (0, _shallowEqual.default)(node, opts);
  94222. }
  94223. }
  94224. return false;
  94225. }
  94226. function isEnumBody(node, opts) {
  94227. if (!node)
  94228. return false;
  94229. const nodeType = node.type;
  94230. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  94231. if (typeof opts === "undefined") {
  94232. return true;
  94233. } else {
  94234. return (0, _shallowEqual.default)(node, opts);
  94235. }
  94236. }
  94237. return false;
  94238. }
  94239. function isEnumMember(node, opts) {
  94240. if (!node)
  94241. return false;
  94242. const nodeType = node.type;
  94243. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  94244. if (typeof opts === "undefined") {
  94245. return true;
  94246. } else {
  94247. return (0, _shallowEqual.default)(node, opts);
  94248. }
  94249. }
  94250. return false;
  94251. }
  94252. function isJSX(node, opts) {
  94253. if (!node)
  94254. return false;
  94255. const nodeType = node.type;
  94256. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  94257. if (typeof opts === "undefined") {
  94258. return true;
  94259. } else {
  94260. return (0, _shallowEqual.default)(node, opts);
  94261. }
  94262. }
  94263. return false;
  94264. }
  94265. function isPrivate(node, opts) {
  94266. if (!node)
  94267. return false;
  94268. const nodeType = node.type;
  94269. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  94270. if (typeof opts === "undefined") {
  94271. return true;
  94272. } else {
  94273. return (0, _shallowEqual.default)(node, opts);
  94274. }
  94275. }
  94276. return false;
  94277. }
  94278. function isTSTypeElement(node, opts) {
  94279. if (!node)
  94280. return false;
  94281. const nodeType = node.type;
  94282. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  94283. if (typeof opts === "undefined") {
  94284. return true;
  94285. } else {
  94286. return (0, _shallowEqual.default)(node, opts);
  94287. }
  94288. }
  94289. return false;
  94290. }
  94291. function isTSType(node, opts) {
  94292. if (!node)
  94293. return false;
  94294. const nodeType = node.type;
  94295. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  94296. if (typeof opts === "undefined") {
  94297. return true;
  94298. } else {
  94299. return (0, _shallowEqual.default)(node, opts);
  94300. }
  94301. }
  94302. return false;
  94303. }
  94304. function isTSBaseType(node, opts) {
  94305. if (!node)
  94306. return false;
  94307. const nodeType = node.type;
  94308. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  94309. if (typeof opts === "undefined") {
  94310. return true;
  94311. } else {
  94312. return (0, _shallowEqual.default)(node, opts);
  94313. }
  94314. }
  94315. return false;
  94316. }
  94317. function isNumberLiteral(node, opts) {
  94318. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  94319. if (!node)
  94320. return false;
  94321. const nodeType = node.type;
  94322. if (nodeType === "NumberLiteral") {
  94323. if (typeof opts === "undefined") {
  94324. return true;
  94325. } else {
  94326. return (0, _shallowEqual.default)(node, opts);
  94327. }
  94328. }
  94329. return false;
  94330. }
  94331. function isRegexLiteral(node, opts) {
  94332. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  94333. if (!node)
  94334. return false;
  94335. const nodeType = node.type;
  94336. if (nodeType === "RegexLiteral") {
  94337. if (typeof opts === "undefined") {
  94338. return true;
  94339. } else {
  94340. return (0, _shallowEqual.default)(node, opts);
  94341. }
  94342. }
  94343. return false;
  94344. }
  94345. function isRestProperty(node, opts) {
  94346. console.trace("The node type RestProperty has been renamed to RestElement");
  94347. if (!node)
  94348. return false;
  94349. const nodeType = node.type;
  94350. if (nodeType === "RestProperty") {
  94351. if (typeof opts === "undefined") {
  94352. return true;
  94353. } else {
  94354. return (0, _shallowEqual.default)(node, opts);
  94355. }
  94356. }
  94357. return false;
  94358. }
  94359. function isSpreadProperty(node, opts) {
  94360. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  94361. if (!node)
  94362. return false;
  94363. const nodeType = node.type;
  94364. if (nodeType === "SpreadProperty") {
  94365. if (typeof opts === "undefined") {
  94366. return true;
  94367. } else {
  94368. return (0, _shallowEqual.default)(node, opts);
  94369. }
  94370. }
  94371. return false;
  94372. }
  94373. }
  94374. });
  94375. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/matchesPattern.js
  94376. var require_matchesPattern4 = __commonJS({
  94377. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  94378. "use strict";
  94379. Object.defineProperty(exports, "__esModule", {
  94380. value: true
  94381. });
  94382. exports.default = matchesPattern;
  94383. var _generated = require_generated16();
  94384. function matchesPattern(member, match, allowPartial) {
  94385. if (!(0, _generated.isMemberExpression)(member))
  94386. return false;
  94387. const parts = Array.isArray(match) ? match : match.split(".");
  94388. const nodes = [];
  94389. let node;
  94390. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  94391. nodes.push(node.property);
  94392. }
  94393. nodes.push(node);
  94394. if (nodes.length < parts.length)
  94395. return false;
  94396. if (!allowPartial && nodes.length > parts.length)
  94397. return false;
  94398. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  94399. const node2 = nodes[j];
  94400. let value;
  94401. if ((0, _generated.isIdentifier)(node2)) {
  94402. value = node2.name;
  94403. } else if ((0, _generated.isStringLiteral)(node2)) {
  94404. value = node2.value;
  94405. } else if ((0, _generated.isThisExpression)(node2)) {
  94406. value = "this";
  94407. } else {
  94408. return false;
  94409. }
  94410. if (parts[i] !== value)
  94411. return false;
  94412. }
  94413. return true;
  94414. }
  94415. }
  94416. });
  94417. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  94418. var require_buildMatchMemberExpression4 = __commonJS({
  94419. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  94420. "use strict";
  94421. Object.defineProperty(exports, "__esModule", {
  94422. value: true
  94423. });
  94424. exports.default = buildMatchMemberExpression;
  94425. var _matchesPattern = require_matchesPattern4();
  94426. function buildMatchMemberExpression(match, allowPartial) {
  94427. const parts = match.split(".");
  94428. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  94429. }
  94430. }
  94431. });
  94432. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  94433. var require_isReactComponent4 = __commonJS({
  94434. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  94435. "use strict";
  94436. Object.defineProperty(exports, "__esModule", {
  94437. value: true
  94438. });
  94439. exports.default = void 0;
  94440. var _buildMatchMemberExpression = require_buildMatchMemberExpression4();
  94441. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  94442. var _default = isReactComponent;
  94443. exports.default = _default;
  94444. }
  94445. });
  94446. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  94447. var require_isCompatTag4 = __commonJS({
  94448. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  94449. "use strict";
  94450. Object.defineProperty(exports, "__esModule", {
  94451. value: true
  94452. });
  94453. exports.default = isCompatTag;
  94454. function isCompatTag(tagName) {
  94455. return !!tagName && /^[a-z]/.test(tagName);
  94456. }
  94457. }
  94458. });
  94459. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isType.js
  94460. var require_isType4 = __commonJS({
  94461. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  94462. "use strict";
  94463. Object.defineProperty(exports, "__esModule", {
  94464. value: true
  94465. });
  94466. exports.default = isType;
  94467. var _definitions = require_definitions4();
  94468. function isType(nodeType, targetType) {
  94469. if (nodeType === targetType)
  94470. return true;
  94471. if (_definitions.ALIAS_KEYS[targetType])
  94472. return false;
  94473. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  94474. if (aliases) {
  94475. if (aliases[0] === nodeType)
  94476. return true;
  94477. for (const alias of aliases) {
  94478. if (nodeType === alias)
  94479. return true;
  94480. }
  94481. }
  94482. return false;
  94483. }
  94484. }
  94485. });
  94486. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  94487. var require_isPlaceholderType4 = __commonJS({
  94488. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  94489. "use strict";
  94490. Object.defineProperty(exports, "__esModule", {
  94491. value: true
  94492. });
  94493. exports.default = isPlaceholderType;
  94494. var _definitions = require_definitions4();
  94495. function isPlaceholderType(placeholderType, targetType) {
  94496. if (placeholderType === targetType)
  94497. return true;
  94498. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  94499. if (aliases) {
  94500. for (const alias of aliases) {
  94501. if (targetType === alias)
  94502. return true;
  94503. }
  94504. }
  94505. return false;
  94506. }
  94507. }
  94508. });
  94509. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/is.js
  94510. var require_is4 = __commonJS({
  94511. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/is.js"(exports) {
  94512. "use strict";
  94513. Object.defineProperty(exports, "__esModule", {
  94514. value: true
  94515. });
  94516. exports.default = is;
  94517. var _shallowEqual = require_shallowEqual4();
  94518. var _isType = require_isType4();
  94519. var _isPlaceholderType = require_isPlaceholderType4();
  94520. var _definitions = require_definitions4();
  94521. function is(type, node, opts) {
  94522. if (!node)
  94523. return false;
  94524. const matches = (0, _isType.default)(node.type, type);
  94525. if (!matches) {
  94526. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  94527. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  94528. }
  94529. return false;
  94530. }
  94531. if (typeof opts === "undefined") {
  94532. return true;
  94533. } else {
  94534. return (0, _shallowEqual.default)(node, opts);
  94535. }
  94536. }
  94537. }
  94538. });
  94539. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  94540. var require_identifier6 = __commonJS({
  94541. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  94542. "use strict";
  94543. Object.defineProperty(exports, "__esModule", {
  94544. value: true
  94545. });
  94546. exports.isIdentifierStart = isIdentifierStart2;
  94547. exports.isIdentifierChar = isIdentifierChar2;
  94548. exports.isIdentifierName = isIdentifierName;
  94549. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  94550. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  94551. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  94552. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  94553. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  94554. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  94555. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  94556. function isInAstralSet2(code2, set) {
  94557. let pos = 65536;
  94558. for (let i = 0, length = set.length; i < length; i += 2) {
  94559. pos += set[i];
  94560. if (pos > code2)
  94561. return false;
  94562. pos += set[i + 1];
  94563. if (pos >= code2)
  94564. return true;
  94565. }
  94566. return false;
  94567. }
  94568. function isIdentifierStart2(code2) {
  94569. if (code2 < 65)
  94570. return code2 === 36;
  94571. if (code2 <= 90)
  94572. return true;
  94573. if (code2 < 97)
  94574. return code2 === 95;
  94575. if (code2 <= 122)
  94576. return true;
  94577. if (code2 <= 65535) {
  94578. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  94579. }
  94580. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  94581. }
  94582. function isIdentifierChar2(code2) {
  94583. if (code2 < 48)
  94584. return code2 === 36;
  94585. if (code2 < 58)
  94586. return true;
  94587. if (code2 < 65)
  94588. return false;
  94589. if (code2 <= 90)
  94590. return true;
  94591. if (code2 < 97)
  94592. return code2 === 95;
  94593. if (code2 <= 122)
  94594. return true;
  94595. if (code2 <= 65535) {
  94596. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  94597. }
  94598. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  94599. }
  94600. function isIdentifierName(name2) {
  94601. let isFirst = true;
  94602. for (let i = 0; i < name2.length; i++) {
  94603. let cp = name2.charCodeAt(i);
  94604. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  94605. const trail = name2.charCodeAt(++i);
  94606. if ((trail & 64512) === 56320) {
  94607. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  94608. }
  94609. }
  94610. if (isFirst) {
  94611. isFirst = false;
  94612. if (!isIdentifierStart2(cp)) {
  94613. return false;
  94614. }
  94615. } else if (!isIdentifierChar2(cp)) {
  94616. return false;
  94617. }
  94618. }
  94619. return !isFirst;
  94620. }
  94621. }
  94622. });
  94623. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  94624. var require_keyword6 = __commonJS({
  94625. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  94626. "use strict";
  94627. Object.defineProperty(exports, "__esModule", {
  94628. value: true
  94629. });
  94630. exports.isReservedWord = isReservedWord;
  94631. exports.isStrictReservedWord = isStrictReservedWord;
  94632. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  94633. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  94634. exports.isKeyword = isKeyword;
  94635. var reservedWords2 = {
  94636. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  94637. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  94638. strictBind: ["eval", "arguments"]
  94639. };
  94640. var keywords2 = new Set(reservedWords2.keyword);
  94641. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  94642. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  94643. function isReservedWord(word, inModule) {
  94644. return inModule && word === "await" || word === "enum";
  94645. }
  94646. function isStrictReservedWord(word, inModule) {
  94647. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  94648. }
  94649. function isStrictBindOnlyReservedWord(word) {
  94650. return reservedWordsStrictBindSet.has(word);
  94651. }
  94652. function isStrictBindReservedWord(word, inModule) {
  94653. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  94654. }
  94655. function isKeyword(word) {
  94656. return keywords2.has(word);
  94657. }
  94658. }
  94659. });
  94660. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/index.js
  94661. var require_lib23 = __commonJS({
  94662. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  94663. "use strict";
  94664. Object.defineProperty(exports, "__esModule", {
  94665. value: true
  94666. });
  94667. Object.defineProperty(exports, "isIdentifierName", {
  94668. enumerable: true,
  94669. get: function() {
  94670. return _identifier.isIdentifierName;
  94671. }
  94672. });
  94673. Object.defineProperty(exports, "isIdentifierChar", {
  94674. enumerable: true,
  94675. get: function() {
  94676. return _identifier.isIdentifierChar;
  94677. }
  94678. });
  94679. Object.defineProperty(exports, "isIdentifierStart", {
  94680. enumerable: true,
  94681. get: function() {
  94682. return _identifier.isIdentifierStart;
  94683. }
  94684. });
  94685. Object.defineProperty(exports, "isReservedWord", {
  94686. enumerable: true,
  94687. get: function() {
  94688. return _keyword.isReservedWord;
  94689. }
  94690. });
  94691. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  94692. enumerable: true,
  94693. get: function() {
  94694. return _keyword.isStrictBindOnlyReservedWord;
  94695. }
  94696. });
  94697. Object.defineProperty(exports, "isStrictBindReservedWord", {
  94698. enumerable: true,
  94699. get: function() {
  94700. return _keyword.isStrictBindReservedWord;
  94701. }
  94702. });
  94703. Object.defineProperty(exports, "isStrictReservedWord", {
  94704. enumerable: true,
  94705. get: function() {
  94706. return _keyword.isStrictReservedWord;
  94707. }
  94708. });
  94709. Object.defineProperty(exports, "isKeyword", {
  94710. enumerable: true,
  94711. get: function() {
  94712. return _keyword.isKeyword;
  94713. }
  94714. });
  94715. var _identifier = require_identifier6();
  94716. var _keyword = require_keyword6();
  94717. }
  94718. });
  94719. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  94720. var require_isValidIdentifier4 = __commonJS({
  94721. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  94722. "use strict";
  94723. Object.defineProperty(exports, "__esModule", {
  94724. value: true
  94725. });
  94726. exports.default = isValidIdentifier;
  94727. var _helperValidatorIdentifier = require_lib23();
  94728. function isValidIdentifier(name2, reserved = true) {
  94729. if (typeof name2 !== "string")
  94730. return false;
  94731. if (reserved) {
  94732. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  94733. return false;
  94734. }
  94735. }
  94736. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  94737. }
  94738. }
  94739. });
  94740. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/constants/index.js
  94741. var require_constants4 = __commonJS({
  94742. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/constants/index.js"(exports) {
  94743. "use strict";
  94744. Object.defineProperty(exports, "__esModule", {
  94745. value: true
  94746. });
  94747. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  94748. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  94749. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  94750. var FLATTENABLE_KEYS = ["body", "expressions"];
  94751. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  94752. var FOR_INIT_KEYS = ["left", "init"];
  94753. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  94754. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  94755. exports.COMMENT_KEYS = COMMENT_KEYS;
  94756. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  94757. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  94758. var UPDATE_OPERATORS = ["++", "--"];
  94759. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  94760. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  94761. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  94762. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  94763. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  94764. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  94765. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  94766. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  94767. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  94768. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  94769. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  94770. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  94771. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  94772. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  94773. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  94774. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  94775. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  94776. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  94777. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  94778. var STRING_UNARY_OPERATORS = ["typeof"];
  94779. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  94780. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  94781. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  94782. var INHERIT_KEYS = {
  94783. optional: ["typeAnnotation", "typeParameters", "returnType"],
  94784. force: ["start", "loc", "end"]
  94785. };
  94786. exports.INHERIT_KEYS = INHERIT_KEYS;
  94787. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  94788. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  94789. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  94790. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  94791. }
  94792. });
  94793. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/validate.js
  94794. var require_validate4 = __commonJS({
  94795. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  94796. "use strict";
  94797. Object.defineProperty(exports, "__esModule", {
  94798. value: true
  94799. });
  94800. exports.default = validate;
  94801. exports.validateField = validateField;
  94802. exports.validateChild = validateChild;
  94803. var _definitions = require_definitions4();
  94804. function validate(node, key, val) {
  94805. if (!node)
  94806. return;
  94807. const fields = _definitions.NODE_FIELDS[node.type];
  94808. if (!fields)
  94809. return;
  94810. const field = fields[key];
  94811. validateField(node, key, val, field);
  94812. validateChild(node, key, val);
  94813. }
  94814. function validateField(node, key, val, field) {
  94815. if (!(field != null && field.validate))
  94816. return;
  94817. if (field.optional && val == null)
  94818. return;
  94819. field.validate(node, key, val);
  94820. }
  94821. function validateChild(node, key, val) {
  94822. if (val == null)
  94823. return;
  94824. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  94825. if (!validate2)
  94826. return;
  94827. validate2(node, key, val);
  94828. }
  94829. }
  94830. });
  94831. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/utils.js
  94832. var require_utils4 = __commonJS({
  94833. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  94834. "use strict";
  94835. Object.defineProperty(exports, "__esModule", {
  94836. value: true
  94837. });
  94838. exports.validate = validate;
  94839. exports.typeIs = typeIs;
  94840. exports.validateType = validateType;
  94841. exports.validateOptional = validateOptional;
  94842. exports.validateOptionalType = validateOptionalType;
  94843. exports.arrayOf = arrayOf;
  94844. exports.arrayOfType = arrayOfType;
  94845. exports.validateArrayOfType = validateArrayOfType;
  94846. exports.assertEach = assertEach;
  94847. exports.assertOneOf = assertOneOf;
  94848. exports.assertNodeType = assertNodeType;
  94849. exports.assertNodeOrValueType = assertNodeOrValueType;
  94850. exports.assertValueType = assertValueType;
  94851. exports.assertShape = assertShape;
  94852. exports.assertOptionalChainStart = assertOptionalChainStart;
  94853. exports.chain = chain;
  94854. exports.default = defineType;
  94855. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  94856. var _is = require_is4();
  94857. var _validate = require_validate4();
  94858. var VISITOR_KEYS = {};
  94859. exports.VISITOR_KEYS = VISITOR_KEYS;
  94860. var ALIAS_KEYS = {};
  94861. exports.ALIAS_KEYS = ALIAS_KEYS;
  94862. var FLIPPED_ALIAS_KEYS = {};
  94863. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  94864. var NODE_FIELDS = {};
  94865. exports.NODE_FIELDS = NODE_FIELDS;
  94866. var BUILDER_KEYS = {};
  94867. exports.BUILDER_KEYS = BUILDER_KEYS;
  94868. var DEPRECATED_KEYS = {};
  94869. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  94870. var NODE_PARENT_VALIDATIONS = {};
  94871. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  94872. function getType(val) {
  94873. if (Array.isArray(val)) {
  94874. return "array";
  94875. } else if (val === null) {
  94876. return "null";
  94877. } else {
  94878. return typeof val;
  94879. }
  94880. }
  94881. function validate(validate2) {
  94882. return {
  94883. validate: validate2
  94884. };
  94885. }
  94886. function typeIs(typeName) {
  94887. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  94888. }
  94889. function validateType(typeName) {
  94890. return validate(typeIs(typeName));
  94891. }
  94892. function validateOptional(validate2) {
  94893. return {
  94894. validate: validate2,
  94895. optional: true
  94896. };
  94897. }
  94898. function validateOptionalType(typeName) {
  94899. return {
  94900. validate: typeIs(typeName),
  94901. optional: true
  94902. };
  94903. }
  94904. function arrayOf(elementType) {
  94905. return chain(assertValueType("array"), assertEach(elementType));
  94906. }
  94907. function arrayOfType(typeName) {
  94908. return arrayOf(typeIs(typeName));
  94909. }
  94910. function validateArrayOfType(typeName) {
  94911. return validate(arrayOfType(typeName));
  94912. }
  94913. function assertEach(callback) {
  94914. function validator(node, key, val) {
  94915. if (!Array.isArray(val))
  94916. return;
  94917. for (let i = 0; i < val.length; i++) {
  94918. const subkey = `${key}[${i}]`;
  94919. const v = val[i];
  94920. callback(node, subkey, v);
  94921. if (process.env.BABEL_TYPES_8_BREAKING)
  94922. (0, _validate.validateChild)(node, subkey, v);
  94923. }
  94924. }
  94925. validator.each = callback;
  94926. return validator;
  94927. }
  94928. function assertOneOf(...values) {
  94929. function validate2(node, key, val) {
  94930. if (values.indexOf(val) < 0) {
  94931. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  94932. }
  94933. }
  94934. validate2.oneOf = values;
  94935. return validate2;
  94936. }
  94937. function assertNodeType(...types2) {
  94938. function validate2(node, key, val) {
  94939. for (const type of types2) {
  94940. if ((0, _is.default)(type, val)) {
  94941. (0, _validate.validateChild)(node, key, val);
  94942. return;
  94943. }
  94944. }
  94945. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  94946. }
  94947. validate2.oneOfNodeTypes = types2;
  94948. return validate2;
  94949. }
  94950. function assertNodeOrValueType(...types2) {
  94951. function validate2(node, key, val) {
  94952. for (const type of types2) {
  94953. if (getType(val) === type || (0, _is.default)(type, val)) {
  94954. (0, _validate.validateChild)(node, key, val);
  94955. return;
  94956. }
  94957. }
  94958. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  94959. }
  94960. validate2.oneOfNodeOrValueTypes = types2;
  94961. return validate2;
  94962. }
  94963. function assertValueType(type) {
  94964. function validate2(node, key, val) {
  94965. const valid2 = getType(val) === type;
  94966. if (!valid2) {
  94967. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  94968. }
  94969. }
  94970. validate2.type = type;
  94971. return validate2;
  94972. }
  94973. function assertShape(shape) {
  94974. function validate2(node, key, val) {
  94975. const errors = [];
  94976. for (const property of Object.keys(shape)) {
  94977. try {
  94978. (0, _validate.validateField)(node, property, val[property], shape[property]);
  94979. } catch (error) {
  94980. if (error instanceof TypeError) {
  94981. errors.push(error.message);
  94982. continue;
  94983. }
  94984. throw error;
  94985. }
  94986. }
  94987. if (errors.length) {
  94988. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  94989. ${errors.join("\n")}`);
  94990. }
  94991. }
  94992. validate2.shapeOf = shape;
  94993. return validate2;
  94994. }
  94995. function assertOptionalChainStart() {
  94996. function validate2(node) {
  94997. var _current;
  94998. let current2 = node;
  94999. while (node) {
  95000. const {
  95001. type
  95002. } = current2;
  95003. if (type === "OptionalCallExpression") {
  95004. if (current2.optional)
  95005. return;
  95006. current2 = current2.callee;
  95007. continue;
  95008. }
  95009. if (type === "OptionalMemberExpression") {
  95010. if (current2.optional)
  95011. return;
  95012. current2 = current2.object;
  95013. continue;
  95014. }
  95015. break;
  95016. }
  95017. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  95018. }
  95019. return validate2;
  95020. }
  95021. function chain(...fns) {
  95022. function validate2(...args) {
  95023. for (const fn of fns) {
  95024. fn(...args);
  95025. }
  95026. }
  95027. validate2.chainOf = fns;
  95028. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  95029. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  95030. }
  95031. return validate2;
  95032. }
  95033. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  95034. var validFieldKeys = ["default", "optional", "validate"];
  95035. function defineType(type, opts = {}) {
  95036. const inherits = opts.inherits && store[opts.inherits] || {};
  95037. let fields = opts.fields;
  95038. if (!fields) {
  95039. fields = {};
  95040. if (inherits.fields) {
  95041. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  95042. for (const key of keys2) {
  95043. const field = inherits.fields[key];
  95044. const def = field.default;
  95045. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  95046. throw new Error("field defaults can only be primitives or empty arrays currently");
  95047. }
  95048. fields[key] = {
  95049. default: Array.isArray(def) ? [] : def,
  95050. optional: field.optional,
  95051. validate: field.validate
  95052. };
  95053. }
  95054. }
  95055. }
  95056. const visitor = opts.visitor || inherits.visitor || [];
  95057. const aliases = opts.aliases || inherits.aliases || [];
  95058. const builder = opts.builder || inherits.builder || opts.visitor || [];
  95059. for (const k of Object.keys(opts)) {
  95060. if (validTypeOpts.indexOf(k) === -1) {
  95061. throw new Error(`Unknown type option "${k}" on ${type}`);
  95062. }
  95063. }
  95064. if (opts.deprecatedAlias) {
  95065. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  95066. }
  95067. for (const key of visitor.concat(builder)) {
  95068. fields[key] = fields[key] || {};
  95069. }
  95070. for (const key of Object.keys(fields)) {
  95071. const field = fields[key];
  95072. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  95073. field.optional = true;
  95074. }
  95075. if (field.default === void 0) {
  95076. field.default = null;
  95077. } else if (!field.validate && field.default != null) {
  95078. field.validate = assertValueType(getType(field.default));
  95079. }
  95080. for (const k of Object.keys(field)) {
  95081. if (validFieldKeys.indexOf(k) === -1) {
  95082. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  95083. }
  95084. }
  95085. }
  95086. VISITOR_KEYS[type] = opts.visitor = visitor;
  95087. BUILDER_KEYS[type] = opts.builder = builder;
  95088. NODE_FIELDS[type] = opts.fields = fields;
  95089. ALIAS_KEYS[type] = opts.aliases = aliases;
  95090. aliases.forEach((alias) => {
  95091. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  95092. FLIPPED_ALIAS_KEYS[alias].push(type);
  95093. });
  95094. if (opts.validate) {
  95095. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  95096. }
  95097. store[type] = opts;
  95098. }
  95099. var store = {};
  95100. }
  95101. });
  95102. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/core.js
  95103. var require_core4 = __commonJS({
  95104. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  95105. "use strict";
  95106. Object.defineProperty(exports, "__esModule", {
  95107. value: true
  95108. });
  95109. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  95110. var _is = require_is4();
  95111. var _isValidIdentifier = require_isValidIdentifier4();
  95112. var _helperValidatorIdentifier = require_lib23();
  95113. var _constants = require_constants4();
  95114. var _utils = require_utils4();
  95115. (0, _utils.default)("ArrayExpression", {
  95116. fields: {
  95117. elements: {
  95118. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  95119. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  95120. }
  95121. },
  95122. visitor: ["elements"],
  95123. aliases: ["Expression"]
  95124. });
  95125. (0, _utils.default)("AssignmentExpression", {
  95126. fields: {
  95127. operator: {
  95128. validate: function() {
  95129. if (!process.env.BABEL_TYPES_8_BREAKING) {
  95130. return (0, _utils.assertValueType)("string");
  95131. }
  95132. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  95133. const pattern = (0, _utils.assertOneOf)("=");
  95134. return function(node, key, val) {
  95135. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  95136. validator(node, key, val);
  95137. };
  95138. }()
  95139. },
  95140. left: {
  95141. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  95142. },
  95143. right: {
  95144. validate: (0, _utils.assertNodeType)("Expression")
  95145. }
  95146. },
  95147. builder: ["operator", "left", "right"],
  95148. visitor: ["left", "right"],
  95149. aliases: ["Expression"]
  95150. });
  95151. (0, _utils.default)("BinaryExpression", {
  95152. builder: ["operator", "left", "right"],
  95153. fields: {
  95154. operator: {
  95155. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  95156. },
  95157. left: {
  95158. validate: function() {
  95159. const expression = (0, _utils.assertNodeType)("Expression");
  95160. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  95161. const validator = function(node, key, val) {
  95162. const validator2 = node.operator === "in" ? inOp : expression;
  95163. validator2(node, key, val);
  95164. };
  95165. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  95166. return validator;
  95167. }()
  95168. },
  95169. right: {
  95170. validate: (0, _utils.assertNodeType)("Expression")
  95171. }
  95172. },
  95173. visitor: ["left", "right"],
  95174. aliases: ["Binary", "Expression"]
  95175. });
  95176. (0, _utils.default)("InterpreterDirective", {
  95177. builder: ["value"],
  95178. fields: {
  95179. value: {
  95180. validate: (0, _utils.assertValueType)("string")
  95181. }
  95182. }
  95183. });
  95184. (0, _utils.default)("Directive", {
  95185. visitor: ["value"],
  95186. fields: {
  95187. value: {
  95188. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  95189. }
  95190. }
  95191. });
  95192. (0, _utils.default)("DirectiveLiteral", {
  95193. builder: ["value"],
  95194. fields: {
  95195. value: {
  95196. validate: (0, _utils.assertValueType)("string")
  95197. }
  95198. }
  95199. });
  95200. (0, _utils.default)("BlockStatement", {
  95201. builder: ["body", "directives"],
  95202. visitor: ["directives", "body"],
  95203. fields: {
  95204. directives: {
  95205. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  95206. default: []
  95207. },
  95208. body: {
  95209. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  95210. }
  95211. },
  95212. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  95213. });
  95214. (0, _utils.default)("BreakStatement", {
  95215. visitor: ["label"],
  95216. fields: {
  95217. label: {
  95218. validate: (0, _utils.assertNodeType)("Identifier"),
  95219. optional: true
  95220. }
  95221. },
  95222. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  95223. });
  95224. (0, _utils.default)("CallExpression", {
  95225. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  95226. builder: ["callee", "arguments"],
  95227. aliases: ["Expression"],
  95228. fields: Object.assign({
  95229. callee: {
  95230. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  95231. },
  95232. arguments: {
  95233. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  95234. }
  95235. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  95236. optional: {
  95237. validate: (0, _utils.assertOneOf)(true, false),
  95238. optional: true
  95239. }
  95240. } : {}, {
  95241. typeArguments: {
  95242. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  95243. optional: true
  95244. },
  95245. typeParameters: {
  95246. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  95247. optional: true
  95248. }
  95249. })
  95250. });
  95251. (0, _utils.default)("CatchClause", {
  95252. visitor: ["param", "body"],
  95253. fields: {
  95254. param: {
  95255. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  95256. optional: true
  95257. },
  95258. body: {
  95259. validate: (0, _utils.assertNodeType)("BlockStatement")
  95260. }
  95261. },
  95262. aliases: ["Scopable", "BlockParent"]
  95263. });
  95264. (0, _utils.default)("ConditionalExpression", {
  95265. visitor: ["test", "consequent", "alternate"],
  95266. fields: {
  95267. test: {
  95268. validate: (0, _utils.assertNodeType)("Expression")
  95269. },
  95270. consequent: {
  95271. validate: (0, _utils.assertNodeType)("Expression")
  95272. },
  95273. alternate: {
  95274. validate: (0, _utils.assertNodeType)("Expression")
  95275. }
  95276. },
  95277. aliases: ["Expression", "Conditional"]
  95278. });
  95279. (0, _utils.default)("ContinueStatement", {
  95280. visitor: ["label"],
  95281. fields: {
  95282. label: {
  95283. validate: (0, _utils.assertNodeType)("Identifier"),
  95284. optional: true
  95285. }
  95286. },
  95287. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  95288. });
  95289. (0, _utils.default)("DebuggerStatement", {
  95290. aliases: ["Statement"]
  95291. });
  95292. (0, _utils.default)("DoWhileStatement", {
  95293. visitor: ["test", "body"],
  95294. fields: {
  95295. test: {
  95296. validate: (0, _utils.assertNodeType)("Expression")
  95297. },
  95298. body: {
  95299. validate: (0, _utils.assertNodeType)("Statement")
  95300. }
  95301. },
  95302. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  95303. });
  95304. (0, _utils.default)("EmptyStatement", {
  95305. aliases: ["Statement"]
  95306. });
  95307. (0, _utils.default)("ExpressionStatement", {
  95308. visitor: ["expression"],
  95309. fields: {
  95310. expression: {
  95311. validate: (0, _utils.assertNodeType)("Expression")
  95312. }
  95313. },
  95314. aliases: ["Statement", "ExpressionWrapper"]
  95315. });
  95316. (0, _utils.default)("File", {
  95317. builder: ["program", "comments", "tokens"],
  95318. visitor: ["program"],
  95319. fields: {
  95320. program: {
  95321. validate: (0, _utils.assertNodeType)("Program")
  95322. },
  95323. comments: {
  95324. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  95325. }, {
  95326. each: {
  95327. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  95328. }
  95329. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  95330. optional: true
  95331. },
  95332. tokens: {
  95333. validate: (0, _utils.assertEach)(Object.assign(() => {
  95334. }, {
  95335. type: "any"
  95336. })),
  95337. optional: true
  95338. }
  95339. }
  95340. });
  95341. (0, _utils.default)("ForInStatement", {
  95342. visitor: ["left", "right", "body"],
  95343. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  95344. fields: {
  95345. left: {
  95346. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  95347. },
  95348. right: {
  95349. validate: (0, _utils.assertNodeType)("Expression")
  95350. },
  95351. body: {
  95352. validate: (0, _utils.assertNodeType)("Statement")
  95353. }
  95354. }
  95355. });
  95356. (0, _utils.default)("ForStatement", {
  95357. visitor: ["init", "test", "update", "body"],
  95358. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  95359. fields: {
  95360. init: {
  95361. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  95362. optional: true
  95363. },
  95364. test: {
  95365. validate: (0, _utils.assertNodeType)("Expression"),
  95366. optional: true
  95367. },
  95368. update: {
  95369. validate: (0, _utils.assertNodeType)("Expression"),
  95370. optional: true
  95371. },
  95372. body: {
  95373. validate: (0, _utils.assertNodeType)("Statement")
  95374. }
  95375. }
  95376. });
  95377. var functionCommon = {
  95378. params: {
  95379. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  95380. },
  95381. generator: {
  95382. default: false
  95383. },
  95384. async: {
  95385. default: false
  95386. }
  95387. };
  95388. exports.functionCommon = functionCommon;
  95389. var functionTypeAnnotationCommon = {
  95390. returnType: {
  95391. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  95392. optional: true
  95393. },
  95394. typeParameters: {
  95395. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  95396. optional: true
  95397. }
  95398. };
  95399. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  95400. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  95401. declare: {
  95402. validate: (0, _utils.assertValueType)("boolean"),
  95403. optional: true
  95404. },
  95405. id: {
  95406. validate: (0, _utils.assertNodeType)("Identifier"),
  95407. optional: true
  95408. }
  95409. });
  95410. exports.functionDeclarationCommon = functionDeclarationCommon;
  95411. (0, _utils.default)("FunctionDeclaration", {
  95412. builder: ["id", "params", "body", "generator", "async"],
  95413. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  95414. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  95415. body: {
  95416. validate: (0, _utils.assertNodeType)("BlockStatement")
  95417. }
  95418. }),
  95419. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  95420. validate: function() {
  95421. if (!process.env.BABEL_TYPES_8_BREAKING)
  95422. return () => {
  95423. };
  95424. const identifier = (0, _utils.assertNodeType)("Identifier");
  95425. return function(parent, key, node) {
  95426. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  95427. identifier(node, "id", node.id);
  95428. }
  95429. };
  95430. }()
  95431. });
  95432. (0, _utils.default)("FunctionExpression", {
  95433. inherits: "FunctionDeclaration",
  95434. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  95435. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  95436. id: {
  95437. validate: (0, _utils.assertNodeType)("Identifier"),
  95438. optional: true
  95439. },
  95440. body: {
  95441. validate: (0, _utils.assertNodeType)("BlockStatement")
  95442. }
  95443. })
  95444. });
  95445. var patternLikeCommon = {
  95446. typeAnnotation: {
  95447. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  95448. optional: true
  95449. },
  95450. decorators: {
  95451. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  95452. }
  95453. };
  95454. exports.patternLikeCommon = patternLikeCommon;
  95455. (0, _utils.default)("Identifier", {
  95456. builder: ["name"],
  95457. visitor: ["typeAnnotation", "decorators"],
  95458. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  95459. fields: Object.assign({}, patternLikeCommon, {
  95460. name: {
  95461. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  95462. if (!process.env.BABEL_TYPES_8_BREAKING)
  95463. return;
  95464. if (!(0, _isValidIdentifier.default)(val, false)) {
  95465. throw new TypeError(`"${val}" is not a valid identifier name`);
  95466. }
  95467. }, {
  95468. type: "string"
  95469. }))
  95470. },
  95471. optional: {
  95472. validate: (0, _utils.assertValueType)("boolean"),
  95473. optional: true
  95474. }
  95475. }),
  95476. validate(parent, key, node) {
  95477. if (!process.env.BABEL_TYPES_8_BREAKING)
  95478. return;
  95479. const match = /\.(\w+)$/.exec(key);
  95480. if (!match)
  95481. return;
  95482. const [, parentKey] = match;
  95483. const nonComp = {
  95484. computed: false
  95485. };
  95486. if (parentKey === "property") {
  95487. if ((0, _is.default)("MemberExpression", parent, nonComp))
  95488. return;
  95489. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  95490. return;
  95491. } else if (parentKey === "key") {
  95492. if ((0, _is.default)("Property", parent, nonComp))
  95493. return;
  95494. if ((0, _is.default)("Method", parent, nonComp))
  95495. return;
  95496. } else if (parentKey === "exported") {
  95497. if ((0, _is.default)("ExportSpecifier", parent))
  95498. return;
  95499. } else if (parentKey === "imported") {
  95500. if ((0, _is.default)("ImportSpecifier", parent, {
  95501. imported: node
  95502. }))
  95503. return;
  95504. } else if (parentKey === "meta") {
  95505. if ((0, _is.default)("MetaProperty", parent, {
  95506. meta: node
  95507. }))
  95508. return;
  95509. }
  95510. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  95511. throw new TypeError(`"${node.name}" is not a valid identifier`);
  95512. }
  95513. }
  95514. });
  95515. (0, _utils.default)("IfStatement", {
  95516. visitor: ["test", "consequent", "alternate"],
  95517. aliases: ["Statement", "Conditional"],
  95518. fields: {
  95519. test: {
  95520. validate: (0, _utils.assertNodeType)("Expression")
  95521. },
  95522. consequent: {
  95523. validate: (0, _utils.assertNodeType)("Statement")
  95524. },
  95525. alternate: {
  95526. optional: true,
  95527. validate: (0, _utils.assertNodeType)("Statement")
  95528. }
  95529. }
  95530. });
  95531. (0, _utils.default)("LabeledStatement", {
  95532. visitor: ["label", "body"],
  95533. aliases: ["Statement"],
  95534. fields: {
  95535. label: {
  95536. validate: (0, _utils.assertNodeType)("Identifier")
  95537. },
  95538. body: {
  95539. validate: (0, _utils.assertNodeType)("Statement")
  95540. }
  95541. }
  95542. });
  95543. (0, _utils.default)("StringLiteral", {
  95544. builder: ["value"],
  95545. fields: {
  95546. value: {
  95547. validate: (0, _utils.assertValueType)("string")
  95548. }
  95549. },
  95550. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  95551. });
  95552. (0, _utils.default)("NumericLiteral", {
  95553. builder: ["value"],
  95554. deprecatedAlias: "NumberLiteral",
  95555. fields: {
  95556. value: {
  95557. validate: (0, _utils.assertValueType)("number")
  95558. }
  95559. },
  95560. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  95561. });
  95562. (0, _utils.default)("NullLiteral", {
  95563. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  95564. });
  95565. (0, _utils.default)("BooleanLiteral", {
  95566. builder: ["value"],
  95567. fields: {
  95568. value: {
  95569. validate: (0, _utils.assertValueType)("boolean")
  95570. }
  95571. },
  95572. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  95573. });
  95574. (0, _utils.default)("RegExpLiteral", {
  95575. builder: ["pattern", "flags"],
  95576. deprecatedAlias: "RegexLiteral",
  95577. aliases: ["Expression", "Pureish", "Literal"],
  95578. fields: {
  95579. pattern: {
  95580. validate: (0, _utils.assertValueType)("string")
  95581. },
  95582. flags: {
  95583. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  95584. if (!process.env.BABEL_TYPES_8_BREAKING)
  95585. return;
  95586. const invalid2 = /[^gimsuy]/.exec(val);
  95587. if (invalid2) {
  95588. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  95589. }
  95590. }, {
  95591. type: "string"
  95592. })),
  95593. default: ""
  95594. }
  95595. }
  95596. });
  95597. (0, _utils.default)("LogicalExpression", {
  95598. builder: ["operator", "left", "right"],
  95599. visitor: ["left", "right"],
  95600. aliases: ["Binary", "Expression"],
  95601. fields: {
  95602. operator: {
  95603. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  95604. },
  95605. left: {
  95606. validate: (0, _utils.assertNodeType)("Expression")
  95607. },
  95608. right: {
  95609. validate: (0, _utils.assertNodeType)("Expression")
  95610. }
  95611. }
  95612. });
  95613. (0, _utils.default)("MemberExpression", {
  95614. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  95615. visitor: ["object", "property"],
  95616. aliases: ["Expression", "LVal"],
  95617. fields: Object.assign({
  95618. object: {
  95619. validate: (0, _utils.assertNodeType)("Expression")
  95620. },
  95621. property: {
  95622. validate: function() {
  95623. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  95624. const computed = (0, _utils.assertNodeType)("Expression");
  95625. const validator = function(node, key, val) {
  95626. const validator2 = node.computed ? computed : normal;
  95627. validator2(node, key, val);
  95628. };
  95629. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  95630. return validator;
  95631. }()
  95632. },
  95633. computed: {
  95634. default: false
  95635. }
  95636. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  95637. optional: {
  95638. validate: (0, _utils.assertOneOf)(true, false),
  95639. optional: true
  95640. }
  95641. } : {})
  95642. });
  95643. (0, _utils.default)("NewExpression", {
  95644. inherits: "CallExpression"
  95645. });
  95646. (0, _utils.default)("Program", {
  95647. visitor: ["directives", "body"],
  95648. builder: ["body", "directives", "sourceType", "interpreter"],
  95649. fields: {
  95650. sourceFile: {
  95651. validate: (0, _utils.assertValueType)("string")
  95652. },
  95653. sourceType: {
  95654. validate: (0, _utils.assertOneOf)("script", "module"),
  95655. default: "script"
  95656. },
  95657. interpreter: {
  95658. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  95659. default: null,
  95660. optional: true
  95661. },
  95662. directives: {
  95663. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  95664. default: []
  95665. },
  95666. body: {
  95667. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  95668. }
  95669. },
  95670. aliases: ["Scopable", "BlockParent", "Block"]
  95671. });
  95672. (0, _utils.default)("ObjectExpression", {
  95673. visitor: ["properties"],
  95674. aliases: ["Expression"],
  95675. fields: {
  95676. properties: {
  95677. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  95678. }
  95679. }
  95680. });
  95681. (0, _utils.default)("ObjectMethod", {
  95682. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  95683. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  95684. kind: Object.assign({
  95685. validate: (0, _utils.assertOneOf)("method", "get", "set")
  95686. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  95687. default: "method"
  95688. } : {}),
  95689. computed: {
  95690. default: false
  95691. },
  95692. key: {
  95693. validate: function() {
  95694. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  95695. const computed = (0, _utils.assertNodeType)("Expression");
  95696. const validator = function(node, key, val) {
  95697. const validator2 = node.computed ? computed : normal;
  95698. validator2(node, key, val);
  95699. };
  95700. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  95701. return validator;
  95702. }()
  95703. },
  95704. decorators: {
  95705. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  95706. optional: true
  95707. },
  95708. body: {
  95709. validate: (0, _utils.assertNodeType)("BlockStatement")
  95710. }
  95711. }),
  95712. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  95713. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  95714. });
  95715. (0, _utils.default)("ObjectProperty", {
  95716. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  95717. fields: {
  95718. computed: {
  95719. default: false
  95720. },
  95721. key: {
  95722. validate: function() {
  95723. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  95724. const computed = (0, _utils.assertNodeType)("Expression");
  95725. const validator = function(node, key, val) {
  95726. const validator2 = node.computed ? computed : normal;
  95727. validator2(node, key, val);
  95728. };
  95729. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  95730. return validator;
  95731. }()
  95732. },
  95733. value: {
  95734. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  95735. },
  95736. shorthand: {
  95737. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  95738. if (!process.env.BABEL_TYPES_8_BREAKING)
  95739. return;
  95740. if (val && node.computed) {
  95741. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  95742. }
  95743. }, {
  95744. type: "boolean"
  95745. }), function(node, key, val) {
  95746. if (!process.env.BABEL_TYPES_8_BREAKING)
  95747. return;
  95748. if (val && !(0, _is.default)("Identifier", node.key)) {
  95749. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  95750. }
  95751. }),
  95752. default: false
  95753. },
  95754. decorators: {
  95755. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  95756. optional: true
  95757. }
  95758. },
  95759. visitor: ["key", "value", "decorators"],
  95760. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  95761. validate: function() {
  95762. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  95763. const expression = (0, _utils.assertNodeType)("Expression");
  95764. return function(parent, key, node) {
  95765. if (!process.env.BABEL_TYPES_8_BREAKING)
  95766. return;
  95767. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  95768. validator(node, "value", node.value);
  95769. };
  95770. }()
  95771. });
  95772. (0, _utils.default)("RestElement", {
  95773. visitor: ["argument", "typeAnnotation"],
  95774. builder: ["argument"],
  95775. aliases: ["LVal", "PatternLike"],
  95776. deprecatedAlias: "RestProperty",
  95777. fields: Object.assign({}, patternLikeCommon, {
  95778. argument: {
  95779. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  95780. }
  95781. }),
  95782. validate(parent, key) {
  95783. if (!process.env.BABEL_TYPES_8_BREAKING)
  95784. return;
  95785. const match = /(\w+)\[(\d+)\]/.exec(key);
  95786. if (!match)
  95787. throw new Error("Internal Babel error: malformed key.");
  95788. const [, listKey, index2] = match;
  95789. if (parent[listKey].length > index2 + 1) {
  95790. throw new TypeError(`RestElement must be last element of ${listKey}`);
  95791. }
  95792. }
  95793. });
  95794. (0, _utils.default)("ReturnStatement", {
  95795. visitor: ["argument"],
  95796. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  95797. fields: {
  95798. argument: {
  95799. validate: (0, _utils.assertNodeType)("Expression"),
  95800. optional: true
  95801. }
  95802. }
  95803. });
  95804. (0, _utils.default)("SequenceExpression", {
  95805. visitor: ["expressions"],
  95806. fields: {
  95807. expressions: {
  95808. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  95809. }
  95810. },
  95811. aliases: ["Expression"]
  95812. });
  95813. (0, _utils.default)("ParenthesizedExpression", {
  95814. visitor: ["expression"],
  95815. aliases: ["Expression", "ExpressionWrapper"],
  95816. fields: {
  95817. expression: {
  95818. validate: (0, _utils.assertNodeType)("Expression")
  95819. }
  95820. }
  95821. });
  95822. (0, _utils.default)("SwitchCase", {
  95823. visitor: ["test", "consequent"],
  95824. fields: {
  95825. test: {
  95826. validate: (0, _utils.assertNodeType)("Expression"),
  95827. optional: true
  95828. },
  95829. consequent: {
  95830. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  95831. }
  95832. }
  95833. });
  95834. (0, _utils.default)("SwitchStatement", {
  95835. visitor: ["discriminant", "cases"],
  95836. aliases: ["Statement", "BlockParent", "Scopable"],
  95837. fields: {
  95838. discriminant: {
  95839. validate: (0, _utils.assertNodeType)("Expression")
  95840. },
  95841. cases: {
  95842. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  95843. }
  95844. }
  95845. });
  95846. (0, _utils.default)("ThisExpression", {
  95847. aliases: ["Expression"]
  95848. });
  95849. (0, _utils.default)("ThrowStatement", {
  95850. visitor: ["argument"],
  95851. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  95852. fields: {
  95853. argument: {
  95854. validate: (0, _utils.assertNodeType)("Expression")
  95855. }
  95856. }
  95857. });
  95858. (0, _utils.default)("TryStatement", {
  95859. visitor: ["block", "handler", "finalizer"],
  95860. aliases: ["Statement"],
  95861. fields: {
  95862. block: {
  95863. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  95864. if (!process.env.BABEL_TYPES_8_BREAKING)
  95865. return;
  95866. if (!node.handler && !node.finalizer) {
  95867. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  95868. }
  95869. }, {
  95870. oneOfNodeTypes: ["BlockStatement"]
  95871. }))
  95872. },
  95873. handler: {
  95874. optional: true,
  95875. validate: (0, _utils.assertNodeType)("CatchClause")
  95876. },
  95877. finalizer: {
  95878. optional: true,
  95879. validate: (0, _utils.assertNodeType)("BlockStatement")
  95880. }
  95881. }
  95882. });
  95883. (0, _utils.default)("UnaryExpression", {
  95884. builder: ["operator", "argument", "prefix"],
  95885. fields: {
  95886. prefix: {
  95887. default: true
  95888. },
  95889. argument: {
  95890. validate: (0, _utils.assertNodeType)("Expression")
  95891. },
  95892. operator: {
  95893. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  95894. }
  95895. },
  95896. visitor: ["argument"],
  95897. aliases: ["UnaryLike", "Expression"]
  95898. });
  95899. (0, _utils.default)("UpdateExpression", {
  95900. builder: ["operator", "argument", "prefix"],
  95901. fields: {
  95902. prefix: {
  95903. default: false
  95904. },
  95905. argument: {
  95906. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  95907. },
  95908. operator: {
  95909. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  95910. }
  95911. },
  95912. visitor: ["argument"],
  95913. aliases: ["Expression"]
  95914. });
  95915. (0, _utils.default)("VariableDeclaration", {
  95916. builder: ["kind", "declarations"],
  95917. visitor: ["declarations"],
  95918. aliases: ["Statement", "Declaration"],
  95919. fields: {
  95920. declare: {
  95921. validate: (0, _utils.assertValueType)("boolean"),
  95922. optional: true
  95923. },
  95924. kind: {
  95925. validate: (0, _utils.assertOneOf)("var", "let", "const")
  95926. },
  95927. declarations: {
  95928. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  95929. }
  95930. },
  95931. validate(parent, key, node) {
  95932. if (!process.env.BABEL_TYPES_8_BREAKING)
  95933. return;
  95934. if (!(0, _is.default)("ForXStatement", parent, {
  95935. left: node
  95936. }))
  95937. return;
  95938. if (node.declarations.length !== 1) {
  95939. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  95940. }
  95941. }
  95942. });
  95943. (0, _utils.default)("VariableDeclarator", {
  95944. visitor: ["id", "init"],
  95945. fields: {
  95946. id: {
  95947. validate: function() {
  95948. if (!process.env.BABEL_TYPES_8_BREAKING) {
  95949. return (0, _utils.assertNodeType)("LVal");
  95950. }
  95951. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  95952. const without = (0, _utils.assertNodeType)("Identifier");
  95953. return function(node, key, val) {
  95954. const validator = node.init ? normal : without;
  95955. validator(node, key, val);
  95956. };
  95957. }()
  95958. },
  95959. definite: {
  95960. optional: true,
  95961. validate: (0, _utils.assertValueType)("boolean")
  95962. },
  95963. init: {
  95964. optional: true,
  95965. validate: (0, _utils.assertNodeType)("Expression")
  95966. }
  95967. }
  95968. });
  95969. (0, _utils.default)("WhileStatement", {
  95970. visitor: ["test", "body"],
  95971. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  95972. fields: {
  95973. test: {
  95974. validate: (0, _utils.assertNodeType)("Expression")
  95975. },
  95976. body: {
  95977. validate: (0, _utils.assertNodeType)("Statement")
  95978. }
  95979. }
  95980. });
  95981. (0, _utils.default)("WithStatement", {
  95982. visitor: ["object", "body"],
  95983. aliases: ["Statement"],
  95984. fields: {
  95985. object: {
  95986. validate: (0, _utils.assertNodeType)("Expression")
  95987. },
  95988. body: {
  95989. validate: (0, _utils.assertNodeType)("Statement")
  95990. }
  95991. }
  95992. });
  95993. (0, _utils.default)("AssignmentPattern", {
  95994. visitor: ["left", "right", "decorators"],
  95995. builder: ["left", "right"],
  95996. aliases: ["Pattern", "PatternLike", "LVal"],
  95997. fields: Object.assign({}, patternLikeCommon, {
  95998. left: {
  95999. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  96000. },
  96001. right: {
  96002. validate: (0, _utils.assertNodeType)("Expression")
  96003. },
  96004. decorators: {
  96005. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96006. optional: true
  96007. }
  96008. })
  96009. });
  96010. (0, _utils.default)("ArrayPattern", {
  96011. visitor: ["elements", "typeAnnotation"],
  96012. builder: ["elements"],
  96013. aliases: ["Pattern", "PatternLike", "LVal"],
  96014. fields: Object.assign({}, patternLikeCommon, {
  96015. elements: {
  96016. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  96017. },
  96018. decorators: {
  96019. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96020. optional: true
  96021. }
  96022. })
  96023. });
  96024. (0, _utils.default)("ArrowFunctionExpression", {
  96025. builder: ["params", "body", "async"],
  96026. visitor: ["params", "body", "returnType", "typeParameters"],
  96027. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  96028. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  96029. expression: {
  96030. validate: (0, _utils.assertValueType)("boolean")
  96031. },
  96032. body: {
  96033. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  96034. }
  96035. })
  96036. });
  96037. (0, _utils.default)("ClassBody", {
  96038. visitor: ["body"],
  96039. fields: {
  96040. body: {
  96041. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  96042. }
  96043. }
  96044. });
  96045. (0, _utils.default)("ClassExpression", {
  96046. builder: ["id", "superClass", "body", "decorators"],
  96047. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  96048. aliases: ["Scopable", "Class", "Expression"],
  96049. fields: {
  96050. id: {
  96051. validate: (0, _utils.assertNodeType)("Identifier"),
  96052. optional: true
  96053. },
  96054. typeParameters: {
  96055. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  96056. optional: true
  96057. },
  96058. body: {
  96059. validate: (0, _utils.assertNodeType)("ClassBody")
  96060. },
  96061. superClass: {
  96062. optional: true,
  96063. validate: (0, _utils.assertNodeType)("Expression")
  96064. },
  96065. superTypeParameters: {
  96066. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  96067. optional: true
  96068. },
  96069. implements: {
  96070. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  96071. optional: true
  96072. },
  96073. decorators: {
  96074. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96075. optional: true
  96076. },
  96077. mixins: {
  96078. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  96079. optional: true
  96080. }
  96081. }
  96082. });
  96083. (0, _utils.default)("ClassDeclaration", {
  96084. inherits: "ClassExpression",
  96085. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  96086. fields: {
  96087. id: {
  96088. validate: (0, _utils.assertNodeType)("Identifier")
  96089. },
  96090. typeParameters: {
  96091. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  96092. optional: true
  96093. },
  96094. body: {
  96095. validate: (0, _utils.assertNodeType)("ClassBody")
  96096. },
  96097. superClass: {
  96098. optional: true,
  96099. validate: (0, _utils.assertNodeType)("Expression")
  96100. },
  96101. superTypeParameters: {
  96102. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  96103. optional: true
  96104. },
  96105. implements: {
  96106. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  96107. optional: true
  96108. },
  96109. decorators: {
  96110. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96111. optional: true
  96112. },
  96113. mixins: {
  96114. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  96115. optional: true
  96116. },
  96117. declare: {
  96118. validate: (0, _utils.assertValueType)("boolean"),
  96119. optional: true
  96120. },
  96121. abstract: {
  96122. validate: (0, _utils.assertValueType)("boolean"),
  96123. optional: true
  96124. }
  96125. },
  96126. validate: function() {
  96127. const identifier = (0, _utils.assertNodeType)("Identifier");
  96128. return function(parent, key, node) {
  96129. if (!process.env.BABEL_TYPES_8_BREAKING)
  96130. return;
  96131. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  96132. identifier(node, "id", node.id);
  96133. }
  96134. };
  96135. }()
  96136. });
  96137. (0, _utils.default)("ExportAllDeclaration", {
  96138. visitor: ["source"],
  96139. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  96140. fields: {
  96141. source: {
  96142. validate: (0, _utils.assertNodeType)("StringLiteral")
  96143. },
  96144. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  96145. assertions: {
  96146. optional: true,
  96147. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  96148. }
  96149. }
  96150. });
  96151. (0, _utils.default)("ExportDefaultDeclaration", {
  96152. visitor: ["declaration"],
  96153. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  96154. fields: {
  96155. declaration: {
  96156. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  96157. }
  96158. }
  96159. });
  96160. (0, _utils.default)("ExportNamedDeclaration", {
  96161. visitor: ["declaration", "specifiers", "source"],
  96162. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  96163. fields: {
  96164. declaration: {
  96165. optional: true,
  96166. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  96167. if (!process.env.BABEL_TYPES_8_BREAKING)
  96168. return;
  96169. if (val && node.specifiers.length) {
  96170. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  96171. }
  96172. }, {
  96173. oneOfNodeTypes: ["Declaration"]
  96174. }), function(node, key, val) {
  96175. if (!process.env.BABEL_TYPES_8_BREAKING)
  96176. return;
  96177. if (val && node.source) {
  96178. throw new TypeError("Cannot export a declaration from a source");
  96179. }
  96180. })
  96181. },
  96182. assertions: {
  96183. optional: true,
  96184. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  96185. },
  96186. specifiers: {
  96187. default: [],
  96188. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  96189. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  96190. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  96191. if (!process.env.BABEL_TYPES_8_BREAKING)
  96192. return sourced;
  96193. return function(node, key, val) {
  96194. const validator = node.source ? sourced : sourceless;
  96195. validator(node, key, val);
  96196. };
  96197. }()))
  96198. },
  96199. source: {
  96200. validate: (0, _utils.assertNodeType)("StringLiteral"),
  96201. optional: true
  96202. },
  96203. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  96204. }
  96205. });
  96206. (0, _utils.default)("ExportSpecifier", {
  96207. visitor: ["local", "exported"],
  96208. aliases: ["ModuleSpecifier"],
  96209. fields: {
  96210. local: {
  96211. validate: (0, _utils.assertNodeType)("Identifier")
  96212. },
  96213. exported: {
  96214. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  96215. }
  96216. }
  96217. });
  96218. (0, _utils.default)("ForOfStatement", {
  96219. visitor: ["left", "right", "body"],
  96220. builder: ["left", "right", "body", "await"],
  96221. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  96222. fields: {
  96223. left: {
  96224. validate: function() {
  96225. if (!process.env.BABEL_TYPES_8_BREAKING) {
  96226. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  96227. }
  96228. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  96229. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  96230. return function(node, key, val) {
  96231. if ((0, _is.default)("VariableDeclaration", val)) {
  96232. declaration(node, key, val);
  96233. } else {
  96234. lval(node, key, val);
  96235. }
  96236. };
  96237. }()
  96238. },
  96239. right: {
  96240. validate: (0, _utils.assertNodeType)("Expression")
  96241. },
  96242. body: {
  96243. validate: (0, _utils.assertNodeType)("Statement")
  96244. },
  96245. await: {
  96246. default: false
  96247. }
  96248. }
  96249. });
  96250. (0, _utils.default)("ImportDeclaration", {
  96251. visitor: ["specifiers", "source"],
  96252. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  96253. fields: {
  96254. assertions: {
  96255. optional: true,
  96256. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  96257. },
  96258. specifiers: {
  96259. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  96260. },
  96261. source: {
  96262. validate: (0, _utils.assertNodeType)("StringLiteral")
  96263. },
  96264. importKind: {
  96265. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  96266. optional: true
  96267. }
  96268. }
  96269. });
  96270. (0, _utils.default)("ImportDefaultSpecifier", {
  96271. visitor: ["local"],
  96272. aliases: ["ModuleSpecifier"],
  96273. fields: {
  96274. local: {
  96275. validate: (0, _utils.assertNodeType)("Identifier")
  96276. }
  96277. }
  96278. });
  96279. (0, _utils.default)("ImportNamespaceSpecifier", {
  96280. visitor: ["local"],
  96281. aliases: ["ModuleSpecifier"],
  96282. fields: {
  96283. local: {
  96284. validate: (0, _utils.assertNodeType)("Identifier")
  96285. }
  96286. }
  96287. });
  96288. (0, _utils.default)("ImportSpecifier", {
  96289. visitor: ["local", "imported"],
  96290. aliases: ["ModuleSpecifier"],
  96291. fields: {
  96292. local: {
  96293. validate: (0, _utils.assertNodeType)("Identifier")
  96294. },
  96295. imported: {
  96296. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  96297. },
  96298. importKind: {
  96299. validate: (0, _utils.assertOneOf)("type", "typeof"),
  96300. optional: true
  96301. }
  96302. }
  96303. });
  96304. (0, _utils.default)("MetaProperty", {
  96305. visitor: ["meta", "property"],
  96306. aliases: ["Expression"],
  96307. fields: {
  96308. meta: {
  96309. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  96310. if (!process.env.BABEL_TYPES_8_BREAKING)
  96311. return;
  96312. let property;
  96313. switch (val.name) {
  96314. case "function":
  96315. property = "sent";
  96316. break;
  96317. case "new":
  96318. property = "target";
  96319. break;
  96320. case "import":
  96321. property = "meta";
  96322. break;
  96323. }
  96324. if (!(0, _is.default)("Identifier", node.property, {
  96325. name: property
  96326. })) {
  96327. throw new TypeError("Unrecognised MetaProperty");
  96328. }
  96329. }, {
  96330. oneOfNodeTypes: ["Identifier"]
  96331. }))
  96332. },
  96333. property: {
  96334. validate: (0, _utils.assertNodeType)("Identifier")
  96335. }
  96336. }
  96337. });
  96338. var classMethodOrPropertyCommon = {
  96339. abstract: {
  96340. validate: (0, _utils.assertValueType)("boolean"),
  96341. optional: true
  96342. },
  96343. accessibility: {
  96344. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  96345. optional: true
  96346. },
  96347. static: {
  96348. default: false
  96349. },
  96350. override: {
  96351. default: false
  96352. },
  96353. computed: {
  96354. default: false
  96355. },
  96356. optional: {
  96357. validate: (0, _utils.assertValueType)("boolean"),
  96358. optional: true
  96359. },
  96360. key: {
  96361. validate: (0, _utils.chain)(function() {
  96362. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  96363. const computed = (0, _utils.assertNodeType)("Expression");
  96364. return function(node, key, val) {
  96365. const validator = node.computed ? computed : normal;
  96366. validator(node, key, val);
  96367. };
  96368. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  96369. }
  96370. };
  96371. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  96372. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  96373. params: {
  96374. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  96375. },
  96376. kind: {
  96377. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  96378. default: "method"
  96379. },
  96380. access: {
  96381. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  96382. optional: true
  96383. },
  96384. decorators: {
  96385. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  96386. optional: true
  96387. }
  96388. });
  96389. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  96390. (0, _utils.default)("ClassMethod", {
  96391. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  96392. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  96393. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  96394. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  96395. body: {
  96396. validate: (0, _utils.assertNodeType)("BlockStatement")
  96397. }
  96398. })
  96399. });
  96400. (0, _utils.default)("ObjectPattern", {
  96401. visitor: ["properties", "typeAnnotation", "decorators"],
  96402. builder: ["properties"],
  96403. aliases: ["Pattern", "PatternLike", "LVal"],
  96404. fields: Object.assign({}, patternLikeCommon, {
  96405. properties: {
  96406. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  96407. }
  96408. })
  96409. });
  96410. (0, _utils.default)("SpreadElement", {
  96411. visitor: ["argument"],
  96412. aliases: ["UnaryLike"],
  96413. deprecatedAlias: "SpreadProperty",
  96414. fields: {
  96415. argument: {
  96416. validate: (0, _utils.assertNodeType)("Expression")
  96417. }
  96418. }
  96419. });
  96420. (0, _utils.default)("Super", {
  96421. aliases: ["Expression"]
  96422. });
  96423. (0, _utils.default)("TaggedTemplateExpression", {
  96424. visitor: ["tag", "quasi"],
  96425. aliases: ["Expression"],
  96426. fields: {
  96427. tag: {
  96428. validate: (0, _utils.assertNodeType)("Expression")
  96429. },
  96430. quasi: {
  96431. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  96432. },
  96433. typeParameters: {
  96434. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  96435. optional: true
  96436. }
  96437. }
  96438. });
  96439. (0, _utils.default)("TemplateElement", {
  96440. builder: ["value", "tail"],
  96441. fields: {
  96442. value: {
  96443. validate: (0, _utils.assertShape)({
  96444. raw: {
  96445. validate: (0, _utils.assertValueType)("string")
  96446. },
  96447. cooked: {
  96448. validate: (0, _utils.assertValueType)("string"),
  96449. optional: true
  96450. }
  96451. })
  96452. },
  96453. tail: {
  96454. default: false
  96455. }
  96456. }
  96457. });
  96458. (0, _utils.default)("TemplateLiteral", {
  96459. visitor: ["quasis", "expressions"],
  96460. aliases: ["Expression", "Literal"],
  96461. fields: {
  96462. quasis: {
  96463. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  96464. },
  96465. expressions: {
  96466. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  96467. if (node.quasis.length !== val.length + 1) {
  96468. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  96469. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  96470. }
  96471. })
  96472. }
  96473. }
  96474. });
  96475. (0, _utils.default)("YieldExpression", {
  96476. builder: ["argument", "delegate"],
  96477. visitor: ["argument"],
  96478. aliases: ["Expression", "Terminatorless"],
  96479. fields: {
  96480. delegate: {
  96481. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  96482. if (!process.env.BABEL_TYPES_8_BREAKING)
  96483. return;
  96484. if (val && !node.argument) {
  96485. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  96486. }
  96487. }, {
  96488. type: "boolean"
  96489. })),
  96490. default: false
  96491. },
  96492. argument: {
  96493. optional: true,
  96494. validate: (0, _utils.assertNodeType)("Expression")
  96495. }
  96496. }
  96497. });
  96498. (0, _utils.default)("AwaitExpression", {
  96499. builder: ["argument"],
  96500. visitor: ["argument"],
  96501. aliases: ["Expression", "Terminatorless"],
  96502. fields: {
  96503. argument: {
  96504. validate: (0, _utils.assertNodeType)("Expression")
  96505. }
  96506. }
  96507. });
  96508. (0, _utils.default)("Import", {
  96509. aliases: ["Expression"]
  96510. });
  96511. (0, _utils.default)("BigIntLiteral", {
  96512. builder: ["value"],
  96513. fields: {
  96514. value: {
  96515. validate: (0, _utils.assertValueType)("string")
  96516. }
  96517. },
  96518. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  96519. });
  96520. (0, _utils.default)("ExportNamespaceSpecifier", {
  96521. visitor: ["exported"],
  96522. aliases: ["ModuleSpecifier"],
  96523. fields: {
  96524. exported: {
  96525. validate: (0, _utils.assertNodeType)("Identifier")
  96526. }
  96527. }
  96528. });
  96529. (0, _utils.default)("OptionalMemberExpression", {
  96530. builder: ["object", "property", "computed", "optional"],
  96531. visitor: ["object", "property"],
  96532. aliases: ["Expression"],
  96533. fields: {
  96534. object: {
  96535. validate: (0, _utils.assertNodeType)("Expression")
  96536. },
  96537. property: {
  96538. validate: function() {
  96539. const normal = (0, _utils.assertNodeType)("Identifier");
  96540. const computed = (0, _utils.assertNodeType)("Expression");
  96541. const validator = function(node, key, val) {
  96542. const validator2 = node.computed ? computed : normal;
  96543. validator2(node, key, val);
  96544. };
  96545. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  96546. return validator;
  96547. }()
  96548. },
  96549. computed: {
  96550. default: false
  96551. },
  96552. optional: {
  96553. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  96554. }
  96555. }
  96556. });
  96557. (0, _utils.default)("OptionalCallExpression", {
  96558. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  96559. builder: ["callee", "arguments", "optional"],
  96560. aliases: ["Expression"],
  96561. fields: {
  96562. callee: {
  96563. validate: (0, _utils.assertNodeType)("Expression")
  96564. },
  96565. arguments: {
  96566. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  96567. },
  96568. optional: {
  96569. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  96570. },
  96571. typeArguments: {
  96572. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  96573. optional: true
  96574. },
  96575. typeParameters: {
  96576. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  96577. optional: true
  96578. }
  96579. }
  96580. });
  96581. }
  96582. });
  96583. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/flow.js
  96584. var require_flow6 = __commonJS({
  96585. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/flow.js"() {
  96586. "use strict";
  96587. var _utils = require_utils4();
  96588. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  96589. (0, _utils.default)(name2, {
  96590. builder: ["id", "typeParameters", "extends", "body"],
  96591. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  96592. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96593. fields: {
  96594. id: (0, _utils.validateType)("Identifier"),
  96595. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  96596. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  96597. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  96598. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  96599. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  96600. }
  96601. });
  96602. };
  96603. (0, _utils.default)("AnyTypeAnnotation", {
  96604. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96605. });
  96606. (0, _utils.default)("ArrayTypeAnnotation", {
  96607. visitor: ["elementType"],
  96608. aliases: ["Flow", "FlowType"],
  96609. fields: {
  96610. elementType: (0, _utils.validateType)("FlowType")
  96611. }
  96612. });
  96613. (0, _utils.default)("BooleanTypeAnnotation", {
  96614. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96615. });
  96616. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  96617. builder: ["value"],
  96618. aliases: ["Flow", "FlowType"],
  96619. fields: {
  96620. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96621. }
  96622. });
  96623. (0, _utils.default)("NullLiteralTypeAnnotation", {
  96624. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96625. });
  96626. (0, _utils.default)("ClassImplements", {
  96627. visitor: ["id", "typeParameters"],
  96628. aliases: ["Flow"],
  96629. fields: {
  96630. id: (0, _utils.validateType)("Identifier"),
  96631. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  96632. }
  96633. });
  96634. defineInterfaceishType("DeclareClass");
  96635. (0, _utils.default)("DeclareFunction", {
  96636. visitor: ["id"],
  96637. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96638. fields: {
  96639. id: (0, _utils.validateType)("Identifier"),
  96640. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  96641. }
  96642. });
  96643. defineInterfaceishType("DeclareInterface");
  96644. (0, _utils.default)("DeclareModule", {
  96645. builder: ["id", "body", "kind"],
  96646. visitor: ["id", "body"],
  96647. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96648. fields: {
  96649. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  96650. body: (0, _utils.validateType)("BlockStatement"),
  96651. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  96652. }
  96653. });
  96654. (0, _utils.default)("DeclareModuleExports", {
  96655. visitor: ["typeAnnotation"],
  96656. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96657. fields: {
  96658. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  96659. }
  96660. });
  96661. (0, _utils.default)("DeclareTypeAlias", {
  96662. visitor: ["id", "typeParameters", "right"],
  96663. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96664. fields: {
  96665. id: (0, _utils.validateType)("Identifier"),
  96666. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96667. right: (0, _utils.validateType)("FlowType")
  96668. }
  96669. });
  96670. (0, _utils.default)("DeclareOpaqueType", {
  96671. visitor: ["id", "typeParameters", "supertype"],
  96672. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96673. fields: {
  96674. id: (0, _utils.validateType)("Identifier"),
  96675. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96676. supertype: (0, _utils.validateOptionalType)("FlowType")
  96677. }
  96678. });
  96679. (0, _utils.default)("DeclareVariable", {
  96680. visitor: ["id"],
  96681. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96682. fields: {
  96683. id: (0, _utils.validateType)("Identifier")
  96684. }
  96685. });
  96686. (0, _utils.default)("DeclareExportDeclaration", {
  96687. visitor: ["declaration", "specifiers", "source"],
  96688. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96689. fields: {
  96690. declaration: (0, _utils.validateOptionalType)("Flow"),
  96691. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  96692. source: (0, _utils.validateOptionalType)("StringLiteral"),
  96693. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  96694. }
  96695. });
  96696. (0, _utils.default)("DeclareExportAllDeclaration", {
  96697. visitor: ["source"],
  96698. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96699. fields: {
  96700. source: (0, _utils.validateType)("StringLiteral"),
  96701. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  96702. }
  96703. });
  96704. (0, _utils.default)("DeclaredPredicate", {
  96705. visitor: ["value"],
  96706. aliases: ["Flow", "FlowPredicate"],
  96707. fields: {
  96708. value: (0, _utils.validateType)("Flow")
  96709. }
  96710. });
  96711. (0, _utils.default)("ExistsTypeAnnotation", {
  96712. aliases: ["Flow", "FlowType"]
  96713. });
  96714. (0, _utils.default)("FunctionTypeAnnotation", {
  96715. visitor: ["typeParameters", "params", "rest", "returnType"],
  96716. aliases: ["Flow", "FlowType"],
  96717. fields: {
  96718. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96719. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  96720. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  96721. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  96722. returnType: (0, _utils.validateType)("FlowType")
  96723. }
  96724. });
  96725. (0, _utils.default)("FunctionTypeParam", {
  96726. visitor: ["name", "typeAnnotation"],
  96727. aliases: ["Flow"],
  96728. fields: {
  96729. name: (0, _utils.validateOptionalType)("Identifier"),
  96730. typeAnnotation: (0, _utils.validateType)("FlowType"),
  96731. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  96732. }
  96733. });
  96734. (0, _utils.default)("GenericTypeAnnotation", {
  96735. visitor: ["id", "typeParameters"],
  96736. aliases: ["Flow", "FlowType"],
  96737. fields: {
  96738. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  96739. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  96740. }
  96741. });
  96742. (0, _utils.default)("InferredPredicate", {
  96743. aliases: ["Flow", "FlowPredicate"]
  96744. });
  96745. (0, _utils.default)("InterfaceExtends", {
  96746. visitor: ["id", "typeParameters"],
  96747. aliases: ["Flow"],
  96748. fields: {
  96749. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  96750. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  96751. }
  96752. });
  96753. defineInterfaceishType("InterfaceDeclaration");
  96754. (0, _utils.default)("InterfaceTypeAnnotation", {
  96755. visitor: ["extends", "body"],
  96756. aliases: ["Flow", "FlowType"],
  96757. fields: {
  96758. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  96759. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  96760. }
  96761. });
  96762. (0, _utils.default)("IntersectionTypeAnnotation", {
  96763. visitor: ["types"],
  96764. aliases: ["Flow", "FlowType"],
  96765. fields: {
  96766. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  96767. }
  96768. });
  96769. (0, _utils.default)("MixedTypeAnnotation", {
  96770. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96771. });
  96772. (0, _utils.default)("EmptyTypeAnnotation", {
  96773. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96774. });
  96775. (0, _utils.default)("NullableTypeAnnotation", {
  96776. visitor: ["typeAnnotation"],
  96777. aliases: ["Flow", "FlowType"],
  96778. fields: {
  96779. typeAnnotation: (0, _utils.validateType)("FlowType")
  96780. }
  96781. });
  96782. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  96783. builder: ["value"],
  96784. aliases: ["Flow", "FlowType"],
  96785. fields: {
  96786. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  96787. }
  96788. });
  96789. (0, _utils.default)("NumberTypeAnnotation", {
  96790. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96791. });
  96792. (0, _utils.default)("ObjectTypeAnnotation", {
  96793. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  96794. aliases: ["Flow", "FlowType"],
  96795. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  96796. fields: {
  96797. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  96798. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  96799. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  96800. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  96801. exact: {
  96802. validate: (0, _utils.assertValueType)("boolean"),
  96803. default: false
  96804. },
  96805. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  96806. }
  96807. });
  96808. (0, _utils.default)("ObjectTypeInternalSlot", {
  96809. visitor: ["id", "value", "optional", "static", "method"],
  96810. aliases: ["Flow", "UserWhitespacable"],
  96811. fields: {
  96812. id: (0, _utils.validateType)("Identifier"),
  96813. value: (0, _utils.validateType)("FlowType"),
  96814. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96815. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96816. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96817. }
  96818. });
  96819. (0, _utils.default)("ObjectTypeCallProperty", {
  96820. visitor: ["value"],
  96821. aliases: ["Flow", "UserWhitespacable"],
  96822. fields: {
  96823. value: (0, _utils.validateType)("FlowType"),
  96824. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96825. }
  96826. });
  96827. (0, _utils.default)("ObjectTypeIndexer", {
  96828. visitor: ["id", "key", "value", "variance"],
  96829. aliases: ["Flow", "UserWhitespacable"],
  96830. fields: {
  96831. id: (0, _utils.validateOptionalType)("Identifier"),
  96832. key: (0, _utils.validateType)("FlowType"),
  96833. value: (0, _utils.validateType)("FlowType"),
  96834. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96835. variance: (0, _utils.validateOptionalType)("Variance")
  96836. }
  96837. });
  96838. (0, _utils.default)("ObjectTypeProperty", {
  96839. visitor: ["key", "value", "variance"],
  96840. aliases: ["Flow", "UserWhitespacable"],
  96841. fields: {
  96842. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  96843. value: (0, _utils.validateType)("FlowType"),
  96844. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  96845. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96846. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96847. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96848. variance: (0, _utils.validateOptionalType)("Variance"),
  96849. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96850. }
  96851. });
  96852. (0, _utils.default)("ObjectTypeSpreadProperty", {
  96853. visitor: ["argument"],
  96854. aliases: ["Flow", "UserWhitespacable"],
  96855. fields: {
  96856. argument: (0, _utils.validateType)("FlowType")
  96857. }
  96858. });
  96859. (0, _utils.default)("OpaqueType", {
  96860. visitor: ["id", "typeParameters", "supertype", "impltype"],
  96861. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96862. fields: {
  96863. id: (0, _utils.validateType)("Identifier"),
  96864. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96865. supertype: (0, _utils.validateOptionalType)("FlowType"),
  96866. impltype: (0, _utils.validateType)("FlowType")
  96867. }
  96868. });
  96869. (0, _utils.default)("QualifiedTypeIdentifier", {
  96870. visitor: ["id", "qualification"],
  96871. aliases: ["Flow"],
  96872. fields: {
  96873. id: (0, _utils.validateType)("Identifier"),
  96874. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  96875. }
  96876. });
  96877. (0, _utils.default)("StringLiteralTypeAnnotation", {
  96878. builder: ["value"],
  96879. aliases: ["Flow", "FlowType"],
  96880. fields: {
  96881. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  96882. }
  96883. });
  96884. (0, _utils.default)("StringTypeAnnotation", {
  96885. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96886. });
  96887. (0, _utils.default)("SymbolTypeAnnotation", {
  96888. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96889. });
  96890. (0, _utils.default)("ThisTypeAnnotation", {
  96891. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96892. });
  96893. (0, _utils.default)("TupleTypeAnnotation", {
  96894. visitor: ["types"],
  96895. aliases: ["Flow", "FlowType"],
  96896. fields: {
  96897. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  96898. }
  96899. });
  96900. (0, _utils.default)("TypeofTypeAnnotation", {
  96901. visitor: ["argument"],
  96902. aliases: ["Flow", "FlowType"],
  96903. fields: {
  96904. argument: (0, _utils.validateType)("FlowType")
  96905. }
  96906. });
  96907. (0, _utils.default)("TypeAlias", {
  96908. visitor: ["id", "typeParameters", "right"],
  96909. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  96910. fields: {
  96911. id: (0, _utils.validateType)("Identifier"),
  96912. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  96913. right: (0, _utils.validateType)("FlowType")
  96914. }
  96915. });
  96916. (0, _utils.default)("TypeAnnotation", {
  96917. aliases: ["Flow"],
  96918. visitor: ["typeAnnotation"],
  96919. fields: {
  96920. typeAnnotation: (0, _utils.validateType)("FlowType")
  96921. }
  96922. });
  96923. (0, _utils.default)("TypeCastExpression", {
  96924. visitor: ["expression", "typeAnnotation"],
  96925. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  96926. fields: {
  96927. expression: (0, _utils.validateType)("Expression"),
  96928. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  96929. }
  96930. });
  96931. (0, _utils.default)("TypeParameter", {
  96932. aliases: ["Flow"],
  96933. visitor: ["bound", "default", "variance"],
  96934. fields: {
  96935. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  96936. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  96937. default: (0, _utils.validateOptionalType)("FlowType"),
  96938. variance: (0, _utils.validateOptionalType)("Variance")
  96939. }
  96940. });
  96941. (0, _utils.default)("TypeParameterDeclaration", {
  96942. aliases: ["Flow"],
  96943. visitor: ["params"],
  96944. fields: {
  96945. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  96946. }
  96947. });
  96948. (0, _utils.default)("TypeParameterInstantiation", {
  96949. aliases: ["Flow"],
  96950. visitor: ["params"],
  96951. fields: {
  96952. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  96953. }
  96954. });
  96955. (0, _utils.default)("UnionTypeAnnotation", {
  96956. visitor: ["types"],
  96957. aliases: ["Flow", "FlowType"],
  96958. fields: {
  96959. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  96960. }
  96961. });
  96962. (0, _utils.default)("Variance", {
  96963. aliases: ["Flow"],
  96964. builder: ["kind"],
  96965. fields: {
  96966. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  96967. }
  96968. });
  96969. (0, _utils.default)("VoidTypeAnnotation", {
  96970. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  96971. });
  96972. (0, _utils.default)("EnumDeclaration", {
  96973. aliases: ["Statement", "Declaration"],
  96974. visitor: ["id", "body"],
  96975. fields: {
  96976. id: (0, _utils.validateType)("Identifier"),
  96977. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  96978. }
  96979. });
  96980. (0, _utils.default)("EnumBooleanBody", {
  96981. aliases: ["EnumBody"],
  96982. visitor: ["members"],
  96983. fields: {
  96984. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96985. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  96986. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96987. }
  96988. });
  96989. (0, _utils.default)("EnumNumberBody", {
  96990. aliases: ["EnumBody"],
  96991. visitor: ["members"],
  96992. fields: {
  96993. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  96994. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  96995. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  96996. }
  96997. });
  96998. (0, _utils.default)("EnumStringBody", {
  96999. aliases: ["EnumBody"],
  97000. visitor: ["members"],
  97001. fields: {
  97002. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  97003. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  97004. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  97005. }
  97006. });
  97007. (0, _utils.default)("EnumSymbolBody", {
  97008. aliases: ["EnumBody"],
  97009. visitor: ["members"],
  97010. fields: {
  97011. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  97012. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  97013. }
  97014. });
  97015. (0, _utils.default)("EnumBooleanMember", {
  97016. aliases: ["EnumMember"],
  97017. visitor: ["id"],
  97018. fields: {
  97019. id: (0, _utils.validateType)("Identifier"),
  97020. init: (0, _utils.validateType)("BooleanLiteral")
  97021. }
  97022. });
  97023. (0, _utils.default)("EnumNumberMember", {
  97024. aliases: ["EnumMember"],
  97025. visitor: ["id", "init"],
  97026. fields: {
  97027. id: (0, _utils.validateType)("Identifier"),
  97028. init: (0, _utils.validateType)("NumericLiteral")
  97029. }
  97030. });
  97031. (0, _utils.default)("EnumStringMember", {
  97032. aliases: ["EnumMember"],
  97033. visitor: ["id", "init"],
  97034. fields: {
  97035. id: (0, _utils.validateType)("Identifier"),
  97036. init: (0, _utils.validateType)("StringLiteral")
  97037. }
  97038. });
  97039. (0, _utils.default)("EnumDefaultedMember", {
  97040. aliases: ["EnumMember"],
  97041. visitor: ["id"],
  97042. fields: {
  97043. id: (0, _utils.validateType)("Identifier")
  97044. }
  97045. });
  97046. (0, _utils.default)("IndexedAccessType", {
  97047. visitor: ["objectType", "indexType"],
  97048. aliases: ["Flow", "FlowType"],
  97049. fields: {
  97050. objectType: (0, _utils.validateType)("FlowType"),
  97051. indexType: (0, _utils.validateType)("FlowType")
  97052. }
  97053. });
  97054. (0, _utils.default)("OptionalIndexedAccessType", {
  97055. visitor: ["objectType", "indexType"],
  97056. aliases: ["Flow", "FlowType"],
  97057. fields: {
  97058. objectType: (0, _utils.validateType)("FlowType"),
  97059. indexType: (0, _utils.validateType)("FlowType"),
  97060. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  97061. }
  97062. });
  97063. }
  97064. });
  97065. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/jsx.js
  97066. var require_jsx6 = __commonJS({
  97067. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/jsx.js"() {
  97068. "use strict";
  97069. var _utils = require_utils4();
  97070. (0, _utils.default)("JSXAttribute", {
  97071. visitor: ["name", "value"],
  97072. aliases: ["JSX", "Immutable"],
  97073. fields: {
  97074. name: {
  97075. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  97076. },
  97077. value: {
  97078. optional: true,
  97079. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  97080. }
  97081. }
  97082. });
  97083. (0, _utils.default)("JSXClosingElement", {
  97084. visitor: ["name"],
  97085. aliases: ["JSX", "Immutable"],
  97086. fields: {
  97087. name: {
  97088. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  97089. }
  97090. }
  97091. });
  97092. (0, _utils.default)("JSXElement", {
  97093. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  97094. visitor: ["openingElement", "children", "closingElement"],
  97095. aliases: ["JSX", "Immutable", "Expression"],
  97096. fields: {
  97097. openingElement: {
  97098. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  97099. },
  97100. closingElement: {
  97101. optional: true,
  97102. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  97103. },
  97104. children: {
  97105. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  97106. },
  97107. selfClosing: {
  97108. validate: (0, _utils.assertValueType)("boolean"),
  97109. optional: true
  97110. }
  97111. }
  97112. });
  97113. (0, _utils.default)("JSXEmptyExpression", {
  97114. aliases: ["JSX"]
  97115. });
  97116. (0, _utils.default)("JSXExpressionContainer", {
  97117. visitor: ["expression"],
  97118. aliases: ["JSX", "Immutable"],
  97119. fields: {
  97120. expression: {
  97121. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  97122. }
  97123. }
  97124. });
  97125. (0, _utils.default)("JSXSpreadChild", {
  97126. visitor: ["expression"],
  97127. aliases: ["JSX", "Immutable"],
  97128. fields: {
  97129. expression: {
  97130. validate: (0, _utils.assertNodeType)("Expression")
  97131. }
  97132. }
  97133. });
  97134. (0, _utils.default)("JSXIdentifier", {
  97135. builder: ["name"],
  97136. aliases: ["JSX"],
  97137. fields: {
  97138. name: {
  97139. validate: (0, _utils.assertValueType)("string")
  97140. }
  97141. }
  97142. });
  97143. (0, _utils.default)("JSXMemberExpression", {
  97144. visitor: ["object", "property"],
  97145. aliases: ["JSX"],
  97146. fields: {
  97147. object: {
  97148. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  97149. },
  97150. property: {
  97151. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  97152. }
  97153. }
  97154. });
  97155. (0, _utils.default)("JSXNamespacedName", {
  97156. visitor: ["namespace", "name"],
  97157. aliases: ["JSX"],
  97158. fields: {
  97159. namespace: {
  97160. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  97161. },
  97162. name: {
  97163. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  97164. }
  97165. }
  97166. });
  97167. (0, _utils.default)("JSXOpeningElement", {
  97168. builder: ["name", "attributes", "selfClosing"],
  97169. visitor: ["name", "attributes"],
  97170. aliases: ["JSX", "Immutable"],
  97171. fields: {
  97172. name: {
  97173. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  97174. },
  97175. selfClosing: {
  97176. default: false
  97177. },
  97178. attributes: {
  97179. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  97180. },
  97181. typeParameters: {
  97182. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  97183. optional: true
  97184. }
  97185. }
  97186. });
  97187. (0, _utils.default)("JSXSpreadAttribute", {
  97188. visitor: ["argument"],
  97189. aliases: ["JSX"],
  97190. fields: {
  97191. argument: {
  97192. validate: (0, _utils.assertNodeType)("Expression")
  97193. }
  97194. }
  97195. });
  97196. (0, _utils.default)("JSXText", {
  97197. aliases: ["JSX", "Immutable"],
  97198. builder: ["value"],
  97199. fields: {
  97200. value: {
  97201. validate: (0, _utils.assertValueType)("string")
  97202. }
  97203. }
  97204. });
  97205. (0, _utils.default)("JSXFragment", {
  97206. builder: ["openingFragment", "closingFragment", "children"],
  97207. visitor: ["openingFragment", "children", "closingFragment"],
  97208. aliases: ["JSX", "Immutable", "Expression"],
  97209. fields: {
  97210. openingFragment: {
  97211. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  97212. },
  97213. closingFragment: {
  97214. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  97215. },
  97216. children: {
  97217. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  97218. }
  97219. }
  97220. });
  97221. (0, _utils.default)("JSXOpeningFragment", {
  97222. aliases: ["JSX", "Immutable"]
  97223. });
  97224. (0, _utils.default)("JSXClosingFragment", {
  97225. aliases: ["JSX", "Immutable"]
  97226. });
  97227. }
  97228. });
  97229. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/placeholders.js
  97230. var require_placeholders4 = __commonJS({
  97231. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  97232. "use strict";
  97233. Object.defineProperty(exports, "__esModule", {
  97234. value: true
  97235. });
  97236. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  97237. var _utils = require_utils4();
  97238. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  97239. exports.PLACEHOLDERS = PLACEHOLDERS;
  97240. var PLACEHOLDERS_ALIAS = {
  97241. Declaration: ["Statement"],
  97242. Pattern: ["PatternLike", "LVal"]
  97243. };
  97244. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  97245. for (const type of PLACEHOLDERS) {
  97246. const alias = _utils.ALIAS_KEYS[type];
  97247. if (alias != null && alias.length)
  97248. PLACEHOLDERS_ALIAS[type] = alias;
  97249. }
  97250. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  97251. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  97252. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  97253. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  97254. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  97255. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  97256. }
  97257. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  97258. });
  97259. });
  97260. }
  97261. });
  97262. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/misc.js
  97263. var require_misc4 = __commonJS({
  97264. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/misc.js"() {
  97265. "use strict";
  97266. var _utils = require_utils4();
  97267. var _placeholders = require_placeholders4();
  97268. {
  97269. (0, _utils.default)("Noop", {
  97270. visitor: []
  97271. });
  97272. }
  97273. (0, _utils.default)("Placeholder", {
  97274. visitor: [],
  97275. builder: ["expectedNode", "name"],
  97276. fields: {
  97277. name: {
  97278. validate: (0, _utils.assertNodeType)("Identifier")
  97279. },
  97280. expectedNode: {
  97281. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  97282. }
  97283. }
  97284. });
  97285. (0, _utils.default)("V8IntrinsicIdentifier", {
  97286. builder: ["name"],
  97287. fields: {
  97288. name: {
  97289. validate: (0, _utils.assertValueType)("string")
  97290. }
  97291. }
  97292. });
  97293. }
  97294. });
  97295. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/experimental.js
  97296. var require_experimental4 = __commonJS({
  97297. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/experimental.js"() {
  97298. "use strict";
  97299. var _utils = require_utils4();
  97300. var _core = require_core4();
  97301. (0, _utils.default)("ArgumentPlaceholder", {});
  97302. (0, _utils.default)("BindExpression", {
  97303. visitor: ["object", "callee"],
  97304. aliases: ["Expression"],
  97305. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  97306. object: {
  97307. validate: Object.assign(() => {
  97308. }, {
  97309. oneOfNodeTypes: ["Expression"]
  97310. })
  97311. },
  97312. callee: {
  97313. validate: Object.assign(() => {
  97314. }, {
  97315. oneOfNodeTypes: ["Expression"]
  97316. })
  97317. }
  97318. } : {
  97319. object: {
  97320. validate: (0, _utils.assertNodeType)("Expression")
  97321. },
  97322. callee: {
  97323. validate: (0, _utils.assertNodeType)("Expression")
  97324. }
  97325. }
  97326. });
  97327. (0, _utils.default)("ClassProperty", {
  97328. visitor: ["key", "value", "typeAnnotation", "decorators"],
  97329. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  97330. aliases: ["Property"],
  97331. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  97332. value: {
  97333. validate: (0, _utils.assertNodeType)("Expression"),
  97334. optional: true
  97335. },
  97336. definite: {
  97337. validate: (0, _utils.assertValueType)("boolean"),
  97338. optional: true
  97339. },
  97340. typeAnnotation: {
  97341. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  97342. optional: true
  97343. },
  97344. decorators: {
  97345. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  97346. optional: true
  97347. },
  97348. readonly: {
  97349. validate: (0, _utils.assertValueType)("boolean"),
  97350. optional: true
  97351. },
  97352. declare: {
  97353. validate: (0, _utils.assertValueType)("boolean"),
  97354. optional: true
  97355. }
  97356. })
  97357. });
  97358. (0, _utils.default)("PipelineTopicExpression", {
  97359. builder: ["expression"],
  97360. visitor: ["expression"],
  97361. fields: {
  97362. expression: {
  97363. validate: (0, _utils.assertNodeType)("Expression")
  97364. }
  97365. }
  97366. });
  97367. (0, _utils.default)("PipelineBareFunction", {
  97368. builder: ["callee"],
  97369. visitor: ["callee"],
  97370. fields: {
  97371. callee: {
  97372. validate: (0, _utils.assertNodeType)("Expression")
  97373. }
  97374. }
  97375. });
  97376. (0, _utils.default)("PipelinePrimaryTopicReference", {
  97377. aliases: ["Expression"]
  97378. });
  97379. (0, _utils.default)("ClassPrivateProperty", {
  97380. visitor: ["key", "value", "decorators"],
  97381. builder: ["key", "value", "decorators", "static"],
  97382. aliases: ["Property", "Private"],
  97383. fields: {
  97384. key: {
  97385. validate: (0, _utils.assertNodeType)("PrivateName")
  97386. },
  97387. value: {
  97388. validate: (0, _utils.assertNodeType)("Expression"),
  97389. optional: true
  97390. },
  97391. typeAnnotation: {
  97392. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  97393. optional: true
  97394. },
  97395. decorators: {
  97396. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  97397. optional: true
  97398. }
  97399. }
  97400. });
  97401. (0, _utils.default)("ClassPrivateMethod", {
  97402. builder: ["kind", "key", "params", "body", "static"],
  97403. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  97404. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  97405. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  97406. key: {
  97407. validate: (0, _utils.assertNodeType)("PrivateName")
  97408. },
  97409. body: {
  97410. validate: (0, _utils.assertNodeType)("BlockStatement")
  97411. }
  97412. })
  97413. });
  97414. (0, _utils.default)("ImportAttribute", {
  97415. visitor: ["key", "value"],
  97416. fields: {
  97417. key: {
  97418. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  97419. },
  97420. value: {
  97421. validate: (0, _utils.assertNodeType)("StringLiteral")
  97422. }
  97423. }
  97424. });
  97425. (0, _utils.default)("Decorator", {
  97426. visitor: ["expression"],
  97427. fields: {
  97428. expression: {
  97429. validate: (0, _utils.assertNodeType)("Expression")
  97430. }
  97431. }
  97432. });
  97433. (0, _utils.default)("DoExpression", {
  97434. visitor: ["body"],
  97435. builder: ["body", "async"],
  97436. aliases: ["Expression"],
  97437. fields: {
  97438. body: {
  97439. validate: (0, _utils.assertNodeType)("BlockStatement")
  97440. },
  97441. async: {
  97442. validate: (0, _utils.assertValueType)("boolean"),
  97443. default: false
  97444. }
  97445. }
  97446. });
  97447. (0, _utils.default)("ExportDefaultSpecifier", {
  97448. visitor: ["exported"],
  97449. aliases: ["ModuleSpecifier"],
  97450. fields: {
  97451. exported: {
  97452. validate: (0, _utils.assertNodeType)("Identifier")
  97453. }
  97454. }
  97455. });
  97456. (0, _utils.default)("PrivateName", {
  97457. visitor: ["id"],
  97458. aliases: ["Private"],
  97459. fields: {
  97460. id: {
  97461. validate: (0, _utils.assertNodeType)("Identifier")
  97462. }
  97463. }
  97464. });
  97465. (0, _utils.default)("RecordExpression", {
  97466. visitor: ["properties"],
  97467. aliases: ["Expression"],
  97468. fields: {
  97469. properties: {
  97470. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  97471. }
  97472. }
  97473. });
  97474. (0, _utils.default)("TupleExpression", {
  97475. fields: {
  97476. elements: {
  97477. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  97478. default: []
  97479. }
  97480. },
  97481. visitor: ["elements"],
  97482. aliases: ["Expression"]
  97483. });
  97484. (0, _utils.default)("DecimalLiteral", {
  97485. builder: ["value"],
  97486. fields: {
  97487. value: {
  97488. validate: (0, _utils.assertValueType)("string")
  97489. }
  97490. },
  97491. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  97492. });
  97493. (0, _utils.default)("StaticBlock", {
  97494. visitor: ["body"],
  97495. fields: {
  97496. body: {
  97497. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  97498. }
  97499. },
  97500. aliases: ["Scopable", "BlockParent"]
  97501. });
  97502. (0, _utils.default)("ModuleExpression", {
  97503. visitor: ["body"],
  97504. fields: {
  97505. body: {
  97506. validate: (0, _utils.assertNodeType)("Program")
  97507. }
  97508. },
  97509. aliases: ["Expression"]
  97510. });
  97511. }
  97512. });
  97513. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/typescript.js
  97514. var require_typescript6 = __commonJS({
  97515. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/typescript.js"() {
  97516. "use strict";
  97517. var _utils = require_utils4();
  97518. var _core = require_core4();
  97519. var bool = (0, _utils.assertValueType)("boolean");
  97520. var tSFunctionTypeAnnotationCommon = {
  97521. returnType: {
  97522. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  97523. optional: true
  97524. },
  97525. typeParameters: {
  97526. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  97527. optional: true
  97528. }
  97529. };
  97530. (0, _utils.default)("TSParameterProperty", {
  97531. aliases: ["LVal"],
  97532. visitor: ["parameter"],
  97533. fields: {
  97534. accessibility: {
  97535. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  97536. optional: true
  97537. },
  97538. readonly: {
  97539. validate: (0, _utils.assertValueType)("boolean"),
  97540. optional: true
  97541. },
  97542. parameter: {
  97543. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  97544. }
  97545. }
  97546. });
  97547. (0, _utils.default)("TSDeclareFunction", {
  97548. aliases: ["Statement", "Declaration"],
  97549. visitor: ["id", "typeParameters", "params", "returnType"],
  97550. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  97551. });
  97552. (0, _utils.default)("TSDeclareMethod", {
  97553. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  97554. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  97555. });
  97556. (0, _utils.default)("TSQualifiedName", {
  97557. aliases: ["TSEntityName"],
  97558. visitor: ["left", "right"],
  97559. fields: {
  97560. left: (0, _utils.validateType)("TSEntityName"),
  97561. right: (0, _utils.validateType)("Identifier")
  97562. }
  97563. });
  97564. var signatureDeclarationCommon = {
  97565. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  97566. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  97567. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  97568. };
  97569. var callConstructSignatureDeclaration = {
  97570. aliases: ["TSTypeElement"],
  97571. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  97572. fields: signatureDeclarationCommon
  97573. };
  97574. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  97575. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  97576. var namedTypeElementCommon = {
  97577. key: (0, _utils.validateType)("Expression"),
  97578. computed: (0, _utils.validate)(bool),
  97579. optional: (0, _utils.validateOptional)(bool)
  97580. };
  97581. (0, _utils.default)("TSPropertySignature", {
  97582. aliases: ["TSTypeElement"],
  97583. visitor: ["key", "typeAnnotation", "initializer"],
  97584. fields: Object.assign({}, namedTypeElementCommon, {
  97585. readonly: (0, _utils.validateOptional)(bool),
  97586. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  97587. initializer: (0, _utils.validateOptionalType)("Expression")
  97588. })
  97589. });
  97590. (0, _utils.default)("TSMethodSignature", {
  97591. aliases: ["TSTypeElement"],
  97592. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  97593. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  97594. kind: {
  97595. validate: (0, _utils.assertOneOf)("method", "get", "set")
  97596. }
  97597. })
  97598. });
  97599. (0, _utils.default)("TSIndexSignature", {
  97600. aliases: ["TSTypeElement"],
  97601. visitor: ["parameters", "typeAnnotation"],
  97602. fields: {
  97603. readonly: (0, _utils.validateOptional)(bool),
  97604. static: (0, _utils.validateOptional)(bool),
  97605. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  97606. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  97607. }
  97608. });
  97609. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  97610. for (const type of tsKeywordTypes) {
  97611. (0, _utils.default)(type, {
  97612. aliases: ["TSType", "TSBaseType"],
  97613. visitor: [],
  97614. fields: {}
  97615. });
  97616. }
  97617. (0, _utils.default)("TSThisType", {
  97618. aliases: ["TSType", "TSBaseType"],
  97619. visitor: [],
  97620. fields: {}
  97621. });
  97622. var fnOrCtrBase = {
  97623. aliases: ["TSType"],
  97624. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  97625. };
  97626. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  97627. fields: signatureDeclarationCommon
  97628. }));
  97629. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  97630. fields: Object.assign({}, signatureDeclarationCommon, {
  97631. abstract: (0, _utils.validateOptional)(bool)
  97632. })
  97633. }));
  97634. (0, _utils.default)("TSTypeReference", {
  97635. aliases: ["TSType"],
  97636. visitor: ["typeName", "typeParameters"],
  97637. fields: {
  97638. typeName: (0, _utils.validateType)("TSEntityName"),
  97639. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  97640. }
  97641. });
  97642. (0, _utils.default)("TSTypePredicate", {
  97643. aliases: ["TSType"],
  97644. visitor: ["parameterName", "typeAnnotation"],
  97645. builder: ["parameterName", "typeAnnotation", "asserts"],
  97646. fields: {
  97647. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  97648. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  97649. asserts: (0, _utils.validateOptional)(bool)
  97650. }
  97651. });
  97652. (0, _utils.default)("TSTypeQuery", {
  97653. aliases: ["TSType"],
  97654. visitor: ["exprName"],
  97655. fields: {
  97656. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  97657. }
  97658. });
  97659. (0, _utils.default)("TSTypeLiteral", {
  97660. aliases: ["TSType"],
  97661. visitor: ["members"],
  97662. fields: {
  97663. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  97664. }
  97665. });
  97666. (0, _utils.default)("TSArrayType", {
  97667. aliases: ["TSType"],
  97668. visitor: ["elementType"],
  97669. fields: {
  97670. elementType: (0, _utils.validateType)("TSType")
  97671. }
  97672. });
  97673. (0, _utils.default)("TSTupleType", {
  97674. aliases: ["TSType"],
  97675. visitor: ["elementTypes"],
  97676. fields: {
  97677. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  97678. }
  97679. });
  97680. (0, _utils.default)("TSOptionalType", {
  97681. aliases: ["TSType"],
  97682. visitor: ["typeAnnotation"],
  97683. fields: {
  97684. typeAnnotation: (0, _utils.validateType)("TSType")
  97685. }
  97686. });
  97687. (0, _utils.default)("TSRestType", {
  97688. aliases: ["TSType"],
  97689. visitor: ["typeAnnotation"],
  97690. fields: {
  97691. typeAnnotation: (0, _utils.validateType)("TSType")
  97692. }
  97693. });
  97694. (0, _utils.default)("TSNamedTupleMember", {
  97695. visitor: ["label", "elementType"],
  97696. builder: ["label", "elementType", "optional"],
  97697. fields: {
  97698. label: (0, _utils.validateType)("Identifier"),
  97699. optional: {
  97700. validate: bool,
  97701. default: false
  97702. },
  97703. elementType: (0, _utils.validateType)("TSType")
  97704. }
  97705. });
  97706. var unionOrIntersection = {
  97707. aliases: ["TSType"],
  97708. visitor: ["types"],
  97709. fields: {
  97710. types: (0, _utils.validateArrayOfType)("TSType")
  97711. }
  97712. };
  97713. (0, _utils.default)("TSUnionType", unionOrIntersection);
  97714. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  97715. (0, _utils.default)("TSConditionalType", {
  97716. aliases: ["TSType"],
  97717. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  97718. fields: {
  97719. checkType: (0, _utils.validateType)("TSType"),
  97720. extendsType: (0, _utils.validateType)("TSType"),
  97721. trueType: (0, _utils.validateType)("TSType"),
  97722. falseType: (0, _utils.validateType)("TSType")
  97723. }
  97724. });
  97725. (0, _utils.default)("TSInferType", {
  97726. aliases: ["TSType"],
  97727. visitor: ["typeParameter"],
  97728. fields: {
  97729. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  97730. }
  97731. });
  97732. (0, _utils.default)("TSParenthesizedType", {
  97733. aliases: ["TSType"],
  97734. visitor: ["typeAnnotation"],
  97735. fields: {
  97736. typeAnnotation: (0, _utils.validateType)("TSType")
  97737. }
  97738. });
  97739. (0, _utils.default)("TSTypeOperator", {
  97740. aliases: ["TSType"],
  97741. visitor: ["typeAnnotation"],
  97742. fields: {
  97743. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  97744. typeAnnotation: (0, _utils.validateType)("TSType")
  97745. }
  97746. });
  97747. (0, _utils.default)("TSIndexedAccessType", {
  97748. aliases: ["TSType"],
  97749. visitor: ["objectType", "indexType"],
  97750. fields: {
  97751. objectType: (0, _utils.validateType)("TSType"),
  97752. indexType: (0, _utils.validateType)("TSType")
  97753. }
  97754. });
  97755. (0, _utils.default)("TSMappedType", {
  97756. aliases: ["TSType"],
  97757. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  97758. fields: {
  97759. readonly: (0, _utils.validateOptional)(bool),
  97760. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  97761. optional: (0, _utils.validateOptional)(bool),
  97762. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  97763. nameType: (0, _utils.validateOptionalType)("TSType")
  97764. }
  97765. });
  97766. (0, _utils.default)("TSLiteralType", {
  97767. aliases: ["TSType", "TSBaseType"],
  97768. visitor: ["literal"],
  97769. fields: {
  97770. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  97771. }
  97772. });
  97773. (0, _utils.default)("TSExpressionWithTypeArguments", {
  97774. aliases: ["TSType"],
  97775. visitor: ["expression", "typeParameters"],
  97776. fields: {
  97777. expression: (0, _utils.validateType)("TSEntityName"),
  97778. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  97779. }
  97780. });
  97781. (0, _utils.default)("TSInterfaceDeclaration", {
  97782. aliases: ["Statement", "Declaration"],
  97783. visitor: ["id", "typeParameters", "extends", "body"],
  97784. fields: {
  97785. declare: (0, _utils.validateOptional)(bool),
  97786. id: (0, _utils.validateType)("Identifier"),
  97787. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  97788. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  97789. body: (0, _utils.validateType)("TSInterfaceBody")
  97790. }
  97791. });
  97792. (0, _utils.default)("TSInterfaceBody", {
  97793. visitor: ["body"],
  97794. fields: {
  97795. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  97796. }
  97797. });
  97798. (0, _utils.default)("TSTypeAliasDeclaration", {
  97799. aliases: ["Statement", "Declaration"],
  97800. visitor: ["id", "typeParameters", "typeAnnotation"],
  97801. fields: {
  97802. declare: (0, _utils.validateOptional)(bool),
  97803. id: (0, _utils.validateType)("Identifier"),
  97804. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  97805. typeAnnotation: (0, _utils.validateType)("TSType")
  97806. }
  97807. });
  97808. (0, _utils.default)("TSAsExpression", {
  97809. aliases: ["Expression"],
  97810. visitor: ["expression", "typeAnnotation"],
  97811. fields: {
  97812. expression: (0, _utils.validateType)("Expression"),
  97813. typeAnnotation: (0, _utils.validateType)("TSType")
  97814. }
  97815. });
  97816. (0, _utils.default)("TSTypeAssertion", {
  97817. aliases: ["Expression"],
  97818. visitor: ["typeAnnotation", "expression"],
  97819. fields: {
  97820. typeAnnotation: (0, _utils.validateType)("TSType"),
  97821. expression: (0, _utils.validateType)("Expression")
  97822. }
  97823. });
  97824. (0, _utils.default)("TSEnumDeclaration", {
  97825. aliases: ["Statement", "Declaration"],
  97826. visitor: ["id", "members"],
  97827. fields: {
  97828. declare: (0, _utils.validateOptional)(bool),
  97829. const: (0, _utils.validateOptional)(bool),
  97830. id: (0, _utils.validateType)("Identifier"),
  97831. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  97832. initializer: (0, _utils.validateOptionalType)("Expression")
  97833. }
  97834. });
  97835. (0, _utils.default)("TSEnumMember", {
  97836. visitor: ["id", "initializer"],
  97837. fields: {
  97838. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  97839. initializer: (0, _utils.validateOptionalType)("Expression")
  97840. }
  97841. });
  97842. (0, _utils.default)("TSModuleDeclaration", {
  97843. aliases: ["Statement", "Declaration"],
  97844. visitor: ["id", "body"],
  97845. fields: {
  97846. declare: (0, _utils.validateOptional)(bool),
  97847. global: (0, _utils.validateOptional)(bool),
  97848. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  97849. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  97850. }
  97851. });
  97852. (0, _utils.default)("TSModuleBlock", {
  97853. aliases: ["Scopable", "Block", "BlockParent"],
  97854. visitor: ["body"],
  97855. fields: {
  97856. body: (0, _utils.validateArrayOfType)("Statement")
  97857. }
  97858. });
  97859. (0, _utils.default)("TSImportType", {
  97860. aliases: ["TSType"],
  97861. visitor: ["argument", "qualifier", "typeParameters"],
  97862. fields: {
  97863. argument: (0, _utils.validateType)("StringLiteral"),
  97864. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  97865. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  97866. }
  97867. });
  97868. (0, _utils.default)("TSImportEqualsDeclaration", {
  97869. aliases: ["Statement"],
  97870. visitor: ["id", "moduleReference"],
  97871. fields: {
  97872. isExport: (0, _utils.validate)(bool),
  97873. id: (0, _utils.validateType)("Identifier"),
  97874. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  97875. }
  97876. });
  97877. (0, _utils.default)("TSExternalModuleReference", {
  97878. visitor: ["expression"],
  97879. fields: {
  97880. expression: (0, _utils.validateType)("StringLiteral")
  97881. }
  97882. });
  97883. (0, _utils.default)("TSNonNullExpression", {
  97884. aliases: ["Expression"],
  97885. visitor: ["expression"],
  97886. fields: {
  97887. expression: (0, _utils.validateType)("Expression")
  97888. }
  97889. });
  97890. (0, _utils.default)("TSExportAssignment", {
  97891. aliases: ["Statement"],
  97892. visitor: ["expression"],
  97893. fields: {
  97894. expression: (0, _utils.validateType)("Expression")
  97895. }
  97896. });
  97897. (0, _utils.default)("TSNamespaceExportDeclaration", {
  97898. aliases: ["Statement"],
  97899. visitor: ["id"],
  97900. fields: {
  97901. id: (0, _utils.validateType)("Identifier")
  97902. }
  97903. });
  97904. (0, _utils.default)("TSTypeAnnotation", {
  97905. visitor: ["typeAnnotation"],
  97906. fields: {
  97907. typeAnnotation: {
  97908. validate: (0, _utils.assertNodeType)("TSType")
  97909. }
  97910. }
  97911. });
  97912. (0, _utils.default)("TSTypeParameterInstantiation", {
  97913. visitor: ["params"],
  97914. fields: {
  97915. params: {
  97916. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  97917. }
  97918. }
  97919. });
  97920. (0, _utils.default)("TSTypeParameterDeclaration", {
  97921. visitor: ["params"],
  97922. fields: {
  97923. params: {
  97924. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  97925. }
  97926. }
  97927. });
  97928. (0, _utils.default)("TSTypeParameter", {
  97929. builder: ["constraint", "default", "name"],
  97930. visitor: ["constraint", "default"],
  97931. fields: {
  97932. name: {
  97933. validate: (0, _utils.assertValueType)("string")
  97934. },
  97935. constraint: {
  97936. validate: (0, _utils.assertNodeType)("TSType"),
  97937. optional: true
  97938. },
  97939. default: {
  97940. validate: (0, _utils.assertNodeType)("TSType"),
  97941. optional: true
  97942. }
  97943. }
  97944. });
  97945. }
  97946. });
  97947. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/index.js
  97948. var require_definitions4 = __commonJS({
  97949. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  97950. "use strict";
  97951. Object.defineProperty(exports, "__esModule", {
  97952. value: true
  97953. });
  97954. Object.defineProperty(exports, "VISITOR_KEYS", {
  97955. enumerable: true,
  97956. get: function() {
  97957. return _utils.VISITOR_KEYS;
  97958. }
  97959. });
  97960. Object.defineProperty(exports, "ALIAS_KEYS", {
  97961. enumerable: true,
  97962. get: function() {
  97963. return _utils.ALIAS_KEYS;
  97964. }
  97965. });
  97966. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  97967. enumerable: true,
  97968. get: function() {
  97969. return _utils.FLIPPED_ALIAS_KEYS;
  97970. }
  97971. });
  97972. Object.defineProperty(exports, "NODE_FIELDS", {
  97973. enumerable: true,
  97974. get: function() {
  97975. return _utils.NODE_FIELDS;
  97976. }
  97977. });
  97978. Object.defineProperty(exports, "BUILDER_KEYS", {
  97979. enumerable: true,
  97980. get: function() {
  97981. return _utils.BUILDER_KEYS;
  97982. }
  97983. });
  97984. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  97985. enumerable: true,
  97986. get: function() {
  97987. return _utils.DEPRECATED_KEYS;
  97988. }
  97989. });
  97990. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  97991. enumerable: true,
  97992. get: function() {
  97993. return _utils.NODE_PARENT_VALIDATIONS;
  97994. }
  97995. });
  97996. Object.defineProperty(exports, "PLACEHOLDERS", {
  97997. enumerable: true,
  97998. get: function() {
  97999. return _placeholders.PLACEHOLDERS;
  98000. }
  98001. });
  98002. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  98003. enumerable: true,
  98004. get: function() {
  98005. return _placeholders.PLACEHOLDERS_ALIAS;
  98006. }
  98007. });
  98008. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  98009. enumerable: true,
  98010. get: function() {
  98011. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  98012. }
  98013. });
  98014. exports.TYPES = void 0;
  98015. var _toFastProperties = require_to_fast_properties();
  98016. require_core4();
  98017. require_flow6();
  98018. require_jsx6();
  98019. require_misc4();
  98020. require_experimental4();
  98021. require_typescript6();
  98022. var _utils = require_utils4();
  98023. var _placeholders = require_placeholders4();
  98024. _toFastProperties(_utils.VISITOR_KEYS);
  98025. _toFastProperties(_utils.ALIAS_KEYS);
  98026. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  98027. _toFastProperties(_utils.NODE_FIELDS);
  98028. _toFastProperties(_utils.BUILDER_KEYS);
  98029. _toFastProperties(_utils.DEPRECATED_KEYS);
  98030. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  98031. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  98032. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  98033. exports.TYPES = TYPES;
  98034. }
  98035. });
  98036. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/builder.js
  98037. var require_builder5 = __commonJS({
  98038. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  98039. "use strict";
  98040. Object.defineProperty(exports, "__esModule", {
  98041. value: true
  98042. });
  98043. exports.default = builder;
  98044. var _definitions = require_definitions4();
  98045. var _validate = require_validate4();
  98046. function builder(type, ...args) {
  98047. const keys2 = _definitions.BUILDER_KEYS[type];
  98048. const countArgs = args.length;
  98049. if (countArgs > keys2.length) {
  98050. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  98051. }
  98052. const node = {
  98053. type
  98054. };
  98055. let i = 0;
  98056. keys2.forEach((key) => {
  98057. const field = _definitions.NODE_FIELDS[type][key];
  98058. let arg;
  98059. if (i < countArgs)
  98060. arg = args[i];
  98061. if (arg === void 0) {
  98062. arg = Array.isArray(field.default) ? [] : field.default;
  98063. }
  98064. node[key] = arg;
  98065. i++;
  98066. });
  98067. for (const key of Object.keys(node)) {
  98068. (0, _validate.default)(node, key, node[key]);
  98069. }
  98070. return node;
  98071. }
  98072. }
  98073. });
  98074. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/generated/index.js
  98075. var require_generated17 = __commonJS({
  98076. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  98077. "use strict";
  98078. Object.defineProperty(exports, "__esModule", {
  98079. value: true
  98080. });
  98081. exports.arrayExpression = arrayExpression;
  98082. exports.assignmentExpression = assignmentExpression;
  98083. exports.binaryExpression = binaryExpression;
  98084. exports.interpreterDirective = interpreterDirective;
  98085. exports.directive = directive;
  98086. exports.directiveLiteral = directiveLiteral;
  98087. exports.blockStatement = blockStatement;
  98088. exports.breakStatement = breakStatement;
  98089. exports.callExpression = callExpression;
  98090. exports.catchClause = catchClause;
  98091. exports.conditionalExpression = conditionalExpression;
  98092. exports.continueStatement = continueStatement;
  98093. exports.debuggerStatement = debuggerStatement;
  98094. exports.doWhileStatement = doWhileStatement;
  98095. exports.emptyStatement = emptyStatement;
  98096. exports.expressionStatement = expressionStatement;
  98097. exports.file = file;
  98098. exports.forInStatement = forInStatement;
  98099. exports.forStatement = forStatement;
  98100. exports.functionDeclaration = functionDeclaration;
  98101. exports.functionExpression = functionExpression;
  98102. exports.identifier = identifier;
  98103. exports.ifStatement = ifStatement;
  98104. exports.labeledStatement = labeledStatement;
  98105. exports.stringLiteral = stringLiteral;
  98106. exports.numericLiteral = numericLiteral;
  98107. exports.nullLiteral = nullLiteral;
  98108. exports.booleanLiteral = booleanLiteral;
  98109. exports.regExpLiteral = regExpLiteral;
  98110. exports.logicalExpression = logicalExpression;
  98111. exports.memberExpression = memberExpression;
  98112. exports.newExpression = newExpression;
  98113. exports.program = program;
  98114. exports.objectExpression = objectExpression;
  98115. exports.objectMethod = objectMethod;
  98116. exports.objectProperty = objectProperty;
  98117. exports.restElement = restElement;
  98118. exports.returnStatement = returnStatement;
  98119. exports.sequenceExpression = sequenceExpression;
  98120. exports.parenthesizedExpression = parenthesizedExpression;
  98121. exports.switchCase = switchCase;
  98122. exports.switchStatement = switchStatement;
  98123. exports.thisExpression = thisExpression;
  98124. exports.throwStatement = throwStatement;
  98125. exports.tryStatement = tryStatement;
  98126. exports.unaryExpression = unaryExpression;
  98127. exports.updateExpression = updateExpression;
  98128. exports.variableDeclaration = variableDeclaration;
  98129. exports.variableDeclarator = variableDeclarator;
  98130. exports.whileStatement = whileStatement;
  98131. exports.withStatement = withStatement;
  98132. exports.assignmentPattern = assignmentPattern;
  98133. exports.arrayPattern = arrayPattern;
  98134. exports.arrowFunctionExpression = arrowFunctionExpression;
  98135. exports.classBody = classBody;
  98136. exports.classExpression = classExpression;
  98137. exports.classDeclaration = classDeclaration;
  98138. exports.exportAllDeclaration = exportAllDeclaration;
  98139. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  98140. exports.exportNamedDeclaration = exportNamedDeclaration;
  98141. exports.exportSpecifier = exportSpecifier;
  98142. exports.forOfStatement = forOfStatement;
  98143. exports.importDeclaration = importDeclaration;
  98144. exports.importDefaultSpecifier = importDefaultSpecifier;
  98145. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  98146. exports.importSpecifier = importSpecifier;
  98147. exports.metaProperty = metaProperty;
  98148. exports.classMethod = classMethod;
  98149. exports.objectPattern = objectPattern;
  98150. exports.spreadElement = spreadElement;
  98151. exports.super = _super;
  98152. exports.taggedTemplateExpression = taggedTemplateExpression;
  98153. exports.templateElement = templateElement;
  98154. exports.templateLiteral = templateLiteral;
  98155. exports.yieldExpression = yieldExpression;
  98156. exports.awaitExpression = awaitExpression;
  98157. exports.import = _import;
  98158. exports.bigIntLiteral = bigIntLiteral;
  98159. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  98160. exports.optionalMemberExpression = optionalMemberExpression;
  98161. exports.optionalCallExpression = optionalCallExpression;
  98162. exports.anyTypeAnnotation = anyTypeAnnotation;
  98163. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  98164. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  98165. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  98166. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  98167. exports.classImplements = classImplements;
  98168. exports.declareClass = declareClass;
  98169. exports.declareFunction = declareFunction;
  98170. exports.declareInterface = declareInterface;
  98171. exports.declareModule = declareModule;
  98172. exports.declareModuleExports = declareModuleExports;
  98173. exports.declareTypeAlias = declareTypeAlias;
  98174. exports.declareOpaqueType = declareOpaqueType;
  98175. exports.declareVariable = declareVariable;
  98176. exports.declareExportDeclaration = declareExportDeclaration;
  98177. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  98178. exports.declaredPredicate = declaredPredicate;
  98179. exports.existsTypeAnnotation = existsTypeAnnotation;
  98180. exports.functionTypeAnnotation = functionTypeAnnotation;
  98181. exports.functionTypeParam = functionTypeParam;
  98182. exports.genericTypeAnnotation = genericTypeAnnotation;
  98183. exports.inferredPredicate = inferredPredicate;
  98184. exports.interfaceExtends = interfaceExtends;
  98185. exports.interfaceDeclaration = interfaceDeclaration;
  98186. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  98187. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  98188. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  98189. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  98190. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  98191. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  98192. exports.numberTypeAnnotation = numberTypeAnnotation;
  98193. exports.objectTypeAnnotation = objectTypeAnnotation;
  98194. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  98195. exports.objectTypeCallProperty = objectTypeCallProperty;
  98196. exports.objectTypeIndexer = objectTypeIndexer;
  98197. exports.objectTypeProperty = objectTypeProperty;
  98198. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  98199. exports.opaqueType = opaqueType;
  98200. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  98201. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  98202. exports.stringTypeAnnotation = stringTypeAnnotation;
  98203. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  98204. exports.thisTypeAnnotation = thisTypeAnnotation;
  98205. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  98206. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  98207. exports.typeAlias = typeAlias;
  98208. exports.typeAnnotation = typeAnnotation;
  98209. exports.typeCastExpression = typeCastExpression;
  98210. exports.typeParameter = typeParameter;
  98211. exports.typeParameterDeclaration = typeParameterDeclaration;
  98212. exports.typeParameterInstantiation = typeParameterInstantiation;
  98213. exports.unionTypeAnnotation = unionTypeAnnotation;
  98214. exports.variance = variance;
  98215. exports.voidTypeAnnotation = voidTypeAnnotation;
  98216. exports.enumDeclaration = enumDeclaration;
  98217. exports.enumBooleanBody = enumBooleanBody;
  98218. exports.enumNumberBody = enumNumberBody;
  98219. exports.enumStringBody = enumStringBody;
  98220. exports.enumSymbolBody = enumSymbolBody;
  98221. exports.enumBooleanMember = enumBooleanMember;
  98222. exports.enumNumberMember = enumNumberMember;
  98223. exports.enumStringMember = enumStringMember;
  98224. exports.enumDefaultedMember = enumDefaultedMember;
  98225. exports.indexedAccessType = indexedAccessType;
  98226. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  98227. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  98228. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  98229. exports.jSXElement = exports.jsxElement = jsxElement;
  98230. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  98231. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  98232. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  98233. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  98234. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  98235. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  98236. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  98237. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  98238. exports.jSXText = exports.jsxText = jsxText2;
  98239. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  98240. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  98241. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  98242. exports.noop = noop;
  98243. exports.placeholder = placeholder;
  98244. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  98245. exports.argumentPlaceholder = argumentPlaceholder;
  98246. exports.bindExpression = bindExpression;
  98247. exports.classProperty = classProperty;
  98248. exports.pipelineTopicExpression = pipelineTopicExpression;
  98249. exports.pipelineBareFunction = pipelineBareFunction;
  98250. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  98251. exports.classPrivateProperty = classPrivateProperty;
  98252. exports.classPrivateMethod = classPrivateMethod;
  98253. exports.importAttribute = importAttribute;
  98254. exports.decorator = decorator;
  98255. exports.doExpression = doExpression;
  98256. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  98257. exports.privateName = privateName;
  98258. exports.recordExpression = recordExpression;
  98259. exports.tupleExpression = tupleExpression;
  98260. exports.decimalLiteral = decimalLiteral;
  98261. exports.staticBlock = staticBlock;
  98262. exports.moduleExpression = moduleExpression;
  98263. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  98264. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  98265. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  98266. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  98267. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  98268. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  98269. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  98270. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  98271. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  98272. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  98273. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  98274. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  98275. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  98276. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  98277. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  98278. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  98279. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  98280. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  98281. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  98282. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  98283. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  98284. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  98285. exports.tSThisType = exports.tsThisType = tsThisType;
  98286. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  98287. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  98288. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  98289. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  98290. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  98291. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  98292. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  98293. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  98294. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  98295. exports.tSRestType = exports.tsRestType = tsRestType;
  98296. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  98297. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  98298. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  98299. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  98300. exports.tSInferType = exports.tsInferType = tsInferType;
  98301. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  98302. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  98303. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  98304. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  98305. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  98306. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  98307. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  98308. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  98309. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  98310. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  98311. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  98312. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  98313. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  98314. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  98315. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  98316. exports.tSImportType = exports.tsImportType = tsImportType;
  98317. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  98318. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  98319. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  98320. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  98321. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  98322. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  98323. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  98324. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  98325. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  98326. exports.numberLiteral = NumberLiteral;
  98327. exports.regexLiteral = RegexLiteral;
  98328. exports.restProperty = RestProperty;
  98329. exports.spreadProperty = SpreadProperty;
  98330. var _builder = require_builder5();
  98331. function arrayExpression(elements) {
  98332. return (0, _builder.default)("ArrayExpression", ...arguments);
  98333. }
  98334. function assignmentExpression(operator, left, right) {
  98335. return (0, _builder.default)("AssignmentExpression", ...arguments);
  98336. }
  98337. function binaryExpression(operator, left, right) {
  98338. return (0, _builder.default)("BinaryExpression", ...arguments);
  98339. }
  98340. function interpreterDirective(value) {
  98341. return (0, _builder.default)("InterpreterDirective", ...arguments);
  98342. }
  98343. function directive(value) {
  98344. return (0, _builder.default)("Directive", ...arguments);
  98345. }
  98346. function directiveLiteral(value) {
  98347. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  98348. }
  98349. function blockStatement(body, directives) {
  98350. return (0, _builder.default)("BlockStatement", ...arguments);
  98351. }
  98352. function breakStatement(label) {
  98353. return (0, _builder.default)("BreakStatement", ...arguments);
  98354. }
  98355. function callExpression(callee, _arguments) {
  98356. return (0, _builder.default)("CallExpression", ...arguments);
  98357. }
  98358. function catchClause(param, body) {
  98359. return (0, _builder.default)("CatchClause", ...arguments);
  98360. }
  98361. function conditionalExpression(test, consequent, alternate) {
  98362. return (0, _builder.default)("ConditionalExpression", ...arguments);
  98363. }
  98364. function continueStatement(label) {
  98365. return (0, _builder.default)("ContinueStatement", ...arguments);
  98366. }
  98367. function debuggerStatement() {
  98368. return (0, _builder.default)("DebuggerStatement", ...arguments);
  98369. }
  98370. function doWhileStatement(test, body) {
  98371. return (0, _builder.default)("DoWhileStatement", ...arguments);
  98372. }
  98373. function emptyStatement() {
  98374. return (0, _builder.default)("EmptyStatement", ...arguments);
  98375. }
  98376. function expressionStatement(expression) {
  98377. return (0, _builder.default)("ExpressionStatement", ...arguments);
  98378. }
  98379. function file(program2, comments, tokens) {
  98380. return (0, _builder.default)("File", ...arguments);
  98381. }
  98382. function forInStatement(left, right, body) {
  98383. return (0, _builder.default)("ForInStatement", ...arguments);
  98384. }
  98385. function forStatement(init, test, update, body) {
  98386. return (0, _builder.default)("ForStatement", ...arguments);
  98387. }
  98388. function functionDeclaration(id, params, body, generator, async) {
  98389. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  98390. }
  98391. function functionExpression(id, params, body, generator, async) {
  98392. return (0, _builder.default)("FunctionExpression", ...arguments);
  98393. }
  98394. function identifier(name2) {
  98395. return (0, _builder.default)("Identifier", ...arguments);
  98396. }
  98397. function ifStatement(test, consequent, alternate) {
  98398. return (0, _builder.default)("IfStatement", ...arguments);
  98399. }
  98400. function labeledStatement(label, body) {
  98401. return (0, _builder.default)("LabeledStatement", ...arguments);
  98402. }
  98403. function stringLiteral(value) {
  98404. return (0, _builder.default)("StringLiteral", ...arguments);
  98405. }
  98406. function numericLiteral(value) {
  98407. return (0, _builder.default)("NumericLiteral", ...arguments);
  98408. }
  98409. function nullLiteral() {
  98410. return (0, _builder.default)("NullLiteral", ...arguments);
  98411. }
  98412. function booleanLiteral(value) {
  98413. return (0, _builder.default)("BooleanLiteral", ...arguments);
  98414. }
  98415. function regExpLiteral(pattern, flags) {
  98416. return (0, _builder.default)("RegExpLiteral", ...arguments);
  98417. }
  98418. function logicalExpression(operator, left, right) {
  98419. return (0, _builder.default)("LogicalExpression", ...arguments);
  98420. }
  98421. function memberExpression(object, property, computed, optional) {
  98422. return (0, _builder.default)("MemberExpression", ...arguments);
  98423. }
  98424. function newExpression(callee, _arguments) {
  98425. return (0, _builder.default)("NewExpression", ...arguments);
  98426. }
  98427. function program(body, directives, sourceType, interpreter) {
  98428. return (0, _builder.default)("Program", ...arguments);
  98429. }
  98430. function objectExpression(properties) {
  98431. return (0, _builder.default)("ObjectExpression", ...arguments);
  98432. }
  98433. function objectMethod(kind, key, params, body, computed, generator, async) {
  98434. return (0, _builder.default)("ObjectMethod", ...arguments);
  98435. }
  98436. function objectProperty(key, value, computed, shorthand, decorators) {
  98437. return (0, _builder.default)("ObjectProperty", ...arguments);
  98438. }
  98439. function restElement(argument) {
  98440. return (0, _builder.default)("RestElement", ...arguments);
  98441. }
  98442. function returnStatement(argument) {
  98443. return (0, _builder.default)("ReturnStatement", ...arguments);
  98444. }
  98445. function sequenceExpression(expressions) {
  98446. return (0, _builder.default)("SequenceExpression", ...arguments);
  98447. }
  98448. function parenthesizedExpression(expression) {
  98449. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  98450. }
  98451. function switchCase(test, consequent) {
  98452. return (0, _builder.default)("SwitchCase", ...arguments);
  98453. }
  98454. function switchStatement(discriminant, cases) {
  98455. return (0, _builder.default)("SwitchStatement", ...arguments);
  98456. }
  98457. function thisExpression() {
  98458. return (0, _builder.default)("ThisExpression", ...arguments);
  98459. }
  98460. function throwStatement(argument) {
  98461. return (0, _builder.default)("ThrowStatement", ...arguments);
  98462. }
  98463. function tryStatement(block, handler, finalizer) {
  98464. return (0, _builder.default)("TryStatement", ...arguments);
  98465. }
  98466. function unaryExpression(operator, argument, prefix) {
  98467. return (0, _builder.default)("UnaryExpression", ...arguments);
  98468. }
  98469. function updateExpression(operator, argument, prefix) {
  98470. return (0, _builder.default)("UpdateExpression", ...arguments);
  98471. }
  98472. function variableDeclaration(kind, declarations) {
  98473. return (0, _builder.default)("VariableDeclaration", ...arguments);
  98474. }
  98475. function variableDeclarator(id, init) {
  98476. return (0, _builder.default)("VariableDeclarator", ...arguments);
  98477. }
  98478. function whileStatement(test, body) {
  98479. return (0, _builder.default)("WhileStatement", ...arguments);
  98480. }
  98481. function withStatement(object, body) {
  98482. return (0, _builder.default)("WithStatement", ...arguments);
  98483. }
  98484. function assignmentPattern(left, right) {
  98485. return (0, _builder.default)("AssignmentPattern", ...arguments);
  98486. }
  98487. function arrayPattern(elements) {
  98488. return (0, _builder.default)("ArrayPattern", ...arguments);
  98489. }
  98490. function arrowFunctionExpression(params, body, async) {
  98491. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  98492. }
  98493. function classBody(body) {
  98494. return (0, _builder.default)("ClassBody", ...arguments);
  98495. }
  98496. function classExpression(id, superClass, body, decorators) {
  98497. return (0, _builder.default)("ClassExpression", ...arguments);
  98498. }
  98499. function classDeclaration(id, superClass, body, decorators) {
  98500. return (0, _builder.default)("ClassDeclaration", ...arguments);
  98501. }
  98502. function exportAllDeclaration(source) {
  98503. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  98504. }
  98505. function exportDefaultDeclaration(declaration) {
  98506. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  98507. }
  98508. function exportNamedDeclaration(declaration, specifiers, source) {
  98509. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  98510. }
  98511. function exportSpecifier(local, exported) {
  98512. return (0, _builder.default)("ExportSpecifier", ...arguments);
  98513. }
  98514. function forOfStatement(left, right, body, _await) {
  98515. return (0, _builder.default)("ForOfStatement", ...arguments);
  98516. }
  98517. function importDeclaration(specifiers, source) {
  98518. return (0, _builder.default)("ImportDeclaration", ...arguments);
  98519. }
  98520. function importDefaultSpecifier(local) {
  98521. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  98522. }
  98523. function importNamespaceSpecifier(local) {
  98524. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  98525. }
  98526. function importSpecifier(local, imported) {
  98527. return (0, _builder.default)("ImportSpecifier", ...arguments);
  98528. }
  98529. function metaProperty(meta, property) {
  98530. return (0, _builder.default)("MetaProperty", ...arguments);
  98531. }
  98532. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  98533. return (0, _builder.default)("ClassMethod", ...arguments);
  98534. }
  98535. function objectPattern(properties) {
  98536. return (0, _builder.default)("ObjectPattern", ...arguments);
  98537. }
  98538. function spreadElement(argument) {
  98539. return (0, _builder.default)("SpreadElement", ...arguments);
  98540. }
  98541. function _super() {
  98542. return (0, _builder.default)("Super", ...arguments);
  98543. }
  98544. function taggedTemplateExpression(tag, quasi) {
  98545. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  98546. }
  98547. function templateElement(value, tail) {
  98548. return (0, _builder.default)("TemplateElement", ...arguments);
  98549. }
  98550. function templateLiteral(quasis, expressions) {
  98551. return (0, _builder.default)("TemplateLiteral", ...arguments);
  98552. }
  98553. function yieldExpression(argument, delegate) {
  98554. return (0, _builder.default)("YieldExpression", ...arguments);
  98555. }
  98556. function awaitExpression(argument) {
  98557. return (0, _builder.default)("AwaitExpression", ...arguments);
  98558. }
  98559. function _import() {
  98560. return (0, _builder.default)("Import", ...arguments);
  98561. }
  98562. function bigIntLiteral(value) {
  98563. return (0, _builder.default)("BigIntLiteral", ...arguments);
  98564. }
  98565. function exportNamespaceSpecifier(exported) {
  98566. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  98567. }
  98568. function optionalMemberExpression(object, property, computed, optional) {
  98569. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  98570. }
  98571. function optionalCallExpression(callee, _arguments, optional) {
  98572. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  98573. }
  98574. function anyTypeAnnotation() {
  98575. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  98576. }
  98577. function arrayTypeAnnotation(elementType) {
  98578. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  98579. }
  98580. function booleanTypeAnnotation() {
  98581. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  98582. }
  98583. function booleanLiteralTypeAnnotation(value) {
  98584. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  98585. }
  98586. function nullLiteralTypeAnnotation() {
  98587. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  98588. }
  98589. function classImplements(id, typeParameters) {
  98590. return (0, _builder.default)("ClassImplements", ...arguments);
  98591. }
  98592. function declareClass(id, typeParameters, _extends, body) {
  98593. return (0, _builder.default)("DeclareClass", ...arguments);
  98594. }
  98595. function declareFunction(id) {
  98596. return (0, _builder.default)("DeclareFunction", ...arguments);
  98597. }
  98598. function declareInterface(id, typeParameters, _extends, body) {
  98599. return (0, _builder.default)("DeclareInterface", ...arguments);
  98600. }
  98601. function declareModule(id, body, kind) {
  98602. return (0, _builder.default)("DeclareModule", ...arguments);
  98603. }
  98604. function declareModuleExports(typeAnnotation2) {
  98605. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  98606. }
  98607. function declareTypeAlias(id, typeParameters, right) {
  98608. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  98609. }
  98610. function declareOpaqueType(id, typeParameters, supertype) {
  98611. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  98612. }
  98613. function declareVariable(id) {
  98614. return (0, _builder.default)("DeclareVariable", ...arguments);
  98615. }
  98616. function declareExportDeclaration(declaration, specifiers, source) {
  98617. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  98618. }
  98619. function declareExportAllDeclaration(source) {
  98620. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  98621. }
  98622. function declaredPredicate(value) {
  98623. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  98624. }
  98625. function existsTypeAnnotation() {
  98626. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  98627. }
  98628. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  98629. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  98630. }
  98631. function functionTypeParam(name2, typeAnnotation2) {
  98632. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  98633. }
  98634. function genericTypeAnnotation(id, typeParameters) {
  98635. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  98636. }
  98637. function inferredPredicate() {
  98638. return (0, _builder.default)("InferredPredicate", ...arguments);
  98639. }
  98640. function interfaceExtends(id, typeParameters) {
  98641. return (0, _builder.default)("InterfaceExtends", ...arguments);
  98642. }
  98643. function interfaceDeclaration(id, typeParameters, _extends, body) {
  98644. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  98645. }
  98646. function interfaceTypeAnnotation(_extends, body) {
  98647. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  98648. }
  98649. function intersectionTypeAnnotation(types2) {
  98650. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  98651. }
  98652. function mixedTypeAnnotation() {
  98653. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  98654. }
  98655. function emptyTypeAnnotation() {
  98656. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  98657. }
  98658. function nullableTypeAnnotation(typeAnnotation2) {
  98659. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  98660. }
  98661. function numberLiteralTypeAnnotation(value) {
  98662. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  98663. }
  98664. function numberTypeAnnotation() {
  98665. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  98666. }
  98667. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  98668. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  98669. }
  98670. function objectTypeInternalSlot(id, value, optional, _static, method) {
  98671. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  98672. }
  98673. function objectTypeCallProperty(value) {
  98674. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  98675. }
  98676. function objectTypeIndexer(id, key, value, variance2) {
  98677. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  98678. }
  98679. function objectTypeProperty(key, value, variance2) {
  98680. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  98681. }
  98682. function objectTypeSpreadProperty(argument) {
  98683. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  98684. }
  98685. function opaqueType(id, typeParameters, supertype, impltype) {
  98686. return (0, _builder.default)("OpaqueType", ...arguments);
  98687. }
  98688. function qualifiedTypeIdentifier(id, qualification) {
  98689. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  98690. }
  98691. function stringLiteralTypeAnnotation(value) {
  98692. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  98693. }
  98694. function stringTypeAnnotation() {
  98695. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  98696. }
  98697. function symbolTypeAnnotation() {
  98698. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  98699. }
  98700. function thisTypeAnnotation() {
  98701. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  98702. }
  98703. function tupleTypeAnnotation(types2) {
  98704. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  98705. }
  98706. function typeofTypeAnnotation(argument) {
  98707. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  98708. }
  98709. function typeAlias(id, typeParameters, right) {
  98710. return (0, _builder.default)("TypeAlias", ...arguments);
  98711. }
  98712. function typeAnnotation(typeAnnotation2) {
  98713. return (0, _builder.default)("TypeAnnotation", ...arguments);
  98714. }
  98715. function typeCastExpression(expression, typeAnnotation2) {
  98716. return (0, _builder.default)("TypeCastExpression", ...arguments);
  98717. }
  98718. function typeParameter(bound, _default, variance2) {
  98719. return (0, _builder.default)("TypeParameter", ...arguments);
  98720. }
  98721. function typeParameterDeclaration(params) {
  98722. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  98723. }
  98724. function typeParameterInstantiation(params) {
  98725. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  98726. }
  98727. function unionTypeAnnotation(types2) {
  98728. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  98729. }
  98730. function variance(kind) {
  98731. return (0, _builder.default)("Variance", ...arguments);
  98732. }
  98733. function voidTypeAnnotation() {
  98734. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  98735. }
  98736. function enumDeclaration(id, body) {
  98737. return (0, _builder.default)("EnumDeclaration", ...arguments);
  98738. }
  98739. function enumBooleanBody(members) {
  98740. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  98741. }
  98742. function enumNumberBody(members) {
  98743. return (0, _builder.default)("EnumNumberBody", ...arguments);
  98744. }
  98745. function enumStringBody(members) {
  98746. return (0, _builder.default)("EnumStringBody", ...arguments);
  98747. }
  98748. function enumSymbolBody(members) {
  98749. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  98750. }
  98751. function enumBooleanMember(id) {
  98752. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  98753. }
  98754. function enumNumberMember(id, init) {
  98755. return (0, _builder.default)("EnumNumberMember", ...arguments);
  98756. }
  98757. function enumStringMember(id, init) {
  98758. return (0, _builder.default)("EnumStringMember", ...arguments);
  98759. }
  98760. function enumDefaultedMember(id) {
  98761. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  98762. }
  98763. function indexedAccessType(objectType, indexType) {
  98764. return (0, _builder.default)("IndexedAccessType", ...arguments);
  98765. }
  98766. function optionalIndexedAccessType(objectType, indexType) {
  98767. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  98768. }
  98769. function jsxAttribute(name2, value) {
  98770. return (0, _builder.default)("JSXAttribute", ...arguments);
  98771. }
  98772. function jsxClosingElement(name2) {
  98773. return (0, _builder.default)("JSXClosingElement", ...arguments);
  98774. }
  98775. function jsxElement(openingElement, closingElement, children, selfClosing) {
  98776. return (0, _builder.default)("JSXElement", ...arguments);
  98777. }
  98778. function jsxEmptyExpression() {
  98779. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  98780. }
  98781. function jsxExpressionContainer(expression) {
  98782. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  98783. }
  98784. function jsxSpreadChild(expression) {
  98785. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  98786. }
  98787. function jsxIdentifier(name2) {
  98788. return (0, _builder.default)("JSXIdentifier", ...arguments);
  98789. }
  98790. function jsxMemberExpression(object, property) {
  98791. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  98792. }
  98793. function jsxNamespacedName(namespace, name2) {
  98794. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  98795. }
  98796. function jsxOpeningElement(name2, attributes, selfClosing) {
  98797. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  98798. }
  98799. function jsxSpreadAttribute(argument) {
  98800. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  98801. }
  98802. function jsxText2(value) {
  98803. return (0, _builder.default)("JSXText", ...arguments);
  98804. }
  98805. function jsxFragment(openingFragment, closingFragment, children) {
  98806. return (0, _builder.default)("JSXFragment", ...arguments);
  98807. }
  98808. function jsxOpeningFragment() {
  98809. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  98810. }
  98811. function jsxClosingFragment() {
  98812. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  98813. }
  98814. function noop() {
  98815. return (0, _builder.default)("Noop", ...arguments);
  98816. }
  98817. function placeholder(expectedNode, name2) {
  98818. return (0, _builder.default)("Placeholder", ...arguments);
  98819. }
  98820. function v8IntrinsicIdentifier(name2) {
  98821. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  98822. }
  98823. function argumentPlaceholder() {
  98824. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  98825. }
  98826. function bindExpression(object, callee) {
  98827. return (0, _builder.default)("BindExpression", ...arguments);
  98828. }
  98829. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  98830. return (0, _builder.default)("ClassProperty", ...arguments);
  98831. }
  98832. function pipelineTopicExpression(expression) {
  98833. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  98834. }
  98835. function pipelineBareFunction(callee) {
  98836. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  98837. }
  98838. function pipelinePrimaryTopicReference() {
  98839. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  98840. }
  98841. function classPrivateProperty(key, value, decorators, _static) {
  98842. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  98843. }
  98844. function classPrivateMethod(kind, key, params, body, _static) {
  98845. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  98846. }
  98847. function importAttribute(key, value) {
  98848. return (0, _builder.default)("ImportAttribute", ...arguments);
  98849. }
  98850. function decorator(expression) {
  98851. return (0, _builder.default)("Decorator", ...arguments);
  98852. }
  98853. function doExpression(body, async) {
  98854. return (0, _builder.default)("DoExpression", ...arguments);
  98855. }
  98856. function exportDefaultSpecifier(exported) {
  98857. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  98858. }
  98859. function privateName(id) {
  98860. return (0, _builder.default)("PrivateName", ...arguments);
  98861. }
  98862. function recordExpression(properties) {
  98863. return (0, _builder.default)("RecordExpression", ...arguments);
  98864. }
  98865. function tupleExpression(elements) {
  98866. return (0, _builder.default)("TupleExpression", ...arguments);
  98867. }
  98868. function decimalLiteral(value) {
  98869. return (0, _builder.default)("DecimalLiteral", ...arguments);
  98870. }
  98871. function staticBlock(body) {
  98872. return (0, _builder.default)("StaticBlock", ...arguments);
  98873. }
  98874. function moduleExpression(body) {
  98875. return (0, _builder.default)("ModuleExpression", ...arguments);
  98876. }
  98877. function tsParameterProperty(parameter) {
  98878. return (0, _builder.default)("TSParameterProperty", ...arguments);
  98879. }
  98880. function tsDeclareFunction(id, typeParameters, params, returnType) {
  98881. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  98882. }
  98883. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  98884. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  98885. }
  98886. function tsQualifiedName(left, right) {
  98887. return (0, _builder.default)("TSQualifiedName", ...arguments);
  98888. }
  98889. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  98890. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  98891. }
  98892. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  98893. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  98894. }
  98895. function tsPropertySignature(key, typeAnnotation2, initializer) {
  98896. return (0, _builder.default)("TSPropertySignature", ...arguments);
  98897. }
  98898. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  98899. return (0, _builder.default)("TSMethodSignature", ...arguments);
  98900. }
  98901. function tsIndexSignature(parameters, typeAnnotation2) {
  98902. return (0, _builder.default)("TSIndexSignature", ...arguments);
  98903. }
  98904. function tsAnyKeyword() {
  98905. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  98906. }
  98907. function tsBooleanKeyword() {
  98908. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  98909. }
  98910. function tsBigIntKeyword() {
  98911. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  98912. }
  98913. function tsIntrinsicKeyword() {
  98914. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  98915. }
  98916. function tsNeverKeyword() {
  98917. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  98918. }
  98919. function tsNullKeyword() {
  98920. return (0, _builder.default)("TSNullKeyword", ...arguments);
  98921. }
  98922. function tsNumberKeyword() {
  98923. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  98924. }
  98925. function tsObjectKeyword() {
  98926. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  98927. }
  98928. function tsStringKeyword() {
  98929. return (0, _builder.default)("TSStringKeyword", ...arguments);
  98930. }
  98931. function tsSymbolKeyword() {
  98932. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  98933. }
  98934. function tsUndefinedKeyword() {
  98935. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  98936. }
  98937. function tsUnknownKeyword() {
  98938. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  98939. }
  98940. function tsVoidKeyword() {
  98941. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  98942. }
  98943. function tsThisType() {
  98944. return (0, _builder.default)("TSThisType", ...arguments);
  98945. }
  98946. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  98947. return (0, _builder.default)("TSFunctionType", ...arguments);
  98948. }
  98949. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  98950. return (0, _builder.default)("TSConstructorType", ...arguments);
  98951. }
  98952. function tsTypeReference(typeName, typeParameters) {
  98953. return (0, _builder.default)("TSTypeReference", ...arguments);
  98954. }
  98955. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  98956. return (0, _builder.default)("TSTypePredicate", ...arguments);
  98957. }
  98958. function tsTypeQuery(exprName) {
  98959. return (0, _builder.default)("TSTypeQuery", ...arguments);
  98960. }
  98961. function tsTypeLiteral(members) {
  98962. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  98963. }
  98964. function tsArrayType(elementType) {
  98965. return (0, _builder.default)("TSArrayType", ...arguments);
  98966. }
  98967. function tsTupleType(elementTypes) {
  98968. return (0, _builder.default)("TSTupleType", ...arguments);
  98969. }
  98970. function tsOptionalType(typeAnnotation2) {
  98971. return (0, _builder.default)("TSOptionalType", ...arguments);
  98972. }
  98973. function tsRestType(typeAnnotation2) {
  98974. return (0, _builder.default)("TSRestType", ...arguments);
  98975. }
  98976. function tsNamedTupleMember(label, elementType, optional) {
  98977. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  98978. }
  98979. function tsUnionType(types2) {
  98980. return (0, _builder.default)("TSUnionType", ...arguments);
  98981. }
  98982. function tsIntersectionType(types2) {
  98983. return (0, _builder.default)("TSIntersectionType", ...arguments);
  98984. }
  98985. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  98986. return (0, _builder.default)("TSConditionalType", ...arguments);
  98987. }
  98988. function tsInferType(typeParameter2) {
  98989. return (0, _builder.default)("TSInferType", ...arguments);
  98990. }
  98991. function tsParenthesizedType(typeAnnotation2) {
  98992. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  98993. }
  98994. function tsTypeOperator(typeAnnotation2) {
  98995. return (0, _builder.default)("TSTypeOperator", ...arguments);
  98996. }
  98997. function tsIndexedAccessType(objectType, indexType) {
  98998. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  98999. }
  99000. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  99001. return (0, _builder.default)("TSMappedType", ...arguments);
  99002. }
  99003. function tsLiteralType(literal2) {
  99004. return (0, _builder.default)("TSLiteralType", ...arguments);
  99005. }
  99006. function tsExpressionWithTypeArguments(expression, typeParameters) {
  99007. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  99008. }
  99009. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  99010. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  99011. }
  99012. function tsInterfaceBody(body) {
  99013. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  99014. }
  99015. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  99016. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  99017. }
  99018. function tsAsExpression(expression, typeAnnotation2) {
  99019. return (0, _builder.default)("TSAsExpression", ...arguments);
  99020. }
  99021. function tsTypeAssertion(typeAnnotation2, expression) {
  99022. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  99023. }
  99024. function tsEnumDeclaration(id, members) {
  99025. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  99026. }
  99027. function tsEnumMember(id, initializer) {
  99028. return (0, _builder.default)("TSEnumMember", ...arguments);
  99029. }
  99030. function tsModuleDeclaration(id, body) {
  99031. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  99032. }
  99033. function tsModuleBlock(body) {
  99034. return (0, _builder.default)("TSModuleBlock", ...arguments);
  99035. }
  99036. function tsImportType(argument, qualifier, typeParameters) {
  99037. return (0, _builder.default)("TSImportType", ...arguments);
  99038. }
  99039. function tsImportEqualsDeclaration(id, moduleReference) {
  99040. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  99041. }
  99042. function tsExternalModuleReference(expression) {
  99043. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  99044. }
  99045. function tsNonNullExpression(expression) {
  99046. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  99047. }
  99048. function tsExportAssignment(expression) {
  99049. return (0, _builder.default)("TSExportAssignment", ...arguments);
  99050. }
  99051. function tsNamespaceExportDeclaration(id) {
  99052. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  99053. }
  99054. function tsTypeAnnotation(typeAnnotation2) {
  99055. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  99056. }
  99057. function tsTypeParameterInstantiation(params) {
  99058. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  99059. }
  99060. function tsTypeParameterDeclaration(params) {
  99061. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  99062. }
  99063. function tsTypeParameter(constraint, _default, name2) {
  99064. return (0, _builder.default)("TSTypeParameter", ...arguments);
  99065. }
  99066. function NumberLiteral(...args) {
  99067. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  99068. return (0, _builder.default)("NumberLiteral", ...args);
  99069. }
  99070. function RegexLiteral(...args) {
  99071. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  99072. return (0, _builder.default)("RegexLiteral", ...args);
  99073. }
  99074. function RestProperty(...args) {
  99075. console.trace("The node type RestProperty has been renamed to RestElement");
  99076. return (0, _builder.default)("RestProperty", ...args);
  99077. }
  99078. function SpreadProperty(...args) {
  99079. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  99080. return (0, _builder.default)("SpreadProperty", ...args);
  99081. }
  99082. }
  99083. });
  99084. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  99085. var require_cleanJSXElementLiteralChild4 = __commonJS({
  99086. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  99087. "use strict";
  99088. Object.defineProperty(exports, "__esModule", {
  99089. value: true
  99090. });
  99091. exports.default = cleanJSXElementLiteralChild;
  99092. var _generated = require_generated17();
  99093. function cleanJSXElementLiteralChild(child, args) {
  99094. const lines = child.value.split(/\r\n|\n|\r/);
  99095. let lastNonEmptyLine = 0;
  99096. for (let i = 0; i < lines.length; i++) {
  99097. if (lines[i].match(/[^ \t]/)) {
  99098. lastNonEmptyLine = i;
  99099. }
  99100. }
  99101. let str = "";
  99102. for (let i = 0; i < lines.length; i++) {
  99103. const line = lines[i];
  99104. const isFirstLine = i === 0;
  99105. const isLastLine = i === lines.length - 1;
  99106. const isLastNonEmptyLine = i === lastNonEmptyLine;
  99107. let trimmedLine = line.replace(/\t/g, " ");
  99108. if (!isFirstLine) {
  99109. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  99110. }
  99111. if (!isLastLine) {
  99112. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  99113. }
  99114. if (trimmedLine) {
  99115. if (!isLastNonEmptyLine) {
  99116. trimmedLine += " ";
  99117. }
  99118. str += trimmedLine;
  99119. }
  99120. }
  99121. if (str)
  99122. args.push((0, _generated.stringLiteral)(str));
  99123. }
  99124. }
  99125. });
  99126. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/react/buildChildren.js
  99127. var require_buildChildren4 = __commonJS({
  99128. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  99129. "use strict";
  99130. Object.defineProperty(exports, "__esModule", {
  99131. value: true
  99132. });
  99133. exports.default = buildChildren;
  99134. var _generated = require_generated16();
  99135. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild4();
  99136. function buildChildren(node) {
  99137. const elements = [];
  99138. for (let i = 0; i < node.children.length; i++) {
  99139. let child = node.children[i];
  99140. if ((0, _generated.isJSXText)(child)) {
  99141. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  99142. continue;
  99143. }
  99144. if ((0, _generated.isJSXExpressionContainer)(child))
  99145. child = child.expression;
  99146. if ((0, _generated.isJSXEmptyExpression)(child))
  99147. continue;
  99148. elements.push(child);
  99149. }
  99150. return elements;
  99151. }
  99152. }
  99153. });
  99154. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isNode.js
  99155. var require_isNode4 = __commonJS({
  99156. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  99157. "use strict";
  99158. Object.defineProperty(exports, "__esModule", {
  99159. value: true
  99160. });
  99161. exports.default = isNode;
  99162. var _definitions = require_definitions4();
  99163. function isNode(node) {
  99164. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  99165. }
  99166. }
  99167. });
  99168. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/asserts/assertNode.js
  99169. var require_assertNode4 = __commonJS({
  99170. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  99171. "use strict";
  99172. Object.defineProperty(exports, "__esModule", {
  99173. value: true
  99174. });
  99175. exports.default = assertNode2;
  99176. var _isNode = require_isNode4();
  99177. function assertNode2(node) {
  99178. if (!(0, _isNode.default)(node)) {
  99179. var _node$type;
  99180. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  99181. throw new TypeError(`Not a valid node of type "${type}"`);
  99182. }
  99183. }
  99184. }
  99185. });
  99186. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/asserts/generated/index.js
  99187. var require_generated18 = __commonJS({
  99188. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  99189. "use strict";
  99190. Object.defineProperty(exports, "__esModule", {
  99191. value: true
  99192. });
  99193. exports.assertArrayExpression = assertArrayExpression;
  99194. exports.assertAssignmentExpression = assertAssignmentExpression;
  99195. exports.assertBinaryExpression = assertBinaryExpression;
  99196. exports.assertInterpreterDirective = assertInterpreterDirective;
  99197. exports.assertDirective = assertDirective;
  99198. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  99199. exports.assertBlockStatement = assertBlockStatement;
  99200. exports.assertBreakStatement = assertBreakStatement;
  99201. exports.assertCallExpression = assertCallExpression;
  99202. exports.assertCatchClause = assertCatchClause;
  99203. exports.assertConditionalExpression = assertConditionalExpression;
  99204. exports.assertContinueStatement = assertContinueStatement;
  99205. exports.assertDebuggerStatement = assertDebuggerStatement;
  99206. exports.assertDoWhileStatement = assertDoWhileStatement;
  99207. exports.assertEmptyStatement = assertEmptyStatement;
  99208. exports.assertExpressionStatement = assertExpressionStatement;
  99209. exports.assertFile = assertFile;
  99210. exports.assertForInStatement = assertForInStatement;
  99211. exports.assertForStatement = assertForStatement;
  99212. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  99213. exports.assertFunctionExpression = assertFunctionExpression;
  99214. exports.assertIdentifier = assertIdentifier;
  99215. exports.assertIfStatement = assertIfStatement;
  99216. exports.assertLabeledStatement = assertLabeledStatement;
  99217. exports.assertStringLiteral = assertStringLiteral;
  99218. exports.assertNumericLiteral = assertNumericLiteral;
  99219. exports.assertNullLiteral = assertNullLiteral;
  99220. exports.assertBooleanLiteral = assertBooleanLiteral;
  99221. exports.assertRegExpLiteral = assertRegExpLiteral;
  99222. exports.assertLogicalExpression = assertLogicalExpression;
  99223. exports.assertMemberExpression = assertMemberExpression;
  99224. exports.assertNewExpression = assertNewExpression;
  99225. exports.assertProgram = assertProgram;
  99226. exports.assertObjectExpression = assertObjectExpression;
  99227. exports.assertObjectMethod = assertObjectMethod;
  99228. exports.assertObjectProperty = assertObjectProperty;
  99229. exports.assertRestElement = assertRestElement;
  99230. exports.assertReturnStatement = assertReturnStatement;
  99231. exports.assertSequenceExpression = assertSequenceExpression;
  99232. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  99233. exports.assertSwitchCase = assertSwitchCase;
  99234. exports.assertSwitchStatement = assertSwitchStatement;
  99235. exports.assertThisExpression = assertThisExpression;
  99236. exports.assertThrowStatement = assertThrowStatement;
  99237. exports.assertTryStatement = assertTryStatement;
  99238. exports.assertUnaryExpression = assertUnaryExpression;
  99239. exports.assertUpdateExpression = assertUpdateExpression;
  99240. exports.assertVariableDeclaration = assertVariableDeclaration;
  99241. exports.assertVariableDeclarator = assertVariableDeclarator;
  99242. exports.assertWhileStatement = assertWhileStatement;
  99243. exports.assertWithStatement = assertWithStatement;
  99244. exports.assertAssignmentPattern = assertAssignmentPattern;
  99245. exports.assertArrayPattern = assertArrayPattern;
  99246. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  99247. exports.assertClassBody = assertClassBody;
  99248. exports.assertClassExpression = assertClassExpression;
  99249. exports.assertClassDeclaration = assertClassDeclaration;
  99250. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  99251. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  99252. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  99253. exports.assertExportSpecifier = assertExportSpecifier;
  99254. exports.assertForOfStatement = assertForOfStatement;
  99255. exports.assertImportDeclaration = assertImportDeclaration;
  99256. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  99257. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  99258. exports.assertImportSpecifier = assertImportSpecifier;
  99259. exports.assertMetaProperty = assertMetaProperty;
  99260. exports.assertClassMethod = assertClassMethod;
  99261. exports.assertObjectPattern = assertObjectPattern;
  99262. exports.assertSpreadElement = assertSpreadElement;
  99263. exports.assertSuper = assertSuper;
  99264. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  99265. exports.assertTemplateElement = assertTemplateElement;
  99266. exports.assertTemplateLiteral = assertTemplateLiteral;
  99267. exports.assertYieldExpression = assertYieldExpression;
  99268. exports.assertAwaitExpression = assertAwaitExpression;
  99269. exports.assertImport = assertImport;
  99270. exports.assertBigIntLiteral = assertBigIntLiteral;
  99271. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  99272. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  99273. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  99274. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  99275. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  99276. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  99277. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  99278. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  99279. exports.assertClassImplements = assertClassImplements;
  99280. exports.assertDeclareClass = assertDeclareClass;
  99281. exports.assertDeclareFunction = assertDeclareFunction;
  99282. exports.assertDeclareInterface = assertDeclareInterface;
  99283. exports.assertDeclareModule = assertDeclareModule;
  99284. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  99285. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  99286. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  99287. exports.assertDeclareVariable = assertDeclareVariable;
  99288. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  99289. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  99290. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  99291. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  99292. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  99293. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  99294. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  99295. exports.assertInferredPredicate = assertInferredPredicate;
  99296. exports.assertInterfaceExtends = assertInterfaceExtends;
  99297. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  99298. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  99299. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  99300. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  99301. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  99302. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  99303. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  99304. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  99305. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  99306. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  99307. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  99308. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  99309. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  99310. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  99311. exports.assertOpaqueType = assertOpaqueType;
  99312. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  99313. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  99314. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  99315. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  99316. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  99317. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  99318. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  99319. exports.assertTypeAlias = assertTypeAlias;
  99320. exports.assertTypeAnnotation = assertTypeAnnotation;
  99321. exports.assertTypeCastExpression = assertTypeCastExpression;
  99322. exports.assertTypeParameter = assertTypeParameter;
  99323. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  99324. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  99325. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  99326. exports.assertVariance = assertVariance;
  99327. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  99328. exports.assertEnumDeclaration = assertEnumDeclaration;
  99329. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  99330. exports.assertEnumNumberBody = assertEnumNumberBody;
  99331. exports.assertEnumStringBody = assertEnumStringBody;
  99332. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  99333. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  99334. exports.assertEnumNumberMember = assertEnumNumberMember;
  99335. exports.assertEnumStringMember = assertEnumStringMember;
  99336. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  99337. exports.assertIndexedAccessType = assertIndexedAccessType;
  99338. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  99339. exports.assertJSXAttribute = assertJSXAttribute;
  99340. exports.assertJSXClosingElement = assertJSXClosingElement;
  99341. exports.assertJSXElement = assertJSXElement;
  99342. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  99343. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  99344. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  99345. exports.assertJSXIdentifier = assertJSXIdentifier;
  99346. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  99347. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  99348. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  99349. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  99350. exports.assertJSXText = assertJSXText;
  99351. exports.assertJSXFragment = assertJSXFragment;
  99352. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  99353. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  99354. exports.assertNoop = assertNoop;
  99355. exports.assertPlaceholder = assertPlaceholder;
  99356. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  99357. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  99358. exports.assertBindExpression = assertBindExpression;
  99359. exports.assertClassProperty = assertClassProperty;
  99360. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  99361. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  99362. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  99363. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  99364. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  99365. exports.assertImportAttribute = assertImportAttribute;
  99366. exports.assertDecorator = assertDecorator;
  99367. exports.assertDoExpression = assertDoExpression;
  99368. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  99369. exports.assertPrivateName = assertPrivateName;
  99370. exports.assertRecordExpression = assertRecordExpression;
  99371. exports.assertTupleExpression = assertTupleExpression;
  99372. exports.assertDecimalLiteral = assertDecimalLiteral;
  99373. exports.assertStaticBlock = assertStaticBlock;
  99374. exports.assertModuleExpression = assertModuleExpression;
  99375. exports.assertTSParameterProperty = assertTSParameterProperty;
  99376. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  99377. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  99378. exports.assertTSQualifiedName = assertTSQualifiedName;
  99379. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  99380. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  99381. exports.assertTSPropertySignature = assertTSPropertySignature;
  99382. exports.assertTSMethodSignature = assertTSMethodSignature;
  99383. exports.assertTSIndexSignature = assertTSIndexSignature;
  99384. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  99385. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  99386. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  99387. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  99388. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  99389. exports.assertTSNullKeyword = assertTSNullKeyword;
  99390. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  99391. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  99392. exports.assertTSStringKeyword = assertTSStringKeyword;
  99393. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  99394. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  99395. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  99396. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  99397. exports.assertTSThisType = assertTSThisType;
  99398. exports.assertTSFunctionType = assertTSFunctionType;
  99399. exports.assertTSConstructorType = assertTSConstructorType;
  99400. exports.assertTSTypeReference = assertTSTypeReference;
  99401. exports.assertTSTypePredicate = assertTSTypePredicate;
  99402. exports.assertTSTypeQuery = assertTSTypeQuery;
  99403. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  99404. exports.assertTSArrayType = assertTSArrayType;
  99405. exports.assertTSTupleType = assertTSTupleType;
  99406. exports.assertTSOptionalType = assertTSOptionalType;
  99407. exports.assertTSRestType = assertTSRestType;
  99408. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  99409. exports.assertTSUnionType = assertTSUnionType;
  99410. exports.assertTSIntersectionType = assertTSIntersectionType;
  99411. exports.assertTSConditionalType = assertTSConditionalType;
  99412. exports.assertTSInferType = assertTSInferType;
  99413. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  99414. exports.assertTSTypeOperator = assertTSTypeOperator;
  99415. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  99416. exports.assertTSMappedType = assertTSMappedType;
  99417. exports.assertTSLiteralType = assertTSLiteralType;
  99418. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  99419. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  99420. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  99421. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  99422. exports.assertTSAsExpression = assertTSAsExpression;
  99423. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  99424. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  99425. exports.assertTSEnumMember = assertTSEnumMember;
  99426. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  99427. exports.assertTSModuleBlock = assertTSModuleBlock;
  99428. exports.assertTSImportType = assertTSImportType;
  99429. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  99430. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  99431. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  99432. exports.assertTSExportAssignment = assertTSExportAssignment;
  99433. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  99434. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  99435. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  99436. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  99437. exports.assertTSTypeParameter = assertTSTypeParameter;
  99438. exports.assertExpression = assertExpression;
  99439. exports.assertBinary = assertBinary;
  99440. exports.assertScopable = assertScopable;
  99441. exports.assertBlockParent = assertBlockParent;
  99442. exports.assertBlock = assertBlock;
  99443. exports.assertStatement = assertStatement;
  99444. exports.assertTerminatorless = assertTerminatorless;
  99445. exports.assertCompletionStatement = assertCompletionStatement;
  99446. exports.assertConditional = assertConditional;
  99447. exports.assertLoop = assertLoop;
  99448. exports.assertWhile = assertWhile;
  99449. exports.assertExpressionWrapper = assertExpressionWrapper;
  99450. exports.assertFor = assertFor;
  99451. exports.assertForXStatement = assertForXStatement;
  99452. exports.assertFunction = assertFunction;
  99453. exports.assertFunctionParent = assertFunctionParent;
  99454. exports.assertPureish = assertPureish;
  99455. exports.assertDeclaration = assertDeclaration;
  99456. exports.assertPatternLike = assertPatternLike;
  99457. exports.assertLVal = assertLVal;
  99458. exports.assertTSEntityName = assertTSEntityName;
  99459. exports.assertLiteral = assertLiteral;
  99460. exports.assertImmutable = assertImmutable;
  99461. exports.assertUserWhitespacable = assertUserWhitespacable;
  99462. exports.assertMethod = assertMethod;
  99463. exports.assertObjectMember = assertObjectMember;
  99464. exports.assertProperty = assertProperty;
  99465. exports.assertUnaryLike = assertUnaryLike;
  99466. exports.assertPattern = assertPattern;
  99467. exports.assertClass = assertClass;
  99468. exports.assertModuleDeclaration = assertModuleDeclaration;
  99469. exports.assertExportDeclaration = assertExportDeclaration;
  99470. exports.assertModuleSpecifier = assertModuleSpecifier;
  99471. exports.assertFlow = assertFlow;
  99472. exports.assertFlowType = assertFlowType;
  99473. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  99474. exports.assertFlowDeclaration = assertFlowDeclaration;
  99475. exports.assertFlowPredicate = assertFlowPredicate;
  99476. exports.assertEnumBody = assertEnumBody;
  99477. exports.assertEnumMember = assertEnumMember;
  99478. exports.assertJSX = assertJSX;
  99479. exports.assertPrivate = assertPrivate;
  99480. exports.assertTSTypeElement = assertTSTypeElement;
  99481. exports.assertTSType = assertTSType;
  99482. exports.assertTSBaseType = assertTSBaseType;
  99483. exports.assertNumberLiteral = assertNumberLiteral;
  99484. exports.assertRegexLiteral = assertRegexLiteral;
  99485. exports.assertRestProperty = assertRestProperty;
  99486. exports.assertSpreadProperty = assertSpreadProperty;
  99487. var _is = require_is4();
  99488. function assert(type, node, opts) {
  99489. if (!(0, _is.default)(type, node, opts)) {
  99490. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  99491. }
  99492. }
  99493. function assertArrayExpression(node, opts) {
  99494. assert("ArrayExpression", node, opts);
  99495. }
  99496. function assertAssignmentExpression(node, opts) {
  99497. assert("AssignmentExpression", node, opts);
  99498. }
  99499. function assertBinaryExpression(node, opts) {
  99500. assert("BinaryExpression", node, opts);
  99501. }
  99502. function assertInterpreterDirective(node, opts) {
  99503. assert("InterpreterDirective", node, opts);
  99504. }
  99505. function assertDirective(node, opts) {
  99506. assert("Directive", node, opts);
  99507. }
  99508. function assertDirectiveLiteral(node, opts) {
  99509. assert("DirectiveLiteral", node, opts);
  99510. }
  99511. function assertBlockStatement(node, opts) {
  99512. assert("BlockStatement", node, opts);
  99513. }
  99514. function assertBreakStatement(node, opts) {
  99515. assert("BreakStatement", node, opts);
  99516. }
  99517. function assertCallExpression(node, opts) {
  99518. assert("CallExpression", node, opts);
  99519. }
  99520. function assertCatchClause(node, opts) {
  99521. assert("CatchClause", node, opts);
  99522. }
  99523. function assertConditionalExpression(node, opts) {
  99524. assert("ConditionalExpression", node, opts);
  99525. }
  99526. function assertContinueStatement(node, opts) {
  99527. assert("ContinueStatement", node, opts);
  99528. }
  99529. function assertDebuggerStatement(node, opts) {
  99530. assert("DebuggerStatement", node, opts);
  99531. }
  99532. function assertDoWhileStatement(node, opts) {
  99533. assert("DoWhileStatement", node, opts);
  99534. }
  99535. function assertEmptyStatement(node, opts) {
  99536. assert("EmptyStatement", node, opts);
  99537. }
  99538. function assertExpressionStatement(node, opts) {
  99539. assert("ExpressionStatement", node, opts);
  99540. }
  99541. function assertFile(node, opts) {
  99542. assert("File", node, opts);
  99543. }
  99544. function assertForInStatement(node, opts) {
  99545. assert("ForInStatement", node, opts);
  99546. }
  99547. function assertForStatement(node, opts) {
  99548. assert("ForStatement", node, opts);
  99549. }
  99550. function assertFunctionDeclaration(node, opts) {
  99551. assert("FunctionDeclaration", node, opts);
  99552. }
  99553. function assertFunctionExpression(node, opts) {
  99554. assert("FunctionExpression", node, opts);
  99555. }
  99556. function assertIdentifier(node, opts) {
  99557. assert("Identifier", node, opts);
  99558. }
  99559. function assertIfStatement(node, opts) {
  99560. assert("IfStatement", node, opts);
  99561. }
  99562. function assertLabeledStatement(node, opts) {
  99563. assert("LabeledStatement", node, opts);
  99564. }
  99565. function assertStringLiteral(node, opts) {
  99566. assert("StringLiteral", node, opts);
  99567. }
  99568. function assertNumericLiteral(node, opts) {
  99569. assert("NumericLiteral", node, opts);
  99570. }
  99571. function assertNullLiteral(node, opts) {
  99572. assert("NullLiteral", node, opts);
  99573. }
  99574. function assertBooleanLiteral(node, opts) {
  99575. assert("BooleanLiteral", node, opts);
  99576. }
  99577. function assertRegExpLiteral(node, opts) {
  99578. assert("RegExpLiteral", node, opts);
  99579. }
  99580. function assertLogicalExpression(node, opts) {
  99581. assert("LogicalExpression", node, opts);
  99582. }
  99583. function assertMemberExpression(node, opts) {
  99584. assert("MemberExpression", node, opts);
  99585. }
  99586. function assertNewExpression(node, opts) {
  99587. assert("NewExpression", node, opts);
  99588. }
  99589. function assertProgram(node, opts) {
  99590. assert("Program", node, opts);
  99591. }
  99592. function assertObjectExpression(node, opts) {
  99593. assert("ObjectExpression", node, opts);
  99594. }
  99595. function assertObjectMethod(node, opts) {
  99596. assert("ObjectMethod", node, opts);
  99597. }
  99598. function assertObjectProperty(node, opts) {
  99599. assert("ObjectProperty", node, opts);
  99600. }
  99601. function assertRestElement(node, opts) {
  99602. assert("RestElement", node, opts);
  99603. }
  99604. function assertReturnStatement(node, opts) {
  99605. assert("ReturnStatement", node, opts);
  99606. }
  99607. function assertSequenceExpression(node, opts) {
  99608. assert("SequenceExpression", node, opts);
  99609. }
  99610. function assertParenthesizedExpression(node, opts) {
  99611. assert("ParenthesizedExpression", node, opts);
  99612. }
  99613. function assertSwitchCase(node, opts) {
  99614. assert("SwitchCase", node, opts);
  99615. }
  99616. function assertSwitchStatement(node, opts) {
  99617. assert("SwitchStatement", node, opts);
  99618. }
  99619. function assertThisExpression(node, opts) {
  99620. assert("ThisExpression", node, opts);
  99621. }
  99622. function assertThrowStatement(node, opts) {
  99623. assert("ThrowStatement", node, opts);
  99624. }
  99625. function assertTryStatement(node, opts) {
  99626. assert("TryStatement", node, opts);
  99627. }
  99628. function assertUnaryExpression(node, opts) {
  99629. assert("UnaryExpression", node, opts);
  99630. }
  99631. function assertUpdateExpression(node, opts) {
  99632. assert("UpdateExpression", node, opts);
  99633. }
  99634. function assertVariableDeclaration(node, opts) {
  99635. assert("VariableDeclaration", node, opts);
  99636. }
  99637. function assertVariableDeclarator(node, opts) {
  99638. assert("VariableDeclarator", node, opts);
  99639. }
  99640. function assertWhileStatement(node, opts) {
  99641. assert("WhileStatement", node, opts);
  99642. }
  99643. function assertWithStatement(node, opts) {
  99644. assert("WithStatement", node, opts);
  99645. }
  99646. function assertAssignmentPattern(node, opts) {
  99647. assert("AssignmentPattern", node, opts);
  99648. }
  99649. function assertArrayPattern(node, opts) {
  99650. assert("ArrayPattern", node, opts);
  99651. }
  99652. function assertArrowFunctionExpression(node, opts) {
  99653. assert("ArrowFunctionExpression", node, opts);
  99654. }
  99655. function assertClassBody(node, opts) {
  99656. assert("ClassBody", node, opts);
  99657. }
  99658. function assertClassExpression(node, opts) {
  99659. assert("ClassExpression", node, opts);
  99660. }
  99661. function assertClassDeclaration(node, opts) {
  99662. assert("ClassDeclaration", node, opts);
  99663. }
  99664. function assertExportAllDeclaration(node, opts) {
  99665. assert("ExportAllDeclaration", node, opts);
  99666. }
  99667. function assertExportDefaultDeclaration(node, opts) {
  99668. assert("ExportDefaultDeclaration", node, opts);
  99669. }
  99670. function assertExportNamedDeclaration(node, opts) {
  99671. assert("ExportNamedDeclaration", node, opts);
  99672. }
  99673. function assertExportSpecifier(node, opts) {
  99674. assert("ExportSpecifier", node, opts);
  99675. }
  99676. function assertForOfStatement(node, opts) {
  99677. assert("ForOfStatement", node, opts);
  99678. }
  99679. function assertImportDeclaration(node, opts) {
  99680. assert("ImportDeclaration", node, opts);
  99681. }
  99682. function assertImportDefaultSpecifier(node, opts) {
  99683. assert("ImportDefaultSpecifier", node, opts);
  99684. }
  99685. function assertImportNamespaceSpecifier(node, opts) {
  99686. assert("ImportNamespaceSpecifier", node, opts);
  99687. }
  99688. function assertImportSpecifier(node, opts) {
  99689. assert("ImportSpecifier", node, opts);
  99690. }
  99691. function assertMetaProperty(node, opts) {
  99692. assert("MetaProperty", node, opts);
  99693. }
  99694. function assertClassMethod(node, opts) {
  99695. assert("ClassMethod", node, opts);
  99696. }
  99697. function assertObjectPattern(node, opts) {
  99698. assert("ObjectPattern", node, opts);
  99699. }
  99700. function assertSpreadElement(node, opts) {
  99701. assert("SpreadElement", node, opts);
  99702. }
  99703. function assertSuper(node, opts) {
  99704. assert("Super", node, opts);
  99705. }
  99706. function assertTaggedTemplateExpression(node, opts) {
  99707. assert("TaggedTemplateExpression", node, opts);
  99708. }
  99709. function assertTemplateElement(node, opts) {
  99710. assert("TemplateElement", node, opts);
  99711. }
  99712. function assertTemplateLiteral(node, opts) {
  99713. assert("TemplateLiteral", node, opts);
  99714. }
  99715. function assertYieldExpression(node, opts) {
  99716. assert("YieldExpression", node, opts);
  99717. }
  99718. function assertAwaitExpression(node, opts) {
  99719. assert("AwaitExpression", node, opts);
  99720. }
  99721. function assertImport(node, opts) {
  99722. assert("Import", node, opts);
  99723. }
  99724. function assertBigIntLiteral(node, opts) {
  99725. assert("BigIntLiteral", node, opts);
  99726. }
  99727. function assertExportNamespaceSpecifier(node, opts) {
  99728. assert("ExportNamespaceSpecifier", node, opts);
  99729. }
  99730. function assertOptionalMemberExpression(node, opts) {
  99731. assert("OptionalMemberExpression", node, opts);
  99732. }
  99733. function assertOptionalCallExpression(node, opts) {
  99734. assert("OptionalCallExpression", node, opts);
  99735. }
  99736. function assertAnyTypeAnnotation(node, opts) {
  99737. assert("AnyTypeAnnotation", node, opts);
  99738. }
  99739. function assertArrayTypeAnnotation(node, opts) {
  99740. assert("ArrayTypeAnnotation", node, opts);
  99741. }
  99742. function assertBooleanTypeAnnotation(node, opts) {
  99743. assert("BooleanTypeAnnotation", node, opts);
  99744. }
  99745. function assertBooleanLiteralTypeAnnotation(node, opts) {
  99746. assert("BooleanLiteralTypeAnnotation", node, opts);
  99747. }
  99748. function assertNullLiteralTypeAnnotation(node, opts) {
  99749. assert("NullLiteralTypeAnnotation", node, opts);
  99750. }
  99751. function assertClassImplements(node, opts) {
  99752. assert("ClassImplements", node, opts);
  99753. }
  99754. function assertDeclareClass(node, opts) {
  99755. assert("DeclareClass", node, opts);
  99756. }
  99757. function assertDeclareFunction(node, opts) {
  99758. assert("DeclareFunction", node, opts);
  99759. }
  99760. function assertDeclareInterface(node, opts) {
  99761. assert("DeclareInterface", node, opts);
  99762. }
  99763. function assertDeclareModule(node, opts) {
  99764. assert("DeclareModule", node, opts);
  99765. }
  99766. function assertDeclareModuleExports(node, opts) {
  99767. assert("DeclareModuleExports", node, opts);
  99768. }
  99769. function assertDeclareTypeAlias(node, opts) {
  99770. assert("DeclareTypeAlias", node, opts);
  99771. }
  99772. function assertDeclareOpaqueType(node, opts) {
  99773. assert("DeclareOpaqueType", node, opts);
  99774. }
  99775. function assertDeclareVariable(node, opts) {
  99776. assert("DeclareVariable", node, opts);
  99777. }
  99778. function assertDeclareExportDeclaration(node, opts) {
  99779. assert("DeclareExportDeclaration", node, opts);
  99780. }
  99781. function assertDeclareExportAllDeclaration(node, opts) {
  99782. assert("DeclareExportAllDeclaration", node, opts);
  99783. }
  99784. function assertDeclaredPredicate(node, opts) {
  99785. assert("DeclaredPredicate", node, opts);
  99786. }
  99787. function assertExistsTypeAnnotation(node, opts) {
  99788. assert("ExistsTypeAnnotation", node, opts);
  99789. }
  99790. function assertFunctionTypeAnnotation(node, opts) {
  99791. assert("FunctionTypeAnnotation", node, opts);
  99792. }
  99793. function assertFunctionTypeParam(node, opts) {
  99794. assert("FunctionTypeParam", node, opts);
  99795. }
  99796. function assertGenericTypeAnnotation(node, opts) {
  99797. assert("GenericTypeAnnotation", node, opts);
  99798. }
  99799. function assertInferredPredicate(node, opts) {
  99800. assert("InferredPredicate", node, opts);
  99801. }
  99802. function assertInterfaceExtends(node, opts) {
  99803. assert("InterfaceExtends", node, opts);
  99804. }
  99805. function assertInterfaceDeclaration(node, opts) {
  99806. assert("InterfaceDeclaration", node, opts);
  99807. }
  99808. function assertInterfaceTypeAnnotation(node, opts) {
  99809. assert("InterfaceTypeAnnotation", node, opts);
  99810. }
  99811. function assertIntersectionTypeAnnotation(node, opts) {
  99812. assert("IntersectionTypeAnnotation", node, opts);
  99813. }
  99814. function assertMixedTypeAnnotation(node, opts) {
  99815. assert("MixedTypeAnnotation", node, opts);
  99816. }
  99817. function assertEmptyTypeAnnotation(node, opts) {
  99818. assert("EmptyTypeAnnotation", node, opts);
  99819. }
  99820. function assertNullableTypeAnnotation(node, opts) {
  99821. assert("NullableTypeAnnotation", node, opts);
  99822. }
  99823. function assertNumberLiteralTypeAnnotation(node, opts) {
  99824. assert("NumberLiteralTypeAnnotation", node, opts);
  99825. }
  99826. function assertNumberTypeAnnotation(node, opts) {
  99827. assert("NumberTypeAnnotation", node, opts);
  99828. }
  99829. function assertObjectTypeAnnotation(node, opts) {
  99830. assert("ObjectTypeAnnotation", node, opts);
  99831. }
  99832. function assertObjectTypeInternalSlot(node, opts) {
  99833. assert("ObjectTypeInternalSlot", node, opts);
  99834. }
  99835. function assertObjectTypeCallProperty(node, opts) {
  99836. assert("ObjectTypeCallProperty", node, opts);
  99837. }
  99838. function assertObjectTypeIndexer(node, opts) {
  99839. assert("ObjectTypeIndexer", node, opts);
  99840. }
  99841. function assertObjectTypeProperty(node, opts) {
  99842. assert("ObjectTypeProperty", node, opts);
  99843. }
  99844. function assertObjectTypeSpreadProperty(node, opts) {
  99845. assert("ObjectTypeSpreadProperty", node, opts);
  99846. }
  99847. function assertOpaqueType(node, opts) {
  99848. assert("OpaqueType", node, opts);
  99849. }
  99850. function assertQualifiedTypeIdentifier(node, opts) {
  99851. assert("QualifiedTypeIdentifier", node, opts);
  99852. }
  99853. function assertStringLiteralTypeAnnotation(node, opts) {
  99854. assert("StringLiteralTypeAnnotation", node, opts);
  99855. }
  99856. function assertStringTypeAnnotation(node, opts) {
  99857. assert("StringTypeAnnotation", node, opts);
  99858. }
  99859. function assertSymbolTypeAnnotation(node, opts) {
  99860. assert("SymbolTypeAnnotation", node, opts);
  99861. }
  99862. function assertThisTypeAnnotation(node, opts) {
  99863. assert("ThisTypeAnnotation", node, opts);
  99864. }
  99865. function assertTupleTypeAnnotation(node, opts) {
  99866. assert("TupleTypeAnnotation", node, opts);
  99867. }
  99868. function assertTypeofTypeAnnotation(node, opts) {
  99869. assert("TypeofTypeAnnotation", node, opts);
  99870. }
  99871. function assertTypeAlias(node, opts) {
  99872. assert("TypeAlias", node, opts);
  99873. }
  99874. function assertTypeAnnotation(node, opts) {
  99875. assert("TypeAnnotation", node, opts);
  99876. }
  99877. function assertTypeCastExpression(node, opts) {
  99878. assert("TypeCastExpression", node, opts);
  99879. }
  99880. function assertTypeParameter(node, opts) {
  99881. assert("TypeParameter", node, opts);
  99882. }
  99883. function assertTypeParameterDeclaration(node, opts) {
  99884. assert("TypeParameterDeclaration", node, opts);
  99885. }
  99886. function assertTypeParameterInstantiation(node, opts) {
  99887. assert("TypeParameterInstantiation", node, opts);
  99888. }
  99889. function assertUnionTypeAnnotation(node, opts) {
  99890. assert("UnionTypeAnnotation", node, opts);
  99891. }
  99892. function assertVariance(node, opts) {
  99893. assert("Variance", node, opts);
  99894. }
  99895. function assertVoidTypeAnnotation(node, opts) {
  99896. assert("VoidTypeAnnotation", node, opts);
  99897. }
  99898. function assertEnumDeclaration(node, opts) {
  99899. assert("EnumDeclaration", node, opts);
  99900. }
  99901. function assertEnumBooleanBody(node, opts) {
  99902. assert("EnumBooleanBody", node, opts);
  99903. }
  99904. function assertEnumNumberBody(node, opts) {
  99905. assert("EnumNumberBody", node, opts);
  99906. }
  99907. function assertEnumStringBody(node, opts) {
  99908. assert("EnumStringBody", node, opts);
  99909. }
  99910. function assertEnumSymbolBody(node, opts) {
  99911. assert("EnumSymbolBody", node, opts);
  99912. }
  99913. function assertEnumBooleanMember(node, opts) {
  99914. assert("EnumBooleanMember", node, opts);
  99915. }
  99916. function assertEnumNumberMember(node, opts) {
  99917. assert("EnumNumberMember", node, opts);
  99918. }
  99919. function assertEnumStringMember(node, opts) {
  99920. assert("EnumStringMember", node, opts);
  99921. }
  99922. function assertEnumDefaultedMember(node, opts) {
  99923. assert("EnumDefaultedMember", node, opts);
  99924. }
  99925. function assertIndexedAccessType(node, opts) {
  99926. assert("IndexedAccessType", node, opts);
  99927. }
  99928. function assertOptionalIndexedAccessType(node, opts) {
  99929. assert("OptionalIndexedAccessType", node, opts);
  99930. }
  99931. function assertJSXAttribute(node, opts) {
  99932. assert("JSXAttribute", node, opts);
  99933. }
  99934. function assertJSXClosingElement(node, opts) {
  99935. assert("JSXClosingElement", node, opts);
  99936. }
  99937. function assertJSXElement(node, opts) {
  99938. assert("JSXElement", node, opts);
  99939. }
  99940. function assertJSXEmptyExpression(node, opts) {
  99941. assert("JSXEmptyExpression", node, opts);
  99942. }
  99943. function assertJSXExpressionContainer(node, opts) {
  99944. assert("JSXExpressionContainer", node, opts);
  99945. }
  99946. function assertJSXSpreadChild(node, opts) {
  99947. assert("JSXSpreadChild", node, opts);
  99948. }
  99949. function assertJSXIdentifier(node, opts) {
  99950. assert("JSXIdentifier", node, opts);
  99951. }
  99952. function assertJSXMemberExpression(node, opts) {
  99953. assert("JSXMemberExpression", node, opts);
  99954. }
  99955. function assertJSXNamespacedName(node, opts) {
  99956. assert("JSXNamespacedName", node, opts);
  99957. }
  99958. function assertJSXOpeningElement(node, opts) {
  99959. assert("JSXOpeningElement", node, opts);
  99960. }
  99961. function assertJSXSpreadAttribute(node, opts) {
  99962. assert("JSXSpreadAttribute", node, opts);
  99963. }
  99964. function assertJSXText(node, opts) {
  99965. assert("JSXText", node, opts);
  99966. }
  99967. function assertJSXFragment(node, opts) {
  99968. assert("JSXFragment", node, opts);
  99969. }
  99970. function assertJSXOpeningFragment(node, opts) {
  99971. assert("JSXOpeningFragment", node, opts);
  99972. }
  99973. function assertJSXClosingFragment(node, opts) {
  99974. assert("JSXClosingFragment", node, opts);
  99975. }
  99976. function assertNoop(node, opts) {
  99977. assert("Noop", node, opts);
  99978. }
  99979. function assertPlaceholder(node, opts) {
  99980. assert("Placeholder", node, opts);
  99981. }
  99982. function assertV8IntrinsicIdentifier(node, opts) {
  99983. assert("V8IntrinsicIdentifier", node, opts);
  99984. }
  99985. function assertArgumentPlaceholder(node, opts) {
  99986. assert("ArgumentPlaceholder", node, opts);
  99987. }
  99988. function assertBindExpression(node, opts) {
  99989. assert("BindExpression", node, opts);
  99990. }
  99991. function assertClassProperty(node, opts) {
  99992. assert("ClassProperty", node, opts);
  99993. }
  99994. function assertPipelineTopicExpression(node, opts) {
  99995. assert("PipelineTopicExpression", node, opts);
  99996. }
  99997. function assertPipelineBareFunction(node, opts) {
  99998. assert("PipelineBareFunction", node, opts);
  99999. }
  100000. function assertPipelinePrimaryTopicReference(node, opts) {
  100001. assert("PipelinePrimaryTopicReference", node, opts);
  100002. }
  100003. function assertClassPrivateProperty(node, opts) {
  100004. assert("ClassPrivateProperty", node, opts);
  100005. }
  100006. function assertClassPrivateMethod(node, opts) {
  100007. assert("ClassPrivateMethod", node, opts);
  100008. }
  100009. function assertImportAttribute(node, opts) {
  100010. assert("ImportAttribute", node, opts);
  100011. }
  100012. function assertDecorator(node, opts) {
  100013. assert("Decorator", node, opts);
  100014. }
  100015. function assertDoExpression(node, opts) {
  100016. assert("DoExpression", node, opts);
  100017. }
  100018. function assertExportDefaultSpecifier(node, opts) {
  100019. assert("ExportDefaultSpecifier", node, opts);
  100020. }
  100021. function assertPrivateName(node, opts) {
  100022. assert("PrivateName", node, opts);
  100023. }
  100024. function assertRecordExpression(node, opts) {
  100025. assert("RecordExpression", node, opts);
  100026. }
  100027. function assertTupleExpression(node, opts) {
  100028. assert("TupleExpression", node, opts);
  100029. }
  100030. function assertDecimalLiteral(node, opts) {
  100031. assert("DecimalLiteral", node, opts);
  100032. }
  100033. function assertStaticBlock(node, opts) {
  100034. assert("StaticBlock", node, opts);
  100035. }
  100036. function assertModuleExpression(node, opts) {
  100037. assert("ModuleExpression", node, opts);
  100038. }
  100039. function assertTSParameterProperty(node, opts) {
  100040. assert("TSParameterProperty", node, opts);
  100041. }
  100042. function assertTSDeclareFunction(node, opts) {
  100043. assert("TSDeclareFunction", node, opts);
  100044. }
  100045. function assertTSDeclareMethod(node, opts) {
  100046. assert("TSDeclareMethod", node, opts);
  100047. }
  100048. function assertTSQualifiedName(node, opts) {
  100049. assert("TSQualifiedName", node, opts);
  100050. }
  100051. function assertTSCallSignatureDeclaration(node, opts) {
  100052. assert("TSCallSignatureDeclaration", node, opts);
  100053. }
  100054. function assertTSConstructSignatureDeclaration(node, opts) {
  100055. assert("TSConstructSignatureDeclaration", node, opts);
  100056. }
  100057. function assertTSPropertySignature(node, opts) {
  100058. assert("TSPropertySignature", node, opts);
  100059. }
  100060. function assertTSMethodSignature(node, opts) {
  100061. assert("TSMethodSignature", node, opts);
  100062. }
  100063. function assertTSIndexSignature(node, opts) {
  100064. assert("TSIndexSignature", node, opts);
  100065. }
  100066. function assertTSAnyKeyword(node, opts) {
  100067. assert("TSAnyKeyword", node, opts);
  100068. }
  100069. function assertTSBooleanKeyword(node, opts) {
  100070. assert("TSBooleanKeyword", node, opts);
  100071. }
  100072. function assertTSBigIntKeyword(node, opts) {
  100073. assert("TSBigIntKeyword", node, opts);
  100074. }
  100075. function assertTSIntrinsicKeyword(node, opts) {
  100076. assert("TSIntrinsicKeyword", node, opts);
  100077. }
  100078. function assertTSNeverKeyword(node, opts) {
  100079. assert("TSNeverKeyword", node, opts);
  100080. }
  100081. function assertTSNullKeyword(node, opts) {
  100082. assert("TSNullKeyword", node, opts);
  100083. }
  100084. function assertTSNumberKeyword(node, opts) {
  100085. assert("TSNumberKeyword", node, opts);
  100086. }
  100087. function assertTSObjectKeyword(node, opts) {
  100088. assert("TSObjectKeyword", node, opts);
  100089. }
  100090. function assertTSStringKeyword(node, opts) {
  100091. assert("TSStringKeyword", node, opts);
  100092. }
  100093. function assertTSSymbolKeyword(node, opts) {
  100094. assert("TSSymbolKeyword", node, opts);
  100095. }
  100096. function assertTSUndefinedKeyword(node, opts) {
  100097. assert("TSUndefinedKeyword", node, opts);
  100098. }
  100099. function assertTSUnknownKeyword(node, opts) {
  100100. assert("TSUnknownKeyword", node, opts);
  100101. }
  100102. function assertTSVoidKeyword(node, opts) {
  100103. assert("TSVoidKeyword", node, opts);
  100104. }
  100105. function assertTSThisType(node, opts) {
  100106. assert("TSThisType", node, opts);
  100107. }
  100108. function assertTSFunctionType(node, opts) {
  100109. assert("TSFunctionType", node, opts);
  100110. }
  100111. function assertTSConstructorType(node, opts) {
  100112. assert("TSConstructorType", node, opts);
  100113. }
  100114. function assertTSTypeReference(node, opts) {
  100115. assert("TSTypeReference", node, opts);
  100116. }
  100117. function assertTSTypePredicate(node, opts) {
  100118. assert("TSTypePredicate", node, opts);
  100119. }
  100120. function assertTSTypeQuery(node, opts) {
  100121. assert("TSTypeQuery", node, opts);
  100122. }
  100123. function assertTSTypeLiteral(node, opts) {
  100124. assert("TSTypeLiteral", node, opts);
  100125. }
  100126. function assertTSArrayType(node, opts) {
  100127. assert("TSArrayType", node, opts);
  100128. }
  100129. function assertTSTupleType(node, opts) {
  100130. assert("TSTupleType", node, opts);
  100131. }
  100132. function assertTSOptionalType(node, opts) {
  100133. assert("TSOptionalType", node, opts);
  100134. }
  100135. function assertTSRestType(node, opts) {
  100136. assert("TSRestType", node, opts);
  100137. }
  100138. function assertTSNamedTupleMember(node, opts) {
  100139. assert("TSNamedTupleMember", node, opts);
  100140. }
  100141. function assertTSUnionType(node, opts) {
  100142. assert("TSUnionType", node, opts);
  100143. }
  100144. function assertTSIntersectionType(node, opts) {
  100145. assert("TSIntersectionType", node, opts);
  100146. }
  100147. function assertTSConditionalType(node, opts) {
  100148. assert("TSConditionalType", node, opts);
  100149. }
  100150. function assertTSInferType(node, opts) {
  100151. assert("TSInferType", node, opts);
  100152. }
  100153. function assertTSParenthesizedType(node, opts) {
  100154. assert("TSParenthesizedType", node, opts);
  100155. }
  100156. function assertTSTypeOperator(node, opts) {
  100157. assert("TSTypeOperator", node, opts);
  100158. }
  100159. function assertTSIndexedAccessType(node, opts) {
  100160. assert("TSIndexedAccessType", node, opts);
  100161. }
  100162. function assertTSMappedType(node, opts) {
  100163. assert("TSMappedType", node, opts);
  100164. }
  100165. function assertTSLiteralType(node, opts) {
  100166. assert("TSLiteralType", node, opts);
  100167. }
  100168. function assertTSExpressionWithTypeArguments(node, opts) {
  100169. assert("TSExpressionWithTypeArguments", node, opts);
  100170. }
  100171. function assertTSInterfaceDeclaration(node, opts) {
  100172. assert("TSInterfaceDeclaration", node, opts);
  100173. }
  100174. function assertTSInterfaceBody(node, opts) {
  100175. assert("TSInterfaceBody", node, opts);
  100176. }
  100177. function assertTSTypeAliasDeclaration(node, opts) {
  100178. assert("TSTypeAliasDeclaration", node, opts);
  100179. }
  100180. function assertTSAsExpression(node, opts) {
  100181. assert("TSAsExpression", node, opts);
  100182. }
  100183. function assertTSTypeAssertion(node, opts) {
  100184. assert("TSTypeAssertion", node, opts);
  100185. }
  100186. function assertTSEnumDeclaration(node, opts) {
  100187. assert("TSEnumDeclaration", node, opts);
  100188. }
  100189. function assertTSEnumMember(node, opts) {
  100190. assert("TSEnumMember", node, opts);
  100191. }
  100192. function assertTSModuleDeclaration(node, opts) {
  100193. assert("TSModuleDeclaration", node, opts);
  100194. }
  100195. function assertTSModuleBlock(node, opts) {
  100196. assert("TSModuleBlock", node, opts);
  100197. }
  100198. function assertTSImportType(node, opts) {
  100199. assert("TSImportType", node, opts);
  100200. }
  100201. function assertTSImportEqualsDeclaration(node, opts) {
  100202. assert("TSImportEqualsDeclaration", node, opts);
  100203. }
  100204. function assertTSExternalModuleReference(node, opts) {
  100205. assert("TSExternalModuleReference", node, opts);
  100206. }
  100207. function assertTSNonNullExpression(node, opts) {
  100208. assert("TSNonNullExpression", node, opts);
  100209. }
  100210. function assertTSExportAssignment(node, opts) {
  100211. assert("TSExportAssignment", node, opts);
  100212. }
  100213. function assertTSNamespaceExportDeclaration(node, opts) {
  100214. assert("TSNamespaceExportDeclaration", node, opts);
  100215. }
  100216. function assertTSTypeAnnotation(node, opts) {
  100217. assert("TSTypeAnnotation", node, opts);
  100218. }
  100219. function assertTSTypeParameterInstantiation(node, opts) {
  100220. assert("TSTypeParameterInstantiation", node, opts);
  100221. }
  100222. function assertTSTypeParameterDeclaration(node, opts) {
  100223. assert("TSTypeParameterDeclaration", node, opts);
  100224. }
  100225. function assertTSTypeParameter(node, opts) {
  100226. assert("TSTypeParameter", node, opts);
  100227. }
  100228. function assertExpression(node, opts) {
  100229. assert("Expression", node, opts);
  100230. }
  100231. function assertBinary(node, opts) {
  100232. assert("Binary", node, opts);
  100233. }
  100234. function assertScopable(node, opts) {
  100235. assert("Scopable", node, opts);
  100236. }
  100237. function assertBlockParent(node, opts) {
  100238. assert("BlockParent", node, opts);
  100239. }
  100240. function assertBlock(node, opts) {
  100241. assert("Block", node, opts);
  100242. }
  100243. function assertStatement(node, opts) {
  100244. assert("Statement", node, opts);
  100245. }
  100246. function assertTerminatorless(node, opts) {
  100247. assert("Terminatorless", node, opts);
  100248. }
  100249. function assertCompletionStatement(node, opts) {
  100250. assert("CompletionStatement", node, opts);
  100251. }
  100252. function assertConditional(node, opts) {
  100253. assert("Conditional", node, opts);
  100254. }
  100255. function assertLoop(node, opts) {
  100256. assert("Loop", node, opts);
  100257. }
  100258. function assertWhile(node, opts) {
  100259. assert("While", node, opts);
  100260. }
  100261. function assertExpressionWrapper(node, opts) {
  100262. assert("ExpressionWrapper", node, opts);
  100263. }
  100264. function assertFor(node, opts) {
  100265. assert("For", node, opts);
  100266. }
  100267. function assertForXStatement(node, opts) {
  100268. assert("ForXStatement", node, opts);
  100269. }
  100270. function assertFunction(node, opts) {
  100271. assert("Function", node, opts);
  100272. }
  100273. function assertFunctionParent(node, opts) {
  100274. assert("FunctionParent", node, opts);
  100275. }
  100276. function assertPureish(node, opts) {
  100277. assert("Pureish", node, opts);
  100278. }
  100279. function assertDeclaration(node, opts) {
  100280. assert("Declaration", node, opts);
  100281. }
  100282. function assertPatternLike(node, opts) {
  100283. assert("PatternLike", node, opts);
  100284. }
  100285. function assertLVal(node, opts) {
  100286. assert("LVal", node, opts);
  100287. }
  100288. function assertTSEntityName(node, opts) {
  100289. assert("TSEntityName", node, opts);
  100290. }
  100291. function assertLiteral(node, opts) {
  100292. assert("Literal", node, opts);
  100293. }
  100294. function assertImmutable(node, opts) {
  100295. assert("Immutable", node, opts);
  100296. }
  100297. function assertUserWhitespacable(node, opts) {
  100298. assert("UserWhitespacable", node, opts);
  100299. }
  100300. function assertMethod(node, opts) {
  100301. assert("Method", node, opts);
  100302. }
  100303. function assertObjectMember(node, opts) {
  100304. assert("ObjectMember", node, opts);
  100305. }
  100306. function assertProperty(node, opts) {
  100307. assert("Property", node, opts);
  100308. }
  100309. function assertUnaryLike(node, opts) {
  100310. assert("UnaryLike", node, opts);
  100311. }
  100312. function assertPattern(node, opts) {
  100313. assert("Pattern", node, opts);
  100314. }
  100315. function assertClass(node, opts) {
  100316. assert("Class", node, opts);
  100317. }
  100318. function assertModuleDeclaration(node, opts) {
  100319. assert("ModuleDeclaration", node, opts);
  100320. }
  100321. function assertExportDeclaration(node, opts) {
  100322. assert("ExportDeclaration", node, opts);
  100323. }
  100324. function assertModuleSpecifier(node, opts) {
  100325. assert("ModuleSpecifier", node, opts);
  100326. }
  100327. function assertFlow(node, opts) {
  100328. assert("Flow", node, opts);
  100329. }
  100330. function assertFlowType(node, opts) {
  100331. assert("FlowType", node, opts);
  100332. }
  100333. function assertFlowBaseAnnotation(node, opts) {
  100334. assert("FlowBaseAnnotation", node, opts);
  100335. }
  100336. function assertFlowDeclaration(node, opts) {
  100337. assert("FlowDeclaration", node, opts);
  100338. }
  100339. function assertFlowPredicate(node, opts) {
  100340. assert("FlowPredicate", node, opts);
  100341. }
  100342. function assertEnumBody(node, opts) {
  100343. assert("EnumBody", node, opts);
  100344. }
  100345. function assertEnumMember(node, opts) {
  100346. assert("EnumMember", node, opts);
  100347. }
  100348. function assertJSX(node, opts) {
  100349. assert("JSX", node, opts);
  100350. }
  100351. function assertPrivate(node, opts) {
  100352. assert("Private", node, opts);
  100353. }
  100354. function assertTSTypeElement(node, opts) {
  100355. assert("TSTypeElement", node, opts);
  100356. }
  100357. function assertTSType(node, opts) {
  100358. assert("TSType", node, opts);
  100359. }
  100360. function assertTSBaseType(node, opts) {
  100361. assert("TSBaseType", node, opts);
  100362. }
  100363. function assertNumberLiteral(node, opts) {
  100364. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  100365. assert("NumberLiteral", node, opts);
  100366. }
  100367. function assertRegexLiteral(node, opts) {
  100368. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  100369. assert("RegexLiteral", node, opts);
  100370. }
  100371. function assertRestProperty(node, opts) {
  100372. console.trace("The node type RestProperty has been renamed to RestElement");
  100373. assert("RestProperty", node, opts);
  100374. }
  100375. function assertSpreadProperty(node, opts) {
  100376. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  100377. assert("SpreadProperty", node, opts);
  100378. }
  100379. }
  100380. });
  100381. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  100382. var require_createTypeAnnotationBasedOnTypeof4 = __commonJS({
  100383. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  100384. "use strict";
  100385. Object.defineProperty(exports, "__esModule", {
  100386. value: true
  100387. });
  100388. exports.default = createTypeAnnotationBasedOnTypeof;
  100389. var _generated = require_generated17();
  100390. function createTypeAnnotationBasedOnTypeof(type) {
  100391. if (type === "string") {
  100392. return (0, _generated.stringTypeAnnotation)();
  100393. } else if (type === "number") {
  100394. return (0, _generated.numberTypeAnnotation)();
  100395. } else if (type === "undefined") {
  100396. return (0, _generated.voidTypeAnnotation)();
  100397. } else if (type === "boolean") {
  100398. return (0, _generated.booleanTypeAnnotation)();
  100399. } else if (type === "function") {
  100400. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  100401. } else if (type === "object") {
  100402. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  100403. } else if (type === "symbol") {
  100404. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  100405. } else if (type === "bigint") {
  100406. return (0, _generated.anyTypeAnnotation)();
  100407. } else {
  100408. throw new Error("Invalid typeof value: " + type);
  100409. }
  100410. }
  100411. }
  100412. });
  100413. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  100414. var require_removeTypeDuplicates7 = __commonJS({
  100415. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  100416. "use strict";
  100417. Object.defineProperty(exports, "__esModule", {
  100418. value: true
  100419. });
  100420. exports.default = removeTypeDuplicates;
  100421. var _generated = require_generated16();
  100422. function getQualifiedName(node) {
  100423. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  100424. }
  100425. function removeTypeDuplicates(nodes) {
  100426. const generics = {};
  100427. const bases = {};
  100428. const typeGroups = [];
  100429. const types2 = [];
  100430. for (let i = 0; i < nodes.length; i++) {
  100431. const node = nodes[i];
  100432. if (!node)
  100433. continue;
  100434. if (types2.indexOf(node) >= 0) {
  100435. continue;
  100436. }
  100437. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  100438. return [node];
  100439. }
  100440. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  100441. bases[node.type] = node;
  100442. continue;
  100443. }
  100444. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  100445. if (typeGroups.indexOf(node.types) < 0) {
  100446. nodes = nodes.concat(node.types);
  100447. typeGroups.push(node.types);
  100448. }
  100449. continue;
  100450. }
  100451. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  100452. const name2 = getQualifiedName(node.id);
  100453. if (generics[name2]) {
  100454. let existing = generics[name2];
  100455. if (existing.typeParameters) {
  100456. if (node.typeParameters) {
  100457. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  100458. }
  100459. } else {
  100460. existing = node.typeParameters;
  100461. }
  100462. } else {
  100463. generics[name2] = node;
  100464. }
  100465. continue;
  100466. }
  100467. types2.push(node);
  100468. }
  100469. for (const type of Object.keys(bases)) {
  100470. types2.push(bases[type]);
  100471. }
  100472. for (const name2 of Object.keys(generics)) {
  100473. types2.push(generics[name2]);
  100474. }
  100475. return types2;
  100476. }
  100477. }
  100478. });
  100479. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  100480. var require_createFlowUnionType4 = __commonJS({
  100481. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  100482. "use strict";
  100483. Object.defineProperty(exports, "__esModule", {
  100484. value: true
  100485. });
  100486. exports.default = createFlowUnionType;
  100487. var _generated = require_generated17();
  100488. var _removeTypeDuplicates = require_removeTypeDuplicates7();
  100489. function createFlowUnionType(types2) {
  100490. const flattened = (0, _removeTypeDuplicates.default)(types2);
  100491. if (flattened.length === 1) {
  100492. return flattened[0];
  100493. } else {
  100494. return (0, _generated.unionTypeAnnotation)(flattened);
  100495. }
  100496. }
  100497. }
  100498. });
  100499. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  100500. var require_removeTypeDuplicates8 = __commonJS({
  100501. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  100502. "use strict";
  100503. Object.defineProperty(exports, "__esModule", {
  100504. value: true
  100505. });
  100506. exports.default = removeTypeDuplicates;
  100507. var _generated = require_generated16();
  100508. function removeTypeDuplicates(nodes) {
  100509. const generics = {};
  100510. const bases = {};
  100511. const typeGroups = [];
  100512. const types2 = [];
  100513. for (let i = 0; i < nodes.length; i++) {
  100514. const node = nodes[i];
  100515. if (!node)
  100516. continue;
  100517. if (types2.indexOf(node) >= 0) {
  100518. continue;
  100519. }
  100520. if ((0, _generated.isTSAnyKeyword)(node)) {
  100521. return [node];
  100522. }
  100523. if ((0, _generated.isTSBaseType)(node)) {
  100524. bases[node.type] = node;
  100525. continue;
  100526. }
  100527. if ((0, _generated.isTSUnionType)(node)) {
  100528. if (typeGroups.indexOf(node.types) < 0) {
  100529. nodes = nodes.concat(node.types);
  100530. typeGroups.push(node.types);
  100531. }
  100532. continue;
  100533. }
  100534. types2.push(node);
  100535. }
  100536. for (const type of Object.keys(bases)) {
  100537. types2.push(bases[type]);
  100538. }
  100539. for (const name2 of Object.keys(generics)) {
  100540. types2.push(generics[name2]);
  100541. }
  100542. return types2;
  100543. }
  100544. }
  100545. });
  100546. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  100547. var require_createTSUnionType4 = __commonJS({
  100548. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  100549. "use strict";
  100550. Object.defineProperty(exports, "__esModule", {
  100551. value: true
  100552. });
  100553. exports.default = createTSUnionType;
  100554. var _generated = require_generated17();
  100555. var _removeTypeDuplicates = require_removeTypeDuplicates8();
  100556. function createTSUnionType(typeAnnotations) {
  100557. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  100558. const flattened = (0, _removeTypeDuplicates.default)(types2);
  100559. if (flattened.length === 1) {
  100560. return flattened[0];
  100561. } else {
  100562. return (0, _generated.tsUnionType)(flattened);
  100563. }
  100564. }
  100565. }
  100566. });
  100567. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/generated/uppercase.js
  100568. var require_uppercase4 = __commonJS({
  100569. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  100570. "use strict";
  100571. Object.defineProperty(exports, "__esModule", {
  100572. value: true
  100573. });
  100574. Object.defineProperty(exports, "ArrayExpression", {
  100575. enumerable: true,
  100576. get: function() {
  100577. return _index.arrayExpression;
  100578. }
  100579. });
  100580. Object.defineProperty(exports, "AssignmentExpression", {
  100581. enumerable: true,
  100582. get: function() {
  100583. return _index.assignmentExpression;
  100584. }
  100585. });
  100586. Object.defineProperty(exports, "BinaryExpression", {
  100587. enumerable: true,
  100588. get: function() {
  100589. return _index.binaryExpression;
  100590. }
  100591. });
  100592. Object.defineProperty(exports, "InterpreterDirective", {
  100593. enumerable: true,
  100594. get: function() {
  100595. return _index.interpreterDirective;
  100596. }
  100597. });
  100598. Object.defineProperty(exports, "Directive", {
  100599. enumerable: true,
  100600. get: function() {
  100601. return _index.directive;
  100602. }
  100603. });
  100604. Object.defineProperty(exports, "DirectiveLiteral", {
  100605. enumerable: true,
  100606. get: function() {
  100607. return _index.directiveLiteral;
  100608. }
  100609. });
  100610. Object.defineProperty(exports, "BlockStatement", {
  100611. enumerable: true,
  100612. get: function() {
  100613. return _index.blockStatement;
  100614. }
  100615. });
  100616. Object.defineProperty(exports, "BreakStatement", {
  100617. enumerable: true,
  100618. get: function() {
  100619. return _index.breakStatement;
  100620. }
  100621. });
  100622. Object.defineProperty(exports, "CallExpression", {
  100623. enumerable: true,
  100624. get: function() {
  100625. return _index.callExpression;
  100626. }
  100627. });
  100628. Object.defineProperty(exports, "CatchClause", {
  100629. enumerable: true,
  100630. get: function() {
  100631. return _index.catchClause;
  100632. }
  100633. });
  100634. Object.defineProperty(exports, "ConditionalExpression", {
  100635. enumerable: true,
  100636. get: function() {
  100637. return _index.conditionalExpression;
  100638. }
  100639. });
  100640. Object.defineProperty(exports, "ContinueStatement", {
  100641. enumerable: true,
  100642. get: function() {
  100643. return _index.continueStatement;
  100644. }
  100645. });
  100646. Object.defineProperty(exports, "DebuggerStatement", {
  100647. enumerable: true,
  100648. get: function() {
  100649. return _index.debuggerStatement;
  100650. }
  100651. });
  100652. Object.defineProperty(exports, "DoWhileStatement", {
  100653. enumerable: true,
  100654. get: function() {
  100655. return _index.doWhileStatement;
  100656. }
  100657. });
  100658. Object.defineProperty(exports, "EmptyStatement", {
  100659. enumerable: true,
  100660. get: function() {
  100661. return _index.emptyStatement;
  100662. }
  100663. });
  100664. Object.defineProperty(exports, "ExpressionStatement", {
  100665. enumerable: true,
  100666. get: function() {
  100667. return _index.expressionStatement;
  100668. }
  100669. });
  100670. Object.defineProperty(exports, "File", {
  100671. enumerable: true,
  100672. get: function() {
  100673. return _index.file;
  100674. }
  100675. });
  100676. Object.defineProperty(exports, "ForInStatement", {
  100677. enumerable: true,
  100678. get: function() {
  100679. return _index.forInStatement;
  100680. }
  100681. });
  100682. Object.defineProperty(exports, "ForStatement", {
  100683. enumerable: true,
  100684. get: function() {
  100685. return _index.forStatement;
  100686. }
  100687. });
  100688. Object.defineProperty(exports, "FunctionDeclaration", {
  100689. enumerable: true,
  100690. get: function() {
  100691. return _index.functionDeclaration;
  100692. }
  100693. });
  100694. Object.defineProperty(exports, "FunctionExpression", {
  100695. enumerable: true,
  100696. get: function() {
  100697. return _index.functionExpression;
  100698. }
  100699. });
  100700. Object.defineProperty(exports, "Identifier", {
  100701. enumerable: true,
  100702. get: function() {
  100703. return _index.identifier;
  100704. }
  100705. });
  100706. Object.defineProperty(exports, "IfStatement", {
  100707. enumerable: true,
  100708. get: function() {
  100709. return _index.ifStatement;
  100710. }
  100711. });
  100712. Object.defineProperty(exports, "LabeledStatement", {
  100713. enumerable: true,
  100714. get: function() {
  100715. return _index.labeledStatement;
  100716. }
  100717. });
  100718. Object.defineProperty(exports, "StringLiteral", {
  100719. enumerable: true,
  100720. get: function() {
  100721. return _index.stringLiteral;
  100722. }
  100723. });
  100724. Object.defineProperty(exports, "NumericLiteral", {
  100725. enumerable: true,
  100726. get: function() {
  100727. return _index.numericLiteral;
  100728. }
  100729. });
  100730. Object.defineProperty(exports, "NullLiteral", {
  100731. enumerable: true,
  100732. get: function() {
  100733. return _index.nullLiteral;
  100734. }
  100735. });
  100736. Object.defineProperty(exports, "BooleanLiteral", {
  100737. enumerable: true,
  100738. get: function() {
  100739. return _index.booleanLiteral;
  100740. }
  100741. });
  100742. Object.defineProperty(exports, "RegExpLiteral", {
  100743. enumerable: true,
  100744. get: function() {
  100745. return _index.regExpLiteral;
  100746. }
  100747. });
  100748. Object.defineProperty(exports, "LogicalExpression", {
  100749. enumerable: true,
  100750. get: function() {
  100751. return _index.logicalExpression;
  100752. }
  100753. });
  100754. Object.defineProperty(exports, "MemberExpression", {
  100755. enumerable: true,
  100756. get: function() {
  100757. return _index.memberExpression;
  100758. }
  100759. });
  100760. Object.defineProperty(exports, "NewExpression", {
  100761. enumerable: true,
  100762. get: function() {
  100763. return _index.newExpression;
  100764. }
  100765. });
  100766. Object.defineProperty(exports, "Program", {
  100767. enumerable: true,
  100768. get: function() {
  100769. return _index.program;
  100770. }
  100771. });
  100772. Object.defineProperty(exports, "ObjectExpression", {
  100773. enumerable: true,
  100774. get: function() {
  100775. return _index.objectExpression;
  100776. }
  100777. });
  100778. Object.defineProperty(exports, "ObjectMethod", {
  100779. enumerable: true,
  100780. get: function() {
  100781. return _index.objectMethod;
  100782. }
  100783. });
  100784. Object.defineProperty(exports, "ObjectProperty", {
  100785. enumerable: true,
  100786. get: function() {
  100787. return _index.objectProperty;
  100788. }
  100789. });
  100790. Object.defineProperty(exports, "RestElement", {
  100791. enumerable: true,
  100792. get: function() {
  100793. return _index.restElement;
  100794. }
  100795. });
  100796. Object.defineProperty(exports, "ReturnStatement", {
  100797. enumerable: true,
  100798. get: function() {
  100799. return _index.returnStatement;
  100800. }
  100801. });
  100802. Object.defineProperty(exports, "SequenceExpression", {
  100803. enumerable: true,
  100804. get: function() {
  100805. return _index.sequenceExpression;
  100806. }
  100807. });
  100808. Object.defineProperty(exports, "ParenthesizedExpression", {
  100809. enumerable: true,
  100810. get: function() {
  100811. return _index.parenthesizedExpression;
  100812. }
  100813. });
  100814. Object.defineProperty(exports, "SwitchCase", {
  100815. enumerable: true,
  100816. get: function() {
  100817. return _index.switchCase;
  100818. }
  100819. });
  100820. Object.defineProperty(exports, "SwitchStatement", {
  100821. enumerable: true,
  100822. get: function() {
  100823. return _index.switchStatement;
  100824. }
  100825. });
  100826. Object.defineProperty(exports, "ThisExpression", {
  100827. enumerable: true,
  100828. get: function() {
  100829. return _index.thisExpression;
  100830. }
  100831. });
  100832. Object.defineProperty(exports, "ThrowStatement", {
  100833. enumerable: true,
  100834. get: function() {
  100835. return _index.throwStatement;
  100836. }
  100837. });
  100838. Object.defineProperty(exports, "TryStatement", {
  100839. enumerable: true,
  100840. get: function() {
  100841. return _index.tryStatement;
  100842. }
  100843. });
  100844. Object.defineProperty(exports, "UnaryExpression", {
  100845. enumerable: true,
  100846. get: function() {
  100847. return _index.unaryExpression;
  100848. }
  100849. });
  100850. Object.defineProperty(exports, "UpdateExpression", {
  100851. enumerable: true,
  100852. get: function() {
  100853. return _index.updateExpression;
  100854. }
  100855. });
  100856. Object.defineProperty(exports, "VariableDeclaration", {
  100857. enumerable: true,
  100858. get: function() {
  100859. return _index.variableDeclaration;
  100860. }
  100861. });
  100862. Object.defineProperty(exports, "VariableDeclarator", {
  100863. enumerable: true,
  100864. get: function() {
  100865. return _index.variableDeclarator;
  100866. }
  100867. });
  100868. Object.defineProperty(exports, "WhileStatement", {
  100869. enumerable: true,
  100870. get: function() {
  100871. return _index.whileStatement;
  100872. }
  100873. });
  100874. Object.defineProperty(exports, "WithStatement", {
  100875. enumerable: true,
  100876. get: function() {
  100877. return _index.withStatement;
  100878. }
  100879. });
  100880. Object.defineProperty(exports, "AssignmentPattern", {
  100881. enumerable: true,
  100882. get: function() {
  100883. return _index.assignmentPattern;
  100884. }
  100885. });
  100886. Object.defineProperty(exports, "ArrayPattern", {
  100887. enumerable: true,
  100888. get: function() {
  100889. return _index.arrayPattern;
  100890. }
  100891. });
  100892. Object.defineProperty(exports, "ArrowFunctionExpression", {
  100893. enumerable: true,
  100894. get: function() {
  100895. return _index.arrowFunctionExpression;
  100896. }
  100897. });
  100898. Object.defineProperty(exports, "ClassBody", {
  100899. enumerable: true,
  100900. get: function() {
  100901. return _index.classBody;
  100902. }
  100903. });
  100904. Object.defineProperty(exports, "ClassExpression", {
  100905. enumerable: true,
  100906. get: function() {
  100907. return _index.classExpression;
  100908. }
  100909. });
  100910. Object.defineProperty(exports, "ClassDeclaration", {
  100911. enumerable: true,
  100912. get: function() {
  100913. return _index.classDeclaration;
  100914. }
  100915. });
  100916. Object.defineProperty(exports, "ExportAllDeclaration", {
  100917. enumerable: true,
  100918. get: function() {
  100919. return _index.exportAllDeclaration;
  100920. }
  100921. });
  100922. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  100923. enumerable: true,
  100924. get: function() {
  100925. return _index.exportDefaultDeclaration;
  100926. }
  100927. });
  100928. Object.defineProperty(exports, "ExportNamedDeclaration", {
  100929. enumerable: true,
  100930. get: function() {
  100931. return _index.exportNamedDeclaration;
  100932. }
  100933. });
  100934. Object.defineProperty(exports, "ExportSpecifier", {
  100935. enumerable: true,
  100936. get: function() {
  100937. return _index.exportSpecifier;
  100938. }
  100939. });
  100940. Object.defineProperty(exports, "ForOfStatement", {
  100941. enumerable: true,
  100942. get: function() {
  100943. return _index.forOfStatement;
  100944. }
  100945. });
  100946. Object.defineProperty(exports, "ImportDeclaration", {
  100947. enumerable: true,
  100948. get: function() {
  100949. return _index.importDeclaration;
  100950. }
  100951. });
  100952. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  100953. enumerable: true,
  100954. get: function() {
  100955. return _index.importDefaultSpecifier;
  100956. }
  100957. });
  100958. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  100959. enumerable: true,
  100960. get: function() {
  100961. return _index.importNamespaceSpecifier;
  100962. }
  100963. });
  100964. Object.defineProperty(exports, "ImportSpecifier", {
  100965. enumerable: true,
  100966. get: function() {
  100967. return _index.importSpecifier;
  100968. }
  100969. });
  100970. Object.defineProperty(exports, "MetaProperty", {
  100971. enumerable: true,
  100972. get: function() {
  100973. return _index.metaProperty;
  100974. }
  100975. });
  100976. Object.defineProperty(exports, "ClassMethod", {
  100977. enumerable: true,
  100978. get: function() {
  100979. return _index.classMethod;
  100980. }
  100981. });
  100982. Object.defineProperty(exports, "ObjectPattern", {
  100983. enumerable: true,
  100984. get: function() {
  100985. return _index.objectPattern;
  100986. }
  100987. });
  100988. Object.defineProperty(exports, "SpreadElement", {
  100989. enumerable: true,
  100990. get: function() {
  100991. return _index.spreadElement;
  100992. }
  100993. });
  100994. Object.defineProperty(exports, "Super", {
  100995. enumerable: true,
  100996. get: function() {
  100997. return _index.super;
  100998. }
  100999. });
  101000. Object.defineProperty(exports, "TaggedTemplateExpression", {
  101001. enumerable: true,
  101002. get: function() {
  101003. return _index.taggedTemplateExpression;
  101004. }
  101005. });
  101006. Object.defineProperty(exports, "TemplateElement", {
  101007. enumerable: true,
  101008. get: function() {
  101009. return _index.templateElement;
  101010. }
  101011. });
  101012. Object.defineProperty(exports, "TemplateLiteral", {
  101013. enumerable: true,
  101014. get: function() {
  101015. return _index.templateLiteral;
  101016. }
  101017. });
  101018. Object.defineProperty(exports, "YieldExpression", {
  101019. enumerable: true,
  101020. get: function() {
  101021. return _index.yieldExpression;
  101022. }
  101023. });
  101024. Object.defineProperty(exports, "AwaitExpression", {
  101025. enumerable: true,
  101026. get: function() {
  101027. return _index.awaitExpression;
  101028. }
  101029. });
  101030. Object.defineProperty(exports, "Import", {
  101031. enumerable: true,
  101032. get: function() {
  101033. return _index.import;
  101034. }
  101035. });
  101036. Object.defineProperty(exports, "BigIntLiteral", {
  101037. enumerable: true,
  101038. get: function() {
  101039. return _index.bigIntLiteral;
  101040. }
  101041. });
  101042. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  101043. enumerable: true,
  101044. get: function() {
  101045. return _index.exportNamespaceSpecifier;
  101046. }
  101047. });
  101048. Object.defineProperty(exports, "OptionalMemberExpression", {
  101049. enumerable: true,
  101050. get: function() {
  101051. return _index.optionalMemberExpression;
  101052. }
  101053. });
  101054. Object.defineProperty(exports, "OptionalCallExpression", {
  101055. enumerable: true,
  101056. get: function() {
  101057. return _index.optionalCallExpression;
  101058. }
  101059. });
  101060. Object.defineProperty(exports, "AnyTypeAnnotation", {
  101061. enumerable: true,
  101062. get: function() {
  101063. return _index.anyTypeAnnotation;
  101064. }
  101065. });
  101066. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  101067. enumerable: true,
  101068. get: function() {
  101069. return _index.arrayTypeAnnotation;
  101070. }
  101071. });
  101072. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  101073. enumerable: true,
  101074. get: function() {
  101075. return _index.booleanTypeAnnotation;
  101076. }
  101077. });
  101078. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  101079. enumerable: true,
  101080. get: function() {
  101081. return _index.booleanLiteralTypeAnnotation;
  101082. }
  101083. });
  101084. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  101085. enumerable: true,
  101086. get: function() {
  101087. return _index.nullLiteralTypeAnnotation;
  101088. }
  101089. });
  101090. Object.defineProperty(exports, "ClassImplements", {
  101091. enumerable: true,
  101092. get: function() {
  101093. return _index.classImplements;
  101094. }
  101095. });
  101096. Object.defineProperty(exports, "DeclareClass", {
  101097. enumerable: true,
  101098. get: function() {
  101099. return _index.declareClass;
  101100. }
  101101. });
  101102. Object.defineProperty(exports, "DeclareFunction", {
  101103. enumerable: true,
  101104. get: function() {
  101105. return _index.declareFunction;
  101106. }
  101107. });
  101108. Object.defineProperty(exports, "DeclareInterface", {
  101109. enumerable: true,
  101110. get: function() {
  101111. return _index.declareInterface;
  101112. }
  101113. });
  101114. Object.defineProperty(exports, "DeclareModule", {
  101115. enumerable: true,
  101116. get: function() {
  101117. return _index.declareModule;
  101118. }
  101119. });
  101120. Object.defineProperty(exports, "DeclareModuleExports", {
  101121. enumerable: true,
  101122. get: function() {
  101123. return _index.declareModuleExports;
  101124. }
  101125. });
  101126. Object.defineProperty(exports, "DeclareTypeAlias", {
  101127. enumerable: true,
  101128. get: function() {
  101129. return _index.declareTypeAlias;
  101130. }
  101131. });
  101132. Object.defineProperty(exports, "DeclareOpaqueType", {
  101133. enumerable: true,
  101134. get: function() {
  101135. return _index.declareOpaqueType;
  101136. }
  101137. });
  101138. Object.defineProperty(exports, "DeclareVariable", {
  101139. enumerable: true,
  101140. get: function() {
  101141. return _index.declareVariable;
  101142. }
  101143. });
  101144. Object.defineProperty(exports, "DeclareExportDeclaration", {
  101145. enumerable: true,
  101146. get: function() {
  101147. return _index.declareExportDeclaration;
  101148. }
  101149. });
  101150. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  101151. enumerable: true,
  101152. get: function() {
  101153. return _index.declareExportAllDeclaration;
  101154. }
  101155. });
  101156. Object.defineProperty(exports, "DeclaredPredicate", {
  101157. enumerable: true,
  101158. get: function() {
  101159. return _index.declaredPredicate;
  101160. }
  101161. });
  101162. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  101163. enumerable: true,
  101164. get: function() {
  101165. return _index.existsTypeAnnotation;
  101166. }
  101167. });
  101168. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  101169. enumerable: true,
  101170. get: function() {
  101171. return _index.functionTypeAnnotation;
  101172. }
  101173. });
  101174. Object.defineProperty(exports, "FunctionTypeParam", {
  101175. enumerable: true,
  101176. get: function() {
  101177. return _index.functionTypeParam;
  101178. }
  101179. });
  101180. Object.defineProperty(exports, "GenericTypeAnnotation", {
  101181. enumerable: true,
  101182. get: function() {
  101183. return _index.genericTypeAnnotation;
  101184. }
  101185. });
  101186. Object.defineProperty(exports, "InferredPredicate", {
  101187. enumerable: true,
  101188. get: function() {
  101189. return _index.inferredPredicate;
  101190. }
  101191. });
  101192. Object.defineProperty(exports, "InterfaceExtends", {
  101193. enumerable: true,
  101194. get: function() {
  101195. return _index.interfaceExtends;
  101196. }
  101197. });
  101198. Object.defineProperty(exports, "InterfaceDeclaration", {
  101199. enumerable: true,
  101200. get: function() {
  101201. return _index.interfaceDeclaration;
  101202. }
  101203. });
  101204. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  101205. enumerable: true,
  101206. get: function() {
  101207. return _index.interfaceTypeAnnotation;
  101208. }
  101209. });
  101210. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  101211. enumerable: true,
  101212. get: function() {
  101213. return _index.intersectionTypeAnnotation;
  101214. }
  101215. });
  101216. Object.defineProperty(exports, "MixedTypeAnnotation", {
  101217. enumerable: true,
  101218. get: function() {
  101219. return _index.mixedTypeAnnotation;
  101220. }
  101221. });
  101222. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  101223. enumerable: true,
  101224. get: function() {
  101225. return _index.emptyTypeAnnotation;
  101226. }
  101227. });
  101228. Object.defineProperty(exports, "NullableTypeAnnotation", {
  101229. enumerable: true,
  101230. get: function() {
  101231. return _index.nullableTypeAnnotation;
  101232. }
  101233. });
  101234. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  101235. enumerable: true,
  101236. get: function() {
  101237. return _index.numberLiteralTypeAnnotation;
  101238. }
  101239. });
  101240. Object.defineProperty(exports, "NumberTypeAnnotation", {
  101241. enumerable: true,
  101242. get: function() {
  101243. return _index.numberTypeAnnotation;
  101244. }
  101245. });
  101246. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  101247. enumerable: true,
  101248. get: function() {
  101249. return _index.objectTypeAnnotation;
  101250. }
  101251. });
  101252. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  101253. enumerable: true,
  101254. get: function() {
  101255. return _index.objectTypeInternalSlot;
  101256. }
  101257. });
  101258. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  101259. enumerable: true,
  101260. get: function() {
  101261. return _index.objectTypeCallProperty;
  101262. }
  101263. });
  101264. Object.defineProperty(exports, "ObjectTypeIndexer", {
  101265. enumerable: true,
  101266. get: function() {
  101267. return _index.objectTypeIndexer;
  101268. }
  101269. });
  101270. Object.defineProperty(exports, "ObjectTypeProperty", {
  101271. enumerable: true,
  101272. get: function() {
  101273. return _index.objectTypeProperty;
  101274. }
  101275. });
  101276. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  101277. enumerable: true,
  101278. get: function() {
  101279. return _index.objectTypeSpreadProperty;
  101280. }
  101281. });
  101282. Object.defineProperty(exports, "OpaqueType", {
  101283. enumerable: true,
  101284. get: function() {
  101285. return _index.opaqueType;
  101286. }
  101287. });
  101288. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  101289. enumerable: true,
  101290. get: function() {
  101291. return _index.qualifiedTypeIdentifier;
  101292. }
  101293. });
  101294. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  101295. enumerable: true,
  101296. get: function() {
  101297. return _index.stringLiteralTypeAnnotation;
  101298. }
  101299. });
  101300. Object.defineProperty(exports, "StringTypeAnnotation", {
  101301. enumerable: true,
  101302. get: function() {
  101303. return _index.stringTypeAnnotation;
  101304. }
  101305. });
  101306. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  101307. enumerable: true,
  101308. get: function() {
  101309. return _index.symbolTypeAnnotation;
  101310. }
  101311. });
  101312. Object.defineProperty(exports, "ThisTypeAnnotation", {
  101313. enumerable: true,
  101314. get: function() {
  101315. return _index.thisTypeAnnotation;
  101316. }
  101317. });
  101318. Object.defineProperty(exports, "TupleTypeAnnotation", {
  101319. enumerable: true,
  101320. get: function() {
  101321. return _index.tupleTypeAnnotation;
  101322. }
  101323. });
  101324. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  101325. enumerable: true,
  101326. get: function() {
  101327. return _index.typeofTypeAnnotation;
  101328. }
  101329. });
  101330. Object.defineProperty(exports, "TypeAlias", {
  101331. enumerable: true,
  101332. get: function() {
  101333. return _index.typeAlias;
  101334. }
  101335. });
  101336. Object.defineProperty(exports, "TypeAnnotation", {
  101337. enumerable: true,
  101338. get: function() {
  101339. return _index.typeAnnotation;
  101340. }
  101341. });
  101342. Object.defineProperty(exports, "TypeCastExpression", {
  101343. enumerable: true,
  101344. get: function() {
  101345. return _index.typeCastExpression;
  101346. }
  101347. });
  101348. Object.defineProperty(exports, "TypeParameter", {
  101349. enumerable: true,
  101350. get: function() {
  101351. return _index.typeParameter;
  101352. }
  101353. });
  101354. Object.defineProperty(exports, "TypeParameterDeclaration", {
  101355. enumerable: true,
  101356. get: function() {
  101357. return _index.typeParameterDeclaration;
  101358. }
  101359. });
  101360. Object.defineProperty(exports, "TypeParameterInstantiation", {
  101361. enumerable: true,
  101362. get: function() {
  101363. return _index.typeParameterInstantiation;
  101364. }
  101365. });
  101366. Object.defineProperty(exports, "UnionTypeAnnotation", {
  101367. enumerable: true,
  101368. get: function() {
  101369. return _index.unionTypeAnnotation;
  101370. }
  101371. });
  101372. Object.defineProperty(exports, "Variance", {
  101373. enumerable: true,
  101374. get: function() {
  101375. return _index.variance;
  101376. }
  101377. });
  101378. Object.defineProperty(exports, "VoidTypeAnnotation", {
  101379. enumerable: true,
  101380. get: function() {
  101381. return _index.voidTypeAnnotation;
  101382. }
  101383. });
  101384. Object.defineProperty(exports, "EnumDeclaration", {
  101385. enumerable: true,
  101386. get: function() {
  101387. return _index.enumDeclaration;
  101388. }
  101389. });
  101390. Object.defineProperty(exports, "EnumBooleanBody", {
  101391. enumerable: true,
  101392. get: function() {
  101393. return _index.enumBooleanBody;
  101394. }
  101395. });
  101396. Object.defineProperty(exports, "EnumNumberBody", {
  101397. enumerable: true,
  101398. get: function() {
  101399. return _index.enumNumberBody;
  101400. }
  101401. });
  101402. Object.defineProperty(exports, "EnumStringBody", {
  101403. enumerable: true,
  101404. get: function() {
  101405. return _index.enumStringBody;
  101406. }
  101407. });
  101408. Object.defineProperty(exports, "EnumSymbolBody", {
  101409. enumerable: true,
  101410. get: function() {
  101411. return _index.enumSymbolBody;
  101412. }
  101413. });
  101414. Object.defineProperty(exports, "EnumBooleanMember", {
  101415. enumerable: true,
  101416. get: function() {
  101417. return _index.enumBooleanMember;
  101418. }
  101419. });
  101420. Object.defineProperty(exports, "EnumNumberMember", {
  101421. enumerable: true,
  101422. get: function() {
  101423. return _index.enumNumberMember;
  101424. }
  101425. });
  101426. Object.defineProperty(exports, "EnumStringMember", {
  101427. enumerable: true,
  101428. get: function() {
  101429. return _index.enumStringMember;
  101430. }
  101431. });
  101432. Object.defineProperty(exports, "EnumDefaultedMember", {
  101433. enumerable: true,
  101434. get: function() {
  101435. return _index.enumDefaultedMember;
  101436. }
  101437. });
  101438. Object.defineProperty(exports, "IndexedAccessType", {
  101439. enumerable: true,
  101440. get: function() {
  101441. return _index.indexedAccessType;
  101442. }
  101443. });
  101444. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  101445. enumerable: true,
  101446. get: function() {
  101447. return _index.optionalIndexedAccessType;
  101448. }
  101449. });
  101450. Object.defineProperty(exports, "JSXAttribute", {
  101451. enumerable: true,
  101452. get: function() {
  101453. return _index.jsxAttribute;
  101454. }
  101455. });
  101456. Object.defineProperty(exports, "JSXClosingElement", {
  101457. enumerable: true,
  101458. get: function() {
  101459. return _index.jsxClosingElement;
  101460. }
  101461. });
  101462. Object.defineProperty(exports, "JSXElement", {
  101463. enumerable: true,
  101464. get: function() {
  101465. return _index.jsxElement;
  101466. }
  101467. });
  101468. Object.defineProperty(exports, "JSXEmptyExpression", {
  101469. enumerable: true,
  101470. get: function() {
  101471. return _index.jsxEmptyExpression;
  101472. }
  101473. });
  101474. Object.defineProperty(exports, "JSXExpressionContainer", {
  101475. enumerable: true,
  101476. get: function() {
  101477. return _index.jsxExpressionContainer;
  101478. }
  101479. });
  101480. Object.defineProperty(exports, "JSXSpreadChild", {
  101481. enumerable: true,
  101482. get: function() {
  101483. return _index.jsxSpreadChild;
  101484. }
  101485. });
  101486. Object.defineProperty(exports, "JSXIdentifier", {
  101487. enumerable: true,
  101488. get: function() {
  101489. return _index.jsxIdentifier;
  101490. }
  101491. });
  101492. Object.defineProperty(exports, "JSXMemberExpression", {
  101493. enumerable: true,
  101494. get: function() {
  101495. return _index.jsxMemberExpression;
  101496. }
  101497. });
  101498. Object.defineProperty(exports, "JSXNamespacedName", {
  101499. enumerable: true,
  101500. get: function() {
  101501. return _index.jsxNamespacedName;
  101502. }
  101503. });
  101504. Object.defineProperty(exports, "JSXOpeningElement", {
  101505. enumerable: true,
  101506. get: function() {
  101507. return _index.jsxOpeningElement;
  101508. }
  101509. });
  101510. Object.defineProperty(exports, "JSXSpreadAttribute", {
  101511. enumerable: true,
  101512. get: function() {
  101513. return _index.jsxSpreadAttribute;
  101514. }
  101515. });
  101516. Object.defineProperty(exports, "JSXText", {
  101517. enumerable: true,
  101518. get: function() {
  101519. return _index.jsxText;
  101520. }
  101521. });
  101522. Object.defineProperty(exports, "JSXFragment", {
  101523. enumerable: true,
  101524. get: function() {
  101525. return _index.jsxFragment;
  101526. }
  101527. });
  101528. Object.defineProperty(exports, "JSXOpeningFragment", {
  101529. enumerable: true,
  101530. get: function() {
  101531. return _index.jsxOpeningFragment;
  101532. }
  101533. });
  101534. Object.defineProperty(exports, "JSXClosingFragment", {
  101535. enumerable: true,
  101536. get: function() {
  101537. return _index.jsxClosingFragment;
  101538. }
  101539. });
  101540. Object.defineProperty(exports, "Noop", {
  101541. enumerable: true,
  101542. get: function() {
  101543. return _index.noop;
  101544. }
  101545. });
  101546. Object.defineProperty(exports, "Placeholder", {
  101547. enumerable: true,
  101548. get: function() {
  101549. return _index.placeholder;
  101550. }
  101551. });
  101552. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  101553. enumerable: true,
  101554. get: function() {
  101555. return _index.v8IntrinsicIdentifier;
  101556. }
  101557. });
  101558. Object.defineProperty(exports, "ArgumentPlaceholder", {
  101559. enumerable: true,
  101560. get: function() {
  101561. return _index.argumentPlaceholder;
  101562. }
  101563. });
  101564. Object.defineProperty(exports, "BindExpression", {
  101565. enumerable: true,
  101566. get: function() {
  101567. return _index.bindExpression;
  101568. }
  101569. });
  101570. Object.defineProperty(exports, "ClassProperty", {
  101571. enumerable: true,
  101572. get: function() {
  101573. return _index.classProperty;
  101574. }
  101575. });
  101576. Object.defineProperty(exports, "PipelineTopicExpression", {
  101577. enumerable: true,
  101578. get: function() {
  101579. return _index.pipelineTopicExpression;
  101580. }
  101581. });
  101582. Object.defineProperty(exports, "PipelineBareFunction", {
  101583. enumerable: true,
  101584. get: function() {
  101585. return _index.pipelineBareFunction;
  101586. }
  101587. });
  101588. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  101589. enumerable: true,
  101590. get: function() {
  101591. return _index.pipelinePrimaryTopicReference;
  101592. }
  101593. });
  101594. Object.defineProperty(exports, "ClassPrivateProperty", {
  101595. enumerable: true,
  101596. get: function() {
  101597. return _index.classPrivateProperty;
  101598. }
  101599. });
  101600. Object.defineProperty(exports, "ClassPrivateMethod", {
  101601. enumerable: true,
  101602. get: function() {
  101603. return _index.classPrivateMethod;
  101604. }
  101605. });
  101606. Object.defineProperty(exports, "ImportAttribute", {
  101607. enumerable: true,
  101608. get: function() {
  101609. return _index.importAttribute;
  101610. }
  101611. });
  101612. Object.defineProperty(exports, "Decorator", {
  101613. enumerable: true,
  101614. get: function() {
  101615. return _index.decorator;
  101616. }
  101617. });
  101618. Object.defineProperty(exports, "DoExpression", {
  101619. enumerable: true,
  101620. get: function() {
  101621. return _index.doExpression;
  101622. }
  101623. });
  101624. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  101625. enumerable: true,
  101626. get: function() {
  101627. return _index.exportDefaultSpecifier;
  101628. }
  101629. });
  101630. Object.defineProperty(exports, "PrivateName", {
  101631. enumerable: true,
  101632. get: function() {
  101633. return _index.privateName;
  101634. }
  101635. });
  101636. Object.defineProperty(exports, "RecordExpression", {
  101637. enumerable: true,
  101638. get: function() {
  101639. return _index.recordExpression;
  101640. }
  101641. });
  101642. Object.defineProperty(exports, "TupleExpression", {
  101643. enumerable: true,
  101644. get: function() {
  101645. return _index.tupleExpression;
  101646. }
  101647. });
  101648. Object.defineProperty(exports, "DecimalLiteral", {
  101649. enumerable: true,
  101650. get: function() {
  101651. return _index.decimalLiteral;
  101652. }
  101653. });
  101654. Object.defineProperty(exports, "StaticBlock", {
  101655. enumerable: true,
  101656. get: function() {
  101657. return _index.staticBlock;
  101658. }
  101659. });
  101660. Object.defineProperty(exports, "ModuleExpression", {
  101661. enumerable: true,
  101662. get: function() {
  101663. return _index.moduleExpression;
  101664. }
  101665. });
  101666. Object.defineProperty(exports, "TSParameterProperty", {
  101667. enumerable: true,
  101668. get: function() {
  101669. return _index.tsParameterProperty;
  101670. }
  101671. });
  101672. Object.defineProperty(exports, "TSDeclareFunction", {
  101673. enumerable: true,
  101674. get: function() {
  101675. return _index.tsDeclareFunction;
  101676. }
  101677. });
  101678. Object.defineProperty(exports, "TSDeclareMethod", {
  101679. enumerable: true,
  101680. get: function() {
  101681. return _index.tsDeclareMethod;
  101682. }
  101683. });
  101684. Object.defineProperty(exports, "TSQualifiedName", {
  101685. enumerable: true,
  101686. get: function() {
  101687. return _index.tsQualifiedName;
  101688. }
  101689. });
  101690. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  101691. enumerable: true,
  101692. get: function() {
  101693. return _index.tsCallSignatureDeclaration;
  101694. }
  101695. });
  101696. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  101697. enumerable: true,
  101698. get: function() {
  101699. return _index.tsConstructSignatureDeclaration;
  101700. }
  101701. });
  101702. Object.defineProperty(exports, "TSPropertySignature", {
  101703. enumerable: true,
  101704. get: function() {
  101705. return _index.tsPropertySignature;
  101706. }
  101707. });
  101708. Object.defineProperty(exports, "TSMethodSignature", {
  101709. enumerable: true,
  101710. get: function() {
  101711. return _index.tsMethodSignature;
  101712. }
  101713. });
  101714. Object.defineProperty(exports, "TSIndexSignature", {
  101715. enumerable: true,
  101716. get: function() {
  101717. return _index.tsIndexSignature;
  101718. }
  101719. });
  101720. Object.defineProperty(exports, "TSAnyKeyword", {
  101721. enumerable: true,
  101722. get: function() {
  101723. return _index.tsAnyKeyword;
  101724. }
  101725. });
  101726. Object.defineProperty(exports, "TSBooleanKeyword", {
  101727. enumerable: true,
  101728. get: function() {
  101729. return _index.tsBooleanKeyword;
  101730. }
  101731. });
  101732. Object.defineProperty(exports, "TSBigIntKeyword", {
  101733. enumerable: true,
  101734. get: function() {
  101735. return _index.tsBigIntKeyword;
  101736. }
  101737. });
  101738. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  101739. enumerable: true,
  101740. get: function() {
  101741. return _index.tsIntrinsicKeyword;
  101742. }
  101743. });
  101744. Object.defineProperty(exports, "TSNeverKeyword", {
  101745. enumerable: true,
  101746. get: function() {
  101747. return _index.tsNeverKeyword;
  101748. }
  101749. });
  101750. Object.defineProperty(exports, "TSNullKeyword", {
  101751. enumerable: true,
  101752. get: function() {
  101753. return _index.tsNullKeyword;
  101754. }
  101755. });
  101756. Object.defineProperty(exports, "TSNumberKeyword", {
  101757. enumerable: true,
  101758. get: function() {
  101759. return _index.tsNumberKeyword;
  101760. }
  101761. });
  101762. Object.defineProperty(exports, "TSObjectKeyword", {
  101763. enumerable: true,
  101764. get: function() {
  101765. return _index.tsObjectKeyword;
  101766. }
  101767. });
  101768. Object.defineProperty(exports, "TSStringKeyword", {
  101769. enumerable: true,
  101770. get: function() {
  101771. return _index.tsStringKeyword;
  101772. }
  101773. });
  101774. Object.defineProperty(exports, "TSSymbolKeyword", {
  101775. enumerable: true,
  101776. get: function() {
  101777. return _index.tsSymbolKeyword;
  101778. }
  101779. });
  101780. Object.defineProperty(exports, "TSUndefinedKeyword", {
  101781. enumerable: true,
  101782. get: function() {
  101783. return _index.tsUndefinedKeyword;
  101784. }
  101785. });
  101786. Object.defineProperty(exports, "TSUnknownKeyword", {
  101787. enumerable: true,
  101788. get: function() {
  101789. return _index.tsUnknownKeyword;
  101790. }
  101791. });
  101792. Object.defineProperty(exports, "TSVoidKeyword", {
  101793. enumerable: true,
  101794. get: function() {
  101795. return _index.tsVoidKeyword;
  101796. }
  101797. });
  101798. Object.defineProperty(exports, "TSThisType", {
  101799. enumerable: true,
  101800. get: function() {
  101801. return _index.tsThisType;
  101802. }
  101803. });
  101804. Object.defineProperty(exports, "TSFunctionType", {
  101805. enumerable: true,
  101806. get: function() {
  101807. return _index.tsFunctionType;
  101808. }
  101809. });
  101810. Object.defineProperty(exports, "TSConstructorType", {
  101811. enumerable: true,
  101812. get: function() {
  101813. return _index.tsConstructorType;
  101814. }
  101815. });
  101816. Object.defineProperty(exports, "TSTypeReference", {
  101817. enumerable: true,
  101818. get: function() {
  101819. return _index.tsTypeReference;
  101820. }
  101821. });
  101822. Object.defineProperty(exports, "TSTypePredicate", {
  101823. enumerable: true,
  101824. get: function() {
  101825. return _index.tsTypePredicate;
  101826. }
  101827. });
  101828. Object.defineProperty(exports, "TSTypeQuery", {
  101829. enumerable: true,
  101830. get: function() {
  101831. return _index.tsTypeQuery;
  101832. }
  101833. });
  101834. Object.defineProperty(exports, "TSTypeLiteral", {
  101835. enumerable: true,
  101836. get: function() {
  101837. return _index.tsTypeLiteral;
  101838. }
  101839. });
  101840. Object.defineProperty(exports, "TSArrayType", {
  101841. enumerable: true,
  101842. get: function() {
  101843. return _index.tsArrayType;
  101844. }
  101845. });
  101846. Object.defineProperty(exports, "TSTupleType", {
  101847. enumerable: true,
  101848. get: function() {
  101849. return _index.tsTupleType;
  101850. }
  101851. });
  101852. Object.defineProperty(exports, "TSOptionalType", {
  101853. enumerable: true,
  101854. get: function() {
  101855. return _index.tsOptionalType;
  101856. }
  101857. });
  101858. Object.defineProperty(exports, "TSRestType", {
  101859. enumerable: true,
  101860. get: function() {
  101861. return _index.tsRestType;
  101862. }
  101863. });
  101864. Object.defineProperty(exports, "TSNamedTupleMember", {
  101865. enumerable: true,
  101866. get: function() {
  101867. return _index.tsNamedTupleMember;
  101868. }
  101869. });
  101870. Object.defineProperty(exports, "TSUnionType", {
  101871. enumerable: true,
  101872. get: function() {
  101873. return _index.tsUnionType;
  101874. }
  101875. });
  101876. Object.defineProperty(exports, "TSIntersectionType", {
  101877. enumerable: true,
  101878. get: function() {
  101879. return _index.tsIntersectionType;
  101880. }
  101881. });
  101882. Object.defineProperty(exports, "TSConditionalType", {
  101883. enumerable: true,
  101884. get: function() {
  101885. return _index.tsConditionalType;
  101886. }
  101887. });
  101888. Object.defineProperty(exports, "TSInferType", {
  101889. enumerable: true,
  101890. get: function() {
  101891. return _index.tsInferType;
  101892. }
  101893. });
  101894. Object.defineProperty(exports, "TSParenthesizedType", {
  101895. enumerable: true,
  101896. get: function() {
  101897. return _index.tsParenthesizedType;
  101898. }
  101899. });
  101900. Object.defineProperty(exports, "TSTypeOperator", {
  101901. enumerable: true,
  101902. get: function() {
  101903. return _index.tsTypeOperator;
  101904. }
  101905. });
  101906. Object.defineProperty(exports, "TSIndexedAccessType", {
  101907. enumerable: true,
  101908. get: function() {
  101909. return _index.tsIndexedAccessType;
  101910. }
  101911. });
  101912. Object.defineProperty(exports, "TSMappedType", {
  101913. enumerable: true,
  101914. get: function() {
  101915. return _index.tsMappedType;
  101916. }
  101917. });
  101918. Object.defineProperty(exports, "TSLiteralType", {
  101919. enumerable: true,
  101920. get: function() {
  101921. return _index.tsLiteralType;
  101922. }
  101923. });
  101924. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  101925. enumerable: true,
  101926. get: function() {
  101927. return _index.tsExpressionWithTypeArguments;
  101928. }
  101929. });
  101930. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  101931. enumerable: true,
  101932. get: function() {
  101933. return _index.tsInterfaceDeclaration;
  101934. }
  101935. });
  101936. Object.defineProperty(exports, "TSInterfaceBody", {
  101937. enumerable: true,
  101938. get: function() {
  101939. return _index.tsInterfaceBody;
  101940. }
  101941. });
  101942. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  101943. enumerable: true,
  101944. get: function() {
  101945. return _index.tsTypeAliasDeclaration;
  101946. }
  101947. });
  101948. Object.defineProperty(exports, "TSAsExpression", {
  101949. enumerable: true,
  101950. get: function() {
  101951. return _index.tsAsExpression;
  101952. }
  101953. });
  101954. Object.defineProperty(exports, "TSTypeAssertion", {
  101955. enumerable: true,
  101956. get: function() {
  101957. return _index.tsTypeAssertion;
  101958. }
  101959. });
  101960. Object.defineProperty(exports, "TSEnumDeclaration", {
  101961. enumerable: true,
  101962. get: function() {
  101963. return _index.tsEnumDeclaration;
  101964. }
  101965. });
  101966. Object.defineProperty(exports, "TSEnumMember", {
  101967. enumerable: true,
  101968. get: function() {
  101969. return _index.tsEnumMember;
  101970. }
  101971. });
  101972. Object.defineProperty(exports, "TSModuleDeclaration", {
  101973. enumerable: true,
  101974. get: function() {
  101975. return _index.tsModuleDeclaration;
  101976. }
  101977. });
  101978. Object.defineProperty(exports, "TSModuleBlock", {
  101979. enumerable: true,
  101980. get: function() {
  101981. return _index.tsModuleBlock;
  101982. }
  101983. });
  101984. Object.defineProperty(exports, "TSImportType", {
  101985. enumerable: true,
  101986. get: function() {
  101987. return _index.tsImportType;
  101988. }
  101989. });
  101990. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  101991. enumerable: true,
  101992. get: function() {
  101993. return _index.tsImportEqualsDeclaration;
  101994. }
  101995. });
  101996. Object.defineProperty(exports, "TSExternalModuleReference", {
  101997. enumerable: true,
  101998. get: function() {
  101999. return _index.tsExternalModuleReference;
  102000. }
  102001. });
  102002. Object.defineProperty(exports, "TSNonNullExpression", {
  102003. enumerable: true,
  102004. get: function() {
  102005. return _index.tsNonNullExpression;
  102006. }
  102007. });
  102008. Object.defineProperty(exports, "TSExportAssignment", {
  102009. enumerable: true,
  102010. get: function() {
  102011. return _index.tsExportAssignment;
  102012. }
  102013. });
  102014. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  102015. enumerable: true,
  102016. get: function() {
  102017. return _index.tsNamespaceExportDeclaration;
  102018. }
  102019. });
  102020. Object.defineProperty(exports, "TSTypeAnnotation", {
  102021. enumerable: true,
  102022. get: function() {
  102023. return _index.tsTypeAnnotation;
  102024. }
  102025. });
  102026. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  102027. enumerable: true,
  102028. get: function() {
  102029. return _index.tsTypeParameterInstantiation;
  102030. }
  102031. });
  102032. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  102033. enumerable: true,
  102034. get: function() {
  102035. return _index.tsTypeParameterDeclaration;
  102036. }
  102037. });
  102038. Object.defineProperty(exports, "TSTypeParameter", {
  102039. enumerable: true,
  102040. get: function() {
  102041. return _index.tsTypeParameter;
  102042. }
  102043. });
  102044. Object.defineProperty(exports, "NumberLiteral", {
  102045. enumerable: true,
  102046. get: function() {
  102047. return _index.numberLiteral;
  102048. }
  102049. });
  102050. Object.defineProperty(exports, "RegexLiteral", {
  102051. enumerable: true,
  102052. get: function() {
  102053. return _index.regexLiteral;
  102054. }
  102055. });
  102056. Object.defineProperty(exports, "RestProperty", {
  102057. enumerable: true,
  102058. get: function() {
  102059. return _index.restProperty;
  102060. }
  102061. });
  102062. Object.defineProperty(exports, "SpreadProperty", {
  102063. enumerable: true,
  102064. get: function() {
  102065. return _index.spreadProperty;
  102066. }
  102067. });
  102068. var _index = require_generated17();
  102069. }
  102070. });
  102071. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneNode.js
  102072. var require_cloneNode4 = __commonJS({
  102073. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  102074. "use strict";
  102075. Object.defineProperty(exports, "__esModule", {
  102076. value: true
  102077. });
  102078. exports.default = cloneNode;
  102079. var _definitions = require_definitions4();
  102080. var _generated = require_generated16();
  102081. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  102082. function cloneIfNode(obj, deep, withoutLoc) {
  102083. if (obj && typeof obj.type === "string") {
  102084. return cloneNode(obj, deep, withoutLoc);
  102085. }
  102086. return obj;
  102087. }
  102088. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  102089. if (Array.isArray(obj)) {
  102090. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  102091. }
  102092. return cloneIfNode(obj, deep, withoutLoc);
  102093. }
  102094. function cloneNode(node, deep = true, withoutLoc = false) {
  102095. if (!node)
  102096. return node;
  102097. const {
  102098. type
  102099. } = node;
  102100. const newNode = {
  102101. type: node.type
  102102. };
  102103. if ((0, _generated.isIdentifier)(node)) {
  102104. newNode.name = node.name;
  102105. if (has(node, "optional") && typeof node.optional === "boolean") {
  102106. newNode.optional = node.optional;
  102107. }
  102108. if (has(node, "typeAnnotation")) {
  102109. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  102110. }
  102111. } else if (!has(_definitions.NODE_FIELDS, type)) {
  102112. throw new Error(`Unknown node type: "${type}"`);
  102113. } else {
  102114. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  102115. if (has(node, field)) {
  102116. if (deep) {
  102117. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  102118. } else {
  102119. newNode[field] = node[field];
  102120. }
  102121. }
  102122. }
  102123. }
  102124. if (has(node, "loc")) {
  102125. if (withoutLoc) {
  102126. newNode.loc = null;
  102127. } else {
  102128. newNode.loc = node.loc;
  102129. }
  102130. }
  102131. if (has(node, "leadingComments")) {
  102132. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  102133. }
  102134. if (has(node, "innerComments")) {
  102135. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  102136. }
  102137. if (has(node, "trailingComments")) {
  102138. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  102139. }
  102140. if (has(node, "extra")) {
  102141. newNode.extra = Object.assign({}, node.extra);
  102142. }
  102143. return newNode;
  102144. }
  102145. function maybeCloneComments(comments, deep, withoutLoc) {
  102146. if (!comments || !deep) {
  102147. return comments;
  102148. }
  102149. return comments.map(({
  102150. type,
  102151. value,
  102152. loc
  102153. }) => {
  102154. if (withoutLoc) {
  102155. return {
  102156. type,
  102157. value,
  102158. loc: null
  102159. };
  102160. }
  102161. return {
  102162. type,
  102163. value,
  102164. loc
  102165. };
  102166. });
  102167. }
  102168. }
  102169. });
  102170. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/clone.js
  102171. var require_clone4 = __commonJS({
  102172. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  102173. "use strict";
  102174. Object.defineProperty(exports, "__esModule", {
  102175. value: true
  102176. });
  102177. exports.default = clone;
  102178. var _cloneNode = require_cloneNode4();
  102179. function clone(node) {
  102180. return (0, _cloneNode.default)(node, false);
  102181. }
  102182. }
  102183. });
  102184. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneDeep.js
  102185. var require_cloneDeep4 = __commonJS({
  102186. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  102187. "use strict";
  102188. Object.defineProperty(exports, "__esModule", {
  102189. value: true
  102190. });
  102191. exports.default = cloneDeep2;
  102192. var _cloneNode = require_cloneNode4();
  102193. function cloneDeep2(node) {
  102194. return (0, _cloneNode.default)(node);
  102195. }
  102196. }
  102197. });
  102198. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  102199. var require_cloneDeepWithoutLoc4 = __commonJS({
  102200. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  102201. "use strict";
  102202. Object.defineProperty(exports, "__esModule", {
  102203. value: true
  102204. });
  102205. exports.default = cloneDeepWithoutLoc;
  102206. var _cloneNode = require_cloneNode4();
  102207. function cloneDeepWithoutLoc(node) {
  102208. return (0, _cloneNode.default)(node, true, true);
  102209. }
  102210. }
  102211. });
  102212. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  102213. var require_cloneWithoutLoc4 = __commonJS({
  102214. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  102215. "use strict";
  102216. Object.defineProperty(exports, "__esModule", {
  102217. value: true
  102218. });
  102219. exports.default = cloneWithoutLoc;
  102220. var _cloneNode = require_cloneNode4();
  102221. function cloneWithoutLoc(node) {
  102222. return (0, _cloneNode.default)(node, false, true);
  102223. }
  102224. }
  102225. });
  102226. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/addComments.js
  102227. var require_addComments4 = __commonJS({
  102228. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  102229. "use strict";
  102230. Object.defineProperty(exports, "__esModule", {
  102231. value: true
  102232. });
  102233. exports.default = addComments;
  102234. function addComments(node, type, comments) {
  102235. if (!comments || !node)
  102236. return node;
  102237. const key = `${type}Comments`;
  102238. if (node[key]) {
  102239. if (type === "leading") {
  102240. node[key] = comments.concat(node[key]);
  102241. } else {
  102242. node[key] = node[key].concat(comments);
  102243. }
  102244. } else {
  102245. node[key] = comments;
  102246. }
  102247. return node;
  102248. }
  102249. }
  102250. });
  102251. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/addComment.js
  102252. var require_addComment4 = __commonJS({
  102253. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  102254. "use strict";
  102255. Object.defineProperty(exports, "__esModule", {
  102256. value: true
  102257. });
  102258. exports.default = addComment;
  102259. var _addComments = require_addComments4();
  102260. function addComment(node, type, content3, line) {
  102261. return (0, _addComments.default)(node, type, [{
  102262. type: line ? "CommentLine" : "CommentBlock",
  102263. value: content3
  102264. }]);
  102265. }
  102266. }
  102267. });
  102268. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/inherit.js
  102269. var require_inherit4 = __commonJS({
  102270. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  102271. "use strict";
  102272. Object.defineProperty(exports, "__esModule", {
  102273. value: true
  102274. });
  102275. exports.default = inherit2;
  102276. function inherit2(key, child, parent) {
  102277. if (child && parent) {
  102278. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  102279. }
  102280. }
  102281. }
  102282. });
  102283. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  102284. var require_inheritInnerComments4 = __commonJS({
  102285. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  102286. "use strict";
  102287. Object.defineProperty(exports, "__esModule", {
  102288. value: true
  102289. });
  102290. exports.default = inheritInnerComments;
  102291. var _inherit = require_inherit4();
  102292. function inheritInnerComments(child, parent) {
  102293. (0, _inherit.default)("innerComments", child, parent);
  102294. }
  102295. }
  102296. });
  102297. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  102298. var require_inheritLeadingComments4 = __commonJS({
  102299. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  102300. "use strict";
  102301. Object.defineProperty(exports, "__esModule", {
  102302. value: true
  102303. });
  102304. exports.default = inheritLeadingComments;
  102305. var _inherit = require_inherit4();
  102306. function inheritLeadingComments(child, parent) {
  102307. (0, _inherit.default)("leadingComments", child, parent);
  102308. }
  102309. }
  102310. });
  102311. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  102312. var require_inheritTrailingComments4 = __commonJS({
  102313. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  102314. "use strict";
  102315. Object.defineProperty(exports, "__esModule", {
  102316. value: true
  102317. });
  102318. exports.default = inheritTrailingComments;
  102319. var _inherit = require_inherit4();
  102320. function inheritTrailingComments(child, parent) {
  102321. (0, _inherit.default)("trailingComments", child, parent);
  102322. }
  102323. }
  102324. });
  102325. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritsComments.js
  102326. var require_inheritsComments4 = __commonJS({
  102327. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  102328. "use strict";
  102329. Object.defineProperty(exports, "__esModule", {
  102330. value: true
  102331. });
  102332. exports.default = inheritsComments;
  102333. var _inheritTrailingComments = require_inheritTrailingComments4();
  102334. var _inheritLeadingComments = require_inheritLeadingComments4();
  102335. var _inheritInnerComments = require_inheritInnerComments4();
  102336. function inheritsComments(child, parent) {
  102337. (0, _inheritTrailingComments.default)(child, parent);
  102338. (0, _inheritLeadingComments.default)(child, parent);
  102339. (0, _inheritInnerComments.default)(child, parent);
  102340. return child;
  102341. }
  102342. }
  102343. });
  102344. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/removeComments.js
  102345. var require_removeComments4 = __commonJS({
  102346. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  102347. "use strict";
  102348. Object.defineProperty(exports, "__esModule", {
  102349. value: true
  102350. });
  102351. exports.default = removeComments;
  102352. var _constants = require_constants4();
  102353. function removeComments(node) {
  102354. _constants.COMMENT_KEYS.forEach((key) => {
  102355. node[key] = null;
  102356. });
  102357. return node;
  102358. }
  102359. }
  102360. });
  102361. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/constants/generated/index.js
  102362. var require_generated19 = __commonJS({
  102363. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  102364. "use strict";
  102365. Object.defineProperty(exports, "__esModule", {
  102366. value: true
  102367. });
  102368. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  102369. var _definitions = require_definitions4();
  102370. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  102371. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  102372. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  102373. exports.BINARY_TYPES = BINARY_TYPES;
  102374. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  102375. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  102376. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  102377. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  102378. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  102379. exports.BLOCK_TYPES = BLOCK_TYPES;
  102380. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  102381. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  102382. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  102383. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  102384. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  102385. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  102386. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  102387. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  102388. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  102389. exports.LOOP_TYPES = LOOP_TYPES;
  102390. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  102391. exports.WHILE_TYPES = WHILE_TYPES;
  102392. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  102393. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  102394. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  102395. exports.FOR_TYPES = FOR_TYPES;
  102396. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  102397. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  102398. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  102399. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  102400. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  102401. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  102402. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  102403. exports.PUREISH_TYPES = PUREISH_TYPES;
  102404. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  102405. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  102406. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  102407. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  102408. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  102409. exports.LVAL_TYPES = LVAL_TYPES;
  102410. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  102411. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  102412. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  102413. exports.LITERAL_TYPES = LITERAL_TYPES;
  102414. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  102415. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  102416. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  102417. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  102418. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  102419. exports.METHOD_TYPES = METHOD_TYPES;
  102420. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  102421. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  102422. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  102423. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  102424. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  102425. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  102426. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  102427. exports.PATTERN_TYPES = PATTERN_TYPES;
  102428. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  102429. exports.CLASS_TYPES = CLASS_TYPES;
  102430. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  102431. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  102432. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  102433. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  102434. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  102435. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  102436. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  102437. exports.FLOW_TYPES = FLOW_TYPES;
  102438. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  102439. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  102440. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  102441. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  102442. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  102443. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  102444. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  102445. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  102446. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  102447. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  102448. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  102449. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  102450. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  102451. exports.JSX_TYPES = JSX_TYPES;
  102452. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  102453. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  102454. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  102455. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  102456. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  102457. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  102458. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  102459. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  102460. }
  102461. });
  102462. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toBlock.js
  102463. var require_toBlock4 = __commonJS({
  102464. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  102465. "use strict";
  102466. Object.defineProperty(exports, "__esModule", {
  102467. value: true
  102468. });
  102469. exports.default = toBlock;
  102470. var _generated = require_generated16();
  102471. var _generated2 = require_generated17();
  102472. function toBlock(node, parent) {
  102473. if ((0, _generated.isBlockStatement)(node)) {
  102474. return node;
  102475. }
  102476. let blockNodes = [];
  102477. if ((0, _generated.isEmptyStatement)(node)) {
  102478. blockNodes = [];
  102479. } else {
  102480. if (!(0, _generated.isStatement)(node)) {
  102481. if ((0, _generated.isFunction)(parent)) {
  102482. node = (0, _generated2.returnStatement)(node);
  102483. } else {
  102484. node = (0, _generated2.expressionStatement)(node);
  102485. }
  102486. }
  102487. blockNodes = [node];
  102488. }
  102489. return (0, _generated2.blockStatement)(blockNodes);
  102490. }
  102491. }
  102492. });
  102493. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/ensureBlock.js
  102494. var require_ensureBlock4 = __commonJS({
  102495. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  102496. "use strict";
  102497. Object.defineProperty(exports, "__esModule", {
  102498. value: true
  102499. });
  102500. exports.default = ensureBlock;
  102501. var _toBlock = require_toBlock4();
  102502. function ensureBlock(node, key = "body") {
  102503. return node[key] = (0, _toBlock.default)(node[key], node);
  102504. }
  102505. }
  102506. });
  102507. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toIdentifier.js
  102508. var require_toIdentifier4 = __commonJS({
  102509. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  102510. "use strict";
  102511. Object.defineProperty(exports, "__esModule", {
  102512. value: true
  102513. });
  102514. exports.default = toIdentifier2;
  102515. var _isValidIdentifier = require_isValidIdentifier4();
  102516. var _helperValidatorIdentifier = require_lib23();
  102517. function toIdentifier2(input) {
  102518. input = input + "";
  102519. let name2 = "";
  102520. for (const c of input) {
  102521. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  102522. }
  102523. name2 = name2.replace(/^[-0-9]+/, "");
  102524. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  102525. return c ? c.toUpperCase() : "";
  102526. });
  102527. if (!(0, _isValidIdentifier.default)(name2)) {
  102528. name2 = `_${name2}`;
  102529. }
  102530. return name2 || "_";
  102531. }
  102532. }
  102533. });
  102534. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  102535. var require_toBindingIdentifierName4 = __commonJS({
  102536. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  102537. "use strict";
  102538. Object.defineProperty(exports, "__esModule", {
  102539. value: true
  102540. });
  102541. exports.default = toBindingIdentifierName;
  102542. var _toIdentifier = require_toIdentifier4();
  102543. function toBindingIdentifierName(name2) {
  102544. name2 = (0, _toIdentifier.default)(name2);
  102545. if (name2 === "eval" || name2 === "arguments")
  102546. name2 = "_" + name2;
  102547. return name2;
  102548. }
  102549. }
  102550. });
  102551. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toComputedKey.js
  102552. var require_toComputedKey4 = __commonJS({
  102553. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  102554. "use strict";
  102555. Object.defineProperty(exports, "__esModule", {
  102556. value: true
  102557. });
  102558. exports.default = toComputedKey;
  102559. var _generated = require_generated16();
  102560. var _generated2 = require_generated17();
  102561. function toComputedKey(node, key = node.key || node.property) {
  102562. if (!node.computed && (0, _generated.isIdentifier)(key))
  102563. key = (0, _generated2.stringLiteral)(key.name);
  102564. return key;
  102565. }
  102566. }
  102567. });
  102568. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toExpression.js
  102569. var require_toExpression4 = __commonJS({
  102570. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  102571. "use strict";
  102572. Object.defineProperty(exports, "__esModule", {
  102573. value: true
  102574. });
  102575. exports.default = void 0;
  102576. var _generated = require_generated16();
  102577. var _default = toExpression;
  102578. exports.default = _default;
  102579. function toExpression(node) {
  102580. if ((0, _generated.isExpressionStatement)(node)) {
  102581. node = node.expression;
  102582. }
  102583. if ((0, _generated.isExpression)(node)) {
  102584. return node;
  102585. }
  102586. if ((0, _generated.isClass)(node)) {
  102587. node.type = "ClassExpression";
  102588. } else if ((0, _generated.isFunction)(node)) {
  102589. node.type = "FunctionExpression";
  102590. }
  102591. if (!(0, _generated.isExpression)(node)) {
  102592. throw new Error(`cannot turn ${node.type} to an expression`);
  102593. }
  102594. return node;
  102595. }
  102596. }
  102597. });
  102598. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/traverse/traverseFast.js
  102599. var require_traverseFast4 = __commonJS({
  102600. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  102601. "use strict";
  102602. Object.defineProperty(exports, "__esModule", {
  102603. value: true
  102604. });
  102605. exports.default = traverseFast;
  102606. var _definitions = require_definitions4();
  102607. function traverseFast(node, enter, opts) {
  102608. if (!node)
  102609. return;
  102610. const keys2 = _definitions.VISITOR_KEYS[node.type];
  102611. if (!keys2)
  102612. return;
  102613. opts = opts || {};
  102614. enter(node, opts);
  102615. for (const key of keys2) {
  102616. const subNode = node[key];
  102617. if (Array.isArray(subNode)) {
  102618. for (const node2 of subNode) {
  102619. traverseFast(node2, enter, opts);
  102620. }
  102621. } else {
  102622. traverseFast(subNode, enter, opts);
  102623. }
  102624. }
  102625. }
  102626. }
  102627. });
  102628. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/removeProperties.js
  102629. var require_removeProperties4 = __commonJS({
  102630. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  102631. "use strict";
  102632. Object.defineProperty(exports, "__esModule", {
  102633. value: true
  102634. });
  102635. exports.default = removeProperties;
  102636. var _constants = require_constants4();
  102637. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  102638. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  102639. function removeProperties(node, opts = {}) {
  102640. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  102641. for (const key of map) {
  102642. if (node[key] != null)
  102643. node[key] = void 0;
  102644. }
  102645. for (const key of Object.keys(node)) {
  102646. if (key[0] === "_" && node[key] != null)
  102647. node[key] = void 0;
  102648. }
  102649. const symbols = Object.getOwnPropertySymbols(node);
  102650. for (const sym of symbols) {
  102651. node[sym] = null;
  102652. }
  102653. }
  102654. }
  102655. });
  102656. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  102657. var require_removePropertiesDeep4 = __commonJS({
  102658. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  102659. "use strict";
  102660. Object.defineProperty(exports, "__esModule", {
  102661. value: true
  102662. });
  102663. exports.default = removePropertiesDeep;
  102664. var _traverseFast = require_traverseFast4();
  102665. var _removeProperties = require_removeProperties4();
  102666. function removePropertiesDeep(tree, opts) {
  102667. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  102668. return tree;
  102669. }
  102670. }
  102671. });
  102672. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toKeyAlias.js
  102673. var require_toKeyAlias4 = __commonJS({
  102674. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  102675. "use strict";
  102676. Object.defineProperty(exports, "__esModule", {
  102677. value: true
  102678. });
  102679. exports.default = toKeyAlias;
  102680. var _generated = require_generated16();
  102681. var _cloneNode = require_cloneNode4();
  102682. var _removePropertiesDeep = require_removePropertiesDeep4();
  102683. function toKeyAlias(node, key = node.key) {
  102684. let alias;
  102685. if (node.kind === "method") {
  102686. return toKeyAlias.increment() + "";
  102687. } else if ((0, _generated.isIdentifier)(key)) {
  102688. alias = key.name;
  102689. } else if ((0, _generated.isStringLiteral)(key)) {
  102690. alias = JSON.stringify(key.value);
  102691. } else {
  102692. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  102693. }
  102694. if (node.computed) {
  102695. alias = `[${alias}]`;
  102696. }
  102697. if (node.static) {
  102698. alias = `static:${alias}`;
  102699. }
  102700. return alias;
  102701. }
  102702. toKeyAlias.uid = 0;
  102703. toKeyAlias.increment = function() {
  102704. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  102705. return toKeyAlias.uid = 0;
  102706. } else {
  102707. return toKeyAlias.uid++;
  102708. }
  102709. };
  102710. }
  102711. });
  102712. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  102713. var require_getBindingIdentifiers4 = __commonJS({
  102714. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  102715. "use strict";
  102716. Object.defineProperty(exports, "__esModule", {
  102717. value: true
  102718. });
  102719. exports.default = getBindingIdentifiers;
  102720. var _generated = require_generated16();
  102721. function getBindingIdentifiers(node, duplicates, outerOnly) {
  102722. let search2 = [].concat(node);
  102723. const ids = /* @__PURE__ */ Object.create(null);
  102724. while (search2.length) {
  102725. const id = search2.shift();
  102726. if (!id)
  102727. continue;
  102728. const keys2 = getBindingIdentifiers.keys[id.type];
  102729. if ((0, _generated.isIdentifier)(id)) {
  102730. if (duplicates) {
  102731. const _ids = ids[id.name] = ids[id.name] || [];
  102732. _ids.push(id);
  102733. } else {
  102734. ids[id.name] = id;
  102735. }
  102736. continue;
  102737. }
  102738. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  102739. if ((0, _generated.isDeclaration)(id.declaration)) {
  102740. search2.push(id.declaration);
  102741. }
  102742. continue;
  102743. }
  102744. if (outerOnly) {
  102745. if ((0, _generated.isFunctionDeclaration)(id)) {
  102746. search2.push(id.id);
  102747. continue;
  102748. }
  102749. if ((0, _generated.isFunctionExpression)(id)) {
  102750. continue;
  102751. }
  102752. }
  102753. if (keys2) {
  102754. for (let i = 0; i < keys2.length; i++) {
  102755. const key = keys2[i];
  102756. if (id[key]) {
  102757. search2 = search2.concat(id[key]);
  102758. }
  102759. }
  102760. }
  102761. }
  102762. return ids;
  102763. }
  102764. getBindingIdentifiers.keys = {
  102765. DeclareClass: ["id"],
  102766. DeclareFunction: ["id"],
  102767. DeclareModule: ["id"],
  102768. DeclareVariable: ["id"],
  102769. DeclareInterface: ["id"],
  102770. DeclareTypeAlias: ["id"],
  102771. DeclareOpaqueType: ["id"],
  102772. InterfaceDeclaration: ["id"],
  102773. TypeAlias: ["id"],
  102774. OpaqueType: ["id"],
  102775. CatchClause: ["param"],
  102776. LabeledStatement: ["label"],
  102777. UnaryExpression: ["argument"],
  102778. AssignmentExpression: ["left"],
  102779. ImportSpecifier: ["local"],
  102780. ImportNamespaceSpecifier: ["local"],
  102781. ImportDefaultSpecifier: ["local"],
  102782. ImportDeclaration: ["specifiers"],
  102783. ExportSpecifier: ["exported"],
  102784. ExportNamespaceSpecifier: ["exported"],
  102785. ExportDefaultSpecifier: ["exported"],
  102786. FunctionDeclaration: ["id", "params"],
  102787. FunctionExpression: ["id", "params"],
  102788. ArrowFunctionExpression: ["params"],
  102789. ObjectMethod: ["params"],
  102790. ClassMethod: ["params"],
  102791. ForInStatement: ["left"],
  102792. ForOfStatement: ["left"],
  102793. ClassDeclaration: ["id"],
  102794. ClassExpression: ["id"],
  102795. RestElement: ["argument"],
  102796. UpdateExpression: ["argument"],
  102797. ObjectProperty: ["value"],
  102798. AssignmentPattern: ["left"],
  102799. ArrayPattern: ["elements"],
  102800. ObjectPattern: ["properties"],
  102801. VariableDeclaration: ["declarations"],
  102802. VariableDeclarator: ["id"]
  102803. };
  102804. }
  102805. });
  102806. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  102807. var require_gatherSequenceExpressions4 = __commonJS({
  102808. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  102809. "use strict";
  102810. Object.defineProperty(exports, "__esModule", {
  102811. value: true
  102812. });
  102813. exports.default = gatherSequenceExpressions;
  102814. var _getBindingIdentifiers = require_getBindingIdentifiers4();
  102815. var _generated = require_generated16();
  102816. var _generated2 = require_generated17();
  102817. var _cloneNode = require_cloneNode4();
  102818. function gatherSequenceExpressions(nodes, scope, declars) {
  102819. const exprs = [];
  102820. let ensureLastUndefined = true;
  102821. for (const node of nodes) {
  102822. if (!(0, _generated.isEmptyStatement)(node)) {
  102823. ensureLastUndefined = false;
  102824. }
  102825. if ((0, _generated.isExpression)(node)) {
  102826. exprs.push(node);
  102827. } else if ((0, _generated.isExpressionStatement)(node)) {
  102828. exprs.push(node.expression);
  102829. } else if ((0, _generated.isVariableDeclaration)(node)) {
  102830. if (node.kind !== "var")
  102831. return;
  102832. for (const declar of node.declarations) {
  102833. const bindings = (0, _getBindingIdentifiers.default)(declar);
  102834. for (const key of Object.keys(bindings)) {
  102835. declars.push({
  102836. kind: node.kind,
  102837. id: (0, _cloneNode.default)(bindings[key])
  102838. });
  102839. }
  102840. if (declar.init) {
  102841. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  102842. }
  102843. }
  102844. ensureLastUndefined = true;
  102845. } else if ((0, _generated.isIfStatement)(node)) {
  102846. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  102847. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  102848. if (!consequent || !alternate)
  102849. return;
  102850. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  102851. } else if ((0, _generated.isBlockStatement)(node)) {
  102852. const body = gatherSequenceExpressions(node.body, scope, declars);
  102853. if (!body)
  102854. return;
  102855. exprs.push(body);
  102856. } else if ((0, _generated.isEmptyStatement)(node)) {
  102857. if (nodes.indexOf(node) === 0) {
  102858. ensureLastUndefined = true;
  102859. }
  102860. } else {
  102861. return;
  102862. }
  102863. }
  102864. if (ensureLastUndefined) {
  102865. exprs.push(scope.buildUndefinedNode());
  102866. }
  102867. if (exprs.length === 1) {
  102868. return exprs[0];
  102869. } else {
  102870. return (0, _generated2.sequenceExpression)(exprs);
  102871. }
  102872. }
  102873. }
  102874. });
  102875. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  102876. var require_toSequenceExpression4 = __commonJS({
  102877. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  102878. "use strict";
  102879. Object.defineProperty(exports, "__esModule", {
  102880. value: true
  102881. });
  102882. exports.default = toSequenceExpression;
  102883. var _gatherSequenceExpressions = require_gatherSequenceExpressions4();
  102884. function toSequenceExpression(nodes, scope) {
  102885. if (!(nodes != null && nodes.length))
  102886. return;
  102887. const declars = [];
  102888. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  102889. if (!result)
  102890. return;
  102891. for (const declar of declars) {
  102892. scope.push(declar);
  102893. }
  102894. return result;
  102895. }
  102896. }
  102897. });
  102898. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toStatement.js
  102899. var require_toStatement4 = __commonJS({
  102900. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  102901. "use strict";
  102902. Object.defineProperty(exports, "__esModule", {
  102903. value: true
  102904. });
  102905. exports.default = void 0;
  102906. var _generated = require_generated16();
  102907. var _generated2 = require_generated17();
  102908. var _default = toStatement;
  102909. exports.default = _default;
  102910. function toStatement(node, ignore3) {
  102911. if ((0, _generated.isStatement)(node)) {
  102912. return node;
  102913. }
  102914. let mustHaveId = false;
  102915. let newType;
  102916. if ((0, _generated.isClass)(node)) {
  102917. mustHaveId = true;
  102918. newType = "ClassDeclaration";
  102919. } else if ((0, _generated.isFunction)(node)) {
  102920. mustHaveId = true;
  102921. newType = "FunctionDeclaration";
  102922. } else if ((0, _generated.isAssignmentExpression)(node)) {
  102923. return (0, _generated2.expressionStatement)(node);
  102924. }
  102925. if (mustHaveId && !node.id) {
  102926. newType = false;
  102927. }
  102928. if (!newType) {
  102929. if (ignore3) {
  102930. return false;
  102931. } else {
  102932. throw new Error(`cannot turn ${node.type} to a statement`);
  102933. }
  102934. }
  102935. node.type = newType;
  102936. return node;
  102937. }
  102938. }
  102939. });
  102940. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/valueToNode.js
  102941. var require_valueToNode4 = __commonJS({
  102942. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  102943. "use strict";
  102944. Object.defineProperty(exports, "__esModule", {
  102945. value: true
  102946. });
  102947. exports.default = void 0;
  102948. var _isValidIdentifier = require_isValidIdentifier4();
  102949. var _generated = require_generated17();
  102950. var _default = valueToNode;
  102951. exports.default = _default;
  102952. var objectToString = Function.call.bind(Object.prototype.toString);
  102953. function isRegExp(value) {
  102954. return objectToString(value) === "[object RegExp]";
  102955. }
  102956. function isPlainObject2(value) {
  102957. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  102958. return false;
  102959. }
  102960. const proto = Object.getPrototypeOf(value);
  102961. return proto === null || Object.getPrototypeOf(proto) === null;
  102962. }
  102963. function valueToNode(value) {
  102964. if (value === void 0) {
  102965. return (0, _generated.identifier)("undefined");
  102966. }
  102967. if (value === true || value === false) {
  102968. return (0, _generated.booleanLiteral)(value);
  102969. }
  102970. if (value === null) {
  102971. return (0, _generated.nullLiteral)();
  102972. }
  102973. if (typeof value === "string") {
  102974. return (0, _generated.stringLiteral)(value);
  102975. }
  102976. if (typeof value === "number") {
  102977. let result;
  102978. if (Number.isFinite(value)) {
  102979. result = (0, _generated.numericLiteral)(Math.abs(value));
  102980. } else {
  102981. let numerator;
  102982. if (Number.isNaN(value)) {
  102983. numerator = (0, _generated.numericLiteral)(0);
  102984. } else {
  102985. numerator = (0, _generated.numericLiteral)(1);
  102986. }
  102987. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  102988. }
  102989. if (value < 0 || Object.is(value, -0)) {
  102990. result = (0, _generated.unaryExpression)("-", result);
  102991. }
  102992. return result;
  102993. }
  102994. if (isRegExp(value)) {
  102995. const pattern = value.source;
  102996. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  102997. return (0, _generated.regExpLiteral)(pattern, flags);
  102998. }
  102999. if (Array.isArray(value)) {
  103000. return (0, _generated.arrayExpression)(value.map(valueToNode));
  103001. }
  103002. if (isPlainObject2(value)) {
  103003. const props = [];
  103004. for (const key of Object.keys(value)) {
  103005. let nodeKey;
  103006. if ((0, _isValidIdentifier.default)(key)) {
  103007. nodeKey = (0, _generated.identifier)(key);
  103008. } else {
  103009. nodeKey = (0, _generated.stringLiteral)(key);
  103010. }
  103011. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  103012. }
  103013. return (0, _generated.objectExpression)(props);
  103014. }
  103015. throw new Error("don't know how to turn this value into a node");
  103016. }
  103017. }
  103018. });
  103019. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  103020. var require_appendToMemberExpression4 = __commonJS({
  103021. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  103022. "use strict";
  103023. Object.defineProperty(exports, "__esModule", {
  103024. value: true
  103025. });
  103026. exports.default = appendToMemberExpression;
  103027. var _generated = require_generated17();
  103028. function appendToMemberExpression(member, append, computed = false) {
  103029. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  103030. member.property = append;
  103031. member.computed = !!computed;
  103032. return member;
  103033. }
  103034. }
  103035. });
  103036. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/inherits.js
  103037. var require_inherits4 = __commonJS({
  103038. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  103039. "use strict";
  103040. Object.defineProperty(exports, "__esModule", {
  103041. value: true
  103042. });
  103043. exports.default = inherits;
  103044. var _constants = require_constants4();
  103045. var _inheritsComments = require_inheritsComments4();
  103046. function inherits(child, parent) {
  103047. if (!child || !parent)
  103048. return child;
  103049. for (const key of _constants.INHERIT_KEYS.optional) {
  103050. if (child[key] == null) {
  103051. child[key] = parent[key];
  103052. }
  103053. }
  103054. for (const key of Object.keys(parent)) {
  103055. if (key[0] === "_" && key !== "__clone")
  103056. child[key] = parent[key];
  103057. }
  103058. for (const key of _constants.INHERIT_KEYS.force) {
  103059. child[key] = parent[key];
  103060. }
  103061. (0, _inheritsComments.default)(child, parent);
  103062. return child;
  103063. }
  103064. }
  103065. });
  103066. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  103067. var require_prependToMemberExpression4 = __commonJS({
  103068. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  103069. "use strict";
  103070. Object.defineProperty(exports, "__esModule", {
  103071. value: true
  103072. });
  103073. exports.default = prependToMemberExpression;
  103074. var _generated = require_generated17();
  103075. function prependToMemberExpression(member, prepend) {
  103076. member.object = (0, _generated.memberExpression)(prepend, member.object);
  103077. return member;
  103078. }
  103079. }
  103080. });
  103081. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  103082. var require_getOuterBindingIdentifiers4 = __commonJS({
  103083. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  103084. "use strict";
  103085. Object.defineProperty(exports, "__esModule", {
  103086. value: true
  103087. });
  103088. exports.default = void 0;
  103089. var _getBindingIdentifiers = require_getBindingIdentifiers4();
  103090. var _default = getOuterBindingIdentifiers;
  103091. exports.default = _default;
  103092. function getOuterBindingIdentifiers(node, duplicates) {
  103093. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  103094. }
  103095. }
  103096. });
  103097. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/traverse/traverse.js
  103098. var require_traverse4 = __commonJS({
  103099. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  103100. "use strict";
  103101. Object.defineProperty(exports, "__esModule", {
  103102. value: true
  103103. });
  103104. exports.default = traverse;
  103105. var _definitions = require_definitions4();
  103106. function traverse(node, handlers2, state) {
  103107. if (typeof handlers2 === "function") {
  103108. handlers2 = {
  103109. enter: handlers2
  103110. };
  103111. }
  103112. const {
  103113. enter,
  103114. exit: exit2
  103115. } = handlers2;
  103116. traverseSimpleImpl(node, enter, exit2, state, []);
  103117. }
  103118. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  103119. const keys2 = _definitions.VISITOR_KEYS[node.type];
  103120. if (!keys2)
  103121. return;
  103122. if (enter)
  103123. enter(node, ancestors, state);
  103124. for (const key of keys2) {
  103125. const subNode = node[key];
  103126. if (Array.isArray(subNode)) {
  103127. for (let i = 0; i < subNode.length; i++) {
  103128. const child = subNode[i];
  103129. if (!child)
  103130. continue;
  103131. ancestors.push({
  103132. node,
  103133. key,
  103134. index: i
  103135. });
  103136. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  103137. ancestors.pop();
  103138. }
  103139. } else if (subNode) {
  103140. ancestors.push({
  103141. node,
  103142. key
  103143. });
  103144. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  103145. ancestors.pop();
  103146. }
  103147. }
  103148. if (exit2)
  103149. exit2(node, ancestors, state);
  103150. }
  103151. }
  103152. });
  103153. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isBinding.js
  103154. var require_isBinding4 = __commonJS({
  103155. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  103156. "use strict";
  103157. Object.defineProperty(exports, "__esModule", {
  103158. value: true
  103159. });
  103160. exports.default = isBinding;
  103161. var _getBindingIdentifiers = require_getBindingIdentifiers4();
  103162. function isBinding(node, parent, grandparent) {
  103163. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  103164. return false;
  103165. }
  103166. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  103167. if (keys2) {
  103168. for (let i = 0; i < keys2.length; i++) {
  103169. const key = keys2[i];
  103170. const val = parent[key];
  103171. if (Array.isArray(val)) {
  103172. if (val.indexOf(node) >= 0)
  103173. return true;
  103174. } else {
  103175. if (val === node)
  103176. return true;
  103177. }
  103178. }
  103179. }
  103180. return false;
  103181. }
  103182. }
  103183. });
  103184. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isLet.js
  103185. var require_isLet4 = __commonJS({
  103186. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  103187. "use strict";
  103188. Object.defineProperty(exports, "__esModule", {
  103189. value: true
  103190. });
  103191. exports.default = isLet;
  103192. var _generated = require_generated16();
  103193. var _constants = require_constants4();
  103194. function isLet(node) {
  103195. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  103196. }
  103197. }
  103198. });
  103199. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isBlockScoped.js
  103200. var require_isBlockScoped4 = __commonJS({
  103201. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  103202. "use strict";
  103203. Object.defineProperty(exports, "__esModule", {
  103204. value: true
  103205. });
  103206. exports.default = isBlockScoped;
  103207. var _generated = require_generated16();
  103208. var _isLet = require_isLet4();
  103209. function isBlockScoped(node) {
  103210. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  103211. }
  103212. }
  103213. });
  103214. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isImmutable.js
  103215. var require_isImmutable4 = __commonJS({
  103216. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  103217. "use strict";
  103218. Object.defineProperty(exports, "__esModule", {
  103219. value: true
  103220. });
  103221. exports.default = isImmutable;
  103222. var _isType = require_isType4();
  103223. var _generated = require_generated16();
  103224. function isImmutable(node) {
  103225. if ((0, _isType.default)(node.type, "Immutable"))
  103226. return true;
  103227. if ((0, _generated.isIdentifier)(node)) {
  103228. if (node.name === "undefined") {
  103229. return true;
  103230. } else {
  103231. return false;
  103232. }
  103233. }
  103234. return false;
  103235. }
  103236. }
  103237. });
  103238. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  103239. var require_isNodesEquivalent4 = __commonJS({
  103240. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  103241. "use strict";
  103242. Object.defineProperty(exports, "__esModule", {
  103243. value: true
  103244. });
  103245. exports.default = isNodesEquivalent;
  103246. var _definitions = require_definitions4();
  103247. function isNodesEquivalent(a, b) {
  103248. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  103249. return a === b;
  103250. }
  103251. if (a.type !== b.type) {
  103252. return false;
  103253. }
  103254. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  103255. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  103256. for (const field of fields) {
  103257. if (typeof a[field] !== typeof b[field]) {
  103258. return false;
  103259. }
  103260. if (a[field] == null && b[field] == null) {
  103261. continue;
  103262. } else if (a[field] == null || b[field] == null) {
  103263. return false;
  103264. }
  103265. if (Array.isArray(a[field])) {
  103266. if (!Array.isArray(b[field])) {
  103267. return false;
  103268. }
  103269. if (a[field].length !== b[field].length) {
  103270. return false;
  103271. }
  103272. for (let i = 0; i < a[field].length; i++) {
  103273. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  103274. return false;
  103275. }
  103276. }
  103277. continue;
  103278. }
  103279. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  103280. for (const key of Object.keys(a[field])) {
  103281. if (a[field][key] !== b[field][key]) {
  103282. return false;
  103283. }
  103284. }
  103285. continue;
  103286. }
  103287. if (!isNodesEquivalent(a[field], b[field])) {
  103288. return false;
  103289. }
  103290. }
  103291. return true;
  103292. }
  103293. }
  103294. });
  103295. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isReferenced.js
  103296. var require_isReferenced4 = __commonJS({
  103297. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  103298. "use strict";
  103299. Object.defineProperty(exports, "__esModule", {
  103300. value: true
  103301. });
  103302. exports.default = isReferenced;
  103303. function isReferenced(node, parent, grandparent) {
  103304. switch (parent.type) {
  103305. case "MemberExpression":
  103306. case "JSXMemberExpression":
  103307. case "OptionalMemberExpression":
  103308. if (parent.property === node) {
  103309. return !!parent.computed;
  103310. }
  103311. return parent.object === node;
  103312. case "VariableDeclarator":
  103313. return parent.init === node;
  103314. case "ArrowFunctionExpression":
  103315. return parent.body === node;
  103316. case "PrivateName":
  103317. return false;
  103318. case "ClassMethod":
  103319. case "ClassPrivateMethod":
  103320. case "ObjectMethod":
  103321. if (parent.params.includes(node)) {
  103322. return false;
  103323. }
  103324. case "ObjectProperty":
  103325. case "ClassProperty":
  103326. case "ClassPrivateProperty":
  103327. if (parent.key === node) {
  103328. return !!parent.computed;
  103329. }
  103330. if (parent.value === node) {
  103331. return !grandparent || grandparent.type !== "ObjectPattern";
  103332. }
  103333. return true;
  103334. case "ClassDeclaration":
  103335. case "ClassExpression":
  103336. return parent.superClass === node;
  103337. case "AssignmentExpression":
  103338. return parent.right === node;
  103339. case "AssignmentPattern":
  103340. return parent.right === node;
  103341. case "LabeledStatement":
  103342. return false;
  103343. case "CatchClause":
  103344. return false;
  103345. case "RestElement":
  103346. return false;
  103347. case "BreakStatement":
  103348. case "ContinueStatement":
  103349. return false;
  103350. case "FunctionDeclaration":
  103351. case "FunctionExpression":
  103352. return false;
  103353. case "ExportNamespaceSpecifier":
  103354. case "ExportDefaultSpecifier":
  103355. return false;
  103356. case "ExportSpecifier":
  103357. if (grandparent != null && grandparent.source) {
  103358. return false;
  103359. }
  103360. return parent.local === node;
  103361. case "ImportDefaultSpecifier":
  103362. case "ImportNamespaceSpecifier":
  103363. case "ImportSpecifier":
  103364. return false;
  103365. case "JSXAttribute":
  103366. return false;
  103367. case "ObjectPattern":
  103368. case "ArrayPattern":
  103369. return false;
  103370. case "MetaProperty":
  103371. return false;
  103372. case "ObjectTypeProperty":
  103373. return parent.key !== node;
  103374. case "TSEnumMember":
  103375. return parent.id !== node;
  103376. case "TSPropertySignature":
  103377. if (parent.key === node) {
  103378. return !!parent.computed;
  103379. }
  103380. return true;
  103381. }
  103382. return true;
  103383. }
  103384. }
  103385. });
  103386. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isScope.js
  103387. var require_isScope4 = __commonJS({
  103388. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  103389. "use strict";
  103390. Object.defineProperty(exports, "__esModule", {
  103391. value: true
  103392. });
  103393. exports.default = isScope;
  103394. var _generated = require_generated16();
  103395. function isScope(node, parent) {
  103396. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  103397. return false;
  103398. }
  103399. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  103400. return true;
  103401. }
  103402. return (0, _generated.isScopable)(node);
  103403. }
  103404. }
  103405. });
  103406. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  103407. var require_isSpecifierDefault4 = __commonJS({
  103408. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  103409. "use strict";
  103410. Object.defineProperty(exports, "__esModule", {
  103411. value: true
  103412. });
  103413. exports.default = isSpecifierDefault;
  103414. var _generated = require_generated16();
  103415. function isSpecifierDefault(specifier) {
  103416. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  103417. name: "default"
  103418. });
  103419. }
  103420. }
  103421. });
  103422. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  103423. var require_isValidES3Identifier4 = __commonJS({
  103424. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  103425. "use strict";
  103426. Object.defineProperty(exports, "__esModule", {
  103427. value: true
  103428. });
  103429. exports.default = isValidES3Identifier;
  103430. var _isValidIdentifier = require_isValidIdentifier4();
  103431. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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"]);
  103432. function isValidES3Identifier(name2) {
  103433. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  103434. }
  103435. }
  103436. });
  103437. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isVar.js
  103438. var require_isVar4 = __commonJS({
  103439. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  103440. "use strict";
  103441. Object.defineProperty(exports, "__esModule", {
  103442. value: true
  103443. });
  103444. exports.default = isVar;
  103445. var _generated = require_generated16();
  103446. var _constants = require_constants4();
  103447. function isVar(node) {
  103448. return (0, _generated.isVariableDeclaration)(node, {
  103449. kind: "var"
  103450. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  103451. }
  103452. }
  103453. });
  103454. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/ast-types/generated/index.js
  103455. var require_generated20 = __commonJS({
  103456. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  103457. }
  103458. });
  103459. // node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/index.js
  103460. var require_lib24 = __commonJS({
  103461. "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/index.js"(exports) {
  103462. "use strict";
  103463. Object.defineProperty(exports, "__esModule", {
  103464. value: true
  103465. });
  103466. var _exportNames = {
  103467. react: true,
  103468. assertNode: true,
  103469. createTypeAnnotationBasedOnTypeof: true,
  103470. createUnionTypeAnnotation: true,
  103471. createFlowUnionType: true,
  103472. createTSUnionType: true,
  103473. cloneNode: true,
  103474. clone: true,
  103475. cloneDeep: true,
  103476. cloneDeepWithoutLoc: true,
  103477. cloneWithoutLoc: true,
  103478. addComment: true,
  103479. addComments: true,
  103480. inheritInnerComments: true,
  103481. inheritLeadingComments: true,
  103482. inheritsComments: true,
  103483. inheritTrailingComments: true,
  103484. removeComments: true,
  103485. ensureBlock: true,
  103486. toBindingIdentifierName: true,
  103487. toBlock: true,
  103488. toComputedKey: true,
  103489. toExpression: true,
  103490. toIdentifier: true,
  103491. toKeyAlias: true,
  103492. toSequenceExpression: true,
  103493. toStatement: true,
  103494. valueToNode: true,
  103495. appendToMemberExpression: true,
  103496. inherits: true,
  103497. prependToMemberExpression: true,
  103498. removeProperties: true,
  103499. removePropertiesDeep: true,
  103500. removeTypeDuplicates: true,
  103501. getBindingIdentifiers: true,
  103502. getOuterBindingIdentifiers: true,
  103503. traverse: true,
  103504. traverseFast: true,
  103505. shallowEqual: true,
  103506. is: true,
  103507. isBinding: true,
  103508. isBlockScoped: true,
  103509. isImmutable: true,
  103510. isLet: true,
  103511. isNode: true,
  103512. isNodesEquivalent: true,
  103513. isPlaceholderType: true,
  103514. isReferenced: true,
  103515. isScope: true,
  103516. isSpecifierDefault: true,
  103517. isType: true,
  103518. isValidES3Identifier: true,
  103519. isValidIdentifier: true,
  103520. isVar: true,
  103521. matchesPattern: true,
  103522. validate: true,
  103523. buildMatchMemberExpression: true
  103524. };
  103525. Object.defineProperty(exports, "assertNode", {
  103526. enumerable: true,
  103527. get: function() {
  103528. return _assertNode.default;
  103529. }
  103530. });
  103531. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  103532. enumerable: true,
  103533. get: function() {
  103534. return _createTypeAnnotationBasedOnTypeof.default;
  103535. }
  103536. });
  103537. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  103538. enumerable: true,
  103539. get: function() {
  103540. return _createFlowUnionType.default;
  103541. }
  103542. });
  103543. Object.defineProperty(exports, "createFlowUnionType", {
  103544. enumerable: true,
  103545. get: function() {
  103546. return _createFlowUnionType.default;
  103547. }
  103548. });
  103549. Object.defineProperty(exports, "createTSUnionType", {
  103550. enumerable: true,
  103551. get: function() {
  103552. return _createTSUnionType.default;
  103553. }
  103554. });
  103555. Object.defineProperty(exports, "cloneNode", {
  103556. enumerable: true,
  103557. get: function() {
  103558. return _cloneNode.default;
  103559. }
  103560. });
  103561. Object.defineProperty(exports, "clone", {
  103562. enumerable: true,
  103563. get: function() {
  103564. return _clone.default;
  103565. }
  103566. });
  103567. Object.defineProperty(exports, "cloneDeep", {
  103568. enumerable: true,
  103569. get: function() {
  103570. return _cloneDeep.default;
  103571. }
  103572. });
  103573. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  103574. enumerable: true,
  103575. get: function() {
  103576. return _cloneDeepWithoutLoc.default;
  103577. }
  103578. });
  103579. Object.defineProperty(exports, "cloneWithoutLoc", {
  103580. enumerable: true,
  103581. get: function() {
  103582. return _cloneWithoutLoc.default;
  103583. }
  103584. });
  103585. Object.defineProperty(exports, "addComment", {
  103586. enumerable: true,
  103587. get: function() {
  103588. return _addComment.default;
  103589. }
  103590. });
  103591. Object.defineProperty(exports, "addComments", {
  103592. enumerable: true,
  103593. get: function() {
  103594. return _addComments.default;
  103595. }
  103596. });
  103597. Object.defineProperty(exports, "inheritInnerComments", {
  103598. enumerable: true,
  103599. get: function() {
  103600. return _inheritInnerComments.default;
  103601. }
  103602. });
  103603. Object.defineProperty(exports, "inheritLeadingComments", {
  103604. enumerable: true,
  103605. get: function() {
  103606. return _inheritLeadingComments.default;
  103607. }
  103608. });
  103609. Object.defineProperty(exports, "inheritsComments", {
  103610. enumerable: true,
  103611. get: function() {
  103612. return _inheritsComments.default;
  103613. }
  103614. });
  103615. Object.defineProperty(exports, "inheritTrailingComments", {
  103616. enumerable: true,
  103617. get: function() {
  103618. return _inheritTrailingComments.default;
  103619. }
  103620. });
  103621. Object.defineProperty(exports, "removeComments", {
  103622. enumerable: true,
  103623. get: function() {
  103624. return _removeComments.default;
  103625. }
  103626. });
  103627. Object.defineProperty(exports, "ensureBlock", {
  103628. enumerable: true,
  103629. get: function() {
  103630. return _ensureBlock.default;
  103631. }
  103632. });
  103633. Object.defineProperty(exports, "toBindingIdentifierName", {
  103634. enumerable: true,
  103635. get: function() {
  103636. return _toBindingIdentifierName.default;
  103637. }
  103638. });
  103639. Object.defineProperty(exports, "toBlock", {
  103640. enumerable: true,
  103641. get: function() {
  103642. return _toBlock.default;
  103643. }
  103644. });
  103645. Object.defineProperty(exports, "toComputedKey", {
  103646. enumerable: true,
  103647. get: function() {
  103648. return _toComputedKey.default;
  103649. }
  103650. });
  103651. Object.defineProperty(exports, "toExpression", {
  103652. enumerable: true,
  103653. get: function() {
  103654. return _toExpression.default;
  103655. }
  103656. });
  103657. Object.defineProperty(exports, "toIdentifier", {
  103658. enumerable: true,
  103659. get: function() {
  103660. return _toIdentifier.default;
  103661. }
  103662. });
  103663. Object.defineProperty(exports, "toKeyAlias", {
  103664. enumerable: true,
  103665. get: function() {
  103666. return _toKeyAlias.default;
  103667. }
  103668. });
  103669. Object.defineProperty(exports, "toSequenceExpression", {
  103670. enumerable: true,
  103671. get: function() {
  103672. return _toSequenceExpression.default;
  103673. }
  103674. });
  103675. Object.defineProperty(exports, "toStatement", {
  103676. enumerable: true,
  103677. get: function() {
  103678. return _toStatement.default;
  103679. }
  103680. });
  103681. Object.defineProperty(exports, "valueToNode", {
  103682. enumerable: true,
  103683. get: function() {
  103684. return _valueToNode.default;
  103685. }
  103686. });
  103687. Object.defineProperty(exports, "appendToMemberExpression", {
  103688. enumerable: true,
  103689. get: function() {
  103690. return _appendToMemberExpression.default;
  103691. }
  103692. });
  103693. Object.defineProperty(exports, "inherits", {
  103694. enumerable: true,
  103695. get: function() {
  103696. return _inherits.default;
  103697. }
  103698. });
  103699. Object.defineProperty(exports, "prependToMemberExpression", {
  103700. enumerable: true,
  103701. get: function() {
  103702. return _prependToMemberExpression.default;
  103703. }
  103704. });
  103705. Object.defineProperty(exports, "removeProperties", {
  103706. enumerable: true,
  103707. get: function() {
  103708. return _removeProperties.default;
  103709. }
  103710. });
  103711. Object.defineProperty(exports, "removePropertiesDeep", {
  103712. enumerable: true,
  103713. get: function() {
  103714. return _removePropertiesDeep.default;
  103715. }
  103716. });
  103717. Object.defineProperty(exports, "removeTypeDuplicates", {
  103718. enumerable: true,
  103719. get: function() {
  103720. return _removeTypeDuplicates.default;
  103721. }
  103722. });
  103723. Object.defineProperty(exports, "getBindingIdentifiers", {
  103724. enumerable: true,
  103725. get: function() {
  103726. return _getBindingIdentifiers.default;
  103727. }
  103728. });
  103729. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  103730. enumerable: true,
  103731. get: function() {
  103732. return _getOuterBindingIdentifiers.default;
  103733. }
  103734. });
  103735. Object.defineProperty(exports, "traverse", {
  103736. enumerable: true,
  103737. get: function() {
  103738. return _traverse.default;
  103739. }
  103740. });
  103741. Object.defineProperty(exports, "traverseFast", {
  103742. enumerable: true,
  103743. get: function() {
  103744. return _traverseFast.default;
  103745. }
  103746. });
  103747. Object.defineProperty(exports, "shallowEqual", {
  103748. enumerable: true,
  103749. get: function() {
  103750. return _shallowEqual.default;
  103751. }
  103752. });
  103753. Object.defineProperty(exports, "is", {
  103754. enumerable: true,
  103755. get: function() {
  103756. return _is.default;
  103757. }
  103758. });
  103759. Object.defineProperty(exports, "isBinding", {
  103760. enumerable: true,
  103761. get: function() {
  103762. return _isBinding.default;
  103763. }
  103764. });
  103765. Object.defineProperty(exports, "isBlockScoped", {
  103766. enumerable: true,
  103767. get: function() {
  103768. return _isBlockScoped.default;
  103769. }
  103770. });
  103771. Object.defineProperty(exports, "isImmutable", {
  103772. enumerable: true,
  103773. get: function() {
  103774. return _isImmutable.default;
  103775. }
  103776. });
  103777. Object.defineProperty(exports, "isLet", {
  103778. enumerable: true,
  103779. get: function() {
  103780. return _isLet.default;
  103781. }
  103782. });
  103783. Object.defineProperty(exports, "isNode", {
  103784. enumerable: true,
  103785. get: function() {
  103786. return _isNode.default;
  103787. }
  103788. });
  103789. Object.defineProperty(exports, "isNodesEquivalent", {
  103790. enumerable: true,
  103791. get: function() {
  103792. return _isNodesEquivalent.default;
  103793. }
  103794. });
  103795. Object.defineProperty(exports, "isPlaceholderType", {
  103796. enumerable: true,
  103797. get: function() {
  103798. return _isPlaceholderType.default;
  103799. }
  103800. });
  103801. Object.defineProperty(exports, "isReferenced", {
  103802. enumerable: true,
  103803. get: function() {
  103804. return _isReferenced.default;
  103805. }
  103806. });
  103807. Object.defineProperty(exports, "isScope", {
  103808. enumerable: true,
  103809. get: function() {
  103810. return _isScope.default;
  103811. }
  103812. });
  103813. Object.defineProperty(exports, "isSpecifierDefault", {
  103814. enumerable: true,
  103815. get: function() {
  103816. return _isSpecifierDefault.default;
  103817. }
  103818. });
  103819. Object.defineProperty(exports, "isType", {
  103820. enumerable: true,
  103821. get: function() {
  103822. return _isType.default;
  103823. }
  103824. });
  103825. Object.defineProperty(exports, "isValidES3Identifier", {
  103826. enumerable: true,
  103827. get: function() {
  103828. return _isValidES3Identifier.default;
  103829. }
  103830. });
  103831. Object.defineProperty(exports, "isValidIdentifier", {
  103832. enumerable: true,
  103833. get: function() {
  103834. return _isValidIdentifier.default;
  103835. }
  103836. });
  103837. Object.defineProperty(exports, "isVar", {
  103838. enumerable: true,
  103839. get: function() {
  103840. return _isVar.default;
  103841. }
  103842. });
  103843. Object.defineProperty(exports, "matchesPattern", {
  103844. enumerable: true,
  103845. get: function() {
  103846. return _matchesPattern.default;
  103847. }
  103848. });
  103849. Object.defineProperty(exports, "validate", {
  103850. enumerable: true,
  103851. get: function() {
  103852. return _validate.default;
  103853. }
  103854. });
  103855. Object.defineProperty(exports, "buildMatchMemberExpression", {
  103856. enumerable: true,
  103857. get: function() {
  103858. return _buildMatchMemberExpression.default;
  103859. }
  103860. });
  103861. exports.react = void 0;
  103862. var _isReactComponent = require_isReactComponent4();
  103863. var _isCompatTag = require_isCompatTag4();
  103864. var _buildChildren = require_buildChildren4();
  103865. var _assertNode = require_assertNode4();
  103866. var _generated = require_generated18();
  103867. Object.keys(_generated).forEach(function(key) {
  103868. if (key === "default" || key === "__esModule")
  103869. return;
  103870. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103871. return;
  103872. if (key in exports && exports[key] === _generated[key])
  103873. return;
  103874. Object.defineProperty(exports, key, {
  103875. enumerable: true,
  103876. get: function() {
  103877. return _generated[key];
  103878. }
  103879. });
  103880. });
  103881. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof4();
  103882. var _createFlowUnionType = require_createFlowUnionType4();
  103883. var _createTSUnionType = require_createTSUnionType4();
  103884. var _generated2 = require_generated17();
  103885. Object.keys(_generated2).forEach(function(key) {
  103886. if (key === "default" || key === "__esModule")
  103887. return;
  103888. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103889. return;
  103890. if (key in exports && exports[key] === _generated2[key])
  103891. return;
  103892. Object.defineProperty(exports, key, {
  103893. enumerable: true,
  103894. get: function() {
  103895. return _generated2[key];
  103896. }
  103897. });
  103898. });
  103899. var _uppercase = require_uppercase4();
  103900. Object.keys(_uppercase).forEach(function(key) {
  103901. if (key === "default" || key === "__esModule")
  103902. return;
  103903. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103904. return;
  103905. if (key in exports && exports[key] === _uppercase[key])
  103906. return;
  103907. Object.defineProperty(exports, key, {
  103908. enumerable: true,
  103909. get: function() {
  103910. return _uppercase[key];
  103911. }
  103912. });
  103913. });
  103914. var _cloneNode = require_cloneNode4();
  103915. var _clone = require_clone4();
  103916. var _cloneDeep = require_cloneDeep4();
  103917. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc4();
  103918. var _cloneWithoutLoc = require_cloneWithoutLoc4();
  103919. var _addComment = require_addComment4();
  103920. var _addComments = require_addComments4();
  103921. var _inheritInnerComments = require_inheritInnerComments4();
  103922. var _inheritLeadingComments = require_inheritLeadingComments4();
  103923. var _inheritsComments = require_inheritsComments4();
  103924. var _inheritTrailingComments = require_inheritTrailingComments4();
  103925. var _removeComments = require_removeComments4();
  103926. var _generated3 = require_generated19();
  103927. Object.keys(_generated3).forEach(function(key) {
  103928. if (key === "default" || key === "__esModule")
  103929. return;
  103930. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103931. return;
  103932. if (key in exports && exports[key] === _generated3[key])
  103933. return;
  103934. Object.defineProperty(exports, key, {
  103935. enumerable: true,
  103936. get: function() {
  103937. return _generated3[key];
  103938. }
  103939. });
  103940. });
  103941. var _constants = require_constants4();
  103942. Object.keys(_constants).forEach(function(key) {
  103943. if (key === "default" || key === "__esModule")
  103944. return;
  103945. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103946. return;
  103947. if (key in exports && exports[key] === _constants[key])
  103948. return;
  103949. Object.defineProperty(exports, key, {
  103950. enumerable: true,
  103951. get: function() {
  103952. return _constants[key];
  103953. }
  103954. });
  103955. });
  103956. var _ensureBlock = require_ensureBlock4();
  103957. var _toBindingIdentifierName = require_toBindingIdentifierName4();
  103958. var _toBlock = require_toBlock4();
  103959. var _toComputedKey = require_toComputedKey4();
  103960. var _toExpression = require_toExpression4();
  103961. var _toIdentifier = require_toIdentifier4();
  103962. var _toKeyAlias = require_toKeyAlias4();
  103963. var _toSequenceExpression = require_toSequenceExpression4();
  103964. var _toStatement = require_toStatement4();
  103965. var _valueToNode = require_valueToNode4();
  103966. var _definitions = require_definitions4();
  103967. Object.keys(_definitions).forEach(function(key) {
  103968. if (key === "default" || key === "__esModule")
  103969. return;
  103970. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103971. return;
  103972. if (key in exports && exports[key] === _definitions[key])
  103973. return;
  103974. Object.defineProperty(exports, key, {
  103975. enumerable: true,
  103976. get: function() {
  103977. return _definitions[key];
  103978. }
  103979. });
  103980. });
  103981. var _appendToMemberExpression = require_appendToMemberExpression4();
  103982. var _inherits = require_inherits4();
  103983. var _prependToMemberExpression = require_prependToMemberExpression4();
  103984. var _removeProperties = require_removeProperties4();
  103985. var _removePropertiesDeep = require_removePropertiesDeep4();
  103986. var _removeTypeDuplicates = require_removeTypeDuplicates7();
  103987. var _getBindingIdentifiers = require_getBindingIdentifiers4();
  103988. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers4();
  103989. var _traverse = require_traverse4();
  103990. Object.keys(_traverse).forEach(function(key) {
  103991. if (key === "default" || key === "__esModule")
  103992. return;
  103993. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  103994. return;
  103995. if (key in exports && exports[key] === _traverse[key])
  103996. return;
  103997. Object.defineProperty(exports, key, {
  103998. enumerable: true,
  103999. get: function() {
  104000. return _traverse[key];
  104001. }
  104002. });
  104003. });
  104004. var _traverseFast = require_traverseFast4();
  104005. var _shallowEqual = require_shallowEqual4();
  104006. var _is = require_is4();
  104007. var _isBinding = require_isBinding4();
  104008. var _isBlockScoped = require_isBlockScoped4();
  104009. var _isImmutable = require_isImmutable4();
  104010. var _isLet = require_isLet4();
  104011. var _isNode = require_isNode4();
  104012. var _isNodesEquivalent = require_isNodesEquivalent4();
  104013. var _isPlaceholderType = require_isPlaceholderType4();
  104014. var _isReferenced = require_isReferenced4();
  104015. var _isScope = require_isScope4();
  104016. var _isSpecifierDefault = require_isSpecifierDefault4();
  104017. var _isType = require_isType4();
  104018. var _isValidES3Identifier = require_isValidES3Identifier4();
  104019. var _isValidIdentifier = require_isValidIdentifier4();
  104020. var _isVar = require_isVar4();
  104021. var _matchesPattern = require_matchesPattern4();
  104022. var _validate = require_validate4();
  104023. var _buildMatchMemberExpression = require_buildMatchMemberExpression4();
  104024. var _generated4 = require_generated16();
  104025. Object.keys(_generated4).forEach(function(key) {
  104026. if (key === "default" || key === "__esModule")
  104027. return;
  104028. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  104029. return;
  104030. if (key in exports && exports[key] === _generated4[key])
  104031. return;
  104032. Object.defineProperty(exports, key, {
  104033. enumerable: true,
  104034. get: function() {
  104035. return _generated4[key];
  104036. }
  104037. });
  104038. });
  104039. var _generated5 = require_generated20();
  104040. Object.keys(_generated5).forEach(function(key) {
  104041. if (key === "default" || key === "__esModule")
  104042. return;
  104043. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  104044. return;
  104045. if (key in exports && exports[key] === _generated5[key])
  104046. return;
  104047. Object.defineProperty(exports, key, {
  104048. enumerable: true,
  104049. get: function() {
  104050. return _generated5[key];
  104051. }
  104052. });
  104053. });
  104054. var react = {
  104055. isReactComponent: _isReactComponent.default,
  104056. isCompatTag: _isCompatTag.default,
  104057. buildChildren: _buildChildren.default
  104058. };
  104059. exports.react = react;
  104060. }
  104061. });
  104062. // node_modules/@babel/helper-hoist-variables/lib/index.js
  104063. var require_lib25 = __commonJS({
  104064. "node_modules/@babel/helper-hoist-variables/lib/index.js"(exports) {
  104065. "use strict";
  104066. Object.defineProperty(exports, "__esModule", {
  104067. value: true
  104068. });
  104069. exports.default = hoistVariables;
  104070. var t2 = require_lib24();
  104071. var visitor = {
  104072. Scope(path, state) {
  104073. if (state.kind === "let")
  104074. path.skip();
  104075. },
  104076. FunctionParent(path) {
  104077. path.skip();
  104078. },
  104079. VariableDeclaration(path, state) {
  104080. if (state.kind && path.node.kind !== state.kind)
  104081. return;
  104082. const nodes = [];
  104083. const declarations = path.get("declarations");
  104084. let firstId;
  104085. for (const declar of declarations) {
  104086. firstId = declar.node.id;
  104087. if (declar.node.init) {
  104088. nodes.push(t2.expressionStatement(t2.assignmentExpression("=", declar.node.id, declar.node.init)));
  104089. }
  104090. for (const name2 of Object.keys(declar.getBindingIdentifiers())) {
  104091. state.emit(t2.identifier(name2), name2, declar.node.init !== null);
  104092. }
  104093. }
  104094. if (path.parentPath.isFor({
  104095. left: path.node
  104096. })) {
  104097. path.replaceWith(firstId);
  104098. } else {
  104099. path.replaceWithMultiple(nodes);
  104100. }
  104101. }
  104102. };
  104103. function hoistVariables(path, emit, kind = "var") {
  104104. path.traverse(visitor, {
  104105. kind,
  104106. emit
  104107. });
  104108. }
  104109. }
  104110. });
  104111. // node_modules/@babel/traverse/lib/path/replacement.js
  104112. var require_replacement2 = __commonJS({
  104113. "node_modules/@babel/traverse/lib/path/replacement.js"(exports) {
  104114. "use strict";
  104115. Object.defineProperty(exports, "__esModule", {
  104116. value: true
  104117. });
  104118. exports.replaceWithMultiple = replaceWithMultiple;
  104119. exports.replaceWithSourceString = replaceWithSourceString;
  104120. exports.replaceWith = replaceWith;
  104121. exports._replaceWith = _replaceWith;
  104122. exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
  104123. exports.replaceInline = replaceInline;
  104124. var _codeFrame = require_lib21();
  104125. var _index = require_lib37();
  104126. var _index2 = require_path2();
  104127. var _cache = require_cache2();
  104128. var _parser = require_lib22();
  104129. var t2 = require_lib2();
  104130. var _helperHoistVariables = require_lib25();
  104131. function replaceWithMultiple(nodes) {
  104132. var _pathCache$get;
  104133. this.resync();
  104134. nodes = this._verifyNodeList(nodes);
  104135. t2.inheritLeadingComments(nodes[0], this.node);
  104136. t2.inheritTrailingComments(nodes[nodes.length - 1], this.node);
  104137. (_pathCache$get = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get.delete(this.node);
  104138. this.node = this.container[this.key] = null;
  104139. const paths = this.insertAfter(nodes);
  104140. if (this.node) {
  104141. this.requeue();
  104142. } else {
  104143. this.remove();
  104144. }
  104145. return paths;
  104146. }
  104147. function replaceWithSourceString(replacement) {
  104148. this.resync();
  104149. try {
  104150. replacement = `(${replacement})`;
  104151. replacement = (0, _parser.parse)(replacement);
  104152. } catch (err) {
  104153. const loc = err.loc;
  104154. if (loc) {
  104155. err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {
  104156. start: {
  104157. line: loc.line,
  104158. column: loc.column + 1
  104159. }
  104160. });
  104161. err.code = "BABEL_REPLACE_SOURCE_ERROR";
  104162. }
  104163. throw err;
  104164. }
  104165. replacement = replacement.program.body[0].expression;
  104166. _index.default.removeProperties(replacement);
  104167. return this.replaceWith(replacement);
  104168. }
  104169. function replaceWith(replacement) {
  104170. this.resync();
  104171. if (this.removed) {
  104172. throw new Error("You can't replace this node, we've already removed it");
  104173. }
  104174. if (replacement instanceof _index2.default) {
  104175. replacement = replacement.node;
  104176. }
  104177. if (!replacement) {
  104178. throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
  104179. }
  104180. if (this.node === replacement) {
  104181. return [this];
  104182. }
  104183. if (this.isProgram() && !t2.isProgram(replacement)) {
  104184. throw new Error("You can only replace a Program root node with another Program node");
  104185. }
  104186. if (Array.isArray(replacement)) {
  104187. throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
  104188. }
  104189. if (typeof replacement === "string") {
  104190. throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
  104191. }
  104192. let nodePath = "";
  104193. if (this.isNodeType("Statement") && t2.isExpression(replacement)) {
  104194. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
  104195. replacement = t2.expressionStatement(replacement);
  104196. nodePath = "expression";
  104197. }
  104198. }
  104199. if (this.isNodeType("Expression") && t2.isStatement(replacement)) {
  104200. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  104201. return this.replaceExpressionWithStatements([replacement]);
  104202. }
  104203. }
  104204. const oldNode = this.node;
  104205. if (oldNode) {
  104206. t2.inheritsComments(replacement, oldNode);
  104207. t2.removeComments(oldNode);
  104208. }
  104209. this._replaceWith(replacement);
  104210. this.type = replacement.type;
  104211. this.setScope();
  104212. this.requeue();
  104213. return [nodePath ? this.get(nodePath) : this];
  104214. }
  104215. function _replaceWith(node) {
  104216. var _pathCache$get2;
  104217. if (!this.container) {
  104218. throw new ReferenceError("Container is falsy");
  104219. }
  104220. if (this.inList) {
  104221. t2.validate(this.parent, this.key, [node]);
  104222. } else {
  104223. t2.validate(this.parent, this.key, node);
  104224. }
  104225. this.debug(`Replace with ${node == null ? void 0 : node.type}`);
  104226. (_pathCache$get2 = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get2.set(node, this).delete(this.node);
  104227. this.node = this.container[this.key] = node;
  104228. }
  104229. function replaceExpressionWithStatements(nodes) {
  104230. this.resync();
  104231. const toSequenceExpression = t2.toSequenceExpression(nodes, this.scope);
  104232. if (toSequenceExpression) {
  104233. return this.replaceWith(toSequenceExpression)[0].get("expressions");
  104234. }
  104235. const functionParent = this.getFunctionParent();
  104236. const isParentAsync = functionParent == null ? void 0 : functionParent.is("async");
  104237. const isParentGenerator = functionParent == null ? void 0 : functionParent.is("generator");
  104238. const container = t2.arrowFunctionExpression([], t2.blockStatement(nodes));
  104239. this.replaceWith(t2.callExpression(container, []));
  104240. const callee = this.get("callee");
  104241. (0, _helperHoistVariables.default)(callee.get("body"), (id) => {
  104242. this.scope.push({
  104243. id
  104244. });
  104245. }, "var");
  104246. const completionRecords = this.get("callee").getCompletionRecords();
  104247. for (const path of completionRecords) {
  104248. if (!path.isExpressionStatement())
  104249. continue;
  104250. const loop = path.findParent((path2) => path2.isLoop());
  104251. if (loop) {
  104252. let uid = loop.getData("expressionReplacementReturnUid");
  104253. if (!uid) {
  104254. uid = callee.scope.generateDeclaredUidIdentifier("ret");
  104255. callee.get("body").pushContainer("body", t2.returnStatement(t2.cloneNode(uid)));
  104256. loop.setData("expressionReplacementReturnUid", uid);
  104257. } else {
  104258. uid = t2.identifier(uid.name);
  104259. }
  104260. path.get("expression").replaceWith(t2.assignmentExpression("=", t2.cloneNode(uid), path.node.expression));
  104261. } else {
  104262. path.replaceWith(t2.returnStatement(path.node.expression));
  104263. }
  104264. }
  104265. callee.arrowFunctionToExpression();
  104266. const newCallee = callee;
  104267. const needToAwaitFunction = isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", t2.FUNCTION_TYPES);
  104268. const needToYieldFunction = isParentGenerator && _index.default.hasType(this.get("callee.body").node, "YieldExpression", t2.FUNCTION_TYPES);
  104269. if (needToAwaitFunction) {
  104270. newCallee.set("async", true);
  104271. if (!needToYieldFunction) {
  104272. this.replaceWith(t2.awaitExpression(this.node));
  104273. }
  104274. }
  104275. if (needToYieldFunction) {
  104276. newCallee.set("generator", true);
  104277. this.replaceWith(t2.yieldExpression(this.node, true));
  104278. }
  104279. return newCallee.get("body.body");
  104280. }
  104281. function replaceInline(nodes) {
  104282. this.resync();
  104283. if (Array.isArray(nodes)) {
  104284. if (Array.isArray(this.container)) {
  104285. nodes = this._verifyNodeList(nodes);
  104286. const paths = this._containerInsertAfter(nodes);
  104287. this.remove();
  104288. return paths;
  104289. } else {
  104290. return this.replaceWithMultiple(nodes);
  104291. }
  104292. } else {
  104293. return this.replaceWith(nodes);
  104294. }
  104295. }
  104296. }
  104297. });
  104298. // node_modules/@babel/traverse/lib/path/evaluation.js
  104299. var require_evaluation2 = __commonJS({
  104300. "node_modules/@babel/traverse/lib/path/evaluation.js"(exports) {
  104301. "use strict";
  104302. Object.defineProperty(exports, "__esModule", {
  104303. value: true
  104304. });
  104305. exports.evaluateTruthy = evaluateTruthy;
  104306. exports.evaluate = evaluate;
  104307. var VALID_CALLEES = ["String", "Number", "Math"];
  104308. var INVALID_METHODS = ["random"];
  104309. function evaluateTruthy() {
  104310. const res = this.evaluate();
  104311. if (res.confident)
  104312. return !!res.value;
  104313. }
  104314. function deopt(path, state) {
  104315. if (!state.confident)
  104316. return;
  104317. state.deoptPath = path;
  104318. state.confident = false;
  104319. }
  104320. function evaluateCached(path, state) {
  104321. const {
  104322. node
  104323. } = path;
  104324. const {
  104325. seen
  104326. } = state;
  104327. if (seen.has(node)) {
  104328. const existing = seen.get(node);
  104329. if (existing.resolved) {
  104330. return existing.value;
  104331. } else {
  104332. deopt(path, state);
  104333. return;
  104334. }
  104335. } else {
  104336. const item = {
  104337. resolved: false
  104338. };
  104339. seen.set(node, item);
  104340. const val = _evaluate(path, state);
  104341. if (state.confident) {
  104342. item.resolved = true;
  104343. item.value = val;
  104344. }
  104345. return val;
  104346. }
  104347. }
  104348. function _evaluate(path, state) {
  104349. if (!state.confident)
  104350. return;
  104351. if (path.isSequenceExpression()) {
  104352. const exprs = path.get("expressions");
  104353. return evaluateCached(exprs[exprs.length - 1], state);
  104354. }
  104355. if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
  104356. return path.node.value;
  104357. }
  104358. if (path.isNullLiteral()) {
  104359. return null;
  104360. }
  104361. if (path.isTemplateLiteral()) {
  104362. return evaluateQuasis(path, path.node.quasis, state);
  104363. }
  104364. if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
  104365. const object = path.get("tag.object");
  104366. const {
  104367. node: {
  104368. name: name2
  104369. }
  104370. } = object;
  104371. const property = path.get("tag.property");
  104372. if (object.isIdentifier() && name2 === "String" && !path.scope.getBinding(name2) && property.isIdentifier() && property.node.name === "raw") {
  104373. return evaluateQuasis(path, path.node.quasi.quasis, state, true);
  104374. }
  104375. }
  104376. if (path.isConditionalExpression()) {
  104377. const testResult = evaluateCached(path.get("test"), state);
  104378. if (!state.confident)
  104379. return;
  104380. if (testResult) {
  104381. return evaluateCached(path.get("consequent"), state);
  104382. } else {
  104383. return evaluateCached(path.get("alternate"), state);
  104384. }
  104385. }
  104386. if (path.isExpressionWrapper()) {
  104387. return evaluateCached(path.get("expression"), state);
  104388. }
  104389. if (path.isMemberExpression() && !path.parentPath.isCallExpression({
  104390. callee: path.node
  104391. })) {
  104392. const property = path.get("property");
  104393. const object = path.get("object");
  104394. if (object.isLiteral() && property.isIdentifier()) {
  104395. const value = object.node.value;
  104396. const type = typeof value;
  104397. if (type === "number" || type === "string") {
  104398. return value[property.node.name];
  104399. }
  104400. }
  104401. }
  104402. if (path.isReferencedIdentifier()) {
  104403. const binding = path.scope.getBinding(path.node.name);
  104404. if (binding && binding.constantViolations.length > 0) {
  104405. return deopt(binding.path, state);
  104406. }
  104407. if (binding && path.node.start < binding.path.node.end) {
  104408. return deopt(binding.path, state);
  104409. }
  104410. if (binding != null && binding.hasValue) {
  104411. return binding.value;
  104412. } else {
  104413. if (path.node.name === "undefined") {
  104414. return binding ? deopt(binding.path, state) : void 0;
  104415. } else if (path.node.name === "Infinity") {
  104416. return binding ? deopt(binding.path, state) : Infinity;
  104417. } else if (path.node.name === "NaN") {
  104418. return binding ? deopt(binding.path, state) : NaN;
  104419. }
  104420. const resolved = path.resolve();
  104421. if (resolved === path) {
  104422. return deopt(path, state);
  104423. } else {
  104424. return evaluateCached(resolved, state);
  104425. }
  104426. }
  104427. }
  104428. if (path.isUnaryExpression({
  104429. prefix: true
  104430. })) {
  104431. if (path.node.operator === "void") {
  104432. return void 0;
  104433. }
  104434. const argument = path.get("argument");
  104435. if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
  104436. return "function";
  104437. }
  104438. const arg = evaluateCached(argument, state);
  104439. if (!state.confident)
  104440. return;
  104441. switch (path.node.operator) {
  104442. case "!":
  104443. return !arg;
  104444. case "+":
  104445. return +arg;
  104446. case "-":
  104447. return -arg;
  104448. case "~":
  104449. return ~arg;
  104450. case "typeof":
  104451. return typeof arg;
  104452. }
  104453. }
  104454. if (path.isArrayExpression()) {
  104455. const arr = [];
  104456. const elems = path.get("elements");
  104457. for (const elem of elems) {
  104458. const elemValue = elem.evaluate();
  104459. if (elemValue.confident) {
  104460. arr.push(elemValue.value);
  104461. } else {
  104462. return deopt(elemValue.deopt, state);
  104463. }
  104464. }
  104465. return arr;
  104466. }
  104467. if (path.isObjectExpression()) {
  104468. const obj = {};
  104469. const props = path.get("properties");
  104470. for (const prop of props) {
  104471. if (prop.isObjectMethod() || prop.isSpreadElement()) {
  104472. return deopt(prop, state);
  104473. }
  104474. const keyPath = prop.get("key");
  104475. let key = keyPath;
  104476. if (prop.node.computed) {
  104477. key = key.evaluate();
  104478. if (!key.confident) {
  104479. return deopt(key.deopt, state);
  104480. }
  104481. key = key.value;
  104482. } else if (key.isIdentifier()) {
  104483. key = key.node.name;
  104484. } else {
  104485. key = key.node.value;
  104486. }
  104487. const valuePath = prop.get("value");
  104488. let value = valuePath.evaluate();
  104489. if (!value.confident) {
  104490. return deopt(value.deopt, state);
  104491. }
  104492. value = value.value;
  104493. obj[key] = value;
  104494. }
  104495. return obj;
  104496. }
  104497. if (path.isLogicalExpression()) {
  104498. const wasConfident = state.confident;
  104499. const left = evaluateCached(path.get("left"), state);
  104500. const leftConfident = state.confident;
  104501. state.confident = wasConfident;
  104502. const right = evaluateCached(path.get("right"), state);
  104503. const rightConfident = state.confident;
  104504. switch (path.node.operator) {
  104505. case "||":
  104506. state.confident = leftConfident && (!!left || rightConfident);
  104507. if (!state.confident)
  104508. return;
  104509. return left || right;
  104510. case "&&":
  104511. state.confident = leftConfident && (!left || rightConfident);
  104512. if (!state.confident)
  104513. return;
  104514. return left && right;
  104515. }
  104516. }
  104517. if (path.isBinaryExpression()) {
  104518. const left = evaluateCached(path.get("left"), state);
  104519. if (!state.confident)
  104520. return;
  104521. const right = evaluateCached(path.get("right"), state);
  104522. if (!state.confident)
  104523. return;
  104524. switch (path.node.operator) {
  104525. case "-":
  104526. return left - right;
  104527. case "+":
  104528. return left + right;
  104529. case "/":
  104530. return left / right;
  104531. case "*":
  104532. return left * right;
  104533. case "%":
  104534. return left % right;
  104535. case "**":
  104536. return Math.pow(left, right);
  104537. case "<":
  104538. return left < right;
  104539. case ">":
  104540. return left > right;
  104541. case "<=":
  104542. return left <= right;
  104543. case ">=":
  104544. return left >= right;
  104545. case "==":
  104546. return left == right;
  104547. case "!=":
  104548. return left != right;
  104549. case "===":
  104550. return left === right;
  104551. case "!==":
  104552. return left !== right;
  104553. case "|":
  104554. return left | right;
  104555. case "&":
  104556. return left & right;
  104557. case "^":
  104558. return left ^ right;
  104559. case "<<":
  104560. return left << right;
  104561. case ">>":
  104562. return left >> right;
  104563. case ">>>":
  104564. return left >>> right;
  104565. }
  104566. }
  104567. if (path.isCallExpression()) {
  104568. const callee = path.get("callee");
  104569. let context;
  104570. let func;
  104571. if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
  104572. func = global[callee.node.name];
  104573. }
  104574. if (callee.isMemberExpression()) {
  104575. const object = callee.get("object");
  104576. const property = callee.get("property");
  104577. if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) {
  104578. context = global[object.node.name];
  104579. func = context[property.node.name];
  104580. }
  104581. if (object.isLiteral() && property.isIdentifier()) {
  104582. const type = typeof object.node.value;
  104583. if (type === "string" || type === "number") {
  104584. context = object.node.value;
  104585. func = context[property.node.name];
  104586. }
  104587. }
  104588. }
  104589. if (func) {
  104590. const args = path.get("arguments").map((arg) => evaluateCached(arg, state));
  104591. if (!state.confident)
  104592. return;
  104593. return func.apply(context, args);
  104594. }
  104595. }
  104596. deopt(path, state);
  104597. }
  104598. function evaluateQuasis(path, quasis, state, raw = false) {
  104599. let str = "";
  104600. let i = 0;
  104601. const exprs = path.get("expressions");
  104602. for (const elem of quasis) {
  104603. if (!state.confident)
  104604. break;
  104605. str += raw ? elem.value.raw : elem.value.cooked;
  104606. const expr = exprs[i++];
  104607. if (expr)
  104608. str += String(evaluateCached(expr, state));
  104609. }
  104610. if (!state.confident)
  104611. return;
  104612. return str;
  104613. }
  104614. function evaluate() {
  104615. const state = {
  104616. confident: true,
  104617. deoptPath: null,
  104618. seen: /* @__PURE__ */ new Map()
  104619. };
  104620. let value = evaluateCached(this, state);
  104621. if (!state.confident)
  104622. value = void 0;
  104623. return {
  104624. confident: state.confident,
  104625. deopt: state.deoptPath,
  104626. value
  104627. };
  104628. }
  104629. }
  104630. });
  104631. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/shallowEqual.js
  104632. var require_shallowEqual5 = __commonJS({
  104633. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  104634. "use strict";
  104635. Object.defineProperty(exports, "__esModule", {
  104636. value: true
  104637. });
  104638. exports.default = shallowEqual;
  104639. function shallowEqual(actual, expected) {
  104640. const keys2 = Object.keys(expected);
  104641. for (const key of keys2) {
  104642. if (actual[key] !== expected[key]) {
  104643. return false;
  104644. }
  104645. }
  104646. return true;
  104647. }
  104648. }
  104649. });
  104650. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/generated/index.js
  104651. var require_generated21 = __commonJS({
  104652. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  104653. "use strict";
  104654. Object.defineProperty(exports, "__esModule", {
  104655. value: true
  104656. });
  104657. exports.isArrayExpression = isArrayExpression;
  104658. exports.isAssignmentExpression = isAssignmentExpression;
  104659. exports.isBinaryExpression = isBinaryExpression;
  104660. exports.isInterpreterDirective = isInterpreterDirective;
  104661. exports.isDirective = isDirective;
  104662. exports.isDirectiveLiteral = isDirectiveLiteral;
  104663. exports.isBlockStatement = isBlockStatement;
  104664. exports.isBreakStatement = isBreakStatement;
  104665. exports.isCallExpression = isCallExpression;
  104666. exports.isCatchClause = isCatchClause;
  104667. exports.isConditionalExpression = isConditionalExpression;
  104668. exports.isContinueStatement = isContinueStatement;
  104669. exports.isDebuggerStatement = isDebuggerStatement;
  104670. exports.isDoWhileStatement = isDoWhileStatement;
  104671. exports.isEmptyStatement = isEmptyStatement;
  104672. exports.isExpressionStatement = isExpressionStatement2;
  104673. exports.isFile = isFile;
  104674. exports.isForInStatement = isForInStatement;
  104675. exports.isForStatement = isForStatement;
  104676. exports.isFunctionDeclaration = isFunctionDeclaration;
  104677. exports.isFunctionExpression = isFunctionExpression;
  104678. exports.isIdentifier = isIdentifier2;
  104679. exports.isIfStatement = isIfStatement;
  104680. exports.isLabeledStatement = isLabeledStatement;
  104681. exports.isStringLiteral = isStringLiteral2;
  104682. exports.isNumericLiteral = isNumericLiteral;
  104683. exports.isNullLiteral = isNullLiteral;
  104684. exports.isBooleanLiteral = isBooleanLiteral2;
  104685. exports.isRegExpLiteral = isRegExpLiteral;
  104686. exports.isLogicalExpression = isLogicalExpression;
  104687. exports.isMemberExpression = isMemberExpression;
  104688. exports.isNewExpression = isNewExpression;
  104689. exports.isProgram = isProgram;
  104690. exports.isObjectExpression = isObjectExpression;
  104691. exports.isObjectMethod = isObjectMethod;
  104692. exports.isObjectProperty = isObjectProperty;
  104693. exports.isRestElement = isRestElement;
  104694. exports.isReturnStatement = isReturnStatement;
  104695. exports.isSequenceExpression = isSequenceExpression;
  104696. exports.isParenthesizedExpression = isParenthesizedExpression;
  104697. exports.isSwitchCase = isSwitchCase;
  104698. exports.isSwitchStatement = isSwitchStatement;
  104699. exports.isThisExpression = isThisExpression;
  104700. exports.isThrowStatement = isThrowStatement;
  104701. exports.isTryStatement = isTryStatement;
  104702. exports.isUnaryExpression = isUnaryExpression;
  104703. exports.isUpdateExpression = isUpdateExpression;
  104704. exports.isVariableDeclaration = isVariableDeclaration;
  104705. exports.isVariableDeclarator = isVariableDeclarator;
  104706. exports.isWhileStatement = isWhileStatement;
  104707. exports.isWithStatement = isWithStatement;
  104708. exports.isAssignmentPattern = isAssignmentPattern;
  104709. exports.isArrayPattern = isArrayPattern;
  104710. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  104711. exports.isClassBody = isClassBody;
  104712. exports.isClassExpression = isClassExpression;
  104713. exports.isClassDeclaration = isClassDeclaration;
  104714. exports.isExportAllDeclaration = isExportAllDeclaration;
  104715. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  104716. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  104717. exports.isExportSpecifier = isExportSpecifier;
  104718. exports.isForOfStatement = isForOfStatement;
  104719. exports.isImportDeclaration = isImportDeclaration;
  104720. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  104721. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  104722. exports.isImportSpecifier = isImportSpecifier;
  104723. exports.isMetaProperty = isMetaProperty;
  104724. exports.isClassMethod = isClassMethod;
  104725. exports.isObjectPattern = isObjectPattern;
  104726. exports.isSpreadElement = isSpreadElement;
  104727. exports.isSuper = isSuper;
  104728. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  104729. exports.isTemplateElement = isTemplateElement;
  104730. exports.isTemplateLiteral = isTemplateLiteral;
  104731. exports.isYieldExpression = isYieldExpression;
  104732. exports.isAwaitExpression = isAwaitExpression;
  104733. exports.isImport = isImport;
  104734. exports.isBigIntLiteral = isBigIntLiteral;
  104735. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  104736. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  104737. exports.isOptionalCallExpression = isOptionalCallExpression;
  104738. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  104739. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  104740. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  104741. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  104742. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  104743. exports.isClassImplements = isClassImplements;
  104744. exports.isDeclareClass = isDeclareClass;
  104745. exports.isDeclareFunction = isDeclareFunction;
  104746. exports.isDeclareInterface = isDeclareInterface;
  104747. exports.isDeclareModule = isDeclareModule;
  104748. exports.isDeclareModuleExports = isDeclareModuleExports;
  104749. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  104750. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  104751. exports.isDeclareVariable = isDeclareVariable;
  104752. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  104753. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  104754. exports.isDeclaredPredicate = isDeclaredPredicate;
  104755. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  104756. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  104757. exports.isFunctionTypeParam = isFunctionTypeParam;
  104758. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  104759. exports.isInferredPredicate = isInferredPredicate;
  104760. exports.isInterfaceExtends = isInterfaceExtends;
  104761. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  104762. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  104763. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  104764. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  104765. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  104766. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  104767. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  104768. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  104769. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  104770. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  104771. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  104772. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  104773. exports.isObjectTypeProperty = isObjectTypeProperty;
  104774. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  104775. exports.isOpaqueType = isOpaqueType;
  104776. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  104777. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  104778. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  104779. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  104780. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  104781. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  104782. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  104783. exports.isTypeAlias = isTypeAlias;
  104784. exports.isTypeAnnotation = isTypeAnnotation;
  104785. exports.isTypeCastExpression = isTypeCastExpression;
  104786. exports.isTypeParameter = isTypeParameter;
  104787. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  104788. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  104789. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  104790. exports.isVariance = isVariance;
  104791. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  104792. exports.isEnumDeclaration = isEnumDeclaration;
  104793. exports.isEnumBooleanBody = isEnumBooleanBody;
  104794. exports.isEnumNumberBody = isEnumNumberBody;
  104795. exports.isEnumStringBody = isEnumStringBody;
  104796. exports.isEnumSymbolBody = isEnumSymbolBody;
  104797. exports.isEnumBooleanMember = isEnumBooleanMember;
  104798. exports.isEnumNumberMember = isEnumNumberMember;
  104799. exports.isEnumStringMember = isEnumStringMember;
  104800. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  104801. exports.isIndexedAccessType = isIndexedAccessType;
  104802. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  104803. exports.isJSXAttribute = isJSXAttribute;
  104804. exports.isJSXClosingElement = isJSXClosingElement;
  104805. exports.isJSXElement = isJSXElement2;
  104806. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  104807. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  104808. exports.isJSXSpreadChild = isJSXSpreadChild;
  104809. exports.isJSXIdentifier = isJSXIdentifier2;
  104810. exports.isJSXMemberExpression = isJSXMemberExpression;
  104811. exports.isJSXNamespacedName = isJSXNamespacedName;
  104812. exports.isJSXOpeningElement = isJSXOpeningElement;
  104813. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  104814. exports.isJSXText = isJSXText;
  104815. exports.isJSXFragment = isJSXFragment2;
  104816. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  104817. exports.isJSXClosingFragment = isJSXClosingFragment;
  104818. exports.isNoop = isNoop;
  104819. exports.isPlaceholder = isPlaceholder;
  104820. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  104821. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  104822. exports.isBindExpression = isBindExpression;
  104823. exports.isClassProperty = isClassProperty;
  104824. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  104825. exports.isPipelineBareFunction = isPipelineBareFunction;
  104826. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  104827. exports.isClassPrivateProperty = isClassPrivateProperty;
  104828. exports.isClassPrivateMethod = isClassPrivateMethod;
  104829. exports.isImportAttribute = isImportAttribute;
  104830. exports.isDecorator = isDecorator;
  104831. exports.isDoExpression = isDoExpression;
  104832. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  104833. exports.isPrivateName = isPrivateName;
  104834. exports.isRecordExpression = isRecordExpression;
  104835. exports.isTupleExpression = isTupleExpression;
  104836. exports.isDecimalLiteral = isDecimalLiteral;
  104837. exports.isStaticBlock = isStaticBlock;
  104838. exports.isModuleExpression = isModuleExpression;
  104839. exports.isTSParameterProperty = isTSParameterProperty;
  104840. exports.isTSDeclareFunction = isTSDeclareFunction;
  104841. exports.isTSDeclareMethod = isTSDeclareMethod;
  104842. exports.isTSQualifiedName = isTSQualifiedName;
  104843. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  104844. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  104845. exports.isTSPropertySignature = isTSPropertySignature;
  104846. exports.isTSMethodSignature = isTSMethodSignature;
  104847. exports.isTSIndexSignature = isTSIndexSignature;
  104848. exports.isTSAnyKeyword = isTSAnyKeyword;
  104849. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  104850. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  104851. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  104852. exports.isTSNeverKeyword = isTSNeverKeyword;
  104853. exports.isTSNullKeyword = isTSNullKeyword;
  104854. exports.isTSNumberKeyword = isTSNumberKeyword;
  104855. exports.isTSObjectKeyword = isTSObjectKeyword;
  104856. exports.isTSStringKeyword = isTSStringKeyword;
  104857. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  104858. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  104859. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  104860. exports.isTSVoidKeyword = isTSVoidKeyword;
  104861. exports.isTSThisType = isTSThisType;
  104862. exports.isTSFunctionType = isTSFunctionType;
  104863. exports.isTSConstructorType = isTSConstructorType;
  104864. exports.isTSTypeReference = isTSTypeReference;
  104865. exports.isTSTypePredicate = isTSTypePredicate;
  104866. exports.isTSTypeQuery = isTSTypeQuery;
  104867. exports.isTSTypeLiteral = isTSTypeLiteral;
  104868. exports.isTSArrayType = isTSArrayType;
  104869. exports.isTSTupleType = isTSTupleType;
  104870. exports.isTSOptionalType = isTSOptionalType;
  104871. exports.isTSRestType = isTSRestType;
  104872. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  104873. exports.isTSUnionType = isTSUnionType;
  104874. exports.isTSIntersectionType = isTSIntersectionType;
  104875. exports.isTSConditionalType = isTSConditionalType;
  104876. exports.isTSInferType = isTSInferType;
  104877. exports.isTSParenthesizedType = isTSParenthesizedType;
  104878. exports.isTSTypeOperator = isTSTypeOperator;
  104879. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  104880. exports.isTSMappedType = isTSMappedType;
  104881. exports.isTSLiteralType = isTSLiteralType;
  104882. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  104883. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  104884. exports.isTSInterfaceBody = isTSInterfaceBody;
  104885. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  104886. exports.isTSAsExpression = isTSAsExpression;
  104887. exports.isTSTypeAssertion = isTSTypeAssertion;
  104888. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  104889. exports.isTSEnumMember = isTSEnumMember;
  104890. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  104891. exports.isTSModuleBlock = isTSModuleBlock;
  104892. exports.isTSImportType = isTSImportType;
  104893. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  104894. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  104895. exports.isTSNonNullExpression = isTSNonNullExpression;
  104896. exports.isTSExportAssignment = isTSExportAssignment;
  104897. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  104898. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  104899. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  104900. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  104901. exports.isTSTypeParameter = isTSTypeParameter;
  104902. exports.isExpression = isExpression;
  104903. exports.isBinary = isBinary;
  104904. exports.isScopable = isScopable;
  104905. exports.isBlockParent = isBlockParent;
  104906. exports.isBlock = isBlock;
  104907. exports.isStatement = isStatement;
  104908. exports.isTerminatorless = isTerminatorless;
  104909. exports.isCompletionStatement = isCompletionStatement;
  104910. exports.isConditional = isConditional;
  104911. exports.isLoop = isLoop;
  104912. exports.isWhile = isWhile;
  104913. exports.isExpressionWrapper = isExpressionWrapper;
  104914. exports.isFor = isFor;
  104915. exports.isForXStatement = isForXStatement;
  104916. exports.isFunction = isFunction;
  104917. exports.isFunctionParent = isFunctionParent;
  104918. exports.isPureish = isPureish;
  104919. exports.isDeclaration = isDeclaration2;
  104920. exports.isPatternLike = isPatternLike;
  104921. exports.isLVal = isLVal;
  104922. exports.isTSEntityName = isTSEntityName;
  104923. exports.isLiteral = isLiteral;
  104924. exports.isImmutable = isImmutable;
  104925. exports.isUserWhitespacable = isUserWhitespacable;
  104926. exports.isMethod = isMethod;
  104927. exports.isObjectMember = isObjectMember;
  104928. exports.isProperty = isProperty;
  104929. exports.isUnaryLike = isUnaryLike;
  104930. exports.isPattern = isPattern;
  104931. exports.isClass = isClass;
  104932. exports.isModuleDeclaration = isModuleDeclaration;
  104933. exports.isExportDeclaration = isExportDeclaration;
  104934. exports.isModuleSpecifier = isModuleSpecifier;
  104935. exports.isFlow = isFlow;
  104936. exports.isFlowType = isFlowType;
  104937. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  104938. exports.isFlowDeclaration = isFlowDeclaration;
  104939. exports.isFlowPredicate = isFlowPredicate;
  104940. exports.isEnumBody = isEnumBody;
  104941. exports.isEnumMember = isEnumMember;
  104942. exports.isJSX = isJSX;
  104943. exports.isPrivate = isPrivate;
  104944. exports.isTSTypeElement = isTSTypeElement;
  104945. exports.isTSType = isTSType;
  104946. exports.isTSBaseType = isTSBaseType;
  104947. exports.isNumberLiteral = isNumberLiteral;
  104948. exports.isRegexLiteral = isRegexLiteral;
  104949. exports.isRestProperty = isRestProperty;
  104950. exports.isSpreadProperty = isSpreadProperty;
  104951. var _shallowEqual = require_shallowEqual5();
  104952. function isArrayExpression(node, opts) {
  104953. if (!node)
  104954. return false;
  104955. const nodeType = node.type;
  104956. if (nodeType === "ArrayExpression") {
  104957. if (typeof opts === "undefined") {
  104958. return true;
  104959. } else {
  104960. return (0, _shallowEqual.default)(node, opts);
  104961. }
  104962. }
  104963. return false;
  104964. }
  104965. function isAssignmentExpression(node, opts) {
  104966. if (!node)
  104967. return false;
  104968. const nodeType = node.type;
  104969. if (nodeType === "AssignmentExpression") {
  104970. if (typeof opts === "undefined") {
  104971. return true;
  104972. } else {
  104973. return (0, _shallowEqual.default)(node, opts);
  104974. }
  104975. }
  104976. return false;
  104977. }
  104978. function isBinaryExpression(node, opts) {
  104979. if (!node)
  104980. return false;
  104981. const nodeType = node.type;
  104982. if (nodeType === "BinaryExpression") {
  104983. if (typeof opts === "undefined") {
  104984. return true;
  104985. } else {
  104986. return (0, _shallowEqual.default)(node, opts);
  104987. }
  104988. }
  104989. return false;
  104990. }
  104991. function isInterpreterDirective(node, opts) {
  104992. if (!node)
  104993. return false;
  104994. const nodeType = node.type;
  104995. if (nodeType === "InterpreterDirective") {
  104996. if (typeof opts === "undefined") {
  104997. return true;
  104998. } else {
  104999. return (0, _shallowEqual.default)(node, opts);
  105000. }
  105001. }
  105002. return false;
  105003. }
  105004. function isDirective(node, opts) {
  105005. if (!node)
  105006. return false;
  105007. const nodeType = node.type;
  105008. if (nodeType === "Directive") {
  105009. if (typeof opts === "undefined") {
  105010. return true;
  105011. } else {
  105012. return (0, _shallowEqual.default)(node, opts);
  105013. }
  105014. }
  105015. return false;
  105016. }
  105017. function isDirectiveLiteral(node, opts) {
  105018. if (!node)
  105019. return false;
  105020. const nodeType = node.type;
  105021. if (nodeType === "DirectiveLiteral") {
  105022. if (typeof opts === "undefined") {
  105023. return true;
  105024. } else {
  105025. return (0, _shallowEqual.default)(node, opts);
  105026. }
  105027. }
  105028. return false;
  105029. }
  105030. function isBlockStatement(node, opts) {
  105031. if (!node)
  105032. return false;
  105033. const nodeType = node.type;
  105034. if (nodeType === "BlockStatement") {
  105035. if (typeof opts === "undefined") {
  105036. return true;
  105037. } else {
  105038. return (0, _shallowEqual.default)(node, opts);
  105039. }
  105040. }
  105041. return false;
  105042. }
  105043. function isBreakStatement(node, opts) {
  105044. if (!node)
  105045. return false;
  105046. const nodeType = node.type;
  105047. if (nodeType === "BreakStatement") {
  105048. if (typeof opts === "undefined") {
  105049. return true;
  105050. } else {
  105051. return (0, _shallowEqual.default)(node, opts);
  105052. }
  105053. }
  105054. return false;
  105055. }
  105056. function isCallExpression(node, opts) {
  105057. if (!node)
  105058. return false;
  105059. const nodeType = node.type;
  105060. if (nodeType === "CallExpression") {
  105061. if (typeof opts === "undefined") {
  105062. return true;
  105063. } else {
  105064. return (0, _shallowEqual.default)(node, opts);
  105065. }
  105066. }
  105067. return false;
  105068. }
  105069. function isCatchClause(node, opts) {
  105070. if (!node)
  105071. return false;
  105072. const nodeType = node.type;
  105073. if (nodeType === "CatchClause") {
  105074. if (typeof opts === "undefined") {
  105075. return true;
  105076. } else {
  105077. return (0, _shallowEqual.default)(node, opts);
  105078. }
  105079. }
  105080. return false;
  105081. }
  105082. function isConditionalExpression(node, opts) {
  105083. if (!node)
  105084. return false;
  105085. const nodeType = node.type;
  105086. if (nodeType === "ConditionalExpression") {
  105087. if (typeof opts === "undefined") {
  105088. return true;
  105089. } else {
  105090. return (0, _shallowEqual.default)(node, opts);
  105091. }
  105092. }
  105093. return false;
  105094. }
  105095. function isContinueStatement(node, opts) {
  105096. if (!node)
  105097. return false;
  105098. const nodeType = node.type;
  105099. if (nodeType === "ContinueStatement") {
  105100. if (typeof opts === "undefined") {
  105101. return true;
  105102. } else {
  105103. return (0, _shallowEqual.default)(node, opts);
  105104. }
  105105. }
  105106. return false;
  105107. }
  105108. function isDebuggerStatement(node, opts) {
  105109. if (!node)
  105110. return false;
  105111. const nodeType = node.type;
  105112. if (nodeType === "DebuggerStatement") {
  105113. if (typeof opts === "undefined") {
  105114. return true;
  105115. } else {
  105116. return (0, _shallowEqual.default)(node, opts);
  105117. }
  105118. }
  105119. return false;
  105120. }
  105121. function isDoWhileStatement(node, opts) {
  105122. if (!node)
  105123. return false;
  105124. const nodeType = node.type;
  105125. if (nodeType === "DoWhileStatement") {
  105126. if (typeof opts === "undefined") {
  105127. return true;
  105128. } else {
  105129. return (0, _shallowEqual.default)(node, opts);
  105130. }
  105131. }
  105132. return false;
  105133. }
  105134. function isEmptyStatement(node, opts) {
  105135. if (!node)
  105136. return false;
  105137. const nodeType = node.type;
  105138. if (nodeType === "EmptyStatement") {
  105139. if (typeof opts === "undefined") {
  105140. return true;
  105141. } else {
  105142. return (0, _shallowEqual.default)(node, opts);
  105143. }
  105144. }
  105145. return false;
  105146. }
  105147. function isExpressionStatement2(node, opts) {
  105148. if (!node)
  105149. return false;
  105150. const nodeType = node.type;
  105151. if (nodeType === "ExpressionStatement") {
  105152. if (typeof opts === "undefined") {
  105153. return true;
  105154. } else {
  105155. return (0, _shallowEqual.default)(node, opts);
  105156. }
  105157. }
  105158. return false;
  105159. }
  105160. function isFile(node, opts) {
  105161. if (!node)
  105162. return false;
  105163. const nodeType = node.type;
  105164. if (nodeType === "File") {
  105165. if (typeof opts === "undefined") {
  105166. return true;
  105167. } else {
  105168. return (0, _shallowEqual.default)(node, opts);
  105169. }
  105170. }
  105171. return false;
  105172. }
  105173. function isForInStatement(node, opts) {
  105174. if (!node)
  105175. return false;
  105176. const nodeType = node.type;
  105177. if (nodeType === "ForInStatement") {
  105178. if (typeof opts === "undefined") {
  105179. return true;
  105180. } else {
  105181. return (0, _shallowEqual.default)(node, opts);
  105182. }
  105183. }
  105184. return false;
  105185. }
  105186. function isForStatement(node, opts) {
  105187. if (!node)
  105188. return false;
  105189. const nodeType = node.type;
  105190. if (nodeType === "ForStatement") {
  105191. if (typeof opts === "undefined") {
  105192. return true;
  105193. } else {
  105194. return (0, _shallowEqual.default)(node, opts);
  105195. }
  105196. }
  105197. return false;
  105198. }
  105199. function isFunctionDeclaration(node, opts) {
  105200. if (!node)
  105201. return false;
  105202. const nodeType = node.type;
  105203. if (nodeType === "FunctionDeclaration") {
  105204. if (typeof opts === "undefined") {
  105205. return true;
  105206. } else {
  105207. return (0, _shallowEqual.default)(node, opts);
  105208. }
  105209. }
  105210. return false;
  105211. }
  105212. function isFunctionExpression(node, opts) {
  105213. if (!node)
  105214. return false;
  105215. const nodeType = node.type;
  105216. if (nodeType === "FunctionExpression") {
  105217. if (typeof opts === "undefined") {
  105218. return true;
  105219. } else {
  105220. return (0, _shallowEqual.default)(node, opts);
  105221. }
  105222. }
  105223. return false;
  105224. }
  105225. function isIdentifier2(node, opts) {
  105226. if (!node)
  105227. return false;
  105228. const nodeType = node.type;
  105229. if (nodeType === "Identifier") {
  105230. if (typeof opts === "undefined") {
  105231. return true;
  105232. } else {
  105233. return (0, _shallowEqual.default)(node, opts);
  105234. }
  105235. }
  105236. return false;
  105237. }
  105238. function isIfStatement(node, opts) {
  105239. if (!node)
  105240. return false;
  105241. const nodeType = node.type;
  105242. if (nodeType === "IfStatement") {
  105243. if (typeof opts === "undefined") {
  105244. return true;
  105245. } else {
  105246. return (0, _shallowEqual.default)(node, opts);
  105247. }
  105248. }
  105249. return false;
  105250. }
  105251. function isLabeledStatement(node, opts) {
  105252. if (!node)
  105253. return false;
  105254. const nodeType = node.type;
  105255. if (nodeType === "LabeledStatement") {
  105256. if (typeof opts === "undefined") {
  105257. return true;
  105258. } else {
  105259. return (0, _shallowEqual.default)(node, opts);
  105260. }
  105261. }
  105262. return false;
  105263. }
  105264. function isStringLiteral2(node, opts) {
  105265. if (!node)
  105266. return false;
  105267. const nodeType = node.type;
  105268. if (nodeType === "StringLiteral") {
  105269. if (typeof opts === "undefined") {
  105270. return true;
  105271. } else {
  105272. return (0, _shallowEqual.default)(node, opts);
  105273. }
  105274. }
  105275. return false;
  105276. }
  105277. function isNumericLiteral(node, opts) {
  105278. if (!node)
  105279. return false;
  105280. const nodeType = node.type;
  105281. if (nodeType === "NumericLiteral") {
  105282. if (typeof opts === "undefined") {
  105283. return true;
  105284. } else {
  105285. return (0, _shallowEqual.default)(node, opts);
  105286. }
  105287. }
  105288. return false;
  105289. }
  105290. function isNullLiteral(node, opts) {
  105291. if (!node)
  105292. return false;
  105293. const nodeType = node.type;
  105294. if (nodeType === "NullLiteral") {
  105295. if (typeof opts === "undefined") {
  105296. return true;
  105297. } else {
  105298. return (0, _shallowEqual.default)(node, opts);
  105299. }
  105300. }
  105301. return false;
  105302. }
  105303. function isBooleanLiteral2(node, opts) {
  105304. if (!node)
  105305. return false;
  105306. const nodeType = node.type;
  105307. if (nodeType === "BooleanLiteral") {
  105308. if (typeof opts === "undefined") {
  105309. return true;
  105310. } else {
  105311. return (0, _shallowEqual.default)(node, opts);
  105312. }
  105313. }
  105314. return false;
  105315. }
  105316. function isRegExpLiteral(node, opts) {
  105317. if (!node)
  105318. return false;
  105319. const nodeType = node.type;
  105320. if (nodeType === "RegExpLiteral") {
  105321. if (typeof opts === "undefined") {
  105322. return true;
  105323. } else {
  105324. return (0, _shallowEqual.default)(node, opts);
  105325. }
  105326. }
  105327. return false;
  105328. }
  105329. function isLogicalExpression(node, opts) {
  105330. if (!node)
  105331. return false;
  105332. const nodeType = node.type;
  105333. if (nodeType === "LogicalExpression") {
  105334. if (typeof opts === "undefined") {
  105335. return true;
  105336. } else {
  105337. return (0, _shallowEqual.default)(node, opts);
  105338. }
  105339. }
  105340. return false;
  105341. }
  105342. function isMemberExpression(node, opts) {
  105343. if (!node)
  105344. return false;
  105345. const nodeType = node.type;
  105346. if (nodeType === "MemberExpression") {
  105347. if (typeof opts === "undefined") {
  105348. return true;
  105349. } else {
  105350. return (0, _shallowEqual.default)(node, opts);
  105351. }
  105352. }
  105353. return false;
  105354. }
  105355. function isNewExpression(node, opts) {
  105356. if (!node)
  105357. return false;
  105358. const nodeType = node.type;
  105359. if (nodeType === "NewExpression") {
  105360. if (typeof opts === "undefined") {
  105361. return true;
  105362. } else {
  105363. return (0, _shallowEqual.default)(node, opts);
  105364. }
  105365. }
  105366. return false;
  105367. }
  105368. function isProgram(node, opts) {
  105369. if (!node)
  105370. return false;
  105371. const nodeType = node.type;
  105372. if (nodeType === "Program") {
  105373. if (typeof opts === "undefined") {
  105374. return true;
  105375. } else {
  105376. return (0, _shallowEqual.default)(node, opts);
  105377. }
  105378. }
  105379. return false;
  105380. }
  105381. function isObjectExpression(node, opts) {
  105382. if (!node)
  105383. return false;
  105384. const nodeType = node.type;
  105385. if (nodeType === "ObjectExpression") {
  105386. if (typeof opts === "undefined") {
  105387. return true;
  105388. } else {
  105389. return (0, _shallowEqual.default)(node, opts);
  105390. }
  105391. }
  105392. return false;
  105393. }
  105394. function isObjectMethod(node, opts) {
  105395. if (!node)
  105396. return false;
  105397. const nodeType = node.type;
  105398. if (nodeType === "ObjectMethod") {
  105399. if (typeof opts === "undefined") {
  105400. return true;
  105401. } else {
  105402. return (0, _shallowEqual.default)(node, opts);
  105403. }
  105404. }
  105405. return false;
  105406. }
  105407. function isObjectProperty(node, opts) {
  105408. if (!node)
  105409. return false;
  105410. const nodeType = node.type;
  105411. if (nodeType === "ObjectProperty") {
  105412. if (typeof opts === "undefined") {
  105413. return true;
  105414. } else {
  105415. return (0, _shallowEqual.default)(node, opts);
  105416. }
  105417. }
  105418. return false;
  105419. }
  105420. function isRestElement(node, opts) {
  105421. if (!node)
  105422. return false;
  105423. const nodeType = node.type;
  105424. if (nodeType === "RestElement") {
  105425. if (typeof opts === "undefined") {
  105426. return true;
  105427. } else {
  105428. return (0, _shallowEqual.default)(node, opts);
  105429. }
  105430. }
  105431. return false;
  105432. }
  105433. function isReturnStatement(node, opts) {
  105434. if (!node)
  105435. return false;
  105436. const nodeType = node.type;
  105437. if (nodeType === "ReturnStatement") {
  105438. if (typeof opts === "undefined") {
  105439. return true;
  105440. } else {
  105441. return (0, _shallowEqual.default)(node, opts);
  105442. }
  105443. }
  105444. return false;
  105445. }
  105446. function isSequenceExpression(node, opts) {
  105447. if (!node)
  105448. return false;
  105449. const nodeType = node.type;
  105450. if (nodeType === "SequenceExpression") {
  105451. if (typeof opts === "undefined") {
  105452. return true;
  105453. } else {
  105454. return (0, _shallowEqual.default)(node, opts);
  105455. }
  105456. }
  105457. return false;
  105458. }
  105459. function isParenthesizedExpression(node, opts) {
  105460. if (!node)
  105461. return false;
  105462. const nodeType = node.type;
  105463. if (nodeType === "ParenthesizedExpression") {
  105464. if (typeof opts === "undefined") {
  105465. return true;
  105466. } else {
  105467. return (0, _shallowEqual.default)(node, opts);
  105468. }
  105469. }
  105470. return false;
  105471. }
  105472. function isSwitchCase(node, opts) {
  105473. if (!node)
  105474. return false;
  105475. const nodeType = node.type;
  105476. if (nodeType === "SwitchCase") {
  105477. if (typeof opts === "undefined") {
  105478. return true;
  105479. } else {
  105480. return (0, _shallowEqual.default)(node, opts);
  105481. }
  105482. }
  105483. return false;
  105484. }
  105485. function isSwitchStatement(node, opts) {
  105486. if (!node)
  105487. return false;
  105488. const nodeType = node.type;
  105489. if (nodeType === "SwitchStatement") {
  105490. if (typeof opts === "undefined") {
  105491. return true;
  105492. } else {
  105493. return (0, _shallowEqual.default)(node, opts);
  105494. }
  105495. }
  105496. return false;
  105497. }
  105498. function isThisExpression(node, opts) {
  105499. if (!node)
  105500. return false;
  105501. const nodeType = node.type;
  105502. if (nodeType === "ThisExpression") {
  105503. if (typeof opts === "undefined") {
  105504. return true;
  105505. } else {
  105506. return (0, _shallowEqual.default)(node, opts);
  105507. }
  105508. }
  105509. return false;
  105510. }
  105511. function isThrowStatement(node, opts) {
  105512. if (!node)
  105513. return false;
  105514. const nodeType = node.type;
  105515. if (nodeType === "ThrowStatement") {
  105516. if (typeof opts === "undefined") {
  105517. return true;
  105518. } else {
  105519. return (0, _shallowEqual.default)(node, opts);
  105520. }
  105521. }
  105522. return false;
  105523. }
  105524. function isTryStatement(node, opts) {
  105525. if (!node)
  105526. return false;
  105527. const nodeType = node.type;
  105528. if (nodeType === "TryStatement") {
  105529. if (typeof opts === "undefined") {
  105530. return true;
  105531. } else {
  105532. return (0, _shallowEqual.default)(node, opts);
  105533. }
  105534. }
  105535. return false;
  105536. }
  105537. function isUnaryExpression(node, opts) {
  105538. if (!node)
  105539. return false;
  105540. const nodeType = node.type;
  105541. if (nodeType === "UnaryExpression") {
  105542. if (typeof opts === "undefined") {
  105543. return true;
  105544. } else {
  105545. return (0, _shallowEqual.default)(node, opts);
  105546. }
  105547. }
  105548. return false;
  105549. }
  105550. function isUpdateExpression(node, opts) {
  105551. if (!node)
  105552. return false;
  105553. const nodeType = node.type;
  105554. if (nodeType === "UpdateExpression") {
  105555. if (typeof opts === "undefined") {
  105556. return true;
  105557. } else {
  105558. return (0, _shallowEqual.default)(node, opts);
  105559. }
  105560. }
  105561. return false;
  105562. }
  105563. function isVariableDeclaration(node, opts) {
  105564. if (!node)
  105565. return false;
  105566. const nodeType = node.type;
  105567. if (nodeType === "VariableDeclaration") {
  105568. if (typeof opts === "undefined") {
  105569. return true;
  105570. } else {
  105571. return (0, _shallowEqual.default)(node, opts);
  105572. }
  105573. }
  105574. return false;
  105575. }
  105576. function isVariableDeclarator(node, opts) {
  105577. if (!node)
  105578. return false;
  105579. const nodeType = node.type;
  105580. if (nodeType === "VariableDeclarator") {
  105581. if (typeof opts === "undefined") {
  105582. return true;
  105583. } else {
  105584. return (0, _shallowEqual.default)(node, opts);
  105585. }
  105586. }
  105587. return false;
  105588. }
  105589. function isWhileStatement(node, opts) {
  105590. if (!node)
  105591. return false;
  105592. const nodeType = node.type;
  105593. if (nodeType === "WhileStatement") {
  105594. if (typeof opts === "undefined") {
  105595. return true;
  105596. } else {
  105597. return (0, _shallowEqual.default)(node, opts);
  105598. }
  105599. }
  105600. return false;
  105601. }
  105602. function isWithStatement(node, opts) {
  105603. if (!node)
  105604. return false;
  105605. const nodeType = node.type;
  105606. if (nodeType === "WithStatement") {
  105607. if (typeof opts === "undefined") {
  105608. return true;
  105609. } else {
  105610. return (0, _shallowEqual.default)(node, opts);
  105611. }
  105612. }
  105613. return false;
  105614. }
  105615. function isAssignmentPattern(node, opts) {
  105616. if (!node)
  105617. return false;
  105618. const nodeType = node.type;
  105619. if (nodeType === "AssignmentPattern") {
  105620. if (typeof opts === "undefined") {
  105621. return true;
  105622. } else {
  105623. return (0, _shallowEqual.default)(node, opts);
  105624. }
  105625. }
  105626. return false;
  105627. }
  105628. function isArrayPattern(node, opts) {
  105629. if (!node)
  105630. return false;
  105631. const nodeType = node.type;
  105632. if (nodeType === "ArrayPattern") {
  105633. if (typeof opts === "undefined") {
  105634. return true;
  105635. } else {
  105636. return (0, _shallowEqual.default)(node, opts);
  105637. }
  105638. }
  105639. return false;
  105640. }
  105641. function isArrowFunctionExpression(node, opts) {
  105642. if (!node)
  105643. return false;
  105644. const nodeType = node.type;
  105645. if (nodeType === "ArrowFunctionExpression") {
  105646. if (typeof opts === "undefined") {
  105647. return true;
  105648. } else {
  105649. return (0, _shallowEqual.default)(node, opts);
  105650. }
  105651. }
  105652. return false;
  105653. }
  105654. function isClassBody(node, opts) {
  105655. if (!node)
  105656. return false;
  105657. const nodeType = node.type;
  105658. if (nodeType === "ClassBody") {
  105659. if (typeof opts === "undefined") {
  105660. return true;
  105661. } else {
  105662. return (0, _shallowEqual.default)(node, opts);
  105663. }
  105664. }
  105665. return false;
  105666. }
  105667. function isClassExpression(node, opts) {
  105668. if (!node)
  105669. return false;
  105670. const nodeType = node.type;
  105671. if (nodeType === "ClassExpression") {
  105672. if (typeof opts === "undefined") {
  105673. return true;
  105674. } else {
  105675. return (0, _shallowEqual.default)(node, opts);
  105676. }
  105677. }
  105678. return false;
  105679. }
  105680. function isClassDeclaration(node, opts) {
  105681. if (!node)
  105682. return false;
  105683. const nodeType = node.type;
  105684. if (nodeType === "ClassDeclaration") {
  105685. if (typeof opts === "undefined") {
  105686. return true;
  105687. } else {
  105688. return (0, _shallowEqual.default)(node, opts);
  105689. }
  105690. }
  105691. return false;
  105692. }
  105693. function isExportAllDeclaration(node, opts) {
  105694. if (!node)
  105695. return false;
  105696. const nodeType = node.type;
  105697. if (nodeType === "ExportAllDeclaration") {
  105698. if (typeof opts === "undefined") {
  105699. return true;
  105700. } else {
  105701. return (0, _shallowEqual.default)(node, opts);
  105702. }
  105703. }
  105704. return false;
  105705. }
  105706. function isExportDefaultDeclaration(node, opts) {
  105707. if (!node)
  105708. return false;
  105709. const nodeType = node.type;
  105710. if (nodeType === "ExportDefaultDeclaration") {
  105711. if (typeof opts === "undefined") {
  105712. return true;
  105713. } else {
  105714. return (0, _shallowEqual.default)(node, opts);
  105715. }
  105716. }
  105717. return false;
  105718. }
  105719. function isExportNamedDeclaration(node, opts) {
  105720. if (!node)
  105721. return false;
  105722. const nodeType = node.type;
  105723. if (nodeType === "ExportNamedDeclaration") {
  105724. if (typeof opts === "undefined") {
  105725. return true;
  105726. } else {
  105727. return (0, _shallowEqual.default)(node, opts);
  105728. }
  105729. }
  105730. return false;
  105731. }
  105732. function isExportSpecifier(node, opts) {
  105733. if (!node)
  105734. return false;
  105735. const nodeType = node.type;
  105736. if (nodeType === "ExportSpecifier") {
  105737. if (typeof opts === "undefined") {
  105738. return true;
  105739. } else {
  105740. return (0, _shallowEqual.default)(node, opts);
  105741. }
  105742. }
  105743. return false;
  105744. }
  105745. function isForOfStatement(node, opts) {
  105746. if (!node)
  105747. return false;
  105748. const nodeType = node.type;
  105749. if (nodeType === "ForOfStatement") {
  105750. if (typeof opts === "undefined") {
  105751. return true;
  105752. } else {
  105753. return (0, _shallowEqual.default)(node, opts);
  105754. }
  105755. }
  105756. return false;
  105757. }
  105758. function isImportDeclaration(node, opts) {
  105759. if (!node)
  105760. return false;
  105761. const nodeType = node.type;
  105762. if (nodeType === "ImportDeclaration") {
  105763. if (typeof opts === "undefined") {
  105764. return true;
  105765. } else {
  105766. return (0, _shallowEqual.default)(node, opts);
  105767. }
  105768. }
  105769. return false;
  105770. }
  105771. function isImportDefaultSpecifier(node, opts) {
  105772. if (!node)
  105773. return false;
  105774. const nodeType = node.type;
  105775. if (nodeType === "ImportDefaultSpecifier") {
  105776. if (typeof opts === "undefined") {
  105777. return true;
  105778. } else {
  105779. return (0, _shallowEqual.default)(node, opts);
  105780. }
  105781. }
  105782. return false;
  105783. }
  105784. function isImportNamespaceSpecifier(node, opts) {
  105785. if (!node)
  105786. return false;
  105787. const nodeType = node.type;
  105788. if (nodeType === "ImportNamespaceSpecifier") {
  105789. if (typeof opts === "undefined") {
  105790. return true;
  105791. } else {
  105792. return (0, _shallowEqual.default)(node, opts);
  105793. }
  105794. }
  105795. return false;
  105796. }
  105797. function isImportSpecifier(node, opts) {
  105798. if (!node)
  105799. return false;
  105800. const nodeType = node.type;
  105801. if (nodeType === "ImportSpecifier") {
  105802. if (typeof opts === "undefined") {
  105803. return true;
  105804. } else {
  105805. return (0, _shallowEqual.default)(node, opts);
  105806. }
  105807. }
  105808. return false;
  105809. }
  105810. function isMetaProperty(node, opts) {
  105811. if (!node)
  105812. return false;
  105813. const nodeType = node.type;
  105814. if (nodeType === "MetaProperty") {
  105815. if (typeof opts === "undefined") {
  105816. return true;
  105817. } else {
  105818. return (0, _shallowEqual.default)(node, opts);
  105819. }
  105820. }
  105821. return false;
  105822. }
  105823. function isClassMethod(node, opts) {
  105824. if (!node)
  105825. return false;
  105826. const nodeType = node.type;
  105827. if (nodeType === "ClassMethod") {
  105828. if (typeof opts === "undefined") {
  105829. return true;
  105830. } else {
  105831. return (0, _shallowEqual.default)(node, opts);
  105832. }
  105833. }
  105834. return false;
  105835. }
  105836. function isObjectPattern(node, opts) {
  105837. if (!node)
  105838. return false;
  105839. const nodeType = node.type;
  105840. if (nodeType === "ObjectPattern") {
  105841. if (typeof opts === "undefined") {
  105842. return true;
  105843. } else {
  105844. return (0, _shallowEqual.default)(node, opts);
  105845. }
  105846. }
  105847. return false;
  105848. }
  105849. function isSpreadElement(node, opts) {
  105850. if (!node)
  105851. return false;
  105852. const nodeType = node.type;
  105853. if (nodeType === "SpreadElement") {
  105854. if (typeof opts === "undefined") {
  105855. return true;
  105856. } else {
  105857. return (0, _shallowEqual.default)(node, opts);
  105858. }
  105859. }
  105860. return false;
  105861. }
  105862. function isSuper(node, opts) {
  105863. if (!node)
  105864. return false;
  105865. const nodeType = node.type;
  105866. if (nodeType === "Super") {
  105867. if (typeof opts === "undefined") {
  105868. return true;
  105869. } else {
  105870. return (0, _shallowEqual.default)(node, opts);
  105871. }
  105872. }
  105873. return false;
  105874. }
  105875. function isTaggedTemplateExpression(node, opts) {
  105876. if (!node)
  105877. return false;
  105878. const nodeType = node.type;
  105879. if (nodeType === "TaggedTemplateExpression") {
  105880. if (typeof opts === "undefined") {
  105881. return true;
  105882. } else {
  105883. return (0, _shallowEqual.default)(node, opts);
  105884. }
  105885. }
  105886. return false;
  105887. }
  105888. function isTemplateElement(node, opts) {
  105889. if (!node)
  105890. return false;
  105891. const nodeType = node.type;
  105892. if (nodeType === "TemplateElement") {
  105893. if (typeof opts === "undefined") {
  105894. return true;
  105895. } else {
  105896. return (0, _shallowEqual.default)(node, opts);
  105897. }
  105898. }
  105899. return false;
  105900. }
  105901. function isTemplateLiteral(node, opts) {
  105902. if (!node)
  105903. return false;
  105904. const nodeType = node.type;
  105905. if (nodeType === "TemplateLiteral") {
  105906. if (typeof opts === "undefined") {
  105907. return true;
  105908. } else {
  105909. return (0, _shallowEqual.default)(node, opts);
  105910. }
  105911. }
  105912. return false;
  105913. }
  105914. function isYieldExpression(node, opts) {
  105915. if (!node)
  105916. return false;
  105917. const nodeType = node.type;
  105918. if (nodeType === "YieldExpression") {
  105919. if (typeof opts === "undefined") {
  105920. return true;
  105921. } else {
  105922. return (0, _shallowEqual.default)(node, opts);
  105923. }
  105924. }
  105925. return false;
  105926. }
  105927. function isAwaitExpression(node, opts) {
  105928. if (!node)
  105929. return false;
  105930. const nodeType = node.type;
  105931. if (nodeType === "AwaitExpression") {
  105932. if (typeof opts === "undefined") {
  105933. return true;
  105934. } else {
  105935. return (0, _shallowEqual.default)(node, opts);
  105936. }
  105937. }
  105938. return false;
  105939. }
  105940. function isImport(node, opts) {
  105941. if (!node)
  105942. return false;
  105943. const nodeType = node.type;
  105944. if (nodeType === "Import") {
  105945. if (typeof opts === "undefined") {
  105946. return true;
  105947. } else {
  105948. return (0, _shallowEqual.default)(node, opts);
  105949. }
  105950. }
  105951. return false;
  105952. }
  105953. function isBigIntLiteral(node, opts) {
  105954. if (!node)
  105955. return false;
  105956. const nodeType = node.type;
  105957. if (nodeType === "BigIntLiteral") {
  105958. if (typeof opts === "undefined") {
  105959. return true;
  105960. } else {
  105961. return (0, _shallowEqual.default)(node, opts);
  105962. }
  105963. }
  105964. return false;
  105965. }
  105966. function isExportNamespaceSpecifier(node, opts) {
  105967. if (!node)
  105968. return false;
  105969. const nodeType = node.type;
  105970. if (nodeType === "ExportNamespaceSpecifier") {
  105971. if (typeof opts === "undefined") {
  105972. return true;
  105973. } else {
  105974. return (0, _shallowEqual.default)(node, opts);
  105975. }
  105976. }
  105977. return false;
  105978. }
  105979. function isOptionalMemberExpression(node, opts) {
  105980. if (!node)
  105981. return false;
  105982. const nodeType = node.type;
  105983. if (nodeType === "OptionalMemberExpression") {
  105984. if (typeof opts === "undefined") {
  105985. return true;
  105986. } else {
  105987. return (0, _shallowEqual.default)(node, opts);
  105988. }
  105989. }
  105990. return false;
  105991. }
  105992. function isOptionalCallExpression(node, opts) {
  105993. if (!node)
  105994. return false;
  105995. const nodeType = node.type;
  105996. if (nodeType === "OptionalCallExpression") {
  105997. if (typeof opts === "undefined") {
  105998. return true;
  105999. } else {
  106000. return (0, _shallowEqual.default)(node, opts);
  106001. }
  106002. }
  106003. return false;
  106004. }
  106005. function isAnyTypeAnnotation(node, opts) {
  106006. if (!node)
  106007. return false;
  106008. const nodeType = node.type;
  106009. if (nodeType === "AnyTypeAnnotation") {
  106010. if (typeof opts === "undefined") {
  106011. return true;
  106012. } else {
  106013. return (0, _shallowEqual.default)(node, opts);
  106014. }
  106015. }
  106016. return false;
  106017. }
  106018. function isArrayTypeAnnotation(node, opts) {
  106019. if (!node)
  106020. return false;
  106021. const nodeType = node.type;
  106022. if (nodeType === "ArrayTypeAnnotation") {
  106023. if (typeof opts === "undefined") {
  106024. return true;
  106025. } else {
  106026. return (0, _shallowEqual.default)(node, opts);
  106027. }
  106028. }
  106029. return false;
  106030. }
  106031. function isBooleanTypeAnnotation(node, opts) {
  106032. if (!node)
  106033. return false;
  106034. const nodeType = node.type;
  106035. if (nodeType === "BooleanTypeAnnotation") {
  106036. if (typeof opts === "undefined") {
  106037. return true;
  106038. } else {
  106039. return (0, _shallowEqual.default)(node, opts);
  106040. }
  106041. }
  106042. return false;
  106043. }
  106044. function isBooleanLiteralTypeAnnotation(node, opts) {
  106045. if (!node)
  106046. return false;
  106047. const nodeType = node.type;
  106048. if (nodeType === "BooleanLiteralTypeAnnotation") {
  106049. if (typeof opts === "undefined") {
  106050. return true;
  106051. } else {
  106052. return (0, _shallowEqual.default)(node, opts);
  106053. }
  106054. }
  106055. return false;
  106056. }
  106057. function isNullLiteralTypeAnnotation(node, opts) {
  106058. if (!node)
  106059. return false;
  106060. const nodeType = node.type;
  106061. if (nodeType === "NullLiteralTypeAnnotation") {
  106062. if (typeof opts === "undefined") {
  106063. return true;
  106064. } else {
  106065. return (0, _shallowEqual.default)(node, opts);
  106066. }
  106067. }
  106068. return false;
  106069. }
  106070. function isClassImplements(node, opts) {
  106071. if (!node)
  106072. return false;
  106073. const nodeType = node.type;
  106074. if (nodeType === "ClassImplements") {
  106075. if (typeof opts === "undefined") {
  106076. return true;
  106077. } else {
  106078. return (0, _shallowEqual.default)(node, opts);
  106079. }
  106080. }
  106081. return false;
  106082. }
  106083. function isDeclareClass(node, opts) {
  106084. if (!node)
  106085. return false;
  106086. const nodeType = node.type;
  106087. if (nodeType === "DeclareClass") {
  106088. if (typeof opts === "undefined") {
  106089. return true;
  106090. } else {
  106091. return (0, _shallowEqual.default)(node, opts);
  106092. }
  106093. }
  106094. return false;
  106095. }
  106096. function isDeclareFunction(node, opts) {
  106097. if (!node)
  106098. return false;
  106099. const nodeType = node.type;
  106100. if (nodeType === "DeclareFunction") {
  106101. if (typeof opts === "undefined") {
  106102. return true;
  106103. } else {
  106104. return (0, _shallowEqual.default)(node, opts);
  106105. }
  106106. }
  106107. return false;
  106108. }
  106109. function isDeclareInterface(node, opts) {
  106110. if (!node)
  106111. return false;
  106112. const nodeType = node.type;
  106113. if (nodeType === "DeclareInterface") {
  106114. if (typeof opts === "undefined") {
  106115. return true;
  106116. } else {
  106117. return (0, _shallowEqual.default)(node, opts);
  106118. }
  106119. }
  106120. return false;
  106121. }
  106122. function isDeclareModule(node, opts) {
  106123. if (!node)
  106124. return false;
  106125. const nodeType = node.type;
  106126. if (nodeType === "DeclareModule") {
  106127. if (typeof opts === "undefined") {
  106128. return true;
  106129. } else {
  106130. return (0, _shallowEqual.default)(node, opts);
  106131. }
  106132. }
  106133. return false;
  106134. }
  106135. function isDeclareModuleExports(node, opts) {
  106136. if (!node)
  106137. return false;
  106138. const nodeType = node.type;
  106139. if (nodeType === "DeclareModuleExports") {
  106140. if (typeof opts === "undefined") {
  106141. return true;
  106142. } else {
  106143. return (0, _shallowEqual.default)(node, opts);
  106144. }
  106145. }
  106146. return false;
  106147. }
  106148. function isDeclareTypeAlias(node, opts) {
  106149. if (!node)
  106150. return false;
  106151. const nodeType = node.type;
  106152. if (nodeType === "DeclareTypeAlias") {
  106153. if (typeof opts === "undefined") {
  106154. return true;
  106155. } else {
  106156. return (0, _shallowEqual.default)(node, opts);
  106157. }
  106158. }
  106159. return false;
  106160. }
  106161. function isDeclareOpaqueType(node, opts) {
  106162. if (!node)
  106163. return false;
  106164. const nodeType = node.type;
  106165. if (nodeType === "DeclareOpaqueType") {
  106166. if (typeof opts === "undefined") {
  106167. return true;
  106168. } else {
  106169. return (0, _shallowEqual.default)(node, opts);
  106170. }
  106171. }
  106172. return false;
  106173. }
  106174. function isDeclareVariable(node, opts) {
  106175. if (!node)
  106176. return false;
  106177. const nodeType = node.type;
  106178. if (nodeType === "DeclareVariable") {
  106179. if (typeof opts === "undefined") {
  106180. return true;
  106181. } else {
  106182. return (0, _shallowEqual.default)(node, opts);
  106183. }
  106184. }
  106185. return false;
  106186. }
  106187. function isDeclareExportDeclaration(node, opts) {
  106188. if (!node)
  106189. return false;
  106190. const nodeType = node.type;
  106191. if (nodeType === "DeclareExportDeclaration") {
  106192. if (typeof opts === "undefined") {
  106193. return true;
  106194. } else {
  106195. return (0, _shallowEqual.default)(node, opts);
  106196. }
  106197. }
  106198. return false;
  106199. }
  106200. function isDeclareExportAllDeclaration(node, opts) {
  106201. if (!node)
  106202. return false;
  106203. const nodeType = node.type;
  106204. if (nodeType === "DeclareExportAllDeclaration") {
  106205. if (typeof opts === "undefined") {
  106206. return true;
  106207. } else {
  106208. return (0, _shallowEqual.default)(node, opts);
  106209. }
  106210. }
  106211. return false;
  106212. }
  106213. function isDeclaredPredicate(node, opts) {
  106214. if (!node)
  106215. return false;
  106216. const nodeType = node.type;
  106217. if (nodeType === "DeclaredPredicate") {
  106218. if (typeof opts === "undefined") {
  106219. return true;
  106220. } else {
  106221. return (0, _shallowEqual.default)(node, opts);
  106222. }
  106223. }
  106224. return false;
  106225. }
  106226. function isExistsTypeAnnotation(node, opts) {
  106227. if (!node)
  106228. return false;
  106229. const nodeType = node.type;
  106230. if (nodeType === "ExistsTypeAnnotation") {
  106231. if (typeof opts === "undefined") {
  106232. return true;
  106233. } else {
  106234. return (0, _shallowEqual.default)(node, opts);
  106235. }
  106236. }
  106237. return false;
  106238. }
  106239. function isFunctionTypeAnnotation(node, opts) {
  106240. if (!node)
  106241. return false;
  106242. const nodeType = node.type;
  106243. if (nodeType === "FunctionTypeAnnotation") {
  106244. if (typeof opts === "undefined") {
  106245. return true;
  106246. } else {
  106247. return (0, _shallowEqual.default)(node, opts);
  106248. }
  106249. }
  106250. return false;
  106251. }
  106252. function isFunctionTypeParam(node, opts) {
  106253. if (!node)
  106254. return false;
  106255. const nodeType = node.type;
  106256. if (nodeType === "FunctionTypeParam") {
  106257. if (typeof opts === "undefined") {
  106258. return true;
  106259. } else {
  106260. return (0, _shallowEqual.default)(node, opts);
  106261. }
  106262. }
  106263. return false;
  106264. }
  106265. function isGenericTypeAnnotation(node, opts) {
  106266. if (!node)
  106267. return false;
  106268. const nodeType = node.type;
  106269. if (nodeType === "GenericTypeAnnotation") {
  106270. if (typeof opts === "undefined") {
  106271. return true;
  106272. } else {
  106273. return (0, _shallowEqual.default)(node, opts);
  106274. }
  106275. }
  106276. return false;
  106277. }
  106278. function isInferredPredicate(node, opts) {
  106279. if (!node)
  106280. return false;
  106281. const nodeType = node.type;
  106282. if (nodeType === "InferredPredicate") {
  106283. if (typeof opts === "undefined") {
  106284. return true;
  106285. } else {
  106286. return (0, _shallowEqual.default)(node, opts);
  106287. }
  106288. }
  106289. return false;
  106290. }
  106291. function isInterfaceExtends(node, opts) {
  106292. if (!node)
  106293. return false;
  106294. const nodeType = node.type;
  106295. if (nodeType === "InterfaceExtends") {
  106296. if (typeof opts === "undefined") {
  106297. return true;
  106298. } else {
  106299. return (0, _shallowEqual.default)(node, opts);
  106300. }
  106301. }
  106302. return false;
  106303. }
  106304. function isInterfaceDeclaration(node, opts) {
  106305. if (!node)
  106306. return false;
  106307. const nodeType = node.type;
  106308. if (nodeType === "InterfaceDeclaration") {
  106309. if (typeof opts === "undefined") {
  106310. return true;
  106311. } else {
  106312. return (0, _shallowEqual.default)(node, opts);
  106313. }
  106314. }
  106315. return false;
  106316. }
  106317. function isInterfaceTypeAnnotation(node, opts) {
  106318. if (!node)
  106319. return false;
  106320. const nodeType = node.type;
  106321. if (nodeType === "InterfaceTypeAnnotation") {
  106322. if (typeof opts === "undefined") {
  106323. return true;
  106324. } else {
  106325. return (0, _shallowEqual.default)(node, opts);
  106326. }
  106327. }
  106328. return false;
  106329. }
  106330. function isIntersectionTypeAnnotation(node, opts) {
  106331. if (!node)
  106332. return false;
  106333. const nodeType = node.type;
  106334. if (nodeType === "IntersectionTypeAnnotation") {
  106335. if (typeof opts === "undefined") {
  106336. return true;
  106337. } else {
  106338. return (0, _shallowEqual.default)(node, opts);
  106339. }
  106340. }
  106341. return false;
  106342. }
  106343. function isMixedTypeAnnotation(node, opts) {
  106344. if (!node)
  106345. return false;
  106346. const nodeType = node.type;
  106347. if (nodeType === "MixedTypeAnnotation") {
  106348. if (typeof opts === "undefined") {
  106349. return true;
  106350. } else {
  106351. return (0, _shallowEqual.default)(node, opts);
  106352. }
  106353. }
  106354. return false;
  106355. }
  106356. function isEmptyTypeAnnotation(node, opts) {
  106357. if (!node)
  106358. return false;
  106359. const nodeType = node.type;
  106360. if (nodeType === "EmptyTypeAnnotation") {
  106361. if (typeof opts === "undefined") {
  106362. return true;
  106363. } else {
  106364. return (0, _shallowEqual.default)(node, opts);
  106365. }
  106366. }
  106367. return false;
  106368. }
  106369. function isNullableTypeAnnotation(node, opts) {
  106370. if (!node)
  106371. return false;
  106372. const nodeType = node.type;
  106373. if (nodeType === "NullableTypeAnnotation") {
  106374. if (typeof opts === "undefined") {
  106375. return true;
  106376. } else {
  106377. return (0, _shallowEqual.default)(node, opts);
  106378. }
  106379. }
  106380. return false;
  106381. }
  106382. function isNumberLiteralTypeAnnotation(node, opts) {
  106383. if (!node)
  106384. return false;
  106385. const nodeType = node.type;
  106386. if (nodeType === "NumberLiteralTypeAnnotation") {
  106387. if (typeof opts === "undefined") {
  106388. return true;
  106389. } else {
  106390. return (0, _shallowEqual.default)(node, opts);
  106391. }
  106392. }
  106393. return false;
  106394. }
  106395. function isNumberTypeAnnotation(node, opts) {
  106396. if (!node)
  106397. return false;
  106398. const nodeType = node.type;
  106399. if (nodeType === "NumberTypeAnnotation") {
  106400. if (typeof opts === "undefined") {
  106401. return true;
  106402. } else {
  106403. return (0, _shallowEqual.default)(node, opts);
  106404. }
  106405. }
  106406. return false;
  106407. }
  106408. function isObjectTypeAnnotation(node, opts) {
  106409. if (!node)
  106410. return false;
  106411. const nodeType = node.type;
  106412. if (nodeType === "ObjectTypeAnnotation") {
  106413. if (typeof opts === "undefined") {
  106414. return true;
  106415. } else {
  106416. return (0, _shallowEqual.default)(node, opts);
  106417. }
  106418. }
  106419. return false;
  106420. }
  106421. function isObjectTypeInternalSlot(node, opts) {
  106422. if (!node)
  106423. return false;
  106424. const nodeType = node.type;
  106425. if (nodeType === "ObjectTypeInternalSlot") {
  106426. if (typeof opts === "undefined") {
  106427. return true;
  106428. } else {
  106429. return (0, _shallowEqual.default)(node, opts);
  106430. }
  106431. }
  106432. return false;
  106433. }
  106434. function isObjectTypeCallProperty(node, opts) {
  106435. if (!node)
  106436. return false;
  106437. const nodeType = node.type;
  106438. if (nodeType === "ObjectTypeCallProperty") {
  106439. if (typeof opts === "undefined") {
  106440. return true;
  106441. } else {
  106442. return (0, _shallowEqual.default)(node, opts);
  106443. }
  106444. }
  106445. return false;
  106446. }
  106447. function isObjectTypeIndexer(node, opts) {
  106448. if (!node)
  106449. return false;
  106450. const nodeType = node.type;
  106451. if (nodeType === "ObjectTypeIndexer") {
  106452. if (typeof opts === "undefined") {
  106453. return true;
  106454. } else {
  106455. return (0, _shallowEqual.default)(node, opts);
  106456. }
  106457. }
  106458. return false;
  106459. }
  106460. function isObjectTypeProperty(node, opts) {
  106461. if (!node)
  106462. return false;
  106463. const nodeType = node.type;
  106464. if (nodeType === "ObjectTypeProperty") {
  106465. if (typeof opts === "undefined") {
  106466. return true;
  106467. } else {
  106468. return (0, _shallowEqual.default)(node, opts);
  106469. }
  106470. }
  106471. return false;
  106472. }
  106473. function isObjectTypeSpreadProperty(node, opts) {
  106474. if (!node)
  106475. return false;
  106476. const nodeType = node.type;
  106477. if (nodeType === "ObjectTypeSpreadProperty") {
  106478. if (typeof opts === "undefined") {
  106479. return true;
  106480. } else {
  106481. return (0, _shallowEqual.default)(node, opts);
  106482. }
  106483. }
  106484. return false;
  106485. }
  106486. function isOpaqueType(node, opts) {
  106487. if (!node)
  106488. return false;
  106489. const nodeType = node.type;
  106490. if (nodeType === "OpaqueType") {
  106491. if (typeof opts === "undefined") {
  106492. return true;
  106493. } else {
  106494. return (0, _shallowEqual.default)(node, opts);
  106495. }
  106496. }
  106497. return false;
  106498. }
  106499. function isQualifiedTypeIdentifier(node, opts) {
  106500. if (!node)
  106501. return false;
  106502. const nodeType = node.type;
  106503. if (nodeType === "QualifiedTypeIdentifier") {
  106504. if (typeof opts === "undefined") {
  106505. return true;
  106506. } else {
  106507. return (0, _shallowEqual.default)(node, opts);
  106508. }
  106509. }
  106510. return false;
  106511. }
  106512. function isStringLiteralTypeAnnotation(node, opts) {
  106513. if (!node)
  106514. return false;
  106515. const nodeType = node.type;
  106516. if (nodeType === "StringLiteralTypeAnnotation") {
  106517. if (typeof opts === "undefined") {
  106518. return true;
  106519. } else {
  106520. return (0, _shallowEqual.default)(node, opts);
  106521. }
  106522. }
  106523. return false;
  106524. }
  106525. function isStringTypeAnnotation(node, opts) {
  106526. if (!node)
  106527. return false;
  106528. const nodeType = node.type;
  106529. if (nodeType === "StringTypeAnnotation") {
  106530. if (typeof opts === "undefined") {
  106531. return true;
  106532. } else {
  106533. return (0, _shallowEqual.default)(node, opts);
  106534. }
  106535. }
  106536. return false;
  106537. }
  106538. function isSymbolTypeAnnotation(node, opts) {
  106539. if (!node)
  106540. return false;
  106541. const nodeType = node.type;
  106542. if (nodeType === "SymbolTypeAnnotation") {
  106543. if (typeof opts === "undefined") {
  106544. return true;
  106545. } else {
  106546. return (0, _shallowEqual.default)(node, opts);
  106547. }
  106548. }
  106549. return false;
  106550. }
  106551. function isThisTypeAnnotation(node, opts) {
  106552. if (!node)
  106553. return false;
  106554. const nodeType = node.type;
  106555. if (nodeType === "ThisTypeAnnotation") {
  106556. if (typeof opts === "undefined") {
  106557. return true;
  106558. } else {
  106559. return (0, _shallowEqual.default)(node, opts);
  106560. }
  106561. }
  106562. return false;
  106563. }
  106564. function isTupleTypeAnnotation(node, opts) {
  106565. if (!node)
  106566. return false;
  106567. const nodeType = node.type;
  106568. if (nodeType === "TupleTypeAnnotation") {
  106569. if (typeof opts === "undefined") {
  106570. return true;
  106571. } else {
  106572. return (0, _shallowEqual.default)(node, opts);
  106573. }
  106574. }
  106575. return false;
  106576. }
  106577. function isTypeofTypeAnnotation(node, opts) {
  106578. if (!node)
  106579. return false;
  106580. const nodeType = node.type;
  106581. if (nodeType === "TypeofTypeAnnotation") {
  106582. if (typeof opts === "undefined") {
  106583. return true;
  106584. } else {
  106585. return (0, _shallowEqual.default)(node, opts);
  106586. }
  106587. }
  106588. return false;
  106589. }
  106590. function isTypeAlias(node, opts) {
  106591. if (!node)
  106592. return false;
  106593. const nodeType = node.type;
  106594. if (nodeType === "TypeAlias") {
  106595. if (typeof opts === "undefined") {
  106596. return true;
  106597. } else {
  106598. return (0, _shallowEqual.default)(node, opts);
  106599. }
  106600. }
  106601. return false;
  106602. }
  106603. function isTypeAnnotation(node, opts) {
  106604. if (!node)
  106605. return false;
  106606. const nodeType = node.type;
  106607. if (nodeType === "TypeAnnotation") {
  106608. if (typeof opts === "undefined") {
  106609. return true;
  106610. } else {
  106611. return (0, _shallowEqual.default)(node, opts);
  106612. }
  106613. }
  106614. return false;
  106615. }
  106616. function isTypeCastExpression(node, opts) {
  106617. if (!node)
  106618. return false;
  106619. const nodeType = node.type;
  106620. if (nodeType === "TypeCastExpression") {
  106621. if (typeof opts === "undefined") {
  106622. return true;
  106623. } else {
  106624. return (0, _shallowEqual.default)(node, opts);
  106625. }
  106626. }
  106627. return false;
  106628. }
  106629. function isTypeParameter(node, opts) {
  106630. if (!node)
  106631. return false;
  106632. const nodeType = node.type;
  106633. if (nodeType === "TypeParameter") {
  106634. if (typeof opts === "undefined") {
  106635. return true;
  106636. } else {
  106637. return (0, _shallowEqual.default)(node, opts);
  106638. }
  106639. }
  106640. return false;
  106641. }
  106642. function isTypeParameterDeclaration(node, opts) {
  106643. if (!node)
  106644. return false;
  106645. const nodeType = node.type;
  106646. if (nodeType === "TypeParameterDeclaration") {
  106647. if (typeof opts === "undefined") {
  106648. return true;
  106649. } else {
  106650. return (0, _shallowEqual.default)(node, opts);
  106651. }
  106652. }
  106653. return false;
  106654. }
  106655. function isTypeParameterInstantiation(node, opts) {
  106656. if (!node)
  106657. return false;
  106658. const nodeType = node.type;
  106659. if (nodeType === "TypeParameterInstantiation") {
  106660. if (typeof opts === "undefined") {
  106661. return true;
  106662. } else {
  106663. return (0, _shallowEqual.default)(node, opts);
  106664. }
  106665. }
  106666. return false;
  106667. }
  106668. function isUnionTypeAnnotation(node, opts) {
  106669. if (!node)
  106670. return false;
  106671. const nodeType = node.type;
  106672. if (nodeType === "UnionTypeAnnotation") {
  106673. if (typeof opts === "undefined") {
  106674. return true;
  106675. } else {
  106676. return (0, _shallowEqual.default)(node, opts);
  106677. }
  106678. }
  106679. return false;
  106680. }
  106681. function isVariance(node, opts) {
  106682. if (!node)
  106683. return false;
  106684. const nodeType = node.type;
  106685. if (nodeType === "Variance") {
  106686. if (typeof opts === "undefined") {
  106687. return true;
  106688. } else {
  106689. return (0, _shallowEqual.default)(node, opts);
  106690. }
  106691. }
  106692. return false;
  106693. }
  106694. function isVoidTypeAnnotation(node, opts) {
  106695. if (!node)
  106696. return false;
  106697. const nodeType = node.type;
  106698. if (nodeType === "VoidTypeAnnotation") {
  106699. if (typeof opts === "undefined") {
  106700. return true;
  106701. } else {
  106702. return (0, _shallowEqual.default)(node, opts);
  106703. }
  106704. }
  106705. return false;
  106706. }
  106707. function isEnumDeclaration(node, opts) {
  106708. if (!node)
  106709. return false;
  106710. const nodeType = node.type;
  106711. if (nodeType === "EnumDeclaration") {
  106712. if (typeof opts === "undefined") {
  106713. return true;
  106714. } else {
  106715. return (0, _shallowEqual.default)(node, opts);
  106716. }
  106717. }
  106718. return false;
  106719. }
  106720. function isEnumBooleanBody(node, opts) {
  106721. if (!node)
  106722. return false;
  106723. const nodeType = node.type;
  106724. if (nodeType === "EnumBooleanBody") {
  106725. if (typeof opts === "undefined") {
  106726. return true;
  106727. } else {
  106728. return (0, _shallowEqual.default)(node, opts);
  106729. }
  106730. }
  106731. return false;
  106732. }
  106733. function isEnumNumberBody(node, opts) {
  106734. if (!node)
  106735. return false;
  106736. const nodeType = node.type;
  106737. if (nodeType === "EnumNumberBody") {
  106738. if (typeof opts === "undefined") {
  106739. return true;
  106740. } else {
  106741. return (0, _shallowEqual.default)(node, opts);
  106742. }
  106743. }
  106744. return false;
  106745. }
  106746. function isEnumStringBody(node, opts) {
  106747. if (!node)
  106748. return false;
  106749. const nodeType = node.type;
  106750. if (nodeType === "EnumStringBody") {
  106751. if (typeof opts === "undefined") {
  106752. return true;
  106753. } else {
  106754. return (0, _shallowEqual.default)(node, opts);
  106755. }
  106756. }
  106757. return false;
  106758. }
  106759. function isEnumSymbolBody(node, opts) {
  106760. if (!node)
  106761. return false;
  106762. const nodeType = node.type;
  106763. if (nodeType === "EnumSymbolBody") {
  106764. if (typeof opts === "undefined") {
  106765. return true;
  106766. } else {
  106767. return (0, _shallowEqual.default)(node, opts);
  106768. }
  106769. }
  106770. return false;
  106771. }
  106772. function isEnumBooleanMember(node, opts) {
  106773. if (!node)
  106774. return false;
  106775. const nodeType = node.type;
  106776. if (nodeType === "EnumBooleanMember") {
  106777. if (typeof opts === "undefined") {
  106778. return true;
  106779. } else {
  106780. return (0, _shallowEqual.default)(node, opts);
  106781. }
  106782. }
  106783. return false;
  106784. }
  106785. function isEnumNumberMember(node, opts) {
  106786. if (!node)
  106787. return false;
  106788. const nodeType = node.type;
  106789. if (nodeType === "EnumNumberMember") {
  106790. if (typeof opts === "undefined") {
  106791. return true;
  106792. } else {
  106793. return (0, _shallowEqual.default)(node, opts);
  106794. }
  106795. }
  106796. return false;
  106797. }
  106798. function isEnumStringMember(node, opts) {
  106799. if (!node)
  106800. return false;
  106801. const nodeType = node.type;
  106802. if (nodeType === "EnumStringMember") {
  106803. if (typeof opts === "undefined") {
  106804. return true;
  106805. } else {
  106806. return (0, _shallowEqual.default)(node, opts);
  106807. }
  106808. }
  106809. return false;
  106810. }
  106811. function isEnumDefaultedMember(node, opts) {
  106812. if (!node)
  106813. return false;
  106814. const nodeType = node.type;
  106815. if (nodeType === "EnumDefaultedMember") {
  106816. if (typeof opts === "undefined") {
  106817. return true;
  106818. } else {
  106819. return (0, _shallowEqual.default)(node, opts);
  106820. }
  106821. }
  106822. return false;
  106823. }
  106824. function isIndexedAccessType(node, opts) {
  106825. if (!node)
  106826. return false;
  106827. const nodeType = node.type;
  106828. if (nodeType === "IndexedAccessType") {
  106829. if (typeof opts === "undefined") {
  106830. return true;
  106831. } else {
  106832. return (0, _shallowEqual.default)(node, opts);
  106833. }
  106834. }
  106835. return false;
  106836. }
  106837. function isOptionalIndexedAccessType(node, opts) {
  106838. if (!node)
  106839. return false;
  106840. const nodeType = node.type;
  106841. if (nodeType === "OptionalIndexedAccessType") {
  106842. if (typeof opts === "undefined") {
  106843. return true;
  106844. } else {
  106845. return (0, _shallowEqual.default)(node, opts);
  106846. }
  106847. }
  106848. return false;
  106849. }
  106850. function isJSXAttribute(node, opts) {
  106851. if (!node)
  106852. return false;
  106853. const nodeType = node.type;
  106854. if (nodeType === "JSXAttribute") {
  106855. if (typeof opts === "undefined") {
  106856. return true;
  106857. } else {
  106858. return (0, _shallowEqual.default)(node, opts);
  106859. }
  106860. }
  106861. return false;
  106862. }
  106863. function isJSXClosingElement(node, opts) {
  106864. if (!node)
  106865. return false;
  106866. const nodeType = node.type;
  106867. if (nodeType === "JSXClosingElement") {
  106868. if (typeof opts === "undefined") {
  106869. return true;
  106870. } else {
  106871. return (0, _shallowEqual.default)(node, opts);
  106872. }
  106873. }
  106874. return false;
  106875. }
  106876. function isJSXElement2(node, opts) {
  106877. if (!node)
  106878. return false;
  106879. const nodeType = node.type;
  106880. if (nodeType === "JSXElement") {
  106881. if (typeof opts === "undefined") {
  106882. return true;
  106883. } else {
  106884. return (0, _shallowEqual.default)(node, opts);
  106885. }
  106886. }
  106887. return false;
  106888. }
  106889. function isJSXEmptyExpression(node, opts) {
  106890. if (!node)
  106891. return false;
  106892. const nodeType = node.type;
  106893. if (nodeType === "JSXEmptyExpression") {
  106894. if (typeof opts === "undefined") {
  106895. return true;
  106896. } else {
  106897. return (0, _shallowEqual.default)(node, opts);
  106898. }
  106899. }
  106900. return false;
  106901. }
  106902. function isJSXExpressionContainer2(node, opts) {
  106903. if (!node)
  106904. return false;
  106905. const nodeType = node.type;
  106906. if (nodeType === "JSXExpressionContainer") {
  106907. if (typeof opts === "undefined") {
  106908. return true;
  106909. } else {
  106910. return (0, _shallowEqual.default)(node, opts);
  106911. }
  106912. }
  106913. return false;
  106914. }
  106915. function isJSXSpreadChild(node, opts) {
  106916. if (!node)
  106917. return false;
  106918. const nodeType = node.type;
  106919. if (nodeType === "JSXSpreadChild") {
  106920. if (typeof opts === "undefined") {
  106921. return true;
  106922. } else {
  106923. return (0, _shallowEqual.default)(node, opts);
  106924. }
  106925. }
  106926. return false;
  106927. }
  106928. function isJSXIdentifier2(node, opts) {
  106929. if (!node)
  106930. return false;
  106931. const nodeType = node.type;
  106932. if (nodeType === "JSXIdentifier") {
  106933. if (typeof opts === "undefined") {
  106934. return true;
  106935. } else {
  106936. return (0, _shallowEqual.default)(node, opts);
  106937. }
  106938. }
  106939. return false;
  106940. }
  106941. function isJSXMemberExpression(node, opts) {
  106942. if (!node)
  106943. return false;
  106944. const nodeType = node.type;
  106945. if (nodeType === "JSXMemberExpression") {
  106946. if (typeof opts === "undefined") {
  106947. return true;
  106948. } else {
  106949. return (0, _shallowEqual.default)(node, opts);
  106950. }
  106951. }
  106952. return false;
  106953. }
  106954. function isJSXNamespacedName(node, opts) {
  106955. if (!node)
  106956. return false;
  106957. const nodeType = node.type;
  106958. if (nodeType === "JSXNamespacedName") {
  106959. if (typeof opts === "undefined") {
  106960. return true;
  106961. } else {
  106962. return (0, _shallowEqual.default)(node, opts);
  106963. }
  106964. }
  106965. return false;
  106966. }
  106967. function isJSXOpeningElement(node, opts) {
  106968. if (!node)
  106969. return false;
  106970. const nodeType = node.type;
  106971. if (nodeType === "JSXOpeningElement") {
  106972. if (typeof opts === "undefined") {
  106973. return true;
  106974. } else {
  106975. return (0, _shallowEqual.default)(node, opts);
  106976. }
  106977. }
  106978. return false;
  106979. }
  106980. function isJSXSpreadAttribute(node, opts) {
  106981. if (!node)
  106982. return false;
  106983. const nodeType = node.type;
  106984. if (nodeType === "JSXSpreadAttribute") {
  106985. if (typeof opts === "undefined") {
  106986. return true;
  106987. } else {
  106988. return (0, _shallowEqual.default)(node, opts);
  106989. }
  106990. }
  106991. return false;
  106992. }
  106993. function isJSXText(node, opts) {
  106994. if (!node)
  106995. return false;
  106996. const nodeType = node.type;
  106997. if (nodeType === "JSXText") {
  106998. if (typeof opts === "undefined") {
  106999. return true;
  107000. } else {
  107001. return (0, _shallowEqual.default)(node, opts);
  107002. }
  107003. }
  107004. return false;
  107005. }
  107006. function isJSXFragment2(node, opts) {
  107007. if (!node)
  107008. return false;
  107009. const nodeType = node.type;
  107010. if (nodeType === "JSXFragment") {
  107011. if (typeof opts === "undefined") {
  107012. return true;
  107013. } else {
  107014. return (0, _shallowEqual.default)(node, opts);
  107015. }
  107016. }
  107017. return false;
  107018. }
  107019. function isJSXOpeningFragment(node, opts) {
  107020. if (!node)
  107021. return false;
  107022. const nodeType = node.type;
  107023. if (nodeType === "JSXOpeningFragment") {
  107024. if (typeof opts === "undefined") {
  107025. return true;
  107026. } else {
  107027. return (0, _shallowEqual.default)(node, opts);
  107028. }
  107029. }
  107030. return false;
  107031. }
  107032. function isJSXClosingFragment(node, opts) {
  107033. if (!node)
  107034. return false;
  107035. const nodeType = node.type;
  107036. if (nodeType === "JSXClosingFragment") {
  107037. if (typeof opts === "undefined") {
  107038. return true;
  107039. } else {
  107040. return (0, _shallowEqual.default)(node, opts);
  107041. }
  107042. }
  107043. return false;
  107044. }
  107045. function isNoop(node, opts) {
  107046. if (!node)
  107047. return false;
  107048. const nodeType = node.type;
  107049. if (nodeType === "Noop") {
  107050. if (typeof opts === "undefined") {
  107051. return true;
  107052. } else {
  107053. return (0, _shallowEqual.default)(node, opts);
  107054. }
  107055. }
  107056. return false;
  107057. }
  107058. function isPlaceholder(node, opts) {
  107059. if (!node)
  107060. return false;
  107061. const nodeType = node.type;
  107062. if (nodeType === "Placeholder") {
  107063. if (typeof opts === "undefined") {
  107064. return true;
  107065. } else {
  107066. return (0, _shallowEqual.default)(node, opts);
  107067. }
  107068. }
  107069. return false;
  107070. }
  107071. function isV8IntrinsicIdentifier(node, opts) {
  107072. if (!node)
  107073. return false;
  107074. const nodeType = node.type;
  107075. if (nodeType === "V8IntrinsicIdentifier") {
  107076. if (typeof opts === "undefined") {
  107077. return true;
  107078. } else {
  107079. return (0, _shallowEqual.default)(node, opts);
  107080. }
  107081. }
  107082. return false;
  107083. }
  107084. function isArgumentPlaceholder(node, opts) {
  107085. if (!node)
  107086. return false;
  107087. const nodeType = node.type;
  107088. if (nodeType === "ArgumentPlaceholder") {
  107089. if (typeof opts === "undefined") {
  107090. return true;
  107091. } else {
  107092. return (0, _shallowEqual.default)(node, opts);
  107093. }
  107094. }
  107095. return false;
  107096. }
  107097. function isBindExpression(node, opts) {
  107098. if (!node)
  107099. return false;
  107100. const nodeType = node.type;
  107101. if (nodeType === "BindExpression") {
  107102. if (typeof opts === "undefined") {
  107103. return true;
  107104. } else {
  107105. return (0, _shallowEqual.default)(node, opts);
  107106. }
  107107. }
  107108. return false;
  107109. }
  107110. function isClassProperty(node, opts) {
  107111. if (!node)
  107112. return false;
  107113. const nodeType = node.type;
  107114. if (nodeType === "ClassProperty") {
  107115. if (typeof opts === "undefined") {
  107116. return true;
  107117. } else {
  107118. return (0, _shallowEqual.default)(node, opts);
  107119. }
  107120. }
  107121. return false;
  107122. }
  107123. function isPipelineTopicExpression(node, opts) {
  107124. if (!node)
  107125. return false;
  107126. const nodeType = node.type;
  107127. if (nodeType === "PipelineTopicExpression") {
  107128. if (typeof opts === "undefined") {
  107129. return true;
  107130. } else {
  107131. return (0, _shallowEqual.default)(node, opts);
  107132. }
  107133. }
  107134. return false;
  107135. }
  107136. function isPipelineBareFunction(node, opts) {
  107137. if (!node)
  107138. return false;
  107139. const nodeType = node.type;
  107140. if (nodeType === "PipelineBareFunction") {
  107141. if (typeof opts === "undefined") {
  107142. return true;
  107143. } else {
  107144. return (0, _shallowEqual.default)(node, opts);
  107145. }
  107146. }
  107147. return false;
  107148. }
  107149. function isPipelinePrimaryTopicReference(node, opts) {
  107150. if (!node)
  107151. return false;
  107152. const nodeType = node.type;
  107153. if (nodeType === "PipelinePrimaryTopicReference") {
  107154. if (typeof opts === "undefined") {
  107155. return true;
  107156. } else {
  107157. return (0, _shallowEqual.default)(node, opts);
  107158. }
  107159. }
  107160. return false;
  107161. }
  107162. function isClassPrivateProperty(node, opts) {
  107163. if (!node)
  107164. return false;
  107165. const nodeType = node.type;
  107166. if (nodeType === "ClassPrivateProperty") {
  107167. if (typeof opts === "undefined") {
  107168. return true;
  107169. } else {
  107170. return (0, _shallowEqual.default)(node, opts);
  107171. }
  107172. }
  107173. return false;
  107174. }
  107175. function isClassPrivateMethod(node, opts) {
  107176. if (!node)
  107177. return false;
  107178. const nodeType = node.type;
  107179. if (nodeType === "ClassPrivateMethod") {
  107180. if (typeof opts === "undefined") {
  107181. return true;
  107182. } else {
  107183. return (0, _shallowEqual.default)(node, opts);
  107184. }
  107185. }
  107186. return false;
  107187. }
  107188. function isImportAttribute(node, opts) {
  107189. if (!node)
  107190. return false;
  107191. const nodeType = node.type;
  107192. if (nodeType === "ImportAttribute") {
  107193. if (typeof opts === "undefined") {
  107194. return true;
  107195. } else {
  107196. return (0, _shallowEqual.default)(node, opts);
  107197. }
  107198. }
  107199. return false;
  107200. }
  107201. function isDecorator(node, opts) {
  107202. if (!node)
  107203. return false;
  107204. const nodeType = node.type;
  107205. if (nodeType === "Decorator") {
  107206. if (typeof opts === "undefined") {
  107207. return true;
  107208. } else {
  107209. return (0, _shallowEqual.default)(node, opts);
  107210. }
  107211. }
  107212. return false;
  107213. }
  107214. function isDoExpression(node, opts) {
  107215. if (!node)
  107216. return false;
  107217. const nodeType = node.type;
  107218. if (nodeType === "DoExpression") {
  107219. if (typeof opts === "undefined") {
  107220. return true;
  107221. } else {
  107222. return (0, _shallowEqual.default)(node, opts);
  107223. }
  107224. }
  107225. return false;
  107226. }
  107227. function isExportDefaultSpecifier(node, opts) {
  107228. if (!node)
  107229. return false;
  107230. const nodeType = node.type;
  107231. if (nodeType === "ExportDefaultSpecifier") {
  107232. if (typeof opts === "undefined") {
  107233. return true;
  107234. } else {
  107235. return (0, _shallowEqual.default)(node, opts);
  107236. }
  107237. }
  107238. return false;
  107239. }
  107240. function isPrivateName(node, opts) {
  107241. if (!node)
  107242. return false;
  107243. const nodeType = node.type;
  107244. if (nodeType === "PrivateName") {
  107245. if (typeof opts === "undefined") {
  107246. return true;
  107247. } else {
  107248. return (0, _shallowEqual.default)(node, opts);
  107249. }
  107250. }
  107251. return false;
  107252. }
  107253. function isRecordExpression(node, opts) {
  107254. if (!node)
  107255. return false;
  107256. const nodeType = node.type;
  107257. if (nodeType === "RecordExpression") {
  107258. if (typeof opts === "undefined") {
  107259. return true;
  107260. } else {
  107261. return (0, _shallowEqual.default)(node, opts);
  107262. }
  107263. }
  107264. return false;
  107265. }
  107266. function isTupleExpression(node, opts) {
  107267. if (!node)
  107268. return false;
  107269. const nodeType = node.type;
  107270. if (nodeType === "TupleExpression") {
  107271. if (typeof opts === "undefined") {
  107272. return true;
  107273. } else {
  107274. return (0, _shallowEqual.default)(node, opts);
  107275. }
  107276. }
  107277. return false;
  107278. }
  107279. function isDecimalLiteral(node, opts) {
  107280. if (!node)
  107281. return false;
  107282. const nodeType = node.type;
  107283. if (nodeType === "DecimalLiteral") {
  107284. if (typeof opts === "undefined") {
  107285. return true;
  107286. } else {
  107287. return (0, _shallowEqual.default)(node, opts);
  107288. }
  107289. }
  107290. return false;
  107291. }
  107292. function isStaticBlock(node, opts) {
  107293. if (!node)
  107294. return false;
  107295. const nodeType = node.type;
  107296. if (nodeType === "StaticBlock") {
  107297. if (typeof opts === "undefined") {
  107298. return true;
  107299. } else {
  107300. return (0, _shallowEqual.default)(node, opts);
  107301. }
  107302. }
  107303. return false;
  107304. }
  107305. function isModuleExpression(node, opts) {
  107306. if (!node)
  107307. return false;
  107308. const nodeType = node.type;
  107309. if (nodeType === "ModuleExpression") {
  107310. if (typeof opts === "undefined") {
  107311. return true;
  107312. } else {
  107313. return (0, _shallowEqual.default)(node, opts);
  107314. }
  107315. }
  107316. return false;
  107317. }
  107318. function isTSParameterProperty(node, opts) {
  107319. if (!node)
  107320. return false;
  107321. const nodeType = node.type;
  107322. if (nodeType === "TSParameterProperty") {
  107323. if (typeof opts === "undefined") {
  107324. return true;
  107325. } else {
  107326. return (0, _shallowEqual.default)(node, opts);
  107327. }
  107328. }
  107329. return false;
  107330. }
  107331. function isTSDeclareFunction(node, opts) {
  107332. if (!node)
  107333. return false;
  107334. const nodeType = node.type;
  107335. if (nodeType === "TSDeclareFunction") {
  107336. if (typeof opts === "undefined") {
  107337. return true;
  107338. } else {
  107339. return (0, _shallowEqual.default)(node, opts);
  107340. }
  107341. }
  107342. return false;
  107343. }
  107344. function isTSDeclareMethod(node, opts) {
  107345. if (!node)
  107346. return false;
  107347. const nodeType = node.type;
  107348. if (nodeType === "TSDeclareMethod") {
  107349. if (typeof opts === "undefined") {
  107350. return true;
  107351. } else {
  107352. return (0, _shallowEqual.default)(node, opts);
  107353. }
  107354. }
  107355. return false;
  107356. }
  107357. function isTSQualifiedName(node, opts) {
  107358. if (!node)
  107359. return false;
  107360. const nodeType = node.type;
  107361. if (nodeType === "TSQualifiedName") {
  107362. if (typeof opts === "undefined") {
  107363. return true;
  107364. } else {
  107365. return (0, _shallowEqual.default)(node, opts);
  107366. }
  107367. }
  107368. return false;
  107369. }
  107370. function isTSCallSignatureDeclaration(node, opts) {
  107371. if (!node)
  107372. return false;
  107373. const nodeType = node.type;
  107374. if (nodeType === "TSCallSignatureDeclaration") {
  107375. if (typeof opts === "undefined") {
  107376. return true;
  107377. } else {
  107378. return (0, _shallowEqual.default)(node, opts);
  107379. }
  107380. }
  107381. return false;
  107382. }
  107383. function isTSConstructSignatureDeclaration(node, opts) {
  107384. if (!node)
  107385. return false;
  107386. const nodeType = node.type;
  107387. if (nodeType === "TSConstructSignatureDeclaration") {
  107388. if (typeof opts === "undefined") {
  107389. return true;
  107390. } else {
  107391. return (0, _shallowEqual.default)(node, opts);
  107392. }
  107393. }
  107394. return false;
  107395. }
  107396. function isTSPropertySignature(node, opts) {
  107397. if (!node)
  107398. return false;
  107399. const nodeType = node.type;
  107400. if (nodeType === "TSPropertySignature") {
  107401. if (typeof opts === "undefined") {
  107402. return true;
  107403. } else {
  107404. return (0, _shallowEqual.default)(node, opts);
  107405. }
  107406. }
  107407. return false;
  107408. }
  107409. function isTSMethodSignature(node, opts) {
  107410. if (!node)
  107411. return false;
  107412. const nodeType = node.type;
  107413. if (nodeType === "TSMethodSignature") {
  107414. if (typeof opts === "undefined") {
  107415. return true;
  107416. } else {
  107417. return (0, _shallowEqual.default)(node, opts);
  107418. }
  107419. }
  107420. return false;
  107421. }
  107422. function isTSIndexSignature(node, opts) {
  107423. if (!node)
  107424. return false;
  107425. const nodeType = node.type;
  107426. if (nodeType === "TSIndexSignature") {
  107427. if (typeof opts === "undefined") {
  107428. return true;
  107429. } else {
  107430. return (0, _shallowEqual.default)(node, opts);
  107431. }
  107432. }
  107433. return false;
  107434. }
  107435. function isTSAnyKeyword(node, opts) {
  107436. if (!node)
  107437. return false;
  107438. const nodeType = node.type;
  107439. if (nodeType === "TSAnyKeyword") {
  107440. if (typeof opts === "undefined") {
  107441. return true;
  107442. } else {
  107443. return (0, _shallowEqual.default)(node, opts);
  107444. }
  107445. }
  107446. return false;
  107447. }
  107448. function isTSBooleanKeyword(node, opts) {
  107449. if (!node)
  107450. return false;
  107451. const nodeType = node.type;
  107452. if (nodeType === "TSBooleanKeyword") {
  107453. if (typeof opts === "undefined") {
  107454. return true;
  107455. } else {
  107456. return (0, _shallowEqual.default)(node, opts);
  107457. }
  107458. }
  107459. return false;
  107460. }
  107461. function isTSBigIntKeyword(node, opts) {
  107462. if (!node)
  107463. return false;
  107464. const nodeType = node.type;
  107465. if (nodeType === "TSBigIntKeyword") {
  107466. if (typeof opts === "undefined") {
  107467. return true;
  107468. } else {
  107469. return (0, _shallowEqual.default)(node, opts);
  107470. }
  107471. }
  107472. return false;
  107473. }
  107474. function isTSIntrinsicKeyword(node, opts) {
  107475. if (!node)
  107476. return false;
  107477. const nodeType = node.type;
  107478. if (nodeType === "TSIntrinsicKeyword") {
  107479. if (typeof opts === "undefined") {
  107480. return true;
  107481. } else {
  107482. return (0, _shallowEqual.default)(node, opts);
  107483. }
  107484. }
  107485. return false;
  107486. }
  107487. function isTSNeverKeyword(node, opts) {
  107488. if (!node)
  107489. return false;
  107490. const nodeType = node.type;
  107491. if (nodeType === "TSNeverKeyword") {
  107492. if (typeof opts === "undefined") {
  107493. return true;
  107494. } else {
  107495. return (0, _shallowEqual.default)(node, opts);
  107496. }
  107497. }
  107498. return false;
  107499. }
  107500. function isTSNullKeyword(node, opts) {
  107501. if (!node)
  107502. return false;
  107503. const nodeType = node.type;
  107504. if (nodeType === "TSNullKeyword") {
  107505. if (typeof opts === "undefined") {
  107506. return true;
  107507. } else {
  107508. return (0, _shallowEqual.default)(node, opts);
  107509. }
  107510. }
  107511. return false;
  107512. }
  107513. function isTSNumberKeyword(node, opts) {
  107514. if (!node)
  107515. return false;
  107516. const nodeType = node.type;
  107517. if (nodeType === "TSNumberKeyword") {
  107518. if (typeof opts === "undefined") {
  107519. return true;
  107520. } else {
  107521. return (0, _shallowEqual.default)(node, opts);
  107522. }
  107523. }
  107524. return false;
  107525. }
  107526. function isTSObjectKeyword(node, opts) {
  107527. if (!node)
  107528. return false;
  107529. const nodeType = node.type;
  107530. if (nodeType === "TSObjectKeyword") {
  107531. if (typeof opts === "undefined") {
  107532. return true;
  107533. } else {
  107534. return (0, _shallowEqual.default)(node, opts);
  107535. }
  107536. }
  107537. return false;
  107538. }
  107539. function isTSStringKeyword(node, opts) {
  107540. if (!node)
  107541. return false;
  107542. const nodeType = node.type;
  107543. if (nodeType === "TSStringKeyword") {
  107544. if (typeof opts === "undefined") {
  107545. return true;
  107546. } else {
  107547. return (0, _shallowEqual.default)(node, opts);
  107548. }
  107549. }
  107550. return false;
  107551. }
  107552. function isTSSymbolKeyword(node, opts) {
  107553. if (!node)
  107554. return false;
  107555. const nodeType = node.type;
  107556. if (nodeType === "TSSymbolKeyword") {
  107557. if (typeof opts === "undefined") {
  107558. return true;
  107559. } else {
  107560. return (0, _shallowEqual.default)(node, opts);
  107561. }
  107562. }
  107563. return false;
  107564. }
  107565. function isTSUndefinedKeyword(node, opts) {
  107566. if (!node)
  107567. return false;
  107568. const nodeType = node.type;
  107569. if (nodeType === "TSUndefinedKeyword") {
  107570. if (typeof opts === "undefined") {
  107571. return true;
  107572. } else {
  107573. return (0, _shallowEqual.default)(node, opts);
  107574. }
  107575. }
  107576. return false;
  107577. }
  107578. function isTSUnknownKeyword(node, opts) {
  107579. if (!node)
  107580. return false;
  107581. const nodeType = node.type;
  107582. if (nodeType === "TSUnknownKeyword") {
  107583. if (typeof opts === "undefined") {
  107584. return true;
  107585. } else {
  107586. return (0, _shallowEqual.default)(node, opts);
  107587. }
  107588. }
  107589. return false;
  107590. }
  107591. function isTSVoidKeyword(node, opts) {
  107592. if (!node)
  107593. return false;
  107594. const nodeType = node.type;
  107595. if (nodeType === "TSVoidKeyword") {
  107596. if (typeof opts === "undefined") {
  107597. return true;
  107598. } else {
  107599. return (0, _shallowEqual.default)(node, opts);
  107600. }
  107601. }
  107602. return false;
  107603. }
  107604. function isTSThisType(node, opts) {
  107605. if (!node)
  107606. return false;
  107607. const nodeType = node.type;
  107608. if (nodeType === "TSThisType") {
  107609. if (typeof opts === "undefined") {
  107610. return true;
  107611. } else {
  107612. return (0, _shallowEqual.default)(node, opts);
  107613. }
  107614. }
  107615. return false;
  107616. }
  107617. function isTSFunctionType(node, opts) {
  107618. if (!node)
  107619. return false;
  107620. const nodeType = node.type;
  107621. if (nodeType === "TSFunctionType") {
  107622. if (typeof opts === "undefined") {
  107623. return true;
  107624. } else {
  107625. return (0, _shallowEqual.default)(node, opts);
  107626. }
  107627. }
  107628. return false;
  107629. }
  107630. function isTSConstructorType(node, opts) {
  107631. if (!node)
  107632. return false;
  107633. const nodeType = node.type;
  107634. if (nodeType === "TSConstructorType") {
  107635. if (typeof opts === "undefined") {
  107636. return true;
  107637. } else {
  107638. return (0, _shallowEqual.default)(node, opts);
  107639. }
  107640. }
  107641. return false;
  107642. }
  107643. function isTSTypeReference(node, opts) {
  107644. if (!node)
  107645. return false;
  107646. const nodeType = node.type;
  107647. if (nodeType === "TSTypeReference") {
  107648. if (typeof opts === "undefined") {
  107649. return true;
  107650. } else {
  107651. return (0, _shallowEqual.default)(node, opts);
  107652. }
  107653. }
  107654. return false;
  107655. }
  107656. function isTSTypePredicate(node, opts) {
  107657. if (!node)
  107658. return false;
  107659. const nodeType = node.type;
  107660. if (nodeType === "TSTypePredicate") {
  107661. if (typeof opts === "undefined") {
  107662. return true;
  107663. } else {
  107664. return (0, _shallowEqual.default)(node, opts);
  107665. }
  107666. }
  107667. return false;
  107668. }
  107669. function isTSTypeQuery(node, opts) {
  107670. if (!node)
  107671. return false;
  107672. const nodeType = node.type;
  107673. if (nodeType === "TSTypeQuery") {
  107674. if (typeof opts === "undefined") {
  107675. return true;
  107676. } else {
  107677. return (0, _shallowEqual.default)(node, opts);
  107678. }
  107679. }
  107680. return false;
  107681. }
  107682. function isTSTypeLiteral(node, opts) {
  107683. if (!node)
  107684. return false;
  107685. const nodeType = node.type;
  107686. if (nodeType === "TSTypeLiteral") {
  107687. if (typeof opts === "undefined") {
  107688. return true;
  107689. } else {
  107690. return (0, _shallowEqual.default)(node, opts);
  107691. }
  107692. }
  107693. return false;
  107694. }
  107695. function isTSArrayType(node, opts) {
  107696. if (!node)
  107697. return false;
  107698. const nodeType = node.type;
  107699. if (nodeType === "TSArrayType") {
  107700. if (typeof opts === "undefined") {
  107701. return true;
  107702. } else {
  107703. return (0, _shallowEqual.default)(node, opts);
  107704. }
  107705. }
  107706. return false;
  107707. }
  107708. function isTSTupleType(node, opts) {
  107709. if (!node)
  107710. return false;
  107711. const nodeType = node.type;
  107712. if (nodeType === "TSTupleType") {
  107713. if (typeof opts === "undefined") {
  107714. return true;
  107715. } else {
  107716. return (0, _shallowEqual.default)(node, opts);
  107717. }
  107718. }
  107719. return false;
  107720. }
  107721. function isTSOptionalType(node, opts) {
  107722. if (!node)
  107723. return false;
  107724. const nodeType = node.type;
  107725. if (nodeType === "TSOptionalType") {
  107726. if (typeof opts === "undefined") {
  107727. return true;
  107728. } else {
  107729. return (0, _shallowEqual.default)(node, opts);
  107730. }
  107731. }
  107732. return false;
  107733. }
  107734. function isTSRestType(node, opts) {
  107735. if (!node)
  107736. return false;
  107737. const nodeType = node.type;
  107738. if (nodeType === "TSRestType") {
  107739. if (typeof opts === "undefined") {
  107740. return true;
  107741. } else {
  107742. return (0, _shallowEqual.default)(node, opts);
  107743. }
  107744. }
  107745. return false;
  107746. }
  107747. function isTSNamedTupleMember(node, opts) {
  107748. if (!node)
  107749. return false;
  107750. const nodeType = node.type;
  107751. if (nodeType === "TSNamedTupleMember") {
  107752. if (typeof opts === "undefined") {
  107753. return true;
  107754. } else {
  107755. return (0, _shallowEqual.default)(node, opts);
  107756. }
  107757. }
  107758. return false;
  107759. }
  107760. function isTSUnionType(node, opts) {
  107761. if (!node)
  107762. return false;
  107763. const nodeType = node.type;
  107764. if (nodeType === "TSUnionType") {
  107765. if (typeof opts === "undefined") {
  107766. return true;
  107767. } else {
  107768. return (0, _shallowEqual.default)(node, opts);
  107769. }
  107770. }
  107771. return false;
  107772. }
  107773. function isTSIntersectionType(node, opts) {
  107774. if (!node)
  107775. return false;
  107776. const nodeType = node.type;
  107777. if (nodeType === "TSIntersectionType") {
  107778. if (typeof opts === "undefined") {
  107779. return true;
  107780. } else {
  107781. return (0, _shallowEqual.default)(node, opts);
  107782. }
  107783. }
  107784. return false;
  107785. }
  107786. function isTSConditionalType(node, opts) {
  107787. if (!node)
  107788. return false;
  107789. const nodeType = node.type;
  107790. if (nodeType === "TSConditionalType") {
  107791. if (typeof opts === "undefined") {
  107792. return true;
  107793. } else {
  107794. return (0, _shallowEqual.default)(node, opts);
  107795. }
  107796. }
  107797. return false;
  107798. }
  107799. function isTSInferType(node, opts) {
  107800. if (!node)
  107801. return false;
  107802. const nodeType = node.type;
  107803. if (nodeType === "TSInferType") {
  107804. if (typeof opts === "undefined") {
  107805. return true;
  107806. } else {
  107807. return (0, _shallowEqual.default)(node, opts);
  107808. }
  107809. }
  107810. return false;
  107811. }
  107812. function isTSParenthesizedType(node, opts) {
  107813. if (!node)
  107814. return false;
  107815. const nodeType = node.type;
  107816. if (nodeType === "TSParenthesizedType") {
  107817. if (typeof opts === "undefined") {
  107818. return true;
  107819. } else {
  107820. return (0, _shallowEqual.default)(node, opts);
  107821. }
  107822. }
  107823. return false;
  107824. }
  107825. function isTSTypeOperator(node, opts) {
  107826. if (!node)
  107827. return false;
  107828. const nodeType = node.type;
  107829. if (nodeType === "TSTypeOperator") {
  107830. if (typeof opts === "undefined") {
  107831. return true;
  107832. } else {
  107833. return (0, _shallowEqual.default)(node, opts);
  107834. }
  107835. }
  107836. return false;
  107837. }
  107838. function isTSIndexedAccessType(node, opts) {
  107839. if (!node)
  107840. return false;
  107841. const nodeType = node.type;
  107842. if (nodeType === "TSIndexedAccessType") {
  107843. if (typeof opts === "undefined") {
  107844. return true;
  107845. } else {
  107846. return (0, _shallowEqual.default)(node, opts);
  107847. }
  107848. }
  107849. return false;
  107850. }
  107851. function isTSMappedType(node, opts) {
  107852. if (!node)
  107853. return false;
  107854. const nodeType = node.type;
  107855. if (nodeType === "TSMappedType") {
  107856. if (typeof opts === "undefined") {
  107857. return true;
  107858. } else {
  107859. return (0, _shallowEqual.default)(node, opts);
  107860. }
  107861. }
  107862. return false;
  107863. }
  107864. function isTSLiteralType(node, opts) {
  107865. if (!node)
  107866. return false;
  107867. const nodeType = node.type;
  107868. if (nodeType === "TSLiteralType") {
  107869. if (typeof opts === "undefined") {
  107870. return true;
  107871. } else {
  107872. return (0, _shallowEqual.default)(node, opts);
  107873. }
  107874. }
  107875. return false;
  107876. }
  107877. function isTSExpressionWithTypeArguments(node, opts) {
  107878. if (!node)
  107879. return false;
  107880. const nodeType = node.type;
  107881. if (nodeType === "TSExpressionWithTypeArguments") {
  107882. if (typeof opts === "undefined") {
  107883. return true;
  107884. } else {
  107885. return (0, _shallowEqual.default)(node, opts);
  107886. }
  107887. }
  107888. return false;
  107889. }
  107890. function isTSInterfaceDeclaration(node, opts) {
  107891. if (!node)
  107892. return false;
  107893. const nodeType = node.type;
  107894. if (nodeType === "TSInterfaceDeclaration") {
  107895. if (typeof opts === "undefined") {
  107896. return true;
  107897. } else {
  107898. return (0, _shallowEqual.default)(node, opts);
  107899. }
  107900. }
  107901. return false;
  107902. }
  107903. function isTSInterfaceBody(node, opts) {
  107904. if (!node)
  107905. return false;
  107906. const nodeType = node.type;
  107907. if (nodeType === "TSInterfaceBody") {
  107908. if (typeof opts === "undefined") {
  107909. return true;
  107910. } else {
  107911. return (0, _shallowEqual.default)(node, opts);
  107912. }
  107913. }
  107914. return false;
  107915. }
  107916. function isTSTypeAliasDeclaration(node, opts) {
  107917. if (!node)
  107918. return false;
  107919. const nodeType = node.type;
  107920. if (nodeType === "TSTypeAliasDeclaration") {
  107921. if (typeof opts === "undefined") {
  107922. return true;
  107923. } else {
  107924. return (0, _shallowEqual.default)(node, opts);
  107925. }
  107926. }
  107927. return false;
  107928. }
  107929. function isTSAsExpression(node, opts) {
  107930. if (!node)
  107931. return false;
  107932. const nodeType = node.type;
  107933. if (nodeType === "TSAsExpression") {
  107934. if (typeof opts === "undefined") {
  107935. return true;
  107936. } else {
  107937. return (0, _shallowEqual.default)(node, opts);
  107938. }
  107939. }
  107940. return false;
  107941. }
  107942. function isTSTypeAssertion(node, opts) {
  107943. if (!node)
  107944. return false;
  107945. const nodeType = node.type;
  107946. if (nodeType === "TSTypeAssertion") {
  107947. if (typeof opts === "undefined") {
  107948. return true;
  107949. } else {
  107950. return (0, _shallowEqual.default)(node, opts);
  107951. }
  107952. }
  107953. return false;
  107954. }
  107955. function isTSEnumDeclaration(node, opts) {
  107956. if (!node)
  107957. return false;
  107958. const nodeType = node.type;
  107959. if (nodeType === "TSEnumDeclaration") {
  107960. if (typeof opts === "undefined") {
  107961. return true;
  107962. } else {
  107963. return (0, _shallowEqual.default)(node, opts);
  107964. }
  107965. }
  107966. return false;
  107967. }
  107968. function isTSEnumMember(node, opts) {
  107969. if (!node)
  107970. return false;
  107971. const nodeType = node.type;
  107972. if (nodeType === "TSEnumMember") {
  107973. if (typeof opts === "undefined") {
  107974. return true;
  107975. } else {
  107976. return (0, _shallowEqual.default)(node, opts);
  107977. }
  107978. }
  107979. return false;
  107980. }
  107981. function isTSModuleDeclaration(node, opts) {
  107982. if (!node)
  107983. return false;
  107984. const nodeType = node.type;
  107985. if (nodeType === "TSModuleDeclaration") {
  107986. if (typeof opts === "undefined") {
  107987. return true;
  107988. } else {
  107989. return (0, _shallowEqual.default)(node, opts);
  107990. }
  107991. }
  107992. return false;
  107993. }
  107994. function isTSModuleBlock(node, opts) {
  107995. if (!node)
  107996. return false;
  107997. const nodeType = node.type;
  107998. if (nodeType === "TSModuleBlock") {
  107999. if (typeof opts === "undefined") {
  108000. return true;
  108001. } else {
  108002. return (0, _shallowEqual.default)(node, opts);
  108003. }
  108004. }
  108005. return false;
  108006. }
  108007. function isTSImportType(node, opts) {
  108008. if (!node)
  108009. return false;
  108010. const nodeType = node.type;
  108011. if (nodeType === "TSImportType") {
  108012. if (typeof opts === "undefined") {
  108013. return true;
  108014. } else {
  108015. return (0, _shallowEqual.default)(node, opts);
  108016. }
  108017. }
  108018. return false;
  108019. }
  108020. function isTSImportEqualsDeclaration(node, opts) {
  108021. if (!node)
  108022. return false;
  108023. const nodeType = node.type;
  108024. if (nodeType === "TSImportEqualsDeclaration") {
  108025. if (typeof opts === "undefined") {
  108026. return true;
  108027. } else {
  108028. return (0, _shallowEqual.default)(node, opts);
  108029. }
  108030. }
  108031. return false;
  108032. }
  108033. function isTSExternalModuleReference(node, opts) {
  108034. if (!node)
  108035. return false;
  108036. const nodeType = node.type;
  108037. if (nodeType === "TSExternalModuleReference") {
  108038. if (typeof opts === "undefined") {
  108039. return true;
  108040. } else {
  108041. return (0, _shallowEqual.default)(node, opts);
  108042. }
  108043. }
  108044. return false;
  108045. }
  108046. function isTSNonNullExpression(node, opts) {
  108047. if (!node)
  108048. return false;
  108049. const nodeType = node.type;
  108050. if (nodeType === "TSNonNullExpression") {
  108051. if (typeof opts === "undefined") {
  108052. return true;
  108053. } else {
  108054. return (0, _shallowEqual.default)(node, opts);
  108055. }
  108056. }
  108057. return false;
  108058. }
  108059. function isTSExportAssignment(node, opts) {
  108060. if (!node)
  108061. return false;
  108062. const nodeType = node.type;
  108063. if (nodeType === "TSExportAssignment") {
  108064. if (typeof opts === "undefined") {
  108065. return true;
  108066. } else {
  108067. return (0, _shallowEqual.default)(node, opts);
  108068. }
  108069. }
  108070. return false;
  108071. }
  108072. function isTSNamespaceExportDeclaration(node, opts) {
  108073. if (!node)
  108074. return false;
  108075. const nodeType = node.type;
  108076. if (nodeType === "TSNamespaceExportDeclaration") {
  108077. if (typeof opts === "undefined") {
  108078. return true;
  108079. } else {
  108080. return (0, _shallowEqual.default)(node, opts);
  108081. }
  108082. }
  108083. return false;
  108084. }
  108085. function isTSTypeAnnotation(node, opts) {
  108086. if (!node)
  108087. return false;
  108088. const nodeType = node.type;
  108089. if (nodeType === "TSTypeAnnotation") {
  108090. if (typeof opts === "undefined") {
  108091. return true;
  108092. } else {
  108093. return (0, _shallowEqual.default)(node, opts);
  108094. }
  108095. }
  108096. return false;
  108097. }
  108098. function isTSTypeParameterInstantiation(node, opts) {
  108099. if (!node)
  108100. return false;
  108101. const nodeType = node.type;
  108102. if (nodeType === "TSTypeParameterInstantiation") {
  108103. if (typeof opts === "undefined") {
  108104. return true;
  108105. } else {
  108106. return (0, _shallowEqual.default)(node, opts);
  108107. }
  108108. }
  108109. return false;
  108110. }
  108111. function isTSTypeParameterDeclaration(node, opts) {
  108112. if (!node)
  108113. return false;
  108114. const nodeType = node.type;
  108115. if (nodeType === "TSTypeParameterDeclaration") {
  108116. if (typeof opts === "undefined") {
  108117. return true;
  108118. } else {
  108119. return (0, _shallowEqual.default)(node, opts);
  108120. }
  108121. }
  108122. return false;
  108123. }
  108124. function isTSTypeParameter(node, opts) {
  108125. if (!node)
  108126. return false;
  108127. const nodeType = node.type;
  108128. if (nodeType === "TSTypeParameter") {
  108129. if (typeof opts === "undefined") {
  108130. return true;
  108131. } else {
  108132. return (0, _shallowEqual.default)(node, opts);
  108133. }
  108134. }
  108135. return false;
  108136. }
  108137. function isExpression(node, opts) {
  108138. if (!node)
  108139. return false;
  108140. const nodeType = node.type;
  108141. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  108142. if (typeof opts === "undefined") {
  108143. return true;
  108144. } else {
  108145. return (0, _shallowEqual.default)(node, opts);
  108146. }
  108147. }
  108148. return false;
  108149. }
  108150. function isBinary(node, opts) {
  108151. if (!node)
  108152. return false;
  108153. const nodeType = node.type;
  108154. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  108155. if (typeof opts === "undefined") {
  108156. return true;
  108157. } else {
  108158. return (0, _shallowEqual.default)(node, opts);
  108159. }
  108160. }
  108161. return false;
  108162. }
  108163. function isScopable(node, opts) {
  108164. if (!node)
  108165. return false;
  108166. const nodeType = node.type;
  108167. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  108168. if (typeof opts === "undefined") {
  108169. return true;
  108170. } else {
  108171. return (0, _shallowEqual.default)(node, opts);
  108172. }
  108173. }
  108174. return false;
  108175. }
  108176. function isBlockParent(node, opts) {
  108177. if (!node)
  108178. return false;
  108179. const nodeType = node.type;
  108180. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  108181. if (typeof opts === "undefined") {
  108182. return true;
  108183. } else {
  108184. return (0, _shallowEqual.default)(node, opts);
  108185. }
  108186. }
  108187. return false;
  108188. }
  108189. function isBlock(node, opts) {
  108190. if (!node)
  108191. return false;
  108192. const nodeType = node.type;
  108193. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  108194. if (typeof opts === "undefined") {
  108195. return true;
  108196. } else {
  108197. return (0, _shallowEqual.default)(node, opts);
  108198. }
  108199. }
  108200. return false;
  108201. }
  108202. function isStatement(node, opts) {
  108203. if (!node)
  108204. return false;
  108205. const nodeType = node.type;
  108206. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  108207. if (typeof opts === "undefined") {
  108208. return true;
  108209. } else {
  108210. return (0, _shallowEqual.default)(node, opts);
  108211. }
  108212. }
  108213. return false;
  108214. }
  108215. function isTerminatorless(node, opts) {
  108216. if (!node)
  108217. return false;
  108218. const nodeType = node.type;
  108219. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  108220. if (typeof opts === "undefined") {
  108221. return true;
  108222. } else {
  108223. return (0, _shallowEqual.default)(node, opts);
  108224. }
  108225. }
  108226. return false;
  108227. }
  108228. function isCompletionStatement(node, opts) {
  108229. if (!node)
  108230. return false;
  108231. const nodeType = node.type;
  108232. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  108233. if (typeof opts === "undefined") {
  108234. return true;
  108235. } else {
  108236. return (0, _shallowEqual.default)(node, opts);
  108237. }
  108238. }
  108239. return false;
  108240. }
  108241. function isConditional(node, opts) {
  108242. if (!node)
  108243. return false;
  108244. const nodeType = node.type;
  108245. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  108246. if (typeof opts === "undefined") {
  108247. return true;
  108248. } else {
  108249. return (0, _shallowEqual.default)(node, opts);
  108250. }
  108251. }
  108252. return false;
  108253. }
  108254. function isLoop(node, opts) {
  108255. if (!node)
  108256. return false;
  108257. const nodeType = node.type;
  108258. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  108259. if (typeof opts === "undefined") {
  108260. return true;
  108261. } else {
  108262. return (0, _shallowEqual.default)(node, opts);
  108263. }
  108264. }
  108265. return false;
  108266. }
  108267. function isWhile(node, opts) {
  108268. if (!node)
  108269. return false;
  108270. const nodeType = node.type;
  108271. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  108272. if (typeof opts === "undefined") {
  108273. return true;
  108274. } else {
  108275. return (0, _shallowEqual.default)(node, opts);
  108276. }
  108277. }
  108278. return false;
  108279. }
  108280. function isExpressionWrapper(node, opts) {
  108281. if (!node)
  108282. return false;
  108283. const nodeType = node.type;
  108284. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  108285. if (typeof opts === "undefined") {
  108286. return true;
  108287. } else {
  108288. return (0, _shallowEqual.default)(node, opts);
  108289. }
  108290. }
  108291. return false;
  108292. }
  108293. function isFor(node, opts) {
  108294. if (!node)
  108295. return false;
  108296. const nodeType = node.type;
  108297. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  108298. if (typeof opts === "undefined") {
  108299. return true;
  108300. } else {
  108301. return (0, _shallowEqual.default)(node, opts);
  108302. }
  108303. }
  108304. return false;
  108305. }
  108306. function isForXStatement(node, opts) {
  108307. if (!node)
  108308. return false;
  108309. const nodeType = node.type;
  108310. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  108311. if (typeof opts === "undefined") {
  108312. return true;
  108313. } else {
  108314. return (0, _shallowEqual.default)(node, opts);
  108315. }
  108316. }
  108317. return false;
  108318. }
  108319. function isFunction(node, opts) {
  108320. if (!node)
  108321. return false;
  108322. const nodeType = node.type;
  108323. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  108324. if (typeof opts === "undefined") {
  108325. return true;
  108326. } else {
  108327. return (0, _shallowEqual.default)(node, opts);
  108328. }
  108329. }
  108330. return false;
  108331. }
  108332. function isFunctionParent(node, opts) {
  108333. if (!node)
  108334. return false;
  108335. const nodeType = node.type;
  108336. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  108337. if (typeof opts === "undefined") {
  108338. return true;
  108339. } else {
  108340. return (0, _shallowEqual.default)(node, opts);
  108341. }
  108342. }
  108343. return false;
  108344. }
  108345. function isPureish(node, opts) {
  108346. if (!node)
  108347. return false;
  108348. const nodeType = node.type;
  108349. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  108350. if (typeof opts === "undefined") {
  108351. return true;
  108352. } else {
  108353. return (0, _shallowEqual.default)(node, opts);
  108354. }
  108355. }
  108356. return false;
  108357. }
  108358. function isDeclaration2(node, opts) {
  108359. if (!node)
  108360. return false;
  108361. const nodeType = node.type;
  108362. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  108363. if (typeof opts === "undefined") {
  108364. return true;
  108365. } else {
  108366. return (0, _shallowEqual.default)(node, opts);
  108367. }
  108368. }
  108369. return false;
  108370. }
  108371. function isPatternLike(node, opts) {
  108372. if (!node)
  108373. return false;
  108374. const nodeType = node.type;
  108375. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  108376. if (typeof opts === "undefined") {
  108377. return true;
  108378. } else {
  108379. return (0, _shallowEqual.default)(node, opts);
  108380. }
  108381. }
  108382. return false;
  108383. }
  108384. function isLVal(node, opts) {
  108385. if (!node)
  108386. return false;
  108387. const nodeType = node.type;
  108388. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  108389. if (typeof opts === "undefined") {
  108390. return true;
  108391. } else {
  108392. return (0, _shallowEqual.default)(node, opts);
  108393. }
  108394. }
  108395. return false;
  108396. }
  108397. function isTSEntityName(node, opts) {
  108398. if (!node)
  108399. return false;
  108400. const nodeType = node.type;
  108401. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  108402. if (typeof opts === "undefined") {
  108403. return true;
  108404. } else {
  108405. return (0, _shallowEqual.default)(node, opts);
  108406. }
  108407. }
  108408. return false;
  108409. }
  108410. function isLiteral(node, opts) {
  108411. if (!node)
  108412. return false;
  108413. const nodeType = node.type;
  108414. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  108415. if (typeof opts === "undefined") {
  108416. return true;
  108417. } else {
  108418. return (0, _shallowEqual.default)(node, opts);
  108419. }
  108420. }
  108421. return false;
  108422. }
  108423. function isImmutable(node, opts) {
  108424. if (!node)
  108425. return false;
  108426. const nodeType = node.type;
  108427. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  108428. if (typeof opts === "undefined") {
  108429. return true;
  108430. } else {
  108431. return (0, _shallowEqual.default)(node, opts);
  108432. }
  108433. }
  108434. return false;
  108435. }
  108436. function isUserWhitespacable(node, opts) {
  108437. if (!node)
  108438. return false;
  108439. const nodeType = node.type;
  108440. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  108441. if (typeof opts === "undefined") {
  108442. return true;
  108443. } else {
  108444. return (0, _shallowEqual.default)(node, opts);
  108445. }
  108446. }
  108447. return false;
  108448. }
  108449. function isMethod(node, opts) {
  108450. if (!node)
  108451. return false;
  108452. const nodeType = node.type;
  108453. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  108454. if (typeof opts === "undefined") {
  108455. return true;
  108456. } else {
  108457. return (0, _shallowEqual.default)(node, opts);
  108458. }
  108459. }
  108460. return false;
  108461. }
  108462. function isObjectMember(node, opts) {
  108463. if (!node)
  108464. return false;
  108465. const nodeType = node.type;
  108466. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  108467. if (typeof opts === "undefined") {
  108468. return true;
  108469. } else {
  108470. return (0, _shallowEqual.default)(node, opts);
  108471. }
  108472. }
  108473. return false;
  108474. }
  108475. function isProperty(node, opts) {
  108476. if (!node)
  108477. return false;
  108478. const nodeType = node.type;
  108479. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  108480. if (typeof opts === "undefined") {
  108481. return true;
  108482. } else {
  108483. return (0, _shallowEqual.default)(node, opts);
  108484. }
  108485. }
  108486. return false;
  108487. }
  108488. function isUnaryLike(node, opts) {
  108489. if (!node)
  108490. return false;
  108491. const nodeType = node.type;
  108492. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  108493. if (typeof opts === "undefined") {
  108494. return true;
  108495. } else {
  108496. return (0, _shallowEqual.default)(node, opts);
  108497. }
  108498. }
  108499. return false;
  108500. }
  108501. function isPattern(node, opts) {
  108502. if (!node)
  108503. return false;
  108504. const nodeType = node.type;
  108505. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  108506. if (typeof opts === "undefined") {
  108507. return true;
  108508. } else {
  108509. return (0, _shallowEqual.default)(node, opts);
  108510. }
  108511. }
  108512. return false;
  108513. }
  108514. function isClass(node, opts) {
  108515. if (!node)
  108516. return false;
  108517. const nodeType = node.type;
  108518. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  108519. if (typeof opts === "undefined") {
  108520. return true;
  108521. } else {
  108522. return (0, _shallowEqual.default)(node, opts);
  108523. }
  108524. }
  108525. return false;
  108526. }
  108527. function isModuleDeclaration(node, opts) {
  108528. if (!node)
  108529. return false;
  108530. const nodeType = node.type;
  108531. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  108532. if (typeof opts === "undefined") {
  108533. return true;
  108534. } else {
  108535. return (0, _shallowEqual.default)(node, opts);
  108536. }
  108537. }
  108538. return false;
  108539. }
  108540. function isExportDeclaration(node, opts) {
  108541. if (!node)
  108542. return false;
  108543. const nodeType = node.type;
  108544. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  108545. if (typeof opts === "undefined") {
  108546. return true;
  108547. } else {
  108548. return (0, _shallowEqual.default)(node, opts);
  108549. }
  108550. }
  108551. return false;
  108552. }
  108553. function isModuleSpecifier(node, opts) {
  108554. if (!node)
  108555. return false;
  108556. const nodeType = node.type;
  108557. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  108558. if (typeof opts === "undefined") {
  108559. return true;
  108560. } else {
  108561. return (0, _shallowEqual.default)(node, opts);
  108562. }
  108563. }
  108564. return false;
  108565. }
  108566. function isFlow(node, opts) {
  108567. if (!node)
  108568. return false;
  108569. const nodeType = node.type;
  108570. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  108571. if (typeof opts === "undefined") {
  108572. return true;
  108573. } else {
  108574. return (0, _shallowEqual.default)(node, opts);
  108575. }
  108576. }
  108577. return false;
  108578. }
  108579. function isFlowType(node, opts) {
  108580. if (!node)
  108581. return false;
  108582. const nodeType = node.type;
  108583. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  108584. if (typeof opts === "undefined") {
  108585. return true;
  108586. } else {
  108587. return (0, _shallowEqual.default)(node, opts);
  108588. }
  108589. }
  108590. return false;
  108591. }
  108592. function isFlowBaseAnnotation(node, opts) {
  108593. if (!node)
  108594. return false;
  108595. const nodeType = node.type;
  108596. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  108597. if (typeof opts === "undefined") {
  108598. return true;
  108599. } else {
  108600. return (0, _shallowEqual.default)(node, opts);
  108601. }
  108602. }
  108603. return false;
  108604. }
  108605. function isFlowDeclaration(node, opts) {
  108606. if (!node)
  108607. return false;
  108608. const nodeType = node.type;
  108609. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  108610. if (typeof opts === "undefined") {
  108611. return true;
  108612. } else {
  108613. return (0, _shallowEqual.default)(node, opts);
  108614. }
  108615. }
  108616. return false;
  108617. }
  108618. function isFlowPredicate(node, opts) {
  108619. if (!node)
  108620. return false;
  108621. const nodeType = node.type;
  108622. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  108623. if (typeof opts === "undefined") {
  108624. return true;
  108625. } else {
  108626. return (0, _shallowEqual.default)(node, opts);
  108627. }
  108628. }
  108629. return false;
  108630. }
  108631. function isEnumBody(node, opts) {
  108632. if (!node)
  108633. return false;
  108634. const nodeType = node.type;
  108635. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  108636. if (typeof opts === "undefined") {
  108637. return true;
  108638. } else {
  108639. return (0, _shallowEqual.default)(node, opts);
  108640. }
  108641. }
  108642. return false;
  108643. }
  108644. function isEnumMember(node, opts) {
  108645. if (!node)
  108646. return false;
  108647. const nodeType = node.type;
  108648. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  108649. if (typeof opts === "undefined") {
  108650. return true;
  108651. } else {
  108652. return (0, _shallowEqual.default)(node, opts);
  108653. }
  108654. }
  108655. return false;
  108656. }
  108657. function isJSX(node, opts) {
  108658. if (!node)
  108659. return false;
  108660. const nodeType = node.type;
  108661. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  108662. if (typeof opts === "undefined") {
  108663. return true;
  108664. } else {
  108665. return (0, _shallowEqual.default)(node, opts);
  108666. }
  108667. }
  108668. return false;
  108669. }
  108670. function isPrivate(node, opts) {
  108671. if (!node)
  108672. return false;
  108673. const nodeType = node.type;
  108674. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  108675. if (typeof opts === "undefined") {
  108676. return true;
  108677. } else {
  108678. return (0, _shallowEqual.default)(node, opts);
  108679. }
  108680. }
  108681. return false;
  108682. }
  108683. function isTSTypeElement(node, opts) {
  108684. if (!node)
  108685. return false;
  108686. const nodeType = node.type;
  108687. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  108688. if (typeof opts === "undefined") {
  108689. return true;
  108690. } else {
  108691. return (0, _shallowEqual.default)(node, opts);
  108692. }
  108693. }
  108694. return false;
  108695. }
  108696. function isTSType(node, opts) {
  108697. if (!node)
  108698. return false;
  108699. const nodeType = node.type;
  108700. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  108701. if (typeof opts === "undefined") {
  108702. return true;
  108703. } else {
  108704. return (0, _shallowEqual.default)(node, opts);
  108705. }
  108706. }
  108707. return false;
  108708. }
  108709. function isTSBaseType(node, opts) {
  108710. if (!node)
  108711. return false;
  108712. const nodeType = node.type;
  108713. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  108714. if (typeof opts === "undefined") {
  108715. return true;
  108716. } else {
  108717. return (0, _shallowEqual.default)(node, opts);
  108718. }
  108719. }
  108720. return false;
  108721. }
  108722. function isNumberLiteral(node, opts) {
  108723. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  108724. if (!node)
  108725. return false;
  108726. const nodeType = node.type;
  108727. if (nodeType === "NumberLiteral") {
  108728. if (typeof opts === "undefined") {
  108729. return true;
  108730. } else {
  108731. return (0, _shallowEqual.default)(node, opts);
  108732. }
  108733. }
  108734. return false;
  108735. }
  108736. function isRegexLiteral(node, opts) {
  108737. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  108738. if (!node)
  108739. return false;
  108740. const nodeType = node.type;
  108741. if (nodeType === "RegexLiteral") {
  108742. if (typeof opts === "undefined") {
  108743. return true;
  108744. } else {
  108745. return (0, _shallowEqual.default)(node, opts);
  108746. }
  108747. }
  108748. return false;
  108749. }
  108750. function isRestProperty(node, opts) {
  108751. console.trace("The node type RestProperty has been renamed to RestElement");
  108752. if (!node)
  108753. return false;
  108754. const nodeType = node.type;
  108755. if (nodeType === "RestProperty") {
  108756. if (typeof opts === "undefined") {
  108757. return true;
  108758. } else {
  108759. return (0, _shallowEqual.default)(node, opts);
  108760. }
  108761. }
  108762. return false;
  108763. }
  108764. function isSpreadProperty(node, opts) {
  108765. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  108766. if (!node)
  108767. return false;
  108768. const nodeType = node.type;
  108769. if (nodeType === "SpreadProperty") {
  108770. if (typeof opts === "undefined") {
  108771. return true;
  108772. } else {
  108773. return (0, _shallowEqual.default)(node, opts);
  108774. }
  108775. }
  108776. return false;
  108777. }
  108778. }
  108779. });
  108780. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/matchesPattern.js
  108781. var require_matchesPattern5 = __commonJS({
  108782. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  108783. "use strict";
  108784. Object.defineProperty(exports, "__esModule", {
  108785. value: true
  108786. });
  108787. exports.default = matchesPattern;
  108788. var _generated = require_generated21();
  108789. function matchesPattern(member, match, allowPartial) {
  108790. if (!(0, _generated.isMemberExpression)(member))
  108791. return false;
  108792. const parts = Array.isArray(match) ? match : match.split(".");
  108793. const nodes = [];
  108794. let node;
  108795. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  108796. nodes.push(node.property);
  108797. }
  108798. nodes.push(node);
  108799. if (nodes.length < parts.length)
  108800. return false;
  108801. if (!allowPartial && nodes.length > parts.length)
  108802. return false;
  108803. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  108804. const node2 = nodes[j];
  108805. let value;
  108806. if ((0, _generated.isIdentifier)(node2)) {
  108807. value = node2.name;
  108808. } else if ((0, _generated.isStringLiteral)(node2)) {
  108809. value = node2.value;
  108810. } else if ((0, _generated.isThisExpression)(node2)) {
  108811. value = "this";
  108812. } else {
  108813. return false;
  108814. }
  108815. if (parts[i] !== value)
  108816. return false;
  108817. }
  108818. return true;
  108819. }
  108820. }
  108821. });
  108822. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  108823. var require_buildMatchMemberExpression5 = __commonJS({
  108824. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  108825. "use strict";
  108826. Object.defineProperty(exports, "__esModule", {
  108827. value: true
  108828. });
  108829. exports.default = buildMatchMemberExpression;
  108830. var _matchesPattern = require_matchesPattern5();
  108831. function buildMatchMemberExpression(match, allowPartial) {
  108832. const parts = match.split(".");
  108833. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  108834. }
  108835. }
  108836. });
  108837. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  108838. var require_isReactComponent5 = __commonJS({
  108839. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  108840. "use strict";
  108841. Object.defineProperty(exports, "__esModule", {
  108842. value: true
  108843. });
  108844. exports.default = void 0;
  108845. var _buildMatchMemberExpression = require_buildMatchMemberExpression5();
  108846. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  108847. var _default = isReactComponent;
  108848. exports.default = _default;
  108849. }
  108850. });
  108851. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  108852. var require_isCompatTag5 = __commonJS({
  108853. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  108854. "use strict";
  108855. Object.defineProperty(exports, "__esModule", {
  108856. value: true
  108857. });
  108858. exports.default = isCompatTag;
  108859. function isCompatTag(tagName) {
  108860. return !!tagName && /^[a-z]/.test(tagName);
  108861. }
  108862. }
  108863. });
  108864. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isType.js
  108865. var require_isType5 = __commonJS({
  108866. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  108867. "use strict";
  108868. Object.defineProperty(exports, "__esModule", {
  108869. value: true
  108870. });
  108871. exports.default = isType;
  108872. var _definitions = require_definitions5();
  108873. function isType(nodeType, targetType) {
  108874. if (nodeType === targetType)
  108875. return true;
  108876. if (_definitions.ALIAS_KEYS[targetType])
  108877. return false;
  108878. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  108879. if (aliases) {
  108880. if (aliases[0] === nodeType)
  108881. return true;
  108882. for (const alias of aliases) {
  108883. if (nodeType === alias)
  108884. return true;
  108885. }
  108886. }
  108887. return false;
  108888. }
  108889. }
  108890. });
  108891. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  108892. var require_isPlaceholderType5 = __commonJS({
  108893. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  108894. "use strict";
  108895. Object.defineProperty(exports, "__esModule", {
  108896. value: true
  108897. });
  108898. exports.default = isPlaceholderType;
  108899. var _definitions = require_definitions5();
  108900. function isPlaceholderType(placeholderType, targetType) {
  108901. if (placeholderType === targetType)
  108902. return true;
  108903. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  108904. if (aliases) {
  108905. for (const alias of aliases) {
  108906. if (targetType === alias)
  108907. return true;
  108908. }
  108909. }
  108910. return false;
  108911. }
  108912. }
  108913. });
  108914. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/is.js
  108915. var require_is5 = __commonJS({
  108916. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/is.js"(exports) {
  108917. "use strict";
  108918. Object.defineProperty(exports, "__esModule", {
  108919. value: true
  108920. });
  108921. exports.default = is;
  108922. var _shallowEqual = require_shallowEqual5();
  108923. var _isType = require_isType5();
  108924. var _isPlaceholderType = require_isPlaceholderType5();
  108925. var _definitions = require_definitions5();
  108926. function is(type, node, opts) {
  108927. if (!node)
  108928. return false;
  108929. const matches = (0, _isType.default)(node.type, type);
  108930. if (!matches) {
  108931. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  108932. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  108933. }
  108934. return false;
  108935. }
  108936. if (typeof opts === "undefined") {
  108937. return true;
  108938. } else {
  108939. return (0, _shallowEqual.default)(node, opts);
  108940. }
  108941. }
  108942. }
  108943. });
  108944. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  108945. var require_identifier7 = __commonJS({
  108946. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  108947. "use strict";
  108948. Object.defineProperty(exports, "__esModule", {
  108949. value: true
  108950. });
  108951. exports.isIdentifierStart = isIdentifierStart2;
  108952. exports.isIdentifierChar = isIdentifierChar2;
  108953. exports.isIdentifierName = isIdentifierName;
  108954. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  108955. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  108956. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  108957. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  108958. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  108959. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  108960. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  108961. function isInAstralSet2(code2, set) {
  108962. let pos = 65536;
  108963. for (let i = 0, length = set.length; i < length; i += 2) {
  108964. pos += set[i];
  108965. if (pos > code2)
  108966. return false;
  108967. pos += set[i + 1];
  108968. if (pos >= code2)
  108969. return true;
  108970. }
  108971. return false;
  108972. }
  108973. function isIdentifierStart2(code2) {
  108974. if (code2 < 65)
  108975. return code2 === 36;
  108976. if (code2 <= 90)
  108977. return true;
  108978. if (code2 < 97)
  108979. return code2 === 95;
  108980. if (code2 <= 122)
  108981. return true;
  108982. if (code2 <= 65535) {
  108983. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  108984. }
  108985. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  108986. }
  108987. function isIdentifierChar2(code2) {
  108988. if (code2 < 48)
  108989. return code2 === 36;
  108990. if (code2 < 58)
  108991. return true;
  108992. if (code2 < 65)
  108993. return false;
  108994. if (code2 <= 90)
  108995. return true;
  108996. if (code2 < 97)
  108997. return code2 === 95;
  108998. if (code2 <= 122)
  108999. return true;
  109000. if (code2 <= 65535) {
  109001. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  109002. }
  109003. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  109004. }
  109005. function isIdentifierName(name2) {
  109006. let isFirst = true;
  109007. for (let i = 0; i < name2.length; i++) {
  109008. let cp = name2.charCodeAt(i);
  109009. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  109010. const trail = name2.charCodeAt(++i);
  109011. if ((trail & 64512) === 56320) {
  109012. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  109013. }
  109014. }
  109015. if (isFirst) {
  109016. isFirst = false;
  109017. if (!isIdentifierStart2(cp)) {
  109018. return false;
  109019. }
  109020. } else if (!isIdentifierChar2(cp)) {
  109021. return false;
  109022. }
  109023. }
  109024. return !isFirst;
  109025. }
  109026. }
  109027. });
  109028. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  109029. var require_keyword7 = __commonJS({
  109030. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  109031. "use strict";
  109032. Object.defineProperty(exports, "__esModule", {
  109033. value: true
  109034. });
  109035. exports.isReservedWord = isReservedWord;
  109036. exports.isStrictReservedWord = isStrictReservedWord;
  109037. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  109038. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  109039. exports.isKeyword = isKeyword;
  109040. var reservedWords2 = {
  109041. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  109042. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  109043. strictBind: ["eval", "arguments"]
  109044. };
  109045. var keywords2 = new Set(reservedWords2.keyword);
  109046. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  109047. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  109048. function isReservedWord(word, inModule) {
  109049. return inModule && word === "await" || word === "enum";
  109050. }
  109051. function isStrictReservedWord(word, inModule) {
  109052. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  109053. }
  109054. function isStrictBindOnlyReservedWord(word) {
  109055. return reservedWordsStrictBindSet.has(word);
  109056. }
  109057. function isStrictBindReservedWord(word, inModule) {
  109058. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  109059. }
  109060. function isKeyword(word) {
  109061. return keywords2.has(word);
  109062. }
  109063. }
  109064. });
  109065. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/index.js
  109066. var require_lib26 = __commonJS({
  109067. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  109068. "use strict";
  109069. Object.defineProperty(exports, "__esModule", {
  109070. value: true
  109071. });
  109072. Object.defineProperty(exports, "isIdentifierName", {
  109073. enumerable: true,
  109074. get: function() {
  109075. return _identifier.isIdentifierName;
  109076. }
  109077. });
  109078. Object.defineProperty(exports, "isIdentifierChar", {
  109079. enumerable: true,
  109080. get: function() {
  109081. return _identifier.isIdentifierChar;
  109082. }
  109083. });
  109084. Object.defineProperty(exports, "isIdentifierStart", {
  109085. enumerable: true,
  109086. get: function() {
  109087. return _identifier.isIdentifierStart;
  109088. }
  109089. });
  109090. Object.defineProperty(exports, "isReservedWord", {
  109091. enumerable: true,
  109092. get: function() {
  109093. return _keyword.isReservedWord;
  109094. }
  109095. });
  109096. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  109097. enumerable: true,
  109098. get: function() {
  109099. return _keyword.isStrictBindOnlyReservedWord;
  109100. }
  109101. });
  109102. Object.defineProperty(exports, "isStrictBindReservedWord", {
  109103. enumerable: true,
  109104. get: function() {
  109105. return _keyword.isStrictBindReservedWord;
  109106. }
  109107. });
  109108. Object.defineProperty(exports, "isStrictReservedWord", {
  109109. enumerable: true,
  109110. get: function() {
  109111. return _keyword.isStrictReservedWord;
  109112. }
  109113. });
  109114. Object.defineProperty(exports, "isKeyword", {
  109115. enumerable: true,
  109116. get: function() {
  109117. return _keyword.isKeyword;
  109118. }
  109119. });
  109120. var _identifier = require_identifier7();
  109121. var _keyword = require_keyword7();
  109122. }
  109123. });
  109124. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  109125. var require_isValidIdentifier5 = __commonJS({
  109126. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  109127. "use strict";
  109128. Object.defineProperty(exports, "__esModule", {
  109129. value: true
  109130. });
  109131. exports.default = isValidIdentifier;
  109132. var _helperValidatorIdentifier = require_lib26();
  109133. function isValidIdentifier(name2, reserved = true) {
  109134. if (typeof name2 !== "string")
  109135. return false;
  109136. if (reserved) {
  109137. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  109138. return false;
  109139. }
  109140. }
  109141. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  109142. }
  109143. }
  109144. });
  109145. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/constants/index.js
  109146. var require_constants5 = __commonJS({
  109147. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/constants/index.js"(exports) {
  109148. "use strict";
  109149. Object.defineProperty(exports, "__esModule", {
  109150. value: true
  109151. });
  109152. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  109153. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  109154. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  109155. var FLATTENABLE_KEYS = ["body", "expressions"];
  109156. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  109157. var FOR_INIT_KEYS = ["left", "init"];
  109158. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  109159. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  109160. exports.COMMENT_KEYS = COMMENT_KEYS;
  109161. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  109162. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  109163. var UPDATE_OPERATORS = ["++", "--"];
  109164. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  109165. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  109166. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  109167. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  109168. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  109169. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  109170. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  109171. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  109172. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  109173. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  109174. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  109175. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  109176. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  109177. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  109178. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  109179. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  109180. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  109181. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  109182. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  109183. var STRING_UNARY_OPERATORS = ["typeof"];
  109184. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  109185. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  109186. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  109187. var INHERIT_KEYS = {
  109188. optional: ["typeAnnotation", "typeParameters", "returnType"],
  109189. force: ["start", "loc", "end"]
  109190. };
  109191. exports.INHERIT_KEYS = INHERIT_KEYS;
  109192. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  109193. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  109194. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  109195. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  109196. }
  109197. });
  109198. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/validate.js
  109199. var require_validate5 = __commonJS({
  109200. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  109201. "use strict";
  109202. Object.defineProperty(exports, "__esModule", {
  109203. value: true
  109204. });
  109205. exports.default = validate;
  109206. exports.validateField = validateField;
  109207. exports.validateChild = validateChild;
  109208. var _definitions = require_definitions5();
  109209. function validate(node, key, val) {
  109210. if (!node)
  109211. return;
  109212. const fields = _definitions.NODE_FIELDS[node.type];
  109213. if (!fields)
  109214. return;
  109215. const field = fields[key];
  109216. validateField(node, key, val, field);
  109217. validateChild(node, key, val);
  109218. }
  109219. function validateField(node, key, val, field) {
  109220. if (!(field != null && field.validate))
  109221. return;
  109222. if (field.optional && val == null)
  109223. return;
  109224. field.validate(node, key, val);
  109225. }
  109226. function validateChild(node, key, val) {
  109227. if (val == null)
  109228. return;
  109229. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  109230. if (!validate2)
  109231. return;
  109232. validate2(node, key, val);
  109233. }
  109234. }
  109235. });
  109236. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/utils.js
  109237. var require_utils5 = __commonJS({
  109238. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  109239. "use strict";
  109240. Object.defineProperty(exports, "__esModule", {
  109241. value: true
  109242. });
  109243. exports.validate = validate;
  109244. exports.typeIs = typeIs;
  109245. exports.validateType = validateType;
  109246. exports.validateOptional = validateOptional;
  109247. exports.validateOptionalType = validateOptionalType;
  109248. exports.arrayOf = arrayOf;
  109249. exports.arrayOfType = arrayOfType;
  109250. exports.validateArrayOfType = validateArrayOfType;
  109251. exports.assertEach = assertEach;
  109252. exports.assertOneOf = assertOneOf;
  109253. exports.assertNodeType = assertNodeType;
  109254. exports.assertNodeOrValueType = assertNodeOrValueType;
  109255. exports.assertValueType = assertValueType;
  109256. exports.assertShape = assertShape;
  109257. exports.assertOptionalChainStart = assertOptionalChainStart;
  109258. exports.chain = chain;
  109259. exports.default = defineType;
  109260. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  109261. var _is = require_is5();
  109262. var _validate = require_validate5();
  109263. var VISITOR_KEYS = {};
  109264. exports.VISITOR_KEYS = VISITOR_KEYS;
  109265. var ALIAS_KEYS = {};
  109266. exports.ALIAS_KEYS = ALIAS_KEYS;
  109267. var FLIPPED_ALIAS_KEYS = {};
  109268. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  109269. var NODE_FIELDS = {};
  109270. exports.NODE_FIELDS = NODE_FIELDS;
  109271. var BUILDER_KEYS = {};
  109272. exports.BUILDER_KEYS = BUILDER_KEYS;
  109273. var DEPRECATED_KEYS = {};
  109274. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  109275. var NODE_PARENT_VALIDATIONS = {};
  109276. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  109277. function getType(val) {
  109278. if (Array.isArray(val)) {
  109279. return "array";
  109280. } else if (val === null) {
  109281. return "null";
  109282. } else {
  109283. return typeof val;
  109284. }
  109285. }
  109286. function validate(validate2) {
  109287. return {
  109288. validate: validate2
  109289. };
  109290. }
  109291. function typeIs(typeName) {
  109292. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  109293. }
  109294. function validateType(typeName) {
  109295. return validate(typeIs(typeName));
  109296. }
  109297. function validateOptional(validate2) {
  109298. return {
  109299. validate: validate2,
  109300. optional: true
  109301. };
  109302. }
  109303. function validateOptionalType(typeName) {
  109304. return {
  109305. validate: typeIs(typeName),
  109306. optional: true
  109307. };
  109308. }
  109309. function arrayOf(elementType) {
  109310. return chain(assertValueType("array"), assertEach(elementType));
  109311. }
  109312. function arrayOfType(typeName) {
  109313. return arrayOf(typeIs(typeName));
  109314. }
  109315. function validateArrayOfType(typeName) {
  109316. return validate(arrayOfType(typeName));
  109317. }
  109318. function assertEach(callback) {
  109319. function validator(node, key, val) {
  109320. if (!Array.isArray(val))
  109321. return;
  109322. for (let i = 0; i < val.length; i++) {
  109323. const subkey = `${key}[${i}]`;
  109324. const v = val[i];
  109325. callback(node, subkey, v);
  109326. if (process.env.BABEL_TYPES_8_BREAKING)
  109327. (0, _validate.validateChild)(node, subkey, v);
  109328. }
  109329. }
  109330. validator.each = callback;
  109331. return validator;
  109332. }
  109333. function assertOneOf(...values) {
  109334. function validate2(node, key, val) {
  109335. if (values.indexOf(val) < 0) {
  109336. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  109337. }
  109338. }
  109339. validate2.oneOf = values;
  109340. return validate2;
  109341. }
  109342. function assertNodeType(...types2) {
  109343. function validate2(node, key, val) {
  109344. for (const type of types2) {
  109345. if ((0, _is.default)(type, val)) {
  109346. (0, _validate.validateChild)(node, key, val);
  109347. return;
  109348. }
  109349. }
  109350. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  109351. }
  109352. validate2.oneOfNodeTypes = types2;
  109353. return validate2;
  109354. }
  109355. function assertNodeOrValueType(...types2) {
  109356. function validate2(node, key, val) {
  109357. for (const type of types2) {
  109358. if (getType(val) === type || (0, _is.default)(type, val)) {
  109359. (0, _validate.validateChild)(node, key, val);
  109360. return;
  109361. }
  109362. }
  109363. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  109364. }
  109365. validate2.oneOfNodeOrValueTypes = types2;
  109366. return validate2;
  109367. }
  109368. function assertValueType(type) {
  109369. function validate2(node, key, val) {
  109370. const valid2 = getType(val) === type;
  109371. if (!valid2) {
  109372. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  109373. }
  109374. }
  109375. validate2.type = type;
  109376. return validate2;
  109377. }
  109378. function assertShape(shape) {
  109379. function validate2(node, key, val) {
  109380. const errors = [];
  109381. for (const property of Object.keys(shape)) {
  109382. try {
  109383. (0, _validate.validateField)(node, property, val[property], shape[property]);
  109384. } catch (error) {
  109385. if (error instanceof TypeError) {
  109386. errors.push(error.message);
  109387. continue;
  109388. }
  109389. throw error;
  109390. }
  109391. }
  109392. if (errors.length) {
  109393. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  109394. ${errors.join("\n")}`);
  109395. }
  109396. }
  109397. validate2.shapeOf = shape;
  109398. return validate2;
  109399. }
  109400. function assertOptionalChainStart() {
  109401. function validate2(node) {
  109402. var _current;
  109403. let current2 = node;
  109404. while (node) {
  109405. const {
  109406. type
  109407. } = current2;
  109408. if (type === "OptionalCallExpression") {
  109409. if (current2.optional)
  109410. return;
  109411. current2 = current2.callee;
  109412. continue;
  109413. }
  109414. if (type === "OptionalMemberExpression") {
  109415. if (current2.optional)
  109416. return;
  109417. current2 = current2.object;
  109418. continue;
  109419. }
  109420. break;
  109421. }
  109422. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  109423. }
  109424. return validate2;
  109425. }
  109426. function chain(...fns) {
  109427. function validate2(...args) {
  109428. for (const fn of fns) {
  109429. fn(...args);
  109430. }
  109431. }
  109432. validate2.chainOf = fns;
  109433. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  109434. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  109435. }
  109436. return validate2;
  109437. }
  109438. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  109439. var validFieldKeys = ["default", "optional", "validate"];
  109440. function defineType(type, opts = {}) {
  109441. const inherits = opts.inherits && store[opts.inherits] || {};
  109442. let fields = opts.fields;
  109443. if (!fields) {
  109444. fields = {};
  109445. if (inherits.fields) {
  109446. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  109447. for (const key of keys2) {
  109448. const field = inherits.fields[key];
  109449. const def = field.default;
  109450. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  109451. throw new Error("field defaults can only be primitives or empty arrays currently");
  109452. }
  109453. fields[key] = {
  109454. default: Array.isArray(def) ? [] : def,
  109455. optional: field.optional,
  109456. validate: field.validate
  109457. };
  109458. }
  109459. }
  109460. }
  109461. const visitor = opts.visitor || inherits.visitor || [];
  109462. const aliases = opts.aliases || inherits.aliases || [];
  109463. const builder = opts.builder || inherits.builder || opts.visitor || [];
  109464. for (const k of Object.keys(opts)) {
  109465. if (validTypeOpts.indexOf(k) === -1) {
  109466. throw new Error(`Unknown type option "${k}" on ${type}`);
  109467. }
  109468. }
  109469. if (opts.deprecatedAlias) {
  109470. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  109471. }
  109472. for (const key of visitor.concat(builder)) {
  109473. fields[key] = fields[key] || {};
  109474. }
  109475. for (const key of Object.keys(fields)) {
  109476. const field = fields[key];
  109477. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  109478. field.optional = true;
  109479. }
  109480. if (field.default === void 0) {
  109481. field.default = null;
  109482. } else if (!field.validate && field.default != null) {
  109483. field.validate = assertValueType(getType(field.default));
  109484. }
  109485. for (const k of Object.keys(field)) {
  109486. if (validFieldKeys.indexOf(k) === -1) {
  109487. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  109488. }
  109489. }
  109490. }
  109491. VISITOR_KEYS[type] = opts.visitor = visitor;
  109492. BUILDER_KEYS[type] = opts.builder = builder;
  109493. NODE_FIELDS[type] = opts.fields = fields;
  109494. ALIAS_KEYS[type] = opts.aliases = aliases;
  109495. aliases.forEach((alias) => {
  109496. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  109497. FLIPPED_ALIAS_KEYS[alias].push(type);
  109498. });
  109499. if (opts.validate) {
  109500. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  109501. }
  109502. store[type] = opts;
  109503. }
  109504. var store = {};
  109505. }
  109506. });
  109507. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/core.js
  109508. var require_core5 = __commonJS({
  109509. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  109510. "use strict";
  109511. Object.defineProperty(exports, "__esModule", {
  109512. value: true
  109513. });
  109514. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  109515. var _is = require_is5();
  109516. var _isValidIdentifier = require_isValidIdentifier5();
  109517. var _helperValidatorIdentifier = require_lib26();
  109518. var _constants = require_constants5();
  109519. var _utils = require_utils5();
  109520. (0, _utils.default)("ArrayExpression", {
  109521. fields: {
  109522. elements: {
  109523. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  109524. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  109525. }
  109526. },
  109527. visitor: ["elements"],
  109528. aliases: ["Expression"]
  109529. });
  109530. (0, _utils.default)("AssignmentExpression", {
  109531. fields: {
  109532. operator: {
  109533. validate: function() {
  109534. if (!process.env.BABEL_TYPES_8_BREAKING) {
  109535. return (0, _utils.assertValueType)("string");
  109536. }
  109537. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  109538. const pattern = (0, _utils.assertOneOf)("=");
  109539. return function(node, key, val) {
  109540. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  109541. validator(node, key, val);
  109542. };
  109543. }()
  109544. },
  109545. left: {
  109546. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  109547. },
  109548. right: {
  109549. validate: (0, _utils.assertNodeType)("Expression")
  109550. }
  109551. },
  109552. builder: ["operator", "left", "right"],
  109553. visitor: ["left", "right"],
  109554. aliases: ["Expression"]
  109555. });
  109556. (0, _utils.default)("BinaryExpression", {
  109557. builder: ["operator", "left", "right"],
  109558. fields: {
  109559. operator: {
  109560. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  109561. },
  109562. left: {
  109563. validate: function() {
  109564. const expression = (0, _utils.assertNodeType)("Expression");
  109565. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  109566. const validator = function(node, key, val) {
  109567. const validator2 = node.operator === "in" ? inOp : expression;
  109568. validator2(node, key, val);
  109569. };
  109570. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  109571. return validator;
  109572. }()
  109573. },
  109574. right: {
  109575. validate: (0, _utils.assertNodeType)("Expression")
  109576. }
  109577. },
  109578. visitor: ["left", "right"],
  109579. aliases: ["Binary", "Expression"]
  109580. });
  109581. (0, _utils.default)("InterpreterDirective", {
  109582. builder: ["value"],
  109583. fields: {
  109584. value: {
  109585. validate: (0, _utils.assertValueType)("string")
  109586. }
  109587. }
  109588. });
  109589. (0, _utils.default)("Directive", {
  109590. visitor: ["value"],
  109591. fields: {
  109592. value: {
  109593. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  109594. }
  109595. }
  109596. });
  109597. (0, _utils.default)("DirectiveLiteral", {
  109598. builder: ["value"],
  109599. fields: {
  109600. value: {
  109601. validate: (0, _utils.assertValueType)("string")
  109602. }
  109603. }
  109604. });
  109605. (0, _utils.default)("BlockStatement", {
  109606. builder: ["body", "directives"],
  109607. visitor: ["directives", "body"],
  109608. fields: {
  109609. directives: {
  109610. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  109611. default: []
  109612. },
  109613. body: {
  109614. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  109615. }
  109616. },
  109617. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  109618. });
  109619. (0, _utils.default)("BreakStatement", {
  109620. visitor: ["label"],
  109621. fields: {
  109622. label: {
  109623. validate: (0, _utils.assertNodeType)("Identifier"),
  109624. optional: true
  109625. }
  109626. },
  109627. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  109628. });
  109629. (0, _utils.default)("CallExpression", {
  109630. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  109631. builder: ["callee", "arguments"],
  109632. aliases: ["Expression"],
  109633. fields: Object.assign({
  109634. callee: {
  109635. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  109636. },
  109637. arguments: {
  109638. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  109639. }
  109640. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  109641. optional: {
  109642. validate: (0, _utils.assertOneOf)(true, false),
  109643. optional: true
  109644. }
  109645. } : {}, {
  109646. typeArguments: {
  109647. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  109648. optional: true
  109649. },
  109650. typeParameters: {
  109651. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  109652. optional: true
  109653. }
  109654. })
  109655. });
  109656. (0, _utils.default)("CatchClause", {
  109657. visitor: ["param", "body"],
  109658. fields: {
  109659. param: {
  109660. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  109661. optional: true
  109662. },
  109663. body: {
  109664. validate: (0, _utils.assertNodeType)("BlockStatement")
  109665. }
  109666. },
  109667. aliases: ["Scopable", "BlockParent"]
  109668. });
  109669. (0, _utils.default)("ConditionalExpression", {
  109670. visitor: ["test", "consequent", "alternate"],
  109671. fields: {
  109672. test: {
  109673. validate: (0, _utils.assertNodeType)("Expression")
  109674. },
  109675. consequent: {
  109676. validate: (0, _utils.assertNodeType)("Expression")
  109677. },
  109678. alternate: {
  109679. validate: (0, _utils.assertNodeType)("Expression")
  109680. }
  109681. },
  109682. aliases: ["Expression", "Conditional"]
  109683. });
  109684. (0, _utils.default)("ContinueStatement", {
  109685. visitor: ["label"],
  109686. fields: {
  109687. label: {
  109688. validate: (0, _utils.assertNodeType)("Identifier"),
  109689. optional: true
  109690. }
  109691. },
  109692. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  109693. });
  109694. (0, _utils.default)("DebuggerStatement", {
  109695. aliases: ["Statement"]
  109696. });
  109697. (0, _utils.default)("DoWhileStatement", {
  109698. visitor: ["test", "body"],
  109699. fields: {
  109700. test: {
  109701. validate: (0, _utils.assertNodeType)("Expression")
  109702. },
  109703. body: {
  109704. validate: (0, _utils.assertNodeType)("Statement")
  109705. }
  109706. },
  109707. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  109708. });
  109709. (0, _utils.default)("EmptyStatement", {
  109710. aliases: ["Statement"]
  109711. });
  109712. (0, _utils.default)("ExpressionStatement", {
  109713. visitor: ["expression"],
  109714. fields: {
  109715. expression: {
  109716. validate: (0, _utils.assertNodeType)("Expression")
  109717. }
  109718. },
  109719. aliases: ["Statement", "ExpressionWrapper"]
  109720. });
  109721. (0, _utils.default)("File", {
  109722. builder: ["program", "comments", "tokens"],
  109723. visitor: ["program"],
  109724. fields: {
  109725. program: {
  109726. validate: (0, _utils.assertNodeType)("Program")
  109727. },
  109728. comments: {
  109729. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  109730. }, {
  109731. each: {
  109732. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  109733. }
  109734. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  109735. optional: true
  109736. },
  109737. tokens: {
  109738. validate: (0, _utils.assertEach)(Object.assign(() => {
  109739. }, {
  109740. type: "any"
  109741. })),
  109742. optional: true
  109743. }
  109744. }
  109745. });
  109746. (0, _utils.default)("ForInStatement", {
  109747. visitor: ["left", "right", "body"],
  109748. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  109749. fields: {
  109750. left: {
  109751. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  109752. },
  109753. right: {
  109754. validate: (0, _utils.assertNodeType)("Expression")
  109755. },
  109756. body: {
  109757. validate: (0, _utils.assertNodeType)("Statement")
  109758. }
  109759. }
  109760. });
  109761. (0, _utils.default)("ForStatement", {
  109762. visitor: ["init", "test", "update", "body"],
  109763. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  109764. fields: {
  109765. init: {
  109766. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  109767. optional: true
  109768. },
  109769. test: {
  109770. validate: (0, _utils.assertNodeType)("Expression"),
  109771. optional: true
  109772. },
  109773. update: {
  109774. validate: (0, _utils.assertNodeType)("Expression"),
  109775. optional: true
  109776. },
  109777. body: {
  109778. validate: (0, _utils.assertNodeType)("Statement")
  109779. }
  109780. }
  109781. });
  109782. var functionCommon = {
  109783. params: {
  109784. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  109785. },
  109786. generator: {
  109787. default: false
  109788. },
  109789. async: {
  109790. default: false
  109791. }
  109792. };
  109793. exports.functionCommon = functionCommon;
  109794. var functionTypeAnnotationCommon = {
  109795. returnType: {
  109796. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  109797. optional: true
  109798. },
  109799. typeParameters: {
  109800. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  109801. optional: true
  109802. }
  109803. };
  109804. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  109805. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  109806. declare: {
  109807. validate: (0, _utils.assertValueType)("boolean"),
  109808. optional: true
  109809. },
  109810. id: {
  109811. validate: (0, _utils.assertNodeType)("Identifier"),
  109812. optional: true
  109813. }
  109814. });
  109815. exports.functionDeclarationCommon = functionDeclarationCommon;
  109816. (0, _utils.default)("FunctionDeclaration", {
  109817. builder: ["id", "params", "body", "generator", "async"],
  109818. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  109819. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  109820. body: {
  109821. validate: (0, _utils.assertNodeType)("BlockStatement")
  109822. }
  109823. }),
  109824. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  109825. validate: function() {
  109826. if (!process.env.BABEL_TYPES_8_BREAKING)
  109827. return () => {
  109828. };
  109829. const identifier = (0, _utils.assertNodeType)("Identifier");
  109830. return function(parent, key, node) {
  109831. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  109832. identifier(node, "id", node.id);
  109833. }
  109834. };
  109835. }()
  109836. });
  109837. (0, _utils.default)("FunctionExpression", {
  109838. inherits: "FunctionDeclaration",
  109839. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  109840. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  109841. id: {
  109842. validate: (0, _utils.assertNodeType)("Identifier"),
  109843. optional: true
  109844. },
  109845. body: {
  109846. validate: (0, _utils.assertNodeType)("BlockStatement")
  109847. }
  109848. })
  109849. });
  109850. var patternLikeCommon = {
  109851. typeAnnotation: {
  109852. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  109853. optional: true
  109854. },
  109855. decorators: {
  109856. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  109857. }
  109858. };
  109859. exports.patternLikeCommon = patternLikeCommon;
  109860. (0, _utils.default)("Identifier", {
  109861. builder: ["name"],
  109862. visitor: ["typeAnnotation", "decorators"],
  109863. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  109864. fields: Object.assign({}, patternLikeCommon, {
  109865. name: {
  109866. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  109867. if (!process.env.BABEL_TYPES_8_BREAKING)
  109868. return;
  109869. if (!(0, _isValidIdentifier.default)(val, false)) {
  109870. throw new TypeError(`"${val}" is not a valid identifier name`);
  109871. }
  109872. }, {
  109873. type: "string"
  109874. }))
  109875. },
  109876. optional: {
  109877. validate: (0, _utils.assertValueType)("boolean"),
  109878. optional: true
  109879. }
  109880. }),
  109881. validate(parent, key, node) {
  109882. if (!process.env.BABEL_TYPES_8_BREAKING)
  109883. return;
  109884. const match = /\.(\w+)$/.exec(key);
  109885. if (!match)
  109886. return;
  109887. const [, parentKey] = match;
  109888. const nonComp = {
  109889. computed: false
  109890. };
  109891. if (parentKey === "property") {
  109892. if ((0, _is.default)("MemberExpression", parent, nonComp))
  109893. return;
  109894. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  109895. return;
  109896. } else if (parentKey === "key") {
  109897. if ((0, _is.default)("Property", parent, nonComp))
  109898. return;
  109899. if ((0, _is.default)("Method", parent, nonComp))
  109900. return;
  109901. } else if (parentKey === "exported") {
  109902. if ((0, _is.default)("ExportSpecifier", parent))
  109903. return;
  109904. } else if (parentKey === "imported") {
  109905. if ((0, _is.default)("ImportSpecifier", parent, {
  109906. imported: node
  109907. }))
  109908. return;
  109909. } else if (parentKey === "meta") {
  109910. if ((0, _is.default)("MetaProperty", parent, {
  109911. meta: node
  109912. }))
  109913. return;
  109914. }
  109915. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  109916. throw new TypeError(`"${node.name}" is not a valid identifier`);
  109917. }
  109918. }
  109919. });
  109920. (0, _utils.default)("IfStatement", {
  109921. visitor: ["test", "consequent", "alternate"],
  109922. aliases: ["Statement", "Conditional"],
  109923. fields: {
  109924. test: {
  109925. validate: (0, _utils.assertNodeType)("Expression")
  109926. },
  109927. consequent: {
  109928. validate: (0, _utils.assertNodeType)("Statement")
  109929. },
  109930. alternate: {
  109931. optional: true,
  109932. validate: (0, _utils.assertNodeType)("Statement")
  109933. }
  109934. }
  109935. });
  109936. (0, _utils.default)("LabeledStatement", {
  109937. visitor: ["label", "body"],
  109938. aliases: ["Statement"],
  109939. fields: {
  109940. label: {
  109941. validate: (0, _utils.assertNodeType)("Identifier")
  109942. },
  109943. body: {
  109944. validate: (0, _utils.assertNodeType)("Statement")
  109945. }
  109946. }
  109947. });
  109948. (0, _utils.default)("StringLiteral", {
  109949. builder: ["value"],
  109950. fields: {
  109951. value: {
  109952. validate: (0, _utils.assertValueType)("string")
  109953. }
  109954. },
  109955. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  109956. });
  109957. (0, _utils.default)("NumericLiteral", {
  109958. builder: ["value"],
  109959. deprecatedAlias: "NumberLiteral",
  109960. fields: {
  109961. value: {
  109962. validate: (0, _utils.assertValueType)("number")
  109963. }
  109964. },
  109965. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  109966. });
  109967. (0, _utils.default)("NullLiteral", {
  109968. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  109969. });
  109970. (0, _utils.default)("BooleanLiteral", {
  109971. builder: ["value"],
  109972. fields: {
  109973. value: {
  109974. validate: (0, _utils.assertValueType)("boolean")
  109975. }
  109976. },
  109977. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  109978. });
  109979. (0, _utils.default)("RegExpLiteral", {
  109980. builder: ["pattern", "flags"],
  109981. deprecatedAlias: "RegexLiteral",
  109982. aliases: ["Expression", "Pureish", "Literal"],
  109983. fields: {
  109984. pattern: {
  109985. validate: (0, _utils.assertValueType)("string")
  109986. },
  109987. flags: {
  109988. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  109989. if (!process.env.BABEL_TYPES_8_BREAKING)
  109990. return;
  109991. const invalid2 = /[^gimsuy]/.exec(val);
  109992. if (invalid2) {
  109993. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  109994. }
  109995. }, {
  109996. type: "string"
  109997. })),
  109998. default: ""
  109999. }
  110000. }
  110001. });
  110002. (0, _utils.default)("LogicalExpression", {
  110003. builder: ["operator", "left", "right"],
  110004. visitor: ["left", "right"],
  110005. aliases: ["Binary", "Expression"],
  110006. fields: {
  110007. operator: {
  110008. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  110009. },
  110010. left: {
  110011. validate: (0, _utils.assertNodeType)("Expression")
  110012. },
  110013. right: {
  110014. validate: (0, _utils.assertNodeType)("Expression")
  110015. }
  110016. }
  110017. });
  110018. (0, _utils.default)("MemberExpression", {
  110019. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  110020. visitor: ["object", "property"],
  110021. aliases: ["Expression", "LVal"],
  110022. fields: Object.assign({
  110023. object: {
  110024. validate: (0, _utils.assertNodeType)("Expression")
  110025. },
  110026. property: {
  110027. validate: function() {
  110028. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  110029. const computed = (0, _utils.assertNodeType)("Expression");
  110030. const validator = function(node, key, val) {
  110031. const validator2 = node.computed ? computed : normal;
  110032. validator2(node, key, val);
  110033. };
  110034. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  110035. return validator;
  110036. }()
  110037. },
  110038. computed: {
  110039. default: false
  110040. }
  110041. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  110042. optional: {
  110043. validate: (0, _utils.assertOneOf)(true, false),
  110044. optional: true
  110045. }
  110046. } : {})
  110047. });
  110048. (0, _utils.default)("NewExpression", {
  110049. inherits: "CallExpression"
  110050. });
  110051. (0, _utils.default)("Program", {
  110052. visitor: ["directives", "body"],
  110053. builder: ["body", "directives", "sourceType", "interpreter"],
  110054. fields: {
  110055. sourceFile: {
  110056. validate: (0, _utils.assertValueType)("string")
  110057. },
  110058. sourceType: {
  110059. validate: (0, _utils.assertOneOf)("script", "module"),
  110060. default: "script"
  110061. },
  110062. interpreter: {
  110063. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  110064. default: null,
  110065. optional: true
  110066. },
  110067. directives: {
  110068. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  110069. default: []
  110070. },
  110071. body: {
  110072. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  110073. }
  110074. },
  110075. aliases: ["Scopable", "BlockParent", "Block"]
  110076. });
  110077. (0, _utils.default)("ObjectExpression", {
  110078. visitor: ["properties"],
  110079. aliases: ["Expression"],
  110080. fields: {
  110081. properties: {
  110082. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  110083. }
  110084. }
  110085. });
  110086. (0, _utils.default)("ObjectMethod", {
  110087. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  110088. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  110089. kind: Object.assign({
  110090. validate: (0, _utils.assertOneOf)("method", "get", "set")
  110091. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  110092. default: "method"
  110093. } : {}),
  110094. computed: {
  110095. default: false
  110096. },
  110097. key: {
  110098. validate: function() {
  110099. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  110100. const computed = (0, _utils.assertNodeType)("Expression");
  110101. const validator = function(node, key, val) {
  110102. const validator2 = node.computed ? computed : normal;
  110103. validator2(node, key, val);
  110104. };
  110105. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  110106. return validator;
  110107. }()
  110108. },
  110109. decorators: {
  110110. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110111. optional: true
  110112. },
  110113. body: {
  110114. validate: (0, _utils.assertNodeType)("BlockStatement")
  110115. }
  110116. }),
  110117. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  110118. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  110119. });
  110120. (0, _utils.default)("ObjectProperty", {
  110121. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  110122. fields: {
  110123. computed: {
  110124. default: false
  110125. },
  110126. key: {
  110127. validate: function() {
  110128. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  110129. const computed = (0, _utils.assertNodeType)("Expression");
  110130. const validator = function(node, key, val) {
  110131. const validator2 = node.computed ? computed : normal;
  110132. validator2(node, key, val);
  110133. };
  110134. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  110135. return validator;
  110136. }()
  110137. },
  110138. value: {
  110139. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  110140. },
  110141. shorthand: {
  110142. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  110143. if (!process.env.BABEL_TYPES_8_BREAKING)
  110144. return;
  110145. if (val && node.computed) {
  110146. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  110147. }
  110148. }, {
  110149. type: "boolean"
  110150. }), function(node, key, val) {
  110151. if (!process.env.BABEL_TYPES_8_BREAKING)
  110152. return;
  110153. if (val && !(0, _is.default)("Identifier", node.key)) {
  110154. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  110155. }
  110156. }),
  110157. default: false
  110158. },
  110159. decorators: {
  110160. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110161. optional: true
  110162. }
  110163. },
  110164. visitor: ["key", "value", "decorators"],
  110165. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  110166. validate: function() {
  110167. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  110168. const expression = (0, _utils.assertNodeType)("Expression");
  110169. return function(parent, key, node) {
  110170. if (!process.env.BABEL_TYPES_8_BREAKING)
  110171. return;
  110172. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  110173. validator(node, "value", node.value);
  110174. };
  110175. }()
  110176. });
  110177. (0, _utils.default)("RestElement", {
  110178. visitor: ["argument", "typeAnnotation"],
  110179. builder: ["argument"],
  110180. aliases: ["LVal", "PatternLike"],
  110181. deprecatedAlias: "RestProperty",
  110182. fields: Object.assign({}, patternLikeCommon, {
  110183. argument: {
  110184. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  110185. }
  110186. }),
  110187. validate(parent, key) {
  110188. if (!process.env.BABEL_TYPES_8_BREAKING)
  110189. return;
  110190. const match = /(\w+)\[(\d+)\]/.exec(key);
  110191. if (!match)
  110192. throw new Error("Internal Babel error: malformed key.");
  110193. const [, listKey, index2] = match;
  110194. if (parent[listKey].length > index2 + 1) {
  110195. throw new TypeError(`RestElement must be last element of ${listKey}`);
  110196. }
  110197. }
  110198. });
  110199. (0, _utils.default)("ReturnStatement", {
  110200. visitor: ["argument"],
  110201. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  110202. fields: {
  110203. argument: {
  110204. validate: (0, _utils.assertNodeType)("Expression"),
  110205. optional: true
  110206. }
  110207. }
  110208. });
  110209. (0, _utils.default)("SequenceExpression", {
  110210. visitor: ["expressions"],
  110211. fields: {
  110212. expressions: {
  110213. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  110214. }
  110215. },
  110216. aliases: ["Expression"]
  110217. });
  110218. (0, _utils.default)("ParenthesizedExpression", {
  110219. visitor: ["expression"],
  110220. aliases: ["Expression", "ExpressionWrapper"],
  110221. fields: {
  110222. expression: {
  110223. validate: (0, _utils.assertNodeType)("Expression")
  110224. }
  110225. }
  110226. });
  110227. (0, _utils.default)("SwitchCase", {
  110228. visitor: ["test", "consequent"],
  110229. fields: {
  110230. test: {
  110231. validate: (0, _utils.assertNodeType)("Expression"),
  110232. optional: true
  110233. },
  110234. consequent: {
  110235. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  110236. }
  110237. }
  110238. });
  110239. (0, _utils.default)("SwitchStatement", {
  110240. visitor: ["discriminant", "cases"],
  110241. aliases: ["Statement", "BlockParent", "Scopable"],
  110242. fields: {
  110243. discriminant: {
  110244. validate: (0, _utils.assertNodeType)("Expression")
  110245. },
  110246. cases: {
  110247. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  110248. }
  110249. }
  110250. });
  110251. (0, _utils.default)("ThisExpression", {
  110252. aliases: ["Expression"]
  110253. });
  110254. (0, _utils.default)("ThrowStatement", {
  110255. visitor: ["argument"],
  110256. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  110257. fields: {
  110258. argument: {
  110259. validate: (0, _utils.assertNodeType)("Expression")
  110260. }
  110261. }
  110262. });
  110263. (0, _utils.default)("TryStatement", {
  110264. visitor: ["block", "handler", "finalizer"],
  110265. aliases: ["Statement"],
  110266. fields: {
  110267. block: {
  110268. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  110269. if (!process.env.BABEL_TYPES_8_BREAKING)
  110270. return;
  110271. if (!node.handler && !node.finalizer) {
  110272. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  110273. }
  110274. }, {
  110275. oneOfNodeTypes: ["BlockStatement"]
  110276. }))
  110277. },
  110278. handler: {
  110279. optional: true,
  110280. validate: (0, _utils.assertNodeType)("CatchClause")
  110281. },
  110282. finalizer: {
  110283. optional: true,
  110284. validate: (0, _utils.assertNodeType)("BlockStatement")
  110285. }
  110286. }
  110287. });
  110288. (0, _utils.default)("UnaryExpression", {
  110289. builder: ["operator", "argument", "prefix"],
  110290. fields: {
  110291. prefix: {
  110292. default: true
  110293. },
  110294. argument: {
  110295. validate: (0, _utils.assertNodeType)("Expression")
  110296. },
  110297. operator: {
  110298. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  110299. }
  110300. },
  110301. visitor: ["argument"],
  110302. aliases: ["UnaryLike", "Expression"]
  110303. });
  110304. (0, _utils.default)("UpdateExpression", {
  110305. builder: ["operator", "argument", "prefix"],
  110306. fields: {
  110307. prefix: {
  110308. default: false
  110309. },
  110310. argument: {
  110311. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  110312. },
  110313. operator: {
  110314. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  110315. }
  110316. },
  110317. visitor: ["argument"],
  110318. aliases: ["Expression"]
  110319. });
  110320. (0, _utils.default)("VariableDeclaration", {
  110321. builder: ["kind", "declarations"],
  110322. visitor: ["declarations"],
  110323. aliases: ["Statement", "Declaration"],
  110324. fields: {
  110325. declare: {
  110326. validate: (0, _utils.assertValueType)("boolean"),
  110327. optional: true
  110328. },
  110329. kind: {
  110330. validate: (0, _utils.assertOneOf)("var", "let", "const")
  110331. },
  110332. declarations: {
  110333. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  110334. }
  110335. },
  110336. validate(parent, key, node) {
  110337. if (!process.env.BABEL_TYPES_8_BREAKING)
  110338. return;
  110339. if (!(0, _is.default)("ForXStatement", parent, {
  110340. left: node
  110341. }))
  110342. return;
  110343. if (node.declarations.length !== 1) {
  110344. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  110345. }
  110346. }
  110347. });
  110348. (0, _utils.default)("VariableDeclarator", {
  110349. visitor: ["id", "init"],
  110350. fields: {
  110351. id: {
  110352. validate: function() {
  110353. if (!process.env.BABEL_TYPES_8_BREAKING) {
  110354. return (0, _utils.assertNodeType)("LVal");
  110355. }
  110356. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  110357. const without = (0, _utils.assertNodeType)("Identifier");
  110358. return function(node, key, val) {
  110359. const validator = node.init ? normal : without;
  110360. validator(node, key, val);
  110361. };
  110362. }()
  110363. },
  110364. definite: {
  110365. optional: true,
  110366. validate: (0, _utils.assertValueType)("boolean")
  110367. },
  110368. init: {
  110369. optional: true,
  110370. validate: (0, _utils.assertNodeType)("Expression")
  110371. }
  110372. }
  110373. });
  110374. (0, _utils.default)("WhileStatement", {
  110375. visitor: ["test", "body"],
  110376. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  110377. fields: {
  110378. test: {
  110379. validate: (0, _utils.assertNodeType)("Expression")
  110380. },
  110381. body: {
  110382. validate: (0, _utils.assertNodeType)("Statement")
  110383. }
  110384. }
  110385. });
  110386. (0, _utils.default)("WithStatement", {
  110387. visitor: ["object", "body"],
  110388. aliases: ["Statement"],
  110389. fields: {
  110390. object: {
  110391. validate: (0, _utils.assertNodeType)("Expression")
  110392. },
  110393. body: {
  110394. validate: (0, _utils.assertNodeType)("Statement")
  110395. }
  110396. }
  110397. });
  110398. (0, _utils.default)("AssignmentPattern", {
  110399. visitor: ["left", "right", "decorators"],
  110400. builder: ["left", "right"],
  110401. aliases: ["Pattern", "PatternLike", "LVal"],
  110402. fields: Object.assign({}, patternLikeCommon, {
  110403. left: {
  110404. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  110405. },
  110406. right: {
  110407. validate: (0, _utils.assertNodeType)("Expression")
  110408. },
  110409. decorators: {
  110410. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110411. optional: true
  110412. }
  110413. })
  110414. });
  110415. (0, _utils.default)("ArrayPattern", {
  110416. visitor: ["elements", "typeAnnotation"],
  110417. builder: ["elements"],
  110418. aliases: ["Pattern", "PatternLike", "LVal"],
  110419. fields: Object.assign({}, patternLikeCommon, {
  110420. elements: {
  110421. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  110422. },
  110423. decorators: {
  110424. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110425. optional: true
  110426. }
  110427. })
  110428. });
  110429. (0, _utils.default)("ArrowFunctionExpression", {
  110430. builder: ["params", "body", "async"],
  110431. visitor: ["params", "body", "returnType", "typeParameters"],
  110432. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  110433. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  110434. expression: {
  110435. validate: (0, _utils.assertValueType)("boolean")
  110436. },
  110437. body: {
  110438. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  110439. }
  110440. })
  110441. });
  110442. (0, _utils.default)("ClassBody", {
  110443. visitor: ["body"],
  110444. fields: {
  110445. body: {
  110446. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  110447. }
  110448. }
  110449. });
  110450. (0, _utils.default)("ClassExpression", {
  110451. builder: ["id", "superClass", "body", "decorators"],
  110452. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  110453. aliases: ["Scopable", "Class", "Expression"],
  110454. fields: {
  110455. id: {
  110456. validate: (0, _utils.assertNodeType)("Identifier"),
  110457. optional: true
  110458. },
  110459. typeParameters: {
  110460. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  110461. optional: true
  110462. },
  110463. body: {
  110464. validate: (0, _utils.assertNodeType)("ClassBody")
  110465. },
  110466. superClass: {
  110467. optional: true,
  110468. validate: (0, _utils.assertNodeType)("Expression")
  110469. },
  110470. superTypeParameters: {
  110471. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  110472. optional: true
  110473. },
  110474. implements: {
  110475. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  110476. optional: true
  110477. },
  110478. decorators: {
  110479. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110480. optional: true
  110481. },
  110482. mixins: {
  110483. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  110484. optional: true
  110485. }
  110486. }
  110487. });
  110488. (0, _utils.default)("ClassDeclaration", {
  110489. inherits: "ClassExpression",
  110490. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  110491. fields: {
  110492. id: {
  110493. validate: (0, _utils.assertNodeType)("Identifier")
  110494. },
  110495. typeParameters: {
  110496. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  110497. optional: true
  110498. },
  110499. body: {
  110500. validate: (0, _utils.assertNodeType)("ClassBody")
  110501. },
  110502. superClass: {
  110503. optional: true,
  110504. validate: (0, _utils.assertNodeType)("Expression")
  110505. },
  110506. superTypeParameters: {
  110507. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  110508. optional: true
  110509. },
  110510. implements: {
  110511. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  110512. optional: true
  110513. },
  110514. decorators: {
  110515. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110516. optional: true
  110517. },
  110518. mixins: {
  110519. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  110520. optional: true
  110521. },
  110522. declare: {
  110523. validate: (0, _utils.assertValueType)("boolean"),
  110524. optional: true
  110525. },
  110526. abstract: {
  110527. validate: (0, _utils.assertValueType)("boolean"),
  110528. optional: true
  110529. }
  110530. },
  110531. validate: function() {
  110532. const identifier = (0, _utils.assertNodeType)("Identifier");
  110533. return function(parent, key, node) {
  110534. if (!process.env.BABEL_TYPES_8_BREAKING)
  110535. return;
  110536. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  110537. identifier(node, "id", node.id);
  110538. }
  110539. };
  110540. }()
  110541. });
  110542. (0, _utils.default)("ExportAllDeclaration", {
  110543. visitor: ["source"],
  110544. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  110545. fields: {
  110546. source: {
  110547. validate: (0, _utils.assertNodeType)("StringLiteral")
  110548. },
  110549. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  110550. assertions: {
  110551. optional: true,
  110552. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  110553. }
  110554. }
  110555. });
  110556. (0, _utils.default)("ExportDefaultDeclaration", {
  110557. visitor: ["declaration"],
  110558. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  110559. fields: {
  110560. declaration: {
  110561. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  110562. }
  110563. }
  110564. });
  110565. (0, _utils.default)("ExportNamedDeclaration", {
  110566. visitor: ["declaration", "specifiers", "source"],
  110567. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  110568. fields: {
  110569. declaration: {
  110570. optional: true,
  110571. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  110572. if (!process.env.BABEL_TYPES_8_BREAKING)
  110573. return;
  110574. if (val && node.specifiers.length) {
  110575. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  110576. }
  110577. }, {
  110578. oneOfNodeTypes: ["Declaration"]
  110579. }), function(node, key, val) {
  110580. if (!process.env.BABEL_TYPES_8_BREAKING)
  110581. return;
  110582. if (val && node.source) {
  110583. throw new TypeError("Cannot export a declaration from a source");
  110584. }
  110585. })
  110586. },
  110587. assertions: {
  110588. optional: true,
  110589. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  110590. },
  110591. specifiers: {
  110592. default: [],
  110593. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  110594. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  110595. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  110596. if (!process.env.BABEL_TYPES_8_BREAKING)
  110597. return sourced;
  110598. return function(node, key, val) {
  110599. const validator = node.source ? sourced : sourceless;
  110600. validator(node, key, val);
  110601. };
  110602. }()))
  110603. },
  110604. source: {
  110605. validate: (0, _utils.assertNodeType)("StringLiteral"),
  110606. optional: true
  110607. },
  110608. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  110609. }
  110610. });
  110611. (0, _utils.default)("ExportSpecifier", {
  110612. visitor: ["local", "exported"],
  110613. aliases: ["ModuleSpecifier"],
  110614. fields: {
  110615. local: {
  110616. validate: (0, _utils.assertNodeType)("Identifier")
  110617. },
  110618. exported: {
  110619. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  110620. }
  110621. }
  110622. });
  110623. (0, _utils.default)("ForOfStatement", {
  110624. visitor: ["left", "right", "body"],
  110625. builder: ["left", "right", "body", "await"],
  110626. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  110627. fields: {
  110628. left: {
  110629. validate: function() {
  110630. if (!process.env.BABEL_TYPES_8_BREAKING) {
  110631. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  110632. }
  110633. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  110634. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  110635. return function(node, key, val) {
  110636. if ((0, _is.default)("VariableDeclaration", val)) {
  110637. declaration(node, key, val);
  110638. } else {
  110639. lval(node, key, val);
  110640. }
  110641. };
  110642. }()
  110643. },
  110644. right: {
  110645. validate: (0, _utils.assertNodeType)("Expression")
  110646. },
  110647. body: {
  110648. validate: (0, _utils.assertNodeType)("Statement")
  110649. },
  110650. await: {
  110651. default: false
  110652. }
  110653. }
  110654. });
  110655. (0, _utils.default)("ImportDeclaration", {
  110656. visitor: ["specifiers", "source"],
  110657. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  110658. fields: {
  110659. assertions: {
  110660. optional: true,
  110661. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  110662. },
  110663. specifiers: {
  110664. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  110665. },
  110666. source: {
  110667. validate: (0, _utils.assertNodeType)("StringLiteral")
  110668. },
  110669. importKind: {
  110670. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  110671. optional: true
  110672. }
  110673. }
  110674. });
  110675. (0, _utils.default)("ImportDefaultSpecifier", {
  110676. visitor: ["local"],
  110677. aliases: ["ModuleSpecifier"],
  110678. fields: {
  110679. local: {
  110680. validate: (0, _utils.assertNodeType)("Identifier")
  110681. }
  110682. }
  110683. });
  110684. (0, _utils.default)("ImportNamespaceSpecifier", {
  110685. visitor: ["local"],
  110686. aliases: ["ModuleSpecifier"],
  110687. fields: {
  110688. local: {
  110689. validate: (0, _utils.assertNodeType)("Identifier")
  110690. }
  110691. }
  110692. });
  110693. (0, _utils.default)("ImportSpecifier", {
  110694. visitor: ["local", "imported"],
  110695. aliases: ["ModuleSpecifier"],
  110696. fields: {
  110697. local: {
  110698. validate: (0, _utils.assertNodeType)("Identifier")
  110699. },
  110700. imported: {
  110701. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  110702. },
  110703. importKind: {
  110704. validate: (0, _utils.assertOneOf)("type", "typeof"),
  110705. optional: true
  110706. }
  110707. }
  110708. });
  110709. (0, _utils.default)("MetaProperty", {
  110710. visitor: ["meta", "property"],
  110711. aliases: ["Expression"],
  110712. fields: {
  110713. meta: {
  110714. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  110715. if (!process.env.BABEL_TYPES_8_BREAKING)
  110716. return;
  110717. let property;
  110718. switch (val.name) {
  110719. case "function":
  110720. property = "sent";
  110721. break;
  110722. case "new":
  110723. property = "target";
  110724. break;
  110725. case "import":
  110726. property = "meta";
  110727. break;
  110728. }
  110729. if (!(0, _is.default)("Identifier", node.property, {
  110730. name: property
  110731. })) {
  110732. throw new TypeError("Unrecognised MetaProperty");
  110733. }
  110734. }, {
  110735. oneOfNodeTypes: ["Identifier"]
  110736. }))
  110737. },
  110738. property: {
  110739. validate: (0, _utils.assertNodeType)("Identifier")
  110740. }
  110741. }
  110742. });
  110743. var classMethodOrPropertyCommon = {
  110744. abstract: {
  110745. validate: (0, _utils.assertValueType)("boolean"),
  110746. optional: true
  110747. },
  110748. accessibility: {
  110749. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  110750. optional: true
  110751. },
  110752. static: {
  110753. default: false
  110754. },
  110755. override: {
  110756. default: false
  110757. },
  110758. computed: {
  110759. default: false
  110760. },
  110761. optional: {
  110762. validate: (0, _utils.assertValueType)("boolean"),
  110763. optional: true
  110764. },
  110765. key: {
  110766. validate: (0, _utils.chain)(function() {
  110767. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  110768. const computed = (0, _utils.assertNodeType)("Expression");
  110769. return function(node, key, val) {
  110770. const validator = node.computed ? computed : normal;
  110771. validator(node, key, val);
  110772. };
  110773. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  110774. }
  110775. };
  110776. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  110777. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  110778. params: {
  110779. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  110780. },
  110781. kind: {
  110782. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  110783. default: "method"
  110784. },
  110785. access: {
  110786. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  110787. optional: true
  110788. },
  110789. decorators: {
  110790. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  110791. optional: true
  110792. }
  110793. });
  110794. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  110795. (0, _utils.default)("ClassMethod", {
  110796. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  110797. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  110798. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  110799. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  110800. body: {
  110801. validate: (0, _utils.assertNodeType)("BlockStatement")
  110802. }
  110803. })
  110804. });
  110805. (0, _utils.default)("ObjectPattern", {
  110806. visitor: ["properties", "typeAnnotation", "decorators"],
  110807. builder: ["properties"],
  110808. aliases: ["Pattern", "PatternLike", "LVal"],
  110809. fields: Object.assign({}, patternLikeCommon, {
  110810. properties: {
  110811. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  110812. }
  110813. })
  110814. });
  110815. (0, _utils.default)("SpreadElement", {
  110816. visitor: ["argument"],
  110817. aliases: ["UnaryLike"],
  110818. deprecatedAlias: "SpreadProperty",
  110819. fields: {
  110820. argument: {
  110821. validate: (0, _utils.assertNodeType)("Expression")
  110822. }
  110823. }
  110824. });
  110825. (0, _utils.default)("Super", {
  110826. aliases: ["Expression"]
  110827. });
  110828. (0, _utils.default)("TaggedTemplateExpression", {
  110829. visitor: ["tag", "quasi"],
  110830. aliases: ["Expression"],
  110831. fields: {
  110832. tag: {
  110833. validate: (0, _utils.assertNodeType)("Expression")
  110834. },
  110835. quasi: {
  110836. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  110837. },
  110838. typeParameters: {
  110839. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  110840. optional: true
  110841. }
  110842. }
  110843. });
  110844. (0, _utils.default)("TemplateElement", {
  110845. builder: ["value", "tail"],
  110846. fields: {
  110847. value: {
  110848. validate: (0, _utils.assertShape)({
  110849. raw: {
  110850. validate: (0, _utils.assertValueType)("string")
  110851. },
  110852. cooked: {
  110853. validate: (0, _utils.assertValueType)("string"),
  110854. optional: true
  110855. }
  110856. })
  110857. },
  110858. tail: {
  110859. default: false
  110860. }
  110861. }
  110862. });
  110863. (0, _utils.default)("TemplateLiteral", {
  110864. visitor: ["quasis", "expressions"],
  110865. aliases: ["Expression", "Literal"],
  110866. fields: {
  110867. quasis: {
  110868. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  110869. },
  110870. expressions: {
  110871. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  110872. if (node.quasis.length !== val.length + 1) {
  110873. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  110874. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  110875. }
  110876. })
  110877. }
  110878. }
  110879. });
  110880. (0, _utils.default)("YieldExpression", {
  110881. builder: ["argument", "delegate"],
  110882. visitor: ["argument"],
  110883. aliases: ["Expression", "Terminatorless"],
  110884. fields: {
  110885. delegate: {
  110886. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  110887. if (!process.env.BABEL_TYPES_8_BREAKING)
  110888. return;
  110889. if (val && !node.argument) {
  110890. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  110891. }
  110892. }, {
  110893. type: "boolean"
  110894. })),
  110895. default: false
  110896. },
  110897. argument: {
  110898. optional: true,
  110899. validate: (0, _utils.assertNodeType)("Expression")
  110900. }
  110901. }
  110902. });
  110903. (0, _utils.default)("AwaitExpression", {
  110904. builder: ["argument"],
  110905. visitor: ["argument"],
  110906. aliases: ["Expression", "Terminatorless"],
  110907. fields: {
  110908. argument: {
  110909. validate: (0, _utils.assertNodeType)("Expression")
  110910. }
  110911. }
  110912. });
  110913. (0, _utils.default)("Import", {
  110914. aliases: ["Expression"]
  110915. });
  110916. (0, _utils.default)("BigIntLiteral", {
  110917. builder: ["value"],
  110918. fields: {
  110919. value: {
  110920. validate: (0, _utils.assertValueType)("string")
  110921. }
  110922. },
  110923. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  110924. });
  110925. (0, _utils.default)("ExportNamespaceSpecifier", {
  110926. visitor: ["exported"],
  110927. aliases: ["ModuleSpecifier"],
  110928. fields: {
  110929. exported: {
  110930. validate: (0, _utils.assertNodeType)("Identifier")
  110931. }
  110932. }
  110933. });
  110934. (0, _utils.default)("OptionalMemberExpression", {
  110935. builder: ["object", "property", "computed", "optional"],
  110936. visitor: ["object", "property"],
  110937. aliases: ["Expression"],
  110938. fields: {
  110939. object: {
  110940. validate: (0, _utils.assertNodeType)("Expression")
  110941. },
  110942. property: {
  110943. validate: function() {
  110944. const normal = (0, _utils.assertNodeType)("Identifier");
  110945. const computed = (0, _utils.assertNodeType)("Expression");
  110946. const validator = function(node, key, val) {
  110947. const validator2 = node.computed ? computed : normal;
  110948. validator2(node, key, val);
  110949. };
  110950. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  110951. return validator;
  110952. }()
  110953. },
  110954. computed: {
  110955. default: false
  110956. },
  110957. optional: {
  110958. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  110959. }
  110960. }
  110961. });
  110962. (0, _utils.default)("OptionalCallExpression", {
  110963. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  110964. builder: ["callee", "arguments", "optional"],
  110965. aliases: ["Expression"],
  110966. fields: {
  110967. callee: {
  110968. validate: (0, _utils.assertNodeType)("Expression")
  110969. },
  110970. arguments: {
  110971. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  110972. },
  110973. optional: {
  110974. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  110975. },
  110976. typeArguments: {
  110977. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  110978. optional: true
  110979. },
  110980. typeParameters: {
  110981. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  110982. optional: true
  110983. }
  110984. }
  110985. });
  110986. }
  110987. });
  110988. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/flow.js
  110989. var require_flow7 = __commonJS({
  110990. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/flow.js"() {
  110991. "use strict";
  110992. var _utils = require_utils5();
  110993. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  110994. (0, _utils.default)(name2, {
  110995. builder: ["id", "typeParameters", "extends", "body"],
  110996. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  110997. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  110998. fields: {
  110999. id: (0, _utils.validateType)("Identifier"),
  111000. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  111001. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  111002. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  111003. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  111004. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  111005. }
  111006. });
  111007. };
  111008. (0, _utils.default)("AnyTypeAnnotation", {
  111009. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111010. });
  111011. (0, _utils.default)("ArrayTypeAnnotation", {
  111012. visitor: ["elementType"],
  111013. aliases: ["Flow", "FlowType"],
  111014. fields: {
  111015. elementType: (0, _utils.validateType)("FlowType")
  111016. }
  111017. });
  111018. (0, _utils.default)("BooleanTypeAnnotation", {
  111019. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111020. });
  111021. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  111022. builder: ["value"],
  111023. aliases: ["Flow", "FlowType"],
  111024. fields: {
  111025. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111026. }
  111027. });
  111028. (0, _utils.default)("NullLiteralTypeAnnotation", {
  111029. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111030. });
  111031. (0, _utils.default)("ClassImplements", {
  111032. visitor: ["id", "typeParameters"],
  111033. aliases: ["Flow"],
  111034. fields: {
  111035. id: (0, _utils.validateType)("Identifier"),
  111036. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  111037. }
  111038. });
  111039. defineInterfaceishType("DeclareClass");
  111040. (0, _utils.default)("DeclareFunction", {
  111041. visitor: ["id"],
  111042. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111043. fields: {
  111044. id: (0, _utils.validateType)("Identifier"),
  111045. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  111046. }
  111047. });
  111048. defineInterfaceishType("DeclareInterface");
  111049. (0, _utils.default)("DeclareModule", {
  111050. builder: ["id", "body", "kind"],
  111051. visitor: ["id", "body"],
  111052. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111053. fields: {
  111054. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  111055. body: (0, _utils.validateType)("BlockStatement"),
  111056. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  111057. }
  111058. });
  111059. (0, _utils.default)("DeclareModuleExports", {
  111060. visitor: ["typeAnnotation"],
  111061. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111062. fields: {
  111063. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  111064. }
  111065. });
  111066. (0, _utils.default)("DeclareTypeAlias", {
  111067. visitor: ["id", "typeParameters", "right"],
  111068. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111069. fields: {
  111070. id: (0, _utils.validateType)("Identifier"),
  111071. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111072. right: (0, _utils.validateType)("FlowType")
  111073. }
  111074. });
  111075. (0, _utils.default)("DeclareOpaqueType", {
  111076. visitor: ["id", "typeParameters", "supertype"],
  111077. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111078. fields: {
  111079. id: (0, _utils.validateType)("Identifier"),
  111080. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111081. supertype: (0, _utils.validateOptionalType)("FlowType")
  111082. }
  111083. });
  111084. (0, _utils.default)("DeclareVariable", {
  111085. visitor: ["id"],
  111086. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111087. fields: {
  111088. id: (0, _utils.validateType)("Identifier")
  111089. }
  111090. });
  111091. (0, _utils.default)("DeclareExportDeclaration", {
  111092. visitor: ["declaration", "specifiers", "source"],
  111093. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111094. fields: {
  111095. declaration: (0, _utils.validateOptionalType)("Flow"),
  111096. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  111097. source: (0, _utils.validateOptionalType)("StringLiteral"),
  111098. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  111099. }
  111100. });
  111101. (0, _utils.default)("DeclareExportAllDeclaration", {
  111102. visitor: ["source"],
  111103. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111104. fields: {
  111105. source: (0, _utils.validateType)("StringLiteral"),
  111106. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  111107. }
  111108. });
  111109. (0, _utils.default)("DeclaredPredicate", {
  111110. visitor: ["value"],
  111111. aliases: ["Flow", "FlowPredicate"],
  111112. fields: {
  111113. value: (0, _utils.validateType)("Flow")
  111114. }
  111115. });
  111116. (0, _utils.default)("ExistsTypeAnnotation", {
  111117. aliases: ["Flow", "FlowType"]
  111118. });
  111119. (0, _utils.default)("FunctionTypeAnnotation", {
  111120. visitor: ["typeParameters", "params", "rest", "returnType"],
  111121. aliases: ["Flow", "FlowType"],
  111122. fields: {
  111123. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111124. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  111125. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  111126. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  111127. returnType: (0, _utils.validateType)("FlowType")
  111128. }
  111129. });
  111130. (0, _utils.default)("FunctionTypeParam", {
  111131. visitor: ["name", "typeAnnotation"],
  111132. aliases: ["Flow"],
  111133. fields: {
  111134. name: (0, _utils.validateOptionalType)("Identifier"),
  111135. typeAnnotation: (0, _utils.validateType)("FlowType"),
  111136. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  111137. }
  111138. });
  111139. (0, _utils.default)("GenericTypeAnnotation", {
  111140. visitor: ["id", "typeParameters"],
  111141. aliases: ["Flow", "FlowType"],
  111142. fields: {
  111143. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  111144. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  111145. }
  111146. });
  111147. (0, _utils.default)("InferredPredicate", {
  111148. aliases: ["Flow", "FlowPredicate"]
  111149. });
  111150. (0, _utils.default)("InterfaceExtends", {
  111151. visitor: ["id", "typeParameters"],
  111152. aliases: ["Flow"],
  111153. fields: {
  111154. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  111155. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  111156. }
  111157. });
  111158. defineInterfaceishType("InterfaceDeclaration");
  111159. (0, _utils.default)("InterfaceTypeAnnotation", {
  111160. visitor: ["extends", "body"],
  111161. aliases: ["Flow", "FlowType"],
  111162. fields: {
  111163. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  111164. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  111165. }
  111166. });
  111167. (0, _utils.default)("IntersectionTypeAnnotation", {
  111168. visitor: ["types"],
  111169. aliases: ["Flow", "FlowType"],
  111170. fields: {
  111171. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  111172. }
  111173. });
  111174. (0, _utils.default)("MixedTypeAnnotation", {
  111175. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111176. });
  111177. (0, _utils.default)("EmptyTypeAnnotation", {
  111178. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111179. });
  111180. (0, _utils.default)("NullableTypeAnnotation", {
  111181. visitor: ["typeAnnotation"],
  111182. aliases: ["Flow", "FlowType"],
  111183. fields: {
  111184. typeAnnotation: (0, _utils.validateType)("FlowType")
  111185. }
  111186. });
  111187. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  111188. builder: ["value"],
  111189. aliases: ["Flow", "FlowType"],
  111190. fields: {
  111191. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  111192. }
  111193. });
  111194. (0, _utils.default)("NumberTypeAnnotation", {
  111195. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111196. });
  111197. (0, _utils.default)("ObjectTypeAnnotation", {
  111198. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  111199. aliases: ["Flow", "FlowType"],
  111200. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  111201. fields: {
  111202. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  111203. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  111204. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  111205. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  111206. exact: {
  111207. validate: (0, _utils.assertValueType)("boolean"),
  111208. default: false
  111209. },
  111210. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  111211. }
  111212. });
  111213. (0, _utils.default)("ObjectTypeInternalSlot", {
  111214. visitor: ["id", "value", "optional", "static", "method"],
  111215. aliases: ["Flow", "UserWhitespacable"],
  111216. fields: {
  111217. id: (0, _utils.validateType)("Identifier"),
  111218. value: (0, _utils.validateType)("FlowType"),
  111219. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111220. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111221. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111222. }
  111223. });
  111224. (0, _utils.default)("ObjectTypeCallProperty", {
  111225. visitor: ["value"],
  111226. aliases: ["Flow", "UserWhitespacable"],
  111227. fields: {
  111228. value: (0, _utils.validateType)("FlowType"),
  111229. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111230. }
  111231. });
  111232. (0, _utils.default)("ObjectTypeIndexer", {
  111233. visitor: ["id", "key", "value", "variance"],
  111234. aliases: ["Flow", "UserWhitespacable"],
  111235. fields: {
  111236. id: (0, _utils.validateOptionalType)("Identifier"),
  111237. key: (0, _utils.validateType)("FlowType"),
  111238. value: (0, _utils.validateType)("FlowType"),
  111239. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111240. variance: (0, _utils.validateOptionalType)("Variance")
  111241. }
  111242. });
  111243. (0, _utils.default)("ObjectTypeProperty", {
  111244. visitor: ["key", "value", "variance"],
  111245. aliases: ["Flow", "UserWhitespacable"],
  111246. fields: {
  111247. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  111248. value: (0, _utils.validateType)("FlowType"),
  111249. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  111250. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111251. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111252. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111253. variance: (0, _utils.validateOptionalType)("Variance"),
  111254. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111255. }
  111256. });
  111257. (0, _utils.default)("ObjectTypeSpreadProperty", {
  111258. visitor: ["argument"],
  111259. aliases: ["Flow", "UserWhitespacable"],
  111260. fields: {
  111261. argument: (0, _utils.validateType)("FlowType")
  111262. }
  111263. });
  111264. (0, _utils.default)("OpaqueType", {
  111265. visitor: ["id", "typeParameters", "supertype", "impltype"],
  111266. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111267. fields: {
  111268. id: (0, _utils.validateType)("Identifier"),
  111269. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111270. supertype: (0, _utils.validateOptionalType)("FlowType"),
  111271. impltype: (0, _utils.validateType)("FlowType")
  111272. }
  111273. });
  111274. (0, _utils.default)("QualifiedTypeIdentifier", {
  111275. visitor: ["id", "qualification"],
  111276. aliases: ["Flow"],
  111277. fields: {
  111278. id: (0, _utils.validateType)("Identifier"),
  111279. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  111280. }
  111281. });
  111282. (0, _utils.default)("StringLiteralTypeAnnotation", {
  111283. builder: ["value"],
  111284. aliases: ["Flow", "FlowType"],
  111285. fields: {
  111286. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  111287. }
  111288. });
  111289. (0, _utils.default)("StringTypeAnnotation", {
  111290. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111291. });
  111292. (0, _utils.default)("SymbolTypeAnnotation", {
  111293. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111294. });
  111295. (0, _utils.default)("ThisTypeAnnotation", {
  111296. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111297. });
  111298. (0, _utils.default)("TupleTypeAnnotation", {
  111299. visitor: ["types"],
  111300. aliases: ["Flow", "FlowType"],
  111301. fields: {
  111302. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  111303. }
  111304. });
  111305. (0, _utils.default)("TypeofTypeAnnotation", {
  111306. visitor: ["argument"],
  111307. aliases: ["Flow", "FlowType"],
  111308. fields: {
  111309. argument: (0, _utils.validateType)("FlowType")
  111310. }
  111311. });
  111312. (0, _utils.default)("TypeAlias", {
  111313. visitor: ["id", "typeParameters", "right"],
  111314. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  111315. fields: {
  111316. id: (0, _utils.validateType)("Identifier"),
  111317. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  111318. right: (0, _utils.validateType)("FlowType")
  111319. }
  111320. });
  111321. (0, _utils.default)("TypeAnnotation", {
  111322. aliases: ["Flow"],
  111323. visitor: ["typeAnnotation"],
  111324. fields: {
  111325. typeAnnotation: (0, _utils.validateType)("FlowType")
  111326. }
  111327. });
  111328. (0, _utils.default)("TypeCastExpression", {
  111329. visitor: ["expression", "typeAnnotation"],
  111330. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  111331. fields: {
  111332. expression: (0, _utils.validateType)("Expression"),
  111333. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  111334. }
  111335. });
  111336. (0, _utils.default)("TypeParameter", {
  111337. aliases: ["Flow"],
  111338. visitor: ["bound", "default", "variance"],
  111339. fields: {
  111340. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  111341. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  111342. default: (0, _utils.validateOptionalType)("FlowType"),
  111343. variance: (0, _utils.validateOptionalType)("Variance")
  111344. }
  111345. });
  111346. (0, _utils.default)("TypeParameterDeclaration", {
  111347. aliases: ["Flow"],
  111348. visitor: ["params"],
  111349. fields: {
  111350. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  111351. }
  111352. });
  111353. (0, _utils.default)("TypeParameterInstantiation", {
  111354. aliases: ["Flow"],
  111355. visitor: ["params"],
  111356. fields: {
  111357. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  111358. }
  111359. });
  111360. (0, _utils.default)("UnionTypeAnnotation", {
  111361. visitor: ["types"],
  111362. aliases: ["Flow", "FlowType"],
  111363. fields: {
  111364. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  111365. }
  111366. });
  111367. (0, _utils.default)("Variance", {
  111368. aliases: ["Flow"],
  111369. builder: ["kind"],
  111370. fields: {
  111371. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  111372. }
  111373. });
  111374. (0, _utils.default)("VoidTypeAnnotation", {
  111375. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  111376. });
  111377. (0, _utils.default)("EnumDeclaration", {
  111378. aliases: ["Statement", "Declaration"],
  111379. visitor: ["id", "body"],
  111380. fields: {
  111381. id: (0, _utils.validateType)("Identifier"),
  111382. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  111383. }
  111384. });
  111385. (0, _utils.default)("EnumBooleanBody", {
  111386. aliases: ["EnumBody"],
  111387. visitor: ["members"],
  111388. fields: {
  111389. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111390. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  111391. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111392. }
  111393. });
  111394. (0, _utils.default)("EnumNumberBody", {
  111395. aliases: ["EnumBody"],
  111396. visitor: ["members"],
  111397. fields: {
  111398. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111399. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  111400. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111401. }
  111402. });
  111403. (0, _utils.default)("EnumStringBody", {
  111404. aliases: ["EnumBody"],
  111405. visitor: ["members"],
  111406. fields: {
  111407. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  111408. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  111409. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111410. }
  111411. });
  111412. (0, _utils.default)("EnumSymbolBody", {
  111413. aliases: ["EnumBody"],
  111414. visitor: ["members"],
  111415. fields: {
  111416. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  111417. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111418. }
  111419. });
  111420. (0, _utils.default)("EnumBooleanMember", {
  111421. aliases: ["EnumMember"],
  111422. visitor: ["id"],
  111423. fields: {
  111424. id: (0, _utils.validateType)("Identifier"),
  111425. init: (0, _utils.validateType)("BooleanLiteral")
  111426. }
  111427. });
  111428. (0, _utils.default)("EnumNumberMember", {
  111429. aliases: ["EnumMember"],
  111430. visitor: ["id", "init"],
  111431. fields: {
  111432. id: (0, _utils.validateType)("Identifier"),
  111433. init: (0, _utils.validateType)("NumericLiteral")
  111434. }
  111435. });
  111436. (0, _utils.default)("EnumStringMember", {
  111437. aliases: ["EnumMember"],
  111438. visitor: ["id", "init"],
  111439. fields: {
  111440. id: (0, _utils.validateType)("Identifier"),
  111441. init: (0, _utils.validateType)("StringLiteral")
  111442. }
  111443. });
  111444. (0, _utils.default)("EnumDefaultedMember", {
  111445. aliases: ["EnumMember"],
  111446. visitor: ["id"],
  111447. fields: {
  111448. id: (0, _utils.validateType)("Identifier")
  111449. }
  111450. });
  111451. (0, _utils.default)("IndexedAccessType", {
  111452. visitor: ["objectType", "indexType"],
  111453. aliases: ["Flow", "FlowType"],
  111454. fields: {
  111455. objectType: (0, _utils.validateType)("FlowType"),
  111456. indexType: (0, _utils.validateType)("FlowType")
  111457. }
  111458. });
  111459. (0, _utils.default)("OptionalIndexedAccessType", {
  111460. visitor: ["objectType", "indexType"],
  111461. aliases: ["Flow", "FlowType"],
  111462. fields: {
  111463. objectType: (0, _utils.validateType)("FlowType"),
  111464. indexType: (0, _utils.validateType)("FlowType"),
  111465. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  111466. }
  111467. });
  111468. }
  111469. });
  111470. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/jsx.js
  111471. var require_jsx7 = __commonJS({
  111472. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/jsx.js"() {
  111473. "use strict";
  111474. var _utils = require_utils5();
  111475. (0, _utils.default)("JSXAttribute", {
  111476. visitor: ["name", "value"],
  111477. aliases: ["JSX", "Immutable"],
  111478. fields: {
  111479. name: {
  111480. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  111481. },
  111482. value: {
  111483. optional: true,
  111484. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  111485. }
  111486. }
  111487. });
  111488. (0, _utils.default)("JSXClosingElement", {
  111489. visitor: ["name"],
  111490. aliases: ["JSX", "Immutable"],
  111491. fields: {
  111492. name: {
  111493. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  111494. }
  111495. }
  111496. });
  111497. (0, _utils.default)("JSXElement", {
  111498. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  111499. visitor: ["openingElement", "children", "closingElement"],
  111500. aliases: ["JSX", "Immutable", "Expression"],
  111501. fields: {
  111502. openingElement: {
  111503. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  111504. },
  111505. closingElement: {
  111506. optional: true,
  111507. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  111508. },
  111509. children: {
  111510. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  111511. },
  111512. selfClosing: {
  111513. validate: (0, _utils.assertValueType)("boolean"),
  111514. optional: true
  111515. }
  111516. }
  111517. });
  111518. (0, _utils.default)("JSXEmptyExpression", {
  111519. aliases: ["JSX"]
  111520. });
  111521. (0, _utils.default)("JSXExpressionContainer", {
  111522. visitor: ["expression"],
  111523. aliases: ["JSX", "Immutable"],
  111524. fields: {
  111525. expression: {
  111526. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  111527. }
  111528. }
  111529. });
  111530. (0, _utils.default)("JSXSpreadChild", {
  111531. visitor: ["expression"],
  111532. aliases: ["JSX", "Immutable"],
  111533. fields: {
  111534. expression: {
  111535. validate: (0, _utils.assertNodeType)("Expression")
  111536. }
  111537. }
  111538. });
  111539. (0, _utils.default)("JSXIdentifier", {
  111540. builder: ["name"],
  111541. aliases: ["JSX"],
  111542. fields: {
  111543. name: {
  111544. validate: (0, _utils.assertValueType)("string")
  111545. }
  111546. }
  111547. });
  111548. (0, _utils.default)("JSXMemberExpression", {
  111549. visitor: ["object", "property"],
  111550. aliases: ["JSX"],
  111551. fields: {
  111552. object: {
  111553. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  111554. },
  111555. property: {
  111556. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  111557. }
  111558. }
  111559. });
  111560. (0, _utils.default)("JSXNamespacedName", {
  111561. visitor: ["namespace", "name"],
  111562. aliases: ["JSX"],
  111563. fields: {
  111564. namespace: {
  111565. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  111566. },
  111567. name: {
  111568. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  111569. }
  111570. }
  111571. });
  111572. (0, _utils.default)("JSXOpeningElement", {
  111573. builder: ["name", "attributes", "selfClosing"],
  111574. visitor: ["name", "attributes"],
  111575. aliases: ["JSX", "Immutable"],
  111576. fields: {
  111577. name: {
  111578. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  111579. },
  111580. selfClosing: {
  111581. default: false
  111582. },
  111583. attributes: {
  111584. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  111585. },
  111586. typeParameters: {
  111587. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  111588. optional: true
  111589. }
  111590. }
  111591. });
  111592. (0, _utils.default)("JSXSpreadAttribute", {
  111593. visitor: ["argument"],
  111594. aliases: ["JSX"],
  111595. fields: {
  111596. argument: {
  111597. validate: (0, _utils.assertNodeType)("Expression")
  111598. }
  111599. }
  111600. });
  111601. (0, _utils.default)("JSXText", {
  111602. aliases: ["JSX", "Immutable"],
  111603. builder: ["value"],
  111604. fields: {
  111605. value: {
  111606. validate: (0, _utils.assertValueType)("string")
  111607. }
  111608. }
  111609. });
  111610. (0, _utils.default)("JSXFragment", {
  111611. builder: ["openingFragment", "closingFragment", "children"],
  111612. visitor: ["openingFragment", "children", "closingFragment"],
  111613. aliases: ["JSX", "Immutable", "Expression"],
  111614. fields: {
  111615. openingFragment: {
  111616. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  111617. },
  111618. closingFragment: {
  111619. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  111620. },
  111621. children: {
  111622. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  111623. }
  111624. }
  111625. });
  111626. (0, _utils.default)("JSXOpeningFragment", {
  111627. aliases: ["JSX", "Immutable"]
  111628. });
  111629. (0, _utils.default)("JSXClosingFragment", {
  111630. aliases: ["JSX", "Immutable"]
  111631. });
  111632. }
  111633. });
  111634. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/placeholders.js
  111635. var require_placeholders5 = __commonJS({
  111636. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  111637. "use strict";
  111638. Object.defineProperty(exports, "__esModule", {
  111639. value: true
  111640. });
  111641. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  111642. var _utils = require_utils5();
  111643. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  111644. exports.PLACEHOLDERS = PLACEHOLDERS;
  111645. var PLACEHOLDERS_ALIAS = {
  111646. Declaration: ["Statement"],
  111647. Pattern: ["PatternLike", "LVal"]
  111648. };
  111649. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  111650. for (const type of PLACEHOLDERS) {
  111651. const alias = _utils.ALIAS_KEYS[type];
  111652. if (alias != null && alias.length)
  111653. PLACEHOLDERS_ALIAS[type] = alias;
  111654. }
  111655. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  111656. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  111657. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  111658. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  111659. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  111660. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  111661. }
  111662. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  111663. });
  111664. });
  111665. }
  111666. });
  111667. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/misc.js
  111668. var require_misc5 = __commonJS({
  111669. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/misc.js"() {
  111670. "use strict";
  111671. var _utils = require_utils5();
  111672. var _placeholders = require_placeholders5();
  111673. {
  111674. (0, _utils.default)("Noop", {
  111675. visitor: []
  111676. });
  111677. }
  111678. (0, _utils.default)("Placeholder", {
  111679. visitor: [],
  111680. builder: ["expectedNode", "name"],
  111681. fields: {
  111682. name: {
  111683. validate: (0, _utils.assertNodeType)("Identifier")
  111684. },
  111685. expectedNode: {
  111686. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  111687. }
  111688. }
  111689. });
  111690. (0, _utils.default)("V8IntrinsicIdentifier", {
  111691. builder: ["name"],
  111692. fields: {
  111693. name: {
  111694. validate: (0, _utils.assertValueType)("string")
  111695. }
  111696. }
  111697. });
  111698. }
  111699. });
  111700. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/experimental.js
  111701. var require_experimental5 = __commonJS({
  111702. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/experimental.js"() {
  111703. "use strict";
  111704. var _utils = require_utils5();
  111705. var _core = require_core5();
  111706. (0, _utils.default)("ArgumentPlaceholder", {});
  111707. (0, _utils.default)("BindExpression", {
  111708. visitor: ["object", "callee"],
  111709. aliases: ["Expression"],
  111710. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  111711. object: {
  111712. validate: Object.assign(() => {
  111713. }, {
  111714. oneOfNodeTypes: ["Expression"]
  111715. })
  111716. },
  111717. callee: {
  111718. validate: Object.assign(() => {
  111719. }, {
  111720. oneOfNodeTypes: ["Expression"]
  111721. })
  111722. }
  111723. } : {
  111724. object: {
  111725. validate: (0, _utils.assertNodeType)("Expression")
  111726. },
  111727. callee: {
  111728. validate: (0, _utils.assertNodeType)("Expression")
  111729. }
  111730. }
  111731. });
  111732. (0, _utils.default)("ClassProperty", {
  111733. visitor: ["key", "value", "typeAnnotation", "decorators"],
  111734. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  111735. aliases: ["Property"],
  111736. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  111737. value: {
  111738. validate: (0, _utils.assertNodeType)("Expression"),
  111739. optional: true
  111740. },
  111741. definite: {
  111742. validate: (0, _utils.assertValueType)("boolean"),
  111743. optional: true
  111744. },
  111745. typeAnnotation: {
  111746. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  111747. optional: true
  111748. },
  111749. decorators: {
  111750. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  111751. optional: true
  111752. },
  111753. readonly: {
  111754. validate: (0, _utils.assertValueType)("boolean"),
  111755. optional: true
  111756. },
  111757. declare: {
  111758. validate: (0, _utils.assertValueType)("boolean"),
  111759. optional: true
  111760. }
  111761. })
  111762. });
  111763. (0, _utils.default)("PipelineTopicExpression", {
  111764. builder: ["expression"],
  111765. visitor: ["expression"],
  111766. fields: {
  111767. expression: {
  111768. validate: (0, _utils.assertNodeType)("Expression")
  111769. }
  111770. }
  111771. });
  111772. (0, _utils.default)("PipelineBareFunction", {
  111773. builder: ["callee"],
  111774. visitor: ["callee"],
  111775. fields: {
  111776. callee: {
  111777. validate: (0, _utils.assertNodeType)("Expression")
  111778. }
  111779. }
  111780. });
  111781. (0, _utils.default)("PipelinePrimaryTopicReference", {
  111782. aliases: ["Expression"]
  111783. });
  111784. (0, _utils.default)("ClassPrivateProperty", {
  111785. visitor: ["key", "value", "decorators"],
  111786. builder: ["key", "value", "decorators", "static"],
  111787. aliases: ["Property", "Private"],
  111788. fields: {
  111789. key: {
  111790. validate: (0, _utils.assertNodeType)("PrivateName")
  111791. },
  111792. value: {
  111793. validate: (0, _utils.assertNodeType)("Expression"),
  111794. optional: true
  111795. },
  111796. typeAnnotation: {
  111797. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  111798. optional: true
  111799. },
  111800. decorators: {
  111801. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  111802. optional: true
  111803. }
  111804. }
  111805. });
  111806. (0, _utils.default)("ClassPrivateMethod", {
  111807. builder: ["kind", "key", "params", "body", "static"],
  111808. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  111809. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  111810. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  111811. key: {
  111812. validate: (0, _utils.assertNodeType)("PrivateName")
  111813. },
  111814. body: {
  111815. validate: (0, _utils.assertNodeType)("BlockStatement")
  111816. }
  111817. })
  111818. });
  111819. (0, _utils.default)("ImportAttribute", {
  111820. visitor: ["key", "value"],
  111821. fields: {
  111822. key: {
  111823. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  111824. },
  111825. value: {
  111826. validate: (0, _utils.assertNodeType)("StringLiteral")
  111827. }
  111828. }
  111829. });
  111830. (0, _utils.default)("Decorator", {
  111831. visitor: ["expression"],
  111832. fields: {
  111833. expression: {
  111834. validate: (0, _utils.assertNodeType)("Expression")
  111835. }
  111836. }
  111837. });
  111838. (0, _utils.default)("DoExpression", {
  111839. visitor: ["body"],
  111840. builder: ["body", "async"],
  111841. aliases: ["Expression"],
  111842. fields: {
  111843. body: {
  111844. validate: (0, _utils.assertNodeType)("BlockStatement")
  111845. },
  111846. async: {
  111847. validate: (0, _utils.assertValueType)("boolean"),
  111848. default: false
  111849. }
  111850. }
  111851. });
  111852. (0, _utils.default)("ExportDefaultSpecifier", {
  111853. visitor: ["exported"],
  111854. aliases: ["ModuleSpecifier"],
  111855. fields: {
  111856. exported: {
  111857. validate: (0, _utils.assertNodeType)("Identifier")
  111858. }
  111859. }
  111860. });
  111861. (0, _utils.default)("PrivateName", {
  111862. visitor: ["id"],
  111863. aliases: ["Private"],
  111864. fields: {
  111865. id: {
  111866. validate: (0, _utils.assertNodeType)("Identifier")
  111867. }
  111868. }
  111869. });
  111870. (0, _utils.default)("RecordExpression", {
  111871. visitor: ["properties"],
  111872. aliases: ["Expression"],
  111873. fields: {
  111874. properties: {
  111875. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  111876. }
  111877. }
  111878. });
  111879. (0, _utils.default)("TupleExpression", {
  111880. fields: {
  111881. elements: {
  111882. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  111883. default: []
  111884. }
  111885. },
  111886. visitor: ["elements"],
  111887. aliases: ["Expression"]
  111888. });
  111889. (0, _utils.default)("DecimalLiteral", {
  111890. builder: ["value"],
  111891. fields: {
  111892. value: {
  111893. validate: (0, _utils.assertValueType)("string")
  111894. }
  111895. },
  111896. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  111897. });
  111898. (0, _utils.default)("StaticBlock", {
  111899. visitor: ["body"],
  111900. fields: {
  111901. body: {
  111902. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  111903. }
  111904. },
  111905. aliases: ["Scopable", "BlockParent"]
  111906. });
  111907. (0, _utils.default)("ModuleExpression", {
  111908. visitor: ["body"],
  111909. fields: {
  111910. body: {
  111911. validate: (0, _utils.assertNodeType)("Program")
  111912. }
  111913. },
  111914. aliases: ["Expression"]
  111915. });
  111916. }
  111917. });
  111918. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/typescript.js
  111919. var require_typescript7 = __commonJS({
  111920. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/typescript.js"() {
  111921. "use strict";
  111922. var _utils = require_utils5();
  111923. var _core = require_core5();
  111924. var bool = (0, _utils.assertValueType)("boolean");
  111925. var tSFunctionTypeAnnotationCommon = {
  111926. returnType: {
  111927. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  111928. optional: true
  111929. },
  111930. typeParameters: {
  111931. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  111932. optional: true
  111933. }
  111934. };
  111935. (0, _utils.default)("TSParameterProperty", {
  111936. aliases: ["LVal"],
  111937. visitor: ["parameter"],
  111938. fields: {
  111939. accessibility: {
  111940. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  111941. optional: true
  111942. },
  111943. readonly: {
  111944. validate: (0, _utils.assertValueType)("boolean"),
  111945. optional: true
  111946. },
  111947. parameter: {
  111948. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  111949. }
  111950. }
  111951. });
  111952. (0, _utils.default)("TSDeclareFunction", {
  111953. aliases: ["Statement", "Declaration"],
  111954. visitor: ["id", "typeParameters", "params", "returnType"],
  111955. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  111956. });
  111957. (0, _utils.default)("TSDeclareMethod", {
  111958. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  111959. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  111960. });
  111961. (0, _utils.default)("TSQualifiedName", {
  111962. aliases: ["TSEntityName"],
  111963. visitor: ["left", "right"],
  111964. fields: {
  111965. left: (0, _utils.validateType)("TSEntityName"),
  111966. right: (0, _utils.validateType)("Identifier")
  111967. }
  111968. });
  111969. var signatureDeclarationCommon = {
  111970. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  111971. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  111972. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  111973. };
  111974. var callConstructSignatureDeclaration = {
  111975. aliases: ["TSTypeElement"],
  111976. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  111977. fields: signatureDeclarationCommon
  111978. };
  111979. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  111980. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  111981. var namedTypeElementCommon = {
  111982. key: (0, _utils.validateType)("Expression"),
  111983. computed: (0, _utils.validate)(bool),
  111984. optional: (0, _utils.validateOptional)(bool)
  111985. };
  111986. (0, _utils.default)("TSPropertySignature", {
  111987. aliases: ["TSTypeElement"],
  111988. visitor: ["key", "typeAnnotation", "initializer"],
  111989. fields: Object.assign({}, namedTypeElementCommon, {
  111990. readonly: (0, _utils.validateOptional)(bool),
  111991. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  111992. initializer: (0, _utils.validateOptionalType)("Expression")
  111993. })
  111994. });
  111995. (0, _utils.default)("TSMethodSignature", {
  111996. aliases: ["TSTypeElement"],
  111997. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  111998. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  111999. kind: {
  112000. validate: (0, _utils.assertOneOf)("method", "get", "set")
  112001. }
  112002. })
  112003. });
  112004. (0, _utils.default)("TSIndexSignature", {
  112005. aliases: ["TSTypeElement"],
  112006. visitor: ["parameters", "typeAnnotation"],
  112007. fields: {
  112008. readonly: (0, _utils.validateOptional)(bool),
  112009. static: (0, _utils.validateOptional)(bool),
  112010. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  112011. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  112012. }
  112013. });
  112014. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  112015. for (const type of tsKeywordTypes) {
  112016. (0, _utils.default)(type, {
  112017. aliases: ["TSType", "TSBaseType"],
  112018. visitor: [],
  112019. fields: {}
  112020. });
  112021. }
  112022. (0, _utils.default)("TSThisType", {
  112023. aliases: ["TSType", "TSBaseType"],
  112024. visitor: [],
  112025. fields: {}
  112026. });
  112027. var fnOrCtrBase = {
  112028. aliases: ["TSType"],
  112029. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  112030. };
  112031. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  112032. fields: signatureDeclarationCommon
  112033. }));
  112034. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  112035. fields: Object.assign({}, signatureDeclarationCommon, {
  112036. abstract: (0, _utils.validateOptional)(bool)
  112037. })
  112038. }));
  112039. (0, _utils.default)("TSTypeReference", {
  112040. aliases: ["TSType"],
  112041. visitor: ["typeName", "typeParameters"],
  112042. fields: {
  112043. typeName: (0, _utils.validateType)("TSEntityName"),
  112044. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  112045. }
  112046. });
  112047. (0, _utils.default)("TSTypePredicate", {
  112048. aliases: ["TSType"],
  112049. visitor: ["parameterName", "typeAnnotation"],
  112050. builder: ["parameterName", "typeAnnotation", "asserts"],
  112051. fields: {
  112052. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  112053. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  112054. asserts: (0, _utils.validateOptional)(bool)
  112055. }
  112056. });
  112057. (0, _utils.default)("TSTypeQuery", {
  112058. aliases: ["TSType"],
  112059. visitor: ["exprName"],
  112060. fields: {
  112061. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  112062. }
  112063. });
  112064. (0, _utils.default)("TSTypeLiteral", {
  112065. aliases: ["TSType"],
  112066. visitor: ["members"],
  112067. fields: {
  112068. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  112069. }
  112070. });
  112071. (0, _utils.default)("TSArrayType", {
  112072. aliases: ["TSType"],
  112073. visitor: ["elementType"],
  112074. fields: {
  112075. elementType: (0, _utils.validateType)("TSType")
  112076. }
  112077. });
  112078. (0, _utils.default)("TSTupleType", {
  112079. aliases: ["TSType"],
  112080. visitor: ["elementTypes"],
  112081. fields: {
  112082. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  112083. }
  112084. });
  112085. (0, _utils.default)("TSOptionalType", {
  112086. aliases: ["TSType"],
  112087. visitor: ["typeAnnotation"],
  112088. fields: {
  112089. typeAnnotation: (0, _utils.validateType)("TSType")
  112090. }
  112091. });
  112092. (0, _utils.default)("TSRestType", {
  112093. aliases: ["TSType"],
  112094. visitor: ["typeAnnotation"],
  112095. fields: {
  112096. typeAnnotation: (0, _utils.validateType)("TSType")
  112097. }
  112098. });
  112099. (0, _utils.default)("TSNamedTupleMember", {
  112100. visitor: ["label", "elementType"],
  112101. builder: ["label", "elementType", "optional"],
  112102. fields: {
  112103. label: (0, _utils.validateType)("Identifier"),
  112104. optional: {
  112105. validate: bool,
  112106. default: false
  112107. },
  112108. elementType: (0, _utils.validateType)("TSType")
  112109. }
  112110. });
  112111. var unionOrIntersection = {
  112112. aliases: ["TSType"],
  112113. visitor: ["types"],
  112114. fields: {
  112115. types: (0, _utils.validateArrayOfType)("TSType")
  112116. }
  112117. };
  112118. (0, _utils.default)("TSUnionType", unionOrIntersection);
  112119. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  112120. (0, _utils.default)("TSConditionalType", {
  112121. aliases: ["TSType"],
  112122. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  112123. fields: {
  112124. checkType: (0, _utils.validateType)("TSType"),
  112125. extendsType: (0, _utils.validateType)("TSType"),
  112126. trueType: (0, _utils.validateType)("TSType"),
  112127. falseType: (0, _utils.validateType)("TSType")
  112128. }
  112129. });
  112130. (0, _utils.default)("TSInferType", {
  112131. aliases: ["TSType"],
  112132. visitor: ["typeParameter"],
  112133. fields: {
  112134. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  112135. }
  112136. });
  112137. (0, _utils.default)("TSParenthesizedType", {
  112138. aliases: ["TSType"],
  112139. visitor: ["typeAnnotation"],
  112140. fields: {
  112141. typeAnnotation: (0, _utils.validateType)("TSType")
  112142. }
  112143. });
  112144. (0, _utils.default)("TSTypeOperator", {
  112145. aliases: ["TSType"],
  112146. visitor: ["typeAnnotation"],
  112147. fields: {
  112148. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  112149. typeAnnotation: (0, _utils.validateType)("TSType")
  112150. }
  112151. });
  112152. (0, _utils.default)("TSIndexedAccessType", {
  112153. aliases: ["TSType"],
  112154. visitor: ["objectType", "indexType"],
  112155. fields: {
  112156. objectType: (0, _utils.validateType)("TSType"),
  112157. indexType: (0, _utils.validateType)("TSType")
  112158. }
  112159. });
  112160. (0, _utils.default)("TSMappedType", {
  112161. aliases: ["TSType"],
  112162. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  112163. fields: {
  112164. readonly: (0, _utils.validateOptional)(bool),
  112165. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  112166. optional: (0, _utils.validateOptional)(bool),
  112167. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  112168. nameType: (0, _utils.validateOptionalType)("TSType")
  112169. }
  112170. });
  112171. (0, _utils.default)("TSLiteralType", {
  112172. aliases: ["TSType", "TSBaseType"],
  112173. visitor: ["literal"],
  112174. fields: {
  112175. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  112176. }
  112177. });
  112178. (0, _utils.default)("TSExpressionWithTypeArguments", {
  112179. aliases: ["TSType"],
  112180. visitor: ["expression", "typeParameters"],
  112181. fields: {
  112182. expression: (0, _utils.validateType)("TSEntityName"),
  112183. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  112184. }
  112185. });
  112186. (0, _utils.default)("TSInterfaceDeclaration", {
  112187. aliases: ["Statement", "Declaration"],
  112188. visitor: ["id", "typeParameters", "extends", "body"],
  112189. fields: {
  112190. declare: (0, _utils.validateOptional)(bool),
  112191. id: (0, _utils.validateType)("Identifier"),
  112192. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  112193. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  112194. body: (0, _utils.validateType)("TSInterfaceBody")
  112195. }
  112196. });
  112197. (0, _utils.default)("TSInterfaceBody", {
  112198. visitor: ["body"],
  112199. fields: {
  112200. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  112201. }
  112202. });
  112203. (0, _utils.default)("TSTypeAliasDeclaration", {
  112204. aliases: ["Statement", "Declaration"],
  112205. visitor: ["id", "typeParameters", "typeAnnotation"],
  112206. fields: {
  112207. declare: (0, _utils.validateOptional)(bool),
  112208. id: (0, _utils.validateType)("Identifier"),
  112209. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  112210. typeAnnotation: (0, _utils.validateType)("TSType")
  112211. }
  112212. });
  112213. (0, _utils.default)("TSAsExpression", {
  112214. aliases: ["Expression"],
  112215. visitor: ["expression", "typeAnnotation"],
  112216. fields: {
  112217. expression: (0, _utils.validateType)("Expression"),
  112218. typeAnnotation: (0, _utils.validateType)("TSType")
  112219. }
  112220. });
  112221. (0, _utils.default)("TSTypeAssertion", {
  112222. aliases: ["Expression"],
  112223. visitor: ["typeAnnotation", "expression"],
  112224. fields: {
  112225. typeAnnotation: (0, _utils.validateType)("TSType"),
  112226. expression: (0, _utils.validateType)("Expression")
  112227. }
  112228. });
  112229. (0, _utils.default)("TSEnumDeclaration", {
  112230. aliases: ["Statement", "Declaration"],
  112231. visitor: ["id", "members"],
  112232. fields: {
  112233. declare: (0, _utils.validateOptional)(bool),
  112234. const: (0, _utils.validateOptional)(bool),
  112235. id: (0, _utils.validateType)("Identifier"),
  112236. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  112237. initializer: (0, _utils.validateOptionalType)("Expression")
  112238. }
  112239. });
  112240. (0, _utils.default)("TSEnumMember", {
  112241. visitor: ["id", "initializer"],
  112242. fields: {
  112243. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  112244. initializer: (0, _utils.validateOptionalType)("Expression")
  112245. }
  112246. });
  112247. (0, _utils.default)("TSModuleDeclaration", {
  112248. aliases: ["Statement", "Declaration"],
  112249. visitor: ["id", "body"],
  112250. fields: {
  112251. declare: (0, _utils.validateOptional)(bool),
  112252. global: (0, _utils.validateOptional)(bool),
  112253. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  112254. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  112255. }
  112256. });
  112257. (0, _utils.default)("TSModuleBlock", {
  112258. aliases: ["Scopable", "Block", "BlockParent"],
  112259. visitor: ["body"],
  112260. fields: {
  112261. body: (0, _utils.validateArrayOfType)("Statement")
  112262. }
  112263. });
  112264. (0, _utils.default)("TSImportType", {
  112265. aliases: ["TSType"],
  112266. visitor: ["argument", "qualifier", "typeParameters"],
  112267. fields: {
  112268. argument: (0, _utils.validateType)("StringLiteral"),
  112269. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  112270. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  112271. }
  112272. });
  112273. (0, _utils.default)("TSImportEqualsDeclaration", {
  112274. aliases: ["Statement"],
  112275. visitor: ["id", "moduleReference"],
  112276. fields: {
  112277. isExport: (0, _utils.validate)(bool),
  112278. id: (0, _utils.validateType)("Identifier"),
  112279. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  112280. }
  112281. });
  112282. (0, _utils.default)("TSExternalModuleReference", {
  112283. visitor: ["expression"],
  112284. fields: {
  112285. expression: (0, _utils.validateType)("StringLiteral")
  112286. }
  112287. });
  112288. (0, _utils.default)("TSNonNullExpression", {
  112289. aliases: ["Expression"],
  112290. visitor: ["expression"],
  112291. fields: {
  112292. expression: (0, _utils.validateType)("Expression")
  112293. }
  112294. });
  112295. (0, _utils.default)("TSExportAssignment", {
  112296. aliases: ["Statement"],
  112297. visitor: ["expression"],
  112298. fields: {
  112299. expression: (0, _utils.validateType)("Expression")
  112300. }
  112301. });
  112302. (0, _utils.default)("TSNamespaceExportDeclaration", {
  112303. aliases: ["Statement"],
  112304. visitor: ["id"],
  112305. fields: {
  112306. id: (0, _utils.validateType)("Identifier")
  112307. }
  112308. });
  112309. (0, _utils.default)("TSTypeAnnotation", {
  112310. visitor: ["typeAnnotation"],
  112311. fields: {
  112312. typeAnnotation: {
  112313. validate: (0, _utils.assertNodeType)("TSType")
  112314. }
  112315. }
  112316. });
  112317. (0, _utils.default)("TSTypeParameterInstantiation", {
  112318. visitor: ["params"],
  112319. fields: {
  112320. params: {
  112321. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  112322. }
  112323. }
  112324. });
  112325. (0, _utils.default)("TSTypeParameterDeclaration", {
  112326. visitor: ["params"],
  112327. fields: {
  112328. params: {
  112329. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  112330. }
  112331. }
  112332. });
  112333. (0, _utils.default)("TSTypeParameter", {
  112334. builder: ["constraint", "default", "name"],
  112335. visitor: ["constraint", "default"],
  112336. fields: {
  112337. name: {
  112338. validate: (0, _utils.assertValueType)("string")
  112339. },
  112340. constraint: {
  112341. validate: (0, _utils.assertNodeType)("TSType"),
  112342. optional: true
  112343. },
  112344. default: {
  112345. validate: (0, _utils.assertNodeType)("TSType"),
  112346. optional: true
  112347. }
  112348. }
  112349. });
  112350. }
  112351. });
  112352. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/index.js
  112353. var require_definitions5 = __commonJS({
  112354. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  112355. "use strict";
  112356. Object.defineProperty(exports, "__esModule", {
  112357. value: true
  112358. });
  112359. Object.defineProperty(exports, "VISITOR_KEYS", {
  112360. enumerable: true,
  112361. get: function() {
  112362. return _utils.VISITOR_KEYS;
  112363. }
  112364. });
  112365. Object.defineProperty(exports, "ALIAS_KEYS", {
  112366. enumerable: true,
  112367. get: function() {
  112368. return _utils.ALIAS_KEYS;
  112369. }
  112370. });
  112371. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  112372. enumerable: true,
  112373. get: function() {
  112374. return _utils.FLIPPED_ALIAS_KEYS;
  112375. }
  112376. });
  112377. Object.defineProperty(exports, "NODE_FIELDS", {
  112378. enumerable: true,
  112379. get: function() {
  112380. return _utils.NODE_FIELDS;
  112381. }
  112382. });
  112383. Object.defineProperty(exports, "BUILDER_KEYS", {
  112384. enumerable: true,
  112385. get: function() {
  112386. return _utils.BUILDER_KEYS;
  112387. }
  112388. });
  112389. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  112390. enumerable: true,
  112391. get: function() {
  112392. return _utils.DEPRECATED_KEYS;
  112393. }
  112394. });
  112395. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  112396. enumerable: true,
  112397. get: function() {
  112398. return _utils.NODE_PARENT_VALIDATIONS;
  112399. }
  112400. });
  112401. Object.defineProperty(exports, "PLACEHOLDERS", {
  112402. enumerable: true,
  112403. get: function() {
  112404. return _placeholders.PLACEHOLDERS;
  112405. }
  112406. });
  112407. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  112408. enumerable: true,
  112409. get: function() {
  112410. return _placeholders.PLACEHOLDERS_ALIAS;
  112411. }
  112412. });
  112413. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  112414. enumerable: true,
  112415. get: function() {
  112416. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  112417. }
  112418. });
  112419. exports.TYPES = void 0;
  112420. var _toFastProperties = require_to_fast_properties();
  112421. require_core5();
  112422. require_flow7();
  112423. require_jsx7();
  112424. require_misc5();
  112425. require_experimental5();
  112426. require_typescript7();
  112427. var _utils = require_utils5();
  112428. var _placeholders = require_placeholders5();
  112429. _toFastProperties(_utils.VISITOR_KEYS);
  112430. _toFastProperties(_utils.ALIAS_KEYS);
  112431. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  112432. _toFastProperties(_utils.NODE_FIELDS);
  112433. _toFastProperties(_utils.BUILDER_KEYS);
  112434. _toFastProperties(_utils.DEPRECATED_KEYS);
  112435. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  112436. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  112437. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  112438. exports.TYPES = TYPES;
  112439. }
  112440. });
  112441. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/builder.js
  112442. var require_builder6 = __commonJS({
  112443. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  112444. "use strict";
  112445. Object.defineProperty(exports, "__esModule", {
  112446. value: true
  112447. });
  112448. exports.default = builder;
  112449. var _definitions = require_definitions5();
  112450. var _validate = require_validate5();
  112451. function builder(type, ...args) {
  112452. const keys2 = _definitions.BUILDER_KEYS[type];
  112453. const countArgs = args.length;
  112454. if (countArgs > keys2.length) {
  112455. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  112456. }
  112457. const node = {
  112458. type
  112459. };
  112460. let i = 0;
  112461. keys2.forEach((key) => {
  112462. const field = _definitions.NODE_FIELDS[type][key];
  112463. let arg;
  112464. if (i < countArgs)
  112465. arg = args[i];
  112466. if (arg === void 0) {
  112467. arg = Array.isArray(field.default) ? [] : field.default;
  112468. }
  112469. node[key] = arg;
  112470. i++;
  112471. });
  112472. for (const key of Object.keys(node)) {
  112473. (0, _validate.default)(node, key, node[key]);
  112474. }
  112475. return node;
  112476. }
  112477. }
  112478. });
  112479. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/generated/index.js
  112480. var require_generated22 = __commonJS({
  112481. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  112482. "use strict";
  112483. Object.defineProperty(exports, "__esModule", {
  112484. value: true
  112485. });
  112486. exports.arrayExpression = arrayExpression;
  112487. exports.assignmentExpression = assignmentExpression;
  112488. exports.binaryExpression = binaryExpression;
  112489. exports.interpreterDirective = interpreterDirective;
  112490. exports.directive = directive;
  112491. exports.directiveLiteral = directiveLiteral;
  112492. exports.blockStatement = blockStatement;
  112493. exports.breakStatement = breakStatement;
  112494. exports.callExpression = callExpression;
  112495. exports.catchClause = catchClause;
  112496. exports.conditionalExpression = conditionalExpression;
  112497. exports.continueStatement = continueStatement;
  112498. exports.debuggerStatement = debuggerStatement;
  112499. exports.doWhileStatement = doWhileStatement;
  112500. exports.emptyStatement = emptyStatement;
  112501. exports.expressionStatement = expressionStatement;
  112502. exports.file = file;
  112503. exports.forInStatement = forInStatement;
  112504. exports.forStatement = forStatement;
  112505. exports.functionDeclaration = functionDeclaration;
  112506. exports.functionExpression = functionExpression;
  112507. exports.identifier = identifier;
  112508. exports.ifStatement = ifStatement;
  112509. exports.labeledStatement = labeledStatement;
  112510. exports.stringLiteral = stringLiteral;
  112511. exports.numericLiteral = numericLiteral;
  112512. exports.nullLiteral = nullLiteral;
  112513. exports.booleanLiteral = booleanLiteral;
  112514. exports.regExpLiteral = regExpLiteral;
  112515. exports.logicalExpression = logicalExpression;
  112516. exports.memberExpression = memberExpression;
  112517. exports.newExpression = newExpression;
  112518. exports.program = program;
  112519. exports.objectExpression = objectExpression;
  112520. exports.objectMethod = objectMethod;
  112521. exports.objectProperty = objectProperty;
  112522. exports.restElement = restElement;
  112523. exports.returnStatement = returnStatement;
  112524. exports.sequenceExpression = sequenceExpression;
  112525. exports.parenthesizedExpression = parenthesizedExpression;
  112526. exports.switchCase = switchCase;
  112527. exports.switchStatement = switchStatement;
  112528. exports.thisExpression = thisExpression;
  112529. exports.throwStatement = throwStatement;
  112530. exports.tryStatement = tryStatement;
  112531. exports.unaryExpression = unaryExpression;
  112532. exports.updateExpression = updateExpression;
  112533. exports.variableDeclaration = variableDeclaration;
  112534. exports.variableDeclarator = variableDeclarator;
  112535. exports.whileStatement = whileStatement;
  112536. exports.withStatement = withStatement;
  112537. exports.assignmentPattern = assignmentPattern;
  112538. exports.arrayPattern = arrayPattern;
  112539. exports.arrowFunctionExpression = arrowFunctionExpression;
  112540. exports.classBody = classBody;
  112541. exports.classExpression = classExpression;
  112542. exports.classDeclaration = classDeclaration;
  112543. exports.exportAllDeclaration = exportAllDeclaration;
  112544. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  112545. exports.exportNamedDeclaration = exportNamedDeclaration;
  112546. exports.exportSpecifier = exportSpecifier;
  112547. exports.forOfStatement = forOfStatement;
  112548. exports.importDeclaration = importDeclaration;
  112549. exports.importDefaultSpecifier = importDefaultSpecifier;
  112550. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  112551. exports.importSpecifier = importSpecifier;
  112552. exports.metaProperty = metaProperty;
  112553. exports.classMethod = classMethod;
  112554. exports.objectPattern = objectPattern;
  112555. exports.spreadElement = spreadElement;
  112556. exports.super = _super;
  112557. exports.taggedTemplateExpression = taggedTemplateExpression;
  112558. exports.templateElement = templateElement;
  112559. exports.templateLiteral = templateLiteral;
  112560. exports.yieldExpression = yieldExpression;
  112561. exports.awaitExpression = awaitExpression;
  112562. exports.import = _import;
  112563. exports.bigIntLiteral = bigIntLiteral;
  112564. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  112565. exports.optionalMemberExpression = optionalMemberExpression;
  112566. exports.optionalCallExpression = optionalCallExpression;
  112567. exports.anyTypeAnnotation = anyTypeAnnotation;
  112568. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  112569. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  112570. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  112571. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  112572. exports.classImplements = classImplements;
  112573. exports.declareClass = declareClass;
  112574. exports.declareFunction = declareFunction;
  112575. exports.declareInterface = declareInterface;
  112576. exports.declareModule = declareModule;
  112577. exports.declareModuleExports = declareModuleExports;
  112578. exports.declareTypeAlias = declareTypeAlias;
  112579. exports.declareOpaqueType = declareOpaqueType;
  112580. exports.declareVariable = declareVariable;
  112581. exports.declareExportDeclaration = declareExportDeclaration;
  112582. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  112583. exports.declaredPredicate = declaredPredicate;
  112584. exports.existsTypeAnnotation = existsTypeAnnotation;
  112585. exports.functionTypeAnnotation = functionTypeAnnotation;
  112586. exports.functionTypeParam = functionTypeParam;
  112587. exports.genericTypeAnnotation = genericTypeAnnotation;
  112588. exports.inferredPredicate = inferredPredicate;
  112589. exports.interfaceExtends = interfaceExtends;
  112590. exports.interfaceDeclaration = interfaceDeclaration;
  112591. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  112592. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  112593. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  112594. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  112595. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  112596. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  112597. exports.numberTypeAnnotation = numberTypeAnnotation;
  112598. exports.objectTypeAnnotation = objectTypeAnnotation;
  112599. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  112600. exports.objectTypeCallProperty = objectTypeCallProperty;
  112601. exports.objectTypeIndexer = objectTypeIndexer;
  112602. exports.objectTypeProperty = objectTypeProperty;
  112603. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  112604. exports.opaqueType = opaqueType;
  112605. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  112606. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  112607. exports.stringTypeAnnotation = stringTypeAnnotation;
  112608. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  112609. exports.thisTypeAnnotation = thisTypeAnnotation;
  112610. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  112611. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  112612. exports.typeAlias = typeAlias;
  112613. exports.typeAnnotation = typeAnnotation;
  112614. exports.typeCastExpression = typeCastExpression;
  112615. exports.typeParameter = typeParameter;
  112616. exports.typeParameterDeclaration = typeParameterDeclaration;
  112617. exports.typeParameterInstantiation = typeParameterInstantiation;
  112618. exports.unionTypeAnnotation = unionTypeAnnotation;
  112619. exports.variance = variance;
  112620. exports.voidTypeAnnotation = voidTypeAnnotation;
  112621. exports.enumDeclaration = enumDeclaration;
  112622. exports.enumBooleanBody = enumBooleanBody;
  112623. exports.enumNumberBody = enumNumberBody;
  112624. exports.enumStringBody = enumStringBody;
  112625. exports.enumSymbolBody = enumSymbolBody;
  112626. exports.enumBooleanMember = enumBooleanMember;
  112627. exports.enumNumberMember = enumNumberMember;
  112628. exports.enumStringMember = enumStringMember;
  112629. exports.enumDefaultedMember = enumDefaultedMember;
  112630. exports.indexedAccessType = indexedAccessType;
  112631. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  112632. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  112633. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  112634. exports.jSXElement = exports.jsxElement = jsxElement;
  112635. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  112636. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  112637. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  112638. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  112639. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  112640. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  112641. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  112642. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  112643. exports.jSXText = exports.jsxText = jsxText2;
  112644. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  112645. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  112646. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  112647. exports.noop = noop;
  112648. exports.placeholder = placeholder;
  112649. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  112650. exports.argumentPlaceholder = argumentPlaceholder;
  112651. exports.bindExpression = bindExpression;
  112652. exports.classProperty = classProperty;
  112653. exports.pipelineTopicExpression = pipelineTopicExpression;
  112654. exports.pipelineBareFunction = pipelineBareFunction;
  112655. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  112656. exports.classPrivateProperty = classPrivateProperty;
  112657. exports.classPrivateMethod = classPrivateMethod;
  112658. exports.importAttribute = importAttribute;
  112659. exports.decorator = decorator;
  112660. exports.doExpression = doExpression;
  112661. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  112662. exports.privateName = privateName;
  112663. exports.recordExpression = recordExpression;
  112664. exports.tupleExpression = tupleExpression;
  112665. exports.decimalLiteral = decimalLiteral;
  112666. exports.staticBlock = staticBlock;
  112667. exports.moduleExpression = moduleExpression;
  112668. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  112669. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  112670. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  112671. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  112672. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  112673. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  112674. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  112675. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  112676. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  112677. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  112678. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  112679. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  112680. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  112681. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  112682. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  112683. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  112684. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  112685. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  112686. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  112687. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  112688. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  112689. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  112690. exports.tSThisType = exports.tsThisType = tsThisType;
  112691. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  112692. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  112693. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  112694. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  112695. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  112696. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  112697. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  112698. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  112699. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  112700. exports.tSRestType = exports.tsRestType = tsRestType;
  112701. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  112702. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  112703. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  112704. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  112705. exports.tSInferType = exports.tsInferType = tsInferType;
  112706. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  112707. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  112708. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  112709. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  112710. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  112711. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  112712. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  112713. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  112714. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  112715. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  112716. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  112717. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  112718. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  112719. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  112720. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  112721. exports.tSImportType = exports.tsImportType = tsImportType;
  112722. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  112723. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  112724. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  112725. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  112726. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  112727. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  112728. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  112729. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  112730. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  112731. exports.numberLiteral = NumberLiteral;
  112732. exports.regexLiteral = RegexLiteral;
  112733. exports.restProperty = RestProperty;
  112734. exports.spreadProperty = SpreadProperty;
  112735. var _builder = require_builder6();
  112736. function arrayExpression(elements) {
  112737. return (0, _builder.default)("ArrayExpression", ...arguments);
  112738. }
  112739. function assignmentExpression(operator, left, right) {
  112740. return (0, _builder.default)("AssignmentExpression", ...arguments);
  112741. }
  112742. function binaryExpression(operator, left, right) {
  112743. return (0, _builder.default)("BinaryExpression", ...arguments);
  112744. }
  112745. function interpreterDirective(value) {
  112746. return (0, _builder.default)("InterpreterDirective", ...arguments);
  112747. }
  112748. function directive(value) {
  112749. return (0, _builder.default)("Directive", ...arguments);
  112750. }
  112751. function directiveLiteral(value) {
  112752. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  112753. }
  112754. function blockStatement(body, directives) {
  112755. return (0, _builder.default)("BlockStatement", ...arguments);
  112756. }
  112757. function breakStatement(label) {
  112758. return (0, _builder.default)("BreakStatement", ...arguments);
  112759. }
  112760. function callExpression(callee, _arguments) {
  112761. return (0, _builder.default)("CallExpression", ...arguments);
  112762. }
  112763. function catchClause(param, body) {
  112764. return (0, _builder.default)("CatchClause", ...arguments);
  112765. }
  112766. function conditionalExpression(test, consequent, alternate) {
  112767. return (0, _builder.default)("ConditionalExpression", ...arguments);
  112768. }
  112769. function continueStatement(label) {
  112770. return (0, _builder.default)("ContinueStatement", ...arguments);
  112771. }
  112772. function debuggerStatement() {
  112773. return (0, _builder.default)("DebuggerStatement", ...arguments);
  112774. }
  112775. function doWhileStatement(test, body) {
  112776. return (0, _builder.default)("DoWhileStatement", ...arguments);
  112777. }
  112778. function emptyStatement() {
  112779. return (0, _builder.default)("EmptyStatement", ...arguments);
  112780. }
  112781. function expressionStatement(expression) {
  112782. return (0, _builder.default)("ExpressionStatement", ...arguments);
  112783. }
  112784. function file(program2, comments, tokens) {
  112785. return (0, _builder.default)("File", ...arguments);
  112786. }
  112787. function forInStatement(left, right, body) {
  112788. return (0, _builder.default)("ForInStatement", ...arguments);
  112789. }
  112790. function forStatement(init, test, update, body) {
  112791. return (0, _builder.default)("ForStatement", ...arguments);
  112792. }
  112793. function functionDeclaration(id, params, body, generator, async) {
  112794. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  112795. }
  112796. function functionExpression(id, params, body, generator, async) {
  112797. return (0, _builder.default)("FunctionExpression", ...arguments);
  112798. }
  112799. function identifier(name2) {
  112800. return (0, _builder.default)("Identifier", ...arguments);
  112801. }
  112802. function ifStatement(test, consequent, alternate) {
  112803. return (0, _builder.default)("IfStatement", ...arguments);
  112804. }
  112805. function labeledStatement(label, body) {
  112806. return (0, _builder.default)("LabeledStatement", ...arguments);
  112807. }
  112808. function stringLiteral(value) {
  112809. return (0, _builder.default)("StringLiteral", ...arguments);
  112810. }
  112811. function numericLiteral(value) {
  112812. return (0, _builder.default)("NumericLiteral", ...arguments);
  112813. }
  112814. function nullLiteral() {
  112815. return (0, _builder.default)("NullLiteral", ...arguments);
  112816. }
  112817. function booleanLiteral(value) {
  112818. return (0, _builder.default)("BooleanLiteral", ...arguments);
  112819. }
  112820. function regExpLiteral(pattern, flags) {
  112821. return (0, _builder.default)("RegExpLiteral", ...arguments);
  112822. }
  112823. function logicalExpression(operator, left, right) {
  112824. return (0, _builder.default)("LogicalExpression", ...arguments);
  112825. }
  112826. function memberExpression(object, property, computed, optional) {
  112827. return (0, _builder.default)("MemberExpression", ...arguments);
  112828. }
  112829. function newExpression(callee, _arguments) {
  112830. return (0, _builder.default)("NewExpression", ...arguments);
  112831. }
  112832. function program(body, directives, sourceType, interpreter) {
  112833. return (0, _builder.default)("Program", ...arguments);
  112834. }
  112835. function objectExpression(properties) {
  112836. return (0, _builder.default)("ObjectExpression", ...arguments);
  112837. }
  112838. function objectMethod(kind, key, params, body, computed, generator, async) {
  112839. return (0, _builder.default)("ObjectMethod", ...arguments);
  112840. }
  112841. function objectProperty(key, value, computed, shorthand, decorators) {
  112842. return (0, _builder.default)("ObjectProperty", ...arguments);
  112843. }
  112844. function restElement(argument) {
  112845. return (0, _builder.default)("RestElement", ...arguments);
  112846. }
  112847. function returnStatement(argument) {
  112848. return (0, _builder.default)("ReturnStatement", ...arguments);
  112849. }
  112850. function sequenceExpression(expressions) {
  112851. return (0, _builder.default)("SequenceExpression", ...arguments);
  112852. }
  112853. function parenthesizedExpression(expression) {
  112854. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  112855. }
  112856. function switchCase(test, consequent) {
  112857. return (0, _builder.default)("SwitchCase", ...arguments);
  112858. }
  112859. function switchStatement(discriminant, cases) {
  112860. return (0, _builder.default)("SwitchStatement", ...arguments);
  112861. }
  112862. function thisExpression() {
  112863. return (0, _builder.default)("ThisExpression", ...arguments);
  112864. }
  112865. function throwStatement(argument) {
  112866. return (0, _builder.default)("ThrowStatement", ...arguments);
  112867. }
  112868. function tryStatement(block, handler, finalizer) {
  112869. return (0, _builder.default)("TryStatement", ...arguments);
  112870. }
  112871. function unaryExpression(operator, argument, prefix) {
  112872. return (0, _builder.default)("UnaryExpression", ...arguments);
  112873. }
  112874. function updateExpression(operator, argument, prefix) {
  112875. return (0, _builder.default)("UpdateExpression", ...arguments);
  112876. }
  112877. function variableDeclaration(kind, declarations) {
  112878. return (0, _builder.default)("VariableDeclaration", ...arguments);
  112879. }
  112880. function variableDeclarator(id, init) {
  112881. return (0, _builder.default)("VariableDeclarator", ...arguments);
  112882. }
  112883. function whileStatement(test, body) {
  112884. return (0, _builder.default)("WhileStatement", ...arguments);
  112885. }
  112886. function withStatement(object, body) {
  112887. return (0, _builder.default)("WithStatement", ...arguments);
  112888. }
  112889. function assignmentPattern(left, right) {
  112890. return (0, _builder.default)("AssignmentPattern", ...arguments);
  112891. }
  112892. function arrayPattern(elements) {
  112893. return (0, _builder.default)("ArrayPattern", ...arguments);
  112894. }
  112895. function arrowFunctionExpression(params, body, async) {
  112896. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  112897. }
  112898. function classBody(body) {
  112899. return (0, _builder.default)("ClassBody", ...arguments);
  112900. }
  112901. function classExpression(id, superClass, body, decorators) {
  112902. return (0, _builder.default)("ClassExpression", ...arguments);
  112903. }
  112904. function classDeclaration(id, superClass, body, decorators) {
  112905. return (0, _builder.default)("ClassDeclaration", ...arguments);
  112906. }
  112907. function exportAllDeclaration(source) {
  112908. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  112909. }
  112910. function exportDefaultDeclaration(declaration) {
  112911. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  112912. }
  112913. function exportNamedDeclaration(declaration, specifiers, source) {
  112914. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  112915. }
  112916. function exportSpecifier(local, exported) {
  112917. return (0, _builder.default)("ExportSpecifier", ...arguments);
  112918. }
  112919. function forOfStatement(left, right, body, _await) {
  112920. return (0, _builder.default)("ForOfStatement", ...arguments);
  112921. }
  112922. function importDeclaration(specifiers, source) {
  112923. return (0, _builder.default)("ImportDeclaration", ...arguments);
  112924. }
  112925. function importDefaultSpecifier(local) {
  112926. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  112927. }
  112928. function importNamespaceSpecifier(local) {
  112929. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  112930. }
  112931. function importSpecifier(local, imported) {
  112932. return (0, _builder.default)("ImportSpecifier", ...arguments);
  112933. }
  112934. function metaProperty(meta, property) {
  112935. return (0, _builder.default)("MetaProperty", ...arguments);
  112936. }
  112937. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  112938. return (0, _builder.default)("ClassMethod", ...arguments);
  112939. }
  112940. function objectPattern(properties) {
  112941. return (0, _builder.default)("ObjectPattern", ...arguments);
  112942. }
  112943. function spreadElement(argument) {
  112944. return (0, _builder.default)("SpreadElement", ...arguments);
  112945. }
  112946. function _super() {
  112947. return (0, _builder.default)("Super", ...arguments);
  112948. }
  112949. function taggedTemplateExpression(tag, quasi) {
  112950. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  112951. }
  112952. function templateElement(value, tail) {
  112953. return (0, _builder.default)("TemplateElement", ...arguments);
  112954. }
  112955. function templateLiteral(quasis, expressions) {
  112956. return (0, _builder.default)("TemplateLiteral", ...arguments);
  112957. }
  112958. function yieldExpression(argument, delegate) {
  112959. return (0, _builder.default)("YieldExpression", ...arguments);
  112960. }
  112961. function awaitExpression(argument) {
  112962. return (0, _builder.default)("AwaitExpression", ...arguments);
  112963. }
  112964. function _import() {
  112965. return (0, _builder.default)("Import", ...arguments);
  112966. }
  112967. function bigIntLiteral(value) {
  112968. return (0, _builder.default)("BigIntLiteral", ...arguments);
  112969. }
  112970. function exportNamespaceSpecifier(exported) {
  112971. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  112972. }
  112973. function optionalMemberExpression(object, property, computed, optional) {
  112974. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  112975. }
  112976. function optionalCallExpression(callee, _arguments, optional) {
  112977. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  112978. }
  112979. function anyTypeAnnotation() {
  112980. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  112981. }
  112982. function arrayTypeAnnotation(elementType) {
  112983. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  112984. }
  112985. function booleanTypeAnnotation() {
  112986. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  112987. }
  112988. function booleanLiteralTypeAnnotation(value) {
  112989. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  112990. }
  112991. function nullLiteralTypeAnnotation() {
  112992. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  112993. }
  112994. function classImplements(id, typeParameters) {
  112995. return (0, _builder.default)("ClassImplements", ...arguments);
  112996. }
  112997. function declareClass(id, typeParameters, _extends, body) {
  112998. return (0, _builder.default)("DeclareClass", ...arguments);
  112999. }
  113000. function declareFunction(id) {
  113001. return (0, _builder.default)("DeclareFunction", ...arguments);
  113002. }
  113003. function declareInterface(id, typeParameters, _extends, body) {
  113004. return (0, _builder.default)("DeclareInterface", ...arguments);
  113005. }
  113006. function declareModule(id, body, kind) {
  113007. return (0, _builder.default)("DeclareModule", ...arguments);
  113008. }
  113009. function declareModuleExports(typeAnnotation2) {
  113010. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  113011. }
  113012. function declareTypeAlias(id, typeParameters, right) {
  113013. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  113014. }
  113015. function declareOpaqueType(id, typeParameters, supertype) {
  113016. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  113017. }
  113018. function declareVariable(id) {
  113019. return (0, _builder.default)("DeclareVariable", ...arguments);
  113020. }
  113021. function declareExportDeclaration(declaration, specifiers, source) {
  113022. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  113023. }
  113024. function declareExportAllDeclaration(source) {
  113025. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  113026. }
  113027. function declaredPredicate(value) {
  113028. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  113029. }
  113030. function existsTypeAnnotation() {
  113031. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  113032. }
  113033. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  113034. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  113035. }
  113036. function functionTypeParam(name2, typeAnnotation2) {
  113037. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  113038. }
  113039. function genericTypeAnnotation(id, typeParameters) {
  113040. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  113041. }
  113042. function inferredPredicate() {
  113043. return (0, _builder.default)("InferredPredicate", ...arguments);
  113044. }
  113045. function interfaceExtends(id, typeParameters) {
  113046. return (0, _builder.default)("InterfaceExtends", ...arguments);
  113047. }
  113048. function interfaceDeclaration(id, typeParameters, _extends, body) {
  113049. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  113050. }
  113051. function interfaceTypeAnnotation(_extends, body) {
  113052. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  113053. }
  113054. function intersectionTypeAnnotation(types2) {
  113055. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  113056. }
  113057. function mixedTypeAnnotation() {
  113058. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  113059. }
  113060. function emptyTypeAnnotation() {
  113061. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  113062. }
  113063. function nullableTypeAnnotation(typeAnnotation2) {
  113064. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  113065. }
  113066. function numberLiteralTypeAnnotation(value) {
  113067. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  113068. }
  113069. function numberTypeAnnotation() {
  113070. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  113071. }
  113072. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  113073. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  113074. }
  113075. function objectTypeInternalSlot(id, value, optional, _static, method) {
  113076. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  113077. }
  113078. function objectTypeCallProperty(value) {
  113079. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  113080. }
  113081. function objectTypeIndexer(id, key, value, variance2) {
  113082. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  113083. }
  113084. function objectTypeProperty(key, value, variance2) {
  113085. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  113086. }
  113087. function objectTypeSpreadProperty(argument) {
  113088. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  113089. }
  113090. function opaqueType(id, typeParameters, supertype, impltype) {
  113091. return (0, _builder.default)("OpaqueType", ...arguments);
  113092. }
  113093. function qualifiedTypeIdentifier(id, qualification) {
  113094. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  113095. }
  113096. function stringLiteralTypeAnnotation(value) {
  113097. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  113098. }
  113099. function stringTypeAnnotation() {
  113100. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  113101. }
  113102. function symbolTypeAnnotation() {
  113103. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  113104. }
  113105. function thisTypeAnnotation() {
  113106. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  113107. }
  113108. function tupleTypeAnnotation(types2) {
  113109. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  113110. }
  113111. function typeofTypeAnnotation(argument) {
  113112. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  113113. }
  113114. function typeAlias(id, typeParameters, right) {
  113115. return (0, _builder.default)("TypeAlias", ...arguments);
  113116. }
  113117. function typeAnnotation(typeAnnotation2) {
  113118. return (0, _builder.default)("TypeAnnotation", ...arguments);
  113119. }
  113120. function typeCastExpression(expression, typeAnnotation2) {
  113121. return (0, _builder.default)("TypeCastExpression", ...arguments);
  113122. }
  113123. function typeParameter(bound, _default, variance2) {
  113124. return (0, _builder.default)("TypeParameter", ...arguments);
  113125. }
  113126. function typeParameterDeclaration(params) {
  113127. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  113128. }
  113129. function typeParameterInstantiation(params) {
  113130. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  113131. }
  113132. function unionTypeAnnotation(types2) {
  113133. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  113134. }
  113135. function variance(kind) {
  113136. return (0, _builder.default)("Variance", ...arguments);
  113137. }
  113138. function voidTypeAnnotation() {
  113139. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  113140. }
  113141. function enumDeclaration(id, body) {
  113142. return (0, _builder.default)("EnumDeclaration", ...arguments);
  113143. }
  113144. function enumBooleanBody(members) {
  113145. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  113146. }
  113147. function enumNumberBody(members) {
  113148. return (0, _builder.default)("EnumNumberBody", ...arguments);
  113149. }
  113150. function enumStringBody(members) {
  113151. return (0, _builder.default)("EnumStringBody", ...arguments);
  113152. }
  113153. function enumSymbolBody(members) {
  113154. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  113155. }
  113156. function enumBooleanMember(id) {
  113157. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  113158. }
  113159. function enumNumberMember(id, init) {
  113160. return (0, _builder.default)("EnumNumberMember", ...arguments);
  113161. }
  113162. function enumStringMember(id, init) {
  113163. return (0, _builder.default)("EnumStringMember", ...arguments);
  113164. }
  113165. function enumDefaultedMember(id) {
  113166. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  113167. }
  113168. function indexedAccessType(objectType, indexType) {
  113169. return (0, _builder.default)("IndexedAccessType", ...arguments);
  113170. }
  113171. function optionalIndexedAccessType(objectType, indexType) {
  113172. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  113173. }
  113174. function jsxAttribute(name2, value) {
  113175. return (0, _builder.default)("JSXAttribute", ...arguments);
  113176. }
  113177. function jsxClosingElement(name2) {
  113178. return (0, _builder.default)("JSXClosingElement", ...arguments);
  113179. }
  113180. function jsxElement(openingElement, closingElement, children, selfClosing) {
  113181. return (0, _builder.default)("JSXElement", ...arguments);
  113182. }
  113183. function jsxEmptyExpression() {
  113184. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  113185. }
  113186. function jsxExpressionContainer(expression) {
  113187. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  113188. }
  113189. function jsxSpreadChild(expression) {
  113190. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  113191. }
  113192. function jsxIdentifier(name2) {
  113193. return (0, _builder.default)("JSXIdentifier", ...arguments);
  113194. }
  113195. function jsxMemberExpression(object, property) {
  113196. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  113197. }
  113198. function jsxNamespacedName(namespace, name2) {
  113199. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  113200. }
  113201. function jsxOpeningElement(name2, attributes, selfClosing) {
  113202. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  113203. }
  113204. function jsxSpreadAttribute(argument) {
  113205. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  113206. }
  113207. function jsxText2(value) {
  113208. return (0, _builder.default)("JSXText", ...arguments);
  113209. }
  113210. function jsxFragment(openingFragment, closingFragment, children) {
  113211. return (0, _builder.default)("JSXFragment", ...arguments);
  113212. }
  113213. function jsxOpeningFragment() {
  113214. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  113215. }
  113216. function jsxClosingFragment() {
  113217. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  113218. }
  113219. function noop() {
  113220. return (0, _builder.default)("Noop", ...arguments);
  113221. }
  113222. function placeholder(expectedNode, name2) {
  113223. return (0, _builder.default)("Placeholder", ...arguments);
  113224. }
  113225. function v8IntrinsicIdentifier(name2) {
  113226. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  113227. }
  113228. function argumentPlaceholder() {
  113229. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  113230. }
  113231. function bindExpression(object, callee) {
  113232. return (0, _builder.default)("BindExpression", ...arguments);
  113233. }
  113234. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  113235. return (0, _builder.default)("ClassProperty", ...arguments);
  113236. }
  113237. function pipelineTopicExpression(expression) {
  113238. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  113239. }
  113240. function pipelineBareFunction(callee) {
  113241. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  113242. }
  113243. function pipelinePrimaryTopicReference() {
  113244. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  113245. }
  113246. function classPrivateProperty(key, value, decorators, _static) {
  113247. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  113248. }
  113249. function classPrivateMethod(kind, key, params, body, _static) {
  113250. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  113251. }
  113252. function importAttribute(key, value) {
  113253. return (0, _builder.default)("ImportAttribute", ...arguments);
  113254. }
  113255. function decorator(expression) {
  113256. return (0, _builder.default)("Decorator", ...arguments);
  113257. }
  113258. function doExpression(body, async) {
  113259. return (0, _builder.default)("DoExpression", ...arguments);
  113260. }
  113261. function exportDefaultSpecifier(exported) {
  113262. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  113263. }
  113264. function privateName(id) {
  113265. return (0, _builder.default)("PrivateName", ...arguments);
  113266. }
  113267. function recordExpression(properties) {
  113268. return (0, _builder.default)("RecordExpression", ...arguments);
  113269. }
  113270. function tupleExpression(elements) {
  113271. return (0, _builder.default)("TupleExpression", ...arguments);
  113272. }
  113273. function decimalLiteral(value) {
  113274. return (0, _builder.default)("DecimalLiteral", ...arguments);
  113275. }
  113276. function staticBlock(body) {
  113277. return (0, _builder.default)("StaticBlock", ...arguments);
  113278. }
  113279. function moduleExpression(body) {
  113280. return (0, _builder.default)("ModuleExpression", ...arguments);
  113281. }
  113282. function tsParameterProperty(parameter) {
  113283. return (0, _builder.default)("TSParameterProperty", ...arguments);
  113284. }
  113285. function tsDeclareFunction(id, typeParameters, params, returnType) {
  113286. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  113287. }
  113288. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  113289. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  113290. }
  113291. function tsQualifiedName(left, right) {
  113292. return (0, _builder.default)("TSQualifiedName", ...arguments);
  113293. }
  113294. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  113295. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  113296. }
  113297. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  113298. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  113299. }
  113300. function tsPropertySignature(key, typeAnnotation2, initializer) {
  113301. return (0, _builder.default)("TSPropertySignature", ...arguments);
  113302. }
  113303. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  113304. return (0, _builder.default)("TSMethodSignature", ...arguments);
  113305. }
  113306. function tsIndexSignature(parameters, typeAnnotation2) {
  113307. return (0, _builder.default)("TSIndexSignature", ...arguments);
  113308. }
  113309. function tsAnyKeyword() {
  113310. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  113311. }
  113312. function tsBooleanKeyword() {
  113313. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  113314. }
  113315. function tsBigIntKeyword() {
  113316. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  113317. }
  113318. function tsIntrinsicKeyword() {
  113319. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  113320. }
  113321. function tsNeverKeyword() {
  113322. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  113323. }
  113324. function tsNullKeyword() {
  113325. return (0, _builder.default)("TSNullKeyword", ...arguments);
  113326. }
  113327. function tsNumberKeyword() {
  113328. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  113329. }
  113330. function tsObjectKeyword() {
  113331. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  113332. }
  113333. function tsStringKeyword() {
  113334. return (0, _builder.default)("TSStringKeyword", ...arguments);
  113335. }
  113336. function tsSymbolKeyword() {
  113337. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  113338. }
  113339. function tsUndefinedKeyword() {
  113340. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  113341. }
  113342. function tsUnknownKeyword() {
  113343. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  113344. }
  113345. function tsVoidKeyword() {
  113346. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  113347. }
  113348. function tsThisType() {
  113349. return (0, _builder.default)("TSThisType", ...arguments);
  113350. }
  113351. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  113352. return (0, _builder.default)("TSFunctionType", ...arguments);
  113353. }
  113354. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  113355. return (0, _builder.default)("TSConstructorType", ...arguments);
  113356. }
  113357. function tsTypeReference(typeName, typeParameters) {
  113358. return (0, _builder.default)("TSTypeReference", ...arguments);
  113359. }
  113360. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  113361. return (0, _builder.default)("TSTypePredicate", ...arguments);
  113362. }
  113363. function tsTypeQuery(exprName) {
  113364. return (0, _builder.default)("TSTypeQuery", ...arguments);
  113365. }
  113366. function tsTypeLiteral(members) {
  113367. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  113368. }
  113369. function tsArrayType(elementType) {
  113370. return (0, _builder.default)("TSArrayType", ...arguments);
  113371. }
  113372. function tsTupleType(elementTypes) {
  113373. return (0, _builder.default)("TSTupleType", ...arguments);
  113374. }
  113375. function tsOptionalType(typeAnnotation2) {
  113376. return (0, _builder.default)("TSOptionalType", ...arguments);
  113377. }
  113378. function tsRestType(typeAnnotation2) {
  113379. return (0, _builder.default)("TSRestType", ...arguments);
  113380. }
  113381. function tsNamedTupleMember(label, elementType, optional) {
  113382. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  113383. }
  113384. function tsUnionType(types2) {
  113385. return (0, _builder.default)("TSUnionType", ...arguments);
  113386. }
  113387. function tsIntersectionType(types2) {
  113388. return (0, _builder.default)("TSIntersectionType", ...arguments);
  113389. }
  113390. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  113391. return (0, _builder.default)("TSConditionalType", ...arguments);
  113392. }
  113393. function tsInferType(typeParameter2) {
  113394. return (0, _builder.default)("TSInferType", ...arguments);
  113395. }
  113396. function tsParenthesizedType(typeAnnotation2) {
  113397. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  113398. }
  113399. function tsTypeOperator(typeAnnotation2) {
  113400. return (0, _builder.default)("TSTypeOperator", ...arguments);
  113401. }
  113402. function tsIndexedAccessType(objectType, indexType) {
  113403. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  113404. }
  113405. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  113406. return (0, _builder.default)("TSMappedType", ...arguments);
  113407. }
  113408. function tsLiteralType(literal2) {
  113409. return (0, _builder.default)("TSLiteralType", ...arguments);
  113410. }
  113411. function tsExpressionWithTypeArguments(expression, typeParameters) {
  113412. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  113413. }
  113414. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  113415. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  113416. }
  113417. function tsInterfaceBody(body) {
  113418. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  113419. }
  113420. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  113421. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  113422. }
  113423. function tsAsExpression(expression, typeAnnotation2) {
  113424. return (0, _builder.default)("TSAsExpression", ...arguments);
  113425. }
  113426. function tsTypeAssertion(typeAnnotation2, expression) {
  113427. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  113428. }
  113429. function tsEnumDeclaration(id, members) {
  113430. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  113431. }
  113432. function tsEnumMember(id, initializer) {
  113433. return (0, _builder.default)("TSEnumMember", ...arguments);
  113434. }
  113435. function tsModuleDeclaration(id, body) {
  113436. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  113437. }
  113438. function tsModuleBlock(body) {
  113439. return (0, _builder.default)("TSModuleBlock", ...arguments);
  113440. }
  113441. function tsImportType(argument, qualifier, typeParameters) {
  113442. return (0, _builder.default)("TSImportType", ...arguments);
  113443. }
  113444. function tsImportEqualsDeclaration(id, moduleReference) {
  113445. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  113446. }
  113447. function tsExternalModuleReference(expression) {
  113448. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  113449. }
  113450. function tsNonNullExpression(expression) {
  113451. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  113452. }
  113453. function tsExportAssignment(expression) {
  113454. return (0, _builder.default)("TSExportAssignment", ...arguments);
  113455. }
  113456. function tsNamespaceExportDeclaration(id) {
  113457. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  113458. }
  113459. function tsTypeAnnotation(typeAnnotation2) {
  113460. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  113461. }
  113462. function tsTypeParameterInstantiation(params) {
  113463. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  113464. }
  113465. function tsTypeParameterDeclaration(params) {
  113466. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  113467. }
  113468. function tsTypeParameter(constraint, _default, name2) {
  113469. return (0, _builder.default)("TSTypeParameter", ...arguments);
  113470. }
  113471. function NumberLiteral(...args) {
  113472. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  113473. return (0, _builder.default)("NumberLiteral", ...args);
  113474. }
  113475. function RegexLiteral(...args) {
  113476. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  113477. return (0, _builder.default)("RegexLiteral", ...args);
  113478. }
  113479. function RestProperty(...args) {
  113480. console.trace("The node type RestProperty has been renamed to RestElement");
  113481. return (0, _builder.default)("RestProperty", ...args);
  113482. }
  113483. function SpreadProperty(...args) {
  113484. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  113485. return (0, _builder.default)("SpreadProperty", ...args);
  113486. }
  113487. }
  113488. });
  113489. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  113490. var require_cleanJSXElementLiteralChild5 = __commonJS({
  113491. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  113492. "use strict";
  113493. Object.defineProperty(exports, "__esModule", {
  113494. value: true
  113495. });
  113496. exports.default = cleanJSXElementLiteralChild;
  113497. var _generated = require_generated22();
  113498. function cleanJSXElementLiteralChild(child, args) {
  113499. const lines = child.value.split(/\r\n|\n|\r/);
  113500. let lastNonEmptyLine = 0;
  113501. for (let i = 0; i < lines.length; i++) {
  113502. if (lines[i].match(/[^ \t]/)) {
  113503. lastNonEmptyLine = i;
  113504. }
  113505. }
  113506. let str = "";
  113507. for (let i = 0; i < lines.length; i++) {
  113508. const line = lines[i];
  113509. const isFirstLine = i === 0;
  113510. const isLastLine = i === lines.length - 1;
  113511. const isLastNonEmptyLine = i === lastNonEmptyLine;
  113512. let trimmedLine = line.replace(/\t/g, " ");
  113513. if (!isFirstLine) {
  113514. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  113515. }
  113516. if (!isLastLine) {
  113517. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  113518. }
  113519. if (trimmedLine) {
  113520. if (!isLastNonEmptyLine) {
  113521. trimmedLine += " ";
  113522. }
  113523. str += trimmedLine;
  113524. }
  113525. }
  113526. if (str)
  113527. args.push((0, _generated.stringLiteral)(str));
  113528. }
  113529. }
  113530. });
  113531. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/react/buildChildren.js
  113532. var require_buildChildren5 = __commonJS({
  113533. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  113534. "use strict";
  113535. Object.defineProperty(exports, "__esModule", {
  113536. value: true
  113537. });
  113538. exports.default = buildChildren;
  113539. var _generated = require_generated21();
  113540. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild5();
  113541. function buildChildren(node) {
  113542. const elements = [];
  113543. for (let i = 0; i < node.children.length; i++) {
  113544. let child = node.children[i];
  113545. if ((0, _generated.isJSXText)(child)) {
  113546. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  113547. continue;
  113548. }
  113549. if ((0, _generated.isJSXExpressionContainer)(child))
  113550. child = child.expression;
  113551. if ((0, _generated.isJSXEmptyExpression)(child))
  113552. continue;
  113553. elements.push(child);
  113554. }
  113555. return elements;
  113556. }
  113557. }
  113558. });
  113559. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isNode.js
  113560. var require_isNode5 = __commonJS({
  113561. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  113562. "use strict";
  113563. Object.defineProperty(exports, "__esModule", {
  113564. value: true
  113565. });
  113566. exports.default = isNode;
  113567. var _definitions = require_definitions5();
  113568. function isNode(node) {
  113569. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  113570. }
  113571. }
  113572. });
  113573. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/asserts/assertNode.js
  113574. var require_assertNode5 = __commonJS({
  113575. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  113576. "use strict";
  113577. Object.defineProperty(exports, "__esModule", {
  113578. value: true
  113579. });
  113580. exports.default = assertNode2;
  113581. var _isNode = require_isNode5();
  113582. function assertNode2(node) {
  113583. if (!(0, _isNode.default)(node)) {
  113584. var _node$type;
  113585. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  113586. throw new TypeError(`Not a valid node of type "${type}"`);
  113587. }
  113588. }
  113589. }
  113590. });
  113591. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/asserts/generated/index.js
  113592. var require_generated23 = __commonJS({
  113593. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  113594. "use strict";
  113595. Object.defineProperty(exports, "__esModule", {
  113596. value: true
  113597. });
  113598. exports.assertArrayExpression = assertArrayExpression;
  113599. exports.assertAssignmentExpression = assertAssignmentExpression;
  113600. exports.assertBinaryExpression = assertBinaryExpression;
  113601. exports.assertInterpreterDirective = assertInterpreterDirective;
  113602. exports.assertDirective = assertDirective;
  113603. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  113604. exports.assertBlockStatement = assertBlockStatement;
  113605. exports.assertBreakStatement = assertBreakStatement;
  113606. exports.assertCallExpression = assertCallExpression;
  113607. exports.assertCatchClause = assertCatchClause;
  113608. exports.assertConditionalExpression = assertConditionalExpression;
  113609. exports.assertContinueStatement = assertContinueStatement;
  113610. exports.assertDebuggerStatement = assertDebuggerStatement;
  113611. exports.assertDoWhileStatement = assertDoWhileStatement;
  113612. exports.assertEmptyStatement = assertEmptyStatement;
  113613. exports.assertExpressionStatement = assertExpressionStatement;
  113614. exports.assertFile = assertFile;
  113615. exports.assertForInStatement = assertForInStatement;
  113616. exports.assertForStatement = assertForStatement;
  113617. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  113618. exports.assertFunctionExpression = assertFunctionExpression;
  113619. exports.assertIdentifier = assertIdentifier;
  113620. exports.assertIfStatement = assertIfStatement;
  113621. exports.assertLabeledStatement = assertLabeledStatement;
  113622. exports.assertStringLiteral = assertStringLiteral;
  113623. exports.assertNumericLiteral = assertNumericLiteral;
  113624. exports.assertNullLiteral = assertNullLiteral;
  113625. exports.assertBooleanLiteral = assertBooleanLiteral;
  113626. exports.assertRegExpLiteral = assertRegExpLiteral;
  113627. exports.assertLogicalExpression = assertLogicalExpression;
  113628. exports.assertMemberExpression = assertMemberExpression;
  113629. exports.assertNewExpression = assertNewExpression;
  113630. exports.assertProgram = assertProgram;
  113631. exports.assertObjectExpression = assertObjectExpression;
  113632. exports.assertObjectMethod = assertObjectMethod;
  113633. exports.assertObjectProperty = assertObjectProperty;
  113634. exports.assertRestElement = assertRestElement;
  113635. exports.assertReturnStatement = assertReturnStatement;
  113636. exports.assertSequenceExpression = assertSequenceExpression;
  113637. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  113638. exports.assertSwitchCase = assertSwitchCase;
  113639. exports.assertSwitchStatement = assertSwitchStatement;
  113640. exports.assertThisExpression = assertThisExpression;
  113641. exports.assertThrowStatement = assertThrowStatement;
  113642. exports.assertTryStatement = assertTryStatement;
  113643. exports.assertUnaryExpression = assertUnaryExpression;
  113644. exports.assertUpdateExpression = assertUpdateExpression;
  113645. exports.assertVariableDeclaration = assertVariableDeclaration;
  113646. exports.assertVariableDeclarator = assertVariableDeclarator;
  113647. exports.assertWhileStatement = assertWhileStatement;
  113648. exports.assertWithStatement = assertWithStatement;
  113649. exports.assertAssignmentPattern = assertAssignmentPattern;
  113650. exports.assertArrayPattern = assertArrayPattern;
  113651. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  113652. exports.assertClassBody = assertClassBody;
  113653. exports.assertClassExpression = assertClassExpression;
  113654. exports.assertClassDeclaration = assertClassDeclaration;
  113655. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  113656. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  113657. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  113658. exports.assertExportSpecifier = assertExportSpecifier;
  113659. exports.assertForOfStatement = assertForOfStatement;
  113660. exports.assertImportDeclaration = assertImportDeclaration;
  113661. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  113662. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  113663. exports.assertImportSpecifier = assertImportSpecifier;
  113664. exports.assertMetaProperty = assertMetaProperty;
  113665. exports.assertClassMethod = assertClassMethod;
  113666. exports.assertObjectPattern = assertObjectPattern;
  113667. exports.assertSpreadElement = assertSpreadElement;
  113668. exports.assertSuper = assertSuper;
  113669. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  113670. exports.assertTemplateElement = assertTemplateElement;
  113671. exports.assertTemplateLiteral = assertTemplateLiteral;
  113672. exports.assertYieldExpression = assertYieldExpression;
  113673. exports.assertAwaitExpression = assertAwaitExpression;
  113674. exports.assertImport = assertImport;
  113675. exports.assertBigIntLiteral = assertBigIntLiteral;
  113676. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  113677. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  113678. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  113679. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  113680. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  113681. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  113682. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  113683. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  113684. exports.assertClassImplements = assertClassImplements;
  113685. exports.assertDeclareClass = assertDeclareClass;
  113686. exports.assertDeclareFunction = assertDeclareFunction;
  113687. exports.assertDeclareInterface = assertDeclareInterface;
  113688. exports.assertDeclareModule = assertDeclareModule;
  113689. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  113690. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  113691. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  113692. exports.assertDeclareVariable = assertDeclareVariable;
  113693. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  113694. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  113695. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  113696. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  113697. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  113698. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  113699. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  113700. exports.assertInferredPredicate = assertInferredPredicate;
  113701. exports.assertInterfaceExtends = assertInterfaceExtends;
  113702. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  113703. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  113704. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  113705. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  113706. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  113707. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  113708. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  113709. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  113710. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  113711. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  113712. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  113713. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  113714. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  113715. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  113716. exports.assertOpaqueType = assertOpaqueType;
  113717. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  113718. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  113719. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  113720. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  113721. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  113722. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  113723. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  113724. exports.assertTypeAlias = assertTypeAlias;
  113725. exports.assertTypeAnnotation = assertTypeAnnotation;
  113726. exports.assertTypeCastExpression = assertTypeCastExpression;
  113727. exports.assertTypeParameter = assertTypeParameter;
  113728. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  113729. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  113730. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  113731. exports.assertVariance = assertVariance;
  113732. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  113733. exports.assertEnumDeclaration = assertEnumDeclaration;
  113734. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  113735. exports.assertEnumNumberBody = assertEnumNumberBody;
  113736. exports.assertEnumStringBody = assertEnumStringBody;
  113737. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  113738. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  113739. exports.assertEnumNumberMember = assertEnumNumberMember;
  113740. exports.assertEnumStringMember = assertEnumStringMember;
  113741. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  113742. exports.assertIndexedAccessType = assertIndexedAccessType;
  113743. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  113744. exports.assertJSXAttribute = assertJSXAttribute;
  113745. exports.assertJSXClosingElement = assertJSXClosingElement;
  113746. exports.assertJSXElement = assertJSXElement;
  113747. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  113748. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  113749. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  113750. exports.assertJSXIdentifier = assertJSXIdentifier;
  113751. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  113752. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  113753. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  113754. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  113755. exports.assertJSXText = assertJSXText;
  113756. exports.assertJSXFragment = assertJSXFragment;
  113757. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  113758. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  113759. exports.assertNoop = assertNoop;
  113760. exports.assertPlaceholder = assertPlaceholder;
  113761. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  113762. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  113763. exports.assertBindExpression = assertBindExpression;
  113764. exports.assertClassProperty = assertClassProperty;
  113765. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  113766. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  113767. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  113768. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  113769. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  113770. exports.assertImportAttribute = assertImportAttribute;
  113771. exports.assertDecorator = assertDecorator;
  113772. exports.assertDoExpression = assertDoExpression;
  113773. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  113774. exports.assertPrivateName = assertPrivateName;
  113775. exports.assertRecordExpression = assertRecordExpression;
  113776. exports.assertTupleExpression = assertTupleExpression;
  113777. exports.assertDecimalLiteral = assertDecimalLiteral;
  113778. exports.assertStaticBlock = assertStaticBlock;
  113779. exports.assertModuleExpression = assertModuleExpression;
  113780. exports.assertTSParameterProperty = assertTSParameterProperty;
  113781. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  113782. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  113783. exports.assertTSQualifiedName = assertTSQualifiedName;
  113784. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  113785. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  113786. exports.assertTSPropertySignature = assertTSPropertySignature;
  113787. exports.assertTSMethodSignature = assertTSMethodSignature;
  113788. exports.assertTSIndexSignature = assertTSIndexSignature;
  113789. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  113790. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  113791. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  113792. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  113793. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  113794. exports.assertTSNullKeyword = assertTSNullKeyword;
  113795. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  113796. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  113797. exports.assertTSStringKeyword = assertTSStringKeyword;
  113798. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  113799. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  113800. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  113801. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  113802. exports.assertTSThisType = assertTSThisType;
  113803. exports.assertTSFunctionType = assertTSFunctionType;
  113804. exports.assertTSConstructorType = assertTSConstructorType;
  113805. exports.assertTSTypeReference = assertTSTypeReference;
  113806. exports.assertTSTypePredicate = assertTSTypePredicate;
  113807. exports.assertTSTypeQuery = assertTSTypeQuery;
  113808. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  113809. exports.assertTSArrayType = assertTSArrayType;
  113810. exports.assertTSTupleType = assertTSTupleType;
  113811. exports.assertTSOptionalType = assertTSOptionalType;
  113812. exports.assertTSRestType = assertTSRestType;
  113813. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  113814. exports.assertTSUnionType = assertTSUnionType;
  113815. exports.assertTSIntersectionType = assertTSIntersectionType;
  113816. exports.assertTSConditionalType = assertTSConditionalType;
  113817. exports.assertTSInferType = assertTSInferType;
  113818. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  113819. exports.assertTSTypeOperator = assertTSTypeOperator;
  113820. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  113821. exports.assertTSMappedType = assertTSMappedType;
  113822. exports.assertTSLiteralType = assertTSLiteralType;
  113823. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  113824. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  113825. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  113826. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  113827. exports.assertTSAsExpression = assertTSAsExpression;
  113828. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  113829. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  113830. exports.assertTSEnumMember = assertTSEnumMember;
  113831. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  113832. exports.assertTSModuleBlock = assertTSModuleBlock;
  113833. exports.assertTSImportType = assertTSImportType;
  113834. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  113835. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  113836. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  113837. exports.assertTSExportAssignment = assertTSExportAssignment;
  113838. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  113839. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  113840. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  113841. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  113842. exports.assertTSTypeParameter = assertTSTypeParameter;
  113843. exports.assertExpression = assertExpression;
  113844. exports.assertBinary = assertBinary;
  113845. exports.assertScopable = assertScopable;
  113846. exports.assertBlockParent = assertBlockParent;
  113847. exports.assertBlock = assertBlock;
  113848. exports.assertStatement = assertStatement;
  113849. exports.assertTerminatorless = assertTerminatorless;
  113850. exports.assertCompletionStatement = assertCompletionStatement;
  113851. exports.assertConditional = assertConditional;
  113852. exports.assertLoop = assertLoop;
  113853. exports.assertWhile = assertWhile;
  113854. exports.assertExpressionWrapper = assertExpressionWrapper;
  113855. exports.assertFor = assertFor;
  113856. exports.assertForXStatement = assertForXStatement;
  113857. exports.assertFunction = assertFunction;
  113858. exports.assertFunctionParent = assertFunctionParent;
  113859. exports.assertPureish = assertPureish;
  113860. exports.assertDeclaration = assertDeclaration;
  113861. exports.assertPatternLike = assertPatternLike;
  113862. exports.assertLVal = assertLVal;
  113863. exports.assertTSEntityName = assertTSEntityName;
  113864. exports.assertLiteral = assertLiteral;
  113865. exports.assertImmutable = assertImmutable;
  113866. exports.assertUserWhitespacable = assertUserWhitespacable;
  113867. exports.assertMethod = assertMethod;
  113868. exports.assertObjectMember = assertObjectMember;
  113869. exports.assertProperty = assertProperty;
  113870. exports.assertUnaryLike = assertUnaryLike;
  113871. exports.assertPattern = assertPattern;
  113872. exports.assertClass = assertClass;
  113873. exports.assertModuleDeclaration = assertModuleDeclaration;
  113874. exports.assertExportDeclaration = assertExportDeclaration;
  113875. exports.assertModuleSpecifier = assertModuleSpecifier;
  113876. exports.assertFlow = assertFlow;
  113877. exports.assertFlowType = assertFlowType;
  113878. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  113879. exports.assertFlowDeclaration = assertFlowDeclaration;
  113880. exports.assertFlowPredicate = assertFlowPredicate;
  113881. exports.assertEnumBody = assertEnumBody;
  113882. exports.assertEnumMember = assertEnumMember;
  113883. exports.assertJSX = assertJSX;
  113884. exports.assertPrivate = assertPrivate;
  113885. exports.assertTSTypeElement = assertTSTypeElement;
  113886. exports.assertTSType = assertTSType;
  113887. exports.assertTSBaseType = assertTSBaseType;
  113888. exports.assertNumberLiteral = assertNumberLiteral;
  113889. exports.assertRegexLiteral = assertRegexLiteral;
  113890. exports.assertRestProperty = assertRestProperty;
  113891. exports.assertSpreadProperty = assertSpreadProperty;
  113892. var _is = require_is5();
  113893. function assert(type, node, opts) {
  113894. if (!(0, _is.default)(type, node, opts)) {
  113895. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  113896. }
  113897. }
  113898. function assertArrayExpression(node, opts) {
  113899. assert("ArrayExpression", node, opts);
  113900. }
  113901. function assertAssignmentExpression(node, opts) {
  113902. assert("AssignmentExpression", node, opts);
  113903. }
  113904. function assertBinaryExpression(node, opts) {
  113905. assert("BinaryExpression", node, opts);
  113906. }
  113907. function assertInterpreterDirective(node, opts) {
  113908. assert("InterpreterDirective", node, opts);
  113909. }
  113910. function assertDirective(node, opts) {
  113911. assert("Directive", node, opts);
  113912. }
  113913. function assertDirectiveLiteral(node, opts) {
  113914. assert("DirectiveLiteral", node, opts);
  113915. }
  113916. function assertBlockStatement(node, opts) {
  113917. assert("BlockStatement", node, opts);
  113918. }
  113919. function assertBreakStatement(node, opts) {
  113920. assert("BreakStatement", node, opts);
  113921. }
  113922. function assertCallExpression(node, opts) {
  113923. assert("CallExpression", node, opts);
  113924. }
  113925. function assertCatchClause(node, opts) {
  113926. assert("CatchClause", node, opts);
  113927. }
  113928. function assertConditionalExpression(node, opts) {
  113929. assert("ConditionalExpression", node, opts);
  113930. }
  113931. function assertContinueStatement(node, opts) {
  113932. assert("ContinueStatement", node, opts);
  113933. }
  113934. function assertDebuggerStatement(node, opts) {
  113935. assert("DebuggerStatement", node, opts);
  113936. }
  113937. function assertDoWhileStatement(node, opts) {
  113938. assert("DoWhileStatement", node, opts);
  113939. }
  113940. function assertEmptyStatement(node, opts) {
  113941. assert("EmptyStatement", node, opts);
  113942. }
  113943. function assertExpressionStatement(node, opts) {
  113944. assert("ExpressionStatement", node, opts);
  113945. }
  113946. function assertFile(node, opts) {
  113947. assert("File", node, opts);
  113948. }
  113949. function assertForInStatement(node, opts) {
  113950. assert("ForInStatement", node, opts);
  113951. }
  113952. function assertForStatement(node, opts) {
  113953. assert("ForStatement", node, opts);
  113954. }
  113955. function assertFunctionDeclaration(node, opts) {
  113956. assert("FunctionDeclaration", node, opts);
  113957. }
  113958. function assertFunctionExpression(node, opts) {
  113959. assert("FunctionExpression", node, opts);
  113960. }
  113961. function assertIdentifier(node, opts) {
  113962. assert("Identifier", node, opts);
  113963. }
  113964. function assertIfStatement(node, opts) {
  113965. assert("IfStatement", node, opts);
  113966. }
  113967. function assertLabeledStatement(node, opts) {
  113968. assert("LabeledStatement", node, opts);
  113969. }
  113970. function assertStringLiteral(node, opts) {
  113971. assert("StringLiteral", node, opts);
  113972. }
  113973. function assertNumericLiteral(node, opts) {
  113974. assert("NumericLiteral", node, opts);
  113975. }
  113976. function assertNullLiteral(node, opts) {
  113977. assert("NullLiteral", node, opts);
  113978. }
  113979. function assertBooleanLiteral(node, opts) {
  113980. assert("BooleanLiteral", node, opts);
  113981. }
  113982. function assertRegExpLiteral(node, opts) {
  113983. assert("RegExpLiteral", node, opts);
  113984. }
  113985. function assertLogicalExpression(node, opts) {
  113986. assert("LogicalExpression", node, opts);
  113987. }
  113988. function assertMemberExpression(node, opts) {
  113989. assert("MemberExpression", node, opts);
  113990. }
  113991. function assertNewExpression(node, opts) {
  113992. assert("NewExpression", node, opts);
  113993. }
  113994. function assertProgram(node, opts) {
  113995. assert("Program", node, opts);
  113996. }
  113997. function assertObjectExpression(node, opts) {
  113998. assert("ObjectExpression", node, opts);
  113999. }
  114000. function assertObjectMethod(node, opts) {
  114001. assert("ObjectMethod", node, opts);
  114002. }
  114003. function assertObjectProperty(node, opts) {
  114004. assert("ObjectProperty", node, opts);
  114005. }
  114006. function assertRestElement(node, opts) {
  114007. assert("RestElement", node, opts);
  114008. }
  114009. function assertReturnStatement(node, opts) {
  114010. assert("ReturnStatement", node, opts);
  114011. }
  114012. function assertSequenceExpression(node, opts) {
  114013. assert("SequenceExpression", node, opts);
  114014. }
  114015. function assertParenthesizedExpression(node, opts) {
  114016. assert("ParenthesizedExpression", node, opts);
  114017. }
  114018. function assertSwitchCase(node, opts) {
  114019. assert("SwitchCase", node, opts);
  114020. }
  114021. function assertSwitchStatement(node, opts) {
  114022. assert("SwitchStatement", node, opts);
  114023. }
  114024. function assertThisExpression(node, opts) {
  114025. assert("ThisExpression", node, opts);
  114026. }
  114027. function assertThrowStatement(node, opts) {
  114028. assert("ThrowStatement", node, opts);
  114029. }
  114030. function assertTryStatement(node, opts) {
  114031. assert("TryStatement", node, opts);
  114032. }
  114033. function assertUnaryExpression(node, opts) {
  114034. assert("UnaryExpression", node, opts);
  114035. }
  114036. function assertUpdateExpression(node, opts) {
  114037. assert("UpdateExpression", node, opts);
  114038. }
  114039. function assertVariableDeclaration(node, opts) {
  114040. assert("VariableDeclaration", node, opts);
  114041. }
  114042. function assertVariableDeclarator(node, opts) {
  114043. assert("VariableDeclarator", node, opts);
  114044. }
  114045. function assertWhileStatement(node, opts) {
  114046. assert("WhileStatement", node, opts);
  114047. }
  114048. function assertWithStatement(node, opts) {
  114049. assert("WithStatement", node, opts);
  114050. }
  114051. function assertAssignmentPattern(node, opts) {
  114052. assert("AssignmentPattern", node, opts);
  114053. }
  114054. function assertArrayPattern(node, opts) {
  114055. assert("ArrayPattern", node, opts);
  114056. }
  114057. function assertArrowFunctionExpression(node, opts) {
  114058. assert("ArrowFunctionExpression", node, opts);
  114059. }
  114060. function assertClassBody(node, opts) {
  114061. assert("ClassBody", node, opts);
  114062. }
  114063. function assertClassExpression(node, opts) {
  114064. assert("ClassExpression", node, opts);
  114065. }
  114066. function assertClassDeclaration(node, opts) {
  114067. assert("ClassDeclaration", node, opts);
  114068. }
  114069. function assertExportAllDeclaration(node, opts) {
  114070. assert("ExportAllDeclaration", node, opts);
  114071. }
  114072. function assertExportDefaultDeclaration(node, opts) {
  114073. assert("ExportDefaultDeclaration", node, opts);
  114074. }
  114075. function assertExportNamedDeclaration(node, opts) {
  114076. assert("ExportNamedDeclaration", node, opts);
  114077. }
  114078. function assertExportSpecifier(node, opts) {
  114079. assert("ExportSpecifier", node, opts);
  114080. }
  114081. function assertForOfStatement(node, opts) {
  114082. assert("ForOfStatement", node, opts);
  114083. }
  114084. function assertImportDeclaration(node, opts) {
  114085. assert("ImportDeclaration", node, opts);
  114086. }
  114087. function assertImportDefaultSpecifier(node, opts) {
  114088. assert("ImportDefaultSpecifier", node, opts);
  114089. }
  114090. function assertImportNamespaceSpecifier(node, opts) {
  114091. assert("ImportNamespaceSpecifier", node, opts);
  114092. }
  114093. function assertImportSpecifier(node, opts) {
  114094. assert("ImportSpecifier", node, opts);
  114095. }
  114096. function assertMetaProperty(node, opts) {
  114097. assert("MetaProperty", node, opts);
  114098. }
  114099. function assertClassMethod(node, opts) {
  114100. assert("ClassMethod", node, opts);
  114101. }
  114102. function assertObjectPattern(node, opts) {
  114103. assert("ObjectPattern", node, opts);
  114104. }
  114105. function assertSpreadElement(node, opts) {
  114106. assert("SpreadElement", node, opts);
  114107. }
  114108. function assertSuper(node, opts) {
  114109. assert("Super", node, opts);
  114110. }
  114111. function assertTaggedTemplateExpression(node, opts) {
  114112. assert("TaggedTemplateExpression", node, opts);
  114113. }
  114114. function assertTemplateElement(node, opts) {
  114115. assert("TemplateElement", node, opts);
  114116. }
  114117. function assertTemplateLiteral(node, opts) {
  114118. assert("TemplateLiteral", node, opts);
  114119. }
  114120. function assertYieldExpression(node, opts) {
  114121. assert("YieldExpression", node, opts);
  114122. }
  114123. function assertAwaitExpression(node, opts) {
  114124. assert("AwaitExpression", node, opts);
  114125. }
  114126. function assertImport(node, opts) {
  114127. assert("Import", node, opts);
  114128. }
  114129. function assertBigIntLiteral(node, opts) {
  114130. assert("BigIntLiteral", node, opts);
  114131. }
  114132. function assertExportNamespaceSpecifier(node, opts) {
  114133. assert("ExportNamespaceSpecifier", node, opts);
  114134. }
  114135. function assertOptionalMemberExpression(node, opts) {
  114136. assert("OptionalMemberExpression", node, opts);
  114137. }
  114138. function assertOptionalCallExpression(node, opts) {
  114139. assert("OptionalCallExpression", node, opts);
  114140. }
  114141. function assertAnyTypeAnnotation(node, opts) {
  114142. assert("AnyTypeAnnotation", node, opts);
  114143. }
  114144. function assertArrayTypeAnnotation(node, opts) {
  114145. assert("ArrayTypeAnnotation", node, opts);
  114146. }
  114147. function assertBooleanTypeAnnotation(node, opts) {
  114148. assert("BooleanTypeAnnotation", node, opts);
  114149. }
  114150. function assertBooleanLiteralTypeAnnotation(node, opts) {
  114151. assert("BooleanLiteralTypeAnnotation", node, opts);
  114152. }
  114153. function assertNullLiteralTypeAnnotation(node, opts) {
  114154. assert("NullLiteralTypeAnnotation", node, opts);
  114155. }
  114156. function assertClassImplements(node, opts) {
  114157. assert("ClassImplements", node, opts);
  114158. }
  114159. function assertDeclareClass(node, opts) {
  114160. assert("DeclareClass", node, opts);
  114161. }
  114162. function assertDeclareFunction(node, opts) {
  114163. assert("DeclareFunction", node, opts);
  114164. }
  114165. function assertDeclareInterface(node, opts) {
  114166. assert("DeclareInterface", node, opts);
  114167. }
  114168. function assertDeclareModule(node, opts) {
  114169. assert("DeclareModule", node, opts);
  114170. }
  114171. function assertDeclareModuleExports(node, opts) {
  114172. assert("DeclareModuleExports", node, opts);
  114173. }
  114174. function assertDeclareTypeAlias(node, opts) {
  114175. assert("DeclareTypeAlias", node, opts);
  114176. }
  114177. function assertDeclareOpaqueType(node, opts) {
  114178. assert("DeclareOpaqueType", node, opts);
  114179. }
  114180. function assertDeclareVariable(node, opts) {
  114181. assert("DeclareVariable", node, opts);
  114182. }
  114183. function assertDeclareExportDeclaration(node, opts) {
  114184. assert("DeclareExportDeclaration", node, opts);
  114185. }
  114186. function assertDeclareExportAllDeclaration(node, opts) {
  114187. assert("DeclareExportAllDeclaration", node, opts);
  114188. }
  114189. function assertDeclaredPredicate(node, opts) {
  114190. assert("DeclaredPredicate", node, opts);
  114191. }
  114192. function assertExistsTypeAnnotation(node, opts) {
  114193. assert("ExistsTypeAnnotation", node, opts);
  114194. }
  114195. function assertFunctionTypeAnnotation(node, opts) {
  114196. assert("FunctionTypeAnnotation", node, opts);
  114197. }
  114198. function assertFunctionTypeParam(node, opts) {
  114199. assert("FunctionTypeParam", node, opts);
  114200. }
  114201. function assertGenericTypeAnnotation(node, opts) {
  114202. assert("GenericTypeAnnotation", node, opts);
  114203. }
  114204. function assertInferredPredicate(node, opts) {
  114205. assert("InferredPredicate", node, opts);
  114206. }
  114207. function assertInterfaceExtends(node, opts) {
  114208. assert("InterfaceExtends", node, opts);
  114209. }
  114210. function assertInterfaceDeclaration(node, opts) {
  114211. assert("InterfaceDeclaration", node, opts);
  114212. }
  114213. function assertInterfaceTypeAnnotation(node, opts) {
  114214. assert("InterfaceTypeAnnotation", node, opts);
  114215. }
  114216. function assertIntersectionTypeAnnotation(node, opts) {
  114217. assert("IntersectionTypeAnnotation", node, opts);
  114218. }
  114219. function assertMixedTypeAnnotation(node, opts) {
  114220. assert("MixedTypeAnnotation", node, opts);
  114221. }
  114222. function assertEmptyTypeAnnotation(node, opts) {
  114223. assert("EmptyTypeAnnotation", node, opts);
  114224. }
  114225. function assertNullableTypeAnnotation(node, opts) {
  114226. assert("NullableTypeAnnotation", node, opts);
  114227. }
  114228. function assertNumberLiteralTypeAnnotation(node, opts) {
  114229. assert("NumberLiteralTypeAnnotation", node, opts);
  114230. }
  114231. function assertNumberTypeAnnotation(node, opts) {
  114232. assert("NumberTypeAnnotation", node, opts);
  114233. }
  114234. function assertObjectTypeAnnotation(node, opts) {
  114235. assert("ObjectTypeAnnotation", node, opts);
  114236. }
  114237. function assertObjectTypeInternalSlot(node, opts) {
  114238. assert("ObjectTypeInternalSlot", node, opts);
  114239. }
  114240. function assertObjectTypeCallProperty(node, opts) {
  114241. assert("ObjectTypeCallProperty", node, opts);
  114242. }
  114243. function assertObjectTypeIndexer(node, opts) {
  114244. assert("ObjectTypeIndexer", node, opts);
  114245. }
  114246. function assertObjectTypeProperty(node, opts) {
  114247. assert("ObjectTypeProperty", node, opts);
  114248. }
  114249. function assertObjectTypeSpreadProperty(node, opts) {
  114250. assert("ObjectTypeSpreadProperty", node, opts);
  114251. }
  114252. function assertOpaqueType(node, opts) {
  114253. assert("OpaqueType", node, opts);
  114254. }
  114255. function assertQualifiedTypeIdentifier(node, opts) {
  114256. assert("QualifiedTypeIdentifier", node, opts);
  114257. }
  114258. function assertStringLiteralTypeAnnotation(node, opts) {
  114259. assert("StringLiteralTypeAnnotation", node, opts);
  114260. }
  114261. function assertStringTypeAnnotation(node, opts) {
  114262. assert("StringTypeAnnotation", node, opts);
  114263. }
  114264. function assertSymbolTypeAnnotation(node, opts) {
  114265. assert("SymbolTypeAnnotation", node, opts);
  114266. }
  114267. function assertThisTypeAnnotation(node, opts) {
  114268. assert("ThisTypeAnnotation", node, opts);
  114269. }
  114270. function assertTupleTypeAnnotation(node, opts) {
  114271. assert("TupleTypeAnnotation", node, opts);
  114272. }
  114273. function assertTypeofTypeAnnotation(node, opts) {
  114274. assert("TypeofTypeAnnotation", node, opts);
  114275. }
  114276. function assertTypeAlias(node, opts) {
  114277. assert("TypeAlias", node, opts);
  114278. }
  114279. function assertTypeAnnotation(node, opts) {
  114280. assert("TypeAnnotation", node, opts);
  114281. }
  114282. function assertTypeCastExpression(node, opts) {
  114283. assert("TypeCastExpression", node, opts);
  114284. }
  114285. function assertTypeParameter(node, opts) {
  114286. assert("TypeParameter", node, opts);
  114287. }
  114288. function assertTypeParameterDeclaration(node, opts) {
  114289. assert("TypeParameterDeclaration", node, opts);
  114290. }
  114291. function assertTypeParameterInstantiation(node, opts) {
  114292. assert("TypeParameterInstantiation", node, opts);
  114293. }
  114294. function assertUnionTypeAnnotation(node, opts) {
  114295. assert("UnionTypeAnnotation", node, opts);
  114296. }
  114297. function assertVariance(node, opts) {
  114298. assert("Variance", node, opts);
  114299. }
  114300. function assertVoidTypeAnnotation(node, opts) {
  114301. assert("VoidTypeAnnotation", node, opts);
  114302. }
  114303. function assertEnumDeclaration(node, opts) {
  114304. assert("EnumDeclaration", node, opts);
  114305. }
  114306. function assertEnumBooleanBody(node, opts) {
  114307. assert("EnumBooleanBody", node, opts);
  114308. }
  114309. function assertEnumNumberBody(node, opts) {
  114310. assert("EnumNumberBody", node, opts);
  114311. }
  114312. function assertEnumStringBody(node, opts) {
  114313. assert("EnumStringBody", node, opts);
  114314. }
  114315. function assertEnumSymbolBody(node, opts) {
  114316. assert("EnumSymbolBody", node, opts);
  114317. }
  114318. function assertEnumBooleanMember(node, opts) {
  114319. assert("EnumBooleanMember", node, opts);
  114320. }
  114321. function assertEnumNumberMember(node, opts) {
  114322. assert("EnumNumberMember", node, opts);
  114323. }
  114324. function assertEnumStringMember(node, opts) {
  114325. assert("EnumStringMember", node, opts);
  114326. }
  114327. function assertEnumDefaultedMember(node, opts) {
  114328. assert("EnumDefaultedMember", node, opts);
  114329. }
  114330. function assertIndexedAccessType(node, opts) {
  114331. assert("IndexedAccessType", node, opts);
  114332. }
  114333. function assertOptionalIndexedAccessType(node, opts) {
  114334. assert("OptionalIndexedAccessType", node, opts);
  114335. }
  114336. function assertJSXAttribute(node, opts) {
  114337. assert("JSXAttribute", node, opts);
  114338. }
  114339. function assertJSXClosingElement(node, opts) {
  114340. assert("JSXClosingElement", node, opts);
  114341. }
  114342. function assertJSXElement(node, opts) {
  114343. assert("JSXElement", node, opts);
  114344. }
  114345. function assertJSXEmptyExpression(node, opts) {
  114346. assert("JSXEmptyExpression", node, opts);
  114347. }
  114348. function assertJSXExpressionContainer(node, opts) {
  114349. assert("JSXExpressionContainer", node, opts);
  114350. }
  114351. function assertJSXSpreadChild(node, opts) {
  114352. assert("JSXSpreadChild", node, opts);
  114353. }
  114354. function assertJSXIdentifier(node, opts) {
  114355. assert("JSXIdentifier", node, opts);
  114356. }
  114357. function assertJSXMemberExpression(node, opts) {
  114358. assert("JSXMemberExpression", node, opts);
  114359. }
  114360. function assertJSXNamespacedName(node, opts) {
  114361. assert("JSXNamespacedName", node, opts);
  114362. }
  114363. function assertJSXOpeningElement(node, opts) {
  114364. assert("JSXOpeningElement", node, opts);
  114365. }
  114366. function assertJSXSpreadAttribute(node, opts) {
  114367. assert("JSXSpreadAttribute", node, opts);
  114368. }
  114369. function assertJSXText(node, opts) {
  114370. assert("JSXText", node, opts);
  114371. }
  114372. function assertJSXFragment(node, opts) {
  114373. assert("JSXFragment", node, opts);
  114374. }
  114375. function assertJSXOpeningFragment(node, opts) {
  114376. assert("JSXOpeningFragment", node, opts);
  114377. }
  114378. function assertJSXClosingFragment(node, opts) {
  114379. assert("JSXClosingFragment", node, opts);
  114380. }
  114381. function assertNoop(node, opts) {
  114382. assert("Noop", node, opts);
  114383. }
  114384. function assertPlaceholder(node, opts) {
  114385. assert("Placeholder", node, opts);
  114386. }
  114387. function assertV8IntrinsicIdentifier(node, opts) {
  114388. assert("V8IntrinsicIdentifier", node, opts);
  114389. }
  114390. function assertArgumentPlaceholder(node, opts) {
  114391. assert("ArgumentPlaceholder", node, opts);
  114392. }
  114393. function assertBindExpression(node, opts) {
  114394. assert("BindExpression", node, opts);
  114395. }
  114396. function assertClassProperty(node, opts) {
  114397. assert("ClassProperty", node, opts);
  114398. }
  114399. function assertPipelineTopicExpression(node, opts) {
  114400. assert("PipelineTopicExpression", node, opts);
  114401. }
  114402. function assertPipelineBareFunction(node, opts) {
  114403. assert("PipelineBareFunction", node, opts);
  114404. }
  114405. function assertPipelinePrimaryTopicReference(node, opts) {
  114406. assert("PipelinePrimaryTopicReference", node, opts);
  114407. }
  114408. function assertClassPrivateProperty(node, opts) {
  114409. assert("ClassPrivateProperty", node, opts);
  114410. }
  114411. function assertClassPrivateMethod(node, opts) {
  114412. assert("ClassPrivateMethod", node, opts);
  114413. }
  114414. function assertImportAttribute(node, opts) {
  114415. assert("ImportAttribute", node, opts);
  114416. }
  114417. function assertDecorator(node, opts) {
  114418. assert("Decorator", node, opts);
  114419. }
  114420. function assertDoExpression(node, opts) {
  114421. assert("DoExpression", node, opts);
  114422. }
  114423. function assertExportDefaultSpecifier(node, opts) {
  114424. assert("ExportDefaultSpecifier", node, opts);
  114425. }
  114426. function assertPrivateName(node, opts) {
  114427. assert("PrivateName", node, opts);
  114428. }
  114429. function assertRecordExpression(node, opts) {
  114430. assert("RecordExpression", node, opts);
  114431. }
  114432. function assertTupleExpression(node, opts) {
  114433. assert("TupleExpression", node, opts);
  114434. }
  114435. function assertDecimalLiteral(node, opts) {
  114436. assert("DecimalLiteral", node, opts);
  114437. }
  114438. function assertStaticBlock(node, opts) {
  114439. assert("StaticBlock", node, opts);
  114440. }
  114441. function assertModuleExpression(node, opts) {
  114442. assert("ModuleExpression", node, opts);
  114443. }
  114444. function assertTSParameterProperty(node, opts) {
  114445. assert("TSParameterProperty", node, opts);
  114446. }
  114447. function assertTSDeclareFunction(node, opts) {
  114448. assert("TSDeclareFunction", node, opts);
  114449. }
  114450. function assertTSDeclareMethod(node, opts) {
  114451. assert("TSDeclareMethod", node, opts);
  114452. }
  114453. function assertTSQualifiedName(node, opts) {
  114454. assert("TSQualifiedName", node, opts);
  114455. }
  114456. function assertTSCallSignatureDeclaration(node, opts) {
  114457. assert("TSCallSignatureDeclaration", node, opts);
  114458. }
  114459. function assertTSConstructSignatureDeclaration(node, opts) {
  114460. assert("TSConstructSignatureDeclaration", node, opts);
  114461. }
  114462. function assertTSPropertySignature(node, opts) {
  114463. assert("TSPropertySignature", node, opts);
  114464. }
  114465. function assertTSMethodSignature(node, opts) {
  114466. assert("TSMethodSignature", node, opts);
  114467. }
  114468. function assertTSIndexSignature(node, opts) {
  114469. assert("TSIndexSignature", node, opts);
  114470. }
  114471. function assertTSAnyKeyword(node, opts) {
  114472. assert("TSAnyKeyword", node, opts);
  114473. }
  114474. function assertTSBooleanKeyword(node, opts) {
  114475. assert("TSBooleanKeyword", node, opts);
  114476. }
  114477. function assertTSBigIntKeyword(node, opts) {
  114478. assert("TSBigIntKeyword", node, opts);
  114479. }
  114480. function assertTSIntrinsicKeyword(node, opts) {
  114481. assert("TSIntrinsicKeyword", node, opts);
  114482. }
  114483. function assertTSNeverKeyword(node, opts) {
  114484. assert("TSNeverKeyword", node, opts);
  114485. }
  114486. function assertTSNullKeyword(node, opts) {
  114487. assert("TSNullKeyword", node, opts);
  114488. }
  114489. function assertTSNumberKeyword(node, opts) {
  114490. assert("TSNumberKeyword", node, opts);
  114491. }
  114492. function assertTSObjectKeyword(node, opts) {
  114493. assert("TSObjectKeyword", node, opts);
  114494. }
  114495. function assertTSStringKeyword(node, opts) {
  114496. assert("TSStringKeyword", node, opts);
  114497. }
  114498. function assertTSSymbolKeyword(node, opts) {
  114499. assert("TSSymbolKeyword", node, opts);
  114500. }
  114501. function assertTSUndefinedKeyword(node, opts) {
  114502. assert("TSUndefinedKeyword", node, opts);
  114503. }
  114504. function assertTSUnknownKeyword(node, opts) {
  114505. assert("TSUnknownKeyword", node, opts);
  114506. }
  114507. function assertTSVoidKeyword(node, opts) {
  114508. assert("TSVoidKeyword", node, opts);
  114509. }
  114510. function assertTSThisType(node, opts) {
  114511. assert("TSThisType", node, opts);
  114512. }
  114513. function assertTSFunctionType(node, opts) {
  114514. assert("TSFunctionType", node, opts);
  114515. }
  114516. function assertTSConstructorType(node, opts) {
  114517. assert("TSConstructorType", node, opts);
  114518. }
  114519. function assertTSTypeReference(node, opts) {
  114520. assert("TSTypeReference", node, opts);
  114521. }
  114522. function assertTSTypePredicate(node, opts) {
  114523. assert("TSTypePredicate", node, opts);
  114524. }
  114525. function assertTSTypeQuery(node, opts) {
  114526. assert("TSTypeQuery", node, opts);
  114527. }
  114528. function assertTSTypeLiteral(node, opts) {
  114529. assert("TSTypeLiteral", node, opts);
  114530. }
  114531. function assertTSArrayType(node, opts) {
  114532. assert("TSArrayType", node, opts);
  114533. }
  114534. function assertTSTupleType(node, opts) {
  114535. assert("TSTupleType", node, opts);
  114536. }
  114537. function assertTSOptionalType(node, opts) {
  114538. assert("TSOptionalType", node, opts);
  114539. }
  114540. function assertTSRestType(node, opts) {
  114541. assert("TSRestType", node, opts);
  114542. }
  114543. function assertTSNamedTupleMember(node, opts) {
  114544. assert("TSNamedTupleMember", node, opts);
  114545. }
  114546. function assertTSUnionType(node, opts) {
  114547. assert("TSUnionType", node, opts);
  114548. }
  114549. function assertTSIntersectionType(node, opts) {
  114550. assert("TSIntersectionType", node, opts);
  114551. }
  114552. function assertTSConditionalType(node, opts) {
  114553. assert("TSConditionalType", node, opts);
  114554. }
  114555. function assertTSInferType(node, opts) {
  114556. assert("TSInferType", node, opts);
  114557. }
  114558. function assertTSParenthesizedType(node, opts) {
  114559. assert("TSParenthesizedType", node, opts);
  114560. }
  114561. function assertTSTypeOperator(node, opts) {
  114562. assert("TSTypeOperator", node, opts);
  114563. }
  114564. function assertTSIndexedAccessType(node, opts) {
  114565. assert("TSIndexedAccessType", node, opts);
  114566. }
  114567. function assertTSMappedType(node, opts) {
  114568. assert("TSMappedType", node, opts);
  114569. }
  114570. function assertTSLiteralType(node, opts) {
  114571. assert("TSLiteralType", node, opts);
  114572. }
  114573. function assertTSExpressionWithTypeArguments(node, opts) {
  114574. assert("TSExpressionWithTypeArguments", node, opts);
  114575. }
  114576. function assertTSInterfaceDeclaration(node, opts) {
  114577. assert("TSInterfaceDeclaration", node, opts);
  114578. }
  114579. function assertTSInterfaceBody(node, opts) {
  114580. assert("TSInterfaceBody", node, opts);
  114581. }
  114582. function assertTSTypeAliasDeclaration(node, opts) {
  114583. assert("TSTypeAliasDeclaration", node, opts);
  114584. }
  114585. function assertTSAsExpression(node, opts) {
  114586. assert("TSAsExpression", node, opts);
  114587. }
  114588. function assertTSTypeAssertion(node, opts) {
  114589. assert("TSTypeAssertion", node, opts);
  114590. }
  114591. function assertTSEnumDeclaration(node, opts) {
  114592. assert("TSEnumDeclaration", node, opts);
  114593. }
  114594. function assertTSEnumMember(node, opts) {
  114595. assert("TSEnumMember", node, opts);
  114596. }
  114597. function assertTSModuleDeclaration(node, opts) {
  114598. assert("TSModuleDeclaration", node, opts);
  114599. }
  114600. function assertTSModuleBlock(node, opts) {
  114601. assert("TSModuleBlock", node, opts);
  114602. }
  114603. function assertTSImportType(node, opts) {
  114604. assert("TSImportType", node, opts);
  114605. }
  114606. function assertTSImportEqualsDeclaration(node, opts) {
  114607. assert("TSImportEqualsDeclaration", node, opts);
  114608. }
  114609. function assertTSExternalModuleReference(node, opts) {
  114610. assert("TSExternalModuleReference", node, opts);
  114611. }
  114612. function assertTSNonNullExpression(node, opts) {
  114613. assert("TSNonNullExpression", node, opts);
  114614. }
  114615. function assertTSExportAssignment(node, opts) {
  114616. assert("TSExportAssignment", node, opts);
  114617. }
  114618. function assertTSNamespaceExportDeclaration(node, opts) {
  114619. assert("TSNamespaceExportDeclaration", node, opts);
  114620. }
  114621. function assertTSTypeAnnotation(node, opts) {
  114622. assert("TSTypeAnnotation", node, opts);
  114623. }
  114624. function assertTSTypeParameterInstantiation(node, opts) {
  114625. assert("TSTypeParameterInstantiation", node, opts);
  114626. }
  114627. function assertTSTypeParameterDeclaration(node, opts) {
  114628. assert("TSTypeParameterDeclaration", node, opts);
  114629. }
  114630. function assertTSTypeParameter(node, opts) {
  114631. assert("TSTypeParameter", node, opts);
  114632. }
  114633. function assertExpression(node, opts) {
  114634. assert("Expression", node, opts);
  114635. }
  114636. function assertBinary(node, opts) {
  114637. assert("Binary", node, opts);
  114638. }
  114639. function assertScopable(node, opts) {
  114640. assert("Scopable", node, opts);
  114641. }
  114642. function assertBlockParent(node, opts) {
  114643. assert("BlockParent", node, opts);
  114644. }
  114645. function assertBlock(node, opts) {
  114646. assert("Block", node, opts);
  114647. }
  114648. function assertStatement(node, opts) {
  114649. assert("Statement", node, opts);
  114650. }
  114651. function assertTerminatorless(node, opts) {
  114652. assert("Terminatorless", node, opts);
  114653. }
  114654. function assertCompletionStatement(node, opts) {
  114655. assert("CompletionStatement", node, opts);
  114656. }
  114657. function assertConditional(node, opts) {
  114658. assert("Conditional", node, opts);
  114659. }
  114660. function assertLoop(node, opts) {
  114661. assert("Loop", node, opts);
  114662. }
  114663. function assertWhile(node, opts) {
  114664. assert("While", node, opts);
  114665. }
  114666. function assertExpressionWrapper(node, opts) {
  114667. assert("ExpressionWrapper", node, opts);
  114668. }
  114669. function assertFor(node, opts) {
  114670. assert("For", node, opts);
  114671. }
  114672. function assertForXStatement(node, opts) {
  114673. assert("ForXStatement", node, opts);
  114674. }
  114675. function assertFunction(node, opts) {
  114676. assert("Function", node, opts);
  114677. }
  114678. function assertFunctionParent(node, opts) {
  114679. assert("FunctionParent", node, opts);
  114680. }
  114681. function assertPureish(node, opts) {
  114682. assert("Pureish", node, opts);
  114683. }
  114684. function assertDeclaration(node, opts) {
  114685. assert("Declaration", node, opts);
  114686. }
  114687. function assertPatternLike(node, opts) {
  114688. assert("PatternLike", node, opts);
  114689. }
  114690. function assertLVal(node, opts) {
  114691. assert("LVal", node, opts);
  114692. }
  114693. function assertTSEntityName(node, opts) {
  114694. assert("TSEntityName", node, opts);
  114695. }
  114696. function assertLiteral(node, opts) {
  114697. assert("Literal", node, opts);
  114698. }
  114699. function assertImmutable(node, opts) {
  114700. assert("Immutable", node, opts);
  114701. }
  114702. function assertUserWhitespacable(node, opts) {
  114703. assert("UserWhitespacable", node, opts);
  114704. }
  114705. function assertMethod(node, opts) {
  114706. assert("Method", node, opts);
  114707. }
  114708. function assertObjectMember(node, opts) {
  114709. assert("ObjectMember", node, opts);
  114710. }
  114711. function assertProperty(node, opts) {
  114712. assert("Property", node, opts);
  114713. }
  114714. function assertUnaryLike(node, opts) {
  114715. assert("UnaryLike", node, opts);
  114716. }
  114717. function assertPattern(node, opts) {
  114718. assert("Pattern", node, opts);
  114719. }
  114720. function assertClass(node, opts) {
  114721. assert("Class", node, opts);
  114722. }
  114723. function assertModuleDeclaration(node, opts) {
  114724. assert("ModuleDeclaration", node, opts);
  114725. }
  114726. function assertExportDeclaration(node, opts) {
  114727. assert("ExportDeclaration", node, opts);
  114728. }
  114729. function assertModuleSpecifier(node, opts) {
  114730. assert("ModuleSpecifier", node, opts);
  114731. }
  114732. function assertFlow(node, opts) {
  114733. assert("Flow", node, opts);
  114734. }
  114735. function assertFlowType(node, opts) {
  114736. assert("FlowType", node, opts);
  114737. }
  114738. function assertFlowBaseAnnotation(node, opts) {
  114739. assert("FlowBaseAnnotation", node, opts);
  114740. }
  114741. function assertFlowDeclaration(node, opts) {
  114742. assert("FlowDeclaration", node, opts);
  114743. }
  114744. function assertFlowPredicate(node, opts) {
  114745. assert("FlowPredicate", node, opts);
  114746. }
  114747. function assertEnumBody(node, opts) {
  114748. assert("EnumBody", node, opts);
  114749. }
  114750. function assertEnumMember(node, opts) {
  114751. assert("EnumMember", node, opts);
  114752. }
  114753. function assertJSX(node, opts) {
  114754. assert("JSX", node, opts);
  114755. }
  114756. function assertPrivate(node, opts) {
  114757. assert("Private", node, opts);
  114758. }
  114759. function assertTSTypeElement(node, opts) {
  114760. assert("TSTypeElement", node, opts);
  114761. }
  114762. function assertTSType(node, opts) {
  114763. assert("TSType", node, opts);
  114764. }
  114765. function assertTSBaseType(node, opts) {
  114766. assert("TSBaseType", node, opts);
  114767. }
  114768. function assertNumberLiteral(node, opts) {
  114769. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  114770. assert("NumberLiteral", node, opts);
  114771. }
  114772. function assertRegexLiteral(node, opts) {
  114773. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  114774. assert("RegexLiteral", node, opts);
  114775. }
  114776. function assertRestProperty(node, opts) {
  114777. console.trace("The node type RestProperty has been renamed to RestElement");
  114778. assert("RestProperty", node, opts);
  114779. }
  114780. function assertSpreadProperty(node, opts) {
  114781. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  114782. assert("SpreadProperty", node, opts);
  114783. }
  114784. }
  114785. });
  114786. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  114787. var require_createTypeAnnotationBasedOnTypeof5 = __commonJS({
  114788. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  114789. "use strict";
  114790. Object.defineProperty(exports, "__esModule", {
  114791. value: true
  114792. });
  114793. exports.default = createTypeAnnotationBasedOnTypeof;
  114794. var _generated = require_generated22();
  114795. function createTypeAnnotationBasedOnTypeof(type) {
  114796. if (type === "string") {
  114797. return (0, _generated.stringTypeAnnotation)();
  114798. } else if (type === "number") {
  114799. return (0, _generated.numberTypeAnnotation)();
  114800. } else if (type === "undefined") {
  114801. return (0, _generated.voidTypeAnnotation)();
  114802. } else if (type === "boolean") {
  114803. return (0, _generated.booleanTypeAnnotation)();
  114804. } else if (type === "function") {
  114805. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  114806. } else if (type === "object") {
  114807. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  114808. } else if (type === "symbol") {
  114809. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  114810. } else if (type === "bigint") {
  114811. return (0, _generated.anyTypeAnnotation)();
  114812. } else {
  114813. throw new Error("Invalid typeof value: " + type);
  114814. }
  114815. }
  114816. }
  114817. });
  114818. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  114819. var require_removeTypeDuplicates9 = __commonJS({
  114820. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  114821. "use strict";
  114822. Object.defineProperty(exports, "__esModule", {
  114823. value: true
  114824. });
  114825. exports.default = removeTypeDuplicates;
  114826. var _generated = require_generated21();
  114827. function getQualifiedName(node) {
  114828. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  114829. }
  114830. function removeTypeDuplicates(nodes) {
  114831. const generics = {};
  114832. const bases = {};
  114833. const typeGroups = [];
  114834. const types2 = [];
  114835. for (let i = 0; i < nodes.length; i++) {
  114836. const node = nodes[i];
  114837. if (!node)
  114838. continue;
  114839. if (types2.indexOf(node) >= 0) {
  114840. continue;
  114841. }
  114842. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  114843. return [node];
  114844. }
  114845. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  114846. bases[node.type] = node;
  114847. continue;
  114848. }
  114849. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  114850. if (typeGroups.indexOf(node.types) < 0) {
  114851. nodes = nodes.concat(node.types);
  114852. typeGroups.push(node.types);
  114853. }
  114854. continue;
  114855. }
  114856. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  114857. const name2 = getQualifiedName(node.id);
  114858. if (generics[name2]) {
  114859. let existing = generics[name2];
  114860. if (existing.typeParameters) {
  114861. if (node.typeParameters) {
  114862. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  114863. }
  114864. } else {
  114865. existing = node.typeParameters;
  114866. }
  114867. } else {
  114868. generics[name2] = node;
  114869. }
  114870. continue;
  114871. }
  114872. types2.push(node);
  114873. }
  114874. for (const type of Object.keys(bases)) {
  114875. types2.push(bases[type]);
  114876. }
  114877. for (const name2 of Object.keys(generics)) {
  114878. types2.push(generics[name2]);
  114879. }
  114880. return types2;
  114881. }
  114882. }
  114883. });
  114884. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  114885. var require_createFlowUnionType5 = __commonJS({
  114886. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  114887. "use strict";
  114888. Object.defineProperty(exports, "__esModule", {
  114889. value: true
  114890. });
  114891. exports.default = createFlowUnionType;
  114892. var _generated = require_generated22();
  114893. var _removeTypeDuplicates = require_removeTypeDuplicates9();
  114894. function createFlowUnionType(types2) {
  114895. const flattened = (0, _removeTypeDuplicates.default)(types2);
  114896. if (flattened.length === 1) {
  114897. return flattened[0];
  114898. } else {
  114899. return (0, _generated.unionTypeAnnotation)(flattened);
  114900. }
  114901. }
  114902. }
  114903. });
  114904. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  114905. var require_removeTypeDuplicates10 = __commonJS({
  114906. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  114907. "use strict";
  114908. Object.defineProperty(exports, "__esModule", {
  114909. value: true
  114910. });
  114911. exports.default = removeTypeDuplicates;
  114912. var _generated = require_generated21();
  114913. function removeTypeDuplicates(nodes) {
  114914. const generics = {};
  114915. const bases = {};
  114916. const typeGroups = [];
  114917. const types2 = [];
  114918. for (let i = 0; i < nodes.length; i++) {
  114919. const node = nodes[i];
  114920. if (!node)
  114921. continue;
  114922. if (types2.indexOf(node) >= 0) {
  114923. continue;
  114924. }
  114925. if ((0, _generated.isTSAnyKeyword)(node)) {
  114926. return [node];
  114927. }
  114928. if ((0, _generated.isTSBaseType)(node)) {
  114929. bases[node.type] = node;
  114930. continue;
  114931. }
  114932. if ((0, _generated.isTSUnionType)(node)) {
  114933. if (typeGroups.indexOf(node.types) < 0) {
  114934. nodes = nodes.concat(node.types);
  114935. typeGroups.push(node.types);
  114936. }
  114937. continue;
  114938. }
  114939. types2.push(node);
  114940. }
  114941. for (const type of Object.keys(bases)) {
  114942. types2.push(bases[type]);
  114943. }
  114944. for (const name2 of Object.keys(generics)) {
  114945. types2.push(generics[name2]);
  114946. }
  114947. return types2;
  114948. }
  114949. }
  114950. });
  114951. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  114952. var require_createTSUnionType5 = __commonJS({
  114953. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  114954. "use strict";
  114955. Object.defineProperty(exports, "__esModule", {
  114956. value: true
  114957. });
  114958. exports.default = createTSUnionType;
  114959. var _generated = require_generated22();
  114960. var _removeTypeDuplicates = require_removeTypeDuplicates10();
  114961. function createTSUnionType(typeAnnotations) {
  114962. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  114963. const flattened = (0, _removeTypeDuplicates.default)(types2);
  114964. if (flattened.length === 1) {
  114965. return flattened[0];
  114966. } else {
  114967. return (0, _generated.tsUnionType)(flattened);
  114968. }
  114969. }
  114970. }
  114971. });
  114972. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/generated/uppercase.js
  114973. var require_uppercase5 = __commonJS({
  114974. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  114975. "use strict";
  114976. Object.defineProperty(exports, "__esModule", {
  114977. value: true
  114978. });
  114979. Object.defineProperty(exports, "ArrayExpression", {
  114980. enumerable: true,
  114981. get: function() {
  114982. return _index.arrayExpression;
  114983. }
  114984. });
  114985. Object.defineProperty(exports, "AssignmentExpression", {
  114986. enumerable: true,
  114987. get: function() {
  114988. return _index.assignmentExpression;
  114989. }
  114990. });
  114991. Object.defineProperty(exports, "BinaryExpression", {
  114992. enumerable: true,
  114993. get: function() {
  114994. return _index.binaryExpression;
  114995. }
  114996. });
  114997. Object.defineProperty(exports, "InterpreterDirective", {
  114998. enumerable: true,
  114999. get: function() {
  115000. return _index.interpreterDirective;
  115001. }
  115002. });
  115003. Object.defineProperty(exports, "Directive", {
  115004. enumerable: true,
  115005. get: function() {
  115006. return _index.directive;
  115007. }
  115008. });
  115009. Object.defineProperty(exports, "DirectiveLiteral", {
  115010. enumerable: true,
  115011. get: function() {
  115012. return _index.directiveLiteral;
  115013. }
  115014. });
  115015. Object.defineProperty(exports, "BlockStatement", {
  115016. enumerable: true,
  115017. get: function() {
  115018. return _index.blockStatement;
  115019. }
  115020. });
  115021. Object.defineProperty(exports, "BreakStatement", {
  115022. enumerable: true,
  115023. get: function() {
  115024. return _index.breakStatement;
  115025. }
  115026. });
  115027. Object.defineProperty(exports, "CallExpression", {
  115028. enumerable: true,
  115029. get: function() {
  115030. return _index.callExpression;
  115031. }
  115032. });
  115033. Object.defineProperty(exports, "CatchClause", {
  115034. enumerable: true,
  115035. get: function() {
  115036. return _index.catchClause;
  115037. }
  115038. });
  115039. Object.defineProperty(exports, "ConditionalExpression", {
  115040. enumerable: true,
  115041. get: function() {
  115042. return _index.conditionalExpression;
  115043. }
  115044. });
  115045. Object.defineProperty(exports, "ContinueStatement", {
  115046. enumerable: true,
  115047. get: function() {
  115048. return _index.continueStatement;
  115049. }
  115050. });
  115051. Object.defineProperty(exports, "DebuggerStatement", {
  115052. enumerable: true,
  115053. get: function() {
  115054. return _index.debuggerStatement;
  115055. }
  115056. });
  115057. Object.defineProperty(exports, "DoWhileStatement", {
  115058. enumerable: true,
  115059. get: function() {
  115060. return _index.doWhileStatement;
  115061. }
  115062. });
  115063. Object.defineProperty(exports, "EmptyStatement", {
  115064. enumerable: true,
  115065. get: function() {
  115066. return _index.emptyStatement;
  115067. }
  115068. });
  115069. Object.defineProperty(exports, "ExpressionStatement", {
  115070. enumerable: true,
  115071. get: function() {
  115072. return _index.expressionStatement;
  115073. }
  115074. });
  115075. Object.defineProperty(exports, "File", {
  115076. enumerable: true,
  115077. get: function() {
  115078. return _index.file;
  115079. }
  115080. });
  115081. Object.defineProperty(exports, "ForInStatement", {
  115082. enumerable: true,
  115083. get: function() {
  115084. return _index.forInStatement;
  115085. }
  115086. });
  115087. Object.defineProperty(exports, "ForStatement", {
  115088. enumerable: true,
  115089. get: function() {
  115090. return _index.forStatement;
  115091. }
  115092. });
  115093. Object.defineProperty(exports, "FunctionDeclaration", {
  115094. enumerable: true,
  115095. get: function() {
  115096. return _index.functionDeclaration;
  115097. }
  115098. });
  115099. Object.defineProperty(exports, "FunctionExpression", {
  115100. enumerable: true,
  115101. get: function() {
  115102. return _index.functionExpression;
  115103. }
  115104. });
  115105. Object.defineProperty(exports, "Identifier", {
  115106. enumerable: true,
  115107. get: function() {
  115108. return _index.identifier;
  115109. }
  115110. });
  115111. Object.defineProperty(exports, "IfStatement", {
  115112. enumerable: true,
  115113. get: function() {
  115114. return _index.ifStatement;
  115115. }
  115116. });
  115117. Object.defineProperty(exports, "LabeledStatement", {
  115118. enumerable: true,
  115119. get: function() {
  115120. return _index.labeledStatement;
  115121. }
  115122. });
  115123. Object.defineProperty(exports, "StringLiteral", {
  115124. enumerable: true,
  115125. get: function() {
  115126. return _index.stringLiteral;
  115127. }
  115128. });
  115129. Object.defineProperty(exports, "NumericLiteral", {
  115130. enumerable: true,
  115131. get: function() {
  115132. return _index.numericLiteral;
  115133. }
  115134. });
  115135. Object.defineProperty(exports, "NullLiteral", {
  115136. enumerable: true,
  115137. get: function() {
  115138. return _index.nullLiteral;
  115139. }
  115140. });
  115141. Object.defineProperty(exports, "BooleanLiteral", {
  115142. enumerable: true,
  115143. get: function() {
  115144. return _index.booleanLiteral;
  115145. }
  115146. });
  115147. Object.defineProperty(exports, "RegExpLiteral", {
  115148. enumerable: true,
  115149. get: function() {
  115150. return _index.regExpLiteral;
  115151. }
  115152. });
  115153. Object.defineProperty(exports, "LogicalExpression", {
  115154. enumerable: true,
  115155. get: function() {
  115156. return _index.logicalExpression;
  115157. }
  115158. });
  115159. Object.defineProperty(exports, "MemberExpression", {
  115160. enumerable: true,
  115161. get: function() {
  115162. return _index.memberExpression;
  115163. }
  115164. });
  115165. Object.defineProperty(exports, "NewExpression", {
  115166. enumerable: true,
  115167. get: function() {
  115168. return _index.newExpression;
  115169. }
  115170. });
  115171. Object.defineProperty(exports, "Program", {
  115172. enumerable: true,
  115173. get: function() {
  115174. return _index.program;
  115175. }
  115176. });
  115177. Object.defineProperty(exports, "ObjectExpression", {
  115178. enumerable: true,
  115179. get: function() {
  115180. return _index.objectExpression;
  115181. }
  115182. });
  115183. Object.defineProperty(exports, "ObjectMethod", {
  115184. enumerable: true,
  115185. get: function() {
  115186. return _index.objectMethod;
  115187. }
  115188. });
  115189. Object.defineProperty(exports, "ObjectProperty", {
  115190. enumerable: true,
  115191. get: function() {
  115192. return _index.objectProperty;
  115193. }
  115194. });
  115195. Object.defineProperty(exports, "RestElement", {
  115196. enumerable: true,
  115197. get: function() {
  115198. return _index.restElement;
  115199. }
  115200. });
  115201. Object.defineProperty(exports, "ReturnStatement", {
  115202. enumerable: true,
  115203. get: function() {
  115204. return _index.returnStatement;
  115205. }
  115206. });
  115207. Object.defineProperty(exports, "SequenceExpression", {
  115208. enumerable: true,
  115209. get: function() {
  115210. return _index.sequenceExpression;
  115211. }
  115212. });
  115213. Object.defineProperty(exports, "ParenthesizedExpression", {
  115214. enumerable: true,
  115215. get: function() {
  115216. return _index.parenthesizedExpression;
  115217. }
  115218. });
  115219. Object.defineProperty(exports, "SwitchCase", {
  115220. enumerable: true,
  115221. get: function() {
  115222. return _index.switchCase;
  115223. }
  115224. });
  115225. Object.defineProperty(exports, "SwitchStatement", {
  115226. enumerable: true,
  115227. get: function() {
  115228. return _index.switchStatement;
  115229. }
  115230. });
  115231. Object.defineProperty(exports, "ThisExpression", {
  115232. enumerable: true,
  115233. get: function() {
  115234. return _index.thisExpression;
  115235. }
  115236. });
  115237. Object.defineProperty(exports, "ThrowStatement", {
  115238. enumerable: true,
  115239. get: function() {
  115240. return _index.throwStatement;
  115241. }
  115242. });
  115243. Object.defineProperty(exports, "TryStatement", {
  115244. enumerable: true,
  115245. get: function() {
  115246. return _index.tryStatement;
  115247. }
  115248. });
  115249. Object.defineProperty(exports, "UnaryExpression", {
  115250. enumerable: true,
  115251. get: function() {
  115252. return _index.unaryExpression;
  115253. }
  115254. });
  115255. Object.defineProperty(exports, "UpdateExpression", {
  115256. enumerable: true,
  115257. get: function() {
  115258. return _index.updateExpression;
  115259. }
  115260. });
  115261. Object.defineProperty(exports, "VariableDeclaration", {
  115262. enumerable: true,
  115263. get: function() {
  115264. return _index.variableDeclaration;
  115265. }
  115266. });
  115267. Object.defineProperty(exports, "VariableDeclarator", {
  115268. enumerable: true,
  115269. get: function() {
  115270. return _index.variableDeclarator;
  115271. }
  115272. });
  115273. Object.defineProperty(exports, "WhileStatement", {
  115274. enumerable: true,
  115275. get: function() {
  115276. return _index.whileStatement;
  115277. }
  115278. });
  115279. Object.defineProperty(exports, "WithStatement", {
  115280. enumerable: true,
  115281. get: function() {
  115282. return _index.withStatement;
  115283. }
  115284. });
  115285. Object.defineProperty(exports, "AssignmentPattern", {
  115286. enumerable: true,
  115287. get: function() {
  115288. return _index.assignmentPattern;
  115289. }
  115290. });
  115291. Object.defineProperty(exports, "ArrayPattern", {
  115292. enumerable: true,
  115293. get: function() {
  115294. return _index.arrayPattern;
  115295. }
  115296. });
  115297. Object.defineProperty(exports, "ArrowFunctionExpression", {
  115298. enumerable: true,
  115299. get: function() {
  115300. return _index.arrowFunctionExpression;
  115301. }
  115302. });
  115303. Object.defineProperty(exports, "ClassBody", {
  115304. enumerable: true,
  115305. get: function() {
  115306. return _index.classBody;
  115307. }
  115308. });
  115309. Object.defineProperty(exports, "ClassExpression", {
  115310. enumerable: true,
  115311. get: function() {
  115312. return _index.classExpression;
  115313. }
  115314. });
  115315. Object.defineProperty(exports, "ClassDeclaration", {
  115316. enumerable: true,
  115317. get: function() {
  115318. return _index.classDeclaration;
  115319. }
  115320. });
  115321. Object.defineProperty(exports, "ExportAllDeclaration", {
  115322. enumerable: true,
  115323. get: function() {
  115324. return _index.exportAllDeclaration;
  115325. }
  115326. });
  115327. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  115328. enumerable: true,
  115329. get: function() {
  115330. return _index.exportDefaultDeclaration;
  115331. }
  115332. });
  115333. Object.defineProperty(exports, "ExportNamedDeclaration", {
  115334. enumerable: true,
  115335. get: function() {
  115336. return _index.exportNamedDeclaration;
  115337. }
  115338. });
  115339. Object.defineProperty(exports, "ExportSpecifier", {
  115340. enumerable: true,
  115341. get: function() {
  115342. return _index.exportSpecifier;
  115343. }
  115344. });
  115345. Object.defineProperty(exports, "ForOfStatement", {
  115346. enumerable: true,
  115347. get: function() {
  115348. return _index.forOfStatement;
  115349. }
  115350. });
  115351. Object.defineProperty(exports, "ImportDeclaration", {
  115352. enumerable: true,
  115353. get: function() {
  115354. return _index.importDeclaration;
  115355. }
  115356. });
  115357. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  115358. enumerable: true,
  115359. get: function() {
  115360. return _index.importDefaultSpecifier;
  115361. }
  115362. });
  115363. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  115364. enumerable: true,
  115365. get: function() {
  115366. return _index.importNamespaceSpecifier;
  115367. }
  115368. });
  115369. Object.defineProperty(exports, "ImportSpecifier", {
  115370. enumerable: true,
  115371. get: function() {
  115372. return _index.importSpecifier;
  115373. }
  115374. });
  115375. Object.defineProperty(exports, "MetaProperty", {
  115376. enumerable: true,
  115377. get: function() {
  115378. return _index.metaProperty;
  115379. }
  115380. });
  115381. Object.defineProperty(exports, "ClassMethod", {
  115382. enumerable: true,
  115383. get: function() {
  115384. return _index.classMethod;
  115385. }
  115386. });
  115387. Object.defineProperty(exports, "ObjectPattern", {
  115388. enumerable: true,
  115389. get: function() {
  115390. return _index.objectPattern;
  115391. }
  115392. });
  115393. Object.defineProperty(exports, "SpreadElement", {
  115394. enumerable: true,
  115395. get: function() {
  115396. return _index.spreadElement;
  115397. }
  115398. });
  115399. Object.defineProperty(exports, "Super", {
  115400. enumerable: true,
  115401. get: function() {
  115402. return _index.super;
  115403. }
  115404. });
  115405. Object.defineProperty(exports, "TaggedTemplateExpression", {
  115406. enumerable: true,
  115407. get: function() {
  115408. return _index.taggedTemplateExpression;
  115409. }
  115410. });
  115411. Object.defineProperty(exports, "TemplateElement", {
  115412. enumerable: true,
  115413. get: function() {
  115414. return _index.templateElement;
  115415. }
  115416. });
  115417. Object.defineProperty(exports, "TemplateLiteral", {
  115418. enumerable: true,
  115419. get: function() {
  115420. return _index.templateLiteral;
  115421. }
  115422. });
  115423. Object.defineProperty(exports, "YieldExpression", {
  115424. enumerable: true,
  115425. get: function() {
  115426. return _index.yieldExpression;
  115427. }
  115428. });
  115429. Object.defineProperty(exports, "AwaitExpression", {
  115430. enumerable: true,
  115431. get: function() {
  115432. return _index.awaitExpression;
  115433. }
  115434. });
  115435. Object.defineProperty(exports, "Import", {
  115436. enumerable: true,
  115437. get: function() {
  115438. return _index.import;
  115439. }
  115440. });
  115441. Object.defineProperty(exports, "BigIntLiteral", {
  115442. enumerable: true,
  115443. get: function() {
  115444. return _index.bigIntLiteral;
  115445. }
  115446. });
  115447. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  115448. enumerable: true,
  115449. get: function() {
  115450. return _index.exportNamespaceSpecifier;
  115451. }
  115452. });
  115453. Object.defineProperty(exports, "OptionalMemberExpression", {
  115454. enumerable: true,
  115455. get: function() {
  115456. return _index.optionalMemberExpression;
  115457. }
  115458. });
  115459. Object.defineProperty(exports, "OptionalCallExpression", {
  115460. enumerable: true,
  115461. get: function() {
  115462. return _index.optionalCallExpression;
  115463. }
  115464. });
  115465. Object.defineProperty(exports, "AnyTypeAnnotation", {
  115466. enumerable: true,
  115467. get: function() {
  115468. return _index.anyTypeAnnotation;
  115469. }
  115470. });
  115471. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  115472. enumerable: true,
  115473. get: function() {
  115474. return _index.arrayTypeAnnotation;
  115475. }
  115476. });
  115477. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  115478. enumerable: true,
  115479. get: function() {
  115480. return _index.booleanTypeAnnotation;
  115481. }
  115482. });
  115483. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  115484. enumerable: true,
  115485. get: function() {
  115486. return _index.booleanLiteralTypeAnnotation;
  115487. }
  115488. });
  115489. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  115490. enumerable: true,
  115491. get: function() {
  115492. return _index.nullLiteralTypeAnnotation;
  115493. }
  115494. });
  115495. Object.defineProperty(exports, "ClassImplements", {
  115496. enumerable: true,
  115497. get: function() {
  115498. return _index.classImplements;
  115499. }
  115500. });
  115501. Object.defineProperty(exports, "DeclareClass", {
  115502. enumerable: true,
  115503. get: function() {
  115504. return _index.declareClass;
  115505. }
  115506. });
  115507. Object.defineProperty(exports, "DeclareFunction", {
  115508. enumerable: true,
  115509. get: function() {
  115510. return _index.declareFunction;
  115511. }
  115512. });
  115513. Object.defineProperty(exports, "DeclareInterface", {
  115514. enumerable: true,
  115515. get: function() {
  115516. return _index.declareInterface;
  115517. }
  115518. });
  115519. Object.defineProperty(exports, "DeclareModule", {
  115520. enumerable: true,
  115521. get: function() {
  115522. return _index.declareModule;
  115523. }
  115524. });
  115525. Object.defineProperty(exports, "DeclareModuleExports", {
  115526. enumerable: true,
  115527. get: function() {
  115528. return _index.declareModuleExports;
  115529. }
  115530. });
  115531. Object.defineProperty(exports, "DeclareTypeAlias", {
  115532. enumerable: true,
  115533. get: function() {
  115534. return _index.declareTypeAlias;
  115535. }
  115536. });
  115537. Object.defineProperty(exports, "DeclareOpaqueType", {
  115538. enumerable: true,
  115539. get: function() {
  115540. return _index.declareOpaqueType;
  115541. }
  115542. });
  115543. Object.defineProperty(exports, "DeclareVariable", {
  115544. enumerable: true,
  115545. get: function() {
  115546. return _index.declareVariable;
  115547. }
  115548. });
  115549. Object.defineProperty(exports, "DeclareExportDeclaration", {
  115550. enumerable: true,
  115551. get: function() {
  115552. return _index.declareExportDeclaration;
  115553. }
  115554. });
  115555. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  115556. enumerable: true,
  115557. get: function() {
  115558. return _index.declareExportAllDeclaration;
  115559. }
  115560. });
  115561. Object.defineProperty(exports, "DeclaredPredicate", {
  115562. enumerable: true,
  115563. get: function() {
  115564. return _index.declaredPredicate;
  115565. }
  115566. });
  115567. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  115568. enumerable: true,
  115569. get: function() {
  115570. return _index.existsTypeAnnotation;
  115571. }
  115572. });
  115573. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  115574. enumerable: true,
  115575. get: function() {
  115576. return _index.functionTypeAnnotation;
  115577. }
  115578. });
  115579. Object.defineProperty(exports, "FunctionTypeParam", {
  115580. enumerable: true,
  115581. get: function() {
  115582. return _index.functionTypeParam;
  115583. }
  115584. });
  115585. Object.defineProperty(exports, "GenericTypeAnnotation", {
  115586. enumerable: true,
  115587. get: function() {
  115588. return _index.genericTypeAnnotation;
  115589. }
  115590. });
  115591. Object.defineProperty(exports, "InferredPredicate", {
  115592. enumerable: true,
  115593. get: function() {
  115594. return _index.inferredPredicate;
  115595. }
  115596. });
  115597. Object.defineProperty(exports, "InterfaceExtends", {
  115598. enumerable: true,
  115599. get: function() {
  115600. return _index.interfaceExtends;
  115601. }
  115602. });
  115603. Object.defineProperty(exports, "InterfaceDeclaration", {
  115604. enumerable: true,
  115605. get: function() {
  115606. return _index.interfaceDeclaration;
  115607. }
  115608. });
  115609. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  115610. enumerable: true,
  115611. get: function() {
  115612. return _index.interfaceTypeAnnotation;
  115613. }
  115614. });
  115615. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  115616. enumerable: true,
  115617. get: function() {
  115618. return _index.intersectionTypeAnnotation;
  115619. }
  115620. });
  115621. Object.defineProperty(exports, "MixedTypeAnnotation", {
  115622. enumerable: true,
  115623. get: function() {
  115624. return _index.mixedTypeAnnotation;
  115625. }
  115626. });
  115627. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  115628. enumerable: true,
  115629. get: function() {
  115630. return _index.emptyTypeAnnotation;
  115631. }
  115632. });
  115633. Object.defineProperty(exports, "NullableTypeAnnotation", {
  115634. enumerable: true,
  115635. get: function() {
  115636. return _index.nullableTypeAnnotation;
  115637. }
  115638. });
  115639. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  115640. enumerable: true,
  115641. get: function() {
  115642. return _index.numberLiteralTypeAnnotation;
  115643. }
  115644. });
  115645. Object.defineProperty(exports, "NumberTypeAnnotation", {
  115646. enumerable: true,
  115647. get: function() {
  115648. return _index.numberTypeAnnotation;
  115649. }
  115650. });
  115651. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  115652. enumerable: true,
  115653. get: function() {
  115654. return _index.objectTypeAnnotation;
  115655. }
  115656. });
  115657. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  115658. enumerable: true,
  115659. get: function() {
  115660. return _index.objectTypeInternalSlot;
  115661. }
  115662. });
  115663. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  115664. enumerable: true,
  115665. get: function() {
  115666. return _index.objectTypeCallProperty;
  115667. }
  115668. });
  115669. Object.defineProperty(exports, "ObjectTypeIndexer", {
  115670. enumerable: true,
  115671. get: function() {
  115672. return _index.objectTypeIndexer;
  115673. }
  115674. });
  115675. Object.defineProperty(exports, "ObjectTypeProperty", {
  115676. enumerable: true,
  115677. get: function() {
  115678. return _index.objectTypeProperty;
  115679. }
  115680. });
  115681. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  115682. enumerable: true,
  115683. get: function() {
  115684. return _index.objectTypeSpreadProperty;
  115685. }
  115686. });
  115687. Object.defineProperty(exports, "OpaqueType", {
  115688. enumerable: true,
  115689. get: function() {
  115690. return _index.opaqueType;
  115691. }
  115692. });
  115693. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  115694. enumerable: true,
  115695. get: function() {
  115696. return _index.qualifiedTypeIdentifier;
  115697. }
  115698. });
  115699. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  115700. enumerable: true,
  115701. get: function() {
  115702. return _index.stringLiteralTypeAnnotation;
  115703. }
  115704. });
  115705. Object.defineProperty(exports, "StringTypeAnnotation", {
  115706. enumerable: true,
  115707. get: function() {
  115708. return _index.stringTypeAnnotation;
  115709. }
  115710. });
  115711. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  115712. enumerable: true,
  115713. get: function() {
  115714. return _index.symbolTypeAnnotation;
  115715. }
  115716. });
  115717. Object.defineProperty(exports, "ThisTypeAnnotation", {
  115718. enumerable: true,
  115719. get: function() {
  115720. return _index.thisTypeAnnotation;
  115721. }
  115722. });
  115723. Object.defineProperty(exports, "TupleTypeAnnotation", {
  115724. enumerable: true,
  115725. get: function() {
  115726. return _index.tupleTypeAnnotation;
  115727. }
  115728. });
  115729. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  115730. enumerable: true,
  115731. get: function() {
  115732. return _index.typeofTypeAnnotation;
  115733. }
  115734. });
  115735. Object.defineProperty(exports, "TypeAlias", {
  115736. enumerable: true,
  115737. get: function() {
  115738. return _index.typeAlias;
  115739. }
  115740. });
  115741. Object.defineProperty(exports, "TypeAnnotation", {
  115742. enumerable: true,
  115743. get: function() {
  115744. return _index.typeAnnotation;
  115745. }
  115746. });
  115747. Object.defineProperty(exports, "TypeCastExpression", {
  115748. enumerable: true,
  115749. get: function() {
  115750. return _index.typeCastExpression;
  115751. }
  115752. });
  115753. Object.defineProperty(exports, "TypeParameter", {
  115754. enumerable: true,
  115755. get: function() {
  115756. return _index.typeParameter;
  115757. }
  115758. });
  115759. Object.defineProperty(exports, "TypeParameterDeclaration", {
  115760. enumerable: true,
  115761. get: function() {
  115762. return _index.typeParameterDeclaration;
  115763. }
  115764. });
  115765. Object.defineProperty(exports, "TypeParameterInstantiation", {
  115766. enumerable: true,
  115767. get: function() {
  115768. return _index.typeParameterInstantiation;
  115769. }
  115770. });
  115771. Object.defineProperty(exports, "UnionTypeAnnotation", {
  115772. enumerable: true,
  115773. get: function() {
  115774. return _index.unionTypeAnnotation;
  115775. }
  115776. });
  115777. Object.defineProperty(exports, "Variance", {
  115778. enumerable: true,
  115779. get: function() {
  115780. return _index.variance;
  115781. }
  115782. });
  115783. Object.defineProperty(exports, "VoidTypeAnnotation", {
  115784. enumerable: true,
  115785. get: function() {
  115786. return _index.voidTypeAnnotation;
  115787. }
  115788. });
  115789. Object.defineProperty(exports, "EnumDeclaration", {
  115790. enumerable: true,
  115791. get: function() {
  115792. return _index.enumDeclaration;
  115793. }
  115794. });
  115795. Object.defineProperty(exports, "EnumBooleanBody", {
  115796. enumerable: true,
  115797. get: function() {
  115798. return _index.enumBooleanBody;
  115799. }
  115800. });
  115801. Object.defineProperty(exports, "EnumNumberBody", {
  115802. enumerable: true,
  115803. get: function() {
  115804. return _index.enumNumberBody;
  115805. }
  115806. });
  115807. Object.defineProperty(exports, "EnumStringBody", {
  115808. enumerable: true,
  115809. get: function() {
  115810. return _index.enumStringBody;
  115811. }
  115812. });
  115813. Object.defineProperty(exports, "EnumSymbolBody", {
  115814. enumerable: true,
  115815. get: function() {
  115816. return _index.enumSymbolBody;
  115817. }
  115818. });
  115819. Object.defineProperty(exports, "EnumBooleanMember", {
  115820. enumerable: true,
  115821. get: function() {
  115822. return _index.enumBooleanMember;
  115823. }
  115824. });
  115825. Object.defineProperty(exports, "EnumNumberMember", {
  115826. enumerable: true,
  115827. get: function() {
  115828. return _index.enumNumberMember;
  115829. }
  115830. });
  115831. Object.defineProperty(exports, "EnumStringMember", {
  115832. enumerable: true,
  115833. get: function() {
  115834. return _index.enumStringMember;
  115835. }
  115836. });
  115837. Object.defineProperty(exports, "EnumDefaultedMember", {
  115838. enumerable: true,
  115839. get: function() {
  115840. return _index.enumDefaultedMember;
  115841. }
  115842. });
  115843. Object.defineProperty(exports, "IndexedAccessType", {
  115844. enumerable: true,
  115845. get: function() {
  115846. return _index.indexedAccessType;
  115847. }
  115848. });
  115849. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  115850. enumerable: true,
  115851. get: function() {
  115852. return _index.optionalIndexedAccessType;
  115853. }
  115854. });
  115855. Object.defineProperty(exports, "JSXAttribute", {
  115856. enumerable: true,
  115857. get: function() {
  115858. return _index.jsxAttribute;
  115859. }
  115860. });
  115861. Object.defineProperty(exports, "JSXClosingElement", {
  115862. enumerable: true,
  115863. get: function() {
  115864. return _index.jsxClosingElement;
  115865. }
  115866. });
  115867. Object.defineProperty(exports, "JSXElement", {
  115868. enumerable: true,
  115869. get: function() {
  115870. return _index.jsxElement;
  115871. }
  115872. });
  115873. Object.defineProperty(exports, "JSXEmptyExpression", {
  115874. enumerable: true,
  115875. get: function() {
  115876. return _index.jsxEmptyExpression;
  115877. }
  115878. });
  115879. Object.defineProperty(exports, "JSXExpressionContainer", {
  115880. enumerable: true,
  115881. get: function() {
  115882. return _index.jsxExpressionContainer;
  115883. }
  115884. });
  115885. Object.defineProperty(exports, "JSXSpreadChild", {
  115886. enumerable: true,
  115887. get: function() {
  115888. return _index.jsxSpreadChild;
  115889. }
  115890. });
  115891. Object.defineProperty(exports, "JSXIdentifier", {
  115892. enumerable: true,
  115893. get: function() {
  115894. return _index.jsxIdentifier;
  115895. }
  115896. });
  115897. Object.defineProperty(exports, "JSXMemberExpression", {
  115898. enumerable: true,
  115899. get: function() {
  115900. return _index.jsxMemberExpression;
  115901. }
  115902. });
  115903. Object.defineProperty(exports, "JSXNamespacedName", {
  115904. enumerable: true,
  115905. get: function() {
  115906. return _index.jsxNamespacedName;
  115907. }
  115908. });
  115909. Object.defineProperty(exports, "JSXOpeningElement", {
  115910. enumerable: true,
  115911. get: function() {
  115912. return _index.jsxOpeningElement;
  115913. }
  115914. });
  115915. Object.defineProperty(exports, "JSXSpreadAttribute", {
  115916. enumerable: true,
  115917. get: function() {
  115918. return _index.jsxSpreadAttribute;
  115919. }
  115920. });
  115921. Object.defineProperty(exports, "JSXText", {
  115922. enumerable: true,
  115923. get: function() {
  115924. return _index.jsxText;
  115925. }
  115926. });
  115927. Object.defineProperty(exports, "JSXFragment", {
  115928. enumerable: true,
  115929. get: function() {
  115930. return _index.jsxFragment;
  115931. }
  115932. });
  115933. Object.defineProperty(exports, "JSXOpeningFragment", {
  115934. enumerable: true,
  115935. get: function() {
  115936. return _index.jsxOpeningFragment;
  115937. }
  115938. });
  115939. Object.defineProperty(exports, "JSXClosingFragment", {
  115940. enumerable: true,
  115941. get: function() {
  115942. return _index.jsxClosingFragment;
  115943. }
  115944. });
  115945. Object.defineProperty(exports, "Noop", {
  115946. enumerable: true,
  115947. get: function() {
  115948. return _index.noop;
  115949. }
  115950. });
  115951. Object.defineProperty(exports, "Placeholder", {
  115952. enumerable: true,
  115953. get: function() {
  115954. return _index.placeholder;
  115955. }
  115956. });
  115957. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  115958. enumerable: true,
  115959. get: function() {
  115960. return _index.v8IntrinsicIdentifier;
  115961. }
  115962. });
  115963. Object.defineProperty(exports, "ArgumentPlaceholder", {
  115964. enumerable: true,
  115965. get: function() {
  115966. return _index.argumentPlaceholder;
  115967. }
  115968. });
  115969. Object.defineProperty(exports, "BindExpression", {
  115970. enumerable: true,
  115971. get: function() {
  115972. return _index.bindExpression;
  115973. }
  115974. });
  115975. Object.defineProperty(exports, "ClassProperty", {
  115976. enumerable: true,
  115977. get: function() {
  115978. return _index.classProperty;
  115979. }
  115980. });
  115981. Object.defineProperty(exports, "PipelineTopicExpression", {
  115982. enumerable: true,
  115983. get: function() {
  115984. return _index.pipelineTopicExpression;
  115985. }
  115986. });
  115987. Object.defineProperty(exports, "PipelineBareFunction", {
  115988. enumerable: true,
  115989. get: function() {
  115990. return _index.pipelineBareFunction;
  115991. }
  115992. });
  115993. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  115994. enumerable: true,
  115995. get: function() {
  115996. return _index.pipelinePrimaryTopicReference;
  115997. }
  115998. });
  115999. Object.defineProperty(exports, "ClassPrivateProperty", {
  116000. enumerable: true,
  116001. get: function() {
  116002. return _index.classPrivateProperty;
  116003. }
  116004. });
  116005. Object.defineProperty(exports, "ClassPrivateMethod", {
  116006. enumerable: true,
  116007. get: function() {
  116008. return _index.classPrivateMethod;
  116009. }
  116010. });
  116011. Object.defineProperty(exports, "ImportAttribute", {
  116012. enumerable: true,
  116013. get: function() {
  116014. return _index.importAttribute;
  116015. }
  116016. });
  116017. Object.defineProperty(exports, "Decorator", {
  116018. enumerable: true,
  116019. get: function() {
  116020. return _index.decorator;
  116021. }
  116022. });
  116023. Object.defineProperty(exports, "DoExpression", {
  116024. enumerable: true,
  116025. get: function() {
  116026. return _index.doExpression;
  116027. }
  116028. });
  116029. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  116030. enumerable: true,
  116031. get: function() {
  116032. return _index.exportDefaultSpecifier;
  116033. }
  116034. });
  116035. Object.defineProperty(exports, "PrivateName", {
  116036. enumerable: true,
  116037. get: function() {
  116038. return _index.privateName;
  116039. }
  116040. });
  116041. Object.defineProperty(exports, "RecordExpression", {
  116042. enumerable: true,
  116043. get: function() {
  116044. return _index.recordExpression;
  116045. }
  116046. });
  116047. Object.defineProperty(exports, "TupleExpression", {
  116048. enumerable: true,
  116049. get: function() {
  116050. return _index.tupleExpression;
  116051. }
  116052. });
  116053. Object.defineProperty(exports, "DecimalLiteral", {
  116054. enumerable: true,
  116055. get: function() {
  116056. return _index.decimalLiteral;
  116057. }
  116058. });
  116059. Object.defineProperty(exports, "StaticBlock", {
  116060. enumerable: true,
  116061. get: function() {
  116062. return _index.staticBlock;
  116063. }
  116064. });
  116065. Object.defineProperty(exports, "ModuleExpression", {
  116066. enumerable: true,
  116067. get: function() {
  116068. return _index.moduleExpression;
  116069. }
  116070. });
  116071. Object.defineProperty(exports, "TSParameterProperty", {
  116072. enumerable: true,
  116073. get: function() {
  116074. return _index.tsParameterProperty;
  116075. }
  116076. });
  116077. Object.defineProperty(exports, "TSDeclareFunction", {
  116078. enumerable: true,
  116079. get: function() {
  116080. return _index.tsDeclareFunction;
  116081. }
  116082. });
  116083. Object.defineProperty(exports, "TSDeclareMethod", {
  116084. enumerable: true,
  116085. get: function() {
  116086. return _index.tsDeclareMethod;
  116087. }
  116088. });
  116089. Object.defineProperty(exports, "TSQualifiedName", {
  116090. enumerable: true,
  116091. get: function() {
  116092. return _index.tsQualifiedName;
  116093. }
  116094. });
  116095. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  116096. enumerable: true,
  116097. get: function() {
  116098. return _index.tsCallSignatureDeclaration;
  116099. }
  116100. });
  116101. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  116102. enumerable: true,
  116103. get: function() {
  116104. return _index.tsConstructSignatureDeclaration;
  116105. }
  116106. });
  116107. Object.defineProperty(exports, "TSPropertySignature", {
  116108. enumerable: true,
  116109. get: function() {
  116110. return _index.tsPropertySignature;
  116111. }
  116112. });
  116113. Object.defineProperty(exports, "TSMethodSignature", {
  116114. enumerable: true,
  116115. get: function() {
  116116. return _index.tsMethodSignature;
  116117. }
  116118. });
  116119. Object.defineProperty(exports, "TSIndexSignature", {
  116120. enumerable: true,
  116121. get: function() {
  116122. return _index.tsIndexSignature;
  116123. }
  116124. });
  116125. Object.defineProperty(exports, "TSAnyKeyword", {
  116126. enumerable: true,
  116127. get: function() {
  116128. return _index.tsAnyKeyword;
  116129. }
  116130. });
  116131. Object.defineProperty(exports, "TSBooleanKeyword", {
  116132. enumerable: true,
  116133. get: function() {
  116134. return _index.tsBooleanKeyword;
  116135. }
  116136. });
  116137. Object.defineProperty(exports, "TSBigIntKeyword", {
  116138. enumerable: true,
  116139. get: function() {
  116140. return _index.tsBigIntKeyword;
  116141. }
  116142. });
  116143. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  116144. enumerable: true,
  116145. get: function() {
  116146. return _index.tsIntrinsicKeyword;
  116147. }
  116148. });
  116149. Object.defineProperty(exports, "TSNeverKeyword", {
  116150. enumerable: true,
  116151. get: function() {
  116152. return _index.tsNeverKeyword;
  116153. }
  116154. });
  116155. Object.defineProperty(exports, "TSNullKeyword", {
  116156. enumerable: true,
  116157. get: function() {
  116158. return _index.tsNullKeyword;
  116159. }
  116160. });
  116161. Object.defineProperty(exports, "TSNumberKeyword", {
  116162. enumerable: true,
  116163. get: function() {
  116164. return _index.tsNumberKeyword;
  116165. }
  116166. });
  116167. Object.defineProperty(exports, "TSObjectKeyword", {
  116168. enumerable: true,
  116169. get: function() {
  116170. return _index.tsObjectKeyword;
  116171. }
  116172. });
  116173. Object.defineProperty(exports, "TSStringKeyword", {
  116174. enumerable: true,
  116175. get: function() {
  116176. return _index.tsStringKeyword;
  116177. }
  116178. });
  116179. Object.defineProperty(exports, "TSSymbolKeyword", {
  116180. enumerable: true,
  116181. get: function() {
  116182. return _index.tsSymbolKeyword;
  116183. }
  116184. });
  116185. Object.defineProperty(exports, "TSUndefinedKeyword", {
  116186. enumerable: true,
  116187. get: function() {
  116188. return _index.tsUndefinedKeyword;
  116189. }
  116190. });
  116191. Object.defineProperty(exports, "TSUnknownKeyword", {
  116192. enumerable: true,
  116193. get: function() {
  116194. return _index.tsUnknownKeyword;
  116195. }
  116196. });
  116197. Object.defineProperty(exports, "TSVoidKeyword", {
  116198. enumerable: true,
  116199. get: function() {
  116200. return _index.tsVoidKeyword;
  116201. }
  116202. });
  116203. Object.defineProperty(exports, "TSThisType", {
  116204. enumerable: true,
  116205. get: function() {
  116206. return _index.tsThisType;
  116207. }
  116208. });
  116209. Object.defineProperty(exports, "TSFunctionType", {
  116210. enumerable: true,
  116211. get: function() {
  116212. return _index.tsFunctionType;
  116213. }
  116214. });
  116215. Object.defineProperty(exports, "TSConstructorType", {
  116216. enumerable: true,
  116217. get: function() {
  116218. return _index.tsConstructorType;
  116219. }
  116220. });
  116221. Object.defineProperty(exports, "TSTypeReference", {
  116222. enumerable: true,
  116223. get: function() {
  116224. return _index.tsTypeReference;
  116225. }
  116226. });
  116227. Object.defineProperty(exports, "TSTypePredicate", {
  116228. enumerable: true,
  116229. get: function() {
  116230. return _index.tsTypePredicate;
  116231. }
  116232. });
  116233. Object.defineProperty(exports, "TSTypeQuery", {
  116234. enumerable: true,
  116235. get: function() {
  116236. return _index.tsTypeQuery;
  116237. }
  116238. });
  116239. Object.defineProperty(exports, "TSTypeLiteral", {
  116240. enumerable: true,
  116241. get: function() {
  116242. return _index.tsTypeLiteral;
  116243. }
  116244. });
  116245. Object.defineProperty(exports, "TSArrayType", {
  116246. enumerable: true,
  116247. get: function() {
  116248. return _index.tsArrayType;
  116249. }
  116250. });
  116251. Object.defineProperty(exports, "TSTupleType", {
  116252. enumerable: true,
  116253. get: function() {
  116254. return _index.tsTupleType;
  116255. }
  116256. });
  116257. Object.defineProperty(exports, "TSOptionalType", {
  116258. enumerable: true,
  116259. get: function() {
  116260. return _index.tsOptionalType;
  116261. }
  116262. });
  116263. Object.defineProperty(exports, "TSRestType", {
  116264. enumerable: true,
  116265. get: function() {
  116266. return _index.tsRestType;
  116267. }
  116268. });
  116269. Object.defineProperty(exports, "TSNamedTupleMember", {
  116270. enumerable: true,
  116271. get: function() {
  116272. return _index.tsNamedTupleMember;
  116273. }
  116274. });
  116275. Object.defineProperty(exports, "TSUnionType", {
  116276. enumerable: true,
  116277. get: function() {
  116278. return _index.tsUnionType;
  116279. }
  116280. });
  116281. Object.defineProperty(exports, "TSIntersectionType", {
  116282. enumerable: true,
  116283. get: function() {
  116284. return _index.tsIntersectionType;
  116285. }
  116286. });
  116287. Object.defineProperty(exports, "TSConditionalType", {
  116288. enumerable: true,
  116289. get: function() {
  116290. return _index.tsConditionalType;
  116291. }
  116292. });
  116293. Object.defineProperty(exports, "TSInferType", {
  116294. enumerable: true,
  116295. get: function() {
  116296. return _index.tsInferType;
  116297. }
  116298. });
  116299. Object.defineProperty(exports, "TSParenthesizedType", {
  116300. enumerable: true,
  116301. get: function() {
  116302. return _index.tsParenthesizedType;
  116303. }
  116304. });
  116305. Object.defineProperty(exports, "TSTypeOperator", {
  116306. enumerable: true,
  116307. get: function() {
  116308. return _index.tsTypeOperator;
  116309. }
  116310. });
  116311. Object.defineProperty(exports, "TSIndexedAccessType", {
  116312. enumerable: true,
  116313. get: function() {
  116314. return _index.tsIndexedAccessType;
  116315. }
  116316. });
  116317. Object.defineProperty(exports, "TSMappedType", {
  116318. enumerable: true,
  116319. get: function() {
  116320. return _index.tsMappedType;
  116321. }
  116322. });
  116323. Object.defineProperty(exports, "TSLiteralType", {
  116324. enumerable: true,
  116325. get: function() {
  116326. return _index.tsLiteralType;
  116327. }
  116328. });
  116329. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  116330. enumerable: true,
  116331. get: function() {
  116332. return _index.tsExpressionWithTypeArguments;
  116333. }
  116334. });
  116335. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  116336. enumerable: true,
  116337. get: function() {
  116338. return _index.tsInterfaceDeclaration;
  116339. }
  116340. });
  116341. Object.defineProperty(exports, "TSInterfaceBody", {
  116342. enumerable: true,
  116343. get: function() {
  116344. return _index.tsInterfaceBody;
  116345. }
  116346. });
  116347. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  116348. enumerable: true,
  116349. get: function() {
  116350. return _index.tsTypeAliasDeclaration;
  116351. }
  116352. });
  116353. Object.defineProperty(exports, "TSAsExpression", {
  116354. enumerable: true,
  116355. get: function() {
  116356. return _index.tsAsExpression;
  116357. }
  116358. });
  116359. Object.defineProperty(exports, "TSTypeAssertion", {
  116360. enumerable: true,
  116361. get: function() {
  116362. return _index.tsTypeAssertion;
  116363. }
  116364. });
  116365. Object.defineProperty(exports, "TSEnumDeclaration", {
  116366. enumerable: true,
  116367. get: function() {
  116368. return _index.tsEnumDeclaration;
  116369. }
  116370. });
  116371. Object.defineProperty(exports, "TSEnumMember", {
  116372. enumerable: true,
  116373. get: function() {
  116374. return _index.tsEnumMember;
  116375. }
  116376. });
  116377. Object.defineProperty(exports, "TSModuleDeclaration", {
  116378. enumerable: true,
  116379. get: function() {
  116380. return _index.tsModuleDeclaration;
  116381. }
  116382. });
  116383. Object.defineProperty(exports, "TSModuleBlock", {
  116384. enumerable: true,
  116385. get: function() {
  116386. return _index.tsModuleBlock;
  116387. }
  116388. });
  116389. Object.defineProperty(exports, "TSImportType", {
  116390. enumerable: true,
  116391. get: function() {
  116392. return _index.tsImportType;
  116393. }
  116394. });
  116395. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  116396. enumerable: true,
  116397. get: function() {
  116398. return _index.tsImportEqualsDeclaration;
  116399. }
  116400. });
  116401. Object.defineProperty(exports, "TSExternalModuleReference", {
  116402. enumerable: true,
  116403. get: function() {
  116404. return _index.tsExternalModuleReference;
  116405. }
  116406. });
  116407. Object.defineProperty(exports, "TSNonNullExpression", {
  116408. enumerable: true,
  116409. get: function() {
  116410. return _index.tsNonNullExpression;
  116411. }
  116412. });
  116413. Object.defineProperty(exports, "TSExportAssignment", {
  116414. enumerable: true,
  116415. get: function() {
  116416. return _index.tsExportAssignment;
  116417. }
  116418. });
  116419. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  116420. enumerable: true,
  116421. get: function() {
  116422. return _index.tsNamespaceExportDeclaration;
  116423. }
  116424. });
  116425. Object.defineProperty(exports, "TSTypeAnnotation", {
  116426. enumerable: true,
  116427. get: function() {
  116428. return _index.tsTypeAnnotation;
  116429. }
  116430. });
  116431. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  116432. enumerable: true,
  116433. get: function() {
  116434. return _index.tsTypeParameterInstantiation;
  116435. }
  116436. });
  116437. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  116438. enumerable: true,
  116439. get: function() {
  116440. return _index.tsTypeParameterDeclaration;
  116441. }
  116442. });
  116443. Object.defineProperty(exports, "TSTypeParameter", {
  116444. enumerable: true,
  116445. get: function() {
  116446. return _index.tsTypeParameter;
  116447. }
  116448. });
  116449. Object.defineProperty(exports, "NumberLiteral", {
  116450. enumerable: true,
  116451. get: function() {
  116452. return _index.numberLiteral;
  116453. }
  116454. });
  116455. Object.defineProperty(exports, "RegexLiteral", {
  116456. enumerable: true,
  116457. get: function() {
  116458. return _index.regexLiteral;
  116459. }
  116460. });
  116461. Object.defineProperty(exports, "RestProperty", {
  116462. enumerable: true,
  116463. get: function() {
  116464. return _index.restProperty;
  116465. }
  116466. });
  116467. Object.defineProperty(exports, "SpreadProperty", {
  116468. enumerable: true,
  116469. get: function() {
  116470. return _index.spreadProperty;
  116471. }
  116472. });
  116473. var _index = require_generated22();
  116474. }
  116475. });
  116476. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneNode.js
  116477. var require_cloneNode5 = __commonJS({
  116478. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  116479. "use strict";
  116480. Object.defineProperty(exports, "__esModule", {
  116481. value: true
  116482. });
  116483. exports.default = cloneNode;
  116484. var _definitions = require_definitions5();
  116485. var _generated = require_generated21();
  116486. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  116487. function cloneIfNode(obj, deep, withoutLoc) {
  116488. if (obj && typeof obj.type === "string") {
  116489. return cloneNode(obj, deep, withoutLoc);
  116490. }
  116491. return obj;
  116492. }
  116493. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  116494. if (Array.isArray(obj)) {
  116495. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  116496. }
  116497. return cloneIfNode(obj, deep, withoutLoc);
  116498. }
  116499. function cloneNode(node, deep = true, withoutLoc = false) {
  116500. if (!node)
  116501. return node;
  116502. const {
  116503. type
  116504. } = node;
  116505. const newNode = {
  116506. type: node.type
  116507. };
  116508. if ((0, _generated.isIdentifier)(node)) {
  116509. newNode.name = node.name;
  116510. if (has(node, "optional") && typeof node.optional === "boolean") {
  116511. newNode.optional = node.optional;
  116512. }
  116513. if (has(node, "typeAnnotation")) {
  116514. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  116515. }
  116516. } else if (!has(_definitions.NODE_FIELDS, type)) {
  116517. throw new Error(`Unknown node type: "${type}"`);
  116518. } else {
  116519. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  116520. if (has(node, field)) {
  116521. if (deep) {
  116522. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  116523. } else {
  116524. newNode[field] = node[field];
  116525. }
  116526. }
  116527. }
  116528. }
  116529. if (has(node, "loc")) {
  116530. if (withoutLoc) {
  116531. newNode.loc = null;
  116532. } else {
  116533. newNode.loc = node.loc;
  116534. }
  116535. }
  116536. if (has(node, "leadingComments")) {
  116537. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  116538. }
  116539. if (has(node, "innerComments")) {
  116540. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  116541. }
  116542. if (has(node, "trailingComments")) {
  116543. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  116544. }
  116545. if (has(node, "extra")) {
  116546. newNode.extra = Object.assign({}, node.extra);
  116547. }
  116548. return newNode;
  116549. }
  116550. function maybeCloneComments(comments, deep, withoutLoc) {
  116551. if (!comments || !deep) {
  116552. return comments;
  116553. }
  116554. return comments.map(({
  116555. type,
  116556. value,
  116557. loc
  116558. }) => {
  116559. if (withoutLoc) {
  116560. return {
  116561. type,
  116562. value,
  116563. loc: null
  116564. };
  116565. }
  116566. return {
  116567. type,
  116568. value,
  116569. loc
  116570. };
  116571. });
  116572. }
  116573. }
  116574. });
  116575. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/clone.js
  116576. var require_clone5 = __commonJS({
  116577. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  116578. "use strict";
  116579. Object.defineProperty(exports, "__esModule", {
  116580. value: true
  116581. });
  116582. exports.default = clone;
  116583. var _cloneNode = require_cloneNode5();
  116584. function clone(node) {
  116585. return (0, _cloneNode.default)(node, false);
  116586. }
  116587. }
  116588. });
  116589. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneDeep.js
  116590. var require_cloneDeep5 = __commonJS({
  116591. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  116592. "use strict";
  116593. Object.defineProperty(exports, "__esModule", {
  116594. value: true
  116595. });
  116596. exports.default = cloneDeep2;
  116597. var _cloneNode = require_cloneNode5();
  116598. function cloneDeep2(node) {
  116599. return (0, _cloneNode.default)(node);
  116600. }
  116601. }
  116602. });
  116603. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  116604. var require_cloneDeepWithoutLoc5 = __commonJS({
  116605. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  116606. "use strict";
  116607. Object.defineProperty(exports, "__esModule", {
  116608. value: true
  116609. });
  116610. exports.default = cloneDeepWithoutLoc;
  116611. var _cloneNode = require_cloneNode5();
  116612. function cloneDeepWithoutLoc(node) {
  116613. return (0, _cloneNode.default)(node, true, true);
  116614. }
  116615. }
  116616. });
  116617. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  116618. var require_cloneWithoutLoc5 = __commonJS({
  116619. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  116620. "use strict";
  116621. Object.defineProperty(exports, "__esModule", {
  116622. value: true
  116623. });
  116624. exports.default = cloneWithoutLoc;
  116625. var _cloneNode = require_cloneNode5();
  116626. function cloneWithoutLoc(node) {
  116627. return (0, _cloneNode.default)(node, false, true);
  116628. }
  116629. }
  116630. });
  116631. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/addComments.js
  116632. var require_addComments5 = __commonJS({
  116633. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  116634. "use strict";
  116635. Object.defineProperty(exports, "__esModule", {
  116636. value: true
  116637. });
  116638. exports.default = addComments;
  116639. function addComments(node, type, comments) {
  116640. if (!comments || !node)
  116641. return node;
  116642. const key = `${type}Comments`;
  116643. if (node[key]) {
  116644. if (type === "leading") {
  116645. node[key] = comments.concat(node[key]);
  116646. } else {
  116647. node[key] = node[key].concat(comments);
  116648. }
  116649. } else {
  116650. node[key] = comments;
  116651. }
  116652. return node;
  116653. }
  116654. }
  116655. });
  116656. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/addComment.js
  116657. var require_addComment5 = __commonJS({
  116658. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  116659. "use strict";
  116660. Object.defineProperty(exports, "__esModule", {
  116661. value: true
  116662. });
  116663. exports.default = addComment;
  116664. var _addComments = require_addComments5();
  116665. function addComment(node, type, content3, line) {
  116666. return (0, _addComments.default)(node, type, [{
  116667. type: line ? "CommentLine" : "CommentBlock",
  116668. value: content3
  116669. }]);
  116670. }
  116671. }
  116672. });
  116673. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/inherit.js
  116674. var require_inherit5 = __commonJS({
  116675. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  116676. "use strict";
  116677. Object.defineProperty(exports, "__esModule", {
  116678. value: true
  116679. });
  116680. exports.default = inherit2;
  116681. function inherit2(key, child, parent) {
  116682. if (child && parent) {
  116683. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  116684. }
  116685. }
  116686. }
  116687. });
  116688. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  116689. var require_inheritInnerComments5 = __commonJS({
  116690. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  116691. "use strict";
  116692. Object.defineProperty(exports, "__esModule", {
  116693. value: true
  116694. });
  116695. exports.default = inheritInnerComments;
  116696. var _inherit = require_inherit5();
  116697. function inheritInnerComments(child, parent) {
  116698. (0, _inherit.default)("innerComments", child, parent);
  116699. }
  116700. }
  116701. });
  116702. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  116703. var require_inheritLeadingComments5 = __commonJS({
  116704. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  116705. "use strict";
  116706. Object.defineProperty(exports, "__esModule", {
  116707. value: true
  116708. });
  116709. exports.default = inheritLeadingComments;
  116710. var _inherit = require_inherit5();
  116711. function inheritLeadingComments(child, parent) {
  116712. (0, _inherit.default)("leadingComments", child, parent);
  116713. }
  116714. }
  116715. });
  116716. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  116717. var require_inheritTrailingComments5 = __commonJS({
  116718. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  116719. "use strict";
  116720. Object.defineProperty(exports, "__esModule", {
  116721. value: true
  116722. });
  116723. exports.default = inheritTrailingComments;
  116724. var _inherit = require_inherit5();
  116725. function inheritTrailingComments(child, parent) {
  116726. (0, _inherit.default)("trailingComments", child, parent);
  116727. }
  116728. }
  116729. });
  116730. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritsComments.js
  116731. var require_inheritsComments5 = __commonJS({
  116732. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  116733. "use strict";
  116734. Object.defineProperty(exports, "__esModule", {
  116735. value: true
  116736. });
  116737. exports.default = inheritsComments;
  116738. var _inheritTrailingComments = require_inheritTrailingComments5();
  116739. var _inheritLeadingComments = require_inheritLeadingComments5();
  116740. var _inheritInnerComments = require_inheritInnerComments5();
  116741. function inheritsComments(child, parent) {
  116742. (0, _inheritTrailingComments.default)(child, parent);
  116743. (0, _inheritLeadingComments.default)(child, parent);
  116744. (0, _inheritInnerComments.default)(child, parent);
  116745. return child;
  116746. }
  116747. }
  116748. });
  116749. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/removeComments.js
  116750. var require_removeComments5 = __commonJS({
  116751. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  116752. "use strict";
  116753. Object.defineProperty(exports, "__esModule", {
  116754. value: true
  116755. });
  116756. exports.default = removeComments;
  116757. var _constants = require_constants5();
  116758. function removeComments(node) {
  116759. _constants.COMMENT_KEYS.forEach((key) => {
  116760. node[key] = null;
  116761. });
  116762. return node;
  116763. }
  116764. }
  116765. });
  116766. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/constants/generated/index.js
  116767. var require_generated24 = __commonJS({
  116768. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  116769. "use strict";
  116770. Object.defineProperty(exports, "__esModule", {
  116771. value: true
  116772. });
  116773. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  116774. var _definitions = require_definitions5();
  116775. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  116776. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  116777. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  116778. exports.BINARY_TYPES = BINARY_TYPES;
  116779. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  116780. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  116781. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  116782. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  116783. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  116784. exports.BLOCK_TYPES = BLOCK_TYPES;
  116785. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  116786. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  116787. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  116788. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  116789. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  116790. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  116791. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  116792. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  116793. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  116794. exports.LOOP_TYPES = LOOP_TYPES;
  116795. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  116796. exports.WHILE_TYPES = WHILE_TYPES;
  116797. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  116798. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  116799. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  116800. exports.FOR_TYPES = FOR_TYPES;
  116801. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  116802. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  116803. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  116804. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  116805. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  116806. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  116807. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  116808. exports.PUREISH_TYPES = PUREISH_TYPES;
  116809. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  116810. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  116811. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  116812. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  116813. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  116814. exports.LVAL_TYPES = LVAL_TYPES;
  116815. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  116816. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  116817. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  116818. exports.LITERAL_TYPES = LITERAL_TYPES;
  116819. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  116820. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  116821. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  116822. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  116823. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  116824. exports.METHOD_TYPES = METHOD_TYPES;
  116825. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  116826. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  116827. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  116828. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  116829. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  116830. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  116831. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  116832. exports.PATTERN_TYPES = PATTERN_TYPES;
  116833. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  116834. exports.CLASS_TYPES = CLASS_TYPES;
  116835. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  116836. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  116837. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  116838. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  116839. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  116840. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  116841. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  116842. exports.FLOW_TYPES = FLOW_TYPES;
  116843. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  116844. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  116845. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  116846. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  116847. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  116848. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  116849. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  116850. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  116851. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  116852. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  116853. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  116854. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  116855. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  116856. exports.JSX_TYPES = JSX_TYPES;
  116857. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  116858. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  116859. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  116860. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  116861. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  116862. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  116863. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  116864. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  116865. }
  116866. });
  116867. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toBlock.js
  116868. var require_toBlock5 = __commonJS({
  116869. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  116870. "use strict";
  116871. Object.defineProperty(exports, "__esModule", {
  116872. value: true
  116873. });
  116874. exports.default = toBlock;
  116875. var _generated = require_generated21();
  116876. var _generated2 = require_generated22();
  116877. function toBlock(node, parent) {
  116878. if ((0, _generated.isBlockStatement)(node)) {
  116879. return node;
  116880. }
  116881. let blockNodes = [];
  116882. if ((0, _generated.isEmptyStatement)(node)) {
  116883. blockNodes = [];
  116884. } else {
  116885. if (!(0, _generated.isStatement)(node)) {
  116886. if ((0, _generated.isFunction)(parent)) {
  116887. node = (0, _generated2.returnStatement)(node);
  116888. } else {
  116889. node = (0, _generated2.expressionStatement)(node);
  116890. }
  116891. }
  116892. blockNodes = [node];
  116893. }
  116894. return (0, _generated2.blockStatement)(blockNodes);
  116895. }
  116896. }
  116897. });
  116898. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/ensureBlock.js
  116899. var require_ensureBlock5 = __commonJS({
  116900. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  116901. "use strict";
  116902. Object.defineProperty(exports, "__esModule", {
  116903. value: true
  116904. });
  116905. exports.default = ensureBlock;
  116906. var _toBlock = require_toBlock5();
  116907. function ensureBlock(node, key = "body") {
  116908. return node[key] = (0, _toBlock.default)(node[key], node);
  116909. }
  116910. }
  116911. });
  116912. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toIdentifier.js
  116913. var require_toIdentifier5 = __commonJS({
  116914. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  116915. "use strict";
  116916. Object.defineProperty(exports, "__esModule", {
  116917. value: true
  116918. });
  116919. exports.default = toIdentifier2;
  116920. var _isValidIdentifier = require_isValidIdentifier5();
  116921. var _helperValidatorIdentifier = require_lib26();
  116922. function toIdentifier2(input) {
  116923. input = input + "";
  116924. let name2 = "";
  116925. for (const c of input) {
  116926. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  116927. }
  116928. name2 = name2.replace(/^[-0-9]+/, "");
  116929. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  116930. return c ? c.toUpperCase() : "";
  116931. });
  116932. if (!(0, _isValidIdentifier.default)(name2)) {
  116933. name2 = `_${name2}`;
  116934. }
  116935. return name2 || "_";
  116936. }
  116937. }
  116938. });
  116939. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  116940. var require_toBindingIdentifierName5 = __commonJS({
  116941. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  116942. "use strict";
  116943. Object.defineProperty(exports, "__esModule", {
  116944. value: true
  116945. });
  116946. exports.default = toBindingIdentifierName;
  116947. var _toIdentifier = require_toIdentifier5();
  116948. function toBindingIdentifierName(name2) {
  116949. name2 = (0, _toIdentifier.default)(name2);
  116950. if (name2 === "eval" || name2 === "arguments")
  116951. name2 = "_" + name2;
  116952. return name2;
  116953. }
  116954. }
  116955. });
  116956. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toComputedKey.js
  116957. var require_toComputedKey5 = __commonJS({
  116958. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  116959. "use strict";
  116960. Object.defineProperty(exports, "__esModule", {
  116961. value: true
  116962. });
  116963. exports.default = toComputedKey;
  116964. var _generated = require_generated21();
  116965. var _generated2 = require_generated22();
  116966. function toComputedKey(node, key = node.key || node.property) {
  116967. if (!node.computed && (0, _generated.isIdentifier)(key))
  116968. key = (0, _generated2.stringLiteral)(key.name);
  116969. return key;
  116970. }
  116971. }
  116972. });
  116973. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toExpression.js
  116974. var require_toExpression5 = __commonJS({
  116975. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  116976. "use strict";
  116977. Object.defineProperty(exports, "__esModule", {
  116978. value: true
  116979. });
  116980. exports.default = void 0;
  116981. var _generated = require_generated21();
  116982. var _default = toExpression;
  116983. exports.default = _default;
  116984. function toExpression(node) {
  116985. if ((0, _generated.isExpressionStatement)(node)) {
  116986. node = node.expression;
  116987. }
  116988. if ((0, _generated.isExpression)(node)) {
  116989. return node;
  116990. }
  116991. if ((0, _generated.isClass)(node)) {
  116992. node.type = "ClassExpression";
  116993. } else if ((0, _generated.isFunction)(node)) {
  116994. node.type = "FunctionExpression";
  116995. }
  116996. if (!(0, _generated.isExpression)(node)) {
  116997. throw new Error(`cannot turn ${node.type} to an expression`);
  116998. }
  116999. return node;
  117000. }
  117001. }
  117002. });
  117003. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/traverse/traverseFast.js
  117004. var require_traverseFast5 = __commonJS({
  117005. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  117006. "use strict";
  117007. Object.defineProperty(exports, "__esModule", {
  117008. value: true
  117009. });
  117010. exports.default = traverseFast;
  117011. var _definitions = require_definitions5();
  117012. function traverseFast(node, enter, opts) {
  117013. if (!node)
  117014. return;
  117015. const keys2 = _definitions.VISITOR_KEYS[node.type];
  117016. if (!keys2)
  117017. return;
  117018. opts = opts || {};
  117019. enter(node, opts);
  117020. for (const key of keys2) {
  117021. const subNode = node[key];
  117022. if (Array.isArray(subNode)) {
  117023. for (const node2 of subNode) {
  117024. traverseFast(node2, enter, opts);
  117025. }
  117026. } else {
  117027. traverseFast(subNode, enter, opts);
  117028. }
  117029. }
  117030. }
  117031. }
  117032. });
  117033. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/removeProperties.js
  117034. var require_removeProperties5 = __commonJS({
  117035. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  117036. "use strict";
  117037. Object.defineProperty(exports, "__esModule", {
  117038. value: true
  117039. });
  117040. exports.default = removeProperties;
  117041. var _constants = require_constants5();
  117042. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  117043. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  117044. function removeProperties(node, opts = {}) {
  117045. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  117046. for (const key of map) {
  117047. if (node[key] != null)
  117048. node[key] = void 0;
  117049. }
  117050. for (const key of Object.keys(node)) {
  117051. if (key[0] === "_" && node[key] != null)
  117052. node[key] = void 0;
  117053. }
  117054. const symbols = Object.getOwnPropertySymbols(node);
  117055. for (const sym of symbols) {
  117056. node[sym] = null;
  117057. }
  117058. }
  117059. }
  117060. });
  117061. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  117062. var require_removePropertiesDeep5 = __commonJS({
  117063. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  117064. "use strict";
  117065. Object.defineProperty(exports, "__esModule", {
  117066. value: true
  117067. });
  117068. exports.default = removePropertiesDeep;
  117069. var _traverseFast = require_traverseFast5();
  117070. var _removeProperties = require_removeProperties5();
  117071. function removePropertiesDeep(tree, opts) {
  117072. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  117073. return tree;
  117074. }
  117075. }
  117076. });
  117077. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toKeyAlias.js
  117078. var require_toKeyAlias5 = __commonJS({
  117079. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  117080. "use strict";
  117081. Object.defineProperty(exports, "__esModule", {
  117082. value: true
  117083. });
  117084. exports.default = toKeyAlias;
  117085. var _generated = require_generated21();
  117086. var _cloneNode = require_cloneNode5();
  117087. var _removePropertiesDeep = require_removePropertiesDeep5();
  117088. function toKeyAlias(node, key = node.key) {
  117089. let alias;
  117090. if (node.kind === "method") {
  117091. return toKeyAlias.increment() + "";
  117092. } else if ((0, _generated.isIdentifier)(key)) {
  117093. alias = key.name;
  117094. } else if ((0, _generated.isStringLiteral)(key)) {
  117095. alias = JSON.stringify(key.value);
  117096. } else {
  117097. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  117098. }
  117099. if (node.computed) {
  117100. alias = `[${alias}]`;
  117101. }
  117102. if (node.static) {
  117103. alias = `static:${alias}`;
  117104. }
  117105. return alias;
  117106. }
  117107. toKeyAlias.uid = 0;
  117108. toKeyAlias.increment = function() {
  117109. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  117110. return toKeyAlias.uid = 0;
  117111. } else {
  117112. return toKeyAlias.uid++;
  117113. }
  117114. };
  117115. }
  117116. });
  117117. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  117118. var require_getBindingIdentifiers5 = __commonJS({
  117119. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  117120. "use strict";
  117121. Object.defineProperty(exports, "__esModule", {
  117122. value: true
  117123. });
  117124. exports.default = getBindingIdentifiers;
  117125. var _generated = require_generated21();
  117126. function getBindingIdentifiers(node, duplicates, outerOnly) {
  117127. let search2 = [].concat(node);
  117128. const ids = /* @__PURE__ */ Object.create(null);
  117129. while (search2.length) {
  117130. const id = search2.shift();
  117131. if (!id)
  117132. continue;
  117133. const keys2 = getBindingIdentifiers.keys[id.type];
  117134. if ((0, _generated.isIdentifier)(id)) {
  117135. if (duplicates) {
  117136. const _ids = ids[id.name] = ids[id.name] || [];
  117137. _ids.push(id);
  117138. } else {
  117139. ids[id.name] = id;
  117140. }
  117141. continue;
  117142. }
  117143. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  117144. if ((0, _generated.isDeclaration)(id.declaration)) {
  117145. search2.push(id.declaration);
  117146. }
  117147. continue;
  117148. }
  117149. if (outerOnly) {
  117150. if ((0, _generated.isFunctionDeclaration)(id)) {
  117151. search2.push(id.id);
  117152. continue;
  117153. }
  117154. if ((0, _generated.isFunctionExpression)(id)) {
  117155. continue;
  117156. }
  117157. }
  117158. if (keys2) {
  117159. for (let i = 0; i < keys2.length; i++) {
  117160. const key = keys2[i];
  117161. if (id[key]) {
  117162. search2 = search2.concat(id[key]);
  117163. }
  117164. }
  117165. }
  117166. }
  117167. return ids;
  117168. }
  117169. getBindingIdentifiers.keys = {
  117170. DeclareClass: ["id"],
  117171. DeclareFunction: ["id"],
  117172. DeclareModule: ["id"],
  117173. DeclareVariable: ["id"],
  117174. DeclareInterface: ["id"],
  117175. DeclareTypeAlias: ["id"],
  117176. DeclareOpaqueType: ["id"],
  117177. InterfaceDeclaration: ["id"],
  117178. TypeAlias: ["id"],
  117179. OpaqueType: ["id"],
  117180. CatchClause: ["param"],
  117181. LabeledStatement: ["label"],
  117182. UnaryExpression: ["argument"],
  117183. AssignmentExpression: ["left"],
  117184. ImportSpecifier: ["local"],
  117185. ImportNamespaceSpecifier: ["local"],
  117186. ImportDefaultSpecifier: ["local"],
  117187. ImportDeclaration: ["specifiers"],
  117188. ExportSpecifier: ["exported"],
  117189. ExportNamespaceSpecifier: ["exported"],
  117190. ExportDefaultSpecifier: ["exported"],
  117191. FunctionDeclaration: ["id", "params"],
  117192. FunctionExpression: ["id", "params"],
  117193. ArrowFunctionExpression: ["params"],
  117194. ObjectMethod: ["params"],
  117195. ClassMethod: ["params"],
  117196. ForInStatement: ["left"],
  117197. ForOfStatement: ["left"],
  117198. ClassDeclaration: ["id"],
  117199. ClassExpression: ["id"],
  117200. RestElement: ["argument"],
  117201. UpdateExpression: ["argument"],
  117202. ObjectProperty: ["value"],
  117203. AssignmentPattern: ["left"],
  117204. ArrayPattern: ["elements"],
  117205. ObjectPattern: ["properties"],
  117206. VariableDeclaration: ["declarations"],
  117207. VariableDeclarator: ["id"]
  117208. };
  117209. }
  117210. });
  117211. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  117212. var require_gatherSequenceExpressions5 = __commonJS({
  117213. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  117214. "use strict";
  117215. Object.defineProperty(exports, "__esModule", {
  117216. value: true
  117217. });
  117218. exports.default = gatherSequenceExpressions;
  117219. var _getBindingIdentifiers = require_getBindingIdentifiers5();
  117220. var _generated = require_generated21();
  117221. var _generated2 = require_generated22();
  117222. var _cloneNode = require_cloneNode5();
  117223. function gatherSequenceExpressions(nodes, scope, declars) {
  117224. const exprs = [];
  117225. let ensureLastUndefined = true;
  117226. for (const node of nodes) {
  117227. if (!(0, _generated.isEmptyStatement)(node)) {
  117228. ensureLastUndefined = false;
  117229. }
  117230. if ((0, _generated.isExpression)(node)) {
  117231. exprs.push(node);
  117232. } else if ((0, _generated.isExpressionStatement)(node)) {
  117233. exprs.push(node.expression);
  117234. } else if ((0, _generated.isVariableDeclaration)(node)) {
  117235. if (node.kind !== "var")
  117236. return;
  117237. for (const declar of node.declarations) {
  117238. const bindings = (0, _getBindingIdentifiers.default)(declar);
  117239. for (const key of Object.keys(bindings)) {
  117240. declars.push({
  117241. kind: node.kind,
  117242. id: (0, _cloneNode.default)(bindings[key])
  117243. });
  117244. }
  117245. if (declar.init) {
  117246. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  117247. }
  117248. }
  117249. ensureLastUndefined = true;
  117250. } else if ((0, _generated.isIfStatement)(node)) {
  117251. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  117252. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  117253. if (!consequent || !alternate)
  117254. return;
  117255. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  117256. } else if ((0, _generated.isBlockStatement)(node)) {
  117257. const body = gatherSequenceExpressions(node.body, scope, declars);
  117258. if (!body)
  117259. return;
  117260. exprs.push(body);
  117261. } else if ((0, _generated.isEmptyStatement)(node)) {
  117262. if (nodes.indexOf(node) === 0) {
  117263. ensureLastUndefined = true;
  117264. }
  117265. } else {
  117266. return;
  117267. }
  117268. }
  117269. if (ensureLastUndefined) {
  117270. exprs.push(scope.buildUndefinedNode());
  117271. }
  117272. if (exprs.length === 1) {
  117273. return exprs[0];
  117274. } else {
  117275. return (0, _generated2.sequenceExpression)(exprs);
  117276. }
  117277. }
  117278. }
  117279. });
  117280. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  117281. var require_toSequenceExpression5 = __commonJS({
  117282. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  117283. "use strict";
  117284. Object.defineProperty(exports, "__esModule", {
  117285. value: true
  117286. });
  117287. exports.default = toSequenceExpression;
  117288. var _gatherSequenceExpressions = require_gatherSequenceExpressions5();
  117289. function toSequenceExpression(nodes, scope) {
  117290. if (!(nodes != null && nodes.length))
  117291. return;
  117292. const declars = [];
  117293. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  117294. if (!result)
  117295. return;
  117296. for (const declar of declars) {
  117297. scope.push(declar);
  117298. }
  117299. return result;
  117300. }
  117301. }
  117302. });
  117303. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toStatement.js
  117304. var require_toStatement5 = __commonJS({
  117305. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  117306. "use strict";
  117307. Object.defineProperty(exports, "__esModule", {
  117308. value: true
  117309. });
  117310. exports.default = void 0;
  117311. var _generated = require_generated21();
  117312. var _generated2 = require_generated22();
  117313. var _default = toStatement;
  117314. exports.default = _default;
  117315. function toStatement(node, ignore3) {
  117316. if ((0, _generated.isStatement)(node)) {
  117317. return node;
  117318. }
  117319. let mustHaveId = false;
  117320. let newType;
  117321. if ((0, _generated.isClass)(node)) {
  117322. mustHaveId = true;
  117323. newType = "ClassDeclaration";
  117324. } else if ((0, _generated.isFunction)(node)) {
  117325. mustHaveId = true;
  117326. newType = "FunctionDeclaration";
  117327. } else if ((0, _generated.isAssignmentExpression)(node)) {
  117328. return (0, _generated2.expressionStatement)(node);
  117329. }
  117330. if (mustHaveId && !node.id) {
  117331. newType = false;
  117332. }
  117333. if (!newType) {
  117334. if (ignore3) {
  117335. return false;
  117336. } else {
  117337. throw new Error(`cannot turn ${node.type} to a statement`);
  117338. }
  117339. }
  117340. node.type = newType;
  117341. return node;
  117342. }
  117343. }
  117344. });
  117345. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/valueToNode.js
  117346. var require_valueToNode5 = __commonJS({
  117347. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  117348. "use strict";
  117349. Object.defineProperty(exports, "__esModule", {
  117350. value: true
  117351. });
  117352. exports.default = void 0;
  117353. var _isValidIdentifier = require_isValidIdentifier5();
  117354. var _generated = require_generated22();
  117355. var _default = valueToNode;
  117356. exports.default = _default;
  117357. var objectToString = Function.call.bind(Object.prototype.toString);
  117358. function isRegExp(value) {
  117359. return objectToString(value) === "[object RegExp]";
  117360. }
  117361. function isPlainObject2(value) {
  117362. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  117363. return false;
  117364. }
  117365. const proto = Object.getPrototypeOf(value);
  117366. return proto === null || Object.getPrototypeOf(proto) === null;
  117367. }
  117368. function valueToNode(value) {
  117369. if (value === void 0) {
  117370. return (0, _generated.identifier)("undefined");
  117371. }
  117372. if (value === true || value === false) {
  117373. return (0, _generated.booleanLiteral)(value);
  117374. }
  117375. if (value === null) {
  117376. return (0, _generated.nullLiteral)();
  117377. }
  117378. if (typeof value === "string") {
  117379. return (0, _generated.stringLiteral)(value);
  117380. }
  117381. if (typeof value === "number") {
  117382. let result;
  117383. if (Number.isFinite(value)) {
  117384. result = (0, _generated.numericLiteral)(Math.abs(value));
  117385. } else {
  117386. let numerator;
  117387. if (Number.isNaN(value)) {
  117388. numerator = (0, _generated.numericLiteral)(0);
  117389. } else {
  117390. numerator = (0, _generated.numericLiteral)(1);
  117391. }
  117392. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  117393. }
  117394. if (value < 0 || Object.is(value, -0)) {
  117395. result = (0, _generated.unaryExpression)("-", result);
  117396. }
  117397. return result;
  117398. }
  117399. if (isRegExp(value)) {
  117400. const pattern = value.source;
  117401. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  117402. return (0, _generated.regExpLiteral)(pattern, flags);
  117403. }
  117404. if (Array.isArray(value)) {
  117405. return (0, _generated.arrayExpression)(value.map(valueToNode));
  117406. }
  117407. if (isPlainObject2(value)) {
  117408. const props = [];
  117409. for (const key of Object.keys(value)) {
  117410. let nodeKey;
  117411. if ((0, _isValidIdentifier.default)(key)) {
  117412. nodeKey = (0, _generated.identifier)(key);
  117413. } else {
  117414. nodeKey = (0, _generated.stringLiteral)(key);
  117415. }
  117416. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  117417. }
  117418. return (0, _generated.objectExpression)(props);
  117419. }
  117420. throw new Error("don't know how to turn this value into a node");
  117421. }
  117422. }
  117423. });
  117424. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  117425. var require_appendToMemberExpression5 = __commonJS({
  117426. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  117427. "use strict";
  117428. Object.defineProperty(exports, "__esModule", {
  117429. value: true
  117430. });
  117431. exports.default = appendToMemberExpression;
  117432. var _generated = require_generated22();
  117433. function appendToMemberExpression(member, append, computed = false) {
  117434. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  117435. member.property = append;
  117436. member.computed = !!computed;
  117437. return member;
  117438. }
  117439. }
  117440. });
  117441. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/inherits.js
  117442. var require_inherits5 = __commonJS({
  117443. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  117444. "use strict";
  117445. Object.defineProperty(exports, "__esModule", {
  117446. value: true
  117447. });
  117448. exports.default = inherits;
  117449. var _constants = require_constants5();
  117450. var _inheritsComments = require_inheritsComments5();
  117451. function inherits(child, parent) {
  117452. if (!child || !parent)
  117453. return child;
  117454. for (const key of _constants.INHERIT_KEYS.optional) {
  117455. if (child[key] == null) {
  117456. child[key] = parent[key];
  117457. }
  117458. }
  117459. for (const key of Object.keys(parent)) {
  117460. if (key[0] === "_" && key !== "__clone")
  117461. child[key] = parent[key];
  117462. }
  117463. for (const key of _constants.INHERIT_KEYS.force) {
  117464. child[key] = parent[key];
  117465. }
  117466. (0, _inheritsComments.default)(child, parent);
  117467. return child;
  117468. }
  117469. }
  117470. });
  117471. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  117472. var require_prependToMemberExpression5 = __commonJS({
  117473. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  117474. "use strict";
  117475. Object.defineProperty(exports, "__esModule", {
  117476. value: true
  117477. });
  117478. exports.default = prependToMemberExpression;
  117479. var _generated = require_generated22();
  117480. function prependToMemberExpression(member, prepend) {
  117481. member.object = (0, _generated.memberExpression)(prepend, member.object);
  117482. return member;
  117483. }
  117484. }
  117485. });
  117486. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  117487. var require_getOuterBindingIdentifiers5 = __commonJS({
  117488. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  117489. "use strict";
  117490. Object.defineProperty(exports, "__esModule", {
  117491. value: true
  117492. });
  117493. exports.default = void 0;
  117494. var _getBindingIdentifiers = require_getBindingIdentifiers5();
  117495. var _default = getOuterBindingIdentifiers;
  117496. exports.default = _default;
  117497. function getOuterBindingIdentifiers(node, duplicates) {
  117498. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  117499. }
  117500. }
  117501. });
  117502. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/traverse/traverse.js
  117503. var require_traverse5 = __commonJS({
  117504. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  117505. "use strict";
  117506. Object.defineProperty(exports, "__esModule", {
  117507. value: true
  117508. });
  117509. exports.default = traverse;
  117510. var _definitions = require_definitions5();
  117511. function traverse(node, handlers2, state) {
  117512. if (typeof handlers2 === "function") {
  117513. handlers2 = {
  117514. enter: handlers2
  117515. };
  117516. }
  117517. const {
  117518. enter,
  117519. exit: exit2
  117520. } = handlers2;
  117521. traverseSimpleImpl(node, enter, exit2, state, []);
  117522. }
  117523. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  117524. const keys2 = _definitions.VISITOR_KEYS[node.type];
  117525. if (!keys2)
  117526. return;
  117527. if (enter)
  117528. enter(node, ancestors, state);
  117529. for (const key of keys2) {
  117530. const subNode = node[key];
  117531. if (Array.isArray(subNode)) {
  117532. for (let i = 0; i < subNode.length; i++) {
  117533. const child = subNode[i];
  117534. if (!child)
  117535. continue;
  117536. ancestors.push({
  117537. node,
  117538. key,
  117539. index: i
  117540. });
  117541. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  117542. ancestors.pop();
  117543. }
  117544. } else if (subNode) {
  117545. ancestors.push({
  117546. node,
  117547. key
  117548. });
  117549. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  117550. ancestors.pop();
  117551. }
  117552. }
  117553. if (exit2)
  117554. exit2(node, ancestors, state);
  117555. }
  117556. }
  117557. });
  117558. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isBinding.js
  117559. var require_isBinding5 = __commonJS({
  117560. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  117561. "use strict";
  117562. Object.defineProperty(exports, "__esModule", {
  117563. value: true
  117564. });
  117565. exports.default = isBinding;
  117566. var _getBindingIdentifiers = require_getBindingIdentifiers5();
  117567. function isBinding(node, parent, grandparent) {
  117568. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  117569. return false;
  117570. }
  117571. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  117572. if (keys2) {
  117573. for (let i = 0; i < keys2.length; i++) {
  117574. const key = keys2[i];
  117575. const val = parent[key];
  117576. if (Array.isArray(val)) {
  117577. if (val.indexOf(node) >= 0)
  117578. return true;
  117579. } else {
  117580. if (val === node)
  117581. return true;
  117582. }
  117583. }
  117584. }
  117585. return false;
  117586. }
  117587. }
  117588. });
  117589. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isLet.js
  117590. var require_isLet5 = __commonJS({
  117591. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  117592. "use strict";
  117593. Object.defineProperty(exports, "__esModule", {
  117594. value: true
  117595. });
  117596. exports.default = isLet;
  117597. var _generated = require_generated21();
  117598. var _constants = require_constants5();
  117599. function isLet(node) {
  117600. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  117601. }
  117602. }
  117603. });
  117604. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isBlockScoped.js
  117605. var require_isBlockScoped5 = __commonJS({
  117606. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  117607. "use strict";
  117608. Object.defineProperty(exports, "__esModule", {
  117609. value: true
  117610. });
  117611. exports.default = isBlockScoped;
  117612. var _generated = require_generated21();
  117613. var _isLet = require_isLet5();
  117614. function isBlockScoped(node) {
  117615. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  117616. }
  117617. }
  117618. });
  117619. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isImmutable.js
  117620. var require_isImmutable5 = __commonJS({
  117621. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  117622. "use strict";
  117623. Object.defineProperty(exports, "__esModule", {
  117624. value: true
  117625. });
  117626. exports.default = isImmutable;
  117627. var _isType = require_isType5();
  117628. var _generated = require_generated21();
  117629. function isImmutable(node) {
  117630. if ((0, _isType.default)(node.type, "Immutable"))
  117631. return true;
  117632. if ((0, _generated.isIdentifier)(node)) {
  117633. if (node.name === "undefined") {
  117634. return true;
  117635. } else {
  117636. return false;
  117637. }
  117638. }
  117639. return false;
  117640. }
  117641. }
  117642. });
  117643. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  117644. var require_isNodesEquivalent5 = __commonJS({
  117645. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  117646. "use strict";
  117647. Object.defineProperty(exports, "__esModule", {
  117648. value: true
  117649. });
  117650. exports.default = isNodesEquivalent;
  117651. var _definitions = require_definitions5();
  117652. function isNodesEquivalent(a, b) {
  117653. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  117654. return a === b;
  117655. }
  117656. if (a.type !== b.type) {
  117657. return false;
  117658. }
  117659. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  117660. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  117661. for (const field of fields) {
  117662. if (typeof a[field] !== typeof b[field]) {
  117663. return false;
  117664. }
  117665. if (a[field] == null && b[field] == null) {
  117666. continue;
  117667. } else if (a[field] == null || b[field] == null) {
  117668. return false;
  117669. }
  117670. if (Array.isArray(a[field])) {
  117671. if (!Array.isArray(b[field])) {
  117672. return false;
  117673. }
  117674. if (a[field].length !== b[field].length) {
  117675. return false;
  117676. }
  117677. for (let i = 0; i < a[field].length; i++) {
  117678. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  117679. return false;
  117680. }
  117681. }
  117682. continue;
  117683. }
  117684. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  117685. for (const key of Object.keys(a[field])) {
  117686. if (a[field][key] !== b[field][key]) {
  117687. return false;
  117688. }
  117689. }
  117690. continue;
  117691. }
  117692. if (!isNodesEquivalent(a[field], b[field])) {
  117693. return false;
  117694. }
  117695. }
  117696. return true;
  117697. }
  117698. }
  117699. });
  117700. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isReferenced.js
  117701. var require_isReferenced5 = __commonJS({
  117702. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  117703. "use strict";
  117704. Object.defineProperty(exports, "__esModule", {
  117705. value: true
  117706. });
  117707. exports.default = isReferenced;
  117708. function isReferenced(node, parent, grandparent) {
  117709. switch (parent.type) {
  117710. case "MemberExpression":
  117711. case "JSXMemberExpression":
  117712. case "OptionalMemberExpression":
  117713. if (parent.property === node) {
  117714. return !!parent.computed;
  117715. }
  117716. return parent.object === node;
  117717. case "VariableDeclarator":
  117718. return parent.init === node;
  117719. case "ArrowFunctionExpression":
  117720. return parent.body === node;
  117721. case "PrivateName":
  117722. return false;
  117723. case "ClassMethod":
  117724. case "ClassPrivateMethod":
  117725. case "ObjectMethod":
  117726. if (parent.params.includes(node)) {
  117727. return false;
  117728. }
  117729. case "ObjectProperty":
  117730. case "ClassProperty":
  117731. case "ClassPrivateProperty":
  117732. if (parent.key === node) {
  117733. return !!parent.computed;
  117734. }
  117735. if (parent.value === node) {
  117736. return !grandparent || grandparent.type !== "ObjectPattern";
  117737. }
  117738. return true;
  117739. case "ClassDeclaration":
  117740. case "ClassExpression":
  117741. return parent.superClass === node;
  117742. case "AssignmentExpression":
  117743. return parent.right === node;
  117744. case "AssignmentPattern":
  117745. return parent.right === node;
  117746. case "LabeledStatement":
  117747. return false;
  117748. case "CatchClause":
  117749. return false;
  117750. case "RestElement":
  117751. return false;
  117752. case "BreakStatement":
  117753. case "ContinueStatement":
  117754. return false;
  117755. case "FunctionDeclaration":
  117756. case "FunctionExpression":
  117757. return false;
  117758. case "ExportNamespaceSpecifier":
  117759. case "ExportDefaultSpecifier":
  117760. return false;
  117761. case "ExportSpecifier":
  117762. if (grandparent != null && grandparent.source) {
  117763. return false;
  117764. }
  117765. return parent.local === node;
  117766. case "ImportDefaultSpecifier":
  117767. case "ImportNamespaceSpecifier":
  117768. case "ImportSpecifier":
  117769. return false;
  117770. case "JSXAttribute":
  117771. return false;
  117772. case "ObjectPattern":
  117773. case "ArrayPattern":
  117774. return false;
  117775. case "MetaProperty":
  117776. return false;
  117777. case "ObjectTypeProperty":
  117778. return parent.key !== node;
  117779. case "TSEnumMember":
  117780. return parent.id !== node;
  117781. case "TSPropertySignature":
  117782. if (parent.key === node) {
  117783. return !!parent.computed;
  117784. }
  117785. return true;
  117786. }
  117787. return true;
  117788. }
  117789. }
  117790. });
  117791. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isScope.js
  117792. var require_isScope5 = __commonJS({
  117793. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  117794. "use strict";
  117795. Object.defineProperty(exports, "__esModule", {
  117796. value: true
  117797. });
  117798. exports.default = isScope;
  117799. var _generated = require_generated21();
  117800. function isScope(node, parent) {
  117801. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  117802. return false;
  117803. }
  117804. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  117805. return true;
  117806. }
  117807. return (0, _generated.isScopable)(node);
  117808. }
  117809. }
  117810. });
  117811. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  117812. var require_isSpecifierDefault5 = __commonJS({
  117813. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  117814. "use strict";
  117815. Object.defineProperty(exports, "__esModule", {
  117816. value: true
  117817. });
  117818. exports.default = isSpecifierDefault;
  117819. var _generated = require_generated21();
  117820. function isSpecifierDefault(specifier) {
  117821. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  117822. name: "default"
  117823. });
  117824. }
  117825. }
  117826. });
  117827. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  117828. var require_isValidES3Identifier5 = __commonJS({
  117829. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  117830. "use strict";
  117831. Object.defineProperty(exports, "__esModule", {
  117832. value: true
  117833. });
  117834. exports.default = isValidES3Identifier;
  117835. var _isValidIdentifier = require_isValidIdentifier5();
  117836. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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"]);
  117837. function isValidES3Identifier(name2) {
  117838. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  117839. }
  117840. }
  117841. });
  117842. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isVar.js
  117843. var require_isVar5 = __commonJS({
  117844. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  117845. "use strict";
  117846. Object.defineProperty(exports, "__esModule", {
  117847. value: true
  117848. });
  117849. exports.default = isVar;
  117850. var _generated = require_generated21();
  117851. var _constants = require_constants5();
  117852. function isVar(node) {
  117853. return (0, _generated.isVariableDeclaration)(node, {
  117854. kind: "var"
  117855. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  117856. }
  117857. }
  117858. });
  117859. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/ast-types/generated/index.js
  117860. var require_generated25 = __commonJS({
  117861. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  117862. }
  117863. });
  117864. // node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/index.js
  117865. var require_lib27 = __commonJS({
  117866. "node_modules/@babel/helper-get-function-arity/node_modules/@babel/types/lib/index.js"(exports) {
  117867. "use strict";
  117868. Object.defineProperty(exports, "__esModule", {
  117869. value: true
  117870. });
  117871. var _exportNames = {
  117872. react: true,
  117873. assertNode: true,
  117874. createTypeAnnotationBasedOnTypeof: true,
  117875. createUnionTypeAnnotation: true,
  117876. createFlowUnionType: true,
  117877. createTSUnionType: true,
  117878. cloneNode: true,
  117879. clone: true,
  117880. cloneDeep: true,
  117881. cloneDeepWithoutLoc: true,
  117882. cloneWithoutLoc: true,
  117883. addComment: true,
  117884. addComments: true,
  117885. inheritInnerComments: true,
  117886. inheritLeadingComments: true,
  117887. inheritsComments: true,
  117888. inheritTrailingComments: true,
  117889. removeComments: true,
  117890. ensureBlock: true,
  117891. toBindingIdentifierName: true,
  117892. toBlock: true,
  117893. toComputedKey: true,
  117894. toExpression: true,
  117895. toIdentifier: true,
  117896. toKeyAlias: true,
  117897. toSequenceExpression: true,
  117898. toStatement: true,
  117899. valueToNode: true,
  117900. appendToMemberExpression: true,
  117901. inherits: true,
  117902. prependToMemberExpression: true,
  117903. removeProperties: true,
  117904. removePropertiesDeep: true,
  117905. removeTypeDuplicates: true,
  117906. getBindingIdentifiers: true,
  117907. getOuterBindingIdentifiers: true,
  117908. traverse: true,
  117909. traverseFast: true,
  117910. shallowEqual: true,
  117911. is: true,
  117912. isBinding: true,
  117913. isBlockScoped: true,
  117914. isImmutable: true,
  117915. isLet: true,
  117916. isNode: true,
  117917. isNodesEquivalent: true,
  117918. isPlaceholderType: true,
  117919. isReferenced: true,
  117920. isScope: true,
  117921. isSpecifierDefault: true,
  117922. isType: true,
  117923. isValidES3Identifier: true,
  117924. isValidIdentifier: true,
  117925. isVar: true,
  117926. matchesPattern: true,
  117927. validate: true,
  117928. buildMatchMemberExpression: true
  117929. };
  117930. Object.defineProperty(exports, "assertNode", {
  117931. enumerable: true,
  117932. get: function() {
  117933. return _assertNode.default;
  117934. }
  117935. });
  117936. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  117937. enumerable: true,
  117938. get: function() {
  117939. return _createTypeAnnotationBasedOnTypeof.default;
  117940. }
  117941. });
  117942. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  117943. enumerable: true,
  117944. get: function() {
  117945. return _createFlowUnionType.default;
  117946. }
  117947. });
  117948. Object.defineProperty(exports, "createFlowUnionType", {
  117949. enumerable: true,
  117950. get: function() {
  117951. return _createFlowUnionType.default;
  117952. }
  117953. });
  117954. Object.defineProperty(exports, "createTSUnionType", {
  117955. enumerable: true,
  117956. get: function() {
  117957. return _createTSUnionType.default;
  117958. }
  117959. });
  117960. Object.defineProperty(exports, "cloneNode", {
  117961. enumerable: true,
  117962. get: function() {
  117963. return _cloneNode.default;
  117964. }
  117965. });
  117966. Object.defineProperty(exports, "clone", {
  117967. enumerable: true,
  117968. get: function() {
  117969. return _clone.default;
  117970. }
  117971. });
  117972. Object.defineProperty(exports, "cloneDeep", {
  117973. enumerable: true,
  117974. get: function() {
  117975. return _cloneDeep.default;
  117976. }
  117977. });
  117978. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  117979. enumerable: true,
  117980. get: function() {
  117981. return _cloneDeepWithoutLoc.default;
  117982. }
  117983. });
  117984. Object.defineProperty(exports, "cloneWithoutLoc", {
  117985. enumerable: true,
  117986. get: function() {
  117987. return _cloneWithoutLoc.default;
  117988. }
  117989. });
  117990. Object.defineProperty(exports, "addComment", {
  117991. enumerable: true,
  117992. get: function() {
  117993. return _addComment.default;
  117994. }
  117995. });
  117996. Object.defineProperty(exports, "addComments", {
  117997. enumerable: true,
  117998. get: function() {
  117999. return _addComments.default;
  118000. }
  118001. });
  118002. Object.defineProperty(exports, "inheritInnerComments", {
  118003. enumerable: true,
  118004. get: function() {
  118005. return _inheritInnerComments.default;
  118006. }
  118007. });
  118008. Object.defineProperty(exports, "inheritLeadingComments", {
  118009. enumerable: true,
  118010. get: function() {
  118011. return _inheritLeadingComments.default;
  118012. }
  118013. });
  118014. Object.defineProperty(exports, "inheritsComments", {
  118015. enumerable: true,
  118016. get: function() {
  118017. return _inheritsComments.default;
  118018. }
  118019. });
  118020. Object.defineProperty(exports, "inheritTrailingComments", {
  118021. enumerable: true,
  118022. get: function() {
  118023. return _inheritTrailingComments.default;
  118024. }
  118025. });
  118026. Object.defineProperty(exports, "removeComments", {
  118027. enumerable: true,
  118028. get: function() {
  118029. return _removeComments.default;
  118030. }
  118031. });
  118032. Object.defineProperty(exports, "ensureBlock", {
  118033. enumerable: true,
  118034. get: function() {
  118035. return _ensureBlock.default;
  118036. }
  118037. });
  118038. Object.defineProperty(exports, "toBindingIdentifierName", {
  118039. enumerable: true,
  118040. get: function() {
  118041. return _toBindingIdentifierName.default;
  118042. }
  118043. });
  118044. Object.defineProperty(exports, "toBlock", {
  118045. enumerable: true,
  118046. get: function() {
  118047. return _toBlock.default;
  118048. }
  118049. });
  118050. Object.defineProperty(exports, "toComputedKey", {
  118051. enumerable: true,
  118052. get: function() {
  118053. return _toComputedKey.default;
  118054. }
  118055. });
  118056. Object.defineProperty(exports, "toExpression", {
  118057. enumerable: true,
  118058. get: function() {
  118059. return _toExpression.default;
  118060. }
  118061. });
  118062. Object.defineProperty(exports, "toIdentifier", {
  118063. enumerable: true,
  118064. get: function() {
  118065. return _toIdentifier.default;
  118066. }
  118067. });
  118068. Object.defineProperty(exports, "toKeyAlias", {
  118069. enumerable: true,
  118070. get: function() {
  118071. return _toKeyAlias.default;
  118072. }
  118073. });
  118074. Object.defineProperty(exports, "toSequenceExpression", {
  118075. enumerable: true,
  118076. get: function() {
  118077. return _toSequenceExpression.default;
  118078. }
  118079. });
  118080. Object.defineProperty(exports, "toStatement", {
  118081. enumerable: true,
  118082. get: function() {
  118083. return _toStatement.default;
  118084. }
  118085. });
  118086. Object.defineProperty(exports, "valueToNode", {
  118087. enumerable: true,
  118088. get: function() {
  118089. return _valueToNode.default;
  118090. }
  118091. });
  118092. Object.defineProperty(exports, "appendToMemberExpression", {
  118093. enumerable: true,
  118094. get: function() {
  118095. return _appendToMemberExpression.default;
  118096. }
  118097. });
  118098. Object.defineProperty(exports, "inherits", {
  118099. enumerable: true,
  118100. get: function() {
  118101. return _inherits.default;
  118102. }
  118103. });
  118104. Object.defineProperty(exports, "prependToMemberExpression", {
  118105. enumerable: true,
  118106. get: function() {
  118107. return _prependToMemberExpression.default;
  118108. }
  118109. });
  118110. Object.defineProperty(exports, "removeProperties", {
  118111. enumerable: true,
  118112. get: function() {
  118113. return _removeProperties.default;
  118114. }
  118115. });
  118116. Object.defineProperty(exports, "removePropertiesDeep", {
  118117. enumerable: true,
  118118. get: function() {
  118119. return _removePropertiesDeep.default;
  118120. }
  118121. });
  118122. Object.defineProperty(exports, "removeTypeDuplicates", {
  118123. enumerable: true,
  118124. get: function() {
  118125. return _removeTypeDuplicates.default;
  118126. }
  118127. });
  118128. Object.defineProperty(exports, "getBindingIdentifiers", {
  118129. enumerable: true,
  118130. get: function() {
  118131. return _getBindingIdentifiers.default;
  118132. }
  118133. });
  118134. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  118135. enumerable: true,
  118136. get: function() {
  118137. return _getOuterBindingIdentifiers.default;
  118138. }
  118139. });
  118140. Object.defineProperty(exports, "traverse", {
  118141. enumerable: true,
  118142. get: function() {
  118143. return _traverse.default;
  118144. }
  118145. });
  118146. Object.defineProperty(exports, "traverseFast", {
  118147. enumerable: true,
  118148. get: function() {
  118149. return _traverseFast.default;
  118150. }
  118151. });
  118152. Object.defineProperty(exports, "shallowEqual", {
  118153. enumerable: true,
  118154. get: function() {
  118155. return _shallowEqual.default;
  118156. }
  118157. });
  118158. Object.defineProperty(exports, "is", {
  118159. enumerable: true,
  118160. get: function() {
  118161. return _is.default;
  118162. }
  118163. });
  118164. Object.defineProperty(exports, "isBinding", {
  118165. enumerable: true,
  118166. get: function() {
  118167. return _isBinding.default;
  118168. }
  118169. });
  118170. Object.defineProperty(exports, "isBlockScoped", {
  118171. enumerable: true,
  118172. get: function() {
  118173. return _isBlockScoped.default;
  118174. }
  118175. });
  118176. Object.defineProperty(exports, "isImmutable", {
  118177. enumerable: true,
  118178. get: function() {
  118179. return _isImmutable.default;
  118180. }
  118181. });
  118182. Object.defineProperty(exports, "isLet", {
  118183. enumerable: true,
  118184. get: function() {
  118185. return _isLet.default;
  118186. }
  118187. });
  118188. Object.defineProperty(exports, "isNode", {
  118189. enumerable: true,
  118190. get: function() {
  118191. return _isNode.default;
  118192. }
  118193. });
  118194. Object.defineProperty(exports, "isNodesEquivalent", {
  118195. enumerable: true,
  118196. get: function() {
  118197. return _isNodesEquivalent.default;
  118198. }
  118199. });
  118200. Object.defineProperty(exports, "isPlaceholderType", {
  118201. enumerable: true,
  118202. get: function() {
  118203. return _isPlaceholderType.default;
  118204. }
  118205. });
  118206. Object.defineProperty(exports, "isReferenced", {
  118207. enumerable: true,
  118208. get: function() {
  118209. return _isReferenced.default;
  118210. }
  118211. });
  118212. Object.defineProperty(exports, "isScope", {
  118213. enumerable: true,
  118214. get: function() {
  118215. return _isScope.default;
  118216. }
  118217. });
  118218. Object.defineProperty(exports, "isSpecifierDefault", {
  118219. enumerable: true,
  118220. get: function() {
  118221. return _isSpecifierDefault.default;
  118222. }
  118223. });
  118224. Object.defineProperty(exports, "isType", {
  118225. enumerable: true,
  118226. get: function() {
  118227. return _isType.default;
  118228. }
  118229. });
  118230. Object.defineProperty(exports, "isValidES3Identifier", {
  118231. enumerable: true,
  118232. get: function() {
  118233. return _isValidES3Identifier.default;
  118234. }
  118235. });
  118236. Object.defineProperty(exports, "isValidIdentifier", {
  118237. enumerable: true,
  118238. get: function() {
  118239. return _isValidIdentifier.default;
  118240. }
  118241. });
  118242. Object.defineProperty(exports, "isVar", {
  118243. enumerable: true,
  118244. get: function() {
  118245. return _isVar.default;
  118246. }
  118247. });
  118248. Object.defineProperty(exports, "matchesPattern", {
  118249. enumerable: true,
  118250. get: function() {
  118251. return _matchesPattern.default;
  118252. }
  118253. });
  118254. Object.defineProperty(exports, "validate", {
  118255. enumerable: true,
  118256. get: function() {
  118257. return _validate.default;
  118258. }
  118259. });
  118260. Object.defineProperty(exports, "buildMatchMemberExpression", {
  118261. enumerable: true,
  118262. get: function() {
  118263. return _buildMatchMemberExpression.default;
  118264. }
  118265. });
  118266. exports.react = void 0;
  118267. var _isReactComponent = require_isReactComponent5();
  118268. var _isCompatTag = require_isCompatTag5();
  118269. var _buildChildren = require_buildChildren5();
  118270. var _assertNode = require_assertNode5();
  118271. var _generated = require_generated23();
  118272. Object.keys(_generated).forEach(function(key) {
  118273. if (key === "default" || key === "__esModule")
  118274. return;
  118275. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118276. return;
  118277. if (key in exports && exports[key] === _generated[key])
  118278. return;
  118279. Object.defineProperty(exports, key, {
  118280. enumerable: true,
  118281. get: function() {
  118282. return _generated[key];
  118283. }
  118284. });
  118285. });
  118286. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof5();
  118287. var _createFlowUnionType = require_createFlowUnionType5();
  118288. var _createTSUnionType = require_createTSUnionType5();
  118289. var _generated2 = require_generated22();
  118290. Object.keys(_generated2).forEach(function(key) {
  118291. if (key === "default" || key === "__esModule")
  118292. return;
  118293. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118294. return;
  118295. if (key in exports && exports[key] === _generated2[key])
  118296. return;
  118297. Object.defineProperty(exports, key, {
  118298. enumerable: true,
  118299. get: function() {
  118300. return _generated2[key];
  118301. }
  118302. });
  118303. });
  118304. var _uppercase = require_uppercase5();
  118305. Object.keys(_uppercase).forEach(function(key) {
  118306. if (key === "default" || key === "__esModule")
  118307. return;
  118308. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118309. return;
  118310. if (key in exports && exports[key] === _uppercase[key])
  118311. return;
  118312. Object.defineProperty(exports, key, {
  118313. enumerable: true,
  118314. get: function() {
  118315. return _uppercase[key];
  118316. }
  118317. });
  118318. });
  118319. var _cloneNode = require_cloneNode5();
  118320. var _clone = require_clone5();
  118321. var _cloneDeep = require_cloneDeep5();
  118322. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc5();
  118323. var _cloneWithoutLoc = require_cloneWithoutLoc5();
  118324. var _addComment = require_addComment5();
  118325. var _addComments = require_addComments5();
  118326. var _inheritInnerComments = require_inheritInnerComments5();
  118327. var _inheritLeadingComments = require_inheritLeadingComments5();
  118328. var _inheritsComments = require_inheritsComments5();
  118329. var _inheritTrailingComments = require_inheritTrailingComments5();
  118330. var _removeComments = require_removeComments5();
  118331. var _generated3 = require_generated24();
  118332. Object.keys(_generated3).forEach(function(key) {
  118333. if (key === "default" || key === "__esModule")
  118334. return;
  118335. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118336. return;
  118337. if (key in exports && exports[key] === _generated3[key])
  118338. return;
  118339. Object.defineProperty(exports, key, {
  118340. enumerable: true,
  118341. get: function() {
  118342. return _generated3[key];
  118343. }
  118344. });
  118345. });
  118346. var _constants = require_constants5();
  118347. Object.keys(_constants).forEach(function(key) {
  118348. if (key === "default" || key === "__esModule")
  118349. return;
  118350. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118351. return;
  118352. if (key in exports && exports[key] === _constants[key])
  118353. return;
  118354. Object.defineProperty(exports, key, {
  118355. enumerable: true,
  118356. get: function() {
  118357. return _constants[key];
  118358. }
  118359. });
  118360. });
  118361. var _ensureBlock = require_ensureBlock5();
  118362. var _toBindingIdentifierName = require_toBindingIdentifierName5();
  118363. var _toBlock = require_toBlock5();
  118364. var _toComputedKey = require_toComputedKey5();
  118365. var _toExpression = require_toExpression5();
  118366. var _toIdentifier = require_toIdentifier5();
  118367. var _toKeyAlias = require_toKeyAlias5();
  118368. var _toSequenceExpression = require_toSequenceExpression5();
  118369. var _toStatement = require_toStatement5();
  118370. var _valueToNode = require_valueToNode5();
  118371. var _definitions = require_definitions5();
  118372. Object.keys(_definitions).forEach(function(key) {
  118373. if (key === "default" || key === "__esModule")
  118374. return;
  118375. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118376. return;
  118377. if (key in exports && exports[key] === _definitions[key])
  118378. return;
  118379. Object.defineProperty(exports, key, {
  118380. enumerable: true,
  118381. get: function() {
  118382. return _definitions[key];
  118383. }
  118384. });
  118385. });
  118386. var _appendToMemberExpression = require_appendToMemberExpression5();
  118387. var _inherits = require_inherits5();
  118388. var _prependToMemberExpression = require_prependToMemberExpression5();
  118389. var _removeProperties = require_removeProperties5();
  118390. var _removePropertiesDeep = require_removePropertiesDeep5();
  118391. var _removeTypeDuplicates = require_removeTypeDuplicates9();
  118392. var _getBindingIdentifiers = require_getBindingIdentifiers5();
  118393. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers5();
  118394. var _traverse = require_traverse5();
  118395. Object.keys(_traverse).forEach(function(key) {
  118396. if (key === "default" || key === "__esModule")
  118397. return;
  118398. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118399. return;
  118400. if (key in exports && exports[key] === _traverse[key])
  118401. return;
  118402. Object.defineProperty(exports, key, {
  118403. enumerable: true,
  118404. get: function() {
  118405. return _traverse[key];
  118406. }
  118407. });
  118408. });
  118409. var _traverseFast = require_traverseFast5();
  118410. var _shallowEqual = require_shallowEqual5();
  118411. var _is = require_is5();
  118412. var _isBinding = require_isBinding5();
  118413. var _isBlockScoped = require_isBlockScoped5();
  118414. var _isImmutable = require_isImmutable5();
  118415. var _isLet = require_isLet5();
  118416. var _isNode = require_isNode5();
  118417. var _isNodesEquivalent = require_isNodesEquivalent5();
  118418. var _isPlaceholderType = require_isPlaceholderType5();
  118419. var _isReferenced = require_isReferenced5();
  118420. var _isScope = require_isScope5();
  118421. var _isSpecifierDefault = require_isSpecifierDefault5();
  118422. var _isType = require_isType5();
  118423. var _isValidES3Identifier = require_isValidES3Identifier5();
  118424. var _isValidIdentifier = require_isValidIdentifier5();
  118425. var _isVar = require_isVar5();
  118426. var _matchesPattern = require_matchesPattern5();
  118427. var _validate = require_validate5();
  118428. var _buildMatchMemberExpression = require_buildMatchMemberExpression5();
  118429. var _generated4 = require_generated21();
  118430. Object.keys(_generated4).forEach(function(key) {
  118431. if (key === "default" || key === "__esModule")
  118432. return;
  118433. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118434. return;
  118435. if (key in exports && exports[key] === _generated4[key])
  118436. return;
  118437. Object.defineProperty(exports, key, {
  118438. enumerable: true,
  118439. get: function() {
  118440. return _generated4[key];
  118441. }
  118442. });
  118443. });
  118444. var _generated5 = require_generated25();
  118445. Object.keys(_generated5).forEach(function(key) {
  118446. if (key === "default" || key === "__esModule")
  118447. return;
  118448. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  118449. return;
  118450. if (key in exports && exports[key] === _generated5[key])
  118451. return;
  118452. Object.defineProperty(exports, key, {
  118453. enumerable: true,
  118454. get: function() {
  118455. return _generated5[key];
  118456. }
  118457. });
  118458. });
  118459. var react = {
  118460. isReactComponent: _isReactComponent.default,
  118461. isCompatTag: _isCompatTag.default,
  118462. buildChildren: _buildChildren.default
  118463. };
  118464. exports.react = react;
  118465. }
  118466. });
  118467. // node_modules/@babel/helper-get-function-arity/lib/index.js
  118468. var require_lib28 = __commonJS({
  118469. "node_modules/@babel/helper-get-function-arity/lib/index.js"(exports) {
  118470. "use strict";
  118471. Object.defineProperty(exports, "__esModule", {
  118472. value: true
  118473. });
  118474. exports.default = _default;
  118475. var t2 = require_lib27();
  118476. function _default(node) {
  118477. const params = node.params;
  118478. for (let i = 0; i < params.length; i++) {
  118479. const param = params[i];
  118480. if (t2.isAssignmentPattern(param) || t2.isRestElement(param)) {
  118481. return i;
  118482. }
  118483. }
  118484. return params.length;
  118485. }
  118486. }
  118487. });
  118488. // node_modules/@babel/template/node_modules/@babel/types/lib/utils/shallowEqual.js
  118489. var require_shallowEqual6 = __commonJS({
  118490. "node_modules/@babel/template/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  118491. "use strict";
  118492. Object.defineProperty(exports, "__esModule", {
  118493. value: true
  118494. });
  118495. exports.default = shallowEqual;
  118496. function shallowEqual(actual, expected) {
  118497. const keys2 = Object.keys(expected);
  118498. for (const key of keys2) {
  118499. if (actual[key] !== expected[key]) {
  118500. return false;
  118501. }
  118502. }
  118503. return true;
  118504. }
  118505. }
  118506. });
  118507. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/generated/index.js
  118508. var require_generated26 = __commonJS({
  118509. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  118510. "use strict";
  118511. Object.defineProperty(exports, "__esModule", {
  118512. value: true
  118513. });
  118514. exports.isArrayExpression = isArrayExpression;
  118515. exports.isAssignmentExpression = isAssignmentExpression;
  118516. exports.isBinaryExpression = isBinaryExpression;
  118517. exports.isInterpreterDirective = isInterpreterDirective;
  118518. exports.isDirective = isDirective;
  118519. exports.isDirectiveLiteral = isDirectiveLiteral;
  118520. exports.isBlockStatement = isBlockStatement;
  118521. exports.isBreakStatement = isBreakStatement;
  118522. exports.isCallExpression = isCallExpression;
  118523. exports.isCatchClause = isCatchClause;
  118524. exports.isConditionalExpression = isConditionalExpression;
  118525. exports.isContinueStatement = isContinueStatement;
  118526. exports.isDebuggerStatement = isDebuggerStatement;
  118527. exports.isDoWhileStatement = isDoWhileStatement;
  118528. exports.isEmptyStatement = isEmptyStatement;
  118529. exports.isExpressionStatement = isExpressionStatement2;
  118530. exports.isFile = isFile;
  118531. exports.isForInStatement = isForInStatement;
  118532. exports.isForStatement = isForStatement;
  118533. exports.isFunctionDeclaration = isFunctionDeclaration;
  118534. exports.isFunctionExpression = isFunctionExpression;
  118535. exports.isIdentifier = isIdentifier2;
  118536. exports.isIfStatement = isIfStatement;
  118537. exports.isLabeledStatement = isLabeledStatement;
  118538. exports.isStringLiteral = isStringLiteral2;
  118539. exports.isNumericLiteral = isNumericLiteral;
  118540. exports.isNullLiteral = isNullLiteral;
  118541. exports.isBooleanLiteral = isBooleanLiteral2;
  118542. exports.isRegExpLiteral = isRegExpLiteral;
  118543. exports.isLogicalExpression = isLogicalExpression;
  118544. exports.isMemberExpression = isMemberExpression;
  118545. exports.isNewExpression = isNewExpression;
  118546. exports.isProgram = isProgram;
  118547. exports.isObjectExpression = isObjectExpression;
  118548. exports.isObjectMethod = isObjectMethod;
  118549. exports.isObjectProperty = isObjectProperty;
  118550. exports.isRestElement = isRestElement;
  118551. exports.isReturnStatement = isReturnStatement;
  118552. exports.isSequenceExpression = isSequenceExpression;
  118553. exports.isParenthesizedExpression = isParenthesizedExpression;
  118554. exports.isSwitchCase = isSwitchCase;
  118555. exports.isSwitchStatement = isSwitchStatement;
  118556. exports.isThisExpression = isThisExpression;
  118557. exports.isThrowStatement = isThrowStatement;
  118558. exports.isTryStatement = isTryStatement;
  118559. exports.isUnaryExpression = isUnaryExpression;
  118560. exports.isUpdateExpression = isUpdateExpression;
  118561. exports.isVariableDeclaration = isVariableDeclaration;
  118562. exports.isVariableDeclarator = isVariableDeclarator;
  118563. exports.isWhileStatement = isWhileStatement;
  118564. exports.isWithStatement = isWithStatement;
  118565. exports.isAssignmentPattern = isAssignmentPattern;
  118566. exports.isArrayPattern = isArrayPattern;
  118567. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  118568. exports.isClassBody = isClassBody;
  118569. exports.isClassExpression = isClassExpression;
  118570. exports.isClassDeclaration = isClassDeclaration;
  118571. exports.isExportAllDeclaration = isExportAllDeclaration;
  118572. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  118573. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  118574. exports.isExportSpecifier = isExportSpecifier;
  118575. exports.isForOfStatement = isForOfStatement;
  118576. exports.isImportDeclaration = isImportDeclaration;
  118577. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  118578. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  118579. exports.isImportSpecifier = isImportSpecifier;
  118580. exports.isMetaProperty = isMetaProperty;
  118581. exports.isClassMethod = isClassMethod;
  118582. exports.isObjectPattern = isObjectPattern;
  118583. exports.isSpreadElement = isSpreadElement;
  118584. exports.isSuper = isSuper;
  118585. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  118586. exports.isTemplateElement = isTemplateElement;
  118587. exports.isTemplateLiteral = isTemplateLiteral;
  118588. exports.isYieldExpression = isYieldExpression;
  118589. exports.isAwaitExpression = isAwaitExpression;
  118590. exports.isImport = isImport;
  118591. exports.isBigIntLiteral = isBigIntLiteral;
  118592. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  118593. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  118594. exports.isOptionalCallExpression = isOptionalCallExpression;
  118595. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  118596. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  118597. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  118598. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  118599. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  118600. exports.isClassImplements = isClassImplements;
  118601. exports.isDeclareClass = isDeclareClass;
  118602. exports.isDeclareFunction = isDeclareFunction;
  118603. exports.isDeclareInterface = isDeclareInterface;
  118604. exports.isDeclareModule = isDeclareModule;
  118605. exports.isDeclareModuleExports = isDeclareModuleExports;
  118606. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  118607. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  118608. exports.isDeclareVariable = isDeclareVariable;
  118609. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  118610. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  118611. exports.isDeclaredPredicate = isDeclaredPredicate;
  118612. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  118613. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  118614. exports.isFunctionTypeParam = isFunctionTypeParam;
  118615. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  118616. exports.isInferredPredicate = isInferredPredicate;
  118617. exports.isInterfaceExtends = isInterfaceExtends;
  118618. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  118619. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  118620. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  118621. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  118622. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  118623. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  118624. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  118625. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  118626. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  118627. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  118628. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  118629. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  118630. exports.isObjectTypeProperty = isObjectTypeProperty;
  118631. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  118632. exports.isOpaqueType = isOpaqueType;
  118633. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  118634. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  118635. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  118636. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  118637. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  118638. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  118639. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  118640. exports.isTypeAlias = isTypeAlias;
  118641. exports.isTypeAnnotation = isTypeAnnotation;
  118642. exports.isTypeCastExpression = isTypeCastExpression;
  118643. exports.isTypeParameter = isTypeParameter;
  118644. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  118645. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  118646. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  118647. exports.isVariance = isVariance;
  118648. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  118649. exports.isEnumDeclaration = isEnumDeclaration;
  118650. exports.isEnumBooleanBody = isEnumBooleanBody;
  118651. exports.isEnumNumberBody = isEnumNumberBody;
  118652. exports.isEnumStringBody = isEnumStringBody;
  118653. exports.isEnumSymbolBody = isEnumSymbolBody;
  118654. exports.isEnumBooleanMember = isEnumBooleanMember;
  118655. exports.isEnumNumberMember = isEnumNumberMember;
  118656. exports.isEnumStringMember = isEnumStringMember;
  118657. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  118658. exports.isIndexedAccessType = isIndexedAccessType;
  118659. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  118660. exports.isJSXAttribute = isJSXAttribute;
  118661. exports.isJSXClosingElement = isJSXClosingElement;
  118662. exports.isJSXElement = isJSXElement2;
  118663. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  118664. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  118665. exports.isJSXSpreadChild = isJSXSpreadChild;
  118666. exports.isJSXIdentifier = isJSXIdentifier2;
  118667. exports.isJSXMemberExpression = isJSXMemberExpression;
  118668. exports.isJSXNamespacedName = isJSXNamespacedName;
  118669. exports.isJSXOpeningElement = isJSXOpeningElement;
  118670. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  118671. exports.isJSXText = isJSXText;
  118672. exports.isJSXFragment = isJSXFragment2;
  118673. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  118674. exports.isJSXClosingFragment = isJSXClosingFragment;
  118675. exports.isNoop = isNoop;
  118676. exports.isPlaceholder = isPlaceholder;
  118677. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  118678. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  118679. exports.isBindExpression = isBindExpression;
  118680. exports.isClassProperty = isClassProperty;
  118681. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  118682. exports.isPipelineBareFunction = isPipelineBareFunction;
  118683. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  118684. exports.isClassPrivateProperty = isClassPrivateProperty;
  118685. exports.isClassPrivateMethod = isClassPrivateMethod;
  118686. exports.isImportAttribute = isImportAttribute;
  118687. exports.isDecorator = isDecorator;
  118688. exports.isDoExpression = isDoExpression;
  118689. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  118690. exports.isPrivateName = isPrivateName;
  118691. exports.isRecordExpression = isRecordExpression;
  118692. exports.isTupleExpression = isTupleExpression;
  118693. exports.isDecimalLiteral = isDecimalLiteral;
  118694. exports.isStaticBlock = isStaticBlock;
  118695. exports.isModuleExpression = isModuleExpression;
  118696. exports.isTSParameterProperty = isTSParameterProperty;
  118697. exports.isTSDeclareFunction = isTSDeclareFunction;
  118698. exports.isTSDeclareMethod = isTSDeclareMethod;
  118699. exports.isTSQualifiedName = isTSQualifiedName;
  118700. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  118701. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  118702. exports.isTSPropertySignature = isTSPropertySignature;
  118703. exports.isTSMethodSignature = isTSMethodSignature;
  118704. exports.isTSIndexSignature = isTSIndexSignature;
  118705. exports.isTSAnyKeyword = isTSAnyKeyword;
  118706. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  118707. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  118708. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  118709. exports.isTSNeverKeyword = isTSNeverKeyword;
  118710. exports.isTSNullKeyword = isTSNullKeyword;
  118711. exports.isTSNumberKeyword = isTSNumberKeyword;
  118712. exports.isTSObjectKeyword = isTSObjectKeyword;
  118713. exports.isTSStringKeyword = isTSStringKeyword;
  118714. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  118715. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  118716. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  118717. exports.isTSVoidKeyword = isTSVoidKeyword;
  118718. exports.isTSThisType = isTSThisType;
  118719. exports.isTSFunctionType = isTSFunctionType;
  118720. exports.isTSConstructorType = isTSConstructorType;
  118721. exports.isTSTypeReference = isTSTypeReference;
  118722. exports.isTSTypePredicate = isTSTypePredicate;
  118723. exports.isTSTypeQuery = isTSTypeQuery;
  118724. exports.isTSTypeLiteral = isTSTypeLiteral;
  118725. exports.isTSArrayType = isTSArrayType;
  118726. exports.isTSTupleType = isTSTupleType;
  118727. exports.isTSOptionalType = isTSOptionalType;
  118728. exports.isTSRestType = isTSRestType;
  118729. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  118730. exports.isTSUnionType = isTSUnionType;
  118731. exports.isTSIntersectionType = isTSIntersectionType;
  118732. exports.isTSConditionalType = isTSConditionalType;
  118733. exports.isTSInferType = isTSInferType;
  118734. exports.isTSParenthesizedType = isTSParenthesizedType;
  118735. exports.isTSTypeOperator = isTSTypeOperator;
  118736. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  118737. exports.isTSMappedType = isTSMappedType;
  118738. exports.isTSLiteralType = isTSLiteralType;
  118739. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  118740. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  118741. exports.isTSInterfaceBody = isTSInterfaceBody;
  118742. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  118743. exports.isTSAsExpression = isTSAsExpression;
  118744. exports.isTSTypeAssertion = isTSTypeAssertion;
  118745. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  118746. exports.isTSEnumMember = isTSEnumMember;
  118747. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  118748. exports.isTSModuleBlock = isTSModuleBlock;
  118749. exports.isTSImportType = isTSImportType;
  118750. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  118751. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  118752. exports.isTSNonNullExpression = isTSNonNullExpression;
  118753. exports.isTSExportAssignment = isTSExportAssignment;
  118754. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  118755. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  118756. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  118757. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  118758. exports.isTSTypeParameter = isTSTypeParameter;
  118759. exports.isExpression = isExpression;
  118760. exports.isBinary = isBinary;
  118761. exports.isScopable = isScopable;
  118762. exports.isBlockParent = isBlockParent;
  118763. exports.isBlock = isBlock;
  118764. exports.isStatement = isStatement;
  118765. exports.isTerminatorless = isTerminatorless;
  118766. exports.isCompletionStatement = isCompletionStatement;
  118767. exports.isConditional = isConditional;
  118768. exports.isLoop = isLoop;
  118769. exports.isWhile = isWhile;
  118770. exports.isExpressionWrapper = isExpressionWrapper;
  118771. exports.isFor = isFor;
  118772. exports.isForXStatement = isForXStatement;
  118773. exports.isFunction = isFunction;
  118774. exports.isFunctionParent = isFunctionParent;
  118775. exports.isPureish = isPureish;
  118776. exports.isDeclaration = isDeclaration2;
  118777. exports.isPatternLike = isPatternLike;
  118778. exports.isLVal = isLVal;
  118779. exports.isTSEntityName = isTSEntityName;
  118780. exports.isLiteral = isLiteral;
  118781. exports.isImmutable = isImmutable;
  118782. exports.isUserWhitespacable = isUserWhitespacable;
  118783. exports.isMethod = isMethod;
  118784. exports.isObjectMember = isObjectMember;
  118785. exports.isProperty = isProperty;
  118786. exports.isUnaryLike = isUnaryLike;
  118787. exports.isPattern = isPattern;
  118788. exports.isClass = isClass;
  118789. exports.isModuleDeclaration = isModuleDeclaration;
  118790. exports.isExportDeclaration = isExportDeclaration;
  118791. exports.isModuleSpecifier = isModuleSpecifier;
  118792. exports.isFlow = isFlow;
  118793. exports.isFlowType = isFlowType;
  118794. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  118795. exports.isFlowDeclaration = isFlowDeclaration;
  118796. exports.isFlowPredicate = isFlowPredicate;
  118797. exports.isEnumBody = isEnumBody;
  118798. exports.isEnumMember = isEnumMember;
  118799. exports.isJSX = isJSX;
  118800. exports.isPrivate = isPrivate;
  118801. exports.isTSTypeElement = isTSTypeElement;
  118802. exports.isTSType = isTSType;
  118803. exports.isTSBaseType = isTSBaseType;
  118804. exports.isNumberLiteral = isNumberLiteral;
  118805. exports.isRegexLiteral = isRegexLiteral;
  118806. exports.isRestProperty = isRestProperty;
  118807. exports.isSpreadProperty = isSpreadProperty;
  118808. var _shallowEqual = require_shallowEqual6();
  118809. function isArrayExpression(node, opts) {
  118810. if (!node)
  118811. return false;
  118812. const nodeType = node.type;
  118813. if (nodeType === "ArrayExpression") {
  118814. if (typeof opts === "undefined") {
  118815. return true;
  118816. } else {
  118817. return (0, _shallowEqual.default)(node, opts);
  118818. }
  118819. }
  118820. return false;
  118821. }
  118822. function isAssignmentExpression(node, opts) {
  118823. if (!node)
  118824. return false;
  118825. const nodeType = node.type;
  118826. if (nodeType === "AssignmentExpression") {
  118827. if (typeof opts === "undefined") {
  118828. return true;
  118829. } else {
  118830. return (0, _shallowEqual.default)(node, opts);
  118831. }
  118832. }
  118833. return false;
  118834. }
  118835. function isBinaryExpression(node, opts) {
  118836. if (!node)
  118837. return false;
  118838. const nodeType = node.type;
  118839. if (nodeType === "BinaryExpression") {
  118840. if (typeof opts === "undefined") {
  118841. return true;
  118842. } else {
  118843. return (0, _shallowEqual.default)(node, opts);
  118844. }
  118845. }
  118846. return false;
  118847. }
  118848. function isInterpreterDirective(node, opts) {
  118849. if (!node)
  118850. return false;
  118851. const nodeType = node.type;
  118852. if (nodeType === "InterpreterDirective") {
  118853. if (typeof opts === "undefined") {
  118854. return true;
  118855. } else {
  118856. return (0, _shallowEqual.default)(node, opts);
  118857. }
  118858. }
  118859. return false;
  118860. }
  118861. function isDirective(node, opts) {
  118862. if (!node)
  118863. return false;
  118864. const nodeType = node.type;
  118865. if (nodeType === "Directive") {
  118866. if (typeof opts === "undefined") {
  118867. return true;
  118868. } else {
  118869. return (0, _shallowEqual.default)(node, opts);
  118870. }
  118871. }
  118872. return false;
  118873. }
  118874. function isDirectiveLiteral(node, opts) {
  118875. if (!node)
  118876. return false;
  118877. const nodeType = node.type;
  118878. if (nodeType === "DirectiveLiteral") {
  118879. if (typeof opts === "undefined") {
  118880. return true;
  118881. } else {
  118882. return (0, _shallowEqual.default)(node, opts);
  118883. }
  118884. }
  118885. return false;
  118886. }
  118887. function isBlockStatement(node, opts) {
  118888. if (!node)
  118889. return false;
  118890. const nodeType = node.type;
  118891. if (nodeType === "BlockStatement") {
  118892. if (typeof opts === "undefined") {
  118893. return true;
  118894. } else {
  118895. return (0, _shallowEqual.default)(node, opts);
  118896. }
  118897. }
  118898. return false;
  118899. }
  118900. function isBreakStatement(node, opts) {
  118901. if (!node)
  118902. return false;
  118903. const nodeType = node.type;
  118904. if (nodeType === "BreakStatement") {
  118905. if (typeof opts === "undefined") {
  118906. return true;
  118907. } else {
  118908. return (0, _shallowEqual.default)(node, opts);
  118909. }
  118910. }
  118911. return false;
  118912. }
  118913. function isCallExpression(node, opts) {
  118914. if (!node)
  118915. return false;
  118916. const nodeType = node.type;
  118917. if (nodeType === "CallExpression") {
  118918. if (typeof opts === "undefined") {
  118919. return true;
  118920. } else {
  118921. return (0, _shallowEqual.default)(node, opts);
  118922. }
  118923. }
  118924. return false;
  118925. }
  118926. function isCatchClause(node, opts) {
  118927. if (!node)
  118928. return false;
  118929. const nodeType = node.type;
  118930. if (nodeType === "CatchClause") {
  118931. if (typeof opts === "undefined") {
  118932. return true;
  118933. } else {
  118934. return (0, _shallowEqual.default)(node, opts);
  118935. }
  118936. }
  118937. return false;
  118938. }
  118939. function isConditionalExpression(node, opts) {
  118940. if (!node)
  118941. return false;
  118942. const nodeType = node.type;
  118943. if (nodeType === "ConditionalExpression") {
  118944. if (typeof opts === "undefined") {
  118945. return true;
  118946. } else {
  118947. return (0, _shallowEqual.default)(node, opts);
  118948. }
  118949. }
  118950. return false;
  118951. }
  118952. function isContinueStatement(node, opts) {
  118953. if (!node)
  118954. return false;
  118955. const nodeType = node.type;
  118956. if (nodeType === "ContinueStatement") {
  118957. if (typeof opts === "undefined") {
  118958. return true;
  118959. } else {
  118960. return (0, _shallowEqual.default)(node, opts);
  118961. }
  118962. }
  118963. return false;
  118964. }
  118965. function isDebuggerStatement(node, opts) {
  118966. if (!node)
  118967. return false;
  118968. const nodeType = node.type;
  118969. if (nodeType === "DebuggerStatement") {
  118970. if (typeof opts === "undefined") {
  118971. return true;
  118972. } else {
  118973. return (0, _shallowEqual.default)(node, opts);
  118974. }
  118975. }
  118976. return false;
  118977. }
  118978. function isDoWhileStatement(node, opts) {
  118979. if (!node)
  118980. return false;
  118981. const nodeType = node.type;
  118982. if (nodeType === "DoWhileStatement") {
  118983. if (typeof opts === "undefined") {
  118984. return true;
  118985. } else {
  118986. return (0, _shallowEqual.default)(node, opts);
  118987. }
  118988. }
  118989. return false;
  118990. }
  118991. function isEmptyStatement(node, opts) {
  118992. if (!node)
  118993. return false;
  118994. const nodeType = node.type;
  118995. if (nodeType === "EmptyStatement") {
  118996. if (typeof opts === "undefined") {
  118997. return true;
  118998. } else {
  118999. return (0, _shallowEqual.default)(node, opts);
  119000. }
  119001. }
  119002. return false;
  119003. }
  119004. function isExpressionStatement2(node, opts) {
  119005. if (!node)
  119006. return false;
  119007. const nodeType = node.type;
  119008. if (nodeType === "ExpressionStatement") {
  119009. if (typeof opts === "undefined") {
  119010. return true;
  119011. } else {
  119012. return (0, _shallowEqual.default)(node, opts);
  119013. }
  119014. }
  119015. return false;
  119016. }
  119017. function isFile(node, opts) {
  119018. if (!node)
  119019. return false;
  119020. const nodeType = node.type;
  119021. if (nodeType === "File") {
  119022. if (typeof opts === "undefined") {
  119023. return true;
  119024. } else {
  119025. return (0, _shallowEqual.default)(node, opts);
  119026. }
  119027. }
  119028. return false;
  119029. }
  119030. function isForInStatement(node, opts) {
  119031. if (!node)
  119032. return false;
  119033. const nodeType = node.type;
  119034. if (nodeType === "ForInStatement") {
  119035. if (typeof opts === "undefined") {
  119036. return true;
  119037. } else {
  119038. return (0, _shallowEqual.default)(node, opts);
  119039. }
  119040. }
  119041. return false;
  119042. }
  119043. function isForStatement(node, opts) {
  119044. if (!node)
  119045. return false;
  119046. const nodeType = node.type;
  119047. if (nodeType === "ForStatement") {
  119048. if (typeof opts === "undefined") {
  119049. return true;
  119050. } else {
  119051. return (0, _shallowEqual.default)(node, opts);
  119052. }
  119053. }
  119054. return false;
  119055. }
  119056. function isFunctionDeclaration(node, opts) {
  119057. if (!node)
  119058. return false;
  119059. const nodeType = node.type;
  119060. if (nodeType === "FunctionDeclaration") {
  119061. if (typeof opts === "undefined") {
  119062. return true;
  119063. } else {
  119064. return (0, _shallowEqual.default)(node, opts);
  119065. }
  119066. }
  119067. return false;
  119068. }
  119069. function isFunctionExpression(node, opts) {
  119070. if (!node)
  119071. return false;
  119072. const nodeType = node.type;
  119073. if (nodeType === "FunctionExpression") {
  119074. if (typeof opts === "undefined") {
  119075. return true;
  119076. } else {
  119077. return (0, _shallowEqual.default)(node, opts);
  119078. }
  119079. }
  119080. return false;
  119081. }
  119082. function isIdentifier2(node, opts) {
  119083. if (!node)
  119084. return false;
  119085. const nodeType = node.type;
  119086. if (nodeType === "Identifier") {
  119087. if (typeof opts === "undefined") {
  119088. return true;
  119089. } else {
  119090. return (0, _shallowEqual.default)(node, opts);
  119091. }
  119092. }
  119093. return false;
  119094. }
  119095. function isIfStatement(node, opts) {
  119096. if (!node)
  119097. return false;
  119098. const nodeType = node.type;
  119099. if (nodeType === "IfStatement") {
  119100. if (typeof opts === "undefined") {
  119101. return true;
  119102. } else {
  119103. return (0, _shallowEqual.default)(node, opts);
  119104. }
  119105. }
  119106. return false;
  119107. }
  119108. function isLabeledStatement(node, opts) {
  119109. if (!node)
  119110. return false;
  119111. const nodeType = node.type;
  119112. if (nodeType === "LabeledStatement") {
  119113. if (typeof opts === "undefined") {
  119114. return true;
  119115. } else {
  119116. return (0, _shallowEqual.default)(node, opts);
  119117. }
  119118. }
  119119. return false;
  119120. }
  119121. function isStringLiteral2(node, opts) {
  119122. if (!node)
  119123. return false;
  119124. const nodeType = node.type;
  119125. if (nodeType === "StringLiteral") {
  119126. if (typeof opts === "undefined") {
  119127. return true;
  119128. } else {
  119129. return (0, _shallowEqual.default)(node, opts);
  119130. }
  119131. }
  119132. return false;
  119133. }
  119134. function isNumericLiteral(node, opts) {
  119135. if (!node)
  119136. return false;
  119137. const nodeType = node.type;
  119138. if (nodeType === "NumericLiteral") {
  119139. if (typeof opts === "undefined") {
  119140. return true;
  119141. } else {
  119142. return (0, _shallowEqual.default)(node, opts);
  119143. }
  119144. }
  119145. return false;
  119146. }
  119147. function isNullLiteral(node, opts) {
  119148. if (!node)
  119149. return false;
  119150. const nodeType = node.type;
  119151. if (nodeType === "NullLiteral") {
  119152. if (typeof opts === "undefined") {
  119153. return true;
  119154. } else {
  119155. return (0, _shallowEqual.default)(node, opts);
  119156. }
  119157. }
  119158. return false;
  119159. }
  119160. function isBooleanLiteral2(node, opts) {
  119161. if (!node)
  119162. return false;
  119163. const nodeType = node.type;
  119164. if (nodeType === "BooleanLiteral") {
  119165. if (typeof opts === "undefined") {
  119166. return true;
  119167. } else {
  119168. return (0, _shallowEqual.default)(node, opts);
  119169. }
  119170. }
  119171. return false;
  119172. }
  119173. function isRegExpLiteral(node, opts) {
  119174. if (!node)
  119175. return false;
  119176. const nodeType = node.type;
  119177. if (nodeType === "RegExpLiteral") {
  119178. if (typeof opts === "undefined") {
  119179. return true;
  119180. } else {
  119181. return (0, _shallowEqual.default)(node, opts);
  119182. }
  119183. }
  119184. return false;
  119185. }
  119186. function isLogicalExpression(node, opts) {
  119187. if (!node)
  119188. return false;
  119189. const nodeType = node.type;
  119190. if (nodeType === "LogicalExpression") {
  119191. if (typeof opts === "undefined") {
  119192. return true;
  119193. } else {
  119194. return (0, _shallowEqual.default)(node, opts);
  119195. }
  119196. }
  119197. return false;
  119198. }
  119199. function isMemberExpression(node, opts) {
  119200. if (!node)
  119201. return false;
  119202. const nodeType = node.type;
  119203. if (nodeType === "MemberExpression") {
  119204. if (typeof opts === "undefined") {
  119205. return true;
  119206. } else {
  119207. return (0, _shallowEqual.default)(node, opts);
  119208. }
  119209. }
  119210. return false;
  119211. }
  119212. function isNewExpression(node, opts) {
  119213. if (!node)
  119214. return false;
  119215. const nodeType = node.type;
  119216. if (nodeType === "NewExpression") {
  119217. if (typeof opts === "undefined") {
  119218. return true;
  119219. } else {
  119220. return (0, _shallowEqual.default)(node, opts);
  119221. }
  119222. }
  119223. return false;
  119224. }
  119225. function isProgram(node, opts) {
  119226. if (!node)
  119227. return false;
  119228. const nodeType = node.type;
  119229. if (nodeType === "Program") {
  119230. if (typeof opts === "undefined") {
  119231. return true;
  119232. } else {
  119233. return (0, _shallowEqual.default)(node, opts);
  119234. }
  119235. }
  119236. return false;
  119237. }
  119238. function isObjectExpression(node, opts) {
  119239. if (!node)
  119240. return false;
  119241. const nodeType = node.type;
  119242. if (nodeType === "ObjectExpression") {
  119243. if (typeof opts === "undefined") {
  119244. return true;
  119245. } else {
  119246. return (0, _shallowEqual.default)(node, opts);
  119247. }
  119248. }
  119249. return false;
  119250. }
  119251. function isObjectMethod(node, opts) {
  119252. if (!node)
  119253. return false;
  119254. const nodeType = node.type;
  119255. if (nodeType === "ObjectMethod") {
  119256. if (typeof opts === "undefined") {
  119257. return true;
  119258. } else {
  119259. return (0, _shallowEqual.default)(node, opts);
  119260. }
  119261. }
  119262. return false;
  119263. }
  119264. function isObjectProperty(node, opts) {
  119265. if (!node)
  119266. return false;
  119267. const nodeType = node.type;
  119268. if (nodeType === "ObjectProperty") {
  119269. if (typeof opts === "undefined") {
  119270. return true;
  119271. } else {
  119272. return (0, _shallowEqual.default)(node, opts);
  119273. }
  119274. }
  119275. return false;
  119276. }
  119277. function isRestElement(node, opts) {
  119278. if (!node)
  119279. return false;
  119280. const nodeType = node.type;
  119281. if (nodeType === "RestElement") {
  119282. if (typeof opts === "undefined") {
  119283. return true;
  119284. } else {
  119285. return (0, _shallowEqual.default)(node, opts);
  119286. }
  119287. }
  119288. return false;
  119289. }
  119290. function isReturnStatement(node, opts) {
  119291. if (!node)
  119292. return false;
  119293. const nodeType = node.type;
  119294. if (nodeType === "ReturnStatement") {
  119295. if (typeof opts === "undefined") {
  119296. return true;
  119297. } else {
  119298. return (0, _shallowEqual.default)(node, opts);
  119299. }
  119300. }
  119301. return false;
  119302. }
  119303. function isSequenceExpression(node, opts) {
  119304. if (!node)
  119305. return false;
  119306. const nodeType = node.type;
  119307. if (nodeType === "SequenceExpression") {
  119308. if (typeof opts === "undefined") {
  119309. return true;
  119310. } else {
  119311. return (0, _shallowEqual.default)(node, opts);
  119312. }
  119313. }
  119314. return false;
  119315. }
  119316. function isParenthesizedExpression(node, opts) {
  119317. if (!node)
  119318. return false;
  119319. const nodeType = node.type;
  119320. if (nodeType === "ParenthesizedExpression") {
  119321. if (typeof opts === "undefined") {
  119322. return true;
  119323. } else {
  119324. return (0, _shallowEqual.default)(node, opts);
  119325. }
  119326. }
  119327. return false;
  119328. }
  119329. function isSwitchCase(node, opts) {
  119330. if (!node)
  119331. return false;
  119332. const nodeType = node.type;
  119333. if (nodeType === "SwitchCase") {
  119334. if (typeof opts === "undefined") {
  119335. return true;
  119336. } else {
  119337. return (0, _shallowEqual.default)(node, opts);
  119338. }
  119339. }
  119340. return false;
  119341. }
  119342. function isSwitchStatement(node, opts) {
  119343. if (!node)
  119344. return false;
  119345. const nodeType = node.type;
  119346. if (nodeType === "SwitchStatement") {
  119347. if (typeof opts === "undefined") {
  119348. return true;
  119349. } else {
  119350. return (0, _shallowEqual.default)(node, opts);
  119351. }
  119352. }
  119353. return false;
  119354. }
  119355. function isThisExpression(node, opts) {
  119356. if (!node)
  119357. return false;
  119358. const nodeType = node.type;
  119359. if (nodeType === "ThisExpression") {
  119360. if (typeof opts === "undefined") {
  119361. return true;
  119362. } else {
  119363. return (0, _shallowEqual.default)(node, opts);
  119364. }
  119365. }
  119366. return false;
  119367. }
  119368. function isThrowStatement(node, opts) {
  119369. if (!node)
  119370. return false;
  119371. const nodeType = node.type;
  119372. if (nodeType === "ThrowStatement") {
  119373. if (typeof opts === "undefined") {
  119374. return true;
  119375. } else {
  119376. return (0, _shallowEqual.default)(node, opts);
  119377. }
  119378. }
  119379. return false;
  119380. }
  119381. function isTryStatement(node, opts) {
  119382. if (!node)
  119383. return false;
  119384. const nodeType = node.type;
  119385. if (nodeType === "TryStatement") {
  119386. if (typeof opts === "undefined") {
  119387. return true;
  119388. } else {
  119389. return (0, _shallowEqual.default)(node, opts);
  119390. }
  119391. }
  119392. return false;
  119393. }
  119394. function isUnaryExpression(node, opts) {
  119395. if (!node)
  119396. return false;
  119397. const nodeType = node.type;
  119398. if (nodeType === "UnaryExpression") {
  119399. if (typeof opts === "undefined") {
  119400. return true;
  119401. } else {
  119402. return (0, _shallowEqual.default)(node, opts);
  119403. }
  119404. }
  119405. return false;
  119406. }
  119407. function isUpdateExpression(node, opts) {
  119408. if (!node)
  119409. return false;
  119410. const nodeType = node.type;
  119411. if (nodeType === "UpdateExpression") {
  119412. if (typeof opts === "undefined") {
  119413. return true;
  119414. } else {
  119415. return (0, _shallowEqual.default)(node, opts);
  119416. }
  119417. }
  119418. return false;
  119419. }
  119420. function isVariableDeclaration(node, opts) {
  119421. if (!node)
  119422. return false;
  119423. const nodeType = node.type;
  119424. if (nodeType === "VariableDeclaration") {
  119425. if (typeof opts === "undefined") {
  119426. return true;
  119427. } else {
  119428. return (0, _shallowEqual.default)(node, opts);
  119429. }
  119430. }
  119431. return false;
  119432. }
  119433. function isVariableDeclarator(node, opts) {
  119434. if (!node)
  119435. return false;
  119436. const nodeType = node.type;
  119437. if (nodeType === "VariableDeclarator") {
  119438. if (typeof opts === "undefined") {
  119439. return true;
  119440. } else {
  119441. return (0, _shallowEqual.default)(node, opts);
  119442. }
  119443. }
  119444. return false;
  119445. }
  119446. function isWhileStatement(node, opts) {
  119447. if (!node)
  119448. return false;
  119449. const nodeType = node.type;
  119450. if (nodeType === "WhileStatement") {
  119451. if (typeof opts === "undefined") {
  119452. return true;
  119453. } else {
  119454. return (0, _shallowEqual.default)(node, opts);
  119455. }
  119456. }
  119457. return false;
  119458. }
  119459. function isWithStatement(node, opts) {
  119460. if (!node)
  119461. return false;
  119462. const nodeType = node.type;
  119463. if (nodeType === "WithStatement") {
  119464. if (typeof opts === "undefined") {
  119465. return true;
  119466. } else {
  119467. return (0, _shallowEqual.default)(node, opts);
  119468. }
  119469. }
  119470. return false;
  119471. }
  119472. function isAssignmentPattern(node, opts) {
  119473. if (!node)
  119474. return false;
  119475. const nodeType = node.type;
  119476. if (nodeType === "AssignmentPattern") {
  119477. if (typeof opts === "undefined") {
  119478. return true;
  119479. } else {
  119480. return (0, _shallowEqual.default)(node, opts);
  119481. }
  119482. }
  119483. return false;
  119484. }
  119485. function isArrayPattern(node, opts) {
  119486. if (!node)
  119487. return false;
  119488. const nodeType = node.type;
  119489. if (nodeType === "ArrayPattern") {
  119490. if (typeof opts === "undefined") {
  119491. return true;
  119492. } else {
  119493. return (0, _shallowEqual.default)(node, opts);
  119494. }
  119495. }
  119496. return false;
  119497. }
  119498. function isArrowFunctionExpression(node, opts) {
  119499. if (!node)
  119500. return false;
  119501. const nodeType = node.type;
  119502. if (nodeType === "ArrowFunctionExpression") {
  119503. if (typeof opts === "undefined") {
  119504. return true;
  119505. } else {
  119506. return (0, _shallowEqual.default)(node, opts);
  119507. }
  119508. }
  119509. return false;
  119510. }
  119511. function isClassBody(node, opts) {
  119512. if (!node)
  119513. return false;
  119514. const nodeType = node.type;
  119515. if (nodeType === "ClassBody") {
  119516. if (typeof opts === "undefined") {
  119517. return true;
  119518. } else {
  119519. return (0, _shallowEqual.default)(node, opts);
  119520. }
  119521. }
  119522. return false;
  119523. }
  119524. function isClassExpression(node, opts) {
  119525. if (!node)
  119526. return false;
  119527. const nodeType = node.type;
  119528. if (nodeType === "ClassExpression") {
  119529. if (typeof opts === "undefined") {
  119530. return true;
  119531. } else {
  119532. return (0, _shallowEqual.default)(node, opts);
  119533. }
  119534. }
  119535. return false;
  119536. }
  119537. function isClassDeclaration(node, opts) {
  119538. if (!node)
  119539. return false;
  119540. const nodeType = node.type;
  119541. if (nodeType === "ClassDeclaration") {
  119542. if (typeof opts === "undefined") {
  119543. return true;
  119544. } else {
  119545. return (0, _shallowEqual.default)(node, opts);
  119546. }
  119547. }
  119548. return false;
  119549. }
  119550. function isExportAllDeclaration(node, opts) {
  119551. if (!node)
  119552. return false;
  119553. const nodeType = node.type;
  119554. if (nodeType === "ExportAllDeclaration") {
  119555. if (typeof opts === "undefined") {
  119556. return true;
  119557. } else {
  119558. return (0, _shallowEqual.default)(node, opts);
  119559. }
  119560. }
  119561. return false;
  119562. }
  119563. function isExportDefaultDeclaration(node, opts) {
  119564. if (!node)
  119565. return false;
  119566. const nodeType = node.type;
  119567. if (nodeType === "ExportDefaultDeclaration") {
  119568. if (typeof opts === "undefined") {
  119569. return true;
  119570. } else {
  119571. return (0, _shallowEqual.default)(node, opts);
  119572. }
  119573. }
  119574. return false;
  119575. }
  119576. function isExportNamedDeclaration(node, opts) {
  119577. if (!node)
  119578. return false;
  119579. const nodeType = node.type;
  119580. if (nodeType === "ExportNamedDeclaration") {
  119581. if (typeof opts === "undefined") {
  119582. return true;
  119583. } else {
  119584. return (0, _shallowEqual.default)(node, opts);
  119585. }
  119586. }
  119587. return false;
  119588. }
  119589. function isExportSpecifier(node, opts) {
  119590. if (!node)
  119591. return false;
  119592. const nodeType = node.type;
  119593. if (nodeType === "ExportSpecifier") {
  119594. if (typeof opts === "undefined") {
  119595. return true;
  119596. } else {
  119597. return (0, _shallowEqual.default)(node, opts);
  119598. }
  119599. }
  119600. return false;
  119601. }
  119602. function isForOfStatement(node, opts) {
  119603. if (!node)
  119604. return false;
  119605. const nodeType = node.type;
  119606. if (nodeType === "ForOfStatement") {
  119607. if (typeof opts === "undefined") {
  119608. return true;
  119609. } else {
  119610. return (0, _shallowEqual.default)(node, opts);
  119611. }
  119612. }
  119613. return false;
  119614. }
  119615. function isImportDeclaration(node, opts) {
  119616. if (!node)
  119617. return false;
  119618. const nodeType = node.type;
  119619. if (nodeType === "ImportDeclaration") {
  119620. if (typeof opts === "undefined") {
  119621. return true;
  119622. } else {
  119623. return (0, _shallowEqual.default)(node, opts);
  119624. }
  119625. }
  119626. return false;
  119627. }
  119628. function isImportDefaultSpecifier(node, opts) {
  119629. if (!node)
  119630. return false;
  119631. const nodeType = node.type;
  119632. if (nodeType === "ImportDefaultSpecifier") {
  119633. if (typeof opts === "undefined") {
  119634. return true;
  119635. } else {
  119636. return (0, _shallowEqual.default)(node, opts);
  119637. }
  119638. }
  119639. return false;
  119640. }
  119641. function isImportNamespaceSpecifier(node, opts) {
  119642. if (!node)
  119643. return false;
  119644. const nodeType = node.type;
  119645. if (nodeType === "ImportNamespaceSpecifier") {
  119646. if (typeof opts === "undefined") {
  119647. return true;
  119648. } else {
  119649. return (0, _shallowEqual.default)(node, opts);
  119650. }
  119651. }
  119652. return false;
  119653. }
  119654. function isImportSpecifier(node, opts) {
  119655. if (!node)
  119656. return false;
  119657. const nodeType = node.type;
  119658. if (nodeType === "ImportSpecifier") {
  119659. if (typeof opts === "undefined") {
  119660. return true;
  119661. } else {
  119662. return (0, _shallowEqual.default)(node, opts);
  119663. }
  119664. }
  119665. return false;
  119666. }
  119667. function isMetaProperty(node, opts) {
  119668. if (!node)
  119669. return false;
  119670. const nodeType = node.type;
  119671. if (nodeType === "MetaProperty") {
  119672. if (typeof opts === "undefined") {
  119673. return true;
  119674. } else {
  119675. return (0, _shallowEqual.default)(node, opts);
  119676. }
  119677. }
  119678. return false;
  119679. }
  119680. function isClassMethod(node, opts) {
  119681. if (!node)
  119682. return false;
  119683. const nodeType = node.type;
  119684. if (nodeType === "ClassMethod") {
  119685. if (typeof opts === "undefined") {
  119686. return true;
  119687. } else {
  119688. return (0, _shallowEqual.default)(node, opts);
  119689. }
  119690. }
  119691. return false;
  119692. }
  119693. function isObjectPattern(node, opts) {
  119694. if (!node)
  119695. return false;
  119696. const nodeType = node.type;
  119697. if (nodeType === "ObjectPattern") {
  119698. if (typeof opts === "undefined") {
  119699. return true;
  119700. } else {
  119701. return (0, _shallowEqual.default)(node, opts);
  119702. }
  119703. }
  119704. return false;
  119705. }
  119706. function isSpreadElement(node, opts) {
  119707. if (!node)
  119708. return false;
  119709. const nodeType = node.type;
  119710. if (nodeType === "SpreadElement") {
  119711. if (typeof opts === "undefined") {
  119712. return true;
  119713. } else {
  119714. return (0, _shallowEqual.default)(node, opts);
  119715. }
  119716. }
  119717. return false;
  119718. }
  119719. function isSuper(node, opts) {
  119720. if (!node)
  119721. return false;
  119722. const nodeType = node.type;
  119723. if (nodeType === "Super") {
  119724. if (typeof opts === "undefined") {
  119725. return true;
  119726. } else {
  119727. return (0, _shallowEqual.default)(node, opts);
  119728. }
  119729. }
  119730. return false;
  119731. }
  119732. function isTaggedTemplateExpression(node, opts) {
  119733. if (!node)
  119734. return false;
  119735. const nodeType = node.type;
  119736. if (nodeType === "TaggedTemplateExpression") {
  119737. if (typeof opts === "undefined") {
  119738. return true;
  119739. } else {
  119740. return (0, _shallowEqual.default)(node, opts);
  119741. }
  119742. }
  119743. return false;
  119744. }
  119745. function isTemplateElement(node, opts) {
  119746. if (!node)
  119747. return false;
  119748. const nodeType = node.type;
  119749. if (nodeType === "TemplateElement") {
  119750. if (typeof opts === "undefined") {
  119751. return true;
  119752. } else {
  119753. return (0, _shallowEqual.default)(node, opts);
  119754. }
  119755. }
  119756. return false;
  119757. }
  119758. function isTemplateLiteral(node, opts) {
  119759. if (!node)
  119760. return false;
  119761. const nodeType = node.type;
  119762. if (nodeType === "TemplateLiteral") {
  119763. if (typeof opts === "undefined") {
  119764. return true;
  119765. } else {
  119766. return (0, _shallowEqual.default)(node, opts);
  119767. }
  119768. }
  119769. return false;
  119770. }
  119771. function isYieldExpression(node, opts) {
  119772. if (!node)
  119773. return false;
  119774. const nodeType = node.type;
  119775. if (nodeType === "YieldExpression") {
  119776. if (typeof opts === "undefined") {
  119777. return true;
  119778. } else {
  119779. return (0, _shallowEqual.default)(node, opts);
  119780. }
  119781. }
  119782. return false;
  119783. }
  119784. function isAwaitExpression(node, opts) {
  119785. if (!node)
  119786. return false;
  119787. const nodeType = node.type;
  119788. if (nodeType === "AwaitExpression") {
  119789. if (typeof opts === "undefined") {
  119790. return true;
  119791. } else {
  119792. return (0, _shallowEqual.default)(node, opts);
  119793. }
  119794. }
  119795. return false;
  119796. }
  119797. function isImport(node, opts) {
  119798. if (!node)
  119799. return false;
  119800. const nodeType = node.type;
  119801. if (nodeType === "Import") {
  119802. if (typeof opts === "undefined") {
  119803. return true;
  119804. } else {
  119805. return (0, _shallowEqual.default)(node, opts);
  119806. }
  119807. }
  119808. return false;
  119809. }
  119810. function isBigIntLiteral(node, opts) {
  119811. if (!node)
  119812. return false;
  119813. const nodeType = node.type;
  119814. if (nodeType === "BigIntLiteral") {
  119815. if (typeof opts === "undefined") {
  119816. return true;
  119817. } else {
  119818. return (0, _shallowEqual.default)(node, opts);
  119819. }
  119820. }
  119821. return false;
  119822. }
  119823. function isExportNamespaceSpecifier(node, opts) {
  119824. if (!node)
  119825. return false;
  119826. const nodeType = node.type;
  119827. if (nodeType === "ExportNamespaceSpecifier") {
  119828. if (typeof opts === "undefined") {
  119829. return true;
  119830. } else {
  119831. return (0, _shallowEqual.default)(node, opts);
  119832. }
  119833. }
  119834. return false;
  119835. }
  119836. function isOptionalMemberExpression(node, opts) {
  119837. if (!node)
  119838. return false;
  119839. const nodeType = node.type;
  119840. if (nodeType === "OptionalMemberExpression") {
  119841. if (typeof opts === "undefined") {
  119842. return true;
  119843. } else {
  119844. return (0, _shallowEqual.default)(node, opts);
  119845. }
  119846. }
  119847. return false;
  119848. }
  119849. function isOptionalCallExpression(node, opts) {
  119850. if (!node)
  119851. return false;
  119852. const nodeType = node.type;
  119853. if (nodeType === "OptionalCallExpression") {
  119854. if (typeof opts === "undefined") {
  119855. return true;
  119856. } else {
  119857. return (0, _shallowEqual.default)(node, opts);
  119858. }
  119859. }
  119860. return false;
  119861. }
  119862. function isAnyTypeAnnotation(node, opts) {
  119863. if (!node)
  119864. return false;
  119865. const nodeType = node.type;
  119866. if (nodeType === "AnyTypeAnnotation") {
  119867. if (typeof opts === "undefined") {
  119868. return true;
  119869. } else {
  119870. return (0, _shallowEqual.default)(node, opts);
  119871. }
  119872. }
  119873. return false;
  119874. }
  119875. function isArrayTypeAnnotation(node, opts) {
  119876. if (!node)
  119877. return false;
  119878. const nodeType = node.type;
  119879. if (nodeType === "ArrayTypeAnnotation") {
  119880. if (typeof opts === "undefined") {
  119881. return true;
  119882. } else {
  119883. return (0, _shallowEqual.default)(node, opts);
  119884. }
  119885. }
  119886. return false;
  119887. }
  119888. function isBooleanTypeAnnotation(node, opts) {
  119889. if (!node)
  119890. return false;
  119891. const nodeType = node.type;
  119892. if (nodeType === "BooleanTypeAnnotation") {
  119893. if (typeof opts === "undefined") {
  119894. return true;
  119895. } else {
  119896. return (0, _shallowEqual.default)(node, opts);
  119897. }
  119898. }
  119899. return false;
  119900. }
  119901. function isBooleanLiteralTypeAnnotation(node, opts) {
  119902. if (!node)
  119903. return false;
  119904. const nodeType = node.type;
  119905. if (nodeType === "BooleanLiteralTypeAnnotation") {
  119906. if (typeof opts === "undefined") {
  119907. return true;
  119908. } else {
  119909. return (0, _shallowEqual.default)(node, opts);
  119910. }
  119911. }
  119912. return false;
  119913. }
  119914. function isNullLiteralTypeAnnotation(node, opts) {
  119915. if (!node)
  119916. return false;
  119917. const nodeType = node.type;
  119918. if (nodeType === "NullLiteralTypeAnnotation") {
  119919. if (typeof opts === "undefined") {
  119920. return true;
  119921. } else {
  119922. return (0, _shallowEqual.default)(node, opts);
  119923. }
  119924. }
  119925. return false;
  119926. }
  119927. function isClassImplements(node, opts) {
  119928. if (!node)
  119929. return false;
  119930. const nodeType = node.type;
  119931. if (nodeType === "ClassImplements") {
  119932. if (typeof opts === "undefined") {
  119933. return true;
  119934. } else {
  119935. return (0, _shallowEqual.default)(node, opts);
  119936. }
  119937. }
  119938. return false;
  119939. }
  119940. function isDeclareClass(node, opts) {
  119941. if (!node)
  119942. return false;
  119943. const nodeType = node.type;
  119944. if (nodeType === "DeclareClass") {
  119945. if (typeof opts === "undefined") {
  119946. return true;
  119947. } else {
  119948. return (0, _shallowEqual.default)(node, opts);
  119949. }
  119950. }
  119951. return false;
  119952. }
  119953. function isDeclareFunction(node, opts) {
  119954. if (!node)
  119955. return false;
  119956. const nodeType = node.type;
  119957. if (nodeType === "DeclareFunction") {
  119958. if (typeof opts === "undefined") {
  119959. return true;
  119960. } else {
  119961. return (0, _shallowEqual.default)(node, opts);
  119962. }
  119963. }
  119964. return false;
  119965. }
  119966. function isDeclareInterface(node, opts) {
  119967. if (!node)
  119968. return false;
  119969. const nodeType = node.type;
  119970. if (nodeType === "DeclareInterface") {
  119971. if (typeof opts === "undefined") {
  119972. return true;
  119973. } else {
  119974. return (0, _shallowEqual.default)(node, opts);
  119975. }
  119976. }
  119977. return false;
  119978. }
  119979. function isDeclareModule(node, opts) {
  119980. if (!node)
  119981. return false;
  119982. const nodeType = node.type;
  119983. if (nodeType === "DeclareModule") {
  119984. if (typeof opts === "undefined") {
  119985. return true;
  119986. } else {
  119987. return (0, _shallowEqual.default)(node, opts);
  119988. }
  119989. }
  119990. return false;
  119991. }
  119992. function isDeclareModuleExports(node, opts) {
  119993. if (!node)
  119994. return false;
  119995. const nodeType = node.type;
  119996. if (nodeType === "DeclareModuleExports") {
  119997. if (typeof opts === "undefined") {
  119998. return true;
  119999. } else {
  120000. return (0, _shallowEqual.default)(node, opts);
  120001. }
  120002. }
  120003. return false;
  120004. }
  120005. function isDeclareTypeAlias(node, opts) {
  120006. if (!node)
  120007. return false;
  120008. const nodeType = node.type;
  120009. if (nodeType === "DeclareTypeAlias") {
  120010. if (typeof opts === "undefined") {
  120011. return true;
  120012. } else {
  120013. return (0, _shallowEqual.default)(node, opts);
  120014. }
  120015. }
  120016. return false;
  120017. }
  120018. function isDeclareOpaqueType(node, opts) {
  120019. if (!node)
  120020. return false;
  120021. const nodeType = node.type;
  120022. if (nodeType === "DeclareOpaqueType") {
  120023. if (typeof opts === "undefined") {
  120024. return true;
  120025. } else {
  120026. return (0, _shallowEqual.default)(node, opts);
  120027. }
  120028. }
  120029. return false;
  120030. }
  120031. function isDeclareVariable(node, opts) {
  120032. if (!node)
  120033. return false;
  120034. const nodeType = node.type;
  120035. if (nodeType === "DeclareVariable") {
  120036. if (typeof opts === "undefined") {
  120037. return true;
  120038. } else {
  120039. return (0, _shallowEqual.default)(node, opts);
  120040. }
  120041. }
  120042. return false;
  120043. }
  120044. function isDeclareExportDeclaration(node, opts) {
  120045. if (!node)
  120046. return false;
  120047. const nodeType = node.type;
  120048. if (nodeType === "DeclareExportDeclaration") {
  120049. if (typeof opts === "undefined") {
  120050. return true;
  120051. } else {
  120052. return (0, _shallowEqual.default)(node, opts);
  120053. }
  120054. }
  120055. return false;
  120056. }
  120057. function isDeclareExportAllDeclaration(node, opts) {
  120058. if (!node)
  120059. return false;
  120060. const nodeType = node.type;
  120061. if (nodeType === "DeclareExportAllDeclaration") {
  120062. if (typeof opts === "undefined") {
  120063. return true;
  120064. } else {
  120065. return (0, _shallowEqual.default)(node, opts);
  120066. }
  120067. }
  120068. return false;
  120069. }
  120070. function isDeclaredPredicate(node, opts) {
  120071. if (!node)
  120072. return false;
  120073. const nodeType = node.type;
  120074. if (nodeType === "DeclaredPredicate") {
  120075. if (typeof opts === "undefined") {
  120076. return true;
  120077. } else {
  120078. return (0, _shallowEqual.default)(node, opts);
  120079. }
  120080. }
  120081. return false;
  120082. }
  120083. function isExistsTypeAnnotation(node, opts) {
  120084. if (!node)
  120085. return false;
  120086. const nodeType = node.type;
  120087. if (nodeType === "ExistsTypeAnnotation") {
  120088. if (typeof opts === "undefined") {
  120089. return true;
  120090. } else {
  120091. return (0, _shallowEqual.default)(node, opts);
  120092. }
  120093. }
  120094. return false;
  120095. }
  120096. function isFunctionTypeAnnotation(node, opts) {
  120097. if (!node)
  120098. return false;
  120099. const nodeType = node.type;
  120100. if (nodeType === "FunctionTypeAnnotation") {
  120101. if (typeof opts === "undefined") {
  120102. return true;
  120103. } else {
  120104. return (0, _shallowEqual.default)(node, opts);
  120105. }
  120106. }
  120107. return false;
  120108. }
  120109. function isFunctionTypeParam(node, opts) {
  120110. if (!node)
  120111. return false;
  120112. const nodeType = node.type;
  120113. if (nodeType === "FunctionTypeParam") {
  120114. if (typeof opts === "undefined") {
  120115. return true;
  120116. } else {
  120117. return (0, _shallowEqual.default)(node, opts);
  120118. }
  120119. }
  120120. return false;
  120121. }
  120122. function isGenericTypeAnnotation(node, opts) {
  120123. if (!node)
  120124. return false;
  120125. const nodeType = node.type;
  120126. if (nodeType === "GenericTypeAnnotation") {
  120127. if (typeof opts === "undefined") {
  120128. return true;
  120129. } else {
  120130. return (0, _shallowEqual.default)(node, opts);
  120131. }
  120132. }
  120133. return false;
  120134. }
  120135. function isInferredPredicate(node, opts) {
  120136. if (!node)
  120137. return false;
  120138. const nodeType = node.type;
  120139. if (nodeType === "InferredPredicate") {
  120140. if (typeof opts === "undefined") {
  120141. return true;
  120142. } else {
  120143. return (0, _shallowEqual.default)(node, opts);
  120144. }
  120145. }
  120146. return false;
  120147. }
  120148. function isInterfaceExtends(node, opts) {
  120149. if (!node)
  120150. return false;
  120151. const nodeType = node.type;
  120152. if (nodeType === "InterfaceExtends") {
  120153. if (typeof opts === "undefined") {
  120154. return true;
  120155. } else {
  120156. return (0, _shallowEqual.default)(node, opts);
  120157. }
  120158. }
  120159. return false;
  120160. }
  120161. function isInterfaceDeclaration(node, opts) {
  120162. if (!node)
  120163. return false;
  120164. const nodeType = node.type;
  120165. if (nodeType === "InterfaceDeclaration") {
  120166. if (typeof opts === "undefined") {
  120167. return true;
  120168. } else {
  120169. return (0, _shallowEqual.default)(node, opts);
  120170. }
  120171. }
  120172. return false;
  120173. }
  120174. function isInterfaceTypeAnnotation(node, opts) {
  120175. if (!node)
  120176. return false;
  120177. const nodeType = node.type;
  120178. if (nodeType === "InterfaceTypeAnnotation") {
  120179. if (typeof opts === "undefined") {
  120180. return true;
  120181. } else {
  120182. return (0, _shallowEqual.default)(node, opts);
  120183. }
  120184. }
  120185. return false;
  120186. }
  120187. function isIntersectionTypeAnnotation(node, opts) {
  120188. if (!node)
  120189. return false;
  120190. const nodeType = node.type;
  120191. if (nodeType === "IntersectionTypeAnnotation") {
  120192. if (typeof opts === "undefined") {
  120193. return true;
  120194. } else {
  120195. return (0, _shallowEqual.default)(node, opts);
  120196. }
  120197. }
  120198. return false;
  120199. }
  120200. function isMixedTypeAnnotation(node, opts) {
  120201. if (!node)
  120202. return false;
  120203. const nodeType = node.type;
  120204. if (nodeType === "MixedTypeAnnotation") {
  120205. if (typeof opts === "undefined") {
  120206. return true;
  120207. } else {
  120208. return (0, _shallowEqual.default)(node, opts);
  120209. }
  120210. }
  120211. return false;
  120212. }
  120213. function isEmptyTypeAnnotation(node, opts) {
  120214. if (!node)
  120215. return false;
  120216. const nodeType = node.type;
  120217. if (nodeType === "EmptyTypeAnnotation") {
  120218. if (typeof opts === "undefined") {
  120219. return true;
  120220. } else {
  120221. return (0, _shallowEqual.default)(node, opts);
  120222. }
  120223. }
  120224. return false;
  120225. }
  120226. function isNullableTypeAnnotation(node, opts) {
  120227. if (!node)
  120228. return false;
  120229. const nodeType = node.type;
  120230. if (nodeType === "NullableTypeAnnotation") {
  120231. if (typeof opts === "undefined") {
  120232. return true;
  120233. } else {
  120234. return (0, _shallowEqual.default)(node, opts);
  120235. }
  120236. }
  120237. return false;
  120238. }
  120239. function isNumberLiteralTypeAnnotation(node, opts) {
  120240. if (!node)
  120241. return false;
  120242. const nodeType = node.type;
  120243. if (nodeType === "NumberLiteralTypeAnnotation") {
  120244. if (typeof opts === "undefined") {
  120245. return true;
  120246. } else {
  120247. return (0, _shallowEqual.default)(node, opts);
  120248. }
  120249. }
  120250. return false;
  120251. }
  120252. function isNumberTypeAnnotation(node, opts) {
  120253. if (!node)
  120254. return false;
  120255. const nodeType = node.type;
  120256. if (nodeType === "NumberTypeAnnotation") {
  120257. if (typeof opts === "undefined") {
  120258. return true;
  120259. } else {
  120260. return (0, _shallowEqual.default)(node, opts);
  120261. }
  120262. }
  120263. return false;
  120264. }
  120265. function isObjectTypeAnnotation(node, opts) {
  120266. if (!node)
  120267. return false;
  120268. const nodeType = node.type;
  120269. if (nodeType === "ObjectTypeAnnotation") {
  120270. if (typeof opts === "undefined") {
  120271. return true;
  120272. } else {
  120273. return (0, _shallowEqual.default)(node, opts);
  120274. }
  120275. }
  120276. return false;
  120277. }
  120278. function isObjectTypeInternalSlot(node, opts) {
  120279. if (!node)
  120280. return false;
  120281. const nodeType = node.type;
  120282. if (nodeType === "ObjectTypeInternalSlot") {
  120283. if (typeof opts === "undefined") {
  120284. return true;
  120285. } else {
  120286. return (0, _shallowEqual.default)(node, opts);
  120287. }
  120288. }
  120289. return false;
  120290. }
  120291. function isObjectTypeCallProperty(node, opts) {
  120292. if (!node)
  120293. return false;
  120294. const nodeType = node.type;
  120295. if (nodeType === "ObjectTypeCallProperty") {
  120296. if (typeof opts === "undefined") {
  120297. return true;
  120298. } else {
  120299. return (0, _shallowEqual.default)(node, opts);
  120300. }
  120301. }
  120302. return false;
  120303. }
  120304. function isObjectTypeIndexer(node, opts) {
  120305. if (!node)
  120306. return false;
  120307. const nodeType = node.type;
  120308. if (nodeType === "ObjectTypeIndexer") {
  120309. if (typeof opts === "undefined") {
  120310. return true;
  120311. } else {
  120312. return (0, _shallowEqual.default)(node, opts);
  120313. }
  120314. }
  120315. return false;
  120316. }
  120317. function isObjectTypeProperty(node, opts) {
  120318. if (!node)
  120319. return false;
  120320. const nodeType = node.type;
  120321. if (nodeType === "ObjectTypeProperty") {
  120322. if (typeof opts === "undefined") {
  120323. return true;
  120324. } else {
  120325. return (0, _shallowEqual.default)(node, opts);
  120326. }
  120327. }
  120328. return false;
  120329. }
  120330. function isObjectTypeSpreadProperty(node, opts) {
  120331. if (!node)
  120332. return false;
  120333. const nodeType = node.type;
  120334. if (nodeType === "ObjectTypeSpreadProperty") {
  120335. if (typeof opts === "undefined") {
  120336. return true;
  120337. } else {
  120338. return (0, _shallowEqual.default)(node, opts);
  120339. }
  120340. }
  120341. return false;
  120342. }
  120343. function isOpaqueType(node, opts) {
  120344. if (!node)
  120345. return false;
  120346. const nodeType = node.type;
  120347. if (nodeType === "OpaqueType") {
  120348. if (typeof opts === "undefined") {
  120349. return true;
  120350. } else {
  120351. return (0, _shallowEqual.default)(node, opts);
  120352. }
  120353. }
  120354. return false;
  120355. }
  120356. function isQualifiedTypeIdentifier(node, opts) {
  120357. if (!node)
  120358. return false;
  120359. const nodeType = node.type;
  120360. if (nodeType === "QualifiedTypeIdentifier") {
  120361. if (typeof opts === "undefined") {
  120362. return true;
  120363. } else {
  120364. return (0, _shallowEqual.default)(node, opts);
  120365. }
  120366. }
  120367. return false;
  120368. }
  120369. function isStringLiteralTypeAnnotation(node, opts) {
  120370. if (!node)
  120371. return false;
  120372. const nodeType = node.type;
  120373. if (nodeType === "StringLiteralTypeAnnotation") {
  120374. if (typeof opts === "undefined") {
  120375. return true;
  120376. } else {
  120377. return (0, _shallowEqual.default)(node, opts);
  120378. }
  120379. }
  120380. return false;
  120381. }
  120382. function isStringTypeAnnotation(node, opts) {
  120383. if (!node)
  120384. return false;
  120385. const nodeType = node.type;
  120386. if (nodeType === "StringTypeAnnotation") {
  120387. if (typeof opts === "undefined") {
  120388. return true;
  120389. } else {
  120390. return (0, _shallowEqual.default)(node, opts);
  120391. }
  120392. }
  120393. return false;
  120394. }
  120395. function isSymbolTypeAnnotation(node, opts) {
  120396. if (!node)
  120397. return false;
  120398. const nodeType = node.type;
  120399. if (nodeType === "SymbolTypeAnnotation") {
  120400. if (typeof opts === "undefined") {
  120401. return true;
  120402. } else {
  120403. return (0, _shallowEqual.default)(node, opts);
  120404. }
  120405. }
  120406. return false;
  120407. }
  120408. function isThisTypeAnnotation(node, opts) {
  120409. if (!node)
  120410. return false;
  120411. const nodeType = node.type;
  120412. if (nodeType === "ThisTypeAnnotation") {
  120413. if (typeof opts === "undefined") {
  120414. return true;
  120415. } else {
  120416. return (0, _shallowEqual.default)(node, opts);
  120417. }
  120418. }
  120419. return false;
  120420. }
  120421. function isTupleTypeAnnotation(node, opts) {
  120422. if (!node)
  120423. return false;
  120424. const nodeType = node.type;
  120425. if (nodeType === "TupleTypeAnnotation") {
  120426. if (typeof opts === "undefined") {
  120427. return true;
  120428. } else {
  120429. return (0, _shallowEqual.default)(node, opts);
  120430. }
  120431. }
  120432. return false;
  120433. }
  120434. function isTypeofTypeAnnotation(node, opts) {
  120435. if (!node)
  120436. return false;
  120437. const nodeType = node.type;
  120438. if (nodeType === "TypeofTypeAnnotation") {
  120439. if (typeof opts === "undefined") {
  120440. return true;
  120441. } else {
  120442. return (0, _shallowEqual.default)(node, opts);
  120443. }
  120444. }
  120445. return false;
  120446. }
  120447. function isTypeAlias(node, opts) {
  120448. if (!node)
  120449. return false;
  120450. const nodeType = node.type;
  120451. if (nodeType === "TypeAlias") {
  120452. if (typeof opts === "undefined") {
  120453. return true;
  120454. } else {
  120455. return (0, _shallowEqual.default)(node, opts);
  120456. }
  120457. }
  120458. return false;
  120459. }
  120460. function isTypeAnnotation(node, opts) {
  120461. if (!node)
  120462. return false;
  120463. const nodeType = node.type;
  120464. if (nodeType === "TypeAnnotation") {
  120465. if (typeof opts === "undefined") {
  120466. return true;
  120467. } else {
  120468. return (0, _shallowEqual.default)(node, opts);
  120469. }
  120470. }
  120471. return false;
  120472. }
  120473. function isTypeCastExpression(node, opts) {
  120474. if (!node)
  120475. return false;
  120476. const nodeType = node.type;
  120477. if (nodeType === "TypeCastExpression") {
  120478. if (typeof opts === "undefined") {
  120479. return true;
  120480. } else {
  120481. return (0, _shallowEqual.default)(node, opts);
  120482. }
  120483. }
  120484. return false;
  120485. }
  120486. function isTypeParameter(node, opts) {
  120487. if (!node)
  120488. return false;
  120489. const nodeType = node.type;
  120490. if (nodeType === "TypeParameter") {
  120491. if (typeof opts === "undefined") {
  120492. return true;
  120493. } else {
  120494. return (0, _shallowEqual.default)(node, opts);
  120495. }
  120496. }
  120497. return false;
  120498. }
  120499. function isTypeParameterDeclaration(node, opts) {
  120500. if (!node)
  120501. return false;
  120502. const nodeType = node.type;
  120503. if (nodeType === "TypeParameterDeclaration") {
  120504. if (typeof opts === "undefined") {
  120505. return true;
  120506. } else {
  120507. return (0, _shallowEqual.default)(node, opts);
  120508. }
  120509. }
  120510. return false;
  120511. }
  120512. function isTypeParameterInstantiation(node, opts) {
  120513. if (!node)
  120514. return false;
  120515. const nodeType = node.type;
  120516. if (nodeType === "TypeParameterInstantiation") {
  120517. if (typeof opts === "undefined") {
  120518. return true;
  120519. } else {
  120520. return (0, _shallowEqual.default)(node, opts);
  120521. }
  120522. }
  120523. return false;
  120524. }
  120525. function isUnionTypeAnnotation(node, opts) {
  120526. if (!node)
  120527. return false;
  120528. const nodeType = node.type;
  120529. if (nodeType === "UnionTypeAnnotation") {
  120530. if (typeof opts === "undefined") {
  120531. return true;
  120532. } else {
  120533. return (0, _shallowEqual.default)(node, opts);
  120534. }
  120535. }
  120536. return false;
  120537. }
  120538. function isVariance(node, opts) {
  120539. if (!node)
  120540. return false;
  120541. const nodeType = node.type;
  120542. if (nodeType === "Variance") {
  120543. if (typeof opts === "undefined") {
  120544. return true;
  120545. } else {
  120546. return (0, _shallowEqual.default)(node, opts);
  120547. }
  120548. }
  120549. return false;
  120550. }
  120551. function isVoidTypeAnnotation(node, opts) {
  120552. if (!node)
  120553. return false;
  120554. const nodeType = node.type;
  120555. if (nodeType === "VoidTypeAnnotation") {
  120556. if (typeof opts === "undefined") {
  120557. return true;
  120558. } else {
  120559. return (0, _shallowEqual.default)(node, opts);
  120560. }
  120561. }
  120562. return false;
  120563. }
  120564. function isEnumDeclaration(node, opts) {
  120565. if (!node)
  120566. return false;
  120567. const nodeType = node.type;
  120568. if (nodeType === "EnumDeclaration") {
  120569. if (typeof opts === "undefined") {
  120570. return true;
  120571. } else {
  120572. return (0, _shallowEqual.default)(node, opts);
  120573. }
  120574. }
  120575. return false;
  120576. }
  120577. function isEnumBooleanBody(node, opts) {
  120578. if (!node)
  120579. return false;
  120580. const nodeType = node.type;
  120581. if (nodeType === "EnumBooleanBody") {
  120582. if (typeof opts === "undefined") {
  120583. return true;
  120584. } else {
  120585. return (0, _shallowEqual.default)(node, opts);
  120586. }
  120587. }
  120588. return false;
  120589. }
  120590. function isEnumNumberBody(node, opts) {
  120591. if (!node)
  120592. return false;
  120593. const nodeType = node.type;
  120594. if (nodeType === "EnumNumberBody") {
  120595. if (typeof opts === "undefined") {
  120596. return true;
  120597. } else {
  120598. return (0, _shallowEqual.default)(node, opts);
  120599. }
  120600. }
  120601. return false;
  120602. }
  120603. function isEnumStringBody(node, opts) {
  120604. if (!node)
  120605. return false;
  120606. const nodeType = node.type;
  120607. if (nodeType === "EnumStringBody") {
  120608. if (typeof opts === "undefined") {
  120609. return true;
  120610. } else {
  120611. return (0, _shallowEqual.default)(node, opts);
  120612. }
  120613. }
  120614. return false;
  120615. }
  120616. function isEnumSymbolBody(node, opts) {
  120617. if (!node)
  120618. return false;
  120619. const nodeType = node.type;
  120620. if (nodeType === "EnumSymbolBody") {
  120621. if (typeof opts === "undefined") {
  120622. return true;
  120623. } else {
  120624. return (0, _shallowEqual.default)(node, opts);
  120625. }
  120626. }
  120627. return false;
  120628. }
  120629. function isEnumBooleanMember(node, opts) {
  120630. if (!node)
  120631. return false;
  120632. const nodeType = node.type;
  120633. if (nodeType === "EnumBooleanMember") {
  120634. if (typeof opts === "undefined") {
  120635. return true;
  120636. } else {
  120637. return (0, _shallowEqual.default)(node, opts);
  120638. }
  120639. }
  120640. return false;
  120641. }
  120642. function isEnumNumberMember(node, opts) {
  120643. if (!node)
  120644. return false;
  120645. const nodeType = node.type;
  120646. if (nodeType === "EnumNumberMember") {
  120647. if (typeof opts === "undefined") {
  120648. return true;
  120649. } else {
  120650. return (0, _shallowEqual.default)(node, opts);
  120651. }
  120652. }
  120653. return false;
  120654. }
  120655. function isEnumStringMember(node, opts) {
  120656. if (!node)
  120657. return false;
  120658. const nodeType = node.type;
  120659. if (nodeType === "EnumStringMember") {
  120660. if (typeof opts === "undefined") {
  120661. return true;
  120662. } else {
  120663. return (0, _shallowEqual.default)(node, opts);
  120664. }
  120665. }
  120666. return false;
  120667. }
  120668. function isEnumDefaultedMember(node, opts) {
  120669. if (!node)
  120670. return false;
  120671. const nodeType = node.type;
  120672. if (nodeType === "EnumDefaultedMember") {
  120673. if (typeof opts === "undefined") {
  120674. return true;
  120675. } else {
  120676. return (0, _shallowEqual.default)(node, opts);
  120677. }
  120678. }
  120679. return false;
  120680. }
  120681. function isIndexedAccessType(node, opts) {
  120682. if (!node)
  120683. return false;
  120684. const nodeType = node.type;
  120685. if (nodeType === "IndexedAccessType") {
  120686. if (typeof opts === "undefined") {
  120687. return true;
  120688. } else {
  120689. return (0, _shallowEqual.default)(node, opts);
  120690. }
  120691. }
  120692. return false;
  120693. }
  120694. function isOptionalIndexedAccessType(node, opts) {
  120695. if (!node)
  120696. return false;
  120697. const nodeType = node.type;
  120698. if (nodeType === "OptionalIndexedAccessType") {
  120699. if (typeof opts === "undefined") {
  120700. return true;
  120701. } else {
  120702. return (0, _shallowEqual.default)(node, opts);
  120703. }
  120704. }
  120705. return false;
  120706. }
  120707. function isJSXAttribute(node, opts) {
  120708. if (!node)
  120709. return false;
  120710. const nodeType = node.type;
  120711. if (nodeType === "JSXAttribute") {
  120712. if (typeof opts === "undefined") {
  120713. return true;
  120714. } else {
  120715. return (0, _shallowEqual.default)(node, opts);
  120716. }
  120717. }
  120718. return false;
  120719. }
  120720. function isJSXClosingElement(node, opts) {
  120721. if (!node)
  120722. return false;
  120723. const nodeType = node.type;
  120724. if (nodeType === "JSXClosingElement") {
  120725. if (typeof opts === "undefined") {
  120726. return true;
  120727. } else {
  120728. return (0, _shallowEqual.default)(node, opts);
  120729. }
  120730. }
  120731. return false;
  120732. }
  120733. function isJSXElement2(node, opts) {
  120734. if (!node)
  120735. return false;
  120736. const nodeType = node.type;
  120737. if (nodeType === "JSXElement") {
  120738. if (typeof opts === "undefined") {
  120739. return true;
  120740. } else {
  120741. return (0, _shallowEqual.default)(node, opts);
  120742. }
  120743. }
  120744. return false;
  120745. }
  120746. function isJSXEmptyExpression(node, opts) {
  120747. if (!node)
  120748. return false;
  120749. const nodeType = node.type;
  120750. if (nodeType === "JSXEmptyExpression") {
  120751. if (typeof opts === "undefined") {
  120752. return true;
  120753. } else {
  120754. return (0, _shallowEqual.default)(node, opts);
  120755. }
  120756. }
  120757. return false;
  120758. }
  120759. function isJSXExpressionContainer2(node, opts) {
  120760. if (!node)
  120761. return false;
  120762. const nodeType = node.type;
  120763. if (nodeType === "JSXExpressionContainer") {
  120764. if (typeof opts === "undefined") {
  120765. return true;
  120766. } else {
  120767. return (0, _shallowEqual.default)(node, opts);
  120768. }
  120769. }
  120770. return false;
  120771. }
  120772. function isJSXSpreadChild(node, opts) {
  120773. if (!node)
  120774. return false;
  120775. const nodeType = node.type;
  120776. if (nodeType === "JSXSpreadChild") {
  120777. if (typeof opts === "undefined") {
  120778. return true;
  120779. } else {
  120780. return (0, _shallowEqual.default)(node, opts);
  120781. }
  120782. }
  120783. return false;
  120784. }
  120785. function isJSXIdentifier2(node, opts) {
  120786. if (!node)
  120787. return false;
  120788. const nodeType = node.type;
  120789. if (nodeType === "JSXIdentifier") {
  120790. if (typeof opts === "undefined") {
  120791. return true;
  120792. } else {
  120793. return (0, _shallowEqual.default)(node, opts);
  120794. }
  120795. }
  120796. return false;
  120797. }
  120798. function isJSXMemberExpression(node, opts) {
  120799. if (!node)
  120800. return false;
  120801. const nodeType = node.type;
  120802. if (nodeType === "JSXMemberExpression") {
  120803. if (typeof opts === "undefined") {
  120804. return true;
  120805. } else {
  120806. return (0, _shallowEqual.default)(node, opts);
  120807. }
  120808. }
  120809. return false;
  120810. }
  120811. function isJSXNamespacedName(node, opts) {
  120812. if (!node)
  120813. return false;
  120814. const nodeType = node.type;
  120815. if (nodeType === "JSXNamespacedName") {
  120816. if (typeof opts === "undefined") {
  120817. return true;
  120818. } else {
  120819. return (0, _shallowEqual.default)(node, opts);
  120820. }
  120821. }
  120822. return false;
  120823. }
  120824. function isJSXOpeningElement(node, opts) {
  120825. if (!node)
  120826. return false;
  120827. const nodeType = node.type;
  120828. if (nodeType === "JSXOpeningElement") {
  120829. if (typeof opts === "undefined") {
  120830. return true;
  120831. } else {
  120832. return (0, _shallowEqual.default)(node, opts);
  120833. }
  120834. }
  120835. return false;
  120836. }
  120837. function isJSXSpreadAttribute(node, opts) {
  120838. if (!node)
  120839. return false;
  120840. const nodeType = node.type;
  120841. if (nodeType === "JSXSpreadAttribute") {
  120842. if (typeof opts === "undefined") {
  120843. return true;
  120844. } else {
  120845. return (0, _shallowEqual.default)(node, opts);
  120846. }
  120847. }
  120848. return false;
  120849. }
  120850. function isJSXText(node, opts) {
  120851. if (!node)
  120852. return false;
  120853. const nodeType = node.type;
  120854. if (nodeType === "JSXText") {
  120855. if (typeof opts === "undefined") {
  120856. return true;
  120857. } else {
  120858. return (0, _shallowEqual.default)(node, opts);
  120859. }
  120860. }
  120861. return false;
  120862. }
  120863. function isJSXFragment2(node, opts) {
  120864. if (!node)
  120865. return false;
  120866. const nodeType = node.type;
  120867. if (nodeType === "JSXFragment") {
  120868. if (typeof opts === "undefined") {
  120869. return true;
  120870. } else {
  120871. return (0, _shallowEqual.default)(node, opts);
  120872. }
  120873. }
  120874. return false;
  120875. }
  120876. function isJSXOpeningFragment(node, opts) {
  120877. if (!node)
  120878. return false;
  120879. const nodeType = node.type;
  120880. if (nodeType === "JSXOpeningFragment") {
  120881. if (typeof opts === "undefined") {
  120882. return true;
  120883. } else {
  120884. return (0, _shallowEqual.default)(node, opts);
  120885. }
  120886. }
  120887. return false;
  120888. }
  120889. function isJSXClosingFragment(node, opts) {
  120890. if (!node)
  120891. return false;
  120892. const nodeType = node.type;
  120893. if (nodeType === "JSXClosingFragment") {
  120894. if (typeof opts === "undefined") {
  120895. return true;
  120896. } else {
  120897. return (0, _shallowEqual.default)(node, opts);
  120898. }
  120899. }
  120900. return false;
  120901. }
  120902. function isNoop(node, opts) {
  120903. if (!node)
  120904. return false;
  120905. const nodeType = node.type;
  120906. if (nodeType === "Noop") {
  120907. if (typeof opts === "undefined") {
  120908. return true;
  120909. } else {
  120910. return (0, _shallowEqual.default)(node, opts);
  120911. }
  120912. }
  120913. return false;
  120914. }
  120915. function isPlaceholder(node, opts) {
  120916. if (!node)
  120917. return false;
  120918. const nodeType = node.type;
  120919. if (nodeType === "Placeholder") {
  120920. if (typeof opts === "undefined") {
  120921. return true;
  120922. } else {
  120923. return (0, _shallowEqual.default)(node, opts);
  120924. }
  120925. }
  120926. return false;
  120927. }
  120928. function isV8IntrinsicIdentifier(node, opts) {
  120929. if (!node)
  120930. return false;
  120931. const nodeType = node.type;
  120932. if (nodeType === "V8IntrinsicIdentifier") {
  120933. if (typeof opts === "undefined") {
  120934. return true;
  120935. } else {
  120936. return (0, _shallowEqual.default)(node, opts);
  120937. }
  120938. }
  120939. return false;
  120940. }
  120941. function isArgumentPlaceholder(node, opts) {
  120942. if (!node)
  120943. return false;
  120944. const nodeType = node.type;
  120945. if (nodeType === "ArgumentPlaceholder") {
  120946. if (typeof opts === "undefined") {
  120947. return true;
  120948. } else {
  120949. return (0, _shallowEqual.default)(node, opts);
  120950. }
  120951. }
  120952. return false;
  120953. }
  120954. function isBindExpression(node, opts) {
  120955. if (!node)
  120956. return false;
  120957. const nodeType = node.type;
  120958. if (nodeType === "BindExpression") {
  120959. if (typeof opts === "undefined") {
  120960. return true;
  120961. } else {
  120962. return (0, _shallowEqual.default)(node, opts);
  120963. }
  120964. }
  120965. return false;
  120966. }
  120967. function isClassProperty(node, opts) {
  120968. if (!node)
  120969. return false;
  120970. const nodeType = node.type;
  120971. if (nodeType === "ClassProperty") {
  120972. if (typeof opts === "undefined") {
  120973. return true;
  120974. } else {
  120975. return (0, _shallowEqual.default)(node, opts);
  120976. }
  120977. }
  120978. return false;
  120979. }
  120980. function isPipelineTopicExpression(node, opts) {
  120981. if (!node)
  120982. return false;
  120983. const nodeType = node.type;
  120984. if (nodeType === "PipelineTopicExpression") {
  120985. if (typeof opts === "undefined") {
  120986. return true;
  120987. } else {
  120988. return (0, _shallowEqual.default)(node, opts);
  120989. }
  120990. }
  120991. return false;
  120992. }
  120993. function isPipelineBareFunction(node, opts) {
  120994. if (!node)
  120995. return false;
  120996. const nodeType = node.type;
  120997. if (nodeType === "PipelineBareFunction") {
  120998. if (typeof opts === "undefined") {
  120999. return true;
  121000. } else {
  121001. return (0, _shallowEqual.default)(node, opts);
  121002. }
  121003. }
  121004. return false;
  121005. }
  121006. function isPipelinePrimaryTopicReference(node, opts) {
  121007. if (!node)
  121008. return false;
  121009. const nodeType = node.type;
  121010. if (nodeType === "PipelinePrimaryTopicReference") {
  121011. if (typeof opts === "undefined") {
  121012. return true;
  121013. } else {
  121014. return (0, _shallowEqual.default)(node, opts);
  121015. }
  121016. }
  121017. return false;
  121018. }
  121019. function isClassPrivateProperty(node, opts) {
  121020. if (!node)
  121021. return false;
  121022. const nodeType = node.type;
  121023. if (nodeType === "ClassPrivateProperty") {
  121024. if (typeof opts === "undefined") {
  121025. return true;
  121026. } else {
  121027. return (0, _shallowEqual.default)(node, opts);
  121028. }
  121029. }
  121030. return false;
  121031. }
  121032. function isClassPrivateMethod(node, opts) {
  121033. if (!node)
  121034. return false;
  121035. const nodeType = node.type;
  121036. if (nodeType === "ClassPrivateMethod") {
  121037. if (typeof opts === "undefined") {
  121038. return true;
  121039. } else {
  121040. return (0, _shallowEqual.default)(node, opts);
  121041. }
  121042. }
  121043. return false;
  121044. }
  121045. function isImportAttribute(node, opts) {
  121046. if (!node)
  121047. return false;
  121048. const nodeType = node.type;
  121049. if (nodeType === "ImportAttribute") {
  121050. if (typeof opts === "undefined") {
  121051. return true;
  121052. } else {
  121053. return (0, _shallowEqual.default)(node, opts);
  121054. }
  121055. }
  121056. return false;
  121057. }
  121058. function isDecorator(node, opts) {
  121059. if (!node)
  121060. return false;
  121061. const nodeType = node.type;
  121062. if (nodeType === "Decorator") {
  121063. if (typeof opts === "undefined") {
  121064. return true;
  121065. } else {
  121066. return (0, _shallowEqual.default)(node, opts);
  121067. }
  121068. }
  121069. return false;
  121070. }
  121071. function isDoExpression(node, opts) {
  121072. if (!node)
  121073. return false;
  121074. const nodeType = node.type;
  121075. if (nodeType === "DoExpression") {
  121076. if (typeof opts === "undefined") {
  121077. return true;
  121078. } else {
  121079. return (0, _shallowEqual.default)(node, opts);
  121080. }
  121081. }
  121082. return false;
  121083. }
  121084. function isExportDefaultSpecifier(node, opts) {
  121085. if (!node)
  121086. return false;
  121087. const nodeType = node.type;
  121088. if (nodeType === "ExportDefaultSpecifier") {
  121089. if (typeof opts === "undefined") {
  121090. return true;
  121091. } else {
  121092. return (0, _shallowEqual.default)(node, opts);
  121093. }
  121094. }
  121095. return false;
  121096. }
  121097. function isPrivateName(node, opts) {
  121098. if (!node)
  121099. return false;
  121100. const nodeType = node.type;
  121101. if (nodeType === "PrivateName") {
  121102. if (typeof opts === "undefined") {
  121103. return true;
  121104. } else {
  121105. return (0, _shallowEqual.default)(node, opts);
  121106. }
  121107. }
  121108. return false;
  121109. }
  121110. function isRecordExpression(node, opts) {
  121111. if (!node)
  121112. return false;
  121113. const nodeType = node.type;
  121114. if (nodeType === "RecordExpression") {
  121115. if (typeof opts === "undefined") {
  121116. return true;
  121117. } else {
  121118. return (0, _shallowEqual.default)(node, opts);
  121119. }
  121120. }
  121121. return false;
  121122. }
  121123. function isTupleExpression(node, opts) {
  121124. if (!node)
  121125. return false;
  121126. const nodeType = node.type;
  121127. if (nodeType === "TupleExpression") {
  121128. if (typeof opts === "undefined") {
  121129. return true;
  121130. } else {
  121131. return (0, _shallowEqual.default)(node, opts);
  121132. }
  121133. }
  121134. return false;
  121135. }
  121136. function isDecimalLiteral(node, opts) {
  121137. if (!node)
  121138. return false;
  121139. const nodeType = node.type;
  121140. if (nodeType === "DecimalLiteral") {
  121141. if (typeof opts === "undefined") {
  121142. return true;
  121143. } else {
  121144. return (0, _shallowEqual.default)(node, opts);
  121145. }
  121146. }
  121147. return false;
  121148. }
  121149. function isStaticBlock(node, opts) {
  121150. if (!node)
  121151. return false;
  121152. const nodeType = node.type;
  121153. if (nodeType === "StaticBlock") {
  121154. if (typeof opts === "undefined") {
  121155. return true;
  121156. } else {
  121157. return (0, _shallowEqual.default)(node, opts);
  121158. }
  121159. }
  121160. return false;
  121161. }
  121162. function isModuleExpression(node, opts) {
  121163. if (!node)
  121164. return false;
  121165. const nodeType = node.type;
  121166. if (nodeType === "ModuleExpression") {
  121167. if (typeof opts === "undefined") {
  121168. return true;
  121169. } else {
  121170. return (0, _shallowEqual.default)(node, opts);
  121171. }
  121172. }
  121173. return false;
  121174. }
  121175. function isTSParameterProperty(node, opts) {
  121176. if (!node)
  121177. return false;
  121178. const nodeType = node.type;
  121179. if (nodeType === "TSParameterProperty") {
  121180. if (typeof opts === "undefined") {
  121181. return true;
  121182. } else {
  121183. return (0, _shallowEqual.default)(node, opts);
  121184. }
  121185. }
  121186. return false;
  121187. }
  121188. function isTSDeclareFunction(node, opts) {
  121189. if (!node)
  121190. return false;
  121191. const nodeType = node.type;
  121192. if (nodeType === "TSDeclareFunction") {
  121193. if (typeof opts === "undefined") {
  121194. return true;
  121195. } else {
  121196. return (0, _shallowEqual.default)(node, opts);
  121197. }
  121198. }
  121199. return false;
  121200. }
  121201. function isTSDeclareMethod(node, opts) {
  121202. if (!node)
  121203. return false;
  121204. const nodeType = node.type;
  121205. if (nodeType === "TSDeclareMethod") {
  121206. if (typeof opts === "undefined") {
  121207. return true;
  121208. } else {
  121209. return (0, _shallowEqual.default)(node, opts);
  121210. }
  121211. }
  121212. return false;
  121213. }
  121214. function isTSQualifiedName(node, opts) {
  121215. if (!node)
  121216. return false;
  121217. const nodeType = node.type;
  121218. if (nodeType === "TSQualifiedName") {
  121219. if (typeof opts === "undefined") {
  121220. return true;
  121221. } else {
  121222. return (0, _shallowEqual.default)(node, opts);
  121223. }
  121224. }
  121225. return false;
  121226. }
  121227. function isTSCallSignatureDeclaration(node, opts) {
  121228. if (!node)
  121229. return false;
  121230. const nodeType = node.type;
  121231. if (nodeType === "TSCallSignatureDeclaration") {
  121232. if (typeof opts === "undefined") {
  121233. return true;
  121234. } else {
  121235. return (0, _shallowEqual.default)(node, opts);
  121236. }
  121237. }
  121238. return false;
  121239. }
  121240. function isTSConstructSignatureDeclaration(node, opts) {
  121241. if (!node)
  121242. return false;
  121243. const nodeType = node.type;
  121244. if (nodeType === "TSConstructSignatureDeclaration") {
  121245. if (typeof opts === "undefined") {
  121246. return true;
  121247. } else {
  121248. return (0, _shallowEqual.default)(node, opts);
  121249. }
  121250. }
  121251. return false;
  121252. }
  121253. function isTSPropertySignature(node, opts) {
  121254. if (!node)
  121255. return false;
  121256. const nodeType = node.type;
  121257. if (nodeType === "TSPropertySignature") {
  121258. if (typeof opts === "undefined") {
  121259. return true;
  121260. } else {
  121261. return (0, _shallowEqual.default)(node, opts);
  121262. }
  121263. }
  121264. return false;
  121265. }
  121266. function isTSMethodSignature(node, opts) {
  121267. if (!node)
  121268. return false;
  121269. const nodeType = node.type;
  121270. if (nodeType === "TSMethodSignature") {
  121271. if (typeof opts === "undefined") {
  121272. return true;
  121273. } else {
  121274. return (0, _shallowEqual.default)(node, opts);
  121275. }
  121276. }
  121277. return false;
  121278. }
  121279. function isTSIndexSignature(node, opts) {
  121280. if (!node)
  121281. return false;
  121282. const nodeType = node.type;
  121283. if (nodeType === "TSIndexSignature") {
  121284. if (typeof opts === "undefined") {
  121285. return true;
  121286. } else {
  121287. return (0, _shallowEqual.default)(node, opts);
  121288. }
  121289. }
  121290. return false;
  121291. }
  121292. function isTSAnyKeyword(node, opts) {
  121293. if (!node)
  121294. return false;
  121295. const nodeType = node.type;
  121296. if (nodeType === "TSAnyKeyword") {
  121297. if (typeof opts === "undefined") {
  121298. return true;
  121299. } else {
  121300. return (0, _shallowEqual.default)(node, opts);
  121301. }
  121302. }
  121303. return false;
  121304. }
  121305. function isTSBooleanKeyword(node, opts) {
  121306. if (!node)
  121307. return false;
  121308. const nodeType = node.type;
  121309. if (nodeType === "TSBooleanKeyword") {
  121310. if (typeof opts === "undefined") {
  121311. return true;
  121312. } else {
  121313. return (0, _shallowEqual.default)(node, opts);
  121314. }
  121315. }
  121316. return false;
  121317. }
  121318. function isTSBigIntKeyword(node, opts) {
  121319. if (!node)
  121320. return false;
  121321. const nodeType = node.type;
  121322. if (nodeType === "TSBigIntKeyword") {
  121323. if (typeof opts === "undefined") {
  121324. return true;
  121325. } else {
  121326. return (0, _shallowEqual.default)(node, opts);
  121327. }
  121328. }
  121329. return false;
  121330. }
  121331. function isTSIntrinsicKeyword(node, opts) {
  121332. if (!node)
  121333. return false;
  121334. const nodeType = node.type;
  121335. if (nodeType === "TSIntrinsicKeyword") {
  121336. if (typeof opts === "undefined") {
  121337. return true;
  121338. } else {
  121339. return (0, _shallowEqual.default)(node, opts);
  121340. }
  121341. }
  121342. return false;
  121343. }
  121344. function isTSNeverKeyword(node, opts) {
  121345. if (!node)
  121346. return false;
  121347. const nodeType = node.type;
  121348. if (nodeType === "TSNeverKeyword") {
  121349. if (typeof opts === "undefined") {
  121350. return true;
  121351. } else {
  121352. return (0, _shallowEqual.default)(node, opts);
  121353. }
  121354. }
  121355. return false;
  121356. }
  121357. function isTSNullKeyword(node, opts) {
  121358. if (!node)
  121359. return false;
  121360. const nodeType = node.type;
  121361. if (nodeType === "TSNullKeyword") {
  121362. if (typeof opts === "undefined") {
  121363. return true;
  121364. } else {
  121365. return (0, _shallowEqual.default)(node, opts);
  121366. }
  121367. }
  121368. return false;
  121369. }
  121370. function isTSNumberKeyword(node, opts) {
  121371. if (!node)
  121372. return false;
  121373. const nodeType = node.type;
  121374. if (nodeType === "TSNumberKeyword") {
  121375. if (typeof opts === "undefined") {
  121376. return true;
  121377. } else {
  121378. return (0, _shallowEqual.default)(node, opts);
  121379. }
  121380. }
  121381. return false;
  121382. }
  121383. function isTSObjectKeyword(node, opts) {
  121384. if (!node)
  121385. return false;
  121386. const nodeType = node.type;
  121387. if (nodeType === "TSObjectKeyword") {
  121388. if (typeof opts === "undefined") {
  121389. return true;
  121390. } else {
  121391. return (0, _shallowEqual.default)(node, opts);
  121392. }
  121393. }
  121394. return false;
  121395. }
  121396. function isTSStringKeyword(node, opts) {
  121397. if (!node)
  121398. return false;
  121399. const nodeType = node.type;
  121400. if (nodeType === "TSStringKeyword") {
  121401. if (typeof opts === "undefined") {
  121402. return true;
  121403. } else {
  121404. return (0, _shallowEqual.default)(node, opts);
  121405. }
  121406. }
  121407. return false;
  121408. }
  121409. function isTSSymbolKeyword(node, opts) {
  121410. if (!node)
  121411. return false;
  121412. const nodeType = node.type;
  121413. if (nodeType === "TSSymbolKeyword") {
  121414. if (typeof opts === "undefined") {
  121415. return true;
  121416. } else {
  121417. return (0, _shallowEqual.default)(node, opts);
  121418. }
  121419. }
  121420. return false;
  121421. }
  121422. function isTSUndefinedKeyword(node, opts) {
  121423. if (!node)
  121424. return false;
  121425. const nodeType = node.type;
  121426. if (nodeType === "TSUndefinedKeyword") {
  121427. if (typeof opts === "undefined") {
  121428. return true;
  121429. } else {
  121430. return (0, _shallowEqual.default)(node, opts);
  121431. }
  121432. }
  121433. return false;
  121434. }
  121435. function isTSUnknownKeyword(node, opts) {
  121436. if (!node)
  121437. return false;
  121438. const nodeType = node.type;
  121439. if (nodeType === "TSUnknownKeyword") {
  121440. if (typeof opts === "undefined") {
  121441. return true;
  121442. } else {
  121443. return (0, _shallowEqual.default)(node, opts);
  121444. }
  121445. }
  121446. return false;
  121447. }
  121448. function isTSVoidKeyword(node, opts) {
  121449. if (!node)
  121450. return false;
  121451. const nodeType = node.type;
  121452. if (nodeType === "TSVoidKeyword") {
  121453. if (typeof opts === "undefined") {
  121454. return true;
  121455. } else {
  121456. return (0, _shallowEqual.default)(node, opts);
  121457. }
  121458. }
  121459. return false;
  121460. }
  121461. function isTSThisType(node, opts) {
  121462. if (!node)
  121463. return false;
  121464. const nodeType = node.type;
  121465. if (nodeType === "TSThisType") {
  121466. if (typeof opts === "undefined") {
  121467. return true;
  121468. } else {
  121469. return (0, _shallowEqual.default)(node, opts);
  121470. }
  121471. }
  121472. return false;
  121473. }
  121474. function isTSFunctionType(node, opts) {
  121475. if (!node)
  121476. return false;
  121477. const nodeType = node.type;
  121478. if (nodeType === "TSFunctionType") {
  121479. if (typeof opts === "undefined") {
  121480. return true;
  121481. } else {
  121482. return (0, _shallowEqual.default)(node, opts);
  121483. }
  121484. }
  121485. return false;
  121486. }
  121487. function isTSConstructorType(node, opts) {
  121488. if (!node)
  121489. return false;
  121490. const nodeType = node.type;
  121491. if (nodeType === "TSConstructorType") {
  121492. if (typeof opts === "undefined") {
  121493. return true;
  121494. } else {
  121495. return (0, _shallowEqual.default)(node, opts);
  121496. }
  121497. }
  121498. return false;
  121499. }
  121500. function isTSTypeReference(node, opts) {
  121501. if (!node)
  121502. return false;
  121503. const nodeType = node.type;
  121504. if (nodeType === "TSTypeReference") {
  121505. if (typeof opts === "undefined") {
  121506. return true;
  121507. } else {
  121508. return (0, _shallowEqual.default)(node, opts);
  121509. }
  121510. }
  121511. return false;
  121512. }
  121513. function isTSTypePredicate(node, opts) {
  121514. if (!node)
  121515. return false;
  121516. const nodeType = node.type;
  121517. if (nodeType === "TSTypePredicate") {
  121518. if (typeof opts === "undefined") {
  121519. return true;
  121520. } else {
  121521. return (0, _shallowEqual.default)(node, opts);
  121522. }
  121523. }
  121524. return false;
  121525. }
  121526. function isTSTypeQuery(node, opts) {
  121527. if (!node)
  121528. return false;
  121529. const nodeType = node.type;
  121530. if (nodeType === "TSTypeQuery") {
  121531. if (typeof opts === "undefined") {
  121532. return true;
  121533. } else {
  121534. return (0, _shallowEqual.default)(node, opts);
  121535. }
  121536. }
  121537. return false;
  121538. }
  121539. function isTSTypeLiteral(node, opts) {
  121540. if (!node)
  121541. return false;
  121542. const nodeType = node.type;
  121543. if (nodeType === "TSTypeLiteral") {
  121544. if (typeof opts === "undefined") {
  121545. return true;
  121546. } else {
  121547. return (0, _shallowEqual.default)(node, opts);
  121548. }
  121549. }
  121550. return false;
  121551. }
  121552. function isTSArrayType(node, opts) {
  121553. if (!node)
  121554. return false;
  121555. const nodeType = node.type;
  121556. if (nodeType === "TSArrayType") {
  121557. if (typeof opts === "undefined") {
  121558. return true;
  121559. } else {
  121560. return (0, _shallowEqual.default)(node, opts);
  121561. }
  121562. }
  121563. return false;
  121564. }
  121565. function isTSTupleType(node, opts) {
  121566. if (!node)
  121567. return false;
  121568. const nodeType = node.type;
  121569. if (nodeType === "TSTupleType") {
  121570. if (typeof opts === "undefined") {
  121571. return true;
  121572. } else {
  121573. return (0, _shallowEqual.default)(node, opts);
  121574. }
  121575. }
  121576. return false;
  121577. }
  121578. function isTSOptionalType(node, opts) {
  121579. if (!node)
  121580. return false;
  121581. const nodeType = node.type;
  121582. if (nodeType === "TSOptionalType") {
  121583. if (typeof opts === "undefined") {
  121584. return true;
  121585. } else {
  121586. return (0, _shallowEqual.default)(node, opts);
  121587. }
  121588. }
  121589. return false;
  121590. }
  121591. function isTSRestType(node, opts) {
  121592. if (!node)
  121593. return false;
  121594. const nodeType = node.type;
  121595. if (nodeType === "TSRestType") {
  121596. if (typeof opts === "undefined") {
  121597. return true;
  121598. } else {
  121599. return (0, _shallowEqual.default)(node, opts);
  121600. }
  121601. }
  121602. return false;
  121603. }
  121604. function isTSNamedTupleMember(node, opts) {
  121605. if (!node)
  121606. return false;
  121607. const nodeType = node.type;
  121608. if (nodeType === "TSNamedTupleMember") {
  121609. if (typeof opts === "undefined") {
  121610. return true;
  121611. } else {
  121612. return (0, _shallowEqual.default)(node, opts);
  121613. }
  121614. }
  121615. return false;
  121616. }
  121617. function isTSUnionType(node, opts) {
  121618. if (!node)
  121619. return false;
  121620. const nodeType = node.type;
  121621. if (nodeType === "TSUnionType") {
  121622. if (typeof opts === "undefined") {
  121623. return true;
  121624. } else {
  121625. return (0, _shallowEqual.default)(node, opts);
  121626. }
  121627. }
  121628. return false;
  121629. }
  121630. function isTSIntersectionType(node, opts) {
  121631. if (!node)
  121632. return false;
  121633. const nodeType = node.type;
  121634. if (nodeType === "TSIntersectionType") {
  121635. if (typeof opts === "undefined") {
  121636. return true;
  121637. } else {
  121638. return (0, _shallowEqual.default)(node, opts);
  121639. }
  121640. }
  121641. return false;
  121642. }
  121643. function isTSConditionalType(node, opts) {
  121644. if (!node)
  121645. return false;
  121646. const nodeType = node.type;
  121647. if (nodeType === "TSConditionalType") {
  121648. if (typeof opts === "undefined") {
  121649. return true;
  121650. } else {
  121651. return (0, _shallowEqual.default)(node, opts);
  121652. }
  121653. }
  121654. return false;
  121655. }
  121656. function isTSInferType(node, opts) {
  121657. if (!node)
  121658. return false;
  121659. const nodeType = node.type;
  121660. if (nodeType === "TSInferType") {
  121661. if (typeof opts === "undefined") {
  121662. return true;
  121663. } else {
  121664. return (0, _shallowEqual.default)(node, opts);
  121665. }
  121666. }
  121667. return false;
  121668. }
  121669. function isTSParenthesizedType(node, opts) {
  121670. if (!node)
  121671. return false;
  121672. const nodeType = node.type;
  121673. if (nodeType === "TSParenthesizedType") {
  121674. if (typeof opts === "undefined") {
  121675. return true;
  121676. } else {
  121677. return (0, _shallowEqual.default)(node, opts);
  121678. }
  121679. }
  121680. return false;
  121681. }
  121682. function isTSTypeOperator(node, opts) {
  121683. if (!node)
  121684. return false;
  121685. const nodeType = node.type;
  121686. if (nodeType === "TSTypeOperator") {
  121687. if (typeof opts === "undefined") {
  121688. return true;
  121689. } else {
  121690. return (0, _shallowEqual.default)(node, opts);
  121691. }
  121692. }
  121693. return false;
  121694. }
  121695. function isTSIndexedAccessType(node, opts) {
  121696. if (!node)
  121697. return false;
  121698. const nodeType = node.type;
  121699. if (nodeType === "TSIndexedAccessType") {
  121700. if (typeof opts === "undefined") {
  121701. return true;
  121702. } else {
  121703. return (0, _shallowEqual.default)(node, opts);
  121704. }
  121705. }
  121706. return false;
  121707. }
  121708. function isTSMappedType(node, opts) {
  121709. if (!node)
  121710. return false;
  121711. const nodeType = node.type;
  121712. if (nodeType === "TSMappedType") {
  121713. if (typeof opts === "undefined") {
  121714. return true;
  121715. } else {
  121716. return (0, _shallowEqual.default)(node, opts);
  121717. }
  121718. }
  121719. return false;
  121720. }
  121721. function isTSLiteralType(node, opts) {
  121722. if (!node)
  121723. return false;
  121724. const nodeType = node.type;
  121725. if (nodeType === "TSLiteralType") {
  121726. if (typeof opts === "undefined") {
  121727. return true;
  121728. } else {
  121729. return (0, _shallowEqual.default)(node, opts);
  121730. }
  121731. }
  121732. return false;
  121733. }
  121734. function isTSExpressionWithTypeArguments(node, opts) {
  121735. if (!node)
  121736. return false;
  121737. const nodeType = node.type;
  121738. if (nodeType === "TSExpressionWithTypeArguments") {
  121739. if (typeof opts === "undefined") {
  121740. return true;
  121741. } else {
  121742. return (0, _shallowEqual.default)(node, opts);
  121743. }
  121744. }
  121745. return false;
  121746. }
  121747. function isTSInterfaceDeclaration(node, opts) {
  121748. if (!node)
  121749. return false;
  121750. const nodeType = node.type;
  121751. if (nodeType === "TSInterfaceDeclaration") {
  121752. if (typeof opts === "undefined") {
  121753. return true;
  121754. } else {
  121755. return (0, _shallowEqual.default)(node, opts);
  121756. }
  121757. }
  121758. return false;
  121759. }
  121760. function isTSInterfaceBody(node, opts) {
  121761. if (!node)
  121762. return false;
  121763. const nodeType = node.type;
  121764. if (nodeType === "TSInterfaceBody") {
  121765. if (typeof opts === "undefined") {
  121766. return true;
  121767. } else {
  121768. return (0, _shallowEqual.default)(node, opts);
  121769. }
  121770. }
  121771. return false;
  121772. }
  121773. function isTSTypeAliasDeclaration(node, opts) {
  121774. if (!node)
  121775. return false;
  121776. const nodeType = node.type;
  121777. if (nodeType === "TSTypeAliasDeclaration") {
  121778. if (typeof opts === "undefined") {
  121779. return true;
  121780. } else {
  121781. return (0, _shallowEqual.default)(node, opts);
  121782. }
  121783. }
  121784. return false;
  121785. }
  121786. function isTSAsExpression(node, opts) {
  121787. if (!node)
  121788. return false;
  121789. const nodeType = node.type;
  121790. if (nodeType === "TSAsExpression") {
  121791. if (typeof opts === "undefined") {
  121792. return true;
  121793. } else {
  121794. return (0, _shallowEqual.default)(node, opts);
  121795. }
  121796. }
  121797. return false;
  121798. }
  121799. function isTSTypeAssertion(node, opts) {
  121800. if (!node)
  121801. return false;
  121802. const nodeType = node.type;
  121803. if (nodeType === "TSTypeAssertion") {
  121804. if (typeof opts === "undefined") {
  121805. return true;
  121806. } else {
  121807. return (0, _shallowEqual.default)(node, opts);
  121808. }
  121809. }
  121810. return false;
  121811. }
  121812. function isTSEnumDeclaration(node, opts) {
  121813. if (!node)
  121814. return false;
  121815. const nodeType = node.type;
  121816. if (nodeType === "TSEnumDeclaration") {
  121817. if (typeof opts === "undefined") {
  121818. return true;
  121819. } else {
  121820. return (0, _shallowEqual.default)(node, opts);
  121821. }
  121822. }
  121823. return false;
  121824. }
  121825. function isTSEnumMember(node, opts) {
  121826. if (!node)
  121827. return false;
  121828. const nodeType = node.type;
  121829. if (nodeType === "TSEnumMember") {
  121830. if (typeof opts === "undefined") {
  121831. return true;
  121832. } else {
  121833. return (0, _shallowEqual.default)(node, opts);
  121834. }
  121835. }
  121836. return false;
  121837. }
  121838. function isTSModuleDeclaration(node, opts) {
  121839. if (!node)
  121840. return false;
  121841. const nodeType = node.type;
  121842. if (nodeType === "TSModuleDeclaration") {
  121843. if (typeof opts === "undefined") {
  121844. return true;
  121845. } else {
  121846. return (0, _shallowEqual.default)(node, opts);
  121847. }
  121848. }
  121849. return false;
  121850. }
  121851. function isTSModuleBlock(node, opts) {
  121852. if (!node)
  121853. return false;
  121854. const nodeType = node.type;
  121855. if (nodeType === "TSModuleBlock") {
  121856. if (typeof opts === "undefined") {
  121857. return true;
  121858. } else {
  121859. return (0, _shallowEqual.default)(node, opts);
  121860. }
  121861. }
  121862. return false;
  121863. }
  121864. function isTSImportType(node, opts) {
  121865. if (!node)
  121866. return false;
  121867. const nodeType = node.type;
  121868. if (nodeType === "TSImportType") {
  121869. if (typeof opts === "undefined") {
  121870. return true;
  121871. } else {
  121872. return (0, _shallowEqual.default)(node, opts);
  121873. }
  121874. }
  121875. return false;
  121876. }
  121877. function isTSImportEqualsDeclaration(node, opts) {
  121878. if (!node)
  121879. return false;
  121880. const nodeType = node.type;
  121881. if (nodeType === "TSImportEqualsDeclaration") {
  121882. if (typeof opts === "undefined") {
  121883. return true;
  121884. } else {
  121885. return (0, _shallowEqual.default)(node, opts);
  121886. }
  121887. }
  121888. return false;
  121889. }
  121890. function isTSExternalModuleReference(node, opts) {
  121891. if (!node)
  121892. return false;
  121893. const nodeType = node.type;
  121894. if (nodeType === "TSExternalModuleReference") {
  121895. if (typeof opts === "undefined") {
  121896. return true;
  121897. } else {
  121898. return (0, _shallowEqual.default)(node, opts);
  121899. }
  121900. }
  121901. return false;
  121902. }
  121903. function isTSNonNullExpression(node, opts) {
  121904. if (!node)
  121905. return false;
  121906. const nodeType = node.type;
  121907. if (nodeType === "TSNonNullExpression") {
  121908. if (typeof opts === "undefined") {
  121909. return true;
  121910. } else {
  121911. return (0, _shallowEqual.default)(node, opts);
  121912. }
  121913. }
  121914. return false;
  121915. }
  121916. function isTSExportAssignment(node, opts) {
  121917. if (!node)
  121918. return false;
  121919. const nodeType = node.type;
  121920. if (nodeType === "TSExportAssignment") {
  121921. if (typeof opts === "undefined") {
  121922. return true;
  121923. } else {
  121924. return (0, _shallowEqual.default)(node, opts);
  121925. }
  121926. }
  121927. return false;
  121928. }
  121929. function isTSNamespaceExportDeclaration(node, opts) {
  121930. if (!node)
  121931. return false;
  121932. const nodeType = node.type;
  121933. if (nodeType === "TSNamespaceExportDeclaration") {
  121934. if (typeof opts === "undefined") {
  121935. return true;
  121936. } else {
  121937. return (0, _shallowEqual.default)(node, opts);
  121938. }
  121939. }
  121940. return false;
  121941. }
  121942. function isTSTypeAnnotation(node, opts) {
  121943. if (!node)
  121944. return false;
  121945. const nodeType = node.type;
  121946. if (nodeType === "TSTypeAnnotation") {
  121947. if (typeof opts === "undefined") {
  121948. return true;
  121949. } else {
  121950. return (0, _shallowEqual.default)(node, opts);
  121951. }
  121952. }
  121953. return false;
  121954. }
  121955. function isTSTypeParameterInstantiation(node, opts) {
  121956. if (!node)
  121957. return false;
  121958. const nodeType = node.type;
  121959. if (nodeType === "TSTypeParameterInstantiation") {
  121960. if (typeof opts === "undefined") {
  121961. return true;
  121962. } else {
  121963. return (0, _shallowEqual.default)(node, opts);
  121964. }
  121965. }
  121966. return false;
  121967. }
  121968. function isTSTypeParameterDeclaration(node, opts) {
  121969. if (!node)
  121970. return false;
  121971. const nodeType = node.type;
  121972. if (nodeType === "TSTypeParameterDeclaration") {
  121973. if (typeof opts === "undefined") {
  121974. return true;
  121975. } else {
  121976. return (0, _shallowEqual.default)(node, opts);
  121977. }
  121978. }
  121979. return false;
  121980. }
  121981. function isTSTypeParameter(node, opts) {
  121982. if (!node)
  121983. return false;
  121984. const nodeType = node.type;
  121985. if (nodeType === "TSTypeParameter") {
  121986. if (typeof opts === "undefined") {
  121987. return true;
  121988. } else {
  121989. return (0, _shallowEqual.default)(node, opts);
  121990. }
  121991. }
  121992. return false;
  121993. }
  121994. function isExpression(node, opts) {
  121995. if (!node)
  121996. return false;
  121997. const nodeType = node.type;
  121998. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  121999. if (typeof opts === "undefined") {
  122000. return true;
  122001. } else {
  122002. return (0, _shallowEqual.default)(node, opts);
  122003. }
  122004. }
  122005. return false;
  122006. }
  122007. function isBinary(node, opts) {
  122008. if (!node)
  122009. return false;
  122010. const nodeType = node.type;
  122011. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  122012. if (typeof opts === "undefined") {
  122013. return true;
  122014. } else {
  122015. return (0, _shallowEqual.default)(node, opts);
  122016. }
  122017. }
  122018. return false;
  122019. }
  122020. function isScopable(node, opts) {
  122021. if (!node)
  122022. return false;
  122023. const nodeType = node.type;
  122024. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  122025. if (typeof opts === "undefined") {
  122026. return true;
  122027. } else {
  122028. return (0, _shallowEqual.default)(node, opts);
  122029. }
  122030. }
  122031. return false;
  122032. }
  122033. function isBlockParent(node, opts) {
  122034. if (!node)
  122035. return false;
  122036. const nodeType = node.type;
  122037. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  122038. if (typeof opts === "undefined") {
  122039. return true;
  122040. } else {
  122041. return (0, _shallowEqual.default)(node, opts);
  122042. }
  122043. }
  122044. return false;
  122045. }
  122046. function isBlock(node, opts) {
  122047. if (!node)
  122048. return false;
  122049. const nodeType = node.type;
  122050. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  122051. if (typeof opts === "undefined") {
  122052. return true;
  122053. } else {
  122054. return (0, _shallowEqual.default)(node, opts);
  122055. }
  122056. }
  122057. return false;
  122058. }
  122059. function isStatement(node, opts) {
  122060. if (!node)
  122061. return false;
  122062. const nodeType = node.type;
  122063. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  122064. if (typeof opts === "undefined") {
  122065. return true;
  122066. } else {
  122067. return (0, _shallowEqual.default)(node, opts);
  122068. }
  122069. }
  122070. return false;
  122071. }
  122072. function isTerminatorless(node, opts) {
  122073. if (!node)
  122074. return false;
  122075. const nodeType = node.type;
  122076. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  122077. if (typeof opts === "undefined") {
  122078. return true;
  122079. } else {
  122080. return (0, _shallowEqual.default)(node, opts);
  122081. }
  122082. }
  122083. return false;
  122084. }
  122085. function isCompletionStatement(node, opts) {
  122086. if (!node)
  122087. return false;
  122088. const nodeType = node.type;
  122089. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  122090. if (typeof opts === "undefined") {
  122091. return true;
  122092. } else {
  122093. return (0, _shallowEqual.default)(node, opts);
  122094. }
  122095. }
  122096. return false;
  122097. }
  122098. function isConditional(node, opts) {
  122099. if (!node)
  122100. return false;
  122101. const nodeType = node.type;
  122102. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  122103. if (typeof opts === "undefined") {
  122104. return true;
  122105. } else {
  122106. return (0, _shallowEqual.default)(node, opts);
  122107. }
  122108. }
  122109. return false;
  122110. }
  122111. function isLoop(node, opts) {
  122112. if (!node)
  122113. return false;
  122114. const nodeType = node.type;
  122115. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  122116. if (typeof opts === "undefined") {
  122117. return true;
  122118. } else {
  122119. return (0, _shallowEqual.default)(node, opts);
  122120. }
  122121. }
  122122. return false;
  122123. }
  122124. function isWhile(node, opts) {
  122125. if (!node)
  122126. return false;
  122127. const nodeType = node.type;
  122128. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  122129. if (typeof opts === "undefined") {
  122130. return true;
  122131. } else {
  122132. return (0, _shallowEqual.default)(node, opts);
  122133. }
  122134. }
  122135. return false;
  122136. }
  122137. function isExpressionWrapper(node, opts) {
  122138. if (!node)
  122139. return false;
  122140. const nodeType = node.type;
  122141. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  122142. if (typeof opts === "undefined") {
  122143. return true;
  122144. } else {
  122145. return (0, _shallowEqual.default)(node, opts);
  122146. }
  122147. }
  122148. return false;
  122149. }
  122150. function isFor(node, opts) {
  122151. if (!node)
  122152. return false;
  122153. const nodeType = node.type;
  122154. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  122155. if (typeof opts === "undefined") {
  122156. return true;
  122157. } else {
  122158. return (0, _shallowEqual.default)(node, opts);
  122159. }
  122160. }
  122161. return false;
  122162. }
  122163. function isForXStatement(node, opts) {
  122164. if (!node)
  122165. return false;
  122166. const nodeType = node.type;
  122167. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  122168. if (typeof opts === "undefined") {
  122169. return true;
  122170. } else {
  122171. return (0, _shallowEqual.default)(node, opts);
  122172. }
  122173. }
  122174. return false;
  122175. }
  122176. function isFunction(node, opts) {
  122177. if (!node)
  122178. return false;
  122179. const nodeType = node.type;
  122180. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  122181. if (typeof opts === "undefined") {
  122182. return true;
  122183. } else {
  122184. return (0, _shallowEqual.default)(node, opts);
  122185. }
  122186. }
  122187. return false;
  122188. }
  122189. function isFunctionParent(node, opts) {
  122190. if (!node)
  122191. return false;
  122192. const nodeType = node.type;
  122193. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  122194. if (typeof opts === "undefined") {
  122195. return true;
  122196. } else {
  122197. return (0, _shallowEqual.default)(node, opts);
  122198. }
  122199. }
  122200. return false;
  122201. }
  122202. function isPureish(node, opts) {
  122203. if (!node)
  122204. return false;
  122205. const nodeType = node.type;
  122206. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  122207. if (typeof opts === "undefined") {
  122208. return true;
  122209. } else {
  122210. return (0, _shallowEqual.default)(node, opts);
  122211. }
  122212. }
  122213. return false;
  122214. }
  122215. function isDeclaration2(node, opts) {
  122216. if (!node)
  122217. return false;
  122218. const nodeType = node.type;
  122219. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  122220. if (typeof opts === "undefined") {
  122221. return true;
  122222. } else {
  122223. return (0, _shallowEqual.default)(node, opts);
  122224. }
  122225. }
  122226. return false;
  122227. }
  122228. function isPatternLike(node, opts) {
  122229. if (!node)
  122230. return false;
  122231. const nodeType = node.type;
  122232. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  122233. if (typeof opts === "undefined") {
  122234. return true;
  122235. } else {
  122236. return (0, _shallowEqual.default)(node, opts);
  122237. }
  122238. }
  122239. return false;
  122240. }
  122241. function isLVal(node, opts) {
  122242. if (!node)
  122243. return false;
  122244. const nodeType = node.type;
  122245. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  122246. if (typeof opts === "undefined") {
  122247. return true;
  122248. } else {
  122249. return (0, _shallowEqual.default)(node, opts);
  122250. }
  122251. }
  122252. return false;
  122253. }
  122254. function isTSEntityName(node, opts) {
  122255. if (!node)
  122256. return false;
  122257. const nodeType = node.type;
  122258. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  122259. if (typeof opts === "undefined") {
  122260. return true;
  122261. } else {
  122262. return (0, _shallowEqual.default)(node, opts);
  122263. }
  122264. }
  122265. return false;
  122266. }
  122267. function isLiteral(node, opts) {
  122268. if (!node)
  122269. return false;
  122270. const nodeType = node.type;
  122271. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  122272. if (typeof opts === "undefined") {
  122273. return true;
  122274. } else {
  122275. return (0, _shallowEqual.default)(node, opts);
  122276. }
  122277. }
  122278. return false;
  122279. }
  122280. function isImmutable(node, opts) {
  122281. if (!node)
  122282. return false;
  122283. const nodeType = node.type;
  122284. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  122285. if (typeof opts === "undefined") {
  122286. return true;
  122287. } else {
  122288. return (0, _shallowEqual.default)(node, opts);
  122289. }
  122290. }
  122291. return false;
  122292. }
  122293. function isUserWhitespacable(node, opts) {
  122294. if (!node)
  122295. return false;
  122296. const nodeType = node.type;
  122297. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  122298. if (typeof opts === "undefined") {
  122299. return true;
  122300. } else {
  122301. return (0, _shallowEqual.default)(node, opts);
  122302. }
  122303. }
  122304. return false;
  122305. }
  122306. function isMethod(node, opts) {
  122307. if (!node)
  122308. return false;
  122309. const nodeType = node.type;
  122310. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  122311. if (typeof opts === "undefined") {
  122312. return true;
  122313. } else {
  122314. return (0, _shallowEqual.default)(node, opts);
  122315. }
  122316. }
  122317. return false;
  122318. }
  122319. function isObjectMember(node, opts) {
  122320. if (!node)
  122321. return false;
  122322. const nodeType = node.type;
  122323. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  122324. if (typeof opts === "undefined") {
  122325. return true;
  122326. } else {
  122327. return (0, _shallowEqual.default)(node, opts);
  122328. }
  122329. }
  122330. return false;
  122331. }
  122332. function isProperty(node, opts) {
  122333. if (!node)
  122334. return false;
  122335. const nodeType = node.type;
  122336. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  122337. if (typeof opts === "undefined") {
  122338. return true;
  122339. } else {
  122340. return (0, _shallowEqual.default)(node, opts);
  122341. }
  122342. }
  122343. return false;
  122344. }
  122345. function isUnaryLike(node, opts) {
  122346. if (!node)
  122347. return false;
  122348. const nodeType = node.type;
  122349. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  122350. if (typeof opts === "undefined") {
  122351. return true;
  122352. } else {
  122353. return (0, _shallowEqual.default)(node, opts);
  122354. }
  122355. }
  122356. return false;
  122357. }
  122358. function isPattern(node, opts) {
  122359. if (!node)
  122360. return false;
  122361. const nodeType = node.type;
  122362. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  122363. if (typeof opts === "undefined") {
  122364. return true;
  122365. } else {
  122366. return (0, _shallowEqual.default)(node, opts);
  122367. }
  122368. }
  122369. return false;
  122370. }
  122371. function isClass(node, opts) {
  122372. if (!node)
  122373. return false;
  122374. const nodeType = node.type;
  122375. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  122376. if (typeof opts === "undefined") {
  122377. return true;
  122378. } else {
  122379. return (0, _shallowEqual.default)(node, opts);
  122380. }
  122381. }
  122382. return false;
  122383. }
  122384. function isModuleDeclaration(node, opts) {
  122385. if (!node)
  122386. return false;
  122387. const nodeType = node.type;
  122388. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  122389. if (typeof opts === "undefined") {
  122390. return true;
  122391. } else {
  122392. return (0, _shallowEqual.default)(node, opts);
  122393. }
  122394. }
  122395. return false;
  122396. }
  122397. function isExportDeclaration(node, opts) {
  122398. if (!node)
  122399. return false;
  122400. const nodeType = node.type;
  122401. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  122402. if (typeof opts === "undefined") {
  122403. return true;
  122404. } else {
  122405. return (0, _shallowEqual.default)(node, opts);
  122406. }
  122407. }
  122408. return false;
  122409. }
  122410. function isModuleSpecifier(node, opts) {
  122411. if (!node)
  122412. return false;
  122413. const nodeType = node.type;
  122414. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  122415. if (typeof opts === "undefined") {
  122416. return true;
  122417. } else {
  122418. return (0, _shallowEqual.default)(node, opts);
  122419. }
  122420. }
  122421. return false;
  122422. }
  122423. function isFlow(node, opts) {
  122424. if (!node)
  122425. return false;
  122426. const nodeType = node.type;
  122427. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  122428. if (typeof opts === "undefined") {
  122429. return true;
  122430. } else {
  122431. return (0, _shallowEqual.default)(node, opts);
  122432. }
  122433. }
  122434. return false;
  122435. }
  122436. function isFlowType(node, opts) {
  122437. if (!node)
  122438. return false;
  122439. const nodeType = node.type;
  122440. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  122441. if (typeof opts === "undefined") {
  122442. return true;
  122443. } else {
  122444. return (0, _shallowEqual.default)(node, opts);
  122445. }
  122446. }
  122447. return false;
  122448. }
  122449. function isFlowBaseAnnotation(node, opts) {
  122450. if (!node)
  122451. return false;
  122452. const nodeType = node.type;
  122453. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  122454. if (typeof opts === "undefined") {
  122455. return true;
  122456. } else {
  122457. return (0, _shallowEqual.default)(node, opts);
  122458. }
  122459. }
  122460. return false;
  122461. }
  122462. function isFlowDeclaration(node, opts) {
  122463. if (!node)
  122464. return false;
  122465. const nodeType = node.type;
  122466. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  122467. if (typeof opts === "undefined") {
  122468. return true;
  122469. } else {
  122470. return (0, _shallowEqual.default)(node, opts);
  122471. }
  122472. }
  122473. return false;
  122474. }
  122475. function isFlowPredicate(node, opts) {
  122476. if (!node)
  122477. return false;
  122478. const nodeType = node.type;
  122479. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  122480. if (typeof opts === "undefined") {
  122481. return true;
  122482. } else {
  122483. return (0, _shallowEqual.default)(node, opts);
  122484. }
  122485. }
  122486. return false;
  122487. }
  122488. function isEnumBody(node, opts) {
  122489. if (!node)
  122490. return false;
  122491. const nodeType = node.type;
  122492. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  122493. if (typeof opts === "undefined") {
  122494. return true;
  122495. } else {
  122496. return (0, _shallowEqual.default)(node, opts);
  122497. }
  122498. }
  122499. return false;
  122500. }
  122501. function isEnumMember(node, opts) {
  122502. if (!node)
  122503. return false;
  122504. const nodeType = node.type;
  122505. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  122506. if (typeof opts === "undefined") {
  122507. return true;
  122508. } else {
  122509. return (0, _shallowEqual.default)(node, opts);
  122510. }
  122511. }
  122512. return false;
  122513. }
  122514. function isJSX(node, opts) {
  122515. if (!node)
  122516. return false;
  122517. const nodeType = node.type;
  122518. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  122519. if (typeof opts === "undefined") {
  122520. return true;
  122521. } else {
  122522. return (0, _shallowEqual.default)(node, opts);
  122523. }
  122524. }
  122525. return false;
  122526. }
  122527. function isPrivate(node, opts) {
  122528. if (!node)
  122529. return false;
  122530. const nodeType = node.type;
  122531. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  122532. if (typeof opts === "undefined") {
  122533. return true;
  122534. } else {
  122535. return (0, _shallowEqual.default)(node, opts);
  122536. }
  122537. }
  122538. return false;
  122539. }
  122540. function isTSTypeElement(node, opts) {
  122541. if (!node)
  122542. return false;
  122543. const nodeType = node.type;
  122544. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  122545. if (typeof opts === "undefined") {
  122546. return true;
  122547. } else {
  122548. return (0, _shallowEqual.default)(node, opts);
  122549. }
  122550. }
  122551. return false;
  122552. }
  122553. function isTSType(node, opts) {
  122554. if (!node)
  122555. return false;
  122556. const nodeType = node.type;
  122557. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  122558. if (typeof opts === "undefined") {
  122559. return true;
  122560. } else {
  122561. return (0, _shallowEqual.default)(node, opts);
  122562. }
  122563. }
  122564. return false;
  122565. }
  122566. function isTSBaseType(node, opts) {
  122567. if (!node)
  122568. return false;
  122569. const nodeType = node.type;
  122570. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  122571. if (typeof opts === "undefined") {
  122572. return true;
  122573. } else {
  122574. return (0, _shallowEqual.default)(node, opts);
  122575. }
  122576. }
  122577. return false;
  122578. }
  122579. function isNumberLiteral(node, opts) {
  122580. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  122581. if (!node)
  122582. return false;
  122583. const nodeType = node.type;
  122584. if (nodeType === "NumberLiteral") {
  122585. if (typeof opts === "undefined") {
  122586. return true;
  122587. } else {
  122588. return (0, _shallowEqual.default)(node, opts);
  122589. }
  122590. }
  122591. return false;
  122592. }
  122593. function isRegexLiteral(node, opts) {
  122594. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  122595. if (!node)
  122596. return false;
  122597. const nodeType = node.type;
  122598. if (nodeType === "RegexLiteral") {
  122599. if (typeof opts === "undefined") {
  122600. return true;
  122601. } else {
  122602. return (0, _shallowEqual.default)(node, opts);
  122603. }
  122604. }
  122605. return false;
  122606. }
  122607. function isRestProperty(node, opts) {
  122608. console.trace("The node type RestProperty has been renamed to RestElement");
  122609. if (!node)
  122610. return false;
  122611. const nodeType = node.type;
  122612. if (nodeType === "RestProperty") {
  122613. if (typeof opts === "undefined") {
  122614. return true;
  122615. } else {
  122616. return (0, _shallowEqual.default)(node, opts);
  122617. }
  122618. }
  122619. return false;
  122620. }
  122621. function isSpreadProperty(node, opts) {
  122622. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  122623. if (!node)
  122624. return false;
  122625. const nodeType = node.type;
  122626. if (nodeType === "SpreadProperty") {
  122627. if (typeof opts === "undefined") {
  122628. return true;
  122629. } else {
  122630. return (0, _shallowEqual.default)(node, opts);
  122631. }
  122632. }
  122633. return false;
  122634. }
  122635. }
  122636. });
  122637. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/matchesPattern.js
  122638. var require_matchesPattern6 = __commonJS({
  122639. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  122640. "use strict";
  122641. Object.defineProperty(exports, "__esModule", {
  122642. value: true
  122643. });
  122644. exports.default = matchesPattern;
  122645. var _generated = require_generated26();
  122646. function matchesPattern(member, match, allowPartial) {
  122647. if (!(0, _generated.isMemberExpression)(member))
  122648. return false;
  122649. const parts = Array.isArray(match) ? match : match.split(".");
  122650. const nodes = [];
  122651. let node;
  122652. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  122653. nodes.push(node.property);
  122654. }
  122655. nodes.push(node);
  122656. if (nodes.length < parts.length)
  122657. return false;
  122658. if (!allowPartial && nodes.length > parts.length)
  122659. return false;
  122660. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  122661. const node2 = nodes[j];
  122662. let value;
  122663. if ((0, _generated.isIdentifier)(node2)) {
  122664. value = node2.name;
  122665. } else if ((0, _generated.isStringLiteral)(node2)) {
  122666. value = node2.value;
  122667. } else if ((0, _generated.isThisExpression)(node2)) {
  122668. value = "this";
  122669. } else {
  122670. return false;
  122671. }
  122672. if (parts[i] !== value)
  122673. return false;
  122674. }
  122675. return true;
  122676. }
  122677. }
  122678. });
  122679. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  122680. var require_buildMatchMemberExpression6 = __commonJS({
  122681. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  122682. "use strict";
  122683. Object.defineProperty(exports, "__esModule", {
  122684. value: true
  122685. });
  122686. exports.default = buildMatchMemberExpression;
  122687. var _matchesPattern = require_matchesPattern6();
  122688. function buildMatchMemberExpression(match, allowPartial) {
  122689. const parts = match.split(".");
  122690. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  122691. }
  122692. }
  122693. });
  122694. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  122695. var require_isReactComponent6 = __commonJS({
  122696. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  122697. "use strict";
  122698. Object.defineProperty(exports, "__esModule", {
  122699. value: true
  122700. });
  122701. exports.default = void 0;
  122702. var _buildMatchMemberExpression = require_buildMatchMemberExpression6();
  122703. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  122704. var _default = isReactComponent;
  122705. exports.default = _default;
  122706. }
  122707. });
  122708. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  122709. var require_isCompatTag6 = __commonJS({
  122710. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  122711. "use strict";
  122712. Object.defineProperty(exports, "__esModule", {
  122713. value: true
  122714. });
  122715. exports.default = isCompatTag;
  122716. function isCompatTag(tagName) {
  122717. return !!tagName && /^[a-z]/.test(tagName);
  122718. }
  122719. }
  122720. });
  122721. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isType.js
  122722. var require_isType6 = __commonJS({
  122723. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  122724. "use strict";
  122725. Object.defineProperty(exports, "__esModule", {
  122726. value: true
  122727. });
  122728. exports.default = isType;
  122729. var _definitions = require_definitions6();
  122730. function isType(nodeType, targetType) {
  122731. if (nodeType === targetType)
  122732. return true;
  122733. if (_definitions.ALIAS_KEYS[targetType])
  122734. return false;
  122735. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  122736. if (aliases) {
  122737. if (aliases[0] === nodeType)
  122738. return true;
  122739. for (const alias of aliases) {
  122740. if (nodeType === alias)
  122741. return true;
  122742. }
  122743. }
  122744. return false;
  122745. }
  122746. }
  122747. });
  122748. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  122749. var require_isPlaceholderType6 = __commonJS({
  122750. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  122751. "use strict";
  122752. Object.defineProperty(exports, "__esModule", {
  122753. value: true
  122754. });
  122755. exports.default = isPlaceholderType;
  122756. var _definitions = require_definitions6();
  122757. function isPlaceholderType(placeholderType, targetType) {
  122758. if (placeholderType === targetType)
  122759. return true;
  122760. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  122761. if (aliases) {
  122762. for (const alias of aliases) {
  122763. if (targetType === alias)
  122764. return true;
  122765. }
  122766. }
  122767. return false;
  122768. }
  122769. }
  122770. });
  122771. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/is.js
  122772. var require_is6 = __commonJS({
  122773. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/is.js"(exports) {
  122774. "use strict";
  122775. Object.defineProperty(exports, "__esModule", {
  122776. value: true
  122777. });
  122778. exports.default = is;
  122779. var _shallowEqual = require_shallowEqual6();
  122780. var _isType = require_isType6();
  122781. var _isPlaceholderType = require_isPlaceholderType6();
  122782. var _definitions = require_definitions6();
  122783. function is(type, node, opts) {
  122784. if (!node)
  122785. return false;
  122786. const matches = (0, _isType.default)(node.type, type);
  122787. if (!matches) {
  122788. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  122789. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  122790. }
  122791. return false;
  122792. }
  122793. if (typeof opts === "undefined") {
  122794. return true;
  122795. } else {
  122796. return (0, _shallowEqual.default)(node, opts);
  122797. }
  122798. }
  122799. }
  122800. });
  122801. // node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/identifier.js
  122802. var require_identifier8 = __commonJS({
  122803. "node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  122804. "use strict";
  122805. Object.defineProperty(exports, "__esModule", {
  122806. value: true
  122807. });
  122808. exports.isIdentifierStart = isIdentifierStart2;
  122809. exports.isIdentifierChar = isIdentifierChar2;
  122810. exports.isIdentifierName = isIdentifierName;
  122811. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  122812. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  122813. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  122814. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  122815. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  122816. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  122817. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  122818. function isInAstralSet2(code2, set) {
  122819. let pos = 65536;
  122820. for (let i = 0, length = set.length; i < length; i += 2) {
  122821. pos += set[i];
  122822. if (pos > code2)
  122823. return false;
  122824. pos += set[i + 1];
  122825. if (pos >= code2)
  122826. return true;
  122827. }
  122828. return false;
  122829. }
  122830. function isIdentifierStart2(code2) {
  122831. if (code2 < 65)
  122832. return code2 === 36;
  122833. if (code2 <= 90)
  122834. return true;
  122835. if (code2 < 97)
  122836. return code2 === 95;
  122837. if (code2 <= 122)
  122838. return true;
  122839. if (code2 <= 65535) {
  122840. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  122841. }
  122842. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  122843. }
  122844. function isIdentifierChar2(code2) {
  122845. if (code2 < 48)
  122846. return code2 === 36;
  122847. if (code2 < 58)
  122848. return true;
  122849. if (code2 < 65)
  122850. return false;
  122851. if (code2 <= 90)
  122852. return true;
  122853. if (code2 < 97)
  122854. return code2 === 95;
  122855. if (code2 <= 122)
  122856. return true;
  122857. if (code2 <= 65535) {
  122858. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  122859. }
  122860. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  122861. }
  122862. function isIdentifierName(name2) {
  122863. let isFirst = true;
  122864. for (let i = 0; i < name2.length; i++) {
  122865. let cp = name2.charCodeAt(i);
  122866. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  122867. const trail = name2.charCodeAt(++i);
  122868. if ((trail & 64512) === 56320) {
  122869. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  122870. }
  122871. }
  122872. if (isFirst) {
  122873. isFirst = false;
  122874. if (!isIdentifierStart2(cp)) {
  122875. return false;
  122876. }
  122877. } else if (!isIdentifierChar2(cp)) {
  122878. return false;
  122879. }
  122880. }
  122881. return !isFirst;
  122882. }
  122883. }
  122884. });
  122885. // node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/keyword.js
  122886. var require_keyword8 = __commonJS({
  122887. "node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  122888. "use strict";
  122889. Object.defineProperty(exports, "__esModule", {
  122890. value: true
  122891. });
  122892. exports.isReservedWord = isReservedWord;
  122893. exports.isStrictReservedWord = isStrictReservedWord;
  122894. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  122895. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  122896. exports.isKeyword = isKeyword;
  122897. var reservedWords2 = {
  122898. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  122899. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  122900. strictBind: ["eval", "arguments"]
  122901. };
  122902. var keywords2 = new Set(reservedWords2.keyword);
  122903. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  122904. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  122905. function isReservedWord(word, inModule) {
  122906. return inModule && word === "await" || word === "enum";
  122907. }
  122908. function isStrictReservedWord(word, inModule) {
  122909. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  122910. }
  122911. function isStrictBindOnlyReservedWord(word) {
  122912. return reservedWordsStrictBindSet.has(word);
  122913. }
  122914. function isStrictBindReservedWord(word, inModule) {
  122915. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  122916. }
  122917. function isKeyword(word) {
  122918. return keywords2.has(word);
  122919. }
  122920. }
  122921. });
  122922. // node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/index.js
  122923. var require_lib29 = __commonJS({
  122924. "node_modules/@babel/template/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  122925. "use strict";
  122926. Object.defineProperty(exports, "__esModule", {
  122927. value: true
  122928. });
  122929. Object.defineProperty(exports, "isIdentifierName", {
  122930. enumerable: true,
  122931. get: function() {
  122932. return _identifier.isIdentifierName;
  122933. }
  122934. });
  122935. Object.defineProperty(exports, "isIdentifierChar", {
  122936. enumerable: true,
  122937. get: function() {
  122938. return _identifier.isIdentifierChar;
  122939. }
  122940. });
  122941. Object.defineProperty(exports, "isIdentifierStart", {
  122942. enumerable: true,
  122943. get: function() {
  122944. return _identifier.isIdentifierStart;
  122945. }
  122946. });
  122947. Object.defineProperty(exports, "isReservedWord", {
  122948. enumerable: true,
  122949. get: function() {
  122950. return _keyword.isReservedWord;
  122951. }
  122952. });
  122953. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  122954. enumerable: true,
  122955. get: function() {
  122956. return _keyword.isStrictBindOnlyReservedWord;
  122957. }
  122958. });
  122959. Object.defineProperty(exports, "isStrictBindReservedWord", {
  122960. enumerable: true,
  122961. get: function() {
  122962. return _keyword.isStrictBindReservedWord;
  122963. }
  122964. });
  122965. Object.defineProperty(exports, "isStrictReservedWord", {
  122966. enumerable: true,
  122967. get: function() {
  122968. return _keyword.isStrictReservedWord;
  122969. }
  122970. });
  122971. Object.defineProperty(exports, "isKeyword", {
  122972. enumerable: true,
  122973. get: function() {
  122974. return _keyword.isKeyword;
  122975. }
  122976. });
  122977. var _identifier = require_identifier8();
  122978. var _keyword = require_keyword8();
  122979. }
  122980. });
  122981. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  122982. var require_isValidIdentifier6 = __commonJS({
  122983. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  122984. "use strict";
  122985. Object.defineProperty(exports, "__esModule", {
  122986. value: true
  122987. });
  122988. exports.default = isValidIdentifier;
  122989. var _helperValidatorIdentifier = require_lib29();
  122990. function isValidIdentifier(name2, reserved = true) {
  122991. if (typeof name2 !== "string")
  122992. return false;
  122993. if (reserved) {
  122994. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  122995. return false;
  122996. }
  122997. }
  122998. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  122999. }
  123000. }
  123001. });
  123002. // node_modules/@babel/template/node_modules/@babel/types/lib/constants/index.js
  123003. var require_constants6 = __commonJS({
  123004. "node_modules/@babel/template/node_modules/@babel/types/lib/constants/index.js"(exports) {
  123005. "use strict";
  123006. Object.defineProperty(exports, "__esModule", {
  123007. value: true
  123008. });
  123009. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  123010. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  123011. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  123012. var FLATTENABLE_KEYS = ["body", "expressions"];
  123013. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  123014. var FOR_INIT_KEYS = ["left", "init"];
  123015. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  123016. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  123017. exports.COMMENT_KEYS = COMMENT_KEYS;
  123018. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  123019. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  123020. var UPDATE_OPERATORS = ["++", "--"];
  123021. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  123022. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  123023. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  123024. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  123025. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  123026. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  123027. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  123028. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  123029. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  123030. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  123031. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  123032. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  123033. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  123034. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  123035. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  123036. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  123037. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  123038. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  123039. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  123040. var STRING_UNARY_OPERATORS = ["typeof"];
  123041. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  123042. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  123043. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  123044. var INHERIT_KEYS = {
  123045. optional: ["typeAnnotation", "typeParameters", "returnType"],
  123046. force: ["start", "loc", "end"]
  123047. };
  123048. exports.INHERIT_KEYS = INHERIT_KEYS;
  123049. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  123050. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  123051. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  123052. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  123053. }
  123054. });
  123055. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/validate.js
  123056. var require_validate6 = __commonJS({
  123057. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  123058. "use strict";
  123059. Object.defineProperty(exports, "__esModule", {
  123060. value: true
  123061. });
  123062. exports.default = validate;
  123063. exports.validateField = validateField;
  123064. exports.validateChild = validateChild;
  123065. var _definitions = require_definitions6();
  123066. function validate(node, key, val) {
  123067. if (!node)
  123068. return;
  123069. const fields = _definitions.NODE_FIELDS[node.type];
  123070. if (!fields)
  123071. return;
  123072. const field = fields[key];
  123073. validateField(node, key, val, field);
  123074. validateChild(node, key, val);
  123075. }
  123076. function validateField(node, key, val, field) {
  123077. if (!(field != null && field.validate))
  123078. return;
  123079. if (field.optional && val == null)
  123080. return;
  123081. field.validate(node, key, val);
  123082. }
  123083. function validateChild(node, key, val) {
  123084. if (val == null)
  123085. return;
  123086. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  123087. if (!validate2)
  123088. return;
  123089. validate2(node, key, val);
  123090. }
  123091. }
  123092. });
  123093. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/utils.js
  123094. var require_utils6 = __commonJS({
  123095. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  123096. "use strict";
  123097. Object.defineProperty(exports, "__esModule", {
  123098. value: true
  123099. });
  123100. exports.validate = validate;
  123101. exports.typeIs = typeIs;
  123102. exports.validateType = validateType;
  123103. exports.validateOptional = validateOptional;
  123104. exports.validateOptionalType = validateOptionalType;
  123105. exports.arrayOf = arrayOf;
  123106. exports.arrayOfType = arrayOfType;
  123107. exports.validateArrayOfType = validateArrayOfType;
  123108. exports.assertEach = assertEach;
  123109. exports.assertOneOf = assertOneOf;
  123110. exports.assertNodeType = assertNodeType;
  123111. exports.assertNodeOrValueType = assertNodeOrValueType;
  123112. exports.assertValueType = assertValueType;
  123113. exports.assertShape = assertShape;
  123114. exports.assertOptionalChainStart = assertOptionalChainStart;
  123115. exports.chain = chain;
  123116. exports.default = defineType;
  123117. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  123118. var _is = require_is6();
  123119. var _validate = require_validate6();
  123120. var VISITOR_KEYS = {};
  123121. exports.VISITOR_KEYS = VISITOR_KEYS;
  123122. var ALIAS_KEYS = {};
  123123. exports.ALIAS_KEYS = ALIAS_KEYS;
  123124. var FLIPPED_ALIAS_KEYS = {};
  123125. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  123126. var NODE_FIELDS = {};
  123127. exports.NODE_FIELDS = NODE_FIELDS;
  123128. var BUILDER_KEYS = {};
  123129. exports.BUILDER_KEYS = BUILDER_KEYS;
  123130. var DEPRECATED_KEYS = {};
  123131. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  123132. var NODE_PARENT_VALIDATIONS = {};
  123133. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  123134. function getType(val) {
  123135. if (Array.isArray(val)) {
  123136. return "array";
  123137. } else if (val === null) {
  123138. return "null";
  123139. } else {
  123140. return typeof val;
  123141. }
  123142. }
  123143. function validate(validate2) {
  123144. return {
  123145. validate: validate2
  123146. };
  123147. }
  123148. function typeIs(typeName) {
  123149. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  123150. }
  123151. function validateType(typeName) {
  123152. return validate(typeIs(typeName));
  123153. }
  123154. function validateOptional(validate2) {
  123155. return {
  123156. validate: validate2,
  123157. optional: true
  123158. };
  123159. }
  123160. function validateOptionalType(typeName) {
  123161. return {
  123162. validate: typeIs(typeName),
  123163. optional: true
  123164. };
  123165. }
  123166. function arrayOf(elementType) {
  123167. return chain(assertValueType("array"), assertEach(elementType));
  123168. }
  123169. function arrayOfType(typeName) {
  123170. return arrayOf(typeIs(typeName));
  123171. }
  123172. function validateArrayOfType(typeName) {
  123173. return validate(arrayOfType(typeName));
  123174. }
  123175. function assertEach(callback) {
  123176. function validator(node, key, val) {
  123177. if (!Array.isArray(val))
  123178. return;
  123179. for (let i = 0; i < val.length; i++) {
  123180. const subkey = `${key}[${i}]`;
  123181. const v = val[i];
  123182. callback(node, subkey, v);
  123183. if (process.env.BABEL_TYPES_8_BREAKING)
  123184. (0, _validate.validateChild)(node, subkey, v);
  123185. }
  123186. }
  123187. validator.each = callback;
  123188. return validator;
  123189. }
  123190. function assertOneOf(...values) {
  123191. function validate2(node, key, val) {
  123192. if (values.indexOf(val) < 0) {
  123193. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  123194. }
  123195. }
  123196. validate2.oneOf = values;
  123197. return validate2;
  123198. }
  123199. function assertNodeType(...types2) {
  123200. function validate2(node, key, val) {
  123201. for (const type of types2) {
  123202. if ((0, _is.default)(type, val)) {
  123203. (0, _validate.validateChild)(node, key, val);
  123204. return;
  123205. }
  123206. }
  123207. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  123208. }
  123209. validate2.oneOfNodeTypes = types2;
  123210. return validate2;
  123211. }
  123212. function assertNodeOrValueType(...types2) {
  123213. function validate2(node, key, val) {
  123214. for (const type of types2) {
  123215. if (getType(val) === type || (0, _is.default)(type, val)) {
  123216. (0, _validate.validateChild)(node, key, val);
  123217. return;
  123218. }
  123219. }
  123220. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  123221. }
  123222. validate2.oneOfNodeOrValueTypes = types2;
  123223. return validate2;
  123224. }
  123225. function assertValueType(type) {
  123226. function validate2(node, key, val) {
  123227. const valid2 = getType(val) === type;
  123228. if (!valid2) {
  123229. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  123230. }
  123231. }
  123232. validate2.type = type;
  123233. return validate2;
  123234. }
  123235. function assertShape(shape) {
  123236. function validate2(node, key, val) {
  123237. const errors = [];
  123238. for (const property of Object.keys(shape)) {
  123239. try {
  123240. (0, _validate.validateField)(node, property, val[property], shape[property]);
  123241. } catch (error) {
  123242. if (error instanceof TypeError) {
  123243. errors.push(error.message);
  123244. continue;
  123245. }
  123246. throw error;
  123247. }
  123248. }
  123249. if (errors.length) {
  123250. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  123251. ${errors.join("\n")}`);
  123252. }
  123253. }
  123254. validate2.shapeOf = shape;
  123255. return validate2;
  123256. }
  123257. function assertOptionalChainStart() {
  123258. function validate2(node) {
  123259. var _current;
  123260. let current2 = node;
  123261. while (node) {
  123262. const {
  123263. type
  123264. } = current2;
  123265. if (type === "OptionalCallExpression") {
  123266. if (current2.optional)
  123267. return;
  123268. current2 = current2.callee;
  123269. continue;
  123270. }
  123271. if (type === "OptionalMemberExpression") {
  123272. if (current2.optional)
  123273. return;
  123274. current2 = current2.object;
  123275. continue;
  123276. }
  123277. break;
  123278. }
  123279. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  123280. }
  123281. return validate2;
  123282. }
  123283. function chain(...fns) {
  123284. function validate2(...args) {
  123285. for (const fn of fns) {
  123286. fn(...args);
  123287. }
  123288. }
  123289. validate2.chainOf = fns;
  123290. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  123291. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  123292. }
  123293. return validate2;
  123294. }
  123295. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  123296. var validFieldKeys = ["default", "optional", "validate"];
  123297. function defineType(type, opts = {}) {
  123298. const inherits = opts.inherits && store[opts.inherits] || {};
  123299. let fields = opts.fields;
  123300. if (!fields) {
  123301. fields = {};
  123302. if (inherits.fields) {
  123303. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  123304. for (const key of keys2) {
  123305. const field = inherits.fields[key];
  123306. const def = field.default;
  123307. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  123308. throw new Error("field defaults can only be primitives or empty arrays currently");
  123309. }
  123310. fields[key] = {
  123311. default: Array.isArray(def) ? [] : def,
  123312. optional: field.optional,
  123313. validate: field.validate
  123314. };
  123315. }
  123316. }
  123317. }
  123318. const visitor = opts.visitor || inherits.visitor || [];
  123319. const aliases = opts.aliases || inherits.aliases || [];
  123320. const builder = opts.builder || inherits.builder || opts.visitor || [];
  123321. for (const k of Object.keys(opts)) {
  123322. if (validTypeOpts.indexOf(k) === -1) {
  123323. throw new Error(`Unknown type option "${k}" on ${type}`);
  123324. }
  123325. }
  123326. if (opts.deprecatedAlias) {
  123327. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  123328. }
  123329. for (const key of visitor.concat(builder)) {
  123330. fields[key] = fields[key] || {};
  123331. }
  123332. for (const key of Object.keys(fields)) {
  123333. const field = fields[key];
  123334. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  123335. field.optional = true;
  123336. }
  123337. if (field.default === void 0) {
  123338. field.default = null;
  123339. } else if (!field.validate && field.default != null) {
  123340. field.validate = assertValueType(getType(field.default));
  123341. }
  123342. for (const k of Object.keys(field)) {
  123343. if (validFieldKeys.indexOf(k) === -1) {
  123344. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  123345. }
  123346. }
  123347. }
  123348. VISITOR_KEYS[type] = opts.visitor = visitor;
  123349. BUILDER_KEYS[type] = opts.builder = builder;
  123350. NODE_FIELDS[type] = opts.fields = fields;
  123351. ALIAS_KEYS[type] = opts.aliases = aliases;
  123352. aliases.forEach((alias) => {
  123353. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  123354. FLIPPED_ALIAS_KEYS[alias].push(type);
  123355. });
  123356. if (opts.validate) {
  123357. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  123358. }
  123359. store[type] = opts;
  123360. }
  123361. var store = {};
  123362. }
  123363. });
  123364. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/core.js
  123365. var require_core6 = __commonJS({
  123366. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  123367. "use strict";
  123368. Object.defineProperty(exports, "__esModule", {
  123369. value: true
  123370. });
  123371. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  123372. var _is = require_is6();
  123373. var _isValidIdentifier = require_isValidIdentifier6();
  123374. var _helperValidatorIdentifier = require_lib29();
  123375. var _constants = require_constants6();
  123376. var _utils = require_utils6();
  123377. (0, _utils.default)("ArrayExpression", {
  123378. fields: {
  123379. elements: {
  123380. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  123381. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  123382. }
  123383. },
  123384. visitor: ["elements"],
  123385. aliases: ["Expression"]
  123386. });
  123387. (0, _utils.default)("AssignmentExpression", {
  123388. fields: {
  123389. operator: {
  123390. validate: function() {
  123391. if (!process.env.BABEL_TYPES_8_BREAKING) {
  123392. return (0, _utils.assertValueType)("string");
  123393. }
  123394. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  123395. const pattern = (0, _utils.assertOneOf)("=");
  123396. return function(node, key, val) {
  123397. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  123398. validator(node, key, val);
  123399. };
  123400. }()
  123401. },
  123402. left: {
  123403. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  123404. },
  123405. right: {
  123406. validate: (0, _utils.assertNodeType)("Expression")
  123407. }
  123408. },
  123409. builder: ["operator", "left", "right"],
  123410. visitor: ["left", "right"],
  123411. aliases: ["Expression"]
  123412. });
  123413. (0, _utils.default)("BinaryExpression", {
  123414. builder: ["operator", "left", "right"],
  123415. fields: {
  123416. operator: {
  123417. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  123418. },
  123419. left: {
  123420. validate: function() {
  123421. const expression = (0, _utils.assertNodeType)("Expression");
  123422. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  123423. const validator = function(node, key, val) {
  123424. const validator2 = node.operator === "in" ? inOp : expression;
  123425. validator2(node, key, val);
  123426. };
  123427. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  123428. return validator;
  123429. }()
  123430. },
  123431. right: {
  123432. validate: (0, _utils.assertNodeType)("Expression")
  123433. }
  123434. },
  123435. visitor: ["left", "right"],
  123436. aliases: ["Binary", "Expression"]
  123437. });
  123438. (0, _utils.default)("InterpreterDirective", {
  123439. builder: ["value"],
  123440. fields: {
  123441. value: {
  123442. validate: (0, _utils.assertValueType)("string")
  123443. }
  123444. }
  123445. });
  123446. (0, _utils.default)("Directive", {
  123447. visitor: ["value"],
  123448. fields: {
  123449. value: {
  123450. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  123451. }
  123452. }
  123453. });
  123454. (0, _utils.default)("DirectiveLiteral", {
  123455. builder: ["value"],
  123456. fields: {
  123457. value: {
  123458. validate: (0, _utils.assertValueType)("string")
  123459. }
  123460. }
  123461. });
  123462. (0, _utils.default)("BlockStatement", {
  123463. builder: ["body", "directives"],
  123464. visitor: ["directives", "body"],
  123465. fields: {
  123466. directives: {
  123467. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  123468. default: []
  123469. },
  123470. body: {
  123471. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  123472. }
  123473. },
  123474. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  123475. });
  123476. (0, _utils.default)("BreakStatement", {
  123477. visitor: ["label"],
  123478. fields: {
  123479. label: {
  123480. validate: (0, _utils.assertNodeType)("Identifier"),
  123481. optional: true
  123482. }
  123483. },
  123484. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  123485. });
  123486. (0, _utils.default)("CallExpression", {
  123487. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  123488. builder: ["callee", "arguments"],
  123489. aliases: ["Expression"],
  123490. fields: Object.assign({
  123491. callee: {
  123492. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  123493. },
  123494. arguments: {
  123495. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  123496. }
  123497. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  123498. optional: {
  123499. validate: (0, _utils.assertOneOf)(true, false),
  123500. optional: true
  123501. }
  123502. } : {}, {
  123503. typeArguments: {
  123504. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  123505. optional: true
  123506. },
  123507. typeParameters: {
  123508. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  123509. optional: true
  123510. }
  123511. })
  123512. });
  123513. (0, _utils.default)("CatchClause", {
  123514. visitor: ["param", "body"],
  123515. fields: {
  123516. param: {
  123517. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  123518. optional: true
  123519. },
  123520. body: {
  123521. validate: (0, _utils.assertNodeType)("BlockStatement")
  123522. }
  123523. },
  123524. aliases: ["Scopable", "BlockParent"]
  123525. });
  123526. (0, _utils.default)("ConditionalExpression", {
  123527. visitor: ["test", "consequent", "alternate"],
  123528. fields: {
  123529. test: {
  123530. validate: (0, _utils.assertNodeType)("Expression")
  123531. },
  123532. consequent: {
  123533. validate: (0, _utils.assertNodeType)("Expression")
  123534. },
  123535. alternate: {
  123536. validate: (0, _utils.assertNodeType)("Expression")
  123537. }
  123538. },
  123539. aliases: ["Expression", "Conditional"]
  123540. });
  123541. (0, _utils.default)("ContinueStatement", {
  123542. visitor: ["label"],
  123543. fields: {
  123544. label: {
  123545. validate: (0, _utils.assertNodeType)("Identifier"),
  123546. optional: true
  123547. }
  123548. },
  123549. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  123550. });
  123551. (0, _utils.default)("DebuggerStatement", {
  123552. aliases: ["Statement"]
  123553. });
  123554. (0, _utils.default)("DoWhileStatement", {
  123555. visitor: ["test", "body"],
  123556. fields: {
  123557. test: {
  123558. validate: (0, _utils.assertNodeType)("Expression")
  123559. },
  123560. body: {
  123561. validate: (0, _utils.assertNodeType)("Statement")
  123562. }
  123563. },
  123564. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  123565. });
  123566. (0, _utils.default)("EmptyStatement", {
  123567. aliases: ["Statement"]
  123568. });
  123569. (0, _utils.default)("ExpressionStatement", {
  123570. visitor: ["expression"],
  123571. fields: {
  123572. expression: {
  123573. validate: (0, _utils.assertNodeType)("Expression")
  123574. }
  123575. },
  123576. aliases: ["Statement", "ExpressionWrapper"]
  123577. });
  123578. (0, _utils.default)("File", {
  123579. builder: ["program", "comments", "tokens"],
  123580. visitor: ["program"],
  123581. fields: {
  123582. program: {
  123583. validate: (0, _utils.assertNodeType)("Program")
  123584. },
  123585. comments: {
  123586. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  123587. }, {
  123588. each: {
  123589. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  123590. }
  123591. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  123592. optional: true
  123593. },
  123594. tokens: {
  123595. validate: (0, _utils.assertEach)(Object.assign(() => {
  123596. }, {
  123597. type: "any"
  123598. })),
  123599. optional: true
  123600. }
  123601. }
  123602. });
  123603. (0, _utils.default)("ForInStatement", {
  123604. visitor: ["left", "right", "body"],
  123605. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  123606. fields: {
  123607. left: {
  123608. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  123609. },
  123610. right: {
  123611. validate: (0, _utils.assertNodeType)("Expression")
  123612. },
  123613. body: {
  123614. validate: (0, _utils.assertNodeType)("Statement")
  123615. }
  123616. }
  123617. });
  123618. (0, _utils.default)("ForStatement", {
  123619. visitor: ["init", "test", "update", "body"],
  123620. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  123621. fields: {
  123622. init: {
  123623. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  123624. optional: true
  123625. },
  123626. test: {
  123627. validate: (0, _utils.assertNodeType)("Expression"),
  123628. optional: true
  123629. },
  123630. update: {
  123631. validate: (0, _utils.assertNodeType)("Expression"),
  123632. optional: true
  123633. },
  123634. body: {
  123635. validate: (0, _utils.assertNodeType)("Statement")
  123636. }
  123637. }
  123638. });
  123639. var functionCommon = {
  123640. params: {
  123641. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  123642. },
  123643. generator: {
  123644. default: false
  123645. },
  123646. async: {
  123647. default: false
  123648. }
  123649. };
  123650. exports.functionCommon = functionCommon;
  123651. var functionTypeAnnotationCommon = {
  123652. returnType: {
  123653. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  123654. optional: true
  123655. },
  123656. typeParameters: {
  123657. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  123658. optional: true
  123659. }
  123660. };
  123661. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  123662. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  123663. declare: {
  123664. validate: (0, _utils.assertValueType)("boolean"),
  123665. optional: true
  123666. },
  123667. id: {
  123668. validate: (0, _utils.assertNodeType)("Identifier"),
  123669. optional: true
  123670. }
  123671. });
  123672. exports.functionDeclarationCommon = functionDeclarationCommon;
  123673. (0, _utils.default)("FunctionDeclaration", {
  123674. builder: ["id", "params", "body", "generator", "async"],
  123675. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  123676. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  123677. body: {
  123678. validate: (0, _utils.assertNodeType)("BlockStatement")
  123679. }
  123680. }),
  123681. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  123682. validate: function() {
  123683. if (!process.env.BABEL_TYPES_8_BREAKING)
  123684. return () => {
  123685. };
  123686. const identifier = (0, _utils.assertNodeType)("Identifier");
  123687. return function(parent, key, node) {
  123688. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  123689. identifier(node, "id", node.id);
  123690. }
  123691. };
  123692. }()
  123693. });
  123694. (0, _utils.default)("FunctionExpression", {
  123695. inherits: "FunctionDeclaration",
  123696. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  123697. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  123698. id: {
  123699. validate: (0, _utils.assertNodeType)("Identifier"),
  123700. optional: true
  123701. },
  123702. body: {
  123703. validate: (0, _utils.assertNodeType)("BlockStatement")
  123704. }
  123705. })
  123706. });
  123707. var patternLikeCommon = {
  123708. typeAnnotation: {
  123709. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  123710. optional: true
  123711. },
  123712. decorators: {
  123713. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  123714. }
  123715. };
  123716. exports.patternLikeCommon = patternLikeCommon;
  123717. (0, _utils.default)("Identifier", {
  123718. builder: ["name"],
  123719. visitor: ["typeAnnotation", "decorators"],
  123720. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  123721. fields: Object.assign({}, patternLikeCommon, {
  123722. name: {
  123723. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  123724. if (!process.env.BABEL_TYPES_8_BREAKING)
  123725. return;
  123726. if (!(0, _isValidIdentifier.default)(val, false)) {
  123727. throw new TypeError(`"${val}" is not a valid identifier name`);
  123728. }
  123729. }, {
  123730. type: "string"
  123731. }))
  123732. },
  123733. optional: {
  123734. validate: (0, _utils.assertValueType)("boolean"),
  123735. optional: true
  123736. }
  123737. }),
  123738. validate(parent, key, node) {
  123739. if (!process.env.BABEL_TYPES_8_BREAKING)
  123740. return;
  123741. const match = /\.(\w+)$/.exec(key);
  123742. if (!match)
  123743. return;
  123744. const [, parentKey] = match;
  123745. const nonComp = {
  123746. computed: false
  123747. };
  123748. if (parentKey === "property") {
  123749. if ((0, _is.default)("MemberExpression", parent, nonComp))
  123750. return;
  123751. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  123752. return;
  123753. } else if (parentKey === "key") {
  123754. if ((0, _is.default)("Property", parent, nonComp))
  123755. return;
  123756. if ((0, _is.default)("Method", parent, nonComp))
  123757. return;
  123758. } else if (parentKey === "exported") {
  123759. if ((0, _is.default)("ExportSpecifier", parent))
  123760. return;
  123761. } else if (parentKey === "imported") {
  123762. if ((0, _is.default)("ImportSpecifier", parent, {
  123763. imported: node
  123764. }))
  123765. return;
  123766. } else if (parentKey === "meta") {
  123767. if ((0, _is.default)("MetaProperty", parent, {
  123768. meta: node
  123769. }))
  123770. return;
  123771. }
  123772. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  123773. throw new TypeError(`"${node.name}" is not a valid identifier`);
  123774. }
  123775. }
  123776. });
  123777. (0, _utils.default)("IfStatement", {
  123778. visitor: ["test", "consequent", "alternate"],
  123779. aliases: ["Statement", "Conditional"],
  123780. fields: {
  123781. test: {
  123782. validate: (0, _utils.assertNodeType)("Expression")
  123783. },
  123784. consequent: {
  123785. validate: (0, _utils.assertNodeType)("Statement")
  123786. },
  123787. alternate: {
  123788. optional: true,
  123789. validate: (0, _utils.assertNodeType)("Statement")
  123790. }
  123791. }
  123792. });
  123793. (0, _utils.default)("LabeledStatement", {
  123794. visitor: ["label", "body"],
  123795. aliases: ["Statement"],
  123796. fields: {
  123797. label: {
  123798. validate: (0, _utils.assertNodeType)("Identifier")
  123799. },
  123800. body: {
  123801. validate: (0, _utils.assertNodeType)("Statement")
  123802. }
  123803. }
  123804. });
  123805. (0, _utils.default)("StringLiteral", {
  123806. builder: ["value"],
  123807. fields: {
  123808. value: {
  123809. validate: (0, _utils.assertValueType)("string")
  123810. }
  123811. },
  123812. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  123813. });
  123814. (0, _utils.default)("NumericLiteral", {
  123815. builder: ["value"],
  123816. deprecatedAlias: "NumberLiteral",
  123817. fields: {
  123818. value: {
  123819. validate: (0, _utils.assertValueType)("number")
  123820. }
  123821. },
  123822. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  123823. });
  123824. (0, _utils.default)("NullLiteral", {
  123825. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  123826. });
  123827. (0, _utils.default)("BooleanLiteral", {
  123828. builder: ["value"],
  123829. fields: {
  123830. value: {
  123831. validate: (0, _utils.assertValueType)("boolean")
  123832. }
  123833. },
  123834. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  123835. });
  123836. (0, _utils.default)("RegExpLiteral", {
  123837. builder: ["pattern", "flags"],
  123838. deprecatedAlias: "RegexLiteral",
  123839. aliases: ["Expression", "Pureish", "Literal"],
  123840. fields: {
  123841. pattern: {
  123842. validate: (0, _utils.assertValueType)("string")
  123843. },
  123844. flags: {
  123845. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  123846. if (!process.env.BABEL_TYPES_8_BREAKING)
  123847. return;
  123848. const invalid2 = /[^gimsuy]/.exec(val);
  123849. if (invalid2) {
  123850. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  123851. }
  123852. }, {
  123853. type: "string"
  123854. })),
  123855. default: ""
  123856. }
  123857. }
  123858. });
  123859. (0, _utils.default)("LogicalExpression", {
  123860. builder: ["operator", "left", "right"],
  123861. visitor: ["left", "right"],
  123862. aliases: ["Binary", "Expression"],
  123863. fields: {
  123864. operator: {
  123865. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  123866. },
  123867. left: {
  123868. validate: (0, _utils.assertNodeType)("Expression")
  123869. },
  123870. right: {
  123871. validate: (0, _utils.assertNodeType)("Expression")
  123872. }
  123873. }
  123874. });
  123875. (0, _utils.default)("MemberExpression", {
  123876. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  123877. visitor: ["object", "property"],
  123878. aliases: ["Expression", "LVal"],
  123879. fields: Object.assign({
  123880. object: {
  123881. validate: (0, _utils.assertNodeType)("Expression")
  123882. },
  123883. property: {
  123884. validate: function() {
  123885. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  123886. const computed = (0, _utils.assertNodeType)("Expression");
  123887. const validator = function(node, key, val) {
  123888. const validator2 = node.computed ? computed : normal;
  123889. validator2(node, key, val);
  123890. };
  123891. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  123892. return validator;
  123893. }()
  123894. },
  123895. computed: {
  123896. default: false
  123897. }
  123898. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  123899. optional: {
  123900. validate: (0, _utils.assertOneOf)(true, false),
  123901. optional: true
  123902. }
  123903. } : {})
  123904. });
  123905. (0, _utils.default)("NewExpression", {
  123906. inherits: "CallExpression"
  123907. });
  123908. (0, _utils.default)("Program", {
  123909. visitor: ["directives", "body"],
  123910. builder: ["body", "directives", "sourceType", "interpreter"],
  123911. fields: {
  123912. sourceFile: {
  123913. validate: (0, _utils.assertValueType)("string")
  123914. },
  123915. sourceType: {
  123916. validate: (0, _utils.assertOneOf)("script", "module"),
  123917. default: "script"
  123918. },
  123919. interpreter: {
  123920. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  123921. default: null,
  123922. optional: true
  123923. },
  123924. directives: {
  123925. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  123926. default: []
  123927. },
  123928. body: {
  123929. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  123930. }
  123931. },
  123932. aliases: ["Scopable", "BlockParent", "Block"]
  123933. });
  123934. (0, _utils.default)("ObjectExpression", {
  123935. visitor: ["properties"],
  123936. aliases: ["Expression"],
  123937. fields: {
  123938. properties: {
  123939. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  123940. }
  123941. }
  123942. });
  123943. (0, _utils.default)("ObjectMethod", {
  123944. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  123945. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  123946. kind: Object.assign({
  123947. validate: (0, _utils.assertOneOf)("method", "get", "set")
  123948. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  123949. default: "method"
  123950. } : {}),
  123951. computed: {
  123952. default: false
  123953. },
  123954. key: {
  123955. validate: function() {
  123956. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  123957. const computed = (0, _utils.assertNodeType)("Expression");
  123958. const validator = function(node, key, val) {
  123959. const validator2 = node.computed ? computed : normal;
  123960. validator2(node, key, val);
  123961. };
  123962. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  123963. return validator;
  123964. }()
  123965. },
  123966. decorators: {
  123967. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  123968. optional: true
  123969. },
  123970. body: {
  123971. validate: (0, _utils.assertNodeType)("BlockStatement")
  123972. }
  123973. }),
  123974. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  123975. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  123976. });
  123977. (0, _utils.default)("ObjectProperty", {
  123978. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  123979. fields: {
  123980. computed: {
  123981. default: false
  123982. },
  123983. key: {
  123984. validate: function() {
  123985. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  123986. const computed = (0, _utils.assertNodeType)("Expression");
  123987. const validator = function(node, key, val) {
  123988. const validator2 = node.computed ? computed : normal;
  123989. validator2(node, key, val);
  123990. };
  123991. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  123992. return validator;
  123993. }()
  123994. },
  123995. value: {
  123996. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  123997. },
  123998. shorthand: {
  123999. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  124000. if (!process.env.BABEL_TYPES_8_BREAKING)
  124001. return;
  124002. if (val && node.computed) {
  124003. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  124004. }
  124005. }, {
  124006. type: "boolean"
  124007. }), function(node, key, val) {
  124008. if (!process.env.BABEL_TYPES_8_BREAKING)
  124009. return;
  124010. if (val && !(0, _is.default)("Identifier", node.key)) {
  124011. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  124012. }
  124013. }),
  124014. default: false
  124015. },
  124016. decorators: {
  124017. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124018. optional: true
  124019. }
  124020. },
  124021. visitor: ["key", "value", "decorators"],
  124022. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  124023. validate: function() {
  124024. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  124025. const expression = (0, _utils.assertNodeType)("Expression");
  124026. return function(parent, key, node) {
  124027. if (!process.env.BABEL_TYPES_8_BREAKING)
  124028. return;
  124029. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  124030. validator(node, "value", node.value);
  124031. };
  124032. }()
  124033. });
  124034. (0, _utils.default)("RestElement", {
  124035. visitor: ["argument", "typeAnnotation"],
  124036. builder: ["argument"],
  124037. aliases: ["LVal", "PatternLike"],
  124038. deprecatedAlias: "RestProperty",
  124039. fields: Object.assign({}, patternLikeCommon, {
  124040. argument: {
  124041. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  124042. }
  124043. }),
  124044. validate(parent, key) {
  124045. if (!process.env.BABEL_TYPES_8_BREAKING)
  124046. return;
  124047. const match = /(\w+)\[(\d+)\]/.exec(key);
  124048. if (!match)
  124049. throw new Error("Internal Babel error: malformed key.");
  124050. const [, listKey, index2] = match;
  124051. if (parent[listKey].length > index2 + 1) {
  124052. throw new TypeError(`RestElement must be last element of ${listKey}`);
  124053. }
  124054. }
  124055. });
  124056. (0, _utils.default)("ReturnStatement", {
  124057. visitor: ["argument"],
  124058. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  124059. fields: {
  124060. argument: {
  124061. validate: (0, _utils.assertNodeType)("Expression"),
  124062. optional: true
  124063. }
  124064. }
  124065. });
  124066. (0, _utils.default)("SequenceExpression", {
  124067. visitor: ["expressions"],
  124068. fields: {
  124069. expressions: {
  124070. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  124071. }
  124072. },
  124073. aliases: ["Expression"]
  124074. });
  124075. (0, _utils.default)("ParenthesizedExpression", {
  124076. visitor: ["expression"],
  124077. aliases: ["Expression", "ExpressionWrapper"],
  124078. fields: {
  124079. expression: {
  124080. validate: (0, _utils.assertNodeType)("Expression")
  124081. }
  124082. }
  124083. });
  124084. (0, _utils.default)("SwitchCase", {
  124085. visitor: ["test", "consequent"],
  124086. fields: {
  124087. test: {
  124088. validate: (0, _utils.assertNodeType)("Expression"),
  124089. optional: true
  124090. },
  124091. consequent: {
  124092. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  124093. }
  124094. }
  124095. });
  124096. (0, _utils.default)("SwitchStatement", {
  124097. visitor: ["discriminant", "cases"],
  124098. aliases: ["Statement", "BlockParent", "Scopable"],
  124099. fields: {
  124100. discriminant: {
  124101. validate: (0, _utils.assertNodeType)("Expression")
  124102. },
  124103. cases: {
  124104. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  124105. }
  124106. }
  124107. });
  124108. (0, _utils.default)("ThisExpression", {
  124109. aliases: ["Expression"]
  124110. });
  124111. (0, _utils.default)("ThrowStatement", {
  124112. visitor: ["argument"],
  124113. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  124114. fields: {
  124115. argument: {
  124116. validate: (0, _utils.assertNodeType)("Expression")
  124117. }
  124118. }
  124119. });
  124120. (0, _utils.default)("TryStatement", {
  124121. visitor: ["block", "handler", "finalizer"],
  124122. aliases: ["Statement"],
  124123. fields: {
  124124. block: {
  124125. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  124126. if (!process.env.BABEL_TYPES_8_BREAKING)
  124127. return;
  124128. if (!node.handler && !node.finalizer) {
  124129. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  124130. }
  124131. }, {
  124132. oneOfNodeTypes: ["BlockStatement"]
  124133. }))
  124134. },
  124135. handler: {
  124136. optional: true,
  124137. validate: (0, _utils.assertNodeType)("CatchClause")
  124138. },
  124139. finalizer: {
  124140. optional: true,
  124141. validate: (0, _utils.assertNodeType)("BlockStatement")
  124142. }
  124143. }
  124144. });
  124145. (0, _utils.default)("UnaryExpression", {
  124146. builder: ["operator", "argument", "prefix"],
  124147. fields: {
  124148. prefix: {
  124149. default: true
  124150. },
  124151. argument: {
  124152. validate: (0, _utils.assertNodeType)("Expression")
  124153. },
  124154. operator: {
  124155. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  124156. }
  124157. },
  124158. visitor: ["argument"],
  124159. aliases: ["UnaryLike", "Expression"]
  124160. });
  124161. (0, _utils.default)("UpdateExpression", {
  124162. builder: ["operator", "argument", "prefix"],
  124163. fields: {
  124164. prefix: {
  124165. default: false
  124166. },
  124167. argument: {
  124168. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  124169. },
  124170. operator: {
  124171. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  124172. }
  124173. },
  124174. visitor: ["argument"],
  124175. aliases: ["Expression"]
  124176. });
  124177. (0, _utils.default)("VariableDeclaration", {
  124178. builder: ["kind", "declarations"],
  124179. visitor: ["declarations"],
  124180. aliases: ["Statement", "Declaration"],
  124181. fields: {
  124182. declare: {
  124183. validate: (0, _utils.assertValueType)("boolean"),
  124184. optional: true
  124185. },
  124186. kind: {
  124187. validate: (0, _utils.assertOneOf)("var", "let", "const")
  124188. },
  124189. declarations: {
  124190. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  124191. }
  124192. },
  124193. validate(parent, key, node) {
  124194. if (!process.env.BABEL_TYPES_8_BREAKING)
  124195. return;
  124196. if (!(0, _is.default)("ForXStatement", parent, {
  124197. left: node
  124198. }))
  124199. return;
  124200. if (node.declarations.length !== 1) {
  124201. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  124202. }
  124203. }
  124204. });
  124205. (0, _utils.default)("VariableDeclarator", {
  124206. visitor: ["id", "init"],
  124207. fields: {
  124208. id: {
  124209. validate: function() {
  124210. if (!process.env.BABEL_TYPES_8_BREAKING) {
  124211. return (0, _utils.assertNodeType)("LVal");
  124212. }
  124213. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  124214. const without = (0, _utils.assertNodeType)("Identifier");
  124215. return function(node, key, val) {
  124216. const validator = node.init ? normal : without;
  124217. validator(node, key, val);
  124218. };
  124219. }()
  124220. },
  124221. definite: {
  124222. optional: true,
  124223. validate: (0, _utils.assertValueType)("boolean")
  124224. },
  124225. init: {
  124226. optional: true,
  124227. validate: (0, _utils.assertNodeType)("Expression")
  124228. }
  124229. }
  124230. });
  124231. (0, _utils.default)("WhileStatement", {
  124232. visitor: ["test", "body"],
  124233. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  124234. fields: {
  124235. test: {
  124236. validate: (0, _utils.assertNodeType)("Expression")
  124237. },
  124238. body: {
  124239. validate: (0, _utils.assertNodeType)("Statement")
  124240. }
  124241. }
  124242. });
  124243. (0, _utils.default)("WithStatement", {
  124244. visitor: ["object", "body"],
  124245. aliases: ["Statement"],
  124246. fields: {
  124247. object: {
  124248. validate: (0, _utils.assertNodeType)("Expression")
  124249. },
  124250. body: {
  124251. validate: (0, _utils.assertNodeType)("Statement")
  124252. }
  124253. }
  124254. });
  124255. (0, _utils.default)("AssignmentPattern", {
  124256. visitor: ["left", "right", "decorators"],
  124257. builder: ["left", "right"],
  124258. aliases: ["Pattern", "PatternLike", "LVal"],
  124259. fields: Object.assign({}, patternLikeCommon, {
  124260. left: {
  124261. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  124262. },
  124263. right: {
  124264. validate: (0, _utils.assertNodeType)("Expression")
  124265. },
  124266. decorators: {
  124267. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124268. optional: true
  124269. }
  124270. })
  124271. });
  124272. (0, _utils.default)("ArrayPattern", {
  124273. visitor: ["elements", "typeAnnotation"],
  124274. builder: ["elements"],
  124275. aliases: ["Pattern", "PatternLike", "LVal"],
  124276. fields: Object.assign({}, patternLikeCommon, {
  124277. elements: {
  124278. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  124279. },
  124280. decorators: {
  124281. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124282. optional: true
  124283. }
  124284. })
  124285. });
  124286. (0, _utils.default)("ArrowFunctionExpression", {
  124287. builder: ["params", "body", "async"],
  124288. visitor: ["params", "body", "returnType", "typeParameters"],
  124289. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  124290. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  124291. expression: {
  124292. validate: (0, _utils.assertValueType)("boolean")
  124293. },
  124294. body: {
  124295. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  124296. }
  124297. })
  124298. });
  124299. (0, _utils.default)("ClassBody", {
  124300. visitor: ["body"],
  124301. fields: {
  124302. body: {
  124303. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  124304. }
  124305. }
  124306. });
  124307. (0, _utils.default)("ClassExpression", {
  124308. builder: ["id", "superClass", "body", "decorators"],
  124309. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  124310. aliases: ["Scopable", "Class", "Expression"],
  124311. fields: {
  124312. id: {
  124313. validate: (0, _utils.assertNodeType)("Identifier"),
  124314. optional: true
  124315. },
  124316. typeParameters: {
  124317. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  124318. optional: true
  124319. },
  124320. body: {
  124321. validate: (0, _utils.assertNodeType)("ClassBody")
  124322. },
  124323. superClass: {
  124324. optional: true,
  124325. validate: (0, _utils.assertNodeType)("Expression")
  124326. },
  124327. superTypeParameters: {
  124328. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  124329. optional: true
  124330. },
  124331. implements: {
  124332. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  124333. optional: true
  124334. },
  124335. decorators: {
  124336. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124337. optional: true
  124338. },
  124339. mixins: {
  124340. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  124341. optional: true
  124342. }
  124343. }
  124344. });
  124345. (0, _utils.default)("ClassDeclaration", {
  124346. inherits: "ClassExpression",
  124347. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  124348. fields: {
  124349. id: {
  124350. validate: (0, _utils.assertNodeType)("Identifier")
  124351. },
  124352. typeParameters: {
  124353. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  124354. optional: true
  124355. },
  124356. body: {
  124357. validate: (0, _utils.assertNodeType)("ClassBody")
  124358. },
  124359. superClass: {
  124360. optional: true,
  124361. validate: (0, _utils.assertNodeType)("Expression")
  124362. },
  124363. superTypeParameters: {
  124364. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  124365. optional: true
  124366. },
  124367. implements: {
  124368. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  124369. optional: true
  124370. },
  124371. decorators: {
  124372. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124373. optional: true
  124374. },
  124375. mixins: {
  124376. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  124377. optional: true
  124378. },
  124379. declare: {
  124380. validate: (0, _utils.assertValueType)("boolean"),
  124381. optional: true
  124382. },
  124383. abstract: {
  124384. validate: (0, _utils.assertValueType)("boolean"),
  124385. optional: true
  124386. }
  124387. },
  124388. validate: function() {
  124389. const identifier = (0, _utils.assertNodeType)("Identifier");
  124390. return function(parent, key, node) {
  124391. if (!process.env.BABEL_TYPES_8_BREAKING)
  124392. return;
  124393. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  124394. identifier(node, "id", node.id);
  124395. }
  124396. };
  124397. }()
  124398. });
  124399. (0, _utils.default)("ExportAllDeclaration", {
  124400. visitor: ["source"],
  124401. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  124402. fields: {
  124403. source: {
  124404. validate: (0, _utils.assertNodeType)("StringLiteral")
  124405. },
  124406. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  124407. assertions: {
  124408. optional: true,
  124409. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  124410. }
  124411. }
  124412. });
  124413. (0, _utils.default)("ExportDefaultDeclaration", {
  124414. visitor: ["declaration"],
  124415. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  124416. fields: {
  124417. declaration: {
  124418. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  124419. }
  124420. }
  124421. });
  124422. (0, _utils.default)("ExportNamedDeclaration", {
  124423. visitor: ["declaration", "specifiers", "source"],
  124424. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  124425. fields: {
  124426. declaration: {
  124427. optional: true,
  124428. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  124429. if (!process.env.BABEL_TYPES_8_BREAKING)
  124430. return;
  124431. if (val && node.specifiers.length) {
  124432. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  124433. }
  124434. }, {
  124435. oneOfNodeTypes: ["Declaration"]
  124436. }), function(node, key, val) {
  124437. if (!process.env.BABEL_TYPES_8_BREAKING)
  124438. return;
  124439. if (val && node.source) {
  124440. throw new TypeError("Cannot export a declaration from a source");
  124441. }
  124442. })
  124443. },
  124444. assertions: {
  124445. optional: true,
  124446. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  124447. },
  124448. specifiers: {
  124449. default: [],
  124450. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  124451. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  124452. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  124453. if (!process.env.BABEL_TYPES_8_BREAKING)
  124454. return sourced;
  124455. return function(node, key, val) {
  124456. const validator = node.source ? sourced : sourceless;
  124457. validator(node, key, val);
  124458. };
  124459. }()))
  124460. },
  124461. source: {
  124462. validate: (0, _utils.assertNodeType)("StringLiteral"),
  124463. optional: true
  124464. },
  124465. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  124466. }
  124467. });
  124468. (0, _utils.default)("ExportSpecifier", {
  124469. visitor: ["local", "exported"],
  124470. aliases: ["ModuleSpecifier"],
  124471. fields: {
  124472. local: {
  124473. validate: (0, _utils.assertNodeType)("Identifier")
  124474. },
  124475. exported: {
  124476. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  124477. }
  124478. }
  124479. });
  124480. (0, _utils.default)("ForOfStatement", {
  124481. visitor: ["left", "right", "body"],
  124482. builder: ["left", "right", "body", "await"],
  124483. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  124484. fields: {
  124485. left: {
  124486. validate: function() {
  124487. if (!process.env.BABEL_TYPES_8_BREAKING) {
  124488. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  124489. }
  124490. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  124491. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  124492. return function(node, key, val) {
  124493. if ((0, _is.default)("VariableDeclaration", val)) {
  124494. declaration(node, key, val);
  124495. } else {
  124496. lval(node, key, val);
  124497. }
  124498. };
  124499. }()
  124500. },
  124501. right: {
  124502. validate: (0, _utils.assertNodeType)("Expression")
  124503. },
  124504. body: {
  124505. validate: (0, _utils.assertNodeType)("Statement")
  124506. },
  124507. await: {
  124508. default: false
  124509. }
  124510. }
  124511. });
  124512. (0, _utils.default)("ImportDeclaration", {
  124513. visitor: ["specifiers", "source"],
  124514. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  124515. fields: {
  124516. assertions: {
  124517. optional: true,
  124518. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  124519. },
  124520. specifiers: {
  124521. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  124522. },
  124523. source: {
  124524. validate: (0, _utils.assertNodeType)("StringLiteral")
  124525. },
  124526. importKind: {
  124527. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  124528. optional: true
  124529. }
  124530. }
  124531. });
  124532. (0, _utils.default)("ImportDefaultSpecifier", {
  124533. visitor: ["local"],
  124534. aliases: ["ModuleSpecifier"],
  124535. fields: {
  124536. local: {
  124537. validate: (0, _utils.assertNodeType)("Identifier")
  124538. }
  124539. }
  124540. });
  124541. (0, _utils.default)("ImportNamespaceSpecifier", {
  124542. visitor: ["local"],
  124543. aliases: ["ModuleSpecifier"],
  124544. fields: {
  124545. local: {
  124546. validate: (0, _utils.assertNodeType)("Identifier")
  124547. }
  124548. }
  124549. });
  124550. (0, _utils.default)("ImportSpecifier", {
  124551. visitor: ["local", "imported"],
  124552. aliases: ["ModuleSpecifier"],
  124553. fields: {
  124554. local: {
  124555. validate: (0, _utils.assertNodeType)("Identifier")
  124556. },
  124557. imported: {
  124558. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  124559. },
  124560. importKind: {
  124561. validate: (0, _utils.assertOneOf)("type", "typeof"),
  124562. optional: true
  124563. }
  124564. }
  124565. });
  124566. (0, _utils.default)("MetaProperty", {
  124567. visitor: ["meta", "property"],
  124568. aliases: ["Expression"],
  124569. fields: {
  124570. meta: {
  124571. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  124572. if (!process.env.BABEL_TYPES_8_BREAKING)
  124573. return;
  124574. let property;
  124575. switch (val.name) {
  124576. case "function":
  124577. property = "sent";
  124578. break;
  124579. case "new":
  124580. property = "target";
  124581. break;
  124582. case "import":
  124583. property = "meta";
  124584. break;
  124585. }
  124586. if (!(0, _is.default)("Identifier", node.property, {
  124587. name: property
  124588. })) {
  124589. throw new TypeError("Unrecognised MetaProperty");
  124590. }
  124591. }, {
  124592. oneOfNodeTypes: ["Identifier"]
  124593. }))
  124594. },
  124595. property: {
  124596. validate: (0, _utils.assertNodeType)("Identifier")
  124597. }
  124598. }
  124599. });
  124600. var classMethodOrPropertyCommon = {
  124601. abstract: {
  124602. validate: (0, _utils.assertValueType)("boolean"),
  124603. optional: true
  124604. },
  124605. accessibility: {
  124606. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  124607. optional: true
  124608. },
  124609. static: {
  124610. default: false
  124611. },
  124612. override: {
  124613. default: false
  124614. },
  124615. computed: {
  124616. default: false
  124617. },
  124618. optional: {
  124619. validate: (0, _utils.assertValueType)("boolean"),
  124620. optional: true
  124621. },
  124622. key: {
  124623. validate: (0, _utils.chain)(function() {
  124624. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  124625. const computed = (0, _utils.assertNodeType)("Expression");
  124626. return function(node, key, val) {
  124627. const validator = node.computed ? computed : normal;
  124628. validator(node, key, val);
  124629. };
  124630. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  124631. }
  124632. };
  124633. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  124634. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  124635. params: {
  124636. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  124637. },
  124638. kind: {
  124639. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  124640. default: "method"
  124641. },
  124642. access: {
  124643. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  124644. optional: true
  124645. },
  124646. decorators: {
  124647. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  124648. optional: true
  124649. }
  124650. });
  124651. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  124652. (0, _utils.default)("ClassMethod", {
  124653. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  124654. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  124655. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  124656. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  124657. body: {
  124658. validate: (0, _utils.assertNodeType)("BlockStatement")
  124659. }
  124660. })
  124661. });
  124662. (0, _utils.default)("ObjectPattern", {
  124663. visitor: ["properties", "typeAnnotation", "decorators"],
  124664. builder: ["properties"],
  124665. aliases: ["Pattern", "PatternLike", "LVal"],
  124666. fields: Object.assign({}, patternLikeCommon, {
  124667. properties: {
  124668. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  124669. }
  124670. })
  124671. });
  124672. (0, _utils.default)("SpreadElement", {
  124673. visitor: ["argument"],
  124674. aliases: ["UnaryLike"],
  124675. deprecatedAlias: "SpreadProperty",
  124676. fields: {
  124677. argument: {
  124678. validate: (0, _utils.assertNodeType)("Expression")
  124679. }
  124680. }
  124681. });
  124682. (0, _utils.default)("Super", {
  124683. aliases: ["Expression"]
  124684. });
  124685. (0, _utils.default)("TaggedTemplateExpression", {
  124686. visitor: ["tag", "quasi"],
  124687. aliases: ["Expression"],
  124688. fields: {
  124689. tag: {
  124690. validate: (0, _utils.assertNodeType)("Expression")
  124691. },
  124692. quasi: {
  124693. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  124694. },
  124695. typeParameters: {
  124696. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  124697. optional: true
  124698. }
  124699. }
  124700. });
  124701. (0, _utils.default)("TemplateElement", {
  124702. builder: ["value", "tail"],
  124703. fields: {
  124704. value: {
  124705. validate: (0, _utils.assertShape)({
  124706. raw: {
  124707. validate: (0, _utils.assertValueType)("string")
  124708. },
  124709. cooked: {
  124710. validate: (0, _utils.assertValueType)("string"),
  124711. optional: true
  124712. }
  124713. })
  124714. },
  124715. tail: {
  124716. default: false
  124717. }
  124718. }
  124719. });
  124720. (0, _utils.default)("TemplateLiteral", {
  124721. visitor: ["quasis", "expressions"],
  124722. aliases: ["Expression", "Literal"],
  124723. fields: {
  124724. quasis: {
  124725. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  124726. },
  124727. expressions: {
  124728. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  124729. if (node.quasis.length !== val.length + 1) {
  124730. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  124731. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  124732. }
  124733. })
  124734. }
  124735. }
  124736. });
  124737. (0, _utils.default)("YieldExpression", {
  124738. builder: ["argument", "delegate"],
  124739. visitor: ["argument"],
  124740. aliases: ["Expression", "Terminatorless"],
  124741. fields: {
  124742. delegate: {
  124743. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  124744. if (!process.env.BABEL_TYPES_8_BREAKING)
  124745. return;
  124746. if (val && !node.argument) {
  124747. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  124748. }
  124749. }, {
  124750. type: "boolean"
  124751. })),
  124752. default: false
  124753. },
  124754. argument: {
  124755. optional: true,
  124756. validate: (0, _utils.assertNodeType)("Expression")
  124757. }
  124758. }
  124759. });
  124760. (0, _utils.default)("AwaitExpression", {
  124761. builder: ["argument"],
  124762. visitor: ["argument"],
  124763. aliases: ["Expression", "Terminatorless"],
  124764. fields: {
  124765. argument: {
  124766. validate: (0, _utils.assertNodeType)("Expression")
  124767. }
  124768. }
  124769. });
  124770. (0, _utils.default)("Import", {
  124771. aliases: ["Expression"]
  124772. });
  124773. (0, _utils.default)("BigIntLiteral", {
  124774. builder: ["value"],
  124775. fields: {
  124776. value: {
  124777. validate: (0, _utils.assertValueType)("string")
  124778. }
  124779. },
  124780. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  124781. });
  124782. (0, _utils.default)("ExportNamespaceSpecifier", {
  124783. visitor: ["exported"],
  124784. aliases: ["ModuleSpecifier"],
  124785. fields: {
  124786. exported: {
  124787. validate: (0, _utils.assertNodeType)("Identifier")
  124788. }
  124789. }
  124790. });
  124791. (0, _utils.default)("OptionalMemberExpression", {
  124792. builder: ["object", "property", "computed", "optional"],
  124793. visitor: ["object", "property"],
  124794. aliases: ["Expression"],
  124795. fields: {
  124796. object: {
  124797. validate: (0, _utils.assertNodeType)("Expression")
  124798. },
  124799. property: {
  124800. validate: function() {
  124801. const normal = (0, _utils.assertNodeType)("Identifier");
  124802. const computed = (0, _utils.assertNodeType)("Expression");
  124803. const validator = function(node, key, val) {
  124804. const validator2 = node.computed ? computed : normal;
  124805. validator2(node, key, val);
  124806. };
  124807. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  124808. return validator;
  124809. }()
  124810. },
  124811. computed: {
  124812. default: false
  124813. },
  124814. optional: {
  124815. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  124816. }
  124817. }
  124818. });
  124819. (0, _utils.default)("OptionalCallExpression", {
  124820. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  124821. builder: ["callee", "arguments", "optional"],
  124822. aliases: ["Expression"],
  124823. fields: {
  124824. callee: {
  124825. validate: (0, _utils.assertNodeType)("Expression")
  124826. },
  124827. arguments: {
  124828. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  124829. },
  124830. optional: {
  124831. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  124832. },
  124833. typeArguments: {
  124834. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  124835. optional: true
  124836. },
  124837. typeParameters: {
  124838. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  124839. optional: true
  124840. }
  124841. }
  124842. });
  124843. }
  124844. });
  124845. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/flow.js
  124846. var require_flow8 = __commonJS({
  124847. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/flow.js"() {
  124848. "use strict";
  124849. var _utils = require_utils6();
  124850. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  124851. (0, _utils.default)(name2, {
  124852. builder: ["id", "typeParameters", "extends", "body"],
  124853. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  124854. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124855. fields: {
  124856. id: (0, _utils.validateType)("Identifier"),
  124857. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  124858. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  124859. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  124860. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  124861. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  124862. }
  124863. });
  124864. };
  124865. (0, _utils.default)("AnyTypeAnnotation", {
  124866. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  124867. });
  124868. (0, _utils.default)("ArrayTypeAnnotation", {
  124869. visitor: ["elementType"],
  124870. aliases: ["Flow", "FlowType"],
  124871. fields: {
  124872. elementType: (0, _utils.validateType)("FlowType")
  124873. }
  124874. });
  124875. (0, _utils.default)("BooleanTypeAnnotation", {
  124876. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  124877. });
  124878. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  124879. builder: ["value"],
  124880. aliases: ["Flow", "FlowType"],
  124881. fields: {
  124882. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  124883. }
  124884. });
  124885. (0, _utils.default)("NullLiteralTypeAnnotation", {
  124886. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  124887. });
  124888. (0, _utils.default)("ClassImplements", {
  124889. visitor: ["id", "typeParameters"],
  124890. aliases: ["Flow"],
  124891. fields: {
  124892. id: (0, _utils.validateType)("Identifier"),
  124893. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  124894. }
  124895. });
  124896. defineInterfaceishType("DeclareClass");
  124897. (0, _utils.default)("DeclareFunction", {
  124898. visitor: ["id"],
  124899. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124900. fields: {
  124901. id: (0, _utils.validateType)("Identifier"),
  124902. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  124903. }
  124904. });
  124905. defineInterfaceishType("DeclareInterface");
  124906. (0, _utils.default)("DeclareModule", {
  124907. builder: ["id", "body", "kind"],
  124908. visitor: ["id", "body"],
  124909. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124910. fields: {
  124911. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  124912. body: (0, _utils.validateType)("BlockStatement"),
  124913. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  124914. }
  124915. });
  124916. (0, _utils.default)("DeclareModuleExports", {
  124917. visitor: ["typeAnnotation"],
  124918. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124919. fields: {
  124920. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  124921. }
  124922. });
  124923. (0, _utils.default)("DeclareTypeAlias", {
  124924. visitor: ["id", "typeParameters", "right"],
  124925. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124926. fields: {
  124927. id: (0, _utils.validateType)("Identifier"),
  124928. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  124929. right: (0, _utils.validateType)("FlowType")
  124930. }
  124931. });
  124932. (0, _utils.default)("DeclareOpaqueType", {
  124933. visitor: ["id", "typeParameters", "supertype"],
  124934. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124935. fields: {
  124936. id: (0, _utils.validateType)("Identifier"),
  124937. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  124938. supertype: (0, _utils.validateOptionalType)("FlowType")
  124939. }
  124940. });
  124941. (0, _utils.default)("DeclareVariable", {
  124942. visitor: ["id"],
  124943. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124944. fields: {
  124945. id: (0, _utils.validateType)("Identifier")
  124946. }
  124947. });
  124948. (0, _utils.default)("DeclareExportDeclaration", {
  124949. visitor: ["declaration", "specifiers", "source"],
  124950. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124951. fields: {
  124952. declaration: (0, _utils.validateOptionalType)("Flow"),
  124953. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  124954. source: (0, _utils.validateOptionalType)("StringLiteral"),
  124955. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  124956. }
  124957. });
  124958. (0, _utils.default)("DeclareExportAllDeclaration", {
  124959. visitor: ["source"],
  124960. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  124961. fields: {
  124962. source: (0, _utils.validateType)("StringLiteral"),
  124963. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  124964. }
  124965. });
  124966. (0, _utils.default)("DeclaredPredicate", {
  124967. visitor: ["value"],
  124968. aliases: ["Flow", "FlowPredicate"],
  124969. fields: {
  124970. value: (0, _utils.validateType)("Flow")
  124971. }
  124972. });
  124973. (0, _utils.default)("ExistsTypeAnnotation", {
  124974. aliases: ["Flow", "FlowType"]
  124975. });
  124976. (0, _utils.default)("FunctionTypeAnnotation", {
  124977. visitor: ["typeParameters", "params", "rest", "returnType"],
  124978. aliases: ["Flow", "FlowType"],
  124979. fields: {
  124980. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  124981. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  124982. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  124983. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  124984. returnType: (0, _utils.validateType)("FlowType")
  124985. }
  124986. });
  124987. (0, _utils.default)("FunctionTypeParam", {
  124988. visitor: ["name", "typeAnnotation"],
  124989. aliases: ["Flow"],
  124990. fields: {
  124991. name: (0, _utils.validateOptionalType)("Identifier"),
  124992. typeAnnotation: (0, _utils.validateType)("FlowType"),
  124993. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  124994. }
  124995. });
  124996. (0, _utils.default)("GenericTypeAnnotation", {
  124997. visitor: ["id", "typeParameters"],
  124998. aliases: ["Flow", "FlowType"],
  124999. fields: {
  125000. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  125001. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  125002. }
  125003. });
  125004. (0, _utils.default)("InferredPredicate", {
  125005. aliases: ["Flow", "FlowPredicate"]
  125006. });
  125007. (0, _utils.default)("InterfaceExtends", {
  125008. visitor: ["id", "typeParameters"],
  125009. aliases: ["Flow"],
  125010. fields: {
  125011. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  125012. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  125013. }
  125014. });
  125015. defineInterfaceishType("InterfaceDeclaration");
  125016. (0, _utils.default)("InterfaceTypeAnnotation", {
  125017. visitor: ["extends", "body"],
  125018. aliases: ["Flow", "FlowType"],
  125019. fields: {
  125020. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  125021. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  125022. }
  125023. });
  125024. (0, _utils.default)("IntersectionTypeAnnotation", {
  125025. visitor: ["types"],
  125026. aliases: ["Flow", "FlowType"],
  125027. fields: {
  125028. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  125029. }
  125030. });
  125031. (0, _utils.default)("MixedTypeAnnotation", {
  125032. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125033. });
  125034. (0, _utils.default)("EmptyTypeAnnotation", {
  125035. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125036. });
  125037. (0, _utils.default)("NullableTypeAnnotation", {
  125038. visitor: ["typeAnnotation"],
  125039. aliases: ["Flow", "FlowType"],
  125040. fields: {
  125041. typeAnnotation: (0, _utils.validateType)("FlowType")
  125042. }
  125043. });
  125044. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  125045. builder: ["value"],
  125046. aliases: ["Flow", "FlowType"],
  125047. fields: {
  125048. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  125049. }
  125050. });
  125051. (0, _utils.default)("NumberTypeAnnotation", {
  125052. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125053. });
  125054. (0, _utils.default)("ObjectTypeAnnotation", {
  125055. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  125056. aliases: ["Flow", "FlowType"],
  125057. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  125058. fields: {
  125059. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  125060. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  125061. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  125062. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  125063. exact: {
  125064. validate: (0, _utils.assertValueType)("boolean"),
  125065. default: false
  125066. },
  125067. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  125068. }
  125069. });
  125070. (0, _utils.default)("ObjectTypeInternalSlot", {
  125071. visitor: ["id", "value", "optional", "static", "method"],
  125072. aliases: ["Flow", "UserWhitespacable"],
  125073. fields: {
  125074. id: (0, _utils.validateType)("Identifier"),
  125075. value: (0, _utils.validateType)("FlowType"),
  125076. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125077. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125078. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125079. }
  125080. });
  125081. (0, _utils.default)("ObjectTypeCallProperty", {
  125082. visitor: ["value"],
  125083. aliases: ["Flow", "UserWhitespacable"],
  125084. fields: {
  125085. value: (0, _utils.validateType)("FlowType"),
  125086. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125087. }
  125088. });
  125089. (0, _utils.default)("ObjectTypeIndexer", {
  125090. visitor: ["id", "key", "value", "variance"],
  125091. aliases: ["Flow", "UserWhitespacable"],
  125092. fields: {
  125093. id: (0, _utils.validateOptionalType)("Identifier"),
  125094. key: (0, _utils.validateType)("FlowType"),
  125095. value: (0, _utils.validateType)("FlowType"),
  125096. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125097. variance: (0, _utils.validateOptionalType)("Variance")
  125098. }
  125099. });
  125100. (0, _utils.default)("ObjectTypeProperty", {
  125101. visitor: ["key", "value", "variance"],
  125102. aliases: ["Flow", "UserWhitespacable"],
  125103. fields: {
  125104. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  125105. value: (0, _utils.validateType)("FlowType"),
  125106. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  125107. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125108. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125109. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125110. variance: (0, _utils.validateOptionalType)("Variance"),
  125111. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125112. }
  125113. });
  125114. (0, _utils.default)("ObjectTypeSpreadProperty", {
  125115. visitor: ["argument"],
  125116. aliases: ["Flow", "UserWhitespacable"],
  125117. fields: {
  125118. argument: (0, _utils.validateType)("FlowType")
  125119. }
  125120. });
  125121. (0, _utils.default)("OpaqueType", {
  125122. visitor: ["id", "typeParameters", "supertype", "impltype"],
  125123. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  125124. fields: {
  125125. id: (0, _utils.validateType)("Identifier"),
  125126. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  125127. supertype: (0, _utils.validateOptionalType)("FlowType"),
  125128. impltype: (0, _utils.validateType)("FlowType")
  125129. }
  125130. });
  125131. (0, _utils.default)("QualifiedTypeIdentifier", {
  125132. visitor: ["id", "qualification"],
  125133. aliases: ["Flow"],
  125134. fields: {
  125135. id: (0, _utils.validateType)("Identifier"),
  125136. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  125137. }
  125138. });
  125139. (0, _utils.default)("StringLiteralTypeAnnotation", {
  125140. builder: ["value"],
  125141. aliases: ["Flow", "FlowType"],
  125142. fields: {
  125143. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  125144. }
  125145. });
  125146. (0, _utils.default)("StringTypeAnnotation", {
  125147. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125148. });
  125149. (0, _utils.default)("SymbolTypeAnnotation", {
  125150. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125151. });
  125152. (0, _utils.default)("ThisTypeAnnotation", {
  125153. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125154. });
  125155. (0, _utils.default)("TupleTypeAnnotation", {
  125156. visitor: ["types"],
  125157. aliases: ["Flow", "FlowType"],
  125158. fields: {
  125159. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  125160. }
  125161. });
  125162. (0, _utils.default)("TypeofTypeAnnotation", {
  125163. visitor: ["argument"],
  125164. aliases: ["Flow", "FlowType"],
  125165. fields: {
  125166. argument: (0, _utils.validateType)("FlowType")
  125167. }
  125168. });
  125169. (0, _utils.default)("TypeAlias", {
  125170. visitor: ["id", "typeParameters", "right"],
  125171. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  125172. fields: {
  125173. id: (0, _utils.validateType)("Identifier"),
  125174. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  125175. right: (0, _utils.validateType)("FlowType")
  125176. }
  125177. });
  125178. (0, _utils.default)("TypeAnnotation", {
  125179. aliases: ["Flow"],
  125180. visitor: ["typeAnnotation"],
  125181. fields: {
  125182. typeAnnotation: (0, _utils.validateType)("FlowType")
  125183. }
  125184. });
  125185. (0, _utils.default)("TypeCastExpression", {
  125186. visitor: ["expression", "typeAnnotation"],
  125187. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  125188. fields: {
  125189. expression: (0, _utils.validateType)("Expression"),
  125190. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  125191. }
  125192. });
  125193. (0, _utils.default)("TypeParameter", {
  125194. aliases: ["Flow"],
  125195. visitor: ["bound", "default", "variance"],
  125196. fields: {
  125197. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  125198. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  125199. default: (0, _utils.validateOptionalType)("FlowType"),
  125200. variance: (0, _utils.validateOptionalType)("Variance")
  125201. }
  125202. });
  125203. (0, _utils.default)("TypeParameterDeclaration", {
  125204. aliases: ["Flow"],
  125205. visitor: ["params"],
  125206. fields: {
  125207. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  125208. }
  125209. });
  125210. (0, _utils.default)("TypeParameterInstantiation", {
  125211. aliases: ["Flow"],
  125212. visitor: ["params"],
  125213. fields: {
  125214. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  125215. }
  125216. });
  125217. (0, _utils.default)("UnionTypeAnnotation", {
  125218. visitor: ["types"],
  125219. aliases: ["Flow", "FlowType"],
  125220. fields: {
  125221. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  125222. }
  125223. });
  125224. (0, _utils.default)("Variance", {
  125225. aliases: ["Flow"],
  125226. builder: ["kind"],
  125227. fields: {
  125228. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  125229. }
  125230. });
  125231. (0, _utils.default)("VoidTypeAnnotation", {
  125232. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  125233. });
  125234. (0, _utils.default)("EnumDeclaration", {
  125235. aliases: ["Statement", "Declaration"],
  125236. visitor: ["id", "body"],
  125237. fields: {
  125238. id: (0, _utils.validateType)("Identifier"),
  125239. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  125240. }
  125241. });
  125242. (0, _utils.default)("EnumBooleanBody", {
  125243. aliases: ["EnumBody"],
  125244. visitor: ["members"],
  125245. fields: {
  125246. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125247. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  125248. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125249. }
  125250. });
  125251. (0, _utils.default)("EnumNumberBody", {
  125252. aliases: ["EnumBody"],
  125253. visitor: ["members"],
  125254. fields: {
  125255. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125256. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  125257. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125258. }
  125259. });
  125260. (0, _utils.default)("EnumStringBody", {
  125261. aliases: ["EnumBody"],
  125262. visitor: ["members"],
  125263. fields: {
  125264. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  125265. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  125266. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125267. }
  125268. });
  125269. (0, _utils.default)("EnumSymbolBody", {
  125270. aliases: ["EnumBody"],
  125271. visitor: ["members"],
  125272. fields: {
  125273. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  125274. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125275. }
  125276. });
  125277. (0, _utils.default)("EnumBooleanMember", {
  125278. aliases: ["EnumMember"],
  125279. visitor: ["id"],
  125280. fields: {
  125281. id: (0, _utils.validateType)("Identifier"),
  125282. init: (0, _utils.validateType)("BooleanLiteral")
  125283. }
  125284. });
  125285. (0, _utils.default)("EnumNumberMember", {
  125286. aliases: ["EnumMember"],
  125287. visitor: ["id", "init"],
  125288. fields: {
  125289. id: (0, _utils.validateType)("Identifier"),
  125290. init: (0, _utils.validateType)("NumericLiteral")
  125291. }
  125292. });
  125293. (0, _utils.default)("EnumStringMember", {
  125294. aliases: ["EnumMember"],
  125295. visitor: ["id", "init"],
  125296. fields: {
  125297. id: (0, _utils.validateType)("Identifier"),
  125298. init: (0, _utils.validateType)("StringLiteral")
  125299. }
  125300. });
  125301. (0, _utils.default)("EnumDefaultedMember", {
  125302. aliases: ["EnumMember"],
  125303. visitor: ["id"],
  125304. fields: {
  125305. id: (0, _utils.validateType)("Identifier")
  125306. }
  125307. });
  125308. (0, _utils.default)("IndexedAccessType", {
  125309. visitor: ["objectType", "indexType"],
  125310. aliases: ["Flow", "FlowType"],
  125311. fields: {
  125312. objectType: (0, _utils.validateType)("FlowType"),
  125313. indexType: (0, _utils.validateType)("FlowType")
  125314. }
  125315. });
  125316. (0, _utils.default)("OptionalIndexedAccessType", {
  125317. visitor: ["objectType", "indexType"],
  125318. aliases: ["Flow", "FlowType"],
  125319. fields: {
  125320. objectType: (0, _utils.validateType)("FlowType"),
  125321. indexType: (0, _utils.validateType)("FlowType"),
  125322. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  125323. }
  125324. });
  125325. }
  125326. });
  125327. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/jsx.js
  125328. var require_jsx8 = __commonJS({
  125329. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/jsx.js"() {
  125330. "use strict";
  125331. var _utils = require_utils6();
  125332. (0, _utils.default)("JSXAttribute", {
  125333. visitor: ["name", "value"],
  125334. aliases: ["JSX", "Immutable"],
  125335. fields: {
  125336. name: {
  125337. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  125338. },
  125339. value: {
  125340. optional: true,
  125341. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  125342. }
  125343. }
  125344. });
  125345. (0, _utils.default)("JSXClosingElement", {
  125346. visitor: ["name"],
  125347. aliases: ["JSX", "Immutable"],
  125348. fields: {
  125349. name: {
  125350. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  125351. }
  125352. }
  125353. });
  125354. (0, _utils.default)("JSXElement", {
  125355. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  125356. visitor: ["openingElement", "children", "closingElement"],
  125357. aliases: ["JSX", "Immutable", "Expression"],
  125358. fields: {
  125359. openingElement: {
  125360. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  125361. },
  125362. closingElement: {
  125363. optional: true,
  125364. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  125365. },
  125366. children: {
  125367. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  125368. },
  125369. selfClosing: {
  125370. validate: (0, _utils.assertValueType)("boolean"),
  125371. optional: true
  125372. }
  125373. }
  125374. });
  125375. (0, _utils.default)("JSXEmptyExpression", {
  125376. aliases: ["JSX"]
  125377. });
  125378. (0, _utils.default)("JSXExpressionContainer", {
  125379. visitor: ["expression"],
  125380. aliases: ["JSX", "Immutable"],
  125381. fields: {
  125382. expression: {
  125383. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  125384. }
  125385. }
  125386. });
  125387. (0, _utils.default)("JSXSpreadChild", {
  125388. visitor: ["expression"],
  125389. aliases: ["JSX", "Immutable"],
  125390. fields: {
  125391. expression: {
  125392. validate: (0, _utils.assertNodeType)("Expression")
  125393. }
  125394. }
  125395. });
  125396. (0, _utils.default)("JSXIdentifier", {
  125397. builder: ["name"],
  125398. aliases: ["JSX"],
  125399. fields: {
  125400. name: {
  125401. validate: (0, _utils.assertValueType)("string")
  125402. }
  125403. }
  125404. });
  125405. (0, _utils.default)("JSXMemberExpression", {
  125406. visitor: ["object", "property"],
  125407. aliases: ["JSX"],
  125408. fields: {
  125409. object: {
  125410. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  125411. },
  125412. property: {
  125413. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  125414. }
  125415. }
  125416. });
  125417. (0, _utils.default)("JSXNamespacedName", {
  125418. visitor: ["namespace", "name"],
  125419. aliases: ["JSX"],
  125420. fields: {
  125421. namespace: {
  125422. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  125423. },
  125424. name: {
  125425. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  125426. }
  125427. }
  125428. });
  125429. (0, _utils.default)("JSXOpeningElement", {
  125430. builder: ["name", "attributes", "selfClosing"],
  125431. visitor: ["name", "attributes"],
  125432. aliases: ["JSX", "Immutable"],
  125433. fields: {
  125434. name: {
  125435. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  125436. },
  125437. selfClosing: {
  125438. default: false
  125439. },
  125440. attributes: {
  125441. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  125442. },
  125443. typeParameters: {
  125444. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  125445. optional: true
  125446. }
  125447. }
  125448. });
  125449. (0, _utils.default)("JSXSpreadAttribute", {
  125450. visitor: ["argument"],
  125451. aliases: ["JSX"],
  125452. fields: {
  125453. argument: {
  125454. validate: (0, _utils.assertNodeType)("Expression")
  125455. }
  125456. }
  125457. });
  125458. (0, _utils.default)("JSXText", {
  125459. aliases: ["JSX", "Immutable"],
  125460. builder: ["value"],
  125461. fields: {
  125462. value: {
  125463. validate: (0, _utils.assertValueType)("string")
  125464. }
  125465. }
  125466. });
  125467. (0, _utils.default)("JSXFragment", {
  125468. builder: ["openingFragment", "closingFragment", "children"],
  125469. visitor: ["openingFragment", "children", "closingFragment"],
  125470. aliases: ["JSX", "Immutable", "Expression"],
  125471. fields: {
  125472. openingFragment: {
  125473. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  125474. },
  125475. closingFragment: {
  125476. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  125477. },
  125478. children: {
  125479. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  125480. }
  125481. }
  125482. });
  125483. (0, _utils.default)("JSXOpeningFragment", {
  125484. aliases: ["JSX", "Immutable"]
  125485. });
  125486. (0, _utils.default)("JSXClosingFragment", {
  125487. aliases: ["JSX", "Immutable"]
  125488. });
  125489. }
  125490. });
  125491. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/placeholders.js
  125492. var require_placeholders6 = __commonJS({
  125493. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  125494. "use strict";
  125495. Object.defineProperty(exports, "__esModule", {
  125496. value: true
  125497. });
  125498. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  125499. var _utils = require_utils6();
  125500. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  125501. exports.PLACEHOLDERS = PLACEHOLDERS;
  125502. var PLACEHOLDERS_ALIAS = {
  125503. Declaration: ["Statement"],
  125504. Pattern: ["PatternLike", "LVal"]
  125505. };
  125506. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  125507. for (const type of PLACEHOLDERS) {
  125508. const alias = _utils.ALIAS_KEYS[type];
  125509. if (alias != null && alias.length)
  125510. PLACEHOLDERS_ALIAS[type] = alias;
  125511. }
  125512. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  125513. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  125514. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  125515. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  125516. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  125517. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  125518. }
  125519. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  125520. });
  125521. });
  125522. }
  125523. });
  125524. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/misc.js
  125525. var require_misc6 = __commonJS({
  125526. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/misc.js"() {
  125527. "use strict";
  125528. var _utils = require_utils6();
  125529. var _placeholders = require_placeholders6();
  125530. {
  125531. (0, _utils.default)("Noop", {
  125532. visitor: []
  125533. });
  125534. }
  125535. (0, _utils.default)("Placeholder", {
  125536. visitor: [],
  125537. builder: ["expectedNode", "name"],
  125538. fields: {
  125539. name: {
  125540. validate: (0, _utils.assertNodeType)("Identifier")
  125541. },
  125542. expectedNode: {
  125543. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  125544. }
  125545. }
  125546. });
  125547. (0, _utils.default)("V8IntrinsicIdentifier", {
  125548. builder: ["name"],
  125549. fields: {
  125550. name: {
  125551. validate: (0, _utils.assertValueType)("string")
  125552. }
  125553. }
  125554. });
  125555. }
  125556. });
  125557. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/experimental.js
  125558. var require_experimental6 = __commonJS({
  125559. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/experimental.js"() {
  125560. "use strict";
  125561. var _utils = require_utils6();
  125562. var _core = require_core6();
  125563. (0, _utils.default)("ArgumentPlaceholder", {});
  125564. (0, _utils.default)("BindExpression", {
  125565. visitor: ["object", "callee"],
  125566. aliases: ["Expression"],
  125567. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  125568. object: {
  125569. validate: Object.assign(() => {
  125570. }, {
  125571. oneOfNodeTypes: ["Expression"]
  125572. })
  125573. },
  125574. callee: {
  125575. validate: Object.assign(() => {
  125576. }, {
  125577. oneOfNodeTypes: ["Expression"]
  125578. })
  125579. }
  125580. } : {
  125581. object: {
  125582. validate: (0, _utils.assertNodeType)("Expression")
  125583. },
  125584. callee: {
  125585. validate: (0, _utils.assertNodeType)("Expression")
  125586. }
  125587. }
  125588. });
  125589. (0, _utils.default)("ClassProperty", {
  125590. visitor: ["key", "value", "typeAnnotation", "decorators"],
  125591. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  125592. aliases: ["Property"],
  125593. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  125594. value: {
  125595. validate: (0, _utils.assertNodeType)("Expression"),
  125596. optional: true
  125597. },
  125598. definite: {
  125599. validate: (0, _utils.assertValueType)("boolean"),
  125600. optional: true
  125601. },
  125602. typeAnnotation: {
  125603. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  125604. optional: true
  125605. },
  125606. decorators: {
  125607. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  125608. optional: true
  125609. },
  125610. readonly: {
  125611. validate: (0, _utils.assertValueType)("boolean"),
  125612. optional: true
  125613. },
  125614. declare: {
  125615. validate: (0, _utils.assertValueType)("boolean"),
  125616. optional: true
  125617. }
  125618. })
  125619. });
  125620. (0, _utils.default)("PipelineTopicExpression", {
  125621. builder: ["expression"],
  125622. visitor: ["expression"],
  125623. fields: {
  125624. expression: {
  125625. validate: (0, _utils.assertNodeType)("Expression")
  125626. }
  125627. }
  125628. });
  125629. (0, _utils.default)("PipelineBareFunction", {
  125630. builder: ["callee"],
  125631. visitor: ["callee"],
  125632. fields: {
  125633. callee: {
  125634. validate: (0, _utils.assertNodeType)("Expression")
  125635. }
  125636. }
  125637. });
  125638. (0, _utils.default)("PipelinePrimaryTopicReference", {
  125639. aliases: ["Expression"]
  125640. });
  125641. (0, _utils.default)("ClassPrivateProperty", {
  125642. visitor: ["key", "value", "decorators"],
  125643. builder: ["key", "value", "decorators", "static"],
  125644. aliases: ["Property", "Private"],
  125645. fields: {
  125646. key: {
  125647. validate: (0, _utils.assertNodeType)("PrivateName")
  125648. },
  125649. value: {
  125650. validate: (0, _utils.assertNodeType)("Expression"),
  125651. optional: true
  125652. },
  125653. typeAnnotation: {
  125654. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  125655. optional: true
  125656. },
  125657. decorators: {
  125658. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  125659. optional: true
  125660. }
  125661. }
  125662. });
  125663. (0, _utils.default)("ClassPrivateMethod", {
  125664. builder: ["kind", "key", "params", "body", "static"],
  125665. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  125666. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  125667. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  125668. key: {
  125669. validate: (0, _utils.assertNodeType)("PrivateName")
  125670. },
  125671. body: {
  125672. validate: (0, _utils.assertNodeType)("BlockStatement")
  125673. }
  125674. })
  125675. });
  125676. (0, _utils.default)("ImportAttribute", {
  125677. visitor: ["key", "value"],
  125678. fields: {
  125679. key: {
  125680. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  125681. },
  125682. value: {
  125683. validate: (0, _utils.assertNodeType)("StringLiteral")
  125684. }
  125685. }
  125686. });
  125687. (0, _utils.default)("Decorator", {
  125688. visitor: ["expression"],
  125689. fields: {
  125690. expression: {
  125691. validate: (0, _utils.assertNodeType)("Expression")
  125692. }
  125693. }
  125694. });
  125695. (0, _utils.default)("DoExpression", {
  125696. visitor: ["body"],
  125697. builder: ["body", "async"],
  125698. aliases: ["Expression"],
  125699. fields: {
  125700. body: {
  125701. validate: (0, _utils.assertNodeType)("BlockStatement")
  125702. },
  125703. async: {
  125704. validate: (0, _utils.assertValueType)("boolean"),
  125705. default: false
  125706. }
  125707. }
  125708. });
  125709. (0, _utils.default)("ExportDefaultSpecifier", {
  125710. visitor: ["exported"],
  125711. aliases: ["ModuleSpecifier"],
  125712. fields: {
  125713. exported: {
  125714. validate: (0, _utils.assertNodeType)("Identifier")
  125715. }
  125716. }
  125717. });
  125718. (0, _utils.default)("PrivateName", {
  125719. visitor: ["id"],
  125720. aliases: ["Private"],
  125721. fields: {
  125722. id: {
  125723. validate: (0, _utils.assertNodeType)("Identifier")
  125724. }
  125725. }
  125726. });
  125727. (0, _utils.default)("RecordExpression", {
  125728. visitor: ["properties"],
  125729. aliases: ["Expression"],
  125730. fields: {
  125731. properties: {
  125732. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  125733. }
  125734. }
  125735. });
  125736. (0, _utils.default)("TupleExpression", {
  125737. fields: {
  125738. elements: {
  125739. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  125740. default: []
  125741. }
  125742. },
  125743. visitor: ["elements"],
  125744. aliases: ["Expression"]
  125745. });
  125746. (0, _utils.default)("DecimalLiteral", {
  125747. builder: ["value"],
  125748. fields: {
  125749. value: {
  125750. validate: (0, _utils.assertValueType)("string")
  125751. }
  125752. },
  125753. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  125754. });
  125755. (0, _utils.default)("StaticBlock", {
  125756. visitor: ["body"],
  125757. fields: {
  125758. body: {
  125759. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  125760. }
  125761. },
  125762. aliases: ["Scopable", "BlockParent"]
  125763. });
  125764. (0, _utils.default)("ModuleExpression", {
  125765. visitor: ["body"],
  125766. fields: {
  125767. body: {
  125768. validate: (0, _utils.assertNodeType)("Program")
  125769. }
  125770. },
  125771. aliases: ["Expression"]
  125772. });
  125773. }
  125774. });
  125775. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/typescript.js
  125776. var require_typescript8 = __commonJS({
  125777. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/typescript.js"() {
  125778. "use strict";
  125779. var _utils = require_utils6();
  125780. var _core = require_core6();
  125781. var bool = (0, _utils.assertValueType)("boolean");
  125782. var tSFunctionTypeAnnotationCommon = {
  125783. returnType: {
  125784. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  125785. optional: true
  125786. },
  125787. typeParameters: {
  125788. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  125789. optional: true
  125790. }
  125791. };
  125792. (0, _utils.default)("TSParameterProperty", {
  125793. aliases: ["LVal"],
  125794. visitor: ["parameter"],
  125795. fields: {
  125796. accessibility: {
  125797. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  125798. optional: true
  125799. },
  125800. readonly: {
  125801. validate: (0, _utils.assertValueType)("boolean"),
  125802. optional: true
  125803. },
  125804. parameter: {
  125805. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  125806. }
  125807. }
  125808. });
  125809. (0, _utils.default)("TSDeclareFunction", {
  125810. aliases: ["Statement", "Declaration"],
  125811. visitor: ["id", "typeParameters", "params", "returnType"],
  125812. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  125813. });
  125814. (0, _utils.default)("TSDeclareMethod", {
  125815. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  125816. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  125817. });
  125818. (0, _utils.default)("TSQualifiedName", {
  125819. aliases: ["TSEntityName"],
  125820. visitor: ["left", "right"],
  125821. fields: {
  125822. left: (0, _utils.validateType)("TSEntityName"),
  125823. right: (0, _utils.validateType)("Identifier")
  125824. }
  125825. });
  125826. var signatureDeclarationCommon = {
  125827. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  125828. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  125829. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  125830. };
  125831. var callConstructSignatureDeclaration = {
  125832. aliases: ["TSTypeElement"],
  125833. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  125834. fields: signatureDeclarationCommon
  125835. };
  125836. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  125837. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  125838. var namedTypeElementCommon = {
  125839. key: (0, _utils.validateType)("Expression"),
  125840. computed: (0, _utils.validate)(bool),
  125841. optional: (0, _utils.validateOptional)(bool)
  125842. };
  125843. (0, _utils.default)("TSPropertySignature", {
  125844. aliases: ["TSTypeElement"],
  125845. visitor: ["key", "typeAnnotation", "initializer"],
  125846. fields: Object.assign({}, namedTypeElementCommon, {
  125847. readonly: (0, _utils.validateOptional)(bool),
  125848. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  125849. initializer: (0, _utils.validateOptionalType)("Expression")
  125850. })
  125851. });
  125852. (0, _utils.default)("TSMethodSignature", {
  125853. aliases: ["TSTypeElement"],
  125854. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  125855. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  125856. kind: {
  125857. validate: (0, _utils.assertOneOf)("method", "get", "set")
  125858. }
  125859. })
  125860. });
  125861. (0, _utils.default)("TSIndexSignature", {
  125862. aliases: ["TSTypeElement"],
  125863. visitor: ["parameters", "typeAnnotation"],
  125864. fields: {
  125865. readonly: (0, _utils.validateOptional)(bool),
  125866. static: (0, _utils.validateOptional)(bool),
  125867. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  125868. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  125869. }
  125870. });
  125871. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  125872. for (const type of tsKeywordTypes) {
  125873. (0, _utils.default)(type, {
  125874. aliases: ["TSType", "TSBaseType"],
  125875. visitor: [],
  125876. fields: {}
  125877. });
  125878. }
  125879. (0, _utils.default)("TSThisType", {
  125880. aliases: ["TSType", "TSBaseType"],
  125881. visitor: [],
  125882. fields: {}
  125883. });
  125884. var fnOrCtrBase = {
  125885. aliases: ["TSType"],
  125886. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  125887. };
  125888. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  125889. fields: signatureDeclarationCommon
  125890. }));
  125891. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  125892. fields: Object.assign({}, signatureDeclarationCommon, {
  125893. abstract: (0, _utils.validateOptional)(bool)
  125894. })
  125895. }));
  125896. (0, _utils.default)("TSTypeReference", {
  125897. aliases: ["TSType"],
  125898. visitor: ["typeName", "typeParameters"],
  125899. fields: {
  125900. typeName: (0, _utils.validateType)("TSEntityName"),
  125901. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  125902. }
  125903. });
  125904. (0, _utils.default)("TSTypePredicate", {
  125905. aliases: ["TSType"],
  125906. visitor: ["parameterName", "typeAnnotation"],
  125907. builder: ["parameterName", "typeAnnotation", "asserts"],
  125908. fields: {
  125909. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  125910. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  125911. asserts: (0, _utils.validateOptional)(bool)
  125912. }
  125913. });
  125914. (0, _utils.default)("TSTypeQuery", {
  125915. aliases: ["TSType"],
  125916. visitor: ["exprName"],
  125917. fields: {
  125918. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  125919. }
  125920. });
  125921. (0, _utils.default)("TSTypeLiteral", {
  125922. aliases: ["TSType"],
  125923. visitor: ["members"],
  125924. fields: {
  125925. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  125926. }
  125927. });
  125928. (0, _utils.default)("TSArrayType", {
  125929. aliases: ["TSType"],
  125930. visitor: ["elementType"],
  125931. fields: {
  125932. elementType: (0, _utils.validateType)("TSType")
  125933. }
  125934. });
  125935. (0, _utils.default)("TSTupleType", {
  125936. aliases: ["TSType"],
  125937. visitor: ["elementTypes"],
  125938. fields: {
  125939. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  125940. }
  125941. });
  125942. (0, _utils.default)("TSOptionalType", {
  125943. aliases: ["TSType"],
  125944. visitor: ["typeAnnotation"],
  125945. fields: {
  125946. typeAnnotation: (0, _utils.validateType)("TSType")
  125947. }
  125948. });
  125949. (0, _utils.default)("TSRestType", {
  125950. aliases: ["TSType"],
  125951. visitor: ["typeAnnotation"],
  125952. fields: {
  125953. typeAnnotation: (0, _utils.validateType)("TSType")
  125954. }
  125955. });
  125956. (0, _utils.default)("TSNamedTupleMember", {
  125957. visitor: ["label", "elementType"],
  125958. builder: ["label", "elementType", "optional"],
  125959. fields: {
  125960. label: (0, _utils.validateType)("Identifier"),
  125961. optional: {
  125962. validate: bool,
  125963. default: false
  125964. },
  125965. elementType: (0, _utils.validateType)("TSType")
  125966. }
  125967. });
  125968. var unionOrIntersection = {
  125969. aliases: ["TSType"],
  125970. visitor: ["types"],
  125971. fields: {
  125972. types: (0, _utils.validateArrayOfType)("TSType")
  125973. }
  125974. };
  125975. (0, _utils.default)("TSUnionType", unionOrIntersection);
  125976. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  125977. (0, _utils.default)("TSConditionalType", {
  125978. aliases: ["TSType"],
  125979. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  125980. fields: {
  125981. checkType: (0, _utils.validateType)("TSType"),
  125982. extendsType: (0, _utils.validateType)("TSType"),
  125983. trueType: (0, _utils.validateType)("TSType"),
  125984. falseType: (0, _utils.validateType)("TSType")
  125985. }
  125986. });
  125987. (0, _utils.default)("TSInferType", {
  125988. aliases: ["TSType"],
  125989. visitor: ["typeParameter"],
  125990. fields: {
  125991. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  125992. }
  125993. });
  125994. (0, _utils.default)("TSParenthesizedType", {
  125995. aliases: ["TSType"],
  125996. visitor: ["typeAnnotation"],
  125997. fields: {
  125998. typeAnnotation: (0, _utils.validateType)("TSType")
  125999. }
  126000. });
  126001. (0, _utils.default)("TSTypeOperator", {
  126002. aliases: ["TSType"],
  126003. visitor: ["typeAnnotation"],
  126004. fields: {
  126005. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  126006. typeAnnotation: (0, _utils.validateType)("TSType")
  126007. }
  126008. });
  126009. (0, _utils.default)("TSIndexedAccessType", {
  126010. aliases: ["TSType"],
  126011. visitor: ["objectType", "indexType"],
  126012. fields: {
  126013. objectType: (0, _utils.validateType)("TSType"),
  126014. indexType: (0, _utils.validateType)("TSType")
  126015. }
  126016. });
  126017. (0, _utils.default)("TSMappedType", {
  126018. aliases: ["TSType"],
  126019. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  126020. fields: {
  126021. readonly: (0, _utils.validateOptional)(bool),
  126022. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  126023. optional: (0, _utils.validateOptional)(bool),
  126024. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  126025. nameType: (0, _utils.validateOptionalType)("TSType")
  126026. }
  126027. });
  126028. (0, _utils.default)("TSLiteralType", {
  126029. aliases: ["TSType", "TSBaseType"],
  126030. visitor: ["literal"],
  126031. fields: {
  126032. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  126033. }
  126034. });
  126035. (0, _utils.default)("TSExpressionWithTypeArguments", {
  126036. aliases: ["TSType"],
  126037. visitor: ["expression", "typeParameters"],
  126038. fields: {
  126039. expression: (0, _utils.validateType)("TSEntityName"),
  126040. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  126041. }
  126042. });
  126043. (0, _utils.default)("TSInterfaceDeclaration", {
  126044. aliases: ["Statement", "Declaration"],
  126045. visitor: ["id", "typeParameters", "extends", "body"],
  126046. fields: {
  126047. declare: (0, _utils.validateOptional)(bool),
  126048. id: (0, _utils.validateType)("Identifier"),
  126049. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  126050. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  126051. body: (0, _utils.validateType)("TSInterfaceBody")
  126052. }
  126053. });
  126054. (0, _utils.default)("TSInterfaceBody", {
  126055. visitor: ["body"],
  126056. fields: {
  126057. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  126058. }
  126059. });
  126060. (0, _utils.default)("TSTypeAliasDeclaration", {
  126061. aliases: ["Statement", "Declaration"],
  126062. visitor: ["id", "typeParameters", "typeAnnotation"],
  126063. fields: {
  126064. declare: (0, _utils.validateOptional)(bool),
  126065. id: (0, _utils.validateType)("Identifier"),
  126066. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  126067. typeAnnotation: (0, _utils.validateType)("TSType")
  126068. }
  126069. });
  126070. (0, _utils.default)("TSAsExpression", {
  126071. aliases: ["Expression"],
  126072. visitor: ["expression", "typeAnnotation"],
  126073. fields: {
  126074. expression: (0, _utils.validateType)("Expression"),
  126075. typeAnnotation: (0, _utils.validateType)("TSType")
  126076. }
  126077. });
  126078. (0, _utils.default)("TSTypeAssertion", {
  126079. aliases: ["Expression"],
  126080. visitor: ["typeAnnotation", "expression"],
  126081. fields: {
  126082. typeAnnotation: (0, _utils.validateType)("TSType"),
  126083. expression: (0, _utils.validateType)("Expression")
  126084. }
  126085. });
  126086. (0, _utils.default)("TSEnumDeclaration", {
  126087. aliases: ["Statement", "Declaration"],
  126088. visitor: ["id", "members"],
  126089. fields: {
  126090. declare: (0, _utils.validateOptional)(bool),
  126091. const: (0, _utils.validateOptional)(bool),
  126092. id: (0, _utils.validateType)("Identifier"),
  126093. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  126094. initializer: (0, _utils.validateOptionalType)("Expression")
  126095. }
  126096. });
  126097. (0, _utils.default)("TSEnumMember", {
  126098. visitor: ["id", "initializer"],
  126099. fields: {
  126100. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  126101. initializer: (0, _utils.validateOptionalType)("Expression")
  126102. }
  126103. });
  126104. (0, _utils.default)("TSModuleDeclaration", {
  126105. aliases: ["Statement", "Declaration"],
  126106. visitor: ["id", "body"],
  126107. fields: {
  126108. declare: (0, _utils.validateOptional)(bool),
  126109. global: (0, _utils.validateOptional)(bool),
  126110. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  126111. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  126112. }
  126113. });
  126114. (0, _utils.default)("TSModuleBlock", {
  126115. aliases: ["Scopable", "Block", "BlockParent"],
  126116. visitor: ["body"],
  126117. fields: {
  126118. body: (0, _utils.validateArrayOfType)("Statement")
  126119. }
  126120. });
  126121. (0, _utils.default)("TSImportType", {
  126122. aliases: ["TSType"],
  126123. visitor: ["argument", "qualifier", "typeParameters"],
  126124. fields: {
  126125. argument: (0, _utils.validateType)("StringLiteral"),
  126126. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  126127. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  126128. }
  126129. });
  126130. (0, _utils.default)("TSImportEqualsDeclaration", {
  126131. aliases: ["Statement"],
  126132. visitor: ["id", "moduleReference"],
  126133. fields: {
  126134. isExport: (0, _utils.validate)(bool),
  126135. id: (0, _utils.validateType)("Identifier"),
  126136. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  126137. }
  126138. });
  126139. (0, _utils.default)("TSExternalModuleReference", {
  126140. visitor: ["expression"],
  126141. fields: {
  126142. expression: (0, _utils.validateType)("StringLiteral")
  126143. }
  126144. });
  126145. (0, _utils.default)("TSNonNullExpression", {
  126146. aliases: ["Expression"],
  126147. visitor: ["expression"],
  126148. fields: {
  126149. expression: (0, _utils.validateType)("Expression")
  126150. }
  126151. });
  126152. (0, _utils.default)("TSExportAssignment", {
  126153. aliases: ["Statement"],
  126154. visitor: ["expression"],
  126155. fields: {
  126156. expression: (0, _utils.validateType)("Expression")
  126157. }
  126158. });
  126159. (0, _utils.default)("TSNamespaceExportDeclaration", {
  126160. aliases: ["Statement"],
  126161. visitor: ["id"],
  126162. fields: {
  126163. id: (0, _utils.validateType)("Identifier")
  126164. }
  126165. });
  126166. (0, _utils.default)("TSTypeAnnotation", {
  126167. visitor: ["typeAnnotation"],
  126168. fields: {
  126169. typeAnnotation: {
  126170. validate: (0, _utils.assertNodeType)("TSType")
  126171. }
  126172. }
  126173. });
  126174. (0, _utils.default)("TSTypeParameterInstantiation", {
  126175. visitor: ["params"],
  126176. fields: {
  126177. params: {
  126178. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  126179. }
  126180. }
  126181. });
  126182. (0, _utils.default)("TSTypeParameterDeclaration", {
  126183. visitor: ["params"],
  126184. fields: {
  126185. params: {
  126186. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  126187. }
  126188. }
  126189. });
  126190. (0, _utils.default)("TSTypeParameter", {
  126191. builder: ["constraint", "default", "name"],
  126192. visitor: ["constraint", "default"],
  126193. fields: {
  126194. name: {
  126195. validate: (0, _utils.assertValueType)("string")
  126196. },
  126197. constraint: {
  126198. validate: (0, _utils.assertNodeType)("TSType"),
  126199. optional: true
  126200. },
  126201. default: {
  126202. validate: (0, _utils.assertNodeType)("TSType"),
  126203. optional: true
  126204. }
  126205. }
  126206. });
  126207. }
  126208. });
  126209. // node_modules/@babel/template/node_modules/@babel/types/lib/definitions/index.js
  126210. var require_definitions6 = __commonJS({
  126211. "node_modules/@babel/template/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  126212. "use strict";
  126213. Object.defineProperty(exports, "__esModule", {
  126214. value: true
  126215. });
  126216. Object.defineProperty(exports, "VISITOR_KEYS", {
  126217. enumerable: true,
  126218. get: function() {
  126219. return _utils.VISITOR_KEYS;
  126220. }
  126221. });
  126222. Object.defineProperty(exports, "ALIAS_KEYS", {
  126223. enumerable: true,
  126224. get: function() {
  126225. return _utils.ALIAS_KEYS;
  126226. }
  126227. });
  126228. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  126229. enumerable: true,
  126230. get: function() {
  126231. return _utils.FLIPPED_ALIAS_KEYS;
  126232. }
  126233. });
  126234. Object.defineProperty(exports, "NODE_FIELDS", {
  126235. enumerable: true,
  126236. get: function() {
  126237. return _utils.NODE_FIELDS;
  126238. }
  126239. });
  126240. Object.defineProperty(exports, "BUILDER_KEYS", {
  126241. enumerable: true,
  126242. get: function() {
  126243. return _utils.BUILDER_KEYS;
  126244. }
  126245. });
  126246. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  126247. enumerable: true,
  126248. get: function() {
  126249. return _utils.DEPRECATED_KEYS;
  126250. }
  126251. });
  126252. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  126253. enumerable: true,
  126254. get: function() {
  126255. return _utils.NODE_PARENT_VALIDATIONS;
  126256. }
  126257. });
  126258. Object.defineProperty(exports, "PLACEHOLDERS", {
  126259. enumerable: true,
  126260. get: function() {
  126261. return _placeholders.PLACEHOLDERS;
  126262. }
  126263. });
  126264. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  126265. enumerable: true,
  126266. get: function() {
  126267. return _placeholders.PLACEHOLDERS_ALIAS;
  126268. }
  126269. });
  126270. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  126271. enumerable: true,
  126272. get: function() {
  126273. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  126274. }
  126275. });
  126276. exports.TYPES = void 0;
  126277. var _toFastProperties = require_to_fast_properties();
  126278. require_core6();
  126279. require_flow8();
  126280. require_jsx8();
  126281. require_misc6();
  126282. require_experimental6();
  126283. require_typescript8();
  126284. var _utils = require_utils6();
  126285. var _placeholders = require_placeholders6();
  126286. _toFastProperties(_utils.VISITOR_KEYS);
  126287. _toFastProperties(_utils.ALIAS_KEYS);
  126288. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  126289. _toFastProperties(_utils.NODE_FIELDS);
  126290. _toFastProperties(_utils.BUILDER_KEYS);
  126291. _toFastProperties(_utils.DEPRECATED_KEYS);
  126292. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  126293. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  126294. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  126295. exports.TYPES = TYPES;
  126296. }
  126297. });
  126298. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/builder.js
  126299. var require_builder7 = __commonJS({
  126300. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  126301. "use strict";
  126302. Object.defineProperty(exports, "__esModule", {
  126303. value: true
  126304. });
  126305. exports.default = builder;
  126306. var _definitions = require_definitions6();
  126307. var _validate = require_validate6();
  126308. function builder(type, ...args) {
  126309. const keys2 = _definitions.BUILDER_KEYS[type];
  126310. const countArgs = args.length;
  126311. if (countArgs > keys2.length) {
  126312. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  126313. }
  126314. const node = {
  126315. type
  126316. };
  126317. let i = 0;
  126318. keys2.forEach((key) => {
  126319. const field = _definitions.NODE_FIELDS[type][key];
  126320. let arg;
  126321. if (i < countArgs)
  126322. arg = args[i];
  126323. if (arg === void 0) {
  126324. arg = Array.isArray(field.default) ? [] : field.default;
  126325. }
  126326. node[key] = arg;
  126327. i++;
  126328. });
  126329. for (const key of Object.keys(node)) {
  126330. (0, _validate.default)(node, key, node[key]);
  126331. }
  126332. return node;
  126333. }
  126334. }
  126335. });
  126336. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/generated/index.js
  126337. var require_generated27 = __commonJS({
  126338. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  126339. "use strict";
  126340. Object.defineProperty(exports, "__esModule", {
  126341. value: true
  126342. });
  126343. exports.arrayExpression = arrayExpression;
  126344. exports.assignmentExpression = assignmentExpression;
  126345. exports.binaryExpression = binaryExpression;
  126346. exports.interpreterDirective = interpreterDirective;
  126347. exports.directive = directive;
  126348. exports.directiveLiteral = directiveLiteral;
  126349. exports.blockStatement = blockStatement;
  126350. exports.breakStatement = breakStatement;
  126351. exports.callExpression = callExpression;
  126352. exports.catchClause = catchClause;
  126353. exports.conditionalExpression = conditionalExpression;
  126354. exports.continueStatement = continueStatement;
  126355. exports.debuggerStatement = debuggerStatement;
  126356. exports.doWhileStatement = doWhileStatement;
  126357. exports.emptyStatement = emptyStatement;
  126358. exports.expressionStatement = expressionStatement;
  126359. exports.file = file;
  126360. exports.forInStatement = forInStatement;
  126361. exports.forStatement = forStatement;
  126362. exports.functionDeclaration = functionDeclaration;
  126363. exports.functionExpression = functionExpression;
  126364. exports.identifier = identifier;
  126365. exports.ifStatement = ifStatement;
  126366. exports.labeledStatement = labeledStatement;
  126367. exports.stringLiteral = stringLiteral;
  126368. exports.numericLiteral = numericLiteral;
  126369. exports.nullLiteral = nullLiteral;
  126370. exports.booleanLiteral = booleanLiteral;
  126371. exports.regExpLiteral = regExpLiteral;
  126372. exports.logicalExpression = logicalExpression;
  126373. exports.memberExpression = memberExpression;
  126374. exports.newExpression = newExpression;
  126375. exports.program = program;
  126376. exports.objectExpression = objectExpression;
  126377. exports.objectMethod = objectMethod;
  126378. exports.objectProperty = objectProperty;
  126379. exports.restElement = restElement;
  126380. exports.returnStatement = returnStatement;
  126381. exports.sequenceExpression = sequenceExpression;
  126382. exports.parenthesizedExpression = parenthesizedExpression;
  126383. exports.switchCase = switchCase;
  126384. exports.switchStatement = switchStatement;
  126385. exports.thisExpression = thisExpression;
  126386. exports.throwStatement = throwStatement;
  126387. exports.tryStatement = tryStatement;
  126388. exports.unaryExpression = unaryExpression;
  126389. exports.updateExpression = updateExpression;
  126390. exports.variableDeclaration = variableDeclaration;
  126391. exports.variableDeclarator = variableDeclarator;
  126392. exports.whileStatement = whileStatement;
  126393. exports.withStatement = withStatement;
  126394. exports.assignmentPattern = assignmentPattern;
  126395. exports.arrayPattern = arrayPattern;
  126396. exports.arrowFunctionExpression = arrowFunctionExpression;
  126397. exports.classBody = classBody;
  126398. exports.classExpression = classExpression;
  126399. exports.classDeclaration = classDeclaration;
  126400. exports.exportAllDeclaration = exportAllDeclaration;
  126401. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  126402. exports.exportNamedDeclaration = exportNamedDeclaration;
  126403. exports.exportSpecifier = exportSpecifier;
  126404. exports.forOfStatement = forOfStatement;
  126405. exports.importDeclaration = importDeclaration;
  126406. exports.importDefaultSpecifier = importDefaultSpecifier;
  126407. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  126408. exports.importSpecifier = importSpecifier;
  126409. exports.metaProperty = metaProperty;
  126410. exports.classMethod = classMethod;
  126411. exports.objectPattern = objectPattern;
  126412. exports.spreadElement = spreadElement;
  126413. exports.super = _super;
  126414. exports.taggedTemplateExpression = taggedTemplateExpression;
  126415. exports.templateElement = templateElement;
  126416. exports.templateLiteral = templateLiteral;
  126417. exports.yieldExpression = yieldExpression;
  126418. exports.awaitExpression = awaitExpression;
  126419. exports.import = _import;
  126420. exports.bigIntLiteral = bigIntLiteral;
  126421. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  126422. exports.optionalMemberExpression = optionalMemberExpression;
  126423. exports.optionalCallExpression = optionalCallExpression;
  126424. exports.anyTypeAnnotation = anyTypeAnnotation;
  126425. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  126426. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  126427. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  126428. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  126429. exports.classImplements = classImplements;
  126430. exports.declareClass = declareClass;
  126431. exports.declareFunction = declareFunction;
  126432. exports.declareInterface = declareInterface;
  126433. exports.declareModule = declareModule;
  126434. exports.declareModuleExports = declareModuleExports;
  126435. exports.declareTypeAlias = declareTypeAlias;
  126436. exports.declareOpaqueType = declareOpaqueType;
  126437. exports.declareVariable = declareVariable;
  126438. exports.declareExportDeclaration = declareExportDeclaration;
  126439. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  126440. exports.declaredPredicate = declaredPredicate;
  126441. exports.existsTypeAnnotation = existsTypeAnnotation;
  126442. exports.functionTypeAnnotation = functionTypeAnnotation;
  126443. exports.functionTypeParam = functionTypeParam;
  126444. exports.genericTypeAnnotation = genericTypeAnnotation;
  126445. exports.inferredPredicate = inferredPredicate;
  126446. exports.interfaceExtends = interfaceExtends;
  126447. exports.interfaceDeclaration = interfaceDeclaration;
  126448. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  126449. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  126450. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  126451. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  126452. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  126453. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  126454. exports.numberTypeAnnotation = numberTypeAnnotation;
  126455. exports.objectTypeAnnotation = objectTypeAnnotation;
  126456. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  126457. exports.objectTypeCallProperty = objectTypeCallProperty;
  126458. exports.objectTypeIndexer = objectTypeIndexer;
  126459. exports.objectTypeProperty = objectTypeProperty;
  126460. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  126461. exports.opaqueType = opaqueType;
  126462. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  126463. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  126464. exports.stringTypeAnnotation = stringTypeAnnotation;
  126465. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  126466. exports.thisTypeAnnotation = thisTypeAnnotation;
  126467. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  126468. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  126469. exports.typeAlias = typeAlias;
  126470. exports.typeAnnotation = typeAnnotation;
  126471. exports.typeCastExpression = typeCastExpression;
  126472. exports.typeParameter = typeParameter;
  126473. exports.typeParameterDeclaration = typeParameterDeclaration;
  126474. exports.typeParameterInstantiation = typeParameterInstantiation;
  126475. exports.unionTypeAnnotation = unionTypeAnnotation;
  126476. exports.variance = variance;
  126477. exports.voidTypeAnnotation = voidTypeAnnotation;
  126478. exports.enumDeclaration = enumDeclaration;
  126479. exports.enumBooleanBody = enumBooleanBody;
  126480. exports.enumNumberBody = enumNumberBody;
  126481. exports.enumStringBody = enumStringBody;
  126482. exports.enumSymbolBody = enumSymbolBody;
  126483. exports.enumBooleanMember = enumBooleanMember;
  126484. exports.enumNumberMember = enumNumberMember;
  126485. exports.enumStringMember = enumStringMember;
  126486. exports.enumDefaultedMember = enumDefaultedMember;
  126487. exports.indexedAccessType = indexedAccessType;
  126488. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  126489. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  126490. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  126491. exports.jSXElement = exports.jsxElement = jsxElement;
  126492. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  126493. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  126494. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  126495. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  126496. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  126497. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  126498. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  126499. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  126500. exports.jSXText = exports.jsxText = jsxText2;
  126501. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  126502. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  126503. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  126504. exports.noop = noop;
  126505. exports.placeholder = placeholder;
  126506. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  126507. exports.argumentPlaceholder = argumentPlaceholder;
  126508. exports.bindExpression = bindExpression;
  126509. exports.classProperty = classProperty;
  126510. exports.pipelineTopicExpression = pipelineTopicExpression;
  126511. exports.pipelineBareFunction = pipelineBareFunction;
  126512. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  126513. exports.classPrivateProperty = classPrivateProperty;
  126514. exports.classPrivateMethod = classPrivateMethod;
  126515. exports.importAttribute = importAttribute;
  126516. exports.decorator = decorator;
  126517. exports.doExpression = doExpression;
  126518. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  126519. exports.privateName = privateName;
  126520. exports.recordExpression = recordExpression;
  126521. exports.tupleExpression = tupleExpression;
  126522. exports.decimalLiteral = decimalLiteral;
  126523. exports.staticBlock = staticBlock;
  126524. exports.moduleExpression = moduleExpression;
  126525. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  126526. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  126527. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  126528. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  126529. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  126530. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  126531. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  126532. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  126533. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  126534. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  126535. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  126536. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  126537. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  126538. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  126539. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  126540. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  126541. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  126542. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  126543. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  126544. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  126545. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  126546. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  126547. exports.tSThisType = exports.tsThisType = tsThisType;
  126548. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  126549. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  126550. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  126551. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  126552. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  126553. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  126554. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  126555. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  126556. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  126557. exports.tSRestType = exports.tsRestType = tsRestType;
  126558. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  126559. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  126560. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  126561. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  126562. exports.tSInferType = exports.tsInferType = tsInferType;
  126563. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  126564. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  126565. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  126566. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  126567. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  126568. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  126569. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  126570. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  126571. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  126572. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  126573. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  126574. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  126575. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  126576. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  126577. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  126578. exports.tSImportType = exports.tsImportType = tsImportType;
  126579. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  126580. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  126581. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  126582. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  126583. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  126584. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  126585. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  126586. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  126587. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  126588. exports.numberLiteral = NumberLiteral;
  126589. exports.regexLiteral = RegexLiteral;
  126590. exports.restProperty = RestProperty;
  126591. exports.spreadProperty = SpreadProperty;
  126592. var _builder = require_builder7();
  126593. function arrayExpression(elements) {
  126594. return (0, _builder.default)("ArrayExpression", ...arguments);
  126595. }
  126596. function assignmentExpression(operator, left, right) {
  126597. return (0, _builder.default)("AssignmentExpression", ...arguments);
  126598. }
  126599. function binaryExpression(operator, left, right) {
  126600. return (0, _builder.default)("BinaryExpression", ...arguments);
  126601. }
  126602. function interpreterDirective(value) {
  126603. return (0, _builder.default)("InterpreterDirective", ...arguments);
  126604. }
  126605. function directive(value) {
  126606. return (0, _builder.default)("Directive", ...arguments);
  126607. }
  126608. function directiveLiteral(value) {
  126609. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  126610. }
  126611. function blockStatement(body, directives) {
  126612. return (0, _builder.default)("BlockStatement", ...arguments);
  126613. }
  126614. function breakStatement(label) {
  126615. return (0, _builder.default)("BreakStatement", ...arguments);
  126616. }
  126617. function callExpression(callee, _arguments) {
  126618. return (0, _builder.default)("CallExpression", ...arguments);
  126619. }
  126620. function catchClause(param, body) {
  126621. return (0, _builder.default)("CatchClause", ...arguments);
  126622. }
  126623. function conditionalExpression(test, consequent, alternate) {
  126624. return (0, _builder.default)("ConditionalExpression", ...arguments);
  126625. }
  126626. function continueStatement(label) {
  126627. return (0, _builder.default)("ContinueStatement", ...arguments);
  126628. }
  126629. function debuggerStatement() {
  126630. return (0, _builder.default)("DebuggerStatement", ...arguments);
  126631. }
  126632. function doWhileStatement(test, body) {
  126633. return (0, _builder.default)("DoWhileStatement", ...arguments);
  126634. }
  126635. function emptyStatement() {
  126636. return (0, _builder.default)("EmptyStatement", ...arguments);
  126637. }
  126638. function expressionStatement(expression) {
  126639. return (0, _builder.default)("ExpressionStatement", ...arguments);
  126640. }
  126641. function file(program2, comments, tokens) {
  126642. return (0, _builder.default)("File", ...arguments);
  126643. }
  126644. function forInStatement(left, right, body) {
  126645. return (0, _builder.default)("ForInStatement", ...arguments);
  126646. }
  126647. function forStatement(init, test, update, body) {
  126648. return (0, _builder.default)("ForStatement", ...arguments);
  126649. }
  126650. function functionDeclaration(id, params, body, generator, async) {
  126651. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  126652. }
  126653. function functionExpression(id, params, body, generator, async) {
  126654. return (0, _builder.default)("FunctionExpression", ...arguments);
  126655. }
  126656. function identifier(name2) {
  126657. return (0, _builder.default)("Identifier", ...arguments);
  126658. }
  126659. function ifStatement(test, consequent, alternate) {
  126660. return (0, _builder.default)("IfStatement", ...arguments);
  126661. }
  126662. function labeledStatement(label, body) {
  126663. return (0, _builder.default)("LabeledStatement", ...arguments);
  126664. }
  126665. function stringLiteral(value) {
  126666. return (0, _builder.default)("StringLiteral", ...arguments);
  126667. }
  126668. function numericLiteral(value) {
  126669. return (0, _builder.default)("NumericLiteral", ...arguments);
  126670. }
  126671. function nullLiteral() {
  126672. return (0, _builder.default)("NullLiteral", ...arguments);
  126673. }
  126674. function booleanLiteral(value) {
  126675. return (0, _builder.default)("BooleanLiteral", ...arguments);
  126676. }
  126677. function regExpLiteral(pattern, flags) {
  126678. return (0, _builder.default)("RegExpLiteral", ...arguments);
  126679. }
  126680. function logicalExpression(operator, left, right) {
  126681. return (0, _builder.default)("LogicalExpression", ...arguments);
  126682. }
  126683. function memberExpression(object, property, computed, optional) {
  126684. return (0, _builder.default)("MemberExpression", ...arguments);
  126685. }
  126686. function newExpression(callee, _arguments) {
  126687. return (0, _builder.default)("NewExpression", ...arguments);
  126688. }
  126689. function program(body, directives, sourceType, interpreter) {
  126690. return (0, _builder.default)("Program", ...arguments);
  126691. }
  126692. function objectExpression(properties) {
  126693. return (0, _builder.default)("ObjectExpression", ...arguments);
  126694. }
  126695. function objectMethod(kind, key, params, body, computed, generator, async) {
  126696. return (0, _builder.default)("ObjectMethod", ...arguments);
  126697. }
  126698. function objectProperty(key, value, computed, shorthand, decorators) {
  126699. return (0, _builder.default)("ObjectProperty", ...arguments);
  126700. }
  126701. function restElement(argument) {
  126702. return (0, _builder.default)("RestElement", ...arguments);
  126703. }
  126704. function returnStatement(argument) {
  126705. return (0, _builder.default)("ReturnStatement", ...arguments);
  126706. }
  126707. function sequenceExpression(expressions) {
  126708. return (0, _builder.default)("SequenceExpression", ...arguments);
  126709. }
  126710. function parenthesizedExpression(expression) {
  126711. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  126712. }
  126713. function switchCase(test, consequent) {
  126714. return (0, _builder.default)("SwitchCase", ...arguments);
  126715. }
  126716. function switchStatement(discriminant, cases) {
  126717. return (0, _builder.default)("SwitchStatement", ...arguments);
  126718. }
  126719. function thisExpression() {
  126720. return (0, _builder.default)("ThisExpression", ...arguments);
  126721. }
  126722. function throwStatement(argument) {
  126723. return (0, _builder.default)("ThrowStatement", ...arguments);
  126724. }
  126725. function tryStatement(block, handler, finalizer) {
  126726. return (0, _builder.default)("TryStatement", ...arguments);
  126727. }
  126728. function unaryExpression(operator, argument, prefix) {
  126729. return (0, _builder.default)("UnaryExpression", ...arguments);
  126730. }
  126731. function updateExpression(operator, argument, prefix) {
  126732. return (0, _builder.default)("UpdateExpression", ...arguments);
  126733. }
  126734. function variableDeclaration(kind, declarations) {
  126735. return (0, _builder.default)("VariableDeclaration", ...arguments);
  126736. }
  126737. function variableDeclarator(id, init) {
  126738. return (0, _builder.default)("VariableDeclarator", ...arguments);
  126739. }
  126740. function whileStatement(test, body) {
  126741. return (0, _builder.default)("WhileStatement", ...arguments);
  126742. }
  126743. function withStatement(object, body) {
  126744. return (0, _builder.default)("WithStatement", ...arguments);
  126745. }
  126746. function assignmentPattern(left, right) {
  126747. return (0, _builder.default)("AssignmentPattern", ...arguments);
  126748. }
  126749. function arrayPattern(elements) {
  126750. return (0, _builder.default)("ArrayPattern", ...arguments);
  126751. }
  126752. function arrowFunctionExpression(params, body, async) {
  126753. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  126754. }
  126755. function classBody(body) {
  126756. return (0, _builder.default)("ClassBody", ...arguments);
  126757. }
  126758. function classExpression(id, superClass, body, decorators) {
  126759. return (0, _builder.default)("ClassExpression", ...arguments);
  126760. }
  126761. function classDeclaration(id, superClass, body, decorators) {
  126762. return (0, _builder.default)("ClassDeclaration", ...arguments);
  126763. }
  126764. function exportAllDeclaration(source) {
  126765. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  126766. }
  126767. function exportDefaultDeclaration(declaration) {
  126768. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  126769. }
  126770. function exportNamedDeclaration(declaration, specifiers, source) {
  126771. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  126772. }
  126773. function exportSpecifier(local, exported) {
  126774. return (0, _builder.default)("ExportSpecifier", ...arguments);
  126775. }
  126776. function forOfStatement(left, right, body, _await) {
  126777. return (0, _builder.default)("ForOfStatement", ...arguments);
  126778. }
  126779. function importDeclaration(specifiers, source) {
  126780. return (0, _builder.default)("ImportDeclaration", ...arguments);
  126781. }
  126782. function importDefaultSpecifier(local) {
  126783. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  126784. }
  126785. function importNamespaceSpecifier(local) {
  126786. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  126787. }
  126788. function importSpecifier(local, imported) {
  126789. return (0, _builder.default)("ImportSpecifier", ...arguments);
  126790. }
  126791. function metaProperty(meta, property) {
  126792. return (0, _builder.default)("MetaProperty", ...arguments);
  126793. }
  126794. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  126795. return (0, _builder.default)("ClassMethod", ...arguments);
  126796. }
  126797. function objectPattern(properties) {
  126798. return (0, _builder.default)("ObjectPattern", ...arguments);
  126799. }
  126800. function spreadElement(argument) {
  126801. return (0, _builder.default)("SpreadElement", ...arguments);
  126802. }
  126803. function _super() {
  126804. return (0, _builder.default)("Super", ...arguments);
  126805. }
  126806. function taggedTemplateExpression(tag, quasi) {
  126807. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  126808. }
  126809. function templateElement(value, tail) {
  126810. return (0, _builder.default)("TemplateElement", ...arguments);
  126811. }
  126812. function templateLiteral(quasis, expressions) {
  126813. return (0, _builder.default)("TemplateLiteral", ...arguments);
  126814. }
  126815. function yieldExpression(argument, delegate) {
  126816. return (0, _builder.default)("YieldExpression", ...arguments);
  126817. }
  126818. function awaitExpression(argument) {
  126819. return (0, _builder.default)("AwaitExpression", ...arguments);
  126820. }
  126821. function _import() {
  126822. return (0, _builder.default)("Import", ...arguments);
  126823. }
  126824. function bigIntLiteral(value) {
  126825. return (0, _builder.default)("BigIntLiteral", ...arguments);
  126826. }
  126827. function exportNamespaceSpecifier(exported) {
  126828. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  126829. }
  126830. function optionalMemberExpression(object, property, computed, optional) {
  126831. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  126832. }
  126833. function optionalCallExpression(callee, _arguments, optional) {
  126834. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  126835. }
  126836. function anyTypeAnnotation() {
  126837. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  126838. }
  126839. function arrayTypeAnnotation(elementType) {
  126840. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  126841. }
  126842. function booleanTypeAnnotation() {
  126843. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  126844. }
  126845. function booleanLiteralTypeAnnotation(value) {
  126846. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  126847. }
  126848. function nullLiteralTypeAnnotation() {
  126849. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  126850. }
  126851. function classImplements(id, typeParameters) {
  126852. return (0, _builder.default)("ClassImplements", ...arguments);
  126853. }
  126854. function declareClass(id, typeParameters, _extends, body) {
  126855. return (0, _builder.default)("DeclareClass", ...arguments);
  126856. }
  126857. function declareFunction(id) {
  126858. return (0, _builder.default)("DeclareFunction", ...arguments);
  126859. }
  126860. function declareInterface(id, typeParameters, _extends, body) {
  126861. return (0, _builder.default)("DeclareInterface", ...arguments);
  126862. }
  126863. function declareModule(id, body, kind) {
  126864. return (0, _builder.default)("DeclareModule", ...arguments);
  126865. }
  126866. function declareModuleExports(typeAnnotation2) {
  126867. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  126868. }
  126869. function declareTypeAlias(id, typeParameters, right) {
  126870. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  126871. }
  126872. function declareOpaqueType(id, typeParameters, supertype) {
  126873. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  126874. }
  126875. function declareVariable(id) {
  126876. return (0, _builder.default)("DeclareVariable", ...arguments);
  126877. }
  126878. function declareExportDeclaration(declaration, specifiers, source) {
  126879. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  126880. }
  126881. function declareExportAllDeclaration(source) {
  126882. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  126883. }
  126884. function declaredPredicate(value) {
  126885. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  126886. }
  126887. function existsTypeAnnotation() {
  126888. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  126889. }
  126890. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  126891. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  126892. }
  126893. function functionTypeParam(name2, typeAnnotation2) {
  126894. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  126895. }
  126896. function genericTypeAnnotation(id, typeParameters) {
  126897. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  126898. }
  126899. function inferredPredicate() {
  126900. return (0, _builder.default)("InferredPredicate", ...arguments);
  126901. }
  126902. function interfaceExtends(id, typeParameters) {
  126903. return (0, _builder.default)("InterfaceExtends", ...arguments);
  126904. }
  126905. function interfaceDeclaration(id, typeParameters, _extends, body) {
  126906. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  126907. }
  126908. function interfaceTypeAnnotation(_extends, body) {
  126909. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  126910. }
  126911. function intersectionTypeAnnotation(types2) {
  126912. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  126913. }
  126914. function mixedTypeAnnotation() {
  126915. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  126916. }
  126917. function emptyTypeAnnotation() {
  126918. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  126919. }
  126920. function nullableTypeAnnotation(typeAnnotation2) {
  126921. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  126922. }
  126923. function numberLiteralTypeAnnotation(value) {
  126924. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  126925. }
  126926. function numberTypeAnnotation() {
  126927. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  126928. }
  126929. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  126930. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  126931. }
  126932. function objectTypeInternalSlot(id, value, optional, _static, method) {
  126933. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  126934. }
  126935. function objectTypeCallProperty(value) {
  126936. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  126937. }
  126938. function objectTypeIndexer(id, key, value, variance2) {
  126939. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  126940. }
  126941. function objectTypeProperty(key, value, variance2) {
  126942. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  126943. }
  126944. function objectTypeSpreadProperty(argument) {
  126945. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  126946. }
  126947. function opaqueType(id, typeParameters, supertype, impltype) {
  126948. return (0, _builder.default)("OpaqueType", ...arguments);
  126949. }
  126950. function qualifiedTypeIdentifier(id, qualification) {
  126951. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  126952. }
  126953. function stringLiteralTypeAnnotation(value) {
  126954. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  126955. }
  126956. function stringTypeAnnotation() {
  126957. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  126958. }
  126959. function symbolTypeAnnotation() {
  126960. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  126961. }
  126962. function thisTypeAnnotation() {
  126963. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  126964. }
  126965. function tupleTypeAnnotation(types2) {
  126966. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  126967. }
  126968. function typeofTypeAnnotation(argument) {
  126969. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  126970. }
  126971. function typeAlias(id, typeParameters, right) {
  126972. return (0, _builder.default)("TypeAlias", ...arguments);
  126973. }
  126974. function typeAnnotation(typeAnnotation2) {
  126975. return (0, _builder.default)("TypeAnnotation", ...arguments);
  126976. }
  126977. function typeCastExpression(expression, typeAnnotation2) {
  126978. return (0, _builder.default)("TypeCastExpression", ...arguments);
  126979. }
  126980. function typeParameter(bound, _default, variance2) {
  126981. return (0, _builder.default)("TypeParameter", ...arguments);
  126982. }
  126983. function typeParameterDeclaration(params) {
  126984. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  126985. }
  126986. function typeParameterInstantiation(params) {
  126987. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  126988. }
  126989. function unionTypeAnnotation(types2) {
  126990. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  126991. }
  126992. function variance(kind) {
  126993. return (0, _builder.default)("Variance", ...arguments);
  126994. }
  126995. function voidTypeAnnotation() {
  126996. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  126997. }
  126998. function enumDeclaration(id, body) {
  126999. return (0, _builder.default)("EnumDeclaration", ...arguments);
  127000. }
  127001. function enumBooleanBody(members) {
  127002. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  127003. }
  127004. function enumNumberBody(members) {
  127005. return (0, _builder.default)("EnumNumberBody", ...arguments);
  127006. }
  127007. function enumStringBody(members) {
  127008. return (0, _builder.default)("EnumStringBody", ...arguments);
  127009. }
  127010. function enumSymbolBody(members) {
  127011. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  127012. }
  127013. function enumBooleanMember(id) {
  127014. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  127015. }
  127016. function enumNumberMember(id, init) {
  127017. return (0, _builder.default)("EnumNumberMember", ...arguments);
  127018. }
  127019. function enumStringMember(id, init) {
  127020. return (0, _builder.default)("EnumStringMember", ...arguments);
  127021. }
  127022. function enumDefaultedMember(id) {
  127023. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  127024. }
  127025. function indexedAccessType(objectType, indexType) {
  127026. return (0, _builder.default)("IndexedAccessType", ...arguments);
  127027. }
  127028. function optionalIndexedAccessType(objectType, indexType) {
  127029. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  127030. }
  127031. function jsxAttribute(name2, value) {
  127032. return (0, _builder.default)("JSXAttribute", ...arguments);
  127033. }
  127034. function jsxClosingElement(name2) {
  127035. return (0, _builder.default)("JSXClosingElement", ...arguments);
  127036. }
  127037. function jsxElement(openingElement, closingElement, children, selfClosing) {
  127038. return (0, _builder.default)("JSXElement", ...arguments);
  127039. }
  127040. function jsxEmptyExpression() {
  127041. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  127042. }
  127043. function jsxExpressionContainer(expression) {
  127044. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  127045. }
  127046. function jsxSpreadChild(expression) {
  127047. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  127048. }
  127049. function jsxIdentifier(name2) {
  127050. return (0, _builder.default)("JSXIdentifier", ...arguments);
  127051. }
  127052. function jsxMemberExpression(object, property) {
  127053. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  127054. }
  127055. function jsxNamespacedName(namespace, name2) {
  127056. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  127057. }
  127058. function jsxOpeningElement(name2, attributes, selfClosing) {
  127059. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  127060. }
  127061. function jsxSpreadAttribute(argument) {
  127062. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  127063. }
  127064. function jsxText2(value) {
  127065. return (0, _builder.default)("JSXText", ...arguments);
  127066. }
  127067. function jsxFragment(openingFragment, closingFragment, children) {
  127068. return (0, _builder.default)("JSXFragment", ...arguments);
  127069. }
  127070. function jsxOpeningFragment() {
  127071. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  127072. }
  127073. function jsxClosingFragment() {
  127074. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  127075. }
  127076. function noop() {
  127077. return (0, _builder.default)("Noop", ...arguments);
  127078. }
  127079. function placeholder(expectedNode, name2) {
  127080. return (0, _builder.default)("Placeholder", ...arguments);
  127081. }
  127082. function v8IntrinsicIdentifier(name2) {
  127083. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  127084. }
  127085. function argumentPlaceholder() {
  127086. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  127087. }
  127088. function bindExpression(object, callee) {
  127089. return (0, _builder.default)("BindExpression", ...arguments);
  127090. }
  127091. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  127092. return (0, _builder.default)("ClassProperty", ...arguments);
  127093. }
  127094. function pipelineTopicExpression(expression) {
  127095. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  127096. }
  127097. function pipelineBareFunction(callee) {
  127098. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  127099. }
  127100. function pipelinePrimaryTopicReference() {
  127101. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  127102. }
  127103. function classPrivateProperty(key, value, decorators, _static) {
  127104. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  127105. }
  127106. function classPrivateMethod(kind, key, params, body, _static) {
  127107. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  127108. }
  127109. function importAttribute(key, value) {
  127110. return (0, _builder.default)("ImportAttribute", ...arguments);
  127111. }
  127112. function decorator(expression) {
  127113. return (0, _builder.default)("Decorator", ...arguments);
  127114. }
  127115. function doExpression(body, async) {
  127116. return (0, _builder.default)("DoExpression", ...arguments);
  127117. }
  127118. function exportDefaultSpecifier(exported) {
  127119. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  127120. }
  127121. function privateName(id) {
  127122. return (0, _builder.default)("PrivateName", ...arguments);
  127123. }
  127124. function recordExpression(properties) {
  127125. return (0, _builder.default)("RecordExpression", ...arguments);
  127126. }
  127127. function tupleExpression(elements) {
  127128. return (0, _builder.default)("TupleExpression", ...arguments);
  127129. }
  127130. function decimalLiteral(value) {
  127131. return (0, _builder.default)("DecimalLiteral", ...arguments);
  127132. }
  127133. function staticBlock(body) {
  127134. return (0, _builder.default)("StaticBlock", ...arguments);
  127135. }
  127136. function moduleExpression(body) {
  127137. return (0, _builder.default)("ModuleExpression", ...arguments);
  127138. }
  127139. function tsParameterProperty(parameter) {
  127140. return (0, _builder.default)("TSParameterProperty", ...arguments);
  127141. }
  127142. function tsDeclareFunction(id, typeParameters, params, returnType) {
  127143. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  127144. }
  127145. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  127146. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  127147. }
  127148. function tsQualifiedName(left, right) {
  127149. return (0, _builder.default)("TSQualifiedName", ...arguments);
  127150. }
  127151. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  127152. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  127153. }
  127154. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  127155. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  127156. }
  127157. function tsPropertySignature(key, typeAnnotation2, initializer) {
  127158. return (0, _builder.default)("TSPropertySignature", ...arguments);
  127159. }
  127160. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  127161. return (0, _builder.default)("TSMethodSignature", ...arguments);
  127162. }
  127163. function tsIndexSignature(parameters, typeAnnotation2) {
  127164. return (0, _builder.default)("TSIndexSignature", ...arguments);
  127165. }
  127166. function tsAnyKeyword() {
  127167. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  127168. }
  127169. function tsBooleanKeyword() {
  127170. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  127171. }
  127172. function tsBigIntKeyword() {
  127173. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  127174. }
  127175. function tsIntrinsicKeyword() {
  127176. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  127177. }
  127178. function tsNeverKeyword() {
  127179. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  127180. }
  127181. function tsNullKeyword() {
  127182. return (0, _builder.default)("TSNullKeyword", ...arguments);
  127183. }
  127184. function tsNumberKeyword() {
  127185. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  127186. }
  127187. function tsObjectKeyword() {
  127188. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  127189. }
  127190. function tsStringKeyword() {
  127191. return (0, _builder.default)("TSStringKeyword", ...arguments);
  127192. }
  127193. function tsSymbolKeyword() {
  127194. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  127195. }
  127196. function tsUndefinedKeyword() {
  127197. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  127198. }
  127199. function tsUnknownKeyword() {
  127200. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  127201. }
  127202. function tsVoidKeyword() {
  127203. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  127204. }
  127205. function tsThisType() {
  127206. return (0, _builder.default)("TSThisType", ...arguments);
  127207. }
  127208. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  127209. return (0, _builder.default)("TSFunctionType", ...arguments);
  127210. }
  127211. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  127212. return (0, _builder.default)("TSConstructorType", ...arguments);
  127213. }
  127214. function tsTypeReference(typeName, typeParameters) {
  127215. return (0, _builder.default)("TSTypeReference", ...arguments);
  127216. }
  127217. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  127218. return (0, _builder.default)("TSTypePredicate", ...arguments);
  127219. }
  127220. function tsTypeQuery(exprName) {
  127221. return (0, _builder.default)("TSTypeQuery", ...arguments);
  127222. }
  127223. function tsTypeLiteral(members) {
  127224. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  127225. }
  127226. function tsArrayType(elementType) {
  127227. return (0, _builder.default)("TSArrayType", ...arguments);
  127228. }
  127229. function tsTupleType(elementTypes) {
  127230. return (0, _builder.default)("TSTupleType", ...arguments);
  127231. }
  127232. function tsOptionalType(typeAnnotation2) {
  127233. return (0, _builder.default)("TSOptionalType", ...arguments);
  127234. }
  127235. function tsRestType(typeAnnotation2) {
  127236. return (0, _builder.default)("TSRestType", ...arguments);
  127237. }
  127238. function tsNamedTupleMember(label, elementType, optional) {
  127239. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  127240. }
  127241. function tsUnionType(types2) {
  127242. return (0, _builder.default)("TSUnionType", ...arguments);
  127243. }
  127244. function tsIntersectionType(types2) {
  127245. return (0, _builder.default)("TSIntersectionType", ...arguments);
  127246. }
  127247. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  127248. return (0, _builder.default)("TSConditionalType", ...arguments);
  127249. }
  127250. function tsInferType(typeParameter2) {
  127251. return (0, _builder.default)("TSInferType", ...arguments);
  127252. }
  127253. function tsParenthesizedType(typeAnnotation2) {
  127254. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  127255. }
  127256. function tsTypeOperator(typeAnnotation2) {
  127257. return (0, _builder.default)("TSTypeOperator", ...arguments);
  127258. }
  127259. function tsIndexedAccessType(objectType, indexType) {
  127260. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  127261. }
  127262. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  127263. return (0, _builder.default)("TSMappedType", ...arguments);
  127264. }
  127265. function tsLiteralType(literal2) {
  127266. return (0, _builder.default)("TSLiteralType", ...arguments);
  127267. }
  127268. function tsExpressionWithTypeArguments(expression, typeParameters) {
  127269. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  127270. }
  127271. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  127272. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  127273. }
  127274. function tsInterfaceBody(body) {
  127275. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  127276. }
  127277. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  127278. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  127279. }
  127280. function tsAsExpression(expression, typeAnnotation2) {
  127281. return (0, _builder.default)("TSAsExpression", ...arguments);
  127282. }
  127283. function tsTypeAssertion(typeAnnotation2, expression) {
  127284. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  127285. }
  127286. function tsEnumDeclaration(id, members) {
  127287. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  127288. }
  127289. function tsEnumMember(id, initializer) {
  127290. return (0, _builder.default)("TSEnumMember", ...arguments);
  127291. }
  127292. function tsModuleDeclaration(id, body) {
  127293. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  127294. }
  127295. function tsModuleBlock(body) {
  127296. return (0, _builder.default)("TSModuleBlock", ...arguments);
  127297. }
  127298. function tsImportType(argument, qualifier, typeParameters) {
  127299. return (0, _builder.default)("TSImportType", ...arguments);
  127300. }
  127301. function tsImportEqualsDeclaration(id, moduleReference) {
  127302. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  127303. }
  127304. function tsExternalModuleReference(expression) {
  127305. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  127306. }
  127307. function tsNonNullExpression(expression) {
  127308. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  127309. }
  127310. function tsExportAssignment(expression) {
  127311. return (0, _builder.default)("TSExportAssignment", ...arguments);
  127312. }
  127313. function tsNamespaceExportDeclaration(id) {
  127314. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  127315. }
  127316. function tsTypeAnnotation(typeAnnotation2) {
  127317. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  127318. }
  127319. function tsTypeParameterInstantiation(params) {
  127320. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  127321. }
  127322. function tsTypeParameterDeclaration(params) {
  127323. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  127324. }
  127325. function tsTypeParameter(constraint, _default, name2) {
  127326. return (0, _builder.default)("TSTypeParameter", ...arguments);
  127327. }
  127328. function NumberLiteral(...args) {
  127329. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  127330. return (0, _builder.default)("NumberLiteral", ...args);
  127331. }
  127332. function RegexLiteral(...args) {
  127333. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  127334. return (0, _builder.default)("RegexLiteral", ...args);
  127335. }
  127336. function RestProperty(...args) {
  127337. console.trace("The node type RestProperty has been renamed to RestElement");
  127338. return (0, _builder.default)("RestProperty", ...args);
  127339. }
  127340. function SpreadProperty(...args) {
  127341. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  127342. return (0, _builder.default)("SpreadProperty", ...args);
  127343. }
  127344. }
  127345. });
  127346. // node_modules/@babel/template/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  127347. var require_cleanJSXElementLiteralChild6 = __commonJS({
  127348. "node_modules/@babel/template/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  127349. "use strict";
  127350. Object.defineProperty(exports, "__esModule", {
  127351. value: true
  127352. });
  127353. exports.default = cleanJSXElementLiteralChild;
  127354. var _generated = require_generated27();
  127355. function cleanJSXElementLiteralChild(child, args) {
  127356. const lines = child.value.split(/\r\n|\n|\r/);
  127357. let lastNonEmptyLine = 0;
  127358. for (let i = 0; i < lines.length; i++) {
  127359. if (lines[i].match(/[^ \t]/)) {
  127360. lastNonEmptyLine = i;
  127361. }
  127362. }
  127363. let str = "";
  127364. for (let i = 0; i < lines.length; i++) {
  127365. const line = lines[i];
  127366. const isFirstLine = i === 0;
  127367. const isLastLine = i === lines.length - 1;
  127368. const isLastNonEmptyLine = i === lastNonEmptyLine;
  127369. let trimmedLine = line.replace(/\t/g, " ");
  127370. if (!isFirstLine) {
  127371. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  127372. }
  127373. if (!isLastLine) {
  127374. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  127375. }
  127376. if (trimmedLine) {
  127377. if (!isLastNonEmptyLine) {
  127378. trimmedLine += " ";
  127379. }
  127380. str += trimmedLine;
  127381. }
  127382. }
  127383. if (str)
  127384. args.push((0, _generated.stringLiteral)(str));
  127385. }
  127386. }
  127387. });
  127388. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/react/buildChildren.js
  127389. var require_buildChildren6 = __commonJS({
  127390. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  127391. "use strict";
  127392. Object.defineProperty(exports, "__esModule", {
  127393. value: true
  127394. });
  127395. exports.default = buildChildren;
  127396. var _generated = require_generated26();
  127397. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild6();
  127398. function buildChildren(node) {
  127399. const elements = [];
  127400. for (let i = 0; i < node.children.length; i++) {
  127401. let child = node.children[i];
  127402. if ((0, _generated.isJSXText)(child)) {
  127403. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  127404. continue;
  127405. }
  127406. if ((0, _generated.isJSXExpressionContainer)(child))
  127407. child = child.expression;
  127408. if ((0, _generated.isJSXEmptyExpression)(child))
  127409. continue;
  127410. elements.push(child);
  127411. }
  127412. return elements;
  127413. }
  127414. }
  127415. });
  127416. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isNode.js
  127417. var require_isNode6 = __commonJS({
  127418. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  127419. "use strict";
  127420. Object.defineProperty(exports, "__esModule", {
  127421. value: true
  127422. });
  127423. exports.default = isNode;
  127424. var _definitions = require_definitions6();
  127425. function isNode(node) {
  127426. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  127427. }
  127428. }
  127429. });
  127430. // node_modules/@babel/template/node_modules/@babel/types/lib/asserts/assertNode.js
  127431. var require_assertNode6 = __commonJS({
  127432. "node_modules/@babel/template/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  127433. "use strict";
  127434. Object.defineProperty(exports, "__esModule", {
  127435. value: true
  127436. });
  127437. exports.default = assertNode2;
  127438. var _isNode = require_isNode6();
  127439. function assertNode2(node) {
  127440. if (!(0, _isNode.default)(node)) {
  127441. var _node$type;
  127442. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  127443. throw new TypeError(`Not a valid node of type "${type}"`);
  127444. }
  127445. }
  127446. }
  127447. });
  127448. // node_modules/@babel/template/node_modules/@babel/types/lib/asserts/generated/index.js
  127449. var require_generated28 = __commonJS({
  127450. "node_modules/@babel/template/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  127451. "use strict";
  127452. Object.defineProperty(exports, "__esModule", {
  127453. value: true
  127454. });
  127455. exports.assertArrayExpression = assertArrayExpression;
  127456. exports.assertAssignmentExpression = assertAssignmentExpression;
  127457. exports.assertBinaryExpression = assertBinaryExpression;
  127458. exports.assertInterpreterDirective = assertInterpreterDirective;
  127459. exports.assertDirective = assertDirective;
  127460. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  127461. exports.assertBlockStatement = assertBlockStatement;
  127462. exports.assertBreakStatement = assertBreakStatement;
  127463. exports.assertCallExpression = assertCallExpression;
  127464. exports.assertCatchClause = assertCatchClause;
  127465. exports.assertConditionalExpression = assertConditionalExpression;
  127466. exports.assertContinueStatement = assertContinueStatement;
  127467. exports.assertDebuggerStatement = assertDebuggerStatement;
  127468. exports.assertDoWhileStatement = assertDoWhileStatement;
  127469. exports.assertEmptyStatement = assertEmptyStatement;
  127470. exports.assertExpressionStatement = assertExpressionStatement;
  127471. exports.assertFile = assertFile;
  127472. exports.assertForInStatement = assertForInStatement;
  127473. exports.assertForStatement = assertForStatement;
  127474. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  127475. exports.assertFunctionExpression = assertFunctionExpression;
  127476. exports.assertIdentifier = assertIdentifier;
  127477. exports.assertIfStatement = assertIfStatement;
  127478. exports.assertLabeledStatement = assertLabeledStatement;
  127479. exports.assertStringLiteral = assertStringLiteral;
  127480. exports.assertNumericLiteral = assertNumericLiteral;
  127481. exports.assertNullLiteral = assertNullLiteral;
  127482. exports.assertBooleanLiteral = assertBooleanLiteral;
  127483. exports.assertRegExpLiteral = assertRegExpLiteral;
  127484. exports.assertLogicalExpression = assertLogicalExpression;
  127485. exports.assertMemberExpression = assertMemberExpression;
  127486. exports.assertNewExpression = assertNewExpression;
  127487. exports.assertProgram = assertProgram;
  127488. exports.assertObjectExpression = assertObjectExpression;
  127489. exports.assertObjectMethod = assertObjectMethod;
  127490. exports.assertObjectProperty = assertObjectProperty;
  127491. exports.assertRestElement = assertRestElement;
  127492. exports.assertReturnStatement = assertReturnStatement;
  127493. exports.assertSequenceExpression = assertSequenceExpression;
  127494. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  127495. exports.assertSwitchCase = assertSwitchCase;
  127496. exports.assertSwitchStatement = assertSwitchStatement;
  127497. exports.assertThisExpression = assertThisExpression;
  127498. exports.assertThrowStatement = assertThrowStatement;
  127499. exports.assertTryStatement = assertTryStatement;
  127500. exports.assertUnaryExpression = assertUnaryExpression;
  127501. exports.assertUpdateExpression = assertUpdateExpression;
  127502. exports.assertVariableDeclaration = assertVariableDeclaration;
  127503. exports.assertVariableDeclarator = assertVariableDeclarator;
  127504. exports.assertWhileStatement = assertWhileStatement;
  127505. exports.assertWithStatement = assertWithStatement;
  127506. exports.assertAssignmentPattern = assertAssignmentPattern;
  127507. exports.assertArrayPattern = assertArrayPattern;
  127508. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  127509. exports.assertClassBody = assertClassBody;
  127510. exports.assertClassExpression = assertClassExpression;
  127511. exports.assertClassDeclaration = assertClassDeclaration;
  127512. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  127513. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  127514. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  127515. exports.assertExportSpecifier = assertExportSpecifier;
  127516. exports.assertForOfStatement = assertForOfStatement;
  127517. exports.assertImportDeclaration = assertImportDeclaration;
  127518. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  127519. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  127520. exports.assertImportSpecifier = assertImportSpecifier;
  127521. exports.assertMetaProperty = assertMetaProperty;
  127522. exports.assertClassMethod = assertClassMethod;
  127523. exports.assertObjectPattern = assertObjectPattern;
  127524. exports.assertSpreadElement = assertSpreadElement;
  127525. exports.assertSuper = assertSuper;
  127526. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  127527. exports.assertTemplateElement = assertTemplateElement;
  127528. exports.assertTemplateLiteral = assertTemplateLiteral;
  127529. exports.assertYieldExpression = assertYieldExpression;
  127530. exports.assertAwaitExpression = assertAwaitExpression;
  127531. exports.assertImport = assertImport;
  127532. exports.assertBigIntLiteral = assertBigIntLiteral;
  127533. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  127534. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  127535. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  127536. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  127537. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  127538. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  127539. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  127540. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  127541. exports.assertClassImplements = assertClassImplements;
  127542. exports.assertDeclareClass = assertDeclareClass;
  127543. exports.assertDeclareFunction = assertDeclareFunction;
  127544. exports.assertDeclareInterface = assertDeclareInterface;
  127545. exports.assertDeclareModule = assertDeclareModule;
  127546. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  127547. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  127548. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  127549. exports.assertDeclareVariable = assertDeclareVariable;
  127550. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  127551. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  127552. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  127553. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  127554. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  127555. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  127556. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  127557. exports.assertInferredPredicate = assertInferredPredicate;
  127558. exports.assertInterfaceExtends = assertInterfaceExtends;
  127559. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  127560. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  127561. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  127562. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  127563. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  127564. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  127565. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  127566. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  127567. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  127568. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  127569. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  127570. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  127571. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  127572. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  127573. exports.assertOpaqueType = assertOpaqueType;
  127574. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  127575. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  127576. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  127577. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  127578. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  127579. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  127580. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  127581. exports.assertTypeAlias = assertTypeAlias;
  127582. exports.assertTypeAnnotation = assertTypeAnnotation;
  127583. exports.assertTypeCastExpression = assertTypeCastExpression;
  127584. exports.assertTypeParameter = assertTypeParameter;
  127585. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  127586. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  127587. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  127588. exports.assertVariance = assertVariance;
  127589. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  127590. exports.assertEnumDeclaration = assertEnumDeclaration;
  127591. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  127592. exports.assertEnumNumberBody = assertEnumNumberBody;
  127593. exports.assertEnumStringBody = assertEnumStringBody;
  127594. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  127595. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  127596. exports.assertEnumNumberMember = assertEnumNumberMember;
  127597. exports.assertEnumStringMember = assertEnumStringMember;
  127598. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  127599. exports.assertIndexedAccessType = assertIndexedAccessType;
  127600. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  127601. exports.assertJSXAttribute = assertJSXAttribute;
  127602. exports.assertJSXClosingElement = assertJSXClosingElement;
  127603. exports.assertJSXElement = assertJSXElement;
  127604. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  127605. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  127606. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  127607. exports.assertJSXIdentifier = assertJSXIdentifier;
  127608. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  127609. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  127610. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  127611. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  127612. exports.assertJSXText = assertJSXText;
  127613. exports.assertJSXFragment = assertJSXFragment;
  127614. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  127615. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  127616. exports.assertNoop = assertNoop;
  127617. exports.assertPlaceholder = assertPlaceholder;
  127618. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  127619. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  127620. exports.assertBindExpression = assertBindExpression;
  127621. exports.assertClassProperty = assertClassProperty;
  127622. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  127623. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  127624. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  127625. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  127626. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  127627. exports.assertImportAttribute = assertImportAttribute;
  127628. exports.assertDecorator = assertDecorator;
  127629. exports.assertDoExpression = assertDoExpression;
  127630. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  127631. exports.assertPrivateName = assertPrivateName;
  127632. exports.assertRecordExpression = assertRecordExpression;
  127633. exports.assertTupleExpression = assertTupleExpression;
  127634. exports.assertDecimalLiteral = assertDecimalLiteral;
  127635. exports.assertStaticBlock = assertStaticBlock;
  127636. exports.assertModuleExpression = assertModuleExpression;
  127637. exports.assertTSParameterProperty = assertTSParameterProperty;
  127638. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  127639. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  127640. exports.assertTSQualifiedName = assertTSQualifiedName;
  127641. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  127642. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  127643. exports.assertTSPropertySignature = assertTSPropertySignature;
  127644. exports.assertTSMethodSignature = assertTSMethodSignature;
  127645. exports.assertTSIndexSignature = assertTSIndexSignature;
  127646. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  127647. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  127648. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  127649. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  127650. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  127651. exports.assertTSNullKeyword = assertTSNullKeyword;
  127652. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  127653. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  127654. exports.assertTSStringKeyword = assertTSStringKeyword;
  127655. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  127656. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  127657. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  127658. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  127659. exports.assertTSThisType = assertTSThisType;
  127660. exports.assertTSFunctionType = assertTSFunctionType;
  127661. exports.assertTSConstructorType = assertTSConstructorType;
  127662. exports.assertTSTypeReference = assertTSTypeReference;
  127663. exports.assertTSTypePredicate = assertTSTypePredicate;
  127664. exports.assertTSTypeQuery = assertTSTypeQuery;
  127665. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  127666. exports.assertTSArrayType = assertTSArrayType;
  127667. exports.assertTSTupleType = assertTSTupleType;
  127668. exports.assertTSOptionalType = assertTSOptionalType;
  127669. exports.assertTSRestType = assertTSRestType;
  127670. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  127671. exports.assertTSUnionType = assertTSUnionType;
  127672. exports.assertTSIntersectionType = assertTSIntersectionType;
  127673. exports.assertTSConditionalType = assertTSConditionalType;
  127674. exports.assertTSInferType = assertTSInferType;
  127675. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  127676. exports.assertTSTypeOperator = assertTSTypeOperator;
  127677. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  127678. exports.assertTSMappedType = assertTSMappedType;
  127679. exports.assertTSLiteralType = assertTSLiteralType;
  127680. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  127681. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  127682. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  127683. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  127684. exports.assertTSAsExpression = assertTSAsExpression;
  127685. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  127686. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  127687. exports.assertTSEnumMember = assertTSEnumMember;
  127688. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  127689. exports.assertTSModuleBlock = assertTSModuleBlock;
  127690. exports.assertTSImportType = assertTSImportType;
  127691. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  127692. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  127693. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  127694. exports.assertTSExportAssignment = assertTSExportAssignment;
  127695. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  127696. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  127697. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  127698. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  127699. exports.assertTSTypeParameter = assertTSTypeParameter;
  127700. exports.assertExpression = assertExpression;
  127701. exports.assertBinary = assertBinary;
  127702. exports.assertScopable = assertScopable;
  127703. exports.assertBlockParent = assertBlockParent;
  127704. exports.assertBlock = assertBlock;
  127705. exports.assertStatement = assertStatement;
  127706. exports.assertTerminatorless = assertTerminatorless;
  127707. exports.assertCompletionStatement = assertCompletionStatement;
  127708. exports.assertConditional = assertConditional;
  127709. exports.assertLoop = assertLoop;
  127710. exports.assertWhile = assertWhile;
  127711. exports.assertExpressionWrapper = assertExpressionWrapper;
  127712. exports.assertFor = assertFor;
  127713. exports.assertForXStatement = assertForXStatement;
  127714. exports.assertFunction = assertFunction;
  127715. exports.assertFunctionParent = assertFunctionParent;
  127716. exports.assertPureish = assertPureish;
  127717. exports.assertDeclaration = assertDeclaration;
  127718. exports.assertPatternLike = assertPatternLike;
  127719. exports.assertLVal = assertLVal;
  127720. exports.assertTSEntityName = assertTSEntityName;
  127721. exports.assertLiteral = assertLiteral;
  127722. exports.assertImmutable = assertImmutable;
  127723. exports.assertUserWhitespacable = assertUserWhitespacable;
  127724. exports.assertMethod = assertMethod;
  127725. exports.assertObjectMember = assertObjectMember;
  127726. exports.assertProperty = assertProperty;
  127727. exports.assertUnaryLike = assertUnaryLike;
  127728. exports.assertPattern = assertPattern;
  127729. exports.assertClass = assertClass;
  127730. exports.assertModuleDeclaration = assertModuleDeclaration;
  127731. exports.assertExportDeclaration = assertExportDeclaration;
  127732. exports.assertModuleSpecifier = assertModuleSpecifier;
  127733. exports.assertFlow = assertFlow;
  127734. exports.assertFlowType = assertFlowType;
  127735. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  127736. exports.assertFlowDeclaration = assertFlowDeclaration;
  127737. exports.assertFlowPredicate = assertFlowPredicate;
  127738. exports.assertEnumBody = assertEnumBody;
  127739. exports.assertEnumMember = assertEnumMember;
  127740. exports.assertJSX = assertJSX;
  127741. exports.assertPrivate = assertPrivate;
  127742. exports.assertTSTypeElement = assertTSTypeElement;
  127743. exports.assertTSType = assertTSType;
  127744. exports.assertTSBaseType = assertTSBaseType;
  127745. exports.assertNumberLiteral = assertNumberLiteral;
  127746. exports.assertRegexLiteral = assertRegexLiteral;
  127747. exports.assertRestProperty = assertRestProperty;
  127748. exports.assertSpreadProperty = assertSpreadProperty;
  127749. var _is = require_is6();
  127750. function assert(type, node, opts) {
  127751. if (!(0, _is.default)(type, node, opts)) {
  127752. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  127753. }
  127754. }
  127755. function assertArrayExpression(node, opts) {
  127756. assert("ArrayExpression", node, opts);
  127757. }
  127758. function assertAssignmentExpression(node, opts) {
  127759. assert("AssignmentExpression", node, opts);
  127760. }
  127761. function assertBinaryExpression(node, opts) {
  127762. assert("BinaryExpression", node, opts);
  127763. }
  127764. function assertInterpreterDirective(node, opts) {
  127765. assert("InterpreterDirective", node, opts);
  127766. }
  127767. function assertDirective(node, opts) {
  127768. assert("Directive", node, opts);
  127769. }
  127770. function assertDirectiveLiteral(node, opts) {
  127771. assert("DirectiveLiteral", node, opts);
  127772. }
  127773. function assertBlockStatement(node, opts) {
  127774. assert("BlockStatement", node, opts);
  127775. }
  127776. function assertBreakStatement(node, opts) {
  127777. assert("BreakStatement", node, opts);
  127778. }
  127779. function assertCallExpression(node, opts) {
  127780. assert("CallExpression", node, opts);
  127781. }
  127782. function assertCatchClause(node, opts) {
  127783. assert("CatchClause", node, opts);
  127784. }
  127785. function assertConditionalExpression(node, opts) {
  127786. assert("ConditionalExpression", node, opts);
  127787. }
  127788. function assertContinueStatement(node, opts) {
  127789. assert("ContinueStatement", node, opts);
  127790. }
  127791. function assertDebuggerStatement(node, opts) {
  127792. assert("DebuggerStatement", node, opts);
  127793. }
  127794. function assertDoWhileStatement(node, opts) {
  127795. assert("DoWhileStatement", node, opts);
  127796. }
  127797. function assertEmptyStatement(node, opts) {
  127798. assert("EmptyStatement", node, opts);
  127799. }
  127800. function assertExpressionStatement(node, opts) {
  127801. assert("ExpressionStatement", node, opts);
  127802. }
  127803. function assertFile(node, opts) {
  127804. assert("File", node, opts);
  127805. }
  127806. function assertForInStatement(node, opts) {
  127807. assert("ForInStatement", node, opts);
  127808. }
  127809. function assertForStatement(node, opts) {
  127810. assert("ForStatement", node, opts);
  127811. }
  127812. function assertFunctionDeclaration(node, opts) {
  127813. assert("FunctionDeclaration", node, opts);
  127814. }
  127815. function assertFunctionExpression(node, opts) {
  127816. assert("FunctionExpression", node, opts);
  127817. }
  127818. function assertIdentifier(node, opts) {
  127819. assert("Identifier", node, opts);
  127820. }
  127821. function assertIfStatement(node, opts) {
  127822. assert("IfStatement", node, opts);
  127823. }
  127824. function assertLabeledStatement(node, opts) {
  127825. assert("LabeledStatement", node, opts);
  127826. }
  127827. function assertStringLiteral(node, opts) {
  127828. assert("StringLiteral", node, opts);
  127829. }
  127830. function assertNumericLiteral(node, opts) {
  127831. assert("NumericLiteral", node, opts);
  127832. }
  127833. function assertNullLiteral(node, opts) {
  127834. assert("NullLiteral", node, opts);
  127835. }
  127836. function assertBooleanLiteral(node, opts) {
  127837. assert("BooleanLiteral", node, opts);
  127838. }
  127839. function assertRegExpLiteral(node, opts) {
  127840. assert("RegExpLiteral", node, opts);
  127841. }
  127842. function assertLogicalExpression(node, opts) {
  127843. assert("LogicalExpression", node, opts);
  127844. }
  127845. function assertMemberExpression(node, opts) {
  127846. assert("MemberExpression", node, opts);
  127847. }
  127848. function assertNewExpression(node, opts) {
  127849. assert("NewExpression", node, opts);
  127850. }
  127851. function assertProgram(node, opts) {
  127852. assert("Program", node, opts);
  127853. }
  127854. function assertObjectExpression(node, opts) {
  127855. assert("ObjectExpression", node, opts);
  127856. }
  127857. function assertObjectMethod(node, opts) {
  127858. assert("ObjectMethod", node, opts);
  127859. }
  127860. function assertObjectProperty(node, opts) {
  127861. assert("ObjectProperty", node, opts);
  127862. }
  127863. function assertRestElement(node, opts) {
  127864. assert("RestElement", node, opts);
  127865. }
  127866. function assertReturnStatement(node, opts) {
  127867. assert("ReturnStatement", node, opts);
  127868. }
  127869. function assertSequenceExpression(node, opts) {
  127870. assert("SequenceExpression", node, opts);
  127871. }
  127872. function assertParenthesizedExpression(node, opts) {
  127873. assert("ParenthesizedExpression", node, opts);
  127874. }
  127875. function assertSwitchCase(node, opts) {
  127876. assert("SwitchCase", node, opts);
  127877. }
  127878. function assertSwitchStatement(node, opts) {
  127879. assert("SwitchStatement", node, opts);
  127880. }
  127881. function assertThisExpression(node, opts) {
  127882. assert("ThisExpression", node, opts);
  127883. }
  127884. function assertThrowStatement(node, opts) {
  127885. assert("ThrowStatement", node, opts);
  127886. }
  127887. function assertTryStatement(node, opts) {
  127888. assert("TryStatement", node, opts);
  127889. }
  127890. function assertUnaryExpression(node, opts) {
  127891. assert("UnaryExpression", node, opts);
  127892. }
  127893. function assertUpdateExpression(node, opts) {
  127894. assert("UpdateExpression", node, opts);
  127895. }
  127896. function assertVariableDeclaration(node, opts) {
  127897. assert("VariableDeclaration", node, opts);
  127898. }
  127899. function assertVariableDeclarator(node, opts) {
  127900. assert("VariableDeclarator", node, opts);
  127901. }
  127902. function assertWhileStatement(node, opts) {
  127903. assert("WhileStatement", node, opts);
  127904. }
  127905. function assertWithStatement(node, opts) {
  127906. assert("WithStatement", node, opts);
  127907. }
  127908. function assertAssignmentPattern(node, opts) {
  127909. assert("AssignmentPattern", node, opts);
  127910. }
  127911. function assertArrayPattern(node, opts) {
  127912. assert("ArrayPattern", node, opts);
  127913. }
  127914. function assertArrowFunctionExpression(node, opts) {
  127915. assert("ArrowFunctionExpression", node, opts);
  127916. }
  127917. function assertClassBody(node, opts) {
  127918. assert("ClassBody", node, opts);
  127919. }
  127920. function assertClassExpression(node, opts) {
  127921. assert("ClassExpression", node, opts);
  127922. }
  127923. function assertClassDeclaration(node, opts) {
  127924. assert("ClassDeclaration", node, opts);
  127925. }
  127926. function assertExportAllDeclaration(node, opts) {
  127927. assert("ExportAllDeclaration", node, opts);
  127928. }
  127929. function assertExportDefaultDeclaration(node, opts) {
  127930. assert("ExportDefaultDeclaration", node, opts);
  127931. }
  127932. function assertExportNamedDeclaration(node, opts) {
  127933. assert("ExportNamedDeclaration", node, opts);
  127934. }
  127935. function assertExportSpecifier(node, opts) {
  127936. assert("ExportSpecifier", node, opts);
  127937. }
  127938. function assertForOfStatement(node, opts) {
  127939. assert("ForOfStatement", node, opts);
  127940. }
  127941. function assertImportDeclaration(node, opts) {
  127942. assert("ImportDeclaration", node, opts);
  127943. }
  127944. function assertImportDefaultSpecifier(node, opts) {
  127945. assert("ImportDefaultSpecifier", node, opts);
  127946. }
  127947. function assertImportNamespaceSpecifier(node, opts) {
  127948. assert("ImportNamespaceSpecifier", node, opts);
  127949. }
  127950. function assertImportSpecifier(node, opts) {
  127951. assert("ImportSpecifier", node, opts);
  127952. }
  127953. function assertMetaProperty(node, opts) {
  127954. assert("MetaProperty", node, opts);
  127955. }
  127956. function assertClassMethod(node, opts) {
  127957. assert("ClassMethod", node, opts);
  127958. }
  127959. function assertObjectPattern(node, opts) {
  127960. assert("ObjectPattern", node, opts);
  127961. }
  127962. function assertSpreadElement(node, opts) {
  127963. assert("SpreadElement", node, opts);
  127964. }
  127965. function assertSuper(node, opts) {
  127966. assert("Super", node, opts);
  127967. }
  127968. function assertTaggedTemplateExpression(node, opts) {
  127969. assert("TaggedTemplateExpression", node, opts);
  127970. }
  127971. function assertTemplateElement(node, opts) {
  127972. assert("TemplateElement", node, opts);
  127973. }
  127974. function assertTemplateLiteral(node, opts) {
  127975. assert("TemplateLiteral", node, opts);
  127976. }
  127977. function assertYieldExpression(node, opts) {
  127978. assert("YieldExpression", node, opts);
  127979. }
  127980. function assertAwaitExpression(node, opts) {
  127981. assert("AwaitExpression", node, opts);
  127982. }
  127983. function assertImport(node, opts) {
  127984. assert("Import", node, opts);
  127985. }
  127986. function assertBigIntLiteral(node, opts) {
  127987. assert("BigIntLiteral", node, opts);
  127988. }
  127989. function assertExportNamespaceSpecifier(node, opts) {
  127990. assert("ExportNamespaceSpecifier", node, opts);
  127991. }
  127992. function assertOptionalMemberExpression(node, opts) {
  127993. assert("OptionalMemberExpression", node, opts);
  127994. }
  127995. function assertOptionalCallExpression(node, opts) {
  127996. assert("OptionalCallExpression", node, opts);
  127997. }
  127998. function assertAnyTypeAnnotation(node, opts) {
  127999. assert("AnyTypeAnnotation", node, opts);
  128000. }
  128001. function assertArrayTypeAnnotation(node, opts) {
  128002. assert("ArrayTypeAnnotation", node, opts);
  128003. }
  128004. function assertBooleanTypeAnnotation(node, opts) {
  128005. assert("BooleanTypeAnnotation", node, opts);
  128006. }
  128007. function assertBooleanLiteralTypeAnnotation(node, opts) {
  128008. assert("BooleanLiteralTypeAnnotation", node, opts);
  128009. }
  128010. function assertNullLiteralTypeAnnotation(node, opts) {
  128011. assert("NullLiteralTypeAnnotation", node, opts);
  128012. }
  128013. function assertClassImplements(node, opts) {
  128014. assert("ClassImplements", node, opts);
  128015. }
  128016. function assertDeclareClass(node, opts) {
  128017. assert("DeclareClass", node, opts);
  128018. }
  128019. function assertDeclareFunction(node, opts) {
  128020. assert("DeclareFunction", node, opts);
  128021. }
  128022. function assertDeclareInterface(node, opts) {
  128023. assert("DeclareInterface", node, opts);
  128024. }
  128025. function assertDeclareModule(node, opts) {
  128026. assert("DeclareModule", node, opts);
  128027. }
  128028. function assertDeclareModuleExports(node, opts) {
  128029. assert("DeclareModuleExports", node, opts);
  128030. }
  128031. function assertDeclareTypeAlias(node, opts) {
  128032. assert("DeclareTypeAlias", node, opts);
  128033. }
  128034. function assertDeclareOpaqueType(node, opts) {
  128035. assert("DeclareOpaqueType", node, opts);
  128036. }
  128037. function assertDeclareVariable(node, opts) {
  128038. assert("DeclareVariable", node, opts);
  128039. }
  128040. function assertDeclareExportDeclaration(node, opts) {
  128041. assert("DeclareExportDeclaration", node, opts);
  128042. }
  128043. function assertDeclareExportAllDeclaration(node, opts) {
  128044. assert("DeclareExportAllDeclaration", node, opts);
  128045. }
  128046. function assertDeclaredPredicate(node, opts) {
  128047. assert("DeclaredPredicate", node, opts);
  128048. }
  128049. function assertExistsTypeAnnotation(node, opts) {
  128050. assert("ExistsTypeAnnotation", node, opts);
  128051. }
  128052. function assertFunctionTypeAnnotation(node, opts) {
  128053. assert("FunctionTypeAnnotation", node, opts);
  128054. }
  128055. function assertFunctionTypeParam(node, opts) {
  128056. assert("FunctionTypeParam", node, opts);
  128057. }
  128058. function assertGenericTypeAnnotation(node, opts) {
  128059. assert("GenericTypeAnnotation", node, opts);
  128060. }
  128061. function assertInferredPredicate(node, opts) {
  128062. assert("InferredPredicate", node, opts);
  128063. }
  128064. function assertInterfaceExtends(node, opts) {
  128065. assert("InterfaceExtends", node, opts);
  128066. }
  128067. function assertInterfaceDeclaration(node, opts) {
  128068. assert("InterfaceDeclaration", node, opts);
  128069. }
  128070. function assertInterfaceTypeAnnotation(node, opts) {
  128071. assert("InterfaceTypeAnnotation", node, opts);
  128072. }
  128073. function assertIntersectionTypeAnnotation(node, opts) {
  128074. assert("IntersectionTypeAnnotation", node, opts);
  128075. }
  128076. function assertMixedTypeAnnotation(node, opts) {
  128077. assert("MixedTypeAnnotation", node, opts);
  128078. }
  128079. function assertEmptyTypeAnnotation(node, opts) {
  128080. assert("EmptyTypeAnnotation", node, opts);
  128081. }
  128082. function assertNullableTypeAnnotation(node, opts) {
  128083. assert("NullableTypeAnnotation", node, opts);
  128084. }
  128085. function assertNumberLiteralTypeAnnotation(node, opts) {
  128086. assert("NumberLiteralTypeAnnotation", node, opts);
  128087. }
  128088. function assertNumberTypeAnnotation(node, opts) {
  128089. assert("NumberTypeAnnotation", node, opts);
  128090. }
  128091. function assertObjectTypeAnnotation(node, opts) {
  128092. assert("ObjectTypeAnnotation", node, opts);
  128093. }
  128094. function assertObjectTypeInternalSlot(node, opts) {
  128095. assert("ObjectTypeInternalSlot", node, opts);
  128096. }
  128097. function assertObjectTypeCallProperty(node, opts) {
  128098. assert("ObjectTypeCallProperty", node, opts);
  128099. }
  128100. function assertObjectTypeIndexer(node, opts) {
  128101. assert("ObjectTypeIndexer", node, opts);
  128102. }
  128103. function assertObjectTypeProperty(node, opts) {
  128104. assert("ObjectTypeProperty", node, opts);
  128105. }
  128106. function assertObjectTypeSpreadProperty(node, opts) {
  128107. assert("ObjectTypeSpreadProperty", node, opts);
  128108. }
  128109. function assertOpaqueType(node, opts) {
  128110. assert("OpaqueType", node, opts);
  128111. }
  128112. function assertQualifiedTypeIdentifier(node, opts) {
  128113. assert("QualifiedTypeIdentifier", node, opts);
  128114. }
  128115. function assertStringLiteralTypeAnnotation(node, opts) {
  128116. assert("StringLiteralTypeAnnotation", node, opts);
  128117. }
  128118. function assertStringTypeAnnotation(node, opts) {
  128119. assert("StringTypeAnnotation", node, opts);
  128120. }
  128121. function assertSymbolTypeAnnotation(node, opts) {
  128122. assert("SymbolTypeAnnotation", node, opts);
  128123. }
  128124. function assertThisTypeAnnotation(node, opts) {
  128125. assert("ThisTypeAnnotation", node, opts);
  128126. }
  128127. function assertTupleTypeAnnotation(node, opts) {
  128128. assert("TupleTypeAnnotation", node, opts);
  128129. }
  128130. function assertTypeofTypeAnnotation(node, opts) {
  128131. assert("TypeofTypeAnnotation", node, opts);
  128132. }
  128133. function assertTypeAlias(node, opts) {
  128134. assert("TypeAlias", node, opts);
  128135. }
  128136. function assertTypeAnnotation(node, opts) {
  128137. assert("TypeAnnotation", node, opts);
  128138. }
  128139. function assertTypeCastExpression(node, opts) {
  128140. assert("TypeCastExpression", node, opts);
  128141. }
  128142. function assertTypeParameter(node, opts) {
  128143. assert("TypeParameter", node, opts);
  128144. }
  128145. function assertTypeParameterDeclaration(node, opts) {
  128146. assert("TypeParameterDeclaration", node, opts);
  128147. }
  128148. function assertTypeParameterInstantiation(node, opts) {
  128149. assert("TypeParameterInstantiation", node, opts);
  128150. }
  128151. function assertUnionTypeAnnotation(node, opts) {
  128152. assert("UnionTypeAnnotation", node, opts);
  128153. }
  128154. function assertVariance(node, opts) {
  128155. assert("Variance", node, opts);
  128156. }
  128157. function assertVoidTypeAnnotation(node, opts) {
  128158. assert("VoidTypeAnnotation", node, opts);
  128159. }
  128160. function assertEnumDeclaration(node, opts) {
  128161. assert("EnumDeclaration", node, opts);
  128162. }
  128163. function assertEnumBooleanBody(node, opts) {
  128164. assert("EnumBooleanBody", node, opts);
  128165. }
  128166. function assertEnumNumberBody(node, opts) {
  128167. assert("EnumNumberBody", node, opts);
  128168. }
  128169. function assertEnumStringBody(node, opts) {
  128170. assert("EnumStringBody", node, opts);
  128171. }
  128172. function assertEnumSymbolBody(node, opts) {
  128173. assert("EnumSymbolBody", node, opts);
  128174. }
  128175. function assertEnumBooleanMember(node, opts) {
  128176. assert("EnumBooleanMember", node, opts);
  128177. }
  128178. function assertEnumNumberMember(node, opts) {
  128179. assert("EnumNumberMember", node, opts);
  128180. }
  128181. function assertEnumStringMember(node, opts) {
  128182. assert("EnumStringMember", node, opts);
  128183. }
  128184. function assertEnumDefaultedMember(node, opts) {
  128185. assert("EnumDefaultedMember", node, opts);
  128186. }
  128187. function assertIndexedAccessType(node, opts) {
  128188. assert("IndexedAccessType", node, opts);
  128189. }
  128190. function assertOptionalIndexedAccessType(node, opts) {
  128191. assert("OptionalIndexedAccessType", node, opts);
  128192. }
  128193. function assertJSXAttribute(node, opts) {
  128194. assert("JSXAttribute", node, opts);
  128195. }
  128196. function assertJSXClosingElement(node, opts) {
  128197. assert("JSXClosingElement", node, opts);
  128198. }
  128199. function assertJSXElement(node, opts) {
  128200. assert("JSXElement", node, opts);
  128201. }
  128202. function assertJSXEmptyExpression(node, opts) {
  128203. assert("JSXEmptyExpression", node, opts);
  128204. }
  128205. function assertJSXExpressionContainer(node, opts) {
  128206. assert("JSXExpressionContainer", node, opts);
  128207. }
  128208. function assertJSXSpreadChild(node, opts) {
  128209. assert("JSXSpreadChild", node, opts);
  128210. }
  128211. function assertJSXIdentifier(node, opts) {
  128212. assert("JSXIdentifier", node, opts);
  128213. }
  128214. function assertJSXMemberExpression(node, opts) {
  128215. assert("JSXMemberExpression", node, opts);
  128216. }
  128217. function assertJSXNamespacedName(node, opts) {
  128218. assert("JSXNamespacedName", node, opts);
  128219. }
  128220. function assertJSXOpeningElement(node, opts) {
  128221. assert("JSXOpeningElement", node, opts);
  128222. }
  128223. function assertJSXSpreadAttribute(node, opts) {
  128224. assert("JSXSpreadAttribute", node, opts);
  128225. }
  128226. function assertJSXText(node, opts) {
  128227. assert("JSXText", node, opts);
  128228. }
  128229. function assertJSXFragment(node, opts) {
  128230. assert("JSXFragment", node, opts);
  128231. }
  128232. function assertJSXOpeningFragment(node, opts) {
  128233. assert("JSXOpeningFragment", node, opts);
  128234. }
  128235. function assertJSXClosingFragment(node, opts) {
  128236. assert("JSXClosingFragment", node, opts);
  128237. }
  128238. function assertNoop(node, opts) {
  128239. assert("Noop", node, opts);
  128240. }
  128241. function assertPlaceholder(node, opts) {
  128242. assert("Placeholder", node, opts);
  128243. }
  128244. function assertV8IntrinsicIdentifier(node, opts) {
  128245. assert("V8IntrinsicIdentifier", node, opts);
  128246. }
  128247. function assertArgumentPlaceholder(node, opts) {
  128248. assert("ArgumentPlaceholder", node, opts);
  128249. }
  128250. function assertBindExpression(node, opts) {
  128251. assert("BindExpression", node, opts);
  128252. }
  128253. function assertClassProperty(node, opts) {
  128254. assert("ClassProperty", node, opts);
  128255. }
  128256. function assertPipelineTopicExpression(node, opts) {
  128257. assert("PipelineTopicExpression", node, opts);
  128258. }
  128259. function assertPipelineBareFunction(node, opts) {
  128260. assert("PipelineBareFunction", node, opts);
  128261. }
  128262. function assertPipelinePrimaryTopicReference(node, opts) {
  128263. assert("PipelinePrimaryTopicReference", node, opts);
  128264. }
  128265. function assertClassPrivateProperty(node, opts) {
  128266. assert("ClassPrivateProperty", node, opts);
  128267. }
  128268. function assertClassPrivateMethod(node, opts) {
  128269. assert("ClassPrivateMethod", node, opts);
  128270. }
  128271. function assertImportAttribute(node, opts) {
  128272. assert("ImportAttribute", node, opts);
  128273. }
  128274. function assertDecorator(node, opts) {
  128275. assert("Decorator", node, opts);
  128276. }
  128277. function assertDoExpression(node, opts) {
  128278. assert("DoExpression", node, opts);
  128279. }
  128280. function assertExportDefaultSpecifier(node, opts) {
  128281. assert("ExportDefaultSpecifier", node, opts);
  128282. }
  128283. function assertPrivateName(node, opts) {
  128284. assert("PrivateName", node, opts);
  128285. }
  128286. function assertRecordExpression(node, opts) {
  128287. assert("RecordExpression", node, opts);
  128288. }
  128289. function assertTupleExpression(node, opts) {
  128290. assert("TupleExpression", node, opts);
  128291. }
  128292. function assertDecimalLiteral(node, opts) {
  128293. assert("DecimalLiteral", node, opts);
  128294. }
  128295. function assertStaticBlock(node, opts) {
  128296. assert("StaticBlock", node, opts);
  128297. }
  128298. function assertModuleExpression(node, opts) {
  128299. assert("ModuleExpression", node, opts);
  128300. }
  128301. function assertTSParameterProperty(node, opts) {
  128302. assert("TSParameterProperty", node, opts);
  128303. }
  128304. function assertTSDeclareFunction(node, opts) {
  128305. assert("TSDeclareFunction", node, opts);
  128306. }
  128307. function assertTSDeclareMethod(node, opts) {
  128308. assert("TSDeclareMethod", node, opts);
  128309. }
  128310. function assertTSQualifiedName(node, opts) {
  128311. assert("TSQualifiedName", node, opts);
  128312. }
  128313. function assertTSCallSignatureDeclaration(node, opts) {
  128314. assert("TSCallSignatureDeclaration", node, opts);
  128315. }
  128316. function assertTSConstructSignatureDeclaration(node, opts) {
  128317. assert("TSConstructSignatureDeclaration", node, opts);
  128318. }
  128319. function assertTSPropertySignature(node, opts) {
  128320. assert("TSPropertySignature", node, opts);
  128321. }
  128322. function assertTSMethodSignature(node, opts) {
  128323. assert("TSMethodSignature", node, opts);
  128324. }
  128325. function assertTSIndexSignature(node, opts) {
  128326. assert("TSIndexSignature", node, opts);
  128327. }
  128328. function assertTSAnyKeyword(node, opts) {
  128329. assert("TSAnyKeyword", node, opts);
  128330. }
  128331. function assertTSBooleanKeyword(node, opts) {
  128332. assert("TSBooleanKeyword", node, opts);
  128333. }
  128334. function assertTSBigIntKeyword(node, opts) {
  128335. assert("TSBigIntKeyword", node, opts);
  128336. }
  128337. function assertTSIntrinsicKeyword(node, opts) {
  128338. assert("TSIntrinsicKeyword", node, opts);
  128339. }
  128340. function assertTSNeverKeyword(node, opts) {
  128341. assert("TSNeverKeyword", node, opts);
  128342. }
  128343. function assertTSNullKeyword(node, opts) {
  128344. assert("TSNullKeyword", node, opts);
  128345. }
  128346. function assertTSNumberKeyword(node, opts) {
  128347. assert("TSNumberKeyword", node, opts);
  128348. }
  128349. function assertTSObjectKeyword(node, opts) {
  128350. assert("TSObjectKeyword", node, opts);
  128351. }
  128352. function assertTSStringKeyword(node, opts) {
  128353. assert("TSStringKeyword", node, opts);
  128354. }
  128355. function assertTSSymbolKeyword(node, opts) {
  128356. assert("TSSymbolKeyword", node, opts);
  128357. }
  128358. function assertTSUndefinedKeyword(node, opts) {
  128359. assert("TSUndefinedKeyword", node, opts);
  128360. }
  128361. function assertTSUnknownKeyword(node, opts) {
  128362. assert("TSUnknownKeyword", node, opts);
  128363. }
  128364. function assertTSVoidKeyword(node, opts) {
  128365. assert("TSVoidKeyword", node, opts);
  128366. }
  128367. function assertTSThisType(node, opts) {
  128368. assert("TSThisType", node, opts);
  128369. }
  128370. function assertTSFunctionType(node, opts) {
  128371. assert("TSFunctionType", node, opts);
  128372. }
  128373. function assertTSConstructorType(node, opts) {
  128374. assert("TSConstructorType", node, opts);
  128375. }
  128376. function assertTSTypeReference(node, opts) {
  128377. assert("TSTypeReference", node, opts);
  128378. }
  128379. function assertTSTypePredicate(node, opts) {
  128380. assert("TSTypePredicate", node, opts);
  128381. }
  128382. function assertTSTypeQuery(node, opts) {
  128383. assert("TSTypeQuery", node, opts);
  128384. }
  128385. function assertTSTypeLiteral(node, opts) {
  128386. assert("TSTypeLiteral", node, opts);
  128387. }
  128388. function assertTSArrayType(node, opts) {
  128389. assert("TSArrayType", node, opts);
  128390. }
  128391. function assertTSTupleType(node, opts) {
  128392. assert("TSTupleType", node, opts);
  128393. }
  128394. function assertTSOptionalType(node, opts) {
  128395. assert("TSOptionalType", node, opts);
  128396. }
  128397. function assertTSRestType(node, opts) {
  128398. assert("TSRestType", node, opts);
  128399. }
  128400. function assertTSNamedTupleMember(node, opts) {
  128401. assert("TSNamedTupleMember", node, opts);
  128402. }
  128403. function assertTSUnionType(node, opts) {
  128404. assert("TSUnionType", node, opts);
  128405. }
  128406. function assertTSIntersectionType(node, opts) {
  128407. assert("TSIntersectionType", node, opts);
  128408. }
  128409. function assertTSConditionalType(node, opts) {
  128410. assert("TSConditionalType", node, opts);
  128411. }
  128412. function assertTSInferType(node, opts) {
  128413. assert("TSInferType", node, opts);
  128414. }
  128415. function assertTSParenthesizedType(node, opts) {
  128416. assert("TSParenthesizedType", node, opts);
  128417. }
  128418. function assertTSTypeOperator(node, opts) {
  128419. assert("TSTypeOperator", node, opts);
  128420. }
  128421. function assertTSIndexedAccessType(node, opts) {
  128422. assert("TSIndexedAccessType", node, opts);
  128423. }
  128424. function assertTSMappedType(node, opts) {
  128425. assert("TSMappedType", node, opts);
  128426. }
  128427. function assertTSLiteralType(node, opts) {
  128428. assert("TSLiteralType", node, opts);
  128429. }
  128430. function assertTSExpressionWithTypeArguments(node, opts) {
  128431. assert("TSExpressionWithTypeArguments", node, opts);
  128432. }
  128433. function assertTSInterfaceDeclaration(node, opts) {
  128434. assert("TSInterfaceDeclaration", node, opts);
  128435. }
  128436. function assertTSInterfaceBody(node, opts) {
  128437. assert("TSInterfaceBody", node, opts);
  128438. }
  128439. function assertTSTypeAliasDeclaration(node, opts) {
  128440. assert("TSTypeAliasDeclaration", node, opts);
  128441. }
  128442. function assertTSAsExpression(node, opts) {
  128443. assert("TSAsExpression", node, opts);
  128444. }
  128445. function assertTSTypeAssertion(node, opts) {
  128446. assert("TSTypeAssertion", node, opts);
  128447. }
  128448. function assertTSEnumDeclaration(node, opts) {
  128449. assert("TSEnumDeclaration", node, opts);
  128450. }
  128451. function assertTSEnumMember(node, opts) {
  128452. assert("TSEnumMember", node, opts);
  128453. }
  128454. function assertTSModuleDeclaration(node, opts) {
  128455. assert("TSModuleDeclaration", node, opts);
  128456. }
  128457. function assertTSModuleBlock(node, opts) {
  128458. assert("TSModuleBlock", node, opts);
  128459. }
  128460. function assertTSImportType(node, opts) {
  128461. assert("TSImportType", node, opts);
  128462. }
  128463. function assertTSImportEqualsDeclaration(node, opts) {
  128464. assert("TSImportEqualsDeclaration", node, opts);
  128465. }
  128466. function assertTSExternalModuleReference(node, opts) {
  128467. assert("TSExternalModuleReference", node, opts);
  128468. }
  128469. function assertTSNonNullExpression(node, opts) {
  128470. assert("TSNonNullExpression", node, opts);
  128471. }
  128472. function assertTSExportAssignment(node, opts) {
  128473. assert("TSExportAssignment", node, opts);
  128474. }
  128475. function assertTSNamespaceExportDeclaration(node, opts) {
  128476. assert("TSNamespaceExportDeclaration", node, opts);
  128477. }
  128478. function assertTSTypeAnnotation(node, opts) {
  128479. assert("TSTypeAnnotation", node, opts);
  128480. }
  128481. function assertTSTypeParameterInstantiation(node, opts) {
  128482. assert("TSTypeParameterInstantiation", node, opts);
  128483. }
  128484. function assertTSTypeParameterDeclaration(node, opts) {
  128485. assert("TSTypeParameterDeclaration", node, opts);
  128486. }
  128487. function assertTSTypeParameter(node, opts) {
  128488. assert("TSTypeParameter", node, opts);
  128489. }
  128490. function assertExpression(node, opts) {
  128491. assert("Expression", node, opts);
  128492. }
  128493. function assertBinary(node, opts) {
  128494. assert("Binary", node, opts);
  128495. }
  128496. function assertScopable(node, opts) {
  128497. assert("Scopable", node, opts);
  128498. }
  128499. function assertBlockParent(node, opts) {
  128500. assert("BlockParent", node, opts);
  128501. }
  128502. function assertBlock(node, opts) {
  128503. assert("Block", node, opts);
  128504. }
  128505. function assertStatement(node, opts) {
  128506. assert("Statement", node, opts);
  128507. }
  128508. function assertTerminatorless(node, opts) {
  128509. assert("Terminatorless", node, opts);
  128510. }
  128511. function assertCompletionStatement(node, opts) {
  128512. assert("CompletionStatement", node, opts);
  128513. }
  128514. function assertConditional(node, opts) {
  128515. assert("Conditional", node, opts);
  128516. }
  128517. function assertLoop(node, opts) {
  128518. assert("Loop", node, opts);
  128519. }
  128520. function assertWhile(node, opts) {
  128521. assert("While", node, opts);
  128522. }
  128523. function assertExpressionWrapper(node, opts) {
  128524. assert("ExpressionWrapper", node, opts);
  128525. }
  128526. function assertFor(node, opts) {
  128527. assert("For", node, opts);
  128528. }
  128529. function assertForXStatement(node, opts) {
  128530. assert("ForXStatement", node, opts);
  128531. }
  128532. function assertFunction(node, opts) {
  128533. assert("Function", node, opts);
  128534. }
  128535. function assertFunctionParent(node, opts) {
  128536. assert("FunctionParent", node, opts);
  128537. }
  128538. function assertPureish(node, opts) {
  128539. assert("Pureish", node, opts);
  128540. }
  128541. function assertDeclaration(node, opts) {
  128542. assert("Declaration", node, opts);
  128543. }
  128544. function assertPatternLike(node, opts) {
  128545. assert("PatternLike", node, opts);
  128546. }
  128547. function assertLVal(node, opts) {
  128548. assert("LVal", node, opts);
  128549. }
  128550. function assertTSEntityName(node, opts) {
  128551. assert("TSEntityName", node, opts);
  128552. }
  128553. function assertLiteral(node, opts) {
  128554. assert("Literal", node, opts);
  128555. }
  128556. function assertImmutable(node, opts) {
  128557. assert("Immutable", node, opts);
  128558. }
  128559. function assertUserWhitespacable(node, opts) {
  128560. assert("UserWhitespacable", node, opts);
  128561. }
  128562. function assertMethod(node, opts) {
  128563. assert("Method", node, opts);
  128564. }
  128565. function assertObjectMember(node, opts) {
  128566. assert("ObjectMember", node, opts);
  128567. }
  128568. function assertProperty(node, opts) {
  128569. assert("Property", node, opts);
  128570. }
  128571. function assertUnaryLike(node, opts) {
  128572. assert("UnaryLike", node, opts);
  128573. }
  128574. function assertPattern(node, opts) {
  128575. assert("Pattern", node, opts);
  128576. }
  128577. function assertClass(node, opts) {
  128578. assert("Class", node, opts);
  128579. }
  128580. function assertModuleDeclaration(node, opts) {
  128581. assert("ModuleDeclaration", node, opts);
  128582. }
  128583. function assertExportDeclaration(node, opts) {
  128584. assert("ExportDeclaration", node, opts);
  128585. }
  128586. function assertModuleSpecifier(node, opts) {
  128587. assert("ModuleSpecifier", node, opts);
  128588. }
  128589. function assertFlow(node, opts) {
  128590. assert("Flow", node, opts);
  128591. }
  128592. function assertFlowType(node, opts) {
  128593. assert("FlowType", node, opts);
  128594. }
  128595. function assertFlowBaseAnnotation(node, opts) {
  128596. assert("FlowBaseAnnotation", node, opts);
  128597. }
  128598. function assertFlowDeclaration(node, opts) {
  128599. assert("FlowDeclaration", node, opts);
  128600. }
  128601. function assertFlowPredicate(node, opts) {
  128602. assert("FlowPredicate", node, opts);
  128603. }
  128604. function assertEnumBody(node, opts) {
  128605. assert("EnumBody", node, opts);
  128606. }
  128607. function assertEnumMember(node, opts) {
  128608. assert("EnumMember", node, opts);
  128609. }
  128610. function assertJSX(node, opts) {
  128611. assert("JSX", node, opts);
  128612. }
  128613. function assertPrivate(node, opts) {
  128614. assert("Private", node, opts);
  128615. }
  128616. function assertTSTypeElement(node, opts) {
  128617. assert("TSTypeElement", node, opts);
  128618. }
  128619. function assertTSType(node, opts) {
  128620. assert("TSType", node, opts);
  128621. }
  128622. function assertTSBaseType(node, opts) {
  128623. assert("TSBaseType", node, opts);
  128624. }
  128625. function assertNumberLiteral(node, opts) {
  128626. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  128627. assert("NumberLiteral", node, opts);
  128628. }
  128629. function assertRegexLiteral(node, opts) {
  128630. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  128631. assert("RegexLiteral", node, opts);
  128632. }
  128633. function assertRestProperty(node, opts) {
  128634. console.trace("The node type RestProperty has been renamed to RestElement");
  128635. assert("RestProperty", node, opts);
  128636. }
  128637. function assertSpreadProperty(node, opts) {
  128638. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  128639. assert("SpreadProperty", node, opts);
  128640. }
  128641. }
  128642. });
  128643. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  128644. var require_createTypeAnnotationBasedOnTypeof6 = __commonJS({
  128645. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  128646. "use strict";
  128647. Object.defineProperty(exports, "__esModule", {
  128648. value: true
  128649. });
  128650. exports.default = createTypeAnnotationBasedOnTypeof;
  128651. var _generated = require_generated27();
  128652. function createTypeAnnotationBasedOnTypeof(type) {
  128653. if (type === "string") {
  128654. return (0, _generated.stringTypeAnnotation)();
  128655. } else if (type === "number") {
  128656. return (0, _generated.numberTypeAnnotation)();
  128657. } else if (type === "undefined") {
  128658. return (0, _generated.voidTypeAnnotation)();
  128659. } else if (type === "boolean") {
  128660. return (0, _generated.booleanTypeAnnotation)();
  128661. } else if (type === "function") {
  128662. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  128663. } else if (type === "object") {
  128664. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  128665. } else if (type === "symbol") {
  128666. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  128667. } else if (type === "bigint") {
  128668. return (0, _generated.anyTypeAnnotation)();
  128669. } else {
  128670. throw new Error("Invalid typeof value: " + type);
  128671. }
  128672. }
  128673. }
  128674. });
  128675. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  128676. var require_removeTypeDuplicates11 = __commonJS({
  128677. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  128678. "use strict";
  128679. Object.defineProperty(exports, "__esModule", {
  128680. value: true
  128681. });
  128682. exports.default = removeTypeDuplicates;
  128683. var _generated = require_generated26();
  128684. function getQualifiedName(node) {
  128685. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  128686. }
  128687. function removeTypeDuplicates(nodes) {
  128688. const generics = {};
  128689. const bases = {};
  128690. const typeGroups = [];
  128691. const types2 = [];
  128692. for (let i = 0; i < nodes.length; i++) {
  128693. const node = nodes[i];
  128694. if (!node)
  128695. continue;
  128696. if (types2.indexOf(node) >= 0) {
  128697. continue;
  128698. }
  128699. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  128700. return [node];
  128701. }
  128702. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  128703. bases[node.type] = node;
  128704. continue;
  128705. }
  128706. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  128707. if (typeGroups.indexOf(node.types) < 0) {
  128708. nodes = nodes.concat(node.types);
  128709. typeGroups.push(node.types);
  128710. }
  128711. continue;
  128712. }
  128713. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  128714. const name2 = getQualifiedName(node.id);
  128715. if (generics[name2]) {
  128716. let existing = generics[name2];
  128717. if (existing.typeParameters) {
  128718. if (node.typeParameters) {
  128719. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  128720. }
  128721. } else {
  128722. existing = node.typeParameters;
  128723. }
  128724. } else {
  128725. generics[name2] = node;
  128726. }
  128727. continue;
  128728. }
  128729. types2.push(node);
  128730. }
  128731. for (const type of Object.keys(bases)) {
  128732. types2.push(bases[type]);
  128733. }
  128734. for (const name2 of Object.keys(generics)) {
  128735. types2.push(generics[name2]);
  128736. }
  128737. return types2;
  128738. }
  128739. }
  128740. });
  128741. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  128742. var require_createFlowUnionType6 = __commonJS({
  128743. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  128744. "use strict";
  128745. Object.defineProperty(exports, "__esModule", {
  128746. value: true
  128747. });
  128748. exports.default = createFlowUnionType;
  128749. var _generated = require_generated27();
  128750. var _removeTypeDuplicates = require_removeTypeDuplicates11();
  128751. function createFlowUnionType(types2) {
  128752. const flattened = (0, _removeTypeDuplicates.default)(types2);
  128753. if (flattened.length === 1) {
  128754. return flattened[0];
  128755. } else {
  128756. return (0, _generated.unionTypeAnnotation)(flattened);
  128757. }
  128758. }
  128759. }
  128760. });
  128761. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  128762. var require_removeTypeDuplicates12 = __commonJS({
  128763. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  128764. "use strict";
  128765. Object.defineProperty(exports, "__esModule", {
  128766. value: true
  128767. });
  128768. exports.default = removeTypeDuplicates;
  128769. var _generated = require_generated26();
  128770. function removeTypeDuplicates(nodes) {
  128771. const generics = {};
  128772. const bases = {};
  128773. const typeGroups = [];
  128774. const types2 = [];
  128775. for (let i = 0; i < nodes.length; i++) {
  128776. const node = nodes[i];
  128777. if (!node)
  128778. continue;
  128779. if (types2.indexOf(node) >= 0) {
  128780. continue;
  128781. }
  128782. if ((0, _generated.isTSAnyKeyword)(node)) {
  128783. return [node];
  128784. }
  128785. if ((0, _generated.isTSBaseType)(node)) {
  128786. bases[node.type] = node;
  128787. continue;
  128788. }
  128789. if ((0, _generated.isTSUnionType)(node)) {
  128790. if (typeGroups.indexOf(node.types) < 0) {
  128791. nodes = nodes.concat(node.types);
  128792. typeGroups.push(node.types);
  128793. }
  128794. continue;
  128795. }
  128796. types2.push(node);
  128797. }
  128798. for (const type of Object.keys(bases)) {
  128799. types2.push(bases[type]);
  128800. }
  128801. for (const name2 of Object.keys(generics)) {
  128802. types2.push(generics[name2]);
  128803. }
  128804. return types2;
  128805. }
  128806. }
  128807. });
  128808. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  128809. var require_createTSUnionType6 = __commonJS({
  128810. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  128811. "use strict";
  128812. Object.defineProperty(exports, "__esModule", {
  128813. value: true
  128814. });
  128815. exports.default = createTSUnionType;
  128816. var _generated = require_generated27();
  128817. var _removeTypeDuplicates = require_removeTypeDuplicates12();
  128818. function createTSUnionType(typeAnnotations) {
  128819. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  128820. const flattened = (0, _removeTypeDuplicates.default)(types2);
  128821. if (flattened.length === 1) {
  128822. return flattened[0];
  128823. } else {
  128824. return (0, _generated.tsUnionType)(flattened);
  128825. }
  128826. }
  128827. }
  128828. });
  128829. // node_modules/@babel/template/node_modules/@babel/types/lib/builders/generated/uppercase.js
  128830. var require_uppercase6 = __commonJS({
  128831. "node_modules/@babel/template/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  128832. "use strict";
  128833. Object.defineProperty(exports, "__esModule", {
  128834. value: true
  128835. });
  128836. Object.defineProperty(exports, "ArrayExpression", {
  128837. enumerable: true,
  128838. get: function() {
  128839. return _index.arrayExpression;
  128840. }
  128841. });
  128842. Object.defineProperty(exports, "AssignmentExpression", {
  128843. enumerable: true,
  128844. get: function() {
  128845. return _index.assignmentExpression;
  128846. }
  128847. });
  128848. Object.defineProperty(exports, "BinaryExpression", {
  128849. enumerable: true,
  128850. get: function() {
  128851. return _index.binaryExpression;
  128852. }
  128853. });
  128854. Object.defineProperty(exports, "InterpreterDirective", {
  128855. enumerable: true,
  128856. get: function() {
  128857. return _index.interpreterDirective;
  128858. }
  128859. });
  128860. Object.defineProperty(exports, "Directive", {
  128861. enumerable: true,
  128862. get: function() {
  128863. return _index.directive;
  128864. }
  128865. });
  128866. Object.defineProperty(exports, "DirectiveLiteral", {
  128867. enumerable: true,
  128868. get: function() {
  128869. return _index.directiveLiteral;
  128870. }
  128871. });
  128872. Object.defineProperty(exports, "BlockStatement", {
  128873. enumerable: true,
  128874. get: function() {
  128875. return _index.blockStatement;
  128876. }
  128877. });
  128878. Object.defineProperty(exports, "BreakStatement", {
  128879. enumerable: true,
  128880. get: function() {
  128881. return _index.breakStatement;
  128882. }
  128883. });
  128884. Object.defineProperty(exports, "CallExpression", {
  128885. enumerable: true,
  128886. get: function() {
  128887. return _index.callExpression;
  128888. }
  128889. });
  128890. Object.defineProperty(exports, "CatchClause", {
  128891. enumerable: true,
  128892. get: function() {
  128893. return _index.catchClause;
  128894. }
  128895. });
  128896. Object.defineProperty(exports, "ConditionalExpression", {
  128897. enumerable: true,
  128898. get: function() {
  128899. return _index.conditionalExpression;
  128900. }
  128901. });
  128902. Object.defineProperty(exports, "ContinueStatement", {
  128903. enumerable: true,
  128904. get: function() {
  128905. return _index.continueStatement;
  128906. }
  128907. });
  128908. Object.defineProperty(exports, "DebuggerStatement", {
  128909. enumerable: true,
  128910. get: function() {
  128911. return _index.debuggerStatement;
  128912. }
  128913. });
  128914. Object.defineProperty(exports, "DoWhileStatement", {
  128915. enumerable: true,
  128916. get: function() {
  128917. return _index.doWhileStatement;
  128918. }
  128919. });
  128920. Object.defineProperty(exports, "EmptyStatement", {
  128921. enumerable: true,
  128922. get: function() {
  128923. return _index.emptyStatement;
  128924. }
  128925. });
  128926. Object.defineProperty(exports, "ExpressionStatement", {
  128927. enumerable: true,
  128928. get: function() {
  128929. return _index.expressionStatement;
  128930. }
  128931. });
  128932. Object.defineProperty(exports, "File", {
  128933. enumerable: true,
  128934. get: function() {
  128935. return _index.file;
  128936. }
  128937. });
  128938. Object.defineProperty(exports, "ForInStatement", {
  128939. enumerable: true,
  128940. get: function() {
  128941. return _index.forInStatement;
  128942. }
  128943. });
  128944. Object.defineProperty(exports, "ForStatement", {
  128945. enumerable: true,
  128946. get: function() {
  128947. return _index.forStatement;
  128948. }
  128949. });
  128950. Object.defineProperty(exports, "FunctionDeclaration", {
  128951. enumerable: true,
  128952. get: function() {
  128953. return _index.functionDeclaration;
  128954. }
  128955. });
  128956. Object.defineProperty(exports, "FunctionExpression", {
  128957. enumerable: true,
  128958. get: function() {
  128959. return _index.functionExpression;
  128960. }
  128961. });
  128962. Object.defineProperty(exports, "Identifier", {
  128963. enumerable: true,
  128964. get: function() {
  128965. return _index.identifier;
  128966. }
  128967. });
  128968. Object.defineProperty(exports, "IfStatement", {
  128969. enumerable: true,
  128970. get: function() {
  128971. return _index.ifStatement;
  128972. }
  128973. });
  128974. Object.defineProperty(exports, "LabeledStatement", {
  128975. enumerable: true,
  128976. get: function() {
  128977. return _index.labeledStatement;
  128978. }
  128979. });
  128980. Object.defineProperty(exports, "StringLiteral", {
  128981. enumerable: true,
  128982. get: function() {
  128983. return _index.stringLiteral;
  128984. }
  128985. });
  128986. Object.defineProperty(exports, "NumericLiteral", {
  128987. enumerable: true,
  128988. get: function() {
  128989. return _index.numericLiteral;
  128990. }
  128991. });
  128992. Object.defineProperty(exports, "NullLiteral", {
  128993. enumerable: true,
  128994. get: function() {
  128995. return _index.nullLiteral;
  128996. }
  128997. });
  128998. Object.defineProperty(exports, "BooleanLiteral", {
  128999. enumerable: true,
  129000. get: function() {
  129001. return _index.booleanLiteral;
  129002. }
  129003. });
  129004. Object.defineProperty(exports, "RegExpLiteral", {
  129005. enumerable: true,
  129006. get: function() {
  129007. return _index.regExpLiteral;
  129008. }
  129009. });
  129010. Object.defineProperty(exports, "LogicalExpression", {
  129011. enumerable: true,
  129012. get: function() {
  129013. return _index.logicalExpression;
  129014. }
  129015. });
  129016. Object.defineProperty(exports, "MemberExpression", {
  129017. enumerable: true,
  129018. get: function() {
  129019. return _index.memberExpression;
  129020. }
  129021. });
  129022. Object.defineProperty(exports, "NewExpression", {
  129023. enumerable: true,
  129024. get: function() {
  129025. return _index.newExpression;
  129026. }
  129027. });
  129028. Object.defineProperty(exports, "Program", {
  129029. enumerable: true,
  129030. get: function() {
  129031. return _index.program;
  129032. }
  129033. });
  129034. Object.defineProperty(exports, "ObjectExpression", {
  129035. enumerable: true,
  129036. get: function() {
  129037. return _index.objectExpression;
  129038. }
  129039. });
  129040. Object.defineProperty(exports, "ObjectMethod", {
  129041. enumerable: true,
  129042. get: function() {
  129043. return _index.objectMethod;
  129044. }
  129045. });
  129046. Object.defineProperty(exports, "ObjectProperty", {
  129047. enumerable: true,
  129048. get: function() {
  129049. return _index.objectProperty;
  129050. }
  129051. });
  129052. Object.defineProperty(exports, "RestElement", {
  129053. enumerable: true,
  129054. get: function() {
  129055. return _index.restElement;
  129056. }
  129057. });
  129058. Object.defineProperty(exports, "ReturnStatement", {
  129059. enumerable: true,
  129060. get: function() {
  129061. return _index.returnStatement;
  129062. }
  129063. });
  129064. Object.defineProperty(exports, "SequenceExpression", {
  129065. enumerable: true,
  129066. get: function() {
  129067. return _index.sequenceExpression;
  129068. }
  129069. });
  129070. Object.defineProperty(exports, "ParenthesizedExpression", {
  129071. enumerable: true,
  129072. get: function() {
  129073. return _index.parenthesizedExpression;
  129074. }
  129075. });
  129076. Object.defineProperty(exports, "SwitchCase", {
  129077. enumerable: true,
  129078. get: function() {
  129079. return _index.switchCase;
  129080. }
  129081. });
  129082. Object.defineProperty(exports, "SwitchStatement", {
  129083. enumerable: true,
  129084. get: function() {
  129085. return _index.switchStatement;
  129086. }
  129087. });
  129088. Object.defineProperty(exports, "ThisExpression", {
  129089. enumerable: true,
  129090. get: function() {
  129091. return _index.thisExpression;
  129092. }
  129093. });
  129094. Object.defineProperty(exports, "ThrowStatement", {
  129095. enumerable: true,
  129096. get: function() {
  129097. return _index.throwStatement;
  129098. }
  129099. });
  129100. Object.defineProperty(exports, "TryStatement", {
  129101. enumerable: true,
  129102. get: function() {
  129103. return _index.tryStatement;
  129104. }
  129105. });
  129106. Object.defineProperty(exports, "UnaryExpression", {
  129107. enumerable: true,
  129108. get: function() {
  129109. return _index.unaryExpression;
  129110. }
  129111. });
  129112. Object.defineProperty(exports, "UpdateExpression", {
  129113. enumerable: true,
  129114. get: function() {
  129115. return _index.updateExpression;
  129116. }
  129117. });
  129118. Object.defineProperty(exports, "VariableDeclaration", {
  129119. enumerable: true,
  129120. get: function() {
  129121. return _index.variableDeclaration;
  129122. }
  129123. });
  129124. Object.defineProperty(exports, "VariableDeclarator", {
  129125. enumerable: true,
  129126. get: function() {
  129127. return _index.variableDeclarator;
  129128. }
  129129. });
  129130. Object.defineProperty(exports, "WhileStatement", {
  129131. enumerable: true,
  129132. get: function() {
  129133. return _index.whileStatement;
  129134. }
  129135. });
  129136. Object.defineProperty(exports, "WithStatement", {
  129137. enumerable: true,
  129138. get: function() {
  129139. return _index.withStatement;
  129140. }
  129141. });
  129142. Object.defineProperty(exports, "AssignmentPattern", {
  129143. enumerable: true,
  129144. get: function() {
  129145. return _index.assignmentPattern;
  129146. }
  129147. });
  129148. Object.defineProperty(exports, "ArrayPattern", {
  129149. enumerable: true,
  129150. get: function() {
  129151. return _index.arrayPattern;
  129152. }
  129153. });
  129154. Object.defineProperty(exports, "ArrowFunctionExpression", {
  129155. enumerable: true,
  129156. get: function() {
  129157. return _index.arrowFunctionExpression;
  129158. }
  129159. });
  129160. Object.defineProperty(exports, "ClassBody", {
  129161. enumerable: true,
  129162. get: function() {
  129163. return _index.classBody;
  129164. }
  129165. });
  129166. Object.defineProperty(exports, "ClassExpression", {
  129167. enumerable: true,
  129168. get: function() {
  129169. return _index.classExpression;
  129170. }
  129171. });
  129172. Object.defineProperty(exports, "ClassDeclaration", {
  129173. enumerable: true,
  129174. get: function() {
  129175. return _index.classDeclaration;
  129176. }
  129177. });
  129178. Object.defineProperty(exports, "ExportAllDeclaration", {
  129179. enumerable: true,
  129180. get: function() {
  129181. return _index.exportAllDeclaration;
  129182. }
  129183. });
  129184. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  129185. enumerable: true,
  129186. get: function() {
  129187. return _index.exportDefaultDeclaration;
  129188. }
  129189. });
  129190. Object.defineProperty(exports, "ExportNamedDeclaration", {
  129191. enumerable: true,
  129192. get: function() {
  129193. return _index.exportNamedDeclaration;
  129194. }
  129195. });
  129196. Object.defineProperty(exports, "ExportSpecifier", {
  129197. enumerable: true,
  129198. get: function() {
  129199. return _index.exportSpecifier;
  129200. }
  129201. });
  129202. Object.defineProperty(exports, "ForOfStatement", {
  129203. enumerable: true,
  129204. get: function() {
  129205. return _index.forOfStatement;
  129206. }
  129207. });
  129208. Object.defineProperty(exports, "ImportDeclaration", {
  129209. enumerable: true,
  129210. get: function() {
  129211. return _index.importDeclaration;
  129212. }
  129213. });
  129214. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  129215. enumerable: true,
  129216. get: function() {
  129217. return _index.importDefaultSpecifier;
  129218. }
  129219. });
  129220. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  129221. enumerable: true,
  129222. get: function() {
  129223. return _index.importNamespaceSpecifier;
  129224. }
  129225. });
  129226. Object.defineProperty(exports, "ImportSpecifier", {
  129227. enumerable: true,
  129228. get: function() {
  129229. return _index.importSpecifier;
  129230. }
  129231. });
  129232. Object.defineProperty(exports, "MetaProperty", {
  129233. enumerable: true,
  129234. get: function() {
  129235. return _index.metaProperty;
  129236. }
  129237. });
  129238. Object.defineProperty(exports, "ClassMethod", {
  129239. enumerable: true,
  129240. get: function() {
  129241. return _index.classMethod;
  129242. }
  129243. });
  129244. Object.defineProperty(exports, "ObjectPattern", {
  129245. enumerable: true,
  129246. get: function() {
  129247. return _index.objectPattern;
  129248. }
  129249. });
  129250. Object.defineProperty(exports, "SpreadElement", {
  129251. enumerable: true,
  129252. get: function() {
  129253. return _index.spreadElement;
  129254. }
  129255. });
  129256. Object.defineProperty(exports, "Super", {
  129257. enumerable: true,
  129258. get: function() {
  129259. return _index.super;
  129260. }
  129261. });
  129262. Object.defineProperty(exports, "TaggedTemplateExpression", {
  129263. enumerable: true,
  129264. get: function() {
  129265. return _index.taggedTemplateExpression;
  129266. }
  129267. });
  129268. Object.defineProperty(exports, "TemplateElement", {
  129269. enumerable: true,
  129270. get: function() {
  129271. return _index.templateElement;
  129272. }
  129273. });
  129274. Object.defineProperty(exports, "TemplateLiteral", {
  129275. enumerable: true,
  129276. get: function() {
  129277. return _index.templateLiteral;
  129278. }
  129279. });
  129280. Object.defineProperty(exports, "YieldExpression", {
  129281. enumerable: true,
  129282. get: function() {
  129283. return _index.yieldExpression;
  129284. }
  129285. });
  129286. Object.defineProperty(exports, "AwaitExpression", {
  129287. enumerable: true,
  129288. get: function() {
  129289. return _index.awaitExpression;
  129290. }
  129291. });
  129292. Object.defineProperty(exports, "Import", {
  129293. enumerable: true,
  129294. get: function() {
  129295. return _index.import;
  129296. }
  129297. });
  129298. Object.defineProperty(exports, "BigIntLiteral", {
  129299. enumerable: true,
  129300. get: function() {
  129301. return _index.bigIntLiteral;
  129302. }
  129303. });
  129304. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  129305. enumerable: true,
  129306. get: function() {
  129307. return _index.exportNamespaceSpecifier;
  129308. }
  129309. });
  129310. Object.defineProperty(exports, "OptionalMemberExpression", {
  129311. enumerable: true,
  129312. get: function() {
  129313. return _index.optionalMemberExpression;
  129314. }
  129315. });
  129316. Object.defineProperty(exports, "OptionalCallExpression", {
  129317. enumerable: true,
  129318. get: function() {
  129319. return _index.optionalCallExpression;
  129320. }
  129321. });
  129322. Object.defineProperty(exports, "AnyTypeAnnotation", {
  129323. enumerable: true,
  129324. get: function() {
  129325. return _index.anyTypeAnnotation;
  129326. }
  129327. });
  129328. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  129329. enumerable: true,
  129330. get: function() {
  129331. return _index.arrayTypeAnnotation;
  129332. }
  129333. });
  129334. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  129335. enumerable: true,
  129336. get: function() {
  129337. return _index.booleanTypeAnnotation;
  129338. }
  129339. });
  129340. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  129341. enumerable: true,
  129342. get: function() {
  129343. return _index.booleanLiteralTypeAnnotation;
  129344. }
  129345. });
  129346. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  129347. enumerable: true,
  129348. get: function() {
  129349. return _index.nullLiteralTypeAnnotation;
  129350. }
  129351. });
  129352. Object.defineProperty(exports, "ClassImplements", {
  129353. enumerable: true,
  129354. get: function() {
  129355. return _index.classImplements;
  129356. }
  129357. });
  129358. Object.defineProperty(exports, "DeclareClass", {
  129359. enumerable: true,
  129360. get: function() {
  129361. return _index.declareClass;
  129362. }
  129363. });
  129364. Object.defineProperty(exports, "DeclareFunction", {
  129365. enumerable: true,
  129366. get: function() {
  129367. return _index.declareFunction;
  129368. }
  129369. });
  129370. Object.defineProperty(exports, "DeclareInterface", {
  129371. enumerable: true,
  129372. get: function() {
  129373. return _index.declareInterface;
  129374. }
  129375. });
  129376. Object.defineProperty(exports, "DeclareModule", {
  129377. enumerable: true,
  129378. get: function() {
  129379. return _index.declareModule;
  129380. }
  129381. });
  129382. Object.defineProperty(exports, "DeclareModuleExports", {
  129383. enumerable: true,
  129384. get: function() {
  129385. return _index.declareModuleExports;
  129386. }
  129387. });
  129388. Object.defineProperty(exports, "DeclareTypeAlias", {
  129389. enumerable: true,
  129390. get: function() {
  129391. return _index.declareTypeAlias;
  129392. }
  129393. });
  129394. Object.defineProperty(exports, "DeclareOpaqueType", {
  129395. enumerable: true,
  129396. get: function() {
  129397. return _index.declareOpaqueType;
  129398. }
  129399. });
  129400. Object.defineProperty(exports, "DeclareVariable", {
  129401. enumerable: true,
  129402. get: function() {
  129403. return _index.declareVariable;
  129404. }
  129405. });
  129406. Object.defineProperty(exports, "DeclareExportDeclaration", {
  129407. enumerable: true,
  129408. get: function() {
  129409. return _index.declareExportDeclaration;
  129410. }
  129411. });
  129412. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  129413. enumerable: true,
  129414. get: function() {
  129415. return _index.declareExportAllDeclaration;
  129416. }
  129417. });
  129418. Object.defineProperty(exports, "DeclaredPredicate", {
  129419. enumerable: true,
  129420. get: function() {
  129421. return _index.declaredPredicate;
  129422. }
  129423. });
  129424. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  129425. enumerable: true,
  129426. get: function() {
  129427. return _index.existsTypeAnnotation;
  129428. }
  129429. });
  129430. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  129431. enumerable: true,
  129432. get: function() {
  129433. return _index.functionTypeAnnotation;
  129434. }
  129435. });
  129436. Object.defineProperty(exports, "FunctionTypeParam", {
  129437. enumerable: true,
  129438. get: function() {
  129439. return _index.functionTypeParam;
  129440. }
  129441. });
  129442. Object.defineProperty(exports, "GenericTypeAnnotation", {
  129443. enumerable: true,
  129444. get: function() {
  129445. return _index.genericTypeAnnotation;
  129446. }
  129447. });
  129448. Object.defineProperty(exports, "InferredPredicate", {
  129449. enumerable: true,
  129450. get: function() {
  129451. return _index.inferredPredicate;
  129452. }
  129453. });
  129454. Object.defineProperty(exports, "InterfaceExtends", {
  129455. enumerable: true,
  129456. get: function() {
  129457. return _index.interfaceExtends;
  129458. }
  129459. });
  129460. Object.defineProperty(exports, "InterfaceDeclaration", {
  129461. enumerable: true,
  129462. get: function() {
  129463. return _index.interfaceDeclaration;
  129464. }
  129465. });
  129466. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  129467. enumerable: true,
  129468. get: function() {
  129469. return _index.interfaceTypeAnnotation;
  129470. }
  129471. });
  129472. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  129473. enumerable: true,
  129474. get: function() {
  129475. return _index.intersectionTypeAnnotation;
  129476. }
  129477. });
  129478. Object.defineProperty(exports, "MixedTypeAnnotation", {
  129479. enumerable: true,
  129480. get: function() {
  129481. return _index.mixedTypeAnnotation;
  129482. }
  129483. });
  129484. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  129485. enumerable: true,
  129486. get: function() {
  129487. return _index.emptyTypeAnnotation;
  129488. }
  129489. });
  129490. Object.defineProperty(exports, "NullableTypeAnnotation", {
  129491. enumerable: true,
  129492. get: function() {
  129493. return _index.nullableTypeAnnotation;
  129494. }
  129495. });
  129496. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  129497. enumerable: true,
  129498. get: function() {
  129499. return _index.numberLiteralTypeAnnotation;
  129500. }
  129501. });
  129502. Object.defineProperty(exports, "NumberTypeAnnotation", {
  129503. enumerable: true,
  129504. get: function() {
  129505. return _index.numberTypeAnnotation;
  129506. }
  129507. });
  129508. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  129509. enumerable: true,
  129510. get: function() {
  129511. return _index.objectTypeAnnotation;
  129512. }
  129513. });
  129514. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  129515. enumerable: true,
  129516. get: function() {
  129517. return _index.objectTypeInternalSlot;
  129518. }
  129519. });
  129520. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  129521. enumerable: true,
  129522. get: function() {
  129523. return _index.objectTypeCallProperty;
  129524. }
  129525. });
  129526. Object.defineProperty(exports, "ObjectTypeIndexer", {
  129527. enumerable: true,
  129528. get: function() {
  129529. return _index.objectTypeIndexer;
  129530. }
  129531. });
  129532. Object.defineProperty(exports, "ObjectTypeProperty", {
  129533. enumerable: true,
  129534. get: function() {
  129535. return _index.objectTypeProperty;
  129536. }
  129537. });
  129538. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  129539. enumerable: true,
  129540. get: function() {
  129541. return _index.objectTypeSpreadProperty;
  129542. }
  129543. });
  129544. Object.defineProperty(exports, "OpaqueType", {
  129545. enumerable: true,
  129546. get: function() {
  129547. return _index.opaqueType;
  129548. }
  129549. });
  129550. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  129551. enumerable: true,
  129552. get: function() {
  129553. return _index.qualifiedTypeIdentifier;
  129554. }
  129555. });
  129556. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  129557. enumerable: true,
  129558. get: function() {
  129559. return _index.stringLiteralTypeAnnotation;
  129560. }
  129561. });
  129562. Object.defineProperty(exports, "StringTypeAnnotation", {
  129563. enumerable: true,
  129564. get: function() {
  129565. return _index.stringTypeAnnotation;
  129566. }
  129567. });
  129568. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  129569. enumerable: true,
  129570. get: function() {
  129571. return _index.symbolTypeAnnotation;
  129572. }
  129573. });
  129574. Object.defineProperty(exports, "ThisTypeAnnotation", {
  129575. enumerable: true,
  129576. get: function() {
  129577. return _index.thisTypeAnnotation;
  129578. }
  129579. });
  129580. Object.defineProperty(exports, "TupleTypeAnnotation", {
  129581. enumerable: true,
  129582. get: function() {
  129583. return _index.tupleTypeAnnotation;
  129584. }
  129585. });
  129586. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  129587. enumerable: true,
  129588. get: function() {
  129589. return _index.typeofTypeAnnotation;
  129590. }
  129591. });
  129592. Object.defineProperty(exports, "TypeAlias", {
  129593. enumerable: true,
  129594. get: function() {
  129595. return _index.typeAlias;
  129596. }
  129597. });
  129598. Object.defineProperty(exports, "TypeAnnotation", {
  129599. enumerable: true,
  129600. get: function() {
  129601. return _index.typeAnnotation;
  129602. }
  129603. });
  129604. Object.defineProperty(exports, "TypeCastExpression", {
  129605. enumerable: true,
  129606. get: function() {
  129607. return _index.typeCastExpression;
  129608. }
  129609. });
  129610. Object.defineProperty(exports, "TypeParameter", {
  129611. enumerable: true,
  129612. get: function() {
  129613. return _index.typeParameter;
  129614. }
  129615. });
  129616. Object.defineProperty(exports, "TypeParameterDeclaration", {
  129617. enumerable: true,
  129618. get: function() {
  129619. return _index.typeParameterDeclaration;
  129620. }
  129621. });
  129622. Object.defineProperty(exports, "TypeParameterInstantiation", {
  129623. enumerable: true,
  129624. get: function() {
  129625. return _index.typeParameterInstantiation;
  129626. }
  129627. });
  129628. Object.defineProperty(exports, "UnionTypeAnnotation", {
  129629. enumerable: true,
  129630. get: function() {
  129631. return _index.unionTypeAnnotation;
  129632. }
  129633. });
  129634. Object.defineProperty(exports, "Variance", {
  129635. enumerable: true,
  129636. get: function() {
  129637. return _index.variance;
  129638. }
  129639. });
  129640. Object.defineProperty(exports, "VoidTypeAnnotation", {
  129641. enumerable: true,
  129642. get: function() {
  129643. return _index.voidTypeAnnotation;
  129644. }
  129645. });
  129646. Object.defineProperty(exports, "EnumDeclaration", {
  129647. enumerable: true,
  129648. get: function() {
  129649. return _index.enumDeclaration;
  129650. }
  129651. });
  129652. Object.defineProperty(exports, "EnumBooleanBody", {
  129653. enumerable: true,
  129654. get: function() {
  129655. return _index.enumBooleanBody;
  129656. }
  129657. });
  129658. Object.defineProperty(exports, "EnumNumberBody", {
  129659. enumerable: true,
  129660. get: function() {
  129661. return _index.enumNumberBody;
  129662. }
  129663. });
  129664. Object.defineProperty(exports, "EnumStringBody", {
  129665. enumerable: true,
  129666. get: function() {
  129667. return _index.enumStringBody;
  129668. }
  129669. });
  129670. Object.defineProperty(exports, "EnumSymbolBody", {
  129671. enumerable: true,
  129672. get: function() {
  129673. return _index.enumSymbolBody;
  129674. }
  129675. });
  129676. Object.defineProperty(exports, "EnumBooleanMember", {
  129677. enumerable: true,
  129678. get: function() {
  129679. return _index.enumBooleanMember;
  129680. }
  129681. });
  129682. Object.defineProperty(exports, "EnumNumberMember", {
  129683. enumerable: true,
  129684. get: function() {
  129685. return _index.enumNumberMember;
  129686. }
  129687. });
  129688. Object.defineProperty(exports, "EnumStringMember", {
  129689. enumerable: true,
  129690. get: function() {
  129691. return _index.enumStringMember;
  129692. }
  129693. });
  129694. Object.defineProperty(exports, "EnumDefaultedMember", {
  129695. enumerable: true,
  129696. get: function() {
  129697. return _index.enumDefaultedMember;
  129698. }
  129699. });
  129700. Object.defineProperty(exports, "IndexedAccessType", {
  129701. enumerable: true,
  129702. get: function() {
  129703. return _index.indexedAccessType;
  129704. }
  129705. });
  129706. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  129707. enumerable: true,
  129708. get: function() {
  129709. return _index.optionalIndexedAccessType;
  129710. }
  129711. });
  129712. Object.defineProperty(exports, "JSXAttribute", {
  129713. enumerable: true,
  129714. get: function() {
  129715. return _index.jsxAttribute;
  129716. }
  129717. });
  129718. Object.defineProperty(exports, "JSXClosingElement", {
  129719. enumerable: true,
  129720. get: function() {
  129721. return _index.jsxClosingElement;
  129722. }
  129723. });
  129724. Object.defineProperty(exports, "JSXElement", {
  129725. enumerable: true,
  129726. get: function() {
  129727. return _index.jsxElement;
  129728. }
  129729. });
  129730. Object.defineProperty(exports, "JSXEmptyExpression", {
  129731. enumerable: true,
  129732. get: function() {
  129733. return _index.jsxEmptyExpression;
  129734. }
  129735. });
  129736. Object.defineProperty(exports, "JSXExpressionContainer", {
  129737. enumerable: true,
  129738. get: function() {
  129739. return _index.jsxExpressionContainer;
  129740. }
  129741. });
  129742. Object.defineProperty(exports, "JSXSpreadChild", {
  129743. enumerable: true,
  129744. get: function() {
  129745. return _index.jsxSpreadChild;
  129746. }
  129747. });
  129748. Object.defineProperty(exports, "JSXIdentifier", {
  129749. enumerable: true,
  129750. get: function() {
  129751. return _index.jsxIdentifier;
  129752. }
  129753. });
  129754. Object.defineProperty(exports, "JSXMemberExpression", {
  129755. enumerable: true,
  129756. get: function() {
  129757. return _index.jsxMemberExpression;
  129758. }
  129759. });
  129760. Object.defineProperty(exports, "JSXNamespacedName", {
  129761. enumerable: true,
  129762. get: function() {
  129763. return _index.jsxNamespacedName;
  129764. }
  129765. });
  129766. Object.defineProperty(exports, "JSXOpeningElement", {
  129767. enumerable: true,
  129768. get: function() {
  129769. return _index.jsxOpeningElement;
  129770. }
  129771. });
  129772. Object.defineProperty(exports, "JSXSpreadAttribute", {
  129773. enumerable: true,
  129774. get: function() {
  129775. return _index.jsxSpreadAttribute;
  129776. }
  129777. });
  129778. Object.defineProperty(exports, "JSXText", {
  129779. enumerable: true,
  129780. get: function() {
  129781. return _index.jsxText;
  129782. }
  129783. });
  129784. Object.defineProperty(exports, "JSXFragment", {
  129785. enumerable: true,
  129786. get: function() {
  129787. return _index.jsxFragment;
  129788. }
  129789. });
  129790. Object.defineProperty(exports, "JSXOpeningFragment", {
  129791. enumerable: true,
  129792. get: function() {
  129793. return _index.jsxOpeningFragment;
  129794. }
  129795. });
  129796. Object.defineProperty(exports, "JSXClosingFragment", {
  129797. enumerable: true,
  129798. get: function() {
  129799. return _index.jsxClosingFragment;
  129800. }
  129801. });
  129802. Object.defineProperty(exports, "Noop", {
  129803. enumerable: true,
  129804. get: function() {
  129805. return _index.noop;
  129806. }
  129807. });
  129808. Object.defineProperty(exports, "Placeholder", {
  129809. enumerable: true,
  129810. get: function() {
  129811. return _index.placeholder;
  129812. }
  129813. });
  129814. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  129815. enumerable: true,
  129816. get: function() {
  129817. return _index.v8IntrinsicIdentifier;
  129818. }
  129819. });
  129820. Object.defineProperty(exports, "ArgumentPlaceholder", {
  129821. enumerable: true,
  129822. get: function() {
  129823. return _index.argumentPlaceholder;
  129824. }
  129825. });
  129826. Object.defineProperty(exports, "BindExpression", {
  129827. enumerable: true,
  129828. get: function() {
  129829. return _index.bindExpression;
  129830. }
  129831. });
  129832. Object.defineProperty(exports, "ClassProperty", {
  129833. enumerable: true,
  129834. get: function() {
  129835. return _index.classProperty;
  129836. }
  129837. });
  129838. Object.defineProperty(exports, "PipelineTopicExpression", {
  129839. enumerable: true,
  129840. get: function() {
  129841. return _index.pipelineTopicExpression;
  129842. }
  129843. });
  129844. Object.defineProperty(exports, "PipelineBareFunction", {
  129845. enumerable: true,
  129846. get: function() {
  129847. return _index.pipelineBareFunction;
  129848. }
  129849. });
  129850. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  129851. enumerable: true,
  129852. get: function() {
  129853. return _index.pipelinePrimaryTopicReference;
  129854. }
  129855. });
  129856. Object.defineProperty(exports, "ClassPrivateProperty", {
  129857. enumerable: true,
  129858. get: function() {
  129859. return _index.classPrivateProperty;
  129860. }
  129861. });
  129862. Object.defineProperty(exports, "ClassPrivateMethod", {
  129863. enumerable: true,
  129864. get: function() {
  129865. return _index.classPrivateMethod;
  129866. }
  129867. });
  129868. Object.defineProperty(exports, "ImportAttribute", {
  129869. enumerable: true,
  129870. get: function() {
  129871. return _index.importAttribute;
  129872. }
  129873. });
  129874. Object.defineProperty(exports, "Decorator", {
  129875. enumerable: true,
  129876. get: function() {
  129877. return _index.decorator;
  129878. }
  129879. });
  129880. Object.defineProperty(exports, "DoExpression", {
  129881. enumerable: true,
  129882. get: function() {
  129883. return _index.doExpression;
  129884. }
  129885. });
  129886. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  129887. enumerable: true,
  129888. get: function() {
  129889. return _index.exportDefaultSpecifier;
  129890. }
  129891. });
  129892. Object.defineProperty(exports, "PrivateName", {
  129893. enumerable: true,
  129894. get: function() {
  129895. return _index.privateName;
  129896. }
  129897. });
  129898. Object.defineProperty(exports, "RecordExpression", {
  129899. enumerable: true,
  129900. get: function() {
  129901. return _index.recordExpression;
  129902. }
  129903. });
  129904. Object.defineProperty(exports, "TupleExpression", {
  129905. enumerable: true,
  129906. get: function() {
  129907. return _index.tupleExpression;
  129908. }
  129909. });
  129910. Object.defineProperty(exports, "DecimalLiteral", {
  129911. enumerable: true,
  129912. get: function() {
  129913. return _index.decimalLiteral;
  129914. }
  129915. });
  129916. Object.defineProperty(exports, "StaticBlock", {
  129917. enumerable: true,
  129918. get: function() {
  129919. return _index.staticBlock;
  129920. }
  129921. });
  129922. Object.defineProperty(exports, "ModuleExpression", {
  129923. enumerable: true,
  129924. get: function() {
  129925. return _index.moduleExpression;
  129926. }
  129927. });
  129928. Object.defineProperty(exports, "TSParameterProperty", {
  129929. enumerable: true,
  129930. get: function() {
  129931. return _index.tsParameterProperty;
  129932. }
  129933. });
  129934. Object.defineProperty(exports, "TSDeclareFunction", {
  129935. enumerable: true,
  129936. get: function() {
  129937. return _index.tsDeclareFunction;
  129938. }
  129939. });
  129940. Object.defineProperty(exports, "TSDeclareMethod", {
  129941. enumerable: true,
  129942. get: function() {
  129943. return _index.tsDeclareMethod;
  129944. }
  129945. });
  129946. Object.defineProperty(exports, "TSQualifiedName", {
  129947. enumerable: true,
  129948. get: function() {
  129949. return _index.tsQualifiedName;
  129950. }
  129951. });
  129952. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  129953. enumerable: true,
  129954. get: function() {
  129955. return _index.tsCallSignatureDeclaration;
  129956. }
  129957. });
  129958. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  129959. enumerable: true,
  129960. get: function() {
  129961. return _index.tsConstructSignatureDeclaration;
  129962. }
  129963. });
  129964. Object.defineProperty(exports, "TSPropertySignature", {
  129965. enumerable: true,
  129966. get: function() {
  129967. return _index.tsPropertySignature;
  129968. }
  129969. });
  129970. Object.defineProperty(exports, "TSMethodSignature", {
  129971. enumerable: true,
  129972. get: function() {
  129973. return _index.tsMethodSignature;
  129974. }
  129975. });
  129976. Object.defineProperty(exports, "TSIndexSignature", {
  129977. enumerable: true,
  129978. get: function() {
  129979. return _index.tsIndexSignature;
  129980. }
  129981. });
  129982. Object.defineProperty(exports, "TSAnyKeyword", {
  129983. enumerable: true,
  129984. get: function() {
  129985. return _index.tsAnyKeyword;
  129986. }
  129987. });
  129988. Object.defineProperty(exports, "TSBooleanKeyword", {
  129989. enumerable: true,
  129990. get: function() {
  129991. return _index.tsBooleanKeyword;
  129992. }
  129993. });
  129994. Object.defineProperty(exports, "TSBigIntKeyword", {
  129995. enumerable: true,
  129996. get: function() {
  129997. return _index.tsBigIntKeyword;
  129998. }
  129999. });
  130000. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  130001. enumerable: true,
  130002. get: function() {
  130003. return _index.tsIntrinsicKeyword;
  130004. }
  130005. });
  130006. Object.defineProperty(exports, "TSNeverKeyword", {
  130007. enumerable: true,
  130008. get: function() {
  130009. return _index.tsNeverKeyword;
  130010. }
  130011. });
  130012. Object.defineProperty(exports, "TSNullKeyword", {
  130013. enumerable: true,
  130014. get: function() {
  130015. return _index.tsNullKeyword;
  130016. }
  130017. });
  130018. Object.defineProperty(exports, "TSNumberKeyword", {
  130019. enumerable: true,
  130020. get: function() {
  130021. return _index.tsNumberKeyword;
  130022. }
  130023. });
  130024. Object.defineProperty(exports, "TSObjectKeyword", {
  130025. enumerable: true,
  130026. get: function() {
  130027. return _index.tsObjectKeyword;
  130028. }
  130029. });
  130030. Object.defineProperty(exports, "TSStringKeyword", {
  130031. enumerable: true,
  130032. get: function() {
  130033. return _index.tsStringKeyword;
  130034. }
  130035. });
  130036. Object.defineProperty(exports, "TSSymbolKeyword", {
  130037. enumerable: true,
  130038. get: function() {
  130039. return _index.tsSymbolKeyword;
  130040. }
  130041. });
  130042. Object.defineProperty(exports, "TSUndefinedKeyword", {
  130043. enumerable: true,
  130044. get: function() {
  130045. return _index.tsUndefinedKeyword;
  130046. }
  130047. });
  130048. Object.defineProperty(exports, "TSUnknownKeyword", {
  130049. enumerable: true,
  130050. get: function() {
  130051. return _index.tsUnknownKeyword;
  130052. }
  130053. });
  130054. Object.defineProperty(exports, "TSVoidKeyword", {
  130055. enumerable: true,
  130056. get: function() {
  130057. return _index.tsVoidKeyword;
  130058. }
  130059. });
  130060. Object.defineProperty(exports, "TSThisType", {
  130061. enumerable: true,
  130062. get: function() {
  130063. return _index.tsThisType;
  130064. }
  130065. });
  130066. Object.defineProperty(exports, "TSFunctionType", {
  130067. enumerable: true,
  130068. get: function() {
  130069. return _index.tsFunctionType;
  130070. }
  130071. });
  130072. Object.defineProperty(exports, "TSConstructorType", {
  130073. enumerable: true,
  130074. get: function() {
  130075. return _index.tsConstructorType;
  130076. }
  130077. });
  130078. Object.defineProperty(exports, "TSTypeReference", {
  130079. enumerable: true,
  130080. get: function() {
  130081. return _index.tsTypeReference;
  130082. }
  130083. });
  130084. Object.defineProperty(exports, "TSTypePredicate", {
  130085. enumerable: true,
  130086. get: function() {
  130087. return _index.tsTypePredicate;
  130088. }
  130089. });
  130090. Object.defineProperty(exports, "TSTypeQuery", {
  130091. enumerable: true,
  130092. get: function() {
  130093. return _index.tsTypeQuery;
  130094. }
  130095. });
  130096. Object.defineProperty(exports, "TSTypeLiteral", {
  130097. enumerable: true,
  130098. get: function() {
  130099. return _index.tsTypeLiteral;
  130100. }
  130101. });
  130102. Object.defineProperty(exports, "TSArrayType", {
  130103. enumerable: true,
  130104. get: function() {
  130105. return _index.tsArrayType;
  130106. }
  130107. });
  130108. Object.defineProperty(exports, "TSTupleType", {
  130109. enumerable: true,
  130110. get: function() {
  130111. return _index.tsTupleType;
  130112. }
  130113. });
  130114. Object.defineProperty(exports, "TSOptionalType", {
  130115. enumerable: true,
  130116. get: function() {
  130117. return _index.tsOptionalType;
  130118. }
  130119. });
  130120. Object.defineProperty(exports, "TSRestType", {
  130121. enumerable: true,
  130122. get: function() {
  130123. return _index.tsRestType;
  130124. }
  130125. });
  130126. Object.defineProperty(exports, "TSNamedTupleMember", {
  130127. enumerable: true,
  130128. get: function() {
  130129. return _index.tsNamedTupleMember;
  130130. }
  130131. });
  130132. Object.defineProperty(exports, "TSUnionType", {
  130133. enumerable: true,
  130134. get: function() {
  130135. return _index.tsUnionType;
  130136. }
  130137. });
  130138. Object.defineProperty(exports, "TSIntersectionType", {
  130139. enumerable: true,
  130140. get: function() {
  130141. return _index.tsIntersectionType;
  130142. }
  130143. });
  130144. Object.defineProperty(exports, "TSConditionalType", {
  130145. enumerable: true,
  130146. get: function() {
  130147. return _index.tsConditionalType;
  130148. }
  130149. });
  130150. Object.defineProperty(exports, "TSInferType", {
  130151. enumerable: true,
  130152. get: function() {
  130153. return _index.tsInferType;
  130154. }
  130155. });
  130156. Object.defineProperty(exports, "TSParenthesizedType", {
  130157. enumerable: true,
  130158. get: function() {
  130159. return _index.tsParenthesizedType;
  130160. }
  130161. });
  130162. Object.defineProperty(exports, "TSTypeOperator", {
  130163. enumerable: true,
  130164. get: function() {
  130165. return _index.tsTypeOperator;
  130166. }
  130167. });
  130168. Object.defineProperty(exports, "TSIndexedAccessType", {
  130169. enumerable: true,
  130170. get: function() {
  130171. return _index.tsIndexedAccessType;
  130172. }
  130173. });
  130174. Object.defineProperty(exports, "TSMappedType", {
  130175. enumerable: true,
  130176. get: function() {
  130177. return _index.tsMappedType;
  130178. }
  130179. });
  130180. Object.defineProperty(exports, "TSLiteralType", {
  130181. enumerable: true,
  130182. get: function() {
  130183. return _index.tsLiteralType;
  130184. }
  130185. });
  130186. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  130187. enumerable: true,
  130188. get: function() {
  130189. return _index.tsExpressionWithTypeArguments;
  130190. }
  130191. });
  130192. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  130193. enumerable: true,
  130194. get: function() {
  130195. return _index.tsInterfaceDeclaration;
  130196. }
  130197. });
  130198. Object.defineProperty(exports, "TSInterfaceBody", {
  130199. enumerable: true,
  130200. get: function() {
  130201. return _index.tsInterfaceBody;
  130202. }
  130203. });
  130204. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  130205. enumerable: true,
  130206. get: function() {
  130207. return _index.tsTypeAliasDeclaration;
  130208. }
  130209. });
  130210. Object.defineProperty(exports, "TSAsExpression", {
  130211. enumerable: true,
  130212. get: function() {
  130213. return _index.tsAsExpression;
  130214. }
  130215. });
  130216. Object.defineProperty(exports, "TSTypeAssertion", {
  130217. enumerable: true,
  130218. get: function() {
  130219. return _index.tsTypeAssertion;
  130220. }
  130221. });
  130222. Object.defineProperty(exports, "TSEnumDeclaration", {
  130223. enumerable: true,
  130224. get: function() {
  130225. return _index.tsEnumDeclaration;
  130226. }
  130227. });
  130228. Object.defineProperty(exports, "TSEnumMember", {
  130229. enumerable: true,
  130230. get: function() {
  130231. return _index.tsEnumMember;
  130232. }
  130233. });
  130234. Object.defineProperty(exports, "TSModuleDeclaration", {
  130235. enumerable: true,
  130236. get: function() {
  130237. return _index.tsModuleDeclaration;
  130238. }
  130239. });
  130240. Object.defineProperty(exports, "TSModuleBlock", {
  130241. enumerable: true,
  130242. get: function() {
  130243. return _index.tsModuleBlock;
  130244. }
  130245. });
  130246. Object.defineProperty(exports, "TSImportType", {
  130247. enumerable: true,
  130248. get: function() {
  130249. return _index.tsImportType;
  130250. }
  130251. });
  130252. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  130253. enumerable: true,
  130254. get: function() {
  130255. return _index.tsImportEqualsDeclaration;
  130256. }
  130257. });
  130258. Object.defineProperty(exports, "TSExternalModuleReference", {
  130259. enumerable: true,
  130260. get: function() {
  130261. return _index.tsExternalModuleReference;
  130262. }
  130263. });
  130264. Object.defineProperty(exports, "TSNonNullExpression", {
  130265. enumerable: true,
  130266. get: function() {
  130267. return _index.tsNonNullExpression;
  130268. }
  130269. });
  130270. Object.defineProperty(exports, "TSExportAssignment", {
  130271. enumerable: true,
  130272. get: function() {
  130273. return _index.tsExportAssignment;
  130274. }
  130275. });
  130276. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  130277. enumerable: true,
  130278. get: function() {
  130279. return _index.tsNamespaceExportDeclaration;
  130280. }
  130281. });
  130282. Object.defineProperty(exports, "TSTypeAnnotation", {
  130283. enumerable: true,
  130284. get: function() {
  130285. return _index.tsTypeAnnotation;
  130286. }
  130287. });
  130288. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  130289. enumerable: true,
  130290. get: function() {
  130291. return _index.tsTypeParameterInstantiation;
  130292. }
  130293. });
  130294. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  130295. enumerable: true,
  130296. get: function() {
  130297. return _index.tsTypeParameterDeclaration;
  130298. }
  130299. });
  130300. Object.defineProperty(exports, "TSTypeParameter", {
  130301. enumerable: true,
  130302. get: function() {
  130303. return _index.tsTypeParameter;
  130304. }
  130305. });
  130306. Object.defineProperty(exports, "NumberLiteral", {
  130307. enumerable: true,
  130308. get: function() {
  130309. return _index.numberLiteral;
  130310. }
  130311. });
  130312. Object.defineProperty(exports, "RegexLiteral", {
  130313. enumerable: true,
  130314. get: function() {
  130315. return _index.regexLiteral;
  130316. }
  130317. });
  130318. Object.defineProperty(exports, "RestProperty", {
  130319. enumerable: true,
  130320. get: function() {
  130321. return _index.restProperty;
  130322. }
  130323. });
  130324. Object.defineProperty(exports, "SpreadProperty", {
  130325. enumerable: true,
  130326. get: function() {
  130327. return _index.spreadProperty;
  130328. }
  130329. });
  130330. var _index = require_generated27();
  130331. }
  130332. });
  130333. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneNode.js
  130334. var require_cloneNode6 = __commonJS({
  130335. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  130336. "use strict";
  130337. Object.defineProperty(exports, "__esModule", {
  130338. value: true
  130339. });
  130340. exports.default = cloneNode;
  130341. var _definitions = require_definitions6();
  130342. var _generated = require_generated26();
  130343. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  130344. function cloneIfNode(obj, deep, withoutLoc) {
  130345. if (obj && typeof obj.type === "string") {
  130346. return cloneNode(obj, deep, withoutLoc);
  130347. }
  130348. return obj;
  130349. }
  130350. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  130351. if (Array.isArray(obj)) {
  130352. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  130353. }
  130354. return cloneIfNode(obj, deep, withoutLoc);
  130355. }
  130356. function cloneNode(node, deep = true, withoutLoc = false) {
  130357. if (!node)
  130358. return node;
  130359. const {
  130360. type
  130361. } = node;
  130362. const newNode = {
  130363. type: node.type
  130364. };
  130365. if ((0, _generated.isIdentifier)(node)) {
  130366. newNode.name = node.name;
  130367. if (has(node, "optional") && typeof node.optional === "boolean") {
  130368. newNode.optional = node.optional;
  130369. }
  130370. if (has(node, "typeAnnotation")) {
  130371. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  130372. }
  130373. } else if (!has(_definitions.NODE_FIELDS, type)) {
  130374. throw new Error(`Unknown node type: "${type}"`);
  130375. } else {
  130376. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  130377. if (has(node, field)) {
  130378. if (deep) {
  130379. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  130380. } else {
  130381. newNode[field] = node[field];
  130382. }
  130383. }
  130384. }
  130385. }
  130386. if (has(node, "loc")) {
  130387. if (withoutLoc) {
  130388. newNode.loc = null;
  130389. } else {
  130390. newNode.loc = node.loc;
  130391. }
  130392. }
  130393. if (has(node, "leadingComments")) {
  130394. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  130395. }
  130396. if (has(node, "innerComments")) {
  130397. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  130398. }
  130399. if (has(node, "trailingComments")) {
  130400. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  130401. }
  130402. if (has(node, "extra")) {
  130403. newNode.extra = Object.assign({}, node.extra);
  130404. }
  130405. return newNode;
  130406. }
  130407. function maybeCloneComments(comments, deep, withoutLoc) {
  130408. if (!comments || !deep) {
  130409. return comments;
  130410. }
  130411. return comments.map(({
  130412. type,
  130413. value,
  130414. loc
  130415. }) => {
  130416. if (withoutLoc) {
  130417. return {
  130418. type,
  130419. value,
  130420. loc: null
  130421. };
  130422. }
  130423. return {
  130424. type,
  130425. value,
  130426. loc
  130427. };
  130428. });
  130429. }
  130430. }
  130431. });
  130432. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/clone.js
  130433. var require_clone6 = __commonJS({
  130434. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  130435. "use strict";
  130436. Object.defineProperty(exports, "__esModule", {
  130437. value: true
  130438. });
  130439. exports.default = clone;
  130440. var _cloneNode = require_cloneNode6();
  130441. function clone(node) {
  130442. return (0, _cloneNode.default)(node, false);
  130443. }
  130444. }
  130445. });
  130446. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneDeep.js
  130447. var require_cloneDeep6 = __commonJS({
  130448. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  130449. "use strict";
  130450. Object.defineProperty(exports, "__esModule", {
  130451. value: true
  130452. });
  130453. exports.default = cloneDeep2;
  130454. var _cloneNode = require_cloneNode6();
  130455. function cloneDeep2(node) {
  130456. return (0, _cloneNode.default)(node);
  130457. }
  130458. }
  130459. });
  130460. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  130461. var require_cloneDeepWithoutLoc6 = __commonJS({
  130462. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  130463. "use strict";
  130464. Object.defineProperty(exports, "__esModule", {
  130465. value: true
  130466. });
  130467. exports.default = cloneDeepWithoutLoc;
  130468. var _cloneNode = require_cloneNode6();
  130469. function cloneDeepWithoutLoc(node) {
  130470. return (0, _cloneNode.default)(node, true, true);
  130471. }
  130472. }
  130473. });
  130474. // node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  130475. var require_cloneWithoutLoc6 = __commonJS({
  130476. "node_modules/@babel/template/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  130477. "use strict";
  130478. Object.defineProperty(exports, "__esModule", {
  130479. value: true
  130480. });
  130481. exports.default = cloneWithoutLoc;
  130482. var _cloneNode = require_cloneNode6();
  130483. function cloneWithoutLoc(node) {
  130484. return (0, _cloneNode.default)(node, false, true);
  130485. }
  130486. }
  130487. });
  130488. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/addComments.js
  130489. var require_addComments6 = __commonJS({
  130490. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  130491. "use strict";
  130492. Object.defineProperty(exports, "__esModule", {
  130493. value: true
  130494. });
  130495. exports.default = addComments;
  130496. function addComments(node, type, comments) {
  130497. if (!comments || !node)
  130498. return node;
  130499. const key = `${type}Comments`;
  130500. if (node[key]) {
  130501. if (type === "leading") {
  130502. node[key] = comments.concat(node[key]);
  130503. } else {
  130504. node[key] = node[key].concat(comments);
  130505. }
  130506. } else {
  130507. node[key] = comments;
  130508. }
  130509. return node;
  130510. }
  130511. }
  130512. });
  130513. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/addComment.js
  130514. var require_addComment6 = __commonJS({
  130515. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  130516. "use strict";
  130517. Object.defineProperty(exports, "__esModule", {
  130518. value: true
  130519. });
  130520. exports.default = addComment;
  130521. var _addComments = require_addComments6();
  130522. function addComment(node, type, content3, line) {
  130523. return (0, _addComments.default)(node, type, [{
  130524. type: line ? "CommentLine" : "CommentBlock",
  130525. value: content3
  130526. }]);
  130527. }
  130528. }
  130529. });
  130530. // node_modules/@babel/template/node_modules/@babel/types/lib/utils/inherit.js
  130531. var require_inherit6 = __commonJS({
  130532. "node_modules/@babel/template/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  130533. "use strict";
  130534. Object.defineProperty(exports, "__esModule", {
  130535. value: true
  130536. });
  130537. exports.default = inherit2;
  130538. function inherit2(key, child, parent) {
  130539. if (child && parent) {
  130540. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  130541. }
  130542. }
  130543. }
  130544. });
  130545. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  130546. var require_inheritInnerComments6 = __commonJS({
  130547. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  130548. "use strict";
  130549. Object.defineProperty(exports, "__esModule", {
  130550. value: true
  130551. });
  130552. exports.default = inheritInnerComments;
  130553. var _inherit = require_inherit6();
  130554. function inheritInnerComments(child, parent) {
  130555. (0, _inherit.default)("innerComments", child, parent);
  130556. }
  130557. }
  130558. });
  130559. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  130560. var require_inheritLeadingComments6 = __commonJS({
  130561. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  130562. "use strict";
  130563. Object.defineProperty(exports, "__esModule", {
  130564. value: true
  130565. });
  130566. exports.default = inheritLeadingComments;
  130567. var _inherit = require_inherit6();
  130568. function inheritLeadingComments(child, parent) {
  130569. (0, _inherit.default)("leadingComments", child, parent);
  130570. }
  130571. }
  130572. });
  130573. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  130574. var require_inheritTrailingComments6 = __commonJS({
  130575. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  130576. "use strict";
  130577. Object.defineProperty(exports, "__esModule", {
  130578. value: true
  130579. });
  130580. exports.default = inheritTrailingComments;
  130581. var _inherit = require_inherit6();
  130582. function inheritTrailingComments(child, parent) {
  130583. (0, _inherit.default)("trailingComments", child, parent);
  130584. }
  130585. }
  130586. });
  130587. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritsComments.js
  130588. var require_inheritsComments6 = __commonJS({
  130589. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  130590. "use strict";
  130591. Object.defineProperty(exports, "__esModule", {
  130592. value: true
  130593. });
  130594. exports.default = inheritsComments;
  130595. var _inheritTrailingComments = require_inheritTrailingComments6();
  130596. var _inheritLeadingComments = require_inheritLeadingComments6();
  130597. var _inheritInnerComments = require_inheritInnerComments6();
  130598. function inheritsComments(child, parent) {
  130599. (0, _inheritTrailingComments.default)(child, parent);
  130600. (0, _inheritLeadingComments.default)(child, parent);
  130601. (0, _inheritInnerComments.default)(child, parent);
  130602. return child;
  130603. }
  130604. }
  130605. });
  130606. // node_modules/@babel/template/node_modules/@babel/types/lib/comments/removeComments.js
  130607. var require_removeComments6 = __commonJS({
  130608. "node_modules/@babel/template/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  130609. "use strict";
  130610. Object.defineProperty(exports, "__esModule", {
  130611. value: true
  130612. });
  130613. exports.default = removeComments;
  130614. var _constants = require_constants6();
  130615. function removeComments(node) {
  130616. _constants.COMMENT_KEYS.forEach((key) => {
  130617. node[key] = null;
  130618. });
  130619. return node;
  130620. }
  130621. }
  130622. });
  130623. // node_modules/@babel/template/node_modules/@babel/types/lib/constants/generated/index.js
  130624. var require_generated29 = __commonJS({
  130625. "node_modules/@babel/template/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  130626. "use strict";
  130627. Object.defineProperty(exports, "__esModule", {
  130628. value: true
  130629. });
  130630. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  130631. var _definitions = require_definitions6();
  130632. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  130633. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  130634. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  130635. exports.BINARY_TYPES = BINARY_TYPES;
  130636. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  130637. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  130638. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  130639. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  130640. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  130641. exports.BLOCK_TYPES = BLOCK_TYPES;
  130642. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  130643. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  130644. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  130645. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  130646. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  130647. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  130648. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  130649. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  130650. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  130651. exports.LOOP_TYPES = LOOP_TYPES;
  130652. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  130653. exports.WHILE_TYPES = WHILE_TYPES;
  130654. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  130655. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  130656. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  130657. exports.FOR_TYPES = FOR_TYPES;
  130658. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  130659. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  130660. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  130661. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  130662. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  130663. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  130664. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  130665. exports.PUREISH_TYPES = PUREISH_TYPES;
  130666. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  130667. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  130668. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  130669. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  130670. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  130671. exports.LVAL_TYPES = LVAL_TYPES;
  130672. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  130673. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  130674. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  130675. exports.LITERAL_TYPES = LITERAL_TYPES;
  130676. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  130677. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  130678. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  130679. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  130680. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  130681. exports.METHOD_TYPES = METHOD_TYPES;
  130682. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  130683. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  130684. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  130685. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  130686. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  130687. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  130688. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  130689. exports.PATTERN_TYPES = PATTERN_TYPES;
  130690. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  130691. exports.CLASS_TYPES = CLASS_TYPES;
  130692. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  130693. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  130694. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  130695. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  130696. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  130697. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  130698. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  130699. exports.FLOW_TYPES = FLOW_TYPES;
  130700. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  130701. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  130702. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  130703. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  130704. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  130705. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  130706. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  130707. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  130708. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  130709. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  130710. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  130711. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  130712. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  130713. exports.JSX_TYPES = JSX_TYPES;
  130714. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  130715. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  130716. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  130717. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  130718. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  130719. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  130720. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  130721. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  130722. }
  130723. });
  130724. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toBlock.js
  130725. var require_toBlock6 = __commonJS({
  130726. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  130727. "use strict";
  130728. Object.defineProperty(exports, "__esModule", {
  130729. value: true
  130730. });
  130731. exports.default = toBlock;
  130732. var _generated = require_generated26();
  130733. var _generated2 = require_generated27();
  130734. function toBlock(node, parent) {
  130735. if ((0, _generated.isBlockStatement)(node)) {
  130736. return node;
  130737. }
  130738. let blockNodes = [];
  130739. if ((0, _generated.isEmptyStatement)(node)) {
  130740. blockNodes = [];
  130741. } else {
  130742. if (!(0, _generated.isStatement)(node)) {
  130743. if ((0, _generated.isFunction)(parent)) {
  130744. node = (0, _generated2.returnStatement)(node);
  130745. } else {
  130746. node = (0, _generated2.expressionStatement)(node);
  130747. }
  130748. }
  130749. blockNodes = [node];
  130750. }
  130751. return (0, _generated2.blockStatement)(blockNodes);
  130752. }
  130753. }
  130754. });
  130755. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/ensureBlock.js
  130756. var require_ensureBlock6 = __commonJS({
  130757. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  130758. "use strict";
  130759. Object.defineProperty(exports, "__esModule", {
  130760. value: true
  130761. });
  130762. exports.default = ensureBlock;
  130763. var _toBlock = require_toBlock6();
  130764. function ensureBlock(node, key = "body") {
  130765. return node[key] = (0, _toBlock.default)(node[key], node);
  130766. }
  130767. }
  130768. });
  130769. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toIdentifier.js
  130770. var require_toIdentifier6 = __commonJS({
  130771. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  130772. "use strict";
  130773. Object.defineProperty(exports, "__esModule", {
  130774. value: true
  130775. });
  130776. exports.default = toIdentifier2;
  130777. var _isValidIdentifier = require_isValidIdentifier6();
  130778. var _helperValidatorIdentifier = require_lib29();
  130779. function toIdentifier2(input) {
  130780. input = input + "";
  130781. let name2 = "";
  130782. for (const c of input) {
  130783. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  130784. }
  130785. name2 = name2.replace(/^[-0-9]+/, "");
  130786. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  130787. return c ? c.toUpperCase() : "";
  130788. });
  130789. if (!(0, _isValidIdentifier.default)(name2)) {
  130790. name2 = `_${name2}`;
  130791. }
  130792. return name2 || "_";
  130793. }
  130794. }
  130795. });
  130796. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  130797. var require_toBindingIdentifierName6 = __commonJS({
  130798. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  130799. "use strict";
  130800. Object.defineProperty(exports, "__esModule", {
  130801. value: true
  130802. });
  130803. exports.default = toBindingIdentifierName;
  130804. var _toIdentifier = require_toIdentifier6();
  130805. function toBindingIdentifierName(name2) {
  130806. name2 = (0, _toIdentifier.default)(name2);
  130807. if (name2 === "eval" || name2 === "arguments")
  130808. name2 = "_" + name2;
  130809. return name2;
  130810. }
  130811. }
  130812. });
  130813. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toComputedKey.js
  130814. var require_toComputedKey6 = __commonJS({
  130815. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  130816. "use strict";
  130817. Object.defineProperty(exports, "__esModule", {
  130818. value: true
  130819. });
  130820. exports.default = toComputedKey;
  130821. var _generated = require_generated26();
  130822. var _generated2 = require_generated27();
  130823. function toComputedKey(node, key = node.key || node.property) {
  130824. if (!node.computed && (0, _generated.isIdentifier)(key))
  130825. key = (0, _generated2.stringLiteral)(key.name);
  130826. return key;
  130827. }
  130828. }
  130829. });
  130830. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toExpression.js
  130831. var require_toExpression6 = __commonJS({
  130832. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  130833. "use strict";
  130834. Object.defineProperty(exports, "__esModule", {
  130835. value: true
  130836. });
  130837. exports.default = void 0;
  130838. var _generated = require_generated26();
  130839. var _default = toExpression;
  130840. exports.default = _default;
  130841. function toExpression(node) {
  130842. if ((0, _generated.isExpressionStatement)(node)) {
  130843. node = node.expression;
  130844. }
  130845. if ((0, _generated.isExpression)(node)) {
  130846. return node;
  130847. }
  130848. if ((0, _generated.isClass)(node)) {
  130849. node.type = "ClassExpression";
  130850. } else if ((0, _generated.isFunction)(node)) {
  130851. node.type = "FunctionExpression";
  130852. }
  130853. if (!(0, _generated.isExpression)(node)) {
  130854. throw new Error(`cannot turn ${node.type} to an expression`);
  130855. }
  130856. return node;
  130857. }
  130858. }
  130859. });
  130860. // node_modules/@babel/template/node_modules/@babel/types/lib/traverse/traverseFast.js
  130861. var require_traverseFast6 = __commonJS({
  130862. "node_modules/@babel/template/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  130863. "use strict";
  130864. Object.defineProperty(exports, "__esModule", {
  130865. value: true
  130866. });
  130867. exports.default = traverseFast;
  130868. var _definitions = require_definitions6();
  130869. function traverseFast(node, enter, opts) {
  130870. if (!node)
  130871. return;
  130872. const keys2 = _definitions.VISITOR_KEYS[node.type];
  130873. if (!keys2)
  130874. return;
  130875. opts = opts || {};
  130876. enter(node, opts);
  130877. for (const key of keys2) {
  130878. const subNode = node[key];
  130879. if (Array.isArray(subNode)) {
  130880. for (const node2 of subNode) {
  130881. traverseFast(node2, enter, opts);
  130882. }
  130883. } else {
  130884. traverseFast(subNode, enter, opts);
  130885. }
  130886. }
  130887. }
  130888. }
  130889. });
  130890. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/removeProperties.js
  130891. var require_removeProperties6 = __commonJS({
  130892. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  130893. "use strict";
  130894. Object.defineProperty(exports, "__esModule", {
  130895. value: true
  130896. });
  130897. exports.default = removeProperties;
  130898. var _constants = require_constants6();
  130899. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  130900. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  130901. function removeProperties(node, opts = {}) {
  130902. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  130903. for (const key of map) {
  130904. if (node[key] != null)
  130905. node[key] = void 0;
  130906. }
  130907. for (const key of Object.keys(node)) {
  130908. if (key[0] === "_" && node[key] != null)
  130909. node[key] = void 0;
  130910. }
  130911. const symbols = Object.getOwnPropertySymbols(node);
  130912. for (const sym of symbols) {
  130913. node[sym] = null;
  130914. }
  130915. }
  130916. }
  130917. });
  130918. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  130919. var require_removePropertiesDeep6 = __commonJS({
  130920. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  130921. "use strict";
  130922. Object.defineProperty(exports, "__esModule", {
  130923. value: true
  130924. });
  130925. exports.default = removePropertiesDeep;
  130926. var _traverseFast = require_traverseFast6();
  130927. var _removeProperties = require_removeProperties6();
  130928. function removePropertiesDeep(tree, opts) {
  130929. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  130930. return tree;
  130931. }
  130932. }
  130933. });
  130934. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toKeyAlias.js
  130935. var require_toKeyAlias6 = __commonJS({
  130936. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  130937. "use strict";
  130938. Object.defineProperty(exports, "__esModule", {
  130939. value: true
  130940. });
  130941. exports.default = toKeyAlias;
  130942. var _generated = require_generated26();
  130943. var _cloneNode = require_cloneNode6();
  130944. var _removePropertiesDeep = require_removePropertiesDeep6();
  130945. function toKeyAlias(node, key = node.key) {
  130946. let alias;
  130947. if (node.kind === "method") {
  130948. return toKeyAlias.increment() + "";
  130949. } else if ((0, _generated.isIdentifier)(key)) {
  130950. alias = key.name;
  130951. } else if ((0, _generated.isStringLiteral)(key)) {
  130952. alias = JSON.stringify(key.value);
  130953. } else {
  130954. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  130955. }
  130956. if (node.computed) {
  130957. alias = `[${alias}]`;
  130958. }
  130959. if (node.static) {
  130960. alias = `static:${alias}`;
  130961. }
  130962. return alias;
  130963. }
  130964. toKeyAlias.uid = 0;
  130965. toKeyAlias.increment = function() {
  130966. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  130967. return toKeyAlias.uid = 0;
  130968. } else {
  130969. return toKeyAlias.uid++;
  130970. }
  130971. };
  130972. }
  130973. });
  130974. // node_modules/@babel/template/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  130975. var require_getBindingIdentifiers6 = __commonJS({
  130976. "node_modules/@babel/template/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  130977. "use strict";
  130978. Object.defineProperty(exports, "__esModule", {
  130979. value: true
  130980. });
  130981. exports.default = getBindingIdentifiers;
  130982. var _generated = require_generated26();
  130983. function getBindingIdentifiers(node, duplicates, outerOnly) {
  130984. let search2 = [].concat(node);
  130985. const ids = /* @__PURE__ */ Object.create(null);
  130986. while (search2.length) {
  130987. const id = search2.shift();
  130988. if (!id)
  130989. continue;
  130990. const keys2 = getBindingIdentifiers.keys[id.type];
  130991. if ((0, _generated.isIdentifier)(id)) {
  130992. if (duplicates) {
  130993. const _ids = ids[id.name] = ids[id.name] || [];
  130994. _ids.push(id);
  130995. } else {
  130996. ids[id.name] = id;
  130997. }
  130998. continue;
  130999. }
  131000. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  131001. if ((0, _generated.isDeclaration)(id.declaration)) {
  131002. search2.push(id.declaration);
  131003. }
  131004. continue;
  131005. }
  131006. if (outerOnly) {
  131007. if ((0, _generated.isFunctionDeclaration)(id)) {
  131008. search2.push(id.id);
  131009. continue;
  131010. }
  131011. if ((0, _generated.isFunctionExpression)(id)) {
  131012. continue;
  131013. }
  131014. }
  131015. if (keys2) {
  131016. for (let i = 0; i < keys2.length; i++) {
  131017. const key = keys2[i];
  131018. if (id[key]) {
  131019. search2 = search2.concat(id[key]);
  131020. }
  131021. }
  131022. }
  131023. }
  131024. return ids;
  131025. }
  131026. getBindingIdentifiers.keys = {
  131027. DeclareClass: ["id"],
  131028. DeclareFunction: ["id"],
  131029. DeclareModule: ["id"],
  131030. DeclareVariable: ["id"],
  131031. DeclareInterface: ["id"],
  131032. DeclareTypeAlias: ["id"],
  131033. DeclareOpaqueType: ["id"],
  131034. InterfaceDeclaration: ["id"],
  131035. TypeAlias: ["id"],
  131036. OpaqueType: ["id"],
  131037. CatchClause: ["param"],
  131038. LabeledStatement: ["label"],
  131039. UnaryExpression: ["argument"],
  131040. AssignmentExpression: ["left"],
  131041. ImportSpecifier: ["local"],
  131042. ImportNamespaceSpecifier: ["local"],
  131043. ImportDefaultSpecifier: ["local"],
  131044. ImportDeclaration: ["specifiers"],
  131045. ExportSpecifier: ["exported"],
  131046. ExportNamespaceSpecifier: ["exported"],
  131047. ExportDefaultSpecifier: ["exported"],
  131048. FunctionDeclaration: ["id", "params"],
  131049. FunctionExpression: ["id", "params"],
  131050. ArrowFunctionExpression: ["params"],
  131051. ObjectMethod: ["params"],
  131052. ClassMethod: ["params"],
  131053. ForInStatement: ["left"],
  131054. ForOfStatement: ["left"],
  131055. ClassDeclaration: ["id"],
  131056. ClassExpression: ["id"],
  131057. RestElement: ["argument"],
  131058. UpdateExpression: ["argument"],
  131059. ObjectProperty: ["value"],
  131060. AssignmentPattern: ["left"],
  131061. ArrayPattern: ["elements"],
  131062. ObjectPattern: ["properties"],
  131063. VariableDeclaration: ["declarations"],
  131064. VariableDeclarator: ["id"]
  131065. };
  131066. }
  131067. });
  131068. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  131069. var require_gatherSequenceExpressions6 = __commonJS({
  131070. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  131071. "use strict";
  131072. Object.defineProperty(exports, "__esModule", {
  131073. value: true
  131074. });
  131075. exports.default = gatherSequenceExpressions;
  131076. var _getBindingIdentifiers = require_getBindingIdentifiers6();
  131077. var _generated = require_generated26();
  131078. var _generated2 = require_generated27();
  131079. var _cloneNode = require_cloneNode6();
  131080. function gatherSequenceExpressions(nodes, scope, declars) {
  131081. const exprs = [];
  131082. let ensureLastUndefined = true;
  131083. for (const node of nodes) {
  131084. if (!(0, _generated.isEmptyStatement)(node)) {
  131085. ensureLastUndefined = false;
  131086. }
  131087. if ((0, _generated.isExpression)(node)) {
  131088. exprs.push(node);
  131089. } else if ((0, _generated.isExpressionStatement)(node)) {
  131090. exprs.push(node.expression);
  131091. } else if ((0, _generated.isVariableDeclaration)(node)) {
  131092. if (node.kind !== "var")
  131093. return;
  131094. for (const declar of node.declarations) {
  131095. const bindings = (0, _getBindingIdentifiers.default)(declar);
  131096. for (const key of Object.keys(bindings)) {
  131097. declars.push({
  131098. kind: node.kind,
  131099. id: (0, _cloneNode.default)(bindings[key])
  131100. });
  131101. }
  131102. if (declar.init) {
  131103. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  131104. }
  131105. }
  131106. ensureLastUndefined = true;
  131107. } else if ((0, _generated.isIfStatement)(node)) {
  131108. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  131109. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  131110. if (!consequent || !alternate)
  131111. return;
  131112. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  131113. } else if ((0, _generated.isBlockStatement)(node)) {
  131114. const body = gatherSequenceExpressions(node.body, scope, declars);
  131115. if (!body)
  131116. return;
  131117. exprs.push(body);
  131118. } else if ((0, _generated.isEmptyStatement)(node)) {
  131119. if (nodes.indexOf(node) === 0) {
  131120. ensureLastUndefined = true;
  131121. }
  131122. } else {
  131123. return;
  131124. }
  131125. }
  131126. if (ensureLastUndefined) {
  131127. exprs.push(scope.buildUndefinedNode());
  131128. }
  131129. if (exprs.length === 1) {
  131130. return exprs[0];
  131131. } else {
  131132. return (0, _generated2.sequenceExpression)(exprs);
  131133. }
  131134. }
  131135. }
  131136. });
  131137. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  131138. var require_toSequenceExpression6 = __commonJS({
  131139. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  131140. "use strict";
  131141. Object.defineProperty(exports, "__esModule", {
  131142. value: true
  131143. });
  131144. exports.default = toSequenceExpression;
  131145. var _gatherSequenceExpressions = require_gatherSequenceExpressions6();
  131146. function toSequenceExpression(nodes, scope) {
  131147. if (!(nodes != null && nodes.length))
  131148. return;
  131149. const declars = [];
  131150. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  131151. if (!result)
  131152. return;
  131153. for (const declar of declars) {
  131154. scope.push(declar);
  131155. }
  131156. return result;
  131157. }
  131158. }
  131159. });
  131160. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/toStatement.js
  131161. var require_toStatement6 = __commonJS({
  131162. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  131163. "use strict";
  131164. Object.defineProperty(exports, "__esModule", {
  131165. value: true
  131166. });
  131167. exports.default = void 0;
  131168. var _generated = require_generated26();
  131169. var _generated2 = require_generated27();
  131170. var _default = toStatement;
  131171. exports.default = _default;
  131172. function toStatement(node, ignore3) {
  131173. if ((0, _generated.isStatement)(node)) {
  131174. return node;
  131175. }
  131176. let mustHaveId = false;
  131177. let newType;
  131178. if ((0, _generated.isClass)(node)) {
  131179. mustHaveId = true;
  131180. newType = "ClassDeclaration";
  131181. } else if ((0, _generated.isFunction)(node)) {
  131182. mustHaveId = true;
  131183. newType = "FunctionDeclaration";
  131184. } else if ((0, _generated.isAssignmentExpression)(node)) {
  131185. return (0, _generated2.expressionStatement)(node);
  131186. }
  131187. if (mustHaveId && !node.id) {
  131188. newType = false;
  131189. }
  131190. if (!newType) {
  131191. if (ignore3) {
  131192. return false;
  131193. } else {
  131194. throw new Error(`cannot turn ${node.type} to a statement`);
  131195. }
  131196. }
  131197. node.type = newType;
  131198. return node;
  131199. }
  131200. }
  131201. });
  131202. // node_modules/@babel/template/node_modules/@babel/types/lib/converters/valueToNode.js
  131203. var require_valueToNode6 = __commonJS({
  131204. "node_modules/@babel/template/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  131205. "use strict";
  131206. Object.defineProperty(exports, "__esModule", {
  131207. value: true
  131208. });
  131209. exports.default = void 0;
  131210. var _isValidIdentifier = require_isValidIdentifier6();
  131211. var _generated = require_generated27();
  131212. var _default = valueToNode;
  131213. exports.default = _default;
  131214. var objectToString = Function.call.bind(Object.prototype.toString);
  131215. function isRegExp(value) {
  131216. return objectToString(value) === "[object RegExp]";
  131217. }
  131218. function isPlainObject2(value) {
  131219. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  131220. return false;
  131221. }
  131222. const proto = Object.getPrototypeOf(value);
  131223. return proto === null || Object.getPrototypeOf(proto) === null;
  131224. }
  131225. function valueToNode(value) {
  131226. if (value === void 0) {
  131227. return (0, _generated.identifier)("undefined");
  131228. }
  131229. if (value === true || value === false) {
  131230. return (0, _generated.booleanLiteral)(value);
  131231. }
  131232. if (value === null) {
  131233. return (0, _generated.nullLiteral)();
  131234. }
  131235. if (typeof value === "string") {
  131236. return (0, _generated.stringLiteral)(value);
  131237. }
  131238. if (typeof value === "number") {
  131239. let result;
  131240. if (Number.isFinite(value)) {
  131241. result = (0, _generated.numericLiteral)(Math.abs(value));
  131242. } else {
  131243. let numerator;
  131244. if (Number.isNaN(value)) {
  131245. numerator = (0, _generated.numericLiteral)(0);
  131246. } else {
  131247. numerator = (0, _generated.numericLiteral)(1);
  131248. }
  131249. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  131250. }
  131251. if (value < 0 || Object.is(value, -0)) {
  131252. result = (0, _generated.unaryExpression)("-", result);
  131253. }
  131254. return result;
  131255. }
  131256. if (isRegExp(value)) {
  131257. const pattern = value.source;
  131258. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  131259. return (0, _generated.regExpLiteral)(pattern, flags);
  131260. }
  131261. if (Array.isArray(value)) {
  131262. return (0, _generated.arrayExpression)(value.map(valueToNode));
  131263. }
  131264. if (isPlainObject2(value)) {
  131265. const props = [];
  131266. for (const key of Object.keys(value)) {
  131267. let nodeKey;
  131268. if ((0, _isValidIdentifier.default)(key)) {
  131269. nodeKey = (0, _generated.identifier)(key);
  131270. } else {
  131271. nodeKey = (0, _generated.stringLiteral)(key);
  131272. }
  131273. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  131274. }
  131275. return (0, _generated.objectExpression)(props);
  131276. }
  131277. throw new Error("don't know how to turn this value into a node");
  131278. }
  131279. }
  131280. });
  131281. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  131282. var require_appendToMemberExpression6 = __commonJS({
  131283. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  131284. "use strict";
  131285. Object.defineProperty(exports, "__esModule", {
  131286. value: true
  131287. });
  131288. exports.default = appendToMemberExpression;
  131289. var _generated = require_generated27();
  131290. function appendToMemberExpression(member, append, computed = false) {
  131291. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  131292. member.property = append;
  131293. member.computed = !!computed;
  131294. return member;
  131295. }
  131296. }
  131297. });
  131298. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/inherits.js
  131299. var require_inherits6 = __commonJS({
  131300. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  131301. "use strict";
  131302. Object.defineProperty(exports, "__esModule", {
  131303. value: true
  131304. });
  131305. exports.default = inherits;
  131306. var _constants = require_constants6();
  131307. var _inheritsComments = require_inheritsComments6();
  131308. function inherits(child, parent) {
  131309. if (!child || !parent)
  131310. return child;
  131311. for (const key of _constants.INHERIT_KEYS.optional) {
  131312. if (child[key] == null) {
  131313. child[key] = parent[key];
  131314. }
  131315. }
  131316. for (const key of Object.keys(parent)) {
  131317. if (key[0] === "_" && key !== "__clone")
  131318. child[key] = parent[key];
  131319. }
  131320. for (const key of _constants.INHERIT_KEYS.force) {
  131321. child[key] = parent[key];
  131322. }
  131323. (0, _inheritsComments.default)(child, parent);
  131324. return child;
  131325. }
  131326. }
  131327. });
  131328. // node_modules/@babel/template/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  131329. var require_prependToMemberExpression6 = __commonJS({
  131330. "node_modules/@babel/template/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  131331. "use strict";
  131332. Object.defineProperty(exports, "__esModule", {
  131333. value: true
  131334. });
  131335. exports.default = prependToMemberExpression;
  131336. var _generated = require_generated27();
  131337. function prependToMemberExpression(member, prepend) {
  131338. member.object = (0, _generated.memberExpression)(prepend, member.object);
  131339. return member;
  131340. }
  131341. }
  131342. });
  131343. // node_modules/@babel/template/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  131344. var require_getOuterBindingIdentifiers6 = __commonJS({
  131345. "node_modules/@babel/template/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  131346. "use strict";
  131347. Object.defineProperty(exports, "__esModule", {
  131348. value: true
  131349. });
  131350. exports.default = void 0;
  131351. var _getBindingIdentifiers = require_getBindingIdentifiers6();
  131352. var _default = getOuterBindingIdentifiers;
  131353. exports.default = _default;
  131354. function getOuterBindingIdentifiers(node, duplicates) {
  131355. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  131356. }
  131357. }
  131358. });
  131359. // node_modules/@babel/template/node_modules/@babel/types/lib/traverse/traverse.js
  131360. var require_traverse6 = __commonJS({
  131361. "node_modules/@babel/template/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  131362. "use strict";
  131363. Object.defineProperty(exports, "__esModule", {
  131364. value: true
  131365. });
  131366. exports.default = traverse;
  131367. var _definitions = require_definitions6();
  131368. function traverse(node, handlers2, state) {
  131369. if (typeof handlers2 === "function") {
  131370. handlers2 = {
  131371. enter: handlers2
  131372. };
  131373. }
  131374. const {
  131375. enter,
  131376. exit: exit2
  131377. } = handlers2;
  131378. traverseSimpleImpl(node, enter, exit2, state, []);
  131379. }
  131380. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  131381. const keys2 = _definitions.VISITOR_KEYS[node.type];
  131382. if (!keys2)
  131383. return;
  131384. if (enter)
  131385. enter(node, ancestors, state);
  131386. for (const key of keys2) {
  131387. const subNode = node[key];
  131388. if (Array.isArray(subNode)) {
  131389. for (let i = 0; i < subNode.length; i++) {
  131390. const child = subNode[i];
  131391. if (!child)
  131392. continue;
  131393. ancestors.push({
  131394. node,
  131395. key,
  131396. index: i
  131397. });
  131398. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  131399. ancestors.pop();
  131400. }
  131401. } else if (subNode) {
  131402. ancestors.push({
  131403. node,
  131404. key
  131405. });
  131406. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  131407. ancestors.pop();
  131408. }
  131409. }
  131410. if (exit2)
  131411. exit2(node, ancestors, state);
  131412. }
  131413. }
  131414. });
  131415. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isBinding.js
  131416. var require_isBinding6 = __commonJS({
  131417. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  131418. "use strict";
  131419. Object.defineProperty(exports, "__esModule", {
  131420. value: true
  131421. });
  131422. exports.default = isBinding;
  131423. var _getBindingIdentifiers = require_getBindingIdentifiers6();
  131424. function isBinding(node, parent, grandparent) {
  131425. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  131426. return false;
  131427. }
  131428. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  131429. if (keys2) {
  131430. for (let i = 0; i < keys2.length; i++) {
  131431. const key = keys2[i];
  131432. const val = parent[key];
  131433. if (Array.isArray(val)) {
  131434. if (val.indexOf(node) >= 0)
  131435. return true;
  131436. } else {
  131437. if (val === node)
  131438. return true;
  131439. }
  131440. }
  131441. }
  131442. return false;
  131443. }
  131444. }
  131445. });
  131446. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isLet.js
  131447. var require_isLet6 = __commonJS({
  131448. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  131449. "use strict";
  131450. Object.defineProperty(exports, "__esModule", {
  131451. value: true
  131452. });
  131453. exports.default = isLet;
  131454. var _generated = require_generated26();
  131455. var _constants = require_constants6();
  131456. function isLet(node) {
  131457. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  131458. }
  131459. }
  131460. });
  131461. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isBlockScoped.js
  131462. var require_isBlockScoped6 = __commonJS({
  131463. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  131464. "use strict";
  131465. Object.defineProperty(exports, "__esModule", {
  131466. value: true
  131467. });
  131468. exports.default = isBlockScoped;
  131469. var _generated = require_generated26();
  131470. var _isLet = require_isLet6();
  131471. function isBlockScoped(node) {
  131472. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  131473. }
  131474. }
  131475. });
  131476. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isImmutable.js
  131477. var require_isImmutable6 = __commonJS({
  131478. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  131479. "use strict";
  131480. Object.defineProperty(exports, "__esModule", {
  131481. value: true
  131482. });
  131483. exports.default = isImmutable;
  131484. var _isType = require_isType6();
  131485. var _generated = require_generated26();
  131486. function isImmutable(node) {
  131487. if ((0, _isType.default)(node.type, "Immutable"))
  131488. return true;
  131489. if ((0, _generated.isIdentifier)(node)) {
  131490. if (node.name === "undefined") {
  131491. return true;
  131492. } else {
  131493. return false;
  131494. }
  131495. }
  131496. return false;
  131497. }
  131498. }
  131499. });
  131500. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  131501. var require_isNodesEquivalent6 = __commonJS({
  131502. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  131503. "use strict";
  131504. Object.defineProperty(exports, "__esModule", {
  131505. value: true
  131506. });
  131507. exports.default = isNodesEquivalent;
  131508. var _definitions = require_definitions6();
  131509. function isNodesEquivalent(a, b) {
  131510. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  131511. return a === b;
  131512. }
  131513. if (a.type !== b.type) {
  131514. return false;
  131515. }
  131516. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  131517. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  131518. for (const field of fields) {
  131519. if (typeof a[field] !== typeof b[field]) {
  131520. return false;
  131521. }
  131522. if (a[field] == null && b[field] == null) {
  131523. continue;
  131524. } else if (a[field] == null || b[field] == null) {
  131525. return false;
  131526. }
  131527. if (Array.isArray(a[field])) {
  131528. if (!Array.isArray(b[field])) {
  131529. return false;
  131530. }
  131531. if (a[field].length !== b[field].length) {
  131532. return false;
  131533. }
  131534. for (let i = 0; i < a[field].length; i++) {
  131535. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  131536. return false;
  131537. }
  131538. }
  131539. continue;
  131540. }
  131541. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  131542. for (const key of Object.keys(a[field])) {
  131543. if (a[field][key] !== b[field][key]) {
  131544. return false;
  131545. }
  131546. }
  131547. continue;
  131548. }
  131549. if (!isNodesEquivalent(a[field], b[field])) {
  131550. return false;
  131551. }
  131552. }
  131553. return true;
  131554. }
  131555. }
  131556. });
  131557. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isReferenced.js
  131558. var require_isReferenced6 = __commonJS({
  131559. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  131560. "use strict";
  131561. Object.defineProperty(exports, "__esModule", {
  131562. value: true
  131563. });
  131564. exports.default = isReferenced;
  131565. function isReferenced(node, parent, grandparent) {
  131566. switch (parent.type) {
  131567. case "MemberExpression":
  131568. case "JSXMemberExpression":
  131569. case "OptionalMemberExpression":
  131570. if (parent.property === node) {
  131571. return !!parent.computed;
  131572. }
  131573. return parent.object === node;
  131574. case "VariableDeclarator":
  131575. return parent.init === node;
  131576. case "ArrowFunctionExpression":
  131577. return parent.body === node;
  131578. case "PrivateName":
  131579. return false;
  131580. case "ClassMethod":
  131581. case "ClassPrivateMethod":
  131582. case "ObjectMethod":
  131583. if (parent.params.includes(node)) {
  131584. return false;
  131585. }
  131586. case "ObjectProperty":
  131587. case "ClassProperty":
  131588. case "ClassPrivateProperty":
  131589. if (parent.key === node) {
  131590. return !!parent.computed;
  131591. }
  131592. if (parent.value === node) {
  131593. return !grandparent || grandparent.type !== "ObjectPattern";
  131594. }
  131595. return true;
  131596. case "ClassDeclaration":
  131597. case "ClassExpression":
  131598. return parent.superClass === node;
  131599. case "AssignmentExpression":
  131600. return parent.right === node;
  131601. case "AssignmentPattern":
  131602. return parent.right === node;
  131603. case "LabeledStatement":
  131604. return false;
  131605. case "CatchClause":
  131606. return false;
  131607. case "RestElement":
  131608. return false;
  131609. case "BreakStatement":
  131610. case "ContinueStatement":
  131611. return false;
  131612. case "FunctionDeclaration":
  131613. case "FunctionExpression":
  131614. return false;
  131615. case "ExportNamespaceSpecifier":
  131616. case "ExportDefaultSpecifier":
  131617. return false;
  131618. case "ExportSpecifier":
  131619. if (grandparent != null && grandparent.source) {
  131620. return false;
  131621. }
  131622. return parent.local === node;
  131623. case "ImportDefaultSpecifier":
  131624. case "ImportNamespaceSpecifier":
  131625. case "ImportSpecifier":
  131626. return false;
  131627. case "JSXAttribute":
  131628. return false;
  131629. case "ObjectPattern":
  131630. case "ArrayPattern":
  131631. return false;
  131632. case "MetaProperty":
  131633. return false;
  131634. case "ObjectTypeProperty":
  131635. return parent.key !== node;
  131636. case "TSEnumMember":
  131637. return parent.id !== node;
  131638. case "TSPropertySignature":
  131639. if (parent.key === node) {
  131640. return !!parent.computed;
  131641. }
  131642. return true;
  131643. }
  131644. return true;
  131645. }
  131646. }
  131647. });
  131648. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isScope.js
  131649. var require_isScope6 = __commonJS({
  131650. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  131651. "use strict";
  131652. Object.defineProperty(exports, "__esModule", {
  131653. value: true
  131654. });
  131655. exports.default = isScope;
  131656. var _generated = require_generated26();
  131657. function isScope(node, parent) {
  131658. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  131659. return false;
  131660. }
  131661. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  131662. return true;
  131663. }
  131664. return (0, _generated.isScopable)(node);
  131665. }
  131666. }
  131667. });
  131668. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  131669. var require_isSpecifierDefault6 = __commonJS({
  131670. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  131671. "use strict";
  131672. Object.defineProperty(exports, "__esModule", {
  131673. value: true
  131674. });
  131675. exports.default = isSpecifierDefault;
  131676. var _generated = require_generated26();
  131677. function isSpecifierDefault(specifier) {
  131678. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  131679. name: "default"
  131680. });
  131681. }
  131682. }
  131683. });
  131684. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  131685. var require_isValidES3Identifier6 = __commonJS({
  131686. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  131687. "use strict";
  131688. Object.defineProperty(exports, "__esModule", {
  131689. value: true
  131690. });
  131691. exports.default = isValidES3Identifier;
  131692. var _isValidIdentifier = require_isValidIdentifier6();
  131693. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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"]);
  131694. function isValidES3Identifier(name2) {
  131695. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  131696. }
  131697. }
  131698. });
  131699. // node_modules/@babel/template/node_modules/@babel/types/lib/validators/isVar.js
  131700. var require_isVar6 = __commonJS({
  131701. "node_modules/@babel/template/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  131702. "use strict";
  131703. Object.defineProperty(exports, "__esModule", {
  131704. value: true
  131705. });
  131706. exports.default = isVar;
  131707. var _generated = require_generated26();
  131708. var _constants = require_constants6();
  131709. function isVar(node) {
  131710. return (0, _generated.isVariableDeclaration)(node, {
  131711. kind: "var"
  131712. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  131713. }
  131714. }
  131715. });
  131716. // node_modules/@babel/template/node_modules/@babel/types/lib/ast-types/generated/index.js
  131717. var require_generated30 = __commonJS({
  131718. "node_modules/@babel/template/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  131719. }
  131720. });
  131721. // node_modules/@babel/template/node_modules/@babel/types/lib/index.js
  131722. var require_lib30 = __commonJS({
  131723. "node_modules/@babel/template/node_modules/@babel/types/lib/index.js"(exports) {
  131724. "use strict";
  131725. Object.defineProperty(exports, "__esModule", {
  131726. value: true
  131727. });
  131728. var _exportNames = {
  131729. react: true,
  131730. assertNode: true,
  131731. createTypeAnnotationBasedOnTypeof: true,
  131732. createUnionTypeAnnotation: true,
  131733. createFlowUnionType: true,
  131734. createTSUnionType: true,
  131735. cloneNode: true,
  131736. clone: true,
  131737. cloneDeep: true,
  131738. cloneDeepWithoutLoc: true,
  131739. cloneWithoutLoc: true,
  131740. addComment: true,
  131741. addComments: true,
  131742. inheritInnerComments: true,
  131743. inheritLeadingComments: true,
  131744. inheritsComments: true,
  131745. inheritTrailingComments: true,
  131746. removeComments: true,
  131747. ensureBlock: true,
  131748. toBindingIdentifierName: true,
  131749. toBlock: true,
  131750. toComputedKey: true,
  131751. toExpression: true,
  131752. toIdentifier: true,
  131753. toKeyAlias: true,
  131754. toSequenceExpression: true,
  131755. toStatement: true,
  131756. valueToNode: true,
  131757. appendToMemberExpression: true,
  131758. inherits: true,
  131759. prependToMemberExpression: true,
  131760. removeProperties: true,
  131761. removePropertiesDeep: true,
  131762. removeTypeDuplicates: true,
  131763. getBindingIdentifiers: true,
  131764. getOuterBindingIdentifiers: true,
  131765. traverse: true,
  131766. traverseFast: true,
  131767. shallowEqual: true,
  131768. is: true,
  131769. isBinding: true,
  131770. isBlockScoped: true,
  131771. isImmutable: true,
  131772. isLet: true,
  131773. isNode: true,
  131774. isNodesEquivalent: true,
  131775. isPlaceholderType: true,
  131776. isReferenced: true,
  131777. isScope: true,
  131778. isSpecifierDefault: true,
  131779. isType: true,
  131780. isValidES3Identifier: true,
  131781. isValidIdentifier: true,
  131782. isVar: true,
  131783. matchesPattern: true,
  131784. validate: true,
  131785. buildMatchMemberExpression: true
  131786. };
  131787. Object.defineProperty(exports, "assertNode", {
  131788. enumerable: true,
  131789. get: function() {
  131790. return _assertNode.default;
  131791. }
  131792. });
  131793. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  131794. enumerable: true,
  131795. get: function() {
  131796. return _createTypeAnnotationBasedOnTypeof.default;
  131797. }
  131798. });
  131799. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  131800. enumerable: true,
  131801. get: function() {
  131802. return _createFlowUnionType.default;
  131803. }
  131804. });
  131805. Object.defineProperty(exports, "createFlowUnionType", {
  131806. enumerable: true,
  131807. get: function() {
  131808. return _createFlowUnionType.default;
  131809. }
  131810. });
  131811. Object.defineProperty(exports, "createTSUnionType", {
  131812. enumerable: true,
  131813. get: function() {
  131814. return _createTSUnionType.default;
  131815. }
  131816. });
  131817. Object.defineProperty(exports, "cloneNode", {
  131818. enumerable: true,
  131819. get: function() {
  131820. return _cloneNode.default;
  131821. }
  131822. });
  131823. Object.defineProperty(exports, "clone", {
  131824. enumerable: true,
  131825. get: function() {
  131826. return _clone.default;
  131827. }
  131828. });
  131829. Object.defineProperty(exports, "cloneDeep", {
  131830. enumerable: true,
  131831. get: function() {
  131832. return _cloneDeep.default;
  131833. }
  131834. });
  131835. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  131836. enumerable: true,
  131837. get: function() {
  131838. return _cloneDeepWithoutLoc.default;
  131839. }
  131840. });
  131841. Object.defineProperty(exports, "cloneWithoutLoc", {
  131842. enumerable: true,
  131843. get: function() {
  131844. return _cloneWithoutLoc.default;
  131845. }
  131846. });
  131847. Object.defineProperty(exports, "addComment", {
  131848. enumerable: true,
  131849. get: function() {
  131850. return _addComment.default;
  131851. }
  131852. });
  131853. Object.defineProperty(exports, "addComments", {
  131854. enumerable: true,
  131855. get: function() {
  131856. return _addComments.default;
  131857. }
  131858. });
  131859. Object.defineProperty(exports, "inheritInnerComments", {
  131860. enumerable: true,
  131861. get: function() {
  131862. return _inheritInnerComments.default;
  131863. }
  131864. });
  131865. Object.defineProperty(exports, "inheritLeadingComments", {
  131866. enumerable: true,
  131867. get: function() {
  131868. return _inheritLeadingComments.default;
  131869. }
  131870. });
  131871. Object.defineProperty(exports, "inheritsComments", {
  131872. enumerable: true,
  131873. get: function() {
  131874. return _inheritsComments.default;
  131875. }
  131876. });
  131877. Object.defineProperty(exports, "inheritTrailingComments", {
  131878. enumerable: true,
  131879. get: function() {
  131880. return _inheritTrailingComments.default;
  131881. }
  131882. });
  131883. Object.defineProperty(exports, "removeComments", {
  131884. enumerable: true,
  131885. get: function() {
  131886. return _removeComments.default;
  131887. }
  131888. });
  131889. Object.defineProperty(exports, "ensureBlock", {
  131890. enumerable: true,
  131891. get: function() {
  131892. return _ensureBlock.default;
  131893. }
  131894. });
  131895. Object.defineProperty(exports, "toBindingIdentifierName", {
  131896. enumerable: true,
  131897. get: function() {
  131898. return _toBindingIdentifierName.default;
  131899. }
  131900. });
  131901. Object.defineProperty(exports, "toBlock", {
  131902. enumerable: true,
  131903. get: function() {
  131904. return _toBlock.default;
  131905. }
  131906. });
  131907. Object.defineProperty(exports, "toComputedKey", {
  131908. enumerable: true,
  131909. get: function() {
  131910. return _toComputedKey.default;
  131911. }
  131912. });
  131913. Object.defineProperty(exports, "toExpression", {
  131914. enumerable: true,
  131915. get: function() {
  131916. return _toExpression.default;
  131917. }
  131918. });
  131919. Object.defineProperty(exports, "toIdentifier", {
  131920. enumerable: true,
  131921. get: function() {
  131922. return _toIdentifier.default;
  131923. }
  131924. });
  131925. Object.defineProperty(exports, "toKeyAlias", {
  131926. enumerable: true,
  131927. get: function() {
  131928. return _toKeyAlias.default;
  131929. }
  131930. });
  131931. Object.defineProperty(exports, "toSequenceExpression", {
  131932. enumerable: true,
  131933. get: function() {
  131934. return _toSequenceExpression.default;
  131935. }
  131936. });
  131937. Object.defineProperty(exports, "toStatement", {
  131938. enumerable: true,
  131939. get: function() {
  131940. return _toStatement.default;
  131941. }
  131942. });
  131943. Object.defineProperty(exports, "valueToNode", {
  131944. enumerable: true,
  131945. get: function() {
  131946. return _valueToNode.default;
  131947. }
  131948. });
  131949. Object.defineProperty(exports, "appendToMemberExpression", {
  131950. enumerable: true,
  131951. get: function() {
  131952. return _appendToMemberExpression.default;
  131953. }
  131954. });
  131955. Object.defineProperty(exports, "inherits", {
  131956. enumerable: true,
  131957. get: function() {
  131958. return _inherits.default;
  131959. }
  131960. });
  131961. Object.defineProperty(exports, "prependToMemberExpression", {
  131962. enumerable: true,
  131963. get: function() {
  131964. return _prependToMemberExpression.default;
  131965. }
  131966. });
  131967. Object.defineProperty(exports, "removeProperties", {
  131968. enumerable: true,
  131969. get: function() {
  131970. return _removeProperties.default;
  131971. }
  131972. });
  131973. Object.defineProperty(exports, "removePropertiesDeep", {
  131974. enumerable: true,
  131975. get: function() {
  131976. return _removePropertiesDeep.default;
  131977. }
  131978. });
  131979. Object.defineProperty(exports, "removeTypeDuplicates", {
  131980. enumerable: true,
  131981. get: function() {
  131982. return _removeTypeDuplicates.default;
  131983. }
  131984. });
  131985. Object.defineProperty(exports, "getBindingIdentifiers", {
  131986. enumerable: true,
  131987. get: function() {
  131988. return _getBindingIdentifiers.default;
  131989. }
  131990. });
  131991. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  131992. enumerable: true,
  131993. get: function() {
  131994. return _getOuterBindingIdentifiers.default;
  131995. }
  131996. });
  131997. Object.defineProperty(exports, "traverse", {
  131998. enumerable: true,
  131999. get: function() {
  132000. return _traverse.default;
  132001. }
  132002. });
  132003. Object.defineProperty(exports, "traverseFast", {
  132004. enumerable: true,
  132005. get: function() {
  132006. return _traverseFast.default;
  132007. }
  132008. });
  132009. Object.defineProperty(exports, "shallowEqual", {
  132010. enumerable: true,
  132011. get: function() {
  132012. return _shallowEqual.default;
  132013. }
  132014. });
  132015. Object.defineProperty(exports, "is", {
  132016. enumerable: true,
  132017. get: function() {
  132018. return _is.default;
  132019. }
  132020. });
  132021. Object.defineProperty(exports, "isBinding", {
  132022. enumerable: true,
  132023. get: function() {
  132024. return _isBinding.default;
  132025. }
  132026. });
  132027. Object.defineProperty(exports, "isBlockScoped", {
  132028. enumerable: true,
  132029. get: function() {
  132030. return _isBlockScoped.default;
  132031. }
  132032. });
  132033. Object.defineProperty(exports, "isImmutable", {
  132034. enumerable: true,
  132035. get: function() {
  132036. return _isImmutable.default;
  132037. }
  132038. });
  132039. Object.defineProperty(exports, "isLet", {
  132040. enumerable: true,
  132041. get: function() {
  132042. return _isLet.default;
  132043. }
  132044. });
  132045. Object.defineProperty(exports, "isNode", {
  132046. enumerable: true,
  132047. get: function() {
  132048. return _isNode.default;
  132049. }
  132050. });
  132051. Object.defineProperty(exports, "isNodesEquivalent", {
  132052. enumerable: true,
  132053. get: function() {
  132054. return _isNodesEquivalent.default;
  132055. }
  132056. });
  132057. Object.defineProperty(exports, "isPlaceholderType", {
  132058. enumerable: true,
  132059. get: function() {
  132060. return _isPlaceholderType.default;
  132061. }
  132062. });
  132063. Object.defineProperty(exports, "isReferenced", {
  132064. enumerable: true,
  132065. get: function() {
  132066. return _isReferenced.default;
  132067. }
  132068. });
  132069. Object.defineProperty(exports, "isScope", {
  132070. enumerable: true,
  132071. get: function() {
  132072. return _isScope.default;
  132073. }
  132074. });
  132075. Object.defineProperty(exports, "isSpecifierDefault", {
  132076. enumerable: true,
  132077. get: function() {
  132078. return _isSpecifierDefault.default;
  132079. }
  132080. });
  132081. Object.defineProperty(exports, "isType", {
  132082. enumerable: true,
  132083. get: function() {
  132084. return _isType.default;
  132085. }
  132086. });
  132087. Object.defineProperty(exports, "isValidES3Identifier", {
  132088. enumerable: true,
  132089. get: function() {
  132090. return _isValidES3Identifier.default;
  132091. }
  132092. });
  132093. Object.defineProperty(exports, "isValidIdentifier", {
  132094. enumerable: true,
  132095. get: function() {
  132096. return _isValidIdentifier.default;
  132097. }
  132098. });
  132099. Object.defineProperty(exports, "isVar", {
  132100. enumerable: true,
  132101. get: function() {
  132102. return _isVar.default;
  132103. }
  132104. });
  132105. Object.defineProperty(exports, "matchesPattern", {
  132106. enumerable: true,
  132107. get: function() {
  132108. return _matchesPattern.default;
  132109. }
  132110. });
  132111. Object.defineProperty(exports, "validate", {
  132112. enumerable: true,
  132113. get: function() {
  132114. return _validate.default;
  132115. }
  132116. });
  132117. Object.defineProperty(exports, "buildMatchMemberExpression", {
  132118. enumerable: true,
  132119. get: function() {
  132120. return _buildMatchMemberExpression.default;
  132121. }
  132122. });
  132123. exports.react = void 0;
  132124. var _isReactComponent = require_isReactComponent6();
  132125. var _isCompatTag = require_isCompatTag6();
  132126. var _buildChildren = require_buildChildren6();
  132127. var _assertNode = require_assertNode6();
  132128. var _generated = require_generated28();
  132129. Object.keys(_generated).forEach(function(key) {
  132130. if (key === "default" || key === "__esModule")
  132131. return;
  132132. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132133. return;
  132134. if (key in exports && exports[key] === _generated[key])
  132135. return;
  132136. Object.defineProperty(exports, key, {
  132137. enumerable: true,
  132138. get: function() {
  132139. return _generated[key];
  132140. }
  132141. });
  132142. });
  132143. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof6();
  132144. var _createFlowUnionType = require_createFlowUnionType6();
  132145. var _createTSUnionType = require_createTSUnionType6();
  132146. var _generated2 = require_generated27();
  132147. Object.keys(_generated2).forEach(function(key) {
  132148. if (key === "default" || key === "__esModule")
  132149. return;
  132150. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132151. return;
  132152. if (key in exports && exports[key] === _generated2[key])
  132153. return;
  132154. Object.defineProperty(exports, key, {
  132155. enumerable: true,
  132156. get: function() {
  132157. return _generated2[key];
  132158. }
  132159. });
  132160. });
  132161. var _uppercase = require_uppercase6();
  132162. Object.keys(_uppercase).forEach(function(key) {
  132163. if (key === "default" || key === "__esModule")
  132164. return;
  132165. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132166. return;
  132167. if (key in exports && exports[key] === _uppercase[key])
  132168. return;
  132169. Object.defineProperty(exports, key, {
  132170. enumerable: true,
  132171. get: function() {
  132172. return _uppercase[key];
  132173. }
  132174. });
  132175. });
  132176. var _cloneNode = require_cloneNode6();
  132177. var _clone = require_clone6();
  132178. var _cloneDeep = require_cloneDeep6();
  132179. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc6();
  132180. var _cloneWithoutLoc = require_cloneWithoutLoc6();
  132181. var _addComment = require_addComment6();
  132182. var _addComments = require_addComments6();
  132183. var _inheritInnerComments = require_inheritInnerComments6();
  132184. var _inheritLeadingComments = require_inheritLeadingComments6();
  132185. var _inheritsComments = require_inheritsComments6();
  132186. var _inheritTrailingComments = require_inheritTrailingComments6();
  132187. var _removeComments = require_removeComments6();
  132188. var _generated3 = require_generated29();
  132189. Object.keys(_generated3).forEach(function(key) {
  132190. if (key === "default" || key === "__esModule")
  132191. return;
  132192. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132193. return;
  132194. if (key in exports && exports[key] === _generated3[key])
  132195. return;
  132196. Object.defineProperty(exports, key, {
  132197. enumerable: true,
  132198. get: function() {
  132199. return _generated3[key];
  132200. }
  132201. });
  132202. });
  132203. var _constants = require_constants6();
  132204. Object.keys(_constants).forEach(function(key) {
  132205. if (key === "default" || key === "__esModule")
  132206. return;
  132207. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132208. return;
  132209. if (key in exports && exports[key] === _constants[key])
  132210. return;
  132211. Object.defineProperty(exports, key, {
  132212. enumerable: true,
  132213. get: function() {
  132214. return _constants[key];
  132215. }
  132216. });
  132217. });
  132218. var _ensureBlock = require_ensureBlock6();
  132219. var _toBindingIdentifierName = require_toBindingIdentifierName6();
  132220. var _toBlock = require_toBlock6();
  132221. var _toComputedKey = require_toComputedKey6();
  132222. var _toExpression = require_toExpression6();
  132223. var _toIdentifier = require_toIdentifier6();
  132224. var _toKeyAlias = require_toKeyAlias6();
  132225. var _toSequenceExpression = require_toSequenceExpression6();
  132226. var _toStatement = require_toStatement6();
  132227. var _valueToNode = require_valueToNode6();
  132228. var _definitions = require_definitions6();
  132229. Object.keys(_definitions).forEach(function(key) {
  132230. if (key === "default" || key === "__esModule")
  132231. return;
  132232. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132233. return;
  132234. if (key in exports && exports[key] === _definitions[key])
  132235. return;
  132236. Object.defineProperty(exports, key, {
  132237. enumerable: true,
  132238. get: function() {
  132239. return _definitions[key];
  132240. }
  132241. });
  132242. });
  132243. var _appendToMemberExpression = require_appendToMemberExpression6();
  132244. var _inherits = require_inherits6();
  132245. var _prependToMemberExpression = require_prependToMemberExpression6();
  132246. var _removeProperties = require_removeProperties6();
  132247. var _removePropertiesDeep = require_removePropertiesDeep6();
  132248. var _removeTypeDuplicates = require_removeTypeDuplicates11();
  132249. var _getBindingIdentifiers = require_getBindingIdentifiers6();
  132250. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers6();
  132251. var _traverse = require_traverse6();
  132252. Object.keys(_traverse).forEach(function(key) {
  132253. if (key === "default" || key === "__esModule")
  132254. return;
  132255. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132256. return;
  132257. if (key in exports && exports[key] === _traverse[key])
  132258. return;
  132259. Object.defineProperty(exports, key, {
  132260. enumerable: true,
  132261. get: function() {
  132262. return _traverse[key];
  132263. }
  132264. });
  132265. });
  132266. var _traverseFast = require_traverseFast6();
  132267. var _shallowEqual = require_shallowEqual6();
  132268. var _is = require_is6();
  132269. var _isBinding = require_isBinding6();
  132270. var _isBlockScoped = require_isBlockScoped6();
  132271. var _isImmutable = require_isImmutable6();
  132272. var _isLet = require_isLet6();
  132273. var _isNode = require_isNode6();
  132274. var _isNodesEquivalent = require_isNodesEquivalent6();
  132275. var _isPlaceholderType = require_isPlaceholderType6();
  132276. var _isReferenced = require_isReferenced6();
  132277. var _isScope = require_isScope6();
  132278. var _isSpecifierDefault = require_isSpecifierDefault6();
  132279. var _isType = require_isType6();
  132280. var _isValidES3Identifier = require_isValidES3Identifier6();
  132281. var _isValidIdentifier = require_isValidIdentifier6();
  132282. var _isVar = require_isVar6();
  132283. var _matchesPattern = require_matchesPattern6();
  132284. var _validate = require_validate6();
  132285. var _buildMatchMemberExpression = require_buildMatchMemberExpression6();
  132286. var _generated4 = require_generated26();
  132287. Object.keys(_generated4).forEach(function(key) {
  132288. if (key === "default" || key === "__esModule")
  132289. return;
  132290. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132291. return;
  132292. if (key in exports && exports[key] === _generated4[key])
  132293. return;
  132294. Object.defineProperty(exports, key, {
  132295. enumerable: true,
  132296. get: function() {
  132297. return _generated4[key];
  132298. }
  132299. });
  132300. });
  132301. var _generated5 = require_generated30();
  132302. Object.keys(_generated5).forEach(function(key) {
  132303. if (key === "default" || key === "__esModule")
  132304. return;
  132305. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  132306. return;
  132307. if (key in exports && exports[key] === _generated5[key])
  132308. return;
  132309. Object.defineProperty(exports, key, {
  132310. enumerable: true,
  132311. get: function() {
  132312. return _generated5[key];
  132313. }
  132314. });
  132315. });
  132316. var react = {
  132317. isReactComponent: _isReactComponent.default,
  132318. isCompatTag: _isCompatTag.default,
  132319. buildChildren: _buildChildren.default
  132320. };
  132321. exports.react = react;
  132322. }
  132323. });
  132324. // node_modules/@babel/template/lib/formatters.js
  132325. var require_formatters2 = __commonJS({
  132326. "node_modules/@babel/template/lib/formatters.js"(exports) {
  132327. "use strict";
  132328. Object.defineProperty(exports, "__esModule", {
  132329. value: true
  132330. });
  132331. exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0;
  132332. var t2 = require_lib30();
  132333. function makeStatementFormatter(fn) {
  132334. return {
  132335. code: (str) => `/* @babel/template */;
  132336. ${str}`,
  132337. validate: () => {
  132338. },
  132339. unwrap: (ast) => {
  132340. return fn(ast.program.body.slice(1));
  132341. }
  132342. };
  132343. }
  132344. var smart = makeStatementFormatter((body) => {
  132345. if (body.length > 1) {
  132346. return body;
  132347. } else {
  132348. return body[0];
  132349. }
  132350. });
  132351. exports.smart = smart;
  132352. var statements = makeStatementFormatter((body) => body);
  132353. exports.statements = statements;
  132354. var statement = makeStatementFormatter((body) => {
  132355. if (body.length === 0) {
  132356. throw new Error("Found nothing to return.");
  132357. }
  132358. if (body.length > 1) {
  132359. throw new Error("Found multiple statements but wanted one");
  132360. }
  132361. return body[0];
  132362. });
  132363. exports.statement = statement;
  132364. var expression = {
  132365. code: (str) => `(
  132366. ${str}
  132367. )`,
  132368. validate: (ast) => {
  132369. if (ast.program.body.length > 1) {
  132370. throw new Error("Found multiple statements but wanted one");
  132371. }
  132372. if (expression.unwrap(ast).start === 0) {
  132373. throw new Error("Parse result included parens.");
  132374. }
  132375. },
  132376. unwrap: ({
  132377. program: program2
  132378. }) => {
  132379. const [stmt] = program2.body;
  132380. t2.assertExpressionStatement(stmt);
  132381. return stmt.expression;
  132382. }
  132383. };
  132384. exports.expression = expression;
  132385. var program = {
  132386. code: (str) => str,
  132387. validate: () => {
  132388. },
  132389. unwrap: (ast) => ast.program
  132390. };
  132391. exports.program = program;
  132392. }
  132393. });
  132394. // node_modules/@babel/template/lib/options.js
  132395. var require_options2 = __commonJS({
  132396. "node_modules/@babel/template/lib/options.js"(exports) {
  132397. "use strict";
  132398. Object.defineProperty(exports, "__esModule", {
  132399. value: true
  132400. });
  132401. exports.merge = merge2;
  132402. exports.validate = validate;
  132403. exports.normalizeReplacements = normalizeReplacements;
  132404. function _objectWithoutPropertiesLoose(source, excluded) {
  132405. if (source == null)
  132406. return {};
  132407. var target = {};
  132408. var sourceKeys = Object.keys(source);
  132409. var key, i;
  132410. for (i = 0; i < sourceKeys.length; i++) {
  132411. key = sourceKeys[i];
  132412. if (excluded.indexOf(key) >= 0)
  132413. continue;
  132414. target[key] = source[key];
  132415. }
  132416. return target;
  132417. }
  132418. function merge2(a, b) {
  132419. const {
  132420. placeholderWhitelist = a.placeholderWhitelist,
  132421. placeholderPattern = a.placeholderPattern,
  132422. preserveComments = a.preserveComments,
  132423. syntacticPlaceholders = a.syntacticPlaceholders
  132424. } = b;
  132425. return {
  132426. parser: Object.assign({}, a.parser, b.parser),
  132427. placeholderWhitelist,
  132428. placeholderPattern,
  132429. preserveComments,
  132430. syntacticPlaceholders
  132431. };
  132432. }
  132433. function validate(opts) {
  132434. if (opts != null && typeof opts !== "object") {
  132435. throw new Error("Unknown template options.");
  132436. }
  132437. const _ref = opts || {}, {
  132438. placeholderWhitelist,
  132439. placeholderPattern,
  132440. preserveComments,
  132441. syntacticPlaceholders
  132442. } = _ref, parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]);
  132443. if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
  132444. throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
  132445. }
  132446. if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
  132447. throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
  132448. }
  132449. if (preserveComments != null && typeof preserveComments !== "boolean") {
  132450. throw new Error("'.preserveComments' must be a boolean, null, or undefined");
  132451. }
  132452. if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
  132453. throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
  132454. }
  132455. if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
  132456. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  132457. }
  132458. return {
  132459. parser,
  132460. placeholderWhitelist: placeholderWhitelist || void 0,
  132461. placeholderPattern: placeholderPattern == null ? void 0 : placeholderPattern,
  132462. preserveComments: preserveComments == null ? void 0 : preserveComments,
  132463. syntacticPlaceholders: syntacticPlaceholders == null ? void 0 : syntacticPlaceholders
  132464. };
  132465. }
  132466. function normalizeReplacements(replacements) {
  132467. if (Array.isArray(replacements)) {
  132468. return replacements.reduce((acc, replacement, i) => {
  132469. acc["$" + i] = replacement;
  132470. return acc;
  132471. }, {});
  132472. } else if (typeof replacements === "object" || replacements == null) {
  132473. return replacements || void 0;
  132474. }
  132475. throw new Error("Template replacements must be an array, object, null, or undefined");
  132476. }
  132477. }
  132478. });
  132479. // node_modules/@babel/parser/lib/index.js
  132480. var require_lib31 = __commonJS({
  132481. "node_modules/@babel/parser/lib/index.js"(exports) {
  132482. "use strict";
  132483. Object.defineProperty(exports, "__esModule", { value: true });
  132484. var beforeExpr2 = true;
  132485. var startsExpr2 = true;
  132486. var isLoop = true;
  132487. var isAssign = true;
  132488. var prefix = true;
  132489. var postfix = true;
  132490. var TokenType3 = class {
  132491. constructor(label, conf = {}) {
  132492. this.label = void 0;
  132493. this.keyword = void 0;
  132494. this.beforeExpr = void 0;
  132495. this.startsExpr = void 0;
  132496. this.rightAssociative = void 0;
  132497. this.isLoop = void 0;
  132498. this.isAssign = void 0;
  132499. this.prefix = void 0;
  132500. this.postfix = void 0;
  132501. this.binop = void 0;
  132502. this.updateContext = void 0;
  132503. this.label = label;
  132504. this.keyword = conf.keyword;
  132505. this.beforeExpr = !!conf.beforeExpr;
  132506. this.startsExpr = !!conf.startsExpr;
  132507. this.rightAssociative = !!conf.rightAssociative;
  132508. this.isLoop = !!conf.isLoop;
  132509. this.isAssign = !!conf.isAssign;
  132510. this.prefix = !!conf.prefix;
  132511. this.postfix = !!conf.postfix;
  132512. this.binop = conf.binop != null ? conf.binop : null;
  132513. this.updateContext = null;
  132514. }
  132515. };
  132516. var keywords$12 = /* @__PURE__ */ new Map();
  132517. function createKeyword(name2, options = {}) {
  132518. options.keyword = name2;
  132519. const token = new TokenType3(name2, options);
  132520. keywords$12.set(name2, token);
  132521. return token;
  132522. }
  132523. function createBinop(name2, binop2) {
  132524. return new TokenType3(name2, {
  132525. beforeExpr: beforeExpr2,
  132526. binop: binop2
  132527. });
  132528. }
  132529. var types$12 = {
  132530. num: new TokenType3("num", {
  132531. startsExpr: startsExpr2
  132532. }),
  132533. bigint: new TokenType3("bigint", {
  132534. startsExpr: startsExpr2
  132535. }),
  132536. decimal: new TokenType3("decimal", {
  132537. startsExpr: startsExpr2
  132538. }),
  132539. regexp: new TokenType3("regexp", {
  132540. startsExpr: startsExpr2
  132541. }),
  132542. string: new TokenType3("string", {
  132543. startsExpr: startsExpr2
  132544. }),
  132545. name: new TokenType3("name", {
  132546. startsExpr: startsExpr2
  132547. }),
  132548. privateName: new TokenType3("#name", {
  132549. startsExpr: startsExpr2
  132550. }),
  132551. eof: new TokenType3("eof"),
  132552. bracketL: new TokenType3("[", {
  132553. beforeExpr: beforeExpr2,
  132554. startsExpr: startsExpr2
  132555. }),
  132556. bracketHashL: new TokenType3("#[", {
  132557. beforeExpr: beforeExpr2,
  132558. startsExpr: startsExpr2
  132559. }),
  132560. bracketBarL: new TokenType3("[|", {
  132561. beforeExpr: beforeExpr2,
  132562. startsExpr: startsExpr2
  132563. }),
  132564. bracketR: new TokenType3("]"),
  132565. bracketBarR: new TokenType3("|]"),
  132566. braceL: new TokenType3("{", {
  132567. beforeExpr: beforeExpr2,
  132568. startsExpr: startsExpr2
  132569. }),
  132570. braceBarL: new TokenType3("{|", {
  132571. beforeExpr: beforeExpr2,
  132572. startsExpr: startsExpr2
  132573. }),
  132574. braceHashL: new TokenType3("#{", {
  132575. beforeExpr: beforeExpr2,
  132576. startsExpr: startsExpr2
  132577. }),
  132578. braceR: new TokenType3("}", {
  132579. beforeExpr: beforeExpr2
  132580. }),
  132581. braceBarR: new TokenType3("|}"),
  132582. parenL: new TokenType3("(", {
  132583. beforeExpr: beforeExpr2,
  132584. startsExpr: startsExpr2
  132585. }),
  132586. parenR: new TokenType3(")"),
  132587. comma: new TokenType3(",", {
  132588. beforeExpr: beforeExpr2
  132589. }),
  132590. semi: new TokenType3(";", {
  132591. beforeExpr: beforeExpr2
  132592. }),
  132593. colon: new TokenType3(":", {
  132594. beforeExpr: beforeExpr2
  132595. }),
  132596. doubleColon: new TokenType3("::", {
  132597. beforeExpr: beforeExpr2
  132598. }),
  132599. dot: new TokenType3("."),
  132600. question: new TokenType3("?", {
  132601. beforeExpr: beforeExpr2
  132602. }),
  132603. questionDot: new TokenType3("?."),
  132604. arrow: new TokenType3("=>", {
  132605. beforeExpr: beforeExpr2
  132606. }),
  132607. template: new TokenType3("template"),
  132608. ellipsis: new TokenType3("...", {
  132609. beforeExpr: beforeExpr2
  132610. }),
  132611. backQuote: new TokenType3("`", {
  132612. startsExpr: startsExpr2
  132613. }),
  132614. dollarBraceL: new TokenType3("${", {
  132615. beforeExpr: beforeExpr2,
  132616. startsExpr: startsExpr2
  132617. }),
  132618. at: new TokenType3("@"),
  132619. hash: new TokenType3("#", {
  132620. startsExpr: startsExpr2
  132621. }),
  132622. interpreterDirective: new TokenType3("#!..."),
  132623. eq: new TokenType3("=", {
  132624. beforeExpr: beforeExpr2,
  132625. isAssign
  132626. }),
  132627. assign: new TokenType3("_=", {
  132628. beforeExpr: beforeExpr2,
  132629. isAssign
  132630. }),
  132631. slashAssign: new TokenType3("_=", {
  132632. beforeExpr: beforeExpr2,
  132633. isAssign
  132634. }),
  132635. incDec: new TokenType3("++/--", {
  132636. prefix,
  132637. postfix,
  132638. startsExpr: startsExpr2
  132639. }),
  132640. bang: new TokenType3("!", {
  132641. beforeExpr: beforeExpr2,
  132642. prefix,
  132643. startsExpr: startsExpr2
  132644. }),
  132645. tilde: new TokenType3("~", {
  132646. beforeExpr: beforeExpr2,
  132647. prefix,
  132648. startsExpr: startsExpr2
  132649. }),
  132650. pipeline: createBinop("|>", 0),
  132651. nullishCoalescing: createBinop("??", 1),
  132652. logicalOR: createBinop("||", 1),
  132653. logicalAND: createBinop("&&", 2),
  132654. bitwiseOR: createBinop("|", 3),
  132655. bitwiseXOR: createBinop("^", 4),
  132656. bitwiseAND: createBinop("&", 5),
  132657. equality: createBinop("==/!=/===/!==", 6),
  132658. relational: createBinop("</>/<=/>=", 7),
  132659. bitShift: createBinop("<</>>/>>>", 8),
  132660. plusMin: new TokenType3("+/-", {
  132661. beforeExpr: beforeExpr2,
  132662. binop: 9,
  132663. prefix,
  132664. startsExpr: startsExpr2
  132665. }),
  132666. modulo: new TokenType3("%", {
  132667. beforeExpr: beforeExpr2,
  132668. binop: 10,
  132669. startsExpr: startsExpr2
  132670. }),
  132671. star: new TokenType3("*", {
  132672. binop: 10
  132673. }),
  132674. slash: createBinop("/", 10),
  132675. exponent: new TokenType3("**", {
  132676. beforeExpr: beforeExpr2,
  132677. binop: 11,
  132678. rightAssociative: true
  132679. }),
  132680. _break: createKeyword("break"),
  132681. _case: createKeyword("case", {
  132682. beforeExpr: beforeExpr2
  132683. }),
  132684. _catch: createKeyword("catch"),
  132685. _continue: createKeyword("continue"),
  132686. _debugger: createKeyword("debugger"),
  132687. _default: createKeyword("default", {
  132688. beforeExpr: beforeExpr2
  132689. }),
  132690. _do: createKeyword("do", {
  132691. isLoop,
  132692. beforeExpr: beforeExpr2
  132693. }),
  132694. _else: createKeyword("else", {
  132695. beforeExpr: beforeExpr2
  132696. }),
  132697. _finally: createKeyword("finally"),
  132698. _for: createKeyword("for", {
  132699. isLoop
  132700. }),
  132701. _function: createKeyword("function", {
  132702. startsExpr: startsExpr2
  132703. }),
  132704. _if: createKeyword("if"),
  132705. _return: createKeyword("return", {
  132706. beforeExpr: beforeExpr2
  132707. }),
  132708. _switch: createKeyword("switch"),
  132709. _throw: createKeyword("throw", {
  132710. beforeExpr: beforeExpr2,
  132711. prefix,
  132712. startsExpr: startsExpr2
  132713. }),
  132714. _try: createKeyword("try"),
  132715. _var: createKeyword("var"),
  132716. _const: createKeyword("const"),
  132717. _while: createKeyword("while", {
  132718. isLoop
  132719. }),
  132720. _with: createKeyword("with"),
  132721. _new: createKeyword("new", {
  132722. beforeExpr: beforeExpr2,
  132723. startsExpr: startsExpr2
  132724. }),
  132725. _this: createKeyword("this", {
  132726. startsExpr: startsExpr2
  132727. }),
  132728. _super: createKeyword("super", {
  132729. startsExpr: startsExpr2
  132730. }),
  132731. _class: createKeyword("class", {
  132732. startsExpr: startsExpr2
  132733. }),
  132734. _extends: createKeyword("extends", {
  132735. beforeExpr: beforeExpr2
  132736. }),
  132737. _export: createKeyword("export"),
  132738. _import: createKeyword("import", {
  132739. startsExpr: startsExpr2
  132740. }),
  132741. _null: createKeyword("null", {
  132742. startsExpr: startsExpr2
  132743. }),
  132744. _true: createKeyword("true", {
  132745. startsExpr: startsExpr2
  132746. }),
  132747. _false: createKeyword("false", {
  132748. startsExpr: startsExpr2
  132749. }),
  132750. _in: createKeyword("in", {
  132751. beforeExpr: beforeExpr2,
  132752. binop: 7
  132753. }),
  132754. _instanceof: createKeyword("instanceof", {
  132755. beforeExpr: beforeExpr2,
  132756. binop: 7
  132757. }),
  132758. _typeof: createKeyword("typeof", {
  132759. beforeExpr: beforeExpr2,
  132760. prefix,
  132761. startsExpr: startsExpr2
  132762. }),
  132763. _void: createKeyword("void", {
  132764. beforeExpr: beforeExpr2,
  132765. prefix,
  132766. startsExpr: startsExpr2
  132767. }),
  132768. _delete: createKeyword("delete", {
  132769. beforeExpr: beforeExpr2,
  132770. prefix,
  132771. startsExpr: startsExpr2
  132772. })
  132773. };
  132774. var lineBreak2 = /\r\n?|[\n\u2028\u2029]/;
  132775. var lineBreakG2 = new RegExp(lineBreak2.source, "g");
  132776. function isNewLine2(code2) {
  132777. switch (code2) {
  132778. case 10:
  132779. case 13:
  132780. case 8232:
  132781. case 8233:
  132782. return true;
  132783. default:
  132784. return false;
  132785. }
  132786. }
  132787. var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  132788. function isWhitespace(code2) {
  132789. switch (code2) {
  132790. case 9:
  132791. case 11:
  132792. case 12:
  132793. case 32:
  132794. case 160:
  132795. case 5760:
  132796. case 8192:
  132797. case 8193:
  132798. case 8194:
  132799. case 8195:
  132800. case 8196:
  132801. case 8197:
  132802. case 8198:
  132803. case 8199:
  132804. case 8200:
  132805. case 8201:
  132806. case 8202:
  132807. case 8239:
  132808. case 8287:
  132809. case 12288:
  132810. case 65279:
  132811. return true;
  132812. default:
  132813. return false;
  132814. }
  132815. }
  132816. var Position3 = class {
  132817. constructor(line, col) {
  132818. this.line = void 0;
  132819. this.column = void 0;
  132820. this.line = line;
  132821. this.column = col;
  132822. }
  132823. };
  132824. var SourceLocation3 = class {
  132825. constructor(start3, end) {
  132826. this.start = void 0;
  132827. this.end = void 0;
  132828. this.filename = void 0;
  132829. this.identifierName = void 0;
  132830. this.start = start3;
  132831. this.end = end;
  132832. }
  132833. };
  132834. function getLineInfo2(input, offset2) {
  132835. let line = 1;
  132836. let lineStart = 0;
  132837. let match;
  132838. lineBreakG2.lastIndex = 0;
  132839. while ((match = lineBreakG2.exec(input)) && match.index < offset2) {
  132840. line++;
  132841. lineStart = lineBreakG2.lastIndex;
  132842. }
  132843. return new Position3(line, offset2 - lineStart);
  132844. }
  132845. var BaseParser = class {
  132846. constructor() {
  132847. this.sawUnambiguousESM = false;
  132848. this.ambiguousScriptDifferentAst = false;
  132849. }
  132850. hasPlugin(name2) {
  132851. return this.plugins.has(name2);
  132852. }
  132853. getPluginOption(plugin2, name2) {
  132854. if (this.hasPlugin(plugin2))
  132855. return this.plugins.get(plugin2)[name2];
  132856. }
  132857. };
  132858. function last(stack) {
  132859. return stack[stack.length - 1];
  132860. }
  132861. var CommentsParser = class extends BaseParser {
  132862. addComment(comment2) {
  132863. if (this.filename)
  132864. comment2.loc.filename = this.filename;
  132865. this.state.trailingComments.push(comment2);
  132866. this.state.leadingComments.push(comment2);
  132867. }
  132868. adjustCommentsAfterTrailingComma(node, elements, takeAllComments) {
  132869. if (this.state.leadingComments.length === 0) {
  132870. return;
  132871. }
  132872. let lastElement = null;
  132873. let i = elements.length;
  132874. while (lastElement === null && i > 0) {
  132875. lastElement = elements[--i];
  132876. }
  132877. if (lastElement === null) {
  132878. return;
  132879. }
  132880. for (let j = 0; j < this.state.leadingComments.length; j++) {
  132881. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  132882. this.state.leadingComments.splice(j, 1);
  132883. j--;
  132884. }
  132885. }
  132886. const newTrailingComments = [];
  132887. for (let i2 = 0; i2 < this.state.leadingComments.length; i2++) {
  132888. const leadingComment = this.state.leadingComments[i2];
  132889. if (leadingComment.end < node.end) {
  132890. newTrailingComments.push(leadingComment);
  132891. if (!takeAllComments) {
  132892. this.state.leadingComments.splice(i2, 1);
  132893. i2--;
  132894. }
  132895. } else {
  132896. if (node.trailingComments === void 0) {
  132897. node.trailingComments = [];
  132898. }
  132899. node.trailingComments.push(leadingComment);
  132900. }
  132901. }
  132902. if (takeAllComments)
  132903. this.state.leadingComments = [];
  132904. if (newTrailingComments.length > 0) {
  132905. lastElement.trailingComments = newTrailingComments;
  132906. } else if (lastElement.trailingComments !== void 0) {
  132907. lastElement.trailingComments = [];
  132908. }
  132909. }
  132910. processComment(node) {
  132911. if (node.type === "Program" && node.body.length > 0)
  132912. return;
  132913. const stack = this.state.commentStack;
  132914. let firstChild, lastChild, trailingComments, i, j;
  132915. if (this.state.trailingComments.length > 0) {
  132916. if (this.state.trailingComments[0].start >= node.end) {
  132917. trailingComments = this.state.trailingComments;
  132918. this.state.trailingComments = [];
  132919. } else {
  132920. this.state.trailingComments.length = 0;
  132921. }
  132922. } else if (stack.length > 0) {
  132923. const lastInStack = last(stack);
  132924. if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
  132925. trailingComments = lastInStack.trailingComments;
  132926. delete lastInStack.trailingComments;
  132927. }
  132928. }
  132929. if (stack.length > 0 && last(stack).start >= node.start) {
  132930. firstChild = stack.pop();
  132931. }
  132932. while (stack.length > 0 && last(stack).start >= node.start) {
  132933. lastChild = stack.pop();
  132934. }
  132935. if (!lastChild && firstChild)
  132936. lastChild = firstChild;
  132937. if (firstChild) {
  132938. switch (node.type) {
  132939. case "ObjectExpression":
  132940. this.adjustCommentsAfterTrailingComma(node, node.properties);
  132941. break;
  132942. case "ObjectPattern":
  132943. this.adjustCommentsAfterTrailingComma(node, node.properties, true);
  132944. break;
  132945. case "CallExpression":
  132946. this.adjustCommentsAfterTrailingComma(node, node.arguments);
  132947. break;
  132948. case "ArrayExpression":
  132949. this.adjustCommentsAfterTrailingComma(node, node.elements);
  132950. break;
  132951. case "ArrayPattern":
  132952. this.adjustCommentsAfterTrailingComma(node, node.elements, true);
  132953. break;
  132954. }
  132955. } else if (this.state.commentPreviousNode && (this.state.commentPreviousNode.type === "ImportSpecifier" && node.type !== "ImportSpecifier" || this.state.commentPreviousNode.type === "ExportSpecifier" && node.type !== "ExportSpecifier")) {
  132956. this.adjustCommentsAfterTrailingComma(node, [this.state.commentPreviousNode]);
  132957. }
  132958. if (lastChild) {
  132959. if (lastChild.leadingComments) {
  132960. if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {
  132961. node.leadingComments = lastChild.leadingComments;
  132962. delete lastChild.leadingComments;
  132963. } else {
  132964. for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
  132965. if (lastChild.leadingComments[i].end <= node.start) {
  132966. node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
  132967. break;
  132968. }
  132969. }
  132970. }
  132971. }
  132972. } else if (this.state.leadingComments.length > 0) {
  132973. if (last(this.state.leadingComments).end <= node.start) {
  132974. if (this.state.commentPreviousNode) {
  132975. for (j = 0; j < this.state.leadingComments.length; j++) {
  132976. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  132977. this.state.leadingComments.splice(j, 1);
  132978. j--;
  132979. }
  132980. }
  132981. }
  132982. if (this.state.leadingComments.length > 0) {
  132983. node.leadingComments = this.state.leadingComments;
  132984. this.state.leadingComments = [];
  132985. }
  132986. } else {
  132987. for (i = 0; i < this.state.leadingComments.length; i++) {
  132988. if (this.state.leadingComments[i].end > node.start) {
  132989. break;
  132990. }
  132991. }
  132992. const leadingComments = this.state.leadingComments.slice(0, i);
  132993. if (leadingComments.length) {
  132994. node.leadingComments = leadingComments;
  132995. }
  132996. trailingComments = this.state.leadingComments.slice(i);
  132997. if (trailingComments.length === 0) {
  132998. trailingComments = null;
  132999. }
  133000. }
  133001. }
  133002. this.state.commentPreviousNode = node;
  133003. if (trailingComments) {
  133004. if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
  133005. node.innerComments = trailingComments;
  133006. } else {
  133007. const firstTrailingCommentIndex = trailingComments.findIndex((comment2) => comment2.end >= node.end);
  133008. if (firstTrailingCommentIndex > 0) {
  133009. node.innerComments = trailingComments.slice(0, firstTrailingCommentIndex);
  133010. node.trailingComments = trailingComments.slice(firstTrailingCommentIndex);
  133011. } else {
  133012. node.trailingComments = trailingComments;
  133013. }
  133014. }
  133015. }
  133016. stack.push(node);
  133017. }
  133018. };
  133019. var ErrorCodes = Object.freeze({
  133020. SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
  133021. SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  133022. });
  133023. var ErrorMessages = makeErrorTemplates({
  133024. AccessorIsGenerator: "A %0ter cannot be a generator.",
  133025. ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
  133026. AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
  133027. AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
  133028. AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
  133029. AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
  133030. AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
  133031. AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
  133032. BadGetterArity: "A 'get' accesor must not have any formal parameters.",
  133033. BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
  133034. BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
  133035. ConstructorClassField: "Classes may not have a field named 'constructor'.",
  133036. ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
  133037. ConstructorIsAccessor: "Class constructor may not be an accessor.",
  133038. ConstructorIsAsync: "Constructor can't be an async function.",
  133039. ConstructorIsGenerator: "Constructor can't be a generator.",
  133040. DeclarationMissingInitializer: "'%0' require an initialization value.",
  133041. DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
  133042. DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
  133043. DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
  133044. DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
  133045. DecoratorStaticBlock: "Decorators can't be used with a static block.",
  133046. DeletePrivateField: "Deleting a private field is not allowed.",
  133047. DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
  133048. DuplicateConstructor: "Duplicate constructor in the same class.",
  133049. DuplicateDefaultExport: "Only one default export allowed per module.",
  133050. DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
  133051. DuplicateProto: "Redefinition of __proto__ property.",
  133052. DuplicateRegExpFlags: "Duplicate regular expression flag.",
  133053. ElementAfterRest: "Rest element must be last element.",
  133054. EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
  133055. ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
  133056. ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
  133057. ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.",
  133058. ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
  133059. ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
  133060. GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
  133061. IllegalBreakContinue: "Unsyntactic %0.",
  133062. IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
  133063. IllegalReturn: "'return' outside of function.",
  133064. ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
  133065. ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
  133066. ImportCallArity: "`import()` requires exactly %0.",
  133067. ImportCallNotNewExpression: "Cannot use new with import(...).",
  133068. ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
  133069. InvalidBigIntLiteral: "Invalid BigIntLiteral.",
  133070. InvalidCodePoint: "Code point out of bounds.",
  133071. InvalidDecimal: "Invalid decimal.",
  133072. InvalidDigit: "Expected number in radix %0.",
  133073. InvalidEscapeSequence: "Bad character escape sequence.",
  133074. InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
  133075. InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
  133076. InvalidIdentifier: "Invalid identifier %0.",
  133077. InvalidLhs: "Invalid left-hand side in %0.",
  133078. InvalidLhsBinding: "Binding invalid left-hand side in %0.",
  133079. InvalidNumber: "Invalid number.",
  133080. InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
  133081. InvalidOrUnexpectedToken: "Unexpected character '%0'.",
  133082. InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
  133083. InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
  133084. InvalidPropertyBindingPattern: "Binding member expression.",
  133085. InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
  133086. InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
  133087. LabelRedeclaration: "Label '%0' is already declared.",
  133088. LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
  133089. LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
  133090. MalformedRegExpFlags: "Invalid regular expression flag.",
  133091. MissingClassName: "A class name is required.",
  133092. MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
  133093. MissingSemicolon: "Missing semicolon.",
  133094. MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
  133095. MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
  133096. ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
  133097. ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
  133098. ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.',
  133099. ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.",
  133100. ModuleExportUndefined: "Export '%0' is not defined.",
  133101. MultipleDefaultsInSwitch: "Multiple default clauses.",
  133102. NewlineAfterThrow: "Illegal newline after throw.",
  133103. NoCatchOrFinally: "Missing catch or finally clause.",
  133104. NumberIdentifier: "Identifier directly after number.",
  133105. NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
  133106. ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
  133107. OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
  133108. OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
  133109. OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
  133110. ParamDupe: "Argument name clash.",
  133111. PatternHasAccessor: "Object pattern can't contain getter or setter.",
  133112. PatternHasMethod: "Object pattern can't contain methods.",
  133113. PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
  133114. PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
  133115. PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
  133116. PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
  133117. PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
  133118. PrimaryTopicRequiresSmartPipeline: "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
  133119. PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
  133120. PrivateNameRedeclaration: "Duplicate private name #%0.",
  133121. RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  133122. RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  133123. RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  133124. RecordNoProto: "'__proto__' is not allowed in Record expressions.",
  133125. RestTrailingComma: "Unexpected trailing comma after rest element.",
  133126. SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
  133127. StaticPrototype: "Classes may not have static property named prototype.",
  133128. StrictDelete: "Deleting local variable in strict mode.",
  133129. StrictEvalArguments: "Assigning to '%0' in strict mode.",
  133130. StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
  133131. StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
  133132. StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
  133133. StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
  133134. StrictWith: "'with' in strict mode.",
  133135. SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
  133136. SuperPrivateField: "Private fields can't be accessed on super.",
  133137. TrailingDecorator: "Decorators must be attached to a class element.",
  133138. TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  133139. TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  133140. TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  133141. UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
  133142. UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
  133143. UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
  133144. UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
  133145. UnexpectedKeyword: "Unexpected keyword '%0'.",
  133146. UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
  133147. UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
  133148. UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
  133149. UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
  133150. UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
  133151. UnexpectedReservedWord: "Unexpected reserved word '%0'.",
  133152. UnexpectedSuper: "'super' is only allowed in object methods and classes.",
  133153. UnexpectedToken: "Unexpected token '%0'.",
  133154. UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
  133155. UnsupportedBind: "Binding should be performed on object property.",
  133156. UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
  133157. UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
  133158. UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
  133159. UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
  133160. UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
  133161. UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
  133162. UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
  133163. UnterminatedComment: "Unterminated comment.",
  133164. UnterminatedRegExp: "Unterminated regular expression.",
  133165. UnterminatedString: "Unterminated string constant.",
  133166. UnterminatedTemplate: "Unterminated template.",
  133167. VarRedeclaration: "Identifier '%0' has already been declared.",
  133168. YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
  133169. YieldInParameter: "Yield expression is not allowed in formal parameters.",
  133170. ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
  133171. }, ErrorCodes.SyntaxError);
  133172. var SourceTypeModuleErrorMessages = makeErrorTemplates({
  133173. ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`,
  133174. ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'`
  133175. }, ErrorCodes.SourceTypeModuleError);
  133176. function makeErrorTemplates(messages2, code2) {
  133177. const templates = {};
  133178. Object.keys(messages2).forEach((reasonCode) => {
  133179. templates[reasonCode] = Object.freeze({
  133180. code: code2,
  133181. reasonCode,
  133182. template: messages2[reasonCode]
  133183. });
  133184. });
  133185. return Object.freeze(templates);
  133186. }
  133187. var ParserError = class extends CommentsParser {
  133188. getLocationForPosition(pos) {
  133189. let loc;
  133190. if (pos === this.state.start)
  133191. loc = this.state.startLoc;
  133192. else if (pos === this.state.lastTokStart)
  133193. loc = this.state.lastTokStartLoc;
  133194. else if (pos === this.state.end)
  133195. loc = this.state.endLoc;
  133196. else if (pos === this.state.lastTokEnd)
  133197. loc = this.state.lastTokEndLoc;
  133198. else
  133199. loc = getLineInfo2(this.input, pos);
  133200. return loc;
  133201. }
  133202. raise(pos, {
  133203. code: code2,
  133204. reasonCode,
  133205. template
  133206. }, ...params) {
  133207. return this.raiseWithData(pos, {
  133208. code: code2,
  133209. reasonCode
  133210. }, template, ...params);
  133211. }
  133212. raiseOverwrite(pos, {
  133213. code: code2,
  133214. template
  133215. }, ...params) {
  133216. const loc = this.getLocationForPosition(pos);
  133217. const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  133218. if (this.options.errorRecovery) {
  133219. const errors = this.state.errors;
  133220. for (let i = errors.length - 1; i >= 0; i--) {
  133221. const error = errors[i];
  133222. if (error.pos === pos) {
  133223. return Object.assign(error, {
  133224. message
  133225. });
  133226. } else if (error.pos < pos) {
  133227. break;
  133228. }
  133229. }
  133230. }
  133231. return this._raise({
  133232. code: code2,
  133233. loc,
  133234. pos
  133235. }, message);
  133236. }
  133237. raiseWithData(pos, data2, errorTemplate, ...params) {
  133238. const loc = this.getLocationForPosition(pos);
  133239. const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
  133240. return this._raise(Object.assign({
  133241. loc,
  133242. pos
  133243. }, data2), message);
  133244. }
  133245. _raise(errorContext, message) {
  133246. const err = new SyntaxError(message);
  133247. Object.assign(err, errorContext);
  133248. if (this.options.errorRecovery) {
  133249. if (!this.isLookahead)
  133250. this.state.errors.push(err);
  133251. return err;
  133252. } else {
  133253. throw err;
  133254. }
  133255. }
  133256. };
  133257. var estree = (superClass) => class extends superClass {
  133258. parseRegExpLiteral({
  133259. pattern,
  133260. flags
  133261. }) {
  133262. let regex2 = null;
  133263. try {
  133264. regex2 = new RegExp(pattern, flags);
  133265. } catch (e) {
  133266. }
  133267. const node = this.estreeParseLiteral(regex2);
  133268. node.regex = {
  133269. pattern,
  133270. flags
  133271. };
  133272. return node;
  133273. }
  133274. parseBigIntLiteral(value) {
  133275. let bigInt;
  133276. try {
  133277. bigInt = BigInt(value);
  133278. } catch (_unused) {
  133279. bigInt = null;
  133280. }
  133281. const node = this.estreeParseLiteral(bigInt);
  133282. node.bigint = String(node.value || value);
  133283. return node;
  133284. }
  133285. parseDecimalLiteral(value) {
  133286. const decimal = null;
  133287. const node = this.estreeParseLiteral(decimal);
  133288. node.decimal = String(node.value || value);
  133289. return node;
  133290. }
  133291. estreeParseLiteral(value) {
  133292. return this.parseLiteral(value, "Literal");
  133293. }
  133294. parseStringLiteral(value) {
  133295. return this.estreeParseLiteral(value);
  133296. }
  133297. parseNumericLiteral(value) {
  133298. return this.estreeParseLiteral(value);
  133299. }
  133300. parseNullLiteral() {
  133301. return this.estreeParseLiteral(null);
  133302. }
  133303. parseBooleanLiteral(value) {
  133304. return this.estreeParseLiteral(value);
  133305. }
  133306. directiveToStmt(directive) {
  133307. const directiveLiteral = directive.value;
  133308. const stmt = this.startNodeAt(directive.start, directive.loc.start);
  133309. const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  133310. expression.value = directiveLiteral.extra.expressionValue;
  133311. expression.raw = directiveLiteral.extra.raw;
  133312. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  133313. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  133314. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  133315. }
  133316. initFunction(node, isAsync) {
  133317. super.initFunction(node, isAsync);
  133318. node.expression = false;
  133319. }
  133320. checkDeclaration(node) {
  133321. if (node != null && this.isObjectProperty(node)) {
  133322. this.checkDeclaration(node.value);
  133323. } else {
  133324. super.checkDeclaration(node);
  133325. }
  133326. }
  133327. getObjectOrClassMethodParams(method) {
  133328. return method.value.params;
  133329. }
  133330. isValidDirective(stmt) {
  133331. var _stmt$expression$extr;
  133332. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
  133333. }
  133334. stmtToDirective(stmt) {
  133335. const directive = super.stmtToDirective(stmt);
  133336. const value = stmt.expression.value;
  133337. this.addExtra(directive.value, "expressionValue", value);
  133338. return directive;
  133339. }
  133340. parseBlockBody(node, ...args) {
  133341. super.parseBlockBody(node, ...args);
  133342. const directiveStatements = node.directives.map((d) => this.directiveToStmt(d));
  133343. node.body = directiveStatements.concat(node.body);
  133344. delete node.directives;
  133345. }
  133346. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  133347. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  133348. if (method.typeParameters) {
  133349. method.value.typeParameters = method.typeParameters;
  133350. delete method.typeParameters;
  133351. }
  133352. classBody.body.push(method);
  133353. }
  133354. parseMaybePrivateName(...args) {
  133355. const node = super.parseMaybePrivateName(...args);
  133356. if (node.type === "PrivateName" && this.getPluginOption("estree", "classFeatures")) {
  133357. return this.convertPrivateNameToPrivateIdentifier(node);
  133358. }
  133359. return node;
  133360. }
  133361. convertPrivateNameToPrivateIdentifier(node) {
  133362. const name2 = super.getPrivateNameSV(node);
  133363. node = node;
  133364. delete node.id;
  133365. node.name = name2;
  133366. node.type = "PrivateIdentifier";
  133367. return node;
  133368. }
  133369. isPrivateName(node) {
  133370. if (!this.getPluginOption("estree", "classFeatures")) {
  133371. return super.isPrivateName(node);
  133372. }
  133373. return node.type === "PrivateIdentifier";
  133374. }
  133375. getPrivateNameSV(node) {
  133376. if (!this.getPluginOption("estree", "classFeatures")) {
  133377. return super.getPrivateNameSV(node);
  133378. }
  133379. return node.name;
  133380. }
  133381. parseLiteral(value, type) {
  133382. const node = super.parseLiteral(value, type);
  133383. node.raw = node.extra.raw;
  133384. delete node.extra;
  133385. return node;
  133386. }
  133387. parseFunctionBody(node, allowExpression, isMethod = false) {
  133388. super.parseFunctionBody(node, allowExpression, isMethod);
  133389. node.expression = node.body.type !== "BlockStatement";
  133390. }
  133391. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  133392. let funcNode = this.startNode();
  133393. funcNode.kind = node.kind;
  133394. funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  133395. funcNode.type = "FunctionExpression";
  133396. delete funcNode.kind;
  133397. node.value = funcNode;
  133398. if (type === "ClassPrivateMethod") {
  133399. node.computed = false;
  133400. }
  133401. type = "MethodDefinition";
  133402. return this.finishNode(node, type);
  133403. }
  133404. parseClassProperty(...args) {
  133405. const propertyNode = super.parseClassProperty(...args);
  133406. if (this.getPluginOption("estree", "classFeatures")) {
  133407. propertyNode.type = "PropertyDefinition";
  133408. }
  133409. return propertyNode;
  133410. }
  133411. parseClassPrivateProperty(...args) {
  133412. const propertyNode = super.parseClassPrivateProperty(...args);
  133413. if (this.getPluginOption("estree", "classFeatures")) {
  133414. propertyNode.type = "PropertyDefinition";
  133415. propertyNode.computed = false;
  133416. }
  133417. return propertyNode;
  133418. }
  133419. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  133420. const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
  133421. if (node) {
  133422. node.type = "Property";
  133423. if (node.kind === "method")
  133424. node.kind = "init";
  133425. node.shorthand = false;
  133426. }
  133427. return node;
  133428. }
  133429. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  133430. const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  133431. if (node) {
  133432. node.kind = "init";
  133433. node.type = "Property";
  133434. }
  133435. return node;
  133436. }
  133437. toAssignable(node, isLHS = false) {
  133438. if (node != null && this.isObjectProperty(node)) {
  133439. this.toAssignable(node.value, isLHS);
  133440. return node;
  133441. }
  133442. return super.toAssignable(node, isLHS);
  133443. }
  133444. toAssignableObjectExpressionProp(prop, ...args) {
  133445. if (prop.kind === "get" || prop.kind === "set") {
  133446. this.raise(prop.key.start, ErrorMessages.PatternHasAccessor);
  133447. } else if (prop.method) {
  133448. this.raise(prop.key.start, ErrorMessages.PatternHasMethod);
  133449. } else {
  133450. super.toAssignableObjectExpressionProp(prop, ...args);
  133451. }
  133452. }
  133453. finishCallExpression(node, optional) {
  133454. super.finishCallExpression(node, optional);
  133455. if (node.callee.type === "Import") {
  133456. node.type = "ImportExpression";
  133457. node.source = node.arguments[0];
  133458. if (this.hasPlugin("importAssertions")) {
  133459. var _node$arguments$;
  133460. node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null;
  133461. }
  133462. delete node.arguments;
  133463. delete node.callee;
  133464. }
  133465. return node;
  133466. }
  133467. toReferencedArguments(node) {
  133468. if (node.type === "ImportExpression") {
  133469. return;
  133470. }
  133471. super.toReferencedArguments(node);
  133472. }
  133473. parseExport(node) {
  133474. super.parseExport(node);
  133475. switch (node.type) {
  133476. case "ExportAllDeclaration":
  133477. node.exported = null;
  133478. break;
  133479. case "ExportNamedDeclaration":
  133480. if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
  133481. node.type = "ExportAllDeclaration";
  133482. node.exported = node.specifiers[0].exported;
  133483. delete node.specifiers;
  133484. }
  133485. break;
  133486. }
  133487. return node;
  133488. }
  133489. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  133490. const node = super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  133491. if (state.optionalChainMember) {
  133492. if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
  133493. node.type = node.type.substring(8);
  133494. }
  133495. if (state.stop) {
  133496. const chain = this.startNodeAtNode(node);
  133497. chain.expression = node;
  133498. return this.finishNode(chain, "ChainExpression");
  133499. }
  133500. } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
  133501. node.optional = false;
  133502. }
  133503. return node;
  133504. }
  133505. hasPropertyAsPrivateName(node) {
  133506. if (node.type === "ChainExpression") {
  133507. node = node.expression;
  133508. }
  133509. return super.hasPropertyAsPrivateName(node);
  133510. }
  133511. isOptionalChain(node) {
  133512. return node.type === "ChainExpression";
  133513. }
  133514. isObjectProperty(node) {
  133515. return node.type === "Property" && node.kind === "init" && !node.method;
  133516. }
  133517. isObjectMethod(node) {
  133518. return node.method || node.kind === "get" || node.kind === "set";
  133519. }
  133520. };
  133521. var TokContext3 = class {
  133522. constructor(token, preserveSpace) {
  133523. this.token = void 0;
  133524. this.preserveSpace = void 0;
  133525. this.token = token;
  133526. this.preserveSpace = !!preserveSpace;
  133527. }
  133528. };
  133529. var types2 = {
  133530. brace: new TokContext3("{"),
  133531. templateQuasi: new TokContext3("${"),
  133532. template: new TokContext3("`", true)
  133533. };
  133534. types$12.braceR.updateContext = (context) => {
  133535. if (context.length > 1) {
  133536. context.pop();
  133537. }
  133538. };
  133539. types$12.braceL.updateContext = types$12.braceHashL.updateContext = (context) => {
  133540. context.push(types2.brace);
  133541. };
  133542. types$12.dollarBraceL.updateContext = (context) => {
  133543. context.push(types2.templateQuasi);
  133544. };
  133545. types$12.backQuote.updateContext = (context) => {
  133546. if (context[context.length - 1] === types2.template) {
  133547. context.pop();
  133548. } else {
  133549. context.push(types2.template);
  133550. }
  133551. };
  133552. var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  133553. var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  133554. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  133555. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  133556. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  133557. var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  133558. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  133559. function isInAstralSet2(code2, set) {
  133560. let pos = 65536;
  133561. for (let i = 0, length = set.length; i < length; i += 2) {
  133562. pos += set[i];
  133563. if (pos > code2)
  133564. return false;
  133565. pos += set[i + 1];
  133566. if (pos >= code2)
  133567. return true;
  133568. }
  133569. return false;
  133570. }
  133571. function isIdentifierStart2(code2) {
  133572. if (code2 < 65)
  133573. return code2 === 36;
  133574. if (code2 <= 90)
  133575. return true;
  133576. if (code2 < 97)
  133577. return code2 === 95;
  133578. if (code2 <= 122)
  133579. return true;
  133580. if (code2 <= 65535) {
  133581. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  133582. }
  133583. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  133584. }
  133585. function isIdentifierChar2(code2) {
  133586. if (code2 < 48)
  133587. return code2 === 36;
  133588. if (code2 < 58)
  133589. return true;
  133590. if (code2 < 65)
  133591. return false;
  133592. if (code2 <= 90)
  133593. return true;
  133594. if (code2 < 97)
  133595. return code2 === 95;
  133596. if (code2 <= 122)
  133597. return true;
  133598. if (code2 <= 65535) {
  133599. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  133600. }
  133601. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  133602. }
  133603. var reservedWords2 = {
  133604. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  133605. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  133606. strictBind: ["eval", "arguments"]
  133607. };
  133608. var keywords2 = new Set(reservedWords2.keyword);
  133609. var reservedWordsStrictSet = new Set(reservedWords2.strict);
  133610. var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind);
  133611. function isReservedWord(word, inModule) {
  133612. return inModule && word === "await" || word === "enum";
  133613. }
  133614. function isStrictReservedWord(word, inModule) {
  133615. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  133616. }
  133617. function isStrictBindOnlyReservedWord(word) {
  133618. return reservedWordsStrictBindSet.has(word);
  133619. }
  133620. function isStrictBindReservedWord(word, inModule) {
  133621. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  133622. }
  133623. function isKeyword(word) {
  133624. return keywords2.has(word);
  133625. }
  133626. function isIteratorStart(current2, next) {
  133627. return current2 === 64 && next === 64;
  133628. }
  133629. var reservedWordLikeSet = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
  133630. function canBeReservedWord(word) {
  133631. return reservedWordLikeSet.has(word);
  133632. }
  133633. var SCOPE_OTHER = 0;
  133634. var SCOPE_PROGRAM = 1;
  133635. var SCOPE_FUNCTION2 = 2;
  133636. var SCOPE_ARROW2 = 4;
  133637. var SCOPE_SIMPLE_CATCH2 = 8;
  133638. var SCOPE_SUPER2 = 16;
  133639. var SCOPE_DIRECT_SUPER2 = 32;
  133640. var SCOPE_CLASS = 64;
  133641. var SCOPE_STATIC_BLOCK = 128;
  133642. var SCOPE_TS_MODULE = 256;
  133643. var SCOPE_VAR2 = SCOPE_PROGRAM | SCOPE_FUNCTION2 | SCOPE_TS_MODULE;
  133644. var BIND_KIND_VALUE = 1;
  133645. var BIND_KIND_TYPE = 2;
  133646. var BIND_SCOPE_VAR = 4;
  133647. var BIND_SCOPE_LEXICAL = 8;
  133648. var BIND_SCOPE_FUNCTION = 16;
  133649. var BIND_FLAGS_NONE = 64;
  133650. var BIND_FLAGS_CLASS = 128;
  133651. var BIND_FLAGS_TS_ENUM = 256;
  133652. var BIND_FLAGS_TS_CONST_ENUM = 512;
  133653. var BIND_FLAGS_TS_EXPORT_ONLY = 1024;
  133654. var BIND_FLAGS_FLOW_DECLARE_FN = 2048;
  133655. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS;
  133656. var BIND_LEXICAL2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0;
  133657. var BIND_VAR2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0;
  133658. var BIND_FUNCTION2 = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0;
  133659. var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS;
  133660. var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0;
  133661. var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM;
  133662. var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  133663. var BIND_NONE2 = 0 | 0 | 0 | BIND_FLAGS_NONE;
  133664. var BIND_OUTSIDE2 = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE;
  133665. var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM;
  133666. var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  133667. var BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
  133668. var CLASS_ELEMENT_FLAG_STATIC = 4;
  133669. var CLASS_ELEMENT_KIND_GETTER = 2;
  133670. var CLASS_ELEMENT_KIND_SETTER = 1;
  133671. var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  133672. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC;
  133673. var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC;
  133674. var CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER;
  133675. var CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER;
  133676. var CLASS_ELEMENT_OTHER = 0;
  133677. var Scope4 = class {
  133678. constructor(flags) {
  133679. this.var = /* @__PURE__ */ new Set();
  133680. this.lexical = /* @__PURE__ */ new Set();
  133681. this.functions = /* @__PURE__ */ new Set();
  133682. this.flags = flags;
  133683. }
  133684. };
  133685. var ScopeHandler = class {
  133686. constructor(raise2, inModule) {
  133687. this.scopeStack = [];
  133688. this.undefinedExports = /* @__PURE__ */ new Map();
  133689. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  133690. this.raise = raise2;
  133691. this.inModule = inModule;
  133692. }
  133693. get inFunction() {
  133694. return (this.currentVarScopeFlags() & SCOPE_FUNCTION2) > 0;
  133695. }
  133696. get allowSuper() {
  133697. return (this.currentThisScopeFlags() & SCOPE_SUPER2) > 0;
  133698. }
  133699. get allowDirectSuper() {
  133700. return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER2) > 0;
  133701. }
  133702. get inClass() {
  133703. return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;
  133704. }
  133705. get inClassAndNotInNonArrowFunction() {
  133706. const flags = this.currentThisScopeFlags();
  133707. return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION2) === 0;
  133708. }
  133709. get inStaticBlock() {
  133710. return (this.currentThisScopeFlags() & SCOPE_STATIC_BLOCK) > 0;
  133711. }
  133712. get inNonArrowFunction() {
  133713. return (this.currentThisScopeFlags() & SCOPE_FUNCTION2) > 0;
  133714. }
  133715. get treatFunctionsAsVar() {
  133716. return this.treatFunctionsAsVarInScope(this.currentScope());
  133717. }
  133718. createScope(flags) {
  133719. return new Scope4(flags);
  133720. }
  133721. enter(flags) {
  133722. this.scopeStack.push(this.createScope(flags));
  133723. }
  133724. exit() {
  133725. this.scopeStack.pop();
  133726. }
  133727. treatFunctionsAsVarInScope(scope) {
  133728. return !!(scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_PROGRAM);
  133729. }
  133730. declareName(name2, bindingType, pos) {
  133731. let scope = this.currentScope();
  133732. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  133733. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  133734. if (bindingType & BIND_SCOPE_FUNCTION) {
  133735. scope.functions.add(name2);
  133736. } else {
  133737. scope.lexical.add(name2);
  133738. }
  133739. if (bindingType & BIND_SCOPE_LEXICAL) {
  133740. this.maybeExportDefined(scope, name2);
  133741. }
  133742. } else if (bindingType & BIND_SCOPE_VAR) {
  133743. for (let i = this.scopeStack.length - 1; i >= 0; --i) {
  133744. scope = this.scopeStack[i];
  133745. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  133746. scope.var.add(name2);
  133747. this.maybeExportDefined(scope, name2);
  133748. if (scope.flags & SCOPE_VAR2)
  133749. break;
  133750. }
  133751. }
  133752. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  133753. this.undefinedExports.delete(name2);
  133754. }
  133755. }
  133756. maybeExportDefined(scope, name2) {
  133757. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  133758. this.undefinedExports.delete(name2);
  133759. }
  133760. }
  133761. checkRedeclarationInScope(scope, name2, bindingType, pos) {
  133762. if (this.isRedeclaredInScope(scope, name2, bindingType)) {
  133763. this.raise(pos, ErrorMessages.VarRedeclaration, name2);
  133764. }
  133765. }
  133766. isRedeclaredInScope(scope, name2, bindingType) {
  133767. if (!(bindingType & BIND_KIND_VALUE))
  133768. return false;
  133769. if (bindingType & BIND_SCOPE_LEXICAL) {
  133770. return scope.lexical.has(name2) || scope.functions.has(name2) || scope.var.has(name2);
  133771. }
  133772. if (bindingType & BIND_SCOPE_FUNCTION) {
  133773. return scope.lexical.has(name2) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name2);
  133774. }
  133775. return scope.lexical.has(name2) && !(scope.flags & SCOPE_SIMPLE_CATCH2 && scope.lexical.values().next().value === name2) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name2);
  133776. }
  133777. checkLocalExport(id) {
  133778. const {
  133779. name: name2
  133780. } = id;
  133781. const topLevelScope = this.scopeStack[0];
  133782. if (!topLevelScope.lexical.has(name2) && !topLevelScope.var.has(name2) && !topLevelScope.functions.has(name2)) {
  133783. this.undefinedExports.set(name2, id.start);
  133784. }
  133785. }
  133786. currentScope() {
  133787. return this.scopeStack[this.scopeStack.length - 1];
  133788. }
  133789. currentVarScopeFlags() {
  133790. for (let i = this.scopeStack.length - 1; ; i--) {
  133791. const {
  133792. flags
  133793. } = this.scopeStack[i];
  133794. if (flags & SCOPE_VAR2) {
  133795. return flags;
  133796. }
  133797. }
  133798. }
  133799. currentThisScopeFlags() {
  133800. for (let i = this.scopeStack.length - 1; ; i--) {
  133801. const {
  133802. flags
  133803. } = this.scopeStack[i];
  133804. if (flags & (SCOPE_VAR2 | SCOPE_CLASS) && !(flags & SCOPE_ARROW2)) {
  133805. return flags;
  133806. }
  133807. }
  133808. }
  133809. };
  133810. var FlowScope = class extends Scope4 {
  133811. constructor(...args) {
  133812. super(...args);
  133813. this.declareFunctions = /* @__PURE__ */ new Set();
  133814. }
  133815. };
  133816. var FlowScopeHandler = class extends ScopeHandler {
  133817. createScope(flags) {
  133818. return new FlowScope(flags);
  133819. }
  133820. declareName(name2, bindingType, pos) {
  133821. const scope = this.currentScope();
  133822. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  133823. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  133824. this.maybeExportDefined(scope, name2);
  133825. scope.declareFunctions.add(name2);
  133826. return;
  133827. }
  133828. super.declareName(...arguments);
  133829. }
  133830. isRedeclaredInScope(scope, name2, bindingType) {
  133831. if (super.isRedeclaredInScope(...arguments))
  133832. return true;
  133833. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  133834. return !scope.declareFunctions.has(name2) && (scope.lexical.has(name2) || scope.functions.has(name2));
  133835. }
  133836. return false;
  133837. }
  133838. checkLocalExport(id) {
  133839. if (!this.scopeStack[0].declareFunctions.has(id.name)) {
  133840. super.checkLocalExport(id);
  133841. }
  133842. }
  133843. };
  133844. var reservedTypes = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  133845. var FlowErrors = makeErrorTemplates({
  133846. AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
  133847. AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
  133848. AssignReservedType: "Cannot overwrite reserved type %0.",
  133849. DeclareClassElement: "The `declare` modifier can only appear on class fields.",
  133850. DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
  133851. DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
  133852. EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
  133853. EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
  133854. EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
  133855. EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  133856. EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  133857. EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
  133858. EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
  133859. EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
  133860. EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
  133861. EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
  133862. EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
  133863. GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
  133864. ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
  133865. InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
  133866. InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
  133867. InexactVariance: "Explicit inexact syntax cannot have variance.",
  133868. InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
  133869. MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
  133870. NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
  133871. NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
  133872. OptionalBindingPattern: "A binding pattern parameter cannot be optional in an implementation signature.",
  133873. SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
  133874. SpreadVariance: "Spread properties cannot have variance.",
  133875. ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
  133876. ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
  133877. ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
  133878. ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
  133879. ThisParamNoDefault: "The `this` parameter may not have a default value.",
  133880. TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  133881. TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
  133882. UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
  133883. UnexpectedReservedType: "Unexpected reserved type %0.",
  133884. UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
  133885. UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
  133886. UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
  133887. UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
  133888. UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
  133889. UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
  133890. UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.",
  133891. UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
  133892. UnterminatedFlowComment: "Unterminated flow-comment."
  133893. }, ErrorCodes.SyntaxError);
  133894. function isEsModuleType(bodyElement) {
  133895. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  133896. }
  133897. function hasTypeImportKind(node) {
  133898. return node.importKind === "type" || node.importKind === "typeof";
  133899. }
  133900. function isMaybeDefaultImport(state) {
  133901. return (state.type === types$12.name || !!state.type.keyword) && state.value !== "from";
  133902. }
  133903. var exportSuggestions = {
  133904. const: "declare export var",
  133905. let: "declare export var",
  133906. type: "export type",
  133907. interface: "export interface"
  133908. };
  133909. function partition(list3, test) {
  133910. const list1 = [];
  133911. const list22 = [];
  133912. for (let i = 0; i < list3.length; i++) {
  133913. (test(list3[i], i, list3) ? list1 : list22).push(list3[i]);
  133914. }
  133915. return [list1, list22];
  133916. }
  133917. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  133918. var flow3 = (superClass) => class extends superClass {
  133919. constructor(...args) {
  133920. super(...args);
  133921. this.flowPragma = void 0;
  133922. }
  133923. getScopeHandler() {
  133924. return FlowScopeHandler;
  133925. }
  133926. shouldParseTypes() {
  133927. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  133928. }
  133929. shouldParseEnums() {
  133930. return !!this.getPluginOption("flow", "enums");
  133931. }
  133932. finishToken(type, val) {
  133933. if (type !== types$12.string && type !== types$12.semi && type !== types$12.interpreterDirective) {
  133934. if (this.flowPragma === void 0) {
  133935. this.flowPragma = null;
  133936. }
  133937. }
  133938. return super.finishToken(type, val);
  133939. }
  133940. addComment(comment2) {
  133941. if (this.flowPragma === void 0) {
  133942. const matches = FLOW_PRAGMA_REGEX.exec(comment2.value);
  133943. if (!matches)
  133944. ;
  133945. else if (matches[1] === "flow") {
  133946. this.flowPragma = "flow";
  133947. } else if (matches[1] === "noflow") {
  133948. this.flowPragma = "noflow";
  133949. } else {
  133950. throw new Error("Unexpected flow pragma");
  133951. }
  133952. }
  133953. return super.addComment(comment2);
  133954. }
  133955. flowParseTypeInitialiser(tok) {
  133956. const oldInType = this.state.inType;
  133957. this.state.inType = true;
  133958. this.expect(tok || types$12.colon);
  133959. const type = this.flowParseType();
  133960. this.state.inType = oldInType;
  133961. return type;
  133962. }
  133963. flowParsePredicate() {
  133964. const node = this.startNode();
  133965. const moduloPos = this.state.start;
  133966. this.next();
  133967. this.expectContextual("checks");
  133968. if (this.state.lastTokStart > moduloPos + 1) {
  133969. this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
  133970. }
  133971. if (this.eat(types$12.parenL)) {
  133972. node.value = this.parseExpression();
  133973. this.expect(types$12.parenR);
  133974. return this.finishNode(node, "DeclaredPredicate");
  133975. } else {
  133976. return this.finishNode(node, "InferredPredicate");
  133977. }
  133978. }
  133979. flowParseTypeAndPredicateInitialiser() {
  133980. const oldInType = this.state.inType;
  133981. this.state.inType = true;
  133982. this.expect(types$12.colon);
  133983. let type = null;
  133984. let predicate = null;
  133985. if (this.match(types$12.modulo)) {
  133986. this.state.inType = oldInType;
  133987. predicate = this.flowParsePredicate();
  133988. } else {
  133989. type = this.flowParseType();
  133990. this.state.inType = oldInType;
  133991. if (this.match(types$12.modulo)) {
  133992. predicate = this.flowParsePredicate();
  133993. }
  133994. }
  133995. return [type, predicate];
  133996. }
  133997. flowParseDeclareClass(node) {
  133998. this.next();
  133999. this.flowParseInterfaceish(node, true);
  134000. return this.finishNode(node, "DeclareClass");
  134001. }
  134002. flowParseDeclareFunction(node) {
  134003. this.next();
  134004. const id = node.id = this.parseIdentifier();
  134005. const typeNode = this.startNode();
  134006. const typeContainer = this.startNode();
  134007. if (this.isRelational("<")) {
  134008. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  134009. } else {
  134010. typeNode.typeParameters = null;
  134011. }
  134012. this.expect(types$12.parenL);
  134013. const tmp = this.flowParseFunctionTypeParams();
  134014. typeNode.params = tmp.params;
  134015. typeNode.rest = tmp.rest;
  134016. typeNode.this = tmp._this;
  134017. this.expect(types$12.parenR);
  134018. [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  134019. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  134020. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  134021. this.resetEndLocation(id);
  134022. this.semicolon();
  134023. this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start);
  134024. return this.finishNode(node, "DeclareFunction");
  134025. }
  134026. flowParseDeclare(node, insideModule) {
  134027. if (this.match(types$12._class)) {
  134028. return this.flowParseDeclareClass(node);
  134029. } else if (this.match(types$12._function)) {
  134030. return this.flowParseDeclareFunction(node);
  134031. } else if (this.match(types$12._var)) {
  134032. return this.flowParseDeclareVariable(node);
  134033. } else if (this.eatContextual("module")) {
  134034. if (this.match(types$12.dot)) {
  134035. return this.flowParseDeclareModuleExports(node);
  134036. } else {
  134037. if (insideModule) {
  134038. this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);
  134039. }
  134040. return this.flowParseDeclareModule(node);
  134041. }
  134042. } else if (this.isContextual("type")) {
  134043. return this.flowParseDeclareTypeAlias(node);
  134044. } else if (this.isContextual("opaque")) {
  134045. return this.flowParseDeclareOpaqueType(node);
  134046. } else if (this.isContextual("interface")) {
  134047. return this.flowParseDeclareInterface(node);
  134048. } else if (this.match(types$12._export)) {
  134049. return this.flowParseDeclareExportDeclaration(node, insideModule);
  134050. } else {
  134051. throw this.unexpected();
  134052. }
  134053. }
  134054. flowParseDeclareVariable(node) {
  134055. this.next();
  134056. node.id = this.flowParseTypeAnnotatableIdentifier(true);
  134057. this.scope.declareName(node.id.name, BIND_VAR2, node.id.start);
  134058. this.semicolon();
  134059. return this.finishNode(node, "DeclareVariable");
  134060. }
  134061. flowParseDeclareModule(node) {
  134062. this.scope.enter(SCOPE_OTHER);
  134063. if (this.match(types$12.string)) {
  134064. node.id = this.parseExprAtom();
  134065. } else {
  134066. node.id = this.parseIdentifier();
  134067. }
  134068. const bodyNode = node.body = this.startNode();
  134069. const body = bodyNode.body = [];
  134070. this.expect(types$12.braceL);
  134071. while (!this.match(types$12.braceR)) {
  134072. let bodyNode2 = this.startNode();
  134073. if (this.match(types$12._import)) {
  134074. this.next();
  134075. if (!this.isContextual("type") && !this.match(types$12._typeof)) {
  134076. this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule);
  134077. }
  134078. this.parseImport(bodyNode2);
  134079. } else {
  134080. this.expectContextual("declare", FlowErrors.UnsupportedStatementInDeclareModule);
  134081. bodyNode2 = this.flowParseDeclare(bodyNode2, true);
  134082. }
  134083. body.push(bodyNode2);
  134084. }
  134085. this.scope.exit();
  134086. this.expect(types$12.braceR);
  134087. this.finishNode(bodyNode, "BlockStatement");
  134088. let kind = null;
  134089. let hasModuleExport = false;
  134090. body.forEach((bodyElement) => {
  134091. if (isEsModuleType(bodyElement)) {
  134092. if (kind === "CommonJS") {
  134093. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  134094. }
  134095. kind = "ES";
  134096. } else if (bodyElement.type === "DeclareModuleExports") {
  134097. if (hasModuleExport) {
  134098. this.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports);
  134099. }
  134100. if (kind === "ES") {
  134101. this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  134102. }
  134103. kind = "CommonJS";
  134104. hasModuleExport = true;
  134105. }
  134106. });
  134107. node.kind = kind || "CommonJS";
  134108. return this.finishNode(node, "DeclareModule");
  134109. }
  134110. flowParseDeclareExportDeclaration(node, insideModule) {
  134111. this.expect(types$12._export);
  134112. if (this.eat(types$12._default)) {
  134113. if (this.match(types$12._function) || this.match(types$12._class)) {
  134114. node.declaration = this.flowParseDeclare(this.startNode());
  134115. } else {
  134116. node.declaration = this.flowParseType();
  134117. this.semicolon();
  134118. }
  134119. node.default = true;
  134120. return this.finishNode(node, "DeclareExportDeclaration");
  134121. } else {
  134122. if (this.match(types$12._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
  134123. const label = this.state.value;
  134124. const suggestion = exportSuggestions[label];
  134125. throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion);
  134126. }
  134127. if (this.match(types$12._var) || this.match(types$12._function) || this.match(types$12._class) || this.isContextual("opaque")) {
  134128. node.declaration = this.flowParseDeclare(this.startNode());
  134129. node.default = false;
  134130. return this.finishNode(node, "DeclareExportDeclaration");
  134131. } else if (this.match(types$12.star) || this.match(types$12.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
  134132. node = this.parseExport(node);
  134133. if (node.type === "ExportNamedDeclaration") {
  134134. node.type = "ExportDeclaration";
  134135. node.default = false;
  134136. delete node.exportKind;
  134137. }
  134138. node.type = "Declare" + node.type;
  134139. return node;
  134140. }
  134141. }
  134142. throw this.unexpected();
  134143. }
  134144. flowParseDeclareModuleExports(node) {
  134145. this.next();
  134146. this.expectContextual("exports");
  134147. node.typeAnnotation = this.flowParseTypeAnnotation();
  134148. this.semicolon();
  134149. return this.finishNode(node, "DeclareModuleExports");
  134150. }
  134151. flowParseDeclareTypeAlias(node) {
  134152. this.next();
  134153. this.flowParseTypeAlias(node);
  134154. node.type = "DeclareTypeAlias";
  134155. return node;
  134156. }
  134157. flowParseDeclareOpaqueType(node) {
  134158. this.next();
  134159. this.flowParseOpaqueType(node, true);
  134160. node.type = "DeclareOpaqueType";
  134161. return node;
  134162. }
  134163. flowParseDeclareInterface(node) {
  134164. this.next();
  134165. this.flowParseInterfaceish(node);
  134166. return this.finishNode(node, "DeclareInterface");
  134167. }
  134168. flowParseInterfaceish(node, isClass = false) {
  134169. node.id = this.flowParseRestrictedIdentifier(!isClass, true);
  134170. this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION2 : BIND_LEXICAL2, node.id.start);
  134171. if (this.isRelational("<")) {
  134172. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134173. } else {
  134174. node.typeParameters = null;
  134175. }
  134176. node.extends = [];
  134177. node.implements = [];
  134178. node.mixins = [];
  134179. if (this.eat(types$12._extends)) {
  134180. do {
  134181. node.extends.push(this.flowParseInterfaceExtends());
  134182. } while (!isClass && this.eat(types$12.comma));
  134183. }
  134184. if (this.isContextual("mixins")) {
  134185. this.next();
  134186. do {
  134187. node.mixins.push(this.flowParseInterfaceExtends());
  134188. } while (this.eat(types$12.comma));
  134189. }
  134190. if (this.isContextual("implements")) {
  134191. this.next();
  134192. do {
  134193. node.implements.push(this.flowParseInterfaceExtends());
  134194. } while (this.eat(types$12.comma));
  134195. }
  134196. node.body = this.flowParseObjectType({
  134197. allowStatic: isClass,
  134198. allowExact: false,
  134199. allowSpread: false,
  134200. allowProto: isClass,
  134201. allowInexact: false
  134202. });
  134203. }
  134204. flowParseInterfaceExtends() {
  134205. const node = this.startNode();
  134206. node.id = this.flowParseQualifiedTypeIdentifier();
  134207. if (this.isRelational("<")) {
  134208. node.typeParameters = this.flowParseTypeParameterInstantiation();
  134209. } else {
  134210. node.typeParameters = null;
  134211. }
  134212. return this.finishNode(node, "InterfaceExtends");
  134213. }
  134214. flowParseInterface(node) {
  134215. this.flowParseInterfaceish(node);
  134216. return this.finishNode(node, "InterfaceDeclaration");
  134217. }
  134218. checkNotUnderscore(word) {
  134219. if (word === "_") {
  134220. this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);
  134221. }
  134222. }
  134223. checkReservedType(word, startLoc, declaration) {
  134224. if (!reservedTypes.has(word))
  134225. return;
  134226. this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word);
  134227. }
  134228. flowParseRestrictedIdentifier(liberal, declaration) {
  134229. this.checkReservedType(this.state.value, this.state.start, declaration);
  134230. return this.parseIdentifier(liberal);
  134231. }
  134232. flowParseTypeAlias(node) {
  134233. node.id = this.flowParseRestrictedIdentifier(false, true);
  134234. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  134235. if (this.isRelational("<")) {
  134236. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134237. } else {
  134238. node.typeParameters = null;
  134239. }
  134240. node.right = this.flowParseTypeInitialiser(types$12.eq);
  134241. this.semicolon();
  134242. return this.finishNode(node, "TypeAlias");
  134243. }
  134244. flowParseOpaqueType(node, declare) {
  134245. this.expectContextual("type");
  134246. node.id = this.flowParseRestrictedIdentifier(true, true);
  134247. this.scope.declareName(node.id.name, BIND_LEXICAL2, node.id.start);
  134248. if (this.isRelational("<")) {
  134249. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134250. } else {
  134251. node.typeParameters = null;
  134252. }
  134253. node.supertype = null;
  134254. if (this.match(types$12.colon)) {
  134255. node.supertype = this.flowParseTypeInitialiser(types$12.colon);
  134256. }
  134257. node.impltype = null;
  134258. if (!declare) {
  134259. node.impltype = this.flowParseTypeInitialiser(types$12.eq);
  134260. }
  134261. this.semicolon();
  134262. return this.finishNode(node, "OpaqueType");
  134263. }
  134264. flowParseTypeParameter(requireDefault = false) {
  134265. const nodeStart = this.state.start;
  134266. const node = this.startNode();
  134267. const variance = this.flowParseVariance();
  134268. const ident = this.flowParseTypeAnnotatableIdentifier();
  134269. node.name = ident.name;
  134270. node.variance = variance;
  134271. node.bound = ident.typeAnnotation;
  134272. if (this.match(types$12.eq)) {
  134273. this.eat(types$12.eq);
  134274. node.default = this.flowParseType();
  134275. } else {
  134276. if (requireDefault) {
  134277. this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);
  134278. }
  134279. }
  134280. return this.finishNode(node, "TypeParameter");
  134281. }
  134282. flowParseTypeParameterDeclaration() {
  134283. const oldInType = this.state.inType;
  134284. const node = this.startNode();
  134285. node.params = [];
  134286. this.state.inType = true;
  134287. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  134288. this.next();
  134289. } else {
  134290. this.unexpected();
  134291. }
  134292. let defaultRequired = false;
  134293. do {
  134294. const typeParameter = this.flowParseTypeParameter(defaultRequired);
  134295. node.params.push(typeParameter);
  134296. if (typeParameter.default) {
  134297. defaultRequired = true;
  134298. }
  134299. if (!this.isRelational(">")) {
  134300. this.expect(types$12.comma);
  134301. }
  134302. } while (!this.isRelational(">"));
  134303. this.expectRelational(">");
  134304. this.state.inType = oldInType;
  134305. return this.finishNode(node, "TypeParameterDeclaration");
  134306. }
  134307. flowParseTypeParameterInstantiation() {
  134308. const node = this.startNode();
  134309. const oldInType = this.state.inType;
  134310. node.params = [];
  134311. this.state.inType = true;
  134312. this.expectRelational("<");
  134313. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  134314. this.state.noAnonFunctionType = false;
  134315. while (!this.isRelational(">")) {
  134316. node.params.push(this.flowParseType());
  134317. if (!this.isRelational(">")) {
  134318. this.expect(types$12.comma);
  134319. }
  134320. }
  134321. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  134322. this.expectRelational(">");
  134323. this.state.inType = oldInType;
  134324. return this.finishNode(node, "TypeParameterInstantiation");
  134325. }
  134326. flowParseTypeParameterInstantiationCallOrNew() {
  134327. const node = this.startNode();
  134328. const oldInType = this.state.inType;
  134329. node.params = [];
  134330. this.state.inType = true;
  134331. this.expectRelational("<");
  134332. while (!this.isRelational(">")) {
  134333. node.params.push(this.flowParseTypeOrImplicitInstantiation());
  134334. if (!this.isRelational(">")) {
  134335. this.expect(types$12.comma);
  134336. }
  134337. }
  134338. this.expectRelational(">");
  134339. this.state.inType = oldInType;
  134340. return this.finishNode(node, "TypeParameterInstantiation");
  134341. }
  134342. flowParseInterfaceType() {
  134343. const node = this.startNode();
  134344. this.expectContextual("interface");
  134345. node.extends = [];
  134346. if (this.eat(types$12._extends)) {
  134347. do {
  134348. node.extends.push(this.flowParseInterfaceExtends());
  134349. } while (this.eat(types$12.comma));
  134350. }
  134351. node.body = this.flowParseObjectType({
  134352. allowStatic: false,
  134353. allowExact: false,
  134354. allowSpread: false,
  134355. allowProto: false,
  134356. allowInexact: false
  134357. });
  134358. return this.finishNode(node, "InterfaceTypeAnnotation");
  134359. }
  134360. flowParseObjectPropertyKey() {
  134361. return this.match(types$12.num) || this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  134362. }
  134363. flowParseObjectTypeIndexer(node, isStatic, variance) {
  134364. node.static = isStatic;
  134365. if (this.lookahead().type === types$12.colon) {
  134366. node.id = this.flowParseObjectPropertyKey();
  134367. node.key = this.flowParseTypeInitialiser();
  134368. } else {
  134369. node.id = null;
  134370. node.key = this.flowParseType();
  134371. }
  134372. this.expect(types$12.bracketR);
  134373. node.value = this.flowParseTypeInitialiser();
  134374. node.variance = variance;
  134375. return this.finishNode(node, "ObjectTypeIndexer");
  134376. }
  134377. flowParseObjectTypeInternalSlot(node, isStatic) {
  134378. node.static = isStatic;
  134379. node.id = this.flowParseObjectPropertyKey();
  134380. this.expect(types$12.bracketR);
  134381. this.expect(types$12.bracketR);
  134382. if (this.isRelational("<") || this.match(types$12.parenL)) {
  134383. node.method = true;
  134384. node.optional = false;
  134385. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  134386. } else {
  134387. node.method = false;
  134388. if (this.eat(types$12.question)) {
  134389. node.optional = true;
  134390. }
  134391. node.value = this.flowParseTypeInitialiser();
  134392. }
  134393. return this.finishNode(node, "ObjectTypeInternalSlot");
  134394. }
  134395. flowParseObjectTypeMethodish(node) {
  134396. node.params = [];
  134397. node.rest = null;
  134398. node.typeParameters = null;
  134399. node.this = null;
  134400. if (this.isRelational("<")) {
  134401. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134402. }
  134403. this.expect(types$12.parenL);
  134404. if (this.match(types$12._this)) {
  134405. node.this = this.flowParseFunctionTypeParam(true);
  134406. node.this.name = null;
  134407. if (!this.match(types$12.parenR)) {
  134408. this.expect(types$12.comma);
  134409. }
  134410. }
  134411. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  134412. node.params.push(this.flowParseFunctionTypeParam(false));
  134413. if (!this.match(types$12.parenR)) {
  134414. this.expect(types$12.comma);
  134415. }
  134416. }
  134417. if (this.eat(types$12.ellipsis)) {
  134418. node.rest = this.flowParseFunctionTypeParam(false);
  134419. }
  134420. this.expect(types$12.parenR);
  134421. node.returnType = this.flowParseTypeInitialiser();
  134422. return this.finishNode(node, "FunctionTypeAnnotation");
  134423. }
  134424. flowParseObjectTypeCallProperty(node, isStatic) {
  134425. const valueNode = this.startNode();
  134426. node.static = isStatic;
  134427. node.value = this.flowParseObjectTypeMethodish(valueNode);
  134428. return this.finishNode(node, "ObjectTypeCallProperty");
  134429. }
  134430. flowParseObjectType({
  134431. allowStatic,
  134432. allowExact,
  134433. allowSpread,
  134434. allowProto,
  134435. allowInexact
  134436. }) {
  134437. const oldInType = this.state.inType;
  134438. this.state.inType = true;
  134439. const nodeStart = this.startNode();
  134440. nodeStart.callProperties = [];
  134441. nodeStart.properties = [];
  134442. nodeStart.indexers = [];
  134443. nodeStart.internalSlots = [];
  134444. let endDelim;
  134445. let exact;
  134446. let inexact = false;
  134447. if (allowExact && this.match(types$12.braceBarL)) {
  134448. this.expect(types$12.braceBarL);
  134449. endDelim = types$12.braceBarR;
  134450. exact = true;
  134451. } else {
  134452. this.expect(types$12.braceL);
  134453. endDelim = types$12.braceR;
  134454. exact = false;
  134455. }
  134456. nodeStart.exact = exact;
  134457. while (!this.match(endDelim)) {
  134458. let isStatic = false;
  134459. let protoStart = null;
  134460. let inexactStart = null;
  134461. const node = this.startNode();
  134462. if (allowProto && this.isContextual("proto")) {
  134463. const lookahead2 = this.lookahead();
  134464. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  134465. this.next();
  134466. protoStart = this.state.start;
  134467. allowStatic = false;
  134468. }
  134469. }
  134470. if (allowStatic && this.isContextual("static")) {
  134471. const lookahead2 = this.lookahead();
  134472. if (lookahead2.type !== types$12.colon && lookahead2.type !== types$12.question) {
  134473. this.next();
  134474. isStatic = true;
  134475. }
  134476. }
  134477. const variance = this.flowParseVariance();
  134478. if (this.eat(types$12.bracketL)) {
  134479. if (protoStart != null) {
  134480. this.unexpected(protoStart);
  134481. }
  134482. if (this.eat(types$12.bracketL)) {
  134483. if (variance) {
  134484. this.unexpected(variance.start);
  134485. }
  134486. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
  134487. } else {
  134488. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  134489. }
  134490. } else if (this.match(types$12.parenL) || this.isRelational("<")) {
  134491. if (protoStart != null) {
  134492. this.unexpected(protoStart);
  134493. }
  134494. if (variance) {
  134495. this.unexpected(variance.start);
  134496. }
  134497. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  134498. } else {
  134499. let kind = "init";
  134500. if (this.isContextual("get") || this.isContextual("set")) {
  134501. const lookahead2 = this.lookahead();
  134502. if (lookahead2.type === types$12.name || lookahead2.type === types$12.string || lookahead2.type === types$12.num) {
  134503. kind = this.state.value;
  134504. this.next();
  134505. }
  134506. }
  134507. const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  134508. if (propOrInexact === null) {
  134509. inexact = true;
  134510. inexactStart = this.state.lastTokStart;
  134511. } else {
  134512. nodeStart.properties.push(propOrInexact);
  134513. }
  134514. }
  134515. this.flowObjectTypeSemicolon();
  134516. if (inexactStart && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  134517. this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject);
  134518. }
  134519. }
  134520. this.expect(endDelim);
  134521. if (allowSpread) {
  134522. nodeStart.inexact = inexact;
  134523. }
  134524. const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  134525. this.state.inType = oldInType;
  134526. return out;
  134527. }
  134528. flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
  134529. if (this.eat(types$12.ellipsis)) {
  134530. const isInexactToken = this.match(types$12.comma) || this.match(types$12.semi) || this.match(types$12.braceR) || this.match(types$12.braceBarR);
  134531. if (isInexactToken) {
  134532. if (!allowSpread) {
  134533. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject);
  134534. } else if (!allowInexact) {
  134535. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);
  134536. }
  134537. if (variance) {
  134538. this.raise(variance.start, FlowErrors.InexactVariance);
  134539. }
  134540. return null;
  134541. }
  134542. if (!allowSpread) {
  134543. this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);
  134544. }
  134545. if (protoStart != null) {
  134546. this.unexpected(protoStart);
  134547. }
  134548. if (variance) {
  134549. this.raise(variance.start, FlowErrors.SpreadVariance);
  134550. }
  134551. node.argument = this.flowParseType();
  134552. return this.finishNode(node, "ObjectTypeSpreadProperty");
  134553. } else {
  134554. node.key = this.flowParseObjectPropertyKey();
  134555. node.static = isStatic;
  134556. node.proto = protoStart != null;
  134557. node.kind = kind;
  134558. let optional = false;
  134559. if (this.isRelational("<") || this.match(types$12.parenL)) {
  134560. node.method = true;
  134561. if (protoStart != null) {
  134562. this.unexpected(protoStart);
  134563. }
  134564. if (variance) {
  134565. this.unexpected(variance.start);
  134566. }
  134567. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  134568. if (kind === "get" || kind === "set") {
  134569. this.flowCheckGetterSetterParams(node);
  134570. }
  134571. if (!allowSpread && node.key.name === "constructor" && node.value.this) {
  134572. this.raise(node.value.this.start, FlowErrors.ThisParamBannedInConstructor);
  134573. }
  134574. } else {
  134575. if (kind !== "init")
  134576. this.unexpected();
  134577. node.method = false;
  134578. if (this.eat(types$12.question)) {
  134579. optional = true;
  134580. }
  134581. node.value = this.flowParseTypeInitialiser();
  134582. node.variance = variance;
  134583. }
  134584. node.optional = optional;
  134585. return this.finishNode(node, "ObjectTypeProperty");
  134586. }
  134587. }
  134588. flowCheckGetterSetterParams(property) {
  134589. const paramCount = property.kind === "get" ? 0 : 1;
  134590. const start3 = property.start;
  134591. const length = property.value.params.length + (property.value.rest ? 1 : 0);
  134592. if (property.value.this) {
  134593. this.raise(property.value.this.start, property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam);
  134594. }
  134595. if (length !== paramCount) {
  134596. if (property.kind === "get") {
  134597. this.raise(start3, ErrorMessages.BadGetterArity);
  134598. } else {
  134599. this.raise(start3, ErrorMessages.BadSetterArity);
  134600. }
  134601. }
  134602. if (property.kind === "set" && property.value.rest) {
  134603. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  134604. }
  134605. }
  134606. flowObjectTypeSemicolon() {
  134607. if (!this.eat(types$12.semi) && !this.eat(types$12.comma) && !this.match(types$12.braceR) && !this.match(types$12.braceBarR)) {
  134608. this.unexpected();
  134609. }
  134610. }
  134611. flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
  134612. startPos = startPos || this.state.start;
  134613. startLoc = startLoc || this.state.startLoc;
  134614. let node = id || this.flowParseRestrictedIdentifier(true);
  134615. while (this.eat(types$12.dot)) {
  134616. const node2 = this.startNodeAt(startPos, startLoc);
  134617. node2.qualification = node;
  134618. node2.id = this.flowParseRestrictedIdentifier(true);
  134619. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  134620. }
  134621. return node;
  134622. }
  134623. flowParseGenericType(startPos, startLoc, id) {
  134624. const node = this.startNodeAt(startPos, startLoc);
  134625. node.typeParameters = null;
  134626. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  134627. if (this.isRelational("<")) {
  134628. node.typeParameters = this.flowParseTypeParameterInstantiation();
  134629. }
  134630. return this.finishNode(node, "GenericTypeAnnotation");
  134631. }
  134632. flowParseTypeofType() {
  134633. const node = this.startNode();
  134634. this.expect(types$12._typeof);
  134635. node.argument = this.flowParsePrimaryType();
  134636. return this.finishNode(node, "TypeofTypeAnnotation");
  134637. }
  134638. flowParseTupleType() {
  134639. const node = this.startNode();
  134640. node.types = [];
  134641. this.expect(types$12.bracketL);
  134642. while (this.state.pos < this.length && !this.match(types$12.bracketR)) {
  134643. node.types.push(this.flowParseType());
  134644. if (this.match(types$12.bracketR))
  134645. break;
  134646. this.expect(types$12.comma);
  134647. }
  134648. this.expect(types$12.bracketR);
  134649. return this.finishNode(node, "TupleTypeAnnotation");
  134650. }
  134651. flowParseFunctionTypeParam(first) {
  134652. let name2 = null;
  134653. let optional = false;
  134654. let typeAnnotation = null;
  134655. const node = this.startNode();
  134656. const lh = this.lookahead();
  134657. const isThis = this.state.type === types$12._this;
  134658. if (lh.type === types$12.colon || lh.type === types$12.question) {
  134659. if (isThis && !first) {
  134660. this.raise(node.start, FlowErrors.ThisParamMustBeFirst);
  134661. }
  134662. name2 = this.parseIdentifier(isThis);
  134663. if (this.eat(types$12.question)) {
  134664. optional = true;
  134665. if (isThis) {
  134666. this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional);
  134667. }
  134668. }
  134669. typeAnnotation = this.flowParseTypeInitialiser();
  134670. } else {
  134671. typeAnnotation = this.flowParseType();
  134672. }
  134673. node.name = name2;
  134674. node.optional = optional;
  134675. node.typeAnnotation = typeAnnotation;
  134676. return this.finishNode(node, "FunctionTypeParam");
  134677. }
  134678. reinterpretTypeAsFunctionTypeParam(type) {
  134679. const node = this.startNodeAt(type.start, type.loc.start);
  134680. node.name = null;
  134681. node.optional = false;
  134682. node.typeAnnotation = type;
  134683. return this.finishNode(node, "FunctionTypeParam");
  134684. }
  134685. flowParseFunctionTypeParams(params = []) {
  134686. let rest = null;
  134687. let _this = null;
  134688. if (this.match(types$12._this)) {
  134689. _this = this.flowParseFunctionTypeParam(true);
  134690. _this.name = null;
  134691. if (!this.match(types$12.parenR)) {
  134692. this.expect(types$12.comma);
  134693. }
  134694. }
  134695. while (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  134696. params.push(this.flowParseFunctionTypeParam(false));
  134697. if (!this.match(types$12.parenR)) {
  134698. this.expect(types$12.comma);
  134699. }
  134700. }
  134701. if (this.eat(types$12.ellipsis)) {
  134702. rest = this.flowParseFunctionTypeParam(false);
  134703. }
  134704. return {
  134705. params,
  134706. rest,
  134707. _this
  134708. };
  134709. }
  134710. flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
  134711. switch (id.name) {
  134712. case "any":
  134713. return this.finishNode(node, "AnyTypeAnnotation");
  134714. case "bool":
  134715. case "boolean":
  134716. return this.finishNode(node, "BooleanTypeAnnotation");
  134717. case "mixed":
  134718. return this.finishNode(node, "MixedTypeAnnotation");
  134719. case "empty":
  134720. return this.finishNode(node, "EmptyTypeAnnotation");
  134721. case "number":
  134722. return this.finishNode(node, "NumberTypeAnnotation");
  134723. case "string":
  134724. return this.finishNode(node, "StringTypeAnnotation");
  134725. case "symbol":
  134726. return this.finishNode(node, "SymbolTypeAnnotation");
  134727. default:
  134728. this.checkNotUnderscore(id.name);
  134729. return this.flowParseGenericType(startPos, startLoc, id);
  134730. }
  134731. }
  134732. flowParsePrimaryType() {
  134733. const startPos = this.state.start;
  134734. const startLoc = this.state.startLoc;
  134735. const node = this.startNode();
  134736. let tmp;
  134737. let type;
  134738. let isGroupedType = false;
  134739. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  134740. switch (this.state.type) {
  134741. case types$12.name:
  134742. if (this.isContextual("interface")) {
  134743. return this.flowParseInterfaceType();
  134744. }
  134745. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  134746. case types$12.braceL:
  134747. return this.flowParseObjectType({
  134748. allowStatic: false,
  134749. allowExact: false,
  134750. allowSpread: true,
  134751. allowProto: false,
  134752. allowInexact: true
  134753. });
  134754. case types$12.braceBarL:
  134755. return this.flowParseObjectType({
  134756. allowStatic: false,
  134757. allowExact: true,
  134758. allowSpread: true,
  134759. allowProto: false,
  134760. allowInexact: false
  134761. });
  134762. case types$12.bracketL:
  134763. this.state.noAnonFunctionType = false;
  134764. type = this.flowParseTupleType();
  134765. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  134766. return type;
  134767. case types$12.relational:
  134768. if (this.state.value === "<") {
  134769. node.typeParameters = this.flowParseTypeParameterDeclaration();
  134770. this.expect(types$12.parenL);
  134771. tmp = this.flowParseFunctionTypeParams();
  134772. node.params = tmp.params;
  134773. node.rest = tmp.rest;
  134774. node.this = tmp._this;
  134775. this.expect(types$12.parenR);
  134776. this.expect(types$12.arrow);
  134777. node.returnType = this.flowParseType();
  134778. return this.finishNode(node, "FunctionTypeAnnotation");
  134779. }
  134780. break;
  134781. case types$12.parenL:
  134782. this.next();
  134783. if (!this.match(types$12.parenR) && !this.match(types$12.ellipsis)) {
  134784. if (this.match(types$12.name) || this.match(types$12._this)) {
  134785. const token = this.lookahead().type;
  134786. isGroupedType = token !== types$12.question && token !== types$12.colon;
  134787. } else {
  134788. isGroupedType = true;
  134789. }
  134790. }
  134791. if (isGroupedType) {
  134792. this.state.noAnonFunctionType = false;
  134793. type = this.flowParseType();
  134794. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  134795. if (this.state.noAnonFunctionType || !(this.match(types$12.comma) || this.match(types$12.parenR) && this.lookahead().type === types$12.arrow)) {
  134796. this.expect(types$12.parenR);
  134797. return type;
  134798. } else {
  134799. this.eat(types$12.comma);
  134800. }
  134801. }
  134802. if (type) {
  134803. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  134804. } else {
  134805. tmp = this.flowParseFunctionTypeParams();
  134806. }
  134807. node.params = tmp.params;
  134808. node.rest = tmp.rest;
  134809. node.this = tmp._this;
  134810. this.expect(types$12.parenR);
  134811. this.expect(types$12.arrow);
  134812. node.returnType = this.flowParseType();
  134813. node.typeParameters = null;
  134814. return this.finishNode(node, "FunctionTypeAnnotation");
  134815. case types$12.string:
  134816. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  134817. case types$12._true:
  134818. case types$12._false:
  134819. node.value = this.match(types$12._true);
  134820. this.next();
  134821. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  134822. case types$12.plusMin:
  134823. if (this.state.value === "-") {
  134824. this.next();
  134825. if (this.match(types$12.num)) {
  134826. return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
  134827. }
  134828. if (this.match(types$12.bigint)) {
  134829. return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
  134830. }
  134831. throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand);
  134832. }
  134833. throw this.unexpected();
  134834. case types$12.num:
  134835. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  134836. case types$12.bigint:
  134837. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  134838. case types$12._void:
  134839. this.next();
  134840. return this.finishNode(node, "VoidTypeAnnotation");
  134841. case types$12._null:
  134842. this.next();
  134843. return this.finishNode(node, "NullLiteralTypeAnnotation");
  134844. case types$12._this:
  134845. this.next();
  134846. return this.finishNode(node, "ThisTypeAnnotation");
  134847. case types$12.star:
  134848. this.next();
  134849. return this.finishNode(node, "ExistsTypeAnnotation");
  134850. default:
  134851. if (this.state.type.keyword === "typeof") {
  134852. return this.flowParseTypeofType();
  134853. } else if (this.state.type.keyword) {
  134854. const label = this.state.type.label;
  134855. this.next();
  134856. return super.createIdentifier(node, label);
  134857. }
  134858. }
  134859. throw this.unexpected();
  134860. }
  134861. flowParsePostfixType() {
  134862. const startPos = this.state.start;
  134863. const startLoc = this.state.startLoc;
  134864. let type = this.flowParsePrimaryType();
  134865. let seenOptionalIndexedAccess = false;
  134866. while ((this.match(types$12.bracketL) || this.match(types$12.questionDot)) && !this.canInsertSemicolon()) {
  134867. const node = this.startNodeAt(startPos, startLoc);
  134868. const optional = this.eat(types$12.questionDot);
  134869. seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
  134870. this.expect(types$12.bracketL);
  134871. if (!optional && this.match(types$12.bracketR)) {
  134872. node.elementType = type;
  134873. this.next();
  134874. type = this.finishNode(node, "ArrayTypeAnnotation");
  134875. } else {
  134876. node.objectType = type;
  134877. node.indexType = this.flowParseType();
  134878. this.expect(types$12.bracketR);
  134879. if (seenOptionalIndexedAccess) {
  134880. node.optional = optional;
  134881. type = this.finishNode(node, "OptionalIndexedAccessType");
  134882. } else {
  134883. type = this.finishNode(node, "IndexedAccessType");
  134884. }
  134885. }
  134886. }
  134887. return type;
  134888. }
  134889. flowParsePrefixType() {
  134890. const node = this.startNode();
  134891. if (this.eat(types$12.question)) {
  134892. node.typeAnnotation = this.flowParsePrefixType();
  134893. return this.finishNode(node, "NullableTypeAnnotation");
  134894. } else {
  134895. return this.flowParsePostfixType();
  134896. }
  134897. }
  134898. flowParseAnonFunctionWithoutParens() {
  134899. const param = this.flowParsePrefixType();
  134900. if (!this.state.noAnonFunctionType && this.eat(types$12.arrow)) {
  134901. const node = this.startNodeAt(param.start, param.loc.start);
  134902. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  134903. node.rest = null;
  134904. node.this = null;
  134905. node.returnType = this.flowParseType();
  134906. node.typeParameters = null;
  134907. return this.finishNode(node, "FunctionTypeAnnotation");
  134908. }
  134909. return param;
  134910. }
  134911. flowParseIntersectionType() {
  134912. const node = this.startNode();
  134913. this.eat(types$12.bitwiseAND);
  134914. const type = this.flowParseAnonFunctionWithoutParens();
  134915. node.types = [type];
  134916. while (this.eat(types$12.bitwiseAND)) {
  134917. node.types.push(this.flowParseAnonFunctionWithoutParens());
  134918. }
  134919. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  134920. }
  134921. flowParseUnionType() {
  134922. const node = this.startNode();
  134923. this.eat(types$12.bitwiseOR);
  134924. const type = this.flowParseIntersectionType();
  134925. node.types = [type];
  134926. while (this.eat(types$12.bitwiseOR)) {
  134927. node.types.push(this.flowParseIntersectionType());
  134928. }
  134929. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  134930. }
  134931. flowParseType() {
  134932. const oldInType = this.state.inType;
  134933. this.state.inType = true;
  134934. const type = this.flowParseUnionType();
  134935. this.state.inType = oldInType;
  134936. return type;
  134937. }
  134938. flowParseTypeOrImplicitInstantiation() {
  134939. if (this.state.type === types$12.name && this.state.value === "_") {
  134940. const startPos = this.state.start;
  134941. const startLoc = this.state.startLoc;
  134942. const node = this.parseIdentifier();
  134943. return this.flowParseGenericType(startPos, startLoc, node);
  134944. } else {
  134945. return this.flowParseType();
  134946. }
  134947. }
  134948. flowParseTypeAnnotation() {
  134949. const node = this.startNode();
  134950. node.typeAnnotation = this.flowParseTypeInitialiser();
  134951. return this.finishNode(node, "TypeAnnotation");
  134952. }
  134953. flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  134954. const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  134955. if (this.match(types$12.colon)) {
  134956. ident.typeAnnotation = this.flowParseTypeAnnotation();
  134957. this.resetEndLocation(ident);
  134958. }
  134959. return ident;
  134960. }
  134961. typeCastToParameter(node) {
  134962. node.expression.typeAnnotation = node.typeAnnotation;
  134963. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  134964. return node.expression;
  134965. }
  134966. flowParseVariance() {
  134967. let variance = null;
  134968. if (this.match(types$12.plusMin)) {
  134969. variance = this.startNode();
  134970. if (this.state.value === "+") {
  134971. variance.kind = "plus";
  134972. } else {
  134973. variance.kind = "minus";
  134974. }
  134975. this.next();
  134976. this.finishNode(variance, "Variance");
  134977. }
  134978. return variance;
  134979. }
  134980. parseFunctionBody(node, allowExpressionBody, isMethod = false) {
  134981. if (allowExpressionBody) {
  134982. return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
  134983. }
  134984. return super.parseFunctionBody(node, false, isMethod);
  134985. }
  134986. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  134987. if (this.match(types$12.colon)) {
  134988. const typeNode = this.startNode();
  134989. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  134990. node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  134991. }
  134992. super.parseFunctionBodyAndFinish(node, type, isMethod);
  134993. }
  134994. parseStatement(context, topLevel) {
  134995. if (this.state.strict && this.match(types$12.name) && this.state.value === "interface") {
  134996. const lookahead2 = this.lookahead();
  134997. if (lookahead2.type === types$12.name || isKeyword(lookahead2.value)) {
  134998. const node = this.startNode();
  134999. this.next();
  135000. return this.flowParseInterface(node);
  135001. }
  135002. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  135003. const node = this.startNode();
  135004. this.next();
  135005. return this.flowParseEnumDeclaration(node);
  135006. }
  135007. const stmt = super.parseStatement(context, topLevel);
  135008. if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) {
  135009. this.flowPragma = null;
  135010. }
  135011. return stmt;
  135012. }
  135013. parseExpressionStatement(node, expr) {
  135014. if (expr.type === "Identifier") {
  135015. if (expr.name === "declare") {
  135016. if (this.match(types$12._class) || this.match(types$12.name) || this.match(types$12._function) || this.match(types$12._var) || this.match(types$12._export)) {
  135017. return this.flowParseDeclare(node);
  135018. }
  135019. } else if (this.match(types$12.name)) {
  135020. if (expr.name === "interface") {
  135021. return this.flowParseInterface(node);
  135022. } else if (expr.name === "type") {
  135023. return this.flowParseTypeAlias(node);
  135024. } else if (expr.name === "opaque") {
  135025. return this.flowParseOpaqueType(node, false);
  135026. }
  135027. }
  135028. }
  135029. return super.parseExpressionStatement(node, expr);
  135030. }
  135031. shouldParseExportDeclaration() {
  135032. return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || super.shouldParseExportDeclaration();
  135033. }
  135034. isExportDefaultSpecifier() {
  135035. if (this.match(types$12.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
  135036. return false;
  135037. }
  135038. return super.isExportDefaultSpecifier();
  135039. }
  135040. parseExportDefaultExpression() {
  135041. if (this.shouldParseEnums() && this.isContextual("enum")) {
  135042. const node = this.startNode();
  135043. this.next();
  135044. return this.flowParseEnumDeclaration(node);
  135045. }
  135046. return super.parseExportDefaultExpression();
  135047. }
  135048. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  135049. if (!this.match(types$12.question))
  135050. return expr;
  135051. if (refNeedsArrowPos) {
  135052. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  135053. if (!result.node) {
  135054. refNeedsArrowPos.start = result.error.pos || this.state.start;
  135055. return expr;
  135056. }
  135057. if (result.error)
  135058. this.state = result.failState;
  135059. return result.node;
  135060. }
  135061. this.expect(types$12.question);
  135062. const state = this.state.clone();
  135063. const originalNoArrowAt = this.state.noArrowAt;
  135064. const node = this.startNodeAt(startPos, startLoc);
  135065. let {
  135066. consequent,
  135067. failed
  135068. } = this.tryParseConditionalConsequent();
  135069. let [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  135070. if (failed || invalid2.length > 0) {
  135071. const noArrowAt = [...originalNoArrowAt];
  135072. if (invalid2.length > 0) {
  135073. this.state = state;
  135074. this.state.noArrowAt = noArrowAt;
  135075. for (let i = 0; i < invalid2.length; i++) {
  135076. noArrowAt.push(invalid2[i].start);
  135077. }
  135078. ({
  135079. consequent,
  135080. failed
  135081. } = this.tryParseConditionalConsequent());
  135082. [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  135083. }
  135084. if (failed && valid2.length > 1) {
  135085. this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);
  135086. }
  135087. if (failed && valid2.length === 1) {
  135088. this.state = state;
  135089. this.state.noArrowAt = noArrowAt.concat(valid2[0].start);
  135090. ({
  135091. consequent,
  135092. failed
  135093. } = this.tryParseConditionalConsequent());
  135094. }
  135095. }
  135096. this.getArrowLikeExpressions(consequent, true);
  135097. this.state.noArrowAt = originalNoArrowAt;
  135098. this.expect(types$12.colon);
  135099. node.test = expr;
  135100. node.consequent = consequent;
  135101. node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(void 0, void 0, void 0));
  135102. return this.finishNode(node, "ConditionalExpression");
  135103. }
  135104. tryParseConditionalConsequent() {
  135105. this.state.noArrowParamsConversionAt.push(this.state.start);
  135106. const consequent = this.parseMaybeAssignAllowIn();
  135107. const failed = !this.match(types$12.colon);
  135108. this.state.noArrowParamsConversionAt.pop();
  135109. return {
  135110. consequent,
  135111. failed
  135112. };
  135113. }
  135114. getArrowLikeExpressions(node, disallowInvalid) {
  135115. const stack = [node];
  135116. const arrows = [];
  135117. while (stack.length !== 0) {
  135118. const node2 = stack.pop();
  135119. if (node2.type === "ArrowFunctionExpression") {
  135120. if (node2.typeParameters || !node2.returnType) {
  135121. this.finishArrowValidation(node2);
  135122. } else {
  135123. arrows.push(node2);
  135124. }
  135125. stack.push(node2.body);
  135126. } else if (node2.type === "ConditionalExpression") {
  135127. stack.push(node2.consequent);
  135128. stack.push(node2.alternate);
  135129. }
  135130. }
  135131. if (disallowInvalid) {
  135132. arrows.forEach((node2) => this.finishArrowValidation(node2));
  135133. return [arrows, []];
  135134. }
  135135. return partition(arrows, (node2) => node2.params.every((param) => this.isAssignable(param, true)));
  135136. }
  135137. finishArrowValidation(node) {
  135138. var _node$extra;
  135139. this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false);
  135140. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  135141. super.checkParams(node, false, true);
  135142. this.scope.exit();
  135143. }
  135144. forwardNoArrowParamsConversionAt(node, parse5) {
  135145. let result;
  135146. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  135147. this.state.noArrowParamsConversionAt.push(this.state.start);
  135148. result = parse5();
  135149. this.state.noArrowParamsConversionAt.pop();
  135150. } else {
  135151. result = parse5();
  135152. }
  135153. return result;
  135154. }
  135155. parseParenItem(node, startPos, startLoc) {
  135156. node = super.parseParenItem(node, startPos, startLoc);
  135157. if (this.eat(types$12.question)) {
  135158. node.optional = true;
  135159. this.resetEndLocation(node);
  135160. }
  135161. if (this.match(types$12.colon)) {
  135162. const typeCastNode = this.startNodeAt(startPos, startLoc);
  135163. typeCastNode.expression = node;
  135164. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  135165. return this.finishNode(typeCastNode, "TypeCastExpression");
  135166. }
  135167. return node;
  135168. }
  135169. assertModuleNodeAllowed(node) {
  135170. if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
  135171. return;
  135172. }
  135173. super.assertModuleNodeAllowed(node);
  135174. }
  135175. parseExport(node) {
  135176. const decl = super.parseExport(node);
  135177. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  135178. decl.exportKind = decl.exportKind || "value";
  135179. }
  135180. return decl;
  135181. }
  135182. parseExportDeclaration(node) {
  135183. if (this.isContextual("type")) {
  135184. node.exportKind = "type";
  135185. const declarationNode = this.startNode();
  135186. this.next();
  135187. if (this.match(types$12.braceL)) {
  135188. node.specifiers = this.parseExportSpecifiers();
  135189. this.parseExportFrom(node);
  135190. return null;
  135191. } else {
  135192. return this.flowParseTypeAlias(declarationNode);
  135193. }
  135194. } else if (this.isContextual("opaque")) {
  135195. node.exportKind = "type";
  135196. const declarationNode = this.startNode();
  135197. this.next();
  135198. return this.flowParseOpaqueType(declarationNode, false);
  135199. } else if (this.isContextual("interface")) {
  135200. node.exportKind = "type";
  135201. const declarationNode = this.startNode();
  135202. this.next();
  135203. return this.flowParseInterface(declarationNode);
  135204. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  135205. node.exportKind = "value";
  135206. const declarationNode = this.startNode();
  135207. this.next();
  135208. return this.flowParseEnumDeclaration(declarationNode);
  135209. } else {
  135210. return super.parseExportDeclaration(node);
  135211. }
  135212. }
  135213. eatExportStar(node) {
  135214. if (super.eatExportStar(...arguments))
  135215. return true;
  135216. if (this.isContextual("type") && this.lookahead().type === types$12.star) {
  135217. node.exportKind = "type";
  135218. this.next();
  135219. this.next();
  135220. return true;
  135221. }
  135222. return false;
  135223. }
  135224. maybeParseExportNamespaceSpecifier(node) {
  135225. const pos = this.state.start;
  135226. const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
  135227. if (hasNamespace && node.exportKind === "type") {
  135228. this.unexpected(pos);
  135229. }
  135230. return hasNamespace;
  135231. }
  135232. parseClassId(node, isStatement, optionalId) {
  135233. super.parseClassId(node, isStatement, optionalId);
  135234. if (this.isRelational("<")) {
  135235. node.typeParameters = this.flowParseTypeParameterDeclaration();
  135236. }
  135237. }
  135238. parseClassMember(classBody, member, state) {
  135239. const pos = this.state.start;
  135240. if (this.isContextual("declare")) {
  135241. if (this.parseClassMemberFromModifier(classBody, member)) {
  135242. return;
  135243. }
  135244. member.declare = true;
  135245. }
  135246. super.parseClassMember(classBody, member, state);
  135247. if (member.declare) {
  135248. if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
  135249. this.raise(pos, FlowErrors.DeclareClassElement);
  135250. } else if (member.value) {
  135251. this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer);
  135252. }
  135253. }
  135254. }
  135255. isIterator(word) {
  135256. return word === "iterator" || word === "asyncIterator";
  135257. }
  135258. readIterator() {
  135259. const word = super.readWord1();
  135260. const fullWord = "@@" + word;
  135261. if (!this.isIterator(word) || !this.state.inType) {
  135262. this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, fullWord);
  135263. }
  135264. this.finishToken(types$12.name, fullWord);
  135265. }
  135266. getTokenFromCode(code2) {
  135267. const next = this.input.charCodeAt(this.state.pos + 1);
  135268. if (code2 === 123 && next === 124) {
  135269. return this.finishOp(types$12.braceBarL, 2);
  135270. } else if (this.state.inType && (code2 === 62 || code2 === 60)) {
  135271. return this.finishOp(types$12.relational, 1);
  135272. } else if (this.state.inType && code2 === 63) {
  135273. if (next === 46) {
  135274. return this.finishOp(types$12.questionDot, 2);
  135275. }
  135276. return this.finishOp(types$12.question, 1);
  135277. } else if (isIteratorStart(code2, next)) {
  135278. this.state.pos += 2;
  135279. return this.readIterator();
  135280. } else {
  135281. return super.getTokenFromCode(code2);
  135282. }
  135283. }
  135284. isAssignable(node, isBinding) {
  135285. switch (node.type) {
  135286. case "Identifier":
  135287. case "ObjectPattern":
  135288. case "ArrayPattern":
  135289. case "AssignmentPattern":
  135290. return true;
  135291. case "ObjectExpression": {
  135292. const last2 = node.properties.length - 1;
  135293. return node.properties.every((prop, i) => {
  135294. return prop.type !== "ObjectMethod" && (i === last2 || prop.type === "SpreadElement") && this.isAssignable(prop);
  135295. });
  135296. }
  135297. case "ObjectProperty":
  135298. return this.isAssignable(node.value);
  135299. case "SpreadElement":
  135300. return this.isAssignable(node.argument);
  135301. case "ArrayExpression":
  135302. return node.elements.every((element2) => this.isAssignable(element2));
  135303. case "AssignmentExpression":
  135304. return node.operator === "=";
  135305. case "ParenthesizedExpression":
  135306. case "TypeCastExpression":
  135307. return this.isAssignable(node.expression);
  135308. case "MemberExpression":
  135309. case "OptionalMemberExpression":
  135310. return !isBinding;
  135311. default:
  135312. return false;
  135313. }
  135314. }
  135315. toAssignable(node, isLHS = false) {
  135316. if (node.type === "TypeCastExpression") {
  135317. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  135318. } else {
  135319. return super.toAssignable(node, isLHS);
  135320. }
  135321. }
  135322. toAssignableList(exprList, trailingCommaPos, isLHS) {
  135323. for (let i = 0; i < exprList.length; i++) {
  135324. const expr = exprList[i];
  135325. if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
  135326. exprList[i] = this.typeCastToParameter(expr);
  135327. }
  135328. }
  135329. return super.toAssignableList(exprList, trailingCommaPos, isLHS);
  135330. }
  135331. toReferencedList(exprList, isParenthesizedExpr) {
  135332. for (let i = 0; i < exprList.length; i++) {
  135333. var _expr$extra;
  135334. const expr = exprList[i];
  135335. if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  135336. this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);
  135337. }
  135338. }
  135339. return exprList;
  135340. }
  135341. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  135342. const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
  135343. if (canBePattern && !this.state.maybeInArrowParameters) {
  135344. this.toReferencedList(node.elements);
  135345. }
  135346. return node;
  135347. }
  135348. checkLVal(expr, ...args) {
  135349. if (expr.type !== "TypeCastExpression") {
  135350. return super.checkLVal(expr, ...args);
  135351. }
  135352. }
  135353. parseClassProperty(node) {
  135354. if (this.match(types$12.colon)) {
  135355. node.typeAnnotation = this.flowParseTypeAnnotation();
  135356. }
  135357. return super.parseClassProperty(node);
  135358. }
  135359. parseClassPrivateProperty(node) {
  135360. if (this.match(types$12.colon)) {
  135361. node.typeAnnotation = this.flowParseTypeAnnotation();
  135362. }
  135363. return super.parseClassPrivateProperty(node);
  135364. }
  135365. isClassMethod() {
  135366. return this.isRelational("<") || super.isClassMethod();
  135367. }
  135368. isClassProperty() {
  135369. return this.match(types$12.colon) || super.isClassProperty();
  135370. }
  135371. isNonstaticConstructor(method) {
  135372. return !this.match(types$12.colon) && super.isNonstaticConstructor(method);
  135373. }
  135374. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  135375. if (method.variance) {
  135376. this.unexpected(method.variance.start);
  135377. }
  135378. delete method.variance;
  135379. if (this.isRelational("<")) {
  135380. method.typeParameters = this.flowParseTypeParameterDeclaration();
  135381. }
  135382. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  135383. if (method.params && isConstructor) {
  135384. const params = method.params;
  135385. if (params.length > 0 && this.isThisParam(params[0])) {
  135386. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  135387. }
  135388. } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
  135389. const params = method.value.params;
  135390. if (params.length > 0 && this.isThisParam(params[0])) {
  135391. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  135392. }
  135393. }
  135394. }
  135395. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  135396. if (method.variance) {
  135397. this.unexpected(method.variance.start);
  135398. }
  135399. delete method.variance;
  135400. if (this.isRelational("<")) {
  135401. method.typeParameters = this.flowParseTypeParameterDeclaration();
  135402. }
  135403. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  135404. }
  135405. parseClassSuper(node) {
  135406. super.parseClassSuper(node);
  135407. if (node.superClass && this.isRelational("<")) {
  135408. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  135409. }
  135410. if (this.isContextual("implements")) {
  135411. this.next();
  135412. const implemented = node.implements = [];
  135413. do {
  135414. const node2 = this.startNode();
  135415. node2.id = this.flowParseRestrictedIdentifier(true);
  135416. if (this.isRelational("<")) {
  135417. node2.typeParameters = this.flowParseTypeParameterInstantiation();
  135418. } else {
  135419. node2.typeParameters = null;
  135420. }
  135421. implemented.push(this.finishNode(node2, "ClassImplements"));
  135422. } while (this.eat(types$12.comma));
  135423. }
  135424. }
  135425. checkGetterSetterParams(method) {
  135426. super.checkGetterSetterParams(method);
  135427. const params = this.getObjectOrClassMethodParams(method);
  135428. if (params.length > 0) {
  135429. const param = params[0];
  135430. if (this.isThisParam(param) && method.kind === "get") {
  135431. this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam);
  135432. } else if (this.isThisParam(param)) {
  135433. this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam);
  135434. }
  135435. }
  135436. }
  135437. parsePropertyName(node, isPrivateNameAllowed) {
  135438. const variance = this.flowParseVariance();
  135439. const key = super.parsePropertyName(node, isPrivateNameAllowed);
  135440. node.variance = variance;
  135441. return key;
  135442. }
  135443. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  135444. if (prop.variance) {
  135445. this.unexpected(prop.variance.start);
  135446. }
  135447. delete prop.variance;
  135448. let typeParameters;
  135449. if (this.isRelational("<") && !isAccessor) {
  135450. typeParameters = this.flowParseTypeParameterDeclaration();
  135451. if (!this.match(types$12.parenL))
  135452. this.unexpected();
  135453. }
  135454. super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  135455. if (typeParameters) {
  135456. (prop.value || prop).typeParameters = typeParameters;
  135457. }
  135458. }
  135459. parseAssignableListItemTypes(param) {
  135460. if (this.eat(types$12.question)) {
  135461. if (param.type !== "Identifier") {
  135462. this.raise(param.start, FlowErrors.OptionalBindingPattern);
  135463. }
  135464. if (this.isThisParam(param)) {
  135465. this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional);
  135466. }
  135467. param.optional = true;
  135468. }
  135469. if (this.match(types$12.colon)) {
  135470. param.typeAnnotation = this.flowParseTypeAnnotation();
  135471. } else if (this.isThisParam(param)) {
  135472. this.raise(param.start, FlowErrors.ThisParamAnnotationRequired);
  135473. }
  135474. if (this.match(types$12.eq) && this.isThisParam(param)) {
  135475. this.raise(param.start, FlowErrors.ThisParamNoDefault);
  135476. }
  135477. this.resetEndLocation(param);
  135478. return param;
  135479. }
  135480. parseMaybeDefault(startPos, startLoc, left) {
  135481. const node = super.parseMaybeDefault(startPos, startLoc, left);
  135482. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  135483. this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);
  135484. }
  135485. return node;
  135486. }
  135487. shouldParseDefaultImport(node) {
  135488. if (!hasTypeImportKind(node)) {
  135489. return super.shouldParseDefaultImport(node);
  135490. }
  135491. return isMaybeDefaultImport(this.state);
  135492. }
  135493. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  135494. specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  135495. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  135496. node.specifiers.push(this.finishNode(specifier, type));
  135497. }
  135498. maybeParseDefaultImportSpecifier(node) {
  135499. node.importKind = "value";
  135500. let kind = null;
  135501. if (this.match(types$12._typeof)) {
  135502. kind = "typeof";
  135503. } else if (this.isContextual("type")) {
  135504. kind = "type";
  135505. }
  135506. if (kind) {
  135507. const lh = this.lookahead();
  135508. if (kind === "type" && lh.type === types$12.star) {
  135509. this.unexpected(lh.start);
  135510. }
  135511. if (isMaybeDefaultImport(lh) || lh.type === types$12.braceL || lh.type === types$12.star) {
  135512. this.next();
  135513. node.importKind = kind;
  135514. }
  135515. }
  135516. return super.maybeParseDefaultImportSpecifier(node);
  135517. }
  135518. parseImportSpecifier(node) {
  135519. const specifier = this.startNode();
  135520. const firstIdentIsString = this.match(types$12.string);
  135521. const firstIdent = this.parseModuleExportName();
  135522. let specifierTypeKind = null;
  135523. if (firstIdent.type === "Identifier") {
  135524. if (firstIdent.name === "type") {
  135525. specifierTypeKind = "type";
  135526. } else if (firstIdent.name === "typeof") {
  135527. specifierTypeKind = "typeof";
  135528. }
  135529. }
  135530. let isBinding = false;
  135531. if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
  135532. const as_ident = this.parseIdentifier(true);
  135533. if (specifierTypeKind !== null && !this.match(types$12.name) && !this.state.type.keyword) {
  135534. specifier.imported = as_ident;
  135535. specifier.importKind = specifierTypeKind;
  135536. specifier.local = as_ident.__clone();
  135537. } else {
  135538. specifier.imported = firstIdent;
  135539. specifier.importKind = null;
  135540. specifier.local = this.parseIdentifier();
  135541. }
  135542. } else if (specifierTypeKind !== null && (this.match(types$12.name) || this.state.type.keyword)) {
  135543. specifier.imported = this.parseIdentifier(true);
  135544. specifier.importKind = specifierTypeKind;
  135545. if (this.eatContextual("as")) {
  135546. specifier.local = this.parseIdentifier();
  135547. } else {
  135548. isBinding = true;
  135549. specifier.local = specifier.imported.__clone();
  135550. }
  135551. } else {
  135552. if (firstIdentIsString) {
  135553. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value);
  135554. }
  135555. isBinding = true;
  135556. specifier.imported = firstIdent;
  135557. specifier.importKind = null;
  135558. specifier.local = specifier.imported.__clone();
  135559. }
  135560. const nodeIsTypeImport = hasTypeImportKind(node);
  135561. const specifierIsTypeImport = hasTypeImportKind(specifier);
  135562. if (nodeIsTypeImport && specifierIsTypeImport) {
  135563. this.raise(specifier.start, FlowErrors.ImportTypeShorthandOnlyInPureImport);
  135564. }
  135565. if (nodeIsTypeImport || specifierIsTypeImport) {
  135566. this.checkReservedType(specifier.local.name, specifier.local.start, true);
  135567. }
  135568. if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
  135569. this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  135570. }
  135571. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  135572. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  135573. }
  135574. parseBindingAtom() {
  135575. switch (this.state.type) {
  135576. case types$12._this:
  135577. return this.parseIdentifier(true);
  135578. default:
  135579. return super.parseBindingAtom();
  135580. }
  135581. }
  135582. parseFunctionParams(node, allowModifiers) {
  135583. const kind = node.kind;
  135584. if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
  135585. node.typeParameters = this.flowParseTypeParameterDeclaration();
  135586. }
  135587. super.parseFunctionParams(node, allowModifiers);
  135588. }
  135589. parseVarId(decl, kind) {
  135590. super.parseVarId(decl, kind);
  135591. if (this.match(types$12.colon)) {
  135592. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  135593. this.resetEndLocation(decl.id);
  135594. }
  135595. }
  135596. parseAsyncArrowFromCallExpression(node, call) {
  135597. if (this.match(types$12.colon)) {
  135598. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  135599. this.state.noAnonFunctionType = true;
  135600. node.returnType = this.flowParseTypeAnnotation();
  135601. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  135602. }
  135603. return super.parseAsyncArrowFromCallExpression(node, call);
  135604. }
  135605. shouldParseAsyncArrow() {
  135606. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  135607. }
  135608. parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  135609. var _jsx;
  135610. let state = null;
  135611. let jsx2;
  135612. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  135613. state = this.state.clone();
  135614. jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos), state);
  135615. if (!jsx2.error)
  135616. return jsx2.node;
  135617. const {
  135618. context
  135619. } = this.state;
  135620. if (context[context.length - 1] === types2.j_oTag) {
  135621. context.length -= 2;
  135622. } else if (context[context.length - 1] === types2.j_expr) {
  135623. context.length -= 1;
  135624. }
  135625. }
  135626. if ((_jsx = jsx2) != null && _jsx.error || this.isRelational("<")) {
  135627. var _jsx2, _jsx3;
  135628. state = state || this.state.clone();
  135629. let typeParameters;
  135630. const arrow = this.tryParse((abort) => {
  135631. var _arrowExpression$extr;
  135632. typeParameters = this.flowParseTypeParameterDeclaration();
  135633. const arrowExpression2 = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
  135634. const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
  135635. this.resetStartLocationFromNode(result, typeParameters);
  135636. return result;
  135637. });
  135638. if (arrowExpression2.type !== "ArrowFunctionExpression" && (_arrowExpression$extr = arrowExpression2.extra) != null && _arrowExpression$extr.parenthesized) {
  135639. abort();
  135640. }
  135641. const expr = this.maybeUnwrapTypeCastExpression(arrowExpression2);
  135642. expr.typeParameters = typeParameters;
  135643. this.resetStartLocationFromNode(expr, typeParameters);
  135644. return arrowExpression2;
  135645. }, state);
  135646. let arrowExpression = null;
  135647. if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
  135648. if (!arrow.error && !arrow.aborted) {
  135649. if (arrow.node.async) {
  135650. this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction);
  135651. }
  135652. return arrow.node;
  135653. }
  135654. arrowExpression = arrow.node;
  135655. }
  135656. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  135657. this.state = jsx2.failState;
  135658. return jsx2.node;
  135659. }
  135660. if (arrowExpression) {
  135661. this.state = arrow.failState;
  135662. return arrowExpression;
  135663. }
  135664. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  135665. throw jsx2.error;
  135666. if (arrow.thrown)
  135667. throw arrow.error;
  135668. throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter);
  135669. }
  135670. return super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
  135671. }
  135672. parseArrow(node) {
  135673. if (this.match(types$12.colon)) {
  135674. const result = this.tryParse(() => {
  135675. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  135676. this.state.noAnonFunctionType = true;
  135677. const typeNode = this.startNode();
  135678. [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
  135679. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  135680. if (this.canInsertSemicolon())
  135681. this.unexpected();
  135682. if (!this.match(types$12.arrow))
  135683. this.unexpected();
  135684. return typeNode;
  135685. });
  135686. if (result.thrown)
  135687. return null;
  135688. if (result.error)
  135689. this.state = result.failState;
  135690. node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  135691. }
  135692. return super.parseArrow(node);
  135693. }
  135694. shouldParseArrow() {
  135695. return this.match(types$12.colon) || super.shouldParseArrow();
  135696. }
  135697. setArrowFunctionParameters(node, params) {
  135698. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  135699. node.params = params;
  135700. } else {
  135701. super.setArrowFunctionParameters(node, params);
  135702. }
  135703. }
  135704. checkParams(node, allowDuplicates, isArrowFunction) {
  135705. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  135706. return;
  135707. }
  135708. for (let i = 0; i < node.params.length; i++) {
  135709. if (this.isThisParam(node.params[i]) && i > 0) {
  135710. this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst);
  135711. }
  135712. }
  135713. return super.checkParams(...arguments);
  135714. }
  135715. parseParenAndDistinguishExpression(canBeArrow) {
  135716. return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  135717. }
  135718. parseSubscripts(base2, startPos, startLoc, noCalls) {
  135719. if (base2.type === "Identifier" && base2.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
  135720. this.next();
  135721. const node = this.startNodeAt(startPos, startLoc);
  135722. node.callee = base2;
  135723. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  135724. base2 = this.finishNode(node, "CallExpression");
  135725. } else if (base2.type === "Identifier" && base2.name === "async" && this.isRelational("<")) {
  135726. const state = this.state.clone();
  135727. const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state);
  135728. if (!arrow.error && !arrow.aborted)
  135729. return arrow.node;
  135730. const result = this.tryParse(() => super.parseSubscripts(base2, startPos, startLoc, noCalls), state);
  135731. if (result.node && !result.error)
  135732. return result.node;
  135733. if (arrow.node) {
  135734. this.state = arrow.failState;
  135735. return arrow.node;
  135736. }
  135737. if (result.node) {
  135738. this.state = result.failState;
  135739. return result.node;
  135740. }
  135741. throw arrow.error || result.error;
  135742. }
  135743. return super.parseSubscripts(base2, startPos, startLoc, noCalls);
  135744. }
  135745. parseSubscript(base2, startPos, startLoc, noCalls, subscriptState) {
  135746. if (this.match(types$12.questionDot) && this.isLookaheadToken_lt()) {
  135747. subscriptState.optionalChainMember = true;
  135748. if (noCalls) {
  135749. subscriptState.stop = true;
  135750. return base2;
  135751. }
  135752. this.next();
  135753. const node = this.startNodeAt(startPos, startLoc);
  135754. node.callee = base2;
  135755. node.typeArguments = this.flowParseTypeParameterInstantiation();
  135756. this.expect(types$12.parenL);
  135757. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  135758. node.optional = true;
  135759. return this.finishCallExpression(node, true);
  135760. } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
  135761. const node = this.startNodeAt(startPos, startLoc);
  135762. node.callee = base2;
  135763. const result = this.tryParse(() => {
  135764. node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
  135765. this.expect(types$12.parenL);
  135766. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  135767. if (subscriptState.optionalChainMember)
  135768. node.optional = false;
  135769. return this.finishCallExpression(node, subscriptState.optionalChainMember);
  135770. });
  135771. if (result.node) {
  135772. if (result.error)
  135773. this.state = result.failState;
  135774. return result.node;
  135775. }
  135776. }
  135777. return super.parseSubscript(base2, startPos, startLoc, noCalls, subscriptState);
  135778. }
  135779. parseNewArguments(node) {
  135780. let targs = null;
  135781. if (this.shouldParseTypes() && this.isRelational("<")) {
  135782. targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
  135783. }
  135784. node.typeArguments = targs;
  135785. super.parseNewArguments(node);
  135786. }
  135787. parseAsyncArrowWithTypeParameters(startPos, startLoc) {
  135788. const node = this.startNodeAt(startPos, startLoc);
  135789. this.parseFunctionParams(node);
  135790. if (!this.parseArrow(node))
  135791. return;
  135792. return this.parseArrowExpression(node, void 0, true);
  135793. }
  135794. readToken_mult_modulo(code2) {
  135795. const next = this.input.charCodeAt(this.state.pos + 1);
  135796. if (code2 === 42 && next === 47 && this.state.hasFlowComment) {
  135797. this.state.hasFlowComment = false;
  135798. this.state.pos += 2;
  135799. this.nextToken();
  135800. return;
  135801. }
  135802. super.readToken_mult_modulo(code2);
  135803. }
  135804. readToken_pipe_amp(code2) {
  135805. const next = this.input.charCodeAt(this.state.pos + 1);
  135806. if (code2 === 124 && next === 125) {
  135807. this.finishOp(types$12.braceBarR, 2);
  135808. return;
  135809. }
  135810. super.readToken_pipe_amp(code2);
  135811. }
  135812. parseTopLevel(file, program) {
  135813. const fileNode = super.parseTopLevel(file, program);
  135814. if (this.state.hasFlowComment) {
  135815. this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);
  135816. }
  135817. return fileNode;
  135818. }
  135819. skipBlockComment() {
  135820. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  135821. if (this.state.hasFlowComment) {
  135822. this.unexpected(null, FlowErrors.NestedFlowComment);
  135823. }
  135824. this.hasFlowCommentCompletion();
  135825. this.state.pos += this.skipFlowComment();
  135826. this.state.hasFlowComment = true;
  135827. return;
  135828. }
  135829. if (this.state.hasFlowComment) {
  135830. const end = this.input.indexOf("*-/", this.state.pos += 2);
  135831. if (end === -1) {
  135832. throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment);
  135833. }
  135834. this.state.pos = end + 3;
  135835. return;
  135836. }
  135837. super.skipBlockComment();
  135838. }
  135839. skipFlowComment() {
  135840. const {
  135841. pos
  135842. } = this.state;
  135843. let shiftToFirstNonWhiteSpace = 2;
  135844. while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
  135845. shiftToFirstNonWhiteSpace++;
  135846. }
  135847. const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
  135848. const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
  135849. if (ch2 === 58 && ch3 === 58) {
  135850. return shiftToFirstNonWhiteSpace + 2;
  135851. }
  135852. if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
  135853. return shiftToFirstNonWhiteSpace + 12;
  135854. }
  135855. if (ch2 === 58 && ch3 !== 58) {
  135856. return shiftToFirstNonWhiteSpace;
  135857. }
  135858. return false;
  135859. }
  135860. hasFlowCommentCompletion() {
  135861. const end = this.input.indexOf("*/", this.state.pos);
  135862. if (end === -1) {
  135863. throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment);
  135864. }
  135865. }
  135866. flowEnumErrorBooleanMemberNotInitialized(pos, {
  135867. enumName,
  135868. memberName
  135869. }) {
  135870. this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName);
  135871. }
  135872. flowEnumErrorInvalidMemberName(pos, {
  135873. enumName,
  135874. memberName
  135875. }) {
  135876. const suggestion = memberName[0].toUpperCase() + memberName.slice(1);
  135877. this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName);
  135878. }
  135879. flowEnumErrorDuplicateMemberName(pos, {
  135880. enumName,
  135881. memberName
  135882. }) {
  135883. this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);
  135884. }
  135885. flowEnumErrorInconsistentMemberValues(pos, {
  135886. enumName
  135887. }) {
  135888. this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);
  135889. }
  135890. flowEnumErrorInvalidExplicitType(pos, {
  135891. enumName,
  135892. suppliedType
  135893. }) {
  135894. return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType);
  135895. }
  135896. flowEnumErrorInvalidMemberInitializer(pos, {
  135897. enumName,
  135898. explicitType,
  135899. memberName
  135900. }) {
  135901. let message = null;
  135902. switch (explicitType) {
  135903. case "boolean":
  135904. case "number":
  135905. case "string":
  135906. message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;
  135907. break;
  135908. case "symbol":
  135909. message = FlowErrors.EnumInvalidMemberInitializerSymbolType;
  135910. break;
  135911. default:
  135912. message = FlowErrors.EnumInvalidMemberInitializerUnknownType;
  135913. }
  135914. return this.raise(pos, message, enumName, memberName, explicitType);
  135915. }
  135916. flowEnumErrorNumberMemberNotInitialized(pos, {
  135917. enumName,
  135918. memberName
  135919. }) {
  135920. this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName);
  135921. }
  135922. flowEnumErrorStringMemberInconsistentlyInitailized(pos, {
  135923. enumName
  135924. }) {
  135925. this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName);
  135926. }
  135927. flowEnumMemberInit() {
  135928. const startPos = this.state.start;
  135929. const endOfInit = () => this.match(types$12.comma) || this.match(types$12.braceR);
  135930. switch (this.state.type) {
  135931. case types$12.num: {
  135932. const literal2 = this.parseNumericLiteral(this.state.value);
  135933. if (endOfInit()) {
  135934. return {
  135935. type: "number",
  135936. pos: literal2.start,
  135937. value: literal2
  135938. };
  135939. }
  135940. return {
  135941. type: "invalid",
  135942. pos: startPos
  135943. };
  135944. }
  135945. case types$12.string: {
  135946. const literal2 = this.parseStringLiteral(this.state.value);
  135947. if (endOfInit()) {
  135948. return {
  135949. type: "string",
  135950. pos: literal2.start,
  135951. value: literal2
  135952. };
  135953. }
  135954. return {
  135955. type: "invalid",
  135956. pos: startPos
  135957. };
  135958. }
  135959. case types$12._true:
  135960. case types$12._false: {
  135961. const literal2 = this.parseBooleanLiteral(this.match(types$12._true));
  135962. if (endOfInit()) {
  135963. return {
  135964. type: "boolean",
  135965. pos: literal2.start,
  135966. value: literal2
  135967. };
  135968. }
  135969. return {
  135970. type: "invalid",
  135971. pos: startPos
  135972. };
  135973. }
  135974. default:
  135975. return {
  135976. type: "invalid",
  135977. pos: startPos
  135978. };
  135979. }
  135980. }
  135981. flowEnumMemberRaw() {
  135982. const pos = this.state.start;
  135983. const id = this.parseIdentifier(true);
  135984. const init = this.eat(types$12.eq) ? this.flowEnumMemberInit() : {
  135985. type: "none",
  135986. pos
  135987. };
  135988. return {
  135989. id,
  135990. init
  135991. };
  135992. }
  135993. flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
  135994. const {
  135995. explicitType
  135996. } = context;
  135997. if (explicitType === null) {
  135998. return;
  135999. }
  136000. if (explicitType !== expectedType) {
  136001. this.flowEnumErrorInvalidMemberInitializer(pos, context);
  136002. }
  136003. }
  136004. flowEnumMembers({
  136005. enumName,
  136006. explicitType
  136007. }) {
  136008. const seenNames = /* @__PURE__ */ new Set();
  136009. const members = {
  136010. booleanMembers: [],
  136011. numberMembers: [],
  136012. stringMembers: [],
  136013. defaultedMembers: []
  136014. };
  136015. let hasUnknownMembers = false;
  136016. while (!this.match(types$12.braceR)) {
  136017. if (this.eat(types$12.ellipsis)) {
  136018. hasUnknownMembers = true;
  136019. break;
  136020. }
  136021. const memberNode = this.startNode();
  136022. const {
  136023. id,
  136024. init
  136025. } = this.flowEnumMemberRaw();
  136026. const memberName = id.name;
  136027. if (memberName === "") {
  136028. continue;
  136029. }
  136030. if (/^[a-z]/.test(memberName)) {
  136031. this.flowEnumErrorInvalidMemberName(id.start, {
  136032. enumName,
  136033. memberName
  136034. });
  136035. }
  136036. if (seenNames.has(memberName)) {
  136037. this.flowEnumErrorDuplicateMemberName(id.start, {
  136038. enumName,
  136039. memberName
  136040. });
  136041. }
  136042. seenNames.add(memberName);
  136043. const context = {
  136044. enumName,
  136045. explicitType,
  136046. memberName
  136047. };
  136048. memberNode.id = id;
  136049. switch (init.type) {
  136050. case "boolean": {
  136051. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
  136052. memberNode.init = init.value;
  136053. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  136054. break;
  136055. }
  136056. case "number": {
  136057. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
  136058. memberNode.init = init.value;
  136059. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  136060. break;
  136061. }
  136062. case "string": {
  136063. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
  136064. memberNode.init = init.value;
  136065. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  136066. break;
  136067. }
  136068. case "invalid": {
  136069. throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
  136070. }
  136071. case "none": {
  136072. switch (explicitType) {
  136073. case "boolean":
  136074. this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
  136075. break;
  136076. case "number":
  136077. this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
  136078. break;
  136079. default:
  136080. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  136081. }
  136082. }
  136083. }
  136084. if (!this.match(types$12.braceR)) {
  136085. this.expect(types$12.comma);
  136086. }
  136087. }
  136088. return {
  136089. members,
  136090. hasUnknownMembers
  136091. };
  136092. }
  136093. flowEnumStringMembers(initializedMembers, defaultedMembers, {
  136094. enumName
  136095. }) {
  136096. if (initializedMembers.length === 0) {
  136097. return defaultedMembers;
  136098. } else if (defaultedMembers.length === 0) {
  136099. return initializedMembers;
  136100. } else if (defaultedMembers.length > initializedMembers.length) {
  136101. for (const member of initializedMembers) {
  136102. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  136103. enumName
  136104. });
  136105. }
  136106. return defaultedMembers;
  136107. } else {
  136108. for (const member of defaultedMembers) {
  136109. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  136110. enumName
  136111. });
  136112. }
  136113. return initializedMembers;
  136114. }
  136115. }
  136116. flowEnumParseExplicitType({
  136117. enumName
  136118. }) {
  136119. if (this.eatContextual("of")) {
  136120. if (!this.match(types$12.name)) {
  136121. throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
  136122. enumName,
  136123. suppliedType: null
  136124. });
  136125. }
  136126. const {
  136127. value
  136128. } = this.state;
  136129. this.next();
  136130. if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
  136131. this.flowEnumErrorInvalidExplicitType(this.state.start, {
  136132. enumName,
  136133. suppliedType: value
  136134. });
  136135. }
  136136. return value;
  136137. }
  136138. return null;
  136139. }
  136140. flowEnumBody(node, {
  136141. enumName,
  136142. nameLoc
  136143. }) {
  136144. const explicitType = this.flowEnumParseExplicitType({
  136145. enumName
  136146. });
  136147. this.expect(types$12.braceL);
  136148. const {
  136149. members,
  136150. hasUnknownMembers
  136151. } = this.flowEnumMembers({
  136152. enumName,
  136153. explicitType
  136154. });
  136155. node.hasUnknownMembers = hasUnknownMembers;
  136156. switch (explicitType) {
  136157. case "boolean":
  136158. node.explicitType = true;
  136159. node.members = members.booleanMembers;
  136160. this.expect(types$12.braceR);
  136161. return this.finishNode(node, "EnumBooleanBody");
  136162. case "number":
  136163. node.explicitType = true;
  136164. node.members = members.numberMembers;
  136165. this.expect(types$12.braceR);
  136166. return this.finishNode(node, "EnumNumberBody");
  136167. case "string":
  136168. node.explicitType = true;
  136169. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  136170. enumName
  136171. });
  136172. this.expect(types$12.braceR);
  136173. return this.finishNode(node, "EnumStringBody");
  136174. case "symbol":
  136175. node.members = members.defaultedMembers;
  136176. this.expect(types$12.braceR);
  136177. return this.finishNode(node, "EnumSymbolBody");
  136178. default: {
  136179. const empty3 = () => {
  136180. node.members = [];
  136181. this.expect(types$12.braceR);
  136182. return this.finishNode(node, "EnumStringBody");
  136183. };
  136184. node.explicitType = false;
  136185. const boolsLen = members.booleanMembers.length;
  136186. const numsLen = members.numberMembers.length;
  136187. const strsLen = members.stringMembers.length;
  136188. const defaultedLen = members.defaultedMembers.length;
  136189. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  136190. return empty3();
  136191. } else if (!boolsLen && !numsLen) {
  136192. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  136193. enumName
  136194. });
  136195. this.expect(types$12.braceR);
  136196. return this.finishNode(node, "EnumStringBody");
  136197. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  136198. for (const member of members.defaultedMembers) {
  136199. this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
  136200. enumName,
  136201. memberName: member.id.name
  136202. });
  136203. }
  136204. node.members = members.booleanMembers;
  136205. this.expect(types$12.braceR);
  136206. return this.finishNode(node, "EnumBooleanBody");
  136207. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  136208. for (const member of members.defaultedMembers) {
  136209. this.flowEnumErrorNumberMemberNotInitialized(member.start, {
  136210. enumName,
  136211. memberName: member.id.name
  136212. });
  136213. }
  136214. node.members = members.numberMembers;
  136215. this.expect(types$12.braceR);
  136216. return this.finishNode(node, "EnumNumberBody");
  136217. } else {
  136218. this.flowEnumErrorInconsistentMemberValues(nameLoc, {
  136219. enumName
  136220. });
  136221. return empty3();
  136222. }
  136223. }
  136224. }
  136225. }
  136226. flowParseEnumDeclaration(node) {
  136227. const id = this.parseIdentifier();
  136228. node.id = id;
  136229. node.body = this.flowEnumBody(this.startNode(), {
  136230. enumName: id.name,
  136231. nameLoc: id.start
  136232. });
  136233. return this.finishNode(node, "EnumDeclaration");
  136234. }
  136235. isLookaheadToken_lt() {
  136236. const next = this.nextTokenStart();
  136237. if (this.input.charCodeAt(next) === 60) {
  136238. const afterNext = this.input.charCodeAt(next + 1);
  136239. return afterNext !== 60 && afterNext !== 61;
  136240. }
  136241. return false;
  136242. }
  136243. maybeUnwrapTypeCastExpression(node) {
  136244. return node.type === "TypeCastExpression" ? node.expression : node;
  136245. }
  136246. };
  136247. var entities = {
  136248. quot: '"',
  136249. amp: "&",
  136250. apos: "'",
  136251. lt: "<",
  136252. gt: ">",
  136253. nbsp: "\xA0",
  136254. iexcl: "\xA1",
  136255. cent: "\xA2",
  136256. pound: "\xA3",
  136257. curren: "\xA4",
  136258. yen: "\xA5",
  136259. brvbar: "\xA6",
  136260. sect: "\xA7",
  136261. uml: "\xA8",
  136262. copy: "\xA9",
  136263. ordf: "\xAA",
  136264. laquo: "\xAB",
  136265. not: "\xAC",
  136266. shy: "\xAD",
  136267. reg: "\xAE",
  136268. macr: "\xAF",
  136269. deg: "\xB0",
  136270. plusmn: "\xB1",
  136271. sup2: "\xB2",
  136272. sup3: "\xB3",
  136273. acute: "\xB4",
  136274. micro: "\xB5",
  136275. para: "\xB6",
  136276. middot: "\xB7",
  136277. cedil: "\xB8",
  136278. sup1: "\xB9",
  136279. ordm: "\xBA",
  136280. raquo: "\xBB",
  136281. frac14: "\xBC",
  136282. frac12: "\xBD",
  136283. frac34: "\xBE",
  136284. iquest: "\xBF",
  136285. Agrave: "\xC0",
  136286. Aacute: "\xC1",
  136287. Acirc: "\xC2",
  136288. Atilde: "\xC3",
  136289. Auml: "\xC4",
  136290. Aring: "\xC5",
  136291. AElig: "\xC6",
  136292. Ccedil: "\xC7",
  136293. Egrave: "\xC8",
  136294. Eacute: "\xC9",
  136295. Ecirc: "\xCA",
  136296. Euml: "\xCB",
  136297. Igrave: "\xCC",
  136298. Iacute: "\xCD",
  136299. Icirc: "\xCE",
  136300. Iuml: "\xCF",
  136301. ETH: "\xD0",
  136302. Ntilde: "\xD1",
  136303. Ograve: "\xD2",
  136304. Oacute: "\xD3",
  136305. Ocirc: "\xD4",
  136306. Otilde: "\xD5",
  136307. Ouml: "\xD6",
  136308. times: "\xD7",
  136309. Oslash: "\xD8",
  136310. Ugrave: "\xD9",
  136311. Uacute: "\xDA",
  136312. Ucirc: "\xDB",
  136313. Uuml: "\xDC",
  136314. Yacute: "\xDD",
  136315. THORN: "\xDE",
  136316. szlig: "\xDF",
  136317. agrave: "\xE0",
  136318. aacute: "\xE1",
  136319. acirc: "\xE2",
  136320. atilde: "\xE3",
  136321. auml: "\xE4",
  136322. aring: "\xE5",
  136323. aelig: "\xE6",
  136324. ccedil: "\xE7",
  136325. egrave: "\xE8",
  136326. eacute: "\xE9",
  136327. ecirc: "\xEA",
  136328. euml: "\xEB",
  136329. igrave: "\xEC",
  136330. iacute: "\xED",
  136331. icirc: "\xEE",
  136332. iuml: "\xEF",
  136333. eth: "\xF0",
  136334. ntilde: "\xF1",
  136335. ograve: "\xF2",
  136336. oacute: "\xF3",
  136337. ocirc: "\xF4",
  136338. otilde: "\xF5",
  136339. ouml: "\xF6",
  136340. divide: "\xF7",
  136341. oslash: "\xF8",
  136342. ugrave: "\xF9",
  136343. uacute: "\xFA",
  136344. ucirc: "\xFB",
  136345. uuml: "\xFC",
  136346. yacute: "\xFD",
  136347. thorn: "\xFE",
  136348. yuml: "\xFF",
  136349. OElig: "\u0152",
  136350. oelig: "\u0153",
  136351. Scaron: "\u0160",
  136352. scaron: "\u0161",
  136353. Yuml: "\u0178",
  136354. fnof: "\u0192",
  136355. circ: "\u02C6",
  136356. tilde: "\u02DC",
  136357. Alpha: "\u0391",
  136358. Beta: "\u0392",
  136359. Gamma: "\u0393",
  136360. Delta: "\u0394",
  136361. Epsilon: "\u0395",
  136362. Zeta: "\u0396",
  136363. Eta: "\u0397",
  136364. Theta: "\u0398",
  136365. Iota: "\u0399",
  136366. Kappa: "\u039A",
  136367. Lambda: "\u039B",
  136368. Mu: "\u039C",
  136369. Nu: "\u039D",
  136370. Xi: "\u039E",
  136371. Omicron: "\u039F",
  136372. Pi: "\u03A0",
  136373. Rho: "\u03A1",
  136374. Sigma: "\u03A3",
  136375. Tau: "\u03A4",
  136376. Upsilon: "\u03A5",
  136377. Phi: "\u03A6",
  136378. Chi: "\u03A7",
  136379. Psi: "\u03A8",
  136380. Omega: "\u03A9",
  136381. alpha: "\u03B1",
  136382. beta: "\u03B2",
  136383. gamma: "\u03B3",
  136384. delta: "\u03B4",
  136385. epsilon: "\u03B5",
  136386. zeta: "\u03B6",
  136387. eta: "\u03B7",
  136388. theta: "\u03B8",
  136389. iota: "\u03B9",
  136390. kappa: "\u03BA",
  136391. lambda: "\u03BB",
  136392. mu: "\u03BC",
  136393. nu: "\u03BD",
  136394. xi: "\u03BE",
  136395. omicron: "\u03BF",
  136396. pi: "\u03C0",
  136397. rho: "\u03C1",
  136398. sigmaf: "\u03C2",
  136399. sigma: "\u03C3",
  136400. tau: "\u03C4",
  136401. upsilon: "\u03C5",
  136402. phi: "\u03C6",
  136403. chi: "\u03C7",
  136404. psi: "\u03C8",
  136405. omega: "\u03C9",
  136406. thetasym: "\u03D1",
  136407. upsih: "\u03D2",
  136408. piv: "\u03D6",
  136409. ensp: "\u2002",
  136410. emsp: "\u2003",
  136411. thinsp: "\u2009",
  136412. zwnj: "\u200C",
  136413. zwj: "\u200D",
  136414. lrm: "\u200E",
  136415. rlm: "\u200F",
  136416. ndash: "\u2013",
  136417. mdash: "\u2014",
  136418. lsquo: "\u2018",
  136419. rsquo: "\u2019",
  136420. sbquo: "\u201A",
  136421. ldquo: "\u201C",
  136422. rdquo: "\u201D",
  136423. bdquo: "\u201E",
  136424. dagger: "\u2020",
  136425. Dagger: "\u2021",
  136426. bull: "\u2022",
  136427. hellip: "\u2026",
  136428. permil: "\u2030",
  136429. prime: "\u2032",
  136430. Prime: "\u2033",
  136431. lsaquo: "\u2039",
  136432. rsaquo: "\u203A",
  136433. oline: "\u203E",
  136434. frasl: "\u2044",
  136435. euro: "\u20AC",
  136436. image: "\u2111",
  136437. weierp: "\u2118",
  136438. real: "\u211C",
  136439. trade: "\u2122",
  136440. alefsym: "\u2135",
  136441. larr: "\u2190",
  136442. uarr: "\u2191",
  136443. rarr: "\u2192",
  136444. darr: "\u2193",
  136445. harr: "\u2194",
  136446. crarr: "\u21B5",
  136447. lArr: "\u21D0",
  136448. uArr: "\u21D1",
  136449. rArr: "\u21D2",
  136450. dArr: "\u21D3",
  136451. hArr: "\u21D4",
  136452. forall: "\u2200",
  136453. part: "\u2202",
  136454. exist: "\u2203",
  136455. empty: "\u2205",
  136456. nabla: "\u2207",
  136457. isin: "\u2208",
  136458. notin: "\u2209",
  136459. ni: "\u220B",
  136460. prod: "\u220F",
  136461. sum: "\u2211",
  136462. minus: "\u2212",
  136463. lowast: "\u2217",
  136464. radic: "\u221A",
  136465. prop: "\u221D",
  136466. infin: "\u221E",
  136467. ang: "\u2220",
  136468. and: "\u2227",
  136469. or: "\u2228",
  136470. cap: "\u2229",
  136471. cup: "\u222A",
  136472. int: "\u222B",
  136473. there4: "\u2234",
  136474. sim: "\u223C",
  136475. cong: "\u2245",
  136476. asymp: "\u2248",
  136477. ne: "\u2260",
  136478. equiv: "\u2261",
  136479. le: "\u2264",
  136480. ge: "\u2265",
  136481. sub: "\u2282",
  136482. sup: "\u2283",
  136483. nsub: "\u2284",
  136484. sube: "\u2286",
  136485. supe: "\u2287",
  136486. oplus: "\u2295",
  136487. otimes: "\u2297",
  136488. perp: "\u22A5",
  136489. sdot: "\u22C5",
  136490. lceil: "\u2308",
  136491. rceil: "\u2309",
  136492. lfloor: "\u230A",
  136493. rfloor: "\u230B",
  136494. lang: "\u2329",
  136495. rang: "\u232A",
  136496. loz: "\u25CA",
  136497. spades: "\u2660",
  136498. clubs: "\u2663",
  136499. hearts: "\u2665",
  136500. diams: "\u2666"
  136501. };
  136502. var State2 = class {
  136503. constructor() {
  136504. this.strict = void 0;
  136505. this.curLine = void 0;
  136506. this.startLoc = void 0;
  136507. this.endLoc = void 0;
  136508. this.errors = [];
  136509. this.potentialArrowAt = -1;
  136510. this.noArrowAt = [];
  136511. this.noArrowParamsConversionAt = [];
  136512. this.maybeInArrowParameters = false;
  136513. this.inPipeline = false;
  136514. this.inType = false;
  136515. this.noAnonFunctionType = false;
  136516. this.inPropertyName = false;
  136517. this.hasFlowComment = false;
  136518. this.isAmbientContext = false;
  136519. this.inAbstractClass = false;
  136520. this.topicContext = {
  136521. maxNumOfResolvableTopics: 0,
  136522. maxTopicIndex: null
  136523. };
  136524. this.soloAwait = false;
  136525. this.inFSharpPipelineDirectBody = false;
  136526. this.labels = [];
  136527. this.decoratorStack = [[]];
  136528. this.comments = [];
  136529. this.trailingComments = [];
  136530. this.leadingComments = [];
  136531. this.commentStack = [];
  136532. this.commentPreviousNode = null;
  136533. this.pos = 0;
  136534. this.lineStart = 0;
  136535. this.type = types$12.eof;
  136536. this.value = null;
  136537. this.start = 0;
  136538. this.end = 0;
  136539. this.lastTokEndLoc = null;
  136540. this.lastTokStartLoc = null;
  136541. this.lastTokStart = 0;
  136542. this.lastTokEnd = 0;
  136543. this.context = [types2.brace];
  136544. this.exprAllowed = true;
  136545. this.containsEsc = false;
  136546. this.strictErrors = /* @__PURE__ */ new Map();
  136547. this.tokensLength = 0;
  136548. }
  136549. init(options) {
  136550. this.strict = options.strictMode === false ? false : options.sourceType === "module";
  136551. this.curLine = options.startLine;
  136552. this.startLoc = this.endLoc = this.curPosition();
  136553. }
  136554. curPosition() {
  136555. return new Position3(this.curLine, this.pos - this.lineStart);
  136556. }
  136557. clone(skipArrays) {
  136558. const state = new State2();
  136559. const keys2 = Object.keys(this);
  136560. for (let i = 0, length = keys2.length; i < length; i++) {
  136561. const key = keys2[i];
  136562. let val = this[key];
  136563. if (!skipArrays && Array.isArray(val)) {
  136564. val = val.slice();
  136565. }
  136566. state[key] = val;
  136567. }
  136568. return state;
  136569. }
  136570. };
  136571. var HEX_NUMBER = /^[\da-fA-F]+$/;
  136572. var DECIMAL_NUMBER = /^\d+$/;
  136573. var JsxErrors = makeErrorTemplates({
  136574. AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
  136575. MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.",
  136576. MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
  136577. UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
  136578. UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
  136579. UnterminatedJsxContent: "Unterminated JSX contents.",
  136580. UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
  136581. }, ErrorCodes.SyntaxError);
  136582. types2.j_oTag = new TokContext3("<tag");
  136583. types2.j_cTag = new TokContext3("</tag");
  136584. types2.j_expr = new TokContext3("<tag>...</tag>", true);
  136585. types$12.jsxName = new TokenType3("jsxName");
  136586. types$12.jsxText = new TokenType3("jsxText", {
  136587. beforeExpr: true
  136588. });
  136589. types$12.jsxTagStart = new TokenType3("jsxTagStart", {
  136590. startsExpr: true
  136591. });
  136592. types$12.jsxTagEnd = new TokenType3("jsxTagEnd");
  136593. types$12.jsxTagStart.updateContext = (context) => {
  136594. context.push(types2.j_expr);
  136595. context.push(types2.j_oTag);
  136596. };
  136597. function isFragment(object) {
  136598. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  136599. }
  136600. function getQualifiedJSXName(object) {
  136601. if (object.type === "JSXIdentifier") {
  136602. return object.name;
  136603. }
  136604. if (object.type === "JSXNamespacedName") {
  136605. return object.namespace.name + ":" + object.name.name;
  136606. }
  136607. if (object.type === "JSXMemberExpression") {
  136608. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  136609. }
  136610. throw new Error("Node had unexpected type: " + object.type);
  136611. }
  136612. var jsx = (superClass) => class extends superClass {
  136613. jsxReadToken() {
  136614. let out = "";
  136615. let chunkStart = this.state.pos;
  136616. for (; ; ) {
  136617. if (this.state.pos >= this.length) {
  136618. throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);
  136619. }
  136620. const ch = this.input.charCodeAt(this.state.pos);
  136621. switch (ch) {
  136622. case 60:
  136623. case 123:
  136624. if (this.state.pos === this.state.start) {
  136625. if (ch === 60 && this.state.exprAllowed) {
  136626. ++this.state.pos;
  136627. return this.finishToken(types$12.jsxTagStart);
  136628. }
  136629. return super.getTokenFromCode(ch);
  136630. }
  136631. out += this.input.slice(chunkStart, this.state.pos);
  136632. return this.finishToken(types$12.jsxText, out);
  136633. case 38:
  136634. out += this.input.slice(chunkStart, this.state.pos);
  136635. out += this.jsxReadEntity();
  136636. chunkStart = this.state.pos;
  136637. break;
  136638. case 62:
  136639. case 125:
  136640. default:
  136641. if (isNewLine2(ch)) {
  136642. out += this.input.slice(chunkStart, this.state.pos);
  136643. out += this.jsxReadNewLine(true);
  136644. chunkStart = this.state.pos;
  136645. } else {
  136646. ++this.state.pos;
  136647. }
  136648. }
  136649. }
  136650. }
  136651. jsxReadNewLine(normalizeCRLF) {
  136652. const ch = this.input.charCodeAt(this.state.pos);
  136653. let out;
  136654. ++this.state.pos;
  136655. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  136656. ++this.state.pos;
  136657. out = normalizeCRLF ? "\n" : "\r\n";
  136658. } else {
  136659. out = String.fromCharCode(ch);
  136660. }
  136661. ++this.state.curLine;
  136662. this.state.lineStart = this.state.pos;
  136663. return out;
  136664. }
  136665. jsxReadString(quote) {
  136666. let out = "";
  136667. let chunkStart = ++this.state.pos;
  136668. for (; ; ) {
  136669. if (this.state.pos >= this.length) {
  136670. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  136671. }
  136672. const ch = this.input.charCodeAt(this.state.pos);
  136673. if (ch === quote)
  136674. break;
  136675. if (ch === 38) {
  136676. out += this.input.slice(chunkStart, this.state.pos);
  136677. out += this.jsxReadEntity();
  136678. chunkStart = this.state.pos;
  136679. } else if (isNewLine2(ch)) {
  136680. out += this.input.slice(chunkStart, this.state.pos);
  136681. out += this.jsxReadNewLine(false);
  136682. chunkStart = this.state.pos;
  136683. } else {
  136684. ++this.state.pos;
  136685. }
  136686. }
  136687. out += this.input.slice(chunkStart, this.state.pos++);
  136688. return this.finishToken(types$12.string, out);
  136689. }
  136690. jsxReadEntity() {
  136691. let str = "";
  136692. let count = 0;
  136693. let entity;
  136694. let ch = this.input[this.state.pos];
  136695. const startPos = ++this.state.pos;
  136696. while (this.state.pos < this.length && count++ < 10) {
  136697. ch = this.input[this.state.pos++];
  136698. if (ch === ";") {
  136699. if (str[0] === "#") {
  136700. if (str[1] === "x") {
  136701. str = str.substr(2);
  136702. if (HEX_NUMBER.test(str)) {
  136703. entity = String.fromCodePoint(parseInt(str, 16));
  136704. }
  136705. } else {
  136706. str = str.substr(1);
  136707. if (DECIMAL_NUMBER.test(str)) {
  136708. entity = String.fromCodePoint(parseInt(str, 10));
  136709. }
  136710. }
  136711. } else {
  136712. entity = entities[str];
  136713. }
  136714. break;
  136715. }
  136716. str += ch;
  136717. }
  136718. if (!entity) {
  136719. this.state.pos = startPos;
  136720. return "&";
  136721. }
  136722. return entity;
  136723. }
  136724. jsxReadWord() {
  136725. let ch;
  136726. const start3 = this.state.pos;
  136727. do {
  136728. ch = this.input.charCodeAt(++this.state.pos);
  136729. } while (isIdentifierChar2(ch) || ch === 45);
  136730. return this.finishToken(types$12.jsxName, this.input.slice(start3, this.state.pos));
  136731. }
  136732. jsxParseIdentifier() {
  136733. const node = this.startNode();
  136734. if (this.match(types$12.jsxName)) {
  136735. node.name = this.state.value;
  136736. } else if (this.state.type.keyword) {
  136737. node.name = this.state.type.keyword;
  136738. } else {
  136739. this.unexpected();
  136740. }
  136741. this.next();
  136742. return this.finishNode(node, "JSXIdentifier");
  136743. }
  136744. jsxParseNamespacedName() {
  136745. const startPos = this.state.start;
  136746. const startLoc = this.state.startLoc;
  136747. const name2 = this.jsxParseIdentifier();
  136748. if (!this.eat(types$12.colon))
  136749. return name2;
  136750. const node = this.startNodeAt(startPos, startLoc);
  136751. node.namespace = name2;
  136752. node.name = this.jsxParseIdentifier();
  136753. return this.finishNode(node, "JSXNamespacedName");
  136754. }
  136755. jsxParseElementName() {
  136756. const startPos = this.state.start;
  136757. const startLoc = this.state.startLoc;
  136758. let node = this.jsxParseNamespacedName();
  136759. if (node.type === "JSXNamespacedName") {
  136760. return node;
  136761. }
  136762. while (this.eat(types$12.dot)) {
  136763. const newNode = this.startNodeAt(startPos, startLoc);
  136764. newNode.object = node;
  136765. newNode.property = this.jsxParseIdentifier();
  136766. node = this.finishNode(newNode, "JSXMemberExpression");
  136767. }
  136768. return node;
  136769. }
  136770. jsxParseAttributeValue() {
  136771. let node;
  136772. switch (this.state.type) {
  136773. case types$12.braceL:
  136774. node = this.startNode();
  136775. this.next();
  136776. node = this.jsxParseExpressionContainer(node);
  136777. if (node.expression.type === "JSXEmptyExpression") {
  136778. this.raise(node.start, JsxErrors.AttributeIsEmpty);
  136779. }
  136780. return node;
  136781. case types$12.jsxTagStart:
  136782. case types$12.string:
  136783. return this.parseExprAtom();
  136784. default:
  136785. throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);
  136786. }
  136787. }
  136788. jsxParseEmptyExpression() {
  136789. const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  136790. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  136791. }
  136792. jsxParseSpreadChild(node) {
  136793. this.next();
  136794. node.expression = this.parseExpression();
  136795. this.expect(types$12.braceR);
  136796. return this.finishNode(node, "JSXSpreadChild");
  136797. }
  136798. jsxParseExpressionContainer(node) {
  136799. if (this.match(types$12.braceR)) {
  136800. node.expression = this.jsxParseEmptyExpression();
  136801. } else {
  136802. const expression = this.parseExpression();
  136803. node.expression = expression;
  136804. }
  136805. this.expect(types$12.braceR);
  136806. return this.finishNode(node, "JSXExpressionContainer");
  136807. }
  136808. jsxParseAttribute() {
  136809. const node = this.startNode();
  136810. if (this.eat(types$12.braceL)) {
  136811. this.expect(types$12.ellipsis);
  136812. node.argument = this.parseMaybeAssignAllowIn();
  136813. this.expect(types$12.braceR);
  136814. return this.finishNode(node, "JSXSpreadAttribute");
  136815. }
  136816. node.name = this.jsxParseNamespacedName();
  136817. node.value = this.eat(types$12.eq) ? this.jsxParseAttributeValue() : null;
  136818. return this.finishNode(node, "JSXAttribute");
  136819. }
  136820. jsxParseOpeningElementAt(startPos, startLoc) {
  136821. const node = this.startNodeAt(startPos, startLoc);
  136822. if (this.match(types$12.jsxTagEnd)) {
  136823. this.expect(types$12.jsxTagEnd);
  136824. return this.finishNode(node, "JSXOpeningFragment");
  136825. }
  136826. node.name = this.jsxParseElementName();
  136827. return this.jsxParseOpeningElementAfterName(node);
  136828. }
  136829. jsxParseOpeningElementAfterName(node) {
  136830. const attributes = [];
  136831. while (!this.match(types$12.slash) && !this.match(types$12.jsxTagEnd)) {
  136832. attributes.push(this.jsxParseAttribute());
  136833. }
  136834. node.attributes = attributes;
  136835. node.selfClosing = this.eat(types$12.slash);
  136836. this.expect(types$12.jsxTagEnd);
  136837. return this.finishNode(node, "JSXOpeningElement");
  136838. }
  136839. jsxParseClosingElementAt(startPos, startLoc) {
  136840. const node = this.startNodeAt(startPos, startLoc);
  136841. if (this.match(types$12.jsxTagEnd)) {
  136842. this.expect(types$12.jsxTagEnd);
  136843. return this.finishNode(node, "JSXClosingFragment");
  136844. }
  136845. node.name = this.jsxParseElementName();
  136846. this.expect(types$12.jsxTagEnd);
  136847. return this.finishNode(node, "JSXClosingElement");
  136848. }
  136849. jsxParseElementAt(startPos, startLoc) {
  136850. const node = this.startNodeAt(startPos, startLoc);
  136851. const children = [];
  136852. const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  136853. let closingElement = null;
  136854. if (!openingElement.selfClosing) {
  136855. contents:
  136856. for (; ; ) {
  136857. switch (this.state.type) {
  136858. case types$12.jsxTagStart:
  136859. startPos = this.state.start;
  136860. startLoc = this.state.startLoc;
  136861. this.next();
  136862. if (this.eat(types$12.slash)) {
  136863. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  136864. break contents;
  136865. }
  136866. children.push(this.jsxParseElementAt(startPos, startLoc));
  136867. break;
  136868. case types$12.jsxText:
  136869. children.push(this.parseExprAtom());
  136870. break;
  136871. case types$12.braceL: {
  136872. const node2 = this.startNode();
  136873. this.next();
  136874. if (this.match(types$12.ellipsis)) {
  136875. children.push(this.jsxParseSpreadChild(node2));
  136876. } else {
  136877. children.push(this.jsxParseExpressionContainer(node2));
  136878. }
  136879. break;
  136880. }
  136881. default:
  136882. throw this.unexpected();
  136883. }
  136884. }
  136885. if (isFragment(openingElement) && !isFragment(closingElement)) {
  136886. this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment);
  136887. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  136888. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  136889. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  136890. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  136891. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  136892. }
  136893. }
  136894. }
  136895. if (isFragment(openingElement)) {
  136896. node.openingFragment = openingElement;
  136897. node.closingFragment = closingElement;
  136898. } else {
  136899. node.openingElement = openingElement;
  136900. node.closingElement = closingElement;
  136901. }
  136902. node.children = children;
  136903. if (this.isRelational("<")) {
  136904. throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements);
  136905. }
  136906. return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
  136907. }
  136908. jsxParseElement() {
  136909. const startPos = this.state.start;
  136910. const startLoc = this.state.startLoc;
  136911. this.next();
  136912. return this.jsxParseElementAt(startPos, startLoc);
  136913. }
  136914. parseExprAtom(refExpressionErrors) {
  136915. if (this.match(types$12.jsxText)) {
  136916. return this.parseLiteral(this.state.value, "JSXText");
  136917. } else if (this.match(types$12.jsxTagStart)) {
  136918. return this.jsxParseElement();
  136919. } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
  136920. this.finishToken(types$12.jsxTagStart);
  136921. return this.jsxParseElement();
  136922. } else {
  136923. return super.parseExprAtom(refExpressionErrors);
  136924. }
  136925. }
  136926. createLookaheadState(state) {
  136927. const lookaheadState = super.createLookaheadState(state);
  136928. lookaheadState.inPropertyName = state.inPropertyName;
  136929. return lookaheadState;
  136930. }
  136931. getTokenFromCode(code2) {
  136932. if (this.state.inPropertyName)
  136933. return super.getTokenFromCode(code2);
  136934. const context = this.curContext();
  136935. if (context === types2.j_expr) {
  136936. return this.jsxReadToken();
  136937. }
  136938. if (context === types2.j_oTag || context === types2.j_cTag) {
  136939. if (isIdentifierStart2(code2)) {
  136940. return this.jsxReadWord();
  136941. }
  136942. if (code2 === 62) {
  136943. ++this.state.pos;
  136944. return this.finishToken(types$12.jsxTagEnd);
  136945. }
  136946. if ((code2 === 34 || code2 === 39) && context === types2.j_oTag) {
  136947. return this.jsxReadString(code2);
  136948. }
  136949. }
  136950. if (code2 === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  136951. ++this.state.pos;
  136952. return this.finishToken(types$12.jsxTagStart);
  136953. }
  136954. return super.getTokenFromCode(code2);
  136955. }
  136956. updateContext(prevType) {
  136957. super.updateContext(prevType);
  136958. const {
  136959. context,
  136960. type
  136961. } = this.state;
  136962. if (type === types$12.braceL) {
  136963. const curContext = context[context.length - 1];
  136964. if (curContext === types2.j_oTag) {
  136965. context.push(types2.brace);
  136966. } else if (curContext === types2.j_expr) {
  136967. context.push(types2.templateQuasi);
  136968. }
  136969. this.state.exprAllowed = true;
  136970. } else if (type === types$12.slash && prevType === types$12.jsxTagStart) {
  136971. context.length -= 2;
  136972. context.push(types2.j_cTag);
  136973. this.state.exprAllowed = false;
  136974. } else if (type === types$12.jsxTagEnd) {
  136975. const out = context.pop();
  136976. if (out === types2.j_oTag && prevType === types$12.slash || out === types2.j_cTag) {
  136977. context.pop();
  136978. this.state.exprAllowed = context[context.length - 1] === types2.j_expr;
  136979. } else {
  136980. this.state.exprAllowed = true;
  136981. }
  136982. } else if (type.keyword && (prevType === types$12.dot || prevType === types$12.questionDot)) {
  136983. this.state.exprAllowed = false;
  136984. } else {
  136985. this.state.exprAllowed = type.beforeExpr;
  136986. }
  136987. }
  136988. };
  136989. var TypeScriptScope = class extends Scope4 {
  136990. constructor(...args) {
  136991. super(...args);
  136992. this.types = /* @__PURE__ */ new Set();
  136993. this.enums = /* @__PURE__ */ new Set();
  136994. this.constEnums = /* @__PURE__ */ new Set();
  136995. this.classes = /* @__PURE__ */ new Set();
  136996. this.exportOnlyBindings = /* @__PURE__ */ new Set();
  136997. }
  136998. };
  136999. var TypeScriptScopeHandler = class extends ScopeHandler {
  137000. createScope(flags) {
  137001. return new TypeScriptScope(flags);
  137002. }
  137003. declareName(name2, bindingType, pos) {
  137004. const scope = this.currentScope();
  137005. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  137006. this.maybeExportDefined(scope, name2);
  137007. scope.exportOnlyBindings.add(name2);
  137008. return;
  137009. }
  137010. super.declareName(...arguments);
  137011. if (bindingType & BIND_KIND_TYPE) {
  137012. if (!(bindingType & BIND_KIND_VALUE)) {
  137013. this.checkRedeclarationInScope(scope, name2, bindingType, pos);
  137014. this.maybeExportDefined(scope, name2);
  137015. }
  137016. scope.types.add(name2);
  137017. }
  137018. if (bindingType & BIND_FLAGS_TS_ENUM)
  137019. scope.enums.add(name2);
  137020. if (bindingType & BIND_FLAGS_TS_CONST_ENUM)
  137021. scope.constEnums.add(name2);
  137022. if (bindingType & BIND_FLAGS_CLASS)
  137023. scope.classes.add(name2);
  137024. }
  137025. isRedeclaredInScope(scope, name2, bindingType) {
  137026. if (scope.enums.has(name2)) {
  137027. if (bindingType & BIND_FLAGS_TS_ENUM) {
  137028. const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  137029. const wasConst = scope.constEnums.has(name2);
  137030. return isConst !== wasConst;
  137031. }
  137032. return true;
  137033. }
  137034. if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name2)) {
  137035. if (scope.lexical.has(name2)) {
  137036. return !!(bindingType & BIND_KIND_VALUE);
  137037. } else {
  137038. return false;
  137039. }
  137040. }
  137041. if (bindingType & BIND_KIND_TYPE && scope.types.has(name2)) {
  137042. return true;
  137043. }
  137044. return super.isRedeclaredInScope(...arguments);
  137045. }
  137046. checkLocalExport(id) {
  137047. const topLevelScope = this.scopeStack[0];
  137048. const {
  137049. name: name2
  137050. } = id;
  137051. if (!topLevelScope.types.has(name2) && !topLevelScope.exportOnlyBindings.has(name2)) {
  137052. super.checkLocalExport(id);
  137053. }
  137054. }
  137055. };
  137056. var PARAM = 0;
  137057. var PARAM_YIELD = 1;
  137058. var PARAM_AWAIT = 2;
  137059. var PARAM_RETURN = 4;
  137060. var PARAM_IN = 8;
  137061. var ProductionParameterHandler = class {
  137062. constructor() {
  137063. this.stacks = [];
  137064. }
  137065. enter(flags) {
  137066. this.stacks.push(flags);
  137067. }
  137068. exit() {
  137069. this.stacks.pop();
  137070. }
  137071. currentFlags() {
  137072. return this.stacks[this.stacks.length - 1];
  137073. }
  137074. get hasAwait() {
  137075. return (this.currentFlags() & PARAM_AWAIT) > 0;
  137076. }
  137077. get hasYield() {
  137078. return (this.currentFlags() & PARAM_YIELD) > 0;
  137079. }
  137080. get hasReturn() {
  137081. return (this.currentFlags() & PARAM_RETURN) > 0;
  137082. }
  137083. get hasIn() {
  137084. return (this.currentFlags() & PARAM_IN) > 0;
  137085. }
  137086. };
  137087. function functionFlags2(isAsync, isGenerator) {
  137088. return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
  137089. }
  137090. function nonNull(x) {
  137091. if (x == null) {
  137092. throw new Error(`Unexpected ${x} value.`);
  137093. }
  137094. return x;
  137095. }
  137096. function assert(x) {
  137097. if (!x) {
  137098. throw new Error("Assert fail");
  137099. }
  137100. }
  137101. var TSErrors = makeErrorTemplates({
  137102. AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.",
  137103. AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
  137104. AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
  137105. ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
  137106. ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
  137107. ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
  137108. DeclareAccessor: "'declare' is not allowed in %0ters.",
  137109. DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
  137110. DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
  137111. DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
  137112. DuplicateModifier: "Duplicate modifier: '%0'.",
  137113. EmptyHeritageClauseType: "'%0' list cannot be empty.",
  137114. EmptyTypeArguments: "Type argument list cannot be empty.",
  137115. EmptyTypeParameters: "Type parameter list cannot be empty.",
  137116. ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
  137117. ImportAliasHasImportType: "An import alias can not use 'import type'.",
  137118. IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
  137119. IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
  137120. IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').",
  137121. IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
  137122. IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
  137123. IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
  137124. InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.",
  137125. InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
  137126. InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
  137127. MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
  137128. NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
  137129. NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
  137130. OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
  137131. OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
  137132. PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
  137133. PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
  137134. PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').",
  137135. ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
  137136. SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
  137137. SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
  137138. SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
  137139. StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
  137140. TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  137141. TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
  137142. UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
  137143. UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
  137144. UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
  137145. UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
  137146. UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
  137147. UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
  137148. UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."
  137149. }, ErrorCodes.SyntaxError);
  137150. function keywordTypeFromName(value) {
  137151. switch (value) {
  137152. case "any":
  137153. return "TSAnyKeyword";
  137154. case "boolean":
  137155. return "TSBooleanKeyword";
  137156. case "bigint":
  137157. return "TSBigIntKeyword";
  137158. case "never":
  137159. return "TSNeverKeyword";
  137160. case "number":
  137161. return "TSNumberKeyword";
  137162. case "object":
  137163. return "TSObjectKeyword";
  137164. case "string":
  137165. return "TSStringKeyword";
  137166. case "symbol":
  137167. return "TSSymbolKeyword";
  137168. case "undefined":
  137169. return "TSUndefinedKeyword";
  137170. case "unknown":
  137171. return "TSUnknownKeyword";
  137172. default:
  137173. return void 0;
  137174. }
  137175. }
  137176. function tsIsAccessModifier(modifier) {
  137177. return modifier === "private" || modifier === "public" || modifier === "protected";
  137178. }
  137179. var typescript = (superClass) => class extends superClass {
  137180. getScopeHandler() {
  137181. return TypeScriptScopeHandler;
  137182. }
  137183. tsIsIdentifier() {
  137184. return this.match(types$12.name);
  137185. }
  137186. tsTokenCanFollowModifier() {
  137187. return (this.match(types$12.bracketL) || this.match(types$12.braceL) || this.match(types$12.star) || this.match(types$12.ellipsis) || this.match(types$12.privateName) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
  137188. }
  137189. tsNextTokenCanFollowModifier() {
  137190. this.next();
  137191. return this.tsTokenCanFollowModifier();
  137192. }
  137193. tsParseModifier(allowedModifiers) {
  137194. if (!this.match(types$12.name)) {
  137195. return void 0;
  137196. }
  137197. const modifier = this.state.value;
  137198. if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  137199. return modifier;
  137200. }
  137201. return void 0;
  137202. }
  137203. tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate) {
  137204. const enforceOrder = (pos, modifier, before, after) => {
  137205. if (modifier === before && modified[after]) {
  137206. this.raise(pos, TSErrors.InvalidModifiersOrder, before, after);
  137207. }
  137208. };
  137209. const incompatible = (pos, modifier, mod1, mod2) => {
  137210. if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
  137211. this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2);
  137212. }
  137213. };
  137214. for (; ; ) {
  137215. const startPos = this.state.start;
  137216. const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []));
  137217. if (!modifier)
  137218. break;
  137219. if (tsIsAccessModifier(modifier)) {
  137220. if (modified.accessibility) {
  137221. this.raise(startPos, TSErrors.DuplicateAccessibilityModifier);
  137222. } else {
  137223. enforceOrder(startPos, modifier, modifier, "override");
  137224. enforceOrder(startPos, modifier, modifier, "static");
  137225. modified.accessibility = modifier;
  137226. }
  137227. } else {
  137228. if (Object.hasOwnProperty.call(modified, modifier)) {
  137229. this.raise(startPos, TSErrors.DuplicateModifier, modifier);
  137230. } else {
  137231. enforceOrder(startPos, modifier, "static", "readonly");
  137232. enforceOrder(startPos, modifier, "static", "override");
  137233. enforceOrder(startPos, modifier, "override", "readonly");
  137234. enforceOrder(startPos, modifier, "abstract", "override");
  137235. incompatible(startPos, modifier, "declare", "override");
  137236. incompatible(startPos, modifier, "static", "abstract");
  137237. }
  137238. modified[modifier] = true;
  137239. }
  137240. if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
  137241. this.raise(startPos, errorTemplate, modifier);
  137242. }
  137243. }
  137244. }
  137245. tsIsListTerminator(kind) {
  137246. switch (kind) {
  137247. case "EnumMembers":
  137248. case "TypeMembers":
  137249. return this.match(types$12.braceR);
  137250. case "HeritageClauseElement":
  137251. return this.match(types$12.braceL);
  137252. case "TupleElementTypes":
  137253. return this.match(types$12.bracketR);
  137254. case "TypeParametersOrArguments":
  137255. return this.isRelational(">");
  137256. }
  137257. throw new Error("Unreachable");
  137258. }
  137259. tsParseList(kind, parseElement) {
  137260. const result = [];
  137261. while (!this.tsIsListTerminator(kind)) {
  137262. result.push(parseElement());
  137263. }
  137264. return result;
  137265. }
  137266. tsParseDelimitedList(kind, parseElement) {
  137267. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
  137268. }
  137269. tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
  137270. const result = [];
  137271. for (; ; ) {
  137272. if (this.tsIsListTerminator(kind)) {
  137273. break;
  137274. }
  137275. const element2 = parseElement();
  137276. if (element2 == null) {
  137277. return void 0;
  137278. }
  137279. result.push(element2);
  137280. if (this.eat(types$12.comma)) {
  137281. continue;
  137282. }
  137283. if (this.tsIsListTerminator(kind)) {
  137284. break;
  137285. }
  137286. if (expectSuccess) {
  137287. this.expect(types$12.comma);
  137288. }
  137289. return void 0;
  137290. }
  137291. return result;
  137292. }
  137293. tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
  137294. if (!skipFirstToken) {
  137295. if (bracket) {
  137296. this.expect(types$12.bracketL);
  137297. } else {
  137298. this.expectRelational("<");
  137299. }
  137300. }
  137301. const result = this.tsParseDelimitedList(kind, parseElement);
  137302. if (bracket) {
  137303. this.expect(types$12.bracketR);
  137304. } else {
  137305. this.expectRelational(">");
  137306. }
  137307. return result;
  137308. }
  137309. tsParseImportType() {
  137310. const node = this.startNode();
  137311. this.expect(types$12._import);
  137312. this.expect(types$12.parenL);
  137313. if (!this.match(types$12.string)) {
  137314. this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);
  137315. }
  137316. node.argument = this.parseExprAtom();
  137317. this.expect(types$12.parenR);
  137318. if (this.eat(types$12.dot)) {
  137319. node.qualifier = this.tsParseEntityName(true);
  137320. }
  137321. if (this.isRelational("<")) {
  137322. node.typeParameters = this.tsParseTypeArguments();
  137323. }
  137324. return this.finishNode(node, "TSImportType");
  137325. }
  137326. tsParseEntityName(allowReservedWords) {
  137327. let entity = this.parseIdentifier();
  137328. while (this.eat(types$12.dot)) {
  137329. const node = this.startNodeAtNode(entity);
  137330. node.left = entity;
  137331. node.right = this.parseIdentifier(allowReservedWords);
  137332. entity = this.finishNode(node, "TSQualifiedName");
  137333. }
  137334. return entity;
  137335. }
  137336. tsParseTypeReference() {
  137337. const node = this.startNode();
  137338. node.typeName = this.tsParseEntityName(false);
  137339. if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
  137340. node.typeParameters = this.tsParseTypeArguments();
  137341. }
  137342. return this.finishNode(node, "TSTypeReference");
  137343. }
  137344. tsParseThisTypePredicate(lhs) {
  137345. this.next();
  137346. const node = this.startNodeAtNode(lhs);
  137347. node.parameterName = lhs;
  137348. node.typeAnnotation = this.tsParseTypeAnnotation(false);
  137349. node.asserts = false;
  137350. return this.finishNode(node, "TSTypePredicate");
  137351. }
  137352. tsParseThisTypeNode() {
  137353. const node = this.startNode();
  137354. this.next();
  137355. return this.finishNode(node, "TSThisType");
  137356. }
  137357. tsParseTypeQuery() {
  137358. const node = this.startNode();
  137359. this.expect(types$12._typeof);
  137360. if (this.match(types$12._import)) {
  137361. node.exprName = this.tsParseImportType();
  137362. } else {
  137363. node.exprName = this.tsParseEntityName(true);
  137364. }
  137365. return this.finishNode(node, "TSTypeQuery");
  137366. }
  137367. tsParseTypeParameter() {
  137368. const node = this.startNode();
  137369. node.name = this.parseIdentifierName(node.start);
  137370. node.constraint = this.tsEatThenParseType(types$12._extends);
  137371. node.default = this.tsEatThenParseType(types$12.eq);
  137372. return this.finishNode(node, "TSTypeParameter");
  137373. }
  137374. tsTryParseTypeParameters() {
  137375. if (this.isRelational("<")) {
  137376. return this.tsParseTypeParameters();
  137377. }
  137378. }
  137379. tsParseTypeParameters() {
  137380. const node = this.startNode();
  137381. if (this.isRelational("<") || this.match(types$12.jsxTagStart)) {
  137382. this.next();
  137383. } else {
  137384. this.unexpected();
  137385. }
  137386. node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
  137387. if (node.params.length === 0) {
  137388. this.raise(node.start, TSErrors.EmptyTypeParameters);
  137389. }
  137390. return this.finishNode(node, "TSTypeParameterDeclaration");
  137391. }
  137392. tsTryNextParseConstantContext() {
  137393. if (this.lookahead().type === types$12._const) {
  137394. this.next();
  137395. return this.tsParseTypeReference();
  137396. }
  137397. return null;
  137398. }
  137399. tsFillSignature(returnToken, signature) {
  137400. const returnTokenRequired = returnToken === types$12.arrow;
  137401. signature.typeParameters = this.tsTryParseTypeParameters();
  137402. this.expect(types$12.parenL);
  137403. signature.parameters = this.tsParseBindingListForSignature();
  137404. if (returnTokenRequired) {
  137405. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  137406. } else if (this.match(returnToken)) {
  137407. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  137408. }
  137409. }
  137410. tsParseBindingListForSignature() {
  137411. return this.parseBindingList(types$12.parenR, 41).map((pattern) => {
  137412. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  137413. this.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type);
  137414. }
  137415. return pattern;
  137416. });
  137417. }
  137418. tsParseTypeMemberSemicolon() {
  137419. if (!this.eat(types$12.comma) && !this.isLineTerminator()) {
  137420. this.expect(types$12.semi);
  137421. }
  137422. }
  137423. tsParseSignatureMember(kind, node) {
  137424. this.tsFillSignature(types$12.colon, node);
  137425. this.tsParseTypeMemberSemicolon();
  137426. return this.finishNode(node, kind);
  137427. }
  137428. tsIsUnambiguouslyIndexSignature() {
  137429. this.next();
  137430. return this.eat(types$12.name) && this.match(types$12.colon);
  137431. }
  137432. tsTryParseIndexSignature(node) {
  137433. if (!(this.match(types$12.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  137434. return void 0;
  137435. }
  137436. this.expect(types$12.bracketL);
  137437. const id = this.parseIdentifier();
  137438. id.typeAnnotation = this.tsParseTypeAnnotation();
  137439. this.resetEndLocation(id);
  137440. this.expect(types$12.bracketR);
  137441. node.parameters = [id];
  137442. const type = this.tsTryParseTypeAnnotation();
  137443. if (type)
  137444. node.typeAnnotation = type;
  137445. this.tsParseTypeMemberSemicolon();
  137446. return this.finishNode(node, "TSIndexSignature");
  137447. }
  137448. tsParsePropertyOrMethodSignature(node, readonly) {
  137449. if (this.eat(types$12.question))
  137450. node.optional = true;
  137451. const nodeAny = node;
  137452. if (this.match(types$12.parenL) || this.isRelational("<")) {
  137453. if (readonly) {
  137454. this.raise(node.start, TSErrors.ReadonlyForMethodSignature);
  137455. }
  137456. const method = nodeAny;
  137457. if (method.kind && this.isRelational("<")) {
  137458. this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters);
  137459. }
  137460. this.tsFillSignature(types$12.colon, method);
  137461. this.tsParseTypeMemberSemicolon();
  137462. if (method.kind === "get") {
  137463. if (method.parameters.length > 0) {
  137464. this.raise(this.state.pos, ErrorMessages.BadGetterArity);
  137465. if (this.isThisParam(method.parameters[0])) {
  137466. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  137467. }
  137468. }
  137469. } else if (method.kind === "set") {
  137470. if (method.parameters.length !== 1) {
  137471. this.raise(this.state.pos, ErrorMessages.BadSetterArity);
  137472. } else {
  137473. const firstParameter = method.parameters[0];
  137474. if (this.isThisParam(firstParameter)) {
  137475. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  137476. }
  137477. if (firstParameter.type === "Identifier" && firstParameter.optional) {
  137478. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveOptionalParameter);
  137479. }
  137480. if (firstParameter.type === "RestElement") {
  137481. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveRestParameter);
  137482. }
  137483. }
  137484. if (method.typeAnnotation) {
  137485. this.raise(method.typeAnnotation.start, TSErrors.SetAccesorCannotHaveReturnType);
  137486. }
  137487. } else {
  137488. method.kind = "method";
  137489. }
  137490. return this.finishNode(method, "TSMethodSignature");
  137491. } else {
  137492. const property = nodeAny;
  137493. if (readonly)
  137494. property.readonly = true;
  137495. const type = this.tsTryParseTypeAnnotation();
  137496. if (type)
  137497. property.typeAnnotation = type;
  137498. this.tsParseTypeMemberSemicolon();
  137499. return this.finishNode(property, "TSPropertySignature");
  137500. }
  137501. }
  137502. tsParseTypeMember() {
  137503. const node = this.startNode();
  137504. if (this.match(types$12.parenL) || this.isRelational("<")) {
  137505. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
  137506. }
  137507. if (this.match(types$12._new)) {
  137508. const id = this.startNode();
  137509. this.next();
  137510. if (this.match(types$12.parenL) || this.isRelational("<")) {
  137511. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
  137512. } else {
  137513. node.key = this.createIdentifier(id, "new");
  137514. return this.tsParsePropertyOrMethodSignature(node, false);
  137515. }
  137516. }
  137517. this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember);
  137518. const idx = this.tsTryParseIndexSignature(node);
  137519. if (idx) {
  137520. return idx;
  137521. }
  137522. this.parsePropertyName(node, false);
  137523. if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) {
  137524. node.kind = node.key.name;
  137525. this.parsePropertyName(node, false);
  137526. }
  137527. return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);
  137528. }
  137529. tsParseTypeLiteral() {
  137530. const node = this.startNode();
  137531. node.members = this.tsParseObjectTypeMembers();
  137532. return this.finishNode(node, "TSTypeLiteral");
  137533. }
  137534. tsParseObjectTypeMembers() {
  137535. this.expect(types$12.braceL);
  137536. const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  137537. this.expect(types$12.braceR);
  137538. return members;
  137539. }
  137540. tsIsStartOfMappedType() {
  137541. this.next();
  137542. if (this.eat(types$12.plusMin)) {
  137543. return this.isContextual("readonly");
  137544. }
  137545. if (this.isContextual("readonly")) {
  137546. this.next();
  137547. }
  137548. if (!this.match(types$12.bracketL)) {
  137549. return false;
  137550. }
  137551. this.next();
  137552. if (!this.tsIsIdentifier()) {
  137553. return false;
  137554. }
  137555. this.next();
  137556. return this.match(types$12._in);
  137557. }
  137558. tsParseMappedTypeParameter() {
  137559. const node = this.startNode();
  137560. node.name = this.parseIdentifierName(node.start);
  137561. node.constraint = this.tsExpectThenParseType(types$12._in);
  137562. return this.finishNode(node, "TSTypeParameter");
  137563. }
  137564. tsParseMappedType() {
  137565. const node = this.startNode();
  137566. this.expect(types$12.braceL);
  137567. if (this.match(types$12.plusMin)) {
  137568. node.readonly = this.state.value;
  137569. this.next();
  137570. this.expectContextual("readonly");
  137571. } else if (this.eatContextual("readonly")) {
  137572. node.readonly = true;
  137573. }
  137574. this.expect(types$12.bracketL);
  137575. node.typeParameter = this.tsParseMappedTypeParameter();
  137576. node.nameType = this.eatContextual("as") ? this.tsParseType() : null;
  137577. this.expect(types$12.bracketR);
  137578. if (this.match(types$12.plusMin)) {
  137579. node.optional = this.state.value;
  137580. this.next();
  137581. this.expect(types$12.question);
  137582. } else if (this.eat(types$12.question)) {
  137583. node.optional = true;
  137584. }
  137585. node.typeAnnotation = this.tsTryParseType();
  137586. this.semicolon();
  137587. this.expect(types$12.braceR);
  137588. return this.finishNode(node, "TSMappedType");
  137589. }
  137590. tsParseTupleType() {
  137591. const node = this.startNode();
  137592. node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  137593. let seenOptionalElement = false;
  137594. let labeledElements = null;
  137595. node.elementTypes.forEach((elementNode) => {
  137596. var _labeledElements;
  137597. let {
  137598. type
  137599. } = elementNode;
  137600. if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
  137601. this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);
  137602. }
  137603. seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
  137604. if (type === "TSRestType") {
  137605. elementNode = elementNode.typeAnnotation;
  137606. type = elementNode.type;
  137607. }
  137608. const isLabeled = type === "TSNamedTupleMember";
  137609. labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
  137610. if (labeledElements !== isLabeled) {
  137611. this.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements);
  137612. }
  137613. });
  137614. return this.finishNode(node, "TSTupleType");
  137615. }
  137616. tsParseTupleElementType() {
  137617. const {
  137618. start: startPos,
  137619. startLoc
  137620. } = this.state;
  137621. const rest = this.eat(types$12.ellipsis);
  137622. let type = this.tsParseType();
  137623. const optional = this.eat(types$12.question);
  137624. const labeled = this.eat(types$12.colon);
  137625. if (labeled) {
  137626. const labeledNode = this.startNodeAtNode(type);
  137627. labeledNode.optional = optional;
  137628. if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
  137629. labeledNode.label = type.typeName;
  137630. } else {
  137631. this.raise(type.start, TSErrors.InvalidTupleMemberLabel);
  137632. labeledNode.label = type;
  137633. }
  137634. labeledNode.elementType = this.tsParseType();
  137635. type = this.finishNode(labeledNode, "TSNamedTupleMember");
  137636. } else if (optional) {
  137637. const optionalTypeNode = this.startNodeAtNode(type);
  137638. optionalTypeNode.typeAnnotation = type;
  137639. type = this.finishNode(optionalTypeNode, "TSOptionalType");
  137640. }
  137641. if (rest) {
  137642. const restNode = this.startNodeAt(startPos, startLoc);
  137643. restNode.typeAnnotation = type;
  137644. type = this.finishNode(restNode, "TSRestType");
  137645. }
  137646. return type;
  137647. }
  137648. tsParseParenthesizedType() {
  137649. const node = this.startNode();
  137650. this.expect(types$12.parenL);
  137651. node.typeAnnotation = this.tsParseType();
  137652. this.expect(types$12.parenR);
  137653. return this.finishNode(node, "TSParenthesizedType");
  137654. }
  137655. tsParseFunctionOrConstructorType(type, abstract) {
  137656. const node = this.startNode();
  137657. if (type === "TSConstructorType") {
  137658. node.abstract = !!abstract;
  137659. if (abstract)
  137660. this.next();
  137661. this.next();
  137662. }
  137663. this.tsFillSignature(types$12.arrow, node);
  137664. return this.finishNode(node, type);
  137665. }
  137666. tsParseLiteralTypeNode() {
  137667. const node = this.startNode();
  137668. node.literal = (() => {
  137669. switch (this.state.type) {
  137670. case types$12.num:
  137671. case types$12.bigint:
  137672. case types$12.string:
  137673. case types$12._true:
  137674. case types$12._false:
  137675. return this.parseExprAtom();
  137676. default:
  137677. throw this.unexpected();
  137678. }
  137679. })();
  137680. return this.finishNode(node, "TSLiteralType");
  137681. }
  137682. tsParseTemplateLiteralType() {
  137683. const node = this.startNode();
  137684. node.literal = this.parseTemplate(false);
  137685. return this.finishNode(node, "TSLiteralType");
  137686. }
  137687. parseTemplateSubstitution() {
  137688. if (this.state.inType)
  137689. return this.tsParseType();
  137690. return super.parseTemplateSubstitution();
  137691. }
  137692. tsParseThisTypeOrThisTypePredicate() {
  137693. const thisKeyword = this.tsParseThisTypeNode();
  137694. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  137695. return this.tsParseThisTypePredicate(thisKeyword);
  137696. } else {
  137697. return thisKeyword;
  137698. }
  137699. }
  137700. tsParseNonArrayType() {
  137701. switch (this.state.type) {
  137702. case types$12.name:
  137703. case types$12._void:
  137704. case types$12._null: {
  137705. const type = this.match(types$12._void) ? "TSVoidKeyword" : this.match(types$12._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  137706. if (type !== void 0 && this.lookaheadCharCode() !== 46) {
  137707. const node = this.startNode();
  137708. this.next();
  137709. return this.finishNode(node, type);
  137710. }
  137711. return this.tsParseTypeReference();
  137712. }
  137713. case types$12.string:
  137714. case types$12.num:
  137715. case types$12.bigint:
  137716. case types$12._true:
  137717. case types$12._false:
  137718. return this.tsParseLiteralTypeNode();
  137719. case types$12.plusMin:
  137720. if (this.state.value === "-") {
  137721. const node = this.startNode();
  137722. const nextToken = this.lookahead();
  137723. if (nextToken.type !== types$12.num && nextToken.type !== types$12.bigint) {
  137724. throw this.unexpected();
  137725. }
  137726. node.literal = this.parseMaybeUnary();
  137727. return this.finishNode(node, "TSLiteralType");
  137728. }
  137729. break;
  137730. case types$12._this:
  137731. return this.tsParseThisTypeOrThisTypePredicate();
  137732. case types$12._typeof:
  137733. return this.tsParseTypeQuery();
  137734. case types$12._import:
  137735. return this.tsParseImportType();
  137736. case types$12.braceL:
  137737. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  137738. case types$12.bracketL:
  137739. return this.tsParseTupleType();
  137740. case types$12.parenL:
  137741. return this.tsParseParenthesizedType();
  137742. case types$12.backQuote:
  137743. return this.tsParseTemplateLiteralType();
  137744. }
  137745. throw this.unexpected();
  137746. }
  137747. tsParseArrayTypeOrHigher() {
  137748. let type = this.tsParseNonArrayType();
  137749. while (!this.hasPrecedingLineBreak() && this.eat(types$12.bracketL)) {
  137750. if (this.match(types$12.bracketR)) {
  137751. const node = this.startNodeAtNode(type);
  137752. node.elementType = type;
  137753. this.expect(types$12.bracketR);
  137754. type = this.finishNode(node, "TSArrayType");
  137755. } else {
  137756. const node = this.startNodeAtNode(type);
  137757. node.objectType = type;
  137758. node.indexType = this.tsParseType();
  137759. this.expect(types$12.bracketR);
  137760. type = this.finishNode(node, "TSIndexedAccessType");
  137761. }
  137762. }
  137763. return type;
  137764. }
  137765. tsParseTypeOperator(operator) {
  137766. const node = this.startNode();
  137767. this.expectContextual(operator);
  137768. node.operator = operator;
  137769. node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  137770. if (operator === "readonly") {
  137771. this.tsCheckTypeAnnotationForReadOnly(node);
  137772. }
  137773. return this.finishNode(node, "TSTypeOperator");
  137774. }
  137775. tsCheckTypeAnnotationForReadOnly(node) {
  137776. switch (node.typeAnnotation.type) {
  137777. case "TSTupleType":
  137778. case "TSArrayType":
  137779. return;
  137780. default:
  137781. this.raise(node.start, TSErrors.UnexpectedReadonly);
  137782. }
  137783. }
  137784. tsParseInferType() {
  137785. const node = this.startNode();
  137786. this.expectContextual("infer");
  137787. const typeParameter = this.startNode();
  137788. typeParameter.name = this.parseIdentifierName(typeParameter.start);
  137789. node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  137790. return this.finishNode(node, "TSInferType");
  137791. }
  137792. tsParseTypeOperatorOrHigher() {
  137793. const operator = ["keyof", "unique", "readonly"].find((kw2) => this.isContextual(kw2));
  137794. return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
  137795. }
  137796. tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  137797. const node = this.startNode();
  137798. const hasLeadingOperator = this.eat(operator);
  137799. const types3 = [];
  137800. do {
  137801. types3.push(parseConstituentType());
  137802. } while (this.eat(operator));
  137803. if (types3.length === 1 && !hasLeadingOperator) {
  137804. return types3[0];
  137805. }
  137806. node.types = types3;
  137807. return this.finishNode(node, kind);
  137808. }
  137809. tsParseIntersectionTypeOrHigher() {
  137810. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types$12.bitwiseAND);
  137811. }
  137812. tsParseUnionTypeOrHigher() {
  137813. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types$12.bitwiseOR);
  137814. }
  137815. tsIsStartOfFunctionType() {
  137816. if (this.isRelational("<")) {
  137817. return true;
  137818. }
  137819. return this.match(types$12.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  137820. }
  137821. tsSkipParameterStart() {
  137822. if (this.match(types$12.name) || this.match(types$12._this)) {
  137823. this.next();
  137824. return true;
  137825. }
  137826. if (this.match(types$12.braceL)) {
  137827. let braceStackCounter = 1;
  137828. this.next();
  137829. while (braceStackCounter > 0) {
  137830. if (this.match(types$12.braceL)) {
  137831. ++braceStackCounter;
  137832. } else if (this.match(types$12.braceR)) {
  137833. --braceStackCounter;
  137834. }
  137835. this.next();
  137836. }
  137837. return true;
  137838. }
  137839. if (this.match(types$12.bracketL)) {
  137840. let braceStackCounter = 1;
  137841. this.next();
  137842. while (braceStackCounter > 0) {
  137843. if (this.match(types$12.bracketL)) {
  137844. ++braceStackCounter;
  137845. } else if (this.match(types$12.bracketR)) {
  137846. --braceStackCounter;
  137847. }
  137848. this.next();
  137849. }
  137850. return true;
  137851. }
  137852. return false;
  137853. }
  137854. tsIsUnambiguouslyStartOfFunctionType() {
  137855. this.next();
  137856. if (this.match(types$12.parenR) || this.match(types$12.ellipsis)) {
  137857. return true;
  137858. }
  137859. if (this.tsSkipParameterStart()) {
  137860. if (this.match(types$12.colon) || this.match(types$12.comma) || this.match(types$12.question) || this.match(types$12.eq)) {
  137861. return true;
  137862. }
  137863. if (this.match(types$12.parenR)) {
  137864. this.next();
  137865. if (this.match(types$12.arrow)) {
  137866. return true;
  137867. }
  137868. }
  137869. }
  137870. return false;
  137871. }
  137872. tsParseTypeOrTypePredicateAnnotation(returnToken) {
  137873. return this.tsInType(() => {
  137874. const t2 = this.startNode();
  137875. this.expect(returnToken);
  137876. const node = this.startNode();
  137877. const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
  137878. if (asserts && this.match(types$12._this)) {
  137879. let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
  137880. if (thisTypePredicate.type === "TSThisType") {
  137881. node.parameterName = thisTypePredicate;
  137882. node.asserts = true;
  137883. node.typeAnnotation = null;
  137884. thisTypePredicate = this.finishNode(node, "TSTypePredicate");
  137885. } else {
  137886. this.resetStartLocationFromNode(thisTypePredicate, node);
  137887. thisTypePredicate.asserts = true;
  137888. }
  137889. t2.typeAnnotation = thisTypePredicate;
  137890. return this.finishNode(t2, "TSTypeAnnotation");
  137891. }
  137892. const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
  137893. if (!typePredicateVariable) {
  137894. if (!asserts) {
  137895. return this.tsParseTypeAnnotation(false, t2);
  137896. }
  137897. node.parameterName = this.parseIdentifier();
  137898. node.asserts = asserts;
  137899. node.typeAnnotation = null;
  137900. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  137901. return this.finishNode(t2, "TSTypeAnnotation");
  137902. }
  137903. const type = this.tsParseTypeAnnotation(false);
  137904. node.parameterName = typePredicateVariable;
  137905. node.typeAnnotation = type;
  137906. node.asserts = asserts;
  137907. t2.typeAnnotation = this.finishNode(node, "TSTypePredicate");
  137908. return this.finishNode(t2, "TSTypeAnnotation");
  137909. });
  137910. }
  137911. tsTryParseTypeOrTypePredicateAnnotation() {
  137912. return this.match(types$12.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types$12.colon) : void 0;
  137913. }
  137914. tsTryParseTypeAnnotation() {
  137915. return this.match(types$12.colon) ? this.tsParseTypeAnnotation() : void 0;
  137916. }
  137917. tsTryParseType() {
  137918. return this.tsEatThenParseType(types$12.colon);
  137919. }
  137920. tsParseTypePredicatePrefix() {
  137921. const id = this.parseIdentifier();
  137922. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  137923. this.next();
  137924. return id;
  137925. }
  137926. }
  137927. tsParseTypePredicateAsserts() {
  137928. if (!this.match(types$12.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
  137929. return false;
  137930. }
  137931. const containsEsc = this.state.containsEsc;
  137932. this.next();
  137933. if (!this.match(types$12.name) && !this.match(types$12._this)) {
  137934. return false;
  137935. }
  137936. if (containsEsc) {
  137937. this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts");
  137938. }
  137939. return true;
  137940. }
  137941. tsParseTypeAnnotation(eatColon = true, t2 = this.startNode()) {
  137942. this.tsInType(() => {
  137943. if (eatColon)
  137944. this.expect(types$12.colon);
  137945. t2.typeAnnotation = this.tsParseType();
  137946. });
  137947. return this.finishNode(t2, "TSTypeAnnotation");
  137948. }
  137949. tsParseType() {
  137950. assert(this.state.inType);
  137951. const type = this.tsParseNonConditionalType();
  137952. if (this.hasPrecedingLineBreak() || !this.eat(types$12._extends)) {
  137953. return type;
  137954. }
  137955. const node = this.startNodeAtNode(type);
  137956. node.checkType = type;
  137957. node.extendsType = this.tsParseNonConditionalType();
  137958. this.expect(types$12.question);
  137959. node.trueType = this.tsParseType();
  137960. this.expect(types$12.colon);
  137961. node.falseType = this.tsParseType();
  137962. return this.finishNode(node, "TSConditionalType");
  137963. }
  137964. isAbstractConstructorSignature() {
  137965. return this.isContextual("abstract") && this.lookahead().type === types$12._new;
  137966. }
  137967. tsParseNonConditionalType() {
  137968. if (this.tsIsStartOfFunctionType()) {
  137969. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  137970. }
  137971. if (this.match(types$12._new)) {
  137972. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  137973. } else if (this.isAbstractConstructorSignature()) {
  137974. return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
  137975. }
  137976. return this.tsParseUnionTypeOrHigher();
  137977. }
  137978. tsParseTypeAssertion() {
  137979. const node = this.startNode();
  137980. const _const = this.tsTryNextParseConstantContext();
  137981. node.typeAnnotation = _const || this.tsNextThenParseType();
  137982. this.expectRelational(">");
  137983. node.expression = this.parseMaybeUnary();
  137984. return this.finishNode(node, "TSTypeAssertion");
  137985. }
  137986. tsParseHeritageClause(descriptor) {
  137987. const originalStart = this.state.start;
  137988. const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
  137989. if (!delimitedList.length) {
  137990. this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);
  137991. }
  137992. return delimitedList;
  137993. }
  137994. tsParseExpressionWithTypeArguments() {
  137995. const node = this.startNode();
  137996. node.expression = this.tsParseEntityName(false);
  137997. if (this.isRelational("<")) {
  137998. node.typeParameters = this.tsParseTypeArguments();
  137999. }
  138000. return this.finishNode(node, "TSExpressionWithTypeArguments");
  138001. }
  138002. tsParseInterfaceDeclaration(node) {
  138003. node.id = this.parseIdentifier();
  138004. this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
  138005. node.typeParameters = this.tsTryParseTypeParameters();
  138006. if (this.eat(types$12._extends)) {
  138007. node.extends = this.tsParseHeritageClause("extends");
  138008. }
  138009. const body = this.startNode();
  138010. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  138011. node.body = this.finishNode(body, "TSInterfaceBody");
  138012. return this.finishNode(node, "TSInterfaceDeclaration");
  138013. }
  138014. tsParseTypeAliasDeclaration(node) {
  138015. node.id = this.parseIdentifier();
  138016. this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
  138017. node.typeParameters = this.tsTryParseTypeParameters();
  138018. node.typeAnnotation = this.tsInType(() => {
  138019. this.expect(types$12.eq);
  138020. if (this.isContextual("intrinsic") && this.lookahead().type !== types$12.dot) {
  138021. const node2 = this.startNode();
  138022. this.next();
  138023. return this.finishNode(node2, "TSIntrinsicKeyword");
  138024. }
  138025. return this.tsParseType();
  138026. });
  138027. this.semicolon();
  138028. return this.finishNode(node, "TSTypeAliasDeclaration");
  138029. }
  138030. tsInNoContext(cb) {
  138031. const oldContext = this.state.context;
  138032. this.state.context = [oldContext[0]];
  138033. try {
  138034. return cb();
  138035. } finally {
  138036. this.state.context = oldContext;
  138037. }
  138038. }
  138039. tsInType(cb) {
  138040. const oldInType = this.state.inType;
  138041. this.state.inType = true;
  138042. try {
  138043. return cb();
  138044. } finally {
  138045. this.state.inType = oldInType;
  138046. }
  138047. }
  138048. tsEatThenParseType(token) {
  138049. return !this.match(token) ? void 0 : this.tsNextThenParseType();
  138050. }
  138051. tsExpectThenParseType(token) {
  138052. return this.tsDoThenParseType(() => this.expect(token));
  138053. }
  138054. tsNextThenParseType() {
  138055. return this.tsDoThenParseType(() => this.next());
  138056. }
  138057. tsDoThenParseType(cb) {
  138058. return this.tsInType(() => {
  138059. cb();
  138060. return this.tsParseType();
  138061. });
  138062. }
  138063. tsParseEnumMember() {
  138064. const node = this.startNode();
  138065. node.id = this.match(types$12.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  138066. if (this.eat(types$12.eq)) {
  138067. node.initializer = this.parseMaybeAssignAllowIn();
  138068. }
  138069. return this.finishNode(node, "TSEnumMember");
  138070. }
  138071. tsParseEnumDeclaration(node, isConst) {
  138072. if (isConst)
  138073. node.const = true;
  138074. node.id = this.parseIdentifier();
  138075. this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
  138076. this.expect(types$12.braceL);
  138077. node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  138078. this.expect(types$12.braceR);
  138079. return this.finishNode(node, "TSEnumDeclaration");
  138080. }
  138081. tsParseModuleBlock() {
  138082. const node = this.startNode();
  138083. this.scope.enter(SCOPE_OTHER);
  138084. this.expect(types$12.braceL);
  138085. this.parseBlockOrModuleBlockBody(node.body = [], void 0, true, types$12.braceR);
  138086. this.scope.exit();
  138087. return this.finishNode(node, "TSModuleBlock");
  138088. }
  138089. tsParseModuleOrNamespaceDeclaration(node, nested = false) {
  138090. node.id = this.parseIdentifier();
  138091. if (!nested) {
  138092. this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
  138093. }
  138094. if (this.eat(types$12.dot)) {
  138095. const inner = this.startNode();
  138096. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  138097. node.body = inner;
  138098. } else {
  138099. this.scope.enter(SCOPE_TS_MODULE);
  138100. this.prodParam.enter(PARAM);
  138101. node.body = this.tsParseModuleBlock();
  138102. this.prodParam.exit();
  138103. this.scope.exit();
  138104. }
  138105. return this.finishNode(node, "TSModuleDeclaration");
  138106. }
  138107. tsParseAmbientExternalModuleDeclaration(node) {
  138108. if (this.isContextual("global")) {
  138109. node.global = true;
  138110. node.id = this.parseIdentifier();
  138111. } else if (this.match(types$12.string)) {
  138112. node.id = this.parseExprAtom();
  138113. } else {
  138114. this.unexpected();
  138115. }
  138116. if (this.match(types$12.braceL)) {
  138117. this.scope.enter(SCOPE_TS_MODULE);
  138118. this.prodParam.enter(PARAM);
  138119. node.body = this.tsParseModuleBlock();
  138120. this.prodParam.exit();
  138121. this.scope.exit();
  138122. } else {
  138123. this.semicolon();
  138124. }
  138125. return this.finishNode(node, "TSModuleDeclaration");
  138126. }
  138127. tsParseImportEqualsDeclaration(node, isExport) {
  138128. node.isExport = isExport || false;
  138129. node.id = this.parseIdentifier();
  138130. this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL2);
  138131. this.expect(types$12.eq);
  138132. const moduleReference = this.tsParseModuleReference();
  138133. if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
  138134. this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType);
  138135. }
  138136. node.moduleReference = moduleReference;
  138137. this.semicolon();
  138138. return this.finishNode(node, "TSImportEqualsDeclaration");
  138139. }
  138140. tsIsExternalModuleReference() {
  138141. return this.isContextual("require") && this.lookaheadCharCode() === 40;
  138142. }
  138143. tsParseModuleReference() {
  138144. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  138145. }
  138146. tsParseExternalModuleReference() {
  138147. const node = this.startNode();
  138148. this.expectContextual("require");
  138149. this.expect(types$12.parenL);
  138150. if (!this.match(types$12.string)) {
  138151. throw this.unexpected();
  138152. }
  138153. node.expression = this.parseExprAtom();
  138154. this.expect(types$12.parenR);
  138155. return this.finishNode(node, "TSExternalModuleReference");
  138156. }
  138157. tsLookAhead(f) {
  138158. const state = this.state.clone();
  138159. const res = f();
  138160. this.state = state;
  138161. return res;
  138162. }
  138163. tsTryParseAndCatch(f) {
  138164. const result = this.tryParse((abort) => f() || abort());
  138165. if (result.aborted || !result.node)
  138166. return void 0;
  138167. if (result.error)
  138168. this.state = result.failState;
  138169. return result.node;
  138170. }
  138171. tsTryParse(f) {
  138172. const state = this.state.clone();
  138173. const result = f();
  138174. if (result !== void 0 && result !== false) {
  138175. return result;
  138176. } else {
  138177. this.state = state;
  138178. return void 0;
  138179. }
  138180. }
  138181. tsTryParseDeclare(nany) {
  138182. if (this.isLineTerminator()) {
  138183. return;
  138184. }
  138185. let starttype = this.state.type;
  138186. let kind;
  138187. if (this.isContextual("let")) {
  138188. starttype = types$12._var;
  138189. kind = "let";
  138190. }
  138191. return this.tsInAmbientContext(() => {
  138192. switch (starttype) {
  138193. case types$12._function:
  138194. nany.declare = true;
  138195. return this.parseFunctionStatement(nany, false, true);
  138196. case types$12._class:
  138197. nany.declare = true;
  138198. return this.parseClass(nany, true, false);
  138199. case types$12._const:
  138200. if (this.match(types$12._const) && this.isLookaheadContextual("enum")) {
  138201. this.expect(types$12._const);
  138202. this.expectContextual("enum");
  138203. return this.tsParseEnumDeclaration(nany, true);
  138204. }
  138205. case types$12._var:
  138206. kind = kind || this.state.value;
  138207. return this.parseVarStatement(nany, kind);
  138208. case types$12.name: {
  138209. const value = this.state.value;
  138210. if (value === "global") {
  138211. return this.tsParseAmbientExternalModuleDeclaration(nany);
  138212. } else {
  138213. return this.tsParseDeclaration(nany, value, true);
  138214. }
  138215. }
  138216. }
  138217. });
  138218. }
  138219. tsTryParseExportDeclaration() {
  138220. return this.tsParseDeclaration(this.startNode(), this.state.value, true);
  138221. }
  138222. tsParseExpressionStatement(node, expr) {
  138223. switch (expr.name) {
  138224. case "declare": {
  138225. const declaration = this.tsTryParseDeclare(node);
  138226. if (declaration) {
  138227. declaration.declare = true;
  138228. return declaration;
  138229. }
  138230. break;
  138231. }
  138232. case "global":
  138233. if (this.match(types$12.braceL)) {
  138234. this.scope.enter(SCOPE_TS_MODULE);
  138235. this.prodParam.enter(PARAM);
  138236. const mod = node;
  138237. mod.global = true;
  138238. mod.id = expr;
  138239. mod.body = this.tsParseModuleBlock();
  138240. this.scope.exit();
  138241. this.prodParam.exit();
  138242. return this.finishNode(mod, "TSModuleDeclaration");
  138243. }
  138244. break;
  138245. default:
  138246. return this.tsParseDeclaration(node, expr.name, false);
  138247. }
  138248. }
  138249. tsParseDeclaration(node, value, next) {
  138250. switch (value) {
  138251. case "abstract":
  138252. if (this.tsCheckLineTerminator(next) && (this.match(types$12._class) || this.match(types$12.name))) {
  138253. return this.tsParseAbstractDeclaration(node);
  138254. }
  138255. break;
  138256. case "enum":
  138257. if (next || this.match(types$12.name)) {
  138258. if (next)
  138259. this.next();
  138260. return this.tsParseEnumDeclaration(node, false);
  138261. }
  138262. break;
  138263. case "interface":
  138264. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  138265. return this.tsParseInterfaceDeclaration(node);
  138266. }
  138267. break;
  138268. case "module":
  138269. if (this.tsCheckLineTerminator(next)) {
  138270. if (this.match(types$12.string)) {
  138271. return this.tsParseAmbientExternalModuleDeclaration(node);
  138272. } else if (this.match(types$12.name)) {
  138273. return this.tsParseModuleOrNamespaceDeclaration(node);
  138274. }
  138275. }
  138276. break;
  138277. case "namespace":
  138278. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  138279. return this.tsParseModuleOrNamespaceDeclaration(node);
  138280. }
  138281. break;
  138282. case "type":
  138283. if (this.tsCheckLineTerminator(next) && this.match(types$12.name)) {
  138284. return this.tsParseTypeAliasDeclaration(node);
  138285. }
  138286. break;
  138287. }
  138288. }
  138289. tsCheckLineTerminator(next) {
  138290. if (next) {
  138291. if (this.hasFollowingLineBreak())
  138292. return false;
  138293. this.next();
  138294. return true;
  138295. }
  138296. return !this.isLineTerminator();
  138297. }
  138298. tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
  138299. if (!this.isRelational("<")) {
  138300. return void 0;
  138301. }
  138302. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  138303. this.state.maybeInArrowParameters = true;
  138304. const res = this.tsTryParseAndCatch(() => {
  138305. const node = this.startNodeAt(startPos, startLoc);
  138306. node.typeParameters = this.tsParseTypeParameters();
  138307. super.parseFunctionParams(node);
  138308. node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
  138309. this.expect(types$12.arrow);
  138310. return node;
  138311. });
  138312. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  138313. if (!res) {
  138314. return void 0;
  138315. }
  138316. return this.parseArrowExpression(res, null, true);
  138317. }
  138318. tsParseTypeArguments() {
  138319. const node = this.startNode();
  138320. node.params = this.tsInType(() => this.tsInNoContext(() => {
  138321. this.expectRelational("<");
  138322. return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
  138323. }));
  138324. if (node.params.length === 0) {
  138325. this.raise(node.start, TSErrors.EmptyTypeArguments);
  138326. }
  138327. this.expectRelational(">");
  138328. return this.finishNode(node, "TSTypeParameterInstantiation");
  138329. }
  138330. tsIsDeclarationStart() {
  138331. if (this.match(types$12.name)) {
  138332. switch (this.state.value) {
  138333. case "abstract":
  138334. case "declare":
  138335. case "enum":
  138336. case "interface":
  138337. case "module":
  138338. case "namespace":
  138339. case "type":
  138340. return true;
  138341. }
  138342. }
  138343. return false;
  138344. }
  138345. isExportDefaultSpecifier() {
  138346. if (this.tsIsDeclarationStart())
  138347. return false;
  138348. return super.isExportDefaultSpecifier();
  138349. }
  138350. parseAssignableListItem(allowModifiers, decorators) {
  138351. const startPos = this.state.start;
  138352. const startLoc = this.state.startLoc;
  138353. let accessibility;
  138354. let readonly = false;
  138355. if (allowModifiers !== void 0) {
  138356. accessibility = this.parseAccessModifier();
  138357. readonly = !!this.tsParseModifier(["readonly"]);
  138358. if (allowModifiers === false && (accessibility || readonly)) {
  138359. this.raise(startPos, TSErrors.UnexpectedParameterModifier);
  138360. }
  138361. }
  138362. const left = this.parseMaybeDefault();
  138363. this.parseAssignableListItemTypes(left);
  138364. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  138365. if (accessibility || readonly) {
  138366. const pp2 = this.startNodeAt(startPos, startLoc);
  138367. if (decorators.length) {
  138368. pp2.decorators = decorators;
  138369. }
  138370. if (accessibility)
  138371. pp2.accessibility = accessibility;
  138372. if (readonly)
  138373. pp2.readonly = readonly;
  138374. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  138375. this.raise(pp2.start, TSErrors.UnsupportedParameterPropertyKind);
  138376. }
  138377. pp2.parameter = elt;
  138378. return this.finishNode(pp2, "TSParameterProperty");
  138379. }
  138380. if (decorators.length) {
  138381. left.decorators = decorators;
  138382. }
  138383. return elt;
  138384. }
  138385. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  138386. if (this.match(types$12.colon)) {
  138387. node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  138388. }
  138389. const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : void 0;
  138390. if (bodilessType && !this.match(types$12.braceL) && this.isLineTerminator()) {
  138391. this.finishNode(node, bodilessType);
  138392. return;
  138393. }
  138394. if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
  138395. this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);
  138396. if (node.declare) {
  138397. super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
  138398. return;
  138399. }
  138400. }
  138401. super.parseFunctionBodyAndFinish(node, type, isMethod);
  138402. }
  138403. registerFunctionStatementId(node) {
  138404. if (!node.body && node.id) {
  138405. this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
  138406. } else {
  138407. super.registerFunctionStatementId(...arguments);
  138408. }
  138409. }
  138410. tsCheckForInvalidTypeCasts(items) {
  138411. items.forEach((node) => {
  138412. if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
  138413. this.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation);
  138414. }
  138415. });
  138416. }
  138417. toReferencedList(exprList, isInParens) {
  138418. this.tsCheckForInvalidTypeCasts(exprList);
  138419. return exprList;
  138420. }
  138421. parseArrayLike(...args) {
  138422. const node = super.parseArrayLike(...args);
  138423. if (node.type === "ArrayExpression") {
  138424. this.tsCheckForInvalidTypeCasts(node.elements);
  138425. }
  138426. return node;
  138427. }
  138428. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  138429. if (!this.hasPrecedingLineBreak() && this.match(types$12.bang)) {
  138430. this.next();
  138431. const nonNullExpression = this.startNodeAt(startPos, startLoc);
  138432. nonNullExpression.expression = base2;
  138433. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  138434. }
  138435. if (this.isRelational("<")) {
  138436. const result = this.tsTryParseAndCatch(() => {
  138437. if (!noCalls && this.atPossibleAsyncArrow(base2)) {
  138438. const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
  138439. if (asyncArrowFn) {
  138440. return asyncArrowFn;
  138441. }
  138442. }
  138443. const node = this.startNodeAt(startPos, startLoc);
  138444. node.callee = base2;
  138445. const typeArguments = this.tsParseTypeArguments();
  138446. if (typeArguments) {
  138447. if (!noCalls && this.eat(types$12.parenL)) {
  138448. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  138449. this.tsCheckForInvalidTypeCasts(node.arguments);
  138450. node.typeParameters = typeArguments;
  138451. if (state.optionalChainMember) {
  138452. node.optional = false;
  138453. }
  138454. return this.finishCallExpression(node, state.optionalChainMember);
  138455. } else if (this.match(types$12.backQuote)) {
  138456. const result2 = this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  138457. result2.typeParameters = typeArguments;
  138458. return result2;
  138459. }
  138460. }
  138461. this.unexpected();
  138462. });
  138463. if (result)
  138464. return result;
  138465. }
  138466. return super.parseSubscript(base2, startPos, startLoc, noCalls, state);
  138467. }
  138468. parseNewArguments(node) {
  138469. if (this.isRelational("<")) {
  138470. const typeParameters = this.tsTryParseAndCatch(() => {
  138471. const args = this.tsParseTypeArguments();
  138472. if (!this.match(types$12.parenL))
  138473. this.unexpected();
  138474. return args;
  138475. });
  138476. if (typeParameters) {
  138477. node.typeParameters = typeParameters;
  138478. }
  138479. }
  138480. super.parseNewArguments(node);
  138481. }
  138482. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  138483. if (nonNull(types$12._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
  138484. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  138485. node.expression = left;
  138486. const _const = this.tsTryNextParseConstantContext();
  138487. if (_const) {
  138488. node.typeAnnotation = _const;
  138489. } else {
  138490. node.typeAnnotation = this.tsNextThenParseType();
  138491. }
  138492. this.finishNode(node, "TSAsExpression");
  138493. this.reScan_lt_gt();
  138494. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  138495. }
  138496. return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);
  138497. }
  138498. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  138499. }
  138500. checkDuplicateExports() {
  138501. }
  138502. parseImport(node) {
  138503. node.importKind = "value";
  138504. if (this.match(types$12.name) || this.match(types$12.star) || this.match(types$12.braceL)) {
  138505. let ahead = this.lookahead();
  138506. if (this.isContextual("type") && ahead.type !== types$12.comma && !(ahead.type === types$12.name && ahead.value === "from") && ahead.type !== types$12.eq) {
  138507. node.importKind = "type";
  138508. this.next();
  138509. ahead = this.lookahead();
  138510. }
  138511. if (this.match(types$12.name) && ahead.type === types$12.eq) {
  138512. return this.tsParseImportEqualsDeclaration(node);
  138513. }
  138514. }
  138515. const importNode = super.parseImport(node);
  138516. if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
  138517. this.raise(importNode.start, TSErrors.TypeImportCannotSpecifyDefaultAndNamed);
  138518. }
  138519. return importNode;
  138520. }
  138521. parseExport(node) {
  138522. if (this.match(types$12._import)) {
  138523. this.next();
  138524. if (this.isContextual("type") && this.lookaheadCharCode() !== 61) {
  138525. node.importKind = "type";
  138526. this.next();
  138527. } else {
  138528. node.importKind = "value";
  138529. }
  138530. return this.tsParseImportEqualsDeclaration(node, true);
  138531. } else if (this.eat(types$12.eq)) {
  138532. const assign = node;
  138533. assign.expression = this.parseExpression();
  138534. this.semicolon();
  138535. return this.finishNode(assign, "TSExportAssignment");
  138536. } else if (this.eatContextual("as")) {
  138537. const decl = node;
  138538. this.expectContextual("namespace");
  138539. decl.id = this.parseIdentifier();
  138540. this.semicolon();
  138541. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  138542. } else {
  138543. if (this.isContextual("type") && this.lookahead().type === types$12.braceL) {
  138544. this.next();
  138545. node.exportKind = "type";
  138546. } else {
  138547. node.exportKind = "value";
  138548. }
  138549. return super.parseExport(node);
  138550. }
  138551. }
  138552. isAbstractClass() {
  138553. return this.isContextual("abstract") && this.lookahead().type === types$12._class;
  138554. }
  138555. parseExportDefaultExpression() {
  138556. if (this.isAbstractClass()) {
  138557. const cls = this.startNode();
  138558. this.next();
  138559. cls.abstract = true;
  138560. this.parseClass(cls, true, true);
  138561. return cls;
  138562. }
  138563. if (this.state.value === "interface") {
  138564. const result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
  138565. if (result)
  138566. return result;
  138567. }
  138568. return super.parseExportDefaultExpression();
  138569. }
  138570. parseStatementContent(context, topLevel) {
  138571. if (this.state.type === types$12._const) {
  138572. const ahead = this.lookahead();
  138573. if (ahead.type === types$12.name && ahead.value === "enum") {
  138574. const node = this.startNode();
  138575. this.expect(types$12._const);
  138576. this.expectContextual("enum");
  138577. return this.tsParseEnumDeclaration(node, true);
  138578. }
  138579. }
  138580. return super.parseStatementContent(context, topLevel);
  138581. }
  138582. parseAccessModifier() {
  138583. return this.tsParseModifier(["public", "protected", "private"]);
  138584. }
  138585. tsHasSomeModifiers(member, modifiers) {
  138586. return modifiers.some((modifier) => {
  138587. if (tsIsAccessModifier(modifier)) {
  138588. return member.accessibility === modifier;
  138589. }
  138590. return !!member[modifier];
  138591. });
  138592. }
  138593. parseClassMember(classBody, member, state) {
  138594. const invalidModifersForStaticBlocks = ["declare", "private", "public", "protected", "override", "abstract", "readonly"];
  138595. this.tsParseModifiers(member, invalidModifersForStaticBlocks.concat(["static"]));
  138596. const callParseClassMemberWithIsStatic = () => {
  138597. const isStatic = !!member.static;
  138598. if (isStatic && this.eat(types$12.braceL)) {
  138599. if (this.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {
  138600. this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier);
  138601. }
  138602. this.parseClassStaticBlock(classBody, member);
  138603. } else {
  138604. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  138605. }
  138606. };
  138607. if (member.declare) {
  138608. this.tsInAmbientContext(callParseClassMemberWithIsStatic);
  138609. } else {
  138610. callParseClassMemberWithIsStatic();
  138611. }
  138612. }
  138613. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  138614. const idx = this.tsTryParseIndexSignature(member);
  138615. if (idx) {
  138616. classBody.body.push(idx);
  138617. if (member.abstract) {
  138618. this.raise(member.start, TSErrors.IndexSignatureHasAbstract);
  138619. }
  138620. if (member.accessibility) {
  138621. this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility);
  138622. }
  138623. if (member.declare) {
  138624. this.raise(member.start, TSErrors.IndexSignatureHasDeclare);
  138625. }
  138626. if (member.override) {
  138627. this.raise(member.start, TSErrors.IndexSignatureHasOverride);
  138628. }
  138629. return;
  138630. }
  138631. if (!this.state.inAbstractClass && member.abstract) {
  138632. this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod);
  138633. }
  138634. if (member.override) {
  138635. if (!state.hadSuperClass) {
  138636. this.raise(member.start, TSErrors.OverrideNotInSubClass);
  138637. }
  138638. }
  138639. super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  138640. }
  138641. parsePostMemberNameModifiers(methodOrProp) {
  138642. const optional = this.eat(types$12.question);
  138643. if (optional)
  138644. methodOrProp.optional = true;
  138645. if (methodOrProp.readonly && this.match(types$12.parenL)) {
  138646. this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);
  138647. }
  138648. if (methodOrProp.declare && this.match(types$12.parenL)) {
  138649. this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);
  138650. }
  138651. }
  138652. parseExpressionStatement(node, expr) {
  138653. const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0;
  138654. return decl || super.parseExpressionStatement(node, expr);
  138655. }
  138656. shouldParseExportDeclaration() {
  138657. if (this.tsIsDeclarationStart())
  138658. return true;
  138659. return super.shouldParseExportDeclaration();
  138660. }
  138661. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  138662. if (!refNeedsArrowPos || !this.match(types$12.question)) {
  138663. return super.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
  138664. }
  138665. const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
  138666. if (!result.node) {
  138667. refNeedsArrowPos.start = result.error.pos || this.state.start;
  138668. return expr;
  138669. }
  138670. if (result.error)
  138671. this.state = result.failState;
  138672. return result.node;
  138673. }
  138674. parseParenItem(node, startPos, startLoc) {
  138675. node = super.parseParenItem(node, startPos, startLoc);
  138676. if (this.eat(types$12.question)) {
  138677. node.optional = true;
  138678. this.resetEndLocation(node);
  138679. }
  138680. if (this.match(types$12.colon)) {
  138681. const typeCastNode = this.startNodeAt(startPos, startLoc);
  138682. typeCastNode.expression = node;
  138683. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  138684. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  138685. }
  138686. return node;
  138687. }
  138688. parseExportDeclaration(node) {
  138689. const startPos = this.state.start;
  138690. const startLoc = this.state.startLoc;
  138691. const isDeclare = this.eatContextual("declare");
  138692. if (isDeclare && (this.isContextual("declare") || !this.shouldParseExportDeclaration())) {
  138693. throw this.raise(this.state.start, TSErrors.ExpectedAmbientAfterExportDeclare);
  138694. }
  138695. let declaration;
  138696. if (this.match(types$12.name)) {
  138697. declaration = this.tsTryParseExportDeclaration();
  138698. }
  138699. if (!declaration) {
  138700. declaration = super.parseExportDeclaration(node);
  138701. }
  138702. if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
  138703. node.exportKind = "type";
  138704. }
  138705. if (declaration && isDeclare) {
  138706. this.resetStartLocation(declaration, startPos, startLoc);
  138707. declaration.declare = true;
  138708. }
  138709. return declaration;
  138710. }
  138711. parseClassId(node, isStatement, optionalId) {
  138712. if ((!isStatement || optionalId) && this.isContextual("implements")) {
  138713. return;
  138714. }
  138715. super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  138716. const typeParameters = this.tsTryParseTypeParameters();
  138717. if (typeParameters)
  138718. node.typeParameters = typeParameters;
  138719. }
  138720. parseClassPropertyAnnotation(node) {
  138721. if (!node.optional && this.eat(types$12.bang)) {
  138722. node.definite = true;
  138723. }
  138724. const type = this.tsTryParseTypeAnnotation();
  138725. if (type)
  138726. node.typeAnnotation = type;
  138727. }
  138728. parseClassProperty(node) {
  138729. this.parseClassPropertyAnnotation(node);
  138730. if (this.state.isAmbientContext && this.match(types$12.eq)) {
  138731. this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
  138732. }
  138733. return super.parseClassProperty(node);
  138734. }
  138735. parseClassPrivateProperty(node) {
  138736. if (node.abstract) {
  138737. this.raise(node.start, TSErrors.PrivateElementHasAbstract);
  138738. }
  138739. if (node.accessibility) {
  138740. this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility);
  138741. }
  138742. this.parseClassPropertyAnnotation(node);
  138743. return super.parseClassPrivateProperty(node);
  138744. }
  138745. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  138746. const typeParameters = this.tsTryParseTypeParameters();
  138747. if (typeParameters && isConstructor) {
  138748. this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);
  138749. }
  138750. if (method.declare && (method.kind === "get" || method.kind === "set")) {
  138751. this.raise(method.start, TSErrors.DeclareAccessor, method.kind);
  138752. }
  138753. if (typeParameters)
  138754. method.typeParameters = typeParameters;
  138755. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  138756. }
  138757. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  138758. const typeParameters = this.tsTryParseTypeParameters();
  138759. if (typeParameters)
  138760. method.typeParameters = typeParameters;
  138761. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  138762. }
  138763. parseClassSuper(node) {
  138764. super.parseClassSuper(node);
  138765. if (node.superClass && this.isRelational("<")) {
  138766. node.superTypeParameters = this.tsParseTypeArguments();
  138767. }
  138768. if (this.eatContextual("implements")) {
  138769. node.implements = this.tsParseHeritageClause("implements");
  138770. }
  138771. }
  138772. parseObjPropValue(prop, ...args) {
  138773. const typeParameters = this.tsTryParseTypeParameters();
  138774. if (typeParameters)
  138775. prop.typeParameters = typeParameters;
  138776. super.parseObjPropValue(prop, ...args);
  138777. }
  138778. parseFunctionParams(node, allowModifiers) {
  138779. const typeParameters = this.tsTryParseTypeParameters();
  138780. if (typeParameters)
  138781. node.typeParameters = typeParameters;
  138782. super.parseFunctionParams(node, allowModifiers);
  138783. }
  138784. parseVarId(decl, kind) {
  138785. super.parseVarId(decl, kind);
  138786. if (decl.id.type === "Identifier" && this.eat(types$12.bang)) {
  138787. decl.definite = true;
  138788. }
  138789. const type = this.tsTryParseTypeAnnotation();
  138790. if (type) {
  138791. decl.id.typeAnnotation = type;
  138792. this.resetEndLocation(decl.id);
  138793. }
  138794. }
  138795. parseAsyncArrowFromCallExpression(node, call) {
  138796. if (this.match(types$12.colon)) {
  138797. node.returnType = this.tsParseTypeAnnotation();
  138798. }
  138799. return super.parseAsyncArrowFromCallExpression(node, call);
  138800. }
  138801. parseMaybeAssign(...args) {
  138802. var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
  138803. let state;
  138804. let jsx2;
  138805. let typeCast;
  138806. if (this.hasPlugin("jsx") && (this.match(types$12.jsxTagStart) || this.isRelational("<"))) {
  138807. state = this.state.clone();
  138808. jsx2 = this.tryParse(() => super.parseMaybeAssign(...args), state);
  138809. if (!jsx2.error)
  138810. return jsx2.node;
  138811. const {
  138812. context
  138813. } = this.state;
  138814. if (context[context.length - 1] === types2.j_oTag) {
  138815. context.length -= 2;
  138816. } else if (context[context.length - 1] === types2.j_expr) {
  138817. context.length -= 1;
  138818. }
  138819. }
  138820. if (!((_jsx = jsx2) != null && _jsx.error) && !this.isRelational("<")) {
  138821. return super.parseMaybeAssign(...args);
  138822. }
  138823. let typeParameters;
  138824. state = state || this.state.clone();
  138825. const arrow = this.tryParse((abort) => {
  138826. var _expr$extra, _typeParameters;
  138827. typeParameters = this.tsParseTypeParameters();
  138828. const expr = super.parseMaybeAssign(...args);
  138829. if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
  138830. abort();
  138831. }
  138832. if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
  138833. this.resetStartLocationFromNode(expr, typeParameters);
  138834. }
  138835. expr.typeParameters = typeParameters;
  138836. return expr;
  138837. }, state);
  138838. if (!arrow.error && !arrow.aborted)
  138839. return arrow.node;
  138840. if (!jsx2) {
  138841. assert(!this.hasPlugin("jsx"));
  138842. typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);
  138843. if (!typeCast.error)
  138844. return typeCast.node;
  138845. }
  138846. if ((_jsx2 = jsx2) != null && _jsx2.node) {
  138847. this.state = jsx2.failState;
  138848. return jsx2.node;
  138849. }
  138850. if (arrow.node) {
  138851. this.state = arrow.failState;
  138852. return arrow.node;
  138853. }
  138854. if ((_typeCast = typeCast) != null && _typeCast.node) {
  138855. this.state = typeCast.failState;
  138856. return typeCast.node;
  138857. }
  138858. if ((_jsx3 = jsx2) != null && _jsx3.thrown)
  138859. throw jsx2.error;
  138860. if (arrow.thrown)
  138861. throw arrow.error;
  138862. if ((_typeCast2 = typeCast) != null && _typeCast2.thrown)
  138863. throw typeCast.error;
  138864. throw ((_jsx4 = jsx2) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
  138865. }
  138866. parseMaybeUnary(refExpressionErrors) {
  138867. if (!this.hasPlugin("jsx") && this.isRelational("<")) {
  138868. return this.tsParseTypeAssertion();
  138869. } else {
  138870. return super.parseMaybeUnary(refExpressionErrors);
  138871. }
  138872. }
  138873. parseArrow(node) {
  138874. if (this.match(types$12.colon)) {
  138875. const result = this.tryParse((abort) => {
  138876. const returnType = this.tsParseTypeOrTypePredicateAnnotation(types$12.colon);
  138877. if (this.canInsertSemicolon() || !this.match(types$12.arrow))
  138878. abort();
  138879. return returnType;
  138880. });
  138881. if (result.aborted)
  138882. return;
  138883. if (!result.thrown) {
  138884. if (result.error)
  138885. this.state = result.failState;
  138886. node.returnType = result.node;
  138887. }
  138888. }
  138889. return super.parseArrow(node);
  138890. }
  138891. parseAssignableListItemTypes(param) {
  138892. if (this.eat(types$12.question)) {
  138893. if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) {
  138894. this.raise(param.start, TSErrors.PatternIsOptional);
  138895. }
  138896. param.optional = true;
  138897. }
  138898. const type = this.tsTryParseTypeAnnotation();
  138899. if (type)
  138900. param.typeAnnotation = type;
  138901. this.resetEndLocation(param);
  138902. return param;
  138903. }
  138904. toAssignable(node, isLHS = false) {
  138905. switch (node.type) {
  138906. case "TSTypeCastExpression":
  138907. return super.toAssignable(this.typeCastToParameter(node), isLHS);
  138908. case "TSParameterProperty":
  138909. return super.toAssignable(node, isLHS);
  138910. case "ParenthesizedExpression":
  138911. return this.toAssignableParenthesizedExpression(node, isLHS);
  138912. case "TSAsExpression":
  138913. case "TSNonNullExpression":
  138914. case "TSTypeAssertion":
  138915. node.expression = this.toAssignable(node.expression, isLHS);
  138916. return node;
  138917. default:
  138918. return super.toAssignable(node, isLHS);
  138919. }
  138920. }
  138921. toAssignableParenthesizedExpression(node, isLHS) {
  138922. switch (node.expression.type) {
  138923. case "TSAsExpression":
  138924. case "TSNonNullExpression":
  138925. case "TSTypeAssertion":
  138926. case "ParenthesizedExpression":
  138927. node.expression = this.toAssignable(node.expression, isLHS);
  138928. return node;
  138929. default:
  138930. return super.toAssignable(node, isLHS);
  138931. }
  138932. }
  138933. checkLVal(expr, contextDescription, ...args) {
  138934. var _expr$extra2;
  138935. switch (expr.type) {
  138936. case "TSTypeCastExpression":
  138937. return;
  138938. case "TSParameterProperty":
  138939. this.checkLVal(expr.parameter, "parameter property", ...args);
  138940. return;
  138941. case "TSAsExpression":
  138942. case "TSTypeAssertion":
  138943. if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) {
  138944. this.raise(expr.start, ErrorMessages.InvalidLhs, contextDescription);
  138945. break;
  138946. }
  138947. this.checkLVal(expr.expression, "parenthesized expression", ...args);
  138948. return;
  138949. case "TSNonNullExpression":
  138950. this.checkLVal(expr.expression, contextDescription, ...args);
  138951. return;
  138952. default:
  138953. super.checkLVal(expr, contextDescription, ...args);
  138954. return;
  138955. }
  138956. }
  138957. parseBindingAtom() {
  138958. switch (this.state.type) {
  138959. case types$12._this:
  138960. return this.parseIdentifier(true);
  138961. default:
  138962. return super.parseBindingAtom();
  138963. }
  138964. }
  138965. parseMaybeDecoratorArguments(expr) {
  138966. if (this.isRelational("<")) {
  138967. const typeArguments = this.tsParseTypeArguments();
  138968. if (this.match(types$12.parenL)) {
  138969. const call = super.parseMaybeDecoratorArguments(expr);
  138970. call.typeParameters = typeArguments;
  138971. return call;
  138972. }
  138973. this.unexpected(this.state.start, types$12.parenL);
  138974. }
  138975. return super.parseMaybeDecoratorArguments(expr);
  138976. }
  138977. checkCommaAfterRest(close) {
  138978. if (this.state.isAmbientContext && this.match(types$12.comma) && this.lookaheadCharCode() === close) {
  138979. this.next();
  138980. } else {
  138981. super.checkCommaAfterRest(close);
  138982. }
  138983. }
  138984. isClassMethod() {
  138985. return this.isRelational("<") || super.isClassMethod();
  138986. }
  138987. isClassProperty() {
  138988. return this.match(types$12.bang) || this.match(types$12.colon) || super.isClassProperty();
  138989. }
  138990. parseMaybeDefault(...args) {
  138991. const node = super.parseMaybeDefault(...args);
  138992. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  138993. this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign);
  138994. }
  138995. return node;
  138996. }
  138997. getTokenFromCode(code2) {
  138998. if (this.state.inType && (code2 === 62 || code2 === 60)) {
  138999. return this.finishOp(types$12.relational, 1);
  139000. } else {
  139001. return super.getTokenFromCode(code2);
  139002. }
  139003. }
  139004. reScan_lt_gt() {
  139005. if (this.match(types$12.relational)) {
  139006. const code2 = this.input.charCodeAt(this.state.start);
  139007. if (code2 === 60 || code2 === 62) {
  139008. this.state.pos -= 1;
  139009. this.readToken_lt_gt(code2);
  139010. }
  139011. }
  139012. }
  139013. toAssignableList(exprList) {
  139014. for (let i = 0; i < exprList.length; i++) {
  139015. const expr = exprList[i];
  139016. if (!expr)
  139017. continue;
  139018. switch (expr.type) {
  139019. case "TSTypeCastExpression":
  139020. exprList[i] = this.typeCastToParameter(expr);
  139021. break;
  139022. case "TSAsExpression":
  139023. case "TSTypeAssertion":
  139024. if (!this.state.maybeInArrowParameters) {
  139025. exprList[i] = this.typeCastToParameter(expr);
  139026. } else {
  139027. this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);
  139028. }
  139029. break;
  139030. }
  139031. }
  139032. return super.toAssignableList(...arguments);
  139033. }
  139034. typeCastToParameter(node) {
  139035. node.expression.typeAnnotation = node.typeAnnotation;
  139036. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  139037. return node.expression;
  139038. }
  139039. shouldParseArrow() {
  139040. return this.match(types$12.colon) || super.shouldParseArrow();
  139041. }
  139042. shouldParseAsyncArrow() {
  139043. return this.match(types$12.colon) || super.shouldParseAsyncArrow();
  139044. }
  139045. canHaveLeadingDecorator() {
  139046. return super.canHaveLeadingDecorator() || this.isAbstractClass();
  139047. }
  139048. jsxParseOpeningElementAfterName(node) {
  139049. if (this.isRelational("<")) {
  139050. const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
  139051. if (typeArguments)
  139052. node.typeParameters = typeArguments;
  139053. }
  139054. return super.jsxParseOpeningElementAfterName(node);
  139055. }
  139056. getGetterSetterExpectedParamCount(method) {
  139057. const baseCount = super.getGetterSetterExpectedParamCount(method);
  139058. const params = this.getObjectOrClassMethodParams(method);
  139059. const firstParam = params[0];
  139060. const hasContextParam = firstParam && this.isThisParam(firstParam);
  139061. return hasContextParam ? baseCount + 1 : baseCount;
  139062. }
  139063. parseCatchClauseParam() {
  139064. const param = super.parseCatchClauseParam();
  139065. const type = this.tsTryParseTypeAnnotation();
  139066. if (type) {
  139067. param.typeAnnotation = type;
  139068. this.resetEndLocation(param);
  139069. }
  139070. return param;
  139071. }
  139072. tsInAmbientContext(cb) {
  139073. const oldIsAmbientContext = this.state.isAmbientContext;
  139074. this.state.isAmbientContext = true;
  139075. try {
  139076. return cb();
  139077. } finally {
  139078. this.state.isAmbientContext = oldIsAmbientContext;
  139079. }
  139080. }
  139081. parseClass(node, ...args) {
  139082. const oldInAbstractClass = this.state.inAbstractClass;
  139083. this.state.inAbstractClass = !!node.abstract;
  139084. try {
  139085. return super.parseClass(node, ...args);
  139086. } finally {
  139087. this.state.inAbstractClass = oldInAbstractClass;
  139088. }
  139089. }
  139090. tsParseAbstractDeclaration(node) {
  139091. if (this.match(types$12._class)) {
  139092. node.abstract = true;
  139093. return this.parseClass(node, true, false);
  139094. } else if (this.isContextual("interface")) {
  139095. if (!this.hasFollowingLineBreak()) {
  139096. node.abstract = true;
  139097. this.raise(node.start, TSErrors.NonClassMethodPropertyHasAbstractModifer);
  139098. this.next();
  139099. return this.tsParseInterfaceDeclaration(node);
  139100. }
  139101. } else {
  139102. this.unexpected(null, types$12._class);
  139103. }
  139104. }
  139105. parseMethod(...args) {
  139106. const method = super.parseMethod(...args);
  139107. if (method.abstract) {
  139108. const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
  139109. if (hasBody) {
  139110. const {
  139111. key
  139112. } = method;
  139113. this.raise(method.start, TSErrors.AbstractMethodHasImplementation, key.type === "Identifier" ? key.name : `[${this.input.slice(key.start, key.end)}]`);
  139114. }
  139115. }
  139116. return method;
  139117. }
  139118. shouldParseAsAmbientContext() {
  139119. return !!this.getPluginOption("typescript", "dts");
  139120. }
  139121. parse() {
  139122. if (this.shouldParseAsAmbientContext()) {
  139123. this.state.isAmbientContext = true;
  139124. }
  139125. return super.parse();
  139126. }
  139127. getExpression() {
  139128. if (this.shouldParseAsAmbientContext()) {
  139129. this.state.isAmbientContext = true;
  139130. }
  139131. return super.getExpression();
  139132. }
  139133. };
  139134. types$12.placeholder = new TokenType3("%%", {
  139135. startsExpr: true
  139136. });
  139137. var PlaceHolderErrors = makeErrorTemplates({
  139138. ClassNameIsRequired: "A class name is required."
  139139. }, ErrorCodes.SyntaxError);
  139140. var placeholders = (superClass) => class extends superClass {
  139141. parsePlaceholder(expectedNode) {
  139142. if (this.match(types$12.placeholder)) {
  139143. const node = this.startNode();
  139144. this.next();
  139145. this.assertNoSpace("Unexpected space in placeholder.");
  139146. node.name = super.parseIdentifier(true);
  139147. this.assertNoSpace("Unexpected space in placeholder.");
  139148. this.expect(types$12.placeholder);
  139149. return this.finishPlaceholder(node, expectedNode);
  139150. }
  139151. }
  139152. finishPlaceholder(node, expectedNode) {
  139153. const isFinished = !!(node.expectedNode && node.type === "Placeholder");
  139154. node.expectedNode = expectedNode;
  139155. return isFinished ? node : this.finishNode(node, "Placeholder");
  139156. }
  139157. getTokenFromCode(code2) {
  139158. if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  139159. return this.finishOp(types$12.placeholder, 2);
  139160. }
  139161. return super.getTokenFromCode(...arguments);
  139162. }
  139163. parseExprAtom() {
  139164. return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
  139165. }
  139166. parseIdentifier() {
  139167. return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
  139168. }
  139169. checkReservedWord(word) {
  139170. if (word !== void 0)
  139171. super.checkReservedWord(...arguments);
  139172. }
  139173. parseBindingAtom() {
  139174. return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
  139175. }
  139176. checkLVal(expr) {
  139177. if (expr.type !== "Placeholder")
  139178. super.checkLVal(...arguments);
  139179. }
  139180. toAssignable(node) {
  139181. if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
  139182. node.expectedNode = "Pattern";
  139183. return node;
  139184. }
  139185. return super.toAssignable(...arguments);
  139186. }
  139187. isLet(context) {
  139188. if (super.isLet(context)) {
  139189. return true;
  139190. }
  139191. if (!this.isContextual("let")) {
  139192. return false;
  139193. }
  139194. if (context)
  139195. return false;
  139196. const nextToken = this.lookahead();
  139197. if (nextToken.type === types$12.placeholder) {
  139198. return true;
  139199. }
  139200. return false;
  139201. }
  139202. verifyBreakContinue(node) {
  139203. if (node.label && node.label.type === "Placeholder")
  139204. return;
  139205. super.verifyBreakContinue(...arguments);
  139206. }
  139207. parseExpressionStatement(node, expr) {
  139208. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  139209. return super.parseExpressionStatement(...arguments);
  139210. }
  139211. if (this.match(types$12.colon)) {
  139212. const stmt = node;
  139213. stmt.label = this.finishPlaceholder(expr, "Identifier");
  139214. this.next();
  139215. stmt.body = this.parseStatement("label");
  139216. return this.finishNode(stmt, "LabeledStatement");
  139217. }
  139218. this.semicolon();
  139219. node.name = expr.name;
  139220. return this.finishPlaceholder(node, "Statement");
  139221. }
  139222. parseBlock() {
  139223. return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
  139224. }
  139225. parseFunctionId() {
  139226. return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
  139227. }
  139228. parseClass(node, isStatement, optionalId) {
  139229. const type = isStatement ? "ClassDeclaration" : "ClassExpression";
  139230. this.next();
  139231. this.takeDecorators(node);
  139232. const oldStrict = this.state.strict;
  139233. const placeholder = this.parsePlaceholder("Identifier");
  139234. if (placeholder) {
  139235. if (this.match(types$12._extends) || this.match(types$12.placeholder) || this.match(types$12.braceL)) {
  139236. node.id = placeholder;
  139237. } else if (optionalId || !isStatement) {
  139238. node.id = null;
  139239. node.body = this.finishPlaceholder(placeholder, "ClassBody");
  139240. return this.finishNode(node, type);
  139241. } else {
  139242. this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired);
  139243. }
  139244. } else {
  139245. this.parseClassId(node, isStatement, optionalId);
  139246. }
  139247. this.parseClassSuper(node);
  139248. node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
  139249. return this.finishNode(node, type);
  139250. }
  139251. parseExport(node) {
  139252. const placeholder = this.parsePlaceholder("Identifier");
  139253. if (!placeholder)
  139254. return super.parseExport(...arguments);
  139255. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  139256. node.specifiers = [];
  139257. node.source = null;
  139258. node.declaration = this.finishPlaceholder(placeholder, "Declaration");
  139259. return this.finishNode(node, "ExportNamedDeclaration");
  139260. }
  139261. this.expectPlugin("exportDefaultFrom");
  139262. const specifier = this.startNode();
  139263. specifier.exported = placeholder;
  139264. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  139265. return super.parseExport(node);
  139266. }
  139267. isExportDefaultSpecifier() {
  139268. if (this.match(types$12._default)) {
  139269. const next = this.nextTokenStart();
  139270. if (this.isUnparsedContextual(next, "from")) {
  139271. if (this.input.startsWith(types$12.placeholder.label, this.nextTokenStartSince(next + 4))) {
  139272. return true;
  139273. }
  139274. }
  139275. }
  139276. return super.isExportDefaultSpecifier();
  139277. }
  139278. maybeParseExportDefaultSpecifier(node) {
  139279. if (node.specifiers && node.specifiers.length > 0) {
  139280. return true;
  139281. }
  139282. return super.maybeParseExportDefaultSpecifier(...arguments);
  139283. }
  139284. checkExport(node) {
  139285. const {
  139286. specifiers
  139287. } = node;
  139288. if (specifiers != null && specifiers.length) {
  139289. node.specifiers = specifiers.filter((node2) => node2.exported.type === "Placeholder");
  139290. }
  139291. super.checkExport(node);
  139292. node.specifiers = specifiers;
  139293. }
  139294. parseImport(node) {
  139295. const placeholder = this.parsePlaceholder("Identifier");
  139296. if (!placeholder)
  139297. return super.parseImport(...arguments);
  139298. node.specifiers = [];
  139299. if (!this.isContextual("from") && !this.match(types$12.comma)) {
  139300. node.source = this.finishPlaceholder(placeholder, "StringLiteral");
  139301. this.semicolon();
  139302. return this.finishNode(node, "ImportDeclaration");
  139303. }
  139304. const specifier = this.startNodeAtNode(placeholder);
  139305. specifier.local = placeholder;
  139306. this.finishNode(specifier, "ImportDefaultSpecifier");
  139307. node.specifiers.push(specifier);
  139308. if (this.eat(types$12.comma)) {
  139309. const hasStarImport = this.maybeParseStarImportSpecifier(node);
  139310. if (!hasStarImport)
  139311. this.parseNamedImportSpecifiers(node);
  139312. }
  139313. this.expectContextual("from");
  139314. node.source = this.parseImportSource();
  139315. this.semicolon();
  139316. return this.finishNode(node, "ImportDeclaration");
  139317. }
  139318. parseImportSource() {
  139319. return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
  139320. }
  139321. };
  139322. var v8intrinsic = (superClass) => class extends superClass {
  139323. parseV8Intrinsic() {
  139324. if (this.match(types$12.modulo)) {
  139325. const v8IntrinsicStart = this.state.start;
  139326. const node = this.startNode();
  139327. this.eat(types$12.modulo);
  139328. if (this.match(types$12.name)) {
  139329. const name2 = this.parseIdentifierName(this.state.start);
  139330. const identifier = this.createIdentifier(node, name2);
  139331. identifier.type = "V8IntrinsicIdentifier";
  139332. if (this.match(types$12.parenL)) {
  139333. return identifier;
  139334. }
  139335. }
  139336. this.unexpected(v8IntrinsicStart);
  139337. }
  139338. }
  139339. parseExprAtom() {
  139340. return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);
  139341. }
  139342. };
  139343. function hasPlugin(plugins, name2) {
  139344. return plugins.some((plugin2) => {
  139345. if (Array.isArray(plugin2)) {
  139346. return plugin2[0] === name2;
  139347. } else {
  139348. return plugin2 === name2;
  139349. }
  139350. });
  139351. }
  139352. function getPluginOption(plugins, name2, option) {
  139353. const plugin2 = plugins.find((plugin3) => {
  139354. if (Array.isArray(plugin3)) {
  139355. return plugin3[0] === name2;
  139356. } else {
  139357. return plugin3 === name2;
  139358. }
  139359. });
  139360. if (plugin2 && Array.isArray(plugin2)) {
  139361. return plugin2[1][option];
  139362. }
  139363. return null;
  139364. }
  139365. var PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
  139366. var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
  139367. function validatePlugins(plugins) {
  139368. if (hasPlugin(plugins, "decorators")) {
  139369. if (hasPlugin(plugins, "decorators-legacy")) {
  139370. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  139371. }
  139372. const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  139373. if (decoratorsBeforeExport == null) {
  139374. 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'.");
  139375. } else if (typeof decoratorsBeforeExport !== "boolean") {
  139376. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  139377. }
  139378. }
  139379. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  139380. throw new Error("Cannot combine flow and typescript plugins.");
  139381. }
  139382. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  139383. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  139384. }
  139385. if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
  139386. throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map((p) => `'${p}'`).join(", "));
  139387. }
  139388. if (hasPlugin(plugins, "moduleAttributes")) {
  139389. {
  139390. if (hasPlugin(plugins, "importAssertions")) {
  139391. throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
  139392. }
  139393. const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
  139394. if (moduleAttributesVerionPluginOption !== "may-2020") {
  139395. throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
  139396. }
  139397. }
  139398. }
  139399. if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
  139400. throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
  139401. }
  139402. if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
  139403. const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
  139404. error.missingPlugins = "doExpressions";
  139405. throw error;
  139406. }
  139407. }
  139408. var mixinPlugins = {
  139409. estree,
  139410. jsx,
  139411. flow: flow3,
  139412. typescript,
  139413. v8intrinsic,
  139414. placeholders
  139415. };
  139416. var mixinPluginNames = Object.keys(mixinPlugins);
  139417. var defaultOptions2 = {
  139418. sourceType: "script",
  139419. sourceFilename: void 0,
  139420. startLine: 1,
  139421. allowAwaitOutsideFunction: false,
  139422. allowReturnOutsideFunction: false,
  139423. allowImportExportEverywhere: false,
  139424. allowSuperOutsideMethod: false,
  139425. allowUndeclaredExports: false,
  139426. plugins: [],
  139427. strictMode: null,
  139428. ranges: false,
  139429. tokens: false,
  139430. createParenthesizedExpressions: false,
  139431. errorRecovery: false
  139432. };
  139433. function getOptions2(opts) {
  139434. const options = {};
  139435. for (const key of Object.keys(defaultOptions2)) {
  139436. options[key] = opts && opts[key] != null ? opts[key] : defaultOptions2[key];
  139437. }
  139438. return options;
  139439. }
  139440. var _isDigit = function isDigit(code2) {
  139441. return code2 >= 48 && code2 <= 57;
  139442. };
  139443. var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set(["g", "m", "s", "i", "y", "u", "d"]);
  139444. var forbiddenNumericSeparatorSiblings = {
  139445. decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
  139446. hex: [46, 88, 95, 120]
  139447. };
  139448. var allowedNumericSeparatorSiblings = {};
  139449. allowedNumericSeparatorSiblings.bin = [48, 49];
  139450. allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
  139451. allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
  139452. allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
  139453. var Token3 = class {
  139454. constructor(state) {
  139455. this.type = state.type;
  139456. this.value = state.value;
  139457. this.start = state.start;
  139458. this.end = state.end;
  139459. this.loc = new SourceLocation3(state.startLoc, state.endLoc);
  139460. }
  139461. };
  139462. var Tokenizer = class extends ParserError {
  139463. constructor(options, input) {
  139464. super();
  139465. this.isLookahead = void 0;
  139466. this.tokens = [];
  139467. this.state = new State2();
  139468. this.state.init(options);
  139469. this.input = input;
  139470. this.length = input.length;
  139471. this.isLookahead = false;
  139472. }
  139473. pushToken(token) {
  139474. this.tokens.length = this.state.tokensLength;
  139475. this.tokens.push(token);
  139476. ++this.state.tokensLength;
  139477. }
  139478. next() {
  139479. this.checkKeywordEscapes();
  139480. if (this.options.tokens) {
  139481. this.pushToken(new Token3(this.state));
  139482. }
  139483. this.state.lastTokEnd = this.state.end;
  139484. this.state.lastTokStart = this.state.start;
  139485. this.state.lastTokEndLoc = this.state.endLoc;
  139486. this.state.lastTokStartLoc = this.state.startLoc;
  139487. this.nextToken();
  139488. }
  139489. eat(type) {
  139490. if (this.match(type)) {
  139491. this.next();
  139492. return true;
  139493. } else {
  139494. return false;
  139495. }
  139496. }
  139497. match(type) {
  139498. return this.state.type === type;
  139499. }
  139500. createLookaheadState(state) {
  139501. return {
  139502. pos: state.pos,
  139503. value: null,
  139504. type: state.type,
  139505. start: state.start,
  139506. end: state.end,
  139507. lastTokEnd: state.end,
  139508. context: [this.curContext()],
  139509. inType: state.inType
  139510. };
  139511. }
  139512. lookahead() {
  139513. const old = this.state;
  139514. this.state = this.createLookaheadState(old);
  139515. this.isLookahead = true;
  139516. this.nextToken();
  139517. this.isLookahead = false;
  139518. const curr = this.state;
  139519. this.state = old;
  139520. return curr;
  139521. }
  139522. nextTokenStart() {
  139523. return this.nextTokenStartSince(this.state.pos);
  139524. }
  139525. nextTokenStartSince(pos) {
  139526. skipWhiteSpace2.lastIndex = pos;
  139527. const skip = skipWhiteSpace2.exec(this.input);
  139528. return pos + skip[0].length;
  139529. }
  139530. lookaheadCharCode() {
  139531. return this.input.charCodeAt(this.nextTokenStart());
  139532. }
  139533. codePointAtPos(pos) {
  139534. let cp = this.input.charCodeAt(pos);
  139535. if ((cp & 64512) === 55296 && ++pos < this.input.length) {
  139536. const trail = this.input.charCodeAt(pos);
  139537. if ((trail & 64512) === 56320) {
  139538. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  139539. }
  139540. }
  139541. return cp;
  139542. }
  139543. setStrict(strict) {
  139544. this.state.strict = strict;
  139545. if (strict) {
  139546. this.state.strictErrors.forEach((message, pos) => this.raise(pos, message));
  139547. this.state.strictErrors.clear();
  139548. }
  139549. }
  139550. curContext() {
  139551. return this.state.context[this.state.context.length - 1];
  139552. }
  139553. nextToken() {
  139554. const curContext = this.curContext();
  139555. if (!curContext.preserveSpace)
  139556. this.skipSpace();
  139557. this.state.start = this.state.pos;
  139558. if (!this.isLookahead)
  139559. this.state.startLoc = this.state.curPosition();
  139560. if (this.state.pos >= this.length) {
  139561. this.finishToken(types$12.eof);
  139562. return;
  139563. }
  139564. if (curContext === types2.template) {
  139565. this.readTmplToken();
  139566. } else {
  139567. this.getTokenFromCode(this.codePointAtPos(this.state.pos));
  139568. }
  139569. }
  139570. pushComment(block, text5, start3, end, startLoc, endLoc) {
  139571. const comment2 = {
  139572. type: block ? "CommentBlock" : "CommentLine",
  139573. value: text5,
  139574. start: start3,
  139575. end,
  139576. loc: new SourceLocation3(startLoc, endLoc)
  139577. };
  139578. if (this.options.tokens)
  139579. this.pushToken(comment2);
  139580. this.state.comments.push(comment2);
  139581. this.addComment(comment2);
  139582. }
  139583. skipBlockComment() {
  139584. let startLoc;
  139585. if (!this.isLookahead)
  139586. startLoc = this.state.curPosition();
  139587. const start3 = this.state.pos;
  139588. const end = this.input.indexOf("*/", this.state.pos + 2);
  139589. if (end === -1)
  139590. throw this.raise(start3, ErrorMessages.UnterminatedComment);
  139591. this.state.pos = end + 2;
  139592. lineBreakG2.lastIndex = start3;
  139593. let match;
  139594. while ((match = lineBreakG2.exec(this.input)) && match.index < this.state.pos) {
  139595. ++this.state.curLine;
  139596. this.state.lineStart = match.index + match[0].length;
  139597. }
  139598. if (this.isLookahead)
  139599. return;
  139600. this.pushComment(true, this.input.slice(start3 + 2, end), start3, this.state.pos, startLoc, this.state.curPosition());
  139601. }
  139602. skipLineComment(startSkip) {
  139603. const start3 = this.state.pos;
  139604. let startLoc;
  139605. if (!this.isLookahead)
  139606. startLoc = this.state.curPosition();
  139607. let ch = this.input.charCodeAt(this.state.pos += startSkip);
  139608. if (this.state.pos < this.length) {
  139609. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  139610. ch = this.input.charCodeAt(this.state.pos);
  139611. }
  139612. }
  139613. if (this.isLookahead)
  139614. return;
  139615. this.pushComment(false, this.input.slice(start3 + startSkip, this.state.pos), start3, this.state.pos, startLoc, this.state.curPosition());
  139616. }
  139617. skipSpace() {
  139618. loop:
  139619. while (this.state.pos < this.length) {
  139620. const ch = this.input.charCodeAt(this.state.pos);
  139621. switch (ch) {
  139622. case 32:
  139623. case 160:
  139624. case 9:
  139625. ++this.state.pos;
  139626. break;
  139627. case 13:
  139628. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  139629. ++this.state.pos;
  139630. }
  139631. case 10:
  139632. case 8232:
  139633. case 8233:
  139634. ++this.state.pos;
  139635. ++this.state.curLine;
  139636. this.state.lineStart = this.state.pos;
  139637. break;
  139638. case 47:
  139639. switch (this.input.charCodeAt(this.state.pos + 1)) {
  139640. case 42:
  139641. this.skipBlockComment();
  139642. break;
  139643. case 47:
  139644. this.skipLineComment(2);
  139645. break;
  139646. default:
  139647. break loop;
  139648. }
  139649. break;
  139650. default:
  139651. if (isWhitespace(ch)) {
  139652. ++this.state.pos;
  139653. } else {
  139654. break loop;
  139655. }
  139656. }
  139657. }
  139658. }
  139659. finishToken(type, val) {
  139660. this.state.end = this.state.pos;
  139661. const prevType = this.state.type;
  139662. this.state.type = type;
  139663. this.state.value = val;
  139664. if (!this.isLookahead) {
  139665. this.state.endLoc = this.state.curPosition();
  139666. this.updateContext(prevType);
  139667. }
  139668. }
  139669. readToken_numberSign() {
  139670. if (this.state.pos === 0 && this.readToken_interpreter()) {
  139671. return;
  139672. }
  139673. const nextPos = this.state.pos + 1;
  139674. const next = this.codePointAtPos(nextPos);
  139675. if (next >= 48 && next <= 57) {
  139676. throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash);
  139677. }
  139678. if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
  139679. this.expectPlugin("recordAndTuple");
  139680. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
  139681. throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType);
  139682. }
  139683. this.state.pos += 2;
  139684. if (next === 123) {
  139685. this.finishToken(types$12.braceHashL);
  139686. } else {
  139687. this.finishToken(types$12.bracketHashL);
  139688. }
  139689. } else if (isIdentifierStart2(next)) {
  139690. ++this.state.pos;
  139691. this.finishToken(types$12.privateName, this.readWord1(next));
  139692. } else if (next === 92) {
  139693. ++this.state.pos;
  139694. this.finishToken(types$12.privateName, this.readWord1());
  139695. } else {
  139696. this.finishOp(types$12.hash, 1);
  139697. }
  139698. }
  139699. readToken_dot() {
  139700. const next = this.input.charCodeAt(this.state.pos + 1);
  139701. if (next >= 48 && next <= 57) {
  139702. this.readNumber(true);
  139703. return;
  139704. }
  139705. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  139706. this.state.pos += 3;
  139707. this.finishToken(types$12.ellipsis);
  139708. } else {
  139709. ++this.state.pos;
  139710. this.finishToken(types$12.dot);
  139711. }
  139712. }
  139713. readToken_slash() {
  139714. const next = this.input.charCodeAt(this.state.pos + 1);
  139715. if (next === 61) {
  139716. this.finishOp(types$12.slashAssign, 2);
  139717. } else {
  139718. this.finishOp(types$12.slash, 1);
  139719. }
  139720. }
  139721. readToken_interpreter() {
  139722. if (this.state.pos !== 0 || this.length < 2)
  139723. return false;
  139724. let ch = this.input.charCodeAt(this.state.pos + 1);
  139725. if (ch !== 33)
  139726. return false;
  139727. const start3 = this.state.pos;
  139728. this.state.pos += 1;
  139729. while (!isNewLine2(ch) && ++this.state.pos < this.length) {
  139730. ch = this.input.charCodeAt(this.state.pos);
  139731. }
  139732. const value = this.input.slice(start3 + 2, this.state.pos);
  139733. this.finishToken(types$12.interpreterDirective, value);
  139734. return true;
  139735. }
  139736. readToken_mult_modulo(code2) {
  139737. let type = code2 === 42 ? types$12.star : types$12.modulo;
  139738. let width = 1;
  139739. let next = this.input.charCodeAt(this.state.pos + 1);
  139740. if (code2 === 42 && next === 42) {
  139741. width++;
  139742. next = this.input.charCodeAt(this.state.pos + 2);
  139743. type = types$12.exponent;
  139744. }
  139745. if (next === 61 && !this.state.inType) {
  139746. width++;
  139747. type = types$12.assign;
  139748. }
  139749. this.finishOp(type, width);
  139750. }
  139751. readToken_pipe_amp(code2) {
  139752. const next = this.input.charCodeAt(this.state.pos + 1);
  139753. if (next === code2) {
  139754. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  139755. this.finishOp(types$12.assign, 3);
  139756. } else {
  139757. this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
  139758. }
  139759. return;
  139760. }
  139761. if (code2 === 124) {
  139762. if (next === 62) {
  139763. this.finishOp(types$12.pipeline, 2);
  139764. return;
  139765. }
  139766. if (this.hasPlugin("recordAndTuple") && next === 125) {
  139767. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  139768. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType);
  139769. }
  139770. this.state.pos += 2;
  139771. this.finishToken(types$12.braceBarR);
  139772. return;
  139773. }
  139774. if (this.hasPlugin("recordAndTuple") && next === 93) {
  139775. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  139776. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType);
  139777. }
  139778. this.state.pos += 2;
  139779. this.finishToken(types$12.bracketBarR);
  139780. return;
  139781. }
  139782. }
  139783. if (next === 61) {
  139784. this.finishOp(types$12.assign, 2);
  139785. return;
  139786. }
  139787. this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
  139788. }
  139789. readToken_caret() {
  139790. const next = this.input.charCodeAt(this.state.pos + 1);
  139791. if (next === 61) {
  139792. this.finishOp(types$12.assign, 2);
  139793. } else {
  139794. this.finishOp(types$12.bitwiseXOR, 1);
  139795. }
  139796. }
  139797. readToken_plus_min(code2) {
  139798. const next = this.input.charCodeAt(this.state.pos + 1);
  139799. if (next === code2) {
  139800. if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || this.hasPrecedingLineBreak())) {
  139801. this.skipLineComment(3);
  139802. this.skipSpace();
  139803. this.nextToken();
  139804. return;
  139805. }
  139806. this.finishOp(types$12.incDec, 2);
  139807. return;
  139808. }
  139809. if (next === 61) {
  139810. this.finishOp(types$12.assign, 2);
  139811. } else {
  139812. this.finishOp(types$12.plusMin, 1);
  139813. }
  139814. }
  139815. readToken_lt_gt(code2) {
  139816. const next = this.input.charCodeAt(this.state.pos + 1);
  139817. let size = 1;
  139818. if (next === code2) {
  139819. size = code2 === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  139820. if (this.input.charCodeAt(this.state.pos + size) === 61) {
  139821. this.finishOp(types$12.assign, size + 1);
  139822. return;
  139823. }
  139824. this.finishOp(types$12.bitShift, size);
  139825. return;
  139826. }
  139827. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
  139828. this.skipLineComment(4);
  139829. this.skipSpace();
  139830. this.nextToken();
  139831. return;
  139832. }
  139833. if (next === 61) {
  139834. size = 2;
  139835. }
  139836. this.finishOp(types$12.relational, size);
  139837. }
  139838. readToken_eq_excl(code2) {
  139839. const next = this.input.charCodeAt(this.state.pos + 1);
  139840. if (next === 61) {
  139841. this.finishOp(types$12.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  139842. return;
  139843. }
  139844. if (code2 === 61 && next === 62) {
  139845. this.state.pos += 2;
  139846. this.finishToken(types$12.arrow);
  139847. return;
  139848. }
  139849. this.finishOp(code2 === 61 ? types$12.eq : types$12.bang, 1);
  139850. }
  139851. readToken_question() {
  139852. const next = this.input.charCodeAt(this.state.pos + 1);
  139853. const next2 = this.input.charCodeAt(this.state.pos + 2);
  139854. if (next === 63) {
  139855. if (next2 === 61) {
  139856. this.finishOp(types$12.assign, 3);
  139857. } else {
  139858. this.finishOp(types$12.nullishCoalescing, 2);
  139859. }
  139860. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  139861. this.state.pos += 2;
  139862. this.finishToken(types$12.questionDot);
  139863. } else {
  139864. ++this.state.pos;
  139865. this.finishToken(types$12.question);
  139866. }
  139867. }
  139868. getTokenFromCode(code2) {
  139869. switch (code2) {
  139870. case 46:
  139871. this.readToken_dot();
  139872. return;
  139873. case 40:
  139874. ++this.state.pos;
  139875. this.finishToken(types$12.parenL);
  139876. return;
  139877. case 41:
  139878. ++this.state.pos;
  139879. this.finishToken(types$12.parenR);
  139880. return;
  139881. case 59:
  139882. ++this.state.pos;
  139883. this.finishToken(types$12.semi);
  139884. return;
  139885. case 44:
  139886. ++this.state.pos;
  139887. this.finishToken(types$12.comma);
  139888. return;
  139889. case 91:
  139890. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  139891. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  139892. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType);
  139893. }
  139894. this.state.pos += 2;
  139895. this.finishToken(types$12.bracketBarL);
  139896. } else {
  139897. ++this.state.pos;
  139898. this.finishToken(types$12.bracketL);
  139899. }
  139900. return;
  139901. case 93:
  139902. ++this.state.pos;
  139903. this.finishToken(types$12.bracketR);
  139904. return;
  139905. case 123:
  139906. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  139907. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  139908. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType);
  139909. }
  139910. this.state.pos += 2;
  139911. this.finishToken(types$12.braceBarL);
  139912. } else {
  139913. ++this.state.pos;
  139914. this.finishToken(types$12.braceL);
  139915. }
  139916. return;
  139917. case 125:
  139918. ++this.state.pos;
  139919. this.finishToken(types$12.braceR);
  139920. return;
  139921. case 58:
  139922. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  139923. this.finishOp(types$12.doubleColon, 2);
  139924. } else {
  139925. ++this.state.pos;
  139926. this.finishToken(types$12.colon);
  139927. }
  139928. return;
  139929. case 63:
  139930. this.readToken_question();
  139931. return;
  139932. case 96:
  139933. ++this.state.pos;
  139934. this.finishToken(types$12.backQuote);
  139935. return;
  139936. case 48: {
  139937. const next = this.input.charCodeAt(this.state.pos + 1);
  139938. if (next === 120 || next === 88) {
  139939. this.readRadixNumber(16);
  139940. return;
  139941. }
  139942. if (next === 111 || next === 79) {
  139943. this.readRadixNumber(8);
  139944. return;
  139945. }
  139946. if (next === 98 || next === 66) {
  139947. this.readRadixNumber(2);
  139948. return;
  139949. }
  139950. }
  139951. case 49:
  139952. case 50:
  139953. case 51:
  139954. case 52:
  139955. case 53:
  139956. case 54:
  139957. case 55:
  139958. case 56:
  139959. case 57:
  139960. this.readNumber(false);
  139961. return;
  139962. case 34:
  139963. case 39:
  139964. this.readString(code2);
  139965. return;
  139966. case 47:
  139967. this.readToken_slash();
  139968. return;
  139969. case 37:
  139970. case 42:
  139971. this.readToken_mult_modulo(code2);
  139972. return;
  139973. case 124:
  139974. case 38:
  139975. this.readToken_pipe_amp(code2);
  139976. return;
  139977. case 94:
  139978. this.readToken_caret();
  139979. return;
  139980. case 43:
  139981. case 45:
  139982. this.readToken_plus_min(code2);
  139983. return;
  139984. case 60:
  139985. case 62:
  139986. this.readToken_lt_gt(code2);
  139987. return;
  139988. case 61:
  139989. case 33:
  139990. this.readToken_eq_excl(code2);
  139991. return;
  139992. case 126:
  139993. this.finishOp(types$12.tilde, 1);
  139994. return;
  139995. case 64:
  139996. ++this.state.pos;
  139997. this.finishToken(types$12.at);
  139998. return;
  139999. case 35:
  140000. this.readToken_numberSign();
  140001. return;
  140002. case 92:
  140003. this.readWord();
  140004. return;
  140005. default:
  140006. if (isIdentifierStart2(code2)) {
  140007. this.readWord(code2);
  140008. return;
  140009. }
  140010. }
  140011. throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code2));
  140012. }
  140013. finishOp(type, size) {
  140014. const str = this.input.slice(this.state.pos, this.state.pos + size);
  140015. this.state.pos += size;
  140016. this.finishToken(type, str);
  140017. }
  140018. readRegexp() {
  140019. const start3 = this.state.start + 1;
  140020. let escaped, inClass;
  140021. for (; ; ) {
  140022. if (this.state.pos >= this.length) {
  140023. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  140024. }
  140025. const ch = this.input.charAt(this.state.pos);
  140026. if (lineBreak2.test(ch)) {
  140027. throw this.raise(start3, ErrorMessages.UnterminatedRegExp);
  140028. }
  140029. if (escaped) {
  140030. escaped = false;
  140031. } else {
  140032. if (ch === "[") {
  140033. inClass = true;
  140034. } else if (ch === "]" && inClass) {
  140035. inClass = false;
  140036. } else if (ch === "/" && !inClass) {
  140037. break;
  140038. }
  140039. escaped = ch === "\\";
  140040. }
  140041. ++this.state.pos;
  140042. }
  140043. const content3 = this.input.slice(start3, this.state.pos);
  140044. ++this.state.pos;
  140045. let mods = "";
  140046. while (this.state.pos < this.length) {
  140047. const char = this.input[this.state.pos];
  140048. const charCode = this.codePointAtPos(this.state.pos);
  140049. if (VALID_REGEX_FLAGS.has(char)) {
  140050. if (mods.indexOf(char) > -1) {
  140051. this.raise(this.state.pos + 1, ErrorMessages.DuplicateRegExpFlags);
  140052. }
  140053. } else if (isIdentifierChar2(charCode) || charCode === 92) {
  140054. this.raise(this.state.pos + 1, ErrorMessages.MalformedRegExpFlags);
  140055. } else {
  140056. break;
  140057. }
  140058. ++this.state.pos;
  140059. mods += char;
  140060. }
  140061. this.finishToken(types$12.regexp, {
  140062. pattern: content3,
  140063. flags: mods
  140064. });
  140065. }
  140066. readInt(radix, len, forceLen, allowNumSeparator = true) {
  140067. const start3 = this.state.pos;
  140068. const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  140069. const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
  140070. let invalid2 = false;
  140071. let total = 0;
  140072. for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  140073. const code2 = this.input.charCodeAt(this.state.pos);
  140074. let val;
  140075. if (code2 === 95) {
  140076. const prev = this.input.charCodeAt(this.state.pos - 1);
  140077. const next = this.input.charCodeAt(this.state.pos + 1);
  140078. if (allowedSiblings.indexOf(next) === -1) {
  140079. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  140080. } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
  140081. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  140082. }
  140083. if (!allowNumSeparator) {
  140084. this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence);
  140085. }
  140086. ++this.state.pos;
  140087. continue;
  140088. }
  140089. if (code2 >= 97) {
  140090. val = code2 - 97 + 10;
  140091. } else if (code2 >= 65) {
  140092. val = code2 - 65 + 10;
  140093. } else if (_isDigit(code2)) {
  140094. val = code2 - 48;
  140095. } else {
  140096. val = Infinity;
  140097. }
  140098. if (val >= radix) {
  140099. if (this.options.errorRecovery && val <= 9) {
  140100. val = 0;
  140101. this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix);
  140102. } else if (forceLen) {
  140103. val = 0;
  140104. invalid2 = true;
  140105. } else {
  140106. break;
  140107. }
  140108. }
  140109. ++this.state.pos;
  140110. total = total * radix + val;
  140111. }
  140112. if (this.state.pos === start3 || len != null && this.state.pos - start3 !== len || invalid2) {
  140113. return null;
  140114. }
  140115. return total;
  140116. }
  140117. readRadixNumber(radix) {
  140118. const start3 = this.state.pos;
  140119. let isBigInt = false;
  140120. this.state.pos += 2;
  140121. const val = this.readInt(radix);
  140122. if (val == null) {
  140123. this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix);
  140124. }
  140125. const next = this.input.charCodeAt(this.state.pos);
  140126. if (next === 110) {
  140127. ++this.state.pos;
  140128. isBigInt = true;
  140129. } else if (next === 109) {
  140130. throw this.raise(start3, ErrorMessages.InvalidDecimal);
  140131. }
  140132. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  140133. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  140134. }
  140135. if (isBigInt) {
  140136. const str = this.input.slice(start3, this.state.pos).replace(/[_n]/g, "");
  140137. this.finishToken(types$12.bigint, str);
  140138. return;
  140139. }
  140140. this.finishToken(types$12.num, val);
  140141. }
  140142. readNumber(startsWithDot) {
  140143. const start3 = this.state.pos;
  140144. let isFloat = false;
  140145. let isBigInt = false;
  140146. let isDecimal2 = false;
  140147. let hasExponent = false;
  140148. let isOctal = false;
  140149. if (!startsWithDot && this.readInt(10) === null) {
  140150. this.raise(start3, ErrorMessages.InvalidNumber);
  140151. }
  140152. const hasLeadingZero = this.state.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  140153. if (hasLeadingZero) {
  140154. const integer = this.input.slice(start3, this.state.pos);
  140155. this.recordStrictModeErrors(start3, ErrorMessages.StrictOctalLiteral);
  140156. if (!this.state.strict) {
  140157. const underscorePos = integer.indexOf("_");
  140158. if (underscorePos > 0) {
  140159. this.raise(underscorePos + start3, ErrorMessages.ZeroDigitNumericSeparator);
  140160. }
  140161. }
  140162. isOctal = hasLeadingZero && !/[89]/.test(integer);
  140163. }
  140164. let next = this.input.charCodeAt(this.state.pos);
  140165. if (next === 46 && !isOctal) {
  140166. ++this.state.pos;
  140167. this.readInt(10);
  140168. isFloat = true;
  140169. next = this.input.charCodeAt(this.state.pos);
  140170. }
  140171. if ((next === 69 || next === 101) && !isOctal) {
  140172. next = this.input.charCodeAt(++this.state.pos);
  140173. if (next === 43 || next === 45) {
  140174. ++this.state.pos;
  140175. }
  140176. if (this.readInt(10) === null) {
  140177. this.raise(start3, ErrorMessages.InvalidOrMissingExponent);
  140178. }
  140179. isFloat = true;
  140180. hasExponent = true;
  140181. next = this.input.charCodeAt(this.state.pos);
  140182. }
  140183. if (next === 110) {
  140184. if (isFloat || hasLeadingZero) {
  140185. this.raise(start3, ErrorMessages.InvalidBigIntLiteral);
  140186. }
  140187. ++this.state.pos;
  140188. isBigInt = true;
  140189. }
  140190. if (next === 109) {
  140191. this.expectPlugin("decimal", this.state.pos);
  140192. if (hasExponent || hasLeadingZero) {
  140193. this.raise(start3, ErrorMessages.InvalidDecimal);
  140194. }
  140195. ++this.state.pos;
  140196. isDecimal2 = true;
  140197. }
  140198. if (isIdentifierStart2(this.codePointAtPos(this.state.pos))) {
  140199. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  140200. }
  140201. const str = this.input.slice(start3, this.state.pos).replace(/[_mn]/g, "");
  140202. if (isBigInt) {
  140203. this.finishToken(types$12.bigint, str);
  140204. return;
  140205. }
  140206. if (isDecimal2) {
  140207. this.finishToken(types$12.decimal, str);
  140208. return;
  140209. }
  140210. const val = isOctal ? parseInt(str, 8) : parseFloat(str);
  140211. this.finishToken(types$12.num, val);
  140212. }
  140213. readCodePoint(throwOnInvalid) {
  140214. const ch = this.input.charCodeAt(this.state.pos);
  140215. let code2;
  140216. if (ch === 123) {
  140217. const codePos = ++this.state.pos;
  140218. code2 = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
  140219. ++this.state.pos;
  140220. if (code2 !== null && code2 > 1114111) {
  140221. if (throwOnInvalid) {
  140222. this.raise(codePos, ErrorMessages.InvalidCodePoint);
  140223. } else {
  140224. return null;
  140225. }
  140226. }
  140227. } else {
  140228. code2 = this.readHexChar(4, false, throwOnInvalid);
  140229. }
  140230. return code2;
  140231. }
  140232. readString(quote) {
  140233. let out = "", chunkStart = ++this.state.pos;
  140234. for (; ; ) {
  140235. if (this.state.pos >= this.length) {
  140236. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  140237. }
  140238. const ch = this.input.charCodeAt(this.state.pos);
  140239. if (ch === quote)
  140240. break;
  140241. if (ch === 92) {
  140242. out += this.input.slice(chunkStart, this.state.pos);
  140243. out += this.readEscapedChar(false);
  140244. chunkStart = this.state.pos;
  140245. } else if (ch === 8232 || ch === 8233) {
  140246. ++this.state.pos;
  140247. ++this.state.curLine;
  140248. this.state.lineStart = this.state.pos;
  140249. } else if (isNewLine2(ch)) {
  140250. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  140251. } else {
  140252. ++this.state.pos;
  140253. }
  140254. }
  140255. out += this.input.slice(chunkStart, this.state.pos++);
  140256. this.finishToken(types$12.string, out);
  140257. }
  140258. readTmplToken() {
  140259. let out = "", chunkStart = this.state.pos, containsInvalid = false;
  140260. for (; ; ) {
  140261. if (this.state.pos >= this.length) {
  140262. throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate);
  140263. }
  140264. const ch = this.input.charCodeAt(this.state.pos);
  140265. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  140266. if (this.state.pos === this.state.start && this.match(types$12.template)) {
  140267. if (ch === 36) {
  140268. this.state.pos += 2;
  140269. this.finishToken(types$12.dollarBraceL);
  140270. return;
  140271. } else {
  140272. ++this.state.pos;
  140273. this.finishToken(types$12.backQuote);
  140274. return;
  140275. }
  140276. }
  140277. out += this.input.slice(chunkStart, this.state.pos);
  140278. this.finishToken(types$12.template, containsInvalid ? null : out);
  140279. return;
  140280. }
  140281. if (ch === 92) {
  140282. out += this.input.slice(chunkStart, this.state.pos);
  140283. const escaped = this.readEscapedChar(true);
  140284. if (escaped === null) {
  140285. containsInvalid = true;
  140286. } else {
  140287. out += escaped;
  140288. }
  140289. chunkStart = this.state.pos;
  140290. } else if (isNewLine2(ch)) {
  140291. out += this.input.slice(chunkStart, this.state.pos);
  140292. ++this.state.pos;
  140293. switch (ch) {
  140294. case 13:
  140295. if (this.input.charCodeAt(this.state.pos) === 10) {
  140296. ++this.state.pos;
  140297. }
  140298. case 10:
  140299. out += "\n";
  140300. break;
  140301. default:
  140302. out += String.fromCharCode(ch);
  140303. break;
  140304. }
  140305. ++this.state.curLine;
  140306. this.state.lineStart = this.state.pos;
  140307. chunkStart = this.state.pos;
  140308. } else {
  140309. ++this.state.pos;
  140310. }
  140311. }
  140312. }
  140313. recordStrictModeErrors(pos, message) {
  140314. if (this.state.strict && !this.state.strictErrors.has(pos)) {
  140315. this.raise(pos, message);
  140316. } else {
  140317. this.state.strictErrors.set(pos, message);
  140318. }
  140319. }
  140320. readEscapedChar(inTemplate) {
  140321. const throwOnInvalid = !inTemplate;
  140322. const ch = this.input.charCodeAt(++this.state.pos);
  140323. ++this.state.pos;
  140324. switch (ch) {
  140325. case 110:
  140326. return "\n";
  140327. case 114:
  140328. return "\r";
  140329. case 120: {
  140330. const code2 = this.readHexChar(2, false, throwOnInvalid);
  140331. return code2 === null ? null : String.fromCharCode(code2);
  140332. }
  140333. case 117: {
  140334. const code2 = this.readCodePoint(throwOnInvalid);
  140335. return code2 === null ? null : String.fromCodePoint(code2);
  140336. }
  140337. case 116:
  140338. return " ";
  140339. case 98:
  140340. return "\b";
  140341. case 118:
  140342. return "\v";
  140343. case 102:
  140344. return "\f";
  140345. case 13:
  140346. if (this.input.charCodeAt(this.state.pos) === 10) {
  140347. ++this.state.pos;
  140348. }
  140349. case 10:
  140350. this.state.lineStart = this.state.pos;
  140351. ++this.state.curLine;
  140352. case 8232:
  140353. case 8233:
  140354. return "";
  140355. case 56:
  140356. case 57:
  140357. if (inTemplate) {
  140358. return null;
  140359. } else {
  140360. this.recordStrictModeErrors(this.state.pos - 1, ErrorMessages.StrictNumericEscape);
  140361. }
  140362. default:
  140363. if (ch >= 48 && ch <= 55) {
  140364. const codePos = this.state.pos - 1;
  140365. const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
  140366. let octalStr = match[0];
  140367. let octal = parseInt(octalStr, 8);
  140368. if (octal > 255) {
  140369. octalStr = octalStr.slice(0, -1);
  140370. octal = parseInt(octalStr, 8);
  140371. }
  140372. this.state.pos += octalStr.length - 1;
  140373. const next = this.input.charCodeAt(this.state.pos);
  140374. if (octalStr !== "0" || next === 56 || next === 57) {
  140375. if (inTemplate) {
  140376. return null;
  140377. } else {
  140378. this.recordStrictModeErrors(codePos, ErrorMessages.StrictNumericEscape);
  140379. }
  140380. }
  140381. return String.fromCharCode(octal);
  140382. }
  140383. return String.fromCharCode(ch);
  140384. }
  140385. }
  140386. readHexChar(len, forceLen, throwOnInvalid) {
  140387. const codePos = this.state.pos;
  140388. const n = this.readInt(16, len, forceLen, false);
  140389. if (n === null) {
  140390. if (throwOnInvalid) {
  140391. this.raise(codePos, ErrorMessages.InvalidEscapeSequence);
  140392. } else {
  140393. this.state.pos = codePos - 1;
  140394. }
  140395. }
  140396. return n;
  140397. }
  140398. readWord1(firstCode) {
  140399. this.state.containsEsc = false;
  140400. let word = "";
  140401. const start3 = this.state.pos;
  140402. let chunkStart = this.state.pos;
  140403. if (firstCode !== void 0) {
  140404. this.state.pos += firstCode <= 65535 ? 1 : 2;
  140405. }
  140406. while (this.state.pos < this.length) {
  140407. const ch = this.codePointAtPos(this.state.pos);
  140408. if (isIdentifierChar2(ch)) {
  140409. this.state.pos += ch <= 65535 ? 1 : 2;
  140410. } else if (ch === 92) {
  140411. this.state.containsEsc = true;
  140412. word += this.input.slice(chunkStart, this.state.pos);
  140413. const escStart = this.state.pos;
  140414. const identifierCheck = this.state.pos === start3 ? isIdentifierStart2 : isIdentifierChar2;
  140415. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  140416. this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape);
  140417. chunkStart = this.state.pos - 1;
  140418. continue;
  140419. }
  140420. ++this.state.pos;
  140421. const esc = this.readCodePoint(true);
  140422. if (esc !== null) {
  140423. if (!identifierCheck(esc)) {
  140424. this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier);
  140425. }
  140426. word += String.fromCodePoint(esc);
  140427. }
  140428. chunkStart = this.state.pos;
  140429. } else {
  140430. break;
  140431. }
  140432. }
  140433. return word + this.input.slice(chunkStart, this.state.pos);
  140434. }
  140435. readWord(firstCode) {
  140436. const word = this.readWord1(firstCode);
  140437. const type = keywords$12.get(word) || types$12.name;
  140438. this.finishToken(type, word);
  140439. }
  140440. checkKeywordEscapes() {
  140441. const kw2 = this.state.type.keyword;
  140442. if (kw2 && this.state.containsEsc) {
  140443. this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, kw2);
  140444. }
  140445. }
  140446. updateContext(prevType) {
  140447. var _this$state$type$upda, _this$state$type;
  140448. (_this$state$type$upda = (_this$state$type = this.state.type).updateContext) == null ? void 0 : _this$state$type$upda.call(_this$state$type, this.state.context);
  140449. }
  140450. };
  140451. var ClassScope = class {
  140452. constructor() {
  140453. this.privateNames = /* @__PURE__ */ new Set();
  140454. this.loneAccessors = /* @__PURE__ */ new Map();
  140455. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  140456. }
  140457. };
  140458. var ClassScopeHandler = class {
  140459. constructor(raise2) {
  140460. this.stack = [];
  140461. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  140462. this.raise = raise2;
  140463. }
  140464. current() {
  140465. return this.stack[this.stack.length - 1];
  140466. }
  140467. enter() {
  140468. this.stack.push(new ClassScope());
  140469. }
  140470. exit() {
  140471. const oldClassScope = this.stack.pop();
  140472. const current2 = this.current();
  140473. for (const [name2, pos] of Array.from(oldClassScope.undefinedPrivateNames)) {
  140474. if (current2) {
  140475. if (!current2.undefinedPrivateNames.has(name2)) {
  140476. current2.undefinedPrivateNames.set(name2, pos);
  140477. }
  140478. } else {
  140479. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  140480. }
  140481. }
  140482. }
  140483. declarePrivateName(name2, elementType, pos) {
  140484. const classScope = this.current();
  140485. let redefined = classScope.privateNames.has(name2);
  140486. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  140487. const accessor = redefined && classScope.loneAccessors.get(name2);
  140488. if (accessor) {
  140489. const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  140490. const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  140491. const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  140492. const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  140493. redefined = oldKind === newKind || oldStatic !== newStatic;
  140494. if (!redefined)
  140495. classScope.loneAccessors.delete(name2);
  140496. } else if (!redefined) {
  140497. classScope.loneAccessors.set(name2, elementType);
  140498. }
  140499. }
  140500. if (redefined) {
  140501. this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name2);
  140502. }
  140503. classScope.privateNames.add(name2);
  140504. classScope.undefinedPrivateNames.delete(name2);
  140505. }
  140506. usePrivateName(name2, pos) {
  140507. let classScope;
  140508. for (classScope of this.stack) {
  140509. if (classScope.privateNames.has(name2))
  140510. return;
  140511. }
  140512. if (classScope) {
  140513. classScope.undefinedPrivateNames.set(name2, pos);
  140514. } else {
  140515. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name2);
  140516. }
  140517. }
  140518. };
  140519. var kExpression = 0;
  140520. var kMaybeArrowParameterDeclaration = 1;
  140521. var kMaybeAsyncArrowParameterDeclaration = 2;
  140522. var kParameterDeclaration = 3;
  140523. var ExpressionScope = class {
  140524. constructor(type = kExpression) {
  140525. this.type = void 0;
  140526. this.type = type;
  140527. }
  140528. canBeArrowParameterDeclaration() {
  140529. return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
  140530. }
  140531. isCertainlyParameterDeclaration() {
  140532. return this.type === kParameterDeclaration;
  140533. }
  140534. };
  140535. var ArrowHeadParsingScope = class extends ExpressionScope {
  140536. constructor(type) {
  140537. super(type);
  140538. this.errors = /* @__PURE__ */ new Map();
  140539. }
  140540. recordDeclarationError(pos, template) {
  140541. this.errors.set(pos, template);
  140542. }
  140543. clearDeclarationError(pos) {
  140544. this.errors.delete(pos);
  140545. }
  140546. iterateErrors(iterator) {
  140547. this.errors.forEach(iterator);
  140548. }
  140549. };
  140550. var ExpressionScopeHandler = class {
  140551. constructor(raise2) {
  140552. this.stack = [new ExpressionScope()];
  140553. this.raise = raise2;
  140554. }
  140555. enter(scope) {
  140556. this.stack.push(scope);
  140557. }
  140558. exit() {
  140559. this.stack.pop();
  140560. }
  140561. recordParameterInitializerError(pos, template) {
  140562. const {
  140563. stack
  140564. } = this;
  140565. let i = stack.length - 1;
  140566. let scope = stack[i];
  140567. while (!scope.isCertainlyParameterDeclaration()) {
  140568. if (scope.canBeArrowParameterDeclaration()) {
  140569. scope.recordDeclarationError(pos, template);
  140570. } else {
  140571. return;
  140572. }
  140573. scope = stack[--i];
  140574. }
  140575. this.raise(pos, template);
  140576. }
  140577. recordParenthesizedIdentifierError(pos, template) {
  140578. const {
  140579. stack
  140580. } = this;
  140581. const scope = stack[stack.length - 1];
  140582. if (scope.isCertainlyParameterDeclaration()) {
  140583. this.raise(pos, template);
  140584. } else if (scope.canBeArrowParameterDeclaration()) {
  140585. scope.recordDeclarationError(pos, template);
  140586. } else {
  140587. return;
  140588. }
  140589. }
  140590. recordAsyncArrowParametersError(pos, template) {
  140591. const {
  140592. stack
  140593. } = this;
  140594. let i = stack.length - 1;
  140595. let scope = stack[i];
  140596. while (scope.canBeArrowParameterDeclaration()) {
  140597. if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
  140598. scope.recordDeclarationError(pos, template);
  140599. }
  140600. scope = stack[--i];
  140601. }
  140602. }
  140603. validateAsPattern() {
  140604. const {
  140605. stack
  140606. } = this;
  140607. const currentScope = stack[stack.length - 1];
  140608. if (!currentScope.canBeArrowParameterDeclaration())
  140609. return;
  140610. currentScope.iterateErrors((template, pos) => {
  140611. this.raise(pos, template);
  140612. let i = stack.length - 2;
  140613. let scope = stack[i];
  140614. while (scope.canBeArrowParameterDeclaration()) {
  140615. scope.clearDeclarationError(pos);
  140616. scope = stack[--i];
  140617. }
  140618. });
  140619. }
  140620. };
  140621. function newParameterDeclarationScope() {
  140622. return new ExpressionScope(kParameterDeclaration);
  140623. }
  140624. function newArrowHeadScope() {
  140625. return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
  140626. }
  140627. function newAsyncArrowScope() {
  140628. return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
  140629. }
  140630. function newExpressionScope() {
  140631. return new ExpressionScope();
  140632. }
  140633. var UtilParser = class extends Tokenizer {
  140634. addExtra(node, key, val) {
  140635. if (!node)
  140636. return;
  140637. const extra = node.extra = node.extra || {};
  140638. extra[key] = val;
  140639. }
  140640. isRelational(op) {
  140641. return this.match(types$12.relational) && this.state.value === op;
  140642. }
  140643. expectRelational(op) {
  140644. if (this.isRelational(op)) {
  140645. this.next();
  140646. } else {
  140647. this.unexpected(null, types$12.relational);
  140648. }
  140649. }
  140650. isContextual(name2) {
  140651. return this.match(types$12.name) && this.state.value === name2 && !this.state.containsEsc;
  140652. }
  140653. isUnparsedContextual(nameStart, name2) {
  140654. const nameEnd = nameStart + name2.length;
  140655. if (this.input.slice(nameStart, nameEnd) === name2) {
  140656. const nextCh = this.input.charCodeAt(nameEnd);
  140657. return !(isIdentifierChar2(nextCh) || (nextCh & 64512) === 55296);
  140658. }
  140659. return false;
  140660. }
  140661. isLookaheadContextual(name2) {
  140662. const next = this.nextTokenStart();
  140663. return this.isUnparsedContextual(next, name2);
  140664. }
  140665. eatContextual(name2) {
  140666. return this.isContextual(name2) && this.eat(types$12.name);
  140667. }
  140668. expectContextual(name2, template) {
  140669. if (!this.eatContextual(name2))
  140670. this.unexpected(null, template);
  140671. }
  140672. canInsertSemicolon() {
  140673. return this.match(types$12.eof) || this.match(types$12.braceR) || this.hasPrecedingLineBreak();
  140674. }
  140675. hasPrecedingLineBreak() {
  140676. return lineBreak2.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  140677. }
  140678. hasFollowingLineBreak() {
  140679. return lineBreak2.test(this.input.slice(this.state.end, this.nextTokenStart()));
  140680. }
  140681. isLineTerminator() {
  140682. return this.eat(types$12.semi) || this.canInsertSemicolon();
  140683. }
  140684. semicolon(allowAsi = true) {
  140685. if (allowAsi ? this.isLineTerminator() : this.eat(types$12.semi))
  140686. return;
  140687. this.raise(this.state.lastTokEnd, ErrorMessages.MissingSemicolon);
  140688. }
  140689. expect(type, pos) {
  140690. this.eat(type) || this.unexpected(pos, type);
  140691. }
  140692. assertNoSpace(message = "Unexpected space.") {
  140693. if (this.state.start > this.state.lastTokEnd) {
  140694. this.raise(this.state.lastTokEnd, {
  140695. code: ErrorCodes.SyntaxError,
  140696. reasonCode: "UnexpectedSpace",
  140697. template: message
  140698. });
  140699. }
  140700. }
  140701. unexpected(pos, messageOrType = {
  140702. code: ErrorCodes.SyntaxError,
  140703. reasonCode: "UnexpectedToken",
  140704. template: "Unexpected token"
  140705. }) {
  140706. if (messageOrType instanceof TokenType3) {
  140707. messageOrType = {
  140708. code: ErrorCodes.SyntaxError,
  140709. reasonCode: "UnexpectedToken",
  140710. template: `Unexpected token, expected "${messageOrType.label}"`
  140711. };
  140712. }
  140713. throw this.raise(pos != null ? pos : this.state.start, messageOrType);
  140714. }
  140715. expectPlugin(name2, pos) {
  140716. if (!this.hasPlugin(name2)) {
  140717. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  140718. missingPlugin: [name2]
  140719. }, `This experimental syntax requires enabling the parser plugin: '${name2}'`);
  140720. }
  140721. return true;
  140722. }
  140723. expectOnePlugin(names, pos) {
  140724. if (!names.some((n) => this.hasPlugin(n))) {
  140725. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  140726. missingPlugin: names
  140727. }, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`);
  140728. }
  140729. }
  140730. tryParse(fn, oldState = this.state.clone()) {
  140731. const abortSignal = {
  140732. node: null
  140733. };
  140734. try {
  140735. const node = fn((node2 = null) => {
  140736. abortSignal.node = node2;
  140737. throw abortSignal;
  140738. });
  140739. if (this.state.errors.length > oldState.errors.length) {
  140740. const failState = this.state;
  140741. this.state = oldState;
  140742. this.state.tokensLength = failState.tokensLength;
  140743. return {
  140744. node,
  140745. error: failState.errors[oldState.errors.length],
  140746. thrown: false,
  140747. aborted: false,
  140748. failState
  140749. };
  140750. }
  140751. return {
  140752. node,
  140753. error: null,
  140754. thrown: false,
  140755. aborted: false,
  140756. failState: null
  140757. };
  140758. } catch (error) {
  140759. const failState = this.state;
  140760. this.state = oldState;
  140761. if (error instanceof SyntaxError) {
  140762. return {
  140763. node: null,
  140764. error,
  140765. thrown: true,
  140766. aborted: false,
  140767. failState
  140768. };
  140769. }
  140770. if (error === abortSignal) {
  140771. return {
  140772. node: abortSignal.node,
  140773. error: null,
  140774. thrown: false,
  140775. aborted: true,
  140776. failState
  140777. };
  140778. }
  140779. throw error;
  140780. }
  140781. }
  140782. checkExpressionErrors(refExpressionErrors, andThrow) {
  140783. if (!refExpressionErrors)
  140784. return false;
  140785. const {
  140786. shorthandAssign,
  140787. doubleProto
  140788. } = refExpressionErrors;
  140789. if (!andThrow)
  140790. return shorthandAssign >= 0 || doubleProto >= 0;
  140791. if (shorthandAssign >= 0) {
  140792. this.unexpected(shorthandAssign);
  140793. }
  140794. if (doubleProto >= 0) {
  140795. this.raise(doubleProto, ErrorMessages.DuplicateProto);
  140796. }
  140797. }
  140798. isLiteralPropertyName() {
  140799. return this.match(types$12.name) || !!this.state.type.keyword || this.match(types$12.string) || this.match(types$12.num) || this.match(types$12.bigint) || this.match(types$12.decimal);
  140800. }
  140801. isPrivateName(node) {
  140802. return node.type === "PrivateName";
  140803. }
  140804. getPrivateNameSV(node) {
  140805. return node.id.name;
  140806. }
  140807. hasPropertyAsPrivateName(node) {
  140808. return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
  140809. }
  140810. isOptionalChain(node) {
  140811. return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression";
  140812. }
  140813. isObjectProperty(node) {
  140814. return node.type === "ObjectProperty";
  140815. }
  140816. isObjectMethod(node) {
  140817. return node.type === "ObjectMethod";
  140818. }
  140819. initializeScopes(inModule = this.options.sourceType === "module") {
  140820. const oldLabels = this.state.labels;
  140821. this.state.labels = [];
  140822. const oldExportedIdentifiers = this.exportedIdentifiers;
  140823. this.exportedIdentifiers = /* @__PURE__ */ new Set();
  140824. const oldInModule = this.inModule;
  140825. this.inModule = inModule;
  140826. const oldScope = this.scope;
  140827. const ScopeHandler2 = this.getScopeHandler();
  140828. this.scope = new ScopeHandler2(this.raise.bind(this), this.inModule);
  140829. const oldProdParam = this.prodParam;
  140830. this.prodParam = new ProductionParameterHandler();
  140831. const oldClassScope = this.classScope;
  140832. this.classScope = new ClassScopeHandler(this.raise.bind(this));
  140833. const oldExpressionScope = this.expressionScope;
  140834. this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
  140835. return () => {
  140836. this.state.labels = oldLabels;
  140837. this.exportedIdentifiers = oldExportedIdentifiers;
  140838. this.inModule = oldInModule;
  140839. this.scope = oldScope;
  140840. this.prodParam = oldProdParam;
  140841. this.classScope = oldClassScope;
  140842. this.expressionScope = oldExpressionScope;
  140843. };
  140844. }
  140845. enterInitialScopes() {
  140846. let paramFlags = PARAM;
  140847. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  140848. paramFlags |= PARAM_AWAIT;
  140849. }
  140850. this.scope.enter(SCOPE_PROGRAM);
  140851. this.prodParam.enter(paramFlags);
  140852. }
  140853. };
  140854. var ExpressionErrors = class {
  140855. constructor() {
  140856. this.shorthandAssign = -1;
  140857. this.doubleProto = -1;
  140858. }
  140859. };
  140860. var Node3 = class {
  140861. constructor(parser, pos, loc) {
  140862. this.type = void 0;
  140863. this.start = void 0;
  140864. this.end = void 0;
  140865. this.loc = void 0;
  140866. this.range = void 0;
  140867. this.leadingComments = void 0;
  140868. this.trailingComments = void 0;
  140869. this.innerComments = void 0;
  140870. this.extra = void 0;
  140871. this.type = "";
  140872. this.start = pos;
  140873. this.end = 0;
  140874. this.loc = new SourceLocation3(loc);
  140875. if (parser != null && parser.options.ranges)
  140876. this.range = [pos, 0];
  140877. if (parser != null && parser.filename)
  140878. this.loc.filename = parser.filename;
  140879. }
  140880. __clone() {
  140881. const newNode = new Node3();
  140882. const keys2 = Object.keys(this);
  140883. for (let i = 0, length = keys2.length; i < length; i++) {
  140884. const key = keys2[i];
  140885. if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
  140886. newNode[key] = this[key];
  140887. }
  140888. }
  140889. return newNode;
  140890. }
  140891. };
  140892. var NodeUtils = class extends UtilParser {
  140893. startNode() {
  140894. return new Node3(this, this.state.start, this.state.startLoc);
  140895. }
  140896. startNodeAt(pos, loc) {
  140897. return new Node3(this, pos, loc);
  140898. }
  140899. startNodeAtNode(type) {
  140900. return this.startNodeAt(type.start, type.loc.start);
  140901. }
  140902. finishNode(node, type) {
  140903. return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  140904. }
  140905. finishNodeAt(node, type, pos, loc) {
  140906. node.type = type;
  140907. node.end = pos;
  140908. node.loc.end = loc;
  140909. if (this.options.ranges)
  140910. node.range[1] = pos;
  140911. this.processComment(node);
  140912. return node;
  140913. }
  140914. resetStartLocation(node, start3, startLoc) {
  140915. node.start = start3;
  140916. node.loc.start = startLoc;
  140917. if (this.options.ranges)
  140918. node.range[0] = start3;
  140919. }
  140920. resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) {
  140921. node.end = end;
  140922. node.loc.end = endLoc;
  140923. if (this.options.ranges)
  140924. node.range[1] = end;
  140925. }
  140926. resetStartLocationFromNode(node, locationNode) {
  140927. this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
  140928. }
  140929. };
  140930. var unwrapParenthesizedExpression = (node) => {
  140931. return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
  140932. };
  140933. var LValParser = class extends NodeUtils {
  140934. toAssignable(node, isLHS = false) {
  140935. var _node$extra, _node$extra3;
  140936. let parenthesized = void 0;
  140937. if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) {
  140938. parenthesized = unwrapParenthesizedExpression(node);
  140939. if (isLHS) {
  140940. if (parenthesized.type === "Identifier") {
  140941. this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  140942. } else if (parenthesized.type !== "MemberExpression") {
  140943. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  140944. }
  140945. } else {
  140946. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  140947. }
  140948. }
  140949. switch (node.type) {
  140950. case "Identifier":
  140951. case "ObjectPattern":
  140952. case "ArrayPattern":
  140953. case "AssignmentPattern":
  140954. break;
  140955. case "ObjectExpression":
  140956. node.type = "ObjectPattern";
  140957. for (let i = 0, length = node.properties.length, last2 = length - 1; i < length; i++) {
  140958. var _node$extra2;
  140959. const prop = node.properties[i];
  140960. const isLast = i === last2;
  140961. this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  140962. if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingComma) {
  140963. this.raiseRestNotLast(node.extra.trailingComma);
  140964. }
  140965. }
  140966. break;
  140967. case "ObjectProperty":
  140968. this.toAssignable(node.value, isLHS);
  140969. break;
  140970. case "SpreadElement": {
  140971. this.checkToRestConversion(node);
  140972. node.type = "RestElement";
  140973. const arg = node.argument;
  140974. this.toAssignable(arg, isLHS);
  140975. break;
  140976. }
  140977. case "ArrayExpression":
  140978. node.type = "ArrayPattern";
  140979. this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS);
  140980. break;
  140981. case "AssignmentExpression":
  140982. if (node.operator !== "=") {
  140983. this.raise(node.left.end, ErrorMessages.MissingEqInAssignment);
  140984. }
  140985. node.type = "AssignmentPattern";
  140986. delete node.operator;
  140987. this.toAssignable(node.left, isLHS);
  140988. break;
  140989. case "ParenthesizedExpression":
  140990. this.toAssignable(parenthesized, isLHS);
  140991. break;
  140992. }
  140993. return node;
  140994. }
  140995. toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  140996. if (prop.type === "ObjectMethod") {
  140997. const error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod;
  140998. this.raise(prop.key.start, error);
  140999. } else if (prop.type === "SpreadElement" && !isLast) {
  141000. this.raiseRestNotLast(prop.start);
  141001. } else {
  141002. this.toAssignable(prop, isLHS);
  141003. }
  141004. }
  141005. toAssignableList(exprList, trailingCommaPos, isLHS) {
  141006. let end = exprList.length;
  141007. if (end) {
  141008. const last2 = exprList[end - 1];
  141009. if ((last2 == null ? void 0 : last2.type) === "RestElement") {
  141010. --end;
  141011. } else if ((last2 == null ? void 0 : last2.type) === "SpreadElement") {
  141012. last2.type = "RestElement";
  141013. let arg = last2.argument;
  141014. this.toAssignable(arg, isLHS);
  141015. arg = unwrapParenthesizedExpression(arg);
  141016. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
  141017. this.unexpected(arg.start);
  141018. }
  141019. if (trailingCommaPos) {
  141020. this.raiseTrailingCommaAfterRest(trailingCommaPos);
  141021. }
  141022. --end;
  141023. }
  141024. }
  141025. for (let i = 0; i < end; i++) {
  141026. const elt = exprList[i];
  141027. if (elt) {
  141028. this.toAssignable(elt, isLHS);
  141029. if (elt.type === "RestElement") {
  141030. this.raiseRestNotLast(elt.start);
  141031. }
  141032. }
  141033. }
  141034. return exprList;
  141035. }
  141036. toReferencedList(exprList, isParenthesizedExpr) {
  141037. return exprList;
  141038. }
  141039. toReferencedListDeep(exprList, isParenthesizedExpr) {
  141040. this.toReferencedList(exprList, isParenthesizedExpr);
  141041. for (const expr of exprList) {
  141042. if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
  141043. this.toReferencedListDeep(expr.elements);
  141044. }
  141045. }
  141046. }
  141047. parseSpread(refExpressionErrors, refNeedsArrowPos) {
  141048. const node = this.startNode();
  141049. this.next();
  141050. node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, void 0, refNeedsArrowPos);
  141051. return this.finishNode(node, "SpreadElement");
  141052. }
  141053. parseRestBinding() {
  141054. const node = this.startNode();
  141055. this.next();
  141056. node.argument = this.parseBindingAtom();
  141057. return this.finishNode(node, "RestElement");
  141058. }
  141059. parseBindingAtom() {
  141060. switch (this.state.type) {
  141061. case types$12.bracketL: {
  141062. const node = this.startNode();
  141063. this.next();
  141064. node.elements = this.parseBindingList(types$12.bracketR, 93, true);
  141065. return this.finishNode(node, "ArrayPattern");
  141066. }
  141067. case types$12.braceL:
  141068. return this.parseObjectLike(types$12.braceR, true);
  141069. }
  141070. return this.parseIdentifier();
  141071. }
  141072. parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
  141073. const elts = [];
  141074. let first = true;
  141075. while (!this.eat(close)) {
  141076. if (first) {
  141077. first = false;
  141078. } else {
  141079. this.expect(types$12.comma);
  141080. }
  141081. if (allowEmpty && this.match(types$12.comma)) {
  141082. elts.push(null);
  141083. } else if (this.eat(close)) {
  141084. break;
  141085. } else if (this.match(types$12.ellipsis)) {
  141086. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
  141087. this.checkCommaAfterRest(closeCharCode);
  141088. this.expect(close);
  141089. break;
  141090. } else {
  141091. const decorators = [];
  141092. if (this.match(types$12.at) && this.hasPlugin("decorators")) {
  141093. this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator);
  141094. }
  141095. while (this.match(types$12.at)) {
  141096. decorators.push(this.parseDecorator());
  141097. }
  141098. elts.push(this.parseAssignableListItem(allowModifiers, decorators));
  141099. }
  141100. }
  141101. return elts;
  141102. }
  141103. parseAssignableListItem(allowModifiers, decorators) {
  141104. const left = this.parseMaybeDefault();
  141105. this.parseAssignableListItemTypes(left);
  141106. const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  141107. if (decorators.length) {
  141108. left.decorators = decorators;
  141109. }
  141110. return elt;
  141111. }
  141112. parseAssignableListItemTypes(param) {
  141113. return param;
  141114. }
  141115. parseMaybeDefault(startPos, startLoc, left) {
  141116. var _startLoc, _startPos, _left;
  141117. startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
  141118. startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
  141119. left = (_left = left) != null ? _left : this.parseBindingAtom();
  141120. if (!this.eat(types$12.eq))
  141121. return left;
  141122. const node = this.startNodeAt(startPos, startLoc);
  141123. node.left = left;
  141124. node.right = this.parseMaybeAssignAllowIn();
  141125. return this.finishNode(node, "AssignmentPattern");
  141126. }
  141127. checkLVal(expr, contextDescription, bindingType = BIND_NONE2, checkClashes, disallowLetBinding, strictModeChanged = false) {
  141128. switch (expr.type) {
  141129. case "Identifier": {
  141130. const {
  141131. name: name2
  141132. } = expr;
  141133. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name2, this.inModule) : isStrictBindOnlyReservedWord(name2))) {
  141134. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name2);
  141135. }
  141136. if (checkClashes) {
  141137. if (checkClashes.has(name2)) {
  141138. this.raise(expr.start, ErrorMessages.ParamDupe);
  141139. } else {
  141140. checkClashes.add(name2);
  141141. }
  141142. }
  141143. if (disallowLetBinding && name2 === "let") {
  141144. this.raise(expr.start, ErrorMessages.LetInLexicalBinding);
  141145. }
  141146. if (!(bindingType & BIND_NONE2)) {
  141147. this.scope.declareName(name2, bindingType, expr.start);
  141148. }
  141149. break;
  141150. }
  141151. case "MemberExpression":
  141152. if (bindingType !== BIND_NONE2) {
  141153. this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern);
  141154. }
  141155. break;
  141156. case "ObjectPattern":
  141157. for (let prop of expr.properties) {
  141158. if (this.isObjectProperty(prop))
  141159. prop = prop.value;
  141160. else if (this.isObjectMethod(prop))
  141161. continue;
  141162. this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  141163. }
  141164. break;
  141165. case "ArrayPattern":
  141166. for (const elem of expr.elements) {
  141167. if (elem) {
  141168. this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  141169. }
  141170. }
  141171. break;
  141172. case "AssignmentPattern":
  141173. this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
  141174. break;
  141175. case "RestElement":
  141176. this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
  141177. break;
  141178. case "ParenthesizedExpression":
  141179. this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
  141180. break;
  141181. default: {
  141182. this.raise(expr.start, bindingType === BIND_NONE2 ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription);
  141183. }
  141184. }
  141185. }
  141186. checkToRestConversion(node) {
  141187. if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
  141188. this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern);
  141189. }
  141190. }
  141191. checkCommaAfterRest(close) {
  141192. if (this.match(types$12.comma)) {
  141193. if (this.lookaheadCharCode() === close) {
  141194. this.raiseTrailingCommaAfterRest(this.state.start);
  141195. } else {
  141196. this.raiseRestNotLast(this.state.start);
  141197. }
  141198. }
  141199. }
  141200. raiseRestNotLast(pos) {
  141201. throw this.raise(pos, ErrorMessages.ElementAfterRest);
  141202. }
  141203. raiseTrailingCommaAfterRest(pos) {
  141204. this.raise(pos, ErrorMessages.RestTrailingComma);
  141205. }
  141206. };
  141207. var ExpressionParser = class extends LValParser {
  141208. checkProto(prop, isRecord, protoRef, refExpressionErrors) {
  141209. if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
  141210. return;
  141211. }
  141212. const key = prop.key;
  141213. const name2 = key.type === "Identifier" ? key.name : key.value;
  141214. if (name2 === "__proto__") {
  141215. if (isRecord) {
  141216. this.raise(key.start, ErrorMessages.RecordNoProto);
  141217. return;
  141218. }
  141219. if (protoRef.used) {
  141220. if (refExpressionErrors) {
  141221. if (refExpressionErrors.doubleProto === -1) {
  141222. refExpressionErrors.doubleProto = key.start;
  141223. }
  141224. } else {
  141225. this.raise(key.start, ErrorMessages.DuplicateProto);
  141226. }
  141227. }
  141228. protoRef.used = true;
  141229. }
  141230. }
  141231. shouldExitDescending(expr, potentialArrowAt) {
  141232. return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
  141233. }
  141234. getExpression() {
  141235. let paramFlags = PARAM;
  141236. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  141237. paramFlags |= PARAM_AWAIT;
  141238. }
  141239. this.scope.enter(SCOPE_PROGRAM);
  141240. this.prodParam.enter(paramFlags);
  141241. this.nextToken();
  141242. const expr = this.parseExpression();
  141243. if (!this.match(types$12.eof)) {
  141244. this.unexpected();
  141245. }
  141246. expr.comments = this.state.comments;
  141247. expr.errors = this.state.errors;
  141248. if (this.options.tokens) {
  141249. expr.tokens = this.tokens;
  141250. }
  141251. return expr;
  141252. }
  141253. parseExpression(disallowIn, refExpressionErrors) {
  141254. if (disallowIn) {
  141255. return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  141256. }
  141257. return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  141258. }
  141259. parseExpressionBase(refExpressionErrors) {
  141260. const startPos = this.state.start;
  141261. const startLoc = this.state.startLoc;
  141262. const expr = this.parseMaybeAssign(refExpressionErrors);
  141263. if (this.match(types$12.comma)) {
  141264. const node = this.startNodeAt(startPos, startLoc);
  141265. node.expressions = [expr];
  141266. while (this.eat(types$12.comma)) {
  141267. node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
  141268. }
  141269. this.toReferencedList(node.expressions);
  141270. return this.finishNode(node, "SequenceExpression");
  141271. }
  141272. return expr;
  141273. }
  141274. parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  141275. return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
  141276. }
  141277. parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  141278. return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
  141279. }
  141280. parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
  141281. const startPos = this.state.start;
  141282. const startLoc = this.state.startLoc;
  141283. if (this.isContextual("yield")) {
  141284. if (this.prodParam.hasYield) {
  141285. let left2 = this.parseYield();
  141286. if (afterLeftParse) {
  141287. left2 = afterLeftParse.call(this, left2, startPos, startLoc);
  141288. }
  141289. return left2;
  141290. }
  141291. }
  141292. let ownExpressionErrors;
  141293. if (refExpressionErrors) {
  141294. ownExpressionErrors = false;
  141295. } else {
  141296. refExpressionErrors = new ExpressionErrors();
  141297. ownExpressionErrors = true;
  141298. }
  141299. if (this.match(types$12.parenL) || this.match(types$12.name)) {
  141300. this.state.potentialArrowAt = this.state.start;
  141301. }
  141302. let left = this.parseMaybeConditional(refExpressionErrors, refNeedsArrowPos);
  141303. if (afterLeftParse) {
  141304. left = afterLeftParse.call(this, left, startPos, startLoc);
  141305. }
  141306. if (this.state.type.isAssign) {
  141307. const node = this.startNodeAt(startPos, startLoc);
  141308. const operator = this.state.value;
  141309. node.operator = operator;
  141310. if (this.match(types$12.eq)) {
  141311. node.left = this.toAssignable(left, true);
  141312. refExpressionErrors.doubleProto = -1;
  141313. } else {
  141314. node.left = left;
  141315. }
  141316. if (refExpressionErrors.shorthandAssign >= node.left.start) {
  141317. refExpressionErrors.shorthandAssign = -1;
  141318. }
  141319. this.checkLVal(left, "assignment expression");
  141320. this.next();
  141321. node.right = this.parseMaybeAssign();
  141322. return this.finishNode(node, "AssignmentExpression");
  141323. } else if (ownExpressionErrors) {
  141324. this.checkExpressionErrors(refExpressionErrors, true);
  141325. }
  141326. return left;
  141327. }
  141328. parseMaybeConditional(refExpressionErrors, refNeedsArrowPos) {
  141329. const startPos = this.state.start;
  141330. const startLoc = this.state.startLoc;
  141331. const potentialArrowAt = this.state.potentialArrowAt;
  141332. const expr = this.parseExprOps(refExpressionErrors);
  141333. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  141334. return expr;
  141335. }
  141336. return this.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
  141337. }
  141338. parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
  141339. if (this.eat(types$12.question)) {
  141340. const node = this.startNodeAt(startPos, startLoc);
  141341. node.test = expr;
  141342. node.consequent = this.parseMaybeAssignAllowIn();
  141343. this.expect(types$12.colon);
  141344. node.alternate = this.parseMaybeAssign();
  141345. return this.finishNode(node, "ConditionalExpression");
  141346. }
  141347. return expr;
  141348. }
  141349. parseExprOps(refExpressionErrors) {
  141350. const startPos = this.state.start;
  141351. const startLoc = this.state.startLoc;
  141352. const potentialArrowAt = this.state.potentialArrowAt;
  141353. const expr = this.parseMaybeUnary(refExpressionErrors);
  141354. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  141355. return expr;
  141356. }
  141357. return this.parseExprOp(expr, startPos, startLoc, -1);
  141358. }
  141359. parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  141360. let prec = this.state.type.binop;
  141361. if (prec != null && (this.prodParam.hasIn || !this.match(types$12._in))) {
  141362. if (prec > minPrec) {
  141363. const op = this.state.type;
  141364. if (op === types$12.pipeline) {
  141365. this.expectPlugin("pipelineOperator");
  141366. if (this.state.inFSharpPipelineDirectBody) {
  141367. return left;
  141368. }
  141369. this.state.inPipeline = true;
  141370. this.checkPipelineAtInfixOperator(left, leftStartPos);
  141371. }
  141372. const node = this.startNodeAt(leftStartPos, leftStartLoc);
  141373. node.left = left;
  141374. node.operator = this.state.value;
  141375. const logical = op === types$12.logicalOR || op === types$12.logicalAND;
  141376. const coalesce = op === types$12.nullishCoalescing;
  141377. if (coalesce) {
  141378. prec = types$12.logicalAND.binop;
  141379. }
  141380. this.next();
  141381. if (op === types$12.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
  141382. if (this.match(types$12.name) && this.state.value === "await" && this.prodParam.hasAwait) {
  141383. throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody);
  141384. }
  141385. }
  141386. node.right = this.parseExprOpRightExpr(op, prec);
  141387. this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
  141388. const nextOp = this.state.type;
  141389. if (coalesce && (nextOp === types$12.logicalOR || nextOp === types$12.logicalAND) || logical && nextOp === types$12.nullishCoalescing) {
  141390. throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical);
  141391. }
  141392. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  141393. }
  141394. }
  141395. return left;
  141396. }
  141397. parseExprOpRightExpr(op, prec) {
  141398. const startPos = this.state.start;
  141399. const startLoc = this.state.startLoc;
  141400. switch (op) {
  141401. case types$12.pipeline:
  141402. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  141403. case "smart":
  141404. return this.withTopicPermittingContext(() => {
  141405. return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
  141406. });
  141407. case "fsharp":
  141408. return this.withSoloAwaitPermittingContext(() => {
  141409. return this.parseFSharpPipelineBody(prec);
  141410. });
  141411. }
  141412. default:
  141413. return this.parseExprOpBaseRightExpr(op, prec);
  141414. }
  141415. }
  141416. parseExprOpBaseRightExpr(op, prec) {
  141417. const startPos = this.state.start;
  141418. const startLoc = this.state.startLoc;
  141419. return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec);
  141420. }
  141421. checkExponentialAfterUnary(node) {
  141422. if (this.match(types$12.exponent)) {
  141423. this.raise(node.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation);
  141424. }
  141425. }
  141426. parseMaybeUnary(refExpressionErrors, sawUnary) {
  141427. const startPos = this.state.start;
  141428. const startLoc = this.state.startLoc;
  141429. const isAwait = this.isContextual("await");
  141430. if (isAwait && this.isAwaitAllowed()) {
  141431. this.next();
  141432. const expr2 = this.parseAwait(startPos, startLoc);
  141433. if (!sawUnary)
  141434. this.checkExponentialAfterUnary(expr2);
  141435. return expr2;
  141436. }
  141437. if (this.isContextual("module") && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) {
  141438. return this.parseModuleExpression();
  141439. }
  141440. const update = this.match(types$12.incDec);
  141441. const node = this.startNode();
  141442. if (this.state.type.prefix) {
  141443. node.operator = this.state.value;
  141444. node.prefix = true;
  141445. if (this.match(types$12._throw)) {
  141446. this.expectPlugin("throwExpressions");
  141447. }
  141448. const isDelete = this.match(types$12._delete);
  141449. this.next();
  141450. node.argument = this.parseMaybeUnary(null, true);
  141451. this.checkExpressionErrors(refExpressionErrors, true);
  141452. if (this.state.strict && isDelete) {
  141453. const arg = node.argument;
  141454. if (arg.type === "Identifier") {
  141455. this.raise(node.start, ErrorMessages.StrictDelete);
  141456. } else if (this.hasPropertyAsPrivateName(arg)) {
  141457. this.raise(node.start, ErrorMessages.DeletePrivateField);
  141458. }
  141459. }
  141460. if (!update) {
  141461. if (!sawUnary)
  141462. this.checkExponentialAfterUnary(node);
  141463. return this.finishNode(node, "UnaryExpression");
  141464. }
  141465. }
  141466. const expr = this.parseUpdate(node, update, refExpressionErrors);
  141467. if (isAwait) {
  141468. const startsExpr3 = this.hasPlugin("v8intrinsic") ? this.state.type.startsExpr : this.state.type.startsExpr && !this.match(types$12.modulo);
  141469. if (startsExpr3 && !this.isAmbiguousAwait()) {
  141470. this.raiseOverwrite(startPos, this.hasPlugin("topLevelAwait") ? ErrorMessages.AwaitNotInAsyncContext : ErrorMessages.AwaitNotInAsyncFunction);
  141471. return this.parseAwait(startPos, startLoc);
  141472. }
  141473. }
  141474. return expr;
  141475. }
  141476. parseUpdate(node, update, refExpressionErrors) {
  141477. if (update) {
  141478. this.checkLVal(node.argument, "prefix operation");
  141479. return this.finishNode(node, "UpdateExpression");
  141480. }
  141481. const startPos = this.state.start;
  141482. const startLoc = this.state.startLoc;
  141483. let expr = this.parseExprSubscripts(refExpressionErrors);
  141484. if (this.checkExpressionErrors(refExpressionErrors, false))
  141485. return expr;
  141486. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  141487. const node2 = this.startNodeAt(startPos, startLoc);
  141488. node2.operator = this.state.value;
  141489. node2.prefix = false;
  141490. node2.argument = expr;
  141491. this.checkLVal(expr, "postfix operation");
  141492. this.next();
  141493. expr = this.finishNode(node2, "UpdateExpression");
  141494. }
  141495. return expr;
  141496. }
  141497. parseExprSubscripts(refExpressionErrors) {
  141498. const startPos = this.state.start;
  141499. const startLoc = this.state.startLoc;
  141500. const potentialArrowAt = this.state.potentialArrowAt;
  141501. const expr = this.parseExprAtom(refExpressionErrors);
  141502. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  141503. return expr;
  141504. }
  141505. return this.parseSubscripts(expr, startPos, startLoc);
  141506. }
  141507. parseSubscripts(base2, startPos, startLoc, noCalls) {
  141508. const state = {
  141509. optionalChainMember: false,
  141510. maybeAsyncArrow: this.atPossibleAsyncArrow(base2),
  141511. stop: false
  141512. };
  141513. do {
  141514. base2 = this.parseSubscript(base2, startPos, startLoc, noCalls, state);
  141515. state.maybeAsyncArrow = false;
  141516. } while (!state.stop);
  141517. return base2;
  141518. }
  141519. parseSubscript(base2, startPos, startLoc, noCalls, state) {
  141520. if (!noCalls && this.eat(types$12.doubleColon)) {
  141521. return this.parseBind(base2, startPos, startLoc, noCalls, state);
  141522. } else if (this.match(types$12.backQuote)) {
  141523. return this.parseTaggedTemplateExpression(base2, startPos, startLoc, state);
  141524. }
  141525. let optional = false;
  141526. if (this.match(types$12.questionDot)) {
  141527. if (noCalls && this.lookaheadCharCode() === 40) {
  141528. state.stop = true;
  141529. return base2;
  141530. }
  141531. state.optionalChainMember = optional = true;
  141532. this.next();
  141533. }
  141534. if (!noCalls && this.match(types$12.parenL)) {
  141535. return this.parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional);
  141536. } else if (optional || this.match(types$12.bracketL) || this.eat(types$12.dot)) {
  141537. return this.parseMember(base2, startPos, startLoc, state, optional);
  141538. } else {
  141539. state.stop = true;
  141540. return base2;
  141541. }
  141542. }
  141543. parseMember(base2, startPos, startLoc, state, optional) {
  141544. const node = this.startNodeAt(startPos, startLoc);
  141545. const computed = this.eat(types$12.bracketL);
  141546. node.object = base2;
  141547. node.computed = computed;
  141548. const privateName = !computed && this.match(types$12.privateName) && this.state.value;
  141549. const property = computed ? this.parseExpression() : privateName ? this.parsePrivateName() : this.parseIdentifier(true);
  141550. if (privateName !== false) {
  141551. if (node.object.type === "Super") {
  141552. this.raise(startPos, ErrorMessages.SuperPrivateField);
  141553. }
  141554. this.classScope.usePrivateName(privateName, property.start);
  141555. }
  141556. node.property = property;
  141557. if (computed) {
  141558. this.expect(types$12.bracketR);
  141559. }
  141560. if (state.optionalChainMember) {
  141561. node.optional = optional;
  141562. return this.finishNode(node, "OptionalMemberExpression");
  141563. } else {
  141564. return this.finishNode(node, "MemberExpression");
  141565. }
  141566. }
  141567. parseBind(base2, startPos, startLoc, noCalls, state) {
  141568. const node = this.startNodeAt(startPos, startLoc);
  141569. node.object = base2;
  141570. node.callee = this.parseNoCallExpr();
  141571. state.stop = true;
  141572. return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
  141573. }
  141574. parseCoverCallAndAsyncArrowHead(base2, startPos, startLoc, state, optional) {
  141575. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  141576. let refExpressionErrors = null;
  141577. this.state.maybeInArrowParameters = true;
  141578. this.next();
  141579. let node = this.startNodeAt(startPos, startLoc);
  141580. node.callee = base2;
  141581. if (state.maybeAsyncArrow) {
  141582. this.expressionScope.enter(newAsyncArrowScope());
  141583. refExpressionErrors = new ExpressionErrors();
  141584. }
  141585. if (state.optionalChainMember) {
  141586. node.optional = optional;
  141587. }
  141588. if (optional) {
  141589. node.arguments = this.parseCallExpressionArguments(types$12.parenR);
  141590. } else {
  141591. node.arguments = this.parseCallExpressionArguments(types$12.parenR, base2.type === "Import", base2.type !== "Super", node, refExpressionErrors);
  141592. }
  141593. this.finishCallExpression(node, state.optionalChainMember);
  141594. if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  141595. state.stop = true;
  141596. this.expressionScope.validateAsPattern();
  141597. this.expressionScope.exit();
  141598. node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
  141599. } else {
  141600. if (state.maybeAsyncArrow) {
  141601. this.checkExpressionErrors(refExpressionErrors, true);
  141602. this.expressionScope.exit();
  141603. }
  141604. this.toReferencedArguments(node);
  141605. }
  141606. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  141607. return node;
  141608. }
  141609. toReferencedArguments(node, isParenthesizedExpr) {
  141610. this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
  141611. }
  141612. parseTaggedTemplateExpression(base2, startPos, startLoc, state) {
  141613. const node = this.startNodeAt(startPos, startLoc);
  141614. node.tag = base2;
  141615. node.quasi = this.parseTemplate(true);
  141616. if (state.optionalChainMember) {
  141617. this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate);
  141618. }
  141619. return this.finishNode(node, "TaggedTemplateExpression");
  141620. }
  141621. atPossibleAsyncArrow(base2) {
  141622. return base2.type === "Identifier" && base2.name === "async" && this.state.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && base2.start === this.state.potentialArrowAt;
  141623. }
  141624. finishCallExpression(node, optional) {
  141625. if (node.callee.type === "Import") {
  141626. if (node.arguments.length === 2) {
  141627. {
  141628. if (!this.hasPlugin("moduleAttributes")) {
  141629. this.expectPlugin("importAssertions");
  141630. }
  141631. }
  141632. }
  141633. if (node.arguments.length === 0 || node.arguments.length > 2) {
  141634. this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
  141635. } else {
  141636. for (const arg of node.arguments) {
  141637. if (arg.type === "SpreadElement") {
  141638. this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument);
  141639. }
  141640. }
  141641. }
  141642. }
  141643. return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
  141644. }
  141645. parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) {
  141646. const elts = [];
  141647. let first = true;
  141648. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  141649. this.state.inFSharpPipelineDirectBody = false;
  141650. while (!this.eat(close)) {
  141651. if (first) {
  141652. first = false;
  141653. } else {
  141654. this.expect(types$12.comma);
  141655. if (this.match(close)) {
  141656. if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
  141657. this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma);
  141658. }
  141659. if (nodeForExtra) {
  141660. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  141661. }
  141662. this.next();
  141663. break;
  141664. }
  141665. }
  141666. elts.push(this.parseExprListItem(false, refExpressionErrors, {
  141667. start: 0
  141668. }, allowPlaceholder));
  141669. }
  141670. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  141671. return elts;
  141672. }
  141673. shouldParseAsyncArrow() {
  141674. return this.match(types$12.arrow) && !this.canInsertSemicolon();
  141675. }
  141676. parseAsyncArrowFromCallExpression(node, call) {
  141677. var _call$extra;
  141678. this.expect(types$12.arrow);
  141679. this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
  141680. return node;
  141681. }
  141682. parseNoCallExpr() {
  141683. const startPos = this.state.start;
  141684. const startLoc = this.state.startLoc;
  141685. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  141686. }
  141687. parseExprAtom(refExpressionErrors) {
  141688. let node;
  141689. switch (this.state.type) {
  141690. case types$12._super:
  141691. return this.parseSuper();
  141692. case types$12._import:
  141693. node = this.startNode();
  141694. this.next();
  141695. if (this.match(types$12.dot)) {
  141696. return this.parseImportMetaProperty(node);
  141697. }
  141698. if (!this.match(types$12.parenL)) {
  141699. this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport);
  141700. }
  141701. return this.finishNode(node, "Import");
  141702. case types$12._this:
  141703. node = this.startNode();
  141704. this.next();
  141705. return this.finishNode(node, "ThisExpression");
  141706. case types$12.name: {
  141707. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  141708. const containsEsc = this.state.containsEsc;
  141709. const id = this.parseIdentifier();
  141710. if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
  141711. if (this.match(types$12._function)) {
  141712. this.next();
  141713. return this.parseFunction(this.startNodeAtNode(id), void 0, true);
  141714. } else if (this.match(types$12.name)) {
  141715. if (this.lookaheadCharCode() === 61) {
  141716. return this.parseAsyncArrowUnaryFunction(id);
  141717. } else {
  141718. return id;
  141719. }
  141720. } else if (this.match(types$12._do)) {
  141721. return this.parseDo(true);
  141722. }
  141723. }
  141724. if (canBeArrow && this.match(types$12.arrow) && !this.canInsertSemicolon()) {
  141725. this.next();
  141726. return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
  141727. }
  141728. return id;
  141729. }
  141730. case types$12._do: {
  141731. return this.parseDo(false);
  141732. }
  141733. case types$12.slash:
  141734. case types$12.slashAssign: {
  141735. this.readRegexp();
  141736. return this.parseRegExpLiteral(this.state.value);
  141737. }
  141738. case types$12.num:
  141739. return this.parseNumericLiteral(this.state.value);
  141740. case types$12.bigint:
  141741. return this.parseBigIntLiteral(this.state.value);
  141742. case types$12.decimal:
  141743. return this.parseDecimalLiteral(this.state.value);
  141744. case types$12.string:
  141745. return this.parseStringLiteral(this.state.value);
  141746. case types$12._null:
  141747. return this.parseNullLiteral();
  141748. case types$12._true:
  141749. return this.parseBooleanLiteral(true);
  141750. case types$12._false:
  141751. return this.parseBooleanLiteral(false);
  141752. case types$12.parenL: {
  141753. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  141754. return this.parseParenAndDistinguishExpression(canBeArrow);
  141755. }
  141756. case types$12.bracketBarL:
  141757. case types$12.bracketHashL: {
  141758. return this.parseArrayLike(this.state.type === types$12.bracketBarL ? types$12.bracketBarR : types$12.bracketR, false, true, refExpressionErrors);
  141759. }
  141760. case types$12.bracketL: {
  141761. return this.parseArrayLike(types$12.bracketR, true, false, refExpressionErrors);
  141762. }
  141763. case types$12.braceBarL:
  141764. case types$12.braceHashL: {
  141765. return this.parseObjectLike(this.state.type === types$12.braceBarL ? types$12.braceBarR : types$12.braceR, false, true, refExpressionErrors);
  141766. }
  141767. case types$12.braceL: {
  141768. return this.parseObjectLike(types$12.braceR, false, false, refExpressionErrors);
  141769. }
  141770. case types$12._function:
  141771. return this.parseFunctionOrFunctionSent();
  141772. case types$12.at:
  141773. this.parseDecorators();
  141774. case types$12._class:
  141775. node = this.startNode();
  141776. this.takeDecorators(node);
  141777. return this.parseClass(node, false);
  141778. case types$12._new:
  141779. return this.parseNewOrNewTarget();
  141780. case types$12.backQuote:
  141781. return this.parseTemplate(false);
  141782. case types$12.doubleColon: {
  141783. node = this.startNode();
  141784. this.next();
  141785. node.object = null;
  141786. const callee = node.callee = this.parseNoCallExpr();
  141787. if (callee.type === "MemberExpression") {
  141788. return this.finishNode(node, "BindExpression");
  141789. } else {
  141790. throw this.raise(callee.start, ErrorMessages.UnsupportedBind);
  141791. }
  141792. }
  141793. case types$12.privateName: {
  141794. const start3 = this.state.start;
  141795. const value = this.state.value;
  141796. node = this.parsePrivateName();
  141797. if (this.match(types$12._in)) {
  141798. this.expectPlugin("privateIn");
  141799. this.classScope.usePrivateName(value, node.start);
  141800. } else if (this.hasPlugin("privateIn")) {
  141801. this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, value);
  141802. } else {
  141803. throw this.unexpected(start3);
  141804. }
  141805. return node;
  141806. }
  141807. case types$12.hash: {
  141808. if (this.state.inPipeline) {
  141809. node = this.startNode();
  141810. if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
  141811. this.raise(node.start, ErrorMessages.PrimaryTopicRequiresSmartPipeline);
  141812. }
  141813. this.next();
  141814. if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
  141815. this.raise(node.start, ErrorMessages.PrimaryTopicNotAllowed);
  141816. }
  141817. this.registerTopicReference();
  141818. return this.finishNode(node, "PipelinePrimaryTopicReference");
  141819. }
  141820. }
  141821. case types$12.relational: {
  141822. if (this.state.value === "<") {
  141823. const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
  141824. if (isIdentifierStart2(lookaheadCh) || lookaheadCh === 62) {
  141825. this.expectOnePlugin(["jsx", "flow", "typescript"]);
  141826. }
  141827. }
  141828. }
  141829. default:
  141830. throw this.unexpected();
  141831. }
  141832. }
  141833. parseAsyncArrowUnaryFunction(id) {
  141834. const node = this.startNodeAtNode(id);
  141835. this.prodParam.enter(functionFlags2(true, this.prodParam.hasYield));
  141836. const params = [this.parseIdentifier()];
  141837. this.prodParam.exit();
  141838. if (this.hasPrecedingLineBreak()) {
  141839. this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow);
  141840. }
  141841. this.expect(types$12.arrow);
  141842. this.parseArrowExpression(node, params, true);
  141843. return node;
  141844. }
  141845. parseDo(isAsync) {
  141846. this.expectPlugin("doExpressions");
  141847. if (isAsync) {
  141848. this.expectPlugin("asyncDoExpressions");
  141849. }
  141850. const node = this.startNode();
  141851. node.async = isAsync;
  141852. this.next();
  141853. const oldLabels = this.state.labels;
  141854. this.state.labels = [];
  141855. if (isAsync) {
  141856. this.prodParam.enter(PARAM_AWAIT);
  141857. node.body = this.parseBlock();
  141858. this.prodParam.exit();
  141859. } else {
  141860. node.body = this.parseBlock();
  141861. }
  141862. this.state.labels = oldLabels;
  141863. return this.finishNode(node, "DoExpression");
  141864. }
  141865. parseSuper() {
  141866. const node = this.startNode();
  141867. this.next();
  141868. if (this.match(types$12.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  141869. this.raise(node.start, ErrorMessages.SuperNotAllowed);
  141870. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  141871. this.raise(node.start, ErrorMessages.UnexpectedSuper);
  141872. }
  141873. if (!this.match(types$12.parenL) && !this.match(types$12.bracketL) && !this.match(types$12.dot)) {
  141874. this.raise(node.start, ErrorMessages.UnsupportedSuper);
  141875. }
  141876. return this.finishNode(node, "Super");
  141877. }
  141878. parseMaybePrivateName(isPrivateNameAllowed) {
  141879. const isPrivate = this.match(types$12.privateName);
  141880. if (isPrivate) {
  141881. if (!isPrivateNameAllowed) {
  141882. this.raise(this.state.start + 1, ErrorMessages.UnexpectedPrivateField);
  141883. }
  141884. return this.parsePrivateName();
  141885. } else {
  141886. return this.parseIdentifier(true);
  141887. }
  141888. }
  141889. parsePrivateName() {
  141890. const node = this.startNode();
  141891. const id = this.startNodeAt(this.state.start + 1, new Position3(this.state.curLine, this.state.start + 1 - this.state.lineStart));
  141892. const name2 = this.state.value;
  141893. this.next();
  141894. node.id = this.createIdentifier(id, name2);
  141895. return this.finishNode(node, "PrivateName");
  141896. }
  141897. parseFunctionOrFunctionSent() {
  141898. const node = this.startNode();
  141899. this.next();
  141900. if (this.prodParam.hasYield && this.match(types$12.dot)) {
  141901. const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
  141902. this.next();
  141903. return this.parseMetaProperty(node, meta, "sent");
  141904. }
  141905. return this.parseFunction(node);
  141906. }
  141907. parseMetaProperty(node, meta, propertyName) {
  141908. node.meta = meta;
  141909. if (meta.name === "function" && propertyName === "sent") {
  141910. if (this.isContextual(propertyName)) {
  141911. this.expectPlugin("functionSent");
  141912. } else if (!this.hasPlugin("functionSent")) {
  141913. this.unexpected();
  141914. }
  141915. }
  141916. const containsEsc = this.state.containsEsc;
  141917. node.property = this.parseIdentifier(true);
  141918. if (node.property.name !== propertyName || containsEsc) {
  141919. this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName);
  141920. }
  141921. return this.finishNode(node, "MetaProperty");
  141922. }
  141923. parseImportMetaProperty(node) {
  141924. const id = this.createIdentifier(this.startNodeAtNode(node), "import");
  141925. this.next();
  141926. if (this.isContextual("meta")) {
  141927. if (!this.inModule) {
  141928. this.raise(id.start, SourceTypeModuleErrorMessages.ImportMetaOutsideModule);
  141929. }
  141930. this.sawUnambiguousESM = true;
  141931. }
  141932. return this.parseMetaProperty(node, id, "meta");
  141933. }
  141934. parseLiteralAtNode(value, type, node) {
  141935. this.addExtra(node, "rawValue", value);
  141936. this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
  141937. node.value = value;
  141938. this.next();
  141939. return this.finishNode(node, type);
  141940. }
  141941. parseLiteral(value, type) {
  141942. const node = this.startNode();
  141943. return this.parseLiteralAtNode(value, type, node);
  141944. }
  141945. parseStringLiteral(value) {
  141946. return this.parseLiteral(value, "StringLiteral");
  141947. }
  141948. parseNumericLiteral(value) {
  141949. return this.parseLiteral(value, "NumericLiteral");
  141950. }
  141951. parseBigIntLiteral(value) {
  141952. return this.parseLiteral(value, "BigIntLiteral");
  141953. }
  141954. parseDecimalLiteral(value) {
  141955. return this.parseLiteral(value, "DecimalLiteral");
  141956. }
  141957. parseRegExpLiteral(value) {
  141958. const node = this.parseLiteral(value.value, "RegExpLiteral");
  141959. node.pattern = value.pattern;
  141960. node.flags = value.flags;
  141961. return node;
  141962. }
  141963. parseBooleanLiteral(value) {
  141964. const node = this.startNode();
  141965. node.value = value;
  141966. this.next();
  141967. return this.finishNode(node, "BooleanLiteral");
  141968. }
  141969. parseNullLiteral() {
  141970. const node = this.startNode();
  141971. this.next();
  141972. return this.finishNode(node, "NullLiteral");
  141973. }
  141974. parseParenAndDistinguishExpression(canBeArrow) {
  141975. const startPos = this.state.start;
  141976. const startLoc = this.state.startLoc;
  141977. let val;
  141978. this.next();
  141979. this.expressionScope.enter(newArrowHeadScope());
  141980. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  141981. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  141982. this.state.maybeInArrowParameters = true;
  141983. this.state.inFSharpPipelineDirectBody = false;
  141984. const innerStartPos = this.state.start;
  141985. const innerStartLoc = this.state.startLoc;
  141986. const exprList = [];
  141987. const refExpressionErrors = new ExpressionErrors();
  141988. const refNeedsArrowPos = {
  141989. start: 0
  141990. };
  141991. let first = true;
  141992. let spreadStart;
  141993. let optionalCommaStart;
  141994. while (!this.match(types$12.parenR)) {
  141995. if (first) {
  141996. first = false;
  141997. } else {
  141998. this.expect(types$12.comma, refNeedsArrowPos.start || null);
  141999. if (this.match(types$12.parenR)) {
  142000. optionalCommaStart = this.state.start;
  142001. break;
  142002. }
  142003. }
  142004. if (this.match(types$12.ellipsis)) {
  142005. const spreadNodeStartPos = this.state.start;
  142006. const spreadNodeStartLoc = this.state.startLoc;
  142007. spreadStart = this.state.start;
  142008. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
  142009. this.checkCommaAfterRest(41);
  142010. break;
  142011. } else {
  142012. exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos));
  142013. }
  142014. }
  142015. const innerEndPos = this.state.lastTokEnd;
  142016. const innerEndLoc = this.state.lastTokEndLoc;
  142017. this.expect(types$12.parenR);
  142018. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  142019. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  142020. let arrowNode = this.startNodeAt(startPos, startLoc);
  142021. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  142022. this.expressionScope.validateAsPattern();
  142023. this.expressionScope.exit();
  142024. this.parseArrowExpression(arrowNode, exprList, false);
  142025. return arrowNode;
  142026. }
  142027. this.expressionScope.exit();
  142028. if (!exprList.length) {
  142029. this.unexpected(this.state.lastTokStart);
  142030. }
  142031. if (optionalCommaStart)
  142032. this.unexpected(optionalCommaStart);
  142033. if (spreadStart)
  142034. this.unexpected(spreadStart);
  142035. this.checkExpressionErrors(refExpressionErrors, true);
  142036. if (refNeedsArrowPos.start)
  142037. this.unexpected(refNeedsArrowPos.start);
  142038. this.toReferencedListDeep(exprList, true);
  142039. if (exprList.length > 1) {
  142040. val = this.startNodeAt(innerStartPos, innerStartLoc);
  142041. val.expressions = exprList;
  142042. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  142043. } else {
  142044. val = exprList[0];
  142045. }
  142046. if (!this.options.createParenthesizedExpressions) {
  142047. this.addExtra(val, "parenthesized", true);
  142048. this.addExtra(val, "parenStart", startPos);
  142049. return val;
  142050. }
  142051. const parenExpression = this.startNodeAt(startPos, startLoc);
  142052. parenExpression.expression = val;
  142053. this.finishNode(parenExpression, "ParenthesizedExpression");
  142054. return parenExpression;
  142055. }
  142056. shouldParseArrow() {
  142057. return !this.canInsertSemicolon();
  142058. }
  142059. parseArrow(node) {
  142060. if (this.eat(types$12.arrow)) {
  142061. return node;
  142062. }
  142063. }
  142064. parseParenItem(node, startPos, startLoc) {
  142065. return node;
  142066. }
  142067. parseNewOrNewTarget() {
  142068. const node = this.startNode();
  142069. this.next();
  142070. if (this.match(types$12.dot)) {
  142071. const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
  142072. this.next();
  142073. const metaProp = this.parseMetaProperty(node, meta, "target");
  142074. if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
  142075. this.raise(metaProp.start, ErrorMessages.UnexpectedNewTarget);
  142076. }
  142077. return metaProp;
  142078. }
  142079. return this.parseNew(node);
  142080. }
  142081. parseNew(node) {
  142082. node.callee = this.parseNoCallExpr();
  142083. if (node.callee.type === "Import") {
  142084. this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression);
  142085. } else if (this.isOptionalChain(node.callee)) {
  142086. this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew);
  142087. } else if (this.eat(types$12.questionDot)) {
  142088. this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew);
  142089. }
  142090. this.parseNewArguments(node);
  142091. return this.finishNode(node, "NewExpression");
  142092. }
  142093. parseNewArguments(node) {
  142094. if (this.eat(types$12.parenL)) {
  142095. const args = this.parseExprList(types$12.parenR);
  142096. this.toReferencedList(args);
  142097. node.arguments = args;
  142098. } else {
  142099. node.arguments = [];
  142100. }
  142101. }
  142102. parseTemplateElement(isTagged) {
  142103. const elem = this.startNode();
  142104. if (this.state.value === null) {
  142105. if (!isTagged) {
  142106. this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate);
  142107. }
  142108. }
  142109. elem.value = {
  142110. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  142111. cooked: this.state.value
  142112. };
  142113. this.next();
  142114. elem.tail = this.match(types$12.backQuote);
  142115. return this.finishNode(elem, "TemplateElement");
  142116. }
  142117. parseTemplate(isTagged) {
  142118. const node = this.startNode();
  142119. this.next();
  142120. node.expressions = [];
  142121. let curElt = this.parseTemplateElement(isTagged);
  142122. node.quasis = [curElt];
  142123. while (!curElt.tail) {
  142124. this.expect(types$12.dollarBraceL);
  142125. node.expressions.push(this.parseTemplateSubstitution());
  142126. this.expect(types$12.braceR);
  142127. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  142128. }
  142129. this.next();
  142130. return this.finishNode(node, "TemplateLiteral");
  142131. }
  142132. parseTemplateSubstitution() {
  142133. return this.parseExpression();
  142134. }
  142135. parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
  142136. if (isRecord) {
  142137. this.expectPlugin("recordAndTuple");
  142138. }
  142139. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  142140. this.state.inFSharpPipelineDirectBody = false;
  142141. const propHash = /* @__PURE__ */ Object.create(null);
  142142. let first = true;
  142143. const node = this.startNode();
  142144. node.properties = [];
  142145. this.next();
  142146. while (!this.match(close)) {
  142147. if (first) {
  142148. first = false;
  142149. } else {
  142150. this.expect(types$12.comma);
  142151. if (this.match(close)) {
  142152. this.addExtra(node, "trailingComma", this.state.lastTokStart);
  142153. break;
  142154. }
  142155. }
  142156. const prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);
  142157. if (!isPattern) {
  142158. this.checkProto(prop, isRecord, propHash, refExpressionErrors);
  142159. }
  142160. if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
  142161. this.raise(prop.start, ErrorMessages.InvalidRecordProperty);
  142162. }
  142163. if (prop.shorthand) {
  142164. this.addExtra(prop, "shorthand", true);
  142165. }
  142166. node.properties.push(prop);
  142167. }
  142168. this.next();
  142169. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  142170. let type = "ObjectExpression";
  142171. if (isPattern) {
  142172. type = "ObjectPattern";
  142173. } else if (isRecord) {
  142174. type = "RecordExpression";
  142175. }
  142176. return this.finishNode(node, type);
  142177. }
  142178. maybeAsyncOrAccessorProp(prop) {
  142179. return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(types$12.bracketL) || this.match(types$12.star));
  142180. }
  142181. parsePropertyDefinition(isPattern, refExpressionErrors) {
  142182. let decorators = [];
  142183. if (this.match(types$12.at)) {
  142184. if (this.hasPlugin("decorators")) {
  142185. this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator);
  142186. }
  142187. while (this.match(types$12.at)) {
  142188. decorators.push(this.parseDecorator());
  142189. }
  142190. }
  142191. const prop = this.startNode();
  142192. let isGenerator = false;
  142193. let isAsync = false;
  142194. let isAccessor = false;
  142195. let startPos;
  142196. let startLoc;
  142197. if (this.match(types$12.ellipsis)) {
  142198. if (decorators.length)
  142199. this.unexpected();
  142200. if (isPattern) {
  142201. this.next();
  142202. prop.argument = this.parseIdentifier();
  142203. this.checkCommaAfterRest(125);
  142204. return this.finishNode(prop, "RestElement");
  142205. }
  142206. return this.parseSpread();
  142207. }
  142208. if (decorators.length) {
  142209. prop.decorators = decorators;
  142210. decorators = [];
  142211. }
  142212. prop.method = false;
  142213. if (isPattern || refExpressionErrors) {
  142214. startPos = this.state.start;
  142215. startLoc = this.state.startLoc;
  142216. }
  142217. if (!isPattern) {
  142218. isGenerator = this.eat(types$12.star);
  142219. }
  142220. const containsEsc = this.state.containsEsc;
  142221. const key = this.parsePropertyName(prop, false);
  142222. if (!isPattern && !isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
  142223. const keyName = key.name;
  142224. if (keyName === "async" && !this.hasPrecedingLineBreak()) {
  142225. isAsync = true;
  142226. isGenerator = this.eat(types$12.star);
  142227. this.parsePropertyName(prop, false);
  142228. }
  142229. if (keyName === "get" || keyName === "set") {
  142230. isAccessor = true;
  142231. prop.kind = keyName;
  142232. if (this.match(types$12.star)) {
  142233. isGenerator = true;
  142234. this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName);
  142235. this.next();
  142236. }
  142237. this.parsePropertyName(prop, false);
  142238. }
  142239. }
  142240. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  142241. return prop;
  142242. }
  142243. getGetterSetterExpectedParamCount(method) {
  142244. return method.kind === "get" ? 0 : 1;
  142245. }
  142246. getObjectOrClassMethodParams(method) {
  142247. return method.params;
  142248. }
  142249. checkGetterSetterParams(method) {
  142250. var _params;
  142251. const paramCount = this.getGetterSetterExpectedParamCount(method);
  142252. const params = this.getObjectOrClassMethodParams(method);
  142253. const start3 = method.start;
  142254. if (params.length !== paramCount) {
  142255. if (method.kind === "get") {
  142256. this.raise(start3, ErrorMessages.BadGetterArity);
  142257. } else {
  142258. this.raise(start3, ErrorMessages.BadSetterArity);
  142259. }
  142260. }
  142261. if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
  142262. this.raise(start3, ErrorMessages.BadSetterRestParameter);
  142263. }
  142264. }
  142265. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  142266. if (isAccessor) {
  142267. this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
  142268. this.checkGetterSetterParams(prop);
  142269. return prop;
  142270. }
  142271. if (isAsync || isGenerator || this.match(types$12.parenL)) {
  142272. if (isPattern)
  142273. this.unexpected();
  142274. prop.kind = "method";
  142275. prop.method = true;
  142276. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  142277. }
  142278. }
  142279. parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  142280. prop.shorthand = false;
  142281. if (this.eat(types$12.colon)) {
  142282. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
  142283. return this.finishNode(prop, "ObjectProperty");
  142284. }
  142285. if (!prop.computed && prop.key.type === "Identifier") {
  142286. this.checkReservedWord(prop.key.name, prop.key.start, true, false);
  142287. if (isPattern) {
  142288. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  142289. } else if (this.match(types$12.eq) && refExpressionErrors) {
  142290. if (refExpressionErrors.shorthandAssign === -1) {
  142291. refExpressionErrors.shorthandAssign = this.state.start;
  142292. }
  142293. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  142294. } else {
  142295. prop.value = prop.key.__clone();
  142296. }
  142297. prop.shorthand = true;
  142298. return this.finishNode(prop, "ObjectProperty");
  142299. }
  142300. }
  142301. parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  142302. const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  142303. if (!node)
  142304. this.unexpected();
  142305. return node;
  142306. }
  142307. parsePropertyName(prop, isPrivateNameAllowed) {
  142308. if (this.eat(types$12.bracketL)) {
  142309. prop.computed = true;
  142310. prop.key = this.parseMaybeAssignAllowIn();
  142311. this.expect(types$12.bracketR);
  142312. } else {
  142313. const oldInPropertyName = this.state.inPropertyName;
  142314. this.state.inPropertyName = true;
  142315. const type = this.state.type;
  142316. prop.key = type === types$12.num || type === types$12.string || type === types$12.bigint || type === types$12.decimal ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
  142317. if (type !== types$12.privateName) {
  142318. prop.computed = false;
  142319. }
  142320. this.state.inPropertyName = oldInPropertyName;
  142321. }
  142322. return prop.key;
  142323. }
  142324. initFunction(node, isAsync) {
  142325. node.id = null;
  142326. node.generator = false;
  142327. node.async = !!isAsync;
  142328. }
  142329. parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  142330. this.initFunction(node, isAsync);
  142331. node.generator = !!isGenerator;
  142332. const allowModifiers = isConstructor;
  142333. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_SUPER2 | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  142334. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  142335. this.parseFunctionParams(node, allowModifiers);
  142336. this.parseFunctionBodyAndFinish(node, type, true);
  142337. this.prodParam.exit();
  142338. this.scope.exit();
  142339. return node;
  142340. }
  142341. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  142342. if (isTuple) {
  142343. this.expectPlugin("recordAndTuple");
  142344. }
  142345. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  142346. this.state.inFSharpPipelineDirectBody = false;
  142347. const node = this.startNode();
  142348. this.next();
  142349. node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
  142350. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  142351. return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
  142352. }
  142353. parseArrowExpression(node, params, isAsync, trailingCommaPos) {
  142354. this.scope.enter(SCOPE_FUNCTION2 | SCOPE_ARROW2);
  142355. let flags = functionFlags2(isAsync, false);
  142356. if (!this.match(types$12.bracketL) && this.prodParam.hasIn) {
  142357. flags |= PARAM_IN;
  142358. }
  142359. this.prodParam.enter(flags);
  142360. this.initFunction(node, isAsync);
  142361. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  142362. if (params) {
  142363. this.state.maybeInArrowParameters = true;
  142364. this.setArrowFunctionParameters(node, params, trailingCommaPos);
  142365. }
  142366. this.state.maybeInArrowParameters = false;
  142367. this.parseFunctionBody(node, true);
  142368. this.prodParam.exit();
  142369. this.scope.exit();
  142370. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  142371. return this.finishNode(node, "ArrowFunctionExpression");
  142372. }
  142373. setArrowFunctionParameters(node, params, trailingCommaPos) {
  142374. node.params = this.toAssignableList(params, trailingCommaPos, false);
  142375. }
  142376. parseFunctionBodyAndFinish(node, type, isMethod = false) {
  142377. this.parseFunctionBody(node, false, isMethod);
  142378. this.finishNode(node, type);
  142379. }
  142380. parseFunctionBody(node, allowExpression, isMethod = false) {
  142381. const isExpression = allowExpression && !this.match(types$12.braceL);
  142382. this.expressionScope.enter(newExpressionScope());
  142383. if (isExpression) {
  142384. node.body = this.parseMaybeAssign();
  142385. this.checkParams(node, false, allowExpression, false);
  142386. } else {
  142387. const oldStrict = this.state.strict;
  142388. const oldLabels = this.state.labels;
  142389. this.state.labels = [];
  142390. this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
  142391. node.body = this.parseBlock(true, false, (hasStrictModeDirective) => {
  142392. const nonSimple = !this.isSimpleParamList(node.params);
  142393. if (hasStrictModeDirective && nonSimple) {
  142394. const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
  142395. this.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective);
  142396. }
  142397. const strictModeChanged = !oldStrict && this.state.strict;
  142398. this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
  142399. if (this.state.strict && node.id) {
  142400. this.checkLVal(node.id, "function name", BIND_OUTSIDE2, void 0, void 0, strictModeChanged);
  142401. }
  142402. });
  142403. this.prodParam.exit();
  142404. this.expressionScope.exit();
  142405. this.state.labels = oldLabels;
  142406. }
  142407. }
  142408. isSimpleParamList(params) {
  142409. for (let i = 0, len = params.length; i < len; i++) {
  142410. if (params[i].type !== "Identifier")
  142411. return false;
  142412. }
  142413. return true;
  142414. }
  142415. checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
  142416. const checkClashes = /* @__PURE__ */ new Set();
  142417. for (const param of node.params) {
  142418. this.checkLVal(param, "function parameter list", BIND_VAR2, allowDuplicates ? null : checkClashes, void 0, strictModeChanged);
  142419. }
  142420. }
  142421. parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
  142422. const elts = [];
  142423. let first = true;
  142424. while (!this.eat(close)) {
  142425. if (first) {
  142426. first = false;
  142427. } else {
  142428. this.expect(types$12.comma);
  142429. if (this.match(close)) {
  142430. if (nodeForExtra) {
  142431. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  142432. }
  142433. this.next();
  142434. break;
  142435. }
  142436. }
  142437. elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
  142438. }
  142439. return elts;
  142440. }
  142441. parseExprListItem(allowEmpty, refExpressionErrors, refNeedsArrowPos, allowPlaceholder) {
  142442. let elt;
  142443. if (this.match(types$12.comma)) {
  142444. if (!allowEmpty) {
  142445. this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ",");
  142446. }
  142447. elt = null;
  142448. } else if (this.match(types$12.ellipsis)) {
  142449. const spreadNodeStartPos = this.state.start;
  142450. const spreadNodeStartLoc = this.state.startLoc;
  142451. elt = this.parseParenItem(this.parseSpread(refExpressionErrors, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc);
  142452. } else if (this.match(types$12.question)) {
  142453. this.expectPlugin("partialApplication");
  142454. if (!allowPlaceholder) {
  142455. this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder);
  142456. }
  142457. const node = this.startNode();
  142458. this.next();
  142459. elt = this.finishNode(node, "ArgumentPlaceholder");
  142460. } else {
  142461. elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos);
  142462. }
  142463. return elt;
  142464. }
  142465. parseIdentifier(liberal) {
  142466. const node = this.startNode();
  142467. const name2 = this.parseIdentifierName(node.start, liberal);
  142468. return this.createIdentifier(node, name2);
  142469. }
  142470. createIdentifier(node, name2) {
  142471. node.name = name2;
  142472. node.loc.identifierName = name2;
  142473. return this.finishNode(node, "Identifier");
  142474. }
  142475. parseIdentifierName(pos, liberal) {
  142476. let name2;
  142477. const {
  142478. start: start3,
  142479. type
  142480. } = this.state;
  142481. if (type === types$12.name) {
  142482. name2 = this.state.value;
  142483. } else if (type.keyword) {
  142484. name2 = type.keyword;
  142485. if (type === types$12._class || type === types$12._function) {
  142486. const curContext = this.curContext();
  142487. if (curContext === types2.functionStatement || curContext === types2.functionExpression) {
  142488. this.state.context.pop();
  142489. }
  142490. }
  142491. } else {
  142492. throw this.unexpected();
  142493. }
  142494. if (liberal) {
  142495. this.state.type = types$12.name;
  142496. } else {
  142497. this.checkReservedWord(name2, start3, !!type.keyword, false);
  142498. }
  142499. this.next();
  142500. return name2;
  142501. }
  142502. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  142503. if (word.length > 10) {
  142504. return;
  142505. }
  142506. if (!canBeReservedWord(word)) {
  142507. return;
  142508. }
  142509. if (word === "yield") {
  142510. if (this.prodParam.hasYield) {
  142511. this.raise(startLoc, ErrorMessages.YieldBindingIdentifier);
  142512. return;
  142513. }
  142514. } else if (word === "await") {
  142515. if (this.prodParam.hasAwait) {
  142516. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier);
  142517. return;
  142518. } else if (this.scope.inStaticBlock && !this.scope.inNonArrowFunction) {
  142519. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifierInStaticBlock);
  142520. return;
  142521. } else {
  142522. this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier);
  142523. }
  142524. } else if (word === "arguments") {
  142525. if (this.scope.inClassAndNotInNonArrowFunction) {
  142526. this.raise(startLoc, ErrorMessages.ArgumentsInClass);
  142527. return;
  142528. }
  142529. }
  142530. if (checkKeywords && isKeyword(word)) {
  142531. this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word);
  142532. return;
  142533. }
  142534. const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  142535. if (reservedTest(word, this.inModule)) {
  142536. this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word);
  142537. }
  142538. }
  142539. isAwaitAllowed() {
  142540. if (this.prodParam.hasAwait)
  142541. return true;
  142542. if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
  142543. return true;
  142544. }
  142545. return false;
  142546. }
  142547. parseAwait(startPos, startLoc) {
  142548. const node = this.startNodeAt(startPos, startLoc);
  142549. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter);
  142550. if (this.eat(types$12.star)) {
  142551. this.raise(node.start, ErrorMessages.ObsoleteAwaitStar);
  142552. }
  142553. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  142554. if (this.isAmbiguousAwait()) {
  142555. this.ambiguousScriptDifferentAst = true;
  142556. } else {
  142557. this.sawUnambiguousESM = true;
  142558. }
  142559. }
  142560. if (!this.state.soloAwait) {
  142561. node.argument = this.parseMaybeUnary(null, true);
  142562. }
  142563. return this.finishNode(node, "AwaitExpression");
  142564. }
  142565. isAmbiguousAwait() {
  142566. return this.hasPrecedingLineBreak() || this.match(types$12.plusMin) || this.match(types$12.parenL) || this.match(types$12.bracketL) || this.match(types$12.backQuote) || this.match(types$12.regexp) || this.match(types$12.slash) || this.hasPlugin("v8intrinsic") && this.match(types$12.modulo);
  142567. }
  142568. parseYield() {
  142569. const node = this.startNode();
  142570. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter);
  142571. this.next();
  142572. let delegating = false;
  142573. let argument = null;
  142574. if (!this.hasPrecedingLineBreak()) {
  142575. delegating = this.eat(types$12.star);
  142576. switch (this.state.type) {
  142577. case types$12.semi:
  142578. case types$12.eof:
  142579. case types$12.braceR:
  142580. case types$12.parenR:
  142581. case types$12.bracketR:
  142582. case types$12.braceBarR:
  142583. case types$12.colon:
  142584. case types$12.comma:
  142585. if (!delegating)
  142586. break;
  142587. default:
  142588. argument = this.parseMaybeAssign();
  142589. }
  142590. }
  142591. node.delegate = delegating;
  142592. node.argument = argument;
  142593. return this.finishNode(node, "YieldExpression");
  142594. }
  142595. checkPipelineAtInfixOperator(left, leftStartPos) {
  142596. if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  142597. if (left.type === "SequenceExpression") {
  142598. this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression);
  142599. }
  142600. }
  142601. }
  142602. parseSmartPipelineBody(childExpression, startPos, startLoc) {
  142603. this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);
  142604. return this.parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc);
  142605. }
  142606. checkSmartPipelineBodyEarlyErrors(childExpression, startPos) {
  142607. if (this.match(types$12.arrow)) {
  142608. throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow);
  142609. } else if (childExpression.type === "SequenceExpression") {
  142610. this.raise(startPos, ErrorMessages.PipelineBodySequenceExpression);
  142611. }
  142612. }
  142613. parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc) {
  142614. const bodyNode = this.startNodeAt(startPos, startLoc);
  142615. const isSimpleReference = this.isSimpleReference(childExpression);
  142616. if (isSimpleReference) {
  142617. bodyNode.callee = childExpression;
  142618. } else {
  142619. if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
  142620. this.raise(startPos, ErrorMessages.PipelineTopicUnused);
  142621. }
  142622. bodyNode.expression = childExpression;
  142623. }
  142624. return this.finishNode(bodyNode, isSimpleReference ? "PipelineBareFunction" : "PipelineTopicExpression");
  142625. }
  142626. isSimpleReference(expression) {
  142627. switch (expression.type) {
  142628. case "MemberExpression":
  142629. return !expression.computed && this.isSimpleReference(expression.object);
  142630. case "Identifier":
  142631. return true;
  142632. default:
  142633. return false;
  142634. }
  142635. }
  142636. withTopicPermittingContext(callback) {
  142637. const outerContextTopicState = this.state.topicContext;
  142638. this.state.topicContext = {
  142639. maxNumOfResolvableTopics: 1,
  142640. maxTopicIndex: null
  142641. };
  142642. try {
  142643. return callback();
  142644. } finally {
  142645. this.state.topicContext = outerContextTopicState;
  142646. }
  142647. }
  142648. withTopicForbiddingContext(callback) {
  142649. const outerContextTopicState = this.state.topicContext;
  142650. this.state.topicContext = {
  142651. maxNumOfResolvableTopics: 0,
  142652. maxTopicIndex: null
  142653. };
  142654. try {
  142655. return callback();
  142656. } finally {
  142657. this.state.topicContext = outerContextTopicState;
  142658. }
  142659. }
  142660. withSoloAwaitPermittingContext(callback) {
  142661. const outerContextSoloAwaitState = this.state.soloAwait;
  142662. this.state.soloAwait = true;
  142663. try {
  142664. return callback();
  142665. } finally {
  142666. this.state.soloAwait = outerContextSoloAwaitState;
  142667. }
  142668. }
  142669. allowInAnd(callback) {
  142670. const flags = this.prodParam.currentFlags();
  142671. const prodParamToSet = PARAM_IN & ~flags;
  142672. if (prodParamToSet) {
  142673. this.prodParam.enter(flags | PARAM_IN);
  142674. try {
  142675. return callback();
  142676. } finally {
  142677. this.prodParam.exit();
  142678. }
  142679. }
  142680. return callback();
  142681. }
  142682. disallowInAnd(callback) {
  142683. const flags = this.prodParam.currentFlags();
  142684. const prodParamToClear = PARAM_IN & flags;
  142685. if (prodParamToClear) {
  142686. this.prodParam.enter(flags & ~PARAM_IN);
  142687. try {
  142688. return callback();
  142689. } finally {
  142690. this.prodParam.exit();
  142691. }
  142692. }
  142693. return callback();
  142694. }
  142695. registerTopicReference() {
  142696. this.state.topicContext.maxTopicIndex = 0;
  142697. }
  142698. primaryTopicReferenceIsAllowedInCurrentTopicContext() {
  142699. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  142700. }
  142701. topicReferenceWasUsedInCurrentTopicContext() {
  142702. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  142703. }
  142704. parseFSharpPipelineBody(prec) {
  142705. const startPos = this.state.start;
  142706. const startLoc = this.state.startLoc;
  142707. this.state.potentialArrowAt = this.state.start;
  142708. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  142709. this.state.inFSharpPipelineDirectBody = true;
  142710. const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec);
  142711. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  142712. return ret;
  142713. }
  142714. parseModuleExpression() {
  142715. this.expectPlugin("moduleBlocks");
  142716. const node = this.startNode();
  142717. this.next();
  142718. this.eat(types$12.braceL);
  142719. const revertScopes = this.initializeScopes(true);
  142720. this.enterInitialScopes();
  142721. const program = this.startNode();
  142722. try {
  142723. node.body = this.parseProgram(program, types$12.braceR, "module");
  142724. } finally {
  142725. revertScopes();
  142726. }
  142727. this.eat(types$12.braceR);
  142728. return this.finishNode(node, "ModuleExpression");
  142729. }
  142730. };
  142731. var loopLabel2 = {
  142732. kind: "loop"
  142733. };
  142734. var switchLabel2 = {
  142735. kind: "switch"
  142736. };
  142737. var FUNC_NO_FLAGS = 0;
  142738. var FUNC_STATEMENT2 = 1;
  142739. var FUNC_HANGING_STATEMENT2 = 2;
  142740. var FUNC_NULLABLE_ID2 = 4;
  142741. var loneSurrogate2 = /[\uD800-\uDFFF]/u;
  142742. var keywordRelationalOperator2 = /in(?:stanceof)?/y;
  142743. function babel7CompatTokens(tokens) {
  142744. {
  142745. for (let i = 0; i < tokens.length; i++) {
  142746. const token = tokens[i];
  142747. if (token.type === types$12.privateName) {
  142748. const {
  142749. loc,
  142750. start: start3,
  142751. value,
  142752. end
  142753. } = token;
  142754. const hashEndPos = start3 + 1;
  142755. const hashEndLoc = new Position3(loc.start.line, loc.start.column + 1);
  142756. tokens.splice(i, 1, new Token3({
  142757. type: types$12.hash,
  142758. value: "#",
  142759. start: start3,
  142760. end: hashEndPos,
  142761. startLoc: loc.start,
  142762. endLoc: hashEndLoc
  142763. }), new Token3({
  142764. type: types$12.name,
  142765. value,
  142766. start: hashEndPos,
  142767. end,
  142768. startLoc: hashEndLoc,
  142769. endLoc: loc.end
  142770. }));
  142771. }
  142772. }
  142773. }
  142774. return tokens;
  142775. }
  142776. var StatementParser = class extends ExpressionParser {
  142777. parseTopLevel(file, program) {
  142778. file.program = this.parseProgram(program);
  142779. file.comments = this.state.comments;
  142780. if (this.options.tokens)
  142781. file.tokens = babel7CompatTokens(this.tokens);
  142782. return this.finishNode(file, "File");
  142783. }
  142784. parseProgram(program, end = types$12.eof, sourceType = this.options.sourceType) {
  142785. program.sourceType = sourceType;
  142786. program.interpreter = this.parseInterpreterDirective();
  142787. this.parseBlockBody(program, true, true, end);
  142788. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  142789. for (const [name2] of Array.from(this.scope.undefinedExports)) {
  142790. const pos = this.scope.undefinedExports.get(name2);
  142791. this.raise(pos, ErrorMessages.ModuleExportUndefined, name2);
  142792. }
  142793. }
  142794. return this.finishNode(program, "Program");
  142795. }
  142796. stmtToDirective(stmt) {
  142797. const expr = stmt.expression;
  142798. const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
  142799. const directive = this.startNodeAt(stmt.start, stmt.loc.start);
  142800. const raw = this.input.slice(expr.start, expr.end);
  142801. const val = directiveLiteral.value = raw.slice(1, -1);
  142802. this.addExtra(directiveLiteral, "raw", raw);
  142803. this.addExtra(directiveLiteral, "rawValue", val);
  142804. directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
  142805. return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
  142806. }
  142807. parseInterpreterDirective() {
  142808. if (!this.match(types$12.interpreterDirective)) {
  142809. return null;
  142810. }
  142811. const node = this.startNode();
  142812. node.value = this.state.value;
  142813. this.next();
  142814. return this.finishNode(node, "InterpreterDirective");
  142815. }
  142816. isLet(context) {
  142817. if (!this.isContextual("let")) {
  142818. return false;
  142819. }
  142820. return this.isLetKeyword(context);
  142821. }
  142822. isLetKeyword(context) {
  142823. const next = this.nextTokenStart();
  142824. const nextCh = this.codePointAtPos(next);
  142825. if (nextCh === 92 || nextCh === 91) {
  142826. return true;
  142827. }
  142828. if (context)
  142829. return false;
  142830. if (nextCh === 123)
  142831. return true;
  142832. if (isIdentifierStart2(nextCh)) {
  142833. keywordRelationalOperator2.lastIndex = next;
  142834. const matched = keywordRelationalOperator2.exec(this.input);
  142835. if (matched !== null) {
  142836. const endCh = this.codePointAtPos(next + matched[0].length);
  142837. if (!isIdentifierChar2(endCh) && endCh !== 92) {
  142838. return false;
  142839. }
  142840. }
  142841. return true;
  142842. }
  142843. return false;
  142844. }
  142845. parseStatement(context, topLevel) {
  142846. if (this.match(types$12.at)) {
  142847. this.parseDecorators(true);
  142848. }
  142849. return this.parseStatementContent(context, topLevel);
  142850. }
  142851. parseStatementContent(context, topLevel) {
  142852. let starttype = this.state.type;
  142853. const node = this.startNode();
  142854. let kind;
  142855. if (this.isLet(context)) {
  142856. starttype = types$12._var;
  142857. kind = "let";
  142858. }
  142859. switch (starttype) {
  142860. case types$12._break:
  142861. case types$12._continue:
  142862. return this.parseBreakContinueStatement(node, starttype.keyword);
  142863. case types$12._debugger:
  142864. return this.parseDebuggerStatement(node);
  142865. case types$12._do:
  142866. return this.parseDoStatement(node);
  142867. case types$12._for:
  142868. return this.parseForStatement(node);
  142869. case types$12._function:
  142870. if (this.lookaheadCharCode() === 46)
  142871. break;
  142872. if (context) {
  142873. if (this.state.strict) {
  142874. this.raise(this.state.start, ErrorMessages.StrictFunction);
  142875. } else if (context !== "if" && context !== "label") {
  142876. this.raise(this.state.start, ErrorMessages.SloppyFunction);
  142877. }
  142878. }
  142879. return this.parseFunctionStatement(node, false, !context);
  142880. case types$12._class:
  142881. if (context)
  142882. this.unexpected();
  142883. return this.parseClass(node, true);
  142884. case types$12._if:
  142885. return this.parseIfStatement(node);
  142886. case types$12._return:
  142887. return this.parseReturnStatement(node);
  142888. case types$12._switch:
  142889. return this.parseSwitchStatement(node);
  142890. case types$12._throw:
  142891. return this.parseThrowStatement(node);
  142892. case types$12._try:
  142893. return this.parseTryStatement(node);
  142894. case types$12._const:
  142895. case types$12._var:
  142896. kind = kind || this.state.value;
  142897. if (context && kind !== "var") {
  142898. this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration);
  142899. }
  142900. return this.parseVarStatement(node, kind);
  142901. case types$12._while:
  142902. return this.parseWhileStatement(node);
  142903. case types$12._with:
  142904. return this.parseWithStatement(node);
  142905. case types$12.braceL:
  142906. return this.parseBlock();
  142907. case types$12.semi:
  142908. return this.parseEmptyStatement(node);
  142909. case types$12._import: {
  142910. const nextTokenCharCode = this.lookaheadCharCode();
  142911. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  142912. break;
  142913. }
  142914. }
  142915. case types$12._export: {
  142916. if (!this.options.allowImportExportEverywhere && !topLevel) {
  142917. this.raise(this.state.start, ErrorMessages.UnexpectedImportExport);
  142918. }
  142919. this.next();
  142920. let result;
  142921. if (starttype === types$12._import) {
  142922. result = this.parseImport(node);
  142923. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  142924. this.sawUnambiguousESM = true;
  142925. }
  142926. } else {
  142927. result = this.parseExport(node);
  142928. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  142929. this.sawUnambiguousESM = true;
  142930. }
  142931. }
  142932. this.assertModuleNodeAllowed(node);
  142933. return result;
  142934. }
  142935. default: {
  142936. if (this.isAsyncFunction()) {
  142937. if (context) {
  142938. this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext);
  142939. }
  142940. this.next();
  142941. return this.parseFunctionStatement(node, true, !context);
  142942. }
  142943. }
  142944. }
  142945. const maybeName = this.state.value;
  142946. const expr = this.parseExpression();
  142947. if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) {
  142948. return this.parseLabeledStatement(node, maybeName, expr, context);
  142949. } else {
  142950. return this.parseExpressionStatement(node, expr);
  142951. }
  142952. }
  142953. assertModuleNodeAllowed(node) {
  142954. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  142955. this.raise(node.start, SourceTypeModuleErrorMessages.ImportOutsideModule);
  142956. }
  142957. }
  142958. takeDecorators(node) {
  142959. const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  142960. if (decorators.length) {
  142961. node.decorators = decorators;
  142962. this.resetStartLocationFromNode(node, decorators[0]);
  142963. this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
  142964. }
  142965. }
  142966. canHaveLeadingDecorator() {
  142967. return this.match(types$12._class);
  142968. }
  142969. parseDecorators(allowExport) {
  142970. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  142971. while (this.match(types$12.at)) {
  142972. const decorator = this.parseDecorator();
  142973. currentContextDecorators.push(decorator);
  142974. }
  142975. if (this.match(types$12._export)) {
  142976. if (!allowExport) {
  142977. this.unexpected();
  142978. }
  142979. if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  142980. this.raise(this.state.start, ErrorMessages.DecoratorExportClass);
  142981. }
  142982. } else if (!this.canHaveLeadingDecorator()) {
  142983. throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator);
  142984. }
  142985. }
  142986. parseDecorator() {
  142987. this.expectOnePlugin(["decorators-legacy", "decorators"]);
  142988. const node = this.startNode();
  142989. this.next();
  142990. if (this.hasPlugin("decorators")) {
  142991. this.state.decoratorStack.push([]);
  142992. const startPos = this.state.start;
  142993. const startLoc = this.state.startLoc;
  142994. let expr;
  142995. if (this.eat(types$12.parenL)) {
  142996. expr = this.parseExpression();
  142997. this.expect(types$12.parenR);
  142998. } else {
  142999. expr = this.parseIdentifier(false);
  143000. while (this.eat(types$12.dot)) {
  143001. const node2 = this.startNodeAt(startPos, startLoc);
  143002. node2.object = expr;
  143003. node2.property = this.parseIdentifier(true);
  143004. node2.computed = false;
  143005. expr = this.finishNode(node2, "MemberExpression");
  143006. }
  143007. }
  143008. node.expression = this.parseMaybeDecoratorArguments(expr);
  143009. this.state.decoratorStack.pop();
  143010. } else {
  143011. node.expression = this.parseExprSubscripts();
  143012. }
  143013. return this.finishNode(node, "Decorator");
  143014. }
  143015. parseMaybeDecoratorArguments(expr) {
  143016. if (this.eat(types$12.parenL)) {
  143017. const node = this.startNodeAtNode(expr);
  143018. node.callee = expr;
  143019. node.arguments = this.parseCallExpressionArguments(types$12.parenR, false);
  143020. this.toReferencedList(node.arguments);
  143021. return this.finishNode(node, "CallExpression");
  143022. }
  143023. return expr;
  143024. }
  143025. parseBreakContinueStatement(node, keyword) {
  143026. const isBreak = keyword === "break";
  143027. this.next();
  143028. if (this.isLineTerminator()) {
  143029. node.label = null;
  143030. } else {
  143031. node.label = this.parseIdentifier();
  143032. this.semicolon();
  143033. }
  143034. this.verifyBreakContinue(node, keyword);
  143035. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  143036. }
  143037. verifyBreakContinue(node, keyword) {
  143038. const isBreak = keyword === "break";
  143039. let i;
  143040. for (i = 0; i < this.state.labels.length; ++i) {
  143041. const lab = this.state.labels[i];
  143042. if (node.label == null || lab.name === node.label.name) {
  143043. if (lab.kind != null && (isBreak || lab.kind === "loop"))
  143044. break;
  143045. if (node.label && isBreak)
  143046. break;
  143047. }
  143048. }
  143049. if (i === this.state.labels.length) {
  143050. this.raise(node.start, ErrorMessages.IllegalBreakContinue, keyword);
  143051. }
  143052. }
  143053. parseDebuggerStatement(node) {
  143054. this.next();
  143055. this.semicolon();
  143056. return this.finishNode(node, "DebuggerStatement");
  143057. }
  143058. parseHeaderExpression() {
  143059. this.expect(types$12.parenL);
  143060. const val = this.parseExpression();
  143061. this.expect(types$12.parenR);
  143062. return val;
  143063. }
  143064. parseDoStatement(node) {
  143065. this.next();
  143066. this.state.labels.push(loopLabel2);
  143067. node.body = this.withTopicForbiddingContext(() => this.parseStatement("do"));
  143068. this.state.labels.pop();
  143069. this.expect(types$12._while);
  143070. node.test = this.parseHeaderExpression();
  143071. this.eat(types$12.semi);
  143072. return this.finishNode(node, "DoWhileStatement");
  143073. }
  143074. parseForStatement(node) {
  143075. this.next();
  143076. this.state.labels.push(loopLabel2);
  143077. let awaitAt = -1;
  143078. if (this.isAwaitAllowed() && this.eatContextual("await")) {
  143079. awaitAt = this.state.lastTokStart;
  143080. }
  143081. this.scope.enter(SCOPE_OTHER);
  143082. this.expect(types$12.parenL);
  143083. if (this.match(types$12.semi)) {
  143084. if (awaitAt > -1) {
  143085. this.unexpected(awaitAt);
  143086. }
  143087. return this.parseFor(node, null);
  143088. }
  143089. const startsWithLet = this.isContextual("let");
  143090. const isLet = startsWithLet && this.isLetKeyword();
  143091. if (this.match(types$12._var) || this.match(types$12._const) || isLet) {
  143092. const init2 = this.startNode();
  143093. const kind = isLet ? "let" : this.state.value;
  143094. this.next();
  143095. this.parseVar(init2, true, kind);
  143096. this.finishNode(init2, "VariableDeclaration");
  143097. if ((this.match(types$12._in) || this.isContextual("of")) && init2.declarations.length === 1) {
  143098. return this.parseForIn(node, init2, awaitAt);
  143099. }
  143100. if (awaitAt > -1) {
  143101. this.unexpected(awaitAt);
  143102. }
  143103. return this.parseFor(node, init2);
  143104. }
  143105. const startsWithUnescapedName = this.match(types$12.name) && !this.state.containsEsc;
  143106. const refExpressionErrors = new ExpressionErrors();
  143107. const init = this.parseExpression(true, refExpressionErrors);
  143108. const isForOf = this.isContextual("of");
  143109. if (isForOf) {
  143110. if (startsWithLet) {
  143111. this.raise(init.start, ErrorMessages.ForOfLet);
  143112. } else if (awaitAt === -1 && startsWithUnescapedName && init.type === "Identifier" && init.name === "async") {
  143113. this.raise(init.start, ErrorMessages.ForOfAsync);
  143114. }
  143115. }
  143116. if (isForOf || this.match(types$12._in)) {
  143117. this.toAssignable(init, true);
  143118. const description = isForOf ? "for-of statement" : "for-in statement";
  143119. this.checkLVal(init, description);
  143120. return this.parseForIn(node, init, awaitAt);
  143121. } else {
  143122. this.checkExpressionErrors(refExpressionErrors, true);
  143123. }
  143124. if (awaitAt > -1) {
  143125. this.unexpected(awaitAt);
  143126. }
  143127. return this.parseFor(node, init);
  143128. }
  143129. parseFunctionStatement(node, isAsync, declarationPosition) {
  143130. this.next();
  143131. return this.parseFunction(node, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), isAsync);
  143132. }
  143133. parseIfStatement(node) {
  143134. this.next();
  143135. node.test = this.parseHeaderExpression();
  143136. node.consequent = this.parseStatement("if");
  143137. node.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null;
  143138. return this.finishNode(node, "IfStatement");
  143139. }
  143140. parseReturnStatement(node) {
  143141. if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
  143142. this.raise(this.state.start, ErrorMessages.IllegalReturn);
  143143. }
  143144. this.next();
  143145. if (this.isLineTerminator()) {
  143146. node.argument = null;
  143147. } else {
  143148. node.argument = this.parseExpression();
  143149. this.semicolon();
  143150. }
  143151. return this.finishNode(node, "ReturnStatement");
  143152. }
  143153. parseSwitchStatement(node) {
  143154. this.next();
  143155. node.discriminant = this.parseHeaderExpression();
  143156. const cases = node.cases = [];
  143157. this.expect(types$12.braceL);
  143158. this.state.labels.push(switchLabel2);
  143159. this.scope.enter(SCOPE_OTHER);
  143160. let cur;
  143161. for (let sawDefault; !this.match(types$12.braceR); ) {
  143162. if (this.match(types$12._case) || this.match(types$12._default)) {
  143163. const isCase = this.match(types$12._case);
  143164. if (cur)
  143165. this.finishNode(cur, "SwitchCase");
  143166. cases.push(cur = this.startNode());
  143167. cur.consequent = [];
  143168. this.next();
  143169. if (isCase) {
  143170. cur.test = this.parseExpression();
  143171. } else {
  143172. if (sawDefault) {
  143173. this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch);
  143174. }
  143175. sawDefault = true;
  143176. cur.test = null;
  143177. }
  143178. this.expect(types$12.colon);
  143179. } else {
  143180. if (cur) {
  143181. cur.consequent.push(this.parseStatement(null));
  143182. } else {
  143183. this.unexpected();
  143184. }
  143185. }
  143186. }
  143187. this.scope.exit();
  143188. if (cur)
  143189. this.finishNode(cur, "SwitchCase");
  143190. this.next();
  143191. this.state.labels.pop();
  143192. return this.finishNode(node, "SwitchStatement");
  143193. }
  143194. parseThrowStatement(node) {
  143195. this.next();
  143196. if (this.hasPrecedingLineBreak()) {
  143197. this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow);
  143198. }
  143199. node.argument = this.parseExpression();
  143200. this.semicolon();
  143201. return this.finishNode(node, "ThrowStatement");
  143202. }
  143203. parseCatchClauseParam() {
  143204. const param = this.parseBindingAtom();
  143205. const simple = param.type === "Identifier";
  143206. this.scope.enter(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  143207. this.checkLVal(param, "catch clause", BIND_LEXICAL2);
  143208. return param;
  143209. }
  143210. parseTryStatement(node) {
  143211. this.next();
  143212. node.block = this.parseBlock();
  143213. node.handler = null;
  143214. if (this.match(types$12._catch)) {
  143215. const clause = this.startNode();
  143216. this.next();
  143217. if (this.match(types$12.parenL)) {
  143218. this.expect(types$12.parenL);
  143219. clause.param = this.parseCatchClauseParam();
  143220. this.expect(types$12.parenR);
  143221. } else {
  143222. clause.param = null;
  143223. this.scope.enter(SCOPE_OTHER);
  143224. }
  143225. clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false));
  143226. this.scope.exit();
  143227. node.handler = this.finishNode(clause, "CatchClause");
  143228. }
  143229. node.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null;
  143230. if (!node.handler && !node.finalizer) {
  143231. this.raise(node.start, ErrorMessages.NoCatchOrFinally);
  143232. }
  143233. return this.finishNode(node, "TryStatement");
  143234. }
  143235. parseVarStatement(node, kind) {
  143236. this.next();
  143237. this.parseVar(node, false, kind);
  143238. this.semicolon();
  143239. return this.finishNode(node, "VariableDeclaration");
  143240. }
  143241. parseWhileStatement(node) {
  143242. this.next();
  143243. node.test = this.parseHeaderExpression();
  143244. this.state.labels.push(loopLabel2);
  143245. node.body = this.withTopicForbiddingContext(() => this.parseStatement("while"));
  143246. this.state.labels.pop();
  143247. return this.finishNode(node, "WhileStatement");
  143248. }
  143249. parseWithStatement(node) {
  143250. if (this.state.strict) {
  143251. this.raise(this.state.start, ErrorMessages.StrictWith);
  143252. }
  143253. this.next();
  143254. node.object = this.parseHeaderExpression();
  143255. node.body = this.withTopicForbiddingContext(() => this.parseStatement("with"));
  143256. return this.finishNode(node, "WithStatement");
  143257. }
  143258. parseEmptyStatement(node) {
  143259. this.next();
  143260. return this.finishNode(node, "EmptyStatement");
  143261. }
  143262. parseLabeledStatement(node, maybeName, expr, context) {
  143263. for (const label of this.state.labels) {
  143264. if (label.name === maybeName) {
  143265. this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName);
  143266. }
  143267. }
  143268. const kind = this.state.type.isLoop ? "loop" : this.match(types$12._switch) ? "switch" : null;
  143269. for (let i = this.state.labels.length - 1; i >= 0; i--) {
  143270. const label = this.state.labels[i];
  143271. if (label.statementStart === node.start) {
  143272. label.statementStart = this.state.start;
  143273. label.kind = kind;
  143274. } else {
  143275. break;
  143276. }
  143277. }
  143278. this.state.labels.push({
  143279. name: maybeName,
  143280. kind,
  143281. statementStart: this.state.start
  143282. });
  143283. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  143284. this.state.labels.pop();
  143285. node.label = expr;
  143286. return this.finishNode(node, "LabeledStatement");
  143287. }
  143288. parseExpressionStatement(node, expr) {
  143289. node.expression = expr;
  143290. this.semicolon();
  143291. return this.finishNode(node, "ExpressionStatement");
  143292. }
  143293. parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
  143294. const node = this.startNode();
  143295. if (allowDirectives) {
  143296. this.state.strictErrors.clear();
  143297. }
  143298. this.expect(types$12.braceL);
  143299. if (createNewLexicalScope) {
  143300. this.scope.enter(SCOPE_OTHER);
  143301. }
  143302. this.parseBlockBody(node, allowDirectives, false, types$12.braceR, afterBlockParse);
  143303. if (createNewLexicalScope) {
  143304. this.scope.exit();
  143305. }
  143306. return this.finishNode(node, "BlockStatement");
  143307. }
  143308. isValidDirective(stmt) {
  143309. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  143310. }
  143311. parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
  143312. const body = node.body = [];
  143313. const directives = node.directives = [];
  143314. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : void 0, topLevel, end, afterBlockParse);
  143315. }
  143316. parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
  143317. const oldStrict = this.state.strict;
  143318. let hasStrictModeDirective = false;
  143319. let parsedNonDirective = false;
  143320. while (!this.match(end)) {
  143321. const stmt = this.parseStatement(null, topLevel);
  143322. if (directives && !parsedNonDirective) {
  143323. if (this.isValidDirective(stmt)) {
  143324. const directive = this.stmtToDirective(stmt);
  143325. directives.push(directive);
  143326. if (!hasStrictModeDirective && directive.value.value === "use strict") {
  143327. hasStrictModeDirective = true;
  143328. this.setStrict(true);
  143329. }
  143330. continue;
  143331. }
  143332. parsedNonDirective = true;
  143333. this.state.strictErrors.clear();
  143334. }
  143335. body.push(stmt);
  143336. }
  143337. if (afterBlockParse) {
  143338. afterBlockParse.call(this, hasStrictModeDirective);
  143339. }
  143340. if (!oldStrict) {
  143341. this.setStrict(false);
  143342. }
  143343. this.next();
  143344. }
  143345. parseFor(node, init) {
  143346. node.init = init;
  143347. this.semicolon(false);
  143348. node.test = this.match(types$12.semi) ? null : this.parseExpression();
  143349. this.semicolon(false);
  143350. node.update = this.match(types$12.parenR) ? null : this.parseExpression();
  143351. this.expect(types$12.parenR);
  143352. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  143353. this.scope.exit();
  143354. this.state.labels.pop();
  143355. return this.finishNode(node, "ForStatement");
  143356. }
  143357. parseForIn(node, init, awaitAt) {
  143358. const isForIn = this.match(types$12._in);
  143359. this.next();
  143360. if (isForIn) {
  143361. if (awaitAt > -1)
  143362. this.unexpected(awaitAt);
  143363. } else {
  143364. node.await = awaitAt > -1;
  143365. }
  143366. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  143367. this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of");
  143368. } else if (init.type === "AssignmentPattern") {
  143369. this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop");
  143370. }
  143371. node.left = init;
  143372. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
  143373. this.expect(types$12.parenR);
  143374. node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
  143375. this.scope.exit();
  143376. this.state.labels.pop();
  143377. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  143378. }
  143379. parseVar(node, isFor, kind) {
  143380. const declarations = node.declarations = [];
  143381. const isTypescript = this.hasPlugin("typescript");
  143382. node.kind = kind;
  143383. for (; ; ) {
  143384. const decl = this.startNode();
  143385. this.parseVarId(decl, kind);
  143386. if (this.eat(types$12.eq)) {
  143387. decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
  143388. } else {
  143389. if (kind === "const" && !(this.match(types$12._in) || this.isContextual("of"))) {
  143390. if (!isTypescript) {
  143391. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations");
  143392. }
  143393. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types$12._in) || this.isContextual("of")))) {
  143394. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns");
  143395. }
  143396. decl.init = null;
  143397. }
  143398. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  143399. if (!this.eat(types$12.comma))
  143400. break;
  143401. }
  143402. return node;
  143403. }
  143404. parseVarId(decl, kind) {
  143405. decl.id = this.parseBindingAtom();
  143406. this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, void 0, kind !== "var");
  143407. }
  143408. parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
  143409. const isStatement = statement & FUNC_STATEMENT2;
  143410. const isHangingStatement = statement & FUNC_HANGING_STATEMENT2;
  143411. const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID2);
  143412. this.initFunction(node, isAsync);
  143413. if (this.match(types$12.star) && isHangingStatement) {
  143414. this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext);
  143415. }
  143416. node.generator = this.eat(types$12.star);
  143417. if (isStatement) {
  143418. node.id = this.parseFunctionId(requireId);
  143419. }
  143420. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  143421. this.state.maybeInArrowParameters = false;
  143422. this.scope.enter(SCOPE_FUNCTION2);
  143423. this.prodParam.enter(functionFlags2(isAsync, node.generator));
  143424. if (!isStatement) {
  143425. node.id = this.parseFunctionId();
  143426. }
  143427. this.parseFunctionParams(node, false);
  143428. this.withTopicForbiddingContext(() => {
  143429. this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  143430. });
  143431. this.prodParam.exit();
  143432. this.scope.exit();
  143433. if (isStatement && !isHangingStatement) {
  143434. this.registerFunctionStatementId(node);
  143435. }
  143436. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  143437. return node;
  143438. }
  143439. parseFunctionId(requireId) {
  143440. return requireId || this.match(types$12.name) ? this.parseIdentifier() : null;
  143441. }
  143442. parseFunctionParams(node, allowModifiers) {
  143443. this.expect(types$12.parenL);
  143444. this.expressionScope.enter(newParameterDeclarationScope());
  143445. node.params = this.parseBindingList(types$12.parenR, 41, false, allowModifiers);
  143446. this.expressionScope.exit();
  143447. }
  143448. registerFunctionStatementId(node) {
  143449. if (!node.id)
  143450. return;
  143451. this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2, node.id.start);
  143452. }
  143453. parseClass(node, isStatement, optionalId) {
  143454. this.next();
  143455. this.takeDecorators(node);
  143456. const oldStrict = this.state.strict;
  143457. this.state.strict = true;
  143458. this.parseClassId(node, isStatement, optionalId);
  143459. this.parseClassSuper(node);
  143460. node.body = this.parseClassBody(!!node.superClass, oldStrict);
  143461. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  143462. }
  143463. isClassProperty() {
  143464. return this.match(types$12.eq) || this.match(types$12.semi) || this.match(types$12.braceR);
  143465. }
  143466. isClassMethod() {
  143467. return this.match(types$12.parenL);
  143468. }
  143469. isNonstaticConstructor(method) {
  143470. return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
  143471. }
  143472. parseClassBody(hadSuperClass, oldStrict) {
  143473. this.classScope.enter();
  143474. const state = {
  143475. hadConstructor: false,
  143476. hadSuperClass
  143477. };
  143478. let decorators = [];
  143479. const classBody = this.startNode();
  143480. classBody.body = [];
  143481. this.expect(types$12.braceL);
  143482. this.withTopicForbiddingContext(() => {
  143483. while (!this.match(types$12.braceR)) {
  143484. if (this.eat(types$12.semi)) {
  143485. if (decorators.length > 0) {
  143486. throw this.raise(this.state.lastTokEnd, ErrorMessages.DecoratorSemicolon);
  143487. }
  143488. continue;
  143489. }
  143490. if (this.match(types$12.at)) {
  143491. decorators.push(this.parseDecorator());
  143492. continue;
  143493. }
  143494. const member = this.startNode();
  143495. if (decorators.length) {
  143496. member.decorators = decorators;
  143497. this.resetStartLocationFromNode(member, decorators[0]);
  143498. decorators = [];
  143499. }
  143500. this.parseClassMember(classBody, member, state);
  143501. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  143502. this.raise(member.start, ErrorMessages.DecoratorConstructor);
  143503. }
  143504. }
  143505. });
  143506. this.state.strict = oldStrict;
  143507. this.next();
  143508. if (decorators.length) {
  143509. throw this.raise(this.state.start, ErrorMessages.TrailingDecorator);
  143510. }
  143511. this.classScope.exit();
  143512. return this.finishNode(classBody, "ClassBody");
  143513. }
  143514. parseClassMemberFromModifier(classBody, member) {
  143515. const key = this.parseIdentifier(true);
  143516. if (this.isClassMethod()) {
  143517. const method = member;
  143518. method.kind = "method";
  143519. method.computed = false;
  143520. method.key = key;
  143521. method.static = false;
  143522. this.pushClassMethod(classBody, method, false, false, false, false);
  143523. return true;
  143524. } else if (this.isClassProperty()) {
  143525. const prop = member;
  143526. prop.computed = false;
  143527. prop.key = key;
  143528. prop.static = false;
  143529. classBody.body.push(this.parseClassProperty(prop));
  143530. return true;
  143531. }
  143532. return false;
  143533. }
  143534. parseClassMember(classBody, member, state) {
  143535. const isStatic = this.isContextual("static");
  143536. if (isStatic) {
  143537. if (this.parseClassMemberFromModifier(classBody, member)) {
  143538. return;
  143539. }
  143540. if (this.eat(types$12.braceL)) {
  143541. this.parseClassStaticBlock(classBody, member);
  143542. return;
  143543. }
  143544. }
  143545. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  143546. }
  143547. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  143548. const publicMethod = member;
  143549. const privateMethod = member;
  143550. const publicProp = member;
  143551. const privateProp = member;
  143552. const method = publicMethod;
  143553. const publicMember = publicMethod;
  143554. member.static = isStatic;
  143555. if (this.eat(types$12.star)) {
  143556. method.kind = "method";
  143557. const isPrivateName = this.match(types$12.privateName);
  143558. this.parseClassElementName(method);
  143559. if (isPrivateName) {
  143560. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  143561. return;
  143562. }
  143563. if (this.isNonstaticConstructor(publicMethod)) {
  143564. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator);
  143565. }
  143566. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  143567. return;
  143568. }
  143569. const containsEsc = this.state.containsEsc;
  143570. const isPrivate = this.match(types$12.privateName);
  143571. const key = this.parseClassElementName(member);
  143572. const isSimple = key.type === "Identifier";
  143573. const maybeQuestionTokenStart = this.state.start;
  143574. this.parsePostMemberNameModifiers(publicMember);
  143575. if (this.isClassMethod()) {
  143576. method.kind = "method";
  143577. if (isPrivate) {
  143578. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  143579. return;
  143580. }
  143581. const isConstructor = this.isNonstaticConstructor(publicMethod);
  143582. let allowsDirectSuper = false;
  143583. if (isConstructor) {
  143584. publicMethod.kind = "constructor";
  143585. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  143586. this.raise(key.start, ErrorMessages.DuplicateConstructor);
  143587. }
  143588. if (isConstructor && this.hasPlugin("typescript") && member.override) {
  143589. this.raise(key.start, ErrorMessages.OverrideOnConstructor);
  143590. }
  143591. state.hadConstructor = true;
  143592. allowsDirectSuper = state.hadSuperClass;
  143593. }
  143594. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  143595. } else if (this.isClassProperty()) {
  143596. if (isPrivate) {
  143597. this.pushClassPrivateProperty(classBody, privateProp);
  143598. } else {
  143599. this.pushClassProperty(classBody, publicProp);
  143600. }
  143601. } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) {
  143602. const isGenerator = this.eat(types$12.star);
  143603. if (publicMember.optional) {
  143604. this.unexpected(maybeQuestionTokenStart);
  143605. }
  143606. method.kind = "method";
  143607. const isPrivate2 = this.match(types$12.privateName);
  143608. this.parseClassElementName(method);
  143609. this.parsePostMemberNameModifiers(publicMember);
  143610. if (isPrivate2) {
  143611. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  143612. } else {
  143613. if (this.isNonstaticConstructor(publicMethod)) {
  143614. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync);
  143615. }
  143616. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  143617. }
  143618. } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types$12.star) && this.isLineTerminator())) {
  143619. method.kind = key.name;
  143620. const isPrivate2 = this.match(types$12.privateName);
  143621. this.parseClassElementName(publicMethod);
  143622. if (isPrivate2) {
  143623. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  143624. } else {
  143625. if (this.isNonstaticConstructor(publicMethod)) {
  143626. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor);
  143627. }
  143628. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  143629. }
  143630. this.checkGetterSetterParams(publicMethod);
  143631. } else if (this.isLineTerminator()) {
  143632. if (isPrivate) {
  143633. this.pushClassPrivateProperty(classBody, privateProp);
  143634. } else {
  143635. this.pushClassProperty(classBody, publicProp);
  143636. }
  143637. } else {
  143638. this.unexpected();
  143639. }
  143640. }
  143641. parseClassElementName(member) {
  143642. const {
  143643. type,
  143644. value,
  143645. start: start3
  143646. } = this.state;
  143647. if ((type === types$12.name || type === types$12.string) && member.static && value === "prototype") {
  143648. this.raise(start3, ErrorMessages.StaticPrototype);
  143649. }
  143650. if (type === types$12.privateName && value === "constructor") {
  143651. this.raise(start3, ErrorMessages.ConstructorClassPrivateField);
  143652. }
  143653. return this.parsePropertyName(member, true);
  143654. }
  143655. parseClassStaticBlock(classBody, member) {
  143656. var _member$decorators;
  143657. this.expectPlugin("classStaticBlock", member.start);
  143658. this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER2);
  143659. const oldLabels = this.state.labels;
  143660. this.state.labels = [];
  143661. this.prodParam.enter(PARAM);
  143662. const body = member.body = [];
  143663. this.parseBlockOrModuleBlockBody(body, void 0, false, types$12.braceR);
  143664. this.prodParam.exit();
  143665. this.scope.exit();
  143666. this.state.labels = oldLabels;
  143667. classBody.body.push(this.finishNode(member, "StaticBlock"));
  143668. if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
  143669. this.raise(member.start, ErrorMessages.DecoratorStaticBlock);
  143670. }
  143671. }
  143672. pushClassProperty(classBody, prop) {
  143673. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  143674. this.raise(prop.key.start, ErrorMessages.ConstructorClassField);
  143675. }
  143676. classBody.body.push(this.parseClassProperty(prop));
  143677. }
  143678. pushClassPrivateProperty(classBody, prop) {
  143679. const node = this.parseClassPrivateProperty(prop);
  143680. classBody.body.push(node);
  143681. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.start);
  143682. }
  143683. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  143684. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  143685. }
  143686. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  143687. const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  143688. classBody.body.push(node);
  143689. const 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;
  143690. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.start);
  143691. }
  143692. parsePostMemberNameModifiers(methodOrProp) {
  143693. }
  143694. parseClassPrivateProperty(node) {
  143695. this.parseInitializer(node);
  143696. this.semicolon();
  143697. return this.finishNode(node, "ClassPrivateProperty");
  143698. }
  143699. parseClassProperty(node) {
  143700. this.parseInitializer(node);
  143701. this.semicolon();
  143702. return this.finishNode(node, "ClassProperty");
  143703. }
  143704. parseInitializer(node) {
  143705. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER2);
  143706. this.expressionScope.enter(newExpressionScope());
  143707. this.prodParam.enter(PARAM);
  143708. node.value = this.eat(types$12.eq) ? this.parseMaybeAssignAllowIn() : null;
  143709. this.expressionScope.exit();
  143710. this.prodParam.exit();
  143711. this.scope.exit();
  143712. }
  143713. parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) {
  143714. if (this.match(types$12.name)) {
  143715. node.id = this.parseIdentifier();
  143716. if (isStatement) {
  143717. this.checkLVal(node.id, "class name", bindingType);
  143718. }
  143719. } else {
  143720. if (optionalId || !isStatement) {
  143721. node.id = null;
  143722. } else {
  143723. this.unexpected(null, ErrorMessages.MissingClassName);
  143724. }
  143725. }
  143726. }
  143727. parseClassSuper(node) {
  143728. node.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts() : null;
  143729. }
  143730. parseExport(node) {
  143731. const hasDefault = this.maybeParseExportDefaultSpecifier(node);
  143732. const parseAfterDefault = !hasDefault || this.eat(types$12.comma);
  143733. const hasStar = parseAfterDefault && this.eatExportStar(node);
  143734. const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
  143735. const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types$12.comma));
  143736. const isFromRequired = hasDefault || hasStar;
  143737. if (hasStar && !hasNamespace) {
  143738. if (hasDefault)
  143739. this.unexpected();
  143740. this.parseExportFrom(node, true);
  143741. return this.finishNode(node, "ExportAllDeclaration");
  143742. }
  143743. const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
  143744. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
  143745. throw this.unexpected(null, types$12.braceL);
  143746. }
  143747. let hasDeclaration;
  143748. if (isFromRequired || hasSpecifiers) {
  143749. hasDeclaration = false;
  143750. this.parseExportFrom(node, isFromRequired);
  143751. } else {
  143752. hasDeclaration = this.maybeParseExportDeclaration(node);
  143753. }
  143754. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  143755. this.checkExport(node, true, false, !!node.source);
  143756. return this.finishNode(node, "ExportNamedDeclaration");
  143757. }
  143758. if (this.eat(types$12._default)) {
  143759. node.declaration = this.parseExportDefaultExpression();
  143760. this.checkExport(node, true, true);
  143761. return this.finishNode(node, "ExportDefaultDeclaration");
  143762. }
  143763. throw this.unexpected(null, types$12.braceL);
  143764. }
  143765. eatExportStar(node) {
  143766. return this.eat(types$12.star);
  143767. }
  143768. maybeParseExportDefaultSpecifier(node) {
  143769. if (this.isExportDefaultSpecifier()) {
  143770. this.expectPlugin("exportDefaultFrom");
  143771. const specifier = this.startNode();
  143772. specifier.exported = this.parseIdentifier(true);
  143773. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  143774. return true;
  143775. }
  143776. return false;
  143777. }
  143778. maybeParseExportNamespaceSpecifier(node) {
  143779. if (this.isContextual("as")) {
  143780. if (!node.specifiers)
  143781. node.specifiers = [];
  143782. const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
  143783. this.next();
  143784. specifier.exported = this.parseModuleExportName();
  143785. node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  143786. return true;
  143787. }
  143788. return false;
  143789. }
  143790. maybeParseExportNamedSpecifiers(node) {
  143791. if (this.match(types$12.braceL)) {
  143792. if (!node.specifiers)
  143793. node.specifiers = [];
  143794. node.specifiers.push(...this.parseExportSpecifiers());
  143795. node.source = null;
  143796. node.declaration = null;
  143797. return true;
  143798. }
  143799. return false;
  143800. }
  143801. maybeParseExportDeclaration(node) {
  143802. if (this.shouldParseExportDeclaration()) {
  143803. node.specifiers = [];
  143804. node.source = null;
  143805. node.declaration = this.parseExportDeclaration(node);
  143806. return true;
  143807. }
  143808. return false;
  143809. }
  143810. isAsyncFunction() {
  143811. if (!this.isContextual("async"))
  143812. return false;
  143813. const next = this.nextTokenStart();
  143814. return !lineBreak2.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  143815. }
  143816. parseExportDefaultExpression() {
  143817. const expr = this.startNode();
  143818. const isAsync = this.isAsyncFunction();
  143819. if (this.match(types$12._function) || isAsync) {
  143820. this.next();
  143821. if (isAsync) {
  143822. this.next();
  143823. }
  143824. return this.parseFunction(expr, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, isAsync);
  143825. } else if (this.match(types$12._class)) {
  143826. return this.parseClass(expr, true, true);
  143827. } else if (this.match(types$12.at)) {
  143828. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  143829. this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport);
  143830. }
  143831. this.parseDecorators(false);
  143832. return this.parseClass(expr, true, true);
  143833. } else if (this.match(types$12._const) || this.match(types$12._var) || this.isLet()) {
  143834. throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport);
  143835. } else {
  143836. const res = this.parseMaybeAssignAllowIn();
  143837. this.semicolon();
  143838. return res;
  143839. }
  143840. }
  143841. parseExportDeclaration(node) {
  143842. return this.parseStatement(null);
  143843. }
  143844. isExportDefaultSpecifier() {
  143845. if (this.match(types$12.name)) {
  143846. const value = this.state.value;
  143847. if (value === "async" && !this.state.containsEsc || value === "let") {
  143848. return false;
  143849. }
  143850. if ((value === "type" || value === "interface") && !this.state.containsEsc) {
  143851. const l = this.lookahead();
  143852. if (l.type === types$12.name && l.value !== "from" || l.type === types$12.braceL) {
  143853. this.expectOnePlugin(["flow", "typescript"]);
  143854. return false;
  143855. }
  143856. }
  143857. } else if (!this.match(types$12._default)) {
  143858. return false;
  143859. }
  143860. const next = this.nextTokenStart();
  143861. const hasFrom = this.isUnparsedContextual(next, "from");
  143862. if (this.input.charCodeAt(next) === 44 || this.match(types$12.name) && hasFrom) {
  143863. return true;
  143864. }
  143865. if (this.match(types$12._default) && hasFrom) {
  143866. const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
  143867. return nextAfterFrom === 34 || nextAfterFrom === 39;
  143868. }
  143869. return false;
  143870. }
  143871. parseExportFrom(node, expect) {
  143872. if (this.eatContextual("from")) {
  143873. node.source = this.parseImportSource();
  143874. this.checkExport(node);
  143875. const assertions = this.maybeParseImportAssertions();
  143876. if (assertions) {
  143877. node.assertions = assertions;
  143878. }
  143879. } else {
  143880. if (expect) {
  143881. this.unexpected();
  143882. } else {
  143883. node.source = null;
  143884. }
  143885. }
  143886. this.semicolon();
  143887. }
  143888. shouldParseExportDeclaration() {
  143889. if (this.match(types$12.at)) {
  143890. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  143891. if (this.hasPlugin("decorators")) {
  143892. if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  143893. this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport);
  143894. } else {
  143895. return true;
  143896. }
  143897. }
  143898. }
  143899. 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();
  143900. }
  143901. checkExport(node, checkNames, isDefault, isFrom) {
  143902. if (checkNames) {
  143903. if (isDefault) {
  143904. this.checkDuplicateExports(node, "default");
  143905. if (this.hasPlugin("exportDefaultFrom")) {
  143906. var _declaration$extra;
  143907. const declaration = node.declaration;
  143908. if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
  143909. this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier);
  143910. }
  143911. }
  143912. } else if (node.specifiers && node.specifiers.length) {
  143913. for (const specifier of node.specifiers) {
  143914. const {
  143915. exported
  143916. } = specifier;
  143917. const exportedName = exported.type === "Identifier" ? exported.name : exported.value;
  143918. this.checkDuplicateExports(specifier, exportedName);
  143919. if (!isFrom && specifier.local) {
  143920. const {
  143921. local
  143922. } = specifier;
  143923. if (local.type !== "Identifier") {
  143924. this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.value, exportedName);
  143925. } else {
  143926. this.checkReservedWord(local.name, local.start, true, false);
  143927. this.scope.checkLocalExport(local);
  143928. }
  143929. }
  143930. }
  143931. } else if (node.declaration) {
  143932. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  143933. const id = node.declaration.id;
  143934. if (!id)
  143935. throw new Error("Assertion failure");
  143936. this.checkDuplicateExports(node, id.name);
  143937. } else if (node.declaration.type === "VariableDeclaration") {
  143938. for (const declaration of node.declaration.declarations) {
  143939. this.checkDeclaration(declaration.id);
  143940. }
  143941. }
  143942. }
  143943. }
  143944. const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  143945. if (currentContextDecorators.length) {
  143946. throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport);
  143947. }
  143948. }
  143949. checkDeclaration(node) {
  143950. if (node.type === "Identifier") {
  143951. this.checkDuplicateExports(node, node.name);
  143952. } else if (node.type === "ObjectPattern") {
  143953. for (const prop of node.properties) {
  143954. this.checkDeclaration(prop);
  143955. }
  143956. } else if (node.type === "ArrayPattern") {
  143957. for (const elem of node.elements) {
  143958. if (elem) {
  143959. this.checkDeclaration(elem);
  143960. }
  143961. }
  143962. } else if (node.type === "ObjectProperty") {
  143963. this.checkDeclaration(node.value);
  143964. } else if (node.type === "RestElement") {
  143965. this.checkDeclaration(node.argument);
  143966. } else if (node.type === "AssignmentPattern") {
  143967. this.checkDeclaration(node.left);
  143968. }
  143969. }
  143970. checkDuplicateExports(node, name2) {
  143971. if (this.exportedIdentifiers.has(name2)) {
  143972. this.raise(node.start, name2 === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name2);
  143973. }
  143974. this.exportedIdentifiers.add(name2);
  143975. }
  143976. parseExportSpecifiers() {
  143977. const nodes = [];
  143978. let first = true;
  143979. this.expect(types$12.braceL);
  143980. while (!this.eat(types$12.braceR)) {
  143981. if (first) {
  143982. first = false;
  143983. } else {
  143984. this.expect(types$12.comma);
  143985. if (this.eat(types$12.braceR))
  143986. break;
  143987. }
  143988. const node = this.startNode();
  143989. node.local = this.parseModuleExportName();
  143990. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local.__clone();
  143991. nodes.push(this.finishNode(node, "ExportSpecifier"));
  143992. }
  143993. return nodes;
  143994. }
  143995. parseModuleExportName() {
  143996. if (this.match(types$12.string)) {
  143997. const result = this.parseStringLiteral(this.state.value);
  143998. const surrogate = result.value.match(loneSurrogate2);
  143999. if (surrogate) {
  144000. this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16));
  144001. }
  144002. return result;
  144003. }
  144004. return this.parseIdentifier(true);
  144005. }
  144006. parseImport(node) {
  144007. node.specifiers = [];
  144008. if (!this.match(types$12.string)) {
  144009. const hasDefault = this.maybeParseDefaultImportSpecifier(node);
  144010. const parseNext = !hasDefault || this.eat(types$12.comma);
  144011. const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
  144012. if (parseNext && !hasStar)
  144013. this.parseNamedImportSpecifiers(node);
  144014. this.expectContextual("from");
  144015. }
  144016. node.source = this.parseImportSource();
  144017. const assertions = this.maybeParseImportAssertions();
  144018. if (assertions) {
  144019. node.assertions = assertions;
  144020. } else {
  144021. const attributes = this.maybeParseModuleAttributes();
  144022. if (attributes) {
  144023. node.attributes = attributes;
  144024. }
  144025. }
  144026. this.semicolon();
  144027. return this.finishNode(node, "ImportDeclaration");
  144028. }
  144029. parseImportSource() {
  144030. if (!this.match(types$12.string))
  144031. this.unexpected();
  144032. return this.parseExprAtom();
  144033. }
  144034. shouldParseDefaultImport(node) {
  144035. return this.match(types$12.name);
  144036. }
  144037. parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  144038. specifier.local = this.parseIdentifier();
  144039. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL2);
  144040. node.specifiers.push(this.finishNode(specifier, type));
  144041. }
  144042. parseAssertEntries() {
  144043. const attrs = [];
  144044. const attrNames = /* @__PURE__ */ new Set();
  144045. do {
  144046. if (this.match(types$12.braceR)) {
  144047. break;
  144048. }
  144049. const node = this.startNode();
  144050. const keyName = this.state.value;
  144051. if (attrNames.has(keyName)) {
  144052. this.raise(this.state.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName);
  144053. }
  144054. attrNames.add(keyName);
  144055. if (this.match(types$12.string)) {
  144056. node.key = this.parseStringLiteral(keyName);
  144057. } else {
  144058. node.key = this.parseIdentifier(true);
  144059. }
  144060. this.expect(types$12.colon);
  144061. if (!this.match(types$12.string)) {
  144062. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  144063. }
  144064. node.value = this.parseStringLiteral(this.state.value);
  144065. this.finishNode(node, "ImportAttribute");
  144066. attrs.push(node);
  144067. } while (this.eat(types$12.comma));
  144068. return attrs;
  144069. }
  144070. maybeParseModuleAttributes() {
  144071. if (this.match(types$12._with) && !this.hasPrecedingLineBreak()) {
  144072. this.expectPlugin("moduleAttributes");
  144073. this.next();
  144074. } else {
  144075. if (this.hasPlugin("moduleAttributes"))
  144076. return [];
  144077. return null;
  144078. }
  144079. const attrs = [];
  144080. const attributes = /* @__PURE__ */ new Set();
  144081. do {
  144082. const node = this.startNode();
  144083. node.key = this.parseIdentifier(true);
  144084. if (node.key.name !== "type") {
  144085. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name);
  144086. }
  144087. if (attributes.has(node.key.name)) {
  144088. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name);
  144089. }
  144090. attributes.add(node.key.name);
  144091. this.expect(types$12.colon);
  144092. if (!this.match(types$12.string)) {
  144093. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  144094. }
  144095. node.value = this.parseStringLiteral(this.state.value);
  144096. this.finishNode(node, "ImportAttribute");
  144097. attrs.push(node);
  144098. } while (this.eat(types$12.comma));
  144099. return attrs;
  144100. }
  144101. maybeParseImportAssertions() {
  144102. if (this.isContextual("assert") && !this.hasPrecedingLineBreak()) {
  144103. this.expectPlugin("importAssertions");
  144104. this.next();
  144105. } else {
  144106. if (this.hasPlugin("importAssertions"))
  144107. return [];
  144108. return null;
  144109. }
  144110. this.eat(types$12.braceL);
  144111. const attrs = this.parseAssertEntries();
  144112. this.eat(types$12.braceR);
  144113. return attrs;
  144114. }
  144115. maybeParseDefaultImportSpecifier(node) {
  144116. if (this.shouldParseDefaultImport(node)) {
  144117. this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
  144118. return true;
  144119. }
  144120. return false;
  144121. }
  144122. maybeParseStarImportSpecifier(node) {
  144123. if (this.match(types$12.star)) {
  144124. const specifier = this.startNode();
  144125. this.next();
  144126. this.expectContextual("as");
  144127. this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
  144128. return true;
  144129. }
  144130. return false;
  144131. }
  144132. parseNamedImportSpecifiers(node) {
  144133. let first = true;
  144134. this.expect(types$12.braceL);
  144135. while (!this.eat(types$12.braceR)) {
  144136. if (first) {
  144137. first = false;
  144138. } else {
  144139. if (this.eat(types$12.colon)) {
  144140. throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport);
  144141. }
  144142. this.expect(types$12.comma);
  144143. if (this.eat(types$12.braceR))
  144144. break;
  144145. }
  144146. this.parseImportSpecifier(node);
  144147. }
  144148. }
  144149. parseImportSpecifier(node) {
  144150. const specifier = this.startNode();
  144151. const importedIsString = this.match(types$12.string);
  144152. specifier.imported = this.parseModuleExportName();
  144153. if (this.eatContextual("as")) {
  144154. specifier.local = this.parseIdentifier();
  144155. } else {
  144156. const {
  144157. imported
  144158. } = specifier;
  144159. if (importedIsString) {
  144160. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value);
  144161. }
  144162. this.checkReservedWord(imported.name, specifier.start, true, true);
  144163. specifier.local = imported.__clone();
  144164. }
  144165. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL2);
  144166. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  144167. }
  144168. isThisParam(param) {
  144169. return param.type === "Identifier" && param.name === "this";
  144170. }
  144171. };
  144172. var Parser3 = class extends StatementParser {
  144173. constructor(options, input) {
  144174. options = getOptions2(options);
  144175. super(options, input);
  144176. this.options = options;
  144177. this.initializeScopes();
  144178. this.plugins = pluginsMap(this.options.plugins);
  144179. this.filename = options.sourceFilename;
  144180. }
  144181. getScopeHandler() {
  144182. return ScopeHandler;
  144183. }
  144184. parse() {
  144185. this.enterInitialScopes();
  144186. const file = this.startNode();
  144187. const program = this.startNode();
  144188. this.nextToken();
  144189. file.errors = null;
  144190. this.parseTopLevel(file, program);
  144191. file.errors = this.state.errors;
  144192. return file;
  144193. }
  144194. };
  144195. function pluginsMap(plugins) {
  144196. const pluginMap = /* @__PURE__ */ new Map();
  144197. for (const plugin2 of plugins) {
  144198. const [name2, options] = Array.isArray(plugin2) ? plugin2 : [plugin2, {}];
  144199. if (!pluginMap.has(name2))
  144200. pluginMap.set(name2, options || {});
  144201. }
  144202. return pluginMap;
  144203. }
  144204. function parse4(input, options) {
  144205. var _options;
  144206. if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
  144207. options = Object.assign({}, options);
  144208. try {
  144209. options.sourceType = "module";
  144210. const parser = getParser(options, input);
  144211. const ast = parser.parse();
  144212. if (parser.sawUnambiguousESM) {
  144213. return ast;
  144214. }
  144215. if (parser.ambiguousScriptDifferentAst) {
  144216. try {
  144217. options.sourceType = "script";
  144218. return getParser(options, input).parse();
  144219. } catch (_unused) {
  144220. }
  144221. } else {
  144222. ast.program.sourceType = "script";
  144223. }
  144224. return ast;
  144225. } catch (moduleError) {
  144226. try {
  144227. options.sourceType = "script";
  144228. return getParser(options, input).parse();
  144229. } catch (_unused2) {
  144230. }
  144231. throw moduleError;
  144232. }
  144233. } else {
  144234. return getParser(options, input).parse();
  144235. }
  144236. }
  144237. function parseExpression(input, options) {
  144238. const parser = getParser(options, input);
  144239. if (parser.options.strictMode) {
  144240. parser.state.strict = true;
  144241. }
  144242. return parser.getExpression();
  144243. }
  144244. function getParser(options, input) {
  144245. let cls = Parser3;
  144246. if (options != null && options.plugins) {
  144247. validatePlugins(options.plugins);
  144248. cls = getParserClass(options.plugins);
  144249. }
  144250. return new cls(options, input);
  144251. }
  144252. var parserClassCache = {};
  144253. function getParserClass(pluginsFromOptions) {
  144254. const pluginList = mixinPluginNames.filter((name2) => hasPlugin(pluginsFromOptions, name2));
  144255. const key = pluginList.join("/");
  144256. let cls = parserClassCache[key];
  144257. if (!cls) {
  144258. cls = Parser3;
  144259. for (const plugin2 of pluginList) {
  144260. cls = mixinPlugins[plugin2](cls);
  144261. }
  144262. parserClassCache[key] = cls;
  144263. }
  144264. return cls;
  144265. }
  144266. exports.parse = parse4;
  144267. exports.parseExpression = parseExpression;
  144268. exports.tokTypes = types$12;
  144269. }
  144270. });
  144271. // node_modules/@babel/template/node_modules/color-name/index.js
  144272. var require_color_name3 = __commonJS({
  144273. "node_modules/@babel/template/node_modules/color-name/index.js"(exports, module2) {
  144274. "use strict";
  144275. module2.exports = {
  144276. "aliceblue": [240, 248, 255],
  144277. "antiquewhite": [250, 235, 215],
  144278. "aqua": [0, 255, 255],
  144279. "aquamarine": [127, 255, 212],
  144280. "azure": [240, 255, 255],
  144281. "beige": [245, 245, 220],
  144282. "bisque": [255, 228, 196],
  144283. "black": [0, 0, 0],
  144284. "blanchedalmond": [255, 235, 205],
  144285. "blue": [0, 0, 255],
  144286. "blueviolet": [138, 43, 226],
  144287. "brown": [165, 42, 42],
  144288. "burlywood": [222, 184, 135],
  144289. "cadetblue": [95, 158, 160],
  144290. "chartreuse": [127, 255, 0],
  144291. "chocolate": [210, 105, 30],
  144292. "coral": [255, 127, 80],
  144293. "cornflowerblue": [100, 149, 237],
  144294. "cornsilk": [255, 248, 220],
  144295. "crimson": [220, 20, 60],
  144296. "cyan": [0, 255, 255],
  144297. "darkblue": [0, 0, 139],
  144298. "darkcyan": [0, 139, 139],
  144299. "darkgoldenrod": [184, 134, 11],
  144300. "darkgray": [169, 169, 169],
  144301. "darkgreen": [0, 100, 0],
  144302. "darkgrey": [169, 169, 169],
  144303. "darkkhaki": [189, 183, 107],
  144304. "darkmagenta": [139, 0, 139],
  144305. "darkolivegreen": [85, 107, 47],
  144306. "darkorange": [255, 140, 0],
  144307. "darkorchid": [153, 50, 204],
  144308. "darkred": [139, 0, 0],
  144309. "darksalmon": [233, 150, 122],
  144310. "darkseagreen": [143, 188, 143],
  144311. "darkslateblue": [72, 61, 139],
  144312. "darkslategray": [47, 79, 79],
  144313. "darkslategrey": [47, 79, 79],
  144314. "darkturquoise": [0, 206, 209],
  144315. "darkviolet": [148, 0, 211],
  144316. "deeppink": [255, 20, 147],
  144317. "deepskyblue": [0, 191, 255],
  144318. "dimgray": [105, 105, 105],
  144319. "dimgrey": [105, 105, 105],
  144320. "dodgerblue": [30, 144, 255],
  144321. "firebrick": [178, 34, 34],
  144322. "floralwhite": [255, 250, 240],
  144323. "forestgreen": [34, 139, 34],
  144324. "fuchsia": [255, 0, 255],
  144325. "gainsboro": [220, 220, 220],
  144326. "ghostwhite": [248, 248, 255],
  144327. "gold": [255, 215, 0],
  144328. "goldenrod": [218, 165, 32],
  144329. "gray": [128, 128, 128],
  144330. "green": [0, 128, 0],
  144331. "greenyellow": [173, 255, 47],
  144332. "grey": [128, 128, 128],
  144333. "honeydew": [240, 255, 240],
  144334. "hotpink": [255, 105, 180],
  144335. "indianred": [205, 92, 92],
  144336. "indigo": [75, 0, 130],
  144337. "ivory": [255, 255, 240],
  144338. "khaki": [240, 230, 140],
  144339. "lavender": [230, 230, 250],
  144340. "lavenderblush": [255, 240, 245],
  144341. "lawngreen": [124, 252, 0],
  144342. "lemonchiffon": [255, 250, 205],
  144343. "lightblue": [173, 216, 230],
  144344. "lightcoral": [240, 128, 128],
  144345. "lightcyan": [224, 255, 255],
  144346. "lightgoldenrodyellow": [250, 250, 210],
  144347. "lightgray": [211, 211, 211],
  144348. "lightgreen": [144, 238, 144],
  144349. "lightgrey": [211, 211, 211],
  144350. "lightpink": [255, 182, 193],
  144351. "lightsalmon": [255, 160, 122],
  144352. "lightseagreen": [32, 178, 170],
  144353. "lightskyblue": [135, 206, 250],
  144354. "lightslategray": [119, 136, 153],
  144355. "lightslategrey": [119, 136, 153],
  144356. "lightsteelblue": [176, 196, 222],
  144357. "lightyellow": [255, 255, 224],
  144358. "lime": [0, 255, 0],
  144359. "limegreen": [50, 205, 50],
  144360. "linen": [250, 240, 230],
  144361. "magenta": [255, 0, 255],
  144362. "maroon": [128, 0, 0],
  144363. "mediumaquamarine": [102, 205, 170],
  144364. "mediumblue": [0, 0, 205],
  144365. "mediumorchid": [186, 85, 211],
  144366. "mediumpurple": [147, 112, 219],
  144367. "mediumseagreen": [60, 179, 113],
  144368. "mediumslateblue": [123, 104, 238],
  144369. "mediumspringgreen": [0, 250, 154],
  144370. "mediumturquoise": [72, 209, 204],
  144371. "mediumvioletred": [199, 21, 133],
  144372. "midnightblue": [25, 25, 112],
  144373. "mintcream": [245, 255, 250],
  144374. "mistyrose": [255, 228, 225],
  144375. "moccasin": [255, 228, 181],
  144376. "navajowhite": [255, 222, 173],
  144377. "navy": [0, 0, 128],
  144378. "oldlace": [253, 245, 230],
  144379. "olive": [128, 128, 0],
  144380. "olivedrab": [107, 142, 35],
  144381. "orange": [255, 165, 0],
  144382. "orangered": [255, 69, 0],
  144383. "orchid": [218, 112, 214],
  144384. "palegoldenrod": [238, 232, 170],
  144385. "palegreen": [152, 251, 152],
  144386. "paleturquoise": [175, 238, 238],
  144387. "palevioletred": [219, 112, 147],
  144388. "papayawhip": [255, 239, 213],
  144389. "peachpuff": [255, 218, 185],
  144390. "peru": [205, 133, 63],
  144391. "pink": [255, 192, 203],
  144392. "plum": [221, 160, 221],
  144393. "powderblue": [176, 224, 230],
  144394. "purple": [128, 0, 128],
  144395. "rebeccapurple": [102, 51, 153],
  144396. "red": [255, 0, 0],
  144397. "rosybrown": [188, 143, 143],
  144398. "royalblue": [65, 105, 225],
  144399. "saddlebrown": [139, 69, 19],
  144400. "salmon": [250, 128, 114],
  144401. "sandybrown": [244, 164, 96],
  144402. "seagreen": [46, 139, 87],
  144403. "seashell": [255, 245, 238],
  144404. "sienna": [160, 82, 45],
  144405. "silver": [192, 192, 192],
  144406. "skyblue": [135, 206, 235],
  144407. "slateblue": [106, 90, 205],
  144408. "slategray": [112, 128, 144],
  144409. "slategrey": [112, 128, 144],
  144410. "snow": [255, 250, 250],
  144411. "springgreen": [0, 255, 127],
  144412. "steelblue": [70, 130, 180],
  144413. "tan": [210, 180, 140],
  144414. "teal": [0, 128, 128],
  144415. "thistle": [216, 191, 216],
  144416. "tomato": [255, 99, 71],
  144417. "turquoise": [64, 224, 208],
  144418. "violet": [238, 130, 238],
  144419. "wheat": [245, 222, 179],
  144420. "white": [255, 255, 255],
  144421. "whitesmoke": [245, 245, 245],
  144422. "yellow": [255, 255, 0],
  144423. "yellowgreen": [154, 205, 50]
  144424. };
  144425. }
  144426. });
  144427. // node_modules/@babel/template/node_modules/color-convert/conversions.js
  144428. var require_conversions3 = __commonJS({
  144429. "node_modules/@babel/template/node_modules/color-convert/conversions.js"(exports, module2) {
  144430. var cssKeywords = require_color_name3();
  144431. var reverseKeywords = {};
  144432. for (key in cssKeywords) {
  144433. if (cssKeywords.hasOwnProperty(key)) {
  144434. reverseKeywords[cssKeywords[key]] = key;
  144435. }
  144436. }
  144437. var key;
  144438. var convert2 = module2.exports = {
  144439. rgb: { channels: 3, labels: "rgb" },
  144440. hsl: { channels: 3, labels: "hsl" },
  144441. hsv: { channels: 3, labels: "hsv" },
  144442. hwb: { channels: 3, labels: "hwb" },
  144443. cmyk: { channels: 4, labels: "cmyk" },
  144444. xyz: { channels: 3, labels: "xyz" },
  144445. lab: { channels: 3, labels: "lab" },
  144446. lch: { channels: 3, labels: "lch" },
  144447. hex: { channels: 1, labels: ["hex"] },
  144448. keyword: { channels: 1, labels: ["keyword"] },
  144449. ansi16: { channels: 1, labels: ["ansi16"] },
  144450. ansi256: { channels: 1, labels: ["ansi256"] },
  144451. hcg: { channels: 3, labels: ["h", "c", "g"] },
  144452. apple: { channels: 3, labels: ["r16", "g16", "b16"] },
  144453. gray: { channels: 1, labels: ["gray"] }
  144454. };
  144455. for (model in convert2) {
  144456. if (convert2.hasOwnProperty(model)) {
  144457. if (!("channels" in convert2[model])) {
  144458. throw new Error("missing channels property: " + model);
  144459. }
  144460. if (!("labels" in convert2[model])) {
  144461. throw new Error("missing channel labels property: " + model);
  144462. }
  144463. if (convert2[model].labels.length !== convert2[model].channels) {
  144464. throw new Error("channel and label counts mismatch: " + model);
  144465. }
  144466. channels = convert2[model].channels;
  144467. labels = convert2[model].labels;
  144468. delete convert2[model].channels;
  144469. delete convert2[model].labels;
  144470. Object.defineProperty(convert2[model], "channels", { value: channels });
  144471. Object.defineProperty(convert2[model], "labels", { value: labels });
  144472. }
  144473. }
  144474. var channels;
  144475. var labels;
  144476. var model;
  144477. convert2.rgb.hsl = function(rgb) {
  144478. var r = rgb[0] / 255;
  144479. var g = rgb[1] / 255;
  144480. var b = rgb[2] / 255;
  144481. var min = Math.min(r, g, b);
  144482. var max = Math.max(r, g, b);
  144483. var delta = max - min;
  144484. var h;
  144485. var s;
  144486. var l;
  144487. if (max === min) {
  144488. h = 0;
  144489. } else if (r === max) {
  144490. h = (g - b) / delta;
  144491. } else if (g === max) {
  144492. h = 2 + (b - r) / delta;
  144493. } else if (b === max) {
  144494. h = 4 + (r - g) / delta;
  144495. }
  144496. h = Math.min(h * 60, 360);
  144497. if (h < 0) {
  144498. h += 360;
  144499. }
  144500. l = (min + max) / 2;
  144501. if (max === min) {
  144502. s = 0;
  144503. } else if (l <= 0.5) {
  144504. s = delta / (max + min);
  144505. } else {
  144506. s = delta / (2 - max - min);
  144507. }
  144508. return [h, s * 100, l * 100];
  144509. };
  144510. convert2.rgb.hsv = function(rgb) {
  144511. var rdif;
  144512. var gdif;
  144513. var bdif;
  144514. var h;
  144515. var s;
  144516. var r = rgb[0] / 255;
  144517. var g = rgb[1] / 255;
  144518. var b = rgb[2] / 255;
  144519. var v = Math.max(r, g, b);
  144520. var diff = v - Math.min(r, g, b);
  144521. var diffc = function(c) {
  144522. return (v - c) / 6 / diff + 1 / 2;
  144523. };
  144524. if (diff === 0) {
  144525. h = s = 0;
  144526. } else {
  144527. s = diff / v;
  144528. rdif = diffc(r);
  144529. gdif = diffc(g);
  144530. bdif = diffc(b);
  144531. if (r === v) {
  144532. h = bdif - gdif;
  144533. } else if (g === v) {
  144534. h = 1 / 3 + rdif - bdif;
  144535. } else if (b === v) {
  144536. h = 2 / 3 + gdif - rdif;
  144537. }
  144538. if (h < 0) {
  144539. h += 1;
  144540. } else if (h > 1) {
  144541. h -= 1;
  144542. }
  144543. }
  144544. return [
  144545. h * 360,
  144546. s * 100,
  144547. v * 100
  144548. ];
  144549. };
  144550. convert2.rgb.hwb = function(rgb) {
  144551. var r = rgb[0];
  144552. var g = rgb[1];
  144553. var b = rgb[2];
  144554. var h = convert2.rgb.hsl(rgb)[0];
  144555. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  144556. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  144557. return [h, w * 100, b * 100];
  144558. };
  144559. convert2.rgb.cmyk = function(rgb) {
  144560. var r = rgb[0] / 255;
  144561. var g = rgb[1] / 255;
  144562. var b = rgb[2] / 255;
  144563. var c;
  144564. var m;
  144565. var y;
  144566. var k;
  144567. k = Math.min(1 - r, 1 - g, 1 - b);
  144568. c = (1 - r - k) / (1 - k) || 0;
  144569. m = (1 - g - k) / (1 - k) || 0;
  144570. y = (1 - b - k) / (1 - k) || 0;
  144571. return [c * 100, m * 100, y * 100, k * 100];
  144572. };
  144573. function comparativeDistance(x, y) {
  144574. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  144575. }
  144576. convert2.rgb.keyword = function(rgb) {
  144577. var reversed = reverseKeywords[rgb];
  144578. if (reversed) {
  144579. return reversed;
  144580. }
  144581. var currentClosestDistance = Infinity;
  144582. var currentClosestKeyword;
  144583. for (var keyword in cssKeywords) {
  144584. if (cssKeywords.hasOwnProperty(keyword)) {
  144585. var value = cssKeywords[keyword];
  144586. var distance = comparativeDistance(rgb, value);
  144587. if (distance < currentClosestDistance) {
  144588. currentClosestDistance = distance;
  144589. currentClosestKeyword = keyword;
  144590. }
  144591. }
  144592. }
  144593. return currentClosestKeyword;
  144594. };
  144595. convert2.keyword.rgb = function(keyword) {
  144596. return cssKeywords[keyword];
  144597. };
  144598. convert2.rgb.xyz = function(rgb) {
  144599. var r = rgb[0] / 255;
  144600. var g = rgb[1] / 255;
  144601. var b = rgb[2] / 255;
  144602. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  144603. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  144604. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  144605. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  144606. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  144607. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  144608. return [x * 100, y * 100, z * 100];
  144609. };
  144610. convert2.rgb.lab = function(rgb) {
  144611. var xyz = convert2.rgb.xyz(rgb);
  144612. var x = xyz[0];
  144613. var y = xyz[1];
  144614. var z = xyz[2];
  144615. var l;
  144616. var a;
  144617. var b;
  144618. x /= 95.047;
  144619. y /= 100;
  144620. z /= 108.883;
  144621. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  144622. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  144623. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  144624. l = 116 * y - 16;
  144625. a = 500 * (x - y);
  144626. b = 200 * (y - z);
  144627. return [l, a, b];
  144628. };
  144629. convert2.hsl.rgb = function(hsl) {
  144630. var h = hsl[0] / 360;
  144631. var s = hsl[1] / 100;
  144632. var l = hsl[2] / 100;
  144633. var t1;
  144634. var t2;
  144635. var t3;
  144636. var rgb;
  144637. var val;
  144638. if (s === 0) {
  144639. val = l * 255;
  144640. return [val, val, val];
  144641. }
  144642. if (l < 0.5) {
  144643. t2 = l * (1 + s);
  144644. } else {
  144645. t2 = l + s - l * s;
  144646. }
  144647. t1 = 2 * l - t2;
  144648. rgb = [0, 0, 0];
  144649. for (var i = 0; i < 3; i++) {
  144650. t3 = h + 1 / 3 * -(i - 1);
  144651. if (t3 < 0) {
  144652. t3++;
  144653. }
  144654. if (t3 > 1) {
  144655. t3--;
  144656. }
  144657. if (6 * t3 < 1) {
  144658. val = t1 + (t2 - t1) * 6 * t3;
  144659. } else if (2 * t3 < 1) {
  144660. val = t2;
  144661. } else if (3 * t3 < 2) {
  144662. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  144663. } else {
  144664. val = t1;
  144665. }
  144666. rgb[i] = val * 255;
  144667. }
  144668. return rgb;
  144669. };
  144670. convert2.hsl.hsv = function(hsl) {
  144671. var h = hsl[0];
  144672. var s = hsl[1] / 100;
  144673. var l = hsl[2] / 100;
  144674. var smin = s;
  144675. var lmin = Math.max(l, 0.01);
  144676. var sv;
  144677. var v;
  144678. l *= 2;
  144679. s *= l <= 1 ? l : 2 - l;
  144680. smin *= lmin <= 1 ? lmin : 2 - lmin;
  144681. v = (l + s) / 2;
  144682. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  144683. return [h, sv * 100, v * 100];
  144684. };
  144685. convert2.hsv.rgb = function(hsv) {
  144686. var h = hsv[0] / 60;
  144687. var s = hsv[1] / 100;
  144688. var v = hsv[2] / 100;
  144689. var hi = Math.floor(h) % 6;
  144690. var f = h - Math.floor(h);
  144691. var p = 255 * v * (1 - s);
  144692. var q = 255 * v * (1 - s * f);
  144693. var t2 = 255 * v * (1 - s * (1 - f));
  144694. v *= 255;
  144695. switch (hi) {
  144696. case 0:
  144697. return [v, t2, p];
  144698. case 1:
  144699. return [q, v, p];
  144700. case 2:
  144701. return [p, v, t2];
  144702. case 3:
  144703. return [p, q, v];
  144704. case 4:
  144705. return [t2, p, v];
  144706. case 5:
  144707. return [v, p, q];
  144708. }
  144709. };
  144710. convert2.hsv.hsl = function(hsv) {
  144711. var h = hsv[0];
  144712. var s = hsv[1] / 100;
  144713. var v = hsv[2] / 100;
  144714. var vmin = Math.max(v, 0.01);
  144715. var lmin;
  144716. var sl;
  144717. var l;
  144718. l = (2 - s) * v;
  144719. lmin = (2 - s) * vmin;
  144720. sl = s * vmin;
  144721. sl /= lmin <= 1 ? lmin : 2 - lmin;
  144722. sl = sl || 0;
  144723. l /= 2;
  144724. return [h, sl * 100, l * 100];
  144725. };
  144726. convert2.hwb.rgb = function(hwb) {
  144727. var h = hwb[0] / 360;
  144728. var wh = hwb[1] / 100;
  144729. var bl = hwb[2] / 100;
  144730. var ratio = wh + bl;
  144731. var i;
  144732. var v;
  144733. var f;
  144734. var n;
  144735. if (ratio > 1) {
  144736. wh /= ratio;
  144737. bl /= ratio;
  144738. }
  144739. i = Math.floor(6 * h);
  144740. v = 1 - bl;
  144741. f = 6 * h - i;
  144742. if ((i & 1) !== 0) {
  144743. f = 1 - f;
  144744. }
  144745. n = wh + f * (v - wh);
  144746. var r;
  144747. var g;
  144748. var b;
  144749. switch (i) {
  144750. default:
  144751. case 6:
  144752. case 0:
  144753. r = v;
  144754. g = n;
  144755. b = wh;
  144756. break;
  144757. case 1:
  144758. r = n;
  144759. g = v;
  144760. b = wh;
  144761. break;
  144762. case 2:
  144763. r = wh;
  144764. g = v;
  144765. b = n;
  144766. break;
  144767. case 3:
  144768. r = wh;
  144769. g = n;
  144770. b = v;
  144771. break;
  144772. case 4:
  144773. r = n;
  144774. g = wh;
  144775. b = v;
  144776. break;
  144777. case 5:
  144778. r = v;
  144779. g = wh;
  144780. b = n;
  144781. break;
  144782. }
  144783. return [r * 255, g * 255, b * 255];
  144784. };
  144785. convert2.cmyk.rgb = function(cmyk) {
  144786. var c = cmyk[0] / 100;
  144787. var m = cmyk[1] / 100;
  144788. var y = cmyk[2] / 100;
  144789. var k = cmyk[3] / 100;
  144790. var r;
  144791. var g;
  144792. var b;
  144793. r = 1 - Math.min(1, c * (1 - k) + k);
  144794. g = 1 - Math.min(1, m * (1 - k) + k);
  144795. b = 1 - Math.min(1, y * (1 - k) + k);
  144796. return [r * 255, g * 255, b * 255];
  144797. };
  144798. convert2.xyz.rgb = function(xyz) {
  144799. var x = xyz[0] / 100;
  144800. var y = xyz[1] / 100;
  144801. var z = xyz[2] / 100;
  144802. var r;
  144803. var g;
  144804. var b;
  144805. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  144806. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  144807. b = x * 0.0557 + y * -0.204 + z * 1.057;
  144808. r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
  144809. g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
  144810. b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
  144811. r = Math.min(Math.max(0, r), 1);
  144812. g = Math.min(Math.max(0, g), 1);
  144813. b = Math.min(Math.max(0, b), 1);
  144814. return [r * 255, g * 255, b * 255];
  144815. };
  144816. convert2.xyz.lab = function(xyz) {
  144817. var x = xyz[0];
  144818. var y = xyz[1];
  144819. var z = xyz[2];
  144820. var l;
  144821. var a;
  144822. var b;
  144823. x /= 95.047;
  144824. y /= 100;
  144825. z /= 108.883;
  144826. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  144827. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  144828. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  144829. l = 116 * y - 16;
  144830. a = 500 * (x - y);
  144831. b = 200 * (y - z);
  144832. return [l, a, b];
  144833. };
  144834. convert2.lab.xyz = function(lab) {
  144835. var l = lab[0];
  144836. var a = lab[1];
  144837. var b = lab[2];
  144838. var x;
  144839. var y;
  144840. var z;
  144841. y = (l + 16) / 116;
  144842. x = a / 500 + y;
  144843. z = y - b / 200;
  144844. var y2 = Math.pow(y, 3);
  144845. var x2 = Math.pow(x, 3);
  144846. var z2 = Math.pow(z, 3);
  144847. y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
  144848. x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
  144849. z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
  144850. x *= 95.047;
  144851. y *= 100;
  144852. z *= 108.883;
  144853. return [x, y, z];
  144854. };
  144855. convert2.lab.lch = function(lab) {
  144856. var l = lab[0];
  144857. var a = lab[1];
  144858. var b = lab[2];
  144859. var hr;
  144860. var h;
  144861. var c;
  144862. hr = Math.atan2(b, a);
  144863. h = hr * 360 / 2 / Math.PI;
  144864. if (h < 0) {
  144865. h += 360;
  144866. }
  144867. c = Math.sqrt(a * a + b * b);
  144868. return [l, c, h];
  144869. };
  144870. convert2.lch.lab = function(lch) {
  144871. var l = lch[0];
  144872. var c = lch[1];
  144873. var h = lch[2];
  144874. var a;
  144875. var b;
  144876. var hr;
  144877. hr = h / 360 * 2 * Math.PI;
  144878. a = c * Math.cos(hr);
  144879. b = c * Math.sin(hr);
  144880. return [l, a, b];
  144881. };
  144882. convert2.rgb.ansi16 = function(args) {
  144883. var r = args[0];
  144884. var g = args[1];
  144885. var b = args[2];
  144886. var value = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args)[2];
  144887. value = Math.round(value / 50);
  144888. if (value === 0) {
  144889. return 30;
  144890. }
  144891. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  144892. if (value === 2) {
  144893. ansi += 60;
  144894. }
  144895. return ansi;
  144896. };
  144897. convert2.hsv.ansi16 = function(args) {
  144898. return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
  144899. };
  144900. convert2.rgb.ansi256 = function(args) {
  144901. var r = args[0];
  144902. var g = args[1];
  144903. var b = args[2];
  144904. if (r === g && g === b) {
  144905. if (r < 8) {
  144906. return 16;
  144907. }
  144908. if (r > 248) {
  144909. return 231;
  144910. }
  144911. return Math.round((r - 8) / 247 * 24) + 232;
  144912. }
  144913. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  144914. return ansi;
  144915. };
  144916. convert2.ansi16.rgb = function(args) {
  144917. var color4 = args % 10;
  144918. if (color4 === 0 || color4 === 7) {
  144919. if (args > 50) {
  144920. color4 += 3.5;
  144921. }
  144922. color4 = color4 / 10.5 * 255;
  144923. return [color4, color4, color4];
  144924. }
  144925. var mult = (~~(args > 50) + 1) * 0.5;
  144926. var r = (color4 & 1) * mult * 255;
  144927. var g = (color4 >> 1 & 1) * mult * 255;
  144928. var b = (color4 >> 2 & 1) * mult * 255;
  144929. return [r, g, b];
  144930. };
  144931. convert2.ansi256.rgb = function(args) {
  144932. if (args >= 232) {
  144933. var c = (args - 232) * 10 + 8;
  144934. return [c, c, c];
  144935. }
  144936. args -= 16;
  144937. var rem;
  144938. var r = Math.floor(args / 36) / 5 * 255;
  144939. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  144940. var b = rem % 6 / 5 * 255;
  144941. return [r, g, b];
  144942. };
  144943. convert2.rgb.hex = function(args) {
  144944. var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
  144945. var string3 = integer.toString(16).toUpperCase();
  144946. return "000000".substring(string3.length) + string3;
  144947. };
  144948. convert2.hex.rgb = function(args) {
  144949. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  144950. if (!match) {
  144951. return [0, 0, 0];
  144952. }
  144953. var colorString = match[0];
  144954. if (match[0].length === 3) {
  144955. colorString = colorString.split("").map(function(char) {
  144956. return char + char;
  144957. }).join("");
  144958. }
  144959. var integer = parseInt(colorString, 16);
  144960. var r = integer >> 16 & 255;
  144961. var g = integer >> 8 & 255;
  144962. var b = integer & 255;
  144963. return [r, g, b];
  144964. };
  144965. convert2.rgb.hcg = function(rgb) {
  144966. var r = rgb[0] / 255;
  144967. var g = rgb[1] / 255;
  144968. var b = rgb[2] / 255;
  144969. var max = Math.max(Math.max(r, g), b);
  144970. var min = Math.min(Math.min(r, g), b);
  144971. var chroma = max - min;
  144972. var grayscale;
  144973. var hue;
  144974. if (chroma < 1) {
  144975. grayscale = min / (1 - chroma);
  144976. } else {
  144977. grayscale = 0;
  144978. }
  144979. if (chroma <= 0) {
  144980. hue = 0;
  144981. } else if (max === r) {
  144982. hue = (g - b) / chroma % 6;
  144983. } else if (max === g) {
  144984. hue = 2 + (b - r) / chroma;
  144985. } else {
  144986. hue = 4 + (r - g) / chroma + 4;
  144987. }
  144988. hue /= 6;
  144989. hue %= 1;
  144990. return [hue * 360, chroma * 100, grayscale * 100];
  144991. };
  144992. convert2.hsl.hcg = function(hsl) {
  144993. var s = hsl[1] / 100;
  144994. var l = hsl[2] / 100;
  144995. var c = 1;
  144996. var f = 0;
  144997. if (l < 0.5) {
  144998. c = 2 * s * l;
  144999. } else {
  145000. c = 2 * s * (1 - l);
  145001. }
  145002. if (c < 1) {
  145003. f = (l - 0.5 * c) / (1 - c);
  145004. }
  145005. return [hsl[0], c * 100, f * 100];
  145006. };
  145007. convert2.hsv.hcg = function(hsv) {
  145008. var s = hsv[1] / 100;
  145009. var v = hsv[2] / 100;
  145010. var c = s * v;
  145011. var f = 0;
  145012. if (c < 1) {
  145013. f = (v - c) / (1 - c);
  145014. }
  145015. return [hsv[0], c * 100, f * 100];
  145016. };
  145017. convert2.hcg.rgb = function(hcg) {
  145018. var h = hcg[0] / 360;
  145019. var c = hcg[1] / 100;
  145020. var g = hcg[2] / 100;
  145021. if (c === 0) {
  145022. return [g * 255, g * 255, g * 255];
  145023. }
  145024. var pure = [0, 0, 0];
  145025. var hi = h % 1 * 6;
  145026. var v = hi % 1;
  145027. var w = 1 - v;
  145028. var mg = 0;
  145029. switch (Math.floor(hi)) {
  145030. case 0:
  145031. pure[0] = 1;
  145032. pure[1] = v;
  145033. pure[2] = 0;
  145034. break;
  145035. case 1:
  145036. pure[0] = w;
  145037. pure[1] = 1;
  145038. pure[2] = 0;
  145039. break;
  145040. case 2:
  145041. pure[0] = 0;
  145042. pure[1] = 1;
  145043. pure[2] = v;
  145044. break;
  145045. case 3:
  145046. pure[0] = 0;
  145047. pure[1] = w;
  145048. pure[2] = 1;
  145049. break;
  145050. case 4:
  145051. pure[0] = v;
  145052. pure[1] = 0;
  145053. pure[2] = 1;
  145054. break;
  145055. default:
  145056. pure[0] = 1;
  145057. pure[1] = 0;
  145058. pure[2] = w;
  145059. }
  145060. mg = (1 - c) * g;
  145061. return [
  145062. (c * pure[0] + mg) * 255,
  145063. (c * pure[1] + mg) * 255,
  145064. (c * pure[2] + mg) * 255
  145065. ];
  145066. };
  145067. convert2.hcg.hsv = function(hcg) {
  145068. var c = hcg[1] / 100;
  145069. var g = hcg[2] / 100;
  145070. var v = c + g * (1 - c);
  145071. var f = 0;
  145072. if (v > 0) {
  145073. f = c / v;
  145074. }
  145075. return [hcg[0], f * 100, v * 100];
  145076. };
  145077. convert2.hcg.hsl = function(hcg) {
  145078. var c = hcg[1] / 100;
  145079. var g = hcg[2] / 100;
  145080. var l = g * (1 - c) + 0.5 * c;
  145081. var s = 0;
  145082. if (l > 0 && l < 0.5) {
  145083. s = c / (2 * l);
  145084. } else if (l >= 0.5 && l < 1) {
  145085. s = c / (2 * (1 - l));
  145086. }
  145087. return [hcg[0], s * 100, l * 100];
  145088. };
  145089. convert2.hcg.hwb = function(hcg) {
  145090. var c = hcg[1] / 100;
  145091. var g = hcg[2] / 100;
  145092. var v = c + g * (1 - c);
  145093. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  145094. };
  145095. convert2.hwb.hcg = function(hwb) {
  145096. var w = hwb[1] / 100;
  145097. var b = hwb[2] / 100;
  145098. var v = 1 - b;
  145099. var c = v - w;
  145100. var g = 0;
  145101. if (c < 1) {
  145102. g = (v - c) / (1 - c);
  145103. }
  145104. return [hwb[0], c * 100, g * 100];
  145105. };
  145106. convert2.apple.rgb = function(apple) {
  145107. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  145108. };
  145109. convert2.rgb.apple = function(rgb) {
  145110. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  145111. };
  145112. convert2.gray.rgb = function(args) {
  145113. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  145114. };
  145115. convert2.gray.hsl = convert2.gray.hsv = function(args) {
  145116. return [0, 0, args[0]];
  145117. };
  145118. convert2.gray.hwb = function(gray) {
  145119. return [0, 100, gray[0]];
  145120. };
  145121. convert2.gray.cmyk = function(gray) {
  145122. return [0, 0, 0, gray[0]];
  145123. };
  145124. convert2.gray.lab = function(gray) {
  145125. return [gray[0], 0, 0];
  145126. };
  145127. convert2.gray.hex = function(gray) {
  145128. var val = Math.round(gray[0] / 100 * 255) & 255;
  145129. var integer = (val << 16) + (val << 8) + val;
  145130. var string3 = integer.toString(16).toUpperCase();
  145131. return "000000".substring(string3.length) + string3;
  145132. };
  145133. convert2.rgb.gray = function(rgb) {
  145134. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  145135. return [val / 255 * 100];
  145136. };
  145137. }
  145138. });
  145139. // node_modules/@babel/template/node_modules/color-convert/route.js
  145140. var require_route3 = __commonJS({
  145141. "node_modules/@babel/template/node_modules/color-convert/route.js"(exports, module2) {
  145142. var conversions = require_conversions3();
  145143. function buildGraph() {
  145144. var graph = {};
  145145. var models = Object.keys(conversions);
  145146. for (var len = models.length, i = 0; i < len; i++) {
  145147. graph[models[i]] = {
  145148. distance: -1,
  145149. parent: null
  145150. };
  145151. }
  145152. return graph;
  145153. }
  145154. function deriveBFS(fromModel) {
  145155. var graph = buildGraph();
  145156. var queue = [fromModel];
  145157. graph[fromModel].distance = 0;
  145158. while (queue.length) {
  145159. var current2 = queue.pop();
  145160. var adjacents = Object.keys(conversions[current2]);
  145161. for (var len = adjacents.length, i = 0; i < len; i++) {
  145162. var adjacent = adjacents[i];
  145163. var node = graph[adjacent];
  145164. if (node.distance === -1) {
  145165. node.distance = graph[current2].distance + 1;
  145166. node.parent = current2;
  145167. queue.unshift(adjacent);
  145168. }
  145169. }
  145170. }
  145171. return graph;
  145172. }
  145173. function link2(from, to) {
  145174. return function(args) {
  145175. return to(from(args));
  145176. };
  145177. }
  145178. function wrapConversion(toModel, graph) {
  145179. var path = [graph[toModel].parent, toModel];
  145180. var fn = conversions[graph[toModel].parent][toModel];
  145181. var cur = graph[toModel].parent;
  145182. while (graph[cur].parent) {
  145183. path.unshift(graph[cur].parent);
  145184. fn = link2(conversions[graph[cur].parent][cur], fn);
  145185. cur = graph[cur].parent;
  145186. }
  145187. fn.conversion = path;
  145188. return fn;
  145189. }
  145190. module2.exports = function(fromModel) {
  145191. var graph = deriveBFS(fromModel);
  145192. var conversion = {};
  145193. var models = Object.keys(graph);
  145194. for (var len = models.length, i = 0; i < len; i++) {
  145195. var toModel = models[i];
  145196. var node = graph[toModel];
  145197. if (node.parent === null) {
  145198. continue;
  145199. }
  145200. conversion[toModel] = wrapConversion(toModel, graph);
  145201. }
  145202. return conversion;
  145203. };
  145204. }
  145205. });
  145206. // node_modules/@babel/template/node_modules/color-convert/index.js
  145207. var require_color_convert3 = __commonJS({
  145208. "node_modules/@babel/template/node_modules/color-convert/index.js"(exports, module2) {
  145209. var conversions = require_conversions3();
  145210. var route = require_route3();
  145211. var convert2 = {};
  145212. var models = Object.keys(conversions);
  145213. function wrapRaw(fn) {
  145214. var wrappedFn = function(args) {
  145215. if (args === void 0 || args === null) {
  145216. return args;
  145217. }
  145218. if (arguments.length > 1) {
  145219. args = Array.prototype.slice.call(arguments);
  145220. }
  145221. return fn(args);
  145222. };
  145223. if ("conversion" in fn) {
  145224. wrappedFn.conversion = fn.conversion;
  145225. }
  145226. return wrappedFn;
  145227. }
  145228. function wrapRounded(fn) {
  145229. var wrappedFn = function(args) {
  145230. if (args === void 0 || args === null) {
  145231. return args;
  145232. }
  145233. if (arguments.length > 1) {
  145234. args = Array.prototype.slice.call(arguments);
  145235. }
  145236. var result = fn(args);
  145237. if (typeof result === "object") {
  145238. for (var len = result.length, i = 0; i < len; i++) {
  145239. result[i] = Math.round(result[i]);
  145240. }
  145241. }
  145242. return result;
  145243. };
  145244. if ("conversion" in fn) {
  145245. wrappedFn.conversion = fn.conversion;
  145246. }
  145247. return wrappedFn;
  145248. }
  145249. models.forEach(function(fromModel) {
  145250. convert2[fromModel] = {};
  145251. Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels });
  145252. Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
  145253. var routes = route(fromModel);
  145254. var routeModels = Object.keys(routes);
  145255. routeModels.forEach(function(toModel) {
  145256. var fn = routes[toModel];
  145257. convert2[fromModel][toModel] = wrapRounded(fn);
  145258. convert2[fromModel][toModel].raw = wrapRaw(fn);
  145259. });
  145260. });
  145261. module2.exports = convert2;
  145262. }
  145263. });
  145264. // node_modules/@babel/template/node_modules/ansi-styles/index.js
  145265. var require_ansi_styles3 = __commonJS({
  145266. "node_modules/@babel/template/node_modules/ansi-styles/index.js"(exports, module2) {
  145267. "use strict";
  145268. var colorConvert = require_color_convert3();
  145269. var wrapAnsi16 = (fn, offset2) => function() {
  145270. const code2 = fn.apply(colorConvert, arguments);
  145271. return `\x1B[${code2 + offset2}m`;
  145272. };
  145273. var wrapAnsi256 = (fn, offset2) => function() {
  145274. const code2 = fn.apply(colorConvert, arguments);
  145275. return `\x1B[${38 + offset2};5;${code2}m`;
  145276. };
  145277. var wrapAnsi16m = (fn, offset2) => function() {
  145278. const rgb = fn.apply(colorConvert, arguments);
  145279. return `\x1B[${38 + offset2};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  145280. };
  145281. function assembleStyles() {
  145282. const codes = /* @__PURE__ */ new Map();
  145283. const styles = {
  145284. modifier: {
  145285. reset: [0, 0],
  145286. bold: [1, 22],
  145287. dim: [2, 22],
  145288. italic: [3, 23],
  145289. underline: [4, 24],
  145290. inverse: [7, 27],
  145291. hidden: [8, 28],
  145292. strikethrough: [9, 29]
  145293. },
  145294. color: {
  145295. black: [30, 39],
  145296. red: [31, 39],
  145297. green: [32, 39],
  145298. yellow: [33, 39],
  145299. blue: [34, 39],
  145300. magenta: [35, 39],
  145301. cyan: [36, 39],
  145302. white: [37, 39],
  145303. gray: [90, 39],
  145304. redBright: [91, 39],
  145305. greenBright: [92, 39],
  145306. yellowBright: [93, 39],
  145307. blueBright: [94, 39],
  145308. magentaBright: [95, 39],
  145309. cyanBright: [96, 39],
  145310. whiteBright: [97, 39]
  145311. },
  145312. bgColor: {
  145313. bgBlack: [40, 49],
  145314. bgRed: [41, 49],
  145315. bgGreen: [42, 49],
  145316. bgYellow: [43, 49],
  145317. bgBlue: [44, 49],
  145318. bgMagenta: [45, 49],
  145319. bgCyan: [46, 49],
  145320. bgWhite: [47, 49],
  145321. bgBlackBright: [100, 49],
  145322. bgRedBright: [101, 49],
  145323. bgGreenBright: [102, 49],
  145324. bgYellowBright: [103, 49],
  145325. bgBlueBright: [104, 49],
  145326. bgMagentaBright: [105, 49],
  145327. bgCyanBright: [106, 49],
  145328. bgWhiteBright: [107, 49]
  145329. }
  145330. };
  145331. styles.color.grey = styles.color.gray;
  145332. for (const groupName of Object.keys(styles)) {
  145333. const group = styles[groupName];
  145334. for (const styleName of Object.keys(group)) {
  145335. const style2 = group[styleName];
  145336. styles[styleName] = {
  145337. open: `\x1B[${style2[0]}m`,
  145338. close: `\x1B[${style2[1]}m`
  145339. };
  145340. group[styleName] = styles[styleName];
  145341. codes.set(style2[0], style2[1]);
  145342. }
  145343. Object.defineProperty(styles, groupName, {
  145344. value: group,
  145345. enumerable: false
  145346. });
  145347. Object.defineProperty(styles, "codes", {
  145348. value: codes,
  145349. enumerable: false
  145350. });
  145351. }
  145352. const ansi2ansi = (n) => n;
  145353. const rgb2rgb = (r, g, b) => [r, g, b];
  145354. styles.color.close = "\x1B[39m";
  145355. styles.bgColor.close = "\x1B[49m";
  145356. styles.color.ansi = {
  145357. ansi: wrapAnsi16(ansi2ansi, 0)
  145358. };
  145359. styles.color.ansi256 = {
  145360. ansi256: wrapAnsi256(ansi2ansi, 0)
  145361. };
  145362. styles.color.ansi16m = {
  145363. rgb: wrapAnsi16m(rgb2rgb, 0)
  145364. };
  145365. styles.bgColor.ansi = {
  145366. ansi: wrapAnsi16(ansi2ansi, 10)
  145367. };
  145368. styles.bgColor.ansi256 = {
  145369. ansi256: wrapAnsi256(ansi2ansi, 10)
  145370. };
  145371. styles.bgColor.ansi16m = {
  145372. rgb: wrapAnsi16m(rgb2rgb, 10)
  145373. };
  145374. for (let key of Object.keys(colorConvert)) {
  145375. if (typeof colorConvert[key] !== "object") {
  145376. continue;
  145377. }
  145378. const suite = colorConvert[key];
  145379. if (key === "ansi16") {
  145380. key = "ansi";
  145381. }
  145382. if ("ansi16" in suite) {
  145383. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  145384. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  145385. }
  145386. if ("ansi256" in suite) {
  145387. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  145388. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  145389. }
  145390. if ("rgb" in suite) {
  145391. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  145392. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  145393. }
  145394. }
  145395. return styles;
  145396. }
  145397. Object.defineProperty(module2, "exports", {
  145398. enumerable: true,
  145399. get: assembleStyles
  145400. });
  145401. }
  145402. });
  145403. // node_modules/@babel/template/node_modules/has-flag/index.js
  145404. var require_has_flag4 = __commonJS({
  145405. "node_modules/@babel/template/node_modules/has-flag/index.js"(exports, module2) {
  145406. "use strict";
  145407. module2.exports = (flag, argv) => {
  145408. argv = argv || process.argv;
  145409. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  145410. const pos = argv.indexOf(prefix + flag);
  145411. const terminatorPos = argv.indexOf("--");
  145412. return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  145413. };
  145414. }
  145415. });
  145416. // node_modules/@babel/template/node_modules/supports-color/index.js
  145417. var require_supports_color4 = __commonJS({
  145418. "node_modules/@babel/template/node_modules/supports-color/index.js"(exports, module2) {
  145419. "use strict";
  145420. var os = require("os");
  145421. var hasFlag = require_has_flag4();
  145422. var env = process.env;
  145423. var forceColor;
  145424. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
  145425. forceColor = false;
  145426. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  145427. forceColor = true;
  145428. }
  145429. if ("FORCE_COLOR" in env) {
  145430. forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  145431. }
  145432. function translateLevel(level) {
  145433. if (level === 0) {
  145434. return false;
  145435. }
  145436. return {
  145437. level,
  145438. hasBasic: true,
  145439. has256: level >= 2,
  145440. has16m: level >= 3
  145441. };
  145442. }
  145443. function supportsColor(stream) {
  145444. if (forceColor === false) {
  145445. return 0;
  145446. }
  145447. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  145448. return 3;
  145449. }
  145450. if (hasFlag("color=256")) {
  145451. return 2;
  145452. }
  145453. if (stream && !stream.isTTY && forceColor !== true) {
  145454. return 0;
  145455. }
  145456. const min = forceColor ? 1 : 0;
  145457. if (process.platform === "win32") {
  145458. const osRelease = os.release().split(".");
  145459. if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  145460. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  145461. }
  145462. return 1;
  145463. }
  145464. if ("CI" in env) {
  145465. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  145466. return 1;
  145467. }
  145468. return min;
  145469. }
  145470. if ("TEAMCITY_VERSION" in env) {
  145471. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  145472. }
  145473. if (env.COLORTERM === "truecolor") {
  145474. return 3;
  145475. }
  145476. if ("TERM_PROGRAM" in env) {
  145477. const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  145478. switch (env.TERM_PROGRAM) {
  145479. case "iTerm.app":
  145480. return version2 >= 3 ? 3 : 2;
  145481. case "Apple_Terminal":
  145482. return 2;
  145483. }
  145484. }
  145485. if (/-256(color)?$/i.test(env.TERM)) {
  145486. return 2;
  145487. }
  145488. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  145489. return 1;
  145490. }
  145491. if ("COLORTERM" in env) {
  145492. return 1;
  145493. }
  145494. if (env.TERM === "dumb") {
  145495. return min;
  145496. }
  145497. return min;
  145498. }
  145499. function getSupportLevel(stream) {
  145500. const level = supportsColor(stream);
  145501. return translateLevel(level);
  145502. }
  145503. module2.exports = {
  145504. supportsColor: getSupportLevel,
  145505. stdout: getSupportLevel(process.stdout),
  145506. stderr: getSupportLevel(process.stderr)
  145507. };
  145508. }
  145509. });
  145510. // node_modules/@babel/template/node_modules/chalk/templates.js
  145511. var require_templates3 = __commonJS({
  145512. "node_modules/@babel/template/node_modules/chalk/templates.js"(exports, module2) {
  145513. "use strict";
  145514. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  145515. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  145516. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  145517. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  145518. var ESCAPES = /* @__PURE__ */ new Map([
  145519. ["n", "\n"],
  145520. ["r", "\r"],
  145521. ["t", " "],
  145522. ["b", "\b"],
  145523. ["f", "\f"],
  145524. ["v", "\v"],
  145525. ["0", "\0"],
  145526. ["\\", "\\"],
  145527. ["e", "\x1B"],
  145528. ["a", "\x07"]
  145529. ]);
  145530. function unescape(c) {
  145531. if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
  145532. return String.fromCharCode(parseInt(c.slice(1), 16));
  145533. }
  145534. return ESCAPES.get(c) || c;
  145535. }
  145536. function parseArguments(name2, args) {
  145537. const results = [];
  145538. const chunks = args.trim().split(/\s*,\s*/g);
  145539. let matches;
  145540. for (const chunk of chunks) {
  145541. if (!isNaN(chunk)) {
  145542. results.push(Number(chunk));
  145543. } else if (matches = chunk.match(STRING_REGEX)) {
  145544. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  145545. } else {
  145546. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
  145547. }
  145548. }
  145549. return results;
  145550. }
  145551. function parseStyle2(style2) {
  145552. STYLE_REGEX.lastIndex = 0;
  145553. const results = [];
  145554. let matches;
  145555. while ((matches = STYLE_REGEX.exec(style2)) !== null) {
  145556. const name2 = matches[1];
  145557. if (matches[2]) {
  145558. const args = parseArguments(name2, matches[2]);
  145559. results.push([name2].concat(args));
  145560. } else {
  145561. results.push([name2]);
  145562. }
  145563. }
  145564. return results;
  145565. }
  145566. function buildStyle(chalk, styles) {
  145567. const enabled = {};
  145568. for (const layer of styles) {
  145569. for (const style2 of layer.styles) {
  145570. enabled[style2[0]] = layer.inverse ? null : style2.slice(1);
  145571. }
  145572. }
  145573. let current2 = chalk;
  145574. for (const styleName of Object.keys(enabled)) {
  145575. if (Array.isArray(enabled[styleName])) {
  145576. if (!(styleName in current2)) {
  145577. throw new Error(`Unknown Chalk style: ${styleName}`);
  145578. }
  145579. if (enabled[styleName].length > 0) {
  145580. current2 = current2[styleName].apply(current2, enabled[styleName]);
  145581. } else {
  145582. current2 = current2[styleName];
  145583. }
  145584. }
  145585. }
  145586. return current2;
  145587. }
  145588. module2.exports = (chalk, tmp) => {
  145589. const styles = [];
  145590. const chunks = [];
  145591. let chunk = [];
  145592. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style2, close, chr) => {
  145593. if (escapeChar) {
  145594. chunk.push(unescape(escapeChar));
  145595. } else if (style2) {
  145596. const str = chunk.join("");
  145597. chunk = [];
  145598. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  145599. styles.push({ inverse, styles: parseStyle2(style2) });
  145600. } else if (close) {
  145601. if (styles.length === 0) {
  145602. throw new Error("Found extraneous } in Chalk template literal");
  145603. }
  145604. chunks.push(buildStyle(chalk, styles)(chunk.join("")));
  145605. chunk = [];
  145606. styles.pop();
  145607. } else {
  145608. chunk.push(chr);
  145609. }
  145610. });
  145611. chunks.push(chunk.join(""));
  145612. if (styles.length > 0) {
  145613. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
  145614. throw new Error(errMsg);
  145615. }
  145616. return chunks.join("");
  145617. };
  145618. }
  145619. });
  145620. // node_modules/@babel/template/node_modules/chalk/index.js
  145621. var require_chalk3 = __commonJS({
  145622. "node_modules/@babel/template/node_modules/chalk/index.js"(exports, module2) {
  145623. "use strict";
  145624. var escapeStringRegexp = require_escape_string_regexp();
  145625. var ansiStyles = require_ansi_styles3();
  145626. var stdoutColor = require_supports_color4().stdout;
  145627. var template = require_templates3();
  145628. var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
  145629. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  145630. var skipModels = /* @__PURE__ */ new Set(["gray"]);
  145631. var styles = /* @__PURE__ */ Object.create(null);
  145632. function applyOptions(obj, options) {
  145633. options = options || {};
  145634. const scLevel = stdoutColor ? stdoutColor.level : 0;
  145635. obj.level = options.level === void 0 ? scLevel : options.level;
  145636. obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
  145637. }
  145638. function Chalk(options) {
  145639. if (!this || !(this instanceof Chalk) || this.template) {
  145640. const chalk = {};
  145641. applyOptions(chalk, options);
  145642. chalk.template = function() {
  145643. const args = [].slice.call(arguments);
  145644. return chalkTag.apply(null, [chalk.template].concat(args));
  145645. };
  145646. Object.setPrototypeOf(chalk, Chalk.prototype);
  145647. Object.setPrototypeOf(chalk.template, chalk);
  145648. chalk.template.constructor = Chalk;
  145649. return chalk.template;
  145650. }
  145651. applyOptions(this, options);
  145652. }
  145653. if (isSimpleWindowsTerm) {
  145654. ansiStyles.blue.open = "\x1B[94m";
  145655. }
  145656. for (const key of Object.keys(ansiStyles)) {
  145657. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
  145658. styles[key] = {
  145659. get() {
  145660. const codes = ansiStyles[key];
  145661. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  145662. }
  145663. };
  145664. }
  145665. styles.visible = {
  145666. get() {
  145667. return build.call(this, this._styles || [], true, "visible");
  145668. }
  145669. };
  145670. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
  145671. for (const model of Object.keys(ansiStyles.color.ansi)) {
  145672. if (skipModels.has(model)) {
  145673. continue;
  145674. }
  145675. styles[model] = {
  145676. get() {
  145677. const level = this.level;
  145678. return function() {
  145679. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  145680. const codes = {
  145681. open,
  145682. close: ansiStyles.color.close,
  145683. closeRe: ansiStyles.color.closeRe
  145684. };
  145685. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  145686. };
  145687. }
  145688. };
  145689. }
  145690. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
  145691. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  145692. if (skipModels.has(model)) {
  145693. continue;
  145694. }
  145695. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  145696. styles[bgModel] = {
  145697. get() {
  145698. const level = this.level;
  145699. return function() {
  145700. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  145701. const codes = {
  145702. open,
  145703. close: ansiStyles.bgColor.close,
  145704. closeRe: ansiStyles.bgColor.closeRe
  145705. };
  145706. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  145707. };
  145708. }
  145709. };
  145710. }
  145711. var proto = Object.defineProperties(() => {
  145712. }, styles);
  145713. function build(_styles, _empty, key) {
  145714. const builder = function() {
  145715. return applyStyle.apply(builder, arguments);
  145716. };
  145717. builder._styles = _styles;
  145718. builder._empty = _empty;
  145719. const self2 = this;
  145720. Object.defineProperty(builder, "level", {
  145721. enumerable: true,
  145722. get() {
  145723. return self2.level;
  145724. },
  145725. set(level) {
  145726. self2.level = level;
  145727. }
  145728. });
  145729. Object.defineProperty(builder, "enabled", {
  145730. enumerable: true,
  145731. get() {
  145732. return self2.enabled;
  145733. },
  145734. set(enabled) {
  145735. self2.enabled = enabled;
  145736. }
  145737. });
  145738. builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
  145739. builder.__proto__ = proto;
  145740. return builder;
  145741. }
  145742. function applyStyle() {
  145743. const args = arguments;
  145744. const argsLen = args.length;
  145745. let str = String(arguments[0]);
  145746. if (argsLen === 0) {
  145747. return "";
  145748. }
  145749. if (argsLen > 1) {
  145750. for (let a = 1; a < argsLen; a++) {
  145751. str += " " + args[a];
  145752. }
  145753. }
  145754. if (!this.enabled || this.level <= 0 || !str) {
  145755. return this._empty ? "" : str;
  145756. }
  145757. const originalDim = ansiStyles.dim.open;
  145758. if (isSimpleWindowsTerm && this.hasGrey) {
  145759. ansiStyles.dim.open = "";
  145760. }
  145761. for (const code2 of this._styles.slice().reverse()) {
  145762. str = code2.open + str.replace(code2.closeRe, code2.open) + code2.close;
  145763. str = str.replace(/\r?\n/g, `${code2.close}$&${code2.open}`);
  145764. }
  145765. ansiStyles.dim.open = originalDim;
  145766. return str;
  145767. }
  145768. function chalkTag(chalk, strings) {
  145769. if (!Array.isArray(strings)) {
  145770. return [].slice.call(arguments, 1).join(" ");
  145771. }
  145772. const args = [].slice.call(arguments, 2);
  145773. const parts = [strings.raw[0]];
  145774. for (let i = 1; i < strings.length; i++) {
  145775. parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
  145776. parts.push(String(strings.raw[i]));
  145777. }
  145778. return template(chalk, parts.join(""));
  145779. }
  145780. Object.defineProperties(Chalk.prototype, styles);
  145781. module2.exports = Chalk();
  145782. module2.exports.supportsColor = stdoutColor;
  145783. module2.exports.default = module2.exports;
  145784. }
  145785. });
  145786. // node_modules/@babel/template/node_modules/@babel/highlight/lib/index.js
  145787. var require_lib32 = __commonJS({
  145788. "node_modules/@babel/template/node_modules/@babel/highlight/lib/index.js"(exports) {
  145789. "use strict";
  145790. Object.defineProperty(exports, "__esModule", {
  145791. value: true
  145792. });
  145793. exports.shouldHighlight = shouldHighlight;
  145794. exports.getChalk = getChalk;
  145795. exports.default = highlight;
  145796. var _jsTokens = require_js_tokens();
  145797. var _helperValidatorIdentifier = require_lib29();
  145798. var _chalk = require_chalk3();
  145799. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  145800. function getDefs(chalk) {
  145801. return {
  145802. keyword: chalk.cyan,
  145803. capitalized: chalk.yellow,
  145804. jsxIdentifier: chalk.yellow,
  145805. punctuator: chalk.yellow,
  145806. number: chalk.magenta,
  145807. string: chalk.green,
  145808. regex: chalk.magenta,
  145809. comment: chalk.grey,
  145810. invalid: chalk.white.bgRed.bold
  145811. };
  145812. }
  145813. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  145814. var BRACKET = /^[()[\]{}]$/;
  145815. var tokenize;
  145816. {
  145817. const JSX_TAG = /^[a-z][\w-]*$/i;
  145818. const getTokenType = function(token, offset2, text5) {
  145819. if (token.type === "name") {
  145820. if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
  145821. return "keyword";
  145822. }
  145823. if (JSX_TAG.test(token.value) && (text5[offset2 - 1] === "<" || text5.substr(offset2 - 2, 2) == "</")) {
  145824. return "jsxIdentifier";
  145825. }
  145826. if (token.value[0] !== token.value[0].toLowerCase()) {
  145827. return "capitalized";
  145828. }
  145829. }
  145830. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  145831. return "bracket";
  145832. }
  145833. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  145834. return "punctuator";
  145835. }
  145836. return token.type;
  145837. };
  145838. tokenize = function* (text5) {
  145839. let match;
  145840. while (match = _jsTokens.default.exec(text5)) {
  145841. const token = _jsTokens.matchToToken(match);
  145842. yield {
  145843. type: getTokenType(token, match.index, text5),
  145844. value: token.value
  145845. };
  145846. }
  145847. };
  145848. }
  145849. function highlightTokens(defs, text5) {
  145850. let highlighted = "";
  145851. for (const {
  145852. type,
  145853. value
  145854. } of tokenize(text5)) {
  145855. const colorize = defs[type];
  145856. if (colorize) {
  145857. highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
  145858. } else {
  145859. highlighted += value;
  145860. }
  145861. }
  145862. return highlighted;
  145863. }
  145864. function shouldHighlight(options) {
  145865. return !!_chalk.supportsColor || options.forceColor;
  145866. }
  145867. function getChalk(options) {
  145868. return options.forceColor ? new _chalk.constructor({
  145869. enabled: true,
  145870. level: 1
  145871. }) : _chalk;
  145872. }
  145873. function highlight(code2, options = {}) {
  145874. if (shouldHighlight(options)) {
  145875. const chalk = getChalk(options);
  145876. const defs = getDefs(chalk);
  145877. return highlightTokens(defs, code2);
  145878. } else {
  145879. return code2;
  145880. }
  145881. }
  145882. }
  145883. });
  145884. // node_modules/@babel/template/node_modules/@babel/code-frame/lib/index.js
  145885. var require_lib33 = __commonJS({
  145886. "node_modules/@babel/template/node_modules/@babel/code-frame/lib/index.js"(exports) {
  145887. "use strict";
  145888. Object.defineProperty(exports, "__esModule", {
  145889. value: true
  145890. });
  145891. exports.codeFrameColumns = codeFrameColumns;
  145892. exports.default = _default;
  145893. var _highlight = require_lib32();
  145894. var deprecationWarningShown = false;
  145895. function getDefs(chalk) {
  145896. return {
  145897. gutter: chalk.grey,
  145898. marker: chalk.red.bold,
  145899. message: chalk.red.bold
  145900. };
  145901. }
  145902. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  145903. function getMarkerLines(loc, source, opts) {
  145904. const startLoc = Object.assign({
  145905. column: 0,
  145906. line: -1
  145907. }, loc.start);
  145908. const endLoc = Object.assign({}, startLoc, loc.end);
  145909. const {
  145910. linesAbove = 2,
  145911. linesBelow = 3
  145912. } = opts || {};
  145913. const startLine = startLoc.line;
  145914. const startColumn = startLoc.column;
  145915. const endLine = endLoc.line;
  145916. const endColumn = endLoc.column;
  145917. let start3 = Math.max(startLine - (linesAbove + 1), 0);
  145918. let end = Math.min(source.length, endLine + linesBelow);
  145919. if (startLine === -1) {
  145920. start3 = 0;
  145921. }
  145922. if (endLine === -1) {
  145923. end = source.length;
  145924. }
  145925. const lineDiff = endLine - startLine;
  145926. const markerLines = {};
  145927. if (lineDiff) {
  145928. for (let i = 0; i <= lineDiff; i++) {
  145929. const lineNumber = i + startLine;
  145930. if (!startColumn) {
  145931. markerLines[lineNumber] = true;
  145932. } else if (i === 0) {
  145933. const sourceLength = source[lineNumber - 1].length;
  145934. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  145935. } else if (i === lineDiff) {
  145936. markerLines[lineNumber] = [0, endColumn];
  145937. } else {
  145938. const sourceLength = source[lineNumber - i].length;
  145939. markerLines[lineNumber] = [0, sourceLength];
  145940. }
  145941. }
  145942. } else {
  145943. if (startColumn === endColumn) {
  145944. if (startColumn) {
  145945. markerLines[startLine] = [startColumn, 0];
  145946. } else {
  145947. markerLines[startLine] = true;
  145948. }
  145949. } else {
  145950. markerLines[startLine] = [startColumn, endColumn - startColumn];
  145951. }
  145952. }
  145953. return {
  145954. start: start3,
  145955. end,
  145956. markerLines
  145957. };
  145958. }
  145959. function codeFrameColumns(rawLines, loc, opts = {}) {
  145960. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  145961. const chalk = (0, _highlight.getChalk)(opts);
  145962. const defs = getDefs(chalk);
  145963. const maybeHighlight = (chalkFn, string3) => {
  145964. return highlighted ? chalkFn(string3) : string3;
  145965. };
  145966. const lines = rawLines.split(NEWLINE);
  145967. const {
  145968. start: start3,
  145969. end,
  145970. markerLines
  145971. } = getMarkerLines(loc, lines, opts);
  145972. const hasColumns = loc.start && typeof loc.start.column === "number";
  145973. const numberMaxWidth = String(end).length;
  145974. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  145975. let frame = highlightedLines.split(NEWLINE).slice(start3, end).map((line, index2) => {
  145976. const number2 = start3 + 1 + index2;
  145977. const paddedNumber = ` ${number2}`.slice(-numberMaxWidth);
  145978. const gutter = ` ${paddedNumber} |`;
  145979. const hasMarker = markerLines[number2];
  145980. const lastMarkerLine = !markerLines[number2 + 1];
  145981. if (hasMarker) {
  145982. let markerLine = "";
  145983. if (Array.isArray(hasMarker)) {
  145984. const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  145985. const numberOfMarkers = hasMarker[1] || 1;
  145986. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  145987. if (lastMarkerLine && opts.message) {
  145988. markerLine += " " + maybeHighlight(defs.message, opts.message);
  145989. }
  145990. }
  145991. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
  145992. } else {
  145993. return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
  145994. }
  145995. }).join("\n");
  145996. if (opts.message && !hasColumns) {
  145997. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  145998. ${frame}`;
  145999. }
  146000. if (highlighted) {
  146001. return chalk.reset(frame);
  146002. } else {
  146003. return frame;
  146004. }
  146005. }
  146006. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  146007. if (!deprecationWarningShown) {
  146008. deprecationWarningShown = true;
  146009. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  146010. if (process.emitWarning) {
  146011. process.emitWarning(message, "DeprecationWarning");
  146012. } else {
  146013. const deprecationError = new Error(message);
  146014. deprecationError.name = "DeprecationWarning";
  146015. console.warn(new Error(message));
  146016. }
  146017. }
  146018. colNumber = Math.max(colNumber, 0);
  146019. const location = {
  146020. start: {
  146021. column: colNumber,
  146022. line: lineNumber
  146023. }
  146024. };
  146025. return codeFrameColumns(rawLines, location, opts);
  146026. }
  146027. }
  146028. });
  146029. // node_modules/@babel/template/lib/parse.js
  146030. var require_parse2 = __commonJS({
  146031. "node_modules/@babel/template/lib/parse.js"(exports) {
  146032. "use strict";
  146033. Object.defineProperty(exports, "__esModule", {
  146034. value: true
  146035. });
  146036. exports.default = parseAndBuildMetadata;
  146037. var t2 = require_lib30();
  146038. var _parser = require_lib31();
  146039. var _codeFrame = require_lib33();
  146040. var PATTERN = /^[_$A-Z0-9]+$/;
  146041. function parseAndBuildMetadata(formatter, code2, opts) {
  146042. const {
  146043. placeholderWhitelist,
  146044. placeholderPattern,
  146045. preserveComments,
  146046. syntacticPlaceholders
  146047. } = opts;
  146048. const ast = parseWithCodeFrame(code2, opts.parser, syntacticPlaceholders);
  146049. t2.removePropertiesDeep(ast, {
  146050. preserveComments
  146051. });
  146052. formatter.validate(ast);
  146053. const syntactic = {
  146054. placeholders: [],
  146055. placeholderNames: /* @__PURE__ */ new Set()
  146056. };
  146057. const legacy = {
  146058. placeholders: [],
  146059. placeholderNames: /* @__PURE__ */ new Set()
  146060. };
  146061. const isLegacyRef = {
  146062. value: void 0
  146063. };
  146064. t2.traverse(ast, placeholderVisitorHandler, {
  146065. syntactic,
  146066. legacy,
  146067. isLegacyRef,
  146068. placeholderWhitelist,
  146069. placeholderPattern,
  146070. syntacticPlaceholders
  146071. });
  146072. return Object.assign({
  146073. ast
  146074. }, isLegacyRef.value ? legacy : syntactic);
  146075. }
  146076. function placeholderVisitorHandler(node, ancestors, state) {
  146077. var _state$placeholderWhi;
  146078. let name2;
  146079. if (t2.isPlaceholder(node)) {
  146080. if (state.syntacticPlaceholders === false) {
  146081. throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");
  146082. } else {
  146083. name2 = node.name.name;
  146084. state.isLegacyRef.value = false;
  146085. }
  146086. } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
  146087. return;
  146088. } else if (t2.isIdentifier(node) || t2.isJSXIdentifier(node)) {
  146089. name2 = node.name;
  146090. state.isLegacyRef.value = true;
  146091. } else if (t2.isStringLiteral(node)) {
  146092. name2 = node.value;
  146093. state.isLegacyRef.value = true;
  146094. } else {
  146095. return;
  146096. }
  146097. if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
  146098. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  146099. }
  146100. if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name2)) && !((_state$placeholderWhi = state.placeholderWhitelist) != null && _state$placeholderWhi.has(name2))) {
  146101. return;
  146102. }
  146103. ancestors = ancestors.slice();
  146104. const {
  146105. node: parent,
  146106. key
  146107. } = ancestors[ancestors.length - 1];
  146108. let type;
  146109. if (t2.isStringLiteral(node) || t2.isPlaceholder(node, {
  146110. expectedNode: "StringLiteral"
  146111. })) {
  146112. type = "string";
  146113. } else if (t2.isNewExpression(parent) && key === "arguments" || t2.isCallExpression(parent) && key === "arguments" || t2.isFunction(parent) && key === "params") {
  146114. type = "param";
  146115. } else if (t2.isExpressionStatement(parent) && !t2.isPlaceholder(node)) {
  146116. type = "statement";
  146117. ancestors = ancestors.slice(0, -1);
  146118. } else if (t2.isStatement(node) && t2.isPlaceholder(node)) {
  146119. type = "statement";
  146120. } else {
  146121. type = "other";
  146122. }
  146123. const {
  146124. placeholders,
  146125. placeholderNames
  146126. } = state.isLegacyRef.value ? state.legacy : state.syntactic;
  146127. placeholders.push({
  146128. name: name2,
  146129. type,
  146130. resolve: (ast) => resolveAncestors(ast, ancestors),
  146131. isDuplicate: placeholderNames.has(name2)
  146132. });
  146133. placeholderNames.add(name2);
  146134. }
  146135. function resolveAncestors(ast, ancestors) {
  146136. let parent = ast;
  146137. for (let i = 0; i < ancestors.length - 1; i++) {
  146138. const {
  146139. key: key2,
  146140. index: index3
  146141. } = ancestors[i];
  146142. if (index3 === void 0) {
  146143. parent = parent[key2];
  146144. } else {
  146145. parent = parent[key2][index3];
  146146. }
  146147. }
  146148. const {
  146149. key,
  146150. index: index2
  146151. } = ancestors[ancestors.length - 1];
  146152. return {
  146153. parent,
  146154. key,
  146155. index: index2
  146156. };
  146157. }
  146158. function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
  146159. const plugins = (parserOpts.plugins || []).slice();
  146160. if (syntacticPlaceholders !== false) {
  146161. plugins.push("placeholders");
  146162. }
  146163. parserOpts = Object.assign({
  146164. allowReturnOutsideFunction: true,
  146165. allowSuperOutsideMethod: true,
  146166. sourceType: "module"
  146167. }, parserOpts, {
  146168. plugins
  146169. });
  146170. try {
  146171. return (0, _parser.parse)(code2, parserOpts);
  146172. } catch (err) {
  146173. const loc = err.loc;
  146174. if (loc) {
  146175. err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code2, {
  146176. start: loc
  146177. });
  146178. err.code = "BABEL_TEMPLATE_PARSE_ERROR";
  146179. }
  146180. throw err;
  146181. }
  146182. }
  146183. }
  146184. });
  146185. // node_modules/@babel/template/lib/populate.js
  146186. var require_populate2 = __commonJS({
  146187. "node_modules/@babel/template/lib/populate.js"(exports) {
  146188. "use strict";
  146189. Object.defineProperty(exports, "__esModule", {
  146190. value: true
  146191. });
  146192. exports.default = populatePlaceholders;
  146193. var t2 = require_lib30();
  146194. function populatePlaceholders(metadata, replacements) {
  146195. const ast = t2.cloneNode(metadata.ast);
  146196. if (replacements) {
  146197. metadata.placeholders.forEach((placeholder) => {
  146198. if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
  146199. const placeholderName = placeholder.name;
  146200. throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
  146201. placeholder you may want to consider passing one of the following options to @babel/template:
  146202. - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
  146203. - { placeholderPattern: /^${placeholderName}$/ }`);
  146204. }
  146205. });
  146206. Object.keys(replacements).forEach((key) => {
  146207. if (!metadata.placeholderNames.has(key)) {
  146208. throw new Error(`Unknown substitution "${key}" given`);
  146209. }
  146210. });
  146211. }
  146212. metadata.placeholders.slice().reverse().forEach((placeholder) => {
  146213. try {
  146214. applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
  146215. } catch (e) {
  146216. e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
  146217. throw e;
  146218. }
  146219. });
  146220. return ast;
  146221. }
  146222. function applyReplacement(placeholder, ast, replacement) {
  146223. if (placeholder.isDuplicate) {
  146224. if (Array.isArray(replacement)) {
  146225. replacement = replacement.map((node) => t2.cloneNode(node));
  146226. } else if (typeof replacement === "object") {
  146227. replacement = t2.cloneNode(replacement);
  146228. }
  146229. }
  146230. const {
  146231. parent,
  146232. key,
  146233. index: index2
  146234. } = placeholder.resolve(ast);
  146235. if (placeholder.type === "string") {
  146236. if (typeof replacement === "string") {
  146237. replacement = t2.stringLiteral(replacement);
  146238. }
  146239. if (!replacement || !t2.isStringLiteral(replacement)) {
  146240. throw new Error("Expected string substitution");
  146241. }
  146242. } else if (placeholder.type === "statement") {
  146243. if (index2 === void 0) {
  146244. if (!replacement) {
  146245. replacement = t2.emptyStatement();
  146246. } else if (Array.isArray(replacement)) {
  146247. replacement = t2.blockStatement(replacement);
  146248. } else if (typeof replacement === "string") {
  146249. replacement = t2.expressionStatement(t2.identifier(replacement));
  146250. } else if (!t2.isStatement(replacement)) {
  146251. replacement = t2.expressionStatement(replacement);
  146252. }
  146253. } else {
  146254. if (replacement && !Array.isArray(replacement)) {
  146255. if (typeof replacement === "string") {
  146256. replacement = t2.identifier(replacement);
  146257. }
  146258. if (!t2.isStatement(replacement)) {
  146259. replacement = t2.expressionStatement(replacement);
  146260. }
  146261. }
  146262. }
  146263. } else if (placeholder.type === "param") {
  146264. if (typeof replacement === "string") {
  146265. replacement = t2.identifier(replacement);
  146266. }
  146267. if (index2 === void 0)
  146268. throw new Error("Assertion failure.");
  146269. } else {
  146270. if (typeof replacement === "string") {
  146271. replacement = t2.identifier(replacement);
  146272. }
  146273. if (Array.isArray(replacement)) {
  146274. throw new Error("Cannot replace single expression with an array.");
  146275. }
  146276. }
  146277. if (index2 === void 0) {
  146278. t2.validate(parent, key, replacement);
  146279. parent[key] = replacement;
  146280. } else {
  146281. const items = parent[key].slice();
  146282. if (placeholder.type === "statement" || placeholder.type === "param") {
  146283. if (replacement == null) {
  146284. items.splice(index2, 1);
  146285. } else if (Array.isArray(replacement)) {
  146286. items.splice(index2, 1, ...replacement);
  146287. } else {
  146288. items[index2] = replacement;
  146289. }
  146290. } else {
  146291. items[index2] = replacement;
  146292. }
  146293. t2.validate(parent, key, items);
  146294. parent[key] = items;
  146295. }
  146296. }
  146297. }
  146298. });
  146299. // node_modules/@babel/template/lib/string.js
  146300. var require_string2 = __commonJS({
  146301. "node_modules/@babel/template/lib/string.js"(exports) {
  146302. "use strict";
  146303. Object.defineProperty(exports, "__esModule", {
  146304. value: true
  146305. });
  146306. exports.default = stringTemplate;
  146307. var _options = require_options2();
  146308. var _parse = require_parse2();
  146309. var _populate = require_populate2();
  146310. function stringTemplate(formatter, code2, opts) {
  146311. code2 = formatter.code(code2);
  146312. let metadata;
  146313. return (arg) => {
  146314. const replacements = (0, _options.normalizeReplacements)(arg);
  146315. if (!metadata)
  146316. metadata = (0, _parse.default)(formatter, code2, opts);
  146317. return formatter.unwrap((0, _populate.default)(metadata, replacements));
  146318. };
  146319. }
  146320. }
  146321. });
  146322. // node_modules/@babel/template/lib/literal.js
  146323. var require_literal2 = __commonJS({
  146324. "node_modules/@babel/template/lib/literal.js"(exports) {
  146325. "use strict";
  146326. Object.defineProperty(exports, "__esModule", {
  146327. value: true
  146328. });
  146329. exports.default = literalTemplate;
  146330. var _options = require_options2();
  146331. var _parse = require_parse2();
  146332. var _populate = require_populate2();
  146333. function literalTemplate(formatter, tpl, opts) {
  146334. const {
  146335. metadata,
  146336. names
  146337. } = buildLiteralData(formatter, tpl, opts);
  146338. return (arg) => {
  146339. const defaultReplacements = {};
  146340. arg.forEach((replacement, i) => {
  146341. defaultReplacements[names[i]] = replacement;
  146342. });
  146343. return (arg2) => {
  146344. const replacements = (0, _options.normalizeReplacements)(arg2);
  146345. if (replacements) {
  146346. Object.keys(replacements).forEach((key) => {
  146347. if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
  146348. throw new Error("Unexpected replacement overlap.");
  146349. }
  146350. });
  146351. }
  146352. return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
  146353. };
  146354. };
  146355. }
  146356. function buildLiteralData(formatter, tpl, opts) {
  146357. let names;
  146358. let nameSet;
  146359. let metadata;
  146360. let prefix = "";
  146361. do {
  146362. prefix += "$";
  146363. const result = buildTemplateCode(tpl, prefix);
  146364. names = result.names;
  146365. nameSet = new Set(names);
  146366. metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
  146367. parser: opts.parser,
  146368. placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
  146369. placeholderPattern: opts.placeholderPattern,
  146370. preserveComments: opts.preserveComments,
  146371. syntacticPlaceholders: opts.syntacticPlaceholders
  146372. });
  146373. } while (metadata.placeholders.some((placeholder) => placeholder.isDuplicate && nameSet.has(placeholder.name)));
  146374. return {
  146375. metadata,
  146376. names
  146377. };
  146378. }
  146379. function buildTemplateCode(tpl, prefix) {
  146380. const names = [];
  146381. let code2 = tpl[0];
  146382. for (let i = 1; i < tpl.length; i++) {
  146383. const value = `${prefix}${i - 1}`;
  146384. names.push(value);
  146385. code2 += value + tpl[i];
  146386. }
  146387. return {
  146388. names,
  146389. code: code2
  146390. };
  146391. }
  146392. }
  146393. });
  146394. // node_modules/@babel/template/lib/builder.js
  146395. var require_builder8 = __commonJS({
  146396. "node_modules/@babel/template/lib/builder.js"(exports) {
  146397. "use strict";
  146398. Object.defineProperty(exports, "__esModule", {
  146399. value: true
  146400. });
  146401. exports.default = createTemplateBuilder;
  146402. var _options = require_options2();
  146403. var _string = require_string2();
  146404. var _literal = require_literal2();
  146405. var NO_PLACEHOLDER = (0, _options.validate)({
  146406. placeholderPattern: false
  146407. });
  146408. function createTemplateBuilder(formatter, defaultOpts) {
  146409. const templateFnCache = /* @__PURE__ */ new WeakMap();
  146410. const templateAstCache = /* @__PURE__ */ new WeakMap();
  146411. const cachedOpts = defaultOpts || (0, _options.validate)(null);
  146412. return Object.assign((tpl, ...args) => {
  146413. if (typeof tpl === "string") {
  146414. if (args.length > 1)
  146415. throw new Error("Unexpected extra params.");
  146416. return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
  146417. } else if (Array.isArray(tpl)) {
  146418. let builder = templateFnCache.get(tpl);
  146419. if (!builder) {
  146420. builder = (0, _literal.default)(formatter, tpl, cachedOpts);
  146421. templateFnCache.set(tpl, builder);
  146422. }
  146423. return extendedTrace(builder(args));
  146424. } else if (typeof tpl === "object" && tpl) {
  146425. if (args.length > 0)
  146426. throw new Error("Unexpected extra params.");
  146427. return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
  146428. }
  146429. throw new Error(`Unexpected template param ${typeof tpl}`);
  146430. }, {
  146431. ast: (tpl, ...args) => {
  146432. if (typeof tpl === "string") {
  146433. if (args.length > 1)
  146434. throw new Error("Unexpected extra params.");
  146435. return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
  146436. } else if (Array.isArray(tpl)) {
  146437. let builder = templateAstCache.get(tpl);
  146438. if (!builder) {
  146439. builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
  146440. templateAstCache.set(tpl, builder);
  146441. }
  146442. return builder(args)();
  146443. }
  146444. throw new Error(`Unexpected template param ${typeof tpl}`);
  146445. }
  146446. });
  146447. }
  146448. function extendedTrace(fn) {
  146449. let rootStack = "";
  146450. try {
  146451. throw new Error();
  146452. } catch (error) {
  146453. if (error.stack) {
  146454. rootStack = error.stack.split("\n").slice(3).join("\n");
  146455. }
  146456. }
  146457. return (arg) => {
  146458. try {
  146459. return fn(arg);
  146460. } catch (err) {
  146461. err.stack += `
  146462. =============
  146463. ${rootStack}`;
  146464. throw err;
  146465. }
  146466. };
  146467. }
  146468. }
  146469. });
  146470. // node_modules/@babel/template/lib/index.js
  146471. var require_lib34 = __commonJS({
  146472. "node_modules/@babel/template/lib/index.js"(exports) {
  146473. "use strict";
  146474. Object.defineProperty(exports, "__esModule", {
  146475. value: true
  146476. });
  146477. exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0;
  146478. var formatters = require_formatters2();
  146479. var _builder = require_builder8();
  146480. var smart = (0, _builder.default)(formatters.smart);
  146481. exports.smart = smart;
  146482. var statement = (0, _builder.default)(formatters.statement);
  146483. exports.statement = statement;
  146484. var statements = (0, _builder.default)(formatters.statements);
  146485. exports.statements = statements;
  146486. var expression = (0, _builder.default)(formatters.expression);
  146487. exports.expression = expression;
  146488. var program = (0, _builder.default)(formatters.program);
  146489. exports.program = program;
  146490. var _default = Object.assign(smart.bind(void 0), {
  146491. smart,
  146492. statement,
  146493. statements,
  146494. expression,
  146495. program,
  146496. ast: smart.ast
  146497. });
  146498. exports.default = _default;
  146499. }
  146500. });
  146501. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/shallowEqual.js
  146502. var require_shallowEqual7 = __commonJS({
  146503. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  146504. "use strict";
  146505. Object.defineProperty(exports, "__esModule", {
  146506. value: true
  146507. });
  146508. exports.default = shallowEqual;
  146509. function shallowEqual(actual, expected) {
  146510. const keys2 = Object.keys(expected);
  146511. for (const key of keys2) {
  146512. if (actual[key] !== expected[key]) {
  146513. return false;
  146514. }
  146515. }
  146516. return true;
  146517. }
  146518. }
  146519. });
  146520. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/generated/index.js
  146521. var require_generated31 = __commonJS({
  146522. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  146523. "use strict";
  146524. Object.defineProperty(exports, "__esModule", {
  146525. value: true
  146526. });
  146527. exports.isArrayExpression = isArrayExpression;
  146528. exports.isAssignmentExpression = isAssignmentExpression;
  146529. exports.isBinaryExpression = isBinaryExpression;
  146530. exports.isInterpreterDirective = isInterpreterDirective;
  146531. exports.isDirective = isDirective;
  146532. exports.isDirectiveLiteral = isDirectiveLiteral;
  146533. exports.isBlockStatement = isBlockStatement;
  146534. exports.isBreakStatement = isBreakStatement;
  146535. exports.isCallExpression = isCallExpression;
  146536. exports.isCatchClause = isCatchClause;
  146537. exports.isConditionalExpression = isConditionalExpression;
  146538. exports.isContinueStatement = isContinueStatement;
  146539. exports.isDebuggerStatement = isDebuggerStatement;
  146540. exports.isDoWhileStatement = isDoWhileStatement;
  146541. exports.isEmptyStatement = isEmptyStatement;
  146542. exports.isExpressionStatement = isExpressionStatement2;
  146543. exports.isFile = isFile;
  146544. exports.isForInStatement = isForInStatement;
  146545. exports.isForStatement = isForStatement;
  146546. exports.isFunctionDeclaration = isFunctionDeclaration;
  146547. exports.isFunctionExpression = isFunctionExpression;
  146548. exports.isIdentifier = isIdentifier2;
  146549. exports.isIfStatement = isIfStatement;
  146550. exports.isLabeledStatement = isLabeledStatement;
  146551. exports.isStringLiteral = isStringLiteral2;
  146552. exports.isNumericLiteral = isNumericLiteral;
  146553. exports.isNullLiteral = isNullLiteral;
  146554. exports.isBooleanLiteral = isBooleanLiteral2;
  146555. exports.isRegExpLiteral = isRegExpLiteral;
  146556. exports.isLogicalExpression = isLogicalExpression;
  146557. exports.isMemberExpression = isMemberExpression;
  146558. exports.isNewExpression = isNewExpression;
  146559. exports.isProgram = isProgram;
  146560. exports.isObjectExpression = isObjectExpression;
  146561. exports.isObjectMethod = isObjectMethod;
  146562. exports.isObjectProperty = isObjectProperty;
  146563. exports.isRestElement = isRestElement;
  146564. exports.isReturnStatement = isReturnStatement;
  146565. exports.isSequenceExpression = isSequenceExpression;
  146566. exports.isParenthesizedExpression = isParenthesizedExpression;
  146567. exports.isSwitchCase = isSwitchCase;
  146568. exports.isSwitchStatement = isSwitchStatement;
  146569. exports.isThisExpression = isThisExpression;
  146570. exports.isThrowStatement = isThrowStatement;
  146571. exports.isTryStatement = isTryStatement;
  146572. exports.isUnaryExpression = isUnaryExpression;
  146573. exports.isUpdateExpression = isUpdateExpression;
  146574. exports.isVariableDeclaration = isVariableDeclaration;
  146575. exports.isVariableDeclarator = isVariableDeclarator;
  146576. exports.isWhileStatement = isWhileStatement;
  146577. exports.isWithStatement = isWithStatement;
  146578. exports.isAssignmentPattern = isAssignmentPattern;
  146579. exports.isArrayPattern = isArrayPattern;
  146580. exports.isArrowFunctionExpression = isArrowFunctionExpression;
  146581. exports.isClassBody = isClassBody;
  146582. exports.isClassExpression = isClassExpression;
  146583. exports.isClassDeclaration = isClassDeclaration;
  146584. exports.isExportAllDeclaration = isExportAllDeclaration;
  146585. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  146586. exports.isExportNamedDeclaration = isExportNamedDeclaration;
  146587. exports.isExportSpecifier = isExportSpecifier;
  146588. exports.isForOfStatement = isForOfStatement;
  146589. exports.isImportDeclaration = isImportDeclaration;
  146590. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  146591. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  146592. exports.isImportSpecifier = isImportSpecifier;
  146593. exports.isMetaProperty = isMetaProperty;
  146594. exports.isClassMethod = isClassMethod;
  146595. exports.isObjectPattern = isObjectPattern;
  146596. exports.isSpreadElement = isSpreadElement;
  146597. exports.isSuper = isSuper;
  146598. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  146599. exports.isTemplateElement = isTemplateElement;
  146600. exports.isTemplateLiteral = isTemplateLiteral;
  146601. exports.isYieldExpression = isYieldExpression;
  146602. exports.isAwaitExpression = isAwaitExpression;
  146603. exports.isImport = isImport;
  146604. exports.isBigIntLiteral = isBigIntLiteral;
  146605. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  146606. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  146607. exports.isOptionalCallExpression = isOptionalCallExpression;
  146608. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  146609. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  146610. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  146611. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  146612. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  146613. exports.isClassImplements = isClassImplements;
  146614. exports.isDeclareClass = isDeclareClass;
  146615. exports.isDeclareFunction = isDeclareFunction;
  146616. exports.isDeclareInterface = isDeclareInterface;
  146617. exports.isDeclareModule = isDeclareModule;
  146618. exports.isDeclareModuleExports = isDeclareModuleExports;
  146619. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  146620. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  146621. exports.isDeclareVariable = isDeclareVariable;
  146622. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  146623. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  146624. exports.isDeclaredPredicate = isDeclaredPredicate;
  146625. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  146626. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  146627. exports.isFunctionTypeParam = isFunctionTypeParam;
  146628. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  146629. exports.isInferredPredicate = isInferredPredicate;
  146630. exports.isInterfaceExtends = isInterfaceExtends;
  146631. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  146632. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  146633. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  146634. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  146635. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  146636. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  146637. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  146638. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  146639. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  146640. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  146641. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  146642. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  146643. exports.isObjectTypeProperty = isObjectTypeProperty;
  146644. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  146645. exports.isOpaqueType = isOpaqueType;
  146646. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  146647. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  146648. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  146649. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  146650. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  146651. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  146652. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  146653. exports.isTypeAlias = isTypeAlias;
  146654. exports.isTypeAnnotation = isTypeAnnotation;
  146655. exports.isTypeCastExpression = isTypeCastExpression;
  146656. exports.isTypeParameter = isTypeParameter;
  146657. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  146658. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  146659. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  146660. exports.isVariance = isVariance;
  146661. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  146662. exports.isEnumDeclaration = isEnumDeclaration;
  146663. exports.isEnumBooleanBody = isEnumBooleanBody;
  146664. exports.isEnumNumberBody = isEnumNumberBody;
  146665. exports.isEnumStringBody = isEnumStringBody;
  146666. exports.isEnumSymbolBody = isEnumSymbolBody;
  146667. exports.isEnumBooleanMember = isEnumBooleanMember;
  146668. exports.isEnumNumberMember = isEnumNumberMember;
  146669. exports.isEnumStringMember = isEnumStringMember;
  146670. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  146671. exports.isIndexedAccessType = isIndexedAccessType;
  146672. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  146673. exports.isJSXAttribute = isJSXAttribute;
  146674. exports.isJSXClosingElement = isJSXClosingElement;
  146675. exports.isJSXElement = isJSXElement2;
  146676. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  146677. exports.isJSXExpressionContainer = isJSXExpressionContainer2;
  146678. exports.isJSXSpreadChild = isJSXSpreadChild;
  146679. exports.isJSXIdentifier = isJSXIdentifier2;
  146680. exports.isJSXMemberExpression = isJSXMemberExpression;
  146681. exports.isJSXNamespacedName = isJSXNamespacedName;
  146682. exports.isJSXOpeningElement = isJSXOpeningElement;
  146683. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  146684. exports.isJSXText = isJSXText;
  146685. exports.isJSXFragment = isJSXFragment2;
  146686. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  146687. exports.isJSXClosingFragment = isJSXClosingFragment;
  146688. exports.isNoop = isNoop;
  146689. exports.isPlaceholder = isPlaceholder;
  146690. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  146691. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  146692. exports.isBindExpression = isBindExpression;
  146693. exports.isClassProperty = isClassProperty;
  146694. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  146695. exports.isPipelineBareFunction = isPipelineBareFunction;
  146696. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  146697. exports.isClassPrivateProperty = isClassPrivateProperty;
  146698. exports.isClassPrivateMethod = isClassPrivateMethod;
  146699. exports.isImportAttribute = isImportAttribute;
  146700. exports.isDecorator = isDecorator;
  146701. exports.isDoExpression = isDoExpression;
  146702. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  146703. exports.isPrivateName = isPrivateName;
  146704. exports.isRecordExpression = isRecordExpression;
  146705. exports.isTupleExpression = isTupleExpression;
  146706. exports.isDecimalLiteral = isDecimalLiteral;
  146707. exports.isStaticBlock = isStaticBlock;
  146708. exports.isModuleExpression = isModuleExpression;
  146709. exports.isTSParameterProperty = isTSParameterProperty;
  146710. exports.isTSDeclareFunction = isTSDeclareFunction;
  146711. exports.isTSDeclareMethod = isTSDeclareMethod;
  146712. exports.isTSQualifiedName = isTSQualifiedName;
  146713. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  146714. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  146715. exports.isTSPropertySignature = isTSPropertySignature;
  146716. exports.isTSMethodSignature = isTSMethodSignature;
  146717. exports.isTSIndexSignature = isTSIndexSignature;
  146718. exports.isTSAnyKeyword = isTSAnyKeyword;
  146719. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  146720. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  146721. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  146722. exports.isTSNeverKeyword = isTSNeverKeyword;
  146723. exports.isTSNullKeyword = isTSNullKeyword;
  146724. exports.isTSNumberKeyword = isTSNumberKeyword;
  146725. exports.isTSObjectKeyword = isTSObjectKeyword;
  146726. exports.isTSStringKeyword = isTSStringKeyword;
  146727. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  146728. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  146729. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  146730. exports.isTSVoidKeyword = isTSVoidKeyword;
  146731. exports.isTSThisType = isTSThisType;
  146732. exports.isTSFunctionType = isTSFunctionType;
  146733. exports.isTSConstructorType = isTSConstructorType;
  146734. exports.isTSTypeReference = isTSTypeReference;
  146735. exports.isTSTypePredicate = isTSTypePredicate;
  146736. exports.isTSTypeQuery = isTSTypeQuery;
  146737. exports.isTSTypeLiteral = isTSTypeLiteral;
  146738. exports.isTSArrayType = isTSArrayType;
  146739. exports.isTSTupleType = isTSTupleType;
  146740. exports.isTSOptionalType = isTSOptionalType;
  146741. exports.isTSRestType = isTSRestType;
  146742. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  146743. exports.isTSUnionType = isTSUnionType;
  146744. exports.isTSIntersectionType = isTSIntersectionType;
  146745. exports.isTSConditionalType = isTSConditionalType;
  146746. exports.isTSInferType = isTSInferType;
  146747. exports.isTSParenthesizedType = isTSParenthesizedType;
  146748. exports.isTSTypeOperator = isTSTypeOperator;
  146749. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  146750. exports.isTSMappedType = isTSMappedType;
  146751. exports.isTSLiteralType = isTSLiteralType;
  146752. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  146753. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  146754. exports.isTSInterfaceBody = isTSInterfaceBody;
  146755. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  146756. exports.isTSAsExpression = isTSAsExpression;
  146757. exports.isTSTypeAssertion = isTSTypeAssertion;
  146758. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  146759. exports.isTSEnumMember = isTSEnumMember;
  146760. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  146761. exports.isTSModuleBlock = isTSModuleBlock;
  146762. exports.isTSImportType = isTSImportType;
  146763. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  146764. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  146765. exports.isTSNonNullExpression = isTSNonNullExpression;
  146766. exports.isTSExportAssignment = isTSExportAssignment;
  146767. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  146768. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  146769. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  146770. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  146771. exports.isTSTypeParameter = isTSTypeParameter;
  146772. exports.isExpression = isExpression;
  146773. exports.isBinary = isBinary;
  146774. exports.isScopable = isScopable;
  146775. exports.isBlockParent = isBlockParent;
  146776. exports.isBlock = isBlock;
  146777. exports.isStatement = isStatement;
  146778. exports.isTerminatorless = isTerminatorless;
  146779. exports.isCompletionStatement = isCompletionStatement;
  146780. exports.isConditional = isConditional;
  146781. exports.isLoop = isLoop;
  146782. exports.isWhile = isWhile;
  146783. exports.isExpressionWrapper = isExpressionWrapper;
  146784. exports.isFor = isFor;
  146785. exports.isForXStatement = isForXStatement;
  146786. exports.isFunction = isFunction;
  146787. exports.isFunctionParent = isFunctionParent;
  146788. exports.isPureish = isPureish;
  146789. exports.isDeclaration = isDeclaration2;
  146790. exports.isPatternLike = isPatternLike;
  146791. exports.isLVal = isLVal;
  146792. exports.isTSEntityName = isTSEntityName;
  146793. exports.isLiteral = isLiteral;
  146794. exports.isImmutable = isImmutable;
  146795. exports.isUserWhitespacable = isUserWhitespacable;
  146796. exports.isMethod = isMethod;
  146797. exports.isObjectMember = isObjectMember;
  146798. exports.isProperty = isProperty;
  146799. exports.isUnaryLike = isUnaryLike;
  146800. exports.isPattern = isPattern;
  146801. exports.isClass = isClass;
  146802. exports.isModuleDeclaration = isModuleDeclaration;
  146803. exports.isExportDeclaration = isExportDeclaration;
  146804. exports.isModuleSpecifier = isModuleSpecifier;
  146805. exports.isFlow = isFlow;
  146806. exports.isFlowType = isFlowType;
  146807. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  146808. exports.isFlowDeclaration = isFlowDeclaration;
  146809. exports.isFlowPredicate = isFlowPredicate;
  146810. exports.isEnumBody = isEnumBody;
  146811. exports.isEnumMember = isEnumMember;
  146812. exports.isJSX = isJSX;
  146813. exports.isPrivate = isPrivate;
  146814. exports.isTSTypeElement = isTSTypeElement;
  146815. exports.isTSType = isTSType;
  146816. exports.isTSBaseType = isTSBaseType;
  146817. exports.isNumberLiteral = isNumberLiteral;
  146818. exports.isRegexLiteral = isRegexLiteral;
  146819. exports.isRestProperty = isRestProperty;
  146820. exports.isSpreadProperty = isSpreadProperty;
  146821. var _shallowEqual = require_shallowEqual7();
  146822. function isArrayExpression(node, opts) {
  146823. if (!node)
  146824. return false;
  146825. const nodeType = node.type;
  146826. if (nodeType === "ArrayExpression") {
  146827. if (typeof opts === "undefined") {
  146828. return true;
  146829. } else {
  146830. return (0, _shallowEqual.default)(node, opts);
  146831. }
  146832. }
  146833. return false;
  146834. }
  146835. function isAssignmentExpression(node, opts) {
  146836. if (!node)
  146837. return false;
  146838. const nodeType = node.type;
  146839. if (nodeType === "AssignmentExpression") {
  146840. if (typeof opts === "undefined") {
  146841. return true;
  146842. } else {
  146843. return (0, _shallowEqual.default)(node, opts);
  146844. }
  146845. }
  146846. return false;
  146847. }
  146848. function isBinaryExpression(node, opts) {
  146849. if (!node)
  146850. return false;
  146851. const nodeType = node.type;
  146852. if (nodeType === "BinaryExpression") {
  146853. if (typeof opts === "undefined") {
  146854. return true;
  146855. } else {
  146856. return (0, _shallowEqual.default)(node, opts);
  146857. }
  146858. }
  146859. return false;
  146860. }
  146861. function isInterpreterDirective(node, opts) {
  146862. if (!node)
  146863. return false;
  146864. const nodeType = node.type;
  146865. if (nodeType === "InterpreterDirective") {
  146866. if (typeof opts === "undefined") {
  146867. return true;
  146868. } else {
  146869. return (0, _shallowEqual.default)(node, opts);
  146870. }
  146871. }
  146872. return false;
  146873. }
  146874. function isDirective(node, opts) {
  146875. if (!node)
  146876. return false;
  146877. const nodeType = node.type;
  146878. if (nodeType === "Directive") {
  146879. if (typeof opts === "undefined") {
  146880. return true;
  146881. } else {
  146882. return (0, _shallowEqual.default)(node, opts);
  146883. }
  146884. }
  146885. return false;
  146886. }
  146887. function isDirectiveLiteral(node, opts) {
  146888. if (!node)
  146889. return false;
  146890. const nodeType = node.type;
  146891. if (nodeType === "DirectiveLiteral") {
  146892. if (typeof opts === "undefined") {
  146893. return true;
  146894. } else {
  146895. return (0, _shallowEqual.default)(node, opts);
  146896. }
  146897. }
  146898. return false;
  146899. }
  146900. function isBlockStatement(node, opts) {
  146901. if (!node)
  146902. return false;
  146903. const nodeType = node.type;
  146904. if (nodeType === "BlockStatement") {
  146905. if (typeof opts === "undefined") {
  146906. return true;
  146907. } else {
  146908. return (0, _shallowEqual.default)(node, opts);
  146909. }
  146910. }
  146911. return false;
  146912. }
  146913. function isBreakStatement(node, opts) {
  146914. if (!node)
  146915. return false;
  146916. const nodeType = node.type;
  146917. if (nodeType === "BreakStatement") {
  146918. if (typeof opts === "undefined") {
  146919. return true;
  146920. } else {
  146921. return (0, _shallowEqual.default)(node, opts);
  146922. }
  146923. }
  146924. return false;
  146925. }
  146926. function isCallExpression(node, opts) {
  146927. if (!node)
  146928. return false;
  146929. const nodeType = node.type;
  146930. if (nodeType === "CallExpression") {
  146931. if (typeof opts === "undefined") {
  146932. return true;
  146933. } else {
  146934. return (0, _shallowEqual.default)(node, opts);
  146935. }
  146936. }
  146937. return false;
  146938. }
  146939. function isCatchClause(node, opts) {
  146940. if (!node)
  146941. return false;
  146942. const nodeType = node.type;
  146943. if (nodeType === "CatchClause") {
  146944. if (typeof opts === "undefined") {
  146945. return true;
  146946. } else {
  146947. return (0, _shallowEqual.default)(node, opts);
  146948. }
  146949. }
  146950. return false;
  146951. }
  146952. function isConditionalExpression(node, opts) {
  146953. if (!node)
  146954. return false;
  146955. const nodeType = node.type;
  146956. if (nodeType === "ConditionalExpression") {
  146957. if (typeof opts === "undefined") {
  146958. return true;
  146959. } else {
  146960. return (0, _shallowEqual.default)(node, opts);
  146961. }
  146962. }
  146963. return false;
  146964. }
  146965. function isContinueStatement(node, opts) {
  146966. if (!node)
  146967. return false;
  146968. const nodeType = node.type;
  146969. if (nodeType === "ContinueStatement") {
  146970. if (typeof opts === "undefined") {
  146971. return true;
  146972. } else {
  146973. return (0, _shallowEqual.default)(node, opts);
  146974. }
  146975. }
  146976. return false;
  146977. }
  146978. function isDebuggerStatement(node, opts) {
  146979. if (!node)
  146980. return false;
  146981. const nodeType = node.type;
  146982. if (nodeType === "DebuggerStatement") {
  146983. if (typeof opts === "undefined") {
  146984. return true;
  146985. } else {
  146986. return (0, _shallowEqual.default)(node, opts);
  146987. }
  146988. }
  146989. return false;
  146990. }
  146991. function isDoWhileStatement(node, opts) {
  146992. if (!node)
  146993. return false;
  146994. const nodeType = node.type;
  146995. if (nodeType === "DoWhileStatement") {
  146996. if (typeof opts === "undefined") {
  146997. return true;
  146998. } else {
  146999. return (0, _shallowEqual.default)(node, opts);
  147000. }
  147001. }
  147002. return false;
  147003. }
  147004. function isEmptyStatement(node, opts) {
  147005. if (!node)
  147006. return false;
  147007. const nodeType = node.type;
  147008. if (nodeType === "EmptyStatement") {
  147009. if (typeof opts === "undefined") {
  147010. return true;
  147011. } else {
  147012. return (0, _shallowEqual.default)(node, opts);
  147013. }
  147014. }
  147015. return false;
  147016. }
  147017. function isExpressionStatement2(node, opts) {
  147018. if (!node)
  147019. return false;
  147020. const nodeType = node.type;
  147021. if (nodeType === "ExpressionStatement") {
  147022. if (typeof opts === "undefined") {
  147023. return true;
  147024. } else {
  147025. return (0, _shallowEqual.default)(node, opts);
  147026. }
  147027. }
  147028. return false;
  147029. }
  147030. function isFile(node, opts) {
  147031. if (!node)
  147032. return false;
  147033. const nodeType = node.type;
  147034. if (nodeType === "File") {
  147035. if (typeof opts === "undefined") {
  147036. return true;
  147037. } else {
  147038. return (0, _shallowEqual.default)(node, opts);
  147039. }
  147040. }
  147041. return false;
  147042. }
  147043. function isForInStatement(node, opts) {
  147044. if (!node)
  147045. return false;
  147046. const nodeType = node.type;
  147047. if (nodeType === "ForInStatement") {
  147048. if (typeof opts === "undefined") {
  147049. return true;
  147050. } else {
  147051. return (0, _shallowEqual.default)(node, opts);
  147052. }
  147053. }
  147054. return false;
  147055. }
  147056. function isForStatement(node, opts) {
  147057. if (!node)
  147058. return false;
  147059. const nodeType = node.type;
  147060. if (nodeType === "ForStatement") {
  147061. if (typeof opts === "undefined") {
  147062. return true;
  147063. } else {
  147064. return (0, _shallowEqual.default)(node, opts);
  147065. }
  147066. }
  147067. return false;
  147068. }
  147069. function isFunctionDeclaration(node, opts) {
  147070. if (!node)
  147071. return false;
  147072. const nodeType = node.type;
  147073. if (nodeType === "FunctionDeclaration") {
  147074. if (typeof opts === "undefined") {
  147075. return true;
  147076. } else {
  147077. return (0, _shallowEqual.default)(node, opts);
  147078. }
  147079. }
  147080. return false;
  147081. }
  147082. function isFunctionExpression(node, opts) {
  147083. if (!node)
  147084. return false;
  147085. const nodeType = node.type;
  147086. if (nodeType === "FunctionExpression") {
  147087. if (typeof opts === "undefined") {
  147088. return true;
  147089. } else {
  147090. return (0, _shallowEqual.default)(node, opts);
  147091. }
  147092. }
  147093. return false;
  147094. }
  147095. function isIdentifier2(node, opts) {
  147096. if (!node)
  147097. return false;
  147098. const nodeType = node.type;
  147099. if (nodeType === "Identifier") {
  147100. if (typeof opts === "undefined") {
  147101. return true;
  147102. } else {
  147103. return (0, _shallowEqual.default)(node, opts);
  147104. }
  147105. }
  147106. return false;
  147107. }
  147108. function isIfStatement(node, opts) {
  147109. if (!node)
  147110. return false;
  147111. const nodeType = node.type;
  147112. if (nodeType === "IfStatement") {
  147113. if (typeof opts === "undefined") {
  147114. return true;
  147115. } else {
  147116. return (0, _shallowEqual.default)(node, opts);
  147117. }
  147118. }
  147119. return false;
  147120. }
  147121. function isLabeledStatement(node, opts) {
  147122. if (!node)
  147123. return false;
  147124. const nodeType = node.type;
  147125. if (nodeType === "LabeledStatement") {
  147126. if (typeof opts === "undefined") {
  147127. return true;
  147128. } else {
  147129. return (0, _shallowEqual.default)(node, opts);
  147130. }
  147131. }
  147132. return false;
  147133. }
  147134. function isStringLiteral2(node, opts) {
  147135. if (!node)
  147136. return false;
  147137. const nodeType = node.type;
  147138. if (nodeType === "StringLiteral") {
  147139. if (typeof opts === "undefined") {
  147140. return true;
  147141. } else {
  147142. return (0, _shallowEqual.default)(node, opts);
  147143. }
  147144. }
  147145. return false;
  147146. }
  147147. function isNumericLiteral(node, opts) {
  147148. if (!node)
  147149. return false;
  147150. const nodeType = node.type;
  147151. if (nodeType === "NumericLiteral") {
  147152. if (typeof opts === "undefined") {
  147153. return true;
  147154. } else {
  147155. return (0, _shallowEqual.default)(node, opts);
  147156. }
  147157. }
  147158. return false;
  147159. }
  147160. function isNullLiteral(node, opts) {
  147161. if (!node)
  147162. return false;
  147163. const nodeType = node.type;
  147164. if (nodeType === "NullLiteral") {
  147165. if (typeof opts === "undefined") {
  147166. return true;
  147167. } else {
  147168. return (0, _shallowEqual.default)(node, opts);
  147169. }
  147170. }
  147171. return false;
  147172. }
  147173. function isBooleanLiteral2(node, opts) {
  147174. if (!node)
  147175. return false;
  147176. const nodeType = node.type;
  147177. if (nodeType === "BooleanLiteral") {
  147178. if (typeof opts === "undefined") {
  147179. return true;
  147180. } else {
  147181. return (0, _shallowEqual.default)(node, opts);
  147182. }
  147183. }
  147184. return false;
  147185. }
  147186. function isRegExpLiteral(node, opts) {
  147187. if (!node)
  147188. return false;
  147189. const nodeType = node.type;
  147190. if (nodeType === "RegExpLiteral") {
  147191. if (typeof opts === "undefined") {
  147192. return true;
  147193. } else {
  147194. return (0, _shallowEqual.default)(node, opts);
  147195. }
  147196. }
  147197. return false;
  147198. }
  147199. function isLogicalExpression(node, opts) {
  147200. if (!node)
  147201. return false;
  147202. const nodeType = node.type;
  147203. if (nodeType === "LogicalExpression") {
  147204. if (typeof opts === "undefined") {
  147205. return true;
  147206. } else {
  147207. return (0, _shallowEqual.default)(node, opts);
  147208. }
  147209. }
  147210. return false;
  147211. }
  147212. function isMemberExpression(node, opts) {
  147213. if (!node)
  147214. return false;
  147215. const nodeType = node.type;
  147216. if (nodeType === "MemberExpression") {
  147217. if (typeof opts === "undefined") {
  147218. return true;
  147219. } else {
  147220. return (0, _shallowEqual.default)(node, opts);
  147221. }
  147222. }
  147223. return false;
  147224. }
  147225. function isNewExpression(node, opts) {
  147226. if (!node)
  147227. return false;
  147228. const nodeType = node.type;
  147229. if (nodeType === "NewExpression") {
  147230. if (typeof opts === "undefined") {
  147231. return true;
  147232. } else {
  147233. return (0, _shallowEqual.default)(node, opts);
  147234. }
  147235. }
  147236. return false;
  147237. }
  147238. function isProgram(node, opts) {
  147239. if (!node)
  147240. return false;
  147241. const nodeType = node.type;
  147242. if (nodeType === "Program") {
  147243. if (typeof opts === "undefined") {
  147244. return true;
  147245. } else {
  147246. return (0, _shallowEqual.default)(node, opts);
  147247. }
  147248. }
  147249. return false;
  147250. }
  147251. function isObjectExpression(node, opts) {
  147252. if (!node)
  147253. return false;
  147254. const nodeType = node.type;
  147255. if (nodeType === "ObjectExpression") {
  147256. if (typeof opts === "undefined") {
  147257. return true;
  147258. } else {
  147259. return (0, _shallowEqual.default)(node, opts);
  147260. }
  147261. }
  147262. return false;
  147263. }
  147264. function isObjectMethod(node, opts) {
  147265. if (!node)
  147266. return false;
  147267. const nodeType = node.type;
  147268. if (nodeType === "ObjectMethod") {
  147269. if (typeof opts === "undefined") {
  147270. return true;
  147271. } else {
  147272. return (0, _shallowEqual.default)(node, opts);
  147273. }
  147274. }
  147275. return false;
  147276. }
  147277. function isObjectProperty(node, opts) {
  147278. if (!node)
  147279. return false;
  147280. const nodeType = node.type;
  147281. if (nodeType === "ObjectProperty") {
  147282. if (typeof opts === "undefined") {
  147283. return true;
  147284. } else {
  147285. return (0, _shallowEqual.default)(node, opts);
  147286. }
  147287. }
  147288. return false;
  147289. }
  147290. function isRestElement(node, opts) {
  147291. if (!node)
  147292. return false;
  147293. const nodeType = node.type;
  147294. if (nodeType === "RestElement") {
  147295. if (typeof opts === "undefined") {
  147296. return true;
  147297. } else {
  147298. return (0, _shallowEqual.default)(node, opts);
  147299. }
  147300. }
  147301. return false;
  147302. }
  147303. function isReturnStatement(node, opts) {
  147304. if (!node)
  147305. return false;
  147306. const nodeType = node.type;
  147307. if (nodeType === "ReturnStatement") {
  147308. if (typeof opts === "undefined") {
  147309. return true;
  147310. } else {
  147311. return (0, _shallowEqual.default)(node, opts);
  147312. }
  147313. }
  147314. return false;
  147315. }
  147316. function isSequenceExpression(node, opts) {
  147317. if (!node)
  147318. return false;
  147319. const nodeType = node.type;
  147320. if (nodeType === "SequenceExpression") {
  147321. if (typeof opts === "undefined") {
  147322. return true;
  147323. } else {
  147324. return (0, _shallowEqual.default)(node, opts);
  147325. }
  147326. }
  147327. return false;
  147328. }
  147329. function isParenthesizedExpression(node, opts) {
  147330. if (!node)
  147331. return false;
  147332. const nodeType = node.type;
  147333. if (nodeType === "ParenthesizedExpression") {
  147334. if (typeof opts === "undefined") {
  147335. return true;
  147336. } else {
  147337. return (0, _shallowEqual.default)(node, opts);
  147338. }
  147339. }
  147340. return false;
  147341. }
  147342. function isSwitchCase(node, opts) {
  147343. if (!node)
  147344. return false;
  147345. const nodeType = node.type;
  147346. if (nodeType === "SwitchCase") {
  147347. if (typeof opts === "undefined") {
  147348. return true;
  147349. } else {
  147350. return (0, _shallowEqual.default)(node, opts);
  147351. }
  147352. }
  147353. return false;
  147354. }
  147355. function isSwitchStatement(node, opts) {
  147356. if (!node)
  147357. return false;
  147358. const nodeType = node.type;
  147359. if (nodeType === "SwitchStatement") {
  147360. if (typeof opts === "undefined") {
  147361. return true;
  147362. } else {
  147363. return (0, _shallowEqual.default)(node, opts);
  147364. }
  147365. }
  147366. return false;
  147367. }
  147368. function isThisExpression(node, opts) {
  147369. if (!node)
  147370. return false;
  147371. const nodeType = node.type;
  147372. if (nodeType === "ThisExpression") {
  147373. if (typeof opts === "undefined") {
  147374. return true;
  147375. } else {
  147376. return (0, _shallowEqual.default)(node, opts);
  147377. }
  147378. }
  147379. return false;
  147380. }
  147381. function isThrowStatement(node, opts) {
  147382. if (!node)
  147383. return false;
  147384. const nodeType = node.type;
  147385. if (nodeType === "ThrowStatement") {
  147386. if (typeof opts === "undefined") {
  147387. return true;
  147388. } else {
  147389. return (0, _shallowEqual.default)(node, opts);
  147390. }
  147391. }
  147392. return false;
  147393. }
  147394. function isTryStatement(node, opts) {
  147395. if (!node)
  147396. return false;
  147397. const nodeType = node.type;
  147398. if (nodeType === "TryStatement") {
  147399. if (typeof opts === "undefined") {
  147400. return true;
  147401. } else {
  147402. return (0, _shallowEqual.default)(node, opts);
  147403. }
  147404. }
  147405. return false;
  147406. }
  147407. function isUnaryExpression(node, opts) {
  147408. if (!node)
  147409. return false;
  147410. const nodeType = node.type;
  147411. if (nodeType === "UnaryExpression") {
  147412. if (typeof opts === "undefined") {
  147413. return true;
  147414. } else {
  147415. return (0, _shallowEqual.default)(node, opts);
  147416. }
  147417. }
  147418. return false;
  147419. }
  147420. function isUpdateExpression(node, opts) {
  147421. if (!node)
  147422. return false;
  147423. const nodeType = node.type;
  147424. if (nodeType === "UpdateExpression") {
  147425. if (typeof opts === "undefined") {
  147426. return true;
  147427. } else {
  147428. return (0, _shallowEqual.default)(node, opts);
  147429. }
  147430. }
  147431. return false;
  147432. }
  147433. function isVariableDeclaration(node, opts) {
  147434. if (!node)
  147435. return false;
  147436. const nodeType = node.type;
  147437. if (nodeType === "VariableDeclaration") {
  147438. if (typeof opts === "undefined") {
  147439. return true;
  147440. } else {
  147441. return (0, _shallowEqual.default)(node, opts);
  147442. }
  147443. }
  147444. return false;
  147445. }
  147446. function isVariableDeclarator(node, opts) {
  147447. if (!node)
  147448. return false;
  147449. const nodeType = node.type;
  147450. if (nodeType === "VariableDeclarator") {
  147451. if (typeof opts === "undefined") {
  147452. return true;
  147453. } else {
  147454. return (0, _shallowEqual.default)(node, opts);
  147455. }
  147456. }
  147457. return false;
  147458. }
  147459. function isWhileStatement(node, opts) {
  147460. if (!node)
  147461. return false;
  147462. const nodeType = node.type;
  147463. if (nodeType === "WhileStatement") {
  147464. if (typeof opts === "undefined") {
  147465. return true;
  147466. } else {
  147467. return (0, _shallowEqual.default)(node, opts);
  147468. }
  147469. }
  147470. return false;
  147471. }
  147472. function isWithStatement(node, opts) {
  147473. if (!node)
  147474. return false;
  147475. const nodeType = node.type;
  147476. if (nodeType === "WithStatement") {
  147477. if (typeof opts === "undefined") {
  147478. return true;
  147479. } else {
  147480. return (0, _shallowEqual.default)(node, opts);
  147481. }
  147482. }
  147483. return false;
  147484. }
  147485. function isAssignmentPattern(node, opts) {
  147486. if (!node)
  147487. return false;
  147488. const nodeType = node.type;
  147489. if (nodeType === "AssignmentPattern") {
  147490. if (typeof opts === "undefined") {
  147491. return true;
  147492. } else {
  147493. return (0, _shallowEqual.default)(node, opts);
  147494. }
  147495. }
  147496. return false;
  147497. }
  147498. function isArrayPattern(node, opts) {
  147499. if (!node)
  147500. return false;
  147501. const nodeType = node.type;
  147502. if (nodeType === "ArrayPattern") {
  147503. if (typeof opts === "undefined") {
  147504. return true;
  147505. } else {
  147506. return (0, _shallowEqual.default)(node, opts);
  147507. }
  147508. }
  147509. return false;
  147510. }
  147511. function isArrowFunctionExpression(node, opts) {
  147512. if (!node)
  147513. return false;
  147514. const nodeType = node.type;
  147515. if (nodeType === "ArrowFunctionExpression") {
  147516. if (typeof opts === "undefined") {
  147517. return true;
  147518. } else {
  147519. return (0, _shallowEqual.default)(node, opts);
  147520. }
  147521. }
  147522. return false;
  147523. }
  147524. function isClassBody(node, opts) {
  147525. if (!node)
  147526. return false;
  147527. const nodeType = node.type;
  147528. if (nodeType === "ClassBody") {
  147529. if (typeof opts === "undefined") {
  147530. return true;
  147531. } else {
  147532. return (0, _shallowEqual.default)(node, opts);
  147533. }
  147534. }
  147535. return false;
  147536. }
  147537. function isClassExpression(node, opts) {
  147538. if (!node)
  147539. return false;
  147540. const nodeType = node.type;
  147541. if (nodeType === "ClassExpression") {
  147542. if (typeof opts === "undefined") {
  147543. return true;
  147544. } else {
  147545. return (0, _shallowEqual.default)(node, opts);
  147546. }
  147547. }
  147548. return false;
  147549. }
  147550. function isClassDeclaration(node, opts) {
  147551. if (!node)
  147552. return false;
  147553. const nodeType = node.type;
  147554. if (nodeType === "ClassDeclaration") {
  147555. if (typeof opts === "undefined") {
  147556. return true;
  147557. } else {
  147558. return (0, _shallowEqual.default)(node, opts);
  147559. }
  147560. }
  147561. return false;
  147562. }
  147563. function isExportAllDeclaration(node, opts) {
  147564. if (!node)
  147565. return false;
  147566. const nodeType = node.type;
  147567. if (nodeType === "ExportAllDeclaration") {
  147568. if (typeof opts === "undefined") {
  147569. return true;
  147570. } else {
  147571. return (0, _shallowEqual.default)(node, opts);
  147572. }
  147573. }
  147574. return false;
  147575. }
  147576. function isExportDefaultDeclaration(node, opts) {
  147577. if (!node)
  147578. return false;
  147579. const nodeType = node.type;
  147580. if (nodeType === "ExportDefaultDeclaration") {
  147581. if (typeof opts === "undefined") {
  147582. return true;
  147583. } else {
  147584. return (0, _shallowEqual.default)(node, opts);
  147585. }
  147586. }
  147587. return false;
  147588. }
  147589. function isExportNamedDeclaration(node, opts) {
  147590. if (!node)
  147591. return false;
  147592. const nodeType = node.type;
  147593. if (nodeType === "ExportNamedDeclaration") {
  147594. if (typeof opts === "undefined") {
  147595. return true;
  147596. } else {
  147597. return (0, _shallowEqual.default)(node, opts);
  147598. }
  147599. }
  147600. return false;
  147601. }
  147602. function isExportSpecifier(node, opts) {
  147603. if (!node)
  147604. return false;
  147605. const nodeType = node.type;
  147606. if (nodeType === "ExportSpecifier") {
  147607. if (typeof opts === "undefined") {
  147608. return true;
  147609. } else {
  147610. return (0, _shallowEqual.default)(node, opts);
  147611. }
  147612. }
  147613. return false;
  147614. }
  147615. function isForOfStatement(node, opts) {
  147616. if (!node)
  147617. return false;
  147618. const nodeType = node.type;
  147619. if (nodeType === "ForOfStatement") {
  147620. if (typeof opts === "undefined") {
  147621. return true;
  147622. } else {
  147623. return (0, _shallowEqual.default)(node, opts);
  147624. }
  147625. }
  147626. return false;
  147627. }
  147628. function isImportDeclaration(node, opts) {
  147629. if (!node)
  147630. return false;
  147631. const nodeType = node.type;
  147632. if (nodeType === "ImportDeclaration") {
  147633. if (typeof opts === "undefined") {
  147634. return true;
  147635. } else {
  147636. return (0, _shallowEqual.default)(node, opts);
  147637. }
  147638. }
  147639. return false;
  147640. }
  147641. function isImportDefaultSpecifier(node, opts) {
  147642. if (!node)
  147643. return false;
  147644. const nodeType = node.type;
  147645. if (nodeType === "ImportDefaultSpecifier") {
  147646. if (typeof opts === "undefined") {
  147647. return true;
  147648. } else {
  147649. return (0, _shallowEqual.default)(node, opts);
  147650. }
  147651. }
  147652. return false;
  147653. }
  147654. function isImportNamespaceSpecifier(node, opts) {
  147655. if (!node)
  147656. return false;
  147657. const nodeType = node.type;
  147658. if (nodeType === "ImportNamespaceSpecifier") {
  147659. if (typeof opts === "undefined") {
  147660. return true;
  147661. } else {
  147662. return (0, _shallowEqual.default)(node, opts);
  147663. }
  147664. }
  147665. return false;
  147666. }
  147667. function isImportSpecifier(node, opts) {
  147668. if (!node)
  147669. return false;
  147670. const nodeType = node.type;
  147671. if (nodeType === "ImportSpecifier") {
  147672. if (typeof opts === "undefined") {
  147673. return true;
  147674. } else {
  147675. return (0, _shallowEqual.default)(node, opts);
  147676. }
  147677. }
  147678. return false;
  147679. }
  147680. function isMetaProperty(node, opts) {
  147681. if (!node)
  147682. return false;
  147683. const nodeType = node.type;
  147684. if (nodeType === "MetaProperty") {
  147685. if (typeof opts === "undefined") {
  147686. return true;
  147687. } else {
  147688. return (0, _shallowEqual.default)(node, opts);
  147689. }
  147690. }
  147691. return false;
  147692. }
  147693. function isClassMethod(node, opts) {
  147694. if (!node)
  147695. return false;
  147696. const nodeType = node.type;
  147697. if (nodeType === "ClassMethod") {
  147698. if (typeof opts === "undefined") {
  147699. return true;
  147700. } else {
  147701. return (0, _shallowEqual.default)(node, opts);
  147702. }
  147703. }
  147704. return false;
  147705. }
  147706. function isObjectPattern(node, opts) {
  147707. if (!node)
  147708. return false;
  147709. const nodeType = node.type;
  147710. if (nodeType === "ObjectPattern") {
  147711. if (typeof opts === "undefined") {
  147712. return true;
  147713. } else {
  147714. return (0, _shallowEqual.default)(node, opts);
  147715. }
  147716. }
  147717. return false;
  147718. }
  147719. function isSpreadElement(node, opts) {
  147720. if (!node)
  147721. return false;
  147722. const nodeType = node.type;
  147723. if (nodeType === "SpreadElement") {
  147724. if (typeof opts === "undefined") {
  147725. return true;
  147726. } else {
  147727. return (0, _shallowEqual.default)(node, opts);
  147728. }
  147729. }
  147730. return false;
  147731. }
  147732. function isSuper(node, opts) {
  147733. if (!node)
  147734. return false;
  147735. const nodeType = node.type;
  147736. if (nodeType === "Super") {
  147737. if (typeof opts === "undefined") {
  147738. return true;
  147739. } else {
  147740. return (0, _shallowEqual.default)(node, opts);
  147741. }
  147742. }
  147743. return false;
  147744. }
  147745. function isTaggedTemplateExpression(node, opts) {
  147746. if (!node)
  147747. return false;
  147748. const nodeType = node.type;
  147749. if (nodeType === "TaggedTemplateExpression") {
  147750. if (typeof opts === "undefined") {
  147751. return true;
  147752. } else {
  147753. return (0, _shallowEqual.default)(node, opts);
  147754. }
  147755. }
  147756. return false;
  147757. }
  147758. function isTemplateElement(node, opts) {
  147759. if (!node)
  147760. return false;
  147761. const nodeType = node.type;
  147762. if (nodeType === "TemplateElement") {
  147763. if (typeof opts === "undefined") {
  147764. return true;
  147765. } else {
  147766. return (0, _shallowEqual.default)(node, opts);
  147767. }
  147768. }
  147769. return false;
  147770. }
  147771. function isTemplateLiteral(node, opts) {
  147772. if (!node)
  147773. return false;
  147774. const nodeType = node.type;
  147775. if (nodeType === "TemplateLiteral") {
  147776. if (typeof opts === "undefined") {
  147777. return true;
  147778. } else {
  147779. return (0, _shallowEqual.default)(node, opts);
  147780. }
  147781. }
  147782. return false;
  147783. }
  147784. function isYieldExpression(node, opts) {
  147785. if (!node)
  147786. return false;
  147787. const nodeType = node.type;
  147788. if (nodeType === "YieldExpression") {
  147789. if (typeof opts === "undefined") {
  147790. return true;
  147791. } else {
  147792. return (0, _shallowEqual.default)(node, opts);
  147793. }
  147794. }
  147795. return false;
  147796. }
  147797. function isAwaitExpression(node, opts) {
  147798. if (!node)
  147799. return false;
  147800. const nodeType = node.type;
  147801. if (nodeType === "AwaitExpression") {
  147802. if (typeof opts === "undefined") {
  147803. return true;
  147804. } else {
  147805. return (0, _shallowEqual.default)(node, opts);
  147806. }
  147807. }
  147808. return false;
  147809. }
  147810. function isImport(node, opts) {
  147811. if (!node)
  147812. return false;
  147813. const nodeType = node.type;
  147814. if (nodeType === "Import") {
  147815. if (typeof opts === "undefined") {
  147816. return true;
  147817. } else {
  147818. return (0, _shallowEqual.default)(node, opts);
  147819. }
  147820. }
  147821. return false;
  147822. }
  147823. function isBigIntLiteral(node, opts) {
  147824. if (!node)
  147825. return false;
  147826. const nodeType = node.type;
  147827. if (nodeType === "BigIntLiteral") {
  147828. if (typeof opts === "undefined") {
  147829. return true;
  147830. } else {
  147831. return (0, _shallowEqual.default)(node, opts);
  147832. }
  147833. }
  147834. return false;
  147835. }
  147836. function isExportNamespaceSpecifier(node, opts) {
  147837. if (!node)
  147838. return false;
  147839. const nodeType = node.type;
  147840. if (nodeType === "ExportNamespaceSpecifier") {
  147841. if (typeof opts === "undefined") {
  147842. return true;
  147843. } else {
  147844. return (0, _shallowEqual.default)(node, opts);
  147845. }
  147846. }
  147847. return false;
  147848. }
  147849. function isOptionalMemberExpression(node, opts) {
  147850. if (!node)
  147851. return false;
  147852. const nodeType = node.type;
  147853. if (nodeType === "OptionalMemberExpression") {
  147854. if (typeof opts === "undefined") {
  147855. return true;
  147856. } else {
  147857. return (0, _shallowEqual.default)(node, opts);
  147858. }
  147859. }
  147860. return false;
  147861. }
  147862. function isOptionalCallExpression(node, opts) {
  147863. if (!node)
  147864. return false;
  147865. const nodeType = node.type;
  147866. if (nodeType === "OptionalCallExpression") {
  147867. if (typeof opts === "undefined") {
  147868. return true;
  147869. } else {
  147870. return (0, _shallowEqual.default)(node, opts);
  147871. }
  147872. }
  147873. return false;
  147874. }
  147875. function isAnyTypeAnnotation(node, opts) {
  147876. if (!node)
  147877. return false;
  147878. const nodeType = node.type;
  147879. if (nodeType === "AnyTypeAnnotation") {
  147880. if (typeof opts === "undefined") {
  147881. return true;
  147882. } else {
  147883. return (0, _shallowEqual.default)(node, opts);
  147884. }
  147885. }
  147886. return false;
  147887. }
  147888. function isArrayTypeAnnotation(node, opts) {
  147889. if (!node)
  147890. return false;
  147891. const nodeType = node.type;
  147892. if (nodeType === "ArrayTypeAnnotation") {
  147893. if (typeof opts === "undefined") {
  147894. return true;
  147895. } else {
  147896. return (0, _shallowEqual.default)(node, opts);
  147897. }
  147898. }
  147899. return false;
  147900. }
  147901. function isBooleanTypeAnnotation(node, opts) {
  147902. if (!node)
  147903. return false;
  147904. const nodeType = node.type;
  147905. if (nodeType === "BooleanTypeAnnotation") {
  147906. if (typeof opts === "undefined") {
  147907. return true;
  147908. } else {
  147909. return (0, _shallowEqual.default)(node, opts);
  147910. }
  147911. }
  147912. return false;
  147913. }
  147914. function isBooleanLiteralTypeAnnotation(node, opts) {
  147915. if (!node)
  147916. return false;
  147917. const nodeType = node.type;
  147918. if (nodeType === "BooleanLiteralTypeAnnotation") {
  147919. if (typeof opts === "undefined") {
  147920. return true;
  147921. } else {
  147922. return (0, _shallowEqual.default)(node, opts);
  147923. }
  147924. }
  147925. return false;
  147926. }
  147927. function isNullLiteralTypeAnnotation(node, opts) {
  147928. if (!node)
  147929. return false;
  147930. const nodeType = node.type;
  147931. if (nodeType === "NullLiteralTypeAnnotation") {
  147932. if (typeof opts === "undefined") {
  147933. return true;
  147934. } else {
  147935. return (0, _shallowEqual.default)(node, opts);
  147936. }
  147937. }
  147938. return false;
  147939. }
  147940. function isClassImplements(node, opts) {
  147941. if (!node)
  147942. return false;
  147943. const nodeType = node.type;
  147944. if (nodeType === "ClassImplements") {
  147945. if (typeof opts === "undefined") {
  147946. return true;
  147947. } else {
  147948. return (0, _shallowEqual.default)(node, opts);
  147949. }
  147950. }
  147951. return false;
  147952. }
  147953. function isDeclareClass(node, opts) {
  147954. if (!node)
  147955. return false;
  147956. const nodeType = node.type;
  147957. if (nodeType === "DeclareClass") {
  147958. if (typeof opts === "undefined") {
  147959. return true;
  147960. } else {
  147961. return (0, _shallowEqual.default)(node, opts);
  147962. }
  147963. }
  147964. return false;
  147965. }
  147966. function isDeclareFunction(node, opts) {
  147967. if (!node)
  147968. return false;
  147969. const nodeType = node.type;
  147970. if (nodeType === "DeclareFunction") {
  147971. if (typeof opts === "undefined") {
  147972. return true;
  147973. } else {
  147974. return (0, _shallowEqual.default)(node, opts);
  147975. }
  147976. }
  147977. return false;
  147978. }
  147979. function isDeclareInterface(node, opts) {
  147980. if (!node)
  147981. return false;
  147982. const nodeType = node.type;
  147983. if (nodeType === "DeclareInterface") {
  147984. if (typeof opts === "undefined") {
  147985. return true;
  147986. } else {
  147987. return (0, _shallowEqual.default)(node, opts);
  147988. }
  147989. }
  147990. return false;
  147991. }
  147992. function isDeclareModule(node, opts) {
  147993. if (!node)
  147994. return false;
  147995. const nodeType = node.type;
  147996. if (nodeType === "DeclareModule") {
  147997. if (typeof opts === "undefined") {
  147998. return true;
  147999. } else {
  148000. return (0, _shallowEqual.default)(node, opts);
  148001. }
  148002. }
  148003. return false;
  148004. }
  148005. function isDeclareModuleExports(node, opts) {
  148006. if (!node)
  148007. return false;
  148008. const nodeType = node.type;
  148009. if (nodeType === "DeclareModuleExports") {
  148010. if (typeof opts === "undefined") {
  148011. return true;
  148012. } else {
  148013. return (0, _shallowEqual.default)(node, opts);
  148014. }
  148015. }
  148016. return false;
  148017. }
  148018. function isDeclareTypeAlias(node, opts) {
  148019. if (!node)
  148020. return false;
  148021. const nodeType = node.type;
  148022. if (nodeType === "DeclareTypeAlias") {
  148023. if (typeof opts === "undefined") {
  148024. return true;
  148025. } else {
  148026. return (0, _shallowEqual.default)(node, opts);
  148027. }
  148028. }
  148029. return false;
  148030. }
  148031. function isDeclareOpaqueType(node, opts) {
  148032. if (!node)
  148033. return false;
  148034. const nodeType = node.type;
  148035. if (nodeType === "DeclareOpaqueType") {
  148036. if (typeof opts === "undefined") {
  148037. return true;
  148038. } else {
  148039. return (0, _shallowEqual.default)(node, opts);
  148040. }
  148041. }
  148042. return false;
  148043. }
  148044. function isDeclareVariable(node, opts) {
  148045. if (!node)
  148046. return false;
  148047. const nodeType = node.type;
  148048. if (nodeType === "DeclareVariable") {
  148049. if (typeof opts === "undefined") {
  148050. return true;
  148051. } else {
  148052. return (0, _shallowEqual.default)(node, opts);
  148053. }
  148054. }
  148055. return false;
  148056. }
  148057. function isDeclareExportDeclaration(node, opts) {
  148058. if (!node)
  148059. return false;
  148060. const nodeType = node.type;
  148061. if (nodeType === "DeclareExportDeclaration") {
  148062. if (typeof opts === "undefined") {
  148063. return true;
  148064. } else {
  148065. return (0, _shallowEqual.default)(node, opts);
  148066. }
  148067. }
  148068. return false;
  148069. }
  148070. function isDeclareExportAllDeclaration(node, opts) {
  148071. if (!node)
  148072. return false;
  148073. const nodeType = node.type;
  148074. if (nodeType === "DeclareExportAllDeclaration") {
  148075. if (typeof opts === "undefined") {
  148076. return true;
  148077. } else {
  148078. return (0, _shallowEqual.default)(node, opts);
  148079. }
  148080. }
  148081. return false;
  148082. }
  148083. function isDeclaredPredicate(node, opts) {
  148084. if (!node)
  148085. return false;
  148086. const nodeType = node.type;
  148087. if (nodeType === "DeclaredPredicate") {
  148088. if (typeof opts === "undefined") {
  148089. return true;
  148090. } else {
  148091. return (0, _shallowEqual.default)(node, opts);
  148092. }
  148093. }
  148094. return false;
  148095. }
  148096. function isExistsTypeAnnotation(node, opts) {
  148097. if (!node)
  148098. return false;
  148099. const nodeType = node.type;
  148100. if (nodeType === "ExistsTypeAnnotation") {
  148101. if (typeof opts === "undefined") {
  148102. return true;
  148103. } else {
  148104. return (0, _shallowEqual.default)(node, opts);
  148105. }
  148106. }
  148107. return false;
  148108. }
  148109. function isFunctionTypeAnnotation(node, opts) {
  148110. if (!node)
  148111. return false;
  148112. const nodeType = node.type;
  148113. if (nodeType === "FunctionTypeAnnotation") {
  148114. if (typeof opts === "undefined") {
  148115. return true;
  148116. } else {
  148117. return (0, _shallowEqual.default)(node, opts);
  148118. }
  148119. }
  148120. return false;
  148121. }
  148122. function isFunctionTypeParam(node, opts) {
  148123. if (!node)
  148124. return false;
  148125. const nodeType = node.type;
  148126. if (nodeType === "FunctionTypeParam") {
  148127. if (typeof opts === "undefined") {
  148128. return true;
  148129. } else {
  148130. return (0, _shallowEqual.default)(node, opts);
  148131. }
  148132. }
  148133. return false;
  148134. }
  148135. function isGenericTypeAnnotation(node, opts) {
  148136. if (!node)
  148137. return false;
  148138. const nodeType = node.type;
  148139. if (nodeType === "GenericTypeAnnotation") {
  148140. if (typeof opts === "undefined") {
  148141. return true;
  148142. } else {
  148143. return (0, _shallowEqual.default)(node, opts);
  148144. }
  148145. }
  148146. return false;
  148147. }
  148148. function isInferredPredicate(node, opts) {
  148149. if (!node)
  148150. return false;
  148151. const nodeType = node.type;
  148152. if (nodeType === "InferredPredicate") {
  148153. if (typeof opts === "undefined") {
  148154. return true;
  148155. } else {
  148156. return (0, _shallowEqual.default)(node, opts);
  148157. }
  148158. }
  148159. return false;
  148160. }
  148161. function isInterfaceExtends(node, opts) {
  148162. if (!node)
  148163. return false;
  148164. const nodeType = node.type;
  148165. if (nodeType === "InterfaceExtends") {
  148166. if (typeof opts === "undefined") {
  148167. return true;
  148168. } else {
  148169. return (0, _shallowEqual.default)(node, opts);
  148170. }
  148171. }
  148172. return false;
  148173. }
  148174. function isInterfaceDeclaration(node, opts) {
  148175. if (!node)
  148176. return false;
  148177. const nodeType = node.type;
  148178. if (nodeType === "InterfaceDeclaration") {
  148179. if (typeof opts === "undefined") {
  148180. return true;
  148181. } else {
  148182. return (0, _shallowEqual.default)(node, opts);
  148183. }
  148184. }
  148185. return false;
  148186. }
  148187. function isInterfaceTypeAnnotation(node, opts) {
  148188. if (!node)
  148189. return false;
  148190. const nodeType = node.type;
  148191. if (nodeType === "InterfaceTypeAnnotation") {
  148192. if (typeof opts === "undefined") {
  148193. return true;
  148194. } else {
  148195. return (0, _shallowEqual.default)(node, opts);
  148196. }
  148197. }
  148198. return false;
  148199. }
  148200. function isIntersectionTypeAnnotation(node, opts) {
  148201. if (!node)
  148202. return false;
  148203. const nodeType = node.type;
  148204. if (nodeType === "IntersectionTypeAnnotation") {
  148205. if (typeof opts === "undefined") {
  148206. return true;
  148207. } else {
  148208. return (0, _shallowEqual.default)(node, opts);
  148209. }
  148210. }
  148211. return false;
  148212. }
  148213. function isMixedTypeAnnotation(node, opts) {
  148214. if (!node)
  148215. return false;
  148216. const nodeType = node.type;
  148217. if (nodeType === "MixedTypeAnnotation") {
  148218. if (typeof opts === "undefined") {
  148219. return true;
  148220. } else {
  148221. return (0, _shallowEqual.default)(node, opts);
  148222. }
  148223. }
  148224. return false;
  148225. }
  148226. function isEmptyTypeAnnotation(node, opts) {
  148227. if (!node)
  148228. return false;
  148229. const nodeType = node.type;
  148230. if (nodeType === "EmptyTypeAnnotation") {
  148231. if (typeof opts === "undefined") {
  148232. return true;
  148233. } else {
  148234. return (0, _shallowEqual.default)(node, opts);
  148235. }
  148236. }
  148237. return false;
  148238. }
  148239. function isNullableTypeAnnotation(node, opts) {
  148240. if (!node)
  148241. return false;
  148242. const nodeType = node.type;
  148243. if (nodeType === "NullableTypeAnnotation") {
  148244. if (typeof opts === "undefined") {
  148245. return true;
  148246. } else {
  148247. return (0, _shallowEqual.default)(node, opts);
  148248. }
  148249. }
  148250. return false;
  148251. }
  148252. function isNumberLiteralTypeAnnotation(node, opts) {
  148253. if (!node)
  148254. return false;
  148255. const nodeType = node.type;
  148256. if (nodeType === "NumberLiteralTypeAnnotation") {
  148257. if (typeof opts === "undefined") {
  148258. return true;
  148259. } else {
  148260. return (0, _shallowEqual.default)(node, opts);
  148261. }
  148262. }
  148263. return false;
  148264. }
  148265. function isNumberTypeAnnotation(node, opts) {
  148266. if (!node)
  148267. return false;
  148268. const nodeType = node.type;
  148269. if (nodeType === "NumberTypeAnnotation") {
  148270. if (typeof opts === "undefined") {
  148271. return true;
  148272. } else {
  148273. return (0, _shallowEqual.default)(node, opts);
  148274. }
  148275. }
  148276. return false;
  148277. }
  148278. function isObjectTypeAnnotation(node, opts) {
  148279. if (!node)
  148280. return false;
  148281. const nodeType = node.type;
  148282. if (nodeType === "ObjectTypeAnnotation") {
  148283. if (typeof opts === "undefined") {
  148284. return true;
  148285. } else {
  148286. return (0, _shallowEqual.default)(node, opts);
  148287. }
  148288. }
  148289. return false;
  148290. }
  148291. function isObjectTypeInternalSlot(node, opts) {
  148292. if (!node)
  148293. return false;
  148294. const nodeType = node.type;
  148295. if (nodeType === "ObjectTypeInternalSlot") {
  148296. if (typeof opts === "undefined") {
  148297. return true;
  148298. } else {
  148299. return (0, _shallowEqual.default)(node, opts);
  148300. }
  148301. }
  148302. return false;
  148303. }
  148304. function isObjectTypeCallProperty(node, opts) {
  148305. if (!node)
  148306. return false;
  148307. const nodeType = node.type;
  148308. if (nodeType === "ObjectTypeCallProperty") {
  148309. if (typeof opts === "undefined") {
  148310. return true;
  148311. } else {
  148312. return (0, _shallowEqual.default)(node, opts);
  148313. }
  148314. }
  148315. return false;
  148316. }
  148317. function isObjectTypeIndexer(node, opts) {
  148318. if (!node)
  148319. return false;
  148320. const nodeType = node.type;
  148321. if (nodeType === "ObjectTypeIndexer") {
  148322. if (typeof opts === "undefined") {
  148323. return true;
  148324. } else {
  148325. return (0, _shallowEqual.default)(node, opts);
  148326. }
  148327. }
  148328. return false;
  148329. }
  148330. function isObjectTypeProperty(node, opts) {
  148331. if (!node)
  148332. return false;
  148333. const nodeType = node.type;
  148334. if (nodeType === "ObjectTypeProperty") {
  148335. if (typeof opts === "undefined") {
  148336. return true;
  148337. } else {
  148338. return (0, _shallowEqual.default)(node, opts);
  148339. }
  148340. }
  148341. return false;
  148342. }
  148343. function isObjectTypeSpreadProperty(node, opts) {
  148344. if (!node)
  148345. return false;
  148346. const nodeType = node.type;
  148347. if (nodeType === "ObjectTypeSpreadProperty") {
  148348. if (typeof opts === "undefined") {
  148349. return true;
  148350. } else {
  148351. return (0, _shallowEqual.default)(node, opts);
  148352. }
  148353. }
  148354. return false;
  148355. }
  148356. function isOpaqueType(node, opts) {
  148357. if (!node)
  148358. return false;
  148359. const nodeType = node.type;
  148360. if (nodeType === "OpaqueType") {
  148361. if (typeof opts === "undefined") {
  148362. return true;
  148363. } else {
  148364. return (0, _shallowEqual.default)(node, opts);
  148365. }
  148366. }
  148367. return false;
  148368. }
  148369. function isQualifiedTypeIdentifier(node, opts) {
  148370. if (!node)
  148371. return false;
  148372. const nodeType = node.type;
  148373. if (nodeType === "QualifiedTypeIdentifier") {
  148374. if (typeof opts === "undefined") {
  148375. return true;
  148376. } else {
  148377. return (0, _shallowEqual.default)(node, opts);
  148378. }
  148379. }
  148380. return false;
  148381. }
  148382. function isStringLiteralTypeAnnotation(node, opts) {
  148383. if (!node)
  148384. return false;
  148385. const nodeType = node.type;
  148386. if (nodeType === "StringLiteralTypeAnnotation") {
  148387. if (typeof opts === "undefined") {
  148388. return true;
  148389. } else {
  148390. return (0, _shallowEqual.default)(node, opts);
  148391. }
  148392. }
  148393. return false;
  148394. }
  148395. function isStringTypeAnnotation(node, opts) {
  148396. if (!node)
  148397. return false;
  148398. const nodeType = node.type;
  148399. if (nodeType === "StringTypeAnnotation") {
  148400. if (typeof opts === "undefined") {
  148401. return true;
  148402. } else {
  148403. return (0, _shallowEqual.default)(node, opts);
  148404. }
  148405. }
  148406. return false;
  148407. }
  148408. function isSymbolTypeAnnotation(node, opts) {
  148409. if (!node)
  148410. return false;
  148411. const nodeType = node.type;
  148412. if (nodeType === "SymbolTypeAnnotation") {
  148413. if (typeof opts === "undefined") {
  148414. return true;
  148415. } else {
  148416. return (0, _shallowEqual.default)(node, opts);
  148417. }
  148418. }
  148419. return false;
  148420. }
  148421. function isThisTypeAnnotation(node, opts) {
  148422. if (!node)
  148423. return false;
  148424. const nodeType = node.type;
  148425. if (nodeType === "ThisTypeAnnotation") {
  148426. if (typeof opts === "undefined") {
  148427. return true;
  148428. } else {
  148429. return (0, _shallowEqual.default)(node, opts);
  148430. }
  148431. }
  148432. return false;
  148433. }
  148434. function isTupleTypeAnnotation(node, opts) {
  148435. if (!node)
  148436. return false;
  148437. const nodeType = node.type;
  148438. if (nodeType === "TupleTypeAnnotation") {
  148439. if (typeof opts === "undefined") {
  148440. return true;
  148441. } else {
  148442. return (0, _shallowEqual.default)(node, opts);
  148443. }
  148444. }
  148445. return false;
  148446. }
  148447. function isTypeofTypeAnnotation(node, opts) {
  148448. if (!node)
  148449. return false;
  148450. const nodeType = node.type;
  148451. if (nodeType === "TypeofTypeAnnotation") {
  148452. if (typeof opts === "undefined") {
  148453. return true;
  148454. } else {
  148455. return (0, _shallowEqual.default)(node, opts);
  148456. }
  148457. }
  148458. return false;
  148459. }
  148460. function isTypeAlias(node, opts) {
  148461. if (!node)
  148462. return false;
  148463. const nodeType = node.type;
  148464. if (nodeType === "TypeAlias") {
  148465. if (typeof opts === "undefined") {
  148466. return true;
  148467. } else {
  148468. return (0, _shallowEqual.default)(node, opts);
  148469. }
  148470. }
  148471. return false;
  148472. }
  148473. function isTypeAnnotation(node, opts) {
  148474. if (!node)
  148475. return false;
  148476. const nodeType = node.type;
  148477. if (nodeType === "TypeAnnotation") {
  148478. if (typeof opts === "undefined") {
  148479. return true;
  148480. } else {
  148481. return (0, _shallowEqual.default)(node, opts);
  148482. }
  148483. }
  148484. return false;
  148485. }
  148486. function isTypeCastExpression(node, opts) {
  148487. if (!node)
  148488. return false;
  148489. const nodeType = node.type;
  148490. if (nodeType === "TypeCastExpression") {
  148491. if (typeof opts === "undefined") {
  148492. return true;
  148493. } else {
  148494. return (0, _shallowEqual.default)(node, opts);
  148495. }
  148496. }
  148497. return false;
  148498. }
  148499. function isTypeParameter(node, opts) {
  148500. if (!node)
  148501. return false;
  148502. const nodeType = node.type;
  148503. if (nodeType === "TypeParameter") {
  148504. if (typeof opts === "undefined") {
  148505. return true;
  148506. } else {
  148507. return (0, _shallowEqual.default)(node, opts);
  148508. }
  148509. }
  148510. return false;
  148511. }
  148512. function isTypeParameterDeclaration(node, opts) {
  148513. if (!node)
  148514. return false;
  148515. const nodeType = node.type;
  148516. if (nodeType === "TypeParameterDeclaration") {
  148517. if (typeof opts === "undefined") {
  148518. return true;
  148519. } else {
  148520. return (0, _shallowEqual.default)(node, opts);
  148521. }
  148522. }
  148523. return false;
  148524. }
  148525. function isTypeParameterInstantiation(node, opts) {
  148526. if (!node)
  148527. return false;
  148528. const nodeType = node.type;
  148529. if (nodeType === "TypeParameterInstantiation") {
  148530. if (typeof opts === "undefined") {
  148531. return true;
  148532. } else {
  148533. return (0, _shallowEqual.default)(node, opts);
  148534. }
  148535. }
  148536. return false;
  148537. }
  148538. function isUnionTypeAnnotation(node, opts) {
  148539. if (!node)
  148540. return false;
  148541. const nodeType = node.type;
  148542. if (nodeType === "UnionTypeAnnotation") {
  148543. if (typeof opts === "undefined") {
  148544. return true;
  148545. } else {
  148546. return (0, _shallowEqual.default)(node, opts);
  148547. }
  148548. }
  148549. return false;
  148550. }
  148551. function isVariance(node, opts) {
  148552. if (!node)
  148553. return false;
  148554. const nodeType = node.type;
  148555. if (nodeType === "Variance") {
  148556. if (typeof opts === "undefined") {
  148557. return true;
  148558. } else {
  148559. return (0, _shallowEqual.default)(node, opts);
  148560. }
  148561. }
  148562. return false;
  148563. }
  148564. function isVoidTypeAnnotation(node, opts) {
  148565. if (!node)
  148566. return false;
  148567. const nodeType = node.type;
  148568. if (nodeType === "VoidTypeAnnotation") {
  148569. if (typeof opts === "undefined") {
  148570. return true;
  148571. } else {
  148572. return (0, _shallowEqual.default)(node, opts);
  148573. }
  148574. }
  148575. return false;
  148576. }
  148577. function isEnumDeclaration(node, opts) {
  148578. if (!node)
  148579. return false;
  148580. const nodeType = node.type;
  148581. if (nodeType === "EnumDeclaration") {
  148582. if (typeof opts === "undefined") {
  148583. return true;
  148584. } else {
  148585. return (0, _shallowEqual.default)(node, opts);
  148586. }
  148587. }
  148588. return false;
  148589. }
  148590. function isEnumBooleanBody(node, opts) {
  148591. if (!node)
  148592. return false;
  148593. const nodeType = node.type;
  148594. if (nodeType === "EnumBooleanBody") {
  148595. if (typeof opts === "undefined") {
  148596. return true;
  148597. } else {
  148598. return (0, _shallowEqual.default)(node, opts);
  148599. }
  148600. }
  148601. return false;
  148602. }
  148603. function isEnumNumberBody(node, opts) {
  148604. if (!node)
  148605. return false;
  148606. const nodeType = node.type;
  148607. if (nodeType === "EnumNumberBody") {
  148608. if (typeof opts === "undefined") {
  148609. return true;
  148610. } else {
  148611. return (0, _shallowEqual.default)(node, opts);
  148612. }
  148613. }
  148614. return false;
  148615. }
  148616. function isEnumStringBody(node, opts) {
  148617. if (!node)
  148618. return false;
  148619. const nodeType = node.type;
  148620. if (nodeType === "EnumStringBody") {
  148621. if (typeof opts === "undefined") {
  148622. return true;
  148623. } else {
  148624. return (0, _shallowEqual.default)(node, opts);
  148625. }
  148626. }
  148627. return false;
  148628. }
  148629. function isEnumSymbolBody(node, opts) {
  148630. if (!node)
  148631. return false;
  148632. const nodeType = node.type;
  148633. if (nodeType === "EnumSymbolBody") {
  148634. if (typeof opts === "undefined") {
  148635. return true;
  148636. } else {
  148637. return (0, _shallowEqual.default)(node, opts);
  148638. }
  148639. }
  148640. return false;
  148641. }
  148642. function isEnumBooleanMember(node, opts) {
  148643. if (!node)
  148644. return false;
  148645. const nodeType = node.type;
  148646. if (nodeType === "EnumBooleanMember") {
  148647. if (typeof opts === "undefined") {
  148648. return true;
  148649. } else {
  148650. return (0, _shallowEqual.default)(node, opts);
  148651. }
  148652. }
  148653. return false;
  148654. }
  148655. function isEnumNumberMember(node, opts) {
  148656. if (!node)
  148657. return false;
  148658. const nodeType = node.type;
  148659. if (nodeType === "EnumNumberMember") {
  148660. if (typeof opts === "undefined") {
  148661. return true;
  148662. } else {
  148663. return (0, _shallowEqual.default)(node, opts);
  148664. }
  148665. }
  148666. return false;
  148667. }
  148668. function isEnumStringMember(node, opts) {
  148669. if (!node)
  148670. return false;
  148671. const nodeType = node.type;
  148672. if (nodeType === "EnumStringMember") {
  148673. if (typeof opts === "undefined") {
  148674. return true;
  148675. } else {
  148676. return (0, _shallowEqual.default)(node, opts);
  148677. }
  148678. }
  148679. return false;
  148680. }
  148681. function isEnumDefaultedMember(node, opts) {
  148682. if (!node)
  148683. return false;
  148684. const nodeType = node.type;
  148685. if (nodeType === "EnumDefaultedMember") {
  148686. if (typeof opts === "undefined") {
  148687. return true;
  148688. } else {
  148689. return (0, _shallowEqual.default)(node, opts);
  148690. }
  148691. }
  148692. return false;
  148693. }
  148694. function isIndexedAccessType(node, opts) {
  148695. if (!node)
  148696. return false;
  148697. const nodeType = node.type;
  148698. if (nodeType === "IndexedAccessType") {
  148699. if (typeof opts === "undefined") {
  148700. return true;
  148701. } else {
  148702. return (0, _shallowEqual.default)(node, opts);
  148703. }
  148704. }
  148705. return false;
  148706. }
  148707. function isOptionalIndexedAccessType(node, opts) {
  148708. if (!node)
  148709. return false;
  148710. const nodeType = node.type;
  148711. if (nodeType === "OptionalIndexedAccessType") {
  148712. if (typeof opts === "undefined") {
  148713. return true;
  148714. } else {
  148715. return (0, _shallowEqual.default)(node, opts);
  148716. }
  148717. }
  148718. return false;
  148719. }
  148720. function isJSXAttribute(node, opts) {
  148721. if (!node)
  148722. return false;
  148723. const nodeType = node.type;
  148724. if (nodeType === "JSXAttribute") {
  148725. if (typeof opts === "undefined") {
  148726. return true;
  148727. } else {
  148728. return (0, _shallowEqual.default)(node, opts);
  148729. }
  148730. }
  148731. return false;
  148732. }
  148733. function isJSXClosingElement(node, opts) {
  148734. if (!node)
  148735. return false;
  148736. const nodeType = node.type;
  148737. if (nodeType === "JSXClosingElement") {
  148738. if (typeof opts === "undefined") {
  148739. return true;
  148740. } else {
  148741. return (0, _shallowEqual.default)(node, opts);
  148742. }
  148743. }
  148744. return false;
  148745. }
  148746. function isJSXElement2(node, opts) {
  148747. if (!node)
  148748. return false;
  148749. const nodeType = node.type;
  148750. if (nodeType === "JSXElement") {
  148751. if (typeof opts === "undefined") {
  148752. return true;
  148753. } else {
  148754. return (0, _shallowEqual.default)(node, opts);
  148755. }
  148756. }
  148757. return false;
  148758. }
  148759. function isJSXEmptyExpression(node, opts) {
  148760. if (!node)
  148761. return false;
  148762. const nodeType = node.type;
  148763. if (nodeType === "JSXEmptyExpression") {
  148764. if (typeof opts === "undefined") {
  148765. return true;
  148766. } else {
  148767. return (0, _shallowEqual.default)(node, opts);
  148768. }
  148769. }
  148770. return false;
  148771. }
  148772. function isJSXExpressionContainer2(node, opts) {
  148773. if (!node)
  148774. return false;
  148775. const nodeType = node.type;
  148776. if (nodeType === "JSXExpressionContainer") {
  148777. if (typeof opts === "undefined") {
  148778. return true;
  148779. } else {
  148780. return (0, _shallowEqual.default)(node, opts);
  148781. }
  148782. }
  148783. return false;
  148784. }
  148785. function isJSXSpreadChild(node, opts) {
  148786. if (!node)
  148787. return false;
  148788. const nodeType = node.type;
  148789. if (nodeType === "JSXSpreadChild") {
  148790. if (typeof opts === "undefined") {
  148791. return true;
  148792. } else {
  148793. return (0, _shallowEqual.default)(node, opts);
  148794. }
  148795. }
  148796. return false;
  148797. }
  148798. function isJSXIdentifier2(node, opts) {
  148799. if (!node)
  148800. return false;
  148801. const nodeType = node.type;
  148802. if (nodeType === "JSXIdentifier") {
  148803. if (typeof opts === "undefined") {
  148804. return true;
  148805. } else {
  148806. return (0, _shallowEqual.default)(node, opts);
  148807. }
  148808. }
  148809. return false;
  148810. }
  148811. function isJSXMemberExpression(node, opts) {
  148812. if (!node)
  148813. return false;
  148814. const nodeType = node.type;
  148815. if (nodeType === "JSXMemberExpression") {
  148816. if (typeof opts === "undefined") {
  148817. return true;
  148818. } else {
  148819. return (0, _shallowEqual.default)(node, opts);
  148820. }
  148821. }
  148822. return false;
  148823. }
  148824. function isJSXNamespacedName(node, opts) {
  148825. if (!node)
  148826. return false;
  148827. const nodeType = node.type;
  148828. if (nodeType === "JSXNamespacedName") {
  148829. if (typeof opts === "undefined") {
  148830. return true;
  148831. } else {
  148832. return (0, _shallowEqual.default)(node, opts);
  148833. }
  148834. }
  148835. return false;
  148836. }
  148837. function isJSXOpeningElement(node, opts) {
  148838. if (!node)
  148839. return false;
  148840. const nodeType = node.type;
  148841. if (nodeType === "JSXOpeningElement") {
  148842. if (typeof opts === "undefined") {
  148843. return true;
  148844. } else {
  148845. return (0, _shallowEqual.default)(node, opts);
  148846. }
  148847. }
  148848. return false;
  148849. }
  148850. function isJSXSpreadAttribute(node, opts) {
  148851. if (!node)
  148852. return false;
  148853. const nodeType = node.type;
  148854. if (nodeType === "JSXSpreadAttribute") {
  148855. if (typeof opts === "undefined") {
  148856. return true;
  148857. } else {
  148858. return (0, _shallowEqual.default)(node, opts);
  148859. }
  148860. }
  148861. return false;
  148862. }
  148863. function isJSXText(node, opts) {
  148864. if (!node)
  148865. return false;
  148866. const nodeType = node.type;
  148867. if (nodeType === "JSXText") {
  148868. if (typeof opts === "undefined") {
  148869. return true;
  148870. } else {
  148871. return (0, _shallowEqual.default)(node, opts);
  148872. }
  148873. }
  148874. return false;
  148875. }
  148876. function isJSXFragment2(node, opts) {
  148877. if (!node)
  148878. return false;
  148879. const nodeType = node.type;
  148880. if (nodeType === "JSXFragment") {
  148881. if (typeof opts === "undefined") {
  148882. return true;
  148883. } else {
  148884. return (0, _shallowEqual.default)(node, opts);
  148885. }
  148886. }
  148887. return false;
  148888. }
  148889. function isJSXOpeningFragment(node, opts) {
  148890. if (!node)
  148891. return false;
  148892. const nodeType = node.type;
  148893. if (nodeType === "JSXOpeningFragment") {
  148894. if (typeof opts === "undefined") {
  148895. return true;
  148896. } else {
  148897. return (0, _shallowEqual.default)(node, opts);
  148898. }
  148899. }
  148900. return false;
  148901. }
  148902. function isJSXClosingFragment(node, opts) {
  148903. if (!node)
  148904. return false;
  148905. const nodeType = node.type;
  148906. if (nodeType === "JSXClosingFragment") {
  148907. if (typeof opts === "undefined") {
  148908. return true;
  148909. } else {
  148910. return (0, _shallowEqual.default)(node, opts);
  148911. }
  148912. }
  148913. return false;
  148914. }
  148915. function isNoop(node, opts) {
  148916. if (!node)
  148917. return false;
  148918. const nodeType = node.type;
  148919. if (nodeType === "Noop") {
  148920. if (typeof opts === "undefined") {
  148921. return true;
  148922. } else {
  148923. return (0, _shallowEqual.default)(node, opts);
  148924. }
  148925. }
  148926. return false;
  148927. }
  148928. function isPlaceholder(node, opts) {
  148929. if (!node)
  148930. return false;
  148931. const nodeType = node.type;
  148932. if (nodeType === "Placeholder") {
  148933. if (typeof opts === "undefined") {
  148934. return true;
  148935. } else {
  148936. return (0, _shallowEqual.default)(node, opts);
  148937. }
  148938. }
  148939. return false;
  148940. }
  148941. function isV8IntrinsicIdentifier(node, opts) {
  148942. if (!node)
  148943. return false;
  148944. const nodeType = node.type;
  148945. if (nodeType === "V8IntrinsicIdentifier") {
  148946. if (typeof opts === "undefined") {
  148947. return true;
  148948. } else {
  148949. return (0, _shallowEqual.default)(node, opts);
  148950. }
  148951. }
  148952. return false;
  148953. }
  148954. function isArgumentPlaceholder(node, opts) {
  148955. if (!node)
  148956. return false;
  148957. const nodeType = node.type;
  148958. if (nodeType === "ArgumentPlaceholder") {
  148959. if (typeof opts === "undefined") {
  148960. return true;
  148961. } else {
  148962. return (0, _shallowEqual.default)(node, opts);
  148963. }
  148964. }
  148965. return false;
  148966. }
  148967. function isBindExpression(node, opts) {
  148968. if (!node)
  148969. return false;
  148970. const nodeType = node.type;
  148971. if (nodeType === "BindExpression") {
  148972. if (typeof opts === "undefined") {
  148973. return true;
  148974. } else {
  148975. return (0, _shallowEqual.default)(node, opts);
  148976. }
  148977. }
  148978. return false;
  148979. }
  148980. function isClassProperty(node, opts) {
  148981. if (!node)
  148982. return false;
  148983. const nodeType = node.type;
  148984. if (nodeType === "ClassProperty") {
  148985. if (typeof opts === "undefined") {
  148986. return true;
  148987. } else {
  148988. return (0, _shallowEqual.default)(node, opts);
  148989. }
  148990. }
  148991. return false;
  148992. }
  148993. function isPipelineTopicExpression(node, opts) {
  148994. if (!node)
  148995. return false;
  148996. const nodeType = node.type;
  148997. if (nodeType === "PipelineTopicExpression") {
  148998. if (typeof opts === "undefined") {
  148999. return true;
  149000. } else {
  149001. return (0, _shallowEqual.default)(node, opts);
  149002. }
  149003. }
  149004. return false;
  149005. }
  149006. function isPipelineBareFunction(node, opts) {
  149007. if (!node)
  149008. return false;
  149009. const nodeType = node.type;
  149010. if (nodeType === "PipelineBareFunction") {
  149011. if (typeof opts === "undefined") {
  149012. return true;
  149013. } else {
  149014. return (0, _shallowEqual.default)(node, opts);
  149015. }
  149016. }
  149017. return false;
  149018. }
  149019. function isPipelinePrimaryTopicReference(node, opts) {
  149020. if (!node)
  149021. return false;
  149022. const nodeType = node.type;
  149023. if (nodeType === "PipelinePrimaryTopicReference") {
  149024. if (typeof opts === "undefined") {
  149025. return true;
  149026. } else {
  149027. return (0, _shallowEqual.default)(node, opts);
  149028. }
  149029. }
  149030. return false;
  149031. }
  149032. function isClassPrivateProperty(node, opts) {
  149033. if (!node)
  149034. return false;
  149035. const nodeType = node.type;
  149036. if (nodeType === "ClassPrivateProperty") {
  149037. if (typeof opts === "undefined") {
  149038. return true;
  149039. } else {
  149040. return (0, _shallowEqual.default)(node, opts);
  149041. }
  149042. }
  149043. return false;
  149044. }
  149045. function isClassPrivateMethod(node, opts) {
  149046. if (!node)
  149047. return false;
  149048. const nodeType = node.type;
  149049. if (nodeType === "ClassPrivateMethod") {
  149050. if (typeof opts === "undefined") {
  149051. return true;
  149052. } else {
  149053. return (0, _shallowEqual.default)(node, opts);
  149054. }
  149055. }
  149056. return false;
  149057. }
  149058. function isImportAttribute(node, opts) {
  149059. if (!node)
  149060. return false;
  149061. const nodeType = node.type;
  149062. if (nodeType === "ImportAttribute") {
  149063. if (typeof opts === "undefined") {
  149064. return true;
  149065. } else {
  149066. return (0, _shallowEqual.default)(node, opts);
  149067. }
  149068. }
  149069. return false;
  149070. }
  149071. function isDecorator(node, opts) {
  149072. if (!node)
  149073. return false;
  149074. const nodeType = node.type;
  149075. if (nodeType === "Decorator") {
  149076. if (typeof opts === "undefined") {
  149077. return true;
  149078. } else {
  149079. return (0, _shallowEqual.default)(node, opts);
  149080. }
  149081. }
  149082. return false;
  149083. }
  149084. function isDoExpression(node, opts) {
  149085. if (!node)
  149086. return false;
  149087. const nodeType = node.type;
  149088. if (nodeType === "DoExpression") {
  149089. if (typeof opts === "undefined") {
  149090. return true;
  149091. } else {
  149092. return (0, _shallowEqual.default)(node, opts);
  149093. }
  149094. }
  149095. return false;
  149096. }
  149097. function isExportDefaultSpecifier(node, opts) {
  149098. if (!node)
  149099. return false;
  149100. const nodeType = node.type;
  149101. if (nodeType === "ExportDefaultSpecifier") {
  149102. if (typeof opts === "undefined") {
  149103. return true;
  149104. } else {
  149105. return (0, _shallowEqual.default)(node, opts);
  149106. }
  149107. }
  149108. return false;
  149109. }
  149110. function isPrivateName(node, opts) {
  149111. if (!node)
  149112. return false;
  149113. const nodeType = node.type;
  149114. if (nodeType === "PrivateName") {
  149115. if (typeof opts === "undefined") {
  149116. return true;
  149117. } else {
  149118. return (0, _shallowEqual.default)(node, opts);
  149119. }
  149120. }
  149121. return false;
  149122. }
  149123. function isRecordExpression(node, opts) {
  149124. if (!node)
  149125. return false;
  149126. const nodeType = node.type;
  149127. if (nodeType === "RecordExpression") {
  149128. if (typeof opts === "undefined") {
  149129. return true;
  149130. } else {
  149131. return (0, _shallowEqual.default)(node, opts);
  149132. }
  149133. }
  149134. return false;
  149135. }
  149136. function isTupleExpression(node, opts) {
  149137. if (!node)
  149138. return false;
  149139. const nodeType = node.type;
  149140. if (nodeType === "TupleExpression") {
  149141. if (typeof opts === "undefined") {
  149142. return true;
  149143. } else {
  149144. return (0, _shallowEqual.default)(node, opts);
  149145. }
  149146. }
  149147. return false;
  149148. }
  149149. function isDecimalLiteral(node, opts) {
  149150. if (!node)
  149151. return false;
  149152. const nodeType = node.type;
  149153. if (nodeType === "DecimalLiteral") {
  149154. if (typeof opts === "undefined") {
  149155. return true;
  149156. } else {
  149157. return (0, _shallowEqual.default)(node, opts);
  149158. }
  149159. }
  149160. return false;
  149161. }
  149162. function isStaticBlock(node, opts) {
  149163. if (!node)
  149164. return false;
  149165. const nodeType = node.type;
  149166. if (nodeType === "StaticBlock") {
  149167. if (typeof opts === "undefined") {
  149168. return true;
  149169. } else {
  149170. return (0, _shallowEqual.default)(node, opts);
  149171. }
  149172. }
  149173. return false;
  149174. }
  149175. function isModuleExpression(node, opts) {
  149176. if (!node)
  149177. return false;
  149178. const nodeType = node.type;
  149179. if (nodeType === "ModuleExpression") {
  149180. if (typeof opts === "undefined") {
  149181. return true;
  149182. } else {
  149183. return (0, _shallowEqual.default)(node, opts);
  149184. }
  149185. }
  149186. return false;
  149187. }
  149188. function isTSParameterProperty(node, opts) {
  149189. if (!node)
  149190. return false;
  149191. const nodeType = node.type;
  149192. if (nodeType === "TSParameterProperty") {
  149193. if (typeof opts === "undefined") {
  149194. return true;
  149195. } else {
  149196. return (0, _shallowEqual.default)(node, opts);
  149197. }
  149198. }
  149199. return false;
  149200. }
  149201. function isTSDeclareFunction(node, opts) {
  149202. if (!node)
  149203. return false;
  149204. const nodeType = node.type;
  149205. if (nodeType === "TSDeclareFunction") {
  149206. if (typeof opts === "undefined") {
  149207. return true;
  149208. } else {
  149209. return (0, _shallowEqual.default)(node, opts);
  149210. }
  149211. }
  149212. return false;
  149213. }
  149214. function isTSDeclareMethod(node, opts) {
  149215. if (!node)
  149216. return false;
  149217. const nodeType = node.type;
  149218. if (nodeType === "TSDeclareMethod") {
  149219. if (typeof opts === "undefined") {
  149220. return true;
  149221. } else {
  149222. return (0, _shallowEqual.default)(node, opts);
  149223. }
  149224. }
  149225. return false;
  149226. }
  149227. function isTSQualifiedName(node, opts) {
  149228. if (!node)
  149229. return false;
  149230. const nodeType = node.type;
  149231. if (nodeType === "TSQualifiedName") {
  149232. if (typeof opts === "undefined") {
  149233. return true;
  149234. } else {
  149235. return (0, _shallowEqual.default)(node, opts);
  149236. }
  149237. }
  149238. return false;
  149239. }
  149240. function isTSCallSignatureDeclaration(node, opts) {
  149241. if (!node)
  149242. return false;
  149243. const nodeType = node.type;
  149244. if (nodeType === "TSCallSignatureDeclaration") {
  149245. if (typeof opts === "undefined") {
  149246. return true;
  149247. } else {
  149248. return (0, _shallowEqual.default)(node, opts);
  149249. }
  149250. }
  149251. return false;
  149252. }
  149253. function isTSConstructSignatureDeclaration(node, opts) {
  149254. if (!node)
  149255. return false;
  149256. const nodeType = node.type;
  149257. if (nodeType === "TSConstructSignatureDeclaration") {
  149258. if (typeof opts === "undefined") {
  149259. return true;
  149260. } else {
  149261. return (0, _shallowEqual.default)(node, opts);
  149262. }
  149263. }
  149264. return false;
  149265. }
  149266. function isTSPropertySignature(node, opts) {
  149267. if (!node)
  149268. return false;
  149269. const nodeType = node.type;
  149270. if (nodeType === "TSPropertySignature") {
  149271. if (typeof opts === "undefined") {
  149272. return true;
  149273. } else {
  149274. return (0, _shallowEqual.default)(node, opts);
  149275. }
  149276. }
  149277. return false;
  149278. }
  149279. function isTSMethodSignature(node, opts) {
  149280. if (!node)
  149281. return false;
  149282. const nodeType = node.type;
  149283. if (nodeType === "TSMethodSignature") {
  149284. if (typeof opts === "undefined") {
  149285. return true;
  149286. } else {
  149287. return (0, _shallowEqual.default)(node, opts);
  149288. }
  149289. }
  149290. return false;
  149291. }
  149292. function isTSIndexSignature(node, opts) {
  149293. if (!node)
  149294. return false;
  149295. const nodeType = node.type;
  149296. if (nodeType === "TSIndexSignature") {
  149297. if (typeof opts === "undefined") {
  149298. return true;
  149299. } else {
  149300. return (0, _shallowEqual.default)(node, opts);
  149301. }
  149302. }
  149303. return false;
  149304. }
  149305. function isTSAnyKeyword(node, opts) {
  149306. if (!node)
  149307. return false;
  149308. const nodeType = node.type;
  149309. if (nodeType === "TSAnyKeyword") {
  149310. if (typeof opts === "undefined") {
  149311. return true;
  149312. } else {
  149313. return (0, _shallowEqual.default)(node, opts);
  149314. }
  149315. }
  149316. return false;
  149317. }
  149318. function isTSBooleanKeyword(node, opts) {
  149319. if (!node)
  149320. return false;
  149321. const nodeType = node.type;
  149322. if (nodeType === "TSBooleanKeyword") {
  149323. if (typeof opts === "undefined") {
  149324. return true;
  149325. } else {
  149326. return (0, _shallowEqual.default)(node, opts);
  149327. }
  149328. }
  149329. return false;
  149330. }
  149331. function isTSBigIntKeyword(node, opts) {
  149332. if (!node)
  149333. return false;
  149334. const nodeType = node.type;
  149335. if (nodeType === "TSBigIntKeyword") {
  149336. if (typeof opts === "undefined") {
  149337. return true;
  149338. } else {
  149339. return (0, _shallowEqual.default)(node, opts);
  149340. }
  149341. }
  149342. return false;
  149343. }
  149344. function isTSIntrinsicKeyword(node, opts) {
  149345. if (!node)
  149346. return false;
  149347. const nodeType = node.type;
  149348. if (nodeType === "TSIntrinsicKeyword") {
  149349. if (typeof opts === "undefined") {
  149350. return true;
  149351. } else {
  149352. return (0, _shallowEqual.default)(node, opts);
  149353. }
  149354. }
  149355. return false;
  149356. }
  149357. function isTSNeverKeyword(node, opts) {
  149358. if (!node)
  149359. return false;
  149360. const nodeType = node.type;
  149361. if (nodeType === "TSNeverKeyword") {
  149362. if (typeof opts === "undefined") {
  149363. return true;
  149364. } else {
  149365. return (0, _shallowEqual.default)(node, opts);
  149366. }
  149367. }
  149368. return false;
  149369. }
  149370. function isTSNullKeyword(node, opts) {
  149371. if (!node)
  149372. return false;
  149373. const nodeType = node.type;
  149374. if (nodeType === "TSNullKeyword") {
  149375. if (typeof opts === "undefined") {
  149376. return true;
  149377. } else {
  149378. return (0, _shallowEqual.default)(node, opts);
  149379. }
  149380. }
  149381. return false;
  149382. }
  149383. function isTSNumberKeyword(node, opts) {
  149384. if (!node)
  149385. return false;
  149386. const nodeType = node.type;
  149387. if (nodeType === "TSNumberKeyword") {
  149388. if (typeof opts === "undefined") {
  149389. return true;
  149390. } else {
  149391. return (0, _shallowEqual.default)(node, opts);
  149392. }
  149393. }
  149394. return false;
  149395. }
  149396. function isTSObjectKeyword(node, opts) {
  149397. if (!node)
  149398. return false;
  149399. const nodeType = node.type;
  149400. if (nodeType === "TSObjectKeyword") {
  149401. if (typeof opts === "undefined") {
  149402. return true;
  149403. } else {
  149404. return (0, _shallowEqual.default)(node, opts);
  149405. }
  149406. }
  149407. return false;
  149408. }
  149409. function isTSStringKeyword(node, opts) {
  149410. if (!node)
  149411. return false;
  149412. const nodeType = node.type;
  149413. if (nodeType === "TSStringKeyword") {
  149414. if (typeof opts === "undefined") {
  149415. return true;
  149416. } else {
  149417. return (0, _shallowEqual.default)(node, opts);
  149418. }
  149419. }
  149420. return false;
  149421. }
  149422. function isTSSymbolKeyword(node, opts) {
  149423. if (!node)
  149424. return false;
  149425. const nodeType = node.type;
  149426. if (nodeType === "TSSymbolKeyword") {
  149427. if (typeof opts === "undefined") {
  149428. return true;
  149429. } else {
  149430. return (0, _shallowEqual.default)(node, opts);
  149431. }
  149432. }
  149433. return false;
  149434. }
  149435. function isTSUndefinedKeyword(node, opts) {
  149436. if (!node)
  149437. return false;
  149438. const nodeType = node.type;
  149439. if (nodeType === "TSUndefinedKeyword") {
  149440. if (typeof opts === "undefined") {
  149441. return true;
  149442. } else {
  149443. return (0, _shallowEqual.default)(node, opts);
  149444. }
  149445. }
  149446. return false;
  149447. }
  149448. function isTSUnknownKeyword(node, opts) {
  149449. if (!node)
  149450. return false;
  149451. const nodeType = node.type;
  149452. if (nodeType === "TSUnknownKeyword") {
  149453. if (typeof opts === "undefined") {
  149454. return true;
  149455. } else {
  149456. return (0, _shallowEqual.default)(node, opts);
  149457. }
  149458. }
  149459. return false;
  149460. }
  149461. function isTSVoidKeyword(node, opts) {
  149462. if (!node)
  149463. return false;
  149464. const nodeType = node.type;
  149465. if (nodeType === "TSVoidKeyword") {
  149466. if (typeof opts === "undefined") {
  149467. return true;
  149468. } else {
  149469. return (0, _shallowEqual.default)(node, opts);
  149470. }
  149471. }
  149472. return false;
  149473. }
  149474. function isTSThisType(node, opts) {
  149475. if (!node)
  149476. return false;
  149477. const nodeType = node.type;
  149478. if (nodeType === "TSThisType") {
  149479. if (typeof opts === "undefined") {
  149480. return true;
  149481. } else {
  149482. return (0, _shallowEqual.default)(node, opts);
  149483. }
  149484. }
  149485. return false;
  149486. }
  149487. function isTSFunctionType(node, opts) {
  149488. if (!node)
  149489. return false;
  149490. const nodeType = node.type;
  149491. if (nodeType === "TSFunctionType") {
  149492. if (typeof opts === "undefined") {
  149493. return true;
  149494. } else {
  149495. return (0, _shallowEqual.default)(node, opts);
  149496. }
  149497. }
  149498. return false;
  149499. }
  149500. function isTSConstructorType(node, opts) {
  149501. if (!node)
  149502. return false;
  149503. const nodeType = node.type;
  149504. if (nodeType === "TSConstructorType") {
  149505. if (typeof opts === "undefined") {
  149506. return true;
  149507. } else {
  149508. return (0, _shallowEqual.default)(node, opts);
  149509. }
  149510. }
  149511. return false;
  149512. }
  149513. function isTSTypeReference(node, opts) {
  149514. if (!node)
  149515. return false;
  149516. const nodeType = node.type;
  149517. if (nodeType === "TSTypeReference") {
  149518. if (typeof opts === "undefined") {
  149519. return true;
  149520. } else {
  149521. return (0, _shallowEqual.default)(node, opts);
  149522. }
  149523. }
  149524. return false;
  149525. }
  149526. function isTSTypePredicate(node, opts) {
  149527. if (!node)
  149528. return false;
  149529. const nodeType = node.type;
  149530. if (nodeType === "TSTypePredicate") {
  149531. if (typeof opts === "undefined") {
  149532. return true;
  149533. } else {
  149534. return (0, _shallowEqual.default)(node, opts);
  149535. }
  149536. }
  149537. return false;
  149538. }
  149539. function isTSTypeQuery(node, opts) {
  149540. if (!node)
  149541. return false;
  149542. const nodeType = node.type;
  149543. if (nodeType === "TSTypeQuery") {
  149544. if (typeof opts === "undefined") {
  149545. return true;
  149546. } else {
  149547. return (0, _shallowEqual.default)(node, opts);
  149548. }
  149549. }
  149550. return false;
  149551. }
  149552. function isTSTypeLiteral(node, opts) {
  149553. if (!node)
  149554. return false;
  149555. const nodeType = node.type;
  149556. if (nodeType === "TSTypeLiteral") {
  149557. if (typeof opts === "undefined") {
  149558. return true;
  149559. } else {
  149560. return (0, _shallowEqual.default)(node, opts);
  149561. }
  149562. }
  149563. return false;
  149564. }
  149565. function isTSArrayType(node, opts) {
  149566. if (!node)
  149567. return false;
  149568. const nodeType = node.type;
  149569. if (nodeType === "TSArrayType") {
  149570. if (typeof opts === "undefined") {
  149571. return true;
  149572. } else {
  149573. return (0, _shallowEqual.default)(node, opts);
  149574. }
  149575. }
  149576. return false;
  149577. }
  149578. function isTSTupleType(node, opts) {
  149579. if (!node)
  149580. return false;
  149581. const nodeType = node.type;
  149582. if (nodeType === "TSTupleType") {
  149583. if (typeof opts === "undefined") {
  149584. return true;
  149585. } else {
  149586. return (0, _shallowEqual.default)(node, opts);
  149587. }
  149588. }
  149589. return false;
  149590. }
  149591. function isTSOptionalType(node, opts) {
  149592. if (!node)
  149593. return false;
  149594. const nodeType = node.type;
  149595. if (nodeType === "TSOptionalType") {
  149596. if (typeof opts === "undefined") {
  149597. return true;
  149598. } else {
  149599. return (0, _shallowEqual.default)(node, opts);
  149600. }
  149601. }
  149602. return false;
  149603. }
  149604. function isTSRestType(node, opts) {
  149605. if (!node)
  149606. return false;
  149607. const nodeType = node.type;
  149608. if (nodeType === "TSRestType") {
  149609. if (typeof opts === "undefined") {
  149610. return true;
  149611. } else {
  149612. return (0, _shallowEqual.default)(node, opts);
  149613. }
  149614. }
  149615. return false;
  149616. }
  149617. function isTSNamedTupleMember(node, opts) {
  149618. if (!node)
  149619. return false;
  149620. const nodeType = node.type;
  149621. if (nodeType === "TSNamedTupleMember") {
  149622. if (typeof opts === "undefined") {
  149623. return true;
  149624. } else {
  149625. return (0, _shallowEqual.default)(node, opts);
  149626. }
  149627. }
  149628. return false;
  149629. }
  149630. function isTSUnionType(node, opts) {
  149631. if (!node)
  149632. return false;
  149633. const nodeType = node.type;
  149634. if (nodeType === "TSUnionType") {
  149635. if (typeof opts === "undefined") {
  149636. return true;
  149637. } else {
  149638. return (0, _shallowEqual.default)(node, opts);
  149639. }
  149640. }
  149641. return false;
  149642. }
  149643. function isTSIntersectionType(node, opts) {
  149644. if (!node)
  149645. return false;
  149646. const nodeType = node.type;
  149647. if (nodeType === "TSIntersectionType") {
  149648. if (typeof opts === "undefined") {
  149649. return true;
  149650. } else {
  149651. return (0, _shallowEqual.default)(node, opts);
  149652. }
  149653. }
  149654. return false;
  149655. }
  149656. function isTSConditionalType(node, opts) {
  149657. if (!node)
  149658. return false;
  149659. const nodeType = node.type;
  149660. if (nodeType === "TSConditionalType") {
  149661. if (typeof opts === "undefined") {
  149662. return true;
  149663. } else {
  149664. return (0, _shallowEqual.default)(node, opts);
  149665. }
  149666. }
  149667. return false;
  149668. }
  149669. function isTSInferType(node, opts) {
  149670. if (!node)
  149671. return false;
  149672. const nodeType = node.type;
  149673. if (nodeType === "TSInferType") {
  149674. if (typeof opts === "undefined") {
  149675. return true;
  149676. } else {
  149677. return (0, _shallowEqual.default)(node, opts);
  149678. }
  149679. }
  149680. return false;
  149681. }
  149682. function isTSParenthesizedType(node, opts) {
  149683. if (!node)
  149684. return false;
  149685. const nodeType = node.type;
  149686. if (nodeType === "TSParenthesizedType") {
  149687. if (typeof opts === "undefined") {
  149688. return true;
  149689. } else {
  149690. return (0, _shallowEqual.default)(node, opts);
  149691. }
  149692. }
  149693. return false;
  149694. }
  149695. function isTSTypeOperator(node, opts) {
  149696. if (!node)
  149697. return false;
  149698. const nodeType = node.type;
  149699. if (nodeType === "TSTypeOperator") {
  149700. if (typeof opts === "undefined") {
  149701. return true;
  149702. } else {
  149703. return (0, _shallowEqual.default)(node, opts);
  149704. }
  149705. }
  149706. return false;
  149707. }
  149708. function isTSIndexedAccessType(node, opts) {
  149709. if (!node)
  149710. return false;
  149711. const nodeType = node.type;
  149712. if (nodeType === "TSIndexedAccessType") {
  149713. if (typeof opts === "undefined") {
  149714. return true;
  149715. } else {
  149716. return (0, _shallowEqual.default)(node, opts);
  149717. }
  149718. }
  149719. return false;
  149720. }
  149721. function isTSMappedType(node, opts) {
  149722. if (!node)
  149723. return false;
  149724. const nodeType = node.type;
  149725. if (nodeType === "TSMappedType") {
  149726. if (typeof opts === "undefined") {
  149727. return true;
  149728. } else {
  149729. return (0, _shallowEqual.default)(node, opts);
  149730. }
  149731. }
  149732. return false;
  149733. }
  149734. function isTSLiteralType(node, opts) {
  149735. if (!node)
  149736. return false;
  149737. const nodeType = node.type;
  149738. if (nodeType === "TSLiteralType") {
  149739. if (typeof opts === "undefined") {
  149740. return true;
  149741. } else {
  149742. return (0, _shallowEqual.default)(node, opts);
  149743. }
  149744. }
  149745. return false;
  149746. }
  149747. function isTSExpressionWithTypeArguments(node, opts) {
  149748. if (!node)
  149749. return false;
  149750. const nodeType = node.type;
  149751. if (nodeType === "TSExpressionWithTypeArguments") {
  149752. if (typeof opts === "undefined") {
  149753. return true;
  149754. } else {
  149755. return (0, _shallowEqual.default)(node, opts);
  149756. }
  149757. }
  149758. return false;
  149759. }
  149760. function isTSInterfaceDeclaration(node, opts) {
  149761. if (!node)
  149762. return false;
  149763. const nodeType = node.type;
  149764. if (nodeType === "TSInterfaceDeclaration") {
  149765. if (typeof opts === "undefined") {
  149766. return true;
  149767. } else {
  149768. return (0, _shallowEqual.default)(node, opts);
  149769. }
  149770. }
  149771. return false;
  149772. }
  149773. function isTSInterfaceBody(node, opts) {
  149774. if (!node)
  149775. return false;
  149776. const nodeType = node.type;
  149777. if (nodeType === "TSInterfaceBody") {
  149778. if (typeof opts === "undefined") {
  149779. return true;
  149780. } else {
  149781. return (0, _shallowEqual.default)(node, opts);
  149782. }
  149783. }
  149784. return false;
  149785. }
  149786. function isTSTypeAliasDeclaration(node, opts) {
  149787. if (!node)
  149788. return false;
  149789. const nodeType = node.type;
  149790. if (nodeType === "TSTypeAliasDeclaration") {
  149791. if (typeof opts === "undefined") {
  149792. return true;
  149793. } else {
  149794. return (0, _shallowEqual.default)(node, opts);
  149795. }
  149796. }
  149797. return false;
  149798. }
  149799. function isTSAsExpression(node, opts) {
  149800. if (!node)
  149801. return false;
  149802. const nodeType = node.type;
  149803. if (nodeType === "TSAsExpression") {
  149804. if (typeof opts === "undefined") {
  149805. return true;
  149806. } else {
  149807. return (0, _shallowEqual.default)(node, opts);
  149808. }
  149809. }
  149810. return false;
  149811. }
  149812. function isTSTypeAssertion(node, opts) {
  149813. if (!node)
  149814. return false;
  149815. const nodeType = node.type;
  149816. if (nodeType === "TSTypeAssertion") {
  149817. if (typeof opts === "undefined") {
  149818. return true;
  149819. } else {
  149820. return (0, _shallowEqual.default)(node, opts);
  149821. }
  149822. }
  149823. return false;
  149824. }
  149825. function isTSEnumDeclaration(node, opts) {
  149826. if (!node)
  149827. return false;
  149828. const nodeType = node.type;
  149829. if (nodeType === "TSEnumDeclaration") {
  149830. if (typeof opts === "undefined") {
  149831. return true;
  149832. } else {
  149833. return (0, _shallowEqual.default)(node, opts);
  149834. }
  149835. }
  149836. return false;
  149837. }
  149838. function isTSEnumMember(node, opts) {
  149839. if (!node)
  149840. return false;
  149841. const nodeType = node.type;
  149842. if (nodeType === "TSEnumMember") {
  149843. if (typeof opts === "undefined") {
  149844. return true;
  149845. } else {
  149846. return (0, _shallowEqual.default)(node, opts);
  149847. }
  149848. }
  149849. return false;
  149850. }
  149851. function isTSModuleDeclaration(node, opts) {
  149852. if (!node)
  149853. return false;
  149854. const nodeType = node.type;
  149855. if (nodeType === "TSModuleDeclaration") {
  149856. if (typeof opts === "undefined") {
  149857. return true;
  149858. } else {
  149859. return (0, _shallowEqual.default)(node, opts);
  149860. }
  149861. }
  149862. return false;
  149863. }
  149864. function isTSModuleBlock(node, opts) {
  149865. if (!node)
  149866. return false;
  149867. const nodeType = node.type;
  149868. if (nodeType === "TSModuleBlock") {
  149869. if (typeof opts === "undefined") {
  149870. return true;
  149871. } else {
  149872. return (0, _shallowEqual.default)(node, opts);
  149873. }
  149874. }
  149875. return false;
  149876. }
  149877. function isTSImportType(node, opts) {
  149878. if (!node)
  149879. return false;
  149880. const nodeType = node.type;
  149881. if (nodeType === "TSImportType") {
  149882. if (typeof opts === "undefined") {
  149883. return true;
  149884. } else {
  149885. return (0, _shallowEqual.default)(node, opts);
  149886. }
  149887. }
  149888. return false;
  149889. }
  149890. function isTSImportEqualsDeclaration(node, opts) {
  149891. if (!node)
  149892. return false;
  149893. const nodeType = node.type;
  149894. if (nodeType === "TSImportEqualsDeclaration") {
  149895. if (typeof opts === "undefined") {
  149896. return true;
  149897. } else {
  149898. return (0, _shallowEqual.default)(node, opts);
  149899. }
  149900. }
  149901. return false;
  149902. }
  149903. function isTSExternalModuleReference(node, opts) {
  149904. if (!node)
  149905. return false;
  149906. const nodeType = node.type;
  149907. if (nodeType === "TSExternalModuleReference") {
  149908. if (typeof opts === "undefined") {
  149909. return true;
  149910. } else {
  149911. return (0, _shallowEqual.default)(node, opts);
  149912. }
  149913. }
  149914. return false;
  149915. }
  149916. function isTSNonNullExpression(node, opts) {
  149917. if (!node)
  149918. return false;
  149919. const nodeType = node.type;
  149920. if (nodeType === "TSNonNullExpression") {
  149921. if (typeof opts === "undefined") {
  149922. return true;
  149923. } else {
  149924. return (0, _shallowEqual.default)(node, opts);
  149925. }
  149926. }
  149927. return false;
  149928. }
  149929. function isTSExportAssignment(node, opts) {
  149930. if (!node)
  149931. return false;
  149932. const nodeType = node.type;
  149933. if (nodeType === "TSExportAssignment") {
  149934. if (typeof opts === "undefined") {
  149935. return true;
  149936. } else {
  149937. return (0, _shallowEqual.default)(node, opts);
  149938. }
  149939. }
  149940. return false;
  149941. }
  149942. function isTSNamespaceExportDeclaration(node, opts) {
  149943. if (!node)
  149944. return false;
  149945. const nodeType = node.type;
  149946. if (nodeType === "TSNamespaceExportDeclaration") {
  149947. if (typeof opts === "undefined") {
  149948. return true;
  149949. } else {
  149950. return (0, _shallowEqual.default)(node, opts);
  149951. }
  149952. }
  149953. return false;
  149954. }
  149955. function isTSTypeAnnotation(node, opts) {
  149956. if (!node)
  149957. return false;
  149958. const nodeType = node.type;
  149959. if (nodeType === "TSTypeAnnotation") {
  149960. if (typeof opts === "undefined") {
  149961. return true;
  149962. } else {
  149963. return (0, _shallowEqual.default)(node, opts);
  149964. }
  149965. }
  149966. return false;
  149967. }
  149968. function isTSTypeParameterInstantiation(node, opts) {
  149969. if (!node)
  149970. return false;
  149971. const nodeType = node.type;
  149972. if (nodeType === "TSTypeParameterInstantiation") {
  149973. if (typeof opts === "undefined") {
  149974. return true;
  149975. } else {
  149976. return (0, _shallowEqual.default)(node, opts);
  149977. }
  149978. }
  149979. return false;
  149980. }
  149981. function isTSTypeParameterDeclaration(node, opts) {
  149982. if (!node)
  149983. return false;
  149984. const nodeType = node.type;
  149985. if (nodeType === "TSTypeParameterDeclaration") {
  149986. if (typeof opts === "undefined") {
  149987. return true;
  149988. } else {
  149989. return (0, _shallowEqual.default)(node, opts);
  149990. }
  149991. }
  149992. return false;
  149993. }
  149994. function isTSTypeParameter(node, opts) {
  149995. if (!node)
  149996. return false;
  149997. const nodeType = node.type;
  149998. if (nodeType === "TSTypeParameter") {
  149999. if (typeof opts === "undefined") {
  150000. return true;
  150001. } else {
  150002. return (0, _shallowEqual.default)(node, opts);
  150003. }
  150004. }
  150005. return false;
  150006. }
  150007. function isExpression(node, opts) {
  150008. if (!node)
  150009. return false;
  150010. const nodeType = node.type;
  150011. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  150012. if (typeof opts === "undefined") {
  150013. return true;
  150014. } else {
  150015. return (0, _shallowEqual.default)(node, opts);
  150016. }
  150017. }
  150018. return false;
  150019. }
  150020. function isBinary(node, opts) {
  150021. if (!node)
  150022. return false;
  150023. const nodeType = node.type;
  150024. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  150025. if (typeof opts === "undefined") {
  150026. return true;
  150027. } else {
  150028. return (0, _shallowEqual.default)(node, opts);
  150029. }
  150030. }
  150031. return false;
  150032. }
  150033. function isScopable(node, opts) {
  150034. if (!node)
  150035. return false;
  150036. const nodeType = node.type;
  150037. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  150038. if (typeof opts === "undefined") {
  150039. return true;
  150040. } else {
  150041. return (0, _shallowEqual.default)(node, opts);
  150042. }
  150043. }
  150044. return false;
  150045. }
  150046. function isBlockParent(node, opts) {
  150047. if (!node)
  150048. return false;
  150049. const nodeType = node.type;
  150050. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  150051. if (typeof opts === "undefined") {
  150052. return true;
  150053. } else {
  150054. return (0, _shallowEqual.default)(node, opts);
  150055. }
  150056. }
  150057. return false;
  150058. }
  150059. function isBlock(node, opts) {
  150060. if (!node)
  150061. return false;
  150062. const nodeType = node.type;
  150063. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  150064. if (typeof opts === "undefined") {
  150065. return true;
  150066. } else {
  150067. return (0, _shallowEqual.default)(node, opts);
  150068. }
  150069. }
  150070. return false;
  150071. }
  150072. function isStatement(node, opts) {
  150073. if (!node)
  150074. return false;
  150075. const nodeType = node.type;
  150076. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  150077. if (typeof opts === "undefined") {
  150078. return true;
  150079. } else {
  150080. return (0, _shallowEqual.default)(node, opts);
  150081. }
  150082. }
  150083. return false;
  150084. }
  150085. function isTerminatorless(node, opts) {
  150086. if (!node)
  150087. return false;
  150088. const nodeType = node.type;
  150089. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  150090. if (typeof opts === "undefined") {
  150091. return true;
  150092. } else {
  150093. return (0, _shallowEqual.default)(node, opts);
  150094. }
  150095. }
  150096. return false;
  150097. }
  150098. function isCompletionStatement(node, opts) {
  150099. if (!node)
  150100. return false;
  150101. const nodeType = node.type;
  150102. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  150103. if (typeof opts === "undefined") {
  150104. return true;
  150105. } else {
  150106. return (0, _shallowEqual.default)(node, opts);
  150107. }
  150108. }
  150109. return false;
  150110. }
  150111. function isConditional(node, opts) {
  150112. if (!node)
  150113. return false;
  150114. const nodeType = node.type;
  150115. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  150116. if (typeof opts === "undefined") {
  150117. return true;
  150118. } else {
  150119. return (0, _shallowEqual.default)(node, opts);
  150120. }
  150121. }
  150122. return false;
  150123. }
  150124. function isLoop(node, opts) {
  150125. if (!node)
  150126. return false;
  150127. const nodeType = node.type;
  150128. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  150129. if (typeof opts === "undefined") {
  150130. return true;
  150131. } else {
  150132. return (0, _shallowEqual.default)(node, opts);
  150133. }
  150134. }
  150135. return false;
  150136. }
  150137. function isWhile(node, opts) {
  150138. if (!node)
  150139. return false;
  150140. const nodeType = node.type;
  150141. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  150142. if (typeof opts === "undefined") {
  150143. return true;
  150144. } else {
  150145. return (0, _shallowEqual.default)(node, opts);
  150146. }
  150147. }
  150148. return false;
  150149. }
  150150. function isExpressionWrapper(node, opts) {
  150151. if (!node)
  150152. return false;
  150153. const nodeType = node.type;
  150154. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  150155. if (typeof opts === "undefined") {
  150156. return true;
  150157. } else {
  150158. return (0, _shallowEqual.default)(node, opts);
  150159. }
  150160. }
  150161. return false;
  150162. }
  150163. function isFor(node, opts) {
  150164. if (!node)
  150165. return false;
  150166. const nodeType = node.type;
  150167. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  150168. if (typeof opts === "undefined") {
  150169. return true;
  150170. } else {
  150171. return (0, _shallowEqual.default)(node, opts);
  150172. }
  150173. }
  150174. return false;
  150175. }
  150176. function isForXStatement(node, opts) {
  150177. if (!node)
  150178. return false;
  150179. const nodeType = node.type;
  150180. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  150181. if (typeof opts === "undefined") {
  150182. return true;
  150183. } else {
  150184. return (0, _shallowEqual.default)(node, opts);
  150185. }
  150186. }
  150187. return false;
  150188. }
  150189. function isFunction(node, opts) {
  150190. if (!node)
  150191. return false;
  150192. const nodeType = node.type;
  150193. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  150194. if (typeof opts === "undefined") {
  150195. return true;
  150196. } else {
  150197. return (0, _shallowEqual.default)(node, opts);
  150198. }
  150199. }
  150200. return false;
  150201. }
  150202. function isFunctionParent(node, opts) {
  150203. if (!node)
  150204. return false;
  150205. const nodeType = node.type;
  150206. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  150207. if (typeof opts === "undefined") {
  150208. return true;
  150209. } else {
  150210. return (0, _shallowEqual.default)(node, opts);
  150211. }
  150212. }
  150213. return false;
  150214. }
  150215. function isPureish(node, opts) {
  150216. if (!node)
  150217. return false;
  150218. const nodeType = node.type;
  150219. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  150220. if (typeof opts === "undefined") {
  150221. return true;
  150222. } else {
  150223. return (0, _shallowEqual.default)(node, opts);
  150224. }
  150225. }
  150226. return false;
  150227. }
  150228. function isDeclaration2(node, opts) {
  150229. if (!node)
  150230. return false;
  150231. const nodeType = node.type;
  150232. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  150233. if (typeof opts === "undefined") {
  150234. return true;
  150235. } else {
  150236. return (0, _shallowEqual.default)(node, opts);
  150237. }
  150238. }
  150239. return false;
  150240. }
  150241. function isPatternLike(node, opts) {
  150242. if (!node)
  150243. return false;
  150244. const nodeType = node.type;
  150245. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  150246. if (typeof opts === "undefined") {
  150247. return true;
  150248. } else {
  150249. return (0, _shallowEqual.default)(node, opts);
  150250. }
  150251. }
  150252. return false;
  150253. }
  150254. function isLVal(node, opts) {
  150255. if (!node)
  150256. return false;
  150257. const nodeType = node.type;
  150258. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  150259. if (typeof opts === "undefined") {
  150260. return true;
  150261. } else {
  150262. return (0, _shallowEqual.default)(node, opts);
  150263. }
  150264. }
  150265. return false;
  150266. }
  150267. function isTSEntityName(node, opts) {
  150268. if (!node)
  150269. return false;
  150270. const nodeType = node.type;
  150271. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  150272. if (typeof opts === "undefined") {
  150273. return true;
  150274. } else {
  150275. return (0, _shallowEqual.default)(node, opts);
  150276. }
  150277. }
  150278. return false;
  150279. }
  150280. function isLiteral(node, opts) {
  150281. if (!node)
  150282. return false;
  150283. const nodeType = node.type;
  150284. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  150285. if (typeof opts === "undefined") {
  150286. return true;
  150287. } else {
  150288. return (0, _shallowEqual.default)(node, opts);
  150289. }
  150290. }
  150291. return false;
  150292. }
  150293. function isImmutable(node, opts) {
  150294. if (!node)
  150295. return false;
  150296. const nodeType = node.type;
  150297. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  150298. if (typeof opts === "undefined") {
  150299. return true;
  150300. } else {
  150301. return (0, _shallowEqual.default)(node, opts);
  150302. }
  150303. }
  150304. return false;
  150305. }
  150306. function isUserWhitespacable(node, opts) {
  150307. if (!node)
  150308. return false;
  150309. const nodeType = node.type;
  150310. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  150311. if (typeof opts === "undefined") {
  150312. return true;
  150313. } else {
  150314. return (0, _shallowEqual.default)(node, opts);
  150315. }
  150316. }
  150317. return false;
  150318. }
  150319. function isMethod(node, opts) {
  150320. if (!node)
  150321. return false;
  150322. const nodeType = node.type;
  150323. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  150324. if (typeof opts === "undefined") {
  150325. return true;
  150326. } else {
  150327. return (0, _shallowEqual.default)(node, opts);
  150328. }
  150329. }
  150330. return false;
  150331. }
  150332. function isObjectMember(node, opts) {
  150333. if (!node)
  150334. return false;
  150335. const nodeType = node.type;
  150336. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  150337. if (typeof opts === "undefined") {
  150338. return true;
  150339. } else {
  150340. return (0, _shallowEqual.default)(node, opts);
  150341. }
  150342. }
  150343. return false;
  150344. }
  150345. function isProperty(node, opts) {
  150346. if (!node)
  150347. return false;
  150348. const nodeType = node.type;
  150349. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  150350. if (typeof opts === "undefined") {
  150351. return true;
  150352. } else {
  150353. return (0, _shallowEqual.default)(node, opts);
  150354. }
  150355. }
  150356. return false;
  150357. }
  150358. function isUnaryLike(node, opts) {
  150359. if (!node)
  150360. return false;
  150361. const nodeType = node.type;
  150362. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  150363. if (typeof opts === "undefined") {
  150364. return true;
  150365. } else {
  150366. return (0, _shallowEqual.default)(node, opts);
  150367. }
  150368. }
  150369. return false;
  150370. }
  150371. function isPattern(node, opts) {
  150372. if (!node)
  150373. return false;
  150374. const nodeType = node.type;
  150375. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  150376. if (typeof opts === "undefined") {
  150377. return true;
  150378. } else {
  150379. return (0, _shallowEqual.default)(node, opts);
  150380. }
  150381. }
  150382. return false;
  150383. }
  150384. function isClass(node, opts) {
  150385. if (!node)
  150386. return false;
  150387. const nodeType = node.type;
  150388. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  150389. if (typeof opts === "undefined") {
  150390. return true;
  150391. } else {
  150392. return (0, _shallowEqual.default)(node, opts);
  150393. }
  150394. }
  150395. return false;
  150396. }
  150397. function isModuleDeclaration(node, opts) {
  150398. if (!node)
  150399. return false;
  150400. const nodeType = node.type;
  150401. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  150402. if (typeof opts === "undefined") {
  150403. return true;
  150404. } else {
  150405. return (0, _shallowEqual.default)(node, opts);
  150406. }
  150407. }
  150408. return false;
  150409. }
  150410. function isExportDeclaration(node, opts) {
  150411. if (!node)
  150412. return false;
  150413. const nodeType = node.type;
  150414. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  150415. if (typeof opts === "undefined") {
  150416. return true;
  150417. } else {
  150418. return (0, _shallowEqual.default)(node, opts);
  150419. }
  150420. }
  150421. return false;
  150422. }
  150423. function isModuleSpecifier(node, opts) {
  150424. if (!node)
  150425. return false;
  150426. const nodeType = node.type;
  150427. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  150428. if (typeof opts === "undefined") {
  150429. return true;
  150430. } else {
  150431. return (0, _shallowEqual.default)(node, opts);
  150432. }
  150433. }
  150434. return false;
  150435. }
  150436. function isFlow(node, opts) {
  150437. if (!node)
  150438. return false;
  150439. const nodeType = node.type;
  150440. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  150441. if (typeof opts === "undefined") {
  150442. return true;
  150443. } else {
  150444. return (0, _shallowEqual.default)(node, opts);
  150445. }
  150446. }
  150447. return false;
  150448. }
  150449. function isFlowType(node, opts) {
  150450. if (!node)
  150451. return false;
  150452. const nodeType = node.type;
  150453. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  150454. if (typeof opts === "undefined") {
  150455. return true;
  150456. } else {
  150457. return (0, _shallowEqual.default)(node, opts);
  150458. }
  150459. }
  150460. return false;
  150461. }
  150462. function isFlowBaseAnnotation(node, opts) {
  150463. if (!node)
  150464. return false;
  150465. const nodeType = node.type;
  150466. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  150467. if (typeof opts === "undefined") {
  150468. return true;
  150469. } else {
  150470. return (0, _shallowEqual.default)(node, opts);
  150471. }
  150472. }
  150473. return false;
  150474. }
  150475. function isFlowDeclaration(node, opts) {
  150476. if (!node)
  150477. return false;
  150478. const nodeType = node.type;
  150479. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  150480. if (typeof opts === "undefined") {
  150481. return true;
  150482. } else {
  150483. return (0, _shallowEqual.default)(node, opts);
  150484. }
  150485. }
  150486. return false;
  150487. }
  150488. function isFlowPredicate(node, opts) {
  150489. if (!node)
  150490. return false;
  150491. const nodeType = node.type;
  150492. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  150493. if (typeof opts === "undefined") {
  150494. return true;
  150495. } else {
  150496. return (0, _shallowEqual.default)(node, opts);
  150497. }
  150498. }
  150499. return false;
  150500. }
  150501. function isEnumBody(node, opts) {
  150502. if (!node)
  150503. return false;
  150504. const nodeType = node.type;
  150505. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  150506. if (typeof opts === "undefined") {
  150507. return true;
  150508. } else {
  150509. return (0, _shallowEqual.default)(node, opts);
  150510. }
  150511. }
  150512. return false;
  150513. }
  150514. function isEnumMember(node, opts) {
  150515. if (!node)
  150516. return false;
  150517. const nodeType = node.type;
  150518. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  150519. if (typeof opts === "undefined") {
  150520. return true;
  150521. } else {
  150522. return (0, _shallowEqual.default)(node, opts);
  150523. }
  150524. }
  150525. return false;
  150526. }
  150527. function isJSX(node, opts) {
  150528. if (!node)
  150529. return false;
  150530. const nodeType = node.type;
  150531. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  150532. if (typeof opts === "undefined") {
  150533. return true;
  150534. } else {
  150535. return (0, _shallowEqual.default)(node, opts);
  150536. }
  150537. }
  150538. return false;
  150539. }
  150540. function isPrivate(node, opts) {
  150541. if (!node)
  150542. return false;
  150543. const nodeType = node.type;
  150544. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  150545. if (typeof opts === "undefined") {
  150546. return true;
  150547. } else {
  150548. return (0, _shallowEqual.default)(node, opts);
  150549. }
  150550. }
  150551. return false;
  150552. }
  150553. function isTSTypeElement(node, opts) {
  150554. if (!node)
  150555. return false;
  150556. const nodeType = node.type;
  150557. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  150558. if (typeof opts === "undefined") {
  150559. return true;
  150560. } else {
  150561. return (0, _shallowEqual.default)(node, opts);
  150562. }
  150563. }
  150564. return false;
  150565. }
  150566. function isTSType(node, opts) {
  150567. if (!node)
  150568. return false;
  150569. const nodeType = node.type;
  150570. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  150571. if (typeof opts === "undefined") {
  150572. return true;
  150573. } else {
  150574. return (0, _shallowEqual.default)(node, opts);
  150575. }
  150576. }
  150577. return false;
  150578. }
  150579. function isTSBaseType(node, opts) {
  150580. if (!node)
  150581. return false;
  150582. const nodeType = node.type;
  150583. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  150584. if (typeof opts === "undefined") {
  150585. return true;
  150586. } else {
  150587. return (0, _shallowEqual.default)(node, opts);
  150588. }
  150589. }
  150590. return false;
  150591. }
  150592. function isNumberLiteral(node, opts) {
  150593. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  150594. if (!node)
  150595. return false;
  150596. const nodeType = node.type;
  150597. if (nodeType === "NumberLiteral") {
  150598. if (typeof opts === "undefined") {
  150599. return true;
  150600. } else {
  150601. return (0, _shallowEqual.default)(node, opts);
  150602. }
  150603. }
  150604. return false;
  150605. }
  150606. function isRegexLiteral(node, opts) {
  150607. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  150608. if (!node)
  150609. return false;
  150610. const nodeType = node.type;
  150611. if (nodeType === "RegexLiteral") {
  150612. if (typeof opts === "undefined") {
  150613. return true;
  150614. } else {
  150615. return (0, _shallowEqual.default)(node, opts);
  150616. }
  150617. }
  150618. return false;
  150619. }
  150620. function isRestProperty(node, opts) {
  150621. console.trace("The node type RestProperty has been renamed to RestElement");
  150622. if (!node)
  150623. return false;
  150624. const nodeType = node.type;
  150625. if (nodeType === "RestProperty") {
  150626. if (typeof opts === "undefined") {
  150627. return true;
  150628. } else {
  150629. return (0, _shallowEqual.default)(node, opts);
  150630. }
  150631. }
  150632. return false;
  150633. }
  150634. function isSpreadProperty(node, opts) {
  150635. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  150636. if (!node)
  150637. return false;
  150638. const nodeType = node.type;
  150639. if (nodeType === "SpreadProperty") {
  150640. if (typeof opts === "undefined") {
  150641. return true;
  150642. } else {
  150643. return (0, _shallowEqual.default)(node, opts);
  150644. }
  150645. }
  150646. return false;
  150647. }
  150648. }
  150649. });
  150650. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/matchesPattern.js
  150651. var require_matchesPattern7 = __commonJS({
  150652. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  150653. "use strict";
  150654. Object.defineProperty(exports, "__esModule", {
  150655. value: true
  150656. });
  150657. exports.default = matchesPattern;
  150658. var _generated = require_generated31();
  150659. function matchesPattern(member, match, allowPartial) {
  150660. if (!(0, _generated.isMemberExpression)(member))
  150661. return false;
  150662. const parts = Array.isArray(match) ? match : match.split(".");
  150663. const nodes = [];
  150664. let node;
  150665. for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
  150666. nodes.push(node.property);
  150667. }
  150668. nodes.push(node);
  150669. if (nodes.length < parts.length)
  150670. return false;
  150671. if (!allowPartial && nodes.length > parts.length)
  150672. return false;
  150673. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  150674. const node2 = nodes[j];
  150675. let value;
  150676. if ((0, _generated.isIdentifier)(node2)) {
  150677. value = node2.name;
  150678. } else if ((0, _generated.isStringLiteral)(node2)) {
  150679. value = node2.value;
  150680. } else if ((0, _generated.isThisExpression)(node2)) {
  150681. value = "this";
  150682. } else {
  150683. return false;
  150684. }
  150685. if (parts[i] !== value)
  150686. return false;
  150687. }
  150688. return true;
  150689. }
  150690. }
  150691. });
  150692. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  150693. var require_buildMatchMemberExpression7 = __commonJS({
  150694. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  150695. "use strict";
  150696. Object.defineProperty(exports, "__esModule", {
  150697. value: true
  150698. });
  150699. exports.default = buildMatchMemberExpression;
  150700. var _matchesPattern = require_matchesPattern7();
  150701. function buildMatchMemberExpression(match, allowPartial) {
  150702. const parts = match.split(".");
  150703. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  150704. }
  150705. }
  150706. });
  150707. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/react/isReactComponent.js
  150708. var require_isReactComponent7 = __commonJS({
  150709. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  150710. "use strict";
  150711. Object.defineProperty(exports, "__esModule", {
  150712. value: true
  150713. });
  150714. exports.default = void 0;
  150715. var _buildMatchMemberExpression = require_buildMatchMemberExpression7();
  150716. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  150717. var _default = isReactComponent;
  150718. exports.default = _default;
  150719. }
  150720. });
  150721. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/react/isCompatTag.js
  150722. var require_isCompatTag7 = __commonJS({
  150723. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  150724. "use strict";
  150725. Object.defineProperty(exports, "__esModule", {
  150726. value: true
  150727. });
  150728. exports.default = isCompatTag;
  150729. function isCompatTag(tagName) {
  150730. return !!tagName && /^[a-z]/.test(tagName);
  150731. }
  150732. }
  150733. });
  150734. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isType.js
  150735. var require_isType7 = __commonJS({
  150736. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isType.js"(exports) {
  150737. "use strict";
  150738. Object.defineProperty(exports, "__esModule", {
  150739. value: true
  150740. });
  150741. exports.default = isType;
  150742. var _definitions = require_definitions7();
  150743. function isType(nodeType, targetType) {
  150744. if (nodeType === targetType)
  150745. return true;
  150746. if (_definitions.ALIAS_KEYS[targetType])
  150747. return false;
  150748. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  150749. if (aliases) {
  150750. if (aliases[0] === nodeType)
  150751. return true;
  150752. for (const alias of aliases) {
  150753. if (nodeType === alias)
  150754. return true;
  150755. }
  150756. }
  150757. return false;
  150758. }
  150759. }
  150760. });
  150761. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isPlaceholderType.js
  150762. var require_isPlaceholderType7 = __commonJS({
  150763. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  150764. "use strict";
  150765. Object.defineProperty(exports, "__esModule", {
  150766. value: true
  150767. });
  150768. exports.default = isPlaceholderType;
  150769. var _definitions = require_definitions7();
  150770. function isPlaceholderType(placeholderType, targetType) {
  150771. if (placeholderType === targetType)
  150772. return true;
  150773. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  150774. if (aliases) {
  150775. for (const alias of aliases) {
  150776. if (targetType === alias)
  150777. return true;
  150778. }
  150779. }
  150780. return false;
  150781. }
  150782. }
  150783. });
  150784. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/is.js
  150785. var require_is7 = __commonJS({
  150786. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/is.js"(exports) {
  150787. "use strict";
  150788. Object.defineProperty(exports, "__esModule", {
  150789. value: true
  150790. });
  150791. exports.default = is;
  150792. var _shallowEqual = require_shallowEqual7();
  150793. var _isType = require_isType7();
  150794. var _isPlaceholderType = require_isPlaceholderType7();
  150795. var _definitions = require_definitions7();
  150796. function is(type, node, opts) {
  150797. if (!node)
  150798. return false;
  150799. const matches = (0, _isType.default)(node.type, type);
  150800. if (!matches) {
  150801. if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  150802. return (0, _isPlaceholderType.default)(node.expectedNode, type);
  150803. }
  150804. return false;
  150805. }
  150806. if (typeof opts === "undefined") {
  150807. return true;
  150808. } else {
  150809. return (0, _shallowEqual.default)(node, opts);
  150810. }
  150811. }
  150812. }
  150813. });
  150814. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidIdentifier.js
  150815. var require_isValidIdentifier7 = __commonJS({
  150816. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  150817. "use strict";
  150818. Object.defineProperty(exports, "__esModule", {
  150819. value: true
  150820. });
  150821. exports.default = isValidIdentifier;
  150822. var _helperValidatorIdentifier = require_lib19();
  150823. function isValidIdentifier(name2, reserved = true) {
  150824. if (typeof name2 !== "string")
  150825. return false;
  150826. if (reserved) {
  150827. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  150828. return false;
  150829. }
  150830. }
  150831. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  150832. }
  150833. }
  150834. });
  150835. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/constants/index.js
  150836. var require_constants7 = __commonJS({
  150837. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/constants/index.js"(exports) {
  150838. "use strict";
  150839. Object.defineProperty(exports, "__esModule", {
  150840. value: true
  150841. });
  150842. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
  150843. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  150844. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  150845. var FLATTENABLE_KEYS = ["body", "expressions"];
  150846. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  150847. var FOR_INIT_KEYS = ["left", "init"];
  150848. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  150849. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  150850. exports.COMMENT_KEYS = COMMENT_KEYS;
  150851. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  150852. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  150853. var UPDATE_OPERATORS = ["++", "--"];
  150854. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  150855. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  150856. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  150857. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  150858. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  150859. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  150860. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  150861. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  150862. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  150863. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  150864. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  150865. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
  150866. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  150867. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  150868. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  150869. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  150870. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  150871. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  150872. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  150873. var STRING_UNARY_OPERATORS = ["typeof"];
  150874. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  150875. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  150876. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  150877. var INHERIT_KEYS = {
  150878. optional: ["typeAnnotation", "typeParameters", "returnType"],
  150879. force: ["start", "loc", "end"]
  150880. };
  150881. exports.INHERIT_KEYS = INHERIT_KEYS;
  150882. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  150883. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  150884. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  150885. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  150886. }
  150887. });
  150888. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/validate.js
  150889. var require_validate7 = __commonJS({
  150890. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/validate.js"(exports) {
  150891. "use strict";
  150892. Object.defineProperty(exports, "__esModule", {
  150893. value: true
  150894. });
  150895. exports.default = validate;
  150896. exports.validateField = validateField;
  150897. exports.validateChild = validateChild;
  150898. var _definitions = require_definitions7();
  150899. function validate(node, key, val) {
  150900. if (!node)
  150901. return;
  150902. const fields = _definitions.NODE_FIELDS[node.type];
  150903. if (!fields)
  150904. return;
  150905. const field = fields[key];
  150906. validateField(node, key, val, field);
  150907. validateChild(node, key, val);
  150908. }
  150909. function validateField(node, key, val, field) {
  150910. if (!(field != null && field.validate))
  150911. return;
  150912. if (field.optional && val == null)
  150913. return;
  150914. field.validate(node, key, val);
  150915. }
  150916. function validateChild(node, key, val) {
  150917. if (val == null)
  150918. return;
  150919. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  150920. if (!validate2)
  150921. return;
  150922. validate2(node, key, val);
  150923. }
  150924. }
  150925. });
  150926. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/utils.js
  150927. var require_utils7 = __commonJS({
  150928. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  150929. "use strict";
  150930. Object.defineProperty(exports, "__esModule", {
  150931. value: true
  150932. });
  150933. exports.validate = validate;
  150934. exports.typeIs = typeIs;
  150935. exports.validateType = validateType;
  150936. exports.validateOptional = validateOptional;
  150937. exports.validateOptionalType = validateOptionalType;
  150938. exports.arrayOf = arrayOf;
  150939. exports.arrayOfType = arrayOfType;
  150940. exports.validateArrayOfType = validateArrayOfType;
  150941. exports.assertEach = assertEach;
  150942. exports.assertOneOf = assertOneOf;
  150943. exports.assertNodeType = assertNodeType;
  150944. exports.assertNodeOrValueType = assertNodeOrValueType;
  150945. exports.assertValueType = assertValueType;
  150946. exports.assertShape = assertShape;
  150947. exports.assertOptionalChainStart = assertOptionalChainStart;
  150948. exports.chain = chain;
  150949. exports.default = defineType;
  150950. exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
  150951. var _is = require_is7();
  150952. var _validate = require_validate7();
  150953. var VISITOR_KEYS = {};
  150954. exports.VISITOR_KEYS = VISITOR_KEYS;
  150955. var ALIAS_KEYS = {};
  150956. exports.ALIAS_KEYS = ALIAS_KEYS;
  150957. var FLIPPED_ALIAS_KEYS = {};
  150958. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  150959. var NODE_FIELDS = {};
  150960. exports.NODE_FIELDS = NODE_FIELDS;
  150961. var BUILDER_KEYS = {};
  150962. exports.BUILDER_KEYS = BUILDER_KEYS;
  150963. var DEPRECATED_KEYS = {};
  150964. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  150965. var NODE_PARENT_VALIDATIONS = {};
  150966. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  150967. function getType(val) {
  150968. if (Array.isArray(val)) {
  150969. return "array";
  150970. } else if (val === null) {
  150971. return "null";
  150972. } else {
  150973. return typeof val;
  150974. }
  150975. }
  150976. function validate(validate2) {
  150977. return {
  150978. validate: validate2
  150979. };
  150980. }
  150981. function typeIs(typeName) {
  150982. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  150983. }
  150984. function validateType(typeName) {
  150985. return validate(typeIs(typeName));
  150986. }
  150987. function validateOptional(validate2) {
  150988. return {
  150989. validate: validate2,
  150990. optional: true
  150991. };
  150992. }
  150993. function validateOptionalType(typeName) {
  150994. return {
  150995. validate: typeIs(typeName),
  150996. optional: true
  150997. };
  150998. }
  150999. function arrayOf(elementType) {
  151000. return chain(assertValueType("array"), assertEach(elementType));
  151001. }
  151002. function arrayOfType(typeName) {
  151003. return arrayOf(typeIs(typeName));
  151004. }
  151005. function validateArrayOfType(typeName) {
  151006. return validate(arrayOfType(typeName));
  151007. }
  151008. function assertEach(callback) {
  151009. function validator(node, key, val) {
  151010. if (!Array.isArray(val))
  151011. return;
  151012. for (let i = 0; i < val.length; i++) {
  151013. const subkey = `${key}[${i}]`;
  151014. const v = val[i];
  151015. callback(node, subkey, v);
  151016. if (process.env.BABEL_TYPES_8_BREAKING)
  151017. (0, _validate.validateChild)(node, subkey, v);
  151018. }
  151019. }
  151020. validator.each = callback;
  151021. return validator;
  151022. }
  151023. function assertOneOf(...values) {
  151024. function validate2(node, key, val) {
  151025. if (values.indexOf(val) < 0) {
  151026. throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  151027. }
  151028. }
  151029. validate2.oneOf = values;
  151030. return validate2;
  151031. }
  151032. function assertNodeType(...types2) {
  151033. function validate2(node, key, val) {
  151034. for (const type of types2) {
  151035. if ((0, _is.default)(type, val)) {
  151036. (0, _validate.validateChild)(node, key, val);
  151037. return;
  151038. }
  151039. }
  151040. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  151041. }
  151042. validate2.oneOfNodeTypes = types2;
  151043. return validate2;
  151044. }
  151045. function assertNodeOrValueType(...types2) {
  151046. function validate2(node, key, val) {
  151047. for (const type of types2) {
  151048. if (getType(val) === type || (0, _is.default)(type, val)) {
  151049. (0, _validate.validateChild)(node, key, val);
  151050. return;
  151051. }
  151052. }
  151053. throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types2)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  151054. }
  151055. validate2.oneOfNodeOrValueTypes = types2;
  151056. return validate2;
  151057. }
  151058. function assertValueType(type) {
  151059. function validate2(node, key, val) {
  151060. const valid2 = getType(val) === type;
  151061. if (!valid2) {
  151062. throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
  151063. }
  151064. }
  151065. validate2.type = type;
  151066. return validate2;
  151067. }
  151068. function assertShape(shape) {
  151069. function validate2(node, key, val) {
  151070. const errors = [];
  151071. for (const property of Object.keys(shape)) {
  151072. try {
  151073. (0, _validate.validateField)(node, property, val[property], shape[property]);
  151074. } catch (error) {
  151075. if (error instanceof TypeError) {
  151076. errors.push(error.message);
  151077. continue;
  151078. }
  151079. throw error;
  151080. }
  151081. }
  151082. if (errors.length) {
  151083. throw new TypeError(`Property ${key} of ${node.type} expected to have the following:
  151084. ${errors.join("\n")}`);
  151085. }
  151086. }
  151087. validate2.shapeOf = shape;
  151088. return validate2;
  151089. }
  151090. function assertOptionalChainStart() {
  151091. function validate2(node) {
  151092. var _current;
  151093. let current2 = node;
  151094. while (node) {
  151095. const {
  151096. type
  151097. } = current2;
  151098. if (type === "OptionalCallExpression") {
  151099. if (current2.optional)
  151100. return;
  151101. current2 = current2.callee;
  151102. continue;
  151103. }
  151104. if (type === "OptionalMemberExpression") {
  151105. if (current2.optional)
  151106. return;
  151107. current2 = current2.object;
  151108. continue;
  151109. }
  151110. break;
  151111. }
  151112. throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current2) == null ? void 0 : _current.type}`);
  151113. }
  151114. return validate2;
  151115. }
  151116. function chain(...fns) {
  151117. function validate2(...args) {
  151118. for (const fn of fns) {
  151119. fn(...args);
  151120. }
  151121. }
  151122. validate2.chainOf = fns;
  151123. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  151124. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  151125. }
  151126. return validate2;
  151127. }
  151128. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  151129. var validFieldKeys = ["default", "optional", "validate"];
  151130. function defineType(type, opts = {}) {
  151131. const inherits = opts.inherits && store[opts.inherits] || {};
  151132. let fields = opts.fields;
  151133. if (!fields) {
  151134. fields = {};
  151135. if (inherits.fields) {
  151136. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  151137. for (const key of keys2) {
  151138. const field = inherits.fields[key];
  151139. const def = field.default;
  151140. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  151141. throw new Error("field defaults can only be primitives or empty arrays currently");
  151142. }
  151143. fields[key] = {
  151144. default: Array.isArray(def) ? [] : def,
  151145. optional: field.optional,
  151146. validate: field.validate
  151147. };
  151148. }
  151149. }
  151150. }
  151151. const visitor = opts.visitor || inherits.visitor || [];
  151152. const aliases = opts.aliases || inherits.aliases || [];
  151153. const builder = opts.builder || inherits.builder || opts.visitor || [];
  151154. for (const k of Object.keys(opts)) {
  151155. if (validTypeOpts.indexOf(k) === -1) {
  151156. throw new Error(`Unknown type option "${k}" on ${type}`);
  151157. }
  151158. }
  151159. if (opts.deprecatedAlias) {
  151160. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  151161. }
  151162. for (const key of visitor.concat(builder)) {
  151163. fields[key] = fields[key] || {};
  151164. }
  151165. for (const key of Object.keys(fields)) {
  151166. const field = fields[key];
  151167. if (field.default !== void 0 && builder.indexOf(key) === -1) {
  151168. field.optional = true;
  151169. }
  151170. if (field.default === void 0) {
  151171. field.default = null;
  151172. } else if (!field.validate && field.default != null) {
  151173. field.validate = assertValueType(getType(field.default));
  151174. }
  151175. for (const k of Object.keys(field)) {
  151176. if (validFieldKeys.indexOf(k) === -1) {
  151177. throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
  151178. }
  151179. }
  151180. }
  151181. VISITOR_KEYS[type] = opts.visitor = visitor;
  151182. BUILDER_KEYS[type] = opts.builder = builder;
  151183. NODE_FIELDS[type] = opts.fields = fields;
  151184. ALIAS_KEYS[type] = opts.aliases = aliases;
  151185. aliases.forEach((alias) => {
  151186. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  151187. FLIPPED_ALIAS_KEYS[alias].push(type);
  151188. });
  151189. if (opts.validate) {
  151190. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  151191. }
  151192. store[type] = opts;
  151193. }
  151194. var store = {};
  151195. }
  151196. });
  151197. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/core.js
  151198. var require_core7 = __commonJS({
  151199. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/core.js"(exports) {
  151200. "use strict";
  151201. Object.defineProperty(exports, "__esModule", {
  151202. value: true
  151203. });
  151204. exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
  151205. var _is = require_is7();
  151206. var _isValidIdentifier = require_isValidIdentifier7();
  151207. var _helperValidatorIdentifier = require_lib19();
  151208. var _constants = require_constants7();
  151209. var _utils = require_utils7();
  151210. (0, _utils.default)("ArrayExpression", {
  151211. fields: {
  151212. elements: {
  151213. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  151214. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  151215. }
  151216. },
  151217. visitor: ["elements"],
  151218. aliases: ["Expression"]
  151219. });
  151220. (0, _utils.default)("AssignmentExpression", {
  151221. fields: {
  151222. operator: {
  151223. validate: function() {
  151224. if (!process.env.BABEL_TYPES_8_BREAKING) {
  151225. return (0, _utils.assertValueType)("string");
  151226. }
  151227. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  151228. const pattern = (0, _utils.assertOneOf)("=");
  151229. return function(node, key, val) {
  151230. const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
  151231. validator(node, key, val);
  151232. };
  151233. }()
  151234. },
  151235. left: {
  151236. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  151237. },
  151238. right: {
  151239. validate: (0, _utils.assertNodeType)("Expression")
  151240. }
  151241. },
  151242. builder: ["operator", "left", "right"],
  151243. visitor: ["left", "right"],
  151244. aliases: ["Expression"]
  151245. });
  151246. (0, _utils.default)("BinaryExpression", {
  151247. builder: ["operator", "left", "right"],
  151248. fields: {
  151249. operator: {
  151250. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  151251. },
  151252. left: {
  151253. validate: function() {
  151254. const expression = (0, _utils.assertNodeType)("Expression");
  151255. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  151256. const validator = function(node, key, val) {
  151257. const validator2 = node.operator === "in" ? inOp : expression;
  151258. validator2(node, key, val);
  151259. };
  151260. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  151261. return validator;
  151262. }()
  151263. },
  151264. right: {
  151265. validate: (0, _utils.assertNodeType)("Expression")
  151266. }
  151267. },
  151268. visitor: ["left", "right"],
  151269. aliases: ["Binary", "Expression"]
  151270. });
  151271. (0, _utils.default)("InterpreterDirective", {
  151272. builder: ["value"],
  151273. fields: {
  151274. value: {
  151275. validate: (0, _utils.assertValueType)("string")
  151276. }
  151277. }
  151278. });
  151279. (0, _utils.default)("Directive", {
  151280. visitor: ["value"],
  151281. fields: {
  151282. value: {
  151283. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  151284. }
  151285. }
  151286. });
  151287. (0, _utils.default)("DirectiveLiteral", {
  151288. builder: ["value"],
  151289. fields: {
  151290. value: {
  151291. validate: (0, _utils.assertValueType)("string")
  151292. }
  151293. }
  151294. });
  151295. (0, _utils.default)("BlockStatement", {
  151296. builder: ["body", "directives"],
  151297. visitor: ["directives", "body"],
  151298. fields: {
  151299. directives: {
  151300. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  151301. default: []
  151302. },
  151303. body: {
  151304. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  151305. }
  151306. },
  151307. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  151308. });
  151309. (0, _utils.default)("BreakStatement", {
  151310. visitor: ["label"],
  151311. fields: {
  151312. label: {
  151313. validate: (0, _utils.assertNodeType)("Identifier"),
  151314. optional: true
  151315. }
  151316. },
  151317. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  151318. });
  151319. (0, _utils.default)("CallExpression", {
  151320. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  151321. builder: ["callee", "arguments"],
  151322. aliases: ["Expression"],
  151323. fields: Object.assign({
  151324. callee: {
  151325. validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
  151326. },
  151327. arguments: {
  151328. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  151329. }
  151330. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  151331. optional: {
  151332. validate: (0, _utils.assertOneOf)(true, false),
  151333. optional: true
  151334. }
  151335. } : {}, {
  151336. typeArguments: {
  151337. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  151338. optional: true
  151339. },
  151340. typeParameters: {
  151341. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  151342. optional: true
  151343. }
  151344. })
  151345. });
  151346. (0, _utils.default)("CatchClause", {
  151347. visitor: ["param", "body"],
  151348. fields: {
  151349. param: {
  151350. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  151351. optional: true
  151352. },
  151353. body: {
  151354. validate: (0, _utils.assertNodeType)("BlockStatement")
  151355. }
  151356. },
  151357. aliases: ["Scopable", "BlockParent"]
  151358. });
  151359. (0, _utils.default)("ConditionalExpression", {
  151360. visitor: ["test", "consequent", "alternate"],
  151361. fields: {
  151362. test: {
  151363. validate: (0, _utils.assertNodeType)("Expression")
  151364. },
  151365. consequent: {
  151366. validate: (0, _utils.assertNodeType)("Expression")
  151367. },
  151368. alternate: {
  151369. validate: (0, _utils.assertNodeType)("Expression")
  151370. }
  151371. },
  151372. aliases: ["Expression", "Conditional"]
  151373. });
  151374. (0, _utils.default)("ContinueStatement", {
  151375. visitor: ["label"],
  151376. fields: {
  151377. label: {
  151378. validate: (0, _utils.assertNodeType)("Identifier"),
  151379. optional: true
  151380. }
  151381. },
  151382. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  151383. });
  151384. (0, _utils.default)("DebuggerStatement", {
  151385. aliases: ["Statement"]
  151386. });
  151387. (0, _utils.default)("DoWhileStatement", {
  151388. visitor: ["test", "body"],
  151389. fields: {
  151390. test: {
  151391. validate: (0, _utils.assertNodeType)("Expression")
  151392. },
  151393. body: {
  151394. validate: (0, _utils.assertNodeType)("Statement")
  151395. }
  151396. },
  151397. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  151398. });
  151399. (0, _utils.default)("EmptyStatement", {
  151400. aliases: ["Statement"]
  151401. });
  151402. (0, _utils.default)("ExpressionStatement", {
  151403. visitor: ["expression"],
  151404. fields: {
  151405. expression: {
  151406. validate: (0, _utils.assertNodeType)("Expression")
  151407. }
  151408. },
  151409. aliases: ["Statement", "ExpressionWrapper"]
  151410. });
  151411. (0, _utils.default)("File", {
  151412. builder: ["program", "comments", "tokens"],
  151413. visitor: ["program"],
  151414. fields: {
  151415. program: {
  151416. validate: (0, _utils.assertNodeType)("Program")
  151417. },
  151418. comments: {
  151419. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  151420. }, {
  151421. each: {
  151422. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  151423. }
  151424. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  151425. optional: true
  151426. },
  151427. tokens: {
  151428. validate: (0, _utils.assertEach)(Object.assign(() => {
  151429. }, {
  151430. type: "any"
  151431. })),
  151432. optional: true
  151433. }
  151434. }
  151435. });
  151436. (0, _utils.default)("ForInStatement", {
  151437. visitor: ["left", "right", "body"],
  151438. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  151439. fields: {
  151440. left: {
  151441. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  151442. },
  151443. right: {
  151444. validate: (0, _utils.assertNodeType)("Expression")
  151445. },
  151446. body: {
  151447. validate: (0, _utils.assertNodeType)("Statement")
  151448. }
  151449. }
  151450. });
  151451. (0, _utils.default)("ForStatement", {
  151452. visitor: ["init", "test", "update", "body"],
  151453. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  151454. fields: {
  151455. init: {
  151456. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  151457. optional: true
  151458. },
  151459. test: {
  151460. validate: (0, _utils.assertNodeType)("Expression"),
  151461. optional: true
  151462. },
  151463. update: {
  151464. validate: (0, _utils.assertNodeType)("Expression"),
  151465. optional: true
  151466. },
  151467. body: {
  151468. validate: (0, _utils.assertNodeType)("Statement")
  151469. }
  151470. }
  151471. });
  151472. var functionCommon = {
  151473. params: {
  151474. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  151475. },
  151476. generator: {
  151477. default: false
  151478. },
  151479. async: {
  151480. default: false
  151481. }
  151482. };
  151483. exports.functionCommon = functionCommon;
  151484. var functionTypeAnnotationCommon = {
  151485. returnType: {
  151486. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  151487. optional: true
  151488. },
  151489. typeParameters: {
  151490. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  151491. optional: true
  151492. }
  151493. };
  151494. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  151495. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  151496. declare: {
  151497. validate: (0, _utils.assertValueType)("boolean"),
  151498. optional: true
  151499. },
  151500. id: {
  151501. validate: (0, _utils.assertNodeType)("Identifier"),
  151502. optional: true
  151503. }
  151504. });
  151505. exports.functionDeclarationCommon = functionDeclarationCommon;
  151506. (0, _utils.default)("FunctionDeclaration", {
  151507. builder: ["id", "params", "body", "generator", "async"],
  151508. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  151509. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  151510. body: {
  151511. validate: (0, _utils.assertNodeType)("BlockStatement")
  151512. }
  151513. }),
  151514. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  151515. validate: function() {
  151516. if (!process.env.BABEL_TYPES_8_BREAKING)
  151517. return () => {
  151518. };
  151519. const identifier = (0, _utils.assertNodeType)("Identifier");
  151520. return function(parent, key, node) {
  151521. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  151522. identifier(node, "id", node.id);
  151523. }
  151524. };
  151525. }()
  151526. });
  151527. (0, _utils.default)("FunctionExpression", {
  151528. inherits: "FunctionDeclaration",
  151529. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  151530. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  151531. id: {
  151532. validate: (0, _utils.assertNodeType)("Identifier"),
  151533. optional: true
  151534. },
  151535. body: {
  151536. validate: (0, _utils.assertNodeType)("BlockStatement")
  151537. }
  151538. })
  151539. });
  151540. var patternLikeCommon = {
  151541. typeAnnotation: {
  151542. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  151543. optional: true
  151544. },
  151545. decorators: {
  151546. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
  151547. }
  151548. };
  151549. exports.patternLikeCommon = patternLikeCommon;
  151550. (0, _utils.default)("Identifier", {
  151551. builder: ["name"],
  151552. visitor: ["typeAnnotation", "decorators"],
  151553. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  151554. fields: Object.assign({}, patternLikeCommon, {
  151555. name: {
  151556. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  151557. if (!process.env.BABEL_TYPES_8_BREAKING)
  151558. return;
  151559. if (!(0, _isValidIdentifier.default)(val, false)) {
  151560. throw new TypeError(`"${val}" is not a valid identifier name`);
  151561. }
  151562. }, {
  151563. type: "string"
  151564. }))
  151565. },
  151566. optional: {
  151567. validate: (0, _utils.assertValueType)("boolean"),
  151568. optional: true
  151569. }
  151570. }),
  151571. validate(parent, key, node) {
  151572. if (!process.env.BABEL_TYPES_8_BREAKING)
  151573. return;
  151574. const match = /\.(\w+)$/.exec(key);
  151575. if (!match)
  151576. return;
  151577. const [, parentKey] = match;
  151578. const nonComp = {
  151579. computed: false
  151580. };
  151581. if (parentKey === "property") {
  151582. if ((0, _is.default)("MemberExpression", parent, nonComp))
  151583. return;
  151584. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  151585. return;
  151586. } else if (parentKey === "key") {
  151587. if ((0, _is.default)("Property", parent, nonComp))
  151588. return;
  151589. if ((0, _is.default)("Method", parent, nonComp))
  151590. return;
  151591. } else if (parentKey === "exported") {
  151592. if ((0, _is.default)("ExportSpecifier", parent))
  151593. return;
  151594. } else if (parentKey === "imported") {
  151595. if ((0, _is.default)("ImportSpecifier", parent, {
  151596. imported: node
  151597. }))
  151598. return;
  151599. } else if (parentKey === "meta") {
  151600. if ((0, _is.default)("MetaProperty", parent, {
  151601. meta: node
  151602. }))
  151603. return;
  151604. }
  151605. if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
  151606. throw new TypeError(`"${node.name}" is not a valid identifier`);
  151607. }
  151608. }
  151609. });
  151610. (0, _utils.default)("IfStatement", {
  151611. visitor: ["test", "consequent", "alternate"],
  151612. aliases: ["Statement", "Conditional"],
  151613. fields: {
  151614. test: {
  151615. validate: (0, _utils.assertNodeType)("Expression")
  151616. },
  151617. consequent: {
  151618. validate: (0, _utils.assertNodeType)("Statement")
  151619. },
  151620. alternate: {
  151621. optional: true,
  151622. validate: (0, _utils.assertNodeType)("Statement")
  151623. }
  151624. }
  151625. });
  151626. (0, _utils.default)("LabeledStatement", {
  151627. visitor: ["label", "body"],
  151628. aliases: ["Statement"],
  151629. fields: {
  151630. label: {
  151631. validate: (0, _utils.assertNodeType)("Identifier")
  151632. },
  151633. body: {
  151634. validate: (0, _utils.assertNodeType)("Statement")
  151635. }
  151636. }
  151637. });
  151638. (0, _utils.default)("StringLiteral", {
  151639. builder: ["value"],
  151640. fields: {
  151641. value: {
  151642. validate: (0, _utils.assertValueType)("string")
  151643. }
  151644. },
  151645. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  151646. });
  151647. (0, _utils.default)("NumericLiteral", {
  151648. builder: ["value"],
  151649. deprecatedAlias: "NumberLiteral",
  151650. fields: {
  151651. value: {
  151652. validate: (0, _utils.assertValueType)("number")
  151653. }
  151654. },
  151655. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  151656. });
  151657. (0, _utils.default)("NullLiteral", {
  151658. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  151659. });
  151660. (0, _utils.default)("BooleanLiteral", {
  151661. builder: ["value"],
  151662. fields: {
  151663. value: {
  151664. validate: (0, _utils.assertValueType)("boolean")
  151665. }
  151666. },
  151667. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  151668. });
  151669. (0, _utils.default)("RegExpLiteral", {
  151670. builder: ["pattern", "flags"],
  151671. deprecatedAlias: "RegexLiteral",
  151672. aliases: ["Expression", "Pureish", "Literal"],
  151673. fields: {
  151674. pattern: {
  151675. validate: (0, _utils.assertValueType)("string")
  151676. },
  151677. flags: {
  151678. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) {
  151679. if (!process.env.BABEL_TYPES_8_BREAKING)
  151680. return;
  151681. const invalid2 = /[^gimsuy]/.exec(val);
  151682. if (invalid2) {
  151683. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  151684. }
  151685. }, {
  151686. type: "string"
  151687. })),
  151688. default: ""
  151689. }
  151690. }
  151691. });
  151692. (0, _utils.default)("LogicalExpression", {
  151693. builder: ["operator", "left", "right"],
  151694. visitor: ["left", "right"],
  151695. aliases: ["Binary", "Expression"],
  151696. fields: {
  151697. operator: {
  151698. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  151699. },
  151700. left: {
  151701. validate: (0, _utils.assertNodeType)("Expression")
  151702. },
  151703. right: {
  151704. validate: (0, _utils.assertNodeType)("Expression")
  151705. }
  151706. }
  151707. });
  151708. (0, _utils.default)("MemberExpression", {
  151709. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  151710. visitor: ["object", "property"],
  151711. aliases: ["Expression", "LVal"],
  151712. fields: Object.assign({
  151713. object: {
  151714. validate: (0, _utils.assertNodeType)("Expression")
  151715. },
  151716. property: {
  151717. validate: function() {
  151718. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  151719. const computed = (0, _utils.assertNodeType)("Expression");
  151720. const validator = function(node, key, val) {
  151721. const validator2 = node.computed ? computed : normal;
  151722. validator2(node, key, val);
  151723. };
  151724. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  151725. return validator;
  151726. }()
  151727. },
  151728. computed: {
  151729. default: false
  151730. }
  151731. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  151732. optional: {
  151733. validate: (0, _utils.assertOneOf)(true, false),
  151734. optional: true
  151735. }
  151736. } : {})
  151737. });
  151738. (0, _utils.default)("NewExpression", {
  151739. inherits: "CallExpression"
  151740. });
  151741. (0, _utils.default)("Program", {
  151742. visitor: ["directives", "body"],
  151743. builder: ["body", "directives", "sourceType", "interpreter"],
  151744. fields: {
  151745. sourceFile: {
  151746. validate: (0, _utils.assertValueType)("string")
  151747. },
  151748. sourceType: {
  151749. validate: (0, _utils.assertOneOf)("script", "module"),
  151750. default: "script"
  151751. },
  151752. interpreter: {
  151753. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  151754. default: null,
  151755. optional: true
  151756. },
  151757. directives: {
  151758. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  151759. default: []
  151760. },
  151761. body: {
  151762. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  151763. }
  151764. },
  151765. aliases: ["Scopable", "BlockParent", "Block"]
  151766. });
  151767. (0, _utils.default)("ObjectExpression", {
  151768. visitor: ["properties"],
  151769. aliases: ["Expression"],
  151770. fields: {
  151771. properties: {
  151772. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  151773. }
  151774. }
  151775. });
  151776. (0, _utils.default)("ObjectMethod", {
  151777. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  151778. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  151779. kind: Object.assign({
  151780. validate: (0, _utils.assertOneOf)("method", "get", "set")
  151781. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  151782. default: "method"
  151783. } : {}),
  151784. computed: {
  151785. default: false
  151786. },
  151787. key: {
  151788. validate: function() {
  151789. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  151790. const computed = (0, _utils.assertNodeType)("Expression");
  151791. const validator = function(node, key, val) {
  151792. const validator2 = node.computed ? computed : normal;
  151793. validator2(node, key, val);
  151794. };
  151795. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  151796. return validator;
  151797. }()
  151798. },
  151799. decorators: {
  151800. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  151801. optional: true
  151802. },
  151803. body: {
  151804. validate: (0, _utils.assertNodeType)("BlockStatement")
  151805. }
  151806. }),
  151807. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  151808. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  151809. });
  151810. (0, _utils.default)("ObjectProperty", {
  151811. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  151812. fields: {
  151813. computed: {
  151814. default: false
  151815. },
  151816. key: {
  151817. validate: function() {
  151818. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  151819. const computed = (0, _utils.assertNodeType)("Expression");
  151820. const validator = function(node, key, val) {
  151821. const validator2 = node.computed ? computed : normal;
  151822. validator2(node, key, val);
  151823. };
  151824. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  151825. return validator;
  151826. }()
  151827. },
  151828. value: {
  151829. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  151830. },
  151831. shorthand: {
  151832. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  151833. if (!process.env.BABEL_TYPES_8_BREAKING)
  151834. return;
  151835. if (val && node.computed) {
  151836. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  151837. }
  151838. }, {
  151839. type: "boolean"
  151840. }), function(node, key, val) {
  151841. if (!process.env.BABEL_TYPES_8_BREAKING)
  151842. return;
  151843. if (val && !(0, _is.default)("Identifier", node.key)) {
  151844. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  151845. }
  151846. }),
  151847. default: false
  151848. },
  151849. decorators: {
  151850. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  151851. optional: true
  151852. }
  151853. },
  151854. visitor: ["key", "value", "decorators"],
  151855. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  151856. validate: function() {
  151857. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
  151858. const expression = (0, _utils.assertNodeType)("Expression");
  151859. return function(parent, key, node) {
  151860. if (!process.env.BABEL_TYPES_8_BREAKING)
  151861. return;
  151862. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  151863. validator(node, "value", node.value);
  151864. };
  151865. }()
  151866. });
  151867. (0, _utils.default)("RestElement", {
  151868. visitor: ["argument", "typeAnnotation"],
  151869. builder: ["argument"],
  151870. aliases: ["LVal", "PatternLike"],
  151871. deprecatedAlias: "RestProperty",
  151872. fields: Object.assign({}, patternLikeCommon, {
  151873. argument: {
  151874. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
  151875. }
  151876. }),
  151877. validate(parent, key) {
  151878. if (!process.env.BABEL_TYPES_8_BREAKING)
  151879. return;
  151880. const match = /(\w+)\[(\d+)\]/.exec(key);
  151881. if (!match)
  151882. throw new Error("Internal Babel error: malformed key.");
  151883. const [, listKey, index2] = match;
  151884. if (parent[listKey].length > index2 + 1) {
  151885. throw new TypeError(`RestElement must be last element of ${listKey}`);
  151886. }
  151887. }
  151888. });
  151889. (0, _utils.default)("ReturnStatement", {
  151890. visitor: ["argument"],
  151891. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  151892. fields: {
  151893. argument: {
  151894. validate: (0, _utils.assertNodeType)("Expression"),
  151895. optional: true
  151896. }
  151897. }
  151898. });
  151899. (0, _utils.default)("SequenceExpression", {
  151900. visitor: ["expressions"],
  151901. fields: {
  151902. expressions: {
  151903. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  151904. }
  151905. },
  151906. aliases: ["Expression"]
  151907. });
  151908. (0, _utils.default)("ParenthesizedExpression", {
  151909. visitor: ["expression"],
  151910. aliases: ["Expression", "ExpressionWrapper"],
  151911. fields: {
  151912. expression: {
  151913. validate: (0, _utils.assertNodeType)("Expression")
  151914. }
  151915. }
  151916. });
  151917. (0, _utils.default)("SwitchCase", {
  151918. visitor: ["test", "consequent"],
  151919. fields: {
  151920. test: {
  151921. validate: (0, _utils.assertNodeType)("Expression"),
  151922. optional: true
  151923. },
  151924. consequent: {
  151925. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  151926. }
  151927. }
  151928. });
  151929. (0, _utils.default)("SwitchStatement", {
  151930. visitor: ["discriminant", "cases"],
  151931. aliases: ["Statement", "BlockParent", "Scopable"],
  151932. fields: {
  151933. discriminant: {
  151934. validate: (0, _utils.assertNodeType)("Expression")
  151935. },
  151936. cases: {
  151937. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  151938. }
  151939. }
  151940. });
  151941. (0, _utils.default)("ThisExpression", {
  151942. aliases: ["Expression"]
  151943. });
  151944. (0, _utils.default)("ThrowStatement", {
  151945. visitor: ["argument"],
  151946. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  151947. fields: {
  151948. argument: {
  151949. validate: (0, _utils.assertNodeType)("Expression")
  151950. }
  151951. }
  151952. });
  151953. (0, _utils.default)("TryStatement", {
  151954. visitor: ["block", "handler", "finalizer"],
  151955. aliases: ["Statement"],
  151956. fields: {
  151957. block: {
  151958. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) {
  151959. if (!process.env.BABEL_TYPES_8_BREAKING)
  151960. return;
  151961. if (!node.handler && !node.finalizer) {
  151962. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  151963. }
  151964. }, {
  151965. oneOfNodeTypes: ["BlockStatement"]
  151966. }))
  151967. },
  151968. handler: {
  151969. optional: true,
  151970. validate: (0, _utils.assertNodeType)("CatchClause")
  151971. },
  151972. finalizer: {
  151973. optional: true,
  151974. validate: (0, _utils.assertNodeType)("BlockStatement")
  151975. }
  151976. }
  151977. });
  151978. (0, _utils.default)("UnaryExpression", {
  151979. builder: ["operator", "argument", "prefix"],
  151980. fields: {
  151981. prefix: {
  151982. default: true
  151983. },
  151984. argument: {
  151985. validate: (0, _utils.assertNodeType)("Expression")
  151986. },
  151987. operator: {
  151988. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  151989. }
  151990. },
  151991. visitor: ["argument"],
  151992. aliases: ["UnaryLike", "Expression"]
  151993. });
  151994. (0, _utils.default)("UpdateExpression", {
  151995. builder: ["operator", "argument", "prefix"],
  151996. fields: {
  151997. prefix: {
  151998. default: false
  151999. },
  152000. argument: {
  152001. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  152002. },
  152003. operator: {
  152004. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  152005. }
  152006. },
  152007. visitor: ["argument"],
  152008. aliases: ["Expression"]
  152009. });
  152010. (0, _utils.default)("VariableDeclaration", {
  152011. builder: ["kind", "declarations"],
  152012. visitor: ["declarations"],
  152013. aliases: ["Statement", "Declaration"],
  152014. fields: {
  152015. declare: {
  152016. validate: (0, _utils.assertValueType)("boolean"),
  152017. optional: true
  152018. },
  152019. kind: {
  152020. validate: (0, _utils.assertOneOf)("var", "let", "const")
  152021. },
  152022. declarations: {
  152023. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  152024. }
  152025. },
  152026. validate(parent, key, node) {
  152027. if (!process.env.BABEL_TYPES_8_BREAKING)
  152028. return;
  152029. if (!(0, _is.default)("ForXStatement", parent, {
  152030. left: node
  152031. }))
  152032. return;
  152033. if (node.declarations.length !== 1) {
  152034. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  152035. }
  152036. }
  152037. });
  152038. (0, _utils.default)("VariableDeclarator", {
  152039. visitor: ["id", "init"],
  152040. fields: {
  152041. id: {
  152042. validate: function() {
  152043. if (!process.env.BABEL_TYPES_8_BREAKING) {
  152044. return (0, _utils.assertNodeType)("LVal");
  152045. }
  152046. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  152047. const without = (0, _utils.assertNodeType)("Identifier");
  152048. return function(node, key, val) {
  152049. const validator = node.init ? normal : without;
  152050. validator(node, key, val);
  152051. };
  152052. }()
  152053. },
  152054. definite: {
  152055. optional: true,
  152056. validate: (0, _utils.assertValueType)("boolean")
  152057. },
  152058. init: {
  152059. optional: true,
  152060. validate: (0, _utils.assertNodeType)("Expression")
  152061. }
  152062. }
  152063. });
  152064. (0, _utils.default)("WhileStatement", {
  152065. visitor: ["test", "body"],
  152066. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  152067. fields: {
  152068. test: {
  152069. validate: (0, _utils.assertNodeType)("Expression")
  152070. },
  152071. body: {
  152072. validate: (0, _utils.assertNodeType)("Statement")
  152073. }
  152074. }
  152075. });
  152076. (0, _utils.default)("WithStatement", {
  152077. visitor: ["object", "body"],
  152078. aliases: ["Statement"],
  152079. fields: {
  152080. object: {
  152081. validate: (0, _utils.assertNodeType)("Expression")
  152082. },
  152083. body: {
  152084. validate: (0, _utils.assertNodeType)("Statement")
  152085. }
  152086. }
  152087. });
  152088. (0, _utils.default)("AssignmentPattern", {
  152089. visitor: ["left", "right", "decorators"],
  152090. builder: ["left", "right"],
  152091. aliases: ["Pattern", "PatternLike", "LVal"],
  152092. fields: Object.assign({}, patternLikeCommon, {
  152093. left: {
  152094. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  152095. },
  152096. right: {
  152097. validate: (0, _utils.assertNodeType)("Expression")
  152098. },
  152099. decorators: {
  152100. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152101. optional: true
  152102. }
  152103. })
  152104. });
  152105. (0, _utils.default)("ArrayPattern", {
  152106. visitor: ["elements", "typeAnnotation"],
  152107. builder: ["elements"],
  152108. aliases: ["Pattern", "PatternLike", "LVal"],
  152109. fields: Object.assign({}, patternLikeCommon, {
  152110. elements: {
  152111. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
  152112. },
  152113. decorators: {
  152114. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152115. optional: true
  152116. }
  152117. })
  152118. });
  152119. (0, _utils.default)("ArrowFunctionExpression", {
  152120. builder: ["params", "body", "async"],
  152121. visitor: ["params", "body", "returnType", "typeParameters"],
  152122. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  152123. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  152124. expression: {
  152125. validate: (0, _utils.assertValueType)("boolean")
  152126. },
  152127. body: {
  152128. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  152129. }
  152130. })
  152131. });
  152132. (0, _utils.default)("ClassBody", {
  152133. visitor: ["body"],
  152134. fields: {
  152135. body: {
  152136. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  152137. }
  152138. }
  152139. });
  152140. (0, _utils.default)("ClassExpression", {
  152141. builder: ["id", "superClass", "body", "decorators"],
  152142. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  152143. aliases: ["Scopable", "Class", "Expression"],
  152144. fields: {
  152145. id: {
  152146. validate: (0, _utils.assertNodeType)("Identifier"),
  152147. optional: true
  152148. },
  152149. typeParameters: {
  152150. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  152151. optional: true
  152152. },
  152153. body: {
  152154. validate: (0, _utils.assertNodeType)("ClassBody")
  152155. },
  152156. superClass: {
  152157. optional: true,
  152158. validate: (0, _utils.assertNodeType)("Expression")
  152159. },
  152160. superTypeParameters: {
  152161. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  152162. optional: true
  152163. },
  152164. implements: {
  152165. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  152166. optional: true
  152167. },
  152168. decorators: {
  152169. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152170. optional: true
  152171. },
  152172. mixins: {
  152173. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  152174. optional: true
  152175. }
  152176. }
  152177. });
  152178. (0, _utils.default)("ClassDeclaration", {
  152179. inherits: "ClassExpression",
  152180. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  152181. fields: {
  152182. id: {
  152183. validate: (0, _utils.assertNodeType)("Identifier")
  152184. },
  152185. typeParameters: {
  152186. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  152187. optional: true
  152188. },
  152189. body: {
  152190. validate: (0, _utils.assertNodeType)("ClassBody")
  152191. },
  152192. superClass: {
  152193. optional: true,
  152194. validate: (0, _utils.assertNodeType)("Expression")
  152195. },
  152196. superTypeParameters: {
  152197. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  152198. optional: true
  152199. },
  152200. implements: {
  152201. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  152202. optional: true
  152203. },
  152204. decorators: {
  152205. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152206. optional: true
  152207. },
  152208. mixins: {
  152209. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  152210. optional: true
  152211. },
  152212. declare: {
  152213. validate: (0, _utils.assertValueType)("boolean"),
  152214. optional: true
  152215. },
  152216. abstract: {
  152217. validate: (0, _utils.assertValueType)("boolean"),
  152218. optional: true
  152219. }
  152220. },
  152221. validate: function() {
  152222. const identifier = (0, _utils.assertNodeType)("Identifier");
  152223. return function(parent, key, node) {
  152224. if (!process.env.BABEL_TYPES_8_BREAKING)
  152225. return;
  152226. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  152227. identifier(node, "id", node.id);
  152228. }
  152229. };
  152230. }()
  152231. });
  152232. (0, _utils.default)("ExportAllDeclaration", {
  152233. visitor: ["source"],
  152234. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  152235. fields: {
  152236. source: {
  152237. validate: (0, _utils.assertNodeType)("StringLiteral")
  152238. },
  152239. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  152240. assertions: {
  152241. optional: true,
  152242. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  152243. }
  152244. }
  152245. });
  152246. (0, _utils.default)("ExportDefaultDeclaration", {
  152247. visitor: ["declaration"],
  152248. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  152249. fields: {
  152250. declaration: {
  152251. validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  152252. }
  152253. }
  152254. });
  152255. (0, _utils.default)("ExportNamedDeclaration", {
  152256. visitor: ["declaration", "specifiers", "source"],
  152257. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  152258. fields: {
  152259. declaration: {
  152260. optional: true,
  152261. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) {
  152262. if (!process.env.BABEL_TYPES_8_BREAKING)
  152263. return;
  152264. if (val && node.specifiers.length) {
  152265. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  152266. }
  152267. }, {
  152268. oneOfNodeTypes: ["Declaration"]
  152269. }), function(node, key, val) {
  152270. if (!process.env.BABEL_TYPES_8_BREAKING)
  152271. return;
  152272. if (val && node.source) {
  152273. throw new TypeError("Cannot export a declaration from a source");
  152274. }
  152275. })
  152276. },
  152277. assertions: {
  152278. optional: true,
  152279. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  152280. },
  152281. specifiers: {
  152282. default: [],
  152283. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  152284. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  152285. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  152286. if (!process.env.BABEL_TYPES_8_BREAKING)
  152287. return sourced;
  152288. return function(node, key, val) {
  152289. const validator = node.source ? sourced : sourceless;
  152290. validator(node, key, val);
  152291. };
  152292. }()))
  152293. },
  152294. source: {
  152295. validate: (0, _utils.assertNodeType)("StringLiteral"),
  152296. optional: true
  152297. },
  152298. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  152299. }
  152300. });
  152301. (0, _utils.default)("ExportSpecifier", {
  152302. visitor: ["local", "exported"],
  152303. aliases: ["ModuleSpecifier"],
  152304. fields: {
  152305. local: {
  152306. validate: (0, _utils.assertNodeType)("Identifier")
  152307. },
  152308. exported: {
  152309. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  152310. }
  152311. }
  152312. });
  152313. (0, _utils.default)("ForOfStatement", {
  152314. visitor: ["left", "right", "body"],
  152315. builder: ["left", "right", "body", "await"],
  152316. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  152317. fields: {
  152318. left: {
  152319. validate: function() {
  152320. if (!process.env.BABEL_TYPES_8_BREAKING) {
  152321. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  152322. }
  152323. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  152324. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  152325. return function(node, key, val) {
  152326. if ((0, _is.default)("VariableDeclaration", val)) {
  152327. declaration(node, key, val);
  152328. } else {
  152329. lval(node, key, val);
  152330. }
  152331. };
  152332. }()
  152333. },
  152334. right: {
  152335. validate: (0, _utils.assertNodeType)("Expression")
  152336. },
  152337. body: {
  152338. validate: (0, _utils.assertNodeType)("Statement")
  152339. },
  152340. await: {
  152341. default: false
  152342. }
  152343. }
  152344. });
  152345. (0, _utils.default)("ImportDeclaration", {
  152346. visitor: ["specifiers", "source"],
  152347. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  152348. fields: {
  152349. assertions: {
  152350. optional: true,
  152351. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  152352. },
  152353. specifiers: {
  152354. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  152355. },
  152356. source: {
  152357. validate: (0, _utils.assertNodeType)("StringLiteral")
  152358. },
  152359. importKind: {
  152360. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  152361. optional: true
  152362. }
  152363. }
  152364. });
  152365. (0, _utils.default)("ImportDefaultSpecifier", {
  152366. visitor: ["local"],
  152367. aliases: ["ModuleSpecifier"],
  152368. fields: {
  152369. local: {
  152370. validate: (0, _utils.assertNodeType)("Identifier")
  152371. }
  152372. }
  152373. });
  152374. (0, _utils.default)("ImportNamespaceSpecifier", {
  152375. visitor: ["local"],
  152376. aliases: ["ModuleSpecifier"],
  152377. fields: {
  152378. local: {
  152379. validate: (0, _utils.assertNodeType)("Identifier")
  152380. }
  152381. }
  152382. });
  152383. (0, _utils.default)("ImportSpecifier", {
  152384. visitor: ["local", "imported"],
  152385. aliases: ["ModuleSpecifier"],
  152386. fields: {
  152387. local: {
  152388. validate: (0, _utils.assertNodeType)("Identifier")
  152389. },
  152390. imported: {
  152391. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  152392. },
  152393. importKind: {
  152394. validate: (0, _utils.assertOneOf)("type", "typeof"),
  152395. optional: true
  152396. }
  152397. }
  152398. });
  152399. (0, _utils.default)("MetaProperty", {
  152400. visitor: ["meta", "property"],
  152401. aliases: ["Expression"],
  152402. fields: {
  152403. meta: {
  152404. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) {
  152405. if (!process.env.BABEL_TYPES_8_BREAKING)
  152406. return;
  152407. let property;
  152408. switch (val.name) {
  152409. case "function":
  152410. property = "sent";
  152411. break;
  152412. case "new":
  152413. property = "target";
  152414. break;
  152415. case "import":
  152416. property = "meta";
  152417. break;
  152418. }
  152419. if (!(0, _is.default)("Identifier", node.property, {
  152420. name: property
  152421. })) {
  152422. throw new TypeError("Unrecognised MetaProperty");
  152423. }
  152424. }, {
  152425. oneOfNodeTypes: ["Identifier"]
  152426. }))
  152427. },
  152428. property: {
  152429. validate: (0, _utils.assertNodeType)("Identifier")
  152430. }
  152431. }
  152432. });
  152433. var classMethodOrPropertyCommon = {
  152434. abstract: {
  152435. validate: (0, _utils.assertValueType)("boolean"),
  152436. optional: true
  152437. },
  152438. accessibility: {
  152439. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  152440. optional: true
  152441. },
  152442. static: {
  152443. default: false
  152444. },
  152445. override: {
  152446. default: false
  152447. },
  152448. computed: {
  152449. default: false
  152450. },
  152451. optional: {
  152452. validate: (0, _utils.assertValueType)("boolean"),
  152453. optional: true
  152454. },
  152455. key: {
  152456. validate: (0, _utils.chain)(function() {
  152457. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  152458. const computed = (0, _utils.assertNodeType)("Expression");
  152459. return function(node, key, val) {
  152460. const validator = node.computed ? computed : normal;
  152461. validator(node, key, val);
  152462. };
  152463. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  152464. }
  152465. };
  152466. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  152467. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  152468. params: {
  152469. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  152470. },
  152471. kind: {
  152472. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  152473. default: "method"
  152474. },
  152475. access: {
  152476. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  152477. optional: true
  152478. },
  152479. decorators: {
  152480. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  152481. optional: true
  152482. }
  152483. });
  152484. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  152485. (0, _utils.default)("ClassMethod", {
  152486. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  152487. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  152488. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  152489. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  152490. body: {
  152491. validate: (0, _utils.assertNodeType)("BlockStatement")
  152492. }
  152493. })
  152494. });
  152495. (0, _utils.default)("ObjectPattern", {
  152496. visitor: ["properties", "typeAnnotation", "decorators"],
  152497. builder: ["properties"],
  152498. aliases: ["Pattern", "PatternLike", "LVal"],
  152499. fields: Object.assign({}, patternLikeCommon, {
  152500. properties: {
  152501. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  152502. }
  152503. })
  152504. });
  152505. (0, _utils.default)("SpreadElement", {
  152506. visitor: ["argument"],
  152507. aliases: ["UnaryLike"],
  152508. deprecatedAlias: "SpreadProperty",
  152509. fields: {
  152510. argument: {
  152511. validate: (0, _utils.assertNodeType)("Expression")
  152512. }
  152513. }
  152514. });
  152515. (0, _utils.default)("Super", {
  152516. aliases: ["Expression"]
  152517. });
  152518. (0, _utils.default)("TaggedTemplateExpression", {
  152519. visitor: ["tag", "quasi"],
  152520. aliases: ["Expression"],
  152521. fields: {
  152522. tag: {
  152523. validate: (0, _utils.assertNodeType)("Expression")
  152524. },
  152525. quasi: {
  152526. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  152527. },
  152528. typeParameters: {
  152529. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  152530. optional: true
  152531. }
  152532. }
  152533. });
  152534. (0, _utils.default)("TemplateElement", {
  152535. builder: ["value", "tail"],
  152536. fields: {
  152537. value: {
  152538. validate: (0, _utils.assertShape)({
  152539. raw: {
  152540. validate: (0, _utils.assertValueType)("string")
  152541. },
  152542. cooked: {
  152543. validate: (0, _utils.assertValueType)("string"),
  152544. optional: true
  152545. }
  152546. })
  152547. },
  152548. tail: {
  152549. default: false
  152550. }
  152551. }
  152552. });
  152553. (0, _utils.default)("TemplateLiteral", {
  152554. visitor: ["quasis", "expressions"],
  152555. aliases: ["Expression", "Literal"],
  152556. fields: {
  152557. quasis: {
  152558. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  152559. },
  152560. expressions: {
  152561. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) {
  152562. if (node.quasis.length !== val.length + 1) {
  152563. throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.
  152564. Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
  152565. }
  152566. })
  152567. }
  152568. }
  152569. });
  152570. (0, _utils.default)("YieldExpression", {
  152571. builder: ["argument", "delegate"],
  152572. visitor: ["argument"],
  152573. aliases: ["Expression", "Terminatorless"],
  152574. fields: {
  152575. delegate: {
  152576. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) {
  152577. if (!process.env.BABEL_TYPES_8_BREAKING)
  152578. return;
  152579. if (val && !node.argument) {
  152580. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  152581. }
  152582. }, {
  152583. type: "boolean"
  152584. })),
  152585. default: false
  152586. },
  152587. argument: {
  152588. optional: true,
  152589. validate: (0, _utils.assertNodeType)("Expression")
  152590. }
  152591. }
  152592. });
  152593. (0, _utils.default)("AwaitExpression", {
  152594. builder: ["argument"],
  152595. visitor: ["argument"],
  152596. aliases: ["Expression", "Terminatorless"],
  152597. fields: {
  152598. argument: {
  152599. validate: (0, _utils.assertNodeType)("Expression")
  152600. }
  152601. }
  152602. });
  152603. (0, _utils.default)("Import", {
  152604. aliases: ["Expression"]
  152605. });
  152606. (0, _utils.default)("BigIntLiteral", {
  152607. builder: ["value"],
  152608. fields: {
  152609. value: {
  152610. validate: (0, _utils.assertValueType)("string")
  152611. }
  152612. },
  152613. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  152614. });
  152615. (0, _utils.default)("ExportNamespaceSpecifier", {
  152616. visitor: ["exported"],
  152617. aliases: ["ModuleSpecifier"],
  152618. fields: {
  152619. exported: {
  152620. validate: (0, _utils.assertNodeType)("Identifier")
  152621. }
  152622. }
  152623. });
  152624. (0, _utils.default)("OptionalMemberExpression", {
  152625. builder: ["object", "property", "computed", "optional"],
  152626. visitor: ["object", "property"],
  152627. aliases: ["Expression"],
  152628. fields: {
  152629. object: {
  152630. validate: (0, _utils.assertNodeType)("Expression")
  152631. },
  152632. property: {
  152633. validate: function() {
  152634. const normal = (0, _utils.assertNodeType)("Identifier");
  152635. const computed = (0, _utils.assertNodeType)("Expression");
  152636. const validator = function(node, key, val) {
  152637. const validator2 = node.computed ? computed : normal;
  152638. validator2(node, key, val);
  152639. };
  152640. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  152641. return validator;
  152642. }()
  152643. },
  152644. computed: {
  152645. default: false
  152646. },
  152647. optional: {
  152648. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  152649. }
  152650. }
  152651. });
  152652. (0, _utils.default)("OptionalCallExpression", {
  152653. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  152654. builder: ["callee", "arguments", "optional"],
  152655. aliases: ["Expression"],
  152656. fields: {
  152657. callee: {
  152658. validate: (0, _utils.assertNodeType)("Expression")
  152659. },
  152660. arguments: {
  152661. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  152662. },
  152663. optional: {
  152664. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  152665. },
  152666. typeArguments: {
  152667. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  152668. optional: true
  152669. },
  152670. typeParameters: {
  152671. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  152672. optional: true
  152673. }
  152674. }
  152675. });
  152676. }
  152677. });
  152678. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/flow.js
  152679. var require_flow9 = __commonJS({
  152680. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/flow.js"() {
  152681. "use strict";
  152682. var _utils = require_utils7();
  152683. var defineInterfaceishType = (name2, typeParameterType = "TypeParameterDeclaration") => {
  152684. (0, _utils.default)(name2, {
  152685. builder: ["id", "typeParameters", "extends", "body"],
  152686. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  152687. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152688. fields: {
  152689. id: (0, _utils.validateType)("Identifier"),
  152690. typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
  152691. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  152692. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  152693. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  152694. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  152695. }
  152696. });
  152697. };
  152698. (0, _utils.default)("AnyTypeAnnotation", {
  152699. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152700. });
  152701. (0, _utils.default)("ArrayTypeAnnotation", {
  152702. visitor: ["elementType"],
  152703. aliases: ["Flow", "FlowType"],
  152704. fields: {
  152705. elementType: (0, _utils.validateType)("FlowType")
  152706. }
  152707. });
  152708. (0, _utils.default)("BooleanTypeAnnotation", {
  152709. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152710. });
  152711. (0, _utils.default)("BooleanLiteralTypeAnnotation", {
  152712. builder: ["value"],
  152713. aliases: ["Flow", "FlowType"],
  152714. fields: {
  152715. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  152716. }
  152717. });
  152718. (0, _utils.default)("NullLiteralTypeAnnotation", {
  152719. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152720. });
  152721. (0, _utils.default)("ClassImplements", {
  152722. visitor: ["id", "typeParameters"],
  152723. aliases: ["Flow"],
  152724. fields: {
  152725. id: (0, _utils.validateType)("Identifier"),
  152726. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  152727. }
  152728. });
  152729. defineInterfaceishType("DeclareClass");
  152730. (0, _utils.default)("DeclareFunction", {
  152731. visitor: ["id"],
  152732. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152733. fields: {
  152734. id: (0, _utils.validateType)("Identifier"),
  152735. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  152736. }
  152737. });
  152738. defineInterfaceishType("DeclareInterface");
  152739. (0, _utils.default)("DeclareModule", {
  152740. builder: ["id", "body", "kind"],
  152741. visitor: ["id", "body"],
  152742. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152743. fields: {
  152744. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  152745. body: (0, _utils.validateType)("BlockStatement"),
  152746. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  152747. }
  152748. });
  152749. (0, _utils.default)("DeclareModuleExports", {
  152750. visitor: ["typeAnnotation"],
  152751. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152752. fields: {
  152753. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  152754. }
  152755. });
  152756. (0, _utils.default)("DeclareTypeAlias", {
  152757. visitor: ["id", "typeParameters", "right"],
  152758. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152759. fields: {
  152760. id: (0, _utils.validateType)("Identifier"),
  152761. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  152762. right: (0, _utils.validateType)("FlowType")
  152763. }
  152764. });
  152765. (0, _utils.default)("DeclareOpaqueType", {
  152766. visitor: ["id", "typeParameters", "supertype"],
  152767. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152768. fields: {
  152769. id: (0, _utils.validateType)("Identifier"),
  152770. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  152771. supertype: (0, _utils.validateOptionalType)("FlowType")
  152772. }
  152773. });
  152774. (0, _utils.default)("DeclareVariable", {
  152775. visitor: ["id"],
  152776. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152777. fields: {
  152778. id: (0, _utils.validateType)("Identifier")
  152779. }
  152780. });
  152781. (0, _utils.default)("DeclareExportDeclaration", {
  152782. visitor: ["declaration", "specifiers", "source"],
  152783. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152784. fields: {
  152785. declaration: (0, _utils.validateOptionalType)("Flow"),
  152786. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  152787. source: (0, _utils.validateOptionalType)("StringLiteral"),
  152788. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  152789. }
  152790. });
  152791. (0, _utils.default)("DeclareExportAllDeclaration", {
  152792. visitor: ["source"],
  152793. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152794. fields: {
  152795. source: (0, _utils.validateType)("StringLiteral"),
  152796. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  152797. }
  152798. });
  152799. (0, _utils.default)("DeclaredPredicate", {
  152800. visitor: ["value"],
  152801. aliases: ["Flow", "FlowPredicate"],
  152802. fields: {
  152803. value: (0, _utils.validateType)("Flow")
  152804. }
  152805. });
  152806. (0, _utils.default)("ExistsTypeAnnotation", {
  152807. aliases: ["Flow", "FlowType"]
  152808. });
  152809. (0, _utils.default)("FunctionTypeAnnotation", {
  152810. visitor: ["typeParameters", "params", "rest", "returnType"],
  152811. aliases: ["Flow", "FlowType"],
  152812. fields: {
  152813. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  152814. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  152815. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  152816. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  152817. returnType: (0, _utils.validateType)("FlowType")
  152818. }
  152819. });
  152820. (0, _utils.default)("FunctionTypeParam", {
  152821. visitor: ["name", "typeAnnotation"],
  152822. aliases: ["Flow"],
  152823. fields: {
  152824. name: (0, _utils.validateOptionalType)("Identifier"),
  152825. typeAnnotation: (0, _utils.validateType)("FlowType"),
  152826. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  152827. }
  152828. });
  152829. (0, _utils.default)("GenericTypeAnnotation", {
  152830. visitor: ["id", "typeParameters"],
  152831. aliases: ["Flow", "FlowType"],
  152832. fields: {
  152833. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  152834. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  152835. }
  152836. });
  152837. (0, _utils.default)("InferredPredicate", {
  152838. aliases: ["Flow", "FlowPredicate"]
  152839. });
  152840. (0, _utils.default)("InterfaceExtends", {
  152841. visitor: ["id", "typeParameters"],
  152842. aliases: ["Flow"],
  152843. fields: {
  152844. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  152845. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  152846. }
  152847. });
  152848. defineInterfaceishType("InterfaceDeclaration");
  152849. (0, _utils.default)("InterfaceTypeAnnotation", {
  152850. visitor: ["extends", "body"],
  152851. aliases: ["Flow", "FlowType"],
  152852. fields: {
  152853. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  152854. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  152855. }
  152856. });
  152857. (0, _utils.default)("IntersectionTypeAnnotation", {
  152858. visitor: ["types"],
  152859. aliases: ["Flow", "FlowType"],
  152860. fields: {
  152861. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  152862. }
  152863. });
  152864. (0, _utils.default)("MixedTypeAnnotation", {
  152865. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152866. });
  152867. (0, _utils.default)("EmptyTypeAnnotation", {
  152868. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152869. });
  152870. (0, _utils.default)("NullableTypeAnnotation", {
  152871. visitor: ["typeAnnotation"],
  152872. aliases: ["Flow", "FlowType"],
  152873. fields: {
  152874. typeAnnotation: (0, _utils.validateType)("FlowType")
  152875. }
  152876. });
  152877. (0, _utils.default)("NumberLiteralTypeAnnotation", {
  152878. builder: ["value"],
  152879. aliases: ["Flow", "FlowType"],
  152880. fields: {
  152881. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  152882. }
  152883. });
  152884. (0, _utils.default)("NumberTypeAnnotation", {
  152885. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152886. });
  152887. (0, _utils.default)("ObjectTypeAnnotation", {
  152888. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  152889. aliases: ["Flow", "FlowType"],
  152890. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  152891. fields: {
  152892. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  152893. indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
  152894. callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
  152895. internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
  152896. exact: {
  152897. validate: (0, _utils.assertValueType)("boolean"),
  152898. default: false
  152899. },
  152900. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  152901. }
  152902. });
  152903. (0, _utils.default)("ObjectTypeInternalSlot", {
  152904. visitor: ["id", "value", "optional", "static", "method"],
  152905. aliases: ["Flow", "UserWhitespacable"],
  152906. fields: {
  152907. id: (0, _utils.validateType)("Identifier"),
  152908. value: (0, _utils.validateType)("FlowType"),
  152909. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152910. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152911. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  152912. }
  152913. });
  152914. (0, _utils.default)("ObjectTypeCallProperty", {
  152915. visitor: ["value"],
  152916. aliases: ["Flow", "UserWhitespacable"],
  152917. fields: {
  152918. value: (0, _utils.validateType)("FlowType"),
  152919. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  152920. }
  152921. });
  152922. (0, _utils.default)("ObjectTypeIndexer", {
  152923. visitor: ["id", "key", "value", "variance"],
  152924. aliases: ["Flow", "UserWhitespacable"],
  152925. fields: {
  152926. id: (0, _utils.validateOptionalType)("Identifier"),
  152927. key: (0, _utils.validateType)("FlowType"),
  152928. value: (0, _utils.validateType)("FlowType"),
  152929. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152930. variance: (0, _utils.validateOptionalType)("Variance")
  152931. }
  152932. });
  152933. (0, _utils.default)("ObjectTypeProperty", {
  152934. visitor: ["key", "value", "variance"],
  152935. aliases: ["Flow", "UserWhitespacable"],
  152936. fields: {
  152937. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  152938. value: (0, _utils.validateType)("FlowType"),
  152939. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  152940. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152941. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152942. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  152943. variance: (0, _utils.validateOptionalType)("Variance"),
  152944. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  152945. }
  152946. });
  152947. (0, _utils.default)("ObjectTypeSpreadProperty", {
  152948. visitor: ["argument"],
  152949. aliases: ["Flow", "UserWhitespacable"],
  152950. fields: {
  152951. argument: (0, _utils.validateType)("FlowType")
  152952. }
  152953. });
  152954. (0, _utils.default)("OpaqueType", {
  152955. visitor: ["id", "typeParameters", "supertype", "impltype"],
  152956. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  152957. fields: {
  152958. id: (0, _utils.validateType)("Identifier"),
  152959. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  152960. supertype: (0, _utils.validateOptionalType)("FlowType"),
  152961. impltype: (0, _utils.validateType)("FlowType")
  152962. }
  152963. });
  152964. (0, _utils.default)("QualifiedTypeIdentifier", {
  152965. visitor: ["id", "qualification"],
  152966. aliases: ["Flow"],
  152967. fields: {
  152968. id: (0, _utils.validateType)("Identifier"),
  152969. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  152970. }
  152971. });
  152972. (0, _utils.default)("StringLiteralTypeAnnotation", {
  152973. builder: ["value"],
  152974. aliases: ["Flow", "FlowType"],
  152975. fields: {
  152976. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  152977. }
  152978. });
  152979. (0, _utils.default)("StringTypeAnnotation", {
  152980. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152981. });
  152982. (0, _utils.default)("SymbolTypeAnnotation", {
  152983. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152984. });
  152985. (0, _utils.default)("ThisTypeAnnotation", {
  152986. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  152987. });
  152988. (0, _utils.default)("TupleTypeAnnotation", {
  152989. visitor: ["types"],
  152990. aliases: ["Flow", "FlowType"],
  152991. fields: {
  152992. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  152993. }
  152994. });
  152995. (0, _utils.default)("TypeofTypeAnnotation", {
  152996. visitor: ["argument"],
  152997. aliases: ["Flow", "FlowType"],
  152998. fields: {
  152999. argument: (0, _utils.validateType)("FlowType")
  153000. }
  153001. });
  153002. (0, _utils.default)("TypeAlias", {
  153003. visitor: ["id", "typeParameters", "right"],
  153004. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  153005. fields: {
  153006. id: (0, _utils.validateType)("Identifier"),
  153007. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  153008. right: (0, _utils.validateType)("FlowType")
  153009. }
  153010. });
  153011. (0, _utils.default)("TypeAnnotation", {
  153012. aliases: ["Flow"],
  153013. visitor: ["typeAnnotation"],
  153014. fields: {
  153015. typeAnnotation: (0, _utils.validateType)("FlowType")
  153016. }
  153017. });
  153018. (0, _utils.default)("TypeCastExpression", {
  153019. visitor: ["expression", "typeAnnotation"],
  153020. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  153021. fields: {
  153022. expression: (0, _utils.validateType)("Expression"),
  153023. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  153024. }
  153025. });
  153026. (0, _utils.default)("TypeParameter", {
  153027. aliases: ["Flow"],
  153028. visitor: ["bound", "default", "variance"],
  153029. fields: {
  153030. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  153031. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  153032. default: (0, _utils.validateOptionalType)("FlowType"),
  153033. variance: (0, _utils.validateOptionalType)("Variance")
  153034. }
  153035. });
  153036. (0, _utils.default)("TypeParameterDeclaration", {
  153037. aliases: ["Flow"],
  153038. visitor: ["params"],
  153039. fields: {
  153040. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  153041. }
  153042. });
  153043. (0, _utils.default)("TypeParameterInstantiation", {
  153044. aliases: ["Flow"],
  153045. visitor: ["params"],
  153046. fields: {
  153047. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  153048. }
  153049. });
  153050. (0, _utils.default)("UnionTypeAnnotation", {
  153051. visitor: ["types"],
  153052. aliases: ["Flow", "FlowType"],
  153053. fields: {
  153054. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  153055. }
  153056. });
  153057. (0, _utils.default)("Variance", {
  153058. aliases: ["Flow"],
  153059. builder: ["kind"],
  153060. fields: {
  153061. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  153062. }
  153063. });
  153064. (0, _utils.default)("VoidTypeAnnotation", {
  153065. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  153066. });
  153067. (0, _utils.default)("EnumDeclaration", {
  153068. aliases: ["Statement", "Declaration"],
  153069. visitor: ["id", "body"],
  153070. fields: {
  153071. id: (0, _utils.validateType)("Identifier"),
  153072. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  153073. }
  153074. });
  153075. (0, _utils.default)("EnumBooleanBody", {
  153076. aliases: ["EnumBody"],
  153077. visitor: ["members"],
  153078. fields: {
  153079. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  153080. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  153081. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153082. }
  153083. });
  153084. (0, _utils.default)("EnumNumberBody", {
  153085. aliases: ["EnumBody"],
  153086. visitor: ["members"],
  153087. fields: {
  153088. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  153089. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  153090. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153091. }
  153092. });
  153093. (0, _utils.default)("EnumStringBody", {
  153094. aliases: ["EnumBody"],
  153095. visitor: ["members"],
  153096. fields: {
  153097. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  153098. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  153099. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153100. }
  153101. });
  153102. (0, _utils.default)("EnumSymbolBody", {
  153103. aliases: ["EnumBody"],
  153104. visitor: ["members"],
  153105. fields: {
  153106. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  153107. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153108. }
  153109. });
  153110. (0, _utils.default)("EnumBooleanMember", {
  153111. aliases: ["EnumMember"],
  153112. visitor: ["id"],
  153113. fields: {
  153114. id: (0, _utils.validateType)("Identifier"),
  153115. init: (0, _utils.validateType)("BooleanLiteral")
  153116. }
  153117. });
  153118. (0, _utils.default)("EnumNumberMember", {
  153119. aliases: ["EnumMember"],
  153120. visitor: ["id", "init"],
  153121. fields: {
  153122. id: (0, _utils.validateType)("Identifier"),
  153123. init: (0, _utils.validateType)("NumericLiteral")
  153124. }
  153125. });
  153126. (0, _utils.default)("EnumStringMember", {
  153127. aliases: ["EnumMember"],
  153128. visitor: ["id", "init"],
  153129. fields: {
  153130. id: (0, _utils.validateType)("Identifier"),
  153131. init: (0, _utils.validateType)("StringLiteral")
  153132. }
  153133. });
  153134. (0, _utils.default)("EnumDefaultedMember", {
  153135. aliases: ["EnumMember"],
  153136. visitor: ["id"],
  153137. fields: {
  153138. id: (0, _utils.validateType)("Identifier")
  153139. }
  153140. });
  153141. (0, _utils.default)("IndexedAccessType", {
  153142. visitor: ["objectType", "indexType"],
  153143. aliases: ["Flow", "FlowType"],
  153144. fields: {
  153145. objectType: (0, _utils.validateType)("FlowType"),
  153146. indexType: (0, _utils.validateType)("FlowType")
  153147. }
  153148. });
  153149. (0, _utils.default)("OptionalIndexedAccessType", {
  153150. visitor: ["objectType", "indexType"],
  153151. aliases: ["Flow", "FlowType"],
  153152. fields: {
  153153. objectType: (0, _utils.validateType)("FlowType"),
  153154. indexType: (0, _utils.validateType)("FlowType"),
  153155. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  153156. }
  153157. });
  153158. }
  153159. });
  153160. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/jsx.js
  153161. var require_jsx9 = __commonJS({
  153162. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/jsx.js"() {
  153163. "use strict";
  153164. var _utils = require_utils7();
  153165. (0, _utils.default)("JSXAttribute", {
  153166. visitor: ["name", "value"],
  153167. aliases: ["JSX", "Immutable"],
  153168. fields: {
  153169. name: {
  153170. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  153171. },
  153172. value: {
  153173. optional: true,
  153174. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  153175. }
  153176. }
  153177. });
  153178. (0, _utils.default)("JSXClosingElement", {
  153179. visitor: ["name"],
  153180. aliases: ["JSX", "Immutable"],
  153181. fields: {
  153182. name: {
  153183. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  153184. }
  153185. }
  153186. });
  153187. (0, _utils.default)("JSXElement", {
  153188. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  153189. visitor: ["openingElement", "children", "closingElement"],
  153190. aliases: ["JSX", "Immutable", "Expression"],
  153191. fields: {
  153192. openingElement: {
  153193. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  153194. },
  153195. closingElement: {
  153196. optional: true,
  153197. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  153198. },
  153199. children: {
  153200. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  153201. },
  153202. selfClosing: {
  153203. validate: (0, _utils.assertValueType)("boolean"),
  153204. optional: true
  153205. }
  153206. }
  153207. });
  153208. (0, _utils.default)("JSXEmptyExpression", {
  153209. aliases: ["JSX"]
  153210. });
  153211. (0, _utils.default)("JSXExpressionContainer", {
  153212. visitor: ["expression"],
  153213. aliases: ["JSX", "Immutable"],
  153214. fields: {
  153215. expression: {
  153216. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  153217. }
  153218. }
  153219. });
  153220. (0, _utils.default)("JSXSpreadChild", {
  153221. visitor: ["expression"],
  153222. aliases: ["JSX", "Immutable"],
  153223. fields: {
  153224. expression: {
  153225. validate: (0, _utils.assertNodeType)("Expression")
  153226. }
  153227. }
  153228. });
  153229. (0, _utils.default)("JSXIdentifier", {
  153230. builder: ["name"],
  153231. aliases: ["JSX"],
  153232. fields: {
  153233. name: {
  153234. validate: (0, _utils.assertValueType)("string")
  153235. }
  153236. }
  153237. });
  153238. (0, _utils.default)("JSXMemberExpression", {
  153239. visitor: ["object", "property"],
  153240. aliases: ["JSX"],
  153241. fields: {
  153242. object: {
  153243. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  153244. },
  153245. property: {
  153246. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  153247. }
  153248. }
  153249. });
  153250. (0, _utils.default)("JSXNamespacedName", {
  153251. visitor: ["namespace", "name"],
  153252. aliases: ["JSX"],
  153253. fields: {
  153254. namespace: {
  153255. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  153256. },
  153257. name: {
  153258. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  153259. }
  153260. }
  153261. });
  153262. (0, _utils.default)("JSXOpeningElement", {
  153263. builder: ["name", "attributes", "selfClosing"],
  153264. visitor: ["name", "attributes"],
  153265. aliases: ["JSX", "Immutable"],
  153266. fields: {
  153267. name: {
  153268. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  153269. },
  153270. selfClosing: {
  153271. default: false
  153272. },
  153273. attributes: {
  153274. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  153275. },
  153276. typeParameters: {
  153277. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  153278. optional: true
  153279. }
  153280. }
  153281. });
  153282. (0, _utils.default)("JSXSpreadAttribute", {
  153283. visitor: ["argument"],
  153284. aliases: ["JSX"],
  153285. fields: {
  153286. argument: {
  153287. validate: (0, _utils.assertNodeType)("Expression")
  153288. }
  153289. }
  153290. });
  153291. (0, _utils.default)("JSXText", {
  153292. aliases: ["JSX", "Immutable"],
  153293. builder: ["value"],
  153294. fields: {
  153295. value: {
  153296. validate: (0, _utils.assertValueType)("string")
  153297. }
  153298. }
  153299. });
  153300. (0, _utils.default)("JSXFragment", {
  153301. builder: ["openingFragment", "closingFragment", "children"],
  153302. visitor: ["openingFragment", "children", "closingFragment"],
  153303. aliases: ["JSX", "Immutable", "Expression"],
  153304. fields: {
  153305. openingFragment: {
  153306. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  153307. },
  153308. closingFragment: {
  153309. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  153310. },
  153311. children: {
  153312. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  153313. }
  153314. }
  153315. });
  153316. (0, _utils.default)("JSXOpeningFragment", {
  153317. aliases: ["JSX", "Immutable"]
  153318. });
  153319. (0, _utils.default)("JSXClosingFragment", {
  153320. aliases: ["JSX", "Immutable"]
  153321. });
  153322. }
  153323. });
  153324. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/placeholders.js
  153325. var require_placeholders7 = __commonJS({
  153326. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  153327. "use strict";
  153328. Object.defineProperty(exports, "__esModule", {
  153329. value: true
  153330. });
  153331. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  153332. var _utils = require_utils7();
  153333. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  153334. exports.PLACEHOLDERS = PLACEHOLDERS;
  153335. var PLACEHOLDERS_ALIAS = {
  153336. Declaration: ["Statement"],
  153337. Pattern: ["PatternLike", "LVal"]
  153338. };
  153339. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  153340. for (const type of PLACEHOLDERS) {
  153341. const alias = _utils.ALIAS_KEYS[type];
  153342. if (alias != null && alias.length)
  153343. PLACEHOLDERS_ALIAS[type] = alias;
  153344. }
  153345. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  153346. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  153347. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  153348. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  153349. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  153350. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  153351. }
  153352. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  153353. });
  153354. });
  153355. }
  153356. });
  153357. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/misc.js
  153358. var require_misc7 = __commonJS({
  153359. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/misc.js"() {
  153360. "use strict";
  153361. var _utils = require_utils7();
  153362. var _placeholders = require_placeholders7();
  153363. {
  153364. (0, _utils.default)("Noop", {
  153365. visitor: []
  153366. });
  153367. }
  153368. (0, _utils.default)("Placeholder", {
  153369. visitor: [],
  153370. builder: ["expectedNode", "name"],
  153371. fields: {
  153372. name: {
  153373. validate: (0, _utils.assertNodeType)("Identifier")
  153374. },
  153375. expectedNode: {
  153376. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  153377. }
  153378. }
  153379. });
  153380. (0, _utils.default)("V8IntrinsicIdentifier", {
  153381. builder: ["name"],
  153382. fields: {
  153383. name: {
  153384. validate: (0, _utils.assertValueType)("string")
  153385. }
  153386. }
  153387. });
  153388. }
  153389. });
  153390. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/experimental.js
  153391. var require_experimental7 = __commonJS({
  153392. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/experimental.js"() {
  153393. "use strict";
  153394. var _utils = require_utils7();
  153395. var _core = require_core7();
  153396. (0, _utils.default)("ArgumentPlaceholder", {});
  153397. (0, _utils.default)("BindExpression", {
  153398. visitor: ["object", "callee"],
  153399. aliases: ["Expression"],
  153400. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  153401. object: {
  153402. validate: Object.assign(() => {
  153403. }, {
  153404. oneOfNodeTypes: ["Expression"]
  153405. })
  153406. },
  153407. callee: {
  153408. validate: Object.assign(() => {
  153409. }, {
  153410. oneOfNodeTypes: ["Expression"]
  153411. })
  153412. }
  153413. } : {
  153414. object: {
  153415. validate: (0, _utils.assertNodeType)("Expression")
  153416. },
  153417. callee: {
  153418. validate: (0, _utils.assertNodeType)("Expression")
  153419. }
  153420. }
  153421. });
  153422. (0, _utils.default)("ClassProperty", {
  153423. visitor: ["key", "value", "typeAnnotation", "decorators"],
  153424. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  153425. aliases: ["Property"],
  153426. fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
  153427. value: {
  153428. validate: (0, _utils.assertNodeType)("Expression"),
  153429. optional: true
  153430. },
  153431. definite: {
  153432. validate: (0, _utils.assertValueType)("boolean"),
  153433. optional: true
  153434. },
  153435. typeAnnotation: {
  153436. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  153437. optional: true
  153438. },
  153439. decorators: {
  153440. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  153441. optional: true
  153442. },
  153443. readonly: {
  153444. validate: (0, _utils.assertValueType)("boolean"),
  153445. optional: true
  153446. },
  153447. declare: {
  153448. validate: (0, _utils.assertValueType)("boolean"),
  153449. optional: true
  153450. }
  153451. })
  153452. });
  153453. (0, _utils.default)("PipelineTopicExpression", {
  153454. builder: ["expression"],
  153455. visitor: ["expression"],
  153456. fields: {
  153457. expression: {
  153458. validate: (0, _utils.assertNodeType)("Expression")
  153459. }
  153460. }
  153461. });
  153462. (0, _utils.default)("PipelineBareFunction", {
  153463. builder: ["callee"],
  153464. visitor: ["callee"],
  153465. fields: {
  153466. callee: {
  153467. validate: (0, _utils.assertNodeType)("Expression")
  153468. }
  153469. }
  153470. });
  153471. (0, _utils.default)("PipelinePrimaryTopicReference", {
  153472. aliases: ["Expression"]
  153473. });
  153474. (0, _utils.default)("ClassPrivateProperty", {
  153475. visitor: ["key", "value", "decorators"],
  153476. builder: ["key", "value", "decorators", "static"],
  153477. aliases: ["Property", "Private"],
  153478. fields: {
  153479. key: {
  153480. validate: (0, _utils.assertNodeType)("PrivateName")
  153481. },
  153482. value: {
  153483. validate: (0, _utils.assertNodeType)("Expression"),
  153484. optional: true
  153485. },
  153486. typeAnnotation: {
  153487. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  153488. optional: true
  153489. },
  153490. decorators: {
  153491. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  153492. optional: true
  153493. }
  153494. }
  153495. });
  153496. (0, _utils.default)("ClassPrivateMethod", {
  153497. builder: ["kind", "key", "params", "body", "static"],
  153498. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  153499. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  153500. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
  153501. key: {
  153502. validate: (0, _utils.assertNodeType)("PrivateName")
  153503. },
  153504. body: {
  153505. validate: (0, _utils.assertNodeType)("BlockStatement")
  153506. }
  153507. })
  153508. });
  153509. (0, _utils.default)("ImportAttribute", {
  153510. visitor: ["key", "value"],
  153511. fields: {
  153512. key: {
  153513. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  153514. },
  153515. value: {
  153516. validate: (0, _utils.assertNodeType)("StringLiteral")
  153517. }
  153518. }
  153519. });
  153520. (0, _utils.default)("Decorator", {
  153521. visitor: ["expression"],
  153522. fields: {
  153523. expression: {
  153524. validate: (0, _utils.assertNodeType)("Expression")
  153525. }
  153526. }
  153527. });
  153528. (0, _utils.default)("DoExpression", {
  153529. visitor: ["body"],
  153530. builder: ["body", "async"],
  153531. aliases: ["Expression"],
  153532. fields: {
  153533. body: {
  153534. validate: (0, _utils.assertNodeType)("BlockStatement")
  153535. },
  153536. async: {
  153537. validate: (0, _utils.assertValueType)("boolean"),
  153538. default: false
  153539. }
  153540. }
  153541. });
  153542. (0, _utils.default)("ExportDefaultSpecifier", {
  153543. visitor: ["exported"],
  153544. aliases: ["ModuleSpecifier"],
  153545. fields: {
  153546. exported: {
  153547. validate: (0, _utils.assertNodeType)("Identifier")
  153548. }
  153549. }
  153550. });
  153551. (0, _utils.default)("PrivateName", {
  153552. visitor: ["id"],
  153553. aliases: ["Private"],
  153554. fields: {
  153555. id: {
  153556. validate: (0, _utils.assertNodeType)("Identifier")
  153557. }
  153558. }
  153559. });
  153560. (0, _utils.default)("RecordExpression", {
  153561. visitor: ["properties"],
  153562. aliases: ["Expression"],
  153563. fields: {
  153564. properties: {
  153565. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  153566. }
  153567. }
  153568. });
  153569. (0, _utils.default)("TupleExpression", {
  153570. fields: {
  153571. elements: {
  153572. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  153573. default: []
  153574. }
  153575. },
  153576. visitor: ["elements"],
  153577. aliases: ["Expression"]
  153578. });
  153579. (0, _utils.default)("DecimalLiteral", {
  153580. builder: ["value"],
  153581. fields: {
  153582. value: {
  153583. validate: (0, _utils.assertValueType)("string")
  153584. }
  153585. },
  153586. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  153587. });
  153588. (0, _utils.default)("StaticBlock", {
  153589. visitor: ["body"],
  153590. fields: {
  153591. body: {
  153592. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  153593. }
  153594. },
  153595. aliases: ["Scopable", "BlockParent"]
  153596. });
  153597. (0, _utils.default)("ModuleExpression", {
  153598. visitor: ["body"],
  153599. fields: {
  153600. body: {
  153601. validate: (0, _utils.assertNodeType)("Program")
  153602. }
  153603. },
  153604. aliases: ["Expression"]
  153605. });
  153606. }
  153607. });
  153608. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/typescript.js
  153609. var require_typescript9 = __commonJS({
  153610. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/typescript.js"() {
  153611. "use strict";
  153612. var _utils = require_utils7();
  153613. var _core = require_core7();
  153614. var bool = (0, _utils.assertValueType)("boolean");
  153615. var tSFunctionTypeAnnotationCommon = {
  153616. returnType: {
  153617. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  153618. optional: true
  153619. },
  153620. typeParameters: {
  153621. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  153622. optional: true
  153623. }
  153624. };
  153625. (0, _utils.default)("TSParameterProperty", {
  153626. aliases: ["LVal"],
  153627. visitor: ["parameter"],
  153628. fields: {
  153629. accessibility: {
  153630. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  153631. optional: true
  153632. },
  153633. readonly: {
  153634. validate: (0, _utils.assertValueType)("boolean"),
  153635. optional: true
  153636. },
  153637. parameter: {
  153638. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  153639. }
  153640. }
  153641. });
  153642. (0, _utils.default)("TSDeclareFunction", {
  153643. aliases: ["Statement", "Declaration"],
  153644. visitor: ["id", "typeParameters", "params", "returnType"],
  153645. fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  153646. });
  153647. (0, _utils.default)("TSDeclareMethod", {
  153648. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  153649. fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  153650. });
  153651. (0, _utils.default)("TSQualifiedName", {
  153652. aliases: ["TSEntityName"],
  153653. visitor: ["left", "right"],
  153654. fields: {
  153655. left: (0, _utils.validateType)("TSEntityName"),
  153656. right: (0, _utils.validateType)("Identifier")
  153657. }
  153658. });
  153659. var signatureDeclarationCommon = {
  153660. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  153661. parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  153662. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  153663. };
  153664. var callConstructSignatureDeclaration = {
  153665. aliases: ["TSTypeElement"],
  153666. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  153667. fields: signatureDeclarationCommon
  153668. };
  153669. (0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  153670. (0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  153671. var namedTypeElementCommon = {
  153672. key: (0, _utils.validateType)("Expression"),
  153673. computed: (0, _utils.validate)(bool),
  153674. optional: (0, _utils.validateOptional)(bool)
  153675. };
  153676. (0, _utils.default)("TSPropertySignature", {
  153677. aliases: ["TSTypeElement"],
  153678. visitor: ["key", "typeAnnotation", "initializer"],
  153679. fields: Object.assign({}, namedTypeElementCommon, {
  153680. readonly: (0, _utils.validateOptional)(bool),
  153681. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  153682. initializer: (0, _utils.validateOptionalType)("Expression")
  153683. })
  153684. });
  153685. (0, _utils.default)("TSMethodSignature", {
  153686. aliases: ["TSTypeElement"],
  153687. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  153688. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  153689. kind: {
  153690. validate: (0, _utils.assertOneOf)("method", "get", "set")
  153691. }
  153692. })
  153693. });
  153694. (0, _utils.default)("TSIndexSignature", {
  153695. aliases: ["TSTypeElement"],
  153696. visitor: ["parameters", "typeAnnotation"],
  153697. fields: {
  153698. readonly: (0, _utils.validateOptional)(bool),
  153699. static: (0, _utils.validateOptional)(bool),
  153700. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  153701. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  153702. }
  153703. });
  153704. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  153705. for (const type of tsKeywordTypes) {
  153706. (0, _utils.default)(type, {
  153707. aliases: ["TSType", "TSBaseType"],
  153708. visitor: [],
  153709. fields: {}
  153710. });
  153711. }
  153712. (0, _utils.default)("TSThisType", {
  153713. aliases: ["TSType", "TSBaseType"],
  153714. visitor: [],
  153715. fields: {}
  153716. });
  153717. var fnOrCtrBase = {
  153718. aliases: ["TSType"],
  153719. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  153720. };
  153721. (0, _utils.default)("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  153722. fields: signatureDeclarationCommon
  153723. }));
  153724. (0, _utils.default)("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  153725. fields: Object.assign({}, signatureDeclarationCommon, {
  153726. abstract: (0, _utils.validateOptional)(bool)
  153727. })
  153728. }));
  153729. (0, _utils.default)("TSTypeReference", {
  153730. aliases: ["TSType"],
  153731. visitor: ["typeName", "typeParameters"],
  153732. fields: {
  153733. typeName: (0, _utils.validateType)("TSEntityName"),
  153734. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  153735. }
  153736. });
  153737. (0, _utils.default)("TSTypePredicate", {
  153738. aliases: ["TSType"],
  153739. visitor: ["parameterName", "typeAnnotation"],
  153740. builder: ["parameterName", "typeAnnotation", "asserts"],
  153741. fields: {
  153742. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  153743. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  153744. asserts: (0, _utils.validateOptional)(bool)
  153745. }
  153746. });
  153747. (0, _utils.default)("TSTypeQuery", {
  153748. aliases: ["TSType"],
  153749. visitor: ["exprName"],
  153750. fields: {
  153751. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
  153752. }
  153753. });
  153754. (0, _utils.default)("TSTypeLiteral", {
  153755. aliases: ["TSType"],
  153756. visitor: ["members"],
  153757. fields: {
  153758. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  153759. }
  153760. });
  153761. (0, _utils.default)("TSArrayType", {
  153762. aliases: ["TSType"],
  153763. visitor: ["elementType"],
  153764. fields: {
  153765. elementType: (0, _utils.validateType)("TSType")
  153766. }
  153767. });
  153768. (0, _utils.default)("TSTupleType", {
  153769. aliases: ["TSType"],
  153770. visitor: ["elementTypes"],
  153771. fields: {
  153772. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  153773. }
  153774. });
  153775. (0, _utils.default)("TSOptionalType", {
  153776. aliases: ["TSType"],
  153777. visitor: ["typeAnnotation"],
  153778. fields: {
  153779. typeAnnotation: (0, _utils.validateType)("TSType")
  153780. }
  153781. });
  153782. (0, _utils.default)("TSRestType", {
  153783. aliases: ["TSType"],
  153784. visitor: ["typeAnnotation"],
  153785. fields: {
  153786. typeAnnotation: (0, _utils.validateType)("TSType")
  153787. }
  153788. });
  153789. (0, _utils.default)("TSNamedTupleMember", {
  153790. visitor: ["label", "elementType"],
  153791. builder: ["label", "elementType", "optional"],
  153792. fields: {
  153793. label: (0, _utils.validateType)("Identifier"),
  153794. optional: {
  153795. validate: bool,
  153796. default: false
  153797. },
  153798. elementType: (0, _utils.validateType)("TSType")
  153799. }
  153800. });
  153801. var unionOrIntersection = {
  153802. aliases: ["TSType"],
  153803. visitor: ["types"],
  153804. fields: {
  153805. types: (0, _utils.validateArrayOfType)("TSType")
  153806. }
  153807. };
  153808. (0, _utils.default)("TSUnionType", unionOrIntersection);
  153809. (0, _utils.default)("TSIntersectionType", unionOrIntersection);
  153810. (0, _utils.default)("TSConditionalType", {
  153811. aliases: ["TSType"],
  153812. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  153813. fields: {
  153814. checkType: (0, _utils.validateType)("TSType"),
  153815. extendsType: (0, _utils.validateType)("TSType"),
  153816. trueType: (0, _utils.validateType)("TSType"),
  153817. falseType: (0, _utils.validateType)("TSType")
  153818. }
  153819. });
  153820. (0, _utils.default)("TSInferType", {
  153821. aliases: ["TSType"],
  153822. visitor: ["typeParameter"],
  153823. fields: {
  153824. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  153825. }
  153826. });
  153827. (0, _utils.default)("TSParenthesizedType", {
  153828. aliases: ["TSType"],
  153829. visitor: ["typeAnnotation"],
  153830. fields: {
  153831. typeAnnotation: (0, _utils.validateType)("TSType")
  153832. }
  153833. });
  153834. (0, _utils.default)("TSTypeOperator", {
  153835. aliases: ["TSType"],
  153836. visitor: ["typeAnnotation"],
  153837. fields: {
  153838. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  153839. typeAnnotation: (0, _utils.validateType)("TSType")
  153840. }
  153841. });
  153842. (0, _utils.default)("TSIndexedAccessType", {
  153843. aliases: ["TSType"],
  153844. visitor: ["objectType", "indexType"],
  153845. fields: {
  153846. objectType: (0, _utils.validateType)("TSType"),
  153847. indexType: (0, _utils.validateType)("TSType")
  153848. }
  153849. });
  153850. (0, _utils.default)("TSMappedType", {
  153851. aliases: ["TSType"],
  153852. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  153853. fields: {
  153854. readonly: (0, _utils.validateOptional)(bool),
  153855. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  153856. optional: (0, _utils.validateOptional)(bool),
  153857. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  153858. nameType: (0, _utils.validateOptionalType)("TSType")
  153859. }
  153860. });
  153861. (0, _utils.default)("TSLiteralType", {
  153862. aliases: ["TSType", "TSBaseType"],
  153863. visitor: ["literal"],
  153864. fields: {
  153865. literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  153866. }
  153867. });
  153868. (0, _utils.default)("TSExpressionWithTypeArguments", {
  153869. aliases: ["TSType"],
  153870. visitor: ["expression", "typeParameters"],
  153871. fields: {
  153872. expression: (0, _utils.validateType)("TSEntityName"),
  153873. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  153874. }
  153875. });
  153876. (0, _utils.default)("TSInterfaceDeclaration", {
  153877. aliases: ["Statement", "Declaration"],
  153878. visitor: ["id", "typeParameters", "extends", "body"],
  153879. fields: {
  153880. declare: (0, _utils.validateOptional)(bool),
  153881. id: (0, _utils.validateType)("Identifier"),
  153882. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  153883. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  153884. body: (0, _utils.validateType)("TSInterfaceBody")
  153885. }
  153886. });
  153887. (0, _utils.default)("TSInterfaceBody", {
  153888. visitor: ["body"],
  153889. fields: {
  153890. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  153891. }
  153892. });
  153893. (0, _utils.default)("TSTypeAliasDeclaration", {
  153894. aliases: ["Statement", "Declaration"],
  153895. visitor: ["id", "typeParameters", "typeAnnotation"],
  153896. fields: {
  153897. declare: (0, _utils.validateOptional)(bool),
  153898. id: (0, _utils.validateType)("Identifier"),
  153899. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  153900. typeAnnotation: (0, _utils.validateType)("TSType")
  153901. }
  153902. });
  153903. (0, _utils.default)("TSAsExpression", {
  153904. aliases: ["Expression"],
  153905. visitor: ["expression", "typeAnnotation"],
  153906. fields: {
  153907. expression: (0, _utils.validateType)("Expression"),
  153908. typeAnnotation: (0, _utils.validateType)("TSType")
  153909. }
  153910. });
  153911. (0, _utils.default)("TSTypeAssertion", {
  153912. aliases: ["Expression"],
  153913. visitor: ["typeAnnotation", "expression"],
  153914. fields: {
  153915. typeAnnotation: (0, _utils.validateType)("TSType"),
  153916. expression: (0, _utils.validateType)("Expression")
  153917. }
  153918. });
  153919. (0, _utils.default)("TSEnumDeclaration", {
  153920. aliases: ["Statement", "Declaration"],
  153921. visitor: ["id", "members"],
  153922. fields: {
  153923. declare: (0, _utils.validateOptional)(bool),
  153924. const: (0, _utils.validateOptional)(bool),
  153925. id: (0, _utils.validateType)("Identifier"),
  153926. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  153927. initializer: (0, _utils.validateOptionalType)("Expression")
  153928. }
  153929. });
  153930. (0, _utils.default)("TSEnumMember", {
  153931. visitor: ["id", "initializer"],
  153932. fields: {
  153933. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  153934. initializer: (0, _utils.validateOptionalType)("Expression")
  153935. }
  153936. });
  153937. (0, _utils.default)("TSModuleDeclaration", {
  153938. aliases: ["Statement", "Declaration"],
  153939. visitor: ["id", "body"],
  153940. fields: {
  153941. declare: (0, _utils.validateOptional)(bool),
  153942. global: (0, _utils.validateOptional)(bool),
  153943. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  153944. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  153945. }
  153946. });
  153947. (0, _utils.default)("TSModuleBlock", {
  153948. aliases: ["Scopable", "Block", "BlockParent"],
  153949. visitor: ["body"],
  153950. fields: {
  153951. body: (0, _utils.validateArrayOfType)("Statement")
  153952. }
  153953. });
  153954. (0, _utils.default)("TSImportType", {
  153955. aliases: ["TSType"],
  153956. visitor: ["argument", "qualifier", "typeParameters"],
  153957. fields: {
  153958. argument: (0, _utils.validateType)("StringLiteral"),
  153959. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  153960. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  153961. }
  153962. });
  153963. (0, _utils.default)("TSImportEqualsDeclaration", {
  153964. aliases: ["Statement"],
  153965. visitor: ["id", "moduleReference"],
  153966. fields: {
  153967. isExport: (0, _utils.validate)(bool),
  153968. id: (0, _utils.validateType)("Identifier"),
  153969. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
  153970. }
  153971. });
  153972. (0, _utils.default)("TSExternalModuleReference", {
  153973. visitor: ["expression"],
  153974. fields: {
  153975. expression: (0, _utils.validateType)("StringLiteral")
  153976. }
  153977. });
  153978. (0, _utils.default)("TSNonNullExpression", {
  153979. aliases: ["Expression"],
  153980. visitor: ["expression"],
  153981. fields: {
  153982. expression: (0, _utils.validateType)("Expression")
  153983. }
  153984. });
  153985. (0, _utils.default)("TSExportAssignment", {
  153986. aliases: ["Statement"],
  153987. visitor: ["expression"],
  153988. fields: {
  153989. expression: (0, _utils.validateType)("Expression")
  153990. }
  153991. });
  153992. (0, _utils.default)("TSNamespaceExportDeclaration", {
  153993. aliases: ["Statement"],
  153994. visitor: ["id"],
  153995. fields: {
  153996. id: (0, _utils.validateType)("Identifier")
  153997. }
  153998. });
  153999. (0, _utils.default)("TSTypeAnnotation", {
  154000. visitor: ["typeAnnotation"],
  154001. fields: {
  154002. typeAnnotation: {
  154003. validate: (0, _utils.assertNodeType)("TSType")
  154004. }
  154005. }
  154006. });
  154007. (0, _utils.default)("TSTypeParameterInstantiation", {
  154008. visitor: ["params"],
  154009. fields: {
  154010. params: {
  154011. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  154012. }
  154013. }
  154014. });
  154015. (0, _utils.default)("TSTypeParameterDeclaration", {
  154016. visitor: ["params"],
  154017. fields: {
  154018. params: {
  154019. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  154020. }
  154021. }
  154022. });
  154023. (0, _utils.default)("TSTypeParameter", {
  154024. builder: ["constraint", "default", "name"],
  154025. visitor: ["constraint", "default"],
  154026. fields: {
  154027. name: {
  154028. validate: (0, _utils.assertValueType)("string")
  154029. },
  154030. constraint: {
  154031. validate: (0, _utils.assertNodeType)("TSType"),
  154032. optional: true
  154033. },
  154034. default: {
  154035. validate: (0, _utils.assertNodeType)("TSType"),
  154036. optional: true
  154037. }
  154038. }
  154039. });
  154040. }
  154041. });
  154042. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/index.js
  154043. var require_definitions7 = __commonJS({
  154044. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/definitions/index.js"(exports) {
  154045. "use strict";
  154046. Object.defineProperty(exports, "__esModule", {
  154047. value: true
  154048. });
  154049. Object.defineProperty(exports, "VISITOR_KEYS", {
  154050. enumerable: true,
  154051. get: function() {
  154052. return _utils.VISITOR_KEYS;
  154053. }
  154054. });
  154055. Object.defineProperty(exports, "ALIAS_KEYS", {
  154056. enumerable: true,
  154057. get: function() {
  154058. return _utils.ALIAS_KEYS;
  154059. }
  154060. });
  154061. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  154062. enumerable: true,
  154063. get: function() {
  154064. return _utils.FLIPPED_ALIAS_KEYS;
  154065. }
  154066. });
  154067. Object.defineProperty(exports, "NODE_FIELDS", {
  154068. enumerable: true,
  154069. get: function() {
  154070. return _utils.NODE_FIELDS;
  154071. }
  154072. });
  154073. Object.defineProperty(exports, "BUILDER_KEYS", {
  154074. enumerable: true,
  154075. get: function() {
  154076. return _utils.BUILDER_KEYS;
  154077. }
  154078. });
  154079. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  154080. enumerable: true,
  154081. get: function() {
  154082. return _utils.DEPRECATED_KEYS;
  154083. }
  154084. });
  154085. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  154086. enumerable: true,
  154087. get: function() {
  154088. return _utils.NODE_PARENT_VALIDATIONS;
  154089. }
  154090. });
  154091. Object.defineProperty(exports, "PLACEHOLDERS", {
  154092. enumerable: true,
  154093. get: function() {
  154094. return _placeholders.PLACEHOLDERS;
  154095. }
  154096. });
  154097. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  154098. enumerable: true,
  154099. get: function() {
  154100. return _placeholders.PLACEHOLDERS_ALIAS;
  154101. }
  154102. });
  154103. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  154104. enumerable: true,
  154105. get: function() {
  154106. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  154107. }
  154108. });
  154109. exports.TYPES = void 0;
  154110. var _toFastProperties = require_to_fast_properties();
  154111. require_core7();
  154112. require_flow9();
  154113. require_jsx9();
  154114. require_misc7();
  154115. require_experimental7();
  154116. require_typescript9();
  154117. var _utils = require_utils7();
  154118. var _placeholders = require_placeholders7();
  154119. _toFastProperties(_utils.VISITOR_KEYS);
  154120. _toFastProperties(_utils.ALIAS_KEYS);
  154121. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  154122. _toFastProperties(_utils.NODE_FIELDS);
  154123. _toFastProperties(_utils.BUILDER_KEYS);
  154124. _toFastProperties(_utils.DEPRECATED_KEYS);
  154125. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  154126. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  154127. var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
  154128. exports.TYPES = TYPES;
  154129. }
  154130. });
  154131. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/builder.js
  154132. var require_builder9 = __commonJS({
  154133. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/builder.js"(exports) {
  154134. "use strict";
  154135. Object.defineProperty(exports, "__esModule", {
  154136. value: true
  154137. });
  154138. exports.default = builder;
  154139. var _definitions = require_definitions7();
  154140. var _validate = require_validate7();
  154141. function builder(type, ...args) {
  154142. const keys2 = _definitions.BUILDER_KEYS[type];
  154143. const countArgs = args.length;
  154144. if (countArgs > keys2.length) {
  154145. throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys2.length}`);
  154146. }
  154147. const node = {
  154148. type
  154149. };
  154150. let i = 0;
  154151. keys2.forEach((key) => {
  154152. const field = _definitions.NODE_FIELDS[type][key];
  154153. let arg;
  154154. if (i < countArgs)
  154155. arg = args[i];
  154156. if (arg === void 0) {
  154157. arg = Array.isArray(field.default) ? [] : field.default;
  154158. }
  154159. node[key] = arg;
  154160. i++;
  154161. });
  154162. for (const key of Object.keys(node)) {
  154163. (0, _validate.default)(node, key, node[key]);
  154164. }
  154165. return node;
  154166. }
  154167. }
  154168. });
  154169. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/generated/index.js
  154170. var require_generated32 = __commonJS({
  154171. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  154172. "use strict";
  154173. Object.defineProperty(exports, "__esModule", {
  154174. value: true
  154175. });
  154176. exports.arrayExpression = arrayExpression;
  154177. exports.assignmentExpression = assignmentExpression;
  154178. exports.binaryExpression = binaryExpression;
  154179. exports.interpreterDirective = interpreterDirective;
  154180. exports.directive = directive;
  154181. exports.directiveLiteral = directiveLiteral;
  154182. exports.blockStatement = blockStatement;
  154183. exports.breakStatement = breakStatement;
  154184. exports.callExpression = callExpression;
  154185. exports.catchClause = catchClause;
  154186. exports.conditionalExpression = conditionalExpression;
  154187. exports.continueStatement = continueStatement;
  154188. exports.debuggerStatement = debuggerStatement;
  154189. exports.doWhileStatement = doWhileStatement;
  154190. exports.emptyStatement = emptyStatement;
  154191. exports.expressionStatement = expressionStatement;
  154192. exports.file = file;
  154193. exports.forInStatement = forInStatement;
  154194. exports.forStatement = forStatement;
  154195. exports.functionDeclaration = functionDeclaration;
  154196. exports.functionExpression = functionExpression;
  154197. exports.identifier = identifier;
  154198. exports.ifStatement = ifStatement;
  154199. exports.labeledStatement = labeledStatement;
  154200. exports.stringLiteral = stringLiteral;
  154201. exports.numericLiteral = numericLiteral;
  154202. exports.nullLiteral = nullLiteral;
  154203. exports.booleanLiteral = booleanLiteral;
  154204. exports.regExpLiteral = regExpLiteral;
  154205. exports.logicalExpression = logicalExpression;
  154206. exports.memberExpression = memberExpression;
  154207. exports.newExpression = newExpression;
  154208. exports.program = program;
  154209. exports.objectExpression = objectExpression;
  154210. exports.objectMethod = objectMethod;
  154211. exports.objectProperty = objectProperty;
  154212. exports.restElement = restElement;
  154213. exports.returnStatement = returnStatement;
  154214. exports.sequenceExpression = sequenceExpression;
  154215. exports.parenthesizedExpression = parenthesizedExpression;
  154216. exports.switchCase = switchCase;
  154217. exports.switchStatement = switchStatement;
  154218. exports.thisExpression = thisExpression;
  154219. exports.throwStatement = throwStatement;
  154220. exports.tryStatement = tryStatement;
  154221. exports.unaryExpression = unaryExpression;
  154222. exports.updateExpression = updateExpression;
  154223. exports.variableDeclaration = variableDeclaration;
  154224. exports.variableDeclarator = variableDeclarator;
  154225. exports.whileStatement = whileStatement;
  154226. exports.withStatement = withStatement;
  154227. exports.assignmentPattern = assignmentPattern;
  154228. exports.arrayPattern = arrayPattern;
  154229. exports.arrowFunctionExpression = arrowFunctionExpression;
  154230. exports.classBody = classBody;
  154231. exports.classExpression = classExpression;
  154232. exports.classDeclaration = classDeclaration;
  154233. exports.exportAllDeclaration = exportAllDeclaration;
  154234. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  154235. exports.exportNamedDeclaration = exportNamedDeclaration;
  154236. exports.exportSpecifier = exportSpecifier;
  154237. exports.forOfStatement = forOfStatement;
  154238. exports.importDeclaration = importDeclaration;
  154239. exports.importDefaultSpecifier = importDefaultSpecifier;
  154240. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  154241. exports.importSpecifier = importSpecifier;
  154242. exports.metaProperty = metaProperty;
  154243. exports.classMethod = classMethod;
  154244. exports.objectPattern = objectPattern;
  154245. exports.spreadElement = spreadElement;
  154246. exports.super = _super;
  154247. exports.taggedTemplateExpression = taggedTemplateExpression;
  154248. exports.templateElement = templateElement;
  154249. exports.templateLiteral = templateLiteral;
  154250. exports.yieldExpression = yieldExpression;
  154251. exports.awaitExpression = awaitExpression;
  154252. exports.import = _import;
  154253. exports.bigIntLiteral = bigIntLiteral;
  154254. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  154255. exports.optionalMemberExpression = optionalMemberExpression;
  154256. exports.optionalCallExpression = optionalCallExpression;
  154257. exports.anyTypeAnnotation = anyTypeAnnotation;
  154258. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  154259. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  154260. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  154261. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  154262. exports.classImplements = classImplements;
  154263. exports.declareClass = declareClass;
  154264. exports.declareFunction = declareFunction;
  154265. exports.declareInterface = declareInterface;
  154266. exports.declareModule = declareModule;
  154267. exports.declareModuleExports = declareModuleExports;
  154268. exports.declareTypeAlias = declareTypeAlias;
  154269. exports.declareOpaqueType = declareOpaqueType;
  154270. exports.declareVariable = declareVariable;
  154271. exports.declareExportDeclaration = declareExportDeclaration;
  154272. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  154273. exports.declaredPredicate = declaredPredicate;
  154274. exports.existsTypeAnnotation = existsTypeAnnotation;
  154275. exports.functionTypeAnnotation = functionTypeAnnotation;
  154276. exports.functionTypeParam = functionTypeParam;
  154277. exports.genericTypeAnnotation = genericTypeAnnotation;
  154278. exports.inferredPredicate = inferredPredicate;
  154279. exports.interfaceExtends = interfaceExtends;
  154280. exports.interfaceDeclaration = interfaceDeclaration;
  154281. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  154282. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  154283. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  154284. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  154285. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  154286. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  154287. exports.numberTypeAnnotation = numberTypeAnnotation;
  154288. exports.objectTypeAnnotation = objectTypeAnnotation;
  154289. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  154290. exports.objectTypeCallProperty = objectTypeCallProperty;
  154291. exports.objectTypeIndexer = objectTypeIndexer;
  154292. exports.objectTypeProperty = objectTypeProperty;
  154293. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  154294. exports.opaqueType = opaqueType;
  154295. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  154296. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  154297. exports.stringTypeAnnotation = stringTypeAnnotation;
  154298. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  154299. exports.thisTypeAnnotation = thisTypeAnnotation;
  154300. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  154301. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  154302. exports.typeAlias = typeAlias;
  154303. exports.typeAnnotation = typeAnnotation;
  154304. exports.typeCastExpression = typeCastExpression;
  154305. exports.typeParameter = typeParameter;
  154306. exports.typeParameterDeclaration = typeParameterDeclaration;
  154307. exports.typeParameterInstantiation = typeParameterInstantiation;
  154308. exports.unionTypeAnnotation = unionTypeAnnotation;
  154309. exports.variance = variance;
  154310. exports.voidTypeAnnotation = voidTypeAnnotation;
  154311. exports.enumDeclaration = enumDeclaration;
  154312. exports.enumBooleanBody = enumBooleanBody;
  154313. exports.enumNumberBody = enumNumberBody;
  154314. exports.enumStringBody = enumStringBody;
  154315. exports.enumSymbolBody = enumSymbolBody;
  154316. exports.enumBooleanMember = enumBooleanMember;
  154317. exports.enumNumberMember = enumNumberMember;
  154318. exports.enumStringMember = enumStringMember;
  154319. exports.enumDefaultedMember = enumDefaultedMember;
  154320. exports.indexedAccessType = indexedAccessType;
  154321. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  154322. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
  154323. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  154324. exports.jSXElement = exports.jsxElement = jsxElement;
  154325. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  154326. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  154327. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  154328. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
  154329. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  154330. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  154331. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  154332. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  154333. exports.jSXText = exports.jsxText = jsxText2;
  154334. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  154335. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  154336. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  154337. exports.noop = noop;
  154338. exports.placeholder = placeholder;
  154339. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  154340. exports.argumentPlaceholder = argumentPlaceholder;
  154341. exports.bindExpression = bindExpression;
  154342. exports.classProperty = classProperty;
  154343. exports.pipelineTopicExpression = pipelineTopicExpression;
  154344. exports.pipelineBareFunction = pipelineBareFunction;
  154345. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  154346. exports.classPrivateProperty = classPrivateProperty;
  154347. exports.classPrivateMethod = classPrivateMethod;
  154348. exports.importAttribute = importAttribute;
  154349. exports.decorator = decorator;
  154350. exports.doExpression = doExpression;
  154351. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  154352. exports.privateName = privateName;
  154353. exports.recordExpression = recordExpression;
  154354. exports.tupleExpression = tupleExpression;
  154355. exports.decimalLiteral = decimalLiteral;
  154356. exports.staticBlock = staticBlock;
  154357. exports.moduleExpression = moduleExpression;
  154358. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  154359. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  154360. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  154361. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  154362. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  154363. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  154364. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  154365. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  154366. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  154367. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  154368. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  154369. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  154370. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  154371. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  154372. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  154373. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  154374. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  154375. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  154376. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  154377. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  154378. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  154379. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  154380. exports.tSThisType = exports.tsThisType = tsThisType;
  154381. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  154382. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  154383. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  154384. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  154385. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  154386. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  154387. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  154388. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  154389. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  154390. exports.tSRestType = exports.tsRestType = tsRestType;
  154391. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  154392. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  154393. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  154394. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  154395. exports.tSInferType = exports.tsInferType = tsInferType;
  154396. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  154397. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  154398. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  154399. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  154400. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  154401. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  154402. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  154403. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  154404. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  154405. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  154406. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  154407. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  154408. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  154409. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  154410. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  154411. exports.tSImportType = exports.tsImportType = tsImportType;
  154412. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  154413. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  154414. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  154415. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  154416. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  154417. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  154418. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  154419. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  154420. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  154421. exports.numberLiteral = NumberLiteral;
  154422. exports.regexLiteral = RegexLiteral;
  154423. exports.restProperty = RestProperty;
  154424. exports.spreadProperty = SpreadProperty;
  154425. var _builder = require_builder9();
  154426. function arrayExpression(elements) {
  154427. return (0, _builder.default)("ArrayExpression", ...arguments);
  154428. }
  154429. function assignmentExpression(operator, left, right) {
  154430. return (0, _builder.default)("AssignmentExpression", ...arguments);
  154431. }
  154432. function binaryExpression(operator, left, right) {
  154433. return (0, _builder.default)("BinaryExpression", ...arguments);
  154434. }
  154435. function interpreterDirective(value) {
  154436. return (0, _builder.default)("InterpreterDirective", ...arguments);
  154437. }
  154438. function directive(value) {
  154439. return (0, _builder.default)("Directive", ...arguments);
  154440. }
  154441. function directiveLiteral(value) {
  154442. return (0, _builder.default)("DirectiveLiteral", ...arguments);
  154443. }
  154444. function blockStatement(body, directives) {
  154445. return (0, _builder.default)("BlockStatement", ...arguments);
  154446. }
  154447. function breakStatement(label) {
  154448. return (0, _builder.default)("BreakStatement", ...arguments);
  154449. }
  154450. function callExpression(callee, _arguments) {
  154451. return (0, _builder.default)("CallExpression", ...arguments);
  154452. }
  154453. function catchClause(param, body) {
  154454. return (0, _builder.default)("CatchClause", ...arguments);
  154455. }
  154456. function conditionalExpression(test, consequent, alternate) {
  154457. return (0, _builder.default)("ConditionalExpression", ...arguments);
  154458. }
  154459. function continueStatement(label) {
  154460. return (0, _builder.default)("ContinueStatement", ...arguments);
  154461. }
  154462. function debuggerStatement() {
  154463. return (0, _builder.default)("DebuggerStatement", ...arguments);
  154464. }
  154465. function doWhileStatement(test, body) {
  154466. return (0, _builder.default)("DoWhileStatement", ...arguments);
  154467. }
  154468. function emptyStatement() {
  154469. return (0, _builder.default)("EmptyStatement", ...arguments);
  154470. }
  154471. function expressionStatement(expression) {
  154472. return (0, _builder.default)("ExpressionStatement", ...arguments);
  154473. }
  154474. function file(program2, comments, tokens) {
  154475. return (0, _builder.default)("File", ...arguments);
  154476. }
  154477. function forInStatement(left, right, body) {
  154478. return (0, _builder.default)("ForInStatement", ...arguments);
  154479. }
  154480. function forStatement(init, test, update, body) {
  154481. return (0, _builder.default)("ForStatement", ...arguments);
  154482. }
  154483. function functionDeclaration(id, params, body, generator, async) {
  154484. return (0, _builder.default)("FunctionDeclaration", ...arguments);
  154485. }
  154486. function functionExpression(id, params, body, generator, async) {
  154487. return (0, _builder.default)("FunctionExpression", ...arguments);
  154488. }
  154489. function identifier(name2) {
  154490. return (0, _builder.default)("Identifier", ...arguments);
  154491. }
  154492. function ifStatement(test, consequent, alternate) {
  154493. return (0, _builder.default)("IfStatement", ...arguments);
  154494. }
  154495. function labeledStatement(label, body) {
  154496. return (0, _builder.default)("LabeledStatement", ...arguments);
  154497. }
  154498. function stringLiteral(value) {
  154499. return (0, _builder.default)("StringLiteral", ...arguments);
  154500. }
  154501. function numericLiteral(value) {
  154502. return (0, _builder.default)("NumericLiteral", ...arguments);
  154503. }
  154504. function nullLiteral() {
  154505. return (0, _builder.default)("NullLiteral", ...arguments);
  154506. }
  154507. function booleanLiteral(value) {
  154508. return (0, _builder.default)("BooleanLiteral", ...arguments);
  154509. }
  154510. function regExpLiteral(pattern, flags) {
  154511. return (0, _builder.default)("RegExpLiteral", ...arguments);
  154512. }
  154513. function logicalExpression(operator, left, right) {
  154514. return (0, _builder.default)("LogicalExpression", ...arguments);
  154515. }
  154516. function memberExpression(object, property, computed, optional) {
  154517. return (0, _builder.default)("MemberExpression", ...arguments);
  154518. }
  154519. function newExpression(callee, _arguments) {
  154520. return (0, _builder.default)("NewExpression", ...arguments);
  154521. }
  154522. function program(body, directives, sourceType, interpreter) {
  154523. return (0, _builder.default)("Program", ...arguments);
  154524. }
  154525. function objectExpression(properties) {
  154526. return (0, _builder.default)("ObjectExpression", ...arguments);
  154527. }
  154528. function objectMethod(kind, key, params, body, computed, generator, async) {
  154529. return (0, _builder.default)("ObjectMethod", ...arguments);
  154530. }
  154531. function objectProperty(key, value, computed, shorthand, decorators) {
  154532. return (0, _builder.default)("ObjectProperty", ...arguments);
  154533. }
  154534. function restElement(argument) {
  154535. return (0, _builder.default)("RestElement", ...arguments);
  154536. }
  154537. function returnStatement(argument) {
  154538. return (0, _builder.default)("ReturnStatement", ...arguments);
  154539. }
  154540. function sequenceExpression(expressions) {
  154541. return (0, _builder.default)("SequenceExpression", ...arguments);
  154542. }
  154543. function parenthesizedExpression(expression) {
  154544. return (0, _builder.default)("ParenthesizedExpression", ...arguments);
  154545. }
  154546. function switchCase(test, consequent) {
  154547. return (0, _builder.default)("SwitchCase", ...arguments);
  154548. }
  154549. function switchStatement(discriminant, cases) {
  154550. return (0, _builder.default)("SwitchStatement", ...arguments);
  154551. }
  154552. function thisExpression() {
  154553. return (0, _builder.default)("ThisExpression", ...arguments);
  154554. }
  154555. function throwStatement(argument) {
  154556. return (0, _builder.default)("ThrowStatement", ...arguments);
  154557. }
  154558. function tryStatement(block, handler, finalizer) {
  154559. return (0, _builder.default)("TryStatement", ...arguments);
  154560. }
  154561. function unaryExpression(operator, argument, prefix) {
  154562. return (0, _builder.default)("UnaryExpression", ...arguments);
  154563. }
  154564. function updateExpression(operator, argument, prefix) {
  154565. return (0, _builder.default)("UpdateExpression", ...arguments);
  154566. }
  154567. function variableDeclaration(kind, declarations) {
  154568. return (0, _builder.default)("VariableDeclaration", ...arguments);
  154569. }
  154570. function variableDeclarator(id, init) {
  154571. return (0, _builder.default)("VariableDeclarator", ...arguments);
  154572. }
  154573. function whileStatement(test, body) {
  154574. return (0, _builder.default)("WhileStatement", ...arguments);
  154575. }
  154576. function withStatement(object, body) {
  154577. return (0, _builder.default)("WithStatement", ...arguments);
  154578. }
  154579. function assignmentPattern(left, right) {
  154580. return (0, _builder.default)("AssignmentPattern", ...arguments);
  154581. }
  154582. function arrayPattern(elements) {
  154583. return (0, _builder.default)("ArrayPattern", ...arguments);
  154584. }
  154585. function arrowFunctionExpression(params, body, async) {
  154586. return (0, _builder.default)("ArrowFunctionExpression", ...arguments);
  154587. }
  154588. function classBody(body) {
  154589. return (0, _builder.default)("ClassBody", ...arguments);
  154590. }
  154591. function classExpression(id, superClass, body, decorators) {
  154592. return (0, _builder.default)("ClassExpression", ...arguments);
  154593. }
  154594. function classDeclaration(id, superClass, body, decorators) {
  154595. return (0, _builder.default)("ClassDeclaration", ...arguments);
  154596. }
  154597. function exportAllDeclaration(source) {
  154598. return (0, _builder.default)("ExportAllDeclaration", ...arguments);
  154599. }
  154600. function exportDefaultDeclaration(declaration) {
  154601. return (0, _builder.default)("ExportDefaultDeclaration", ...arguments);
  154602. }
  154603. function exportNamedDeclaration(declaration, specifiers, source) {
  154604. return (0, _builder.default)("ExportNamedDeclaration", ...arguments);
  154605. }
  154606. function exportSpecifier(local, exported) {
  154607. return (0, _builder.default)("ExportSpecifier", ...arguments);
  154608. }
  154609. function forOfStatement(left, right, body, _await) {
  154610. return (0, _builder.default)("ForOfStatement", ...arguments);
  154611. }
  154612. function importDeclaration(specifiers, source) {
  154613. return (0, _builder.default)("ImportDeclaration", ...arguments);
  154614. }
  154615. function importDefaultSpecifier(local) {
  154616. return (0, _builder.default)("ImportDefaultSpecifier", ...arguments);
  154617. }
  154618. function importNamespaceSpecifier(local) {
  154619. return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments);
  154620. }
  154621. function importSpecifier(local, imported) {
  154622. return (0, _builder.default)("ImportSpecifier", ...arguments);
  154623. }
  154624. function metaProperty(meta, property) {
  154625. return (0, _builder.default)("MetaProperty", ...arguments);
  154626. }
  154627. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  154628. return (0, _builder.default)("ClassMethod", ...arguments);
  154629. }
  154630. function objectPattern(properties) {
  154631. return (0, _builder.default)("ObjectPattern", ...arguments);
  154632. }
  154633. function spreadElement(argument) {
  154634. return (0, _builder.default)("SpreadElement", ...arguments);
  154635. }
  154636. function _super() {
  154637. return (0, _builder.default)("Super", ...arguments);
  154638. }
  154639. function taggedTemplateExpression(tag, quasi) {
  154640. return (0, _builder.default)("TaggedTemplateExpression", ...arguments);
  154641. }
  154642. function templateElement(value, tail) {
  154643. return (0, _builder.default)("TemplateElement", ...arguments);
  154644. }
  154645. function templateLiteral(quasis, expressions) {
  154646. return (0, _builder.default)("TemplateLiteral", ...arguments);
  154647. }
  154648. function yieldExpression(argument, delegate) {
  154649. return (0, _builder.default)("YieldExpression", ...arguments);
  154650. }
  154651. function awaitExpression(argument) {
  154652. return (0, _builder.default)("AwaitExpression", ...arguments);
  154653. }
  154654. function _import() {
  154655. return (0, _builder.default)("Import", ...arguments);
  154656. }
  154657. function bigIntLiteral(value) {
  154658. return (0, _builder.default)("BigIntLiteral", ...arguments);
  154659. }
  154660. function exportNamespaceSpecifier(exported) {
  154661. return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments);
  154662. }
  154663. function optionalMemberExpression(object, property, computed, optional) {
  154664. return (0, _builder.default)("OptionalMemberExpression", ...arguments);
  154665. }
  154666. function optionalCallExpression(callee, _arguments, optional) {
  154667. return (0, _builder.default)("OptionalCallExpression", ...arguments);
  154668. }
  154669. function anyTypeAnnotation() {
  154670. return (0, _builder.default)("AnyTypeAnnotation", ...arguments);
  154671. }
  154672. function arrayTypeAnnotation(elementType) {
  154673. return (0, _builder.default)("ArrayTypeAnnotation", ...arguments);
  154674. }
  154675. function booleanTypeAnnotation() {
  154676. return (0, _builder.default)("BooleanTypeAnnotation", ...arguments);
  154677. }
  154678. function booleanLiteralTypeAnnotation(value) {
  154679. return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments);
  154680. }
  154681. function nullLiteralTypeAnnotation() {
  154682. return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments);
  154683. }
  154684. function classImplements(id, typeParameters) {
  154685. return (0, _builder.default)("ClassImplements", ...arguments);
  154686. }
  154687. function declareClass(id, typeParameters, _extends, body) {
  154688. return (0, _builder.default)("DeclareClass", ...arguments);
  154689. }
  154690. function declareFunction(id) {
  154691. return (0, _builder.default)("DeclareFunction", ...arguments);
  154692. }
  154693. function declareInterface(id, typeParameters, _extends, body) {
  154694. return (0, _builder.default)("DeclareInterface", ...arguments);
  154695. }
  154696. function declareModule(id, body, kind) {
  154697. return (0, _builder.default)("DeclareModule", ...arguments);
  154698. }
  154699. function declareModuleExports(typeAnnotation2) {
  154700. return (0, _builder.default)("DeclareModuleExports", ...arguments);
  154701. }
  154702. function declareTypeAlias(id, typeParameters, right) {
  154703. return (0, _builder.default)("DeclareTypeAlias", ...arguments);
  154704. }
  154705. function declareOpaqueType(id, typeParameters, supertype) {
  154706. return (0, _builder.default)("DeclareOpaqueType", ...arguments);
  154707. }
  154708. function declareVariable(id) {
  154709. return (0, _builder.default)("DeclareVariable", ...arguments);
  154710. }
  154711. function declareExportDeclaration(declaration, specifiers, source) {
  154712. return (0, _builder.default)("DeclareExportDeclaration", ...arguments);
  154713. }
  154714. function declareExportAllDeclaration(source) {
  154715. return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments);
  154716. }
  154717. function declaredPredicate(value) {
  154718. return (0, _builder.default)("DeclaredPredicate", ...arguments);
  154719. }
  154720. function existsTypeAnnotation() {
  154721. return (0, _builder.default)("ExistsTypeAnnotation", ...arguments);
  154722. }
  154723. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  154724. return (0, _builder.default)("FunctionTypeAnnotation", ...arguments);
  154725. }
  154726. function functionTypeParam(name2, typeAnnotation2) {
  154727. return (0, _builder.default)("FunctionTypeParam", ...arguments);
  154728. }
  154729. function genericTypeAnnotation(id, typeParameters) {
  154730. return (0, _builder.default)("GenericTypeAnnotation", ...arguments);
  154731. }
  154732. function inferredPredicate() {
  154733. return (0, _builder.default)("InferredPredicate", ...arguments);
  154734. }
  154735. function interfaceExtends(id, typeParameters) {
  154736. return (0, _builder.default)("InterfaceExtends", ...arguments);
  154737. }
  154738. function interfaceDeclaration(id, typeParameters, _extends, body) {
  154739. return (0, _builder.default)("InterfaceDeclaration", ...arguments);
  154740. }
  154741. function interfaceTypeAnnotation(_extends, body) {
  154742. return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments);
  154743. }
  154744. function intersectionTypeAnnotation(types2) {
  154745. return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments);
  154746. }
  154747. function mixedTypeAnnotation() {
  154748. return (0, _builder.default)("MixedTypeAnnotation", ...arguments);
  154749. }
  154750. function emptyTypeAnnotation() {
  154751. return (0, _builder.default)("EmptyTypeAnnotation", ...arguments);
  154752. }
  154753. function nullableTypeAnnotation(typeAnnotation2) {
  154754. return (0, _builder.default)("NullableTypeAnnotation", ...arguments);
  154755. }
  154756. function numberLiteralTypeAnnotation(value) {
  154757. return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments);
  154758. }
  154759. function numberTypeAnnotation() {
  154760. return (0, _builder.default)("NumberTypeAnnotation", ...arguments);
  154761. }
  154762. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  154763. return (0, _builder.default)("ObjectTypeAnnotation", ...arguments);
  154764. }
  154765. function objectTypeInternalSlot(id, value, optional, _static, method) {
  154766. return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments);
  154767. }
  154768. function objectTypeCallProperty(value) {
  154769. return (0, _builder.default)("ObjectTypeCallProperty", ...arguments);
  154770. }
  154771. function objectTypeIndexer(id, key, value, variance2) {
  154772. return (0, _builder.default)("ObjectTypeIndexer", ...arguments);
  154773. }
  154774. function objectTypeProperty(key, value, variance2) {
  154775. return (0, _builder.default)("ObjectTypeProperty", ...arguments);
  154776. }
  154777. function objectTypeSpreadProperty(argument) {
  154778. return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments);
  154779. }
  154780. function opaqueType(id, typeParameters, supertype, impltype) {
  154781. return (0, _builder.default)("OpaqueType", ...arguments);
  154782. }
  154783. function qualifiedTypeIdentifier(id, qualification) {
  154784. return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments);
  154785. }
  154786. function stringLiteralTypeAnnotation(value) {
  154787. return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments);
  154788. }
  154789. function stringTypeAnnotation() {
  154790. return (0, _builder.default)("StringTypeAnnotation", ...arguments);
  154791. }
  154792. function symbolTypeAnnotation() {
  154793. return (0, _builder.default)("SymbolTypeAnnotation", ...arguments);
  154794. }
  154795. function thisTypeAnnotation() {
  154796. return (0, _builder.default)("ThisTypeAnnotation", ...arguments);
  154797. }
  154798. function tupleTypeAnnotation(types2) {
  154799. return (0, _builder.default)("TupleTypeAnnotation", ...arguments);
  154800. }
  154801. function typeofTypeAnnotation(argument) {
  154802. return (0, _builder.default)("TypeofTypeAnnotation", ...arguments);
  154803. }
  154804. function typeAlias(id, typeParameters, right) {
  154805. return (0, _builder.default)("TypeAlias", ...arguments);
  154806. }
  154807. function typeAnnotation(typeAnnotation2) {
  154808. return (0, _builder.default)("TypeAnnotation", ...arguments);
  154809. }
  154810. function typeCastExpression(expression, typeAnnotation2) {
  154811. return (0, _builder.default)("TypeCastExpression", ...arguments);
  154812. }
  154813. function typeParameter(bound, _default, variance2) {
  154814. return (0, _builder.default)("TypeParameter", ...arguments);
  154815. }
  154816. function typeParameterDeclaration(params) {
  154817. return (0, _builder.default)("TypeParameterDeclaration", ...arguments);
  154818. }
  154819. function typeParameterInstantiation(params) {
  154820. return (0, _builder.default)("TypeParameterInstantiation", ...arguments);
  154821. }
  154822. function unionTypeAnnotation(types2) {
  154823. return (0, _builder.default)("UnionTypeAnnotation", ...arguments);
  154824. }
  154825. function variance(kind) {
  154826. return (0, _builder.default)("Variance", ...arguments);
  154827. }
  154828. function voidTypeAnnotation() {
  154829. return (0, _builder.default)("VoidTypeAnnotation", ...arguments);
  154830. }
  154831. function enumDeclaration(id, body) {
  154832. return (0, _builder.default)("EnumDeclaration", ...arguments);
  154833. }
  154834. function enumBooleanBody(members) {
  154835. return (0, _builder.default)("EnumBooleanBody", ...arguments);
  154836. }
  154837. function enumNumberBody(members) {
  154838. return (0, _builder.default)("EnumNumberBody", ...arguments);
  154839. }
  154840. function enumStringBody(members) {
  154841. return (0, _builder.default)("EnumStringBody", ...arguments);
  154842. }
  154843. function enumSymbolBody(members) {
  154844. return (0, _builder.default)("EnumSymbolBody", ...arguments);
  154845. }
  154846. function enumBooleanMember(id) {
  154847. return (0, _builder.default)("EnumBooleanMember", ...arguments);
  154848. }
  154849. function enumNumberMember(id, init) {
  154850. return (0, _builder.default)("EnumNumberMember", ...arguments);
  154851. }
  154852. function enumStringMember(id, init) {
  154853. return (0, _builder.default)("EnumStringMember", ...arguments);
  154854. }
  154855. function enumDefaultedMember(id) {
  154856. return (0, _builder.default)("EnumDefaultedMember", ...arguments);
  154857. }
  154858. function indexedAccessType(objectType, indexType) {
  154859. return (0, _builder.default)("IndexedAccessType", ...arguments);
  154860. }
  154861. function optionalIndexedAccessType(objectType, indexType) {
  154862. return (0, _builder.default)("OptionalIndexedAccessType", ...arguments);
  154863. }
  154864. function jsxAttribute(name2, value) {
  154865. return (0, _builder.default)("JSXAttribute", ...arguments);
  154866. }
  154867. function jsxClosingElement(name2) {
  154868. return (0, _builder.default)("JSXClosingElement", ...arguments);
  154869. }
  154870. function jsxElement(openingElement, closingElement, children, selfClosing) {
  154871. return (0, _builder.default)("JSXElement", ...arguments);
  154872. }
  154873. function jsxEmptyExpression() {
  154874. return (0, _builder.default)("JSXEmptyExpression", ...arguments);
  154875. }
  154876. function jsxExpressionContainer(expression) {
  154877. return (0, _builder.default)("JSXExpressionContainer", ...arguments);
  154878. }
  154879. function jsxSpreadChild(expression) {
  154880. return (0, _builder.default)("JSXSpreadChild", ...arguments);
  154881. }
  154882. function jsxIdentifier(name2) {
  154883. return (0, _builder.default)("JSXIdentifier", ...arguments);
  154884. }
  154885. function jsxMemberExpression(object, property) {
  154886. return (0, _builder.default)("JSXMemberExpression", ...arguments);
  154887. }
  154888. function jsxNamespacedName(namespace, name2) {
  154889. return (0, _builder.default)("JSXNamespacedName", ...arguments);
  154890. }
  154891. function jsxOpeningElement(name2, attributes, selfClosing) {
  154892. return (0, _builder.default)("JSXOpeningElement", ...arguments);
  154893. }
  154894. function jsxSpreadAttribute(argument) {
  154895. return (0, _builder.default)("JSXSpreadAttribute", ...arguments);
  154896. }
  154897. function jsxText2(value) {
  154898. return (0, _builder.default)("JSXText", ...arguments);
  154899. }
  154900. function jsxFragment(openingFragment, closingFragment, children) {
  154901. return (0, _builder.default)("JSXFragment", ...arguments);
  154902. }
  154903. function jsxOpeningFragment() {
  154904. return (0, _builder.default)("JSXOpeningFragment", ...arguments);
  154905. }
  154906. function jsxClosingFragment() {
  154907. return (0, _builder.default)("JSXClosingFragment", ...arguments);
  154908. }
  154909. function noop() {
  154910. return (0, _builder.default)("Noop", ...arguments);
  154911. }
  154912. function placeholder(expectedNode, name2) {
  154913. return (0, _builder.default)("Placeholder", ...arguments);
  154914. }
  154915. function v8IntrinsicIdentifier(name2) {
  154916. return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments);
  154917. }
  154918. function argumentPlaceholder() {
  154919. return (0, _builder.default)("ArgumentPlaceholder", ...arguments);
  154920. }
  154921. function bindExpression(object, callee) {
  154922. return (0, _builder.default)("BindExpression", ...arguments);
  154923. }
  154924. function classProperty(key, value, typeAnnotation2, decorators, computed, _static) {
  154925. return (0, _builder.default)("ClassProperty", ...arguments);
  154926. }
  154927. function pipelineTopicExpression(expression) {
  154928. return (0, _builder.default)("PipelineTopicExpression", ...arguments);
  154929. }
  154930. function pipelineBareFunction(callee) {
  154931. return (0, _builder.default)("PipelineBareFunction", ...arguments);
  154932. }
  154933. function pipelinePrimaryTopicReference() {
  154934. return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments);
  154935. }
  154936. function classPrivateProperty(key, value, decorators, _static) {
  154937. return (0, _builder.default)("ClassPrivateProperty", ...arguments);
  154938. }
  154939. function classPrivateMethod(kind, key, params, body, _static) {
  154940. return (0, _builder.default)("ClassPrivateMethod", ...arguments);
  154941. }
  154942. function importAttribute(key, value) {
  154943. return (0, _builder.default)("ImportAttribute", ...arguments);
  154944. }
  154945. function decorator(expression) {
  154946. return (0, _builder.default)("Decorator", ...arguments);
  154947. }
  154948. function doExpression(body, async) {
  154949. return (0, _builder.default)("DoExpression", ...arguments);
  154950. }
  154951. function exportDefaultSpecifier(exported) {
  154952. return (0, _builder.default)("ExportDefaultSpecifier", ...arguments);
  154953. }
  154954. function privateName(id) {
  154955. return (0, _builder.default)("PrivateName", ...arguments);
  154956. }
  154957. function recordExpression(properties) {
  154958. return (0, _builder.default)("RecordExpression", ...arguments);
  154959. }
  154960. function tupleExpression(elements) {
  154961. return (0, _builder.default)("TupleExpression", ...arguments);
  154962. }
  154963. function decimalLiteral(value) {
  154964. return (0, _builder.default)("DecimalLiteral", ...arguments);
  154965. }
  154966. function staticBlock(body) {
  154967. return (0, _builder.default)("StaticBlock", ...arguments);
  154968. }
  154969. function moduleExpression(body) {
  154970. return (0, _builder.default)("ModuleExpression", ...arguments);
  154971. }
  154972. function tsParameterProperty(parameter) {
  154973. return (0, _builder.default)("TSParameterProperty", ...arguments);
  154974. }
  154975. function tsDeclareFunction(id, typeParameters, params, returnType) {
  154976. return (0, _builder.default)("TSDeclareFunction", ...arguments);
  154977. }
  154978. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  154979. return (0, _builder.default)("TSDeclareMethod", ...arguments);
  154980. }
  154981. function tsQualifiedName(left, right) {
  154982. return (0, _builder.default)("TSQualifiedName", ...arguments);
  154983. }
  154984. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  154985. return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments);
  154986. }
  154987. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) {
  154988. return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments);
  154989. }
  154990. function tsPropertySignature(key, typeAnnotation2, initializer) {
  154991. return (0, _builder.default)("TSPropertySignature", ...arguments);
  154992. }
  154993. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) {
  154994. return (0, _builder.default)("TSMethodSignature", ...arguments);
  154995. }
  154996. function tsIndexSignature(parameters, typeAnnotation2) {
  154997. return (0, _builder.default)("TSIndexSignature", ...arguments);
  154998. }
  154999. function tsAnyKeyword() {
  155000. return (0, _builder.default)("TSAnyKeyword", ...arguments);
  155001. }
  155002. function tsBooleanKeyword() {
  155003. return (0, _builder.default)("TSBooleanKeyword", ...arguments);
  155004. }
  155005. function tsBigIntKeyword() {
  155006. return (0, _builder.default)("TSBigIntKeyword", ...arguments);
  155007. }
  155008. function tsIntrinsicKeyword() {
  155009. return (0, _builder.default)("TSIntrinsicKeyword", ...arguments);
  155010. }
  155011. function tsNeverKeyword() {
  155012. return (0, _builder.default)("TSNeverKeyword", ...arguments);
  155013. }
  155014. function tsNullKeyword() {
  155015. return (0, _builder.default)("TSNullKeyword", ...arguments);
  155016. }
  155017. function tsNumberKeyword() {
  155018. return (0, _builder.default)("TSNumberKeyword", ...arguments);
  155019. }
  155020. function tsObjectKeyword() {
  155021. return (0, _builder.default)("TSObjectKeyword", ...arguments);
  155022. }
  155023. function tsStringKeyword() {
  155024. return (0, _builder.default)("TSStringKeyword", ...arguments);
  155025. }
  155026. function tsSymbolKeyword() {
  155027. return (0, _builder.default)("TSSymbolKeyword", ...arguments);
  155028. }
  155029. function tsUndefinedKeyword() {
  155030. return (0, _builder.default)("TSUndefinedKeyword", ...arguments);
  155031. }
  155032. function tsUnknownKeyword() {
  155033. return (0, _builder.default)("TSUnknownKeyword", ...arguments);
  155034. }
  155035. function tsVoidKeyword() {
  155036. return (0, _builder.default)("TSVoidKeyword", ...arguments);
  155037. }
  155038. function tsThisType() {
  155039. return (0, _builder.default)("TSThisType", ...arguments);
  155040. }
  155041. function tsFunctionType(typeParameters, parameters, typeAnnotation2) {
  155042. return (0, _builder.default)("TSFunctionType", ...arguments);
  155043. }
  155044. function tsConstructorType(typeParameters, parameters, typeAnnotation2) {
  155045. return (0, _builder.default)("TSConstructorType", ...arguments);
  155046. }
  155047. function tsTypeReference(typeName, typeParameters) {
  155048. return (0, _builder.default)("TSTypeReference", ...arguments);
  155049. }
  155050. function tsTypePredicate(parameterName, typeAnnotation2, asserts) {
  155051. return (0, _builder.default)("TSTypePredicate", ...arguments);
  155052. }
  155053. function tsTypeQuery(exprName) {
  155054. return (0, _builder.default)("TSTypeQuery", ...arguments);
  155055. }
  155056. function tsTypeLiteral(members) {
  155057. return (0, _builder.default)("TSTypeLiteral", ...arguments);
  155058. }
  155059. function tsArrayType(elementType) {
  155060. return (0, _builder.default)("TSArrayType", ...arguments);
  155061. }
  155062. function tsTupleType(elementTypes) {
  155063. return (0, _builder.default)("TSTupleType", ...arguments);
  155064. }
  155065. function tsOptionalType(typeAnnotation2) {
  155066. return (0, _builder.default)("TSOptionalType", ...arguments);
  155067. }
  155068. function tsRestType(typeAnnotation2) {
  155069. return (0, _builder.default)("TSRestType", ...arguments);
  155070. }
  155071. function tsNamedTupleMember(label, elementType, optional) {
  155072. return (0, _builder.default)("TSNamedTupleMember", ...arguments);
  155073. }
  155074. function tsUnionType(types2) {
  155075. return (0, _builder.default)("TSUnionType", ...arguments);
  155076. }
  155077. function tsIntersectionType(types2) {
  155078. return (0, _builder.default)("TSIntersectionType", ...arguments);
  155079. }
  155080. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  155081. return (0, _builder.default)("TSConditionalType", ...arguments);
  155082. }
  155083. function tsInferType(typeParameter2) {
  155084. return (0, _builder.default)("TSInferType", ...arguments);
  155085. }
  155086. function tsParenthesizedType(typeAnnotation2) {
  155087. return (0, _builder.default)("TSParenthesizedType", ...arguments);
  155088. }
  155089. function tsTypeOperator(typeAnnotation2) {
  155090. return (0, _builder.default)("TSTypeOperator", ...arguments);
  155091. }
  155092. function tsIndexedAccessType(objectType, indexType) {
  155093. return (0, _builder.default)("TSIndexedAccessType", ...arguments);
  155094. }
  155095. function tsMappedType(typeParameter2, typeAnnotation2, nameType) {
  155096. return (0, _builder.default)("TSMappedType", ...arguments);
  155097. }
  155098. function tsLiteralType(literal2) {
  155099. return (0, _builder.default)("TSLiteralType", ...arguments);
  155100. }
  155101. function tsExpressionWithTypeArguments(expression, typeParameters) {
  155102. return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments);
  155103. }
  155104. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  155105. return (0, _builder.default)("TSInterfaceDeclaration", ...arguments);
  155106. }
  155107. function tsInterfaceBody(body) {
  155108. return (0, _builder.default)("TSInterfaceBody", ...arguments);
  155109. }
  155110. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) {
  155111. return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments);
  155112. }
  155113. function tsAsExpression(expression, typeAnnotation2) {
  155114. return (0, _builder.default)("TSAsExpression", ...arguments);
  155115. }
  155116. function tsTypeAssertion(typeAnnotation2, expression) {
  155117. return (0, _builder.default)("TSTypeAssertion", ...arguments);
  155118. }
  155119. function tsEnumDeclaration(id, members) {
  155120. return (0, _builder.default)("TSEnumDeclaration", ...arguments);
  155121. }
  155122. function tsEnumMember(id, initializer) {
  155123. return (0, _builder.default)("TSEnumMember", ...arguments);
  155124. }
  155125. function tsModuleDeclaration(id, body) {
  155126. return (0, _builder.default)("TSModuleDeclaration", ...arguments);
  155127. }
  155128. function tsModuleBlock(body) {
  155129. return (0, _builder.default)("TSModuleBlock", ...arguments);
  155130. }
  155131. function tsImportType(argument, qualifier, typeParameters) {
  155132. return (0, _builder.default)("TSImportType", ...arguments);
  155133. }
  155134. function tsImportEqualsDeclaration(id, moduleReference) {
  155135. return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments);
  155136. }
  155137. function tsExternalModuleReference(expression) {
  155138. return (0, _builder.default)("TSExternalModuleReference", ...arguments);
  155139. }
  155140. function tsNonNullExpression(expression) {
  155141. return (0, _builder.default)("TSNonNullExpression", ...arguments);
  155142. }
  155143. function tsExportAssignment(expression) {
  155144. return (0, _builder.default)("TSExportAssignment", ...arguments);
  155145. }
  155146. function tsNamespaceExportDeclaration(id) {
  155147. return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments);
  155148. }
  155149. function tsTypeAnnotation(typeAnnotation2) {
  155150. return (0, _builder.default)("TSTypeAnnotation", ...arguments);
  155151. }
  155152. function tsTypeParameterInstantiation(params) {
  155153. return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments);
  155154. }
  155155. function tsTypeParameterDeclaration(params) {
  155156. return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments);
  155157. }
  155158. function tsTypeParameter(constraint, _default, name2) {
  155159. return (0, _builder.default)("TSTypeParameter", ...arguments);
  155160. }
  155161. function NumberLiteral(...args) {
  155162. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  155163. return (0, _builder.default)("NumberLiteral", ...args);
  155164. }
  155165. function RegexLiteral(...args) {
  155166. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  155167. return (0, _builder.default)("RegexLiteral", ...args);
  155168. }
  155169. function RestProperty(...args) {
  155170. console.trace("The node type RestProperty has been renamed to RestElement");
  155171. return (0, _builder.default)("RestProperty", ...args);
  155172. }
  155173. function SpreadProperty(...args) {
  155174. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  155175. return (0, _builder.default)("SpreadProperty", ...args);
  155176. }
  155177. }
  155178. });
  155179. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  155180. var require_cleanJSXElementLiteralChild7 = __commonJS({
  155181. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  155182. "use strict";
  155183. Object.defineProperty(exports, "__esModule", {
  155184. value: true
  155185. });
  155186. exports.default = cleanJSXElementLiteralChild;
  155187. var _generated = require_generated32();
  155188. function cleanJSXElementLiteralChild(child, args) {
  155189. const lines = child.value.split(/\r\n|\n|\r/);
  155190. let lastNonEmptyLine = 0;
  155191. for (let i = 0; i < lines.length; i++) {
  155192. if (lines[i].match(/[^ \t]/)) {
  155193. lastNonEmptyLine = i;
  155194. }
  155195. }
  155196. let str = "";
  155197. for (let i = 0; i < lines.length; i++) {
  155198. const line = lines[i];
  155199. const isFirstLine = i === 0;
  155200. const isLastLine = i === lines.length - 1;
  155201. const isLastNonEmptyLine = i === lastNonEmptyLine;
  155202. let trimmedLine = line.replace(/\t/g, " ");
  155203. if (!isFirstLine) {
  155204. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  155205. }
  155206. if (!isLastLine) {
  155207. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  155208. }
  155209. if (trimmedLine) {
  155210. if (!isLastNonEmptyLine) {
  155211. trimmedLine += " ";
  155212. }
  155213. str += trimmedLine;
  155214. }
  155215. }
  155216. if (str)
  155217. args.push((0, _generated.stringLiteral)(str));
  155218. }
  155219. }
  155220. });
  155221. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/react/buildChildren.js
  155222. var require_buildChildren7 = __commonJS({
  155223. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  155224. "use strict";
  155225. Object.defineProperty(exports, "__esModule", {
  155226. value: true
  155227. });
  155228. exports.default = buildChildren;
  155229. var _generated = require_generated31();
  155230. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild7();
  155231. function buildChildren(node) {
  155232. const elements = [];
  155233. for (let i = 0; i < node.children.length; i++) {
  155234. let child = node.children[i];
  155235. if ((0, _generated.isJSXText)(child)) {
  155236. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  155237. continue;
  155238. }
  155239. if ((0, _generated.isJSXExpressionContainer)(child))
  155240. child = child.expression;
  155241. if ((0, _generated.isJSXEmptyExpression)(child))
  155242. continue;
  155243. elements.push(child);
  155244. }
  155245. return elements;
  155246. }
  155247. }
  155248. });
  155249. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isNode.js
  155250. var require_isNode7 = __commonJS({
  155251. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  155252. "use strict";
  155253. Object.defineProperty(exports, "__esModule", {
  155254. value: true
  155255. });
  155256. exports.default = isNode;
  155257. var _definitions = require_definitions7();
  155258. function isNode(node) {
  155259. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  155260. }
  155261. }
  155262. });
  155263. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/asserts/assertNode.js
  155264. var require_assertNode7 = __commonJS({
  155265. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  155266. "use strict";
  155267. Object.defineProperty(exports, "__esModule", {
  155268. value: true
  155269. });
  155270. exports.default = assertNode2;
  155271. var _isNode = require_isNode7();
  155272. function assertNode2(node) {
  155273. if (!(0, _isNode.default)(node)) {
  155274. var _node$type;
  155275. const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  155276. throw new TypeError(`Not a valid node of type "${type}"`);
  155277. }
  155278. }
  155279. }
  155280. });
  155281. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/asserts/generated/index.js
  155282. var require_generated33 = __commonJS({
  155283. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  155284. "use strict";
  155285. Object.defineProperty(exports, "__esModule", {
  155286. value: true
  155287. });
  155288. exports.assertArrayExpression = assertArrayExpression;
  155289. exports.assertAssignmentExpression = assertAssignmentExpression;
  155290. exports.assertBinaryExpression = assertBinaryExpression;
  155291. exports.assertInterpreterDirective = assertInterpreterDirective;
  155292. exports.assertDirective = assertDirective;
  155293. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  155294. exports.assertBlockStatement = assertBlockStatement;
  155295. exports.assertBreakStatement = assertBreakStatement;
  155296. exports.assertCallExpression = assertCallExpression;
  155297. exports.assertCatchClause = assertCatchClause;
  155298. exports.assertConditionalExpression = assertConditionalExpression;
  155299. exports.assertContinueStatement = assertContinueStatement;
  155300. exports.assertDebuggerStatement = assertDebuggerStatement;
  155301. exports.assertDoWhileStatement = assertDoWhileStatement;
  155302. exports.assertEmptyStatement = assertEmptyStatement;
  155303. exports.assertExpressionStatement = assertExpressionStatement;
  155304. exports.assertFile = assertFile;
  155305. exports.assertForInStatement = assertForInStatement;
  155306. exports.assertForStatement = assertForStatement;
  155307. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  155308. exports.assertFunctionExpression = assertFunctionExpression;
  155309. exports.assertIdentifier = assertIdentifier;
  155310. exports.assertIfStatement = assertIfStatement;
  155311. exports.assertLabeledStatement = assertLabeledStatement;
  155312. exports.assertStringLiteral = assertStringLiteral;
  155313. exports.assertNumericLiteral = assertNumericLiteral;
  155314. exports.assertNullLiteral = assertNullLiteral;
  155315. exports.assertBooleanLiteral = assertBooleanLiteral;
  155316. exports.assertRegExpLiteral = assertRegExpLiteral;
  155317. exports.assertLogicalExpression = assertLogicalExpression;
  155318. exports.assertMemberExpression = assertMemberExpression;
  155319. exports.assertNewExpression = assertNewExpression;
  155320. exports.assertProgram = assertProgram;
  155321. exports.assertObjectExpression = assertObjectExpression;
  155322. exports.assertObjectMethod = assertObjectMethod;
  155323. exports.assertObjectProperty = assertObjectProperty;
  155324. exports.assertRestElement = assertRestElement;
  155325. exports.assertReturnStatement = assertReturnStatement;
  155326. exports.assertSequenceExpression = assertSequenceExpression;
  155327. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  155328. exports.assertSwitchCase = assertSwitchCase;
  155329. exports.assertSwitchStatement = assertSwitchStatement;
  155330. exports.assertThisExpression = assertThisExpression;
  155331. exports.assertThrowStatement = assertThrowStatement;
  155332. exports.assertTryStatement = assertTryStatement;
  155333. exports.assertUnaryExpression = assertUnaryExpression;
  155334. exports.assertUpdateExpression = assertUpdateExpression;
  155335. exports.assertVariableDeclaration = assertVariableDeclaration;
  155336. exports.assertVariableDeclarator = assertVariableDeclarator;
  155337. exports.assertWhileStatement = assertWhileStatement;
  155338. exports.assertWithStatement = assertWithStatement;
  155339. exports.assertAssignmentPattern = assertAssignmentPattern;
  155340. exports.assertArrayPattern = assertArrayPattern;
  155341. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  155342. exports.assertClassBody = assertClassBody;
  155343. exports.assertClassExpression = assertClassExpression;
  155344. exports.assertClassDeclaration = assertClassDeclaration;
  155345. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  155346. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  155347. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  155348. exports.assertExportSpecifier = assertExportSpecifier;
  155349. exports.assertForOfStatement = assertForOfStatement;
  155350. exports.assertImportDeclaration = assertImportDeclaration;
  155351. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  155352. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  155353. exports.assertImportSpecifier = assertImportSpecifier;
  155354. exports.assertMetaProperty = assertMetaProperty;
  155355. exports.assertClassMethod = assertClassMethod;
  155356. exports.assertObjectPattern = assertObjectPattern;
  155357. exports.assertSpreadElement = assertSpreadElement;
  155358. exports.assertSuper = assertSuper;
  155359. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  155360. exports.assertTemplateElement = assertTemplateElement;
  155361. exports.assertTemplateLiteral = assertTemplateLiteral;
  155362. exports.assertYieldExpression = assertYieldExpression;
  155363. exports.assertAwaitExpression = assertAwaitExpression;
  155364. exports.assertImport = assertImport;
  155365. exports.assertBigIntLiteral = assertBigIntLiteral;
  155366. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  155367. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  155368. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  155369. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  155370. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  155371. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  155372. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  155373. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  155374. exports.assertClassImplements = assertClassImplements;
  155375. exports.assertDeclareClass = assertDeclareClass;
  155376. exports.assertDeclareFunction = assertDeclareFunction;
  155377. exports.assertDeclareInterface = assertDeclareInterface;
  155378. exports.assertDeclareModule = assertDeclareModule;
  155379. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  155380. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  155381. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  155382. exports.assertDeclareVariable = assertDeclareVariable;
  155383. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  155384. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  155385. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  155386. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  155387. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  155388. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  155389. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  155390. exports.assertInferredPredicate = assertInferredPredicate;
  155391. exports.assertInterfaceExtends = assertInterfaceExtends;
  155392. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  155393. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  155394. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  155395. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  155396. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  155397. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  155398. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  155399. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  155400. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  155401. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  155402. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  155403. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  155404. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  155405. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  155406. exports.assertOpaqueType = assertOpaqueType;
  155407. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  155408. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  155409. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  155410. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  155411. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  155412. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  155413. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  155414. exports.assertTypeAlias = assertTypeAlias;
  155415. exports.assertTypeAnnotation = assertTypeAnnotation;
  155416. exports.assertTypeCastExpression = assertTypeCastExpression;
  155417. exports.assertTypeParameter = assertTypeParameter;
  155418. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  155419. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  155420. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  155421. exports.assertVariance = assertVariance;
  155422. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  155423. exports.assertEnumDeclaration = assertEnumDeclaration;
  155424. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  155425. exports.assertEnumNumberBody = assertEnumNumberBody;
  155426. exports.assertEnumStringBody = assertEnumStringBody;
  155427. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  155428. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  155429. exports.assertEnumNumberMember = assertEnumNumberMember;
  155430. exports.assertEnumStringMember = assertEnumStringMember;
  155431. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  155432. exports.assertIndexedAccessType = assertIndexedAccessType;
  155433. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  155434. exports.assertJSXAttribute = assertJSXAttribute;
  155435. exports.assertJSXClosingElement = assertJSXClosingElement;
  155436. exports.assertJSXElement = assertJSXElement;
  155437. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  155438. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  155439. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  155440. exports.assertJSXIdentifier = assertJSXIdentifier;
  155441. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  155442. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  155443. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  155444. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  155445. exports.assertJSXText = assertJSXText;
  155446. exports.assertJSXFragment = assertJSXFragment;
  155447. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  155448. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  155449. exports.assertNoop = assertNoop;
  155450. exports.assertPlaceholder = assertPlaceholder;
  155451. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  155452. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  155453. exports.assertBindExpression = assertBindExpression;
  155454. exports.assertClassProperty = assertClassProperty;
  155455. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  155456. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  155457. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  155458. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  155459. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  155460. exports.assertImportAttribute = assertImportAttribute;
  155461. exports.assertDecorator = assertDecorator;
  155462. exports.assertDoExpression = assertDoExpression;
  155463. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  155464. exports.assertPrivateName = assertPrivateName;
  155465. exports.assertRecordExpression = assertRecordExpression;
  155466. exports.assertTupleExpression = assertTupleExpression;
  155467. exports.assertDecimalLiteral = assertDecimalLiteral;
  155468. exports.assertStaticBlock = assertStaticBlock;
  155469. exports.assertModuleExpression = assertModuleExpression;
  155470. exports.assertTSParameterProperty = assertTSParameterProperty;
  155471. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  155472. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  155473. exports.assertTSQualifiedName = assertTSQualifiedName;
  155474. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  155475. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  155476. exports.assertTSPropertySignature = assertTSPropertySignature;
  155477. exports.assertTSMethodSignature = assertTSMethodSignature;
  155478. exports.assertTSIndexSignature = assertTSIndexSignature;
  155479. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  155480. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  155481. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  155482. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  155483. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  155484. exports.assertTSNullKeyword = assertTSNullKeyword;
  155485. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  155486. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  155487. exports.assertTSStringKeyword = assertTSStringKeyword;
  155488. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  155489. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  155490. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  155491. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  155492. exports.assertTSThisType = assertTSThisType;
  155493. exports.assertTSFunctionType = assertTSFunctionType;
  155494. exports.assertTSConstructorType = assertTSConstructorType;
  155495. exports.assertTSTypeReference = assertTSTypeReference;
  155496. exports.assertTSTypePredicate = assertTSTypePredicate;
  155497. exports.assertTSTypeQuery = assertTSTypeQuery;
  155498. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  155499. exports.assertTSArrayType = assertTSArrayType;
  155500. exports.assertTSTupleType = assertTSTupleType;
  155501. exports.assertTSOptionalType = assertTSOptionalType;
  155502. exports.assertTSRestType = assertTSRestType;
  155503. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  155504. exports.assertTSUnionType = assertTSUnionType;
  155505. exports.assertTSIntersectionType = assertTSIntersectionType;
  155506. exports.assertTSConditionalType = assertTSConditionalType;
  155507. exports.assertTSInferType = assertTSInferType;
  155508. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  155509. exports.assertTSTypeOperator = assertTSTypeOperator;
  155510. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  155511. exports.assertTSMappedType = assertTSMappedType;
  155512. exports.assertTSLiteralType = assertTSLiteralType;
  155513. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  155514. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  155515. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  155516. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  155517. exports.assertTSAsExpression = assertTSAsExpression;
  155518. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  155519. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  155520. exports.assertTSEnumMember = assertTSEnumMember;
  155521. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  155522. exports.assertTSModuleBlock = assertTSModuleBlock;
  155523. exports.assertTSImportType = assertTSImportType;
  155524. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  155525. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  155526. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  155527. exports.assertTSExportAssignment = assertTSExportAssignment;
  155528. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  155529. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  155530. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  155531. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  155532. exports.assertTSTypeParameter = assertTSTypeParameter;
  155533. exports.assertExpression = assertExpression;
  155534. exports.assertBinary = assertBinary;
  155535. exports.assertScopable = assertScopable;
  155536. exports.assertBlockParent = assertBlockParent;
  155537. exports.assertBlock = assertBlock;
  155538. exports.assertStatement = assertStatement;
  155539. exports.assertTerminatorless = assertTerminatorless;
  155540. exports.assertCompletionStatement = assertCompletionStatement;
  155541. exports.assertConditional = assertConditional;
  155542. exports.assertLoop = assertLoop;
  155543. exports.assertWhile = assertWhile;
  155544. exports.assertExpressionWrapper = assertExpressionWrapper;
  155545. exports.assertFor = assertFor;
  155546. exports.assertForXStatement = assertForXStatement;
  155547. exports.assertFunction = assertFunction;
  155548. exports.assertFunctionParent = assertFunctionParent;
  155549. exports.assertPureish = assertPureish;
  155550. exports.assertDeclaration = assertDeclaration;
  155551. exports.assertPatternLike = assertPatternLike;
  155552. exports.assertLVal = assertLVal;
  155553. exports.assertTSEntityName = assertTSEntityName;
  155554. exports.assertLiteral = assertLiteral;
  155555. exports.assertImmutable = assertImmutable;
  155556. exports.assertUserWhitespacable = assertUserWhitespacable;
  155557. exports.assertMethod = assertMethod;
  155558. exports.assertObjectMember = assertObjectMember;
  155559. exports.assertProperty = assertProperty;
  155560. exports.assertUnaryLike = assertUnaryLike;
  155561. exports.assertPattern = assertPattern;
  155562. exports.assertClass = assertClass;
  155563. exports.assertModuleDeclaration = assertModuleDeclaration;
  155564. exports.assertExportDeclaration = assertExportDeclaration;
  155565. exports.assertModuleSpecifier = assertModuleSpecifier;
  155566. exports.assertFlow = assertFlow;
  155567. exports.assertFlowType = assertFlowType;
  155568. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  155569. exports.assertFlowDeclaration = assertFlowDeclaration;
  155570. exports.assertFlowPredicate = assertFlowPredicate;
  155571. exports.assertEnumBody = assertEnumBody;
  155572. exports.assertEnumMember = assertEnumMember;
  155573. exports.assertJSX = assertJSX;
  155574. exports.assertPrivate = assertPrivate;
  155575. exports.assertTSTypeElement = assertTSTypeElement;
  155576. exports.assertTSType = assertTSType;
  155577. exports.assertTSBaseType = assertTSBaseType;
  155578. exports.assertNumberLiteral = assertNumberLiteral;
  155579. exports.assertRegexLiteral = assertRegexLiteral;
  155580. exports.assertRestProperty = assertRestProperty;
  155581. exports.assertSpreadProperty = assertSpreadProperty;
  155582. var _is = require_is7();
  155583. function assert(type, node, opts) {
  155584. if (!(0, _is.default)(type, node, opts)) {
  155585. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
  155586. }
  155587. }
  155588. function assertArrayExpression(node, opts) {
  155589. assert("ArrayExpression", node, opts);
  155590. }
  155591. function assertAssignmentExpression(node, opts) {
  155592. assert("AssignmentExpression", node, opts);
  155593. }
  155594. function assertBinaryExpression(node, opts) {
  155595. assert("BinaryExpression", node, opts);
  155596. }
  155597. function assertInterpreterDirective(node, opts) {
  155598. assert("InterpreterDirective", node, opts);
  155599. }
  155600. function assertDirective(node, opts) {
  155601. assert("Directive", node, opts);
  155602. }
  155603. function assertDirectiveLiteral(node, opts) {
  155604. assert("DirectiveLiteral", node, opts);
  155605. }
  155606. function assertBlockStatement(node, opts) {
  155607. assert("BlockStatement", node, opts);
  155608. }
  155609. function assertBreakStatement(node, opts) {
  155610. assert("BreakStatement", node, opts);
  155611. }
  155612. function assertCallExpression(node, opts) {
  155613. assert("CallExpression", node, opts);
  155614. }
  155615. function assertCatchClause(node, opts) {
  155616. assert("CatchClause", node, opts);
  155617. }
  155618. function assertConditionalExpression(node, opts) {
  155619. assert("ConditionalExpression", node, opts);
  155620. }
  155621. function assertContinueStatement(node, opts) {
  155622. assert("ContinueStatement", node, opts);
  155623. }
  155624. function assertDebuggerStatement(node, opts) {
  155625. assert("DebuggerStatement", node, opts);
  155626. }
  155627. function assertDoWhileStatement(node, opts) {
  155628. assert("DoWhileStatement", node, opts);
  155629. }
  155630. function assertEmptyStatement(node, opts) {
  155631. assert("EmptyStatement", node, opts);
  155632. }
  155633. function assertExpressionStatement(node, opts) {
  155634. assert("ExpressionStatement", node, opts);
  155635. }
  155636. function assertFile(node, opts) {
  155637. assert("File", node, opts);
  155638. }
  155639. function assertForInStatement(node, opts) {
  155640. assert("ForInStatement", node, opts);
  155641. }
  155642. function assertForStatement(node, opts) {
  155643. assert("ForStatement", node, opts);
  155644. }
  155645. function assertFunctionDeclaration(node, opts) {
  155646. assert("FunctionDeclaration", node, opts);
  155647. }
  155648. function assertFunctionExpression(node, opts) {
  155649. assert("FunctionExpression", node, opts);
  155650. }
  155651. function assertIdentifier(node, opts) {
  155652. assert("Identifier", node, opts);
  155653. }
  155654. function assertIfStatement(node, opts) {
  155655. assert("IfStatement", node, opts);
  155656. }
  155657. function assertLabeledStatement(node, opts) {
  155658. assert("LabeledStatement", node, opts);
  155659. }
  155660. function assertStringLiteral(node, opts) {
  155661. assert("StringLiteral", node, opts);
  155662. }
  155663. function assertNumericLiteral(node, opts) {
  155664. assert("NumericLiteral", node, opts);
  155665. }
  155666. function assertNullLiteral(node, opts) {
  155667. assert("NullLiteral", node, opts);
  155668. }
  155669. function assertBooleanLiteral(node, opts) {
  155670. assert("BooleanLiteral", node, opts);
  155671. }
  155672. function assertRegExpLiteral(node, opts) {
  155673. assert("RegExpLiteral", node, opts);
  155674. }
  155675. function assertLogicalExpression(node, opts) {
  155676. assert("LogicalExpression", node, opts);
  155677. }
  155678. function assertMemberExpression(node, opts) {
  155679. assert("MemberExpression", node, opts);
  155680. }
  155681. function assertNewExpression(node, opts) {
  155682. assert("NewExpression", node, opts);
  155683. }
  155684. function assertProgram(node, opts) {
  155685. assert("Program", node, opts);
  155686. }
  155687. function assertObjectExpression(node, opts) {
  155688. assert("ObjectExpression", node, opts);
  155689. }
  155690. function assertObjectMethod(node, opts) {
  155691. assert("ObjectMethod", node, opts);
  155692. }
  155693. function assertObjectProperty(node, opts) {
  155694. assert("ObjectProperty", node, opts);
  155695. }
  155696. function assertRestElement(node, opts) {
  155697. assert("RestElement", node, opts);
  155698. }
  155699. function assertReturnStatement(node, opts) {
  155700. assert("ReturnStatement", node, opts);
  155701. }
  155702. function assertSequenceExpression(node, opts) {
  155703. assert("SequenceExpression", node, opts);
  155704. }
  155705. function assertParenthesizedExpression(node, opts) {
  155706. assert("ParenthesizedExpression", node, opts);
  155707. }
  155708. function assertSwitchCase(node, opts) {
  155709. assert("SwitchCase", node, opts);
  155710. }
  155711. function assertSwitchStatement(node, opts) {
  155712. assert("SwitchStatement", node, opts);
  155713. }
  155714. function assertThisExpression(node, opts) {
  155715. assert("ThisExpression", node, opts);
  155716. }
  155717. function assertThrowStatement(node, opts) {
  155718. assert("ThrowStatement", node, opts);
  155719. }
  155720. function assertTryStatement(node, opts) {
  155721. assert("TryStatement", node, opts);
  155722. }
  155723. function assertUnaryExpression(node, opts) {
  155724. assert("UnaryExpression", node, opts);
  155725. }
  155726. function assertUpdateExpression(node, opts) {
  155727. assert("UpdateExpression", node, opts);
  155728. }
  155729. function assertVariableDeclaration(node, opts) {
  155730. assert("VariableDeclaration", node, opts);
  155731. }
  155732. function assertVariableDeclarator(node, opts) {
  155733. assert("VariableDeclarator", node, opts);
  155734. }
  155735. function assertWhileStatement(node, opts) {
  155736. assert("WhileStatement", node, opts);
  155737. }
  155738. function assertWithStatement(node, opts) {
  155739. assert("WithStatement", node, opts);
  155740. }
  155741. function assertAssignmentPattern(node, opts) {
  155742. assert("AssignmentPattern", node, opts);
  155743. }
  155744. function assertArrayPattern(node, opts) {
  155745. assert("ArrayPattern", node, opts);
  155746. }
  155747. function assertArrowFunctionExpression(node, opts) {
  155748. assert("ArrowFunctionExpression", node, opts);
  155749. }
  155750. function assertClassBody(node, opts) {
  155751. assert("ClassBody", node, opts);
  155752. }
  155753. function assertClassExpression(node, opts) {
  155754. assert("ClassExpression", node, opts);
  155755. }
  155756. function assertClassDeclaration(node, opts) {
  155757. assert("ClassDeclaration", node, opts);
  155758. }
  155759. function assertExportAllDeclaration(node, opts) {
  155760. assert("ExportAllDeclaration", node, opts);
  155761. }
  155762. function assertExportDefaultDeclaration(node, opts) {
  155763. assert("ExportDefaultDeclaration", node, opts);
  155764. }
  155765. function assertExportNamedDeclaration(node, opts) {
  155766. assert("ExportNamedDeclaration", node, opts);
  155767. }
  155768. function assertExportSpecifier(node, opts) {
  155769. assert("ExportSpecifier", node, opts);
  155770. }
  155771. function assertForOfStatement(node, opts) {
  155772. assert("ForOfStatement", node, opts);
  155773. }
  155774. function assertImportDeclaration(node, opts) {
  155775. assert("ImportDeclaration", node, opts);
  155776. }
  155777. function assertImportDefaultSpecifier(node, opts) {
  155778. assert("ImportDefaultSpecifier", node, opts);
  155779. }
  155780. function assertImportNamespaceSpecifier(node, opts) {
  155781. assert("ImportNamespaceSpecifier", node, opts);
  155782. }
  155783. function assertImportSpecifier(node, opts) {
  155784. assert("ImportSpecifier", node, opts);
  155785. }
  155786. function assertMetaProperty(node, opts) {
  155787. assert("MetaProperty", node, opts);
  155788. }
  155789. function assertClassMethod(node, opts) {
  155790. assert("ClassMethod", node, opts);
  155791. }
  155792. function assertObjectPattern(node, opts) {
  155793. assert("ObjectPattern", node, opts);
  155794. }
  155795. function assertSpreadElement(node, opts) {
  155796. assert("SpreadElement", node, opts);
  155797. }
  155798. function assertSuper(node, opts) {
  155799. assert("Super", node, opts);
  155800. }
  155801. function assertTaggedTemplateExpression(node, opts) {
  155802. assert("TaggedTemplateExpression", node, opts);
  155803. }
  155804. function assertTemplateElement(node, opts) {
  155805. assert("TemplateElement", node, opts);
  155806. }
  155807. function assertTemplateLiteral(node, opts) {
  155808. assert("TemplateLiteral", node, opts);
  155809. }
  155810. function assertYieldExpression(node, opts) {
  155811. assert("YieldExpression", node, opts);
  155812. }
  155813. function assertAwaitExpression(node, opts) {
  155814. assert("AwaitExpression", node, opts);
  155815. }
  155816. function assertImport(node, opts) {
  155817. assert("Import", node, opts);
  155818. }
  155819. function assertBigIntLiteral(node, opts) {
  155820. assert("BigIntLiteral", node, opts);
  155821. }
  155822. function assertExportNamespaceSpecifier(node, opts) {
  155823. assert("ExportNamespaceSpecifier", node, opts);
  155824. }
  155825. function assertOptionalMemberExpression(node, opts) {
  155826. assert("OptionalMemberExpression", node, opts);
  155827. }
  155828. function assertOptionalCallExpression(node, opts) {
  155829. assert("OptionalCallExpression", node, opts);
  155830. }
  155831. function assertAnyTypeAnnotation(node, opts) {
  155832. assert("AnyTypeAnnotation", node, opts);
  155833. }
  155834. function assertArrayTypeAnnotation(node, opts) {
  155835. assert("ArrayTypeAnnotation", node, opts);
  155836. }
  155837. function assertBooleanTypeAnnotation(node, opts) {
  155838. assert("BooleanTypeAnnotation", node, opts);
  155839. }
  155840. function assertBooleanLiteralTypeAnnotation(node, opts) {
  155841. assert("BooleanLiteralTypeAnnotation", node, opts);
  155842. }
  155843. function assertNullLiteralTypeAnnotation(node, opts) {
  155844. assert("NullLiteralTypeAnnotation", node, opts);
  155845. }
  155846. function assertClassImplements(node, opts) {
  155847. assert("ClassImplements", node, opts);
  155848. }
  155849. function assertDeclareClass(node, opts) {
  155850. assert("DeclareClass", node, opts);
  155851. }
  155852. function assertDeclareFunction(node, opts) {
  155853. assert("DeclareFunction", node, opts);
  155854. }
  155855. function assertDeclareInterface(node, opts) {
  155856. assert("DeclareInterface", node, opts);
  155857. }
  155858. function assertDeclareModule(node, opts) {
  155859. assert("DeclareModule", node, opts);
  155860. }
  155861. function assertDeclareModuleExports(node, opts) {
  155862. assert("DeclareModuleExports", node, opts);
  155863. }
  155864. function assertDeclareTypeAlias(node, opts) {
  155865. assert("DeclareTypeAlias", node, opts);
  155866. }
  155867. function assertDeclareOpaqueType(node, opts) {
  155868. assert("DeclareOpaqueType", node, opts);
  155869. }
  155870. function assertDeclareVariable(node, opts) {
  155871. assert("DeclareVariable", node, opts);
  155872. }
  155873. function assertDeclareExportDeclaration(node, opts) {
  155874. assert("DeclareExportDeclaration", node, opts);
  155875. }
  155876. function assertDeclareExportAllDeclaration(node, opts) {
  155877. assert("DeclareExportAllDeclaration", node, opts);
  155878. }
  155879. function assertDeclaredPredicate(node, opts) {
  155880. assert("DeclaredPredicate", node, opts);
  155881. }
  155882. function assertExistsTypeAnnotation(node, opts) {
  155883. assert("ExistsTypeAnnotation", node, opts);
  155884. }
  155885. function assertFunctionTypeAnnotation(node, opts) {
  155886. assert("FunctionTypeAnnotation", node, opts);
  155887. }
  155888. function assertFunctionTypeParam(node, opts) {
  155889. assert("FunctionTypeParam", node, opts);
  155890. }
  155891. function assertGenericTypeAnnotation(node, opts) {
  155892. assert("GenericTypeAnnotation", node, opts);
  155893. }
  155894. function assertInferredPredicate(node, opts) {
  155895. assert("InferredPredicate", node, opts);
  155896. }
  155897. function assertInterfaceExtends(node, opts) {
  155898. assert("InterfaceExtends", node, opts);
  155899. }
  155900. function assertInterfaceDeclaration(node, opts) {
  155901. assert("InterfaceDeclaration", node, opts);
  155902. }
  155903. function assertInterfaceTypeAnnotation(node, opts) {
  155904. assert("InterfaceTypeAnnotation", node, opts);
  155905. }
  155906. function assertIntersectionTypeAnnotation(node, opts) {
  155907. assert("IntersectionTypeAnnotation", node, opts);
  155908. }
  155909. function assertMixedTypeAnnotation(node, opts) {
  155910. assert("MixedTypeAnnotation", node, opts);
  155911. }
  155912. function assertEmptyTypeAnnotation(node, opts) {
  155913. assert("EmptyTypeAnnotation", node, opts);
  155914. }
  155915. function assertNullableTypeAnnotation(node, opts) {
  155916. assert("NullableTypeAnnotation", node, opts);
  155917. }
  155918. function assertNumberLiteralTypeAnnotation(node, opts) {
  155919. assert("NumberLiteralTypeAnnotation", node, opts);
  155920. }
  155921. function assertNumberTypeAnnotation(node, opts) {
  155922. assert("NumberTypeAnnotation", node, opts);
  155923. }
  155924. function assertObjectTypeAnnotation(node, opts) {
  155925. assert("ObjectTypeAnnotation", node, opts);
  155926. }
  155927. function assertObjectTypeInternalSlot(node, opts) {
  155928. assert("ObjectTypeInternalSlot", node, opts);
  155929. }
  155930. function assertObjectTypeCallProperty(node, opts) {
  155931. assert("ObjectTypeCallProperty", node, opts);
  155932. }
  155933. function assertObjectTypeIndexer(node, opts) {
  155934. assert("ObjectTypeIndexer", node, opts);
  155935. }
  155936. function assertObjectTypeProperty(node, opts) {
  155937. assert("ObjectTypeProperty", node, opts);
  155938. }
  155939. function assertObjectTypeSpreadProperty(node, opts) {
  155940. assert("ObjectTypeSpreadProperty", node, opts);
  155941. }
  155942. function assertOpaqueType(node, opts) {
  155943. assert("OpaqueType", node, opts);
  155944. }
  155945. function assertQualifiedTypeIdentifier(node, opts) {
  155946. assert("QualifiedTypeIdentifier", node, opts);
  155947. }
  155948. function assertStringLiteralTypeAnnotation(node, opts) {
  155949. assert("StringLiteralTypeAnnotation", node, opts);
  155950. }
  155951. function assertStringTypeAnnotation(node, opts) {
  155952. assert("StringTypeAnnotation", node, opts);
  155953. }
  155954. function assertSymbolTypeAnnotation(node, opts) {
  155955. assert("SymbolTypeAnnotation", node, opts);
  155956. }
  155957. function assertThisTypeAnnotation(node, opts) {
  155958. assert("ThisTypeAnnotation", node, opts);
  155959. }
  155960. function assertTupleTypeAnnotation(node, opts) {
  155961. assert("TupleTypeAnnotation", node, opts);
  155962. }
  155963. function assertTypeofTypeAnnotation(node, opts) {
  155964. assert("TypeofTypeAnnotation", node, opts);
  155965. }
  155966. function assertTypeAlias(node, opts) {
  155967. assert("TypeAlias", node, opts);
  155968. }
  155969. function assertTypeAnnotation(node, opts) {
  155970. assert("TypeAnnotation", node, opts);
  155971. }
  155972. function assertTypeCastExpression(node, opts) {
  155973. assert("TypeCastExpression", node, opts);
  155974. }
  155975. function assertTypeParameter(node, opts) {
  155976. assert("TypeParameter", node, opts);
  155977. }
  155978. function assertTypeParameterDeclaration(node, opts) {
  155979. assert("TypeParameterDeclaration", node, opts);
  155980. }
  155981. function assertTypeParameterInstantiation(node, opts) {
  155982. assert("TypeParameterInstantiation", node, opts);
  155983. }
  155984. function assertUnionTypeAnnotation(node, opts) {
  155985. assert("UnionTypeAnnotation", node, opts);
  155986. }
  155987. function assertVariance(node, opts) {
  155988. assert("Variance", node, opts);
  155989. }
  155990. function assertVoidTypeAnnotation(node, opts) {
  155991. assert("VoidTypeAnnotation", node, opts);
  155992. }
  155993. function assertEnumDeclaration(node, opts) {
  155994. assert("EnumDeclaration", node, opts);
  155995. }
  155996. function assertEnumBooleanBody(node, opts) {
  155997. assert("EnumBooleanBody", node, opts);
  155998. }
  155999. function assertEnumNumberBody(node, opts) {
  156000. assert("EnumNumberBody", node, opts);
  156001. }
  156002. function assertEnumStringBody(node, opts) {
  156003. assert("EnumStringBody", node, opts);
  156004. }
  156005. function assertEnumSymbolBody(node, opts) {
  156006. assert("EnumSymbolBody", node, opts);
  156007. }
  156008. function assertEnumBooleanMember(node, opts) {
  156009. assert("EnumBooleanMember", node, opts);
  156010. }
  156011. function assertEnumNumberMember(node, opts) {
  156012. assert("EnumNumberMember", node, opts);
  156013. }
  156014. function assertEnumStringMember(node, opts) {
  156015. assert("EnumStringMember", node, opts);
  156016. }
  156017. function assertEnumDefaultedMember(node, opts) {
  156018. assert("EnumDefaultedMember", node, opts);
  156019. }
  156020. function assertIndexedAccessType(node, opts) {
  156021. assert("IndexedAccessType", node, opts);
  156022. }
  156023. function assertOptionalIndexedAccessType(node, opts) {
  156024. assert("OptionalIndexedAccessType", node, opts);
  156025. }
  156026. function assertJSXAttribute(node, opts) {
  156027. assert("JSXAttribute", node, opts);
  156028. }
  156029. function assertJSXClosingElement(node, opts) {
  156030. assert("JSXClosingElement", node, opts);
  156031. }
  156032. function assertJSXElement(node, opts) {
  156033. assert("JSXElement", node, opts);
  156034. }
  156035. function assertJSXEmptyExpression(node, opts) {
  156036. assert("JSXEmptyExpression", node, opts);
  156037. }
  156038. function assertJSXExpressionContainer(node, opts) {
  156039. assert("JSXExpressionContainer", node, opts);
  156040. }
  156041. function assertJSXSpreadChild(node, opts) {
  156042. assert("JSXSpreadChild", node, opts);
  156043. }
  156044. function assertJSXIdentifier(node, opts) {
  156045. assert("JSXIdentifier", node, opts);
  156046. }
  156047. function assertJSXMemberExpression(node, opts) {
  156048. assert("JSXMemberExpression", node, opts);
  156049. }
  156050. function assertJSXNamespacedName(node, opts) {
  156051. assert("JSXNamespacedName", node, opts);
  156052. }
  156053. function assertJSXOpeningElement(node, opts) {
  156054. assert("JSXOpeningElement", node, opts);
  156055. }
  156056. function assertJSXSpreadAttribute(node, opts) {
  156057. assert("JSXSpreadAttribute", node, opts);
  156058. }
  156059. function assertJSXText(node, opts) {
  156060. assert("JSXText", node, opts);
  156061. }
  156062. function assertJSXFragment(node, opts) {
  156063. assert("JSXFragment", node, opts);
  156064. }
  156065. function assertJSXOpeningFragment(node, opts) {
  156066. assert("JSXOpeningFragment", node, opts);
  156067. }
  156068. function assertJSXClosingFragment(node, opts) {
  156069. assert("JSXClosingFragment", node, opts);
  156070. }
  156071. function assertNoop(node, opts) {
  156072. assert("Noop", node, opts);
  156073. }
  156074. function assertPlaceholder(node, opts) {
  156075. assert("Placeholder", node, opts);
  156076. }
  156077. function assertV8IntrinsicIdentifier(node, opts) {
  156078. assert("V8IntrinsicIdentifier", node, opts);
  156079. }
  156080. function assertArgumentPlaceholder(node, opts) {
  156081. assert("ArgumentPlaceholder", node, opts);
  156082. }
  156083. function assertBindExpression(node, opts) {
  156084. assert("BindExpression", node, opts);
  156085. }
  156086. function assertClassProperty(node, opts) {
  156087. assert("ClassProperty", node, opts);
  156088. }
  156089. function assertPipelineTopicExpression(node, opts) {
  156090. assert("PipelineTopicExpression", node, opts);
  156091. }
  156092. function assertPipelineBareFunction(node, opts) {
  156093. assert("PipelineBareFunction", node, opts);
  156094. }
  156095. function assertPipelinePrimaryTopicReference(node, opts) {
  156096. assert("PipelinePrimaryTopicReference", node, opts);
  156097. }
  156098. function assertClassPrivateProperty(node, opts) {
  156099. assert("ClassPrivateProperty", node, opts);
  156100. }
  156101. function assertClassPrivateMethod(node, opts) {
  156102. assert("ClassPrivateMethod", node, opts);
  156103. }
  156104. function assertImportAttribute(node, opts) {
  156105. assert("ImportAttribute", node, opts);
  156106. }
  156107. function assertDecorator(node, opts) {
  156108. assert("Decorator", node, opts);
  156109. }
  156110. function assertDoExpression(node, opts) {
  156111. assert("DoExpression", node, opts);
  156112. }
  156113. function assertExportDefaultSpecifier(node, opts) {
  156114. assert("ExportDefaultSpecifier", node, opts);
  156115. }
  156116. function assertPrivateName(node, opts) {
  156117. assert("PrivateName", node, opts);
  156118. }
  156119. function assertRecordExpression(node, opts) {
  156120. assert("RecordExpression", node, opts);
  156121. }
  156122. function assertTupleExpression(node, opts) {
  156123. assert("TupleExpression", node, opts);
  156124. }
  156125. function assertDecimalLiteral(node, opts) {
  156126. assert("DecimalLiteral", node, opts);
  156127. }
  156128. function assertStaticBlock(node, opts) {
  156129. assert("StaticBlock", node, opts);
  156130. }
  156131. function assertModuleExpression(node, opts) {
  156132. assert("ModuleExpression", node, opts);
  156133. }
  156134. function assertTSParameterProperty(node, opts) {
  156135. assert("TSParameterProperty", node, opts);
  156136. }
  156137. function assertTSDeclareFunction(node, opts) {
  156138. assert("TSDeclareFunction", node, opts);
  156139. }
  156140. function assertTSDeclareMethod(node, opts) {
  156141. assert("TSDeclareMethod", node, opts);
  156142. }
  156143. function assertTSQualifiedName(node, opts) {
  156144. assert("TSQualifiedName", node, opts);
  156145. }
  156146. function assertTSCallSignatureDeclaration(node, opts) {
  156147. assert("TSCallSignatureDeclaration", node, opts);
  156148. }
  156149. function assertTSConstructSignatureDeclaration(node, opts) {
  156150. assert("TSConstructSignatureDeclaration", node, opts);
  156151. }
  156152. function assertTSPropertySignature(node, opts) {
  156153. assert("TSPropertySignature", node, opts);
  156154. }
  156155. function assertTSMethodSignature(node, opts) {
  156156. assert("TSMethodSignature", node, opts);
  156157. }
  156158. function assertTSIndexSignature(node, opts) {
  156159. assert("TSIndexSignature", node, opts);
  156160. }
  156161. function assertTSAnyKeyword(node, opts) {
  156162. assert("TSAnyKeyword", node, opts);
  156163. }
  156164. function assertTSBooleanKeyword(node, opts) {
  156165. assert("TSBooleanKeyword", node, opts);
  156166. }
  156167. function assertTSBigIntKeyword(node, opts) {
  156168. assert("TSBigIntKeyword", node, opts);
  156169. }
  156170. function assertTSIntrinsicKeyword(node, opts) {
  156171. assert("TSIntrinsicKeyword", node, opts);
  156172. }
  156173. function assertTSNeverKeyword(node, opts) {
  156174. assert("TSNeverKeyword", node, opts);
  156175. }
  156176. function assertTSNullKeyword(node, opts) {
  156177. assert("TSNullKeyword", node, opts);
  156178. }
  156179. function assertTSNumberKeyword(node, opts) {
  156180. assert("TSNumberKeyword", node, opts);
  156181. }
  156182. function assertTSObjectKeyword(node, opts) {
  156183. assert("TSObjectKeyword", node, opts);
  156184. }
  156185. function assertTSStringKeyword(node, opts) {
  156186. assert("TSStringKeyword", node, opts);
  156187. }
  156188. function assertTSSymbolKeyword(node, opts) {
  156189. assert("TSSymbolKeyword", node, opts);
  156190. }
  156191. function assertTSUndefinedKeyword(node, opts) {
  156192. assert("TSUndefinedKeyword", node, opts);
  156193. }
  156194. function assertTSUnknownKeyword(node, opts) {
  156195. assert("TSUnknownKeyword", node, opts);
  156196. }
  156197. function assertTSVoidKeyword(node, opts) {
  156198. assert("TSVoidKeyword", node, opts);
  156199. }
  156200. function assertTSThisType(node, opts) {
  156201. assert("TSThisType", node, opts);
  156202. }
  156203. function assertTSFunctionType(node, opts) {
  156204. assert("TSFunctionType", node, opts);
  156205. }
  156206. function assertTSConstructorType(node, opts) {
  156207. assert("TSConstructorType", node, opts);
  156208. }
  156209. function assertTSTypeReference(node, opts) {
  156210. assert("TSTypeReference", node, opts);
  156211. }
  156212. function assertTSTypePredicate(node, opts) {
  156213. assert("TSTypePredicate", node, opts);
  156214. }
  156215. function assertTSTypeQuery(node, opts) {
  156216. assert("TSTypeQuery", node, opts);
  156217. }
  156218. function assertTSTypeLiteral(node, opts) {
  156219. assert("TSTypeLiteral", node, opts);
  156220. }
  156221. function assertTSArrayType(node, opts) {
  156222. assert("TSArrayType", node, opts);
  156223. }
  156224. function assertTSTupleType(node, opts) {
  156225. assert("TSTupleType", node, opts);
  156226. }
  156227. function assertTSOptionalType(node, opts) {
  156228. assert("TSOptionalType", node, opts);
  156229. }
  156230. function assertTSRestType(node, opts) {
  156231. assert("TSRestType", node, opts);
  156232. }
  156233. function assertTSNamedTupleMember(node, opts) {
  156234. assert("TSNamedTupleMember", node, opts);
  156235. }
  156236. function assertTSUnionType(node, opts) {
  156237. assert("TSUnionType", node, opts);
  156238. }
  156239. function assertTSIntersectionType(node, opts) {
  156240. assert("TSIntersectionType", node, opts);
  156241. }
  156242. function assertTSConditionalType(node, opts) {
  156243. assert("TSConditionalType", node, opts);
  156244. }
  156245. function assertTSInferType(node, opts) {
  156246. assert("TSInferType", node, opts);
  156247. }
  156248. function assertTSParenthesizedType(node, opts) {
  156249. assert("TSParenthesizedType", node, opts);
  156250. }
  156251. function assertTSTypeOperator(node, opts) {
  156252. assert("TSTypeOperator", node, opts);
  156253. }
  156254. function assertTSIndexedAccessType(node, opts) {
  156255. assert("TSIndexedAccessType", node, opts);
  156256. }
  156257. function assertTSMappedType(node, opts) {
  156258. assert("TSMappedType", node, opts);
  156259. }
  156260. function assertTSLiteralType(node, opts) {
  156261. assert("TSLiteralType", node, opts);
  156262. }
  156263. function assertTSExpressionWithTypeArguments(node, opts) {
  156264. assert("TSExpressionWithTypeArguments", node, opts);
  156265. }
  156266. function assertTSInterfaceDeclaration(node, opts) {
  156267. assert("TSInterfaceDeclaration", node, opts);
  156268. }
  156269. function assertTSInterfaceBody(node, opts) {
  156270. assert("TSInterfaceBody", node, opts);
  156271. }
  156272. function assertTSTypeAliasDeclaration(node, opts) {
  156273. assert("TSTypeAliasDeclaration", node, opts);
  156274. }
  156275. function assertTSAsExpression(node, opts) {
  156276. assert("TSAsExpression", node, opts);
  156277. }
  156278. function assertTSTypeAssertion(node, opts) {
  156279. assert("TSTypeAssertion", node, opts);
  156280. }
  156281. function assertTSEnumDeclaration(node, opts) {
  156282. assert("TSEnumDeclaration", node, opts);
  156283. }
  156284. function assertTSEnumMember(node, opts) {
  156285. assert("TSEnumMember", node, opts);
  156286. }
  156287. function assertTSModuleDeclaration(node, opts) {
  156288. assert("TSModuleDeclaration", node, opts);
  156289. }
  156290. function assertTSModuleBlock(node, opts) {
  156291. assert("TSModuleBlock", node, opts);
  156292. }
  156293. function assertTSImportType(node, opts) {
  156294. assert("TSImportType", node, opts);
  156295. }
  156296. function assertTSImportEqualsDeclaration(node, opts) {
  156297. assert("TSImportEqualsDeclaration", node, opts);
  156298. }
  156299. function assertTSExternalModuleReference(node, opts) {
  156300. assert("TSExternalModuleReference", node, opts);
  156301. }
  156302. function assertTSNonNullExpression(node, opts) {
  156303. assert("TSNonNullExpression", node, opts);
  156304. }
  156305. function assertTSExportAssignment(node, opts) {
  156306. assert("TSExportAssignment", node, opts);
  156307. }
  156308. function assertTSNamespaceExportDeclaration(node, opts) {
  156309. assert("TSNamespaceExportDeclaration", node, opts);
  156310. }
  156311. function assertTSTypeAnnotation(node, opts) {
  156312. assert("TSTypeAnnotation", node, opts);
  156313. }
  156314. function assertTSTypeParameterInstantiation(node, opts) {
  156315. assert("TSTypeParameterInstantiation", node, opts);
  156316. }
  156317. function assertTSTypeParameterDeclaration(node, opts) {
  156318. assert("TSTypeParameterDeclaration", node, opts);
  156319. }
  156320. function assertTSTypeParameter(node, opts) {
  156321. assert("TSTypeParameter", node, opts);
  156322. }
  156323. function assertExpression(node, opts) {
  156324. assert("Expression", node, opts);
  156325. }
  156326. function assertBinary(node, opts) {
  156327. assert("Binary", node, opts);
  156328. }
  156329. function assertScopable(node, opts) {
  156330. assert("Scopable", node, opts);
  156331. }
  156332. function assertBlockParent(node, opts) {
  156333. assert("BlockParent", node, opts);
  156334. }
  156335. function assertBlock(node, opts) {
  156336. assert("Block", node, opts);
  156337. }
  156338. function assertStatement(node, opts) {
  156339. assert("Statement", node, opts);
  156340. }
  156341. function assertTerminatorless(node, opts) {
  156342. assert("Terminatorless", node, opts);
  156343. }
  156344. function assertCompletionStatement(node, opts) {
  156345. assert("CompletionStatement", node, opts);
  156346. }
  156347. function assertConditional(node, opts) {
  156348. assert("Conditional", node, opts);
  156349. }
  156350. function assertLoop(node, opts) {
  156351. assert("Loop", node, opts);
  156352. }
  156353. function assertWhile(node, opts) {
  156354. assert("While", node, opts);
  156355. }
  156356. function assertExpressionWrapper(node, opts) {
  156357. assert("ExpressionWrapper", node, opts);
  156358. }
  156359. function assertFor(node, opts) {
  156360. assert("For", node, opts);
  156361. }
  156362. function assertForXStatement(node, opts) {
  156363. assert("ForXStatement", node, opts);
  156364. }
  156365. function assertFunction(node, opts) {
  156366. assert("Function", node, opts);
  156367. }
  156368. function assertFunctionParent(node, opts) {
  156369. assert("FunctionParent", node, opts);
  156370. }
  156371. function assertPureish(node, opts) {
  156372. assert("Pureish", node, opts);
  156373. }
  156374. function assertDeclaration(node, opts) {
  156375. assert("Declaration", node, opts);
  156376. }
  156377. function assertPatternLike(node, opts) {
  156378. assert("PatternLike", node, opts);
  156379. }
  156380. function assertLVal(node, opts) {
  156381. assert("LVal", node, opts);
  156382. }
  156383. function assertTSEntityName(node, opts) {
  156384. assert("TSEntityName", node, opts);
  156385. }
  156386. function assertLiteral(node, opts) {
  156387. assert("Literal", node, opts);
  156388. }
  156389. function assertImmutable(node, opts) {
  156390. assert("Immutable", node, opts);
  156391. }
  156392. function assertUserWhitespacable(node, opts) {
  156393. assert("UserWhitespacable", node, opts);
  156394. }
  156395. function assertMethod(node, opts) {
  156396. assert("Method", node, opts);
  156397. }
  156398. function assertObjectMember(node, opts) {
  156399. assert("ObjectMember", node, opts);
  156400. }
  156401. function assertProperty(node, opts) {
  156402. assert("Property", node, opts);
  156403. }
  156404. function assertUnaryLike(node, opts) {
  156405. assert("UnaryLike", node, opts);
  156406. }
  156407. function assertPattern(node, opts) {
  156408. assert("Pattern", node, opts);
  156409. }
  156410. function assertClass(node, opts) {
  156411. assert("Class", node, opts);
  156412. }
  156413. function assertModuleDeclaration(node, opts) {
  156414. assert("ModuleDeclaration", node, opts);
  156415. }
  156416. function assertExportDeclaration(node, opts) {
  156417. assert("ExportDeclaration", node, opts);
  156418. }
  156419. function assertModuleSpecifier(node, opts) {
  156420. assert("ModuleSpecifier", node, opts);
  156421. }
  156422. function assertFlow(node, opts) {
  156423. assert("Flow", node, opts);
  156424. }
  156425. function assertFlowType(node, opts) {
  156426. assert("FlowType", node, opts);
  156427. }
  156428. function assertFlowBaseAnnotation(node, opts) {
  156429. assert("FlowBaseAnnotation", node, opts);
  156430. }
  156431. function assertFlowDeclaration(node, opts) {
  156432. assert("FlowDeclaration", node, opts);
  156433. }
  156434. function assertFlowPredicate(node, opts) {
  156435. assert("FlowPredicate", node, opts);
  156436. }
  156437. function assertEnumBody(node, opts) {
  156438. assert("EnumBody", node, opts);
  156439. }
  156440. function assertEnumMember(node, opts) {
  156441. assert("EnumMember", node, opts);
  156442. }
  156443. function assertJSX(node, opts) {
  156444. assert("JSX", node, opts);
  156445. }
  156446. function assertPrivate(node, opts) {
  156447. assert("Private", node, opts);
  156448. }
  156449. function assertTSTypeElement(node, opts) {
  156450. assert("TSTypeElement", node, opts);
  156451. }
  156452. function assertTSType(node, opts) {
  156453. assert("TSType", node, opts);
  156454. }
  156455. function assertTSBaseType(node, opts) {
  156456. assert("TSBaseType", node, opts);
  156457. }
  156458. function assertNumberLiteral(node, opts) {
  156459. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  156460. assert("NumberLiteral", node, opts);
  156461. }
  156462. function assertRegexLiteral(node, opts) {
  156463. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  156464. assert("RegexLiteral", node, opts);
  156465. }
  156466. function assertRestProperty(node, opts) {
  156467. console.trace("The node type RestProperty has been renamed to RestElement");
  156468. assert("RestProperty", node, opts);
  156469. }
  156470. function assertSpreadProperty(node, opts) {
  156471. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  156472. assert("SpreadProperty", node, opts);
  156473. }
  156474. }
  156475. });
  156476. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  156477. var require_createTypeAnnotationBasedOnTypeof7 = __commonJS({
  156478. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  156479. "use strict";
  156480. Object.defineProperty(exports, "__esModule", {
  156481. value: true
  156482. });
  156483. exports.default = createTypeAnnotationBasedOnTypeof;
  156484. var _generated = require_generated32();
  156485. function createTypeAnnotationBasedOnTypeof(type) {
  156486. if (type === "string") {
  156487. return (0, _generated.stringTypeAnnotation)();
  156488. } else if (type === "number") {
  156489. return (0, _generated.numberTypeAnnotation)();
  156490. } else if (type === "undefined") {
  156491. return (0, _generated.voidTypeAnnotation)();
  156492. } else if (type === "boolean") {
  156493. return (0, _generated.booleanTypeAnnotation)();
  156494. } else if (type === "function") {
  156495. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  156496. } else if (type === "object") {
  156497. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  156498. } else if (type === "symbol") {
  156499. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  156500. } else if (type === "bigint") {
  156501. return (0, _generated.anyTypeAnnotation)();
  156502. } else {
  156503. throw new Error("Invalid typeof value: " + type);
  156504. }
  156505. }
  156506. }
  156507. });
  156508. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  156509. var require_removeTypeDuplicates13 = __commonJS({
  156510. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  156511. "use strict";
  156512. Object.defineProperty(exports, "__esModule", {
  156513. value: true
  156514. });
  156515. exports.default = removeTypeDuplicates;
  156516. var _generated = require_generated31();
  156517. function getQualifiedName(node) {
  156518. return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
  156519. }
  156520. function removeTypeDuplicates(nodes) {
  156521. const generics = {};
  156522. const bases = {};
  156523. const typeGroups = [];
  156524. const types2 = [];
  156525. for (let i = 0; i < nodes.length; i++) {
  156526. const node = nodes[i];
  156527. if (!node)
  156528. continue;
  156529. if (types2.indexOf(node) >= 0) {
  156530. continue;
  156531. }
  156532. if ((0, _generated.isAnyTypeAnnotation)(node)) {
  156533. return [node];
  156534. }
  156535. if ((0, _generated.isFlowBaseAnnotation)(node)) {
  156536. bases[node.type] = node;
  156537. continue;
  156538. }
  156539. if ((0, _generated.isUnionTypeAnnotation)(node)) {
  156540. if (typeGroups.indexOf(node.types) < 0) {
  156541. nodes = nodes.concat(node.types);
  156542. typeGroups.push(node.types);
  156543. }
  156544. continue;
  156545. }
  156546. if ((0, _generated.isGenericTypeAnnotation)(node)) {
  156547. const name2 = getQualifiedName(node.id);
  156548. if (generics[name2]) {
  156549. let existing = generics[name2];
  156550. if (existing.typeParameters) {
  156551. if (node.typeParameters) {
  156552. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  156553. }
  156554. } else {
  156555. existing = node.typeParameters;
  156556. }
  156557. } else {
  156558. generics[name2] = node;
  156559. }
  156560. continue;
  156561. }
  156562. types2.push(node);
  156563. }
  156564. for (const type of Object.keys(bases)) {
  156565. types2.push(bases[type]);
  156566. }
  156567. for (const name2 of Object.keys(generics)) {
  156568. types2.push(generics[name2]);
  156569. }
  156570. return types2;
  156571. }
  156572. }
  156573. });
  156574. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  156575. var require_createFlowUnionType7 = __commonJS({
  156576. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  156577. "use strict";
  156578. Object.defineProperty(exports, "__esModule", {
  156579. value: true
  156580. });
  156581. exports.default = createFlowUnionType;
  156582. var _generated = require_generated32();
  156583. var _removeTypeDuplicates = require_removeTypeDuplicates13();
  156584. function createFlowUnionType(types2) {
  156585. const flattened = (0, _removeTypeDuplicates.default)(types2);
  156586. if (flattened.length === 1) {
  156587. return flattened[0];
  156588. } else {
  156589. return (0, _generated.unionTypeAnnotation)(flattened);
  156590. }
  156591. }
  156592. }
  156593. });
  156594. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  156595. var require_removeTypeDuplicates14 = __commonJS({
  156596. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  156597. "use strict";
  156598. Object.defineProperty(exports, "__esModule", {
  156599. value: true
  156600. });
  156601. exports.default = removeTypeDuplicates;
  156602. var _generated = require_generated31();
  156603. function removeTypeDuplicates(nodes) {
  156604. const generics = {};
  156605. const bases = {};
  156606. const typeGroups = [];
  156607. const types2 = [];
  156608. for (let i = 0; i < nodes.length; i++) {
  156609. const node = nodes[i];
  156610. if (!node)
  156611. continue;
  156612. if (types2.indexOf(node) >= 0) {
  156613. continue;
  156614. }
  156615. if ((0, _generated.isTSAnyKeyword)(node)) {
  156616. return [node];
  156617. }
  156618. if ((0, _generated.isTSBaseType)(node)) {
  156619. bases[node.type] = node;
  156620. continue;
  156621. }
  156622. if ((0, _generated.isTSUnionType)(node)) {
  156623. if (typeGroups.indexOf(node.types) < 0) {
  156624. nodes = nodes.concat(node.types);
  156625. typeGroups.push(node.types);
  156626. }
  156627. continue;
  156628. }
  156629. types2.push(node);
  156630. }
  156631. for (const type of Object.keys(bases)) {
  156632. types2.push(bases[type]);
  156633. }
  156634. for (const name2 of Object.keys(generics)) {
  156635. types2.push(generics[name2]);
  156636. }
  156637. return types2;
  156638. }
  156639. }
  156640. });
  156641. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  156642. var require_createTSUnionType7 = __commonJS({
  156643. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  156644. "use strict";
  156645. Object.defineProperty(exports, "__esModule", {
  156646. value: true
  156647. });
  156648. exports.default = createTSUnionType;
  156649. var _generated = require_generated32();
  156650. var _removeTypeDuplicates = require_removeTypeDuplicates14();
  156651. function createTSUnionType(typeAnnotations) {
  156652. const types2 = typeAnnotations.map((type) => type.typeAnnotation);
  156653. const flattened = (0, _removeTypeDuplicates.default)(types2);
  156654. if (flattened.length === 1) {
  156655. return flattened[0];
  156656. } else {
  156657. return (0, _generated.tsUnionType)(flattened);
  156658. }
  156659. }
  156660. }
  156661. });
  156662. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/generated/uppercase.js
  156663. var require_uppercase7 = __commonJS({
  156664. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  156665. "use strict";
  156666. Object.defineProperty(exports, "__esModule", {
  156667. value: true
  156668. });
  156669. Object.defineProperty(exports, "ArrayExpression", {
  156670. enumerable: true,
  156671. get: function() {
  156672. return _index.arrayExpression;
  156673. }
  156674. });
  156675. Object.defineProperty(exports, "AssignmentExpression", {
  156676. enumerable: true,
  156677. get: function() {
  156678. return _index.assignmentExpression;
  156679. }
  156680. });
  156681. Object.defineProperty(exports, "BinaryExpression", {
  156682. enumerable: true,
  156683. get: function() {
  156684. return _index.binaryExpression;
  156685. }
  156686. });
  156687. Object.defineProperty(exports, "InterpreterDirective", {
  156688. enumerable: true,
  156689. get: function() {
  156690. return _index.interpreterDirective;
  156691. }
  156692. });
  156693. Object.defineProperty(exports, "Directive", {
  156694. enumerable: true,
  156695. get: function() {
  156696. return _index.directive;
  156697. }
  156698. });
  156699. Object.defineProperty(exports, "DirectiveLiteral", {
  156700. enumerable: true,
  156701. get: function() {
  156702. return _index.directiveLiteral;
  156703. }
  156704. });
  156705. Object.defineProperty(exports, "BlockStatement", {
  156706. enumerable: true,
  156707. get: function() {
  156708. return _index.blockStatement;
  156709. }
  156710. });
  156711. Object.defineProperty(exports, "BreakStatement", {
  156712. enumerable: true,
  156713. get: function() {
  156714. return _index.breakStatement;
  156715. }
  156716. });
  156717. Object.defineProperty(exports, "CallExpression", {
  156718. enumerable: true,
  156719. get: function() {
  156720. return _index.callExpression;
  156721. }
  156722. });
  156723. Object.defineProperty(exports, "CatchClause", {
  156724. enumerable: true,
  156725. get: function() {
  156726. return _index.catchClause;
  156727. }
  156728. });
  156729. Object.defineProperty(exports, "ConditionalExpression", {
  156730. enumerable: true,
  156731. get: function() {
  156732. return _index.conditionalExpression;
  156733. }
  156734. });
  156735. Object.defineProperty(exports, "ContinueStatement", {
  156736. enumerable: true,
  156737. get: function() {
  156738. return _index.continueStatement;
  156739. }
  156740. });
  156741. Object.defineProperty(exports, "DebuggerStatement", {
  156742. enumerable: true,
  156743. get: function() {
  156744. return _index.debuggerStatement;
  156745. }
  156746. });
  156747. Object.defineProperty(exports, "DoWhileStatement", {
  156748. enumerable: true,
  156749. get: function() {
  156750. return _index.doWhileStatement;
  156751. }
  156752. });
  156753. Object.defineProperty(exports, "EmptyStatement", {
  156754. enumerable: true,
  156755. get: function() {
  156756. return _index.emptyStatement;
  156757. }
  156758. });
  156759. Object.defineProperty(exports, "ExpressionStatement", {
  156760. enumerable: true,
  156761. get: function() {
  156762. return _index.expressionStatement;
  156763. }
  156764. });
  156765. Object.defineProperty(exports, "File", {
  156766. enumerable: true,
  156767. get: function() {
  156768. return _index.file;
  156769. }
  156770. });
  156771. Object.defineProperty(exports, "ForInStatement", {
  156772. enumerable: true,
  156773. get: function() {
  156774. return _index.forInStatement;
  156775. }
  156776. });
  156777. Object.defineProperty(exports, "ForStatement", {
  156778. enumerable: true,
  156779. get: function() {
  156780. return _index.forStatement;
  156781. }
  156782. });
  156783. Object.defineProperty(exports, "FunctionDeclaration", {
  156784. enumerable: true,
  156785. get: function() {
  156786. return _index.functionDeclaration;
  156787. }
  156788. });
  156789. Object.defineProperty(exports, "FunctionExpression", {
  156790. enumerable: true,
  156791. get: function() {
  156792. return _index.functionExpression;
  156793. }
  156794. });
  156795. Object.defineProperty(exports, "Identifier", {
  156796. enumerable: true,
  156797. get: function() {
  156798. return _index.identifier;
  156799. }
  156800. });
  156801. Object.defineProperty(exports, "IfStatement", {
  156802. enumerable: true,
  156803. get: function() {
  156804. return _index.ifStatement;
  156805. }
  156806. });
  156807. Object.defineProperty(exports, "LabeledStatement", {
  156808. enumerable: true,
  156809. get: function() {
  156810. return _index.labeledStatement;
  156811. }
  156812. });
  156813. Object.defineProperty(exports, "StringLiteral", {
  156814. enumerable: true,
  156815. get: function() {
  156816. return _index.stringLiteral;
  156817. }
  156818. });
  156819. Object.defineProperty(exports, "NumericLiteral", {
  156820. enumerable: true,
  156821. get: function() {
  156822. return _index.numericLiteral;
  156823. }
  156824. });
  156825. Object.defineProperty(exports, "NullLiteral", {
  156826. enumerable: true,
  156827. get: function() {
  156828. return _index.nullLiteral;
  156829. }
  156830. });
  156831. Object.defineProperty(exports, "BooleanLiteral", {
  156832. enumerable: true,
  156833. get: function() {
  156834. return _index.booleanLiteral;
  156835. }
  156836. });
  156837. Object.defineProperty(exports, "RegExpLiteral", {
  156838. enumerable: true,
  156839. get: function() {
  156840. return _index.regExpLiteral;
  156841. }
  156842. });
  156843. Object.defineProperty(exports, "LogicalExpression", {
  156844. enumerable: true,
  156845. get: function() {
  156846. return _index.logicalExpression;
  156847. }
  156848. });
  156849. Object.defineProperty(exports, "MemberExpression", {
  156850. enumerable: true,
  156851. get: function() {
  156852. return _index.memberExpression;
  156853. }
  156854. });
  156855. Object.defineProperty(exports, "NewExpression", {
  156856. enumerable: true,
  156857. get: function() {
  156858. return _index.newExpression;
  156859. }
  156860. });
  156861. Object.defineProperty(exports, "Program", {
  156862. enumerable: true,
  156863. get: function() {
  156864. return _index.program;
  156865. }
  156866. });
  156867. Object.defineProperty(exports, "ObjectExpression", {
  156868. enumerable: true,
  156869. get: function() {
  156870. return _index.objectExpression;
  156871. }
  156872. });
  156873. Object.defineProperty(exports, "ObjectMethod", {
  156874. enumerable: true,
  156875. get: function() {
  156876. return _index.objectMethod;
  156877. }
  156878. });
  156879. Object.defineProperty(exports, "ObjectProperty", {
  156880. enumerable: true,
  156881. get: function() {
  156882. return _index.objectProperty;
  156883. }
  156884. });
  156885. Object.defineProperty(exports, "RestElement", {
  156886. enumerable: true,
  156887. get: function() {
  156888. return _index.restElement;
  156889. }
  156890. });
  156891. Object.defineProperty(exports, "ReturnStatement", {
  156892. enumerable: true,
  156893. get: function() {
  156894. return _index.returnStatement;
  156895. }
  156896. });
  156897. Object.defineProperty(exports, "SequenceExpression", {
  156898. enumerable: true,
  156899. get: function() {
  156900. return _index.sequenceExpression;
  156901. }
  156902. });
  156903. Object.defineProperty(exports, "ParenthesizedExpression", {
  156904. enumerable: true,
  156905. get: function() {
  156906. return _index.parenthesizedExpression;
  156907. }
  156908. });
  156909. Object.defineProperty(exports, "SwitchCase", {
  156910. enumerable: true,
  156911. get: function() {
  156912. return _index.switchCase;
  156913. }
  156914. });
  156915. Object.defineProperty(exports, "SwitchStatement", {
  156916. enumerable: true,
  156917. get: function() {
  156918. return _index.switchStatement;
  156919. }
  156920. });
  156921. Object.defineProperty(exports, "ThisExpression", {
  156922. enumerable: true,
  156923. get: function() {
  156924. return _index.thisExpression;
  156925. }
  156926. });
  156927. Object.defineProperty(exports, "ThrowStatement", {
  156928. enumerable: true,
  156929. get: function() {
  156930. return _index.throwStatement;
  156931. }
  156932. });
  156933. Object.defineProperty(exports, "TryStatement", {
  156934. enumerable: true,
  156935. get: function() {
  156936. return _index.tryStatement;
  156937. }
  156938. });
  156939. Object.defineProperty(exports, "UnaryExpression", {
  156940. enumerable: true,
  156941. get: function() {
  156942. return _index.unaryExpression;
  156943. }
  156944. });
  156945. Object.defineProperty(exports, "UpdateExpression", {
  156946. enumerable: true,
  156947. get: function() {
  156948. return _index.updateExpression;
  156949. }
  156950. });
  156951. Object.defineProperty(exports, "VariableDeclaration", {
  156952. enumerable: true,
  156953. get: function() {
  156954. return _index.variableDeclaration;
  156955. }
  156956. });
  156957. Object.defineProperty(exports, "VariableDeclarator", {
  156958. enumerable: true,
  156959. get: function() {
  156960. return _index.variableDeclarator;
  156961. }
  156962. });
  156963. Object.defineProperty(exports, "WhileStatement", {
  156964. enumerable: true,
  156965. get: function() {
  156966. return _index.whileStatement;
  156967. }
  156968. });
  156969. Object.defineProperty(exports, "WithStatement", {
  156970. enumerable: true,
  156971. get: function() {
  156972. return _index.withStatement;
  156973. }
  156974. });
  156975. Object.defineProperty(exports, "AssignmentPattern", {
  156976. enumerable: true,
  156977. get: function() {
  156978. return _index.assignmentPattern;
  156979. }
  156980. });
  156981. Object.defineProperty(exports, "ArrayPattern", {
  156982. enumerable: true,
  156983. get: function() {
  156984. return _index.arrayPattern;
  156985. }
  156986. });
  156987. Object.defineProperty(exports, "ArrowFunctionExpression", {
  156988. enumerable: true,
  156989. get: function() {
  156990. return _index.arrowFunctionExpression;
  156991. }
  156992. });
  156993. Object.defineProperty(exports, "ClassBody", {
  156994. enumerable: true,
  156995. get: function() {
  156996. return _index.classBody;
  156997. }
  156998. });
  156999. Object.defineProperty(exports, "ClassExpression", {
  157000. enumerable: true,
  157001. get: function() {
  157002. return _index.classExpression;
  157003. }
  157004. });
  157005. Object.defineProperty(exports, "ClassDeclaration", {
  157006. enumerable: true,
  157007. get: function() {
  157008. return _index.classDeclaration;
  157009. }
  157010. });
  157011. Object.defineProperty(exports, "ExportAllDeclaration", {
  157012. enumerable: true,
  157013. get: function() {
  157014. return _index.exportAllDeclaration;
  157015. }
  157016. });
  157017. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  157018. enumerable: true,
  157019. get: function() {
  157020. return _index.exportDefaultDeclaration;
  157021. }
  157022. });
  157023. Object.defineProperty(exports, "ExportNamedDeclaration", {
  157024. enumerable: true,
  157025. get: function() {
  157026. return _index.exportNamedDeclaration;
  157027. }
  157028. });
  157029. Object.defineProperty(exports, "ExportSpecifier", {
  157030. enumerable: true,
  157031. get: function() {
  157032. return _index.exportSpecifier;
  157033. }
  157034. });
  157035. Object.defineProperty(exports, "ForOfStatement", {
  157036. enumerable: true,
  157037. get: function() {
  157038. return _index.forOfStatement;
  157039. }
  157040. });
  157041. Object.defineProperty(exports, "ImportDeclaration", {
  157042. enumerable: true,
  157043. get: function() {
  157044. return _index.importDeclaration;
  157045. }
  157046. });
  157047. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  157048. enumerable: true,
  157049. get: function() {
  157050. return _index.importDefaultSpecifier;
  157051. }
  157052. });
  157053. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  157054. enumerable: true,
  157055. get: function() {
  157056. return _index.importNamespaceSpecifier;
  157057. }
  157058. });
  157059. Object.defineProperty(exports, "ImportSpecifier", {
  157060. enumerable: true,
  157061. get: function() {
  157062. return _index.importSpecifier;
  157063. }
  157064. });
  157065. Object.defineProperty(exports, "MetaProperty", {
  157066. enumerable: true,
  157067. get: function() {
  157068. return _index.metaProperty;
  157069. }
  157070. });
  157071. Object.defineProperty(exports, "ClassMethod", {
  157072. enumerable: true,
  157073. get: function() {
  157074. return _index.classMethod;
  157075. }
  157076. });
  157077. Object.defineProperty(exports, "ObjectPattern", {
  157078. enumerable: true,
  157079. get: function() {
  157080. return _index.objectPattern;
  157081. }
  157082. });
  157083. Object.defineProperty(exports, "SpreadElement", {
  157084. enumerable: true,
  157085. get: function() {
  157086. return _index.spreadElement;
  157087. }
  157088. });
  157089. Object.defineProperty(exports, "Super", {
  157090. enumerable: true,
  157091. get: function() {
  157092. return _index.super;
  157093. }
  157094. });
  157095. Object.defineProperty(exports, "TaggedTemplateExpression", {
  157096. enumerable: true,
  157097. get: function() {
  157098. return _index.taggedTemplateExpression;
  157099. }
  157100. });
  157101. Object.defineProperty(exports, "TemplateElement", {
  157102. enumerable: true,
  157103. get: function() {
  157104. return _index.templateElement;
  157105. }
  157106. });
  157107. Object.defineProperty(exports, "TemplateLiteral", {
  157108. enumerable: true,
  157109. get: function() {
  157110. return _index.templateLiteral;
  157111. }
  157112. });
  157113. Object.defineProperty(exports, "YieldExpression", {
  157114. enumerable: true,
  157115. get: function() {
  157116. return _index.yieldExpression;
  157117. }
  157118. });
  157119. Object.defineProperty(exports, "AwaitExpression", {
  157120. enumerable: true,
  157121. get: function() {
  157122. return _index.awaitExpression;
  157123. }
  157124. });
  157125. Object.defineProperty(exports, "Import", {
  157126. enumerable: true,
  157127. get: function() {
  157128. return _index.import;
  157129. }
  157130. });
  157131. Object.defineProperty(exports, "BigIntLiteral", {
  157132. enumerable: true,
  157133. get: function() {
  157134. return _index.bigIntLiteral;
  157135. }
  157136. });
  157137. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  157138. enumerable: true,
  157139. get: function() {
  157140. return _index.exportNamespaceSpecifier;
  157141. }
  157142. });
  157143. Object.defineProperty(exports, "OptionalMemberExpression", {
  157144. enumerable: true,
  157145. get: function() {
  157146. return _index.optionalMemberExpression;
  157147. }
  157148. });
  157149. Object.defineProperty(exports, "OptionalCallExpression", {
  157150. enumerable: true,
  157151. get: function() {
  157152. return _index.optionalCallExpression;
  157153. }
  157154. });
  157155. Object.defineProperty(exports, "AnyTypeAnnotation", {
  157156. enumerable: true,
  157157. get: function() {
  157158. return _index.anyTypeAnnotation;
  157159. }
  157160. });
  157161. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  157162. enumerable: true,
  157163. get: function() {
  157164. return _index.arrayTypeAnnotation;
  157165. }
  157166. });
  157167. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  157168. enumerable: true,
  157169. get: function() {
  157170. return _index.booleanTypeAnnotation;
  157171. }
  157172. });
  157173. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  157174. enumerable: true,
  157175. get: function() {
  157176. return _index.booleanLiteralTypeAnnotation;
  157177. }
  157178. });
  157179. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  157180. enumerable: true,
  157181. get: function() {
  157182. return _index.nullLiteralTypeAnnotation;
  157183. }
  157184. });
  157185. Object.defineProperty(exports, "ClassImplements", {
  157186. enumerable: true,
  157187. get: function() {
  157188. return _index.classImplements;
  157189. }
  157190. });
  157191. Object.defineProperty(exports, "DeclareClass", {
  157192. enumerable: true,
  157193. get: function() {
  157194. return _index.declareClass;
  157195. }
  157196. });
  157197. Object.defineProperty(exports, "DeclareFunction", {
  157198. enumerable: true,
  157199. get: function() {
  157200. return _index.declareFunction;
  157201. }
  157202. });
  157203. Object.defineProperty(exports, "DeclareInterface", {
  157204. enumerable: true,
  157205. get: function() {
  157206. return _index.declareInterface;
  157207. }
  157208. });
  157209. Object.defineProperty(exports, "DeclareModule", {
  157210. enumerable: true,
  157211. get: function() {
  157212. return _index.declareModule;
  157213. }
  157214. });
  157215. Object.defineProperty(exports, "DeclareModuleExports", {
  157216. enumerable: true,
  157217. get: function() {
  157218. return _index.declareModuleExports;
  157219. }
  157220. });
  157221. Object.defineProperty(exports, "DeclareTypeAlias", {
  157222. enumerable: true,
  157223. get: function() {
  157224. return _index.declareTypeAlias;
  157225. }
  157226. });
  157227. Object.defineProperty(exports, "DeclareOpaqueType", {
  157228. enumerable: true,
  157229. get: function() {
  157230. return _index.declareOpaqueType;
  157231. }
  157232. });
  157233. Object.defineProperty(exports, "DeclareVariable", {
  157234. enumerable: true,
  157235. get: function() {
  157236. return _index.declareVariable;
  157237. }
  157238. });
  157239. Object.defineProperty(exports, "DeclareExportDeclaration", {
  157240. enumerable: true,
  157241. get: function() {
  157242. return _index.declareExportDeclaration;
  157243. }
  157244. });
  157245. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  157246. enumerable: true,
  157247. get: function() {
  157248. return _index.declareExportAllDeclaration;
  157249. }
  157250. });
  157251. Object.defineProperty(exports, "DeclaredPredicate", {
  157252. enumerable: true,
  157253. get: function() {
  157254. return _index.declaredPredicate;
  157255. }
  157256. });
  157257. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  157258. enumerable: true,
  157259. get: function() {
  157260. return _index.existsTypeAnnotation;
  157261. }
  157262. });
  157263. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  157264. enumerable: true,
  157265. get: function() {
  157266. return _index.functionTypeAnnotation;
  157267. }
  157268. });
  157269. Object.defineProperty(exports, "FunctionTypeParam", {
  157270. enumerable: true,
  157271. get: function() {
  157272. return _index.functionTypeParam;
  157273. }
  157274. });
  157275. Object.defineProperty(exports, "GenericTypeAnnotation", {
  157276. enumerable: true,
  157277. get: function() {
  157278. return _index.genericTypeAnnotation;
  157279. }
  157280. });
  157281. Object.defineProperty(exports, "InferredPredicate", {
  157282. enumerable: true,
  157283. get: function() {
  157284. return _index.inferredPredicate;
  157285. }
  157286. });
  157287. Object.defineProperty(exports, "InterfaceExtends", {
  157288. enumerable: true,
  157289. get: function() {
  157290. return _index.interfaceExtends;
  157291. }
  157292. });
  157293. Object.defineProperty(exports, "InterfaceDeclaration", {
  157294. enumerable: true,
  157295. get: function() {
  157296. return _index.interfaceDeclaration;
  157297. }
  157298. });
  157299. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  157300. enumerable: true,
  157301. get: function() {
  157302. return _index.interfaceTypeAnnotation;
  157303. }
  157304. });
  157305. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  157306. enumerable: true,
  157307. get: function() {
  157308. return _index.intersectionTypeAnnotation;
  157309. }
  157310. });
  157311. Object.defineProperty(exports, "MixedTypeAnnotation", {
  157312. enumerable: true,
  157313. get: function() {
  157314. return _index.mixedTypeAnnotation;
  157315. }
  157316. });
  157317. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  157318. enumerable: true,
  157319. get: function() {
  157320. return _index.emptyTypeAnnotation;
  157321. }
  157322. });
  157323. Object.defineProperty(exports, "NullableTypeAnnotation", {
  157324. enumerable: true,
  157325. get: function() {
  157326. return _index.nullableTypeAnnotation;
  157327. }
  157328. });
  157329. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  157330. enumerable: true,
  157331. get: function() {
  157332. return _index.numberLiteralTypeAnnotation;
  157333. }
  157334. });
  157335. Object.defineProperty(exports, "NumberTypeAnnotation", {
  157336. enumerable: true,
  157337. get: function() {
  157338. return _index.numberTypeAnnotation;
  157339. }
  157340. });
  157341. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  157342. enumerable: true,
  157343. get: function() {
  157344. return _index.objectTypeAnnotation;
  157345. }
  157346. });
  157347. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  157348. enumerable: true,
  157349. get: function() {
  157350. return _index.objectTypeInternalSlot;
  157351. }
  157352. });
  157353. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  157354. enumerable: true,
  157355. get: function() {
  157356. return _index.objectTypeCallProperty;
  157357. }
  157358. });
  157359. Object.defineProperty(exports, "ObjectTypeIndexer", {
  157360. enumerable: true,
  157361. get: function() {
  157362. return _index.objectTypeIndexer;
  157363. }
  157364. });
  157365. Object.defineProperty(exports, "ObjectTypeProperty", {
  157366. enumerable: true,
  157367. get: function() {
  157368. return _index.objectTypeProperty;
  157369. }
  157370. });
  157371. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  157372. enumerable: true,
  157373. get: function() {
  157374. return _index.objectTypeSpreadProperty;
  157375. }
  157376. });
  157377. Object.defineProperty(exports, "OpaqueType", {
  157378. enumerable: true,
  157379. get: function() {
  157380. return _index.opaqueType;
  157381. }
  157382. });
  157383. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  157384. enumerable: true,
  157385. get: function() {
  157386. return _index.qualifiedTypeIdentifier;
  157387. }
  157388. });
  157389. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  157390. enumerable: true,
  157391. get: function() {
  157392. return _index.stringLiteralTypeAnnotation;
  157393. }
  157394. });
  157395. Object.defineProperty(exports, "StringTypeAnnotation", {
  157396. enumerable: true,
  157397. get: function() {
  157398. return _index.stringTypeAnnotation;
  157399. }
  157400. });
  157401. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  157402. enumerable: true,
  157403. get: function() {
  157404. return _index.symbolTypeAnnotation;
  157405. }
  157406. });
  157407. Object.defineProperty(exports, "ThisTypeAnnotation", {
  157408. enumerable: true,
  157409. get: function() {
  157410. return _index.thisTypeAnnotation;
  157411. }
  157412. });
  157413. Object.defineProperty(exports, "TupleTypeAnnotation", {
  157414. enumerable: true,
  157415. get: function() {
  157416. return _index.tupleTypeAnnotation;
  157417. }
  157418. });
  157419. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  157420. enumerable: true,
  157421. get: function() {
  157422. return _index.typeofTypeAnnotation;
  157423. }
  157424. });
  157425. Object.defineProperty(exports, "TypeAlias", {
  157426. enumerable: true,
  157427. get: function() {
  157428. return _index.typeAlias;
  157429. }
  157430. });
  157431. Object.defineProperty(exports, "TypeAnnotation", {
  157432. enumerable: true,
  157433. get: function() {
  157434. return _index.typeAnnotation;
  157435. }
  157436. });
  157437. Object.defineProperty(exports, "TypeCastExpression", {
  157438. enumerable: true,
  157439. get: function() {
  157440. return _index.typeCastExpression;
  157441. }
  157442. });
  157443. Object.defineProperty(exports, "TypeParameter", {
  157444. enumerable: true,
  157445. get: function() {
  157446. return _index.typeParameter;
  157447. }
  157448. });
  157449. Object.defineProperty(exports, "TypeParameterDeclaration", {
  157450. enumerable: true,
  157451. get: function() {
  157452. return _index.typeParameterDeclaration;
  157453. }
  157454. });
  157455. Object.defineProperty(exports, "TypeParameterInstantiation", {
  157456. enumerable: true,
  157457. get: function() {
  157458. return _index.typeParameterInstantiation;
  157459. }
  157460. });
  157461. Object.defineProperty(exports, "UnionTypeAnnotation", {
  157462. enumerable: true,
  157463. get: function() {
  157464. return _index.unionTypeAnnotation;
  157465. }
  157466. });
  157467. Object.defineProperty(exports, "Variance", {
  157468. enumerable: true,
  157469. get: function() {
  157470. return _index.variance;
  157471. }
  157472. });
  157473. Object.defineProperty(exports, "VoidTypeAnnotation", {
  157474. enumerable: true,
  157475. get: function() {
  157476. return _index.voidTypeAnnotation;
  157477. }
  157478. });
  157479. Object.defineProperty(exports, "EnumDeclaration", {
  157480. enumerable: true,
  157481. get: function() {
  157482. return _index.enumDeclaration;
  157483. }
  157484. });
  157485. Object.defineProperty(exports, "EnumBooleanBody", {
  157486. enumerable: true,
  157487. get: function() {
  157488. return _index.enumBooleanBody;
  157489. }
  157490. });
  157491. Object.defineProperty(exports, "EnumNumberBody", {
  157492. enumerable: true,
  157493. get: function() {
  157494. return _index.enumNumberBody;
  157495. }
  157496. });
  157497. Object.defineProperty(exports, "EnumStringBody", {
  157498. enumerable: true,
  157499. get: function() {
  157500. return _index.enumStringBody;
  157501. }
  157502. });
  157503. Object.defineProperty(exports, "EnumSymbolBody", {
  157504. enumerable: true,
  157505. get: function() {
  157506. return _index.enumSymbolBody;
  157507. }
  157508. });
  157509. Object.defineProperty(exports, "EnumBooleanMember", {
  157510. enumerable: true,
  157511. get: function() {
  157512. return _index.enumBooleanMember;
  157513. }
  157514. });
  157515. Object.defineProperty(exports, "EnumNumberMember", {
  157516. enumerable: true,
  157517. get: function() {
  157518. return _index.enumNumberMember;
  157519. }
  157520. });
  157521. Object.defineProperty(exports, "EnumStringMember", {
  157522. enumerable: true,
  157523. get: function() {
  157524. return _index.enumStringMember;
  157525. }
  157526. });
  157527. Object.defineProperty(exports, "EnumDefaultedMember", {
  157528. enumerable: true,
  157529. get: function() {
  157530. return _index.enumDefaultedMember;
  157531. }
  157532. });
  157533. Object.defineProperty(exports, "IndexedAccessType", {
  157534. enumerable: true,
  157535. get: function() {
  157536. return _index.indexedAccessType;
  157537. }
  157538. });
  157539. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  157540. enumerable: true,
  157541. get: function() {
  157542. return _index.optionalIndexedAccessType;
  157543. }
  157544. });
  157545. Object.defineProperty(exports, "JSXAttribute", {
  157546. enumerable: true,
  157547. get: function() {
  157548. return _index.jsxAttribute;
  157549. }
  157550. });
  157551. Object.defineProperty(exports, "JSXClosingElement", {
  157552. enumerable: true,
  157553. get: function() {
  157554. return _index.jsxClosingElement;
  157555. }
  157556. });
  157557. Object.defineProperty(exports, "JSXElement", {
  157558. enumerable: true,
  157559. get: function() {
  157560. return _index.jsxElement;
  157561. }
  157562. });
  157563. Object.defineProperty(exports, "JSXEmptyExpression", {
  157564. enumerable: true,
  157565. get: function() {
  157566. return _index.jsxEmptyExpression;
  157567. }
  157568. });
  157569. Object.defineProperty(exports, "JSXExpressionContainer", {
  157570. enumerable: true,
  157571. get: function() {
  157572. return _index.jsxExpressionContainer;
  157573. }
  157574. });
  157575. Object.defineProperty(exports, "JSXSpreadChild", {
  157576. enumerable: true,
  157577. get: function() {
  157578. return _index.jsxSpreadChild;
  157579. }
  157580. });
  157581. Object.defineProperty(exports, "JSXIdentifier", {
  157582. enumerable: true,
  157583. get: function() {
  157584. return _index.jsxIdentifier;
  157585. }
  157586. });
  157587. Object.defineProperty(exports, "JSXMemberExpression", {
  157588. enumerable: true,
  157589. get: function() {
  157590. return _index.jsxMemberExpression;
  157591. }
  157592. });
  157593. Object.defineProperty(exports, "JSXNamespacedName", {
  157594. enumerable: true,
  157595. get: function() {
  157596. return _index.jsxNamespacedName;
  157597. }
  157598. });
  157599. Object.defineProperty(exports, "JSXOpeningElement", {
  157600. enumerable: true,
  157601. get: function() {
  157602. return _index.jsxOpeningElement;
  157603. }
  157604. });
  157605. Object.defineProperty(exports, "JSXSpreadAttribute", {
  157606. enumerable: true,
  157607. get: function() {
  157608. return _index.jsxSpreadAttribute;
  157609. }
  157610. });
  157611. Object.defineProperty(exports, "JSXText", {
  157612. enumerable: true,
  157613. get: function() {
  157614. return _index.jsxText;
  157615. }
  157616. });
  157617. Object.defineProperty(exports, "JSXFragment", {
  157618. enumerable: true,
  157619. get: function() {
  157620. return _index.jsxFragment;
  157621. }
  157622. });
  157623. Object.defineProperty(exports, "JSXOpeningFragment", {
  157624. enumerable: true,
  157625. get: function() {
  157626. return _index.jsxOpeningFragment;
  157627. }
  157628. });
  157629. Object.defineProperty(exports, "JSXClosingFragment", {
  157630. enumerable: true,
  157631. get: function() {
  157632. return _index.jsxClosingFragment;
  157633. }
  157634. });
  157635. Object.defineProperty(exports, "Noop", {
  157636. enumerable: true,
  157637. get: function() {
  157638. return _index.noop;
  157639. }
  157640. });
  157641. Object.defineProperty(exports, "Placeholder", {
  157642. enumerable: true,
  157643. get: function() {
  157644. return _index.placeholder;
  157645. }
  157646. });
  157647. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  157648. enumerable: true,
  157649. get: function() {
  157650. return _index.v8IntrinsicIdentifier;
  157651. }
  157652. });
  157653. Object.defineProperty(exports, "ArgumentPlaceholder", {
  157654. enumerable: true,
  157655. get: function() {
  157656. return _index.argumentPlaceholder;
  157657. }
  157658. });
  157659. Object.defineProperty(exports, "BindExpression", {
  157660. enumerable: true,
  157661. get: function() {
  157662. return _index.bindExpression;
  157663. }
  157664. });
  157665. Object.defineProperty(exports, "ClassProperty", {
  157666. enumerable: true,
  157667. get: function() {
  157668. return _index.classProperty;
  157669. }
  157670. });
  157671. Object.defineProperty(exports, "PipelineTopicExpression", {
  157672. enumerable: true,
  157673. get: function() {
  157674. return _index.pipelineTopicExpression;
  157675. }
  157676. });
  157677. Object.defineProperty(exports, "PipelineBareFunction", {
  157678. enumerable: true,
  157679. get: function() {
  157680. return _index.pipelineBareFunction;
  157681. }
  157682. });
  157683. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  157684. enumerable: true,
  157685. get: function() {
  157686. return _index.pipelinePrimaryTopicReference;
  157687. }
  157688. });
  157689. Object.defineProperty(exports, "ClassPrivateProperty", {
  157690. enumerable: true,
  157691. get: function() {
  157692. return _index.classPrivateProperty;
  157693. }
  157694. });
  157695. Object.defineProperty(exports, "ClassPrivateMethod", {
  157696. enumerable: true,
  157697. get: function() {
  157698. return _index.classPrivateMethod;
  157699. }
  157700. });
  157701. Object.defineProperty(exports, "ImportAttribute", {
  157702. enumerable: true,
  157703. get: function() {
  157704. return _index.importAttribute;
  157705. }
  157706. });
  157707. Object.defineProperty(exports, "Decorator", {
  157708. enumerable: true,
  157709. get: function() {
  157710. return _index.decorator;
  157711. }
  157712. });
  157713. Object.defineProperty(exports, "DoExpression", {
  157714. enumerable: true,
  157715. get: function() {
  157716. return _index.doExpression;
  157717. }
  157718. });
  157719. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  157720. enumerable: true,
  157721. get: function() {
  157722. return _index.exportDefaultSpecifier;
  157723. }
  157724. });
  157725. Object.defineProperty(exports, "PrivateName", {
  157726. enumerable: true,
  157727. get: function() {
  157728. return _index.privateName;
  157729. }
  157730. });
  157731. Object.defineProperty(exports, "RecordExpression", {
  157732. enumerable: true,
  157733. get: function() {
  157734. return _index.recordExpression;
  157735. }
  157736. });
  157737. Object.defineProperty(exports, "TupleExpression", {
  157738. enumerable: true,
  157739. get: function() {
  157740. return _index.tupleExpression;
  157741. }
  157742. });
  157743. Object.defineProperty(exports, "DecimalLiteral", {
  157744. enumerable: true,
  157745. get: function() {
  157746. return _index.decimalLiteral;
  157747. }
  157748. });
  157749. Object.defineProperty(exports, "StaticBlock", {
  157750. enumerable: true,
  157751. get: function() {
  157752. return _index.staticBlock;
  157753. }
  157754. });
  157755. Object.defineProperty(exports, "ModuleExpression", {
  157756. enumerable: true,
  157757. get: function() {
  157758. return _index.moduleExpression;
  157759. }
  157760. });
  157761. Object.defineProperty(exports, "TSParameterProperty", {
  157762. enumerable: true,
  157763. get: function() {
  157764. return _index.tsParameterProperty;
  157765. }
  157766. });
  157767. Object.defineProperty(exports, "TSDeclareFunction", {
  157768. enumerable: true,
  157769. get: function() {
  157770. return _index.tsDeclareFunction;
  157771. }
  157772. });
  157773. Object.defineProperty(exports, "TSDeclareMethod", {
  157774. enumerable: true,
  157775. get: function() {
  157776. return _index.tsDeclareMethod;
  157777. }
  157778. });
  157779. Object.defineProperty(exports, "TSQualifiedName", {
  157780. enumerable: true,
  157781. get: function() {
  157782. return _index.tsQualifiedName;
  157783. }
  157784. });
  157785. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  157786. enumerable: true,
  157787. get: function() {
  157788. return _index.tsCallSignatureDeclaration;
  157789. }
  157790. });
  157791. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  157792. enumerable: true,
  157793. get: function() {
  157794. return _index.tsConstructSignatureDeclaration;
  157795. }
  157796. });
  157797. Object.defineProperty(exports, "TSPropertySignature", {
  157798. enumerable: true,
  157799. get: function() {
  157800. return _index.tsPropertySignature;
  157801. }
  157802. });
  157803. Object.defineProperty(exports, "TSMethodSignature", {
  157804. enumerable: true,
  157805. get: function() {
  157806. return _index.tsMethodSignature;
  157807. }
  157808. });
  157809. Object.defineProperty(exports, "TSIndexSignature", {
  157810. enumerable: true,
  157811. get: function() {
  157812. return _index.tsIndexSignature;
  157813. }
  157814. });
  157815. Object.defineProperty(exports, "TSAnyKeyword", {
  157816. enumerable: true,
  157817. get: function() {
  157818. return _index.tsAnyKeyword;
  157819. }
  157820. });
  157821. Object.defineProperty(exports, "TSBooleanKeyword", {
  157822. enumerable: true,
  157823. get: function() {
  157824. return _index.tsBooleanKeyword;
  157825. }
  157826. });
  157827. Object.defineProperty(exports, "TSBigIntKeyword", {
  157828. enumerable: true,
  157829. get: function() {
  157830. return _index.tsBigIntKeyword;
  157831. }
  157832. });
  157833. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  157834. enumerable: true,
  157835. get: function() {
  157836. return _index.tsIntrinsicKeyword;
  157837. }
  157838. });
  157839. Object.defineProperty(exports, "TSNeverKeyword", {
  157840. enumerable: true,
  157841. get: function() {
  157842. return _index.tsNeverKeyword;
  157843. }
  157844. });
  157845. Object.defineProperty(exports, "TSNullKeyword", {
  157846. enumerable: true,
  157847. get: function() {
  157848. return _index.tsNullKeyword;
  157849. }
  157850. });
  157851. Object.defineProperty(exports, "TSNumberKeyword", {
  157852. enumerable: true,
  157853. get: function() {
  157854. return _index.tsNumberKeyword;
  157855. }
  157856. });
  157857. Object.defineProperty(exports, "TSObjectKeyword", {
  157858. enumerable: true,
  157859. get: function() {
  157860. return _index.tsObjectKeyword;
  157861. }
  157862. });
  157863. Object.defineProperty(exports, "TSStringKeyword", {
  157864. enumerable: true,
  157865. get: function() {
  157866. return _index.tsStringKeyword;
  157867. }
  157868. });
  157869. Object.defineProperty(exports, "TSSymbolKeyword", {
  157870. enumerable: true,
  157871. get: function() {
  157872. return _index.tsSymbolKeyword;
  157873. }
  157874. });
  157875. Object.defineProperty(exports, "TSUndefinedKeyword", {
  157876. enumerable: true,
  157877. get: function() {
  157878. return _index.tsUndefinedKeyword;
  157879. }
  157880. });
  157881. Object.defineProperty(exports, "TSUnknownKeyword", {
  157882. enumerable: true,
  157883. get: function() {
  157884. return _index.tsUnknownKeyword;
  157885. }
  157886. });
  157887. Object.defineProperty(exports, "TSVoidKeyword", {
  157888. enumerable: true,
  157889. get: function() {
  157890. return _index.tsVoidKeyword;
  157891. }
  157892. });
  157893. Object.defineProperty(exports, "TSThisType", {
  157894. enumerable: true,
  157895. get: function() {
  157896. return _index.tsThisType;
  157897. }
  157898. });
  157899. Object.defineProperty(exports, "TSFunctionType", {
  157900. enumerable: true,
  157901. get: function() {
  157902. return _index.tsFunctionType;
  157903. }
  157904. });
  157905. Object.defineProperty(exports, "TSConstructorType", {
  157906. enumerable: true,
  157907. get: function() {
  157908. return _index.tsConstructorType;
  157909. }
  157910. });
  157911. Object.defineProperty(exports, "TSTypeReference", {
  157912. enumerable: true,
  157913. get: function() {
  157914. return _index.tsTypeReference;
  157915. }
  157916. });
  157917. Object.defineProperty(exports, "TSTypePredicate", {
  157918. enumerable: true,
  157919. get: function() {
  157920. return _index.tsTypePredicate;
  157921. }
  157922. });
  157923. Object.defineProperty(exports, "TSTypeQuery", {
  157924. enumerable: true,
  157925. get: function() {
  157926. return _index.tsTypeQuery;
  157927. }
  157928. });
  157929. Object.defineProperty(exports, "TSTypeLiteral", {
  157930. enumerable: true,
  157931. get: function() {
  157932. return _index.tsTypeLiteral;
  157933. }
  157934. });
  157935. Object.defineProperty(exports, "TSArrayType", {
  157936. enumerable: true,
  157937. get: function() {
  157938. return _index.tsArrayType;
  157939. }
  157940. });
  157941. Object.defineProperty(exports, "TSTupleType", {
  157942. enumerable: true,
  157943. get: function() {
  157944. return _index.tsTupleType;
  157945. }
  157946. });
  157947. Object.defineProperty(exports, "TSOptionalType", {
  157948. enumerable: true,
  157949. get: function() {
  157950. return _index.tsOptionalType;
  157951. }
  157952. });
  157953. Object.defineProperty(exports, "TSRestType", {
  157954. enumerable: true,
  157955. get: function() {
  157956. return _index.tsRestType;
  157957. }
  157958. });
  157959. Object.defineProperty(exports, "TSNamedTupleMember", {
  157960. enumerable: true,
  157961. get: function() {
  157962. return _index.tsNamedTupleMember;
  157963. }
  157964. });
  157965. Object.defineProperty(exports, "TSUnionType", {
  157966. enumerable: true,
  157967. get: function() {
  157968. return _index.tsUnionType;
  157969. }
  157970. });
  157971. Object.defineProperty(exports, "TSIntersectionType", {
  157972. enumerable: true,
  157973. get: function() {
  157974. return _index.tsIntersectionType;
  157975. }
  157976. });
  157977. Object.defineProperty(exports, "TSConditionalType", {
  157978. enumerable: true,
  157979. get: function() {
  157980. return _index.tsConditionalType;
  157981. }
  157982. });
  157983. Object.defineProperty(exports, "TSInferType", {
  157984. enumerable: true,
  157985. get: function() {
  157986. return _index.tsInferType;
  157987. }
  157988. });
  157989. Object.defineProperty(exports, "TSParenthesizedType", {
  157990. enumerable: true,
  157991. get: function() {
  157992. return _index.tsParenthesizedType;
  157993. }
  157994. });
  157995. Object.defineProperty(exports, "TSTypeOperator", {
  157996. enumerable: true,
  157997. get: function() {
  157998. return _index.tsTypeOperator;
  157999. }
  158000. });
  158001. Object.defineProperty(exports, "TSIndexedAccessType", {
  158002. enumerable: true,
  158003. get: function() {
  158004. return _index.tsIndexedAccessType;
  158005. }
  158006. });
  158007. Object.defineProperty(exports, "TSMappedType", {
  158008. enumerable: true,
  158009. get: function() {
  158010. return _index.tsMappedType;
  158011. }
  158012. });
  158013. Object.defineProperty(exports, "TSLiteralType", {
  158014. enumerable: true,
  158015. get: function() {
  158016. return _index.tsLiteralType;
  158017. }
  158018. });
  158019. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  158020. enumerable: true,
  158021. get: function() {
  158022. return _index.tsExpressionWithTypeArguments;
  158023. }
  158024. });
  158025. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  158026. enumerable: true,
  158027. get: function() {
  158028. return _index.tsInterfaceDeclaration;
  158029. }
  158030. });
  158031. Object.defineProperty(exports, "TSInterfaceBody", {
  158032. enumerable: true,
  158033. get: function() {
  158034. return _index.tsInterfaceBody;
  158035. }
  158036. });
  158037. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  158038. enumerable: true,
  158039. get: function() {
  158040. return _index.tsTypeAliasDeclaration;
  158041. }
  158042. });
  158043. Object.defineProperty(exports, "TSAsExpression", {
  158044. enumerable: true,
  158045. get: function() {
  158046. return _index.tsAsExpression;
  158047. }
  158048. });
  158049. Object.defineProperty(exports, "TSTypeAssertion", {
  158050. enumerable: true,
  158051. get: function() {
  158052. return _index.tsTypeAssertion;
  158053. }
  158054. });
  158055. Object.defineProperty(exports, "TSEnumDeclaration", {
  158056. enumerable: true,
  158057. get: function() {
  158058. return _index.tsEnumDeclaration;
  158059. }
  158060. });
  158061. Object.defineProperty(exports, "TSEnumMember", {
  158062. enumerable: true,
  158063. get: function() {
  158064. return _index.tsEnumMember;
  158065. }
  158066. });
  158067. Object.defineProperty(exports, "TSModuleDeclaration", {
  158068. enumerable: true,
  158069. get: function() {
  158070. return _index.tsModuleDeclaration;
  158071. }
  158072. });
  158073. Object.defineProperty(exports, "TSModuleBlock", {
  158074. enumerable: true,
  158075. get: function() {
  158076. return _index.tsModuleBlock;
  158077. }
  158078. });
  158079. Object.defineProperty(exports, "TSImportType", {
  158080. enumerable: true,
  158081. get: function() {
  158082. return _index.tsImportType;
  158083. }
  158084. });
  158085. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  158086. enumerable: true,
  158087. get: function() {
  158088. return _index.tsImportEqualsDeclaration;
  158089. }
  158090. });
  158091. Object.defineProperty(exports, "TSExternalModuleReference", {
  158092. enumerable: true,
  158093. get: function() {
  158094. return _index.tsExternalModuleReference;
  158095. }
  158096. });
  158097. Object.defineProperty(exports, "TSNonNullExpression", {
  158098. enumerable: true,
  158099. get: function() {
  158100. return _index.tsNonNullExpression;
  158101. }
  158102. });
  158103. Object.defineProperty(exports, "TSExportAssignment", {
  158104. enumerable: true,
  158105. get: function() {
  158106. return _index.tsExportAssignment;
  158107. }
  158108. });
  158109. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  158110. enumerable: true,
  158111. get: function() {
  158112. return _index.tsNamespaceExportDeclaration;
  158113. }
  158114. });
  158115. Object.defineProperty(exports, "TSTypeAnnotation", {
  158116. enumerable: true,
  158117. get: function() {
  158118. return _index.tsTypeAnnotation;
  158119. }
  158120. });
  158121. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  158122. enumerable: true,
  158123. get: function() {
  158124. return _index.tsTypeParameterInstantiation;
  158125. }
  158126. });
  158127. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  158128. enumerable: true,
  158129. get: function() {
  158130. return _index.tsTypeParameterDeclaration;
  158131. }
  158132. });
  158133. Object.defineProperty(exports, "TSTypeParameter", {
  158134. enumerable: true,
  158135. get: function() {
  158136. return _index.tsTypeParameter;
  158137. }
  158138. });
  158139. Object.defineProperty(exports, "NumberLiteral", {
  158140. enumerable: true,
  158141. get: function() {
  158142. return _index.numberLiteral;
  158143. }
  158144. });
  158145. Object.defineProperty(exports, "RegexLiteral", {
  158146. enumerable: true,
  158147. get: function() {
  158148. return _index.regexLiteral;
  158149. }
  158150. });
  158151. Object.defineProperty(exports, "RestProperty", {
  158152. enumerable: true,
  158153. get: function() {
  158154. return _index.restProperty;
  158155. }
  158156. });
  158157. Object.defineProperty(exports, "SpreadProperty", {
  158158. enumerable: true,
  158159. get: function() {
  158160. return _index.spreadProperty;
  158161. }
  158162. });
  158163. var _index = require_generated32();
  158164. }
  158165. });
  158166. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneNode.js
  158167. var require_cloneNode7 = __commonJS({
  158168. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  158169. "use strict";
  158170. Object.defineProperty(exports, "__esModule", {
  158171. value: true
  158172. });
  158173. exports.default = cloneNode;
  158174. var _definitions = require_definitions7();
  158175. var _generated = require_generated31();
  158176. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  158177. function cloneIfNode(obj, deep, withoutLoc) {
  158178. if (obj && typeof obj.type === "string") {
  158179. return cloneNode(obj, deep, withoutLoc);
  158180. }
  158181. return obj;
  158182. }
  158183. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  158184. if (Array.isArray(obj)) {
  158185. return obj.map((node) => cloneIfNode(node, deep, withoutLoc));
  158186. }
  158187. return cloneIfNode(obj, deep, withoutLoc);
  158188. }
  158189. function cloneNode(node, deep = true, withoutLoc = false) {
  158190. if (!node)
  158191. return node;
  158192. const {
  158193. type
  158194. } = node;
  158195. const newNode = {
  158196. type: node.type
  158197. };
  158198. if ((0, _generated.isIdentifier)(node)) {
  158199. newNode.name = node.name;
  158200. if (has(node, "optional") && typeof node.optional === "boolean") {
  158201. newNode.optional = node.optional;
  158202. }
  158203. if (has(node, "typeAnnotation")) {
  158204. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  158205. }
  158206. } else if (!has(_definitions.NODE_FIELDS, type)) {
  158207. throw new Error(`Unknown node type: "${type}"`);
  158208. } else {
  158209. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  158210. if (has(node, field)) {
  158211. if (deep) {
  158212. newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  158213. } else {
  158214. newNode[field] = node[field];
  158215. }
  158216. }
  158217. }
  158218. }
  158219. if (has(node, "loc")) {
  158220. if (withoutLoc) {
  158221. newNode.loc = null;
  158222. } else {
  158223. newNode.loc = node.loc;
  158224. }
  158225. }
  158226. if (has(node, "leadingComments")) {
  158227. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  158228. }
  158229. if (has(node, "innerComments")) {
  158230. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  158231. }
  158232. if (has(node, "trailingComments")) {
  158233. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  158234. }
  158235. if (has(node, "extra")) {
  158236. newNode.extra = Object.assign({}, node.extra);
  158237. }
  158238. return newNode;
  158239. }
  158240. function maybeCloneComments(comments, deep, withoutLoc) {
  158241. if (!comments || !deep) {
  158242. return comments;
  158243. }
  158244. return comments.map(({
  158245. type,
  158246. value,
  158247. loc
  158248. }) => {
  158249. if (withoutLoc) {
  158250. return {
  158251. type,
  158252. value,
  158253. loc: null
  158254. };
  158255. }
  158256. return {
  158257. type,
  158258. value,
  158259. loc
  158260. };
  158261. });
  158262. }
  158263. }
  158264. });
  158265. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/clone.js
  158266. var require_clone7 = __commonJS({
  158267. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/clone.js"(exports) {
  158268. "use strict";
  158269. Object.defineProperty(exports, "__esModule", {
  158270. value: true
  158271. });
  158272. exports.default = clone;
  158273. var _cloneNode = require_cloneNode7();
  158274. function clone(node) {
  158275. return (0, _cloneNode.default)(node, false);
  158276. }
  158277. }
  158278. });
  158279. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneDeep.js
  158280. var require_cloneDeep7 = __commonJS({
  158281. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  158282. "use strict";
  158283. Object.defineProperty(exports, "__esModule", {
  158284. value: true
  158285. });
  158286. exports.default = cloneDeep2;
  158287. var _cloneNode = require_cloneNode7();
  158288. function cloneDeep2(node) {
  158289. return (0, _cloneNode.default)(node);
  158290. }
  158291. }
  158292. });
  158293. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  158294. var require_cloneDeepWithoutLoc7 = __commonJS({
  158295. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  158296. "use strict";
  158297. Object.defineProperty(exports, "__esModule", {
  158298. value: true
  158299. });
  158300. exports.default = cloneDeepWithoutLoc;
  158301. var _cloneNode = require_cloneNode7();
  158302. function cloneDeepWithoutLoc(node) {
  158303. return (0, _cloneNode.default)(node, true, true);
  158304. }
  158305. }
  158306. });
  158307. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  158308. var require_cloneWithoutLoc7 = __commonJS({
  158309. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  158310. "use strict";
  158311. Object.defineProperty(exports, "__esModule", {
  158312. value: true
  158313. });
  158314. exports.default = cloneWithoutLoc;
  158315. var _cloneNode = require_cloneNode7();
  158316. function cloneWithoutLoc(node) {
  158317. return (0, _cloneNode.default)(node, false, true);
  158318. }
  158319. }
  158320. });
  158321. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/addComments.js
  158322. var require_addComments7 = __commonJS({
  158323. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  158324. "use strict";
  158325. Object.defineProperty(exports, "__esModule", {
  158326. value: true
  158327. });
  158328. exports.default = addComments;
  158329. function addComments(node, type, comments) {
  158330. if (!comments || !node)
  158331. return node;
  158332. const key = `${type}Comments`;
  158333. if (node[key]) {
  158334. if (type === "leading") {
  158335. node[key] = comments.concat(node[key]);
  158336. } else {
  158337. node[key] = node[key].concat(comments);
  158338. }
  158339. } else {
  158340. node[key] = comments;
  158341. }
  158342. return node;
  158343. }
  158344. }
  158345. });
  158346. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/addComment.js
  158347. var require_addComment7 = __commonJS({
  158348. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  158349. "use strict";
  158350. Object.defineProperty(exports, "__esModule", {
  158351. value: true
  158352. });
  158353. exports.default = addComment;
  158354. var _addComments = require_addComments7();
  158355. function addComment(node, type, content3, line) {
  158356. return (0, _addComments.default)(node, type, [{
  158357. type: line ? "CommentLine" : "CommentBlock",
  158358. value: content3
  158359. }]);
  158360. }
  158361. }
  158362. });
  158363. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/inherit.js
  158364. var require_inherit7 = __commonJS({
  158365. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  158366. "use strict";
  158367. Object.defineProperty(exports, "__esModule", {
  158368. value: true
  158369. });
  158370. exports.default = inherit2;
  158371. function inherit2(key, child, parent) {
  158372. if (child && parent) {
  158373. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  158374. }
  158375. }
  158376. }
  158377. });
  158378. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritInnerComments.js
  158379. var require_inheritInnerComments7 = __commonJS({
  158380. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  158381. "use strict";
  158382. Object.defineProperty(exports, "__esModule", {
  158383. value: true
  158384. });
  158385. exports.default = inheritInnerComments;
  158386. var _inherit = require_inherit7();
  158387. function inheritInnerComments(child, parent) {
  158388. (0, _inherit.default)("innerComments", child, parent);
  158389. }
  158390. }
  158391. });
  158392. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  158393. var require_inheritLeadingComments7 = __commonJS({
  158394. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  158395. "use strict";
  158396. Object.defineProperty(exports, "__esModule", {
  158397. value: true
  158398. });
  158399. exports.default = inheritLeadingComments;
  158400. var _inherit = require_inherit7();
  158401. function inheritLeadingComments(child, parent) {
  158402. (0, _inherit.default)("leadingComments", child, parent);
  158403. }
  158404. }
  158405. });
  158406. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  158407. var require_inheritTrailingComments7 = __commonJS({
  158408. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  158409. "use strict";
  158410. Object.defineProperty(exports, "__esModule", {
  158411. value: true
  158412. });
  158413. exports.default = inheritTrailingComments;
  158414. var _inherit = require_inherit7();
  158415. function inheritTrailingComments(child, parent) {
  158416. (0, _inherit.default)("trailingComments", child, parent);
  158417. }
  158418. }
  158419. });
  158420. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritsComments.js
  158421. var require_inheritsComments7 = __commonJS({
  158422. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  158423. "use strict";
  158424. Object.defineProperty(exports, "__esModule", {
  158425. value: true
  158426. });
  158427. exports.default = inheritsComments;
  158428. var _inheritTrailingComments = require_inheritTrailingComments7();
  158429. var _inheritLeadingComments = require_inheritLeadingComments7();
  158430. var _inheritInnerComments = require_inheritInnerComments7();
  158431. function inheritsComments(child, parent) {
  158432. (0, _inheritTrailingComments.default)(child, parent);
  158433. (0, _inheritLeadingComments.default)(child, parent);
  158434. (0, _inheritInnerComments.default)(child, parent);
  158435. return child;
  158436. }
  158437. }
  158438. });
  158439. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/removeComments.js
  158440. var require_removeComments7 = __commonJS({
  158441. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  158442. "use strict";
  158443. Object.defineProperty(exports, "__esModule", {
  158444. value: true
  158445. });
  158446. exports.default = removeComments;
  158447. var _constants = require_constants7();
  158448. function removeComments(node) {
  158449. _constants.COMMENT_KEYS.forEach((key) => {
  158450. node[key] = null;
  158451. });
  158452. return node;
  158453. }
  158454. }
  158455. });
  158456. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/constants/generated/index.js
  158457. var require_generated34 = __commonJS({
  158458. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  158459. "use strict";
  158460. Object.defineProperty(exports, "__esModule", {
  158461. value: true
  158462. });
  158463. exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
  158464. var _definitions = require_definitions7();
  158465. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  158466. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  158467. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  158468. exports.BINARY_TYPES = BINARY_TYPES;
  158469. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  158470. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  158471. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  158472. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  158473. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  158474. exports.BLOCK_TYPES = BLOCK_TYPES;
  158475. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  158476. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  158477. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  158478. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  158479. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  158480. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  158481. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  158482. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  158483. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  158484. exports.LOOP_TYPES = LOOP_TYPES;
  158485. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  158486. exports.WHILE_TYPES = WHILE_TYPES;
  158487. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  158488. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  158489. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  158490. exports.FOR_TYPES = FOR_TYPES;
  158491. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  158492. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  158493. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  158494. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  158495. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  158496. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  158497. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  158498. exports.PUREISH_TYPES = PUREISH_TYPES;
  158499. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  158500. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  158501. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  158502. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  158503. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  158504. exports.LVAL_TYPES = LVAL_TYPES;
  158505. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  158506. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  158507. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  158508. exports.LITERAL_TYPES = LITERAL_TYPES;
  158509. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  158510. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  158511. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  158512. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  158513. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  158514. exports.METHOD_TYPES = METHOD_TYPES;
  158515. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  158516. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  158517. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  158518. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  158519. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  158520. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  158521. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  158522. exports.PATTERN_TYPES = PATTERN_TYPES;
  158523. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  158524. exports.CLASS_TYPES = CLASS_TYPES;
  158525. var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  158526. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  158527. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  158528. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  158529. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  158530. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  158531. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  158532. exports.FLOW_TYPES = FLOW_TYPES;
  158533. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  158534. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  158535. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  158536. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  158537. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  158538. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  158539. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  158540. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  158541. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  158542. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  158543. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  158544. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  158545. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  158546. exports.JSX_TYPES = JSX_TYPES;
  158547. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  158548. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  158549. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  158550. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  158551. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  158552. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  158553. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  158554. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  158555. }
  158556. });
  158557. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toBlock.js
  158558. var require_toBlock7 = __commonJS({
  158559. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  158560. "use strict";
  158561. Object.defineProperty(exports, "__esModule", {
  158562. value: true
  158563. });
  158564. exports.default = toBlock;
  158565. var _generated = require_generated31();
  158566. var _generated2 = require_generated32();
  158567. function toBlock(node, parent) {
  158568. if ((0, _generated.isBlockStatement)(node)) {
  158569. return node;
  158570. }
  158571. let blockNodes = [];
  158572. if ((0, _generated.isEmptyStatement)(node)) {
  158573. blockNodes = [];
  158574. } else {
  158575. if (!(0, _generated.isStatement)(node)) {
  158576. if ((0, _generated.isFunction)(parent)) {
  158577. node = (0, _generated2.returnStatement)(node);
  158578. } else {
  158579. node = (0, _generated2.expressionStatement)(node);
  158580. }
  158581. }
  158582. blockNodes = [node];
  158583. }
  158584. return (0, _generated2.blockStatement)(blockNodes);
  158585. }
  158586. }
  158587. });
  158588. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/ensureBlock.js
  158589. var require_ensureBlock7 = __commonJS({
  158590. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  158591. "use strict";
  158592. Object.defineProperty(exports, "__esModule", {
  158593. value: true
  158594. });
  158595. exports.default = ensureBlock;
  158596. var _toBlock = require_toBlock7();
  158597. function ensureBlock(node, key = "body") {
  158598. return node[key] = (0, _toBlock.default)(node[key], node);
  158599. }
  158600. }
  158601. });
  158602. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toIdentifier.js
  158603. var require_toIdentifier7 = __commonJS({
  158604. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  158605. "use strict";
  158606. Object.defineProperty(exports, "__esModule", {
  158607. value: true
  158608. });
  158609. exports.default = toIdentifier2;
  158610. var _isValidIdentifier = require_isValidIdentifier7();
  158611. var _helperValidatorIdentifier = require_lib19();
  158612. function toIdentifier2(input) {
  158613. input = input + "";
  158614. let name2 = "";
  158615. for (const c of input) {
  158616. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
  158617. }
  158618. name2 = name2.replace(/^[-0-9]+/, "");
  158619. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c) {
  158620. return c ? c.toUpperCase() : "";
  158621. });
  158622. if (!(0, _isValidIdentifier.default)(name2)) {
  158623. name2 = `_${name2}`;
  158624. }
  158625. return name2 || "_";
  158626. }
  158627. }
  158628. });
  158629. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  158630. var require_toBindingIdentifierName7 = __commonJS({
  158631. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  158632. "use strict";
  158633. Object.defineProperty(exports, "__esModule", {
  158634. value: true
  158635. });
  158636. exports.default = toBindingIdentifierName;
  158637. var _toIdentifier = require_toIdentifier7();
  158638. function toBindingIdentifierName(name2) {
  158639. name2 = (0, _toIdentifier.default)(name2);
  158640. if (name2 === "eval" || name2 === "arguments")
  158641. name2 = "_" + name2;
  158642. return name2;
  158643. }
  158644. }
  158645. });
  158646. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toComputedKey.js
  158647. var require_toComputedKey7 = __commonJS({
  158648. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  158649. "use strict";
  158650. Object.defineProperty(exports, "__esModule", {
  158651. value: true
  158652. });
  158653. exports.default = toComputedKey;
  158654. var _generated = require_generated31();
  158655. var _generated2 = require_generated32();
  158656. function toComputedKey(node, key = node.key || node.property) {
  158657. if (!node.computed && (0, _generated.isIdentifier)(key))
  158658. key = (0, _generated2.stringLiteral)(key.name);
  158659. return key;
  158660. }
  158661. }
  158662. });
  158663. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toExpression.js
  158664. var require_toExpression7 = __commonJS({
  158665. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  158666. "use strict";
  158667. Object.defineProperty(exports, "__esModule", {
  158668. value: true
  158669. });
  158670. exports.default = void 0;
  158671. var _generated = require_generated31();
  158672. var _default = toExpression;
  158673. exports.default = _default;
  158674. function toExpression(node) {
  158675. if ((0, _generated.isExpressionStatement)(node)) {
  158676. node = node.expression;
  158677. }
  158678. if ((0, _generated.isExpression)(node)) {
  158679. return node;
  158680. }
  158681. if ((0, _generated.isClass)(node)) {
  158682. node.type = "ClassExpression";
  158683. } else if ((0, _generated.isFunction)(node)) {
  158684. node.type = "FunctionExpression";
  158685. }
  158686. if (!(0, _generated.isExpression)(node)) {
  158687. throw new Error(`cannot turn ${node.type} to an expression`);
  158688. }
  158689. return node;
  158690. }
  158691. }
  158692. });
  158693. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/traverse/traverseFast.js
  158694. var require_traverseFast7 = __commonJS({
  158695. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  158696. "use strict";
  158697. Object.defineProperty(exports, "__esModule", {
  158698. value: true
  158699. });
  158700. exports.default = traverseFast;
  158701. var _definitions = require_definitions7();
  158702. function traverseFast(node, enter, opts) {
  158703. if (!node)
  158704. return;
  158705. const keys2 = _definitions.VISITOR_KEYS[node.type];
  158706. if (!keys2)
  158707. return;
  158708. opts = opts || {};
  158709. enter(node, opts);
  158710. for (const key of keys2) {
  158711. const subNode = node[key];
  158712. if (Array.isArray(subNode)) {
  158713. for (const node2 of subNode) {
  158714. traverseFast(node2, enter, opts);
  158715. }
  158716. } else {
  158717. traverseFast(subNode, enter, opts);
  158718. }
  158719. }
  158720. }
  158721. }
  158722. });
  158723. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/removeProperties.js
  158724. var require_removeProperties7 = __commonJS({
  158725. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  158726. "use strict";
  158727. Object.defineProperty(exports, "__esModule", {
  158728. value: true
  158729. });
  158730. exports.default = removeProperties;
  158731. var _constants = require_constants7();
  158732. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  158733. var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  158734. function removeProperties(node, opts = {}) {
  158735. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  158736. for (const key of map) {
  158737. if (node[key] != null)
  158738. node[key] = void 0;
  158739. }
  158740. for (const key of Object.keys(node)) {
  158741. if (key[0] === "_" && node[key] != null)
  158742. node[key] = void 0;
  158743. }
  158744. const symbols = Object.getOwnPropertySymbols(node);
  158745. for (const sym of symbols) {
  158746. node[sym] = null;
  158747. }
  158748. }
  158749. }
  158750. });
  158751. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  158752. var require_removePropertiesDeep7 = __commonJS({
  158753. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  158754. "use strict";
  158755. Object.defineProperty(exports, "__esModule", {
  158756. value: true
  158757. });
  158758. exports.default = removePropertiesDeep;
  158759. var _traverseFast = require_traverseFast7();
  158760. var _removeProperties = require_removeProperties7();
  158761. function removePropertiesDeep(tree, opts) {
  158762. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  158763. return tree;
  158764. }
  158765. }
  158766. });
  158767. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toKeyAlias.js
  158768. var require_toKeyAlias7 = __commonJS({
  158769. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  158770. "use strict";
  158771. Object.defineProperty(exports, "__esModule", {
  158772. value: true
  158773. });
  158774. exports.default = toKeyAlias;
  158775. var _generated = require_generated31();
  158776. var _cloneNode = require_cloneNode7();
  158777. var _removePropertiesDeep = require_removePropertiesDeep7();
  158778. function toKeyAlias(node, key = node.key) {
  158779. let alias;
  158780. if (node.kind === "method") {
  158781. return toKeyAlias.increment() + "";
  158782. } else if ((0, _generated.isIdentifier)(key)) {
  158783. alias = key.name;
  158784. } else if ((0, _generated.isStringLiteral)(key)) {
  158785. alias = JSON.stringify(key.value);
  158786. } else {
  158787. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
  158788. }
  158789. if (node.computed) {
  158790. alias = `[${alias}]`;
  158791. }
  158792. if (node.static) {
  158793. alias = `static:${alias}`;
  158794. }
  158795. return alias;
  158796. }
  158797. toKeyAlias.uid = 0;
  158798. toKeyAlias.increment = function() {
  158799. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  158800. return toKeyAlias.uid = 0;
  158801. } else {
  158802. return toKeyAlias.uid++;
  158803. }
  158804. };
  158805. }
  158806. });
  158807. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  158808. var require_getBindingIdentifiers7 = __commonJS({
  158809. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  158810. "use strict";
  158811. Object.defineProperty(exports, "__esModule", {
  158812. value: true
  158813. });
  158814. exports.default = getBindingIdentifiers;
  158815. var _generated = require_generated31();
  158816. function getBindingIdentifiers(node, duplicates, outerOnly) {
  158817. let search2 = [].concat(node);
  158818. const ids = /* @__PURE__ */ Object.create(null);
  158819. while (search2.length) {
  158820. const id = search2.shift();
  158821. if (!id)
  158822. continue;
  158823. const keys2 = getBindingIdentifiers.keys[id.type];
  158824. if ((0, _generated.isIdentifier)(id)) {
  158825. if (duplicates) {
  158826. const _ids = ids[id.name] = ids[id.name] || [];
  158827. _ids.push(id);
  158828. } else {
  158829. ids[id.name] = id;
  158830. }
  158831. continue;
  158832. }
  158833. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  158834. if ((0, _generated.isDeclaration)(id.declaration)) {
  158835. search2.push(id.declaration);
  158836. }
  158837. continue;
  158838. }
  158839. if (outerOnly) {
  158840. if ((0, _generated.isFunctionDeclaration)(id)) {
  158841. search2.push(id.id);
  158842. continue;
  158843. }
  158844. if ((0, _generated.isFunctionExpression)(id)) {
  158845. continue;
  158846. }
  158847. }
  158848. if (keys2) {
  158849. for (let i = 0; i < keys2.length; i++) {
  158850. const key = keys2[i];
  158851. if (id[key]) {
  158852. search2 = search2.concat(id[key]);
  158853. }
  158854. }
  158855. }
  158856. }
  158857. return ids;
  158858. }
  158859. getBindingIdentifiers.keys = {
  158860. DeclareClass: ["id"],
  158861. DeclareFunction: ["id"],
  158862. DeclareModule: ["id"],
  158863. DeclareVariable: ["id"],
  158864. DeclareInterface: ["id"],
  158865. DeclareTypeAlias: ["id"],
  158866. DeclareOpaqueType: ["id"],
  158867. InterfaceDeclaration: ["id"],
  158868. TypeAlias: ["id"],
  158869. OpaqueType: ["id"],
  158870. CatchClause: ["param"],
  158871. LabeledStatement: ["label"],
  158872. UnaryExpression: ["argument"],
  158873. AssignmentExpression: ["left"],
  158874. ImportSpecifier: ["local"],
  158875. ImportNamespaceSpecifier: ["local"],
  158876. ImportDefaultSpecifier: ["local"],
  158877. ImportDeclaration: ["specifiers"],
  158878. ExportSpecifier: ["exported"],
  158879. ExportNamespaceSpecifier: ["exported"],
  158880. ExportDefaultSpecifier: ["exported"],
  158881. FunctionDeclaration: ["id", "params"],
  158882. FunctionExpression: ["id", "params"],
  158883. ArrowFunctionExpression: ["params"],
  158884. ObjectMethod: ["params"],
  158885. ClassMethod: ["params"],
  158886. ForInStatement: ["left"],
  158887. ForOfStatement: ["left"],
  158888. ClassDeclaration: ["id"],
  158889. ClassExpression: ["id"],
  158890. RestElement: ["argument"],
  158891. UpdateExpression: ["argument"],
  158892. ObjectProperty: ["value"],
  158893. AssignmentPattern: ["left"],
  158894. ArrayPattern: ["elements"],
  158895. ObjectPattern: ["properties"],
  158896. VariableDeclaration: ["declarations"],
  158897. VariableDeclarator: ["id"]
  158898. };
  158899. }
  158900. });
  158901. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  158902. var require_gatherSequenceExpressions7 = __commonJS({
  158903. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  158904. "use strict";
  158905. Object.defineProperty(exports, "__esModule", {
  158906. value: true
  158907. });
  158908. exports.default = gatherSequenceExpressions;
  158909. var _getBindingIdentifiers = require_getBindingIdentifiers7();
  158910. var _generated = require_generated31();
  158911. var _generated2 = require_generated32();
  158912. var _cloneNode = require_cloneNode7();
  158913. function gatherSequenceExpressions(nodes, scope, declars) {
  158914. const exprs = [];
  158915. let ensureLastUndefined = true;
  158916. for (const node of nodes) {
  158917. if (!(0, _generated.isEmptyStatement)(node)) {
  158918. ensureLastUndefined = false;
  158919. }
  158920. if ((0, _generated.isExpression)(node)) {
  158921. exprs.push(node);
  158922. } else if ((0, _generated.isExpressionStatement)(node)) {
  158923. exprs.push(node.expression);
  158924. } else if ((0, _generated.isVariableDeclaration)(node)) {
  158925. if (node.kind !== "var")
  158926. return;
  158927. for (const declar of node.declarations) {
  158928. const bindings = (0, _getBindingIdentifiers.default)(declar);
  158929. for (const key of Object.keys(bindings)) {
  158930. declars.push({
  158931. kind: node.kind,
  158932. id: (0, _cloneNode.default)(bindings[key])
  158933. });
  158934. }
  158935. if (declar.init) {
  158936. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  158937. }
  158938. }
  158939. ensureLastUndefined = true;
  158940. } else if ((0, _generated.isIfStatement)(node)) {
  158941. const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  158942. const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  158943. if (!consequent || !alternate)
  158944. return;
  158945. exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
  158946. } else if ((0, _generated.isBlockStatement)(node)) {
  158947. const body = gatherSequenceExpressions(node.body, scope, declars);
  158948. if (!body)
  158949. return;
  158950. exprs.push(body);
  158951. } else if ((0, _generated.isEmptyStatement)(node)) {
  158952. if (nodes.indexOf(node) === 0) {
  158953. ensureLastUndefined = true;
  158954. }
  158955. } else {
  158956. return;
  158957. }
  158958. }
  158959. if (ensureLastUndefined) {
  158960. exprs.push(scope.buildUndefinedNode());
  158961. }
  158962. if (exprs.length === 1) {
  158963. return exprs[0];
  158964. } else {
  158965. return (0, _generated2.sequenceExpression)(exprs);
  158966. }
  158967. }
  158968. }
  158969. });
  158970. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toSequenceExpression.js
  158971. var require_toSequenceExpression7 = __commonJS({
  158972. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  158973. "use strict";
  158974. Object.defineProperty(exports, "__esModule", {
  158975. value: true
  158976. });
  158977. exports.default = toSequenceExpression;
  158978. var _gatherSequenceExpressions = require_gatherSequenceExpressions7();
  158979. function toSequenceExpression(nodes, scope) {
  158980. if (!(nodes != null && nodes.length))
  158981. return;
  158982. const declars = [];
  158983. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  158984. if (!result)
  158985. return;
  158986. for (const declar of declars) {
  158987. scope.push(declar);
  158988. }
  158989. return result;
  158990. }
  158991. }
  158992. });
  158993. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toStatement.js
  158994. var require_toStatement7 = __commonJS({
  158995. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  158996. "use strict";
  158997. Object.defineProperty(exports, "__esModule", {
  158998. value: true
  158999. });
  159000. exports.default = void 0;
  159001. var _generated = require_generated31();
  159002. var _generated2 = require_generated32();
  159003. var _default = toStatement;
  159004. exports.default = _default;
  159005. function toStatement(node, ignore3) {
  159006. if ((0, _generated.isStatement)(node)) {
  159007. return node;
  159008. }
  159009. let mustHaveId = false;
  159010. let newType;
  159011. if ((0, _generated.isClass)(node)) {
  159012. mustHaveId = true;
  159013. newType = "ClassDeclaration";
  159014. } else if ((0, _generated.isFunction)(node)) {
  159015. mustHaveId = true;
  159016. newType = "FunctionDeclaration";
  159017. } else if ((0, _generated.isAssignmentExpression)(node)) {
  159018. return (0, _generated2.expressionStatement)(node);
  159019. }
  159020. if (mustHaveId && !node.id) {
  159021. newType = false;
  159022. }
  159023. if (!newType) {
  159024. if (ignore3) {
  159025. return false;
  159026. } else {
  159027. throw new Error(`cannot turn ${node.type} to a statement`);
  159028. }
  159029. }
  159030. node.type = newType;
  159031. return node;
  159032. }
  159033. }
  159034. });
  159035. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/valueToNode.js
  159036. var require_valueToNode7 = __commonJS({
  159037. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  159038. "use strict";
  159039. Object.defineProperty(exports, "__esModule", {
  159040. value: true
  159041. });
  159042. exports.default = void 0;
  159043. var _isValidIdentifier = require_isValidIdentifier7();
  159044. var _generated = require_generated32();
  159045. var _default = valueToNode;
  159046. exports.default = _default;
  159047. var objectToString = Function.call.bind(Object.prototype.toString);
  159048. function isRegExp(value) {
  159049. return objectToString(value) === "[object RegExp]";
  159050. }
  159051. function isPlainObject2(value) {
  159052. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  159053. return false;
  159054. }
  159055. const proto = Object.getPrototypeOf(value);
  159056. return proto === null || Object.getPrototypeOf(proto) === null;
  159057. }
  159058. function valueToNode(value) {
  159059. if (value === void 0) {
  159060. return (0, _generated.identifier)("undefined");
  159061. }
  159062. if (value === true || value === false) {
  159063. return (0, _generated.booleanLiteral)(value);
  159064. }
  159065. if (value === null) {
  159066. return (0, _generated.nullLiteral)();
  159067. }
  159068. if (typeof value === "string") {
  159069. return (0, _generated.stringLiteral)(value);
  159070. }
  159071. if (typeof value === "number") {
  159072. let result;
  159073. if (Number.isFinite(value)) {
  159074. result = (0, _generated.numericLiteral)(Math.abs(value));
  159075. } else {
  159076. let numerator;
  159077. if (Number.isNaN(value)) {
  159078. numerator = (0, _generated.numericLiteral)(0);
  159079. } else {
  159080. numerator = (0, _generated.numericLiteral)(1);
  159081. }
  159082. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  159083. }
  159084. if (value < 0 || Object.is(value, -0)) {
  159085. result = (0, _generated.unaryExpression)("-", result);
  159086. }
  159087. return result;
  159088. }
  159089. if (isRegExp(value)) {
  159090. const pattern = value.source;
  159091. const flags = value.toString().match(/\/([a-z]+|)$/)[1];
  159092. return (0, _generated.regExpLiteral)(pattern, flags);
  159093. }
  159094. if (Array.isArray(value)) {
  159095. return (0, _generated.arrayExpression)(value.map(valueToNode));
  159096. }
  159097. if (isPlainObject2(value)) {
  159098. const props = [];
  159099. for (const key of Object.keys(value)) {
  159100. let nodeKey;
  159101. if ((0, _isValidIdentifier.default)(key)) {
  159102. nodeKey = (0, _generated.identifier)(key);
  159103. } else {
  159104. nodeKey = (0, _generated.stringLiteral)(key);
  159105. }
  159106. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
  159107. }
  159108. return (0, _generated.objectExpression)(props);
  159109. }
  159110. throw new Error("don't know how to turn this value into a node");
  159111. }
  159112. }
  159113. });
  159114. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  159115. var require_appendToMemberExpression7 = __commonJS({
  159116. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  159117. "use strict";
  159118. Object.defineProperty(exports, "__esModule", {
  159119. value: true
  159120. });
  159121. exports.default = appendToMemberExpression;
  159122. var _generated = require_generated32();
  159123. function appendToMemberExpression(member, append, computed = false) {
  159124. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  159125. member.property = append;
  159126. member.computed = !!computed;
  159127. return member;
  159128. }
  159129. }
  159130. });
  159131. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/inherits.js
  159132. var require_inherits7 = __commonJS({
  159133. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  159134. "use strict";
  159135. Object.defineProperty(exports, "__esModule", {
  159136. value: true
  159137. });
  159138. exports.default = inherits;
  159139. var _constants = require_constants7();
  159140. var _inheritsComments = require_inheritsComments7();
  159141. function inherits(child, parent) {
  159142. if (!child || !parent)
  159143. return child;
  159144. for (const key of _constants.INHERIT_KEYS.optional) {
  159145. if (child[key] == null) {
  159146. child[key] = parent[key];
  159147. }
  159148. }
  159149. for (const key of Object.keys(parent)) {
  159150. if (key[0] === "_" && key !== "__clone")
  159151. child[key] = parent[key];
  159152. }
  159153. for (const key of _constants.INHERIT_KEYS.force) {
  159154. child[key] = parent[key];
  159155. }
  159156. (0, _inheritsComments.default)(child, parent);
  159157. return child;
  159158. }
  159159. }
  159160. });
  159161. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  159162. var require_prependToMemberExpression7 = __commonJS({
  159163. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  159164. "use strict";
  159165. Object.defineProperty(exports, "__esModule", {
  159166. value: true
  159167. });
  159168. exports.default = prependToMemberExpression;
  159169. var _generated = require_generated32();
  159170. function prependToMemberExpression(member, prepend) {
  159171. member.object = (0, _generated.memberExpression)(prepend, member.object);
  159172. return member;
  159173. }
  159174. }
  159175. });
  159176. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  159177. var require_getOuterBindingIdentifiers7 = __commonJS({
  159178. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  159179. "use strict";
  159180. Object.defineProperty(exports, "__esModule", {
  159181. value: true
  159182. });
  159183. exports.default = void 0;
  159184. var _getBindingIdentifiers = require_getBindingIdentifiers7();
  159185. var _default = getOuterBindingIdentifiers;
  159186. exports.default = _default;
  159187. function getOuterBindingIdentifiers(node, duplicates) {
  159188. return (0, _getBindingIdentifiers.default)(node, duplicates, true);
  159189. }
  159190. }
  159191. });
  159192. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/traverse/traverse.js
  159193. var require_traverse7 = __commonJS({
  159194. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  159195. "use strict";
  159196. Object.defineProperty(exports, "__esModule", {
  159197. value: true
  159198. });
  159199. exports.default = traverse;
  159200. var _definitions = require_definitions7();
  159201. function traverse(node, handlers2, state) {
  159202. if (typeof handlers2 === "function") {
  159203. handlers2 = {
  159204. enter: handlers2
  159205. };
  159206. }
  159207. const {
  159208. enter,
  159209. exit: exit2
  159210. } = handlers2;
  159211. traverseSimpleImpl(node, enter, exit2, state, []);
  159212. }
  159213. function traverseSimpleImpl(node, enter, exit2, state, ancestors) {
  159214. const keys2 = _definitions.VISITOR_KEYS[node.type];
  159215. if (!keys2)
  159216. return;
  159217. if (enter)
  159218. enter(node, ancestors, state);
  159219. for (const key of keys2) {
  159220. const subNode = node[key];
  159221. if (Array.isArray(subNode)) {
  159222. for (let i = 0; i < subNode.length; i++) {
  159223. const child = subNode[i];
  159224. if (!child)
  159225. continue;
  159226. ancestors.push({
  159227. node,
  159228. key,
  159229. index: i
  159230. });
  159231. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  159232. ancestors.pop();
  159233. }
  159234. } else if (subNode) {
  159235. ancestors.push({
  159236. node,
  159237. key
  159238. });
  159239. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  159240. ancestors.pop();
  159241. }
  159242. }
  159243. if (exit2)
  159244. exit2(node, ancestors, state);
  159245. }
  159246. }
  159247. });
  159248. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isBinding.js
  159249. var require_isBinding7 = __commonJS({
  159250. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  159251. "use strict";
  159252. Object.defineProperty(exports, "__esModule", {
  159253. value: true
  159254. });
  159255. exports.default = isBinding;
  159256. var _getBindingIdentifiers = require_getBindingIdentifiers7();
  159257. function isBinding(node, parent, grandparent) {
  159258. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  159259. return false;
  159260. }
  159261. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  159262. if (keys2) {
  159263. for (let i = 0; i < keys2.length; i++) {
  159264. const key = keys2[i];
  159265. const val = parent[key];
  159266. if (Array.isArray(val)) {
  159267. if (val.indexOf(node) >= 0)
  159268. return true;
  159269. } else {
  159270. if (val === node)
  159271. return true;
  159272. }
  159273. }
  159274. }
  159275. return false;
  159276. }
  159277. }
  159278. });
  159279. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isLet.js
  159280. var require_isLet7 = __commonJS({
  159281. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  159282. "use strict";
  159283. Object.defineProperty(exports, "__esModule", {
  159284. value: true
  159285. });
  159286. exports.default = isLet;
  159287. var _generated = require_generated31();
  159288. var _constants = require_constants7();
  159289. function isLet(node) {
  159290. return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  159291. }
  159292. }
  159293. });
  159294. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isBlockScoped.js
  159295. var require_isBlockScoped7 = __commonJS({
  159296. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  159297. "use strict";
  159298. Object.defineProperty(exports, "__esModule", {
  159299. value: true
  159300. });
  159301. exports.default = isBlockScoped;
  159302. var _generated = require_generated31();
  159303. var _isLet = require_isLet7();
  159304. function isBlockScoped(node) {
  159305. return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
  159306. }
  159307. }
  159308. });
  159309. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isImmutable.js
  159310. var require_isImmutable7 = __commonJS({
  159311. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  159312. "use strict";
  159313. Object.defineProperty(exports, "__esModule", {
  159314. value: true
  159315. });
  159316. exports.default = isImmutable;
  159317. var _isType = require_isType7();
  159318. var _generated = require_generated31();
  159319. function isImmutable(node) {
  159320. if ((0, _isType.default)(node.type, "Immutable"))
  159321. return true;
  159322. if ((0, _generated.isIdentifier)(node)) {
  159323. if (node.name === "undefined") {
  159324. return true;
  159325. } else {
  159326. return false;
  159327. }
  159328. }
  159329. return false;
  159330. }
  159331. }
  159332. });
  159333. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  159334. var require_isNodesEquivalent7 = __commonJS({
  159335. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  159336. "use strict";
  159337. Object.defineProperty(exports, "__esModule", {
  159338. value: true
  159339. });
  159340. exports.default = isNodesEquivalent;
  159341. var _definitions = require_definitions7();
  159342. function isNodesEquivalent(a, b) {
  159343. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  159344. return a === b;
  159345. }
  159346. if (a.type !== b.type) {
  159347. return false;
  159348. }
  159349. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  159350. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  159351. for (const field of fields) {
  159352. if (typeof a[field] !== typeof b[field]) {
  159353. return false;
  159354. }
  159355. if (a[field] == null && b[field] == null) {
  159356. continue;
  159357. } else if (a[field] == null || b[field] == null) {
  159358. return false;
  159359. }
  159360. if (Array.isArray(a[field])) {
  159361. if (!Array.isArray(b[field])) {
  159362. return false;
  159363. }
  159364. if (a[field].length !== b[field].length) {
  159365. return false;
  159366. }
  159367. for (let i = 0; i < a[field].length; i++) {
  159368. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  159369. return false;
  159370. }
  159371. }
  159372. continue;
  159373. }
  159374. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  159375. for (const key of Object.keys(a[field])) {
  159376. if (a[field][key] !== b[field][key]) {
  159377. return false;
  159378. }
  159379. }
  159380. continue;
  159381. }
  159382. if (!isNodesEquivalent(a[field], b[field])) {
  159383. return false;
  159384. }
  159385. }
  159386. return true;
  159387. }
  159388. }
  159389. });
  159390. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isReferenced.js
  159391. var require_isReferenced7 = __commonJS({
  159392. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  159393. "use strict";
  159394. Object.defineProperty(exports, "__esModule", {
  159395. value: true
  159396. });
  159397. exports.default = isReferenced;
  159398. function isReferenced(node, parent, grandparent) {
  159399. switch (parent.type) {
  159400. case "MemberExpression":
  159401. case "JSXMemberExpression":
  159402. case "OptionalMemberExpression":
  159403. if (parent.property === node) {
  159404. return !!parent.computed;
  159405. }
  159406. return parent.object === node;
  159407. case "VariableDeclarator":
  159408. return parent.init === node;
  159409. case "ArrowFunctionExpression":
  159410. return parent.body === node;
  159411. case "PrivateName":
  159412. return false;
  159413. case "ClassMethod":
  159414. case "ClassPrivateMethod":
  159415. case "ObjectMethod":
  159416. if (parent.params.includes(node)) {
  159417. return false;
  159418. }
  159419. case "ObjectProperty":
  159420. case "ClassProperty":
  159421. case "ClassPrivateProperty":
  159422. if (parent.key === node) {
  159423. return !!parent.computed;
  159424. }
  159425. if (parent.value === node) {
  159426. return !grandparent || grandparent.type !== "ObjectPattern";
  159427. }
  159428. return true;
  159429. case "ClassDeclaration":
  159430. case "ClassExpression":
  159431. return parent.superClass === node;
  159432. case "AssignmentExpression":
  159433. return parent.right === node;
  159434. case "AssignmentPattern":
  159435. return parent.right === node;
  159436. case "LabeledStatement":
  159437. return false;
  159438. case "CatchClause":
  159439. return false;
  159440. case "RestElement":
  159441. return false;
  159442. case "BreakStatement":
  159443. case "ContinueStatement":
  159444. return false;
  159445. case "FunctionDeclaration":
  159446. case "FunctionExpression":
  159447. return false;
  159448. case "ExportNamespaceSpecifier":
  159449. case "ExportDefaultSpecifier":
  159450. return false;
  159451. case "ExportSpecifier":
  159452. if (grandparent != null && grandparent.source) {
  159453. return false;
  159454. }
  159455. return parent.local === node;
  159456. case "ImportDefaultSpecifier":
  159457. case "ImportNamespaceSpecifier":
  159458. case "ImportSpecifier":
  159459. return false;
  159460. case "JSXAttribute":
  159461. return false;
  159462. case "ObjectPattern":
  159463. case "ArrayPattern":
  159464. return false;
  159465. case "MetaProperty":
  159466. return false;
  159467. case "ObjectTypeProperty":
  159468. return parent.key !== node;
  159469. case "TSEnumMember":
  159470. return parent.id !== node;
  159471. case "TSPropertySignature":
  159472. if (parent.key === node) {
  159473. return !!parent.computed;
  159474. }
  159475. return true;
  159476. }
  159477. return true;
  159478. }
  159479. }
  159480. });
  159481. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isScope.js
  159482. var require_isScope7 = __commonJS({
  159483. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  159484. "use strict";
  159485. Object.defineProperty(exports, "__esModule", {
  159486. value: true
  159487. });
  159488. exports.default = isScope;
  159489. var _generated = require_generated31();
  159490. function isScope(node, parent) {
  159491. if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  159492. return false;
  159493. }
  159494. if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  159495. return true;
  159496. }
  159497. return (0, _generated.isScopable)(node);
  159498. }
  159499. }
  159500. });
  159501. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  159502. var require_isSpecifierDefault7 = __commonJS({
  159503. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  159504. "use strict";
  159505. Object.defineProperty(exports, "__esModule", {
  159506. value: true
  159507. });
  159508. exports.default = isSpecifierDefault;
  159509. var _generated = require_generated31();
  159510. function isSpecifierDefault(specifier) {
  159511. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  159512. name: "default"
  159513. });
  159514. }
  159515. }
  159516. });
  159517. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  159518. var require_isValidES3Identifier7 = __commonJS({
  159519. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  159520. "use strict";
  159521. Object.defineProperty(exports, "__esModule", {
  159522. value: true
  159523. });
  159524. exports.default = isValidES3Identifier;
  159525. var _isValidIdentifier = require_isValidIdentifier7();
  159526. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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"]);
  159527. function isValidES3Identifier(name2) {
  159528. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  159529. }
  159530. }
  159531. });
  159532. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isVar.js
  159533. var require_isVar7 = __commonJS({
  159534. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  159535. "use strict";
  159536. Object.defineProperty(exports, "__esModule", {
  159537. value: true
  159538. });
  159539. exports.default = isVar;
  159540. var _generated = require_generated31();
  159541. var _constants = require_constants7();
  159542. function isVar(node) {
  159543. return (0, _generated.isVariableDeclaration)(node, {
  159544. kind: "var"
  159545. }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  159546. }
  159547. }
  159548. });
  159549. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/ast-types/generated/index.js
  159550. var require_generated35 = __commonJS({
  159551. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/ast-types/generated/index.js"() {
  159552. }
  159553. });
  159554. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/index.js
  159555. var require_lib35 = __commonJS({
  159556. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/index.js"(exports) {
  159557. "use strict";
  159558. Object.defineProperty(exports, "__esModule", {
  159559. value: true
  159560. });
  159561. var _exportNames = {
  159562. react: true,
  159563. assertNode: true,
  159564. createTypeAnnotationBasedOnTypeof: true,
  159565. createUnionTypeAnnotation: true,
  159566. createFlowUnionType: true,
  159567. createTSUnionType: true,
  159568. cloneNode: true,
  159569. clone: true,
  159570. cloneDeep: true,
  159571. cloneDeepWithoutLoc: true,
  159572. cloneWithoutLoc: true,
  159573. addComment: true,
  159574. addComments: true,
  159575. inheritInnerComments: true,
  159576. inheritLeadingComments: true,
  159577. inheritsComments: true,
  159578. inheritTrailingComments: true,
  159579. removeComments: true,
  159580. ensureBlock: true,
  159581. toBindingIdentifierName: true,
  159582. toBlock: true,
  159583. toComputedKey: true,
  159584. toExpression: true,
  159585. toIdentifier: true,
  159586. toKeyAlias: true,
  159587. toSequenceExpression: true,
  159588. toStatement: true,
  159589. valueToNode: true,
  159590. appendToMemberExpression: true,
  159591. inherits: true,
  159592. prependToMemberExpression: true,
  159593. removeProperties: true,
  159594. removePropertiesDeep: true,
  159595. removeTypeDuplicates: true,
  159596. getBindingIdentifiers: true,
  159597. getOuterBindingIdentifiers: true,
  159598. traverse: true,
  159599. traverseFast: true,
  159600. shallowEqual: true,
  159601. is: true,
  159602. isBinding: true,
  159603. isBlockScoped: true,
  159604. isImmutable: true,
  159605. isLet: true,
  159606. isNode: true,
  159607. isNodesEquivalent: true,
  159608. isPlaceholderType: true,
  159609. isReferenced: true,
  159610. isScope: true,
  159611. isSpecifierDefault: true,
  159612. isType: true,
  159613. isValidES3Identifier: true,
  159614. isValidIdentifier: true,
  159615. isVar: true,
  159616. matchesPattern: true,
  159617. validate: true,
  159618. buildMatchMemberExpression: true
  159619. };
  159620. Object.defineProperty(exports, "assertNode", {
  159621. enumerable: true,
  159622. get: function() {
  159623. return _assertNode.default;
  159624. }
  159625. });
  159626. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  159627. enumerable: true,
  159628. get: function() {
  159629. return _createTypeAnnotationBasedOnTypeof.default;
  159630. }
  159631. });
  159632. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  159633. enumerable: true,
  159634. get: function() {
  159635. return _createFlowUnionType.default;
  159636. }
  159637. });
  159638. Object.defineProperty(exports, "createFlowUnionType", {
  159639. enumerable: true,
  159640. get: function() {
  159641. return _createFlowUnionType.default;
  159642. }
  159643. });
  159644. Object.defineProperty(exports, "createTSUnionType", {
  159645. enumerable: true,
  159646. get: function() {
  159647. return _createTSUnionType.default;
  159648. }
  159649. });
  159650. Object.defineProperty(exports, "cloneNode", {
  159651. enumerable: true,
  159652. get: function() {
  159653. return _cloneNode.default;
  159654. }
  159655. });
  159656. Object.defineProperty(exports, "clone", {
  159657. enumerable: true,
  159658. get: function() {
  159659. return _clone.default;
  159660. }
  159661. });
  159662. Object.defineProperty(exports, "cloneDeep", {
  159663. enumerable: true,
  159664. get: function() {
  159665. return _cloneDeep.default;
  159666. }
  159667. });
  159668. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  159669. enumerable: true,
  159670. get: function() {
  159671. return _cloneDeepWithoutLoc.default;
  159672. }
  159673. });
  159674. Object.defineProperty(exports, "cloneWithoutLoc", {
  159675. enumerable: true,
  159676. get: function() {
  159677. return _cloneWithoutLoc.default;
  159678. }
  159679. });
  159680. Object.defineProperty(exports, "addComment", {
  159681. enumerable: true,
  159682. get: function() {
  159683. return _addComment.default;
  159684. }
  159685. });
  159686. Object.defineProperty(exports, "addComments", {
  159687. enumerable: true,
  159688. get: function() {
  159689. return _addComments.default;
  159690. }
  159691. });
  159692. Object.defineProperty(exports, "inheritInnerComments", {
  159693. enumerable: true,
  159694. get: function() {
  159695. return _inheritInnerComments.default;
  159696. }
  159697. });
  159698. Object.defineProperty(exports, "inheritLeadingComments", {
  159699. enumerable: true,
  159700. get: function() {
  159701. return _inheritLeadingComments.default;
  159702. }
  159703. });
  159704. Object.defineProperty(exports, "inheritsComments", {
  159705. enumerable: true,
  159706. get: function() {
  159707. return _inheritsComments.default;
  159708. }
  159709. });
  159710. Object.defineProperty(exports, "inheritTrailingComments", {
  159711. enumerable: true,
  159712. get: function() {
  159713. return _inheritTrailingComments.default;
  159714. }
  159715. });
  159716. Object.defineProperty(exports, "removeComments", {
  159717. enumerable: true,
  159718. get: function() {
  159719. return _removeComments.default;
  159720. }
  159721. });
  159722. Object.defineProperty(exports, "ensureBlock", {
  159723. enumerable: true,
  159724. get: function() {
  159725. return _ensureBlock.default;
  159726. }
  159727. });
  159728. Object.defineProperty(exports, "toBindingIdentifierName", {
  159729. enumerable: true,
  159730. get: function() {
  159731. return _toBindingIdentifierName.default;
  159732. }
  159733. });
  159734. Object.defineProperty(exports, "toBlock", {
  159735. enumerable: true,
  159736. get: function() {
  159737. return _toBlock.default;
  159738. }
  159739. });
  159740. Object.defineProperty(exports, "toComputedKey", {
  159741. enumerable: true,
  159742. get: function() {
  159743. return _toComputedKey.default;
  159744. }
  159745. });
  159746. Object.defineProperty(exports, "toExpression", {
  159747. enumerable: true,
  159748. get: function() {
  159749. return _toExpression.default;
  159750. }
  159751. });
  159752. Object.defineProperty(exports, "toIdentifier", {
  159753. enumerable: true,
  159754. get: function() {
  159755. return _toIdentifier.default;
  159756. }
  159757. });
  159758. Object.defineProperty(exports, "toKeyAlias", {
  159759. enumerable: true,
  159760. get: function() {
  159761. return _toKeyAlias.default;
  159762. }
  159763. });
  159764. Object.defineProperty(exports, "toSequenceExpression", {
  159765. enumerable: true,
  159766. get: function() {
  159767. return _toSequenceExpression.default;
  159768. }
  159769. });
  159770. Object.defineProperty(exports, "toStatement", {
  159771. enumerable: true,
  159772. get: function() {
  159773. return _toStatement.default;
  159774. }
  159775. });
  159776. Object.defineProperty(exports, "valueToNode", {
  159777. enumerable: true,
  159778. get: function() {
  159779. return _valueToNode.default;
  159780. }
  159781. });
  159782. Object.defineProperty(exports, "appendToMemberExpression", {
  159783. enumerable: true,
  159784. get: function() {
  159785. return _appendToMemberExpression.default;
  159786. }
  159787. });
  159788. Object.defineProperty(exports, "inherits", {
  159789. enumerable: true,
  159790. get: function() {
  159791. return _inherits.default;
  159792. }
  159793. });
  159794. Object.defineProperty(exports, "prependToMemberExpression", {
  159795. enumerable: true,
  159796. get: function() {
  159797. return _prependToMemberExpression.default;
  159798. }
  159799. });
  159800. Object.defineProperty(exports, "removeProperties", {
  159801. enumerable: true,
  159802. get: function() {
  159803. return _removeProperties.default;
  159804. }
  159805. });
  159806. Object.defineProperty(exports, "removePropertiesDeep", {
  159807. enumerable: true,
  159808. get: function() {
  159809. return _removePropertiesDeep.default;
  159810. }
  159811. });
  159812. Object.defineProperty(exports, "removeTypeDuplicates", {
  159813. enumerable: true,
  159814. get: function() {
  159815. return _removeTypeDuplicates.default;
  159816. }
  159817. });
  159818. Object.defineProperty(exports, "getBindingIdentifiers", {
  159819. enumerable: true,
  159820. get: function() {
  159821. return _getBindingIdentifiers.default;
  159822. }
  159823. });
  159824. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  159825. enumerable: true,
  159826. get: function() {
  159827. return _getOuterBindingIdentifiers.default;
  159828. }
  159829. });
  159830. Object.defineProperty(exports, "traverse", {
  159831. enumerable: true,
  159832. get: function() {
  159833. return _traverse.default;
  159834. }
  159835. });
  159836. Object.defineProperty(exports, "traverseFast", {
  159837. enumerable: true,
  159838. get: function() {
  159839. return _traverseFast.default;
  159840. }
  159841. });
  159842. Object.defineProperty(exports, "shallowEqual", {
  159843. enumerable: true,
  159844. get: function() {
  159845. return _shallowEqual.default;
  159846. }
  159847. });
  159848. Object.defineProperty(exports, "is", {
  159849. enumerable: true,
  159850. get: function() {
  159851. return _is.default;
  159852. }
  159853. });
  159854. Object.defineProperty(exports, "isBinding", {
  159855. enumerable: true,
  159856. get: function() {
  159857. return _isBinding.default;
  159858. }
  159859. });
  159860. Object.defineProperty(exports, "isBlockScoped", {
  159861. enumerable: true,
  159862. get: function() {
  159863. return _isBlockScoped.default;
  159864. }
  159865. });
  159866. Object.defineProperty(exports, "isImmutable", {
  159867. enumerable: true,
  159868. get: function() {
  159869. return _isImmutable.default;
  159870. }
  159871. });
  159872. Object.defineProperty(exports, "isLet", {
  159873. enumerable: true,
  159874. get: function() {
  159875. return _isLet.default;
  159876. }
  159877. });
  159878. Object.defineProperty(exports, "isNode", {
  159879. enumerable: true,
  159880. get: function() {
  159881. return _isNode.default;
  159882. }
  159883. });
  159884. Object.defineProperty(exports, "isNodesEquivalent", {
  159885. enumerable: true,
  159886. get: function() {
  159887. return _isNodesEquivalent.default;
  159888. }
  159889. });
  159890. Object.defineProperty(exports, "isPlaceholderType", {
  159891. enumerable: true,
  159892. get: function() {
  159893. return _isPlaceholderType.default;
  159894. }
  159895. });
  159896. Object.defineProperty(exports, "isReferenced", {
  159897. enumerable: true,
  159898. get: function() {
  159899. return _isReferenced.default;
  159900. }
  159901. });
  159902. Object.defineProperty(exports, "isScope", {
  159903. enumerable: true,
  159904. get: function() {
  159905. return _isScope.default;
  159906. }
  159907. });
  159908. Object.defineProperty(exports, "isSpecifierDefault", {
  159909. enumerable: true,
  159910. get: function() {
  159911. return _isSpecifierDefault.default;
  159912. }
  159913. });
  159914. Object.defineProperty(exports, "isType", {
  159915. enumerable: true,
  159916. get: function() {
  159917. return _isType.default;
  159918. }
  159919. });
  159920. Object.defineProperty(exports, "isValidES3Identifier", {
  159921. enumerable: true,
  159922. get: function() {
  159923. return _isValidES3Identifier.default;
  159924. }
  159925. });
  159926. Object.defineProperty(exports, "isValidIdentifier", {
  159927. enumerable: true,
  159928. get: function() {
  159929. return _isValidIdentifier.default;
  159930. }
  159931. });
  159932. Object.defineProperty(exports, "isVar", {
  159933. enumerable: true,
  159934. get: function() {
  159935. return _isVar.default;
  159936. }
  159937. });
  159938. Object.defineProperty(exports, "matchesPattern", {
  159939. enumerable: true,
  159940. get: function() {
  159941. return _matchesPattern.default;
  159942. }
  159943. });
  159944. Object.defineProperty(exports, "validate", {
  159945. enumerable: true,
  159946. get: function() {
  159947. return _validate.default;
  159948. }
  159949. });
  159950. Object.defineProperty(exports, "buildMatchMemberExpression", {
  159951. enumerable: true,
  159952. get: function() {
  159953. return _buildMatchMemberExpression.default;
  159954. }
  159955. });
  159956. exports.react = void 0;
  159957. var _isReactComponent = require_isReactComponent7();
  159958. var _isCompatTag = require_isCompatTag7();
  159959. var _buildChildren = require_buildChildren7();
  159960. var _assertNode = require_assertNode7();
  159961. var _generated = require_generated33();
  159962. Object.keys(_generated).forEach(function(key) {
  159963. if (key === "default" || key === "__esModule")
  159964. return;
  159965. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  159966. return;
  159967. if (key in exports && exports[key] === _generated[key])
  159968. return;
  159969. Object.defineProperty(exports, key, {
  159970. enumerable: true,
  159971. get: function() {
  159972. return _generated[key];
  159973. }
  159974. });
  159975. });
  159976. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof7();
  159977. var _createFlowUnionType = require_createFlowUnionType7();
  159978. var _createTSUnionType = require_createTSUnionType7();
  159979. var _generated2 = require_generated32();
  159980. Object.keys(_generated2).forEach(function(key) {
  159981. if (key === "default" || key === "__esModule")
  159982. return;
  159983. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  159984. return;
  159985. if (key in exports && exports[key] === _generated2[key])
  159986. return;
  159987. Object.defineProperty(exports, key, {
  159988. enumerable: true,
  159989. get: function() {
  159990. return _generated2[key];
  159991. }
  159992. });
  159993. });
  159994. var _uppercase = require_uppercase7();
  159995. Object.keys(_uppercase).forEach(function(key) {
  159996. if (key === "default" || key === "__esModule")
  159997. return;
  159998. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  159999. return;
  160000. if (key in exports && exports[key] === _uppercase[key])
  160001. return;
  160002. Object.defineProperty(exports, key, {
  160003. enumerable: true,
  160004. get: function() {
  160005. return _uppercase[key];
  160006. }
  160007. });
  160008. });
  160009. var _cloneNode = require_cloneNode7();
  160010. var _clone = require_clone7();
  160011. var _cloneDeep = require_cloneDeep7();
  160012. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc7();
  160013. var _cloneWithoutLoc = require_cloneWithoutLoc7();
  160014. var _addComment = require_addComment7();
  160015. var _addComments = require_addComments7();
  160016. var _inheritInnerComments = require_inheritInnerComments7();
  160017. var _inheritLeadingComments = require_inheritLeadingComments7();
  160018. var _inheritsComments = require_inheritsComments7();
  160019. var _inheritTrailingComments = require_inheritTrailingComments7();
  160020. var _removeComments = require_removeComments7();
  160021. var _generated3 = require_generated34();
  160022. Object.keys(_generated3).forEach(function(key) {
  160023. if (key === "default" || key === "__esModule")
  160024. return;
  160025. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160026. return;
  160027. if (key in exports && exports[key] === _generated3[key])
  160028. return;
  160029. Object.defineProperty(exports, key, {
  160030. enumerable: true,
  160031. get: function() {
  160032. return _generated3[key];
  160033. }
  160034. });
  160035. });
  160036. var _constants = require_constants7();
  160037. Object.keys(_constants).forEach(function(key) {
  160038. if (key === "default" || key === "__esModule")
  160039. return;
  160040. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160041. return;
  160042. if (key in exports && exports[key] === _constants[key])
  160043. return;
  160044. Object.defineProperty(exports, key, {
  160045. enumerable: true,
  160046. get: function() {
  160047. return _constants[key];
  160048. }
  160049. });
  160050. });
  160051. var _ensureBlock = require_ensureBlock7();
  160052. var _toBindingIdentifierName = require_toBindingIdentifierName7();
  160053. var _toBlock = require_toBlock7();
  160054. var _toComputedKey = require_toComputedKey7();
  160055. var _toExpression = require_toExpression7();
  160056. var _toIdentifier = require_toIdentifier7();
  160057. var _toKeyAlias = require_toKeyAlias7();
  160058. var _toSequenceExpression = require_toSequenceExpression7();
  160059. var _toStatement = require_toStatement7();
  160060. var _valueToNode = require_valueToNode7();
  160061. var _definitions = require_definitions7();
  160062. Object.keys(_definitions).forEach(function(key) {
  160063. if (key === "default" || key === "__esModule")
  160064. return;
  160065. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160066. return;
  160067. if (key in exports && exports[key] === _definitions[key])
  160068. return;
  160069. Object.defineProperty(exports, key, {
  160070. enumerable: true,
  160071. get: function() {
  160072. return _definitions[key];
  160073. }
  160074. });
  160075. });
  160076. var _appendToMemberExpression = require_appendToMemberExpression7();
  160077. var _inherits = require_inherits7();
  160078. var _prependToMemberExpression = require_prependToMemberExpression7();
  160079. var _removeProperties = require_removeProperties7();
  160080. var _removePropertiesDeep = require_removePropertiesDeep7();
  160081. var _removeTypeDuplicates = require_removeTypeDuplicates13();
  160082. var _getBindingIdentifiers = require_getBindingIdentifiers7();
  160083. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers7();
  160084. var _traverse = require_traverse7();
  160085. Object.keys(_traverse).forEach(function(key) {
  160086. if (key === "default" || key === "__esModule")
  160087. return;
  160088. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160089. return;
  160090. if (key in exports && exports[key] === _traverse[key])
  160091. return;
  160092. Object.defineProperty(exports, key, {
  160093. enumerable: true,
  160094. get: function() {
  160095. return _traverse[key];
  160096. }
  160097. });
  160098. });
  160099. var _traverseFast = require_traverseFast7();
  160100. var _shallowEqual = require_shallowEqual7();
  160101. var _is = require_is7();
  160102. var _isBinding = require_isBinding7();
  160103. var _isBlockScoped = require_isBlockScoped7();
  160104. var _isImmutable = require_isImmutable7();
  160105. var _isLet = require_isLet7();
  160106. var _isNode = require_isNode7();
  160107. var _isNodesEquivalent = require_isNodesEquivalent7();
  160108. var _isPlaceholderType = require_isPlaceholderType7();
  160109. var _isReferenced = require_isReferenced7();
  160110. var _isScope = require_isScope7();
  160111. var _isSpecifierDefault = require_isSpecifierDefault7();
  160112. var _isType = require_isType7();
  160113. var _isValidES3Identifier = require_isValidES3Identifier7();
  160114. var _isValidIdentifier = require_isValidIdentifier7();
  160115. var _isVar = require_isVar7();
  160116. var _matchesPattern = require_matchesPattern7();
  160117. var _validate = require_validate7();
  160118. var _buildMatchMemberExpression = require_buildMatchMemberExpression7();
  160119. var _generated4 = require_generated31();
  160120. Object.keys(_generated4).forEach(function(key) {
  160121. if (key === "default" || key === "__esModule")
  160122. return;
  160123. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160124. return;
  160125. if (key in exports && exports[key] === _generated4[key])
  160126. return;
  160127. Object.defineProperty(exports, key, {
  160128. enumerable: true,
  160129. get: function() {
  160130. return _generated4[key];
  160131. }
  160132. });
  160133. });
  160134. var _generated5 = require_generated35();
  160135. Object.keys(_generated5).forEach(function(key) {
  160136. if (key === "default" || key === "__esModule")
  160137. return;
  160138. if (Object.prototype.hasOwnProperty.call(_exportNames, key))
  160139. return;
  160140. if (key in exports && exports[key] === _generated5[key])
  160141. return;
  160142. Object.defineProperty(exports, key, {
  160143. enumerable: true,
  160144. get: function() {
  160145. return _generated5[key];
  160146. }
  160147. });
  160148. });
  160149. var react = {
  160150. isReactComponent: _isReactComponent.default,
  160151. isCompatTag: _isCompatTag.default,
  160152. buildChildren: _buildChildren.default
  160153. };
  160154. exports.react = react;
  160155. }
  160156. });
  160157. // node_modules/@babel/traverse/node_modules/@babel/helper-function-name/lib/index.js
  160158. var require_lib36 = __commonJS({
  160159. "node_modules/@babel/traverse/node_modules/@babel/helper-function-name/lib/index.js"(exports) {
  160160. "use strict";
  160161. Object.defineProperty(exports, "__esModule", {
  160162. value: true
  160163. });
  160164. exports.default = _default;
  160165. var _helperGetFunctionArity = require_lib28();
  160166. var _template = require_lib34();
  160167. var t2 = require_lib35();
  160168. var buildPropertyMethodAssignmentWrapper = (0, _template.default)(`
  160169. (function (FUNCTION_KEY) {
  160170. function FUNCTION_ID() {
  160171. return FUNCTION_KEY.apply(this, arguments);
  160172. }
  160173. FUNCTION_ID.toString = function () {
  160174. return FUNCTION_KEY.toString();
  160175. }
  160176. return FUNCTION_ID;
  160177. })(FUNCTION)
  160178. `);
  160179. var buildGeneratorPropertyMethodAssignmentWrapper = (0, _template.default)(`
  160180. (function (FUNCTION_KEY) {
  160181. function* FUNCTION_ID() {
  160182. return yield* FUNCTION_KEY.apply(this, arguments);
  160183. }
  160184. FUNCTION_ID.toString = function () {
  160185. return FUNCTION_KEY.toString();
  160186. };
  160187. return FUNCTION_ID;
  160188. })(FUNCTION)
  160189. `);
  160190. var visitor = {
  160191. "ReferencedIdentifier|BindingIdentifier"(path, state) {
  160192. if (path.node.name !== state.name)
  160193. return;
  160194. const localDeclar = path.scope.getBindingIdentifier(state.name);
  160195. if (localDeclar !== state.outerDeclar)
  160196. return;
  160197. state.selfReference = true;
  160198. path.stop();
  160199. }
  160200. };
  160201. function getNameFromLiteralId(id) {
  160202. if (t2.isNullLiteral(id)) {
  160203. return "null";
  160204. }
  160205. if (t2.isRegExpLiteral(id)) {
  160206. return `_${id.pattern}_${id.flags}`;
  160207. }
  160208. if (t2.isTemplateLiteral(id)) {
  160209. return id.quasis.map((quasi) => quasi.value.raw).join("");
  160210. }
  160211. if (id.value !== void 0) {
  160212. return id.value + "";
  160213. }
  160214. return "";
  160215. }
  160216. function wrap3(state, method, id, scope) {
  160217. if (state.selfReference) {
  160218. if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
  160219. scope.rename(id.name);
  160220. } else {
  160221. if (!t2.isFunction(method))
  160222. return;
  160223. let build = buildPropertyMethodAssignmentWrapper;
  160224. if (method.generator) {
  160225. build = buildGeneratorPropertyMethodAssignmentWrapper;
  160226. }
  160227. const template = build({
  160228. FUNCTION: method,
  160229. FUNCTION_ID: id,
  160230. FUNCTION_KEY: scope.generateUidIdentifier(id.name)
  160231. }).expression;
  160232. const params = template.callee.body.body[0].params;
  160233. for (let i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
  160234. params.push(scope.generateUidIdentifier("x"));
  160235. }
  160236. return template;
  160237. }
  160238. }
  160239. method.id = id;
  160240. scope.getProgramParent().references[id.name] = true;
  160241. }
  160242. function visit4(node, name2, scope) {
  160243. const state = {
  160244. selfAssignment: false,
  160245. selfReference: false,
  160246. outerDeclar: scope.getBindingIdentifier(name2),
  160247. references: [],
  160248. name: name2
  160249. };
  160250. const binding = scope.getOwnBinding(name2);
  160251. if (binding) {
  160252. if (binding.kind === "param") {
  160253. state.selfReference = true;
  160254. } else {
  160255. }
  160256. } else if (state.outerDeclar || scope.hasGlobal(name2)) {
  160257. scope.traverse(node, visitor, state);
  160258. }
  160259. return state;
  160260. }
  160261. function _default({
  160262. node,
  160263. parent,
  160264. scope,
  160265. id
  160266. }, localBinding = false) {
  160267. if (node.id)
  160268. return;
  160269. if ((t2.isObjectProperty(parent) || t2.isObjectMethod(parent, {
  160270. kind: "method"
  160271. })) && (!parent.computed || t2.isLiteral(parent.key))) {
  160272. id = parent.key;
  160273. } else if (t2.isVariableDeclarator(parent)) {
  160274. id = parent.id;
  160275. if (t2.isIdentifier(id) && !localBinding) {
  160276. const binding = scope.parent.getBinding(id.name);
  160277. if (binding && binding.constant && scope.getBinding(id.name) === binding) {
  160278. node.id = t2.cloneNode(id);
  160279. node.id[t2.NOT_LOCAL_BINDING] = true;
  160280. return;
  160281. }
  160282. }
  160283. } else if (t2.isAssignmentExpression(parent, {
  160284. operator: "="
  160285. })) {
  160286. id = parent.left;
  160287. } else if (!id) {
  160288. return;
  160289. }
  160290. let name2;
  160291. if (id && t2.isLiteral(id)) {
  160292. name2 = getNameFromLiteralId(id);
  160293. } else if (id && t2.isIdentifier(id)) {
  160294. name2 = id.name;
  160295. }
  160296. if (name2 === void 0) {
  160297. return;
  160298. }
  160299. name2 = t2.toBindingIdentifierName(name2);
  160300. id = t2.identifier(name2);
  160301. id[t2.NOT_LOCAL_BINDING] = true;
  160302. const state = visit4(node, name2, scope);
  160303. return wrap3(state, node, id, scope) || node;
  160304. }
  160305. }
  160306. });
  160307. // node_modules/@babel/traverse/lib/path/conversion.js
  160308. var require_conversion2 = __commonJS({
  160309. "node_modules/@babel/traverse/lib/path/conversion.js"(exports) {
  160310. "use strict";
  160311. Object.defineProperty(exports, "__esModule", {
  160312. value: true
  160313. });
  160314. exports.toComputedKey = toComputedKey;
  160315. exports.ensureBlock = ensureBlock;
  160316. exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
  160317. exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
  160318. exports.arrowFunctionToExpression = arrowFunctionToExpression;
  160319. var t2 = require_lib2();
  160320. var _helperFunctionName = require_lib36();
  160321. function toComputedKey() {
  160322. let key;
  160323. if (this.isMemberExpression()) {
  160324. key = this.node.property;
  160325. } else if (this.isProperty() || this.isMethod()) {
  160326. key = this.node.key;
  160327. } else {
  160328. throw new ReferenceError("todo");
  160329. }
  160330. if (!this.node.computed) {
  160331. if (t2.isIdentifier(key))
  160332. key = t2.stringLiteral(key.name);
  160333. }
  160334. return key;
  160335. }
  160336. function ensureBlock() {
  160337. const body = this.get("body");
  160338. const bodyNode = body.node;
  160339. if (Array.isArray(body)) {
  160340. throw new Error("Can't convert array path to a block statement");
  160341. }
  160342. if (!bodyNode) {
  160343. throw new Error("Can't convert node without a body");
  160344. }
  160345. if (body.isBlockStatement()) {
  160346. return bodyNode;
  160347. }
  160348. const statements = [];
  160349. let stringPath = "body";
  160350. let key;
  160351. let listKey;
  160352. if (body.isStatement()) {
  160353. listKey = "body";
  160354. key = 0;
  160355. statements.push(body.node);
  160356. } else {
  160357. stringPath += ".body.0";
  160358. if (this.isFunction()) {
  160359. key = "argument";
  160360. statements.push(t2.returnStatement(body.node));
  160361. } else {
  160362. key = "expression";
  160363. statements.push(t2.expressionStatement(body.node));
  160364. }
  160365. }
  160366. this.node.body = t2.blockStatement(statements);
  160367. const parentPath = this.get(stringPath);
  160368. body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
  160369. return this.node;
  160370. }
  160371. function arrowFunctionToShadowed() {
  160372. if (!this.isArrowFunctionExpression())
  160373. return;
  160374. this.arrowFunctionToExpression();
  160375. }
  160376. function unwrapFunctionEnvironment() {
  160377. if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
  160378. throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
  160379. }
  160380. hoistFunctionEnvironment(this);
  160381. }
  160382. function arrowFunctionToExpression({
  160383. allowInsertArrow = true,
  160384. specCompliant = false,
  160385. noNewArrows = !specCompliant
  160386. } = {}) {
  160387. if (!this.isArrowFunctionExpression()) {
  160388. throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
  160389. }
  160390. const thisBinding = hoistFunctionEnvironment(this, noNewArrows, allowInsertArrow);
  160391. this.ensureBlock();
  160392. this.node.type = "FunctionExpression";
  160393. if (!noNewArrows) {
  160394. const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
  160395. if (checkBinding) {
  160396. this.parentPath.scope.push({
  160397. id: checkBinding,
  160398. init: t2.objectExpression([])
  160399. });
  160400. }
  160401. this.get("body").unshiftContainer("body", t2.expressionStatement(t2.callExpression(this.hub.addHelper("newArrowCheck"), [t2.thisExpression(), checkBinding ? t2.identifier(checkBinding.name) : t2.identifier(thisBinding)])));
  160402. this.replaceWith(t2.callExpression(t2.memberExpression((0, _helperFunctionName.default)(this, true) || this.node, t2.identifier("bind")), [checkBinding ? t2.identifier(checkBinding.name) : t2.thisExpression()]));
  160403. }
  160404. }
  160405. function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow = true) {
  160406. const thisEnvFn = fnPath.findParent((p) => {
  160407. return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
  160408. static: false
  160409. });
  160410. });
  160411. const inConstructor = (thisEnvFn == null ? void 0 : thisEnvFn.node.kind) === "constructor";
  160412. if (thisEnvFn.isClassProperty()) {
  160413. throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
  160414. }
  160415. const {
  160416. thisPaths,
  160417. argumentsPaths,
  160418. newTargetPaths,
  160419. superProps,
  160420. superCalls
  160421. } = getScopeInformation(fnPath);
  160422. if (inConstructor && superCalls.length > 0) {
  160423. if (!allowInsertArrow) {
  160424. throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
  160425. }
  160426. const allSuperCalls = [];
  160427. thisEnvFn.traverse({
  160428. Function(child) {
  160429. if (child.isArrowFunctionExpression())
  160430. return;
  160431. child.skip();
  160432. },
  160433. ClassProperty(child) {
  160434. child.skip();
  160435. },
  160436. CallExpression(child) {
  160437. if (!child.get("callee").isSuper())
  160438. return;
  160439. allSuperCalls.push(child);
  160440. }
  160441. });
  160442. const superBinding = getSuperBinding(thisEnvFn);
  160443. allSuperCalls.forEach((superCall) => {
  160444. const callee = t2.identifier(superBinding);
  160445. callee.loc = superCall.node.callee.loc;
  160446. superCall.get("callee").replaceWith(callee);
  160447. });
  160448. }
  160449. if (argumentsPaths.length > 0) {
  160450. const argumentsBinding = getBinding(thisEnvFn, "arguments", () => {
  160451. const args = () => t2.identifier("arguments");
  160452. if (thisEnvFn.scope.path.isProgram()) {
  160453. return t2.conditionalExpression(t2.binaryExpression("===", t2.unaryExpression("typeof", args()), t2.stringLiteral("undefined")), thisEnvFn.scope.buildUndefinedNode(), args());
  160454. } else {
  160455. return args();
  160456. }
  160457. });
  160458. argumentsPaths.forEach((argumentsChild) => {
  160459. const argsRef = t2.identifier(argumentsBinding);
  160460. argsRef.loc = argumentsChild.node.loc;
  160461. argumentsChild.replaceWith(argsRef);
  160462. });
  160463. }
  160464. if (newTargetPaths.length > 0) {
  160465. const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t2.metaProperty(t2.identifier("new"), t2.identifier("target")));
  160466. newTargetPaths.forEach((targetChild) => {
  160467. const targetRef = t2.identifier(newTargetBinding);
  160468. targetRef.loc = targetChild.node.loc;
  160469. targetChild.replaceWith(targetRef);
  160470. });
  160471. }
  160472. if (superProps.length > 0) {
  160473. if (!allowInsertArrow) {
  160474. throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
  160475. }
  160476. const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
  160477. flatSuperProps.forEach((superProp) => {
  160478. const key = superProp.node.computed ? "" : superProp.get("property").node.name;
  160479. const isAssignment = superProp.parentPath.isAssignmentExpression({
  160480. left: superProp.node
  160481. });
  160482. const isCall = superProp.parentPath.isCallExpression({
  160483. callee: superProp.node
  160484. });
  160485. const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
  160486. const args = [];
  160487. if (superProp.node.computed) {
  160488. args.push(superProp.get("property").node);
  160489. }
  160490. if (isAssignment) {
  160491. const value = superProp.parentPath.node.right;
  160492. args.push(value);
  160493. }
  160494. const call = t2.callExpression(t2.identifier(superBinding), args);
  160495. if (isCall) {
  160496. superProp.parentPath.unshiftContainer("arguments", t2.thisExpression());
  160497. superProp.replaceWith(t2.memberExpression(call, t2.identifier("call")));
  160498. thisPaths.push(superProp.parentPath.get("arguments.0"));
  160499. } else if (isAssignment) {
  160500. superProp.parentPath.replaceWith(call);
  160501. } else {
  160502. superProp.replaceWith(call);
  160503. }
  160504. });
  160505. }
  160506. let thisBinding;
  160507. if (thisPaths.length > 0 || !noNewArrows) {
  160508. thisBinding = getThisBinding(thisEnvFn, inConstructor);
  160509. if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
  160510. thisPaths.forEach((thisChild) => {
  160511. const thisRef = thisChild.isJSX() ? t2.jsxIdentifier(thisBinding) : t2.identifier(thisBinding);
  160512. thisRef.loc = thisChild.node.loc;
  160513. thisChild.replaceWith(thisRef);
  160514. });
  160515. if (!noNewArrows)
  160516. thisBinding = null;
  160517. }
  160518. }
  160519. return thisBinding;
  160520. }
  160521. function standardizeSuperProperty(superProp) {
  160522. if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
  160523. const assignmentPath = superProp.parentPath;
  160524. const op = assignmentPath.node.operator.slice(0, -1);
  160525. const value = assignmentPath.node.right;
  160526. assignmentPath.node.operator = "=";
  160527. if (superProp.node.computed) {
  160528. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  160529. assignmentPath.get("left").replaceWith(t2.memberExpression(superProp.node.object, t2.assignmentExpression("=", tmp, superProp.node.property), true));
  160530. assignmentPath.get("right").replaceWith(t2.binaryExpression(op, t2.memberExpression(superProp.node.object, t2.identifier(tmp.name), true), value));
  160531. } else {
  160532. assignmentPath.get("left").replaceWith(t2.memberExpression(superProp.node.object, superProp.node.property));
  160533. assignmentPath.get("right").replaceWith(t2.binaryExpression(op, t2.memberExpression(superProp.node.object, t2.identifier(superProp.node.property.name)), value));
  160534. }
  160535. return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
  160536. } else if (superProp.parentPath.isUpdateExpression()) {
  160537. const updateExpr = superProp.parentPath;
  160538. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  160539. const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
  160540. const parts = [t2.assignmentExpression("=", tmp, t2.memberExpression(superProp.node.object, computedKey ? t2.assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t2.assignmentExpression("=", t2.memberExpression(superProp.node.object, computedKey ? t2.identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t2.binaryExpression("+", t2.identifier(tmp.name), t2.numericLiteral(1)))];
  160541. if (!superProp.parentPath.node.prefix) {
  160542. parts.push(t2.identifier(tmp.name));
  160543. }
  160544. updateExpr.replaceWith(t2.sequenceExpression(parts));
  160545. const left = updateExpr.get("expressions.0.right");
  160546. const right = updateExpr.get("expressions.1.left");
  160547. return [left, right];
  160548. }
  160549. return [superProp];
  160550. }
  160551. function hasSuperClass(thisEnvFn) {
  160552. return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
  160553. }
  160554. function getThisBinding(thisEnvFn, inConstructor) {
  160555. return getBinding(thisEnvFn, "this", (thisBinding) => {
  160556. if (!inConstructor || !hasSuperClass(thisEnvFn))
  160557. return t2.thisExpression();
  160558. const supers = /* @__PURE__ */ new WeakSet();
  160559. thisEnvFn.traverse({
  160560. Function(child) {
  160561. if (child.isArrowFunctionExpression())
  160562. return;
  160563. child.skip();
  160564. },
  160565. ClassProperty(child) {
  160566. child.skip();
  160567. },
  160568. CallExpression(child) {
  160569. if (!child.get("callee").isSuper())
  160570. return;
  160571. if (supers.has(child.node))
  160572. return;
  160573. supers.add(child.node);
  160574. child.replaceWithMultiple([child.node, t2.assignmentExpression("=", t2.identifier(thisBinding), t2.identifier("this"))]);
  160575. }
  160576. });
  160577. });
  160578. }
  160579. function getSuperBinding(thisEnvFn) {
  160580. return getBinding(thisEnvFn, "supercall", () => {
  160581. const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
  160582. return t2.arrowFunctionExpression([t2.restElement(argsBinding)], t2.callExpression(t2.super(), [t2.spreadElement(t2.identifier(argsBinding.name))]));
  160583. });
  160584. }
  160585. function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
  160586. const op = isAssignment ? "set" : "get";
  160587. return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
  160588. const argsList = [];
  160589. let fnBody;
  160590. if (propName) {
  160591. fnBody = t2.memberExpression(t2.super(), t2.identifier(propName));
  160592. } else {
  160593. const method = thisEnvFn.scope.generateUidIdentifier("prop");
  160594. argsList.unshift(method);
  160595. fnBody = t2.memberExpression(t2.super(), t2.identifier(method.name), true);
  160596. }
  160597. if (isAssignment) {
  160598. const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
  160599. argsList.push(valueIdent);
  160600. fnBody = t2.assignmentExpression("=", fnBody, t2.identifier(valueIdent.name));
  160601. }
  160602. return t2.arrowFunctionExpression(argsList, fnBody);
  160603. });
  160604. }
  160605. function getBinding(thisEnvFn, key, init) {
  160606. const cacheKey = "binding:" + key;
  160607. let data2 = thisEnvFn.getData(cacheKey);
  160608. if (!data2) {
  160609. const id = thisEnvFn.scope.generateUidIdentifier(key);
  160610. data2 = id.name;
  160611. thisEnvFn.setData(cacheKey, data2);
  160612. thisEnvFn.scope.push({
  160613. id,
  160614. init: init(data2)
  160615. });
  160616. }
  160617. return data2;
  160618. }
  160619. function getScopeInformation(fnPath) {
  160620. const thisPaths = [];
  160621. const argumentsPaths = [];
  160622. const newTargetPaths = [];
  160623. const superProps = [];
  160624. const superCalls = [];
  160625. fnPath.traverse({
  160626. ClassProperty(child) {
  160627. child.skip();
  160628. },
  160629. Function(child) {
  160630. if (child.isArrowFunctionExpression())
  160631. return;
  160632. child.skip();
  160633. },
  160634. ThisExpression(child) {
  160635. thisPaths.push(child);
  160636. },
  160637. JSXIdentifier(child) {
  160638. if (child.node.name !== "this")
  160639. return;
  160640. if (!child.parentPath.isJSXMemberExpression({
  160641. object: child.node
  160642. }) && !child.parentPath.isJSXOpeningElement({
  160643. name: child.node
  160644. })) {
  160645. return;
  160646. }
  160647. thisPaths.push(child);
  160648. },
  160649. CallExpression(child) {
  160650. if (child.get("callee").isSuper())
  160651. superCalls.push(child);
  160652. },
  160653. MemberExpression(child) {
  160654. if (child.get("object").isSuper())
  160655. superProps.push(child);
  160656. },
  160657. ReferencedIdentifier(child) {
  160658. if (child.node.name !== "arguments")
  160659. return;
  160660. let curr = child.scope;
  160661. do {
  160662. if (curr.hasOwnBinding("arguments")) {
  160663. curr.rename("arguments");
  160664. return;
  160665. }
  160666. if (curr.path.isFunction() && !curr.path.isArrowFunctionExpression()) {
  160667. break;
  160668. }
  160669. } while (curr = curr.parent);
  160670. argumentsPaths.push(child);
  160671. },
  160672. MetaProperty(child) {
  160673. if (!child.get("meta").isIdentifier({
  160674. name: "new"
  160675. }))
  160676. return;
  160677. if (!child.get("property").isIdentifier({
  160678. name: "target"
  160679. }))
  160680. return;
  160681. newTargetPaths.push(child);
  160682. }
  160683. });
  160684. return {
  160685. thisPaths,
  160686. argumentsPaths,
  160687. newTargetPaths,
  160688. superProps,
  160689. superCalls
  160690. };
  160691. }
  160692. }
  160693. });
  160694. // node_modules/@babel/traverse/lib/path/introspection.js
  160695. var require_introspection2 = __commonJS({
  160696. "node_modules/@babel/traverse/lib/path/introspection.js"(exports) {
  160697. "use strict";
  160698. Object.defineProperty(exports, "__esModule", {
  160699. value: true
  160700. });
  160701. exports.matchesPattern = matchesPattern;
  160702. exports.has = has;
  160703. exports.isStatic = isStatic;
  160704. exports.isnt = isnt;
  160705. exports.equals = equals;
  160706. exports.isNodeType = isNodeType;
  160707. exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
  160708. exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
  160709. exports.isCompletionRecord = isCompletionRecord;
  160710. exports.isStatementOrBlock = isStatementOrBlock;
  160711. exports.referencesImport = referencesImport;
  160712. exports.getSource = getSource;
  160713. exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
  160714. exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
  160715. exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
  160716. exports.resolve = resolve;
  160717. exports._resolve = _resolve;
  160718. exports.isConstantExpression = isConstantExpression;
  160719. exports.isInStrictMode = isInStrictMode;
  160720. exports.is = void 0;
  160721. var t2 = require_lib2();
  160722. function matchesPattern(pattern, allowPartial) {
  160723. return t2.matchesPattern(this.node, pattern, allowPartial);
  160724. }
  160725. function has(key) {
  160726. const val = this.node && this.node[key];
  160727. if (val && Array.isArray(val)) {
  160728. return !!val.length;
  160729. } else {
  160730. return !!val;
  160731. }
  160732. }
  160733. function isStatic() {
  160734. return this.scope.isStatic(this.node);
  160735. }
  160736. var is = has;
  160737. exports.is = is;
  160738. function isnt(key) {
  160739. return !this.has(key);
  160740. }
  160741. function equals(key, value) {
  160742. return this.node[key] === value;
  160743. }
  160744. function isNodeType(type) {
  160745. return t2.isType(this.type, type);
  160746. }
  160747. function canHaveVariableDeclarationOrExpression() {
  160748. return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
  160749. }
  160750. function canSwapBetweenExpressionAndStatement(replacement) {
  160751. if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
  160752. return false;
  160753. }
  160754. if (this.isExpression()) {
  160755. return t2.isBlockStatement(replacement);
  160756. } else if (this.isBlockStatement()) {
  160757. return t2.isExpression(replacement);
  160758. }
  160759. return false;
  160760. }
  160761. function isCompletionRecord(allowInsideFunction) {
  160762. let path = this;
  160763. let first = true;
  160764. do {
  160765. const container = path.container;
  160766. if (path.isFunction() && !first) {
  160767. return !!allowInsideFunction;
  160768. }
  160769. first = false;
  160770. if (Array.isArray(container) && path.key !== container.length - 1) {
  160771. return false;
  160772. }
  160773. } while ((path = path.parentPath) && !path.isProgram());
  160774. return true;
  160775. }
  160776. function isStatementOrBlock() {
  160777. if (this.parentPath.isLabeledStatement() || t2.isBlockStatement(this.container)) {
  160778. return false;
  160779. } else {
  160780. return t2.STATEMENT_OR_BLOCK_KEYS.includes(this.key);
  160781. }
  160782. }
  160783. function referencesImport(moduleSource, importName) {
  160784. if (!this.isReferencedIdentifier()) {
  160785. if ((this.isMemberExpression() || this.isOptionalMemberExpression()) && (this.node.computed ? t2.isStringLiteral(this.node.property, {
  160786. value: importName
  160787. }) : this.node.property.name === importName)) {
  160788. const object = this.get("object");
  160789. return object.isReferencedIdentifier() && object.referencesImport(moduleSource, "*");
  160790. }
  160791. return false;
  160792. }
  160793. const binding = this.scope.getBinding(this.node.name);
  160794. if (!binding || binding.kind !== "module")
  160795. return false;
  160796. const path = binding.path;
  160797. const parent = path.parentPath;
  160798. if (!parent.isImportDeclaration())
  160799. return false;
  160800. if (parent.node.source.value === moduleSource) {
  160801. if (!importName)
  160802. return true;
  160803. } else {
  160804. return false;
  160805. }
  160806. if (path.isImportDefaultSpecifier() && importName === "default") {
  160807. return true;
  160808. }
  160809. if (path.isImportNamespaceSpecifier() && importName === "*") {
  160810. return true;
  160811. }
  160812. if (path.isImportSpecifier() && t2.isIdentifier(path.node.imported, {
  160813. name: importName
  160814. })) {
  160815. return true;
  160816. }
  160817. return false;
  160818. }
  160819. function getSource() {
  160820. const node = this.node;
  160821. if (node.end) {
  160822. const code2 = this.hub.getCode();
  160823. if (code2)
  160824. return code2.slice(node.start, node.end);
  160825. }
  160826. return "";
  160827. }
  160828. function willIMaybeExecuteBefore(target) {
  160829. return this._guessExecutionStatusRelativeTo(target) !== "after";
  160830. }
  160831. function getOuterFunction(path) {
  160832. return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path;
  160833. }
  160834. function isExecutionUncertain(type, key) {
  160835. switch (type) {
  160836. case "LogicalExpression":
  160837. return key === "right";
  160838. case "ConditionalExpression":
  160839. case "IfStatement":
  160840. return key === "consequent" || key === "alternate";
  160841. case "WhileStatement":
  160842. case "DoWhileStatement":
  160843. case "ForInStatement":
  160844. case "ForOfStatement":
  160845. return key === "body";
  160846. case "ForStatement":
  160847. return key === "body" || key === "update";
  160848. case "SwitchStatement":
  160849. return key === "cases";
  160850. case "TryStatement":
  160851. return key === "handler";
  160852. case "AssignmentPattern":
  160853. return key === "right";
  160854. case "OptionalMemberExpression":
  160855. return key === "property";
  160856. case "OptionalCallExpression":
  160857. return key === "arguments";
  160858. default:
  160859. return false;
  160860. }
  160861. }
  160862. function isExecutionUncertainInList(paths, maxIndex) {
  160863. for (let i = 0; i < maxIndex; i++) {
  160864. const path = paths[i];
  160865. if (isExecutionUncertain(path.parent.type, path.parentKey)) {
  160866. return true;
  160867. }
  160868. }
  160869. return false;
  160870. }
  160871. function _guessExecutionStatusRelativeTo(target) {
  160872. const funcParent = {
  160873. this: getOuterFunction(this),
  160874. target: getOuterFunction(target)
  160875. };
  160876. if (funcParent.target.node !== funcParent.this.node) {
  160877. return this._guessExecutionStatusRelativeToDifferentFunctions(funcParent.target);
  160878. }
  160879. const paths = {
  160880. target: target.getAncestry(),
  160881. this: this.getAncestry()
  160882. };
  160883. if (paths.target.indexOf(this) >= 0)
  160884. return "after";
  160885. if (paths.this.indexOf(target) >= 0)
  160886. return "before";
  160887. let commonPath;
  160888. const commonIndex = {
  160889. target: 0,
  160890. this: 0
  160891. };
  160892. while (!commonPath && commonIndex.this < paths.this.length) {
  160893. const path = paths.this[commonIndex.this];
  160894. commonIndex.target = paths.target.indexOf(path);
  160895. if (commonIndex.target >= 0) {
  160896. commonPath = path;
  160897. } else {
  160898. commonIndex.this++;
  160899. }
  160900. }
  160901. if (!commonPath) {
  160902. throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");
  160903. }
  160904. if (isExecutionUncertainInList(paths.this, commonIndex.this - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
  160905. return "unknown";
  160906. }
  160907. const divergence = {
  160908. this: paths.this[commonIndex.this - 1],
  160909. target: paths.target[commonIndex.target - 1]
  160910. };
  160911. if (divergence.target.listKey && divergence.this.listKey && divergence.target.container === divergence.this.container) {
  160912. return divergence.target.key > divergence.this.key ? "before" : "after";
  160913. }
  160914. const keys2 = t2.VISITOR_KEYS[commonPath.type];
  160915. const keyPosition = {
  160916. this: keys2.indexOf(divergence.this.parentKey),
  160917. target: keys2.indexOf(divergence.target.parentKey)
  160918. };
  160919. return keyPosition.target > keyPosition.this ? "before" : "after";
  160920. }
  160921. var executionOrderCheckedNodes = /* @__PURE__ */ new WeakSet();
  160922. function _guessExecutionStatusRelativeToDifferentFunctions(target) {
  160923. if (!target.isFunctionDeclaration() || target.parentPath.isExportDeclaration()) {
  160924. return "unknown";
  160925. }
  160926. const binding = target.scope.getBinding(target.node.id.name);
  160927. if (!binding.references)
  160928. return "before";
  160929. const referencePaths = binding.referencePaths;
  160930. let allStatus;
  160931. for (const path of referencePaths) {
  160932. const childOfFunction = !!path.find((path2) => path2.node === target.node);
  160933. if (childOfFunction)
  160934. continue;
  160935. if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
  160936. return "unknown";
  160937. }
  160938. if (executionOrderCheckedNodes.has(path.node))
  160939. continue;
  160940. executionOrderCheckedNodes.add(path.node);
  160941. const status = this._guessExecutionStatusRelativeTo(path);
  160942. executionOrderCheckedNodes.delete(path.node);
  160943. if (allStatus && allStatus !== status) {
  160944. return "unknown";
  160945. } else {
  160946. allStatus = status;
  160947. }
  160948. }
  160949. return allStatus;
  160950. }
  160951. function resolve(dangerous, resolved) {
  160952. return this._resolve(dangerous, resolved) || this;
  160953. }
  160954. function _resolve(dangerous, resolved) {
  160955. if (resolved && resolved.indexOf(this) >= 0)
  160956. return;
  160957. resolved = resolved || [];
  160958. resolved.push(this);
  160959. if (this.isVariableDeclarator()) {
  160960. if (this.get("id").isIdentifier()) {
  160961. return this.get("init").resolve(dangerous, resolved);
  160962. } else {
  160963. }
  160964. } else if (this.isReferencedIdentifier()) {
  160965. const binding = this.scope.getBinding(this.node.name);
  160966. if (!binding)
  160967. return;
  160968. if (!binding.constant)
  160969. return;
  160970. if (binding.kind === "module")
  160971. return;
  160972. if (binding.path !== this) {
  160973. const ret = binding.path.resolve(dangerous, resolved);
  160974. if (this.find((parent) => parent.node === ret.node))
  160975. return;
  160976. return ret;
  160977. }
  160978. } else if (this.isTypeCastExpression()) {
  160979. return this.get("expression").resolve(dangerous, resolved);
  160980. } else if (dangerous && this.isMemberExpression()) {
  160981. const targetKey = this.toComputedKey();
  160982. if (!t2.isLiteral(targetKey))
  160983. return;
  160984. const targetName = targetKey.value;
  160985. const target = this.get("object").resolve(dangerous, resolved);
  160986. if (target.isObjectExpression()) {
  160987. const props = target.get("properties");
  160988. for (const prop of props) {
  160989. if (!prop.isProperty())
  160990. continue;
  160991. const key = prop.get("key");
  160992. let match = prop.isnt("computed") && key.isIdentifier({
  160993. name: targetName
  160994. });
  160995. match = match || key.isLiteral({
  160996. value: targetName
  160997. });
  160998. if (match)
  160999. return prop.get("value").resolve(dangerous, resolved);
  161000. }
  161001. } else if (target.isArrayExpression() && !isNaN(+targetName)) {
  161002. const elems = target.get("elements");
  161003. const elem = elems[targetName];
  161004. if (elem)
  161005. return elem.resolve(dangerous, resolved);
  161006. }
  161007. }
  161008. }
  161009. function isConstantExpression() {
  161010. if (this.isIdentifier()) {
  161011. const binding = this.scope.getBinding(this.node.name);
  161012. if (!binding)
  161013. return false;
  161014. return binding.constant;
  161015. }
  161016. if (this.isLiteral()) {
  161017. if (this.isRegExpLiteral()) {
  161018. return false;
  161019. }
  161020. if (this.isTemplateLiteral()) {
  161021. return this.get("expressions").every((expression) => expression.isConstantExpression());
  161022. }
  161023. return true;
  161024. }
  161025. if (this.isUnaryExpression()) {
  161026. if (this.node.operator !== "void") {
  161027. return false;
  161028. }
  161029. return this.get("argument").isConstantExpression();
  161030. }
  161031. if (this.isBinaryExpression()) {
  161032. return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
  161033. }
  161034. return false;
  161035. }
  161036. function isInStrictMode() {
  161037. const start3 = this.isProgram() ? this : this.parentPath;
  161038. const strictParent = start3.find((path) => {
  161039. if (path.isProgram({
  161040. sourceType: "module"
  161041. }))
  161042. return true;
  161043. if (path.isClass())
  161044. return true;
  161045. if (!path.isProgram() && !path.isFunction())
  161046. return false;
  161047. if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
  161048. return false;
  161049. }
  161050. const body = path.isFunction() ? path.node.body : path.node;
  161051. for (const directive of body.directives) {
  161052. if (directive.value.value === "use strict") {
  161053. return true;
  161054. }
  161055. }
  161056. });
  161057. return !!strictParent;
  161058. }
  161059. }
  161060. });
  161061. // node_modules/@babel/traverse/lib/path/context.js
  161062. var require_context3 = __commonJS({
  161063. "node_modules/@babel/traverse/lib/path/context.js"(exports) {
  161064. "use strict";
  161065. Object.defineProperty(exports, "__esModule", {
  161066. value: true
  161067. });
  161068. exports.call = call;
  161069. exports._call = _call;
  161070. exports.isBlacklisted = exports.isDenylisted = isDenylisted;
  161071. exports.visit = visit4;
  161072. exports.skip = skip;
  161073. exports.skipKey = skipKey;
  161074. exports.stop = stop;
  161075. exports.setScope = setScope;
  161076. exports.setContext = setContext;
  161077. exports.resync = resync;
  161078. exports._resyncParent = _resyncParent;
  161079. exports._resyncKey = _resyncKey;
  161080. exports._resyncList = _resyncList;
  161081. exports._resyncRemoved = _resyncRemoved;
  161082. exports.popContext = popContext;
  161083. exports.pushContext = pushContext;
  161084. exports.setup = setup;
  161085. exports.setKey = setKey;
  161086. exports.requeue = requeue;
  161087. exports._getQueueContexts = _getQueueContexts;
  161088. var _index = require_lib37();
  161089. var _index2 = require_path2();
  161090. function call(key) {
  161091. const opts = this.opts;
  161092. this.debug(key);
  161093. if (this.node) {
  161094. if (this._call(opts[key]))
  161095. return true;
  161096. }
  161097. if (this.node) {
  161098. return this._call(opts[this.node.type] && opts[this.node.type][key]);
  161099. }
  161100. return false;
  161101. }
  161102. function _call(fns) {
  161103. if (!fns)
  161104. return false;
  161105. for (const fn of fns) {
  161106. if (!fn)
  161107. continue;
  161108. const node = this.node;
  161109. if (!node)
  161110. return true;
  161111. const ret = fn.call(this.state, this, this.state);
  161112. if (ret && typeof ret === "object" && typeof ret.then === "function") {
  161113. 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.`);
  161114. }
  161115. if (ret) {
  161116. throw new Error(`Unexpected return value from visitor method ${fn}`);
  161117. }
  161118. if (this.node !== node)
  161119. return true;
  161120. if (this._traverseFlags > 0)
  161121. return true;
  161122. }
  161123. return false;
  161124. }
  161125. function isDenylisted() {
  161126. var _this$opts$denylist;
  161127. const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
  161128. return denylist && denylist.indexOf(this.node.type) > -1;
  161129. }
  161130. function visit4() {
  161131. if (!this.node) {
  161132. return false;
  161133. }
  161134. if (this.isDenylisted()) {
  161135. return false;
  161136. }
  161137. if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
  161138. return false;
  161139. }
  161140. if (this.shouldSkip || this.call("enter") || this.shouldSkip) {
  161141. this.debug("Skip...");
  161142. return this.shouldStop;
  161143. }
  161144. this.debug("Recursing into...");
  161145. _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
  161146. this.call("exit");
  161147. return this.shouldStop;
  161148. }
  161149. function skip() {
  161150. this.shouldSkip = true;
  161151. }
  161152. function skipKey(key) {
  161153. if (this.skipKeys == null) {
  161154. this.skipKeys = {};
  161155. }
  161156. this.skipKeys[key] = true;
  161157. }
  161158. function stop() {
  161159. this._traverseFlags |= _index2.SHOULD_SKIP | _index2.SHOULD_STOP;
  161160. }
  161161. function setScope() {
  161162. if (this.opts && this.opts.noScope)
  161163. return;
  161164. let path = this.parentPath;
  161165. if (this.key === "key" && path.isMethod())
  161166. path = path.parentPath;
  161167. let target;
  161168. while (path && !target) {
  161169. if (path.opts && path.opts.noScope)
  161170. return;
  161171. target = path.scope;
  161172. path = path.parentPath;
  161173. }
  161174. this.scope = this.getScope(target);
  161175. if (this.scope)
  161176. this.scope.init();
  161177. }
  161178. function setContext(context) {
  161179. if (this.skipKeys != null) {
  161180. this.skipKeys = {};
  161181. }
  161182. this._traverseFlags = 0;
  161183. if (context) {
  161184. this.context = context;
  161185. this.state = context.state;
  161186. this.opts = context.opts;
  161187. }
  161188. this.setScope();
  161189. return this;
  161190. }
  161191. function resync() {
  161192. if (this.removed)
  161193. return;
  161194. this._resyncParent();
  161195. this._resyncList();
  161196. this._resyncKey();
  161197. }
  161198. function _resyncParent() {
  161199. if (this.parentPath) {
  161200. this.parent = this.parentPath.node;
  161201. }
  161202. }
  161203. function _resyncKey() {
  161204. if (!this.container)
  161205. return;
  161206. if (this.node === this.container[this.key])
  161207. return;
  161208. if (Array.isArray(this.container)) {
  161209. for (let i = 0; i < this.container.length; i++) {
  161210. if (this.container[i] === this.node) {
  161211. return this.setKey(i);
  161212. }
  161213. }
  161214. } else {
  161215. for (const key of Object.keys(this.container)) {
  161216. if (this.container[key] === this.node) {
  161217. return this.setKey(key);
  161218. }
  161219. }
  161220. }
  161221. this.key = null;
  161222. }
  161223. function _resyncList() {
  161224. if (!this.parent || !this.inList)
  161225. return;
  161226. const newContainer = this.parent[this.listKey];
  161227. if (this.container === newContainer)
  161228. return;
  161229. this.container = newContainer || null;
  161230. }
  161231. function _resyncRemoved() {
  161232. if (this.key == null || !this.container || this.container[this.key] !== this.node) {
  161233. this._markRemoved();
  161234. }
  161235. }
  161236. function popContext() {
  161237. this.contexts.pop();
  161238. if (this.contexts.length > 0) {
  161239. this.setContext(this.contexts[this.contexts.length - 1]);
  161240. } else {
  161241. this.setContext(void 0);
  161242. }
  161243. }
  161244. function pushContext(context) {
  161245. this.contexts.push(context);
  161246. this.setContext(context);
  161247. }
  161248. function setup(parentPath, container, listKey, key) {
  161249. this.listKey = listKey;
  161250. this.container = container;
  161251. this.parentPath = parentPath || this.parentPath;
  161252. this.setKey(key);
  161253. }
  161254. function setKey(key) {
  161255. var _this$node;
  161256. this.key = key;
  161257. this.node = this.container[this.key];
  161258. this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
  161259. }
  161260. function requeue(pathToQueue = this) {
  161261. if (pathToQueue.removed)
  161262. return;
  161263. ;
  161264. const contexts = this.contexts;
  161265. for (const context of contexts) {
  161266. context.maybeQueue(pathToQueue);
  161267. }
  161268. }
  161269. function _getQueueContexts() {
  161270. let path = this;
  161271. let contexts = this.contexts;
  161272. while (!contexts.length) {
  161273. path = path.parentPath;
  161274. if (!path)
  161275. break;
  161276. contexts = path.contexts;
  161277. }
  161278. return contexts;
  161279. }
  161280. }
  161281. });
  161282. // node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
  161283. var require_removal_hooks2 = __commonJS({
  161284. "node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports) {
  161285. "use strict";
  161286. Object.defineProperty(exports, "__esModule", {
  161287. value: true
  161288. });
  161289. exports.hooks = void 0;
  161290. var hooks = [function(self2, parent) {
  161291. const removeParent = self2.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self2.key === "declaration" && parent.isExportDeclaration() || self2.key === "body" && parent.isLabeledStatement() || self2.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self2.key === "expression" && parent.isExpressionStatement();
  161292. if (removeParent) {
  161293. parent.remove();
  161294. return true;
  161295. }
  161296. }, function(self2, parent) {
  161297. if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
  161298. parent.replaceWith(parent.node.expressions[0]);
  161299. return true;
  161300. }
  161301. }, function(self2, parent) {
  161302. if (parent.isBinary()) {
  161303. if (self2.key === "left") {
  161304. parent.replaceWith(parent.node.right);
  161305. } else {
  161306. parent.replaceWith(parent.node.left);
  161307. }
  161308. return true;
  161309. }
  161310. }, function(self2, parent) {
  161311. if (parent.isIfStatement() && (self2.key === "consequent" || self2.key === "alternate") || self2.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
  161312. self2.replaceWith({
  161313. type: "BlockStatement",
  161314. body: []
  161315. });
  161316. return true;
  161317. }
  161318. }];
  161319. exports.hooks = hooks;
  161320. }
  161321. });
  161322. // node_modules/@babel/traverse/lib/path/removal.js
  161323. var require_removal2 = __commonJS({
  161324. "node_modules/@babel/traverse/lib/path/removal.js"(exports) {
  161325. "use strict";
  161326. Object.defineProperty(exports, "__esModule", {
  161327. value: true
  161328. });
  161329. exports.remove = remove;
  161330. exports._removeFromScope = _removeFromScope;
  161331. exports._callRemovalHooks = _callRemovalHooks;
  161332. exports._remove = _remove;
  161333. exports._markRemoved = _markRemoved;
  161334. exports._assertUnremoved = _assertUnremoved;
  161335. var _removalHooks = require_removal_hooks2();
  161336. var _cache = require_cache2();
  161337. var _index = require_path2();
  161338. function remove() {
  161339. var _this$opts;
  161340. this._assertUnremoved();
  161341. this.resync();
  161342. if (!((_this$opts = this.opts) != null && _this$opts.noScope)) {
  161343. this._removeFromScope();
  161344. }
  161345. if (this._callRemovalHooks()) {
  161346. this._markRemoved();
  161347. return;
  161348. }
  161349. this.shareCommentsWithSiblings();
  161350. this._remove();
  161351. this._markRemoved();
  161352. }
  161353. function _removeFromScope() {
  161354. const bindings = this.getBindingIdentifiers();
  161355. Object.keys(bindings).forEach((name2) => this.scope.removeBinding(name2));
  161356. }
  161357. function _callRemovalHooks() {
  161358. for (const fn of _removalHooks.hooks) {
  161359. if (fn(this, this.parentPath))
  161360. return true;
  161361. }
  161362. }
  161363. function _remove() {
  161364. if (Array.isArray(this.container)) {
  161365. this.container.splice(this.key, 1);
  161366. this.updateSiblingKeys(this.key, -1);
  161367. } else {
  161368. this._replaceWith(null);
  161369. }
  161370. }
  161371. function _markRemoved() {
  161372. this._traverseFlags |= _index.SHOULD_SKIP | _index.REMOVED;
  161373. if (this.parent)
  161374. _cache.path.get(this.parent).delete(this.node);
  161375. this.node = null;
  161376. }
  161377. function _assertUnremoved() {
  161378. if (this.removed) {
  161379. throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
  161380. }
  161381. }
  161382. }
  161383. });
  161384. // node_modules/@babel/traverse/lib/path/lib/hoister.js
  161385. var require_hoister2 = __commonJS({
  161386. "node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports) {
  161387. "use strict";
  161388. Object.defineProperty(exports, "__esModule", {
  161389. value: true
  161390. });
  161391. exports.default = void 0;
  161392. var t2 = require_lib2();
  161393. var referenceVisitor = {
  161394. ReferencedIdentifier(path, state) {
  161395. if (path.isJSXIdentifier() && t2.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
  161396. return;
  161397. }
  161398. if (path.node.name === "this") {
  161399. let scope = path.scope;
  161400. do {
  161401. if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
  161402. break;
  161403. }
  161404. } while (scope = scope.parent);
  161405. if (scope)
  161406. state.breakOnScopePaths.push(scope.path);
  161407. }
  161408. const binding = path.scope.getBinding(path.node.name);
  161409. if (!binding)
  161410. return;
  161411. for (const violation of binding.constantViolations) {
  161412. if (violation.scope !== binding.path.scope) {
  161413. state.mutableBinding = true;
  161414. path.stop();
  161415. return;
  161416. }
  161417. }
  161418. if (binding !== state.scope.getBinding(path.node.name))
  161419. return;
  161420. state.bindings[path.node.name] = binding;
  161421. }
  161422. };
  161423. var PathHoister = class {
  161424. constructor(path, scope) {
  161425. this.breakOnScopePaths = void 0;
  161426. this.bindings = void 0;
  161427. this.mutableBinding = void 0;
  161428. this.scopes = void 0;
  161429. this.scope = void 0;
  161430. this.path = void 0;
  161431. this.attachAfter = void 0;
  161432. this.breakOnScopePaths = [];
  161433. this.bindings = {};
  161434. this.mutableBinding = false;
  161435. this.scopes = [];
  161436. this.scope = scope;
  161437. this.path = path;
  161438. this.attachAfter = false;
  161439. }
  161440. isCompatibleScope(scope) {
  161441. for (const key of Object.keys(this.bindings)) {
  161442. const binding = this.bindings[key];
  161443. if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
  161444. return false;
  161445. }
  161446. }
  161447. return true;
  161448. }
  161449. getCompatibleScopes() {
  161450. let scope = this.path.scope;
  161451. do {
  161452. if (this.isCompatibleScope(scope)) {
  161453. this.scopes.push(scope);
  161454. } else {
  161455. break;
  161456. }
  161457. if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
  161458. break;
  161459. }
  161460. } while (scope = scope.parent);
  161461. }
  161462. getAttachmentPath() {
  161463. let path = this._getAttachmentPath();
  161464. if (!path)
  161465. return;
  161466. let targetScope = path.scope;
  161467. if (targetScope.path === path) {
  161468. targetScope = path.scope.parent;
  161469. }
  161470. if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
  161471. for (const name2 of Object.keys(this.bindings)) {
  161472. if (!targetScope.hasOwnBinding(name2))
  161473. continue;
  161474. const binding = this.bindings[name2];
  161475. if (binding.kind === "param" || binding.path.parentKey === "params") {
  161476. continue;
  161477. }
  161478. const bindingParentPath = this.getAttachmentParentForPath(binding.path);
  161479. if (bindingParentPath.key >= path.key) {
  161480. this.attachAfter = true;
  161481. path = binding.path;
  161482. for (const violationPath of binding.constantViolations) {
  161483. if (this.getAttachmentParentForPath(violationPath).key > path.key) {
  161484. path = violationPath;
  161485. }
  161486. }
  161487. }
  161488. }
  161489. }
  161490. return path;
  161491. }
  161492. _getAttachmentPath() {
  161493. const scopes = this.scopes;
  161494. const scope = scopes.pop();
  161495. if (!scope)
  161496. return;
  161497. if (scope.path.isFunction()) {
  161498. if (this.hasOwnParamBindings(scope)) {
  161499. if (this.scope === scope)
  161500. return;
  161501. const bodies = scope.path.get("body").get("body");
  161502. for (let i = 0; i < bodies.length; i++) {
  161503. if (bodies[i].node._blockHoist)
  161504. continue;
  161505. return bodies[i];
  161506. }
  161507. } else {
  161508. return this.getNextScopeAttachmentParent();
  161509. }
  161510. } else if (scope.path.isProgram()) {
  161511. return this.getNextScopeAttachmentParent();
  161512. }
  161513. }
  161514. getNextScopeAttachmentParent() {
  161515. const scope = this.scopes.pop();
  161516. if (scope)
  161517. return this.getAttachmentParentForPath(scope.path);
  161518. }
  161519. getAttachmentParentForPath(path) {
  161520. do {
  161521. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  161522. return path;
  161523. }
  161524. } while (path = path.parentPath);
  161525. }
  161526. hasOwnParamBindings(scope) {
  161527. for (const name2 of Object.keys(this.bindings)) {
  161528. if (!scope.hasOwnBinding(name2))
  161529. continue;
  161530. const binding = this.bindings[name2];
  161531. if (binding.kind === "param" && binding.constant)
  161532. return true;
  161533. }
  161534. return false;
  161535. }
  161536. run() {
  161537. this.path.traverse(referenceVisitor, this);
  161538. if (this.mutableBinding)
  161539. return;
  161540. this.getCompatibleScopes();
  161541. const attachTo = this.getAttachmentPath();
  161542. if (!attachTo)
  161543. return;
  161544. if (attachTo.getFunctionParent() === this.path.getFunctionParent())
  161545. return;
  161546. let uid = attachTo.scope.generateUidIdentifier("ref");
  161547. const declarator = t2.variableDeclarator(uid, this.path.node);
  161548. const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
  161549. const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t2.variableDeclaration("var", [declarator])]);
  161550. const parent = this.path.parentPath;
  161551. if (parent.isJSXElement() && this.path.container === parent.node.children) {
  161552. uid = t2.jsxExpressionContainer(uid);
  161553. }
  161554. this.path.replaceWith(t2.cloneNode(uid));
  161555. return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
  161556. }
  161557. };
  161558. exports.default = PathHoister;
  161559. }
  161560. });
  161561. // node_modules/@babel/traverse/lib/path/modification.js
  161562. var require_modification2 = __commonJS({
  161563. "node_modules/@babel/traverse/lib/path/modification.js"(exports) {
  161564. "use strict";
  161565. Object.defineProperty(exports, "__esModule", {
  161566. value: true
  161567. });
  161568. exports.insertBefore = insertBefore;
  161569. exports._containerInsert = _containerInsert;
  161570. exports._containerInsertBefore = _containerInsertBefore;
  161571. exports._containerInsertAfter = _containerInsertAfter;
  161572. exports.insertAfter = insertAfter;
  161573. exports.updateSiblingKeys = updateSiblingKeys;
  161574. exports._verifyNodeList = _verifyNodeList;
  161575. exports.unshiftContainer = unshiftContainer;
  161576. exports.pushContainer = pushContainer;
  161577. exports.hoist = hoist;
  161578. var _cache = require_cache2();
  161579. var _hoister = require_hoister2();
  161580. var _index = require_path2();
  161581. var t2 = require_lib2();
  161582. function insertBefore(nodes_) {
  161583. this._assertUnremoved();
  161584. const nodes = this._verifyNodeList(nodes_);
  161585. const {
  161586. parentPath
  161587. } = this;
  161588. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  161589. return parentPath.insertBefore(nodes);
  161590. } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  161591. if (this.node)
  161592. nodes.push(this.node);
  161593. return this.replaceExpressionWithStatements(nodes);
  161594. } else if (Array.isArray(this.container)) {
  161595. return this._containerInsertBefore(nodes);
  161596. } else if (this.isStatementOrBlock()) {
  161597. const node = this.node;
  161598. const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  161599. this.replaceWith(t2.blockStatement(shouldInsertCurrentNode ? [node] : []));
  161600. return this.unshiftContainer("body", nodes);
  161601. } else {
  161602. 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?");
  161603. }
  161604. }
  161605. function _containerInsert(from, nodes) {
  161606. this.updateSiblingKeys(from, nodes.length);
  161607. const paths = [];
  161608. this.container.splice(from, 0, ...nodes);
  161609. for (let i = 0; i < nodes.length; i++) {
  161610. const to = from + i;
  161611. const path = this.getSibling(to);
  161612. paths.push(path);
  161613. if (this.context && this.context.queue) {
  161614. path.pushContext(this.context);
  161615. }
  161616. }
  161617. const contexts = this._getQueueContexts();
  161618. for (const path of paths) {
  161619. path.setScope();
  161620. path.debug("Inserted.");
  161621. for (const context of contexts) {
  161622. context.maybeQueue(path, true);
  161623. }
  161624. }
  161625. return paths;
  161626. }
  161627. function _containerInsertBefore(nodes) {
  161628. return this._containerInsert(this.key, nodes);
  161629. }
  161630. function _containerInsertAfter(nodes) {
  161631. return this._containerInsert(this.key + 1, nodes);
  161632. }
  161633. function insertAfter(nodes_) {
  161634. this._assertUnremoved();
  161635. const nodes = this._verifyNodeList(nodes_);
  161636. const {
  161637. parentPath
  161638. } = this;
  161639. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  161640. return parentPath.insertAfter(nodes.map((node) => {
  161641. return t2.isExpression(node) ? t2.expressionStatement(node) : node;
  161642. }));
  161643. } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  161644. if (this.node) {
  161645. const node = this.node;
  161646. let {
  161647. scope
  161648. } = this;
  161649. if (scope.path.isPattern()) {
  161650. t2.assertExpression(node);
  161651. this.replaceWith(t2.callExpression(t2.arrowFunctionExpression([], node), []));
  161652. this.get("callee.body").insertAfter(nodes);
  161653. return [this];
  161654. }
  161655. if (parentPath.isMethod({
  161656. computed: true,
  161657. key: node
  161658. })) {
  161659. scope = scope.parent;
  161660. }
  161661. const temp = scope.generateDeclaredUidIdentifier();
  161662. nodes.unshift(t2.expressionStatement(t2.assignmentExpression("=", t2.cloneNode(temp), node)));
  161663. nodes.push(t2.expressionStatement(t2.cloneNode(temp)));
  161664. }
  161665. return this.replaceExpressionWithStatements(nodes);
  161666. } else if (Array.isArray(this.container)) {
  161667. return this._containerInsertAfter(nodes);
  161668. } else if (this.isStatementOrBlock()) {
  161669. const node = this.node;
  161670. const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  161671. this.replaceWith(t2.blockStatement(shouldInsertCurrentNode ? [node] : []));
  161672. return this.pushContainer("body", nodes);
  161673. } else {
  161674. 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?");
  161675. }
  161676. }
  161677. function updateSiblingKeys(fromIndex, incrementBy) {
  161678. if (!this.parent)
  161679. return;
  161680. const paths = _cache.path.get(this.parent);
  161681. for (const [, path] of paths) {
  161682. if (path.key >= fromIndex) {
  161683. path.key += incrementBy;
  161684. }
  161685. }
  161686. }
  161687. function _verifyNodeList(nodes) {
  161688. if (!nodes) {
  161689. return [];
  161690. }
  161691. if (!Array.isArray(nodes)) {
  161692. nodes = [nodes];
  161693. }
  161694. for (let i = 0; i < nodes.length; i++) {
  161695. const node = nodes[i];
  161696. let msg;
  161697. if (!node) {
  161698. msg = "has falsy node";
  161699. } else if (typeof node !== "object") {
  161700. msg = "contains a non-object node";
  161701. } else if (!node.type) {
  161702. msg = "without a type";
  161703. } else if (node instanceof _index.default) {
  161704. msg = "has a NodePath when it expected a raw object";
  161705. }
  161706. if (msg) {
  161707. const type = Array.isArray(node) ? "array" : typeof node;
  161708. throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
  161709. }
  161710. }
  161711. return nodes;
  161712. }
  161713. function unshiftContainer(listKey, nodes) {
  161714. this._assertUnremoved();
  161715. nodes = this._verifyNodeList(nodes);
  161716. const path = _index.default.get({
  161717. parentPath: this,
  161718. parent: this.node,
  161719. container: this.node[listKey],
  161720. listKey,
  161721. key: 0
  161722. }).setContext(this.context);
  161723. return path._containerInsertBefore(nodes);
  161724. }
  161725. function pushContainer(listKey, nodes) {
  161726. this._assertUnremoved();
  161727. const verifiedNodes = this._verifyNodeList(nodes);
  161728. const container = this.node[listKey];
  161729. const path = _index.default.get({
  161730. parentPath: this,
  161731. parent: this.node,
  161732. container,
  161733. listKey,
  161734. key: container.length
  161735. }).setContext(this.context);
  161736. return path.replaceWithMultiple(verifiedNodes);
  161737. }
  161738. function hoist(scope = this.scope) {
  161739. const hoister = new _hoister.default(this, scope);
  161740. return hoister.run();
  161741. }
  161742. }
  161743. });
  161744. // node_modules/@babel/traverse/lib/path/family.js
  161745. var require_family2 = __commonJS({
  161746. "node_modules/@babel/traverse/lib/path/family.js"(exports) {
  161747. "use strict";
  161748. Object.defineProperty(exports, "__esModule", {
  161749. value: true
  161750. });
  161751. exports.getOpposite = getOpposite;
  161752. exports.getCompletionRecords = getCompletionRecords;
  161753. exports.getSibling = getSibling;
  161754. exports.getPrevSibling = getPrevSibling;
  161755. exports.getNextSibling = getNextSibling;
  161756. exports.getAllNextSiblings = getAllNextSiblings;
  161757. exports.getAllPrevSiblings = getAllPrevSiblings;
  161758. exports.get = get;
  161759. exports._getKey = _getKey;
  161760. exports._getPattern = _getPattern;
  161761. exports.getBindingIdentifiers = getBindingIdentifiers;
  161762. exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
  161763. exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
  161764. exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
  161765. var _index = require_path2();
  161766. var t2 = require_lib2();
  161767. var NORMAL_COMPLETION = 0;
  161768. var BREAK_COMPLETION = 1;
  161769. function NormalCompletion(path) {
  161770. return {
  161771. type: NORMAL_COMPLETION,
  161772. path
  161773. };
  161774. }
  161775. function BreakCompletion(path) {
  161776. return {
  161777. type: BREAK_COMPLETION,
  161778. path
  161779. };
  161780. }
  161781. function getOpposite() {
  161782. if (this.key === "left") {
  161783. return this.getSibling("right");
  161784. } else if (this.key === "right") {
  161785. return this.getSibling("left");
  161786. }
  161787. return null;
  161788. }
  161789. function addCompletionRecords(path, records, context) {
  161790. if (path)
  161791. return records.concat(_getCompletionRecords(path, context));
  161792. return records;
  161793. }
  161794. function completionRecordForSwitch(cases, records, context) {
  161795. let lastNormalCompletions = [];
  161796. for (let i = 0; i < cases.length; i++) {
  161797. const casePath = cases[i];
  161798. const caseCompletions = _getCompletionRecords(casePath, context);
  161799. const normalCompletions = [];
  161800. const breakCompletions = [];
  161801. for (const c of caseCompletions) {
  161802. if (c.type === NORMAL_COMPLETION) {
  161803. normalCompletions.push(c);
  161804. }
  161805. if (c.type === BREAK_COMPLETION) {
  161806. breakCompletions.push(c);
  161807. }
  161808. }
  161809. if (normalCompletions.length) {
  161810. lastNormalCompletions = normalCompletions;
  161811. }
  161812. records = records.concat(breakCompletions);
  161813. }
  161814. records = records.concat(lastNormalCompletions);
  161815. return records;
  161816. }
  161817. function normalCompletionToBreak(completions) {
  161818. completions.forEach((c) => {
  161819. c.type = BREAK_COMPLETION;
  161820. });
  161821. }
  161822. function replaceBreakStatementInBreakCompletion(completions, reachable) {
  161823. completions.forEach((c) => {
  161824. if (c.path.isBreakStatement({
  161825. label: null
  161826. })) {
  161827. if (reachable) {
  161828. c.path.replaceWith(t2.unaryExpression("void", t2.numericLiteral(0)));
  161829. } else {
  161830. c.path.remove();
  161831. }
  161832. }
  161833. });
  161834. }
  161835. function getStatementListCompletion(paths, context) {
  161836. let completions = [];
  161837. if (context.canHaveBreak) {
  161838. let lastNormalCompletions = [];
  161839. for (let i = 0; i < paths.length; i++) {
  161840. const path = paths[i];
  161841. const newContext = Object.assign({}, context, {
  161842. inCaseClause: false
  161843. });
  161844. if (path.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
  161845. newContext.shouldPopulateBreak = true;
  161846. } else {
  161847. newContext.shouldPopulateBreak = false;
  161848. }
  161849. const statementCompletions = _getCompletionRecords(path, newContext);
  161850. if (statementCompletions.length > 0 && statementCompletions.every((c) => c.type === BREAK_COMPLETION)) {
  161851. if (lastNormalCompletions.length > 0 && statementCompletions.every((c) => c.path.isBreakStatement({
  161852. label: null
  161853. }))) {
  161854. normalCompletionToBreak(lastNormalCompletions);
  161855. completions = completions.concat(lastNormalCompletions);
  161856. if (lastNormalCompletions.some((c) => c.path.isDeclaration())) {
  161857. completions = completions.concat(statementCompletions);
  161858. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  161859. }
  161860. replaceBreakStatementInBreakCompletion(statementCompletions, false);
  161861. } else {
  161862. completions = completions.concat(statementCompletions);
  161863. if (!context.shouldPopulateBreak) {
  161864. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  161865. }
  161866. }
  161867. break;
  161868. }
  161869. if (i === paths.length - 1) {
  161870. completions = completions.concat(statementCompletions);
  161871. } else {
  161872. completions = completions.concat(statementCompletions.filter((c) => c.type === BREAK_COMPLETION));
  161873. lastNormalCompletions = statementCompletions.filter((c) => c.type === NORMAL_COMPLETION);
  161874. }
  161875. }
  161876. } else if (paths.length) {
  161877. completions = completions.concat(_getCompletionRecords(paths[paths.length - 1], context));
  161878. }
  161879. return completions;
  161880. }
  161881. function _getCompletionRecords(path, context) {
  161882. let records = [];
  161883. if (path.isIfStatement()) {
  161884. records = addCompletionRecords(path.get("consequent"), records, context);
  161885. records = addCompletionRecords(path.get("alternate"), records, context);
  161886. } else if (path.isDoExpression() || path.isFor() || path.isWhile() || path.isLabeledStatement()) {
  161887. records = addCompletionRecords(path.get("body"), records, context);
  161888. } else if (path.isProgram() || path.isBlockStatement()) {
  161889. records = records.concat(getStatementListCompletion(path.get("body"), context));
  161890. } else if (path.isFunction()) {
  161891. return _getCompletionRecords(path.get("body"), context);
  161892. } else if (path.isTryStatement()) {
  161893. records = addCompletionRecords(path.get("block"), records, context);
  161894. records = addCompletionRecords(path.get("handler"), records, context);
  161895. } else if (path.isCatchClause()) {
  161896. records = addCompletionRecords(path.get("body"), records, context);
  161897. } else if (path.isSwitchStatement()) {
  161898. records = completionRecordForSwitch(path.get("cases"), records, context);
  161899. } else if (path.isSwitchCase()) {
  161900. records = records.concat(getStatementListCompletion(path.get("consequent"), {
  161901. canHaveBreak: true,
  161902. shouldPopulateBreak: false,
  161903. inCaseClause: true
  161904. }));
  161905. } else if (path.isBreakStatement()) {
  161906. records.push(BreakCompletion(path));
  161907. } else {
  161908. records.push(NormalCompletion(path));
  161909. }
  161910. return records;
  161911. }
  161912. function getCompletionRecords() {
  161913. const records = _getCompletionRecords(this, {
  161914. canHaveBreak: false,
  161915. shouldPopulateBreak: false,
  161916. inCaseClause: false
  161917. });
  161918. return records.map((r) => r.path);
  161919. }
  161920. function getSibling(key) {
  161921. return _index.default.get({
  161922. parentPath: this.parentPath,
  161923. parent: this.parent,
  161924. container: this.container,
  161925. listKey: this.listKey,
  161926. key
  161927. }).setContext(this.context);
  161928. }
  161929. function getPrevSibling() {
  161930. return this.getSibling(this.key - 1);
  161931. }
  161932. function getNextSibling() {
  161933. return this.getSibling(this.key + 1);
  161934. }
  161935. function getAllNextSiblings() {
  161936. let _key = this.key;
  161937. let sibling = this.getSibling(++_key);
  161938. const siblings = [];
  161939. while (sibling.node) {
  161940. siblings.push(sibling);
  161941. sibling = this.getSibling(++_key);
  161942. }
  161943. return siblings;
  161944. }
  161945. function getAllPrevSiblings() {
  161946. let _key = this.key;
  161947. let sibling = this.getSibling(--_key);
  161948. const siblings = [];
  161949. while (sibling.node) {
  161950. siblings.push(sibling);
  161951. sibling = this.getSibling(--_key);
  161952. }
  161953. return siblings;
  161954. }
  161955. function get(key, context = true) {
  161956. if (context === true)
  161957. context = this.context;
  161958. const parts = key.split(".");
  161959. if (parts.length === 1) {
  161960. return this._getKey(key, context);
  161961. } else {
  161962. return this._getPattern(parts, context);
  161963. }
  161964. }
  161965. function _getKey(key, context) {
  161966. const node = this.node;
  161967. const container = node[key];
  161968. if (Array.isArray(container)) {
  161969. return container.map((_, i) => {
  161970. return _index.default.get({
  161971. listKey: key,
  161972. parentPath: this,
  161973. parent: node,
  161974. container,
  161975. key: i
  161976. }).setContext(context);
  161977. });
  161978. } else {
  161979. return _index.default.get({
  161980. parentPath: this,
  161981. parent: node,
  161982. container: node,
  161983. key
  161984. }).setContext(context);
  161985. }
  161986. }
  161987. function _getPattern(parts, context) {
  161988. let path = this;
  161989. for (const part of parts) {
  161990. if (part === ".") {
  161991. path = path.parentPath;
  161992. } else {
  161993. if (Array.isArray(path)) {
  161994. path = path[part];
  161995. } else {
  161996. path = path.get(part, context);
  161997. }
  161998. }
  161999. }
  162000. return path;
  162001. }
  162002. function getBindingIdentifiers(duplicates) {
  162003. return t2.getBindingIdentifiers(this.node, duplicates);
  162004. }
  162005. function getOuterBindingIdentifiers(duplicates) {
  162006. return t2.getOuterBindingIdentifiers(this.node, duplicates);
  162007. }
  162008. function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
  162009. const path = this;
  162010. let search2 = [].concat(path);
  162011. const ids = /* @__PURE__ */ Object.create(null);
  162012. while (search2.length) {
  162013. const id = search2.shift();
  162014. if (!id)
  162015. continue;
  162016. if (!id.node)
  162017. continue;
  162018. const keys2 = t2.getBindingIdentifiers.keys[id.node.type];
  162019. if (id.isIdentifier()) {
  162020. if (duplicates) {
  162021. const _ids = ids[id.node.name] = ids[id.node.name] || [];
  162022. _ids.push(id);
  162023. } else {
  162024. ids[id.node.name] = id;
  162025. }
  162026. continue;
  162027. }
  162028. if (id.isExportDeclaration()) {
  162029. const declaration = id.get("declaration");
  162030. if (declaration.isDeclaration()) {
  162031. search2.push(declaration);
  162032. }
  162033. continue;
  162034. }
  162035. if (outerOnly) {
  162036. if (id.isFunctionDeclaration()) {
  162037. search2.push(id.get("id"));
  162038. continue;
  162039. }
  162040. if (id.isFunctionExpression()) {
  162041. continue;
  162042. }
  162043. }
  162044. if (keys2) {
  162045. for (let i = 0; i < keys2.length; i++) {
  162046. const key = keys2[i];
  162047. const child = id.get(key);
  162048. if (Array.isArray(child) || child.node) {
  162049. search2 = search2.concat(child);
  162050. }
  162051. }
  162052. }
  162053. }
  162054. return ids;
  162055. }
  162056. function getOuterBindingIdentifierPaths(duplicates) {
  162057. return this.getBindingIdentifierPaths(duplicates, true);
  162058. }
  162059. }
  162060. });
  162061. // node_modules/@babel/traverse/lib/path/comments.js
  162062. var require_comments3 = __commonJS({
  162063. "node_modules/@babel/traverse/lib/path/comments.js"(exports) {
  162064. "use strict";
  162065. Object.defineProperty(exports, "__esModule", {
  162066. value: true
  162067. });
  162068. exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
  162069. exports.addComment = addComment;
  162070. exports.addComments = addComments;
  162071. var t2 = require_lib2();
  162072. function shareCommentsWithSiblings() {
  162073. if (typeof this.key === "string")
  162074. return;
  162075. const node = this.node;
  162076. if (!node)
  162077. return;
  162078. const trailing = node.trailingComments;
  162079. const leading = node.leadingComments;
  162080. if (!trailing && !leading)
  162081. return;
  162082. const prev = this.getSibling(this.key - 1);
  162083. const next = this.getSibling(this.key + 1);
  162084. const hasPrev = Boolean(prev.node);
  162085. const hasNext = Boolean(next.node);
  162086. if (hasPrev && !hasNext) {
  162087. prev.addComments("trailing", trailing);
  162088. } else if (hasNext && !hasPrev) {
  162089. next.addComments("leading", leading);
  162090. }
  162091. }
  162092. function addComment(type, content3, line) {
  162093. t2.addComment(this.node, type, content3, line);
  162094. }
  162095. function addComments(type, comments) {
  162096. t2.addComments(this.node, type, comments);
  162097. }
  162098. }
  162099. });
  162100. // node_modules/@babel/traverse/lib/path/index.js
  162101. var require_path2 = __commonJS({
  162102. "node_modules/@babel/traverse/lib/path/index.js"(exports) {
  162103. "use strict";
  162104. Object.defineProperty(exports, "__esModule", {
  162105. value: true
  162106. });
  162107. exports.default = exports.SHOULD_SKIP = exports.SHOULD_STOP = exports.REMOVED = void 0;
  162108. var virtualTypes = require_virtual_types2();
  162109. var _debug = require_src();
  162110. var _index = require_lib37();
  162111. var _scope = require_scope2();
  162112. var t2 = require_lib2();
  162113. var _cache = require_cache2();
  162114. var _generator = require_lib18();
  162115. var NodePath_ancestry = require_ancestry2();
  162116. var NodePath_inference = require_inference2();
  162117. var NodePath_replacement = require_replacement2();
  162118. var NodePath_evaluation = require_evaluation2();
  162119. var NodePath_conversion = require_conversion2();
  162120. var NodePath_introspection = require_introspection2();
  162121. var NodePath_context = require_context3();
  162122. var NodePath_removal = require_removal2();
  162123. var NodePath_modification = require_modification2();
  162124. var NodePath_family = require_family2();
  162125. var NodePath_comments = require_comments3();
  162126. var debug = _debug("babel");
  162127. var REMOVED = 1 << 0;
  162128. exports.REMOVED = REMOVED;
  162129. var SHOULD_STOP = 1 << 1;
  162130. exports.SHOULD_STOP = SHOULD_STOP;
  162131. var SHOULD_SKIP = 1 << 2;
  162132. exports.SHOULD_SKIP = SHOULD_SKIP;
  162133. var NodePath = class {
  162134. constructor(hub, parent) {
  162135. this.contexts = [];
  162136. this.state = null;
  162137. this.opts = null;
  162138. this._traverseFlags = 0;
  162139. this.skipKeys = null;
  162140. this.parentPath = null;
  162141. this.container = null;
  162142. this.listKey = null;
  162143. this.key = null;
  162144. this.node = null;
  162145. this.type = null;
  162146. this.parent = parent;
  162147. this.hub = hub;
  162148. this.data = null;
  162149. this.context = null;
  162150. this.scope = null;
  162151. }
  162152. static get({
  162153. hub,
  162154. parentPath,
  162155. parent,
  162156. container,
  162157. listKey,
  162158. key
  162159. }) {
  162160. if (!hub && parentPath) {
  162161. hub = parentPath.hub;
  162162. }
  162163. if (!parent) {
  162164. throw new Error("To get a node path the parent needs to exist");
  162165. }
  162166. const targetNode = container[key];
  162167. let paths = _cache.path.get(parent);
  162168. if (!paths) {
  162169. paths = /* @__PURE__ */ new Map();
  162170. _cache.path.set(parent, paths);
  162171. }
  162172. let path = paths.get(targetNode);
  162173. if (!path) {
  162174. path = new NodePath(hub, parent);
  162175. if (targetNode)
  162176. paths.set(targetNode, path);
  162177. }
  162178. path.setup(parentPath, container, listKey, key);
  162179. return path;
  162180. }
  162181. getScope(scope) {
  162182. return this.isScope() ? new _scope.default(this) : scope;
  162183. }
  162184. setData(key, val) {
  162185. if (this.data == null) {
  162186. this.data = /* @__PURE__ */ Object.create(null);
  162187. }
  162188. return this.data[key] = val;
  162189. }
  162190. getData(key, def) {
  162191. if (this.data == null) {
  162192. this.data = /* @__PURE__ */ Object.create(null);
  162193. }
  162194. let val = this.data[key];
  162195. if (val === void 0 && def !== void 0)
  162196. val = this.data[key] = def;
  162197. return val;
  162198. }
  162199. buildCodeFrameError(msg, Error2 = SyntaxError) {
  162200. return this.hub.buildError(this.node, msg, Error2);
  162201. }
  162202. traverse(visitor, state) {
  162203. (0, _index.default)(this.node, visitor, this.scope, state, this);
  162204. }
  162205. set(key, node) {
  162206. t2.validate(this.node, key, node);
  162207. this.node[key] = node;
  162208. }
  162209. getPathLocation() {
  162210. const parts = [];
  162211. let path = this;
  162212. do {
  162213. let key = path.key;
  162214. if (path.inList)
  162215. key = `${path.listKey}[${key}]`;
  162216. parts.unshift(key);
  162217. } while (path = path.parentPath);
  162218. return parts.join(".");
  162219. }
  162220. debug(message) {
  162221. if (!debug.enabled)
  162222. return;
  162223. debug(`${this.getPathLocation()} ${this.type}: ${message}`);
  162224. }
  162225. toString() {
  162226. return (0, _generator.default)(this.node).code;
  162227. }
  162228. get inList() {
  162229. return !!this.listKey;
  162230. }
  162231. set inList(inList) {
  162232. if (!inList) {
  162233. this.listKey = null;
  162234. }
  162235. }
  162236. get parentKey() {
  162237. return this.listKey || this.key;
  162238. }
  162239. get shouldSkip() {
  162240. return !!(this._traverseFlags & SHOULD_SKIP);
  162241. }
  162242. set shouldSkip(v) {
  162243. if (v) {
  162244. this._traverseFlags |= SHOULD_SKIP;
  162245. } else {
  162246. this._traverseFlags &= ~SHOULD_SKIP;
  162247. }
  162248. }
  162249. get shouldStop() {
  162250. return !!(this._traverseFlags & SHOULD_STOP);
  162251. }
  162252. set shouldStop(v) {
  162253. if (v) {
  162254. this._traverseFlags |= SHOULD_STOP;
  162255. } else {
  162256. this._traverseFlags &= ~SHOULD_STOP;
  162257. }
  162258. }
  162259. get removed() {
  162260. return !!(this._traverseFlags & REMOVED);
  162261. }
  162262. set removed(v) {
  162263. if (v) {
  162264. this._traverseFlags |= REMOVED;
  162265. } else {
  162266. this._traverseFlags &= ~REMOVED;
  162267. }
  162268. }
  162269. };
  162270. 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);
  162271. for (const type of t2.TYPES) {
  162272. const typeKey = `is${type}`;
  162273. const fn = t2[typeKey];
  162274. NodePath.prototype[typeKey] = function(opts) {
  162275. return fn(this.node, opts);
  162276. };
  162277. NodePath.prototype[`assert${type}`] = function(opts) {
  162278. if (!fn(this.node, opts)) {
  162279. throw new TypeError(`Expected node path of type ${type}`);
  162280. }
  162281. };
  162282. }
  162283. for (const type of Object.keys(virtualTypes)) {
  162284. if (type[0] === "_")
  162285. continue;
  162286. if (t2.TYPES.indexOf(type) < 0)
  162287. t2.TYPES.push(type);
  162288. const virtualType = virtualTypes[type];
  162289. NodePath.prototype[`is${type}`] = function(opts) {
  162290. return virtualType.checkPath(this, opts);
  162291. };
  162292. }
  162293. var _default = NodePath;
  162294. exports.default = _default;
  162295. }
  162296. });
  162297. // node_modules/@babel/traverse/lib/context.js
  162298. var require_context4 = __commonJS({
  162299. "node_modules/@babel/traverse/lib/context.js"(exports) {
  162300. "use strict";
  162301. Object.defineProperty(exports, "__esModule", {
  162302. value: true
  162303. });
  162304. exports.default = void 0;
  162305. var _path = require_path2();
  162306. var t2 = require_lib2();
  162307. var TraversalContext = class {
  162308. constructor(scope, opts, state, parentPath) {
  162309. this.queue = null;
  162310. this.priorityQueue = null;
  162311. this.parentPath = parentPath;
  162312. this.scope = scope;
  162313. this.state = state;
  162314. this.opts = opts;
  162315. }
  162316. shouldVisit(node) {
  162317. const opts = this.opts;
  162318. if (opts.enter || opts.exit)
  162319. return true;
  162320. if (opts[node.type])
  162321. return true;
  162322. const keys2 = t2.VISITOR_KEYS[node.type];
  162323. if (!(keys2 != null && keys2.length))
  162324. return false;
  162325. for (const key of keys2) {
  162326. if (node[key])
  162327. return true;
  162328. }
  162329. return false;
  162330. }
  162331. create(node, obj, key, listKey) {
  162332. return _path.default.get({
  162333. parentPath: this.parentPath,
  162334. parent: node,
  162335. container: obj,
  162336. key,
  162337. listKey
  162338. });
  162339. }
  162340. maybeQueue(path, notPriority) {
  162341. if (this.queue) {
  162342. if (notPriority) {
  162343. this.queue.push(path);
  162344. } else {
  162345. this.priorityQueue.push(path);
  162346. }
  162347. }
  162348. }
  162349. visitMultiple(container, parent, listKey) {
  162350. if (container.length === 0)
  162351. return false;
  162352. const queue = [];
  162353. for (let key = 0; key < container.length; key++) {
  162354. const node = container[key];
  162355. if (node && this.shouldVisit(node)) {
  162356. queue.push(this.create(parent, container, key, listKey));
  162357. }
  162358. }
  162359. return this.visitQueue(queue);
  162360. }
  162361. visitSingle(node, key) {
  162362. if (this.shouldVisit(node[key])) {
  162363. return this.visitQueue([this.create(node, node, key)]);
  162364. } else {
  162365. return false;
  162366. }
  162367. }
  162368. visitQueue(queue) {
  162369. this.queue = queue;
  162370. this.priorityQueue = [];
  162371. const visited = /* @__PURE__ */ new WeakSet();
  162372. let stop = false;
  162373. for (const path of queue) {
  162374. path.resync();
  162375. if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
  162376. path.pushContext(this);
  162377. }
  162378. if (path.key === null)
  162379. continue;
  162380. const {
  162381. node
  162382. } = path;
  162383. if (visited.has(node))
  162384. continue;
  162385. if (node)
  162386. visited.add(node);
  162387. if (path.visit()) {
  162388. stop = true;
  162389. break;
  162390. }
  162391. if (this.priorityQueue.length) {
  162392. stop = this.visitQueue(this.priorityQueue);
  162393. this.priorityQueue = [];
  162394. this.queue = queue;
  162395. if (stop)
  162396. break;
  162397. }
  162398. }
  162399. for (const path of queue) {
  162400. path.popContext();
  162401. }
  162402. this.queue = null;
  162403. return stop;
  162404. }
  162405. visit(node, key) {
  162406. const nodes = node[key];
  162407. if (!nodes)
  162408. return false;
  162409. if (Array.isArray(nodes)) {
  162410. return this.visitMultiple(nodes, node, key);
  162411. } else {
  162412. return this.visitSingle(node, key);
  162413. }
  162414. }
  162415. };
  162416. exports.default = TraversalContext;
  162417. }
  162418. });
  162419. // node_modules/@babel/traverse/lib/visitors.js
  162420. var require_visitors2 = __commonJS({
  162421. "node_modules/@babel/traverse/lib/visitors.js"(exports) {
  162422. "use strict";
  162423. Object.defineProperty(exports, "__esModule", {
  162424. value: true
  162425. });
  162426. exports.explode = explode;
  162427. exports.verify = verify;
  162428. exports.merge = merge2;
  162429. var virtualTypes = require_virtual_types2();
  162430. var t2 = require_lib2();
  162431. function explode(visitor) {
  162432. if (visitor._exploded)
  162433. return visitor;
  162434. visitor._exploded = true;
  162435. for (const nodeType of Object.keys(visitor)) {
  162436. if (shouldIgnoreKey(nodeType))
  162437. continue;
  162438. const parts = nodeType.split("|");
  162439. if (parts.length === 1)
  162440. continue;
  162441. const fns = visitor[nodeType];
  162442. delete visitor[nodeType];
  162443. for (const part of parts) {
  162444. visitor[part] = fns;
  162445. }
  162446. }
  162447. verify(visitor);
  162448. delete visitor.__esModule;
  162449. ensureEntranceObjects(visitor);
  162450. ensureCallbackArrays(visitor);
  162451. for (const nodeType of Object.keys(visitor)) {
  162452. if (shouldIgnoreKey(nodeType))
  162453. continue;
  162454. const wrapper = virtualTypes[nodeType];
  162455. if (!wrapper)
  162456. continue;
  162457. const fns = visitor[nodeType];
  162458. for (const type of Object.keys(fns)) {
  162459. fns[type] = wrapCheck(wrapper, fns[type]);
  162460. }
  162461. delete visitor[nodeType];
  162462. if (wrapper.types) {
  162463. for (const type of wrapper.types) {
  162464. if (visitor[type]) {
  162465. mergePair(visitor[type], fns);
  162466. } else {
  162467. visitor[type] = fns;
  162468. }
  162469. }
  162470. } else {
  162471. mergePair(visitor, fns);
  162472. }
  162473. }
  162474. for (const nodeType of Object.keys(visitor)) {
  162475. if (shouldIgnoreKey(nodeType))
  162476. continue;
  162477. const fns = visitor[nodeType];
  162478. let aliases = t2.FLIPPED_ALIAS_KEYS[nodeType];
  162479. const deprecatedKey = t2.DEPRECATED_KEYS[nodeType];
  162480. if (deprecatedKey) {
  162481. console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecatedKey}`);
  162482. aliases = [deprecatedKey];
  162483. }
  162484. if (!aliases)
  162485. continue;
  162486. delete visitor[nodeType];
  162487. for (const alias of aliases) {
  162488. const existing = visitor[alias];
  162489. if (existing) {
  162490. mergePair(existing, fns);
  162491. } else {
  162492. visitor[alias] = Object.assign({}, fns);
  162493. }
  162494. }
  162495. }
  162496. for (const nodeType of Object.keys(visitor)) {
  162497. if (shouldIgnoreKey(nodeType))
  162498. continue;
  162499. ensureCallbackArrays(visitor[nodeType]);
  162500. }
  162501. return visitor;
  162502. }
  162503. function verify(visitor) {
  162504. if (visitor._verified)
  162505. return;
  162506. if (typeof visitor === "function") {
  162507. throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");
  162508. }
  162509. for (const nodeType of Object.keys(visitor)) {
  162510. if (nodeType === "enter" || nodeType === "exit") {
  162511. validateVisitorMethods(nodeType, visitor[nodeType]);
  162512. }
  162513. if (shouldIgnoreKey(nodeType))
  162514. continue;
  162515. if (t2.TYPES.indexOf(nodeType) < 0) {
  162516. throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`);
  162517. }
  162518. const visitors = visitor[nodeType];
  162519. if (typeof visitors === "object") {
  162520. for (const visitorKey of Object.keys(visitors)) {
  162521. if (visitorKey === "enter" || visitorKey === "exit") {
  162522. validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
  162523. } else {
  162524. throw new Error(`You passed \`traverse()\` a visitor object with the property ${nodeType} that has the invalid property ${visitorKey}`);
  162525. }
  162526. }
  162527. }
  162528. }
  162529. visitor._verified = true;
  162530. }
  162531. function validateVisitorMethods(path, val) {
  162532. const fns = [].concat(val);
  162533. for (const fn of fns) {
  162534. if (typeof fn !== "function") {
  162535. throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
  162536. }
  162537. }
  162538. }
  162539. function merge2(visitors, states = [], wrapper) {
  162540. const rootVisitor = {};
  162541. for (let i = 0; i < visitors.length; i++) {
  162542. const visitor = visitors[i];
  162543. const state = states[i];
  162544. explode(visitor);
  162545. for (const type of Object.keys(visitor)) {
  162546. let visitorType = visitor[type];
  162547. if (state || wrapper) {
  162548. visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
  162549. }
  162550. const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
  162551. mergePair(nodeVisitor, visitorType);
  162552. }
  162553. }
  162554. return rootVisitor;
  162555. }
  162556. function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
  162557. const newVisitor = {};
  162558. for (const key of Object.keys(oldVisitor)) {
  162559. let fns = oldVisitor[key];
  162560. if (!Array.isArray(fns))
  162561. continue;
  162562. fns = fns.map(function(fn) {
  162563. let newFn = fn;
  162564. if (state) {
  162565. newFn = function(path) {
  162566. return fn.call(state, path, state);
  162567. };
  162568. }
  162569. if (wrapper) {
  162570. newFn = wrapper(state.key, key, newFn);
  162571. }
  162572. if (newFn !== fn) {
  162573. newFn.toString = () => fn.toString();
  162574. }
  162575. return newFn;
  162576. });
  162577. newVisitor[key] = fns;
  162578. }
  162579. return newVisitor;
  162580. }
  162581. function ensureEntranceObjects(obj) {
  162582. for (const key of Object.keys(obj)) {
  162583. if (shouldIgnoreKey(key))
  162584. continue;
  162585. const fns = obj[key];
  162586. if (typeof fns === "function") {
  162587. obj[key] = {
  162588. enter: fns
  162589. };
  162590. }
  162591. }
  162592. }
  162593. function ensureCallbackArrays(obj) {
  162594. if (obj.enter && !Array.isArray(obj.enter))
  162595. obj.enter = [obj.enter];
  162596. if (obj.exit && !Array.isArray(obj.exit))
  162597. obj.exit = [obj.exit];
  162598. }
  162599. function wrapCheck(wrapper, fn) {
  162600. const newFn = function(path) {
  162601. if (wrapper.checkPath(path)) {
  162602. return fn.apply(this, arguments);
  162603. }
  162604. };
  162605. newFn.toString = () => fn.toString();
  162606. return newFn;
  162607. }
  162608. function shouldIgnoreKey(key) {
  162609. if (key[0] === "_")
  162610. return true;
  162611. if (key === "enter" || key === "exit" || key === "shouldSkip")
  162612. return true;
  162613. if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") {
  162614. return true;
  162615. }
  162616. return false;
  162617. }
  162618. function mergePair(dest, src) {
  162619. for (const key of Object.keys(src)) {
  162620. dest[key] = [].concat(dest[key] || [], src[key]);
  162621. }
  162622. }
  162623. }
  162624. });
  162625. // node_modules/@babel/traverse/lib/hub.js
  162626. var require_hub2 = __commonJS({
  162627. "node_modules/@babel/traverse/lib/hub.js"(exports) {
  162628. "use strict";
  162629. Object.defineProperty(exports, "__esModule", {
  162630. value: true
  162631. });
  162632. exports.default = void 0;
  162633. var Hub = class {
  162634. getCode() {
  162635. }
  162636. getScope() {
  162637. }
  162638. addHelper() {
  162639. throw new Error("Helpers are not supported by the default hub.");
  162640. }
  162641. buildError(node, msg, Error2 = TypeError) {
  162642. return new Error2(msg);
  162643. }
  162644. };
  162645. exports.default = Hub;
  162646. }
  162647. });
  162648. // node_modules/@babel/traverse/lib/index.js
  162649. var require_lib37 = __commonJS({
  162650. "node_modules/@babel/traverse/lib/index.js"(exports) {
  162651. "use strict";
  162652. Object.defineProperty(exports, "__esModule", {
  162653. value: true
  162654. });
  162655. Object.defineProperty(exports, "NodePath", {
  162656. enumerable: true,
  162657. get: function() {
  162658. return _path.default;
  162659. }
  162660. });
  162661. Object.defineProperty(exports, "Scope", {
  162662. enumerable: true,
  162663. get: function() {
  162664. return _scope.default;
  162665. }
  162666. });
  162667. Object.defineProperty(exports, "Hub", {
  162668. enumerable: true,
  162669. get: function() {
  162670. return _hub.default;
  162671. }
  162672. });
  162673. exports.visitors = exports.default = void 0;
  162674. var _context = require_context4();
  162675. var visitors = require_visitors2();
  162676. exports.visitors = visitors;
  162677. var t2 = require_lib2();
  162678. var cache = require_cache2();
  162679. var _path = require_path2();
  162680. var _scope = require_scope2();
  162681. var _hub = require_hub2();
  162682. function traverse(parent, opts = {}, scope, state, parentPath) {
  162683. if (!parent)
  162684. return;
  162685. if (!opts.noScope && !scope) {
  162686. if (parent.type !== "Program" && parent.type !== "File") {
  162687. 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.`);
  162688. }
  162689. }
  162690. if (!t2.VISITOR_KEYS[parent.type]) {
  162691. return;
  162692. }
  162693. visitors.explode(opts);
  162694. traverse.node(parent, opts, scope, state, parentPath);
  162695. }
  162696. var _default = traverse;
  162697. exports.default = _default;
  162698. traverse.visitors = visitors;
  162699. traverse.verify = visitors.verify;
  162700. traverse.explode = visitors.explode;
  162701. traverse.cheap = function(node, enter) {
  162702. return t2.traverseFast(node, enter);
  162703. };
  162704. traverse.node = function(node, opts, scope, state, parentPath, skipKeys) {
  162705. const keys2 = t2.VISITOR_KEYS[node.type];
  162706. if (!keys2)
  162707. return;
  162708. const context = new _context.default(scope, opts, state, parentPath);
  162709. for (const key of keys2) {
  162710. if (skipKeys && skipKeys[key])
  162711. continue;
  162712. if (context.visit(node, key))
  162713. return;
  162714. }
  162715. };
  162716. traverse.clearNode = function(node, opts) {
  162717. t2.removeProperties(node, opts);
  162718. cache.path.delete(node);
  162719. };
  162720. traverse.removeProperties = function(tree, opts) {
  162721. t2.traverseFast(tree, traverse.clearNode, opts);
  162722. return tree;
  162723. };
  162724. function hasDenylistedType(path, state) {
  162725. if (path.node.type === state.type) {
  162726. state.has = true;
  162727. path.stop();
  162728. }
  162729. }
  162730. traverse.hasType = function(tree, type, denylistTypes) {
  162731. if (denylistTypes != null && denylistTypes.includes(tree.type))
  162732. return false;
  162733. if (tree.type === type)
  162734. return true;
  162735. const state = {
  162736. has: false,
  162737. type
  162738. };
  162739. traverse(tree, {
  162740. noScope: true,
  162741. denylist: denylistTypes,
  162742. enter: hasDenylistedType
  162743. }, null, state);
  162744. return state.has;
  162745. };
  162746. traverse.cache = cache;
  162747. }
  162748. });
  162749. // node_modules/unified/node_modules/is-buffer/index.js
  162750. var require_is_buffer = __commonJS({
  162751. "node_modules/unified/node_modules/is-buffer/index.js"(exports, module2) {
  162752. module2.exports = function isBuffer2(obj) {
  162753. return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
  162754. };
  162755. }
  162756. });
  162757. // node_modules/extend/index.js
  162758. var require_extend = __commonJS({
  162759. "node_modules/extend/index.js"(exports, module2) {
  162760. "use strict";
  162761. var hasOwn2 = Object.prototype.hasOwnProperty;
  162762. var toStr = Object.prototype.toString;
  162763. var defineProperty = Object.defineProperty;
  162764. var gOPD = Object.getOwnPropertyDescriptor;
  162765. var isArray2 = function isArray3(arr) {
  162766. if (typeof Array.isArray === "function") {
  162767. return Array.isArray(arr);
  162768. }
  162769. return toStr.call(arr) === "[object Array]";
  162770. };
  162771. var isPlainObject2 = function isPlainObject3(obj) {
  162772. if (!obj || toStr.call(obj) !== "[object Object]") {
  162773. return false;
  162774. }
  162775. var hasOwnConstructor = hasOwn2.call(obj, "constructor");
  162776. var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn2.call(obj.constructor.prototype, "isPrototypeOf");
  162777. if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
  162778. return false;
  162779. }
  162780. var key;
  162781. for (key in obj) {
  162782. }
  162783. return typeof key === "undefined" || hasOwn2.call(obj, key);
  162784. };
  162785. var setProperty = function setProperty2(target, options) {
  162786. if (defineProperty && options.name === "__proto__") {
  162787. defineProperty(target, options.name, {
  162788. enumerable: true,
  162789. configurable: true,
  162790. value: options.newValue,
  162791. writable: true
  162792. });
  162793. } else {
  162794. target[options.name] = options.newValue;
  162795. }
  162796. };
  162797. var getProperty = function getProperty2(obj, name2) {
  162798. if (name2 === "__proto__") {
  162799. if (!hasOwn2.call(obj, name2)) {
  162800. return void 0;
  162801. } else if (gOPD) {
  162802. return gOPD(obj, name2).value;
  162803. }
  162804. }
  162805. return obj[name2];
  162806. };
  162807. module2.exports = function extend3() {
  162808. var options, name2, src, copy, copyIsArray, clone;
  162809. var target = arguments[0];
  162810. var i = 1;
  162811. var length = arguments.length;
  162812. var deep = false;
  162813. if (typeof target === "boolean") {
  162814. deep = target;
  162815. target = arguments[1] || {};
  162816. i = 2;
  162817. }
  162818. if (target == null || typeof target !== "object" && typeof target !== "function") {
  162819. target = {};
  162820. }
  162821. for (; i < length; ++i) {
  162822. options = arguments[i];
  162823. if (options != null) {
  162824. for (name2 in options) {
  162825. src = getProperty(target, name2);
  162826. copy = getProperty(options, name2);
  162827. if (target !== copy) {
  162828. if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray2(copy)))) {
  162829. if (copyIsArray) {
  162830. copyIsArray = false;
  162831. clone = src && isArray2(src) ? src : [];
  162832. } else {
  162833. clone = src && isPlainObject2(src) ? src : {};
  162834. }
  162835. setProperty(target, { name: name2, newValue: extend3(deep, clone, copy) });
  162836. } else if (typeof copy !== "undefined") {
  162837. setProperty(target, { name: name2, newValue: copy });
  162838. }
  162839. }
  162840. }
  162841. }
  162842. }
  162843. return target;
  162844. };
  162845. }
  162846. });
  162847. // node_modules/vfile/node_modules/is-buffer/index.js
  162848. var require_is_buffer2 = __commonJS({
  162849. "node_modules/vfile/node_modules/is-buffer/index.js"(exports, module2) {
  162850. module2.exports = function isBuffer2(obj) {
  162851. return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
  162852. };
  162853. }
  162854. });
  162855. // node_modules/acorn-jsx/xhtml.js
  162856. var require_xhtml = __commonJS({
  162857. "node_modules/acorn-jsx/xhtml.js"(exports, module2) {
  162858. module2.exports = {
  162859. quot: '"',
  162860. amp: "&",
  162861. apos: "'",
  162862. lt: "<",
  162863. gt: ">",
  162864. nbsp: "\xA0",
  162865. iexcl: "\xA1",
  162866. cent: "\xA2",
  162867. pound: "\xA3",
  162868. curren: "\xA4",
  162869. yen: "\xA5",
  162870. brvbar: "\xA6",
  162871. sect: "\xA7",
  162872. uml: "\xA8",
  162873. copy: "\xA9",
  162874. ordf: "\xAA",
  162875. laquo: "\xAB",
  162876. not: "\xAC",
  162877. shy: "\xAD",
  162878. reg: "\xAE",
  162879. macr: "\xAF",
  162880. deg: "\xB0",
  162881. plusmn: "\xB1",
  162882. sup2: "\xB2",
  162883. sup3: "\xB3",
  162884. acute: "\xB4",
  162885. micro: "\xB5",
  162886. para: "\xB6",
  162887. middot: "\xB7",
  162888. cedil: "\xB8",
  162889. sup1: "\xB9",
  162890. ordm: "\xBA",
  162891. raquo: "\xBB",
  162892. frac14: "\xBC",
  162893. frac12: "\xBD",
  162894. frac34: "\xBE",
  162895. iquest: "\xBF",
  162896. Agrave: "\xC0",
  162897. Aacute: "\xC1",
  162898. Acirc: "\xC2",
  162899. Atilde: "\xC3",
  162900. Auml: "\xC4",
  162901. Aring: "\xC5",
  162902. AElig: "\xC6",
  162903. Ccedil: "\xC7",
  162904. Egrave: "\xC8",
  162905. Eacute: "\xC9",
  162906. Ecirc: "\xCA",
  162907. Euml: "\xCB",
  162908. Igrave: "\xCC",
  162909. Iacute: "\xCD",
  162910. Icirc: "\xCE",
  162911. Iuml: "\xCF",
  162912. ETH: "\xD0",
  162913. Ntilde: "\xD1",
  162914. Ograve: "\xD2",
  162915. Oacute: "\xD3",
  162916. Ocirc: "\xD4",
  162917. Otilde: "\xD5",
  162918. Ouml: "\xD6",
  162919. times: "\xD7",
  162920. Oslash: "\xD8",
  162921. Ugrave: "\xD9",
  162922. Uacute: "\xDA",
  162923. Ucirc: "\xDB",
  162924. Uuml: "\xDC",
  162925. Yacute: "\xDD",
  162926. THORN: "\xDE",
  162927. szlig: "\xDF",
  162928. agrave: "\xE0",
  162929. aacute: "\xE1",
  162930. acirc: "\xE2",
  162931. atilde: "\xE3",
  162932. auml: "\xE4",
  162933. aring: "\xE5",
  162934. aelig: "\xE6",
  162935. ccedil: "\xE7",
  162936. egrave: "\xE8",
  162937. eacute: "\xE9",
  162938. ecirc: "\xEA",
  162939. euml: "\xEB",
  162940. igrave: "\xEC",
  162941. iacute: "\xED",
  162942. icirc: "\xEE",
  162943. iuml: "\xEF",
  162944. eth: "\xF0",
  162945. ntilde: "\xF1",
  162946. ograve: "\xF2",
  162947. oacute: "\xF3",
  162948. ocirc: "\xF4",
  162949. otilde: "\xF5",
  162950. ouml: "\xF6",
  162951. divide: "\xF7",
  162952. oslash: "\xF8",
  162953. ugrave: "\xF9",
  162954. uacute: "\xFA",
  162955. ucirc: "\xFB",
  162956. uuml: "\xFC",
  162957. yacute: "\xFD",
  162958. thorn: "\xFE",
  162959. yuml: "\xFF",
  162960. OElig: "\u0152",
  162961. oelig: "\u0153",
  162962. Scaron: "\u0160",
  162963. scaron: "\u0161",
  162964. Yuml: "\u0178",
  162965. fnof: "\u0192",
  162966. circ: "\u02C6",
  162967. tilde: "\u02DC",
  162968. Alpha: "\u0391",
  162969. Beta: "\u0392",
  162970. Gamma: "\u0393",
  162971. Delta: "\u0394",
  162972. Epsilon: "\u0395",
  162973. Zeta: "\u0396",
  162974. Eta: "\u0397",
  162975. Theta: "\u0398",
  162976. Iota: "\u0399",
  162977. Kappa: "\u039A",
  162978. Lambda: "\u039B",
  162979. Mu: "\u039C",
  162980. Nu: "\u039D",
  162981. Xi: "\u039E",
  162982. Omicron: "\u039F",
  162983. Pi: "\u03A0",
  162984. Rho: "\u03A1",
  162985. Sigma: "\u03A3",
  162986. Tau: "\u03A4",
  162987. Upsilon: "\u03A5",
  162988. Phi: "\u03A6",
  162989. Chi: "\u03A7",
  162990. Psi: "\u03A8",
  162991. Omega: "\u03A9",
  162992. alpha: "\u03B1",
  162993. beta: "\u03B2",
  162994. gamma: "\u03B3",
  162995. delta: "\u03B4",
  162996. epsilon: "\u03B5",
  162997. zeta: "\u03B6",
  162998. eta: "\u03B7",
  162999. theta: "\u03B8",
  163000. iota: "\u03B9",
  163001. kappa: "\u03BA",
  163002. lambda: "\u03BB",
  163003. mu: "\u03BC",
  163004. nu: "\u03BD",
  163005. xi: "\u03BE",
  163006. omicron: "\u03BF",
  163007. pi: "\u03C0",
  163008. rho: "\u03C1",
  163009. sigmaf: "\u03C2",
  163010. sigma: "\u03C3",
  163011. tau: "\u03C4",
  163012. upsilon: "\u03C5",
  163013. phi: "\u03C6",
  163014. chi: "\u03C7",
  163015. psi: "\u03C8",
  163016. omega: "\u03C9",
  163017. thetasym: "\u03D1",
  163018. upsih: "\u03D2",
  163019. piv: "\u03D6",
  163020. ensp: "\u2002",
  163021. emsp: "\u2003",
  163022. thinsp: "\u2009",
  163023. zwnj: "\u200C",
  163024. zwj: "\u200D",
  163025. lrm: "\u200E",
  163026. rlm: "\u200F",
  163027. ndash: "\u2013",
  163028. mdash: "\u2014",
  163029. lsquo: "\u2018",
  163030. rsquo: "\u2019",
  163031. sbquo: "\u201A",
  163032. ldquo: "\u201C",
  163033. rdquo: "\u201D",
  163034. bdquo: "\u201E",
  163035. dagger: "\u2020",
  163036. Dagger: "\u2021",
  163037. bull: "\u2022",
  163038. hellip: "\u2026",
  163039. permil: "\u2030",
  163040. prime: "\u2032",
  163041. Prime: "\u2033",
  163042. lsaquo: "\u2039",
  163043. rsaquo: "\u203A",
  163044. oline: "\u203E",
  163045. frasl: "\u2044",
  163046. euro: "\u20AC",
  163047. image: "\u2111",
  163048. weierp: "\u2118",
  163049. real: "\u211C",
  163050. trade: "\u2122",
  163051. alefsym: "\u2135",
  163052. larr: "\u2190",
  163053. uarr: "\u2191",
  163054. rarr: "\u2192",
  163055. darr: "\u2193",
  163056. harr: "\u2194",
  163057. crarr: "\u21B5",
  163058. lArr: "\u21D0",
  163059. uArr: "\u21D1",
  163060. rArr: "\u21D2",
  163061. dArr: "\u21D3",
  163062. hArr: "\u21D4",
  163063. forall: "\u2200",
  163064. part: "\u2202",
  163065. exist: "\u2203",
  163066. empty: "\u2205",
  163067. nabla: "\u2207",
  163068. isin: "\u2208",
  163069. notin: "\u2209",
  163070. ni: "\u220B",
  163071. prod: "\u220F",
  163072. sum: "\u2211",
  163073. minus: "\u2212",
  163074. lowast: "\u2217",
  163075. radic: "\u221A",
  163076. prop: "\u221D",
  163077. infin: "\u221E",
  163078. ang: "\u2220",
  163079. and: "\u2227",
  163080. or: "\u2228",
  163081. cap: "\u2229",
  163082. cup: "\u222A",
  163083. "int": "\u222B",
  163084. there4: "\u2234",
  163085. sim: "\u223C",
  163086. cong: "\u2245",
  163087. asymp: "\u2248",
  163088. ne: "\u2260",
  163089. equiv: "\u2261",
  163090. le: "\u2264",
  163091. ge: "\u2265",
  163092. sub: "\u2282",
  163093. sup: "\u2283",
  163094. nsub: "\u2284",
  163095. sube: "\u2286",
  163096. supe: "\u2287",
  163097. oplus: "\u2295",
  163098. otimes: "\u2297",
  163099. perp: "\u22A5",
  163100. sdot: "\u22C5",
  163101. lceil: "\u2308",
  163102. rceil: "\u2309",
  163103. lfloor: "\u230A",
  163104. rfloor: "\u230B",
  163105. lang: "\u2329",
  163106. rang: "\u232A",
  163107. loz: "\u25CA",
  163108. spades: "\u2660",
  163109. clubs: "\u2663",
  163110. hearts: "\u2665",
  163111. diams: "\u2666"
  163112. };
  163113. }
  163114. });
  163115. // node_modules/acorn/dist/acorn.js
  163116. var require_acorn = __commonJS({
  163117. "node_modules/acorn/dist/acorn.js"(exports, module2) {
  163118. (function(global2, factory2) {
  163119. typeof exports === "object" && typeof module2 !== "undefined" ? factory2(exports) : typeof define === "function" && define.amd ? define(["exports"], factory2) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory2(global2.acorn = {}));
  163120. })(exports, function(exports2) {
  163121. "use strict";
  163122. var reservedWords2 = {
  163123. 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
  163124. 5: "class enum extends super const export import",
  163125. 6: "enum",
  163126. strict: "implements interface let package private protected public static yield",
  163127. strictBind: "eval arguments"
  163128. };
  163129. var ecma5AndLessKeywords2 = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
  163130. var keywords$12 = {
  163131. 5: ecma5AndLessKeywords2,
  163132. "5module": ecma5AndLessKeywords2 + " export import",
  163133. 6: ecma5AndLessKeywords2 + " const class extends export import super"
  163134. };
  163135. var keywordRelationalOperator2 = /^in(stanceof)?$/;
  163136. var nonASCIIidentifierStartChars2 = "\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\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-\u1B4C\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-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  163137. var nonASCIIidentifierChars2 = "\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\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  163138. var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  163139. var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  163140. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  163141. var astralIdentifierStartCodes2 = [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, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 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, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 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, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  163142. var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 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, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  163143. function isInAstralSet2(code2, set) {
  163144. var pos = 65536;
  163145. for (var i2 = 0; i2 < set.length; i2 += 2) {
  163146. pos += set[i2];
  163147. if (pos > code2) {
  163148. return false;
  163149. }
  163150. pos += set[i2 + 1];
  163151. if (pos >= code2) {
  163152. return true;
  163153. }
  163154. }
  163155. }
  163156. function isIdentifierStart2(code2, astral) {
  163157. if (code2 < 65) {
  163158. return code2 === 36;
  163159. }
  163160. if (code2 < 91) {
  163161. return true;
  163162. }
  163163. if (code2 < 97) {
  163164. return code2 === 95;
  163165. }
  163166. if (code2 < 123) {
  163167. return true;
  163168. }
  163169. if (code2 <= 65535) {
  163170. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  163171. }
  163172. if (astral === false) {
  163173. return false;
  163174. }
  163175. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  163176. }
  163177. function isIdentifierChar2(code2, astral) {
  163178. if (code2 < 48) {
  163179. return code2 === 36;
  163180. }
  163181. if (code2 < 58) {
  163182. return true;
  163183. }
  163184. if (code2 < 65) {
  163185. return false;
  163186. }
  163187. if (code2 < 91) {
  163188. return true;
  163189. }
  163190. if (code2 < 97) {
  163191. return code2 === 95;
  163192. }
  163193. if (code2 < 123) {
  163194. return true;
  163195. }
  163196. if (code2 <= 65535) {
  163197. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  163198. }
  163199. if (astral === false) {
  163200. return false;
  163201. }
  163202. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  163203. }
  163204. var TokenType3 = function TokenType4(label, conf) {
  163205. if (conf === void 0)
  163206. conf = {};
  163207. this.label = label;
  163208. this.keyword = conf.keyword;
  163209. this.beforeExpr = !!conf.beforeExpr;
  163210. this.startsExpr = !!conf.startsExpr;
  163211. this.isLoop = !!conf.isLoop;
  163212. this.isAssign = !!conf.isAssign;
  163213. this.prefix = !!conf.prefix;
  163214. this.postfix = !!conf.postfix;
  163215. this.binop = conf.binop || null;
  163216. this.updateContext = null;
  163217. };
  163218. function binop2(name2, prec) {
  163219. return new TokenType3(name2, { beforeExpr: true, binop: prec });
  163220. }
  163221. var beforeExpr2 = { beforeExpr: true }, startsExpr2 = { startsExpr: true };
  163222. var keywords2 = {};
  163223. function kw2(name2, options) {
  163224. if (options === void 0)
  163225. options = {};
  163226. options.keyword = name2;
  163227. return keywords2[name2] = new TokenType3(name2, options);
  163228. }
  163229. var types$12 = {
  163230. num: new TokenType3("num", startsExpr2),
  163231. regexp: new TokenType3("regexp", startsExpr2),
  163232. string: new TokenType3("string", startsExpr2),
  163233. name: new TokenType3("name", startsExpr2),
  163234. privateId: new TokenType3("privateId", startsExpr2),
  163235. eof: new TokenType3("eof"),
  163236. bracketL: new TokenType3("[", { beforeExpr: true, startsExpr: true }),
  163237. bracketR: new TokenType3("]"),
  163238. braceL: new TokenType3("{", { beforeExpr: true, startsExpr: true }),
  163239. braceR: new TokenType3("}"),
  163240. parenL: new TokenType3("(", { beforeExpr: true, startsExpr: true }),
  163241. parenR: new TokenType3(")"),
  163242. comma: new TokenType3(",", beforeExpr2),
  163243. semi: new TokenType3(";", beforeExpr2),
  163244. colon: new TokenType3(":", beforeExpr2),
  163245. dot: new TokenType3("."),
  163246. question: new TokenType3("?", beforeExpr2),
  163247. questionDot: new TokenType3("?."),
  163248. arrow: new TokenType3("=>", beforeExpr2),
  163249. template: new TokenType3("template"),
  163250. invalidTemplate: new TokenType3("invalidTemplate"),
  163251. ellipsis: new TokenType3("...", beforeExpr2),
  163252. backQuote: new TokenType3("`", startsExpr2),
  163253. dollarBraceL: new TokenType3("${", { beforeExpr: true, startsExpr: true }),
  163254. eq: new TokenType3("=", { beforeExpr: true, isAssign: true }),
  163255. assign: new TokenType3("_=", { beforeExpr: true, isAssign: true }),
  163256. incDec: new TokenType3("++/--", { prefix: true, postfix: true, startsExpr: true }),
  163257. prefix: new TokenType3("!/~", { beforeExpr: true, prefix: true, startsExpr: true }),
  163258. logicalOR: binop2("||", 1),
  163259. logicalAND: binop2("&&", 2),
  163260. bitwiseOR: binop2("|", 3),
  163261. bitwiseXOR: binop2("^", 4),
  163262. bitwiseAND: binop2("&", 5),
  163263. equality: binop2("==/!=/===/!==", 6),
  163264. relational: binop2("</>/<=/>=", 7),
  163265. bitShift: binop2("<</>>/>>>", 8),
  163266. plusMin: new TokenType3("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
  163267. modulo: binop2("%", 10),
  163268. star: binop2("*", 10),
  163269. slash: binop2("/", 10),
  163270. starstar: new TokenType3("**", { beforeExpr: true }),
  163271. coalesce: binop2("??", 1),
  163272. _break: kw2("break"),
  163273. _case: kw2("case", beforeExpr2),
  163274. _catch: kw2("catch"),
  163275. _continue: kw2("continue"),
  163276. _debugger: kw2("debugger"),
  163277. _default: kw2("default", beforeExpr2),
  163278. _do: kw2("do", { isLoop: true, beforeExpr: true }),
  163279. _else: kw2("else", beforeExpr2),
  163280. _finally: kw2("finally"),
  163281. _for: kw2("for", { isLoop: true }),
  163282. _function: kw2("function", startsExpr2),
  163283. _if: kw2("if"),
  163284. _return: kw2("return", beforeExpr2),
  163285. _switch: kw2("switch"),
  163286. _throw: kw2("throw", beforeExpr2),
  163287. _try: kw2("try"),
  163288. _var: kw2("var"),
  163289. _const: kw2("const"),
  163290. _while: kw2("while", { isLoop: true }),
  163291. _with: kw2("with"),
  163292. _new: kw2("new", { beforeExpr: true, startsExpr: true }),
  163293. _this: kw2("this", startsExpr2),
  163294. _super: kw2("super", startsExpr2),
  163295. _class: kw2("class", startsExpr2),
  163296. _extends: kw2("extends", beforeExpr2),
  163297. _export: kw2("export"),
  163298. _import: kw2("import", startsExpr2),
  163299. _null: kw2("null", startsExpr2),
  163300. _true: kw2("true", startsExpr2),
  163301. _false: kw2("false", startsExpr2),
  163302. _in: kw2("in", { beforeExpr: true, binop: 7 }),
  163303. _instanceof: kw2("instanceof", { beforeExpr: true, binop: 7 }),
  163304. _typeof: kw2("typeof", { beforeExpr: true, prefix: true, startsExpr: true }),
  163305. _void: kw2("void", { beforeExpr: true, prefix: true, startsExpr: true }),
  163306. _delete: kw2("delete", { beforeExpr: true, prefix: true, startsExpr: true })
  163307. };
  163308. var lineBreak2 = /\r\n?|\n|\u2028|\u2029/;
  163309. var lineBreakG2 = new RegExp(lineBreak2.source, "g");
  163310. function isNewLine2(code2) {
  163311. return code2 === 10 || code2 === 13 || code2 === 8232 || code2 === 8233;
  163312. }
  163313. function nextLineBreak2(code2, from, end) {
  163314. if (end === void 0)
  163315. end = code2.length;
  163316. for (var i2 = from; i2 < end; i2++) {
  163317. var next = code2.charCodeAt(i2);
  163318. if (isNewLine2(next)) {
  163319. return i2 < end - 1 && next === 13 && code2.charCodeAt(i2 + 1) === 10 ? i2 + 2 : i2 + 1;
  163320. }
  163321. }
  163322. return -1;
  163323. }
  163324. var nonASCIIwhitespace2 = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
  163325. var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  163326. var ref2 = Object.prototype;
  163327. var hasOwnProperty3 = ref2.hasOwnProperty;
  163328. var toString3 = ref2.toString;
  163329. var hasOwn2 = Object.hasOwn || function(obj, propName) {
  163330. return hasOwnProperty3.call(obj, propName);
  163331. };
  163332. var isArray2 = Array.isArray || function(obj) {
  163333. return toString3.call(obj) === "[object Array]";
  163334. };
  163335. function wordsRegexp2(words) {
  163336. return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
  163337. }
  163338. var loneSurrogate2 = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
  163339. var Position3 = function Position4(line, col) {
  163340. this.line = line;
  163341. this.column = col;
  163342. };
  163343. Position3.prototype.offset = function offset2(n) {
  163344. return new Position3(this.line, this.column + n);
  163345. };
  163346. var SourceLocation3 = function SourceLocation4(p, start3, end) {
  163347. this.start = start3;
  163348. this.end = end;
  163349. if (p.sourceFile !== null) {
  163350. this.source = p.sourceFile;
  163351. }
  163352. };
  163353. function getLineInfo2(input, offset2) {
  163354. for (var line = 1, cur = 0; ; ) {
  163355. var nextBreak = nextLineBreak2(input, cur, offset2);
  163356. if (nextBreak < 0) {
  163357. return new Position3(line, offset2 - cur);
  163358. }
  163359. ++line;
  163360. cur = nextBreak;
  163361. }
  163362. }
  163363. var defaultOptions2 = {
  163364. ecmaVersion: null,
  163365. sourceType: "script",
  163366. onInsertedSemicolon: null,
  163367. onTrailingComma: null,
  163368. allowReserved: null,
  163369. allowReturnOutsideFunction: false,
  163370. allowImportExportEverywhere: false,
  163371. allowAwaitOutsideFunction: null,
  163372. allowSuperOutsideMethod: null,
  163373. allowHashBang: false,
  163374. locations: false,
  163375. onToken: null,
  163376. onComment: null,
  163377. ranges: false,
  163378. program: null,
  163379. sourceFile: null,
  163380. directSourceFile: null,
  163381. preserveParens: false
  163382. };
  163383. var warnedAboutEcmaVersion2 = false;
  163384. function getOptions2(opts) {
  163385. var options = {};
  163386. for (var opt in defaultOptions2) {
  163387. options[opt] = opts && hasOwn2(opts, opt) ? opts[opt] : defaultOptions2[opt];
  163388. }
  163389. if (options.ecmaVersion === "latest") {
  163390. options.ecmaVersion = 1e8;
  163391. } else if (options.ecmaVersion == null) {
  163392. if (!warnedAboutEcmaVersion2 && typeof console === "object" && console.warn) {
  163393. warnedAboutEcmaVersion2 = true;
  163394. console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.");
  163395. }
  163396. options.ecmaVersion = 11;
  163397. } else if (options.ecmaVersion >= 2015) {
  163398. options.ecmaVersion -= 2009;
  163399. }
  163400. if (options.allowReserved == null) {
  163401. options.allowReserved = options.ecmaVersion < 5;
  163402. }
  163403. if (isArray2(options.onToken)) {
  163404. var tokens = options.onToken;
  163405. options.onToken = function(token) {
  163406. return tokens.push(token);
  163407. };
  163408. }
  163409. if (isArray2(options.onComment)) {
  163410. options.onComment = pushComment2(options, options.onComment);
  163411. }
  163412. return options;
  163413. }
  163414. function pushComment2(options, array) {
  163415. return function(block, text5, start3, end, startLoc, endLoc) {
  163416. var comment2 = {
  163417. type: block ? "Block" : "Line",
  163418. value: text5,
  163419. start: start3,
  163420. end
  163421. };
  163422. if (options.locations) {
  163423. comment2.loc = new SourceLocation3(this, startLoc, endLoc);
  163424. }
  163425. if (options.ranges) {
  163426. comment2.range = [start3, end];
  163427. }
  163428. array.push(comment2);
  163429. };
  163430. }
  163431. var SCOPE_TOP2 = 1, SCOPE_FUNCTION2 = 2, SCOPE_ASYNC2 = 4, SCOPE_GENERATOR2 = 8, SCOPE_ARROW2 = 16, SCOPE_SIMPLE_CATCH2 = 32, SCOPE_SUPER2 = 64, SCOPE_DIRECT_SUPER2 = 128, SCOPE_CLASS_STATIC_BLOCK2 = 256, SCOPE_VAR2 = SCOPE_TOP2 | SCOPE_FUNCTION2 | SCOPE_CLASS_STATIC_BLOCK2;
  163432. function functionFlags2(async, generator) {
  163433. return SCOPE_FUNCTION2 | (async ? SCOPE_ASYNC2 : 0) | (generator ? SCOPE_GENERATOR2 : 0);
  163434. }
  163435. var BIND_NONE2 = 0, BIND_VAR2 = 1, BIND_LEXICAL2 = 2, BIND_FUNCTION2 = 3, BIND_SIMPLE_CATCH2 = 4, BIND_OUTSIDE2 = 5;
  163436. var Parser3 = function Parser4(options, input, startPos) {
  163437. this.options = options = getOptions2(options);
  163438. this.sourceFile = options.sourceFile;
  163439. this.keywords = wordsRegexp2(keywords$12[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
  163440. var reserved = "";
  163441. if (options.allowReserved !== true) {
  163442. reserved = reservedWords2[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];
  163443. if (options.sourceType === "module") {
  163444. reserved += " await";
  163445. }
  163446. }
  163447. this.reservedWords = wordsRegexp2(reserved);
  163448. var reservedStrict = (reserved ? reserved + " " : "") + reservedWords2.strict;
  163449. this.reservedWordsStrict = wordsRegexp2(reservedStrict);
  163450. this.reservedWordsStrictBind = wordsRegexp2(reservedStrict + " " + reservedWords2.strictBind);
  163451. this.input = String(input);
  163452. this.containsEsc = false;
  163453. if (startPos) {
  163454. this.pos = startPos;
  163455. this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
  163456. this.curLine = this.input.slice(0, this.lineStart).split(lineBreak2).length;
  163457. } else {
  163458. this.pos = this.lineStart = 0;
  163459. this.curLine = 1;
  163460. }
  163461. this.type = types$12.eof;
  163462. this.value = null;
  163463. this.start = this.end = this.pos;
  163464. this.startLoc = this.endLoc = this.curPosition();
  163465. this.lastTokEndLoc = this.lastTokStartLoc = null;
  163466. this.lastTokStart = this.lastTokEnd = this.pos;
  163467. this.context = this.initialContext();
  163468. this.exprAllowed = true;
  163469. this.inModule = options.sourceType === "module";
  163470. this.strict = this.inModule || this.strictDirective(this.pos);
  163471. this.potentialArrowAt = -1;
  163472. this.potentialArrowInForAwait = false;
  163473. this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
  163474. this.labels = [];
  163475. this.undefinedExports = /* @__PURE__ */ Object.create(null);
  163476. if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
  163477. this.skipLineComment(2);
  163478. }
  163479. this.scopeStack = [];
  163480. this.enterScope(SCOPE_TOP2);
  163481. this.regexpState = null;
  163482. this.privateNameStack = [];
  163483. };
  163484. var prototypeAccessors2 = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
  163485. Parser3.prototype.parse = function parse5() {
  163486. var node = this.options.program || this.startNode();
  163487. this.nextToken();
  163488. return this.parseTopLevel(node);
  163489. };
  163490. prototypeAccessors2.inFunction.get = function() {
  163491. return (this.currentVarScope().flags & SCOPE_FUNCTION2) > 0;
  163492. };
  163493. prototypeAccessors2.inGenerator.get = function() {
  163494. return (this.currentVarScope().flags & SCOPE_GENERATOR2) > 0 && !this.currentVarScope().inClassFieldInit;
  163495. };
  163496. prototypeAccessors2.inAsync.get = function() {
  163497. return (this.currentVarScope().flags & SCOPE_ASYNC2) > 0 && !this.currentVarScope().inClassFieldInit;
  163498. };
  163499. prototypeAccessors2.canAwait.get = function() {
  163500. for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
  163501. var scope = this.scopeStack[i2];
  163502. if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK2) {
  163503. return false;
  163504. }
  163505. if (scope.flags & SCOPE_FUNCTION2) {
  163506. return (scope.flags & SCOPE_ASYNC2) > 0;
  163507. }
  163508. }
  163509. return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
  163510. };
  163511. prototypeAccessors2.allowSuper.get = function() {
  163512. var ref3 = this.currentThisScope();
  163513. var flags = ref3.flags;
  163514. var inClassFieldInit = ref3.inClassFieldInit;
  163515. return (flags & SCOPE_SUPER2) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
  163516. };
  163517. prototypeAccessors2.allowDirectSuper.get = function() {
  163518. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER2) > 0;
  163519. };
  163520. prototypeAccessors2.treatFunctionsAsVar.get = function() {
  163521. return this.treatFunctionsAsVarInScope(this.currentScope());
  163522. };
  163523. prototypeAccessors2.allowNewDotTarget.get = function() {
  163524. var ref3 = this.currentThisScope();
  163525. var flags = ref3.flags;
  163526. var inClassFieldInit = ref3.inClassFieldInit;
  163527. return (flags & (SCOPE_FUNCTION2 | SCOPE_CLASS_STATIC_BLOCK2)) > 0 || inClassFieldInit;
  163528. };
  163529. prototypeAccessors2.inClassStaticBlock.get = function() {
  163530. return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK2) > 0;
  163531. };
  163532. Parser3.extend = function extend3() {
  163533. var plugins = [], len = arguments.length;
  163534. while (len--)
  163535. plugins[len] = arguments[len];
  163536. var cls = this;
  163537. for (var i2 = 0; i2 < plugins.length; i2++) {
  163538. cls = plugins[i2](cls);
  163539. }
  163540. return cls;
  163541. };
  163542. Parser3.parse = function parse5(input, options) {
  163543. return new this(options, input).parse();
  163544. };
  163545. Parser3.parseExpressionAt = function parseExpressionAt3(input, pos, options) {
  163546. var parser = new this(options, input, pos);
  163547. parser.nextToken();
  163548. return parser.parseExpression();
  163549. };
  163550. Parser3.tokenizer = function tokenizer3(input, options) {
  163551. return new this(options, input);
  163552. };
  163553. Object.defineProperties(Parser3.prototype, prototypeAccessors2);
  163554. var pp$92 = Parser3.prototype;
  163555. var literal2 = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
  163556. pp$92.strictDirective = function(start3) {
  163557. for (; ; ) {
  163558. skipWhiteSpace2.lastIndex = start3;
  163559. start3 += skipWhiteSpace2.exec(this.input)[0].length;
  163560. var match = literal2.exec(this.input.slice(start3));
  163561. if (!match) {
  163562. return false;
  163563. }
  163564. if ((match[1] || match[2]) === "use strict") {
  163565. skipWhiteSpace2.lastIndex = start3 + match[0].length;
  163566. var spaceAfter = skipWhiteSpace2.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
  163567. var next = this.input.charAt(end);
  163568. return next === ";" || next === "}" || lineBreak2.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
  163569. }
  163570. start3 += match[0].length;
  163571. skipWhiteSpace2.lastIndex = start3;
  163572. start3 += skipWhiteSpace2.exec(this.input)[0].length;
  163573. if (this.input[start3] === ";") {
  163574. start3++;
  163575. }
  163576. }
  163577. };
  163578. pp$92.eat = function(type) {
  163579. if (this.type === type) {
  163580. this.next();
  163581. return true;
  163582. } else {
  163583. return false;
  163584. }
  163585. };
  163586. pp$92.isContextual = function(name2) {
  163587. return this.type === types$12.name && this.value === name2 && !this.containsEsc;
  163588. };
  163589. pp$92.eatContextual = function(name2) {
  163590. if (!this.isContextual(name2)) {
  163591. return false;
  163592. }
  163593. this.next();
  163594. return true;
  163595. };
  163596. pp$92.expectContextual = function(name2) {
  163597. if (!this.eatContextual(name2)) {
  163598. this.unexpected();
  163599. }
  163600. };
  163601. pp$92.canInsertSemicolon = function() {
  163602. return this.type === types$12.eof || this.type === types$12.braceR || lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  163603. };
  163604. pp$92.insertSemicolon = function() {
  163605. if (this.canInsertSemicolon()) {
  163606. if (this.options.onInsertedSemicolon) {
  163607. this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
  163608. }
  163609. return true;
  163610. }
  163611. };
  163612. pp$92.semicolon = function() {
  163613. if (!this.eat(types$12.semi) && !this.insertSemicolon()) {
  163614. this.unexpected();
  163615. }
  163616. };
  163617. pp$92.afterTrailingComma = function(tokType, notNext) {
  163618. if (this.type === tokType) {
  163619. if (this.options.onTrailingComma) {
  163620. this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
  163621. }
  163622. if (!notNext) {
  163623. this.next();
  163624. }
  163625. return true;
  163626. }
  163627. };
  163628. pp$92.expect = function(type) {
  163629. this.eat(type) || this.unexpected();
  163630. };
  163631. pp$92.unexpected = function(pos) {
  163632. this.raise(pos != null ? pos : this.start, "Unexpected token");
  163633. };
  163634. function DestructuringErrors2() {
  163635. this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
  163636. }
  163637. pp$92.checkPatternErrors = function(refDestructuringErrors, isAssign) {
  163638. if (!refDestructuringErrors) {
  163639. return;
  163640. }
  163641. if (refDestructuringErrors.trailingComma > -1) {
  163642. this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
  163643. }
  163644. var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
  163645. if (parens > -1) {
  163646. this.raiseRecoverable(parens, "Parenthesized pattern");
  163647. }
  163648. };
  163649. pp$92.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
  163650. if (!refDestructuringErrors) {
  163651. return false;
  163652. }
  163653. var shorthandAssign = refDestructuringErrors.shorthandAssign;
  163654. var doubleProto = refDestructuringErrors.doubleProto;
  163655. if (!andThrow) {
  163656. return shorthandAssign >= 0 || doubleProto >= 0;
  163657. }
  163658. if (shorthandAssign >= 0) {
  163659. this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
  163660. }
  163661. if (doubleProto >= 0) {
  163662. this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
  163663. }
  163664. };
  163665. pp$92.checkYieldAwaitInDefaultParams = function() {
  163666. if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
  163667. this.raise(this.yieldPos, "Yield expression cannot be a default value");
  163668. }
  163669. if (this.awaitPos) {
  163670. this.raise(this.awaitPos, "Await expression cannot be a default value");
  163671. }
  163672. };
  163673. pp$92.isSimpleAssignTarget = function(expr) {
  163674. if (expr.type === "ParenthesizedExpression") {
  163675. return this.isSimpleAssignTarget(expr.expression);
  163676. }
  163677. return expr.type === "Identifier" || expr.type === "MemberExpression";
  163678. };
  163679. var pp$82 = Parser3.prototype;
  163680. pp$82.parseTopLevel = function(node) {
  163681. var exports3 = /* @__PURE__ */ Object.create(null);
  163682. if (!node.body) {
  163683. node.body = [];
  163684. }
  163685. while (this.type !== types$12.eof) {
  163686. var stmt = this.parseStatement(null, true, exports3);
  163687. node.body.push(stmt);
  163688. }
  163689. if (this.inModule) {
  163690. for (var i2 = 0, list4 = Object.keys(this.undefinedExports); i2 < list4.length; i2 += 1) {
  163691. var name2 = list4[i2];
  163692. this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
  163693. }
  163694. }
  163695. this.adaptDirectivePrologue(node.body);
  163696. this.next();
  163697. node.sourceType = this.options.sourceType;
  163698. return this.finishNode(node, "Program");
  163699. };
  163700. var loopLabel2 = { kind: "loop" }, switchLabel2 = { kind: "switch" };
  163701. pp$82.isLet = function(context) {
  163702. if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
  163703. return false;
  163704. }
  163705. skipWhiteSpace2.lastIndex = this.pos;
  163706. var skip = skipWhiteSpace2.exec(this.input);
  163707. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  163708. if (nextCh === 91 || nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  163709. return true;
  163710. }
  163711. if (context) {
  163712. return false;
  163713. }
  163714. if (nextCh === 123) {
  163715. return true;
  163716. }
  163717. if (isIdentifierStart2(nextCh, true)) {
  163718. var pos = next + 1;
  163719. while (isIdentifierChar2(nextCh = this.input.charCodeAt(pos), true)) {
  163720. ++pos;
  163721. }
  163722. if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  163723. return true;
  163724. }
  163725. var ident = this.input.slice(next, pos);
  163726. if (!keywordRelationalOperator2.test(ident)) {
  163727. return true;
  163728. }
  163729. }
  163730. return false;
  163731. };
  163732. pp$82.isAsyncFunction = function() {
  163733. if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
  163734. return false;
  163735. }
  163736. skipWhiteSpace2.lastIndex = this.pos;
  163737. var skip = skipWhiteSpace2.exec(this.input);
  163738. var next = this.pos + skip[0].length, after;
  163739. return !lineBreak2.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar2(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
  163740. };
  163741. pp$82.parseStatement = function(context, topLevel, exports3) {
  163742. var starttype = this.type, node = this.startNode(), kind;
  163743. if (this.isLet(context)) {
  163744. starttype = types$12._var;
  163745. kind = "let";
  163746. }
  163747. switch (starttype) {
  163748. case types$12._break:
  163749. case types$12._continue:
  163750. return this.parseBreakContinueStatement(node, starttype.keyword);
  163751. case types$12._debugger:
  163752. return this.parseDebuggerStatement(node);
  163753. case types$12._do:
  163754. return this.parseDoStatement(node);
  163755. case types$12._for:
  163756. return this.parseForStatement(node);
  163757. case types$12._function:
  163758. if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
  163759. this.unexpected();
  163760. }
  163761. return this.parseFunctionStatement(node, false, !context);
  163762. case types$12._class:
  163763. if (context) {
  163764. this.unexpected();
  163765. }
  163766. return this.parseClass(node, true);
  163767. case types$12._if:
  163768. return this.parseIfStatement(node);
  163769. case types$12._return:
  163770. return this.parseReturnStatement(node);
  163771. case types$12._switch:
  163772. return this.parseSwitchStatement(node);
  163773. case types$12._throw:
  163774. return this.parseThrowStatement(node);
  163775. case types$12._try:
  163776. return this.parseTryStatement(node);
  163777. case types$12._const:
  163778. case types$12._var:
  163779. kind = kind || this.value;
  163780. if (context && kind !== "var") {
  163781. this.unexpected();
  163782. }
  163783. return this.parseVarStatement(node, kind);
  163784. case types$12._while:
  163785. return this.parseWhileStatement(node);
  163786. case types$12._with:
  163787. return this.parseWithStatement(node);
  163788. case types$12.braceL:
  163789. return this.parseBlock(true, node);
  163790. case types$12.semi:
  163791. return this.parseEmptyStatement(node);
  163792. case types$12._export:
  163793. case types$12._import:
  163794. if (this.options.ecmaVersion > 10 && starttype === types$12._import) {
  163795. skipWhiteSpace2.lastIndex = this.pos;
  163796. var skip = skipWhiteSpace2.exec(this.input);
  163797. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  163798. if (nextCh === 40 || nextCh === 46) {
  163799. return this.parseExpressionStatement(node, this.parseExpression());
  163800. }
  163801. }
  163802. if (!this.options.allowImportExportEverywhere) {
  163803. if (!topLevel) {
  163804. this.raise(this.start, "'import' and 'export' may only appear at the top level");
  163805. }
  163806. if (!this.inModule) {
  163807. this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
  163808. }
  163809. }
  163810. return starttype === types$12._import ? this.parseImport(node) : this.parseExport(node, exports3);
  163811. default:
  163812. if (this.isAsyncFunction()) {
  163813. if (context) {
  163814. this.unexpected();
  163815. }
  163816. this.next();
  163817. return this.parseFunctionStatement(node, true, !context);
  163818. }
  163819. var maybeName = this.value, expr = this.parseExpression();
  163820. if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) {
  163821. return this.parseLabeledStatement(node, maybeName, expr, context);
  163822. } else {
  163823. return this.parseExpressionStatement(node, expr);
  163824. }
  163825. }
  163826. };
  163827. pp$82.parseBreakContinueStatement = function(node, keyword) {
  163828. var isBreak = keyword === "break";
  163829. this.next();
  163830. if (this.eat(types$12.semi) || this.insertSemicolon()) {
  163831. node.label = null;
  163832. } else if (this.type !== types$12.name) {
  163833. this.unexpected();
  163834. } else {
  163835. node.label = this.parseIdent();
  163836. this.semicolon();
  163837. }
  163838. var i2 = 0;
  163839. for (; i2 < this.labels.length; ++i2) {
  163840. var lab = this.labels[i2];
  163841. if (node.label == null || lab.name === node.label.name) {
  163842. if (lab.kind != null && (isBreak || lab.kind === "loop")) {
  163843. break;
  163844. }
  163845. if (node.label && isBreak) {
  163846. break;
  163847. }
  163848. }
  163849. }
  163850. if (i2 === this.labels.length) {
  163851. this.raise(node.start, "Unsyntactic " + keyword);
  163852. }
  163853. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  163854. };
  163855. pp$82.parseDebuggerStatement = function(node) {
  163856. this.next();
  163857. this.semicolon();
  163858. return this.finishNode(node, "DebuggerStatement");
  163859. };
  163860. pp$82.parseDoStatement = function(node) {
  163861. this.next();
  163862. this.labels.push(loopLabel2);
  163863. node.body = this.parseStatement("do");
  163864. this.labels.pop();
  163865. this.expect(types$12._while);
  163866. node.test = this.parseParenExpression();
  163867. if (this.options.ecmaVersion >= 6) {
  163868. this.eat(types$12.semi);
  163869. } else {
  163870. this.semicolon();
  163871. }
  163872. return this.finishNode(node, "DoWhileStatement");
  163873. };
  163874. pp$82.parseForStatement = function(node) {
  163875. this.next();
  163876. var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
  163877. this.labels.push(loopLabel2);
  163878. this.enterScope(0);
  163879. this.expect(types$12.parenL);
  163880. if (this.type === types$12.semi) {
  163881. if (awaitAt > -1) {
  163882. this.unexpected(awaitAt);
  163883. }
  163884. return this.parseFor(node, null);
  163885. }
  163886. var isLet = this.isLet();
  163887. if (this.type === types$12._var || this.type === types$12._const || isLet) {
  163888. var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
  163889. this.next();
  163890. this.parseVar(init$1, true, kind);
  163891. this.finishNode(init$1, "VariableDeclaration");
  163892. if ((this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
  163893. if (this.options.ecmaVersion >= 9) {
  163894. if (this.type === types$12._in) {
  163895. if (awaitAt > -1) {
  163896. this.unexpected(awaitAt);
  163897. }
  163898. } else {
  163899. node.await = awaitAt > -1;
  163900. }
  163901. }
  163902. return this.parseForIn(node, init$1);
  163903. }
  163904. if (awaitAt > -1) {
  163905. this.unexpected(awaitAt);
  163906. }
  163907. return this.parseFor(node, init$1);
  163908. }
  163909. var startsWithLet = this.isContextual("let"), isForOf = false;
  163910. var refDestructuringErrors = new DestructuringErrors2();
  163911. var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
  163912. if (this.type === types$12._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  163913. if (this.options.ecmaVersion >= 9) {
  163914. if (this.type === types$12._in) {
  163915. if (awaitAt > -1) {
  163916. this.unexpected(awaitAt);
  163917. }
  163918. } else {
  163919. node.await = awaitAt > -1;
  163920. }
  163921. }
  163922. if (startsWithLet && isForOf) {
  163923. this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'.");
  163924. }
  163925. this.toAssignable(init, false, refDestructuringErrors);
  163926. this.checkLValPattern(init);
  163927. return this.parseForIn(node, init);
  163928. } else {
  163929. this.checkExpressionErrors(refDestructuringErrors, true);
  163930. }
  163931. if (awaitAt > -1) {
  163932. this.unexpected(awaitAt);
  163933. }
  163934. return this.parseFor(node, init);
  163935. };
  163936. pp$82.parseFunctionStatement = function(node, isAsync, declarationPosition) {
  163937. this.next();
  163938. return this.parseFunction(node, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), false, isAsync);
  163939. };
  163940. pp$82.parseIfStatement = function(node) {
  163941. this.next();
  163942. node.test = this.parseParenExpression();
  163943. node.consequent = this.parseStatement("if");
  163944. node.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null;
  163945. return this.finishNode(node, "IfStatement");
  163946. };
  163947. pp$82.parseReturnStatement = function(node) {
  163948. if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
  163949. this.raise(this.start, "'return' outside of function");
  163950. }
  163951. this.next();
  163952. if (this.eat(types$12.semi) || this.insertSemicolon()) {
  163953. node.argument = null;
  163954. } else {
  163955. node.argument = this.parseExpression();
  163956. this.semicolon();
  163957. }
  163958. return this.finishNode(node, "ReturnStatement");
  163959. };
  163960. pp$82.parseSwitchStatement = function(node) {
  163961. this.next();
  163962. node.discriminant = this.parseParenExpression();
  163963. node.cases = [];
  163964. this.expect(types$12.braceL);
  163965. this.labels.push(switchLabel2);
  163966. this.enterScope(0);
  163967. var cur;
  163968. for (var sawDefault = false; this.type !== types$12.braceR; ) {
  163969. if (this.type === types$12._case || this.type === types$12._default) {
  163970. var isCase = this.type === types$12._case;
  163971. if (cur) {
  163972. this.finishNode(cur, "SwitchCase");
  163973. }
  163974. node.cases.push(cur = this.startNode());
  163975. cur.consequent = [];
  163976. this.next();
  163977. if (isCase) {
  163978. cur.test = this.parseExpression();
  163979. } else {
  163980. if (sawDefault) {
  163981. this.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
  163982. }
  163983. sawDefault = true;
  163984. cur.test = null;
  163985. }
  163986. this.expect(types$12.colon);
  163987. } else {
  163988. if (!cur) {
  163989. this.unexpected();
  163990. }
  163991. cur.consequent.push(this.parseStatement(null));
  163992. }
  163993. }
  163994. this.exitScope();
  163995. if (cur) {
  163996. this.finishNode(cur, "SwitchCase");
  163997. }
  163998. this.next();
  163999. this.labels.pop();
  164000. return this.finishNode(node, "SwitchStatement");
  164001. };
  164002. pp$82.parseThrowStatement = function(node) {
  164003. this.next();
  164004. if (lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) {
  164005. this.raise(this.lastTokEnd, "Illegal newline after throw");
  164006. }
  164007. node.argument = this.parseExpression();
  164008. this.semicolon();
  164009. return this.finishNode(node, "ThrowStatement");
  164010. };
  164011. var empty$12 = [];
  164012. pp$82.parseTryStatement = function(node) {
  164013. this.next();
  164014. node.block = this.parseBlock();
  164015. node.handler = null;
  164016. if (this.type === types$12._catch) {
  164017. var clause = this.startNode();
  164018. this.next();
  164019. if (this.eat(types$12.parenL)) {
  164020. clause.param = this.parseBindingAtom();
  164021. var simple = clause.param.type === "Identifier";
  164022. this.enterScope(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  164023. this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH2 : BIND_LEXICAL2);
  164024. this.expect(types$12.parenR);
  164025. } else {
  164026. if (this.options.ecmaVersion < 10) {
  164027. this.unexpected();
  164028. }
  164029. clause.param = null;
  164030. this.enterScope(0);
  164031. }
  164032. clause.body = this.parseBlock(false);
  164033. this.exitScope();
  164034. node.handler = this.finishNode(clause, "CatchClause");
  164035. }
  164036. node.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null;
  164037. if (!node.handler && !node.finalizer) {
  164038. this.raise(node.start, "Missing catch or finally clause");
  164039. }
  164040. return this.finishNode(node, "TryStatement");
  164041. };
  164042. pp$82.parseVarStatement = function(node, kind) {
  164043. this.next();
  164044. this.parseVar(node, false, kind);
  164045. this.semicolon();
  164046. return this.finishNode(node, "VariableDeclaration");
  164047. };
  164048. pp$82.parseWhileStatement = function(node) {
  164049. this.next();
  164050. node.test = this.parseParenExpression();
  164051. this.labels.push(loopLabel2);
  164052. node.body = this.parseStatement("while");
  164053. this.labels.pop();
  164054. return this.finishNode(node, "WhileStatement");
  164055. };
  164056. pp$82.parseWithStatement = function(node) {
  164057. if (this.strict) {
  164058. this.raise(this.start, "'with' in strict mode");
  164059. }
  164060. this.next();
  164061. node.object = this.parseParenExpression();
  164062. node.body = this.parseStatement("with");
  164063. return this.finishNode(node, "WithStatement");
  164064. };
  164065. pp$82.parseEmptyStatement = function(node) {
  164066. this.next();
  164067. return this.finishNode(node, "EmptyStatement");
  164068. };
  164069. pp$82.parseLabeledStatement = function(node, maybeName, expr, context) {
  164070. for (var i$1 = 0, list4 = this.labels; i$1 < list4.length; i$1 += 1) {
  164071. var label = list4[i$1];
  164072. if (label.name === maybeName) {
  164073. this.raise(expr.start, "Label '" + maybeName + "' is already declared");
  164074. }
  164075. }
  164076. var kind = this.type.isLoop ? "loop" : this.type === types$12._switch ? "switch" : null;
  164077. for (var i2 = this.labels.length - 1; i2 >= 0; i2--) {
  164078. var label$1 = this.labels[i2];
  164079. if (label$1.statementStart === node.start) {
  164080. label$1.statementStart = this.start;
  164081. label$1.kind = kind;
  164082. } else {
  164083. break;
  164084. }
  164085. }
  164086. this.labels.push({ name: maybeName, kind, statementStart: this.start });
  164087. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  164088. this.labels.pop();
  164089. node.label = expr;
  164090. return this.finishNode(node, "LabeledStatement");
  164091. };
  164092. pp$82.parseExpressionStatement = function(node, expr) {
  164093. node.expression = expr;
  164094. this.semicolon();
  164095. return this.finishNode(node, "ExpressionStatement");
  164096. };
  164097. pp$82.parseBlock = function(createNewLexicalScope, node, exitStrict) {
  164098. if (createNewLexicalScope === void 0)
  164099. createNewLexicalScope = true;
  164100. if (node === void 0)
  164101. node = this.startNode();
  164102. node.body = [];
  164103. this.expect(types$12.braceL);
  164104. if (createNewLexicalScope) {
  164105. this.enterScope(0);
  164106. }
  164107. while (this.type !== types$12.braceR) {
  164108. var stmt = this.parseStatement(null);
  164109. node.body.push(stmt);
  164110. }
  164111. if (exitStrict) {
  164112. this.strict = false;
  164113. }
  164114. this.next();
  164115. if (createNewLexicalScope) {
  164116. this.exitScope();
  164117. }
  164118. return this.finishNode(node, "BlockStatement");
  164119. };
  164120. pp$82.parseFor = function(node, init) {
  164121. node.init = init;
  164122. this.expect(types$12.semi);
  164123. node.test = this.type === types$12.semi ? null : this.parseExpression();
  164124. this.expect(types$12.semi);
  164125. node.update = this.type === types$12.parenR ? null : this.parseExpression();
  164126. this.expect(types$12.parenR);
  164127. node.body = this.parseStatement("for");
  164128. this.exitScope();
  164129. this.labels.pop();
  164130. return this.finishNode(node, "ForStatement");
  164131. };
  164132. pp$82.parseForIn = function(node, init) {
  164133. var isForIn = this.type === types$12._in;
  164134. this.next();
  164135. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  164136. this.raise(
  164137. init.start,
  164138. (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
  164139. );
  164140. }
  164141. node.left = init;
  164142. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
  164143. this.expect(types$12.parenR);
  164144. node.body = this.parseStatement("for");
  164145. this.exitScope();
  164146. this.labels.pop();
  164147. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  164148. };
  164149. pp$82.parseVar = function(node, isFor, kind) {
  164150. node.declarations = [];
  164151. node.kind = kind;
  164152. for (; ; ) {
  164153. var decl = this.startNode();
  164154. this.parseVarId(decl, kind);
  164155. if (this.eat(types$12.eq)) {
  164156. decl.init = this.parseMaybeAssign(isFor);
  164157. } else if (kind === "const" && !(this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  164158. this.unexpected();
  164159. } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types$12._in || this.isContextual("of")))) {
  164160. this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
  164161. } else {
  164162. decl.init = null;
  164163. }
  164164. node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
  164165. if (!this.eat(types$12.comma)) {
  164166. break;
  164167. }
  164168. }
  164169. return node;
  164170. };
  164171. pp$82.parseVarId = function(decl, kind) {
  164172. decl.id = this.parseBindingAtom();
  164173. this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, false);
  164174. };
  164175. var FUNC_STATEMENT2 = 1, FUNC_HANGING_STATEMENT2 = 2, FUNC_NULLABLE_ID2 = 4;
  164176. pp$82.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
  164177. this.initFunction(node);
  164178. if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
  164179. if (this.type === types$12.star && statement & FUNC_HANGING_STATEMENT2) {
  164180. this.unexpected();
  164181. }
  164182. node.generator = this.eat(types$12.star);
  164183. }
  164184. if (this.options.ecmaVersion >= 8) {
  164185. node.async = !!isAsync;
  164186. }
  164187. if (statement & FUNC_STATEMENT2) {
  164188. node.id = statement & FUNC_NULLABLE_ID2 && this.type !== types$12.name ? null : this.parseIdent();
  164189. if (node.id && !(statement & FUNC_HANGING_STATEMENT2)) {
  164190. this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2);
  164191. }
  164192. }
  164193. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  164194. this.yieldPos = 0;
  164195. this.awaitPos = 0;
  164196. this.awaitIdentPos = 0;
  164197. this.enterScope(functionFlags2(node.async, node.generator));
  164198. if (!(statement & FUNC_STATEMENT2)) {
  164199. node.id = this.type === types$12.name ? this.parseIdent() : null;
  164200. }
  164201. this.parseFunctionParams(node);
  164202. this.parseFunctionBody(node, allowExpressionBody, false, forInit);
  164203. this.yieldPos = oldYieldPos;
  164204. this.awaitPos = oldAwaitPos;
  164205. this.awaitIdentPos = oldAwaitIdentPos;
  164206. return this.finishNode(node, statement & FUNC_STATEMENT2 ? "FunctionDeclaration" : "FunctionExpression");
  164207. };
  164208. pp$82.parseFunctionParams = function(node) {
  164209. this.expect(types$12.parenL);
  164210. node.params = this.parseBindingList(types$12.parenR, false, this.options.ecmaVersion >= 8);
  164211. this.checkYieldAwaitInDefaultParams();
  164212. };
  164213. pp$82.parseClass = function(node, isStatement) {
  164214. this.next();
  164215. var oldStrict = this.strict;
  164216. this.strict = true;
  164217. this.parseClassId(node, isStatement);
  164218. this.parseClassSuper(node);
  164219. var privateNameMap = this.enterClassBody();
  164220. var classBody = this.startNode();
  164221. var hadConstructor = false;
  164222. classBody.body = [];
  164223. this.expect(types$12.braceL);
  164224. while (this.type !== types$12.braceR) {
  164225. var element2 = this.parseClassElement(node.superClass !== null);
  164226. if (element2) {
  164227. classBody.body.push(element2);
  164228. if (element2.type === "MethodDefinition" && element2.kind === "constructor") {
  164229. if (hadConstructor) {
  164230. this.raise(element2.start, "Duplicate constructor in the same class");
  164231. }
  164232. hadConstructor = true;
  164233. } else if (element2.key && element2.key.type === "PrivateIdentifier" && isPrivateNameConflicted2(privateNameMap, element2)) {
  164234. this.raiseRecoverable(element2.key.start, "Identifier '#" + element2.key.name + "' has already been declared");
  164235. }
  164236. }
  164237. }
  164238. this.strict = oldStrict;
  164239. this.next();
  164240. node.body = this.finishNode(classBody, "ClassBody");
  164241. this.exitClassBody();
  164242. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  164243. };
  164244. pp$82.parseClassElement = function(constructorAllowsSuper) {
  164245. if (this.eat(types$12.semi)) {
  164246. return null;
  164247. }
  164248. var ecmaVersion2 = this.options.ecmaVersion;
  164249. var node = this.startNode();
  164250. var keyName = "";
  164251. var isGenerator = false;
  164252. var isAsync = false;
  164253. var kind = "method";
  164254. var isStatic = false;
  164255. if (this.eatContextual("static")) {
  164256. if (ecmaVersion2 >= 13 && this.eat(types$12.braceL)) {
  164257. this.parseClassStaticBlock(node);
  164258. return node;
  164259. }
  164260. if (this.isClassElementNameStart() || this.type === types$12.star) {
  164261. isStatic = true;
  164262. } else {
  164263. keyName = "static";
  164264. }
  164265. }
  164266. node.static = isStatic;
  164267. if (!keyName && ecmaVersion2 >= 8 && this.eatContextual("async")) {
  164268. if ((this.isClassElementNameStart() || this.type === types$12.star) && !this.canInsertSemicolon()) {
  164269. isAsync = true;
  164270. } else {
  164271. keyName = "async";
  164272. }
  164273. }
  164274. if (!keyName && (ecmaVersion2 >= 9 || !isAsync) && this.eat(types$12.star)) {
  164275. isGenerator = true;
  164276. }
  164277. if (!keyName && !isAsync && !isGenerator) {
  164278. var lastValue = this.value;
  164279. if (this.eatContextual("get") || this.eatContextual("set")) {
  164280. if (this.isClassElementNameStart()) {
  164281. kind = lastValue;
  164282. } else {
  164283. keyName = lastValue;
  164284. }
  164285. }
  164286. }
  164287. if (keyName) {
  164288. node.computed = false;
  164289. node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
  164290. node.key.name = keyName;
  164291. this.finishNode(node.key, "Identifier");
  164292. } else {
  164293. this.parseClassElementName(node);
  164294. }
  164295. if (ecmaVersion2 < 13 || this.type === types$12.parenL || kind !== "method" || isGenerator || isAsync) {
  164296. var isConstructor = !node.static && checkKeyName2(node, "constructor");
  164297. var allowsDirectSuper = isConstructor && constructorAllowsSuper;
  164298. if (isConstructor && kind !== "method") {
  164299. this.raise(node.key.start, "Constructor can't have get/set modifier");
  164300. }
  164301. node.kind = isConstructor ? "constructor" : kind;
  164302. this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
  164303. } else {
  164304. this.parseClassField(node);
  164305. }
  164306. return node;
  164307. };
  164308. pp$82.isClassElementNameStart = function() {
  164309. return this.type === types$12.name || this.type === types$12.privateId || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword;
  164310. };
  164311. pp$82.parseClassElementName = function(element2) {
  164312. if (this.type === types$12.privateId) {
  164313. if (this.value === "constructor") {
  164314. this.raise(this.start, "Classes can't have an element named '#constructor'");
  164315. }
  164316. element2.computed = false;
  164317. element2.key = this.parsePrivateIdent();
  164318. } else {
  164319. this.parsePropertyName(element2);
  164320. }
  164321. };
  164322. pp$82.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
  164323. var key = method.key;
  164324. if (method.kind === "constructor") {
  164325. if (isGenerator) {
  164326. this.raise(key.start, "Constructor can't be a generator");
  164327. }
  164328. if (isAsync) {
  164329. this.raise(key.start, "Constructor can't be an async method");
  164330. }
  164331. } else if (method.static && checkKeyName2(method, "prototype")) {
  164332. this.raise(key.start, "Classes may not have a static property named prototype");
  164333. }
  164334. var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
  164335. if (method.kind === "get" && value.params.length !== 0) {
  164336. this.raiseRecoverable(value.start, "getter should have no params");
  164337. }
  164338. if (method.kind === "set" && value.params.length !== 1) {
  164339. this.raiseRecoverable(value.start, "setter should have exactly one param");
  164340. }
  164341. if (method.kind === "set" && value.params[0].type === "RestElement") {
  164342. this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params");
  164343. }
  164344. return this.finishNode(method, "MethodDefinition");
  164345. };
  164346. pp$82.parseClassField = function(field) {
  164347. if (checkKeyName2(field, "constructor")) {
  164348. this.raise(field.key.start, "Classes can't have a field named 'constructor'");
  164349. } else if (field.static && checkKeyName2(field, "prototype")) {
  164350. this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
  164351. }
  164352. if (this.eat(types$12.eq)) {
  164353. var scope = this.currentThisScope();
  164354. var inClassFieldInit = scope.inClassFieldInit;
  164355. scope.inClassFieldInit = true;
  164356. field.value = this.parseMaybeAssign();
  164357. scope.inClassFieldInit = inClassFieldInit;
  164358. } else {
  164359. field.value = null;
  164360. }
  164361. this.semicolon();
  164362. return this.finishNode(field, "PropertyDefinition");
  164363. };
  164364. pp$82.parseClassStaticBlock = function(node) {
  164365. node.body = [];
  164366. var oldLabels = this.labels;
  164367. this.labels = [];
  164368. this.enterScope(SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_SUPER2);
  164369. while (this.type !== types$12.braceR) {
  164370. var stmt = this.parseStatement(null);
  164371. node.body.push(stmt);
  164372. }
  164373. this.next();
  164374. this.exitScope();
  164375. this.labels = oldLabels;
  164376. return this.finishNode(node, "StaticBlock");
  164377. };
  164378. pp$82.parseClassId = function(node, isStatement) {
  164379. if (this.type === types$12.name) {
  164380. node.id = this.parseIdent();
  164381. if (isStatement) {
  164382. this.checkLValSimple(node.id, BIND_LEXICAL2, false);
  164383. }
  164384. } else {
  164385. if (isStatement === true) {
  164386. this.unexpected();
  164387. }
  164388. node.id = null;
  164389. }
  164390. };
  164391. pp$82.parseClassSuper = function(node) {
  164392. node.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts(false) : null;
  164393. };
  164394. pp$82.enterClassBody = function() {
  164395. var element2 = { declared: /* @__PURE__ */ Object.create(null), used: [] };
  164396. this.privateNameStack.push(element2);
  164397. return element2.declared;
  164398. };
  164399. pp$82.exitClassBody = function() {
  164400. var ref3 = this.privateNameStack.pop();
  164401. var declared = ref3.declared;
  164402. var used = ref3.used;
  164403. var len = this.privateNameStack.length;
  164404. var parent = len === 0 ? null : this.privateNameStack[len - 1];
  164405. for (var i2 = 0; i2 < used.length; ++i2) {
  164406. var id = used[i2];
  164407. if (!hasOwn2(declared, id.name)) {
  164408. if (parent) {
  164409. parent.used.push(id);
  164410. } else {
  164411. this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class");
  164412. }
  164413. }
  164414. }
  164415. };
  164416. function isPrivateNameConflicted2(privateNameMap, element2) {
  164417. var name2 = element2.key.name;
  164418. var curr = privateNameMap[name2];
  164419. var next = "true";
  164420. if (element2.type === "MethodDefinition" && (element2.kind === "get" || element2.kind === "set")) {
  164421. next = (element2.static ? "s" : "i") + element2.kind;
  164422. }
  164423. if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") {
  164424. privateNameMap[name2] = "true";
  164425. return false;
  164426. } else if (!curr) {
  164427. privateNameMap[name2] = next;
  164428. return false;
  164429. } else {
  164430. return true;
  164431. }
  164432. }
  164433. function checkKeyName2(node, name2) {
  164434. var computed = node.computed;
  164435. var key = node.key;
  164436. return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
  164437. }
  164438. pp$82.parseExport = function(node, exports3) {
  164439. this.next();
  164440. if (this.eat(types$12.star)) {
  164441. if (this.options.ecmaVersion >= 11) {
  164442. if (this.eatContextual("as")) {
  164443. node.exported = this.parseModuleExportName();
  164444. this.checkExport(exports3, node.exported.name, this.lastTokStart);
  164445. } else {
  164446. node.exported = null;
  164447. }
  164448. }
  164449. this.expectContextual("from");
  164450. if (this.type !== types$12.string) {
  164451. this.unexpected();
  164452. }
  164453. node.source = this.parseExprAtom();
  164454. this.semicolon();
  164455. return this.finishNode(node, "ExportAllDeclaration");
  164456. }
  164457. if (this.eat(types$12._default)) {
  164458. this.checkExport(exports3, "default", this.lastTokStart);
  164459. var isAsync;
  164460. if (this.type === types$12._function || (isAsync = this.isAsyncFunction())) {
  164461. var fNode = this.startNode();
  164462. this.next();
  164463. if (isAsync) {
  164464. this.next();
  164465. }
  164466. node.declaration = this.parseFunction(fNode, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, false, isAsync);
  164467. } else if (this.type === types$12._class) {
  164468. var cNode = this.startNode();
  164469. node.declaration = this.parseClass(cNode, "nullableID");
  164470. } else {
  164471. node.declaration = this.parseMaybeAssign();
  164472. this.semicolon();
  164473. }
  164474. return this.finishNode(node, "ExportDefaultDeclaration");
  164475. }
  164476. if (this.shouldParseExportStatement()) {
  164477. node.declaration = this.parseStatement(null);
  164478. if (node.declaration.type === "VariableDeclaration") {
  164479. this.checkVariableExport(exports3, node.declaration.declarations);
  164480. } else {
  164481. this.checkExport(exports3, node.declaration.id.name, node.declaration.id.start);
  164482. }
  164483. node.specifiers = [];
  164484. node.source = null;
  164485. } else {
  164486. node.declaration = null;
  164487. node.specifiers = this.parseExportSpecifiers(exports3);
  164488. if (this.eatContextual("from")) {
  164489. if (this.type !== types$12.string) {
  164490. this.unexpected();
  164491. }
  164492. node.source = this.parseExprAtom();
  164493. } else {
  164494. for (var i2 = 0, list4 = node.specifiers; i2 < list4.length; i2 += 1) {
  164495. var spec = list4[i2];
  164496. this.checkUnreserved(spec.local);
  164497. this.checkLocalExport(spec.local);
  164498. if (spec.local.type === "Literal") {
  164499. this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
  164500. }
  164501. }
  164502. node.source = null;
  164503. }
  164504. this.semicolon();
  164505. }
  164506. return this.finishNode(node, "ExportNamedDeclaration");
  164507. };
  164508. pp$82.checkExport = function(exports3, name2, pos) {
  164509. if (!exports3) {
  164510. return;
  164511. }
  164512. if (hasOwn2(exports3, name2)) {
  164513. this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
  164514. }
  164515. exports3[name2] = true;
  164516. };
  164517. pp$82.checkPatternExport = function(exports3, pat) {
  164518. var type = pat.type;
  164519. if (type === "Identifier") {
  164520. this.checkExport(exports3, pat.name, pat.start);
  164521. } else if (type === "ObjectPattern") {
  164522. for (var i2 = 0, list4 = pat.properties; i2 < list4.length; i2 += 1) {
  164523. var prop = list4[i2];
  164524. this.checkPatternExport(exports3, prop);
  164525. }
  164526. } else if (type === "ArrayPattern") {
  164527. for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
  164528. var elt = list$1[i$1];
  164529. if (elt) {
  164530. this.checkPatternExport(exports3, elt);
  164531. }
  164532. }
  164533. } else if (type === "Property") {
  164534. this.checkPatternExport(exports3, pat.value);
  164535. } else if (type === "AssignmentPattern") {
  164536. this.checkPatternExport(exports3, pat.left);
  164537. } else if (type === "RestElement") {
  164538. this.checkPatternExport(exports3, pat.argument);
  164539. } else if (type === "ParenthesizedExpression") {
  164540. this.checkPatternExport(exports3, pat.expression);
  164541. }
  164542. };
  164543. pp$82.checkVariableExport = function(exports3, decls) {
  164544. if (!exports3) {
  164545. return;
  164546. }
  164547. for (var i2 = 0, list4 = decls; i2 < list4.length; i2 += 1) {
  164548. var decl = list4[i2];
  164549. this.checkPatternExport(exports3, decl.id);
  164550. }
  164551. };
  164552. pp$82.shouldParseExportStatement = function() {
  164553. return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
  164554. };
  164555. pp$82.parseExportSpecifiers = function(exports3) {
  164556. var nodes = [], first = true;
  164557. this.expect(types$12.braceL);
  164558. while (!this.eat(types$12.braceR)) {
  164559. if (!first) {
  164560. this.expect(types$12.comma);
  164561. if (this.afterTrailingComma(types$12.braceR)) {
  164562. break;
  164563. }
  164564. } else {
  164565. first = false;
  164566. }
  164567. var node = this.startNode();
  164568. node.local = this.parseModuleExportName();
  164569. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
  164570. this.checkExport(
  164571. exports3,
  164572. node.exported[node.exported.type === "Identifier" ? "name" : "value"],
  164573. node.exported.start
  164574. );
  164575. nodes.push(this.finishNode(node, "ExportSpecifier"));
  164576. }
  164577. return nodes;
  164578. };
  164579. pp$82.parseImport = function(node) {
  164580. this.next();
  164581. if (this.type === types$12.string) {
  164582. node.specifiers = empty$12;
  164583. node.source = this.parseExprAtom();
  164584. } else {
  164585. node.specifiers = this.parseImportSpecifiers();
  164586. this.expectContextual("from");
  164587. node.source = this.type === types$12.string ? this.parseExprAtom() : this.unexpected();
  164588. }
  164589. this.semicolon();
  164590. return this.finishNode(node, "ImportDeclaration");
  164591. };
  164592. pp$82.parseImportSpecifiers = function() {
  164593. var nodes = [], first = true;
  164594. if (this.type === types$12.name) {
  164595. var node = this.startNode();
  164596. node.local = this.parseIdent();
  164597. this.checkLValSimple(node.local, BIND_LEXICAL2);
  164598. nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
  164599. if (!this.eat(types$12.comma)) {
  164600. return nodes;
  164601. }
  164602. }
  164603. if (this.type === types$12.star) {
  164604. var node$1 = this.startNode();
  164605. this.next();
  164606. this.expectContextual("as");
  164607. node$1.local = this.parseIdent();
  164608. this.checkLValSimple(node$1.local, BIND_LEXICAL2);
  164609. nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
  164610. return nodes;
  164611. }
  164612. this.expect(types$12.braceL);
  164613. while (!this.eat(types$12.braceR)) {
  164614. if (!first) {
  164615. this.expect(types$12.comma);
  164616. if (this.afterTrailingComma(types$12.braceR)) {
  164617. break;
  164618. }
  164619. } else {
  164620. first = false;
  164621. }
  164622. var node$2 = this.startNode();
  164623. node$2.imported = this.parseModuleExportName();
  164624. if (this.eatContextual("as")) {
  164625. node$2.local = this.parseIdent();
  164626. } else {
  164627. this.checkUnreserved(node$2.imported);
  164628. node$2.local = node$2.imported;
  164629. }
  164630. this.checkLValSimple(node$2.local, BIND_LEXICAL2);
  164631. nodes.push(this.finishNode(node$2, "ImportSpecifier"));
  164632. }
  164633. return nodes;
  164634. };
  164635. pp$82.parseModuleExportName = function() {
  164636. if (this.options.ecmaVersion >= 13 && this.type === types$12.string) {
  164637. var stringLiteral = this.parseLiteral(this.value);
  164638. if (loneSurrogate2.test(stringLiteral.value)) {
  164639. this.raise(stringLiteral.start, "An export name cannot include a lone surrogate.");
  164640. }
  164641. return stringLiteral;
  164642. }
  164643. return this.parseIdent(true);
  164644. };
  164645. pp$82.adaptDirectivePrologue = function(statements) {
  164646. for (var i2 = 0; i2 < statements.length && this.isDirectiveCandidate(statements[i2]); ++i2) {
  164647. statements[i2].directive = statements[i2].expression.raw.slice(1, -1);
  164648. }
  164649. };
  164650. pp$82.isDirectiveCandidate = function(statement) {
  164651. return statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && (this.input[statement.start] === '"' || this.input[statement.start] === "'");
  164652. };
  164653. var pp$72 = Parser3.prototype;
  164654. pp$72.toAssignable = function(node, isBinding, refDestructuringErrors) {
  164655. if (this.options.ecmaVersion >= 6 && node) {
  164656. switch (node.type) {
  164657. case "Identifier":
  164658. if (this.inAsync && node.name === "await") {
  164659. this.raise(node.start, "Cannot use 'await' as identifier inside an async function");
  164660. }
  164661. break;
  164662. case "ObjectPattern":
  164663. case "ArrayPattern":
  164664. case "AssignmentPattern":
  164665. case "RestElement":
  164666. break;
  164667. case "ObjectExpression":
  164668. node.type = "ObjectPattern";
  164669. if (refDestructuringErrors) {
  164670. this.checkPatternErrors(refDestructuringErrors, true);
  164671. }
  164672. for (var i2 = 0, list4 = node.properties; i2 < list4.length; i2 += 1) {
  164673. var prop = list4[i2];
  164674. this.toAssignable(prop, isBinding);
  164675. if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
  164676. this.raise(prop.argument.start, "Unexpected token");
  164677. }
  164678. }
  164679. break;
  164680. case "Property":
  164681. if (node.kind !== "init") {
  164682. this.raise(node.key.start, "Object pattern can't contain getter or setter");
  164683. }
  164684. this.toAssignable(node.value, isBinding);
  164685. break;
  164686. case "ArrayExpression":
  164687. node.type = "ArrayPattern";
  164688. if (refDestructuringErrors) {
  164689. this.checkPatternErrors(refDestructuringErrors, true);
  164690. }
  164691. this.toAssignableList(node.elements, isBinding);
  164692. break;
  164693. case "SpreadElement":
  164694. node.type = "RestElement";
  164695. this.toAssignable(node.argument, isBinding);
  164696. if (node.argument.type === "AssignmentPattern") {
  164697. this.raise(node.argument.start, "Rest elements cannot have a default value");
  164698. }
  164699. break;
  164700. case "AssignmentExpression":
  164701. if (node.operator !== "=") {
  164702. this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
  164703. }
  164704. node.type = "AssignmentPattern";
  164705. delete node.operator;
  164706. this.toAssignable(node.left, isBinding);
  164707. break;
  164708. case "ParenthesizedExpression":
  164709. this.toAssignable(node.expression, isBinding, refDestructuringErrors);
  164710. break;
  164711. case "ChainExpression":
  164712. this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
  164713. break;
  164714. case "MemberExpression":
  164715. if (!isBinding) {
  164716. break;
  164717. }
  164718. default:
  164719. this.raise(node.start, "Assigning to rvalue");
  164720. }
  164721. } else if (refDestructuringErrors) {
  164722. this.checkPatternErrors(refDestructuringErrors, true);
  164723. }
  164724. return node;
  164725. };
  164726. pp$72.toAssignableList = function(exprList, isBinding) {
  164727. var end = exprList.length;
  164728. for (var i2 = 0; i2 < end; i2++) {
  164729. var elt = exprList[i2];
  164730. if (elt) {
  164731. this.toAssignable(elt, isBinding);
  164732. }
  164733. }
  164734. if (end) {
  164735. var last = exprList[end - 1];
  164736. if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") {
  164737. this.unexpected(last.argument.start);
  164738. }
  164739. }
  164740. return exprList;
  164741. };
  164742. pp$72.parseSpread = function(refDestructuringErrors) {
  164743. var node = this.startNode();
  164744. this.next();
  164745. node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  164746. return this.finishNode(node, "SpreadElement");
  164747. };
  164748. pp$72.parseRestBinding = function() {
  164749. var node = this.startNode();
  164750. this.next();
  164751. if (this.options.ecmaVersion === 6 && this.type !== types$12.name) {
  164752. this.unexpected();
  164753. }
  164754. node.argument = this.parseBindingAtom();
  164755. return this.finishNode(node, "RestElement");
  164756. };
  164757. pp$72.parseBindingAtom = function() {
  164758. if (this.options.ecmaVersion >= 6) {
  164759. switch (this.type) {
  164760. case types$12.bracketL:
  164761. var node = this.startNode();
  164762. this.next();
  164763. node.elements = this.parseBindingList(types$12.bracketR, true, true);
  164764. return this.finishNode(node, "ArrayPattern");
  164765. case types$12.braceL:
  164766. return this.parseObj(true);
  164767. }
  164768. }
  164769. return this.parseIdent();
  164770. };
  164771. pp$72.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
  164772. var elts = [], first = true;
  164773. while (!this.eat(close)) {
  164774. if (first) {
  164775. first = false;
  164776. } else {
  164777. this.expect(types$12.comma);
  164778. }
  164779. if (allowEmpty && this.type === types$12.comma) {
  164780. elts.push(null);
  164781. } else if (allowTrailingComma && this.afterTrailingComma(close)) {
  164782. break;
  164783. } else if (this.type === types$12.ellipsis) {
  164784. var rest = this.parseRestBinding();
  164785. this.parseBindingListItem(rest);
  164786. elts.push(rest);
  164787. if (this.type === types$12.comma) {
  164788. this.raise(this.start, "Comma is not permitted after the rest element");
  164789. }
  164790. this.expect(close);
  164791. break;
  164792. } else {
  164793. var elem = this.parseMaybeDefault(this.start, this.startLoc);
  164794. this.parseBindingListItem(elem);
  164795. elts.push(elem);
  164796. }
  164797. }
  164798. return elts;
  164799. };
  164800. pp$72.parseBindingListItem = function(param) {
  164801. return param;
  164802. };
  164803. pp$72.parseMaybeDefault = function(startPos, startLoc, left) {
  164804. left = left || this.parseBindingAtom();
  164805. if (this.options.ecmaVersion < 6 || !this.eat(types$12.eq)) {
  164806. return left;
  164807. }
  164808. var node = this.startNodeAt(startPos, startLoc);
  164809. node.left = left;
  164810. node.right = this.parseMaybeAssign();
  164811. return this.finishNode(node, "AssignmentPattern");
  164812. };
  164813. pp$72.checkLValSimple = function(expr, bindingType, checkClashes) {
  164814. if (bindingType === void 0)
  164815. bindingType = BIND_NONE2;
  164816. var isBind = bindingType !== BIND_NONE2;
  164817. switch (expr.type) {
  164818. case "Identifier":
  164819. if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
  164820. this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
  164821. }
  164822. if (isBind) {
  164823. if (bindingType === BIND_LEXICAL2 && expr.name === "let") {
  164824. this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name");
  164825. }
  164826. if (checkClashes) {
  164827. if (hasOwn2(checkClashes, expr.name)) {
  164828. this.raiseRecoverable(expr.start, "Argument name clash");
  164829. }
  164830. checkClashes[expr.name] = true;
  164831. }
  164832. if (bindingType !== BIND_OUTSIDE2) {
  164833. this.declareName(expr.name, bindingType, expr.start);
  164834. }
  164835. }
  164836. break;
  164837. case "ChainExpression":
  164838. this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
  164839. break;
  164840. case "MemberExpression":
  164841. if (isBind) {
  164842. this.raiseRecoverable(expr.start, "Binding member expression");
  164843. }
  164844. break;
  164845. case "ParenthesizedExpression":
  164846. if (isBind) {
  164847. this.raiseRecoverable(expr.start, "Binding parenthesized expression");
  164848. }
  164849. return this.checkLValSimple(expr.expression, bindingType, checkClashes);
  164850. default:
  164851. this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
  164852. }
  164853. };
  164854. pp$72.checkLValPattern = function(expr, bindingType, checkClashes) {
  164855. if (bindingType === void 0)
  164856. bindingType = BIND_NONE2;
  164857. switch (expr.type) {
  164858. case "ObjectPattern":
  164859. for (var i2 = 0, list4 = expr.properties; i2 < list4.length; i2 += 1) {
  164860. var prop = list4[i2];
  164861. this.checkLValInnerPattern(prop, bindingType, checkClashes);
  164862. }
  164863. break;
  164864. case "ArrayPattern":
  164865. for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
  164866. var elem = list$1[i$1];
  164867. if (elem) {
  164868. this.checkLValInnerPattern(elem, bindingType, checkClashes);
  164869. }
  164870. }
  164871. break;
  164872. default:
  164873. this.checkLValSimple(expr, bindingType, checkClashes);
  164874. }
  164875. };
  164876. pp$72.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
  164877. if (bindingType === void 0)
  164878. bindingType = BIND_NONE2;
  164879. switch (expr.type) {
  164880. case "Property":
  164881. this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
  164882. break;
  164883. case "AssignmentPattern":
  164884. this.checkLValPattern(expr.left, bindingType, checkClashes);
  164885. break;
  164886. case "RestElement":
  164887. this.checkLValPattern(expr.argument, bindingType, checkClashes);
  164888. break;
  164889. default:
  164890. this.checkLValPattern(expr, bindingType, checkClashes);
  164891. }
  164892. };
  164893. var TokContext3 = function TokContext4(token, isExpr, preserveSpace, override, generator) {
  164894. this.token = token;
  164895. this.isExpr = !!isExpr;
  164896. this.preserveSpace = !!preserveSpace;
  164897. this.override = override;
  164898. this.generator = !!generator;
  164899. };
  164900. var types2 = {
  164901. b_stat: new TokContext3("{", false),
  164902. b_expr: new TokContext3("{", true),
  164903. b_tmpl: new TokContext3("${", false),
  164904. p_stat: new TokContext3("(", false),
  164905. p_expr: new TokContext3("(", true),
  164906. q_tmpl: new TokContext3("`", true, true, function(p) {
  164907. return p.tryReadTemplateToken();
  164908. }),
  164909. f_stat: new TokContext3("function", false),
  164910. f_expr: new TokContext3("function", true),
  164911. f_expr_gen: new TokContext3("function", true, false, null, true),
  164912. f_gen: new TokContext3("function", false, false, null, true)
  164913. };
  164914. var pp$62 = Parser3.prototype;
  164915. pp$62.initialContext = function() {
  164916. return [types2.b_stat];
  164917. };
  164918. pp$62.curContext = function() {
  164919. return this.context[this.context.length - 1];
  164920. };
  164921. pp$62.braceIsBlock = function(prevType) {
  164922. var parent = this.curContext();
  164923. if (parent === types2.f_expr || parent === types2.f_stat) {
  164924. return true;
  164925. }
  164926. if (prevType === types$12.colon && (parent === types2.b_stat || parent === types2.b_expr)) {
  164927. return !parent.isExpr;
  164928. }
  164929. if (prevType === types$12._return || prevType === types$12.name && this.exprAllowed) {
  164930. return lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  164931. }
  164932. if (prevType === types$12._else || prevType === types$12.semi || prevType === types$12.eof || prevType === types$12.parenR || prevType === types$12.arrow) {
  164933. return true;
  164934. }
  164935. if (prevType === types$12.braceL) {
  164936. return parent === types2.b_stat;
  164937. }
  164938. if (prevType === types$12._var || prevType === types$12._const || prevType === types$12.name) {
  164939. return false;
  164940. }
  164941. return !this.exprAllowed;
  164942. };
  164943. pp$62.inGeneratorContext = function() {
  164944. for (var i2 = this.context.length - 1; i2 >= 1; i2--) {
  164945. var context = this.context[i2];
  164946. if (context.token === "function") {
  164947. return context.generator;
  164948. }
  164949. }
  164950. return false;
  164951. };
  164952. pp$62.updateContext = function(prevType) {
  164953. var update, type = this.type;
  164954. if (type.keyword && prevType === types$12.dot) {
  164955. this.exprAllowed = false;
  164956. } else if (update = type.updateContext) {
  164957. update.call(this, prevType);
  164958. } else {
  164959. this.exprAllowed = type.beforeExpr;
  164960. }
  164961. };
  164962. pp$62.overrideContext = function(tokenCtx) {
  164963. if (this.curContext() !== tokenCtx) {
  164964. this.context[this.context.length - 1] = tokenCtx;
  164965. }
  164966. };
  164967. types$12.parenR.updateContext = types$12.braceR.updateContext = function() {
  164968. if (this.context.length === 1) {
  164969. this.exprAllowed = true;
  164970. return;
  164971. }
  164972. var out = this.context.pop();
  164973. if (out === types2.b_stat && this.curContext().token === "function") {
  164974. out = this.context.pop();
  164975. }
  164976. this.exprAllowed = !out.isExpr;
  164977. };
  164978. types$12.braceL.updateContext = function(prevType) {
  164979. this.context.push(this.braceIsBlock(prevType) ? types2.b_stat : types2.b_expr);
  164980. this.exprAllowed = true;
  164981. };
  164982. types$12.dollarBraceL.updateContext = function() {
  164983. this.context.push(types2.b_tmpl);
  164984. this.exprAllowed = true;
  164985. };
  164986. types$12.parenL.updateContext = function(prevType) {
  164987. var statementParens = prevType === types$12._if || prevType === types$12._for || prevType === types$12._with || prevType === types$12._while;
  164988. this.context.push(statementParens ? types2.p_stat : types2.p_expr);
  164989. this.exprAllowed = true;
  164990. };
  164991. types$12.incDec.updateContext = function() {
  164992. };
  164993. types$12._function.updateContext = types$12._class.updateContext = function(prevType) {
  164994. if (prevType.beforeExpr && prevType !== types$12._else && !(prevType === types$12.semi && this.curContext() !== types2.p_stat) && !(prevType === types$12._return && lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$12.colon || prevType === types$12.braceL) && this.curContext() === types2.b_stat)) {
  164995. this.context.push(types2.f_expr);
  164996. } else {
  164997. this.context.push(types2.f_stat);
  164998. }
  164999. this.exprAllowed = false;
  165000. };
  165001. types$12.backQuote.updateContext = function() {
  165002. if (this.curContext() === types2.q_tmpl) {
  165003. this.context.pop();
  165004. } else {
  165005. this.context.push(types2.q_tmpl);
  165006. }
  165007. this.exprAllowed = false;
  165008. };
  165009. types$12.star.updateContext = function(prevType) {
  165010. if (prevType === types$12._function) {
  165011. var index2 = this.context.length - 1;
  165012. if (this.context[index2] === types2.f_expr) {
  165013. this.context[index2] = types2.f_expr_gen;
  165014. } else {
  165015. this.context[index2] = types2.f_gen;
  165016. }
  165017. }
  165018. this.exprAllowed = true;
  165019. };
  165020. types$12.name.updateContext = function(prevType) {
  165021. var allowed = false;
  165022. if (this.options.ecmaVersion >= 6 && prevType !== types$12.dot) {
  165023. if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
  165024. allowed = true;
  165025. }
  165026. }
  165027. this.exprAllowed = allowed;
  165028. };
  165029. var pp$52 = Parser3.prototype;
  165030. pp$52.checkPropClash = function(prop, propHash, refDestructuringErrors) {
  165031. if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
  165032. return;
  165033. }
  165034. if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
  165035. return;
  165036. }
  165037. var key = prop.key;
  165038. var name2;
  165039. switch (key.type) {
  165040. case "Identifier":
  165041. name2 = key.name;
  165042. break;
  165043. case "Literal":
  165044. name2 = String(key.value);
  165045. break;
  165046. default:
  165047. return;
  165048. }
  165049. var kind = prop.kind;
  165050. if (this.options.ecmaVersion >= 6) {
  165051. if (name2 === "__proto__" && kind === "init") {
  165052. if (propHash.proto) {
  165053. if (refDestructuringErrors) {
  165054. if (refDestructuringErrors.doubleProto < 0) {
  165055. refDestructuringErrors.doubleProto = key.start;
  165056. }
  165057. } else {
  165058. this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
  165059. }
  165060. }
  165061. propHash.proto = true;
  165062. }
  165063. return;
  165064. }
  165065. name2 = "$" + name2;
  165066. var other = propHash[name2];
  165067. if (other) {
  165068. var redefinition;
  165069. if (kind === "init") {
  165070. redefinition = this.strict && other.init || other.get || other.set;
  165071. } else {
  165072. redefinition = other.init || other[kind];
  165073. }
  165074. if (redefinition) {
  165075. this.raiseRecoverable(key.start, "Redefinition of property");
  165076. }
  165077. } else {
  165078. other = propHash[name2] = {
  165079. init: false,
  165080. get: false,
  165081. set: false
  165082. };
  165083. }
  165084. other[kind] = true;
  165085. };
  165086. pp$52.parseExpression = function(forInit, refDestructuringErrors) {
  165087. var startPos = this.start, startLoc = this.startLoc;
  165088. var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
  165089. if (this.type === types$12.comma) {
  165090. var node = this.startNodeAt(startPos, startLoc);
  165091. node.expressions = [expr];
  165092. while (this.eat(types$12.comma)) {
  165093. node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
  165094. }
  165095. return this.finishNode(node, "SequenceExpression");
  165096. }
  165097. return expr;
  165098. };
  165099. pp$52.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
  165100. if (this.isContextual("yield")) {
  165101. if (this.inGenerator) {
  165102. return this.parseYield(forInit);
  165103. } else {
  165104. this.exprAllowed = false;
  165105. }
  165106. }
  165107. var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
  165108. if (refDestructuringErrors) {
  165109. oldParenAssign = refDestructuringErrors.parenthesizedAssign;
  165110. oldTrailingComma = refDestructuringErrors.trailingComma;
  165111. oldDoubleProto = refDestructuringErrors.doubleProto;
  165112. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
  165113. } else {
  165114. refDestructuringErrors = new DestructuringErrors2();
  165115. ownDestructuringErrors = true;
  165116. }
  165117. var startPos = this.start, startLoc = this.startLoc;
  165118. if (this.type === types$12.parenL || this.type === types$12.name) {
  165119. this.potentialArrowAt = this.start;
  165120. this.potentialArrowInForAwait = forInit === "await";
  165121. }
  165122. var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
  165123. if (afterLeftParse) {
  165124. left = afterLeftParse.call(this, left, startPos, startLoc);
  165125. }
  165126. if (this.type.isAssign) {
  165127. var node = this.startNodeAt(startPos, startLoc);
  165128. node.operator = this.value;
  165129. if (this.type === types$12.eq) {
  165130. left = this.toAssignable(left, false, refDestructuringErrors);
  165131. }
  165132. if (!ownDestructuringErrors) {
  165133. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
  165134. }
  165135. if (refDestructuringErrors.shorthandAssign >= left.start) {
  165136. refDestructuringErrors.shorthandAssign = -1;
  165137. }
  165138. if (this.type === types$12.eq) {
  165139. this.checkLValPattern(left);
  165140. } else {
  165141. this.checkLValSimple(left);
  165142. }
  165143. node.left = left;
  165144. this.next();
  165145. node.right = this.parseMaybeAssign(forInit);
  165146. if (oldDoubleProto > -1) {
  165147. refDestructuringErrors.doubleProto = oldDoubleProto;
  165148. }
  165149. return this.finishNode(node, "AssignmentExpression");
  165150. } else {
  165151. if (ownDestructuringErrors) {
  165152. this.checkExpressionErrors(refDestructuringErrors, true);
  165153. }
  165154. }
  165155. if (oldParenAssign > -1) {
  165156. refDestructuringErrors.parenthesizedAssign = oldParenAssign;
  165157. }
  165158. if (oldTrailingComma > -1) {
  165159. refDestructuringErrors.trailingComma = oldTrailingComma;
  165160. }
  165161. return left;
  165162. };
  165163. pp$52.parseMaybeConditional = function(forInit, refDestructuringErrors) {
  165164. var startPos = this.start, startLoc = this.startLoc;
  165165. var expr = this.parseExprOps(forInit, refDestructuringErrors);
  165166. if (this.checkExpressionErrors(refDestructuringErrors)) {
  165167. return expr;
  165168. }
  165169. if (this.eat(types$12.question)) {
  165170. var node = this.startNodeAt(startPos, startLoc);
  165171. node.test = expr;
  165172. node.consequent = this.parseMaybeAssign();
  165173. this.expect(types$12.colon);
  165174. node.alternate = this.parseMaybeAssign(forInit);
  165175. return this.finishNode(node, "ConditionalExpression");
  165176. }
  165177. return expr;
  165178. };
  165179. pp$52.parseExprOps = function(forInit, refDestructuringErrors) {
  165180. var startPos = this.start, startLoc = this.startLoc;
  165181. var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);
  165182. if (this.checkExpressionErrors(refDestructuringErrors)) {
  165183. return expr;
  165184. }
  165185. return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
  165186. };
  165187. pp$52.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
  165188. var prec = this.type.binop;
  165189. if (prec != null && (!forInit || this.type !== types$12._in)) {
  165190. if (prec > minPrec) {
  165191. var logical = this.type === types$12.logicalOR || this.type === types$12.logicalAND;
  165192. var coalesce = this.type === types$12.coalesce;
  165193. if (coalesce) {
  165194. prec = types$12.logicalAND.binop;
  165195. }
  165196. var op = this.value;
  165197. this.next();
  165198. var startPos = this.start, startLoc = this.startLoc;
  165199. var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
  165200. var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
  165201. if (logical && this.type === types$12.coalesce || coalesce && (this.type === types$12.logicalOR || this.type === types$12.logicalAND)) {
  165202. this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
  165203. }
  165204. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit);
  165205. }
  165206. }
  165207. return left;
  165208. };
  165209. pp$52.buildBinary = function(startPos, startLoc, left, right, op, logical) {
  165210. if (right.type === "PrivateIdentifier") {
  165211. this.raise(right.start, "Private identifier can only be left side of binary expression");
  165212. }
  165213. var node = this.startNodeAt(startPos, startLoc);
  165214. node.left = left;
  165215. node.operator = op;
  165216. node.right = right;
  165217. return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
  165218. };
  165219. pp$52.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
  165220. var startPos = this.start, startLoc = this.startLoc, expr;
  165221. if (this.isContextual("await") && this.canAwait) {
  165222. expr = this.parseAwait(forInit);
  165223. sawUnary = true;
  165224. } else if (this.type.prefix) {
  165225. var node = this.startNode(), update = this.type === types$12.incDec;
  165226. node.operator = this.value;
  165227. node.prefix = true;
  165228. this.next();
  165229. node.argument = this.parseMaybeUnary(null, true, update, forInit);
  165230. this.checkExpressionErrors(refDestructuringErrors, true);
  165231. if (update) {
  165232. this.checkLValSimple(node.argument);
  165233. } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
  165234. this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
  165235. } else if (node.operator === "delete" && isPrivateFieldAccess2(node.argument)) {
  165236. this.raiseRecoverable(node.start, "Private fields can not be deleted");
  165237. } else {
  165238. sawUnary = true;
  165239. }
  165240. expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
  165241. } else if (!sawUnary && this.type === types$12.privateId) {
  165242. if (forInit || this.privateNameStack.length === 0) {
  165243. this.unexpected();
  165244. }
  165245. expr = this.parsePrivateIdent();
  165246. if (this.type !== types$12._in) {
  165247. this.unexpected();
  165248. }
  165249. } else {
  165250. expr = this.parseExprSubscripts(refDestructuringErrors, forInit);
  165251. if (this.checkExpressionErrors(refDestructuringErrors)) {
  165252. return expr;
  165253. }
  165254. while (this.type.postfix && !this.canInsertSemicolon()) {
  165255. var node$1 = this.startNodeAt(startPos, startLoc);
  165256. node$1.operator = this.value;
  165257. node$1.prefix = false;
  165258. node$1.argument = expr;
  165259. this.checkLValSimple(expr);
  165260. this.next();
  165261. expr = this.finishNode(node$1, "UpdateExpression");
  165262. }
  165263. }
  165264. if (!incDec && this.eat(types$12.starstar)) {
  165265. if (sawUnary) {
  165266. this.unexpected(this.lastTokStart);
  165267. } else {
  165268. return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false);
  165269. }
  165270. } else {
  165271. return expr;
  165272. }
  165273. };
  165274. function isPrivateFieldAccess2(node) {
  165275. return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess2(node.expression);
  165276. }
  165277. pp$52.parseExprSubscripts = function(refDestructuringErrors, forInit) {
  165278. var startPos = this.start, startLoc = this.startLoc;
  165279. var expr = this.parseExprAtom(refDestructuringErrors, forInit);
  165280. if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
  165281. return expr;
  165282. }
  165283. var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
  165284. if (refDestructuringErrors && result.type === "MemberExpression") {
  165285. if (refDestructuringErrors.parenthesizedAssign >= result.start) {
  165286. refDestructuringErrors.parenthesizedAssign = -1;
  165287. }
  165288. if (refDestructuringErrors.parenthesizedBind >= result.start) {
  165289. refDestructuringErrors.parenthesizedBind = -1;
  165290. }
  165291. if (refDestructuringErrors.trailingComma >= result.start) {
  165292. refDestructuringErrors.trailingComma = -1;
  165293. }
  165294. }
  165295. return result;
  165296. };
  165297. pp$52.parseSubscripts = function(base2, startPos, startLoc, noCalls, forInit) {
  165298. var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base2.type === "Identifier" && base2.name === "async" && this.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && this.potentialArrowAt === base2.start;
  165299. var optionalChained = false;
  165300. while (true) {
  165301. var element2 = this.parseSubscript(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
  165302. if (element2.optional) {
  165303. optionalChained = true;
  165304. }
  165305. if (element2 === base2 || element2.type === "ArrowFunctionExpression") {
  165306. if (optionalChained) {
  165307. var chainNode = this.startNodeAt(startPos, startLoc);
  165308. chainNode.expression = element2;
  165309. element2 = this.finishNode(chainNode, "ChainExpression");
  165310. }
  165311. return element2;
  165312. }
  165313. base2 = element2;
  165314. }
  165315. };
  165316. pp$52.parseSubscript = function(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
  165317. var optionalSupported = this.options.ecmaVersion >= 11;
  165318. var optional = optionalSupported && this.eat(types$12.questionDot);
  165319. if (noCalls && optional) {
  165320. this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
  165321. }
  165322. var computed = this.eat(types$12.bracketL);
  165323. if (computed || optional && this.type !== types$12.parenL && this.type !== types$12.backQuote || this.eat(types$12.dot)) {
  165324. var node = this.startNodeAt(startPos, startLoc);
  165325. node.object = base2;
  165326. if (computed) {
  165327. node.property = this.parseExpression();
  165328. this.expect(types$12.bracketR);
  165329. } else if (this.type === types$12.privateId && base2.type !== "Super") {
  165330. node.property = this.parsePrivateIdent();
  165331. } else {
  165332. node.property = this.parseIdent(this.options.allowReserved !== "never");
  165333. }
  165334. node.computed = !!computed;
  165335. if (optionalSupported) {
  165336. node.optional = optional;
  165337. }
  165338. base2 = this.finishNode(node, "MemberExpression");
  165339. } else if (!noCalls && this.eat(types$12.parenL)) {
  165340. var refDestructuringErrors = new DestructuringErrors2(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  165341. this.yieldPos = 0;
  165342. this.awaitPos = 0;
  165343. this.awaitIdentPos = 0;
  165344. var exprList = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
  165345. if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types$12.arrow)) {
  165346. this.checkPatternErrors(refDestructuringErrors, false);
  165347. this.checkYieldAwaitInDefaultParams();
  165348. if (this.awaitIdentPos > 0) {
  165349. this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function");
  165350. }
  165351. this.yieldPos = oldYieldPos;
  165352. this.awaitPos = oldAwaitPos;
  165353. this.awaitIdentPos = oldAwaitIdentPos;
  165354. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit);
  165355. }
  165356. this.checkExpressionErrors(refDestructuringErrors, true);
  165357. this.yieldPos = oldYieldPos || this.yieldPos;
  165358. this.awaitPos = oldAwaitPos || this.awaitPos;
  165359. this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
  165360. var node$1 = this.startNodeAt(startPos, startLoc);
  165361. node$1.callee = base2;
  165362. node$1.arguments = exprList;
  165363. if (optionalSupported) {
  165364. node$1.optional = optional;
  165365. }
  165366. base2 = this.finishNode(node$1, "CallExpression");
  165367. } else if (this.type === types$12.backQuote) {
  165368. if (optional || optionalChained) {
  165369. this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
  165370. }
  165371. var node$2 = this.startNodeAt(startPos, startLoc);
  165372. node$2.tag = base2;
  165373. node$2.quasi = this.parseTemplate({ isTagged: true });
  165374. base2 = this.finishNode(node$2, "TaggedTemplateExpression");
  165375. }
  165376. return base2;
  165377. };
  165378. pp$52.parseExprAtom = function(refDestructuringErrors, forInit) {
  165379. if (this.type === types$12.slash) {
  165380. this.readRegexp();
  165381. }
  165382. var node, canBeArrow = this.potentialArrowAt === this.start;
  165383. switch (this.type) {
  165384. case types$12._super:
  165385. if (!this.allowSuper) {
  165386. this.raise(this.start, "'super' keyword outside a method");
  165387. }
  165388. node = this.startNode();
  165389. this.next();
  165390. if (this.type === types$12.parenL && !this.allowDirectSuper) {
  165391. this.raise(node.start, "super() call outside constructor of a subclass");
  165392. }
  165393. if (this.type !== types$12.dot && this.type !== types$12.bracketL && this.type !== types$12.parenL) {
  165394. this.unexpected();
  165395. }
  165396. return this.finishNode(node, "Super");
  165397. case types$12._this:
  165398. node = this.startNode();
  165399. this.next();
  165400. return this.finishNode(node, "ThisExpression");
  165401. case types$12.name:
  165402. var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
  165403. var id = this.parseIdent(false);
  165404. if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$12._function)) {
  165405. this.overrideContext(types2.f_expr);
  165406. return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit);
  165407. }
  165408. if (canBeArrow && !this.canInsertSemicolon()) {
  165409. if (this.eat(types$12.arrow)) {
  165410. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit);
  165411. }
  165412. if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$12.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
  165413. id = this.parseIdent(false);
  165414. if (this.canInsertSemicolon() || !this.eat(types$12.arrow)) {
  165415. this.unexpected();
  165416. }
  165417. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit);
  165418. }
  165419. }
  165420. return id;
  165421. case types$12.regexp:
  165422. var value = this.value;
  165423. node = this.parseLiteral(value.value);
  165424. node.regex = { pattern: value.pattern, flags: value.flags };
  165425. return node;
  165426. case types$12.num:
  165427. case types$12.string:
  165428. return this.parseLiteral(this.value);
  165429. case types$12._null:
  165430. case types$12._true:
  165431. case types$12._false:
  165432. node = this.startNode();
  165433. node.value = this.type === types$12._null ? null : this.type === types$12._true;
  165434. node.raw = this.type.keyword;
  165435. this.next();
  165436. return this.finishNode(node, "Literal");
  165437. case types$12.parenL:
  165438. var start3 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
  165439. if (refDestructuringErrors) {
  165440. if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
  165441. refDestructuringErrors.parenthesizedAssign = start3;
  165442. }
  165443. if (refDestructuringErrors.parenthesizedBind < 0) {
  165444. refDestructuringErrors.parenthesizedBind = start3;
  165445. }
  165446. }
  165447. return expr;
  165448. case types$12.bracketL:
  165449. node = this.startNode();
  165450. this.next();
  165451. node.elements = this.parseExprList(types$12.bracketR, true, true, refDestructuringErrors);
  165452. return this.finishNode(node, "ArrayExpression");
  165453. case types$12.braceL:
  165454. this.overrideContext(types2.b_expr);
  165455. return this.parseObj(false, refDestructuringErrors);
  165456. case types$12._function:
  165457. node = this.startNode();
  165458. this.next();
  165459. return this.parseFunction(node, 0);
  165460. case types$12._class:
  165461. return this.parseClass(this.startNode(), false);
  165462. case types$12._new:
  165463. return this.parseNew();
  165464. case types$12.backQuote:
  165465. return this.parseTemplate();
  165466. case types$12._import:
  165467. if (this.options.ecmaVersion >= 11) {
  165468. return this.parseExprImport();
  165469. } else {
  165470. return this.unexpected();
  165471. }
  165472. default:
  165473. this.unexpected();
  165474. }
  165475. };
  165476. pp$52.parseExprImport = function() {
  165477. var node = this.startNode();
  165478. if (this.containsEsc) {
  165479. this.raiseRecoverable(this.start, "Escape sequence in keyword import");
  165480. }
  165481. var meta = this.parseIdent(true);
  165482. switch (this.type) {
  165483. case types$12.parenL:
  165484. return this.parseDynamicImport(node);
  165485. case types$12.dot:
  165486. node.meta = meta;
  165487. return this.parseImportMeta(node);
  165488. default:
  165489. this.unexpected();
  165490. }
  165491. };
  165492. pp$52.parseDynamicImport = function(node) {
  165493. this.next();
  165494. node.source = this.parseMaybeAssign();
  165495. if (!this.eat(types$12.parenR)) {
  165496. var errorPos = this.start;
  165497. if (this.eat(types$12.comma) && this.eat(types$12.parenR)) {
  165498. this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
  165499. } else {
  165500. this.unexpected(errorPos);
  165501. }
  165502. }
  165503. return this.finishNode(node, "ImportExpression");
  165504. };
  165505. pp$52.parseImportMeta = function(node) {
  165506. this.next();
  165507. var containsEsc = this.containsEsc;
  165508. node.property = this.parseIdent(true);
  165509. if (node.property.name !== "meta") {
  165510. this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'");
  165511. }
  165512. if (containsEsc) {
  165513. this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters");
  165514. }
  165515. if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) {
  165516. this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module");
  165517. }
  165518. return this.finishNode(node, "MetaProperty");
  165519. };
  165520. pp$52.parseLiteral = function(value) {
  165521. var node = this.startNode();
  165522. node.value = value;
  165523. node.raw = this.input.slice(this.start, this.end);
  165524. if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
  165525. node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
  165526. }
  165527. this.next();
  165528. return this.finishNode(node, "Literal");
  165529. };
  165530. pp$52.parseParenExpression = function() {
  165531. this.expect(types$12.parenL);
  165532. var val = this.parseExpression();
  165533. this.expect(types$12.parenR);
  165534. return val;
  165535. };
  165536. pp$52.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
  165537. var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
  165538. if (this.options.ecmaVersion >= 6) {
  165539. this.next();
  165540. var innerStartPos = this.start, innerStartLoc = this.startLoc;
  165541. var exprList = [], first = true, lastIsComma = false;
  165542. var refDestructuringErrors = new DestructuringErrors2(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
  165543. this.yieldPos = 0;
  165544. this.awaitPos = 0;
  165545. while (this.type !== types$12.parenR) {
  165546. first ? first = false : this.expect(types$12.comma);
  165547. if (allowTrailingComma && this.afterTrailingComma(types$12.parenR, true)) {
  165548. lastIsComma = true;
  165549. break;
  165550. } else if (this.type === types$12.ellipsis) {
  165551. spreadStart = this.start;
  165552. exprList.push(this.parseParenItem(this.parseRestBinding()));
  165553. if (this.type === types$12.comma) {
  165554. this.raise(this.start, "Comma is not permitted after the rest element");
  165555. }
  165556. break;
  165557. } else {
  165558. exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
  165559. }
  165560. }
  165561. var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
  165562. this.expect(types$12.parenR);
  165563. if (canBeArrow && !this.canInsertSemicolon() && this.eat(types$12.arrow)) {
  165564. this.checkPatternErrors(refDestructuringErrors, false);
  165565. this.checkYieldAwaitInDefaultParams();
  165566. this.yieldPos = oldYieldPos;
  165567. this.awaitPos = oldAwaitPos;
  165568. return this.parseParenArrowList(startPos, startLoc, exprList, forInit);
  165569. }
  165570. if (!exprList.length || lastIsComma) {
  165571. this.unexpected(this.lastTokStart);
  165572. }
  165573. if (spreadStart) {
  165574. this.unexpected(spreadStart);
  165575. }
  165576. this.checkExpressionErrors(refDestructuringErrors, true);
  165577. this.yieldPos = oldYieldPos || this.yieldPos;
  165578. this.awaitPos = oldAwaitPos || this.awaitPos;
  165579. if (exprList.length > 1) {
  165580. val = this.startNodeAt(innerStartPos, innerStartLoc);
  165581. val.expressions = exprList;
  165582. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  165583. } else {
  165584. val = exprList[0];
  165585. }
  165586. } else {
  165587. val = this.parseParenExpression();
  165588. }
  165589. if (this.options.preserveParens) {
  165590. var par = this.startNodeAt(startPos, startLoc);
  165591. par.expression = val;
  165592. return this.finishNode(par, "ParenthesizedExpression");
  165593. } else {
  165594. return val;
  165595. }
  165596. };
  165597. pp$52.parseParenItem = function(item) {
  165598. return item;
  165599. };
  165600. pp$52.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
  165601. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit);
  165602. };
  165603. var empty3 = [];
  165604. pp$52.parseNew = function() {
  165605. if (this.containsEsc) {
  165606. this.raiseRecoverable(this.start, "Escape sequence in keyword new");
  165607. }
  165608. var node = this.startNode();
  165609. var meta = this.parseIdent(true);
  165610. if (this.options.ecmaVersion >= 6 && this.eat(types$12.dot)) {
  165611. node.meta = meta;
  165612. var containsEsc = this.containsEsc;
  165613. node.property = this.parseIdent(true);
  165614. if (node.property.name !== "target") {
  165615. this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'");
  165616. }
  165617. if (containsEsc) {
  165618. this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters");
  165619. }
  165620. if (!this.allowNewDotTarget) {
  165621. this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block");
  165622. }
  165623. return this.finishNode(node, "MetaProperty");
  165624. }
  165625. var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types$12._import;
  165626. node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false);
  165627. if (isImport && node.callee.type === "ImportExpression") {
  165628. this.raise(startPos, "Cannot use new with import()");
  165629. }
  165630. if (this.eat(types$12.parenL)) {
  165631. node.arguments = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, false);
  165632. } else {
  165633. node.arguments = empty3;
  165634. }
  165635. return this.finishNode(node, "NewExpression");
  165636. };
  165637. pp$52.parseTemplateElement = function(ref3) {
  165638. var isTagged = ref3.isTagged;
  165639. var elem = this.startNode();
  165640. if (this.type === types$12.invalidTemplate) {
  165641. if (!isTagged) {
  165642. this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
  165643. }
  165644. elem.value = {
  165645. raw: this.value,
  165646. cooked: null
  165647. };
  165648. } else {
  165649. elem.value = {
  165650. raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
  165651. cooked: this.value
  165652. };
  165653. }
  165654. this.next();
  165655. elem.tail = this.type === types$12.backQuote;
  165656. return this.finishNode(elem, "TemplateElement");
  165657. };
  165658. pp$52.parseTemplate = function(ref3) {
  165659. if (ref3 === void 0)
  165660. ref3 = {};
  165661. var isTagged = ref3.isTagged;
  165662. if (isTagged === void 0)
  165663. isTagged = false;
  165664. var node = this.startNode();
  165665. this.next();
  165666. node.expressions = [];
  165667. var curElt = this.parseTemplateElement({ isTagged });
  165668. node.quasis = [curElt];
  165669. while (!curElt.tail) {
  165670. if (this.type === types$12.eof) {
  165671. this.raise(this.pos, "Unterminated template literal");
  165672. }
  165673. this.expect(types$12.dollarBraceL);
  165674. node.expressions.push(this.parseExpression());
  165675. this.expect(types$12.braceR);
  165676. node.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
  165677. }
  165678. this.next();
  165679. return this.finishNode(node, "TemplateLiteral");
  165680. };
  165681. pp$52.isAsyncProp = function(prop) {
  165682. return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$12.name || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$12.star) && !lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  165683. };
  165684. pp$52.parseObj = function(isPattern, refDestructuringErrors) {
  165685. var node = this.startNode(), first = true, propHash = {};
  165686. node.properties = [];
  165687. this.next();
  165688. while (!this.eat(types$12.braceR)) {
  165689. if (!first) {
  165690. this.expect(types$12.comma);
  165691. if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$12.braceR)) {
  165692. break;
  165693. }
  165694. } else {
  165695. first = false;
  165696. }
  165697. var prop = this.parseProperty(isPattern, refDestructuringErrors);
  165698. if (!isPattern) {
  165699. this.checkPropClash(prop, propHash, refDestructuringErrors);
  165700. }
  165701. node.properties.push(prop);
  165702. }
  165703. return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
  165704. };
  165705. pp$52.parseProperty = function(isPattern, refDestructuringErrors) {
  165706. var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
  165707. if (this.options.ecmaVersion >= 9 && this.eat(types$12.ellipsis)) {
  165708. if (isPattern) {
  165709. prop.argument = this.parseIdent(false);
  165710. if (this.type === types$12.comma) {
  165711. this.raise(this.start, "Comma is not permitted after the rest element");
  165712. }
  165713. return this.finishNode(prop, "RestElement");
  165714. }
  165715. if (this.type === types$12.parenL && refDestructuringErrors) {
  165716. if (refDestructuringErrors.parenthesizedAssign < 0) {
  165717. refDestructuringErrors.parenthesizedAssign = this.start;
  165718. }
  165719. if (refDestructuringErrors.parenthesizedBind < 0) {
  165720. refDestructuringErrors.parenthesizedBind = this.start;
  165721. }
  165722. }
  165723. prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  165724. if (this.type === types$12.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
  165725. refDestructuringErrors.trailingComma = this.start;
  165726. }
  165727. return this.finishNode(prop, "SpreadElement");
  165728. }
  165729. if (this.options.ecmaVersion >= 6) {
  165730. prop.method = false;
  165731. prop.shorthand = false;
  165732. if (isPattern || refDestructuringErrors) {
  165733. startPos = this.start;
  165734. startLoc = this.startLoc;
  165735. }
  165736. if (!isPattern) {
  165737. isGenerator = this.eat(types$12.star);
  165738. }
  165739. }
  165740. var containsEsc = this.containsEsc;
  165741. this.parsePropertyName(prop);
  165742. if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
  165743. isAsync = true;
  165744. isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$12.star);
  165745. this.parsePropertyName(prop, refDestructuringErrors);
  165746. } else {
  165747. isAsync = false;
  165748. }
  165749. this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
  165750. return this.finishNode(prop, "Property");
  165751. };
  165752. pp$52.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
  165753. if ((isGenerator || isAsync) && this.type === types$12.colon) {
  165754. this.unexpected();
  165755. }
  165756. if (this.eat(types$12.colon)) {
  165757. prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
  165758. prop.kind = "init";
  165759. } else if (this.options.ecmaVersion >= 6 && this.type === types$12.parenL) {
  165760. if (isPattern) {
  165761. this.unexpected();
  165762. }
  165763. prop.kind = "init";
  165764. prop.method = true;
  165765. prop.value = this.parseMethod(isGenerator, isAsync);
  165766. } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$12.comma && this.type !== types$12.braceR && this.type !== types$12.eq)) {
  165767. if (isGenerator || isAsync) {
  165768. this.unexpected();
  165769. }
  165770. prop.kind = prop.key.name;
  165771. this.parsePropertyName(prop);
  165772. prop.value = this.parseMethod(false);
  165773. var paramCount = prop.kind === "get" ? 0 : 1;
  165774. if (prop.value.params.length !== paramCount) {
  165775. var start3 = prop.value.start;
  165776. if (prop.kind === "get") {
  165777. this.raiseRecoverable(start3, "getter should have no params");
  165778. } else {
  165779. this.raiseRecoverable(start3, "setter should have exactly one param");
  165780. }
  165781. } else {
  165782. if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
  165783. this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
  165784. }
  165785. }
  165786. } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
  165787. if (isGenerator || isAsync) {
  165788. this.unexpected();
  165789. }
  165790. this.checkUnreserved(prop.key);
  165791. if (prop.key.name === "await" && !this.awaitIdentPos) {
  165792. this.awaitIdentPos = startPos;
  165793. }
  165794. prop.kind = "init";
  165795. if (isPattern) {
  165796. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  165797. } else if (this.type === types$12.eq && refDestructuringErrors) {
  165798. if (refDestructuringErrors.shorthandAssign < 0) {
  165799. refDestructuringErrors.shorthandAssign = this.start;
  165800. }
  165801. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  165802. } else {
  165803. prop.value = this.copyNode(prop.key);
  165804. }
  165805. prop.shorthand = true;
  165806. } else {
  165807. this.unexpected();
  165808. }
  165809. };
  165810. pp$52.parsePropertyName = function(prop) {
  165811. if (this.options.ecmaVersion >= 6) {
  165812. if (this.eat(types$12.bracketL)) {
  165813. prop.computed = true;
  165814. prop.key = this.parseMaybeAssign();
  165815. this.expect(types$12.bracketR);
  165816. return prop.key;
  165817. } else {
  165818. prop.computed = false;
  165819. }
  165820. }
  165821. return prop.key = this.type === types$12.num || this.type === types$12.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
  165822. };
  165823. pp$52.initFunction = function(node) {
  165824. node.id = null;
  165825. if (this.options.ecmaVersion >= 6) {
  165826. node.generator = node.expression = false;
  165827. }
  165828. if (this.options.ecmaVersion >= 8) {
  165829. node.async = false;
  165830. }
  165831. };
  165832. pp$52.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
  165833. var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  165834. this.initFunction(node);
  165835. if (this.options.ecmaVersion >= 6) {
  165836. node.generator = isGenerator;
  165837. }
  165838. if (this.options.ecmaVersion >= 8) {
  165839. node.async = !!isAsync;
  165840. }
  165841. this.yieldPos = 0;
  165842. this.awaitPos = 0;
  165843. this.awaitIdentPos = 0;
  165844. this.enterScope(functionFlags2(isAsync, node.generator) | SCOPE_SUPER2 | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  165845. this.expect(types$12.parenL);
  165846. node.params = this.parseBindingList(types$12.parenR, false, this.options.ecmaVersion >= 8);
  165847. this.checkYieldAwaitInDefaultParams();
  165848. this.parseFunctionBody(node, false, true, false);
  165849. this.yieldPos = oldYieldPos;
  165850. this.awaitPos = oldAwaitPos;
  165851. this.awaitIdentPos = oldAwaitIdentPos;
  165852. return this.finishNode(node, "FunctionExpression");
  165853. };
  165854. pp$52.parseArrowExpression = function(node, params, isAsync, forInit) {
  165855. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  165856. this.enterScope(functionFlags2(isAsync, false) | SCOPE_ARROW2);
  165857. this.initFunction(node);
  165858. if (this.options.ecmaVersion >= 8) {
  165859. node.async = !!isAsync;
  165860. }
  165861. this.yieldPos = 0;
  165862. this.awaitPos = 0;
  165863. this.awaitIdentPos = 0;
  165864. node.params = this.toAssignableList(params, true);
  165865. this.parseFunctionBody(node, true, false, forInit);
  165866. this.yieldPos = oldYieldPos;
  165867. this.awaitPos = oldAwaitPos;
  165868. this.awaitIdentPos = oldAwaitIdentPos;
  165869. return this.finishNode(node, "ArrowFunctionExpression");
  165870. };
  165871. pp$52.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
  165872. var isExpression = isArrowFunction && this.type !== types$12.braceL;
  165873. var oldStrict = this.strict, useStrict = false;
  165874. if (isExpression) {
  165875. node.body = this.parseMaybeAssign(forInit);
  165876. node.expression = true;
  165877. this.checkParams(node, false);
  165878. } else {
  165879. var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
  165880. if (!oldStrict || nonSimple) {
  165881. useStrict = this.strictDirective(this.end);
  165882. if (useStrict && nonSimple) {
  165883. this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
  165884. }
  165885. }
  165886. var oldLabels = this.labels;
  165887. this.labels = [];
  165888. if (useStrict) {
  165889. this.strict = true;
  165890. }
  165891. this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
  165892. if (this.strict && node.id) {
  165893. this.checkLValSimple(node.id, BIND_OUTSIDE2);
  165894. }
  165895. node.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
  165896. node.expression = false;
  165897. this.adaptDirectivePrologue(node.body.body);
  165898. this.labels = oldLabels;
  165899. }
  165900. this.exitScope();
  165901. };
  165902. pp$52.isSimpleParamList = function(params) {
  165903. for (var i2 = 0, list4 = params; i2 < list4.length; i2 += 1) {
  165904. var param = list4[i2];
  165905. if (param.type !== "Identifier") {
  165906. return false;
  165907. }
  165908. }
  165909. return true;
  165910. };
  165911. pp$52.checkParams = function(node, allowDuplicates) {
  165912. var nameHash = /* @__PURE__ */ Object.create(null);
  165913. for (var i2 = 0, list4 = node.params; i2 < list4.length; i2 += 1) {
  165914. var param = list4[i2];
  165915. this.checkLValInnerPattern(param, BIND_VAR2, allowDuplicates ? null : nameHash);
  165916. }
  165917. };
  165918. pp$52.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
  165919. var elts = [], first = true;
  165920. while (!this.eat(close)) {
  165921. if (!first) {
  165922. this.expect(types$12.comma);
  165923. if (allowTrailingComma && this.afterTrailingComma(close)) {
  165924. break;
  165925. }
  165926. } else {
  165927. first = false;
  165928. }
  165929. var elt = void 0;
  165930. if (allowEmpty && this.type === types$12.comma) {
  165931. elt = null;
  165932. } else if (this.type === types$12.ellipsis) {
  165933. elt = this.parseSpread(refDestructuringErrors);
  165934. if (refDestructuringErrors && this.type === types$12.comma && refDestructuringErrors.trailingComma < 0) {
  165935. refDestructuringErrors.trailingComma = this.start;
  165936. }
  165937. } else {
  165938. elt = this.parseMaybeAssign(false, refDestructuringErrors);
  165939. }
  165940. elts.push(elt);
  165941. }
  165942. return elts;
  165943. };
  165944. pp$52.checkUnreserved = function(ref3) {
  165945. var start3 = ref3.start;
  165946. var end = ref3.end;
  165947. var name2 = ref3.name;
  165948. if (this.inGenerator && name2 === "yield") {
  165949. this.raiseRecoverable(start3, "Cannot use 'yield' as identifier inside a generator");
  165950. }
  165951. if (this.inAsync && name2 === "await") {
  165952. this.raiseRecoverable(start3, "Cannot use 'await' as identifier inside an async function");
  165953. }
  165954. if (this.currentThisScope().inClassFieldInit && name2 === "arguments") {
  165955. this.raiseRecoverable(start3, "Cannot use 'arguments' in class field initializer");
  165956. }
  165957. if (this.inClassStaticBlock && (name2 === "arguments" || name2 === "await")) {
  165958. this.raise(start3, "Cannot use " + name2 + " in class static initialization block");
  165959. }
  165960. if (this.keywords.test(name2)) {
  165961. this.raise(start3, "Unexpected keyword '" + name2 + "'");
  165962. }
  165963. if (this.options.ecmaVersion < 6 && this.input.slice(start3, end).indexOf("\\") !== -1) {
  165964. return;
  165965. }
  165966. var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
  165967. if (re.test(name2)) {
  165968. if (!this.inAsync && name2 === "await") {
  165969. this.raiseRecoverable(start3, "Cannot use keyword 'await' outside an async function");
  165970. }
  165971. this.raiseRecoverable(start3, "The keyword '" + name2 + "' is reserved");
  165972. }
  165973. };
  165974. pp$52.parseIdent = function(liberal, isBinding) {
  165975. var node = this.startNode();
  165976. if (this.type === types$12.name) {
  165977. node.name = this.value;
  165978. } else if (this.type.keyword) {
  165979. node.name = this.type.keyword;
  165980. if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
  165981. this.context.pop();
  165982. }
  165983. } else {
  165984. this.unexpected();
  165985. }
  165986. this.next(!!liberal);
  165987. this.finishNode(node, "Identifier");
  165988. if (!liberal) {
  165989. this.checkUnreserved(node);
  165990. if (node.name === "await" && !this.awaitIdentPos) {
  165991. this.awaitIdentPos = node.start;
  165992. }
  165993. }
  165994. return node;
  165995. };
  165996. pp$52.parsePrivateIdent = function() {
  165997. var node = this.startNode();
  165998. if (this.type === types$12.privateId) {
  165999. node.name = this.value;
  166000. } else {
  166001. this.unexpected();
  166002. }
  166003. this.next();
  166004. this.finishNode(node, "PrivateIdentifier");
  166005. if (this.privateNameStack.length === 0) {
  166006. this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class");
  166007. } else {
  166008. this.privateNameStack[this.privateNameStack.length - 1].used.push(node);
  166009. }
  166010. return node;
  166011. };
  166012. pp$52.parseYield = function(forInit) {
  166013. if (!this.yieldPos) {
  166014. this.yieldPos = this.start;
  166015. }
  166016. var node = this.startNode();
  166017. this.next();
  166018. if (this.type === types$12.semi || this.canInsertSemicolon() || this.type !== types$12.star && !this.type.startsExpr) {
  166019. node.delegate = false;
  166020. node.argument = null;
  166021. } else {
  166022. node.delegate = this.eat(types$12.star);
  166023. node.argument = this.parseMaybeAssign(forInit);
  166024. }
  166025. return this.finishNode(node, "YieldExpression");
  166026. };
  166027. pp$52.parseAwait = function(forInit) {
  166028. if (!this.awaitPos) {
  166029. this.awaitPos = this.start;
  166030. }
  166031. var node = this.startNode();
  166032. this.next();
  166033. node.argument = this.parseMaybeUnary(null, true, false, forInit);
  166034. return this.finishNode(node, "AwaitExpression");
  166035. };
  166036. var pp$42 = Parser3.prototype;
  166037. pp$42.raise = function(pos, message) {
  166038. var loc = getLineInfo2(this.input, pos);
  166039. message += " (" + loc.line + ":" + loc.column + ")";
  166040. var err = new SyntaxError(message);
  166041. err.pos = pos;
  166042. err.loc = loc;
  166043. err.raisedAt = this.pos;
  166044. throw err;
  166045. };
  166046. pp$42.raiseRecoverable = pp$42.raise;
  166047. pp$42.curPosition = function() {
  166048. if (this.options.locations) {
  166049. return new Position3(this.curLine, this.pos - this.lineStart);
  166050. }
  166051. };
  166052. var pp$32 = Parser3.prototype;
  166053. var Scope4 = function Scope5(flags) {
  166054. this.flags = flags;
  166055. this.var = [];
  166056. this.lexical = [];
  166057. this.functions = [];
  166058. this.inClassFieldInit = false;
  166059. };
  166060. pp$32.enterScope = function(flags) {
  166061. this.scopeStack.push(new Scope4(flags));
  166062. };
  166063. pp$32.exitScope = function() {
  166064. this.scopeStack.pop();
  166065. };
  166066. pp$32.treatFunctionsAsVarInScope = function(scope) {
  166067. return scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_TOP2;
  166068. };
  166069. pp$32.declareName = function(name2, bindingType, pos) {
  166070. var redeclared = false;
  166071. if (bindingType === BIND_LEXICAL2) {
  166072. var scope = this.currentScope();
  166073. redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
  166074. scope.lexical.push(name2);
  166075. if (this.inModule && scope.flags & SCOPE_TOP2) {
  166076. delete this.undefinedExports[name2];
  166077. }
  166078. } else if (bindingType === BIND_SIMPLE_CATCH2) {
  166079. var scope$1 = this.currentScope();
  166080. scope$1.lexical.push(name2);
  166081. } else if (bindingType === BIND_FUNCTION2) {
  166082. var scope$2 = this.currentScope();
  166083. if (this.treatFunctionsAsVar) {
  166084. redeclared = scope$2.lexical.indexOf(name2) > -1;
  166085. } else {
  166086. redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1;
  166087. }
  166088. scope$2.functions.push(name2);
  166089. } else {
  166090. for (var i2 = this.scopeStack.length - 1; i2 >= 0; --i2) {
  166091. var scope$3 = this.scopeStack[i2];
  166092. if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH2 && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
  166093. redeclared = true;
  166094. break;
  166095. }
  166096. scope$3.var.push(name2);
  166097. if (this.inModule && scope$3.flags & SCOPE_TOP2) {
  166098. delete this.undefinedExports[name2];
  166099. }
  166100. if (scope$3.flags & SCOPE_VAR2) {
  166101. break;
  166102. }
  166103. }
  166104. }
  166105. if (redeclared) {
  166106. this.raiseRecoverable(pos, "Identifier '" + name2 + "' has already been declared");
  166107. }
  166108. };
  166109. pp$32.checkLocalExport = function(id) {
  166110. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {
  166111. this.undefinedExports[id.name] = id;
  166112. }
  166113. };
  166114. pp$32.currentScope = function() {
  166115. return this.scopeStack[this.scopeStack.length - 1];
  166116. };
  166117. pp$32.currentVarScope = function() {
  166118. for (var i2 = this.scopeStack.length - 1; ; i2--) {
  166119. var scope = this.scopeStack[i2];
  166120. if (scope.flags & SCOPE_VAR2) {
  166121. return scope;
  166122. }
  166123. }
  166124. };
  166125. pp$32.currentThisScope = function() {
  166126. for (var i2 = this.scopeStack.length - 1; ; i2--) {
  166127. var scope = this.scopeStack[i2];
  166128. if (scope.flags & SCOPE_VAR2 && !(scope.flags & SCOPE_ARROW2)) {
  166129. return scope;
  166130. }
  166131. }
  166132. };
  166133. var Node3 = function Node4(parser, pos, loc) {
  166134. this.type = "";
  166135. this.start = pos;
  166136. this.end = 0;
  166137. if (parser.options.locations) {
  166138. this.loc = new SourceLocation3(parser, loc);
  166139. }
  166140. if (parser.options.directSourceFile) {
  166141. this.sourceFile = parser.options.directSourceFile;
  166142. }
  166143. if (parser.options.ranges) {
  166144. this.range = [pos, 0];
  166145. }
  166146. };
  166147. var pp$22 = Parser3.prototype;
  166148. pp$22.startNode = function() {
  166149. return new Node3(this, this.start, this.startLoc);
  166150. };
  166151. pp$22.startNodeAt = function(pos, loc) {
  166152. return new Node3(this, pos, loc);
  166153. };
  166154. function finishNodeAt2(node, type, pos, loc) {
  166155. node.type = type;
  166156. node.end = pos;
  166157. if (this.options.locations) {
  166158. node.loc.end = loc;
  166159. }
  166160. if (this.options.ranges) {
  166161. node.range[1] = pos;
  166162. }
  166163. return node;
  166164. }
  166165. pp$22.finishNode = function(node, type) {
  166166. return finishNodeAt2.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
  166167. };
  166168. pp$22.finishNodeAt = function(node, type, pos, loc) {
  166169. return finishNodeAt2.call(this, node, type, pos, loc);
  166170. };
  166171. pp$22.copyNode = function(node) {
  166172. var newNode = new Node3(this, node.start, this.startLoc);
  166173. for (var prop in node) {
  166174. newNode[prop] = node[prop];
  166175. }
  166176. return newNode;
  166177. };
  166178. var ecma9BinaryProperties2 = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
  166179. var ecma10BinaryProperties2 = ecma9BinaryProperties2 + " Extended_Pictographic";
  166180. var ecma11BinaryProperties2 = ecma10BinaryProperties2;
  166181. var ecma12BinaryProperties2 = ecma11BinaryProperties2 + " EBase EComp EMod EPres ExtPict";
  166182. var ecma13BinaryProperties2 = ecma12BinaryProperties2;
  166183. var unicodeBinaryProperties2 = {
  166184. 9: ecma9BinaryProperties2,
  166185. 10: ecma10BinaryProperties2,
  166186. 11: ecma11BinaryProperties2,
  166187. 12: ecma12BinaryProperties2,
  166188. 13: ecma13BinaryProperties2
  166189. };
  166190. var unicodeGeneralCategoryValues2 = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
  166191. var ecma9ScriptValues2 = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
  166192. var ecma10ScriptValues2 = ecma9ScriptValues2 + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
  166193. var ecma11ScriptValues2 = ecma10ScriptValues2 + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
  166194. var ecma12ScriptValues2 = ecma11ScriptValues2 + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
  166195. var ecma13ScriptValues2 = ecma12ScriptValues2 + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
  166196. var unicodeScriptValues2 = {
  166197. 9: ecma9ScriptValues2,
  166198. 10: ecma10ScriptValues2,
  166199. 11: ecma11ScriptValues2,
  166200. 12: ecma12ScriptValues2,
  166201. 13: ecma13ScriptValues2
  166202. };
  166203. var data2 = {};
  166204. function buildUnicodeData2(ecmaVersion2) {
  166205. var d = data2[ecmaVersion2] = {
  166206. binary: wordsRegexp2(unicodeBinaryProperties2[ecmaVersion2] + " " + unicodeGeneralCategoryValues2),
  166207. nonBinary: {
  166208. General_Category: wordsRegexp2(unicodeGeneralCategoryValues2),
  166209. Script: wordsRegexp2(unicodeScriptValues2[ecmaVersion2])
  166210. }
  166211. };
  166212. d.nonBinary.Script_Extensions = d.nonBinary.Script;
  166213. d.nonBinary.gc = d.nonBinary.General_Category;
  166214. d.nonBinary.sc = d.nonBinary.Script;
  166215. d.nonBinary.scx = d.nonBinary.Script_Extensions;
  166216. }
  166217. for (var i = 0, list3 = [9, 10, 11, 12, 13]; i < list3.length; i += 1) {
  166218. var ecmaVersion = list3[i];
  166219. buildUnicodeData2(ecmaVersion);
  166220. }
  166221. var pp$12 = Parser3.prototype;
  166222. var RegExpValidationState3 = function RegExpValidationState4(parser) {
  166223. this.parser = parser;
  166224. this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
  166225. this.unicodeProperties = data2[parser.options.ecmaVersion >= 13 ? 13 : parser.options.ecmaVersion];
  166226. this.source = "";
  166227. this.flags = "";
  166228. this.start = 0;
  166229. this.switchU = false;
  166230. this.switchN = false;
  166231. this.pos = 0;
  166232. this.lastIntValue = 0;
  166233. this.lastStringValue = "";
  166234. this.lastAssertionIsQuantifiable = false;
  166235. this.numCapturingParens = 0;
  166236. this.maxBackReference = 0;
  166237. this.groupNames = [];
  166238. this.backReferenceNames = [];
  166239. };
  166240. RegExpValidationState3.prototype.reset = function reset2(start3, pattern, flags) {
  166241. var unicode = flags.indexOf("u") !== -1;
  166242. this.start = start3 | 0;
  166243. this.source = pattern + "";
  166244. this.flags = flags;
  166245. this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
  166246. this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
  166247. };
  166248. RegExpValidationState3.prototype.raise = function raise2(message) {
  166249. this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
  166250. };
  166251. RegExpValidationState3.prototype.at = function at2(i2, forceU) {
  166252. if (forceU === void 0)
  166253. forceU = false;
  166254. var s = this.source;
  166255. var l = s.length;
  166256. if (i2 >= l) {
  166257. return -1;
  166258. }
  166259. var c = s.charCodeAt(i2);
  166260. if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l) {
  166261. return c;
  166262. }
  166263. var next = s.charCodeAt(i2 + 1);
  166264. return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
  166265. };
  166266. RegExpValidationState3.prototype.nextIndex = function nextIndex2(i2, forceU) {
  166267. if (forceU === void 0)
  166268. forceU = false;
  166269. var s = this.source;
  166270. var l = s.length;
  166271. if (i2 >= l) {
  166272. return l;
  166273. }
  166274. var c = s.charCodeAt(i2), next;
  166275. if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l || (next = s.charCodeAt(i2 + 1)) < 56320 || next > 57343) {
  166276. return i2 + 1;
  166277. }
  166278. return i2 + 2;
  166279. };
  166280. RegExpValidationState3.prototype.current = function current2(forceU) {
  166281. if (forceU === void 0)
  166282. forceU = false;
  166283. return this.at(this.pos, forceU);
  166284. };
  166285. RegExpValidationState3.prototype.lookahead = function lookahead2(forceU) {
  166286. if (forceU === void 0)
  166287. forceU = false;
  166288. return this.at(this.nextIndex(this.pos, forceU), forceU);
  166289. };
  166290. RegExpValidationState3.prototype.advance = function advance2(forceU) {
  166291. if (forceU === void 0)
  166292. forceU = false;
  166293. this.pos = this.nextIndex(this.pos, forceU);
  166294. };
  166295. RegExpValidationState3.prototype.eat = function eat2(ch, forceU) {
  166296. if (forceU === void 0)
  166297. forceU = false;
  166298. if (this.current(forceU) === ch) {
  166299. this.advance(forceU);
  166300. return true;
  166301. }
  166302. return false;
  166303. };
  166304. function codePointToString$12(ch) {
  166305. if (ch <= 65535) {
  166306. return String.fromCharCode(ch);
  166307. }
  166308. ch -= 65536;
  166309. return String.fromCharCode((ch >> 10) + 55296, (ch & 1023) + 56320);
  166310. }
  166311. pp$12.validateRegExpFlags = function(state) {
  166312. var validFlags = state.validFlags;
  166313. var flags = state.flags;
  166314. for (var i2 = 0; i2 < flags.length; i2++) {
  166315. var flag = flags.charAt(i2);
  166316. if (validFlags.indexOf(flag) === -1) {
  166317. this.raise(state.start, "Invalid regular expression flag");
  166318. }
  166319. if (flags.indexOf(flag, i2 + 1) > -1) {
  166320. this.raise(state.start, "Duplicate regular expression flag");
  166321. }
  166322. }
  166323. };
  166324. pp$12.validateRegExpPattern = function(state) {
  166325. this.regexp_pattern(state);
  166326. if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
  166327. state.switchN = true;
  166328. this.regexp_pattern(state);
  166329. }
  166330. };
  166331. pp$12.regexp_pattern = function(state) {
  166332. state.pos = 0;
  166333. state.lastIntValue = 0;
  166334. state.lastStringValue = "";
  166335. state.lastAssertionIsQuantifiable = false;
  166336. state.numCapturingParens = 0;
  166337. state.maxBackReference = 0;
  166338. state.groupNames.length = 0;
  166339. state.backReferenceNames.length = 0;
  166340. this.regexp_disjunction(state);
  166341. if (state.pos !== state.source.length) {
  166342. if (state.eat(41)) {
  166343. state.raise("Unmatched ')'");
  166344. }
  166345. if (state.eat(93) || state.eat(125)) {
  166346. state.raise("Lone quantifier brackets");
  166347. }
  166348. }
  166349. if (state.maxBackReference > state.numCapturingParens) {
  166350. state.raise("Invalid escape");
  166351. }
  166352. for (var i2 = 0, list4 = state.backReferenceNames; i2 < list4.length; i2 += 1) {
  166353. var name2 = list4[i2];
  166354. if (state.groupNames.indexOf(name2) === -1) {
  166355. state.raise("Invalid named capture referenced");
  166356. }
  166357. }
  166358. };
  166359. pp$12.regexp_disjunction = function(state) {
  166360. this.regexp_alternative(state);
  166361. while (state.eat(124)) {
  166362. this.regexp_alternative(state);
  166363. }
  166364. if (this.regexp_eatQuantifier(state, true)) {
  166365. state.raise("Nothing to repeat");
  166366. }
  166367. if (state.eat(123)) {
  166368. state.raise("Lone quantifier brackets");
  166369. }
  166370. };
  166371. pp$12.regexp_alternative = function(state) {
  166372. while (state.pos < state.source.length && this.regexp_eatTerm(state)) {
  166373. }
  166374. };
  166375. pp$12.regexp_eatTerm = function(state) {
  166376. if (this.regexp_eatAssertion(state)) {
  166377. if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
  166378. if (state.switchU) {
  166379. state.raise("Invalid quantifier");
  166380. }
  166381. }
  166382. return true;
  166383. }
  166384. if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
  166385. this.regexp_eatQuantifier(state);
  166386. return true;
  166387. }
  166388. return false;
  166389. };
  166390. pp$12.regexp_eatAssertion = function(state) {
  166391. var start3 = state.pos;
  166392. state.lastAssertionIsQuantifiable = false;
  166393. if (state.eat(94) || state.eat(36)) {
  166394. return true;
  166395. }
  166396. if (state.eat(92)) {
  166397. if (state.eat(66) || state.eat(98)) {
  166398. return true;
  166399. }
  166400. state.pos = start3;
  166401. }
  166402. if (state.eat(40) && state.eat(63)) {
  166403. var lookbehind = false;
  166404. if (this.options.ecmaVersion >= 9) {
  166405. lookbehind = state.eat(60);
  166406. }
  166407. if (state.eat(61) || state.eat(33)) {
  166408. this.regexp_disjunction(state);
  166409. if (!state.eat(41)) {
  166410. state.raise("Unterminated group");
  166411. }
  166412. state.lastAssertionIsQuantifiable = !lookbehind;
  166413. return true;
  166414. }
  166415. }
  166416. state.pos = start3;
  166417. return false;
  166418. };
  166419. pp$12.regexp_eatQuantifier = function(state, noError) {
  166420. if (noError === void 0)
  166421. noError = false;
  166422. if (this.regexp_eatQuantifierPrefix(state, noError)) {
  166423. state.eat(63);
  166424. return true;
  166425. }
  166426. return false;
  166427. };
  166428. pp$12.regexp_eatQuantifierPrefix = function(state, noError) {
  166429. return state.eat(42) || state.eat(43) || state.eat(63) || this.regexp_eatBracedQuantifier(state, noError);
  166430. };
  166431. pp$12.regexp_eatBracedQuantifier = function(state, noError) {
  166432. var start3 = state.pos;
  166433. if (state.eat(123)) {
  166434. var min = 0, max = -1;
  166435. if (this.regexp_eatDecimalDigits(state)) {
  166436. min = state.lastIntValue;
  166437. if (state.eat(44) && this.regexp_eatDecimalDigits(state)) {
  166438. max = state.lastIntValue;
  166439. }
  166440. if (state.eat(125)) {
  166441. if (max !== -1 && max < min && !noError) {
  166442. state.raise("numbers out of order in {} quantifier");
  166443. }
  166444. return true;
  166445. }
  166446. }
  166447. if (state.switchU && !noError) {
  166448. state.raise("Incomplete quantifier");
  166449. }
  166450. state.pos = start3;
  166451. }
  166452. return false;
  166453. };
  166454. pp$12.regexp_eatAtom = function(state) {
  166455. return this.regexp_eatPatternCharacters(state) || state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
  166456. };
  166457. pp$12.regexp_eatReverseSolidusAtomEscape = function(state) {
  166458. var start3 = state.pos;
  166459. if (state.eat(92)) {
  166460. if (this.regexp_eatAtomEscape(state)) {
  166461. return true;
  166462. }
  166463. state.pos = start3;
  166464. }
  166465. return false;
  166466. };
  166467. pp$12.regexp_eatUncapturingGroup = function(state) {
  166468. var start3 = state.pos;
  166469. if (state.eat(40)) {
  166470. if (state.eat(63) && state.eat(58)) {
  166471. this.regexp_disjunction(state);
  166472. if (state.eat(41)) {
  166473. return true;
  166474. }
  166475. state.raise("Unterminated group");
  166476. }
  166477. state.pos = start3;
  166478. }
  166479. return false;
  166480. };
  166481. pp$12.regexp_eatCapturingGroup = function(state) {
  166482. if (state.eat(40)) {
  166483. if (this.options.ecmaVersion >= 9) {
  166484. this.regexp_groupSpecifier(state);
  166485. } else if (state.current() === 63) {
  166486. state.raise("Invalid group");
  166487. }
  166488. this.regexp_disjunction(state);
  166489. if (state.eat(41)) {
  166490. state.numCapturingParens += 1;
  166491. return true;
  166492. }
  166493. state.raise("Unterminated group");
  166494. }
  166495. return false;
  166496. };
  166497. pp$12.regexp_eatExtendedAtom = function(state) {
  166498. return state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
  166499. };
  166500. pp$12.regexp_eatInvalidBracedQuantifier = function(state) {
  166501. if (this.regexp_eatBracedQuantifier(state, true)) {
  166502. state.raise("Nothing to repeat");
  166503. }
  166504. return false;
  166505. };
  166506. pp$12.regexp_eatSyntaxCharacter = function(state) {
  166507. var ch = state.current();
  166508. if (isSyntaxCharacter2(ch)) {
  166509. state.lastIntValue = ch;
  166510. state.advance();
  166511. return true;
  166512. }
  166513. return false;
  166514. };
  166515. function isSyntaxCharacter2(ch) {
  166516. return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
  166517. }
  166518. pp$12.regexp_eatPatternCharacters = function(state) {
  166519. var start3 = state.pos;
  166520. var ch = 0;
  166521. while ((ch = state.current()) !== -1 && !isSyntaxCharacter2(ch)) {
  166522. state.advance();
  166523. }
  166524. return state.pos !== start3;
  166525. };
  166526. pp$12.regexp_eatExtendedPatternCharacter = function(state) {
  166527. var ch = state.current();
  166528. if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) {
  166529. state.advance();
  166530. return true;
  166531. }
  166532. return false;
  166533. };
  166534. pp$12.regexp_groupSpecifier = function(state) {
  166535. if (state.eat(63)) {
  166536. if (this.regexp_eatGroupName(state)) {
  166537. if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
  166538. state.raise("Duplicate capture group name");
  166539. }
  166540. state.groupNames.push(state.lastStringValue);
  166541. return;
  166542. }
  166543. state.raise("Invalid group");
  166544. }
  166545. };
  166546. pp$12.regexp_eatGroupName = function(state) {
  166547. state.lastStringValue = "";
  166548. if (state.eat(60)) {
  166549. if (this.regexp_eatRegExpIdentifierName(state) && state.eat(62)) {
  166550. return true;
  166551. }
  166552. state.raise("Invalid capture group name");
  166553. }
  166554. return false;
  166555. };
  166556. pp$12.regexp_eatRegExpIdentifierName = function(state) {
  166557. state.lastStringValue = "";
  166558. if (this.regexp_eatRegExpIdentifierStart(state)) {
  166559. state.lastStringValue += codePointToString$12(state.lastIntValue);
  166560. while (this.regexp_eatRegExpIdentifierPart(state)) {
  166561. state.lastStringValue += codePointToString$12(state.lastIntValue);
  166562. }
  166563. return true;
  166564. }
  166565. return false;
  166566. };
  166567. pp$12.regexp_eatRegExpIdentifierStart = function(state) {
  166568. var start3 = state.pos;
  166569. var forceU = this.options.ecmaVersion >= 11;
  166570. var ch = state.current(forceU);
  166571. state.advance(forceU);
  166572. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  166573. ch = state.lastIntValue;
  166574. }
  166575. if (isRegExpIdentifierStart2(ch)) {
  166576. state.lastIntValue = ch;
  166577. return true;
  166578. }
  166579. state.pos = start3;
  166580. return false;
  166581. };
  166582. function isRegExpIdentifierStart2(ch) {
  166583. return isIdentifierStart2(ch, true) || ch === 36 || ch === 95;
  166584. }
  166585. pp$12.regexp_eatRegExpIdentifierPart = function(state) {
  166586. var start3 = state.pos;
  166587. var forceU = this.options.ecmaVersion >= 11;
  166588. var ch = state.current(forceU);
  166589. state.advance(forceU);
  166590. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  166591. ch = state.lastIntValue;
  166592. }
  166593. if (isRegExpIdentifierPart2(ch)) {
  166594. state.lastIntValue = ch;
  166595. return true;
  166596. }
  166597. state.pos = start3;
  166598. return false;
  166599. };
  166600. function isRegExpIdentifierPart2(ch) {
  166601. return isIdentifierChar2(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
  166602. }
  166603. pp$12.regexp_eatAtomEscape = function(state) {
  166604. if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
  166605. return true;
  166606. }
  166607. if (state.switchU) {
  166608. if (state.current() === 99) {
  166609. state.raise("Invalid unicode escape");
  166610. }
  166611. state.raise("Invalid escape");
  166612. }
  166613. return false;
  166614. };
  166615. pp$12.regexp_eatBackReference = function(state) {
  166616. var start3 = state.pos;
  166617. if (this.regexp_eatDecimalEscape(state)) {
  166618. var n = state.lastIntValue;
  166619. if (state.switchU) {
  166620. if (n > state.maxBackReference) {
  166621. state.maxBackReference = n;
  166622. }
  166623. return true;
  166624. }
  166625. if (n <= state.numCapturingParens) {
  166626. return true;
  166627. }
  166628. state.pos = start3;
  166629. }
  166630. return false;
  166631. };
  166632. pp$12.regexp_eatKGroupName = function(state) {
  166633. if (state.eat(107)) {
  166634. if (this.regexp_eatGroupName(state)) {
  166635. state.backReferenceNames.push(state.lastStringValue);
  166636. return true;
  166637. }
  166638. state.raise("Invalid named reference");
  166639. }
  166640. return false;
  166641. };
  166642. pp$12.regexp_eatCharacterEscape = function(state) {
  166643. return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
  166644. };
  166645. pp$12.regexp_eatCControlLetter = function(state) {
  166646. var start3 = state.pos;
  166647. if (state.eat(99)) {
  166648. if (this.regexp_eatControlLetter(state)) {
  166649. return true;
  166650. }
  166651. state.pos = start3;
  166652. }
  166653. return false;
  166654. };
  166655. pp$12.regexp_eatZero = function(state) {
  166656. if (state.current() === 48 && !isDecimalDigit2(state.lookahead())) {
  166657. state.lastIntValue = 0;
  166658. state.advance();
  166659. return true;
  166660. }
  166661. return false;
  166662. };
  166663. pp$12.regexp_eatControlEscape = function(state) {
  166664. var ch = state.current();
  166665. if (ch === 116) {
  166666. state.lastIntValue = 9;
  166667. state.advance();
  166668. return true;
  166669. }
  166670. if (ch === 110) {
  166671. state.lastIntValue = 10;
  166672. state.advance();
  166673. return true;
  166674. }
  166675. if (ch === 118) {
  166676. state.lastIntValue = 11;
  166677. state.advance();
  166678. return true;
  166679. }
  166680. if (ch === 102) {
  166681. state.lastIntValue = 12;
  166682. state.advance();
  166683. return true;
  166684. }
  166685. if (ch === 114) {
  166686. state.lastIntValue = 13;
  166687. state.advance();
  166688. return true;
  166689. }
  166690. return false;
  166691. };
  166692. pp$12.regexp_eatControlLetter = function(state) {
  166693. var ch = state.current();
  166694. if (isControlLetter2(ch)) {
  166695. state.lastIntValue = ch % 32;
  166696. state.advance();
  166697. return true;
  166698. }
  166699. return false;
  166700. };
  166701. function isControlLetter2(ch) {
  166702. return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
  166703. }
  166704. pp$12.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
  166705. if (forceU === void 0)
  166706. forceU = false;
  166707. var start3 = state.pos;
  166708. var switchU = forceU || state.switchU;
  166709. if (state.eat(117)) {
  166710. if (this.regexp_eatFixedHexDigits(state, 4)) {
  166711. var lead = state.lastIntValue;
  166712. if (switchU && lead >= 55296 && lead <= 56319) {
  166713. var leadSurrogateEnd = state.pos;
  166714. if (state.eat(92) && state.eat(117) && this.regexp_eatFixedHexDigits(state, 4)) {
  166715. var trail = state.lastIntValue;
  166716. if (trail >= 56320 && trail <= 57343) {
  166717. state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536;
  166718. return true;
  166719. }
  166720. }
  166721. state.pos = leadSurrogateEnd;
  166722. state.lastIntValue = lead;
  166723. }
  166724. return true;
  166725. }
  166726. if (switchU && state.eat(123) && this.regexp_eatHexDigits(state) && state.eat(125) && isValidUnicode2(state.lastIntValue)) {
  166727. return true;
  166728. }
  166729. if (switchU) {
  166730. state.raise("Invalid unicode escape");
  166731. }
  166732. state.pos = start3;
  166733. }
  166734. return false;
  166735. };
  166736. function isValidUnicode2(ch) {
  166737. return ch >= 0 && ch <= 1114111;
  166738. }
  166739. pp$12.regexp_eatIdentityEscape = function(state) {
  166740. if (state.switchU) {
  166741. if (this.regexp_eatSyntaxCharacter(state)) {
  166742. return true;
  166743. }
  166744. if (state.eat(47)) {
  166745. state.lastIntValue = 47;
  166746. return true;
  166747. }
  166748. return false;
  166749. }
  166750. var ch = state.current();
  166751. if (ch !== 99 && (!state.switchN || ch !== 107)) {
  166752. state.lastIntValue = ch;
  166753. state.advance();
  166754. return true;
  166755. }
  166756. return false;
  166757. };
  166758. pp$12.regexp_eatDecimalEscape = function(state) {
  166759. state.lastIntValue = 0;
  166760. var ch = state.current();
  166761. if (ch >= 49 && ch <= 57) {
  166762. do {
  166763. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  166764. state.advance();
  166765. } while ((ch = state.current()) >= 48 && ch <= 57);
  166766. return true;
  166767. }
  166768. return false;
  166769. };
  166770. pp$12.regexp_eatCharacterClassEscape = function(state) {
  166771. var ch = state.current();
  166772. if (isCharacterClassEscape2(ch)) {
  166773. state.lastIntValue = -1;
  166774. state.advance();
  166775. return true;
  166776. }
  166777. if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 80 || ch === 112)) {
  166778. state.lastIntValue = -1;
  166779. state.advance();
  166780. if (state.eat(123) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(125)) {
  166781. return true;
  166782. }
  166783. state.raise("Invalid property name");
  166784. }
  166785. return false;
  166786. };
  166787. function isCharacterClassEscape2(ch) {
  166788. return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
  166789. }
  166790. pp$12.regexp_eatUnicodePropertyValueExpression = function(state) {
  166791. var start3 = state.pos;
  166792. if (this.regexp_eatUnicodePropertyName(state) && state.eat(61)) {
  166793. var name2 = state.lastStringValue;
  166794. if (this.regexp_eatUnicodePropertyValue(state)) {
  166795. var value = state.lastStringValue;
  166796. this.regexp_validateUnicodePropertyNameAndValue(state, name2, value);
  166797. return true;
  166798. }
  166799. }
  166800. state.pos = start3;
  166801. if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
  166802. var nameOrValue = state.lastStringValue;
  166803. this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
  166804. return true;
  166805. }
  166806. return false;
  166807. };
  166808. pp$12.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value) {
  166809. if (!hasOwn2(state.unicodeProperties.nonBinary, name2)) {
  166810. state.raise("Invalid property name");
  166811. }
  166812. if (!state.unicodeProperties.nonBinary[name2].test(value)) {
  166813. state.raise("Invalid property value");
  166814. }
  166815. };
  166816. pp$12.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
  166817. if (!state.unicodeProperties.binary.test(nameOrValue)) {
  166818. state.raise("Invalid property name");
  166819. }
  166820. };
  166821. pp$12.regexp_eatUnicodePropertyName = function(state) {
  166822. var ch = 0;
  166823. state.lastStringValue = "";
  166824. while (isUnicodePropertyNameCharacter2(ch = state.current())) {
  166825. state.lastStringValue += codePointToString$12(ch);
  166826. state.advance();
  166827. }
  166828. return state.lastStringValue !== "";
  166829. };
  166830. function isUnicodePropertyNameCharacter2(ch) {
  166831. return isControlLetter2(ch) || ch === 95;
  166832. }
  166833. pp$12.regexp_eatUnicodePropertyValue = function(state) {
  166834. var ch = 0;
  166835. state.lastStringValue = "";
  166836. while (isUnicodePropertyValueCharacter2(ch = state.current())) {
  166837. state.lastStringValue += codePointToString$12(ch);
  166838. state.advance();
  166839. }
  166840. return state.lastStringValue !== "";
  166841. };
  166842. function isUnicodePropertyValueCharacter2(ch) {
  166843. return isUnicodePropertyNameCharacter2(ch) || isDecimalDigit2(ch);
  166844. }
  166845. pp$12.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
  166846. return this.regexp_eatUnicodePropertyValue(state);
  166847. };
  166848. pp$12.regexp_eatCharacterClass = function(state) {
  166849. if (state.eat(91)) {
  166850. state.eat(94);
  166851. this.regexp_classRanges(state);
  166852. if (state.eat(93)) {
  166853. return true;
  166854. }
  166855. state.raise("Unterminated character class");
  166856. }
  166857. return false;
  166858. };
  166859. pp$12.regexp_classRanges = function(state) {
  166860. while (this.regexp_eatClassAtom(state)) {
  166861. var left = state.lastIntValue;
  166862. if (state.eat(45) && this.regexp_eatClassAtom(state)) {
  166863. var right = state.lastIntValue;
  166864. if (state.switchU && (left === -1 || right === -1)) {
  166865. state.raise("Invalid character class");
  166866. }
  166867. if (left !== -1 && right !== -1 && left > right) {
  166868. state.raise("Range out of order in character class");
  166869. }
  166870. }
  166871. }
  166872. };
  166873. pp$12.regexp_eatClassAtom = function(state) {
  166874. var start3 = state.pos;
  166875. if (state.eat(92)) {
  166876. if (this.regexp_eatClassEscape(state)) {
  166877. return true;
  166878. }
  166879. if (state.switchU) {
  166880. var ch$1 = state.current();
  166881. if (ch$1 === 99 || isOctalDigit2(ch$1)) {
  166882. state.raise("Invalid class escape");
  166883. }
  166884. state.raise("Invalid escape");
  166885. }
  166886. state.pos = start3;
  166887. }
  166888. var ch = state.current();
  166889. if (ch !== 93) {
  166890. state.lastIntValue = ch;
  166891. state.advance();
  166892. return true;
  166893. }
  166894. return false;
  166895. };
  166896. pp$12.regexp_eatClassEscape = function(state) {
  166897. var start3 = state.pos;
  166898. if (state.eat(98)) {
  166899. state.lastIntValue = 8;
  166900. return true;
  166901. }
  166902. if (state.switchU && state.eat(45)) {
  166903. state.lastIntValue = 45;
  166904. return true;
  166905. }
  166906. if (!state.switchU && state.eat(99)) {
  166907. if (this.regexp_eatClassControlLetter(state)) {
  166908. return true;
  166909. }
  166910. state.pos = start3;
  166911. }
  166912. return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
  166913. };
  166914. pp$12.regexp_eatClassControlLetter = function(state) {
  166915. var ch = state.current();
  166916. if (isDecimalDigit2(ch) || ch === 95) {
  166917. state.lastIntValue = ch % 32;
  166918. state.advance();
  166919. return true;
  166920. }
  166921. return false;
  166922. };
  166923. pp$12.regexp_eatHexEscapeSequence = function(state) {
  166924. var start3 = state.pos;
  166925. if (state.eat(120)) {
  166926. if (this.regexp_eatFixedHexDigits(state, 2)) {
  166927. return true;
  166928. }
  166929. if (state.switchU) {
  166930. state.raise("Invalid escape");
  166931. }
  166932. state.pos = start3;
  166933. }
  166934. return false;
  166935. };
  166936. pp$12.regexp_eatDecimalDigits = function(state) {
  166937. var start3 = state.pos;
  166938. var ch = 0;
  166939. state.lastIntValue = 0;
  166940. while (isDecimalDigit2(ch = state.current())) {
  166941. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  166942. state.advance();
  166943. }
  166944. return state.pos !== start3;
  166945. };
  166946. function isDecimalDigit2(ch) {
  166947. return ch >= 48 && ch <= 57;
  166948. }
  166949. pp$12.regexp_eatHexDigits = function(state) {
  166950. var start3 = state.pos;
  166951. var ch = 0;
  166952. state.lastIntValue = 0;
  166953. while (isHexDigit2(ch = state.current())) {
  166954. state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch);
  166955. state.advance();
  166956. }
  166957. return state.pos !== start3;
  166958. };
  166959. function isHexDigit2(ch) {
  166960. return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
  166961. }
  166962. function hexToInt2(ch) {
  166963. if (ch >= 65 && ch <= 70) {
  166964. return 10 + (ch - 65);
  166965. }
  166966. if (ch >= 97 && ch <= 102) {
  166967. return 10 + (ch - 97);
  166968. }
  166969. return ch - 48;
  166970. }
  166971. pp$12.regexp_eatLegacyOctalEscapeSequence = function(state) {
  166972. if (this.regexp_eatOctalDigit(state)) {
  166973. var n1 = state.lastIntValue;
  166974. if (this.regexp_eatOctalDigit(state)) {
  166975. var n2 = state.lastIntValue;
  166976. if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
  166977. state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
  166978. } else {
  166979. state.lastIntValue = n1 * 8 + n2;
  166980. }
  166981. } else {
  166982. state.lastIntValue = n1;
  166983. }
  166984. return true;
  166985. }
  166986. return false;
  166987. };
  166988. pp$12.regexp_eatOctalDigit = function(state) {
  166989. var ch = state.current();
  166990. if (isOctalDigit2(ch)) {
  166991. state.lastIntValue = ch - 48;
  166992. state.advance();
  166993. return true;
  166994. }
  166995. state.lastIntValue = 0;
  166996. return false;
  166997. };
  166998. function isOctalDigit2(ch) {
  166999. return ch >= 48 && ch <= 55;
  167000. }
  167001. pp$12.regexp_eatFixedHexDigits = function(state, length) {
  167002. var start3 = state.pos;
  167003. state.lastIntValue = 0;
  167004. for (var i2 = 0; i2 < length; ++i2) {
  167005. var ch = state.current();
  167006. if (!isHexDigit2(ch)) {
  167007. state.pos = start3;
  167008. return false;
  167009. }
  167010. state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch);
  167011. state.advance();
  167012. }
  167013. return true;
  167014. };
  167015. var Token3 = function Token4(p) {
  167016. this.type = p.type;
  167017. this.value = p.value;
  167018. this.start = p.start;
  167019. this.end = p.end;
  167020. if (p.options.locations) {
  167021. this.loc = new SourceLocation3(p, p.startLoc, p.endLoc);
  167022. }
  167023. if (p.options.ranges) {
  167024. this.range = [p.start, p.end];
  167025. }
  167026. };
  167027. var pp2 = Parser3.prototype;
  167028. pp2.next = function(ignoreEscapeSequenceInKeyword) {
  167029. if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) {
  167030. this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword);
  167031. }
  167032. if (this.options.onToken) {
  167033. this.options.onToken(new Token3(this));
  167034. }
  167035. this.lastTokEnd = this.end;
  167036. this.lastTokStart = this.start;
  167037. this.lastTokEndLoc = this.endLoc;
  167038. this.lastTokStartLoc = this.startLoc;
  167039. this.nextToken();
  167040. };
  167041. pp2.getToken = function() {
  167042. this.next();
  167043. return new Token3(this);
  167044. };
  167045. if (typeof Symbol !== "undefined") {
  167046. pp2[Symbol.iterator] = function() {
  167047. var this$1$1 = this;
  167048. return {
  167049. next: function() {
  167050. var token = this$1$1.getToken();
  167051. return {
  167052. done: token.type === types$12.eof,
  167053. value: token
  167054. };
  167055. }
  167056. };
  167057. };
  167058. }
  167059. pp2.nextToken = function() {
  167060. var curContext = this.curContext();
  167061. if (!curContext || !curContext.preserveSpace) {
  167062. this.skipSpace();
  167063. }
  167064. this.start = this.pos;
  167065. if (this.options.locations) {
  167066. this.startLoc = this.curPosition();
  167067. }
  167068. if (this.pos >= this.input.length) {
  167069. return this.finishToken(types$12.eof);
  167070. }
  167071. if (curContext.override) {
  167072. return curContext.override(this);
  167073. } else {
  167074. this.readToken(this.fullCharCodeAtPos());
  167075. }
  167076. };
  167077. pp2.readToken = function(code2) {
  167078. if (isIdentifierStart2(code2, this.options.ecmaVersion >= 6) || code2 === 92) {
  167079. return this.readWord();
  167080. }
  167081. return this.getTokenFromCode(code2);
  167082. };
  167083. pp2.fullCharCodeAtPos = function() {
  167084. var code2 = this.input.charCodeAt(this.pos);
  167085. if (code2 <= 55295 || code2 >= 56320) {
  167086. return code2;
  167087. }
  167088. var next = this.input.charCodeAt(this.pos + 1);
  167089. return next <= 56319 || next >= 57344 ? code2 : (code2 << 10) + next - 56613888;
  167090. };
  167091. pp2.skipBlockComment = function() {
  167092. var startLoc = this.options.onComment && this.curPosition();
  167093. var start3 = this.pos, end = this.input.indexOf("*/", this.pos += 2);
  167094. if (end === -1) {
  167095. this.raise(this.pos - 2, "Unterminated comment");
  167096. }
  167097. this.pos = end + 2;
  167098. if (this.options.locations) {
  167099. for (var nextBreak = void 0, pos = start3; (nextBreak = nextLineBreak2(this.input, pos, this.pos)) > -1; ) {
  167100. ++this.curLine;
  167101. pos = this.lineStart = nextBreak;
  167102. }
  167103. }
  167104. if (this.options.onComment) {
  167105. this.options.onComment(
  167106. true,
  167107. this.input.slice(start3 + 2, end),
  167108. start3,
  167109. this.pos,
  167110. startLoc,
  167111. this.curPosition()
  167112. );
  167113. }
  167114. };
  167115. pp2.skipLineComment = function(startSkip) {
  167116. var start3 = this.pos;
  167117. var startLoc = this.options.onComment && this.curPosition();
  167118. var ch = this.input.charCodeAt(this.pos += startSkip);
  167119. while (this.pos < this.input.length && !isNewLine2(ch)) {
  167120. ch = this.input.charCodeAt(++this.pos);
  167121. }
  167122. if (this.options.onComment) {
  167123. this.options.onComment(
  167124. false,
  167125. this.input.slice(start3 + startSkip, this.pos),
  167126. start3,
  167127. this.pos,
  167128. startLoc,
  167129. this.curPosition()
  167130. );
  167131. }
  167132. };
  167133. pp2.skipSpace = function() {
  167134. loop:
  167135. while (this.pos < this.input.length) {
  167136. var ch = this.input.charCodeAt(this.pos);
  167137. switch (ch) {
  167138. case 32:
  167139. case 160:
  167140. ++this.pos;
  167141. break;
  167142. case 13:
  167143. if (this.input.charCodeAt(this.pos + 1) === 10) {
  167144. ++this.pos;
  167145. }
  167146. case 10:
  167147. case 8232:
  167148. case 8233:
  167149. ++this.pos;
  167150. if (this.options.locations) {
  167151. ++this.curLine;
  167152. this.lineStart = this.pos;
  167153. }
  167154. break;
  167155. case 47:
  167156. switch (this.input.charCodeAt(this.pos + 1)) {
  167157. case 42:
  167158. this.skipBlockComment();
  167159. break;
  167160. case 47:
  167161. this.skipLineComment(2);
  167162. break;
  167163. default:
  167164. break loop;
  167165. }
  167166. break;
  167167. default:
  167168. if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace2.test(String.fromCharCode(ch))) {
  167169. ++this.pos;
  167170. } else {
  167171. break loop;
  167172. }
  167173. }
  167174. }
  167175. };
  167176. pp2.finishToken = function(type, val) {
  167177. this.end = this.pos;
  167178. if (this.options.locations) {
  167179. this.endLoc = this.curPosition();
  167180. }
  167181. var prevType = this.type;
  167182. this.type = type;
  167183. this.value = val;
  167184. this.updateContext(prevType);
  167185. };
  167186. pp2.readToken_dot = function() {
  167187. var next = this.input.charCodeAt(this.pos + 1);
  167188. if (next >= 48 && next <= 57) {
  167189. return this.readNumber(true);
  167190. }
  167191. var next2 = this.input.charCodeAt(this.pos + 2);
  167192. if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
  167193. this.pos += 3;
  167194. return this.finishToken(types$12.ellipsis);
  167195. } else {
  167196. ++this.pos;
  167197. return this.finishToken(types$12.dot);
  167198. }
  167199. };
  167200. pp2.readToken_slash = function() {
  167201. var next = this.input.charCodeAt(this.pos + 1);
  167202. if (this.exprAllowed) {
  167203. ++this.pos;
  167204. return this.readRegexp();
  167205. }
  167206. if (next === 61) {
  167207. return this.finishOp(types$12.assign, 2);
  167208. }
  167209. return this.finishOp(types$12.slash, 1);
  167210. };
  167211. pp2.readToken_mult_modulo_exp = function(code2) {
  167212. var next = this.input.charCodeAt(this.pos + 1);
  167213. var size = 1;
  167214. var tokentype = code2 === 42 ? types$12.star : types$12.modulo;
  167215. if (this.options.ecmaVersion >= 7 && code2 === 42 && next === 42) {
  167216. ++size;
  167217. tokentype = types$12.starstar;
  167218. next = this.input.charCodeAt(this.pos + 2);
  167219. }
  167220. if (next === 61) {
  167221. return this.finishOp(types$12.assign, size + 1);
  167222. }
  167223. return this.finishOp(tokentype, size);
  167224. };
  167225. pp2.readToken_pipe_amp = function(code2) {
  167226. var next = this.input.charCodeAt(this.pos + 1);
  167227. if (next === code2) {
  167228. if (this.options.ecmaVersion >= 12) {
  167229. var next2 = this.input.charCodeAt(this.pos + 2);
  167230. if (next2 === 61) {
  167231. return this.finishOp(types$12.assign, 3);
  167232. }
  167233. }
  167234. return this.finishOp(code2 === 124 ? types$12.logicalOR : types$12.logicalAND, 2);
  167235. }
  167236. if (next === 61) {
  167237. return this.finishOp(types$12.assign, 2);
  167238. }
  167239. return this.finishOp(code2 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1);
  167240. };
  167241. pp2.readToken_caret = function() {
  167242. var next = this.input.charCodeAt(this.pos + 1);
  167243. if (next === 61) {
  167244. return this.finishOp(types$12.assign, 2);
  167245. }
  167246. return this.finishOp(types$12.bitwiseXOR, 1);
  167247. };
  167248. pp2.readToken_plus_min = function(code2) {
  167249. var next = this.input.charCodeAt(this.pos + 1);
  167250. if (next === code2) {
  167251. if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak2.test(this.input.slice(this.lastTokEnd, this.pos)))) {
  167252. this.skipLineComment(3);
  167253. this.skipSpace();
  167254. return this.nextToken();
  167255. }
  167256. return this.finishOp(types$12.incDec, 2);
  167257. }
  167258. if (next === 61) {
  167259. return this.finishOp(types$12.assign, 2);
  167260. }
  167261. return this.finishOp(types$12.plusMin, 1);
  167262. };
  167263. pp2.readToken_lt_gt = function(code2) {
  167264. var next = this.input.charCodeAt(this.pos + 1);
  167265. var size = 1;
  167266. if (next === code2) {
  167267. size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
  167268. if (this.input.charCodeAt(this.pos + size) === 61) {
  167269. return this.finishOp(types$12.assign, size + 1);
  167270. }
  167271. return this.finishOp(types$12.bitShift, size);
  167272. }
  167273. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
  167274. this.skipLineComment(4);
  167275. this.skipSpace();
  167276. return this.nextToken();
  167277. }
  167278. if (next === 61) {
  167279. size = 2;
  167280. }
  167281. return this.finishOp(types$12.relational, size);
  167282. };
  167283. pp2.readToken_eq_excl = function(code2) {
  167284. var next = this.input.charCodeAt(this.pos + 1);
  167285. if (next === 61) {
  167286. return this.finishOp(types$12.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
  167287. }
  167288. if (code2 === 61 && next === 62 && this.options.ecmaVersion >= 6) {
  167289. this.pos += 2;
  167290. return this.finishToken(types$12.arrow);
  167291. }
  167292. return this.finishOp(code2 === 61 ? types$12.eq : types$12.prefix, 1);
  167293. };
  167294. pp2.readToken_question = function() {
  167295. var ecmaVersion2 = this.options.ecmaVersion;
  167296. if (ecmaVersion2 >= 11) {
  167297. var next = this.input.charCodeAt(this.pos + 1);
  167298. if (next === 46) {
  167299. var next2 = this.input.charCodeAt(this.pos + 2);
  167300. if (next2 < 48 || next2 > 57) {
  167301. return this.finishOp(types$12.questionDot, 2);
  167302. }
  167303. }
  167304. if (next === 63) {
  167305. if (ecmaVersion2 >= 12) {
  167306. var next2$1 = this.input.charCodeAt(this.pos + 2);
  167307. if (next2$1 === 61) {
  167308. return this.finishOp(types$12.assign, 3);
  167309. }
  167310. }
  167311. return this.finishOp(types$12.coalesce, 2);
  167312. }
  167313. }
  167314. return this.finishOp(types$12.question, 1);
  167315. };
  167316. pp2.readToken_numberSign = function() {
  167317. var ecmaVersion2 = this.options.ecmaVersion;
  167318. var code2 = 35;
  167319. if (ecmaVersion2 >= 13) {
  167320. ++this.pos;
  167321. code2 = this.fullCharCodeAtPos();
  167322. if (isIdentifierStart2(code2, true) || code2 === 92) {
  167323. return this.finishToken(types$12.privateId, this.readWord1());
  167324. }
  167325. }
  167326. this.raise(this.pos, "Unexpected character '" + codePointToString2(code2) + "'");
  167327. };
  167328. pp2.getTokenFromCode = function(code2) {
  167329. switch (code2) {
  167330. case 46:
  167331. return this.readToken_dot();
  167332. case 40:
  167333. ++this.pos;
  167334. return this.finishToken(types$12.parenL);
  167335. case 41:
  167336. ++this.pos;
  167337. return this.finishToken(types$12.parenR);
  167338. case 59:
  167339. ++this.pos;
  167340. return this.finishToken(types$12.semi);
  167341. case 44:
  167342. ++this.pos;
  167343. return this.finishToken(types$12.comma);
  167344. case 91:
  167345. ++this.pos;
  167346. return this.finishToken(types$12.bracketL);
  167347. case 93:
  167348. ++this.pos;
  167349. return this.finishToken(types$12.bracketR);
  167350. case 123:
  167351. ++this.pos;
  167352. return this.finishToken(types$12.braceL);
  167353. case 125:
  167354. ++this.pos;
  167355. return this.finishToken(types$12.braceR);
  167356. case 58:
  167357. ++this.pos;
  167358. return this.finishToken(types$12.colon);
  167359. case 96:
  167360. if (this.options.ecmaVersion < 6) {
  167361. break;
  167362. }
  167363. ++this.pos;
  167364. return this.finishToken(types$12.backQuote);
  167365. case 48:
  167366. var next = this.input.charCodeAt(this.pos + 1);
  167367. if (next === 120 || next === 88) {
  167368. return this.readRadixNumber(16);
  167369. }
  167370. if (this.options.ecmaVersion >= 6) {
  167371. if (next === 111 || next === 79) {
  167372. return this.readRadixNumber(8);
  167373. }
  167374. if (next === 98 || next === 66) {
  167375. return this.readRadixNumber(2);
  167376. }
  167377. }
  167378. case 49:
  167379. case 50:
  167380. case 51:
  167381. case 52:
  167382. case 53:
  167383. case 54:
  167384. case 55:
  167385. case 56:
  167386. case 57:
  167387. return this.readNumber(false);
  167388. case 34:
  167389. case 39:
  167390. return this.readString(code2);
  167391. case 47:
  167392. return this.readToken_slash();
  167393. case 37:
  167394. case 42:
  167395. return this.readToken_mult_modulo_exp(code2);
  167396. case 124:
  167397. case 38:
  167398. return this.readToken_pipe_amp(code2);
  167399. case 94:
  167400. return this.readToken_caret();
  167401. case 43:
  167402. case 45:
  167403. return this.readToken_plus_min(code2);
  167404. case 60:
  167405. case 62:
  167406. return this.readToken_lt_gt(code2);
  167407. case 61:
  167408. case 33:
  167409. return this.readToken_eq_excl(code2);
  167410. case 63:
  167411. return this.readToken_question();
  167412. case 126:
  167413. return this.finishOp(types$12.prefix, 1);
  167414. case 35:
  167415. return this.readToken_numberSign();
  167416. }
  167417. this.raise(this.pos, "Unexpected character '" + codePointToString2(code2) + "'");
  167418. };
  167419. pp2.finishOp = function(type, size) {
  167420. var str = this.input.slice(this.pos, this.pos + size);
  167421. this.pos += size;
  167422. return this.finishToken(type, str);
  167423. };
  167424. pp2.readRegexp = function() {
  167425. var escaped, inClass, start3 = this.pos;
  167426. for (; ; ) {
  167427. if (this.pos >= this.input.length) {
  167428. this.raise(start3, "Unterminated regular expression");
  167429. }
  167430. var ch = this.input.charAt(this.pos);
  167431. if (lineBreak2.test(ch)) {
  167432. this.raise(start3, "Unterminated regular expression");
  167433. }
  167434. if (!escaped) {
  167435. if (ch === "[") {
  167436. inClass = true;
  167437. } else if (ch === "]" && inClass) {
  167438. inClass = false;
  167439. } else if (ch === "/" && !inClass) {
  167440. break;
  167441. }
  167442. escaped = ch === "\\";
  167443. } else {
  167444. escaped = false;
  167445. }
  167446. ++this.pos;
  167447. }
  167448. var pattern = this.input.slice(start3, this.pos);
  167449. ++this.pos;
  167450. var flagsStart = this.pos;
  167451. var flags = this.readWord1();
  167452. if (this.containsEsc) {
  167453. this.unexpected(flagsStart);
  167454. }
  167455. var state = this.regexpState || (this.regexpState = new RegExpValidationState3(this));
  167456. state.reset(start3, pattern, flags);
  167457. this.validateRegExpFlags(state);
  167458. this.validateRegExpPattern(state);
  167459. var value = null;
  167460. try {
  167461. value = new RegExp(pattern, flags);
  167462. } catch (e) {
  167463. }
  167464. return this.finishToken(types$12.regexp, { pattern, flags, value });
  167465. };
  167466. pp2.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
  167467. var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
  167468. var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
  167469. var start3 = this.pos, total = 0, lastCode = 0;
  167470. for (var i2 = 0, e = len == null ? Infinity : len; i2 < e; ++i2, ++this.pos) {
  167471. var code2 = this.input.charCodeAt(this.pos), val = void 0;
  167472. if (allowSeparators && code2 === 95) {
  167473. if (isLegacyOctalNumericLiteral) {
  167474. this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals");
  167475. }
  167476. if (lastCode === 95) {
  167477. this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
  167478. }
  167479. if (i2 === 0) {
  167480. this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
  167481. }
  167482. lastCode = code2;
  167483. continue;
  167484. }
  167485. if (code2 >= 97) {
  167486. val = code2 - 97 + 10;
  167487. } else if (code2 >= 65) {
  167488. val = code2 - 65 + 10;
  167489. } else if (code2 >= 48 && code2 <= 57) {
  167490. val = code2 - 48;
  167491. } else {
  167492. val = Infinity;
  167493. }
  167494. if (val >= radix) {
  167495. break;
  167496. }
  167497. lastCode = code2;
  167498. total = total * radix + val;
  167499. }
  167500. if (allowSeparators && lastCode === 95) {
  167501. this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits");
  167502. }
  167503. if (this.pos === start3 || len != null && this.pos - start3 !== len) {
  167504. return null;
  167505. }
  167506. return total;
  167507. };
  167508. function stringToNumber2(str, isLegacyOctalNumericLiteral) {
  167509. if (isLegacyOctalNumericLiteral) {
  167510. return parseInt(str, 8);
  167511. }
  167512. return parseFloat(str.replace(/_/g, ""));
  167513. }
  167514. function stringToBigInt2(str) {
  167515. if (typeof BigInt !== "function") {
  167516. return null;
  167517. }
  167518. return BigInt(str.replace(/_/g, ""));
  167519. }
  167520. pp2.readRadixNumber = function(radix) {
  167521. var start3 = this.pos;
  167522. this.pos += 2;
  167523. var val = this.readInt(radix);
  167524. if (val == null) {
  167525. this.raise(this.start + 2, "Expected number in radix " + radix);
  167526. }
  167527. if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
  167528. val = stringToBigInt2(this.input.slice(start3, this.pos));
  167529. ++this.pos;
  167530. } else if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  167531. this.raise(this.pos, "Identifier directly after number");
  167532. }
  167533. return this.finishToken(types$12.num, val);
  167534. };
  167535. pp2.readNumber = function(startsWithDot) {
  167536. var start3 = this.pos;
  167537. if (!startsWithDot && this.readInt(10, void 0, true) === null) {
  167538. this.raise(start3, "Invalid number");
  167539. }
  167540. var octal = this.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  167541. if (octal && this.strict) {
  167542. this.raise(start3, "Invalid number");
  167543. }
  167544. var next = this.input.charCodeAt(this.pos);
  167545. if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
  167546. var val$1 = stringToBigInt2(this.input.slice(start3, this.pos));
  167547. ++this.pos;
  167548. if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  167549. this.raise(this.pos, "Identifier directly after number");
  167550. }
  167551. return this.finishToken(types$12.num, val$1);
  167552. }
  167553. if (octal && /[89]/.test(this.input.slice(start3, this.pos))) {
  167554. octal = false;
  167555. }
  167556. if (next === 46 && !octal) {
  167557. ++this.pos;
  167558. this.readInt(10);
  167559. next = this.input.charCodeAt(this.pos);
  167560. }
  167561. if ((next === 69 || next === 101) && !octal) {
  167562. next = this.input.charCodeAt(++this.pos);
  167563. if (next === 43 || next === 45) {
  167564. ++this.pos;
  167565. }
  167566. if (this.readInt(10) === null) {
  167567. this.raise(start3, "Invalid number");
  167568. }
  167569. }
  167570. if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  167571. this.raise(this.pos, "Identifier directly after number");
  167572. }
  167573. var val = stringToNumber2(this.input.slice(start3, this.pos), octal);
  167574. return this.finishToken(types$12.num, val);
  167575. };
  167576. pp2.readCodePoint = function() {
  167577. var ch = this.input.charCodeAt(this.pos), code2;
  167578. if (ch === 123) {
  167579. if (this.options.ecmaVersion < 6) {
  167580. this.unexpected();
  167581. }
  167582. var codePos = ++this.pos;
  167583. code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
  167584. ++this.pos;
  167585. if (code2 > 1114111) {
  167586. this.invalidStringToken(codePos, "Code point out of bounds");
  167587. }
  167588. } else {
  167589. code2 = this.readHexChar(4);
  167590. }
  167591. return code2;
  167592. };
  167593. function codePointToString2(code2) {
  167594. if (code2 <= 65535) {
  167595. return String.fromCharCode(code2);
  167596. }
  167597. code2 -= 65536;
  167598. return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320);
  167599. }
  167600. pp2.readString = function(quote) {
  167601. var out = "", chunkStart = ++this.pos;
  167602. for (; ; ) {
  167603. if (this.pos >= this.input.length) {
  167604. this.raise(this.start, "Unterminated string constant");
  167605. }
  167606. var ch = this.input.charCodeAt(this.pos);
  167607. if (ch === quote) {
  167608. break;
  167609. }
  167610. if (ch === 92) {
  167611. out += this.input.slice(chunkStart, this.pos);
  167612. out += this.readEscapedChar(false);
  167613. chunkStart = this.pos;
  167614. } else if (ch === 8232 || ch === 8233) {
  167615. if (this.options.ecmaVersion < 10) {
  167616. this.raise(this.start, "Unterminated string constant");
  167617. }
  167618. ++this.pos;
  167619. if (this.options.locations) {
  167620. this.curLine++;
  167621. this.lineStart = this.pos;
  167622. }
  167623. } else {
  167624. if (isNewLine2(ch)) {
  167625. this.raise(this.start, "Unterminated string constant");
  167626. }
  167627. ++this.pos;
  167628. }
  167629. }
  167630. out += this.input.slice(chunkStart, this.pos++);
  167631. return this.finishToken(types$12.string, out);
  167632. };
  167633. var INVALID_TEMPLATE_ESCAPE_ERROR2 = {};
  167634. pp2.tryReadTemplateToken = function() {
  167635. this.inTemplateElement = true;
  167636. try {
  167637. this.readTmplToken();
  167638. } catch (err) {
  167639. if (err === INVALID_TEMPLATE_ESCAPE_ERROR2) {
  167640. this.readInvalidTemplateToken();
  167641. } else {
  167642. throw err;
  167643. }
  167644. }
  167645. this.inTemplateElement = false;
  167646. };
  167647. pp2.invalidStringToken = function(position3, message) {
  167648. if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
  167649. throw INVALID_TEMPLATE_ESCAPE_ERROR2;
  167650. } else {
  167651. this.raise(position3, message);
  167652. }
  167653. };
  167654. pp2.readTmplToken = function() {
  167655. var out = "", chunkStart = this.pos;
  167656. for (; ; ) {
  167657. if (this.pos >= this.input.length) {
  167658. this.raise(this.start, "Unterminated template");
  167659. }
  167660. var ch = this.input.charCodeAt(this.pos);
  167661. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
  167662. if (this.pos === this.start && (this.type === types$12.template || this.type === types$12.invalidTemplate)) {
  167663. if (ch === 36) {
  167664. this.pos += 2;
  167665. return this.finishToken(types$12.dollarBraceL);
  167666. } else {
  167667. ++this.pos;
  167668. return this.finishToken(types$12.backQuote);
  167669. }
  167670. }
  167671. out += this.input.slice(chunkStart, this.pos);
  167672. return this.finishToken(types$12.template, out);
  167673. }
  167674. if (ch === 92) {
  167675. out += this.input.slice(chunkStart, this.pos);
  167676. out += this.readEscapedChar(true);
  167677. chunkStart = this.pos;
  167678. } else if (isNewLine2(ch)) {
  167679. out += this.input.slice(chunkStart, this.pos);
  167680. ++this.pos;
  167681. switch (ch) {
  167682. case 13:
  167683. if (this.input.charCodeAt(this.pos) === 10) {
  167684. ++this.pos;
  167685. }
  167686. case 10:
  167687. out += "\n";
  167688. break;
  167689. default:
  167690. out += String.fromCharCode(ch);
  167691. break;
  167692. }
  167693. if (this.options.locations) {
  167694. ++this.curLine;
  167695. this.lineStart = this.pos;
  167696. }
  167697. chunkStart = this.pos;
  167698. } else {
  167699. ++this.pos;
  167700. }
  167701. }
  167702. };
  167703. pp2.readInvalidTemplateToken = function() {
  167704. for (; this.pos < this.input.length; this.pos++) {
  167705. switch (this.input[this.pos]) {
  167706. case "\\":
  167707. ++this.pos;
  167708. break;
  167709. case "$":
  167710. if (this.input[this.pos + 1] !== "{") {
  167711. break;
  167712. }
  167713. case "`":
  167714. return this.finishToken(types$12.invalidTemplate, this.input.slice(this.start, this.pos));
  167715. }
  167716. }
  167717. this.raise(this.start, "Unterminated template");
  167718. };
  167719. pp2.readEscapedChar = function(inTemplate) {
  167720. var ch = this.input.charCodeAt(++this.pos);
  167721. ++this.pos;
  167722. switch (ch) {
  167723. case 110:
  167724. return "\n";
  167725. case 114:
  167726. return "\r";
  167727. case 120:
  167728. return String.fromCharCode(this.readHexChar(2));
  167729. case 117:
  167730. return codePointToString2(this.readCodePoint());
  167731. case 116:
  167732. return " ";
  167733. case 98:
  167734. return "\b";
  167735. case 118:
  167736. return "\v";
  167737. case 102:
  167738. return "\f";
  167739. case 13:
  167740. if (this.input.charCodeAt(this.pos) === 10) {
  167741. ++this.pos;
  167742. }
  167743. case 10:
  167744. if (this.options.locations) {
  167745. this.lineStart = this.pos;
  167746. ++this.curLine;
  167747. }
  167748. return "";
  167749. case 56:
  167750. case 57:
  167751. if (this.strict) {
  167752. this.invalidStringToken(
  167753. this.pos - 1,
  167754. "Invalid escape sequence"
  167755. );
  167756. }
  167757. if (inTemplate) {
  167758. var codePos = this.pos - 1;
  167759. this.invalidStringToken(
  167760. codePos,
  167761. "Invalid escape sequence in template string"
  167762. );
  167763. return null;
  167764. }
  167765. default:
  167766. if (ch >= 48 && ch <= 55) {
  167767. var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
  167768. var octal = parseInt(octalStr, 8);
  167769. if (octal > 255) {
  167770. octalStr = octalStr.slice(0, -1);
  167771. octal = parseInt(octalStr, 8);
  167772. }
  167773. this.pos += octalStr.length - 1;
  167774. ch = this.input.charCodeAt(this.pos);
  167775. if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
  167776. this.invalidStringToken(
  167777. this.pos - 1 - octalStr.length,
  167778. inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
  167779. );
  167780. }
  167781. return String.fromCharCode(octal);
  167782. }
  167783. if (isNewLine2(ch)) {
  167784. return "";
  167785. }
  167786. return String.fromCharCode(ch);
  167787. }
  167788. };
  167789. pp2.readHexChar = function(len) {
  167790. var codePos = this.pos;
  167791. var n = this.readInt(16, len);
  167792. if (n === null) {
  167793. this.invalidStringToken(codePos, "Bad character escape sequence");
  167794. }
  167795. return n;
  167796. };
  167797. pp2.readWord1 = function() {
  167798. this.containsEsc = false;
  167799. var word = "", first = true, chunkStart = this.pos;
  167800. var astral = this.options.ecmaVersion >= 6;
  167801. while (this.pos < this.input.length) {
  167802. var ch = this.fullCharCodeAtPos();
  167803. if (isIdentifierChar2(ch, astral)) {
  167804. this.pos += ch <= 65535 ? 1 : 2;
  167805. } else if (ch === 92) {
  167806. this.containsEsc = true;
  167807. word += this.input.slice(chunkStart, this.pos);
  167808. var escStart = this.pos;
  167809. if (this.input.charCodeAt(++this.pos) !== 117) {
  167810. this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
  167811. }
  167812. ++this.pos;
  167813. var esc = this.readCodePoint();
  167814. if (!(first ? isIdentifierStart2 : isIdentifierChar2)(esc, astral)) {
  167815. this.invalidStringToken(escStart, "Invalid Unicode escape");
  167816. }
  167817. word += codePointToString2(esc);
  167818. chunkStart = this.pos;
  167819. } else {
  167820. break;
  167821. }
  167822. first = false;
  167823. }
  167824. return word + this.input.slice(chunkStart, this.pos);
  167825. };
  167826. pp2.readWord = function() {
  167827. var word = this.readWord1();
  167828. var type = types$12.name;
  167829. if (this.keywords.test(word)) {
  167830. type = keywords2[word];
  167831. }
  167832. return this.finishToken(type, word);
  167833. };
  167834. var version2 = "8.7.0";
  167835. Parser3.acorn = {
  167836. Parser: Parser3,
  167837. version: version2,
  167838. defaultOptions: defaultOptions2,
  167839. Position: Position3,
  167840. SourceLocation: SourceLocation3,
  167841. getLineInfo: getLineInfo2,
  167842. Node: Node3,
  167843. TokenType: TokenType3,
  167844. tokTypes: types$12,
  167845. keywordTypes: keywords2,
  167846. TokContext: TokContext3,
  167847. tokContexts: types2,
  167848. isIdentifierChar: isIdentifierChar2,
  167849. isIdentifierStart: isIdentifierStart2,
  167850. Token: Token3,
  167851. isNewLine: isNewLine2,
  167852. lineBreak: lineBreak2,
  167853. lineBreakG: lineBreakG2,
  167854. nonASCIIwhitespace: nonASCIIwhitespace2
  167855. };
  167856. function parse4(input, options) {
  167857. return Parser3.parse(input, options);
  167858. }
  167859. function parseExpressionAt2(input, pos, options) {
  167860. return Parser3.parseExpressionAt(input, pos, options);
  167861. }
  167862. function tokenizer2(input, options) {
  167863. return Parser3.tokenizer(input, options);
  167864. }
  167865. exports2.Node = Node3;
  167866. exports2.Parser = Parser3;
  167867. exports2.Position = Position3;
  167868. exports2.SourceLocation = SourceLocation3;
  167869. exports2.TokContext = TokContext3;
  167870. exports2.Token = Token3;
  167871. exports2.TokenType = TokenType3;
  167872. exports2.defaultOptions = defaultOptions2;
  167873. exports2.getLineInfo = getLineInfo2;
  167874. exports2.isIdentifierChar = isIdentifierChar2;
  167875. exports2.isIdentifierStart = isIdentifierStart2;
  167876. exports2.isNewLine = isNewLine2;
  167877. exports2.keywordTypes = keywords2;
  167878. exports2.lineBreak = lineBreak2;
  167879. exports2.lineBreakG = lineBreakG2;
  167880. exports2.nonASCIIwhitespace = nonASCIIwhitespace2;
  167881. exports2.parse = parse4;
  167882. exports2.parseExpressionAt = parseExpressionAt2;
  167883. exports2.tokContexts = types2;
  167884. exports2.tokTypes = types$12;
  167885. exports2.tokenizer = tokenizer2;
  167886. exports2.version = version2;
  167887. Object.defineProperty(exports2, "__esModule", { value: true });
  167888. });
  167889. }
  167890. });
  167891. // node_modules/acorn-jsx/index.js
  167892. var require_acorn_jsx = __commonJS({
  167893. "node_modules/acorn-jsx/index.js"(exports, module2) {
  167894. "use strict";
  167895. var XHTMLEntities = require_xhtml();
  167896. var hexNumber = /^[\da-fA-F]+$/;
  167897. var decimalNumber = /^\d+$/;
  167898. var acornJsxMap = /* @__PURE__ */ new WeakMap();
  167899. function getJsxTokens(acorn) {
  167900. acorn = acorn.Parser.acorn || acorn;
  167901. let acornJsx2 = acornJsxMap.get(acorn);
  167902. if (!acornJsx2) {
  167903. const tt = acorn.tokTypes;
  167904. const TokContext3 = acorn.TokContext;
  167905. const TokenType3 = acorn.TokenType;
  167906. const tc_oTag = new TokContext3("<tag", false);
  167907. const tc_cTag = new TokContext3("</tag", false);
  167908. const tc_expr = new TokContext3("<tag>...</tag>", true, true);
  167909. const tokContexts = {
  167910. tc_oTag,
  167911. tc_cTag,
  167912. tc_expr
  167913. };
  167914. const tokTypes = {
  167915. jsxName: new TokenType3("jsxName"),
  167916. jsxText: new TokenType3("jsxText", { beforeExpr: true }),
  167917. jsxTagStart: new TokenType3("jsxTagStart", { startsExpr: true }),
  167918. jsxTagEnd: new TokenType3("jsxTagEnd")
  167919. };
  167920. tokTypes.jsxTagStart.updateContext = function() {
  167921. this.context.push(tc_expr);
  167922. this.context.push(tc_oTag);
  167923. this.exprAllowed = false;
  167924. };
  167925. tokTypes.jsxTagEnd.updateContext = function(prevType) {
  167926. let out = this.context.pop();
  167927. if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) {
  167928. this.context.pop();
  167929. this.exprAllowed = this.curContext() === tc_expr;
  167930. } else {
  167931. this.exprAllowed = true;
  167932. }
  167933. };
  167934. acornJsx2 = { tokContexts, tokTypes };
  167935. acornJsxMap.set(acorn, acornJsx2);
  167936. }
  167937. return acornJsx2;
  167938. }
  167939. function getQualifiedJSXName(object) {
  167940. if (!object)
  167941. return object;
  167942. if (object.type === "JSXIdentifier")
  167943. return object.name;
  167944. if (object.type === "JSXNamespacedName")
  167945. return object.namespace.name + ":" + object.name.name;
  167946. if (object.type === "JSXMemberExpression")
  167947. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  167948. }
  167949. module2.exports = function(options) {
  167950. options = options || {};
  167951. return function(Parser3) {
  167952. return plugin2({
  167953. allowNamespaces: options.allowNamespaces !== false,
  167954. allowNamespacedObjects: !!options.allowNamespacedObjects
  167955. }, Parser3);
  167956. };
  167957. };
  167958. Object.defineProperty(module2.exports, "tokTypes", {
  167959. get: function get_tokTypes() {
  167960. return getJsxTokens(require_acorn()).tokTypes;
  167961. },
  167962. configurable: true,
  167963. enumerable: true
  167964. });
  167965. function plugin2(options, Parser3) {
  167966. const acorn = Parser3.acorn || require_acorn();
  167967. const acornJsx2 = getJsxTokens(acorn);
  167968. const tt = acorn.tokTypes;
  167969. const tok = acornJsx2.tokTypes;
  167970. const tokContexts = acorn.tokContexts;
  167971. const tc_oTag = acornJsx2.tokContexts.tc_oTag;
  167972. const tc_cTag = acornJsx2.tokContexts.tc_cTag;
  167973. const tc_expr = acornJsx2.tokContexts.tc_expr;
  167974. const isNewLine2 = acorn.isNewLine;
  167975. const isIdentifierStart2 = acorn.isIdentifierStart;
  167976. const isIdentifierChar2 = acorn.isIdentifierChar;
  167977. return class extends Parser3 {
  167978. static get acornJsx() {
  167979. return acornJsx2;
  167980. }
  167981. jsx_readToken() {
  167982. let out = "", chunkStart = this.pos;
  167983. for (; ; ) {
  167984. if (this.pos >= this.input.length)
  167985. this.raise(this.start, "Unterminated JSX contents");
  167986. let ch = this.input.charCodeAt(this.pos);
  167987. switch (ch) {
  167988. case 60:
  167989. case 123:
  167990. if (this.pos === this.start) {
  167991. if (ch === 60 && this.exprAllowed) {
  167992. ++this.pos;
  167993. return this.finishToken(tok.jsxTagStart);
  167994. }
  167995. return this.getTokenFromCode(ch);
  167996. }
  167997. out += this.input.slice(chunkStart, this.pos);
  167998. return this.finishToken(tok.jsxText, out);
  167999. case 38:
  168000. out += this.input.slice(chunkStart, this.pos);
  168001. out += this.jsx_readEntity();
  168002. chunkStart = this.pos;
  168003. break;
  168004. case 62:
  168005. case 125:
  168006. this.raise(
  168007. this.pos,
  168008. "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? "&gt;" : "&rbrace;") + '` or `{"' + this.input[this.pos] + '"}`?'
  168009. );
  168010. default:
  168011. if (isNewLine2(ch)) {
  168012. out += this.input.slice(chunkStart, this.pos);
  168013. out += this.jsx_readNewLine(true);
  168014. chunkStart = this.pos;
  168015. } else {
  168016. ++this.pos;
  168017. }
  168018. }
  168019. }
  168020. }
  168021. jsx_readNewLine(normalizeCRLF) {
  168022. let ch = this.input.charCodeAt(this.pos);
  168023. let out;
  168024. ++this.pos;
  168025. if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
  168026. ++this.pos;
  168027. out = normalizeCRLF ? "\n" : "\r\n";
  168028. } else {
  168029. out = String.fromCharCode(ch);
  168030. }
  168031. if (this.options.locations) {
  168032. ++this.curLine;
  168033. this.lineStart = this.pos;
  168034. }
  168035. return out;
  168036. }
  168037. jsx_readString(quote) {
  168038. let out = "", chunkStart = ++this.pos;
  168039. for (; ; ) {
  168040. if (this.pos >= this.input.length)
  168041. this.raise(this.start, "Unterminated string constant");
  168042. let ch = this.input.charCodeAt(this.pos);
  168043. if (ch === quote)
  168044. break;
  168045. if (ch === 38) {
  168046. out += this.input.slice(chunkStart, this.pos);
  168047. out += this.jsx_readEntity();
  168048. chunkStart = this.pos;
  168049. } else if (isNewLine2(ch)) {
  168050. out += this.input.slice(chunkStart, this.pos);
  168051. out += this.jsx_readNewLine(false);
  168052. chunkStart = this.pos;
  168053. } else {
  168054. ++this.pos;
  168055. }
  168056. }
  168057. out += this.input.slice(chunkStart, this.pos++);
  168058. return this.finishToken(tt.string, out);
  168059. }
  168060. jsx_readEntity() {
  168061. let str = "", count = 0, entity;
  168062. let ch = this.input[this.pos];
  168063. if (ch !== "&")
  168064. this.raise(this.pos, "Entity must start with an ampersand");
  168065. let startPos = ++this.pos;
  168066. while (this.pos < this.input.length && count++ < 10) {
  168067. ch = this.input[this.pos++];
  168068. if (ch === ";") {
  168069. if (str[0] === "#") {
  168070. if (str[1] === "x") {
  168071. str = str.substr(2);
  168072. if (hexNumber.test(str))
  168073. entity = String.fromCharCode(parseInt(str, 16));
  168074. } else {
  168075. str = str.substr(1);
  168076. if (decimalNumber.test(str))
  168077. entity = String.fromCharCode(parseInt(str, 10));
  168078. }
  168079. } else {
  168080. entity = XHTMLEntities[str];
  168081. }
  168082. break;
  168083. }
  168084. str += ch;
  168085. }
  168086. if (!entity) {
  168087. this.pos = startPos;
  168088. return "&";
  168089. }
  168090. return entity;
  168091. }
  168092. jsx_readWord() {
  168093. let ch, start3 = this.pos;
  168094. do {
  168095. ch = this.input.charCodeAt(++this.pos);
  168096. } while (isIdentifierChar2(ch) || ch === 45);
  168097. return this.finishToken(tok.jsxName, this.input.slice(start3, this.pos));
  168098. }
  168099. jsx_parseIdentifier() {
  168100. let node = this.startNode();
  168101. if (this.type === tok.jsxName)
  168102. node.name = this.value;
  168103. else if (this.type.keyword)
  168104. node.name = this.type.keyword;
  168105. else
  168106. this.unexpected();
  168107. this.next();
  168108. return this.finishNode(node, "JSXIdentifier");
  168109. }
  168110. jsx_parseNamespacedName() {
  168111. let startPos = this.start, startLoc = this.startLoc;
  168112. let name2 = this.jsx_parseIdentifier();
  168113. if (!options.allowNamespaces || !this.eat(tt.colon))
  168114. return name2;
  168115. var node = this.startNodeAt(startPos, startLoc);
  168116. node.namespace = name2;
  168117. node.name = this.jsx_parseIdentifier();
  168118. return this.finishNode(node, "JSXNamespacedName");
  168119. }
  168120. jsx_parseElementName() {
  168121. if (this.type === tok.jsxTagEnd)
  168122. return "";
  168123. let startPos = this.start, startLoc = this.startLoc;
  168124. let node = this.jsx_parseNamespacedName();
  168125. if (this.type === tt.dot && node.type === "JSXNamespacedName" && !options.allowNamespacedObjects) {
  168126. this.unexpected();
  168127. }
  168128. while (this.eat(tt.dot)) {
  168129. let newNode = this.startNodeAt(startPos, startLoc);
  168130. newNode.object = node;
  168131. newNode.property = this.jsx_parseIdentifier();
  168132. node = this.finishNode(newNode, "JSXMemberExpression");
  168133. }
  168134. return node;
  168135. }
  168136. jsx_parseAttributeValue() {
  168137. switch (this.type) {
  168138. case tt.braceL:
  168139. let node = this.jsx_parseExpressionContainer();
  168140. if (node.expression.type === "JSXEmptyExpression")
  168141. this.raise(node.start, "JSX attributes must only be assigned a non-empty expression");
  168142. return node;
  168143. case tok.jsxTagStart:
  168144. case tt.string:
  168145. return this.parseExprAtom();
  168146. default:
  168147. this.raise(this.start, "JSX value should be either an expression or a quoted JSX text");
  168148. }
  168149. }
  168150. jsx_parseEmptyExpression() {
  168151. let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
  168152. return this.finishNodeAt(node, "JSXEmptyExpression", this.start, this.startLoc);
  168153. }
  168154. jsx_parseExpressionContainer() {
  168155. let node = this.startNode();
  168156. this.next();
  168157. node.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression();
  168158. this.expect(tt.braceR);
  168159. return this.finishNode(node, "JSXExpressionContainer");
  168160. }
  168161. jsx_parseAttribute() {
  168162. let node = this.startNode();
  168163. if (this.eat(tt.braceL)) {
  168164. this.expect(tt.ellipsis);
  168165. node.argument = this.parseMaybeAssign();
  168166. this.expect(tt.braceR);
  168167. return this.finishNode(node, "JSXSpreadAttribute");
  168168. }
  168169. node.name = this.jsx_parseNamespacedName();
  168170. node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null;
  168171. return this.finishNode(node, "JSXAttribute");
  168172. }
  168173. jsx_parseOpeningElementAt(startPos, startLoc) {
  168174. let node = this.startNodeAt(startPos, startLoc);
  168175. node.attributes = [];
  168176. let nodeName = this.jsx_parseElementName();
  168177. if (nodeName)
  168178. node.name = nodeName;
  168179. while (this.type !== tt.slash && this.type !== tok.jsxTagEnd)
  168180. node.attributes.push(this.jsx_parseAttribute());
  168181. node.selfClosing = this.eat(tt.slash);
  168182. this.expect(tok.jsxTagEnd);
  168183. return this.finishNode(node, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment");
  168184. }
  168185. jsx_parseClosingElementAt(startPos, startLoc) {
  168186. let node = this.startNodeAt(startPos, startLoc);
  168187. let nodeName = this.jsx_parseElementName();
  168188. if (nodeName)
  168189. node.name = nodeName;
  168190. this.expect(tok.jsxTagEnd);
  168191. return this.finishNode(node, nodeName ? "JSXClosingElement" : "JSXClosingFragment");
  168192. }
  168193. jsx_parseElementAt(startPos, startLoc) {
  168194. let node = this.startNodeAt(startPos, startLoc);
  168195. let children = [];
  168196. let openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc);
  168197. let closingElement = null;
  168198. if (!openingElement.selfClosing) {
  168199. contents:
  168200. for (; ; ) {
  168201. switch (this.type) {
  168202. case tok.jsxTagStart:
  168203. startPos = this.start;
  168204. startLoc = this.startLoc;
  168205. this.next();
  168206. if (this.eat(tt.slash)) {
  168207. closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
  168208. break contents;
  168209. }
  168210. children.push(this.jsx_parseElementAt(startPos, startLoc));
  168211. break;
  168212. case tok.jsxText:
  168213. children.push(this.parseExprAtom());
  168214. break;
  168215. case tt.braceL:
  168216. children.push(this.jsx_parseExpressionContainer());
  168217. break;
  168218. default:
  168219. this.unexpected();
  168220. }
  168221. }
  168222. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  168223. this.raise(
  168224. closingElement.start,
  168225. "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"
  168226. );
  168227. }
  168228. }
  168229. let fragmentOrElement = openingElement.name ? "Element" : "Fragment";
  168230. node["opening" + fragmentOrElement] = openingElement;
  168231. node["closing" + fragmentOrElement] = closingElement;
  168232. node.children = children;
  168233. if (this.type === tt.relational && this.value === "<") {
  168234. this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
  168235. }
  168236. return this.finishNode(node, "JSX" + fragmentOrElement);
  168237. }
  168238. jsx_parseText() {
  168239. let node = this.parseLiteral(this.value);
  168240. node.type = "JSXText";
  168241. return node;
  168242. }
  168243. jsx_parseElement() {
  168244. let startPos = this.start, startLoc = this.startLoc;
  168245. this.next();
  168246. return this.jsx_parseElementAt(startPos, startLoc);
  168247. }
  168248. parseExprAtom(refShortHandDefaultPos) {
  168249. if (this.type === tok.jsxText)
  168250. return this.jsx_parseText();
  168251. else if (this.type === tok.jsxTagStart)
  168252. return this.jsx_parseElement();
  168253. else
  168254. return super.parseExprAtom(refShortHandDefaultPos);
  168255. }
  168256. readToken(code2) {
  168257. let context = this.curContext();
  168258. if (context === tc_expr)
  168259. return this.jsx_readToken();
  168260. if (context === tc_oTag || context === tc_cTag) {
  168261. if (isIdentifierStart2(code2))
  168262. return this.jsx_readWord();
  168263. if (code2 == 62) {
  168264. ++this.pos;
  168265. return this.finishToken(tok.jsxTagEnd);
  168266. }
  168267. if ((code2 === 34 || code2 === 39) && context == tc_oTag)
  168268. return this.jsx_readString(code2);
  168269. }
  168270. if (code2 === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) {
  168271. ++this.pos;
  168272. return this.finishToken(tok.jsxTagStart);
  168273. }
  168274. return super.readToken(code2);
  168275. }
  168276. updateContext(prevType) {
  168277. if (this.type == tt.braceL) {
  168278. var curContext = this.curContext();
  168279. if (curContext == tc_oTag)
  168280. this.context.push(tokContexts.b_expr);
  168281. else if (curContext == tc_expr)
  168282. this.context.push(tokContexts.b_tmpl);
  168283. else
  168284. super.updateContext(prevType);
  168285. this.exprAllowed = true;
  168286. } else if (this.type === tt.slash && prevType === tok.jsxTagStart) {
  168287. this.context.length -= 2;
  168288. this.context.push(tc_cTag);
  168289. this.exprAllowed = false;
  168290. } else {
  168291. return super.updateContext(prevType);
  168292. }
  168293. }
  168294. };
  168295. }
  168296. }
  168297. });
  168298. // node_modules/mdurl/encode.js
  168299. var require_encode = __commonJS({
  168300. "node_modules/mdurl/encode.js"(exports, module2) {
  168301. "use strict";
  168302. var encodeCache = {};
  168303. function getEncodeCache(exclude) {
  168304. var i, ch, cache = encodeCache[exclude];
  168305. if (cache) {
  168306. return cache;
  168307. }
  168308. cache = encodeCache[exclude] = [];
  168309. for (i = 0; i < 128; i++) {
  168310. ch = String.fromCharCode(i);
  168311. if (/^[0-9a-z]$/i.test(ch)) {
  168312. cache.push(ch);
  168313. } else {
  168314. cache.push("%" + ("0" + i.toString(16).toUpperCase()).slice(-2));
  168315. }
  168316. }
  168317. for (i = 0; i < exclude.length; i++) {
  168318. cache[exclude.charCodeAt(i)] = exclude[i];
  168319. }
  168320. return cache;
  168321. }
  168322. function encode2(string3, exclude, keepEscaped) {
  168323. var i, l, code2, nextCode, cache, result = "";
  168324. if (typeof exclude !== "string") {
  168325. keepEscaped = exclude;
  168326. exclude = encode2.defaultChars;
  168327. }
  168328. if (typeof keepEscaped === "undefined") {
  168329. keepEscaped = true;
  168330. }
  168331. cache = getEncodeCache(exclude);
  168332. for (i = 0, l = string3.length; i < l; i++) {
  168333. code2 = string3.charCodeAt(i);
  168334. if (keepEscaped && code2 === 37 && i + 2 < l) {
  168335. if (/^[0-9a-f]{2}$/i.test(string3.slice(i + 1, i + 3))) {
  168336. result += string3.slice(i, i + 3);
  168337. i += 2;
  168338. continue;
  168339. }
  168340. }
  168341. if (code2 < 128) {
  168342. result += cache[code2];
  168343. continue;
  168344. }
  168345. if (code2 >= 55296 && code2 <= 57343) {
  168346. if (code2 >= 55296 && code2 <= 56319 && i + 1 < l) {
  168347. nextCode = string3.charCodeAt(i + 1);
  168348. if (nextCode >= 56320 && nextCode <= 57343) {
  168349. result += encodeURIComponent(string3[i] + string3[i + 1]);
  168350. i++;
  168351. continue;
  168352. }
  168353. }
  168354. result += "%EF%BF%BD";
  168355. continue;
  168356. }
  168357. result += encodeURIComponent(string3[i]);
  168358. }
  168359. return result;
  168360. }
  168361. encode2.defaultChars = ";/?:@&=+$,-_.!~*'()#";
  168362. encode2.componentChars = "-_.!~*'()";
  168363. module2.exports = encode2;
  168364. }
  168365. });
  168366. // node_modules/inline-style-parser/index.js
  168367. var require_inline_style_parser = __commonJS({
  168368. "node_modules/inline-style-parser/index.js"(exports, module2) {
  168369. var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
  168370. var NEWLINE_REGEX = /\n/g;
  168371. var WHITESPACE_REGEX = /^\s*/;
  168372. var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
  168373. var COLON_REGEX = /^:\s*/;
  168374. var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
  168375. var SEMICOLON_REGEX = /^[;\s]*/;
  168376. var TRIM_REGEX = /^\s+|\s+$/g;
  168377. var NEWLINE = "\n";
  168378. var FORWARD_SLASH = "/";
  168379. var ASTERISK = "*";
  168380. var EMPTY_STRING = "";
  168381. var TYPE_COMMENT = "comment";
  168382. var TYPE_DECLARATION = "declaration";
  168383. module2.exports = function(style2, options) {
  168384. if (typeof style2 !== "string") {
  168385. throw new TypeError("First argument must be a string");
  168386. }
  168387. if (!style2)
  168388. return [];
  168389. options = options || {};
  168390. var lineno = 1;
  168391. var column = 1;
  168392. function updatePosition(str) {
  168393. var lines = str.match(NEWLINE_REGEX);
  168394. if (lines)
  168395. lineno += lines.length;
  168396. var i = str.lastIndexOf(NEWLINE);
  168397. column = ~i ? str.length - i : column + str.length;
  168398. }
  168399. function position3() {
  168400. var start3 = { line: lineno, column };
  168401. return function(node) {
  168402. node.position = new Position3(start3);
  168403. whitespace2();
  168404. return node;
  168405. };
  168406. }
  168407. function Position3(start3) {
  168408. this.start = start3;
  168409. this.end = { line: lineno, column };
  168410. this.source = options.source;
  168411. }
  168412. Position3.prototype.content = style2;
  168413. var errorsList = [];
  168414. function error(msg) {
  168415. var err = new Error(
  168416. options.source + ":" + lineno + ":" + column + ": " + msg
  168417. );
  168418. err.reason = msg;
  168419. err.filename = options.source;
  168420. err.line = lineno;
  168421. err.column = column;
  168422. err.source = style2;
  168423. if (options.silent) {
  168424. errorsList.push(err);
  168425. } else {
  168426. throw err;
  168427. }
  168428. }
  168429. function match(re) {
  168430. var m = re.exec(style2);
  168431. if (!m)
  168432. return;
  168433. var str = m[0];
  168434. updatePosition(str);
  168435. style2 = style2.slice(str.length);
  168436. return m;
  168437. }
  168438. function whitespace2() {
  168439. match(WHITESPACE_REGEX);
  168440. }
  168441. function comments(rules) {
  168442. var c;
  168443. rules = rules || [];
  168444. while (c = comment2()) {
  168445. if (c !== false) {
  168446. rules.push(c);
  168447. }
  168448. }
  168449. return rules;
  168450. }
  168451. function comment2() {
  168452. var pos = position3();
  168453. if (FORWARD_SLASH != style2.charAt(0) || ASTERISK != style2.charAt(1))
  168454. return;
  168455. var i = 2;
  168456. while (EMPTY_STRING != style2.charAt(i) && (ASTERISK != style2.charAt(i) || FORWARD_SLASH != style2.charAt(i + 1))) {
  168457. ++i;
  168458. }
  168459. i += 2;
  168460. if (EMPTY_STRING === style2.charAt(i - 1)) {
  168461. return error("End of comment missing");
  168462. }
  168463. var str = style2.slice(2, i - 2);
  168464. column += 2;
  168465. updatePosition(str);
  168466. style2 = style2.slice(i);
  168467. column += 2;
  168468. return pos({
  168469. type: TYPE_COMMENT,
  168470. comment: str
  168471. });
  168472. }
  168473. function declaration() {
  168474. var pos = position3();
  168475. var prop = match(PROPERTY_REGEX);
  168476. if (!prop)
  168477. return;
  168478. comment2();
  168479. if (!match(COLON_REGEX))
  168480. return error("property missing ':'");
  168481. var val = match(VALUE_REGEX);
  168482. var ret = pos({
  168483. type: TYPE_DECLARATION,
  168484. property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
  168485. value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
  168486. });
  168487. match(SEMICOLON_REGEX);
  168488. return ret;
  168489. }
  168490. function declarations() {
  168491. var decls = [];
  168492. comments(decls);
  168493. var decl;
  168494. while (decl = declaration()) {
  168495. if (decl !== false) {
  168496. decls.push(decl);
  168497. comments(decls);
  168498. }
  168499. }
  168500. return decls;
  168501. }
  168502. whitespace2();
  168503. return declarations();
  168504. };
  168505. function trim(str) {
  168506. return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
  168507. }
  168508. }
  168509. });
  168510. // node_modules/style-to-object/index.js
  168511. var require_style_to_object = __commonJS({
  168512. "node_modules/style-to-object/index.js"(exports, module2) {
  168513. var parse4 = require_inline_style_parser();
  168514. function StyleToObject(style2, iterator) {
  168515. var output = null;
  168516. if (!style2 || typeof style2 !== "string") {
  168517. return output;
  168518. }
  168519. var declaration;
  168520. var declarations = parse4(style2);
  168521. var hasIterator = typeof iterator === "function";
  168522. var property;
  168523. var value;
  168524. for (var i = 0, len = declarations.length; i < len; i++) {
  168525. declaration = declarations[i];
  168526. property = declaration.property;
  168527. value = declaration.value;
  168528. if (hasIterator) {
  168529. iterator(property, value, declaration);
  168530. } else if (value) {
  168531. output || (output = {});
  168532. output[property] = value;
  168533. }
  168534. }
  168535. return output;
  168536. }
  168537. module2.exports = StyleToObject;
  168538. }
  168539. });
  168540. // node_modules/markdown-extensions/markdown-extensions.json
  168541. var require_markdown_extensions = __commonJS({
  168542. "node_modules/markdown-extensions/markdown-extensions.json"(exports, module2) {
  168543. module2.exports = [
  168544. "md",
  168545. "markdown",
  168546. "mdown",
  168547. "mkdn",
  168548. "mkd",
  168549. "mdwn",
  168550. "mkdown",
  168551. "ron"
  168552. ];
  168553. }
  168554. });
  168555. // node_modules/markdown-extensions/index.js
  168556. var require_markdown_extensions2 = __commonJS({
  168557. "node_modules/markdown-extensions/index.js"(exports, module2) {
  168558. "use strict";
  168559. module2.exports = require_markdown_extensions();
  168560. }
  168561. });
  168562. // node_modules/lodash/_listCacheClear.js
  168563. var require_listCacheClear = __commonJS({
  168564. "node_modules/lodash/_listCacheClear.js"(exports, module2) {
  168565. function listCacheClear() {
  168566. this.__data__ = [];
  168567. this.size = 0;
  168568. }
  168569. module2.exports = listCacheClear;
  168570. }
  168571. });
  168572. // node_modules/lodash/eq.js
  168573. var require_eq = __commonJS({
  168574. "node_modules/lodash/eq.js"(exports, module2) {
  168575. function eq(value, other) {
  168576. return value === other || value !== value && other !== other;
  168577. }
  168578. module2.exports = eq;
  168579. }
  168580. });
  168581. // node_modules/lodash/_assocIndexOf.js
  168582. var require_assocIndexOf = __commonJS({
  168583. "node_modules/lodash/_assocIndexOf.js"(exports, module2) {
  168584. var eq = require_eq();
  168585. function assocIndexOf(array, key) {
  168586. var length = array.length;
  168587. while (length--) {
  168588. if (eq(array[length][0], key)) {
  168589. return length;
  168590. }
  168591. }
  168592. return -1;
  168593. }
  168594. module2.exports = assocIndexOf;
  168595. }
  168596. });
  168597. // node_modules/lodash/_listCacheDelete.js
  168598. var require_listCacheDelete = __commonJS({
  168599. "node_modules/lodash/_listCacheDelete.js"(exports, module2) {
  168600. var assocIndexOf = require_assocIndexOf();
  168601. var arrayProto = Array.prototype;
  168602. var splice2 = arrayProto.splice;
  168603. function listCacheDelete(key) {
  168604. var data2 = this.__data__, index2 = assocIndexOf(data2, key);
  168605. if (index2 < 0) {
  168606. return false;
  168607. }
  168608. var lastIndex = data2.length - 1;
  168609. if (index2 == lastIndex) {
  168610. data2.pop();
  168611. } else {
  168612. splice2.call(data2, index2, 1);
  168613. }
  168614. --this.size;
  168615. return true;
  168616. }
  168617. module2.exports = listCacheDelete;
  168618. }
  168619. });
  168620. // node_modules/lodash/_listCacheGet.js
  168621. var require_listCacheGet = __commonJS({
  168622. "node_modules/lodash/_listCacheGet.js"(exports, module2) {
  168623. var assocIndexOf = require_assocIndexOf();
  168624. function listCacheGet(key) {
  168625. var data2 = this.__data__, index2 = assocIndexOf(data2, key);
  168626. return index2 < 0 ? void 0 : data2[index2][1];
  168627. }
  168628. module2.exports = listCacheGet;
  168629. }
  168630. });
  168631. // node_modules/lodash/_listCacheHas.js
  168632. var require_listCacheHas = __commonJS({
  168633. "node_modules/lodash/_listCacheHas.js"(exports, module2) {
  168634. var assocIndexOf = require_assocIndexOf();
  168635. function listCacheHas(key) {
  168636. return assocIndexOf(this.__data__, key) > -1;
  168637. }
  168638. module2.exports = listCacheHas;
  168639. }
  168640. });
  168641. // node_modules/lodash/_listCacheSet.js
  168642. var require_listCacheSet = __commonJS({
  168643. "node_modules/lodash/_listCacheSet.js"(exports, module2) {
  168644. var assocIndexOf = require_assocIndexOf();
  168645. function listCacheSet(key, value) {
  168646. var data2 = this.__data__, index2 = assocIndexOf(data2, key);
  168647. if (index2 < 0) {
  168648. ++this.size;
  168649. data2.push([key, value]);
  168650. } else {
  168651. data2[index2][1] = value;
  168652. }
  168653. return this;
  168654. }
  168655. module2.exports = listCacheSet;
  168656. }
  168657. });
  168658. // node_modules/lodash/_ListCache.js
  168659. var require_ListCache = __commonJS({
  168660. "node_modules/lodash/_ListCache.js"(exports, module2) {
  168661. var listCacheClear = require_listCacheClear();
  168662. var listCacheDelete = require_listCacheDelete();
  168663. var listCacheGet = require_listCacheGet();
  168664. var listCacheHas = require_listCacheHas();
  168665. var listCacheSet = require_listCacheSet();
  168666. function ListCache(entries) {
  168667. var index2 = -1, length = entries == null ? 0 : entries.length;
  168668. this.clear();
  168669. while (++index2 < length) {
  168670. var entry = entries[index2];
  168671. this.set(entry[0], entry[1]);
  168672. }
  168673. }
  168674. ListCache.prototype.clear = listCacheClear;
  168675. ListCache.prototype["delete"] = listCacheDelete;
  168676. ListCache.prototype.get = listCacheGet;
  168677. ListCache.prototype.has = listCacheHas;
  168678. ListCache.prototype.set = listCacheSet;
  168679. module2.exports = ListCache;
  168680. }
  168681. });
  168682. // node_modules/lodash/_stackClear.js
  168683. var require_stackClear = __commonJS({
  168684. "node_modules/lodash/_stackClear.js"(exports, module2) {
  168685. var ListCache = require_ListCache();
  168686. function stackClear() {
  168687. this.__data__ = new ListCache();
  168688. this.size = 0;
  168689. }
  168690. module2.exports = stackClear;
  168691. }
  168692. });
  168693. // node_modules/lodash/_stackDelete.js
  168694. var require_stackDelete = __commonJS({
  168695. "node_modules/lodash/_stackDelete.js"(exports, module2) {
  168696. function stackDelete(key) {
  168697. var data2 = this.__data__, result = data2["delete"](key);
  168698. this.size = data2.size;
  168699. return result;
  168700. }
  168701. module2.exports = stackDelete;
  168702. }
  168703. });
  168704. // node_modules/lodash/_stackGet.js
  168705. var require_stackGet = __commonJS({
  168706. "node_modules/lodash/_stackGet.js"(exports, module2) {
  168707. function stackGet(key) {
  168708. return this.__data__.get(key);
  168709. }
  168710. module2.exports = stackGet;
  168711. }
  168712. });
  168713. // node_modules/lodash/_stackHas.js
  168714. var require_stackHas = __commonJS({
  168715. "node_modules/lodash/_stackHas.js"(exports, module2) {
  168716. function stackHas(key) {
  168717. return this.__data__.has(key);
  168718. }
  168719. module2.exports = stackHas;
  168720. }
  168721. });
  168722. // node_modules/lodash/_freeGlobal.js
  168723. var require_freeGlobal = __commonJS({
  168724. "node_modules/lodash/_freeGlobal.js"(exports, module2) {
  168725. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  168726. module2.exports = freeGlobal;
  168727. }
  168728. });
  168729. // node_modules/lodash/_root.js
  168730. var require_root = __commonJS({
  168731. "node_modules/lodash/_root.js"(exports, module2) {
  168732. var freeGlobal = require_freeGlobal();
  168733. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  168734. var root3 = freeGlobal || freeSelf || Function("return this")();
  168735. module2.exports = root3;
  168736. }
  168737. });
  168738. // node_modules/lodash/_Symbol.js
  168739. var require_Symbol = __commonJS({
  168740. "node_modules/lodash/_Symbol.js"(exports, module2) {
  168741. var root3 = require_root();
  168742. var Symbol2 = root3.Symbol;
  168743. module2.exports = Symbol2;
  168744. }
  168745. });
  168746. // node_modules/lodash/_getRawTag.js
  168747. var require_getRawTag = __commonJS({
  168748. "node_modules/lodash/_getRawTag.js"(exports, module2) {
  168749. var Symbol2 = require_Symbol();
  168750. var objectProto = Object.prototype;
  168751. var hasOwnProperty3 = objectProto.hasOwnProperty;
  168752. var nativeObjectToString = objectProto.toString;
  168753. var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
  168754. function getRawTag(value) {
  168755. var isOwn = hasOwnProperty3.call(value, symToStringTag), tag = value[symToStringTag];
  168756. try {
  168757. value[symToStringTag] = void 0;
  168758. var unmasked = true;
  168759. } catch (e) {
  168760. }
  168761. var result = nativeObjectToString.call(value);
  168762. if (unmasked) {
  168763. if (isOwn) {
  168764. value[symToStringTag] = tag;
  168765. } else {
  168766. delete value[symToStringTag];
  168767. }
  168768. }
  168769. return result;
  168770. }
  168771. module2.exports = getRawTag;
  168772. }
  168773. });
  168774. // node_modules/lodash/_objectToString.js
  168775. var require_objectToString = __commonJS({
  168776. "node_modules/lodash/_objectToString.js"(exports, module2) {
  168777. var objectProto = Object.prototype;
  168778. var nativeObjectToString = objectProto.toString;
  168779. function objectToString(value) {
  168780. return nativeObjectToString.call(value);
  168781. }
  168782. module2.exports = objectToString;
  168783. }
  168784. });
  168785. // node_modules/lodash/_baseGetTag.js
  168786. var require_baseGetTag = __commonJS({
  168787. "node_modules/lodash/_baseGetTag.js"(exports, module2) {
  168788. var Symbol2 = require_Symbol();
  168789. var getRawTag = require_getRawTag();
  168790. var objectToString = require_objectToString();
  168791. var nullTag = "[object Null]";
  168792. var undefinedTag = "[object Undefined]";
  168793. var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
  168794. function baseGetTag(value) {
  168795. if (value == null) {
  168796. return value === void 0 ? undefinedTag : nullTag;
  168797. }
  168798. return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  168799. }
  168800. module2.exports = baseGetTag;
  168801. }
  168802. });
  168803. // node_modules/lodash/isObject.js
  168804. var require_isObject = __commonJS({
  168805. "node_modules/lodash/isObject.js"(exports, module2) {
  168806. function isObject(value) {
  168807. var type = typeof value;
  168808. return value != null && (type == "object" || type == "function");
  168809. }
  168810. module2.exports = isObject;
  168811. }
  168812. });
  168813. // node_modules/lodash/isFunction.js
  168814. var require_isFunction = __commonJS({
  168815. "node_modules/lodash/isFunction.js"(exports, module2) {
  168816. var baseGetTag = require_baseGetTag();
  168817. var isObject = require_isObject();
  168818. var asyncTag = "[object AsyncFunction]";
  168819. var funcTag = "[object Function]";
  168820. var genTag = "[object GeneratorFunction]";
  168821. var proxyTag = "[object Proxy]";
  168822. function isFunction(value) {
  168823. if (!isObject(value)) {
  168824. return false;
  168825. }
  168826. var tag = baseGetTag(value);
  168827. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  168828. }
  168829. module2.exports = isFunction;
  168830. }
  168831. });
  168832. // node_modules/lodash/_coreJsData.js
  168833. var require_coreJsData = __commonJS({
  168834. "node_modules/lodash/_coreJsData.js"(exports, module2) {
  168835. var root3 = require_root();
  168836. var coreJsData = root3["__core-js_shared__"];
  168837. module2.exports = coreJsData;
  168838. }
  168839. });
  168840. // node_modules/lodash/_isMasked.js
  168841. var require_isMasked = __commonJS({
  168842. "node_modules/lodash/_isMasked.js"(exports, module2) {
  168843. var coreJsData = require_coreJsData();
  168844. var maskSrcKey = function() {
  168845. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  168846. return uid ? "Symbol(src)_1." + uid : "";
  168847. }();
  168848. function isMasked(func) {
  168849. return !!maskSrcKey && maskSrcKey in func;
  168850. }
  168851. module2.exports = isMasked;
  168852. }
  168853. });
  168854. // node_modules/lodash/_toSource.js
  168855. var require_toSource = __commonJS({
  168856. "node_modules/lodash/_toSource.js"(exports, module2) {
  168857. var funcProto = Function.prototype;
  168858. var funcToString = funcProto.toString;
  168859. function toSource(func) {
  168860. if (func != null) {
  168861. try {
  168862. return funcToString.call(func);
  168863. } catch (e) {
  168864. }
  168865. try {
  168866. return func + "";
  168867. } catch (e) {
  168868. }
  168869. }
  168870. return "";
  168871. }
  168872. module2.exports = toSource;
  168873. }
  168874. });
  168875. // node_modules/lodash/_baseIsNative.js
  168876. var require_baseIsNative = __commonJS({
  168877. "node_modules/lodash/_baseIsNative.js"(exports, module2) {
  168878. var isFunction = require_isFunction();
  168879. var isMasked = require_isMasked();
  168880. var isObject = require_isObject();
  168881. var toSource = require_toSource();
  168882. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  168883. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  168884. var funcProto = Function.prototype;
  168885. var objectProto = Object.prototype;
  168886. var funcToString = funcProto.toString;
  168887. var hasOwnProperty3 = objectProto.hasOwnProperty;
  168888. var reIsNative = RegExp(
  168889. "^" + funcToString.call(hasOwnProperty3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  168890. );
  168891. function baseIsNative(value) {
  168892. if (!isObject(value) || isMasked(value)) {
  168893. return false;
  168894. }
  168895. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  168896. return pattern.test(toSource(value));
  168897. }
  168898. module2.exports = baseIsNative;
  168899. }
  168900. });
  168901. // node_modules/lodash/_getValue.js
  168902. var require_getValue = __commonJS({
  168903. "node_modules/lodash/_getValue.js"(exports, module2) {
  168904. function getValue(object, key) {
  168905. return object == null ? void 0 : object[key];
  168906. }
  168907. module2.exports = getValue;
  168908. }
  168909. });
  168910. // node_modules/lodash/_getNative.js
  168911. var require_getNative = __commonJS({
  168912. "node_modules/lodash/_getNative.js"(exports, module2) {
  168913. var baseIsNative = require_baseIsNative();
  168914. var getValue = require_getValue();
  168915. function getNative(object, key) {
  168916. var value = getValue(object, key);
  168917. return baseIsNative(value) ? value : void 0;
  168918. }
  168919. module2.exports = getNative;
  168920. }
  168921. });
  168922. // node_modules/lodash/_Map.js
  168923. var require_Map = __commonJS({
  168924. "node_modules/lodash/_Map.js"(exports, module2) {
  168925. var getNative = require_getNative();
  168926. var root3 = require_root();
  168927. var Map2 = getNative(root3, "Map");
  168928. module2.exports = Map2;
  168929. }
  168930. });
  168931. // node_modules/lodash/_nativeCreate.js
  168932. var require_nativeCreate = __commonJS({
  168933. "node_modules/lodash/_nativeCreate.js"(exports, module2) {
  168934. var getNative = require_getNative();
  168935. var nativeCreate = getNative(Object, "create");
  168936. module2.exports = nativeCreate;
  168937. }
  168938. });
  168939. // node_modules/lodash/_hashClear.js
  168940. var require_hashClear = __commonJS({
  168941. "node_modules/lodash/_hashClear.js"(exports, module2) {
  168942. var nativeCreate = require_nativeCreate();
  168943. function hashClear() {
  168944. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  168945. this.size = 0;
  168946. }
  168947. module2.exports = hashClear;
  168948. }
  168949. });
  168950. // node_modules/lodash/_hashDelete.js
  168951. var require_hashDelete = __commonJS({
  168952. "node_modules/lodash/_hashDelete.js"(exports, module2) {
  168953. function hashDelete(key) {
  168954. var result = this.has(key) && delete this.__data__[key];
  168955. this.size -= result ? 1 : 0;
  168956. return result;
  168957. }
  168958. module2.exports = hashDelete;
  168959. }
  168960. });
  168961. // node_modules/lodash/_hashGet.js
  168962. var require_hashGet = __commonJS({
  168963. "node_modules/lodash/_hashGet.js"(exports, module2) {
  168964. var nativeCreate = require_nativeCreate();
  168965. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  168966. var objectProto = Object.prototype;
  168967. var hasOwnProperty3 = objectProto.hasOwnProperty;
  168968. function hashGet(key) {
  168969. var data2 = this.__data__;
  168970. if (nativeCreate) {
  168971. var result = data2[key];
  168972. return result === HASH_UNDEFINED ? void 0 : result;
  168973. }
  168974. return hasOwnProperty3.call(data2, key) ? data2[key] : void 0;
  168975. }
  168976. module2.exports = hashGet;
  168977. }
  168978. });
  168979. // node_modules/lodash/_hashHas.js
  168980. var require_hashHas = __commonJS({
  168981. "node_modules/lodash/_hashHas.js"(exports, module2) {
  168982. var nativeCreate = require_nativeCreate();
  168983. var objectProto = Object.prototype;
  168984. var hasOwnProperty3 = objectProto.hasOwnProperty;
  168985. function hashHas(key) {
  168986. var data2 = this.__data__;
  168987. return nativeCreate ? data2[key] !== void 0 : hasOwnProperty3.call(data2, key);
  168988. }
  168989. module2.exports = hashHas;
  168990. }
  168991. });
  168992. // node_modules/lodash/_hashSet.js
  168993. var require_hashSet = __commonJS({
  168994. "node_modules/lodash/_hashSet.js"(exports, module2) {
  168995. var nativeCreate = require_nativeCreate();
  168996. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  168997. function hashSet(key, value) {
  168998. var data2 = this.__data__;
  168999. this.size += this.has(key) ? 0 : 1;
  169000. data2[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
  169001. return this;
  169002. }
  169003. module2.exports = hashSet;
  169004. }
  169005. });
  169006. // node_modules/lodash/_Hash.js
  169007. var require_Hash = __commonJS({
  169008. "node_modules/lodash/_Hash.js"(exports, module2) {
  169009. var hashClear = require_hashClear();
  169010. var hashDelete = require_hashDelete();
  169011. var hashGet = require_hashGet();
  169012. var hashHas = require_hashHas();
  169013. var hashSet = require_hashSet();
  169014. function Hash(entries) {
  169015. var index2 = -1, length = entries == null ? 0 : entries.length;
  169016. this.clear();
  169017. while (++index2 < length) {
  169018. var entry = entries[index2];
  169019. this.set(entry[0], entry[1]);
  169020. }
  169021. }
  169022. Hash.prototype.clear = hashClear;
  169023. Hash.prototype["delete"] = hashDelete;
  169024. Hash.prototype.get = hashGet;
  169025. Hash.prototype.has = hashHas;
  169026. Hash.prototype.set = hashSet;
  169027. module2.exports = Hash;
  169028. }
  169029. });
  169030. // node_modules/lodash/_mapCacheClear.js
  169031. var require_mapCacheClear = __commonJS({
  169032. "node_modules/lodash/_mapCacheClear.js"(exports, module2) {
  169033. var Hash = require_Hash();
  169034. var ListCache = require_ListCache();
  169035. var Map2 = require_Map();
  169036. function mapCacheClear() {
  169037. this.size = 0;
  169038. this.__data__ = {
  169039. "hash": new Hash(),
  169040. "map": new (Map2 || ListCache)(),
  169041. "string": new Hash()
  169042. };
  169043. }
  169044. module2.exports = mapCacheClear;
  169045. }
  169046. });
  169047. // node_modules/lodash/_isKeyable.js
  169048. var require_isKeyable = __commonJS({
  169049. "node_modules/lodash/_isKeyable.js"(exports, module2) {
  169050. function isKeyable(value) {
  169051. var type = typeof value;
  169052. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  169053. }
  169054. module2.exports = isKeyable;
  169055. }
  169056. });
  169057. // node_modules/lodash/_getMapData.js
  169058. var require_getMapData = __commonJS({
  169059. "node_modules/lodash/_getMapData.js"(exports, module2) {
  169060. var isKeyable = require_isKeyable();
  169061. function getMapData(map, key) {
  169062. var data2 = map.__data__;
  169063. return isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
  169064. }
  169065. module2.exports = getMapData;
  169066. }
  169067. });
  169068. // node_modules/lodash/_mapCacheDelete.js
  169069. var require_mapCacheDelete = __commonJS({
  169070. "node_modules/lodash/_mapCacheDelete.js"(exports, module2) {
  169071. var getMapData = require_getMapData();
  169072. function mapCacheDelete(key) {
  169073. var result = getMapData(this, key)["delete"](key);
  169074. this.size -= result ? 1 : 0;
  169075. return result;
  169076. }
  169077. module2.exports = mapCacheDelete;
  169078. }
  169079. });
  169080. // node_modules/lodash/_mapCacheGet.js
  169081. var require_mapCacheGet = __commonJS({
  169082. "node_modules/lodash/_mapCacheGet.js"(exports, module2) {
  169083. var getMapData = require_getMapData();
  169084. function mapCacheGet(key) {
  169085. return getMapData(this, key).get(key);
  169086. }
  169087. module2.exports = mapCacheGet;
  169088. }
  169089. });
  169090. // node_modules/lodash/_mapCacheHas.js
  169091. var require_mapCacheHas = __commonJS({
  169092. "node_modules/lodash/_mapCacheHas.js"(exports, module2) {
  169093. var getMapData = require_getMapData();
  169094. function mapCacheHas(key) {
  169095. return getMapData(this, key).has(key);
  169096. }
  169097. module2.exports = mapCacheHas;
  169098. }
  169099. });
  169100. // node_modules/lodash/_mapCacheSet.js
  169101. var require_mapCacheSet = __commonJS({
  169102. "node_modules/lodash/_mapCacheSet.js"(exports, module2) {
  169103. var getMapData = require_getMapData();
  169104. function mapCacheSet(key, value) {
  169105. var data2 = getMapData(this, key), size = data2.size;
  169106. data2.set(key, value);
  169107. this.size += data2.size == size ? 0 : 1;
  169108. return this;
  169109. }
  169110. module2.exports = mapCacheSet;
  169111. }
  169112. });
  169113. // node_modules/lodash/_MapCache.js
  169114. var require_MapCache = __commonJS({
  169115. "node_modules/lodash/_MapCache.js"(exports, module2) {
  169116. var mapCacheClear = require_mapCacheClear();
  169117. var mapCacheDelete = require_mapCacheDelete();
  169118. var mapCacheGet = require_mapCacheGet();
  169119. var mapCacheHas = require_mapCacheHas();
  169120. var mapCacheSet = require_mapCacheSet();
  169121. function MapCache(entries) {
  169122. var index2 = -1, length = entries == null ? 0 : entries.length;
  169123. this.clear();
  169124. while (++index2 < length) {
  169125. var entry = entries[index2];
  169126. this.set(entry[0], entry[1]);
  169127. }
  169128. }
  169129. MapCache.prototype.clear = mapCacheClear;
  169130. MapCache.prototype["delete"] = mapCacheDelete;
  169131. MapCache.prototype.get = mapCacheGet;
  169132. MapCache.prototype.has = mapCacheHas;
  169133. MapCache.prototype.set = mapCacheSet;
  169134. module2.exports = MapCache;
  169135. }
  169136. });
  169137. // node_modules/lodash/_stackSet.js
  169138. var require_stackSet = __commonJS({
  169139. "node_modules/lodash/_stackSet.js"(exports, module2) {
  169140. var ListCache = require_ListCache();
  169141. var Map2 = require_Map();
  169142. var MapCache = require_MapCache();
  169143. var LARGE_ARRAY_SIZE = 200;
  169144. function stackSet(key, value) {
  169145. var data2 = this.__data__;
  169146. if (data2 instanceof ListCache) {
  169147. var pairs = data2.__data__;
  169148. if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
  169149. pairs.push([key, value]);
  169150. this.size = ++data2.size;
  169151. return this;
  169152. }
  169153. data2 = this.__data__ = new MapCache(pairs);
  169154. }
  169155. data2.set(key, value);
  169156. this.size = data2.size;
  169157. return this;
  169158. }
  169159. module2.exports = stackSet;
  169160. }
  169161. });
  169162. // node_modules/lodash/_Stack.js
  169163. var require_Stack = __commonJS({
  169164. "node_modules/lodash/_Stack.js"(exports, module2) {
  169165. var ListCache = require_ListCache();
  169166. var stackClear = require_stackClear();
  169167. var stackDelete = require_stackDelete();
  169168. var stackGet = require_stackGet();
  169169. var stackHas = require_stackHas();
  169170. var stackSet = require_stackSet();
  169171. function Stack(entries) {
  169172. var data2 = this.__data__ = new ListCache(entries);
  169173. this.size = data2.size;
  169174. }
  169175. Stack.prototype.clear = stackClear;
  169176. Stack.prototype["delete"] = stackDelete;
  169177. Stack.prototype.get = stackGet;
  169178. Stack.prototype.has = stackHas;
  169179. Stack.prototype.set = stackSet;
  169180. module2.exports = Stack;
  169181. }
  169182. });
  169183. // node_modules/lodash/_arrayEach.js
  169184. var require_arrayEach = __commonJS({
  169185. "node_modules/lodash/_arrayEach.js"(exports, module2) {
  169186. function arrayEach(array, iteratee) {
  169187. var index2 = -1, length = array == null ? 0 : array.length;
  169188. while (++index2 < length) {
  169189. if (iteratee(array[index2], index2, array) === false) {
  169190. break;
  169191. }
  169192. }
  169193. return array;
  169194. }
  169195. module2.exports = arrayEach;
  169196. }
  169197. });
  169198. // node_modules/lodash/_defineProperty.js
  169199. var require_defineProperty = __commonJS({
  169200. "node_modules/lodash/_defineProperty.js"(exports, module2) {
  169201. var getNative = require_getNative();
  169202. var defineProperty = function() {
  169203. try {
  169204. var func = getNative(Object, "defineProperty");
  169205. func({}, "", {});
  169206. return func;
  169207. } catch (e) {
  169208. }
  169209. }();
  169210. module2.exports = defineProperty;
  169211. }
  169212. });
  169213. // node_modules/lodash/_baseAssignValue.js
  169214. var require_baseAssignValue = __commonJS({
  169215. "node_modules/lodash/_baseAssignValue.js"(exports, module2) {
  169216. var defineProperty = require_defineProperty();
  169217. function baseAssignValue(object, key, value) {
  169218. if (key == "__proto__" && defineProperty) {
  169219. defineProperty(object, key, {
  169220. "configurable": true,
  169221. "enumerable": true,
  169222. "value": value,
  169223. "writable": true
  169224. });
  169225. } else {
  169226. object[key] = value;
  169227. }
  169228. }
  169229. module2.exports = baseAssignValue;
  169230. }
  169231. });
  169232. // node_modules/lodash/_assignValue.js
  169233. var require_assignValue = __commonJS({
  169234. "node_modules/lodash/_assignValue.js"(exports, module2) {
  169235. var baseAssignValue = require_baseAssignValue();
  169236. var eq = require_eq();
  169237. var objectProto = Object.prototype;
  169238. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169239. function assignValue(object, key, value) {
  169240. var objValue = object[key];
  169241. if (!(hasOwnProperty3.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
  169242. baseAssignValue(object, key, value);
  169243. }
  169244. }
  169245. module2.exports = assignValue;
  169246. }
  169247. });
  169248. // node_modules/lodash/_copyObject.js
  169249. var require_copyObject = __commonJS({
  169250. "node_modules/lodash/_copyObject.js"(exports, module2) {
  169251. var assignValue = require_assignValue();
  169252. var baseAssignValue = require_baseAssignValue();
  169253. function copyObject(source, props, object, customizer) {
  169254. var isNew = !object;
  169255. object || (object = {});
  169256. var index2 = -1, length = props.length;
  169257. while (++index2 < length) {
  169258. var key = props[index2];
  169259. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
  169260. if (newValue === void 0) {
  169261. newValue = source[key];
  169262. }
  169263. if (isNew) {
  169264. baseAssignValue(object, key, newValue);
  169265. } else {
  169266. assignValue(object, key, newValue);
  169267. }
  169268. }
  169269. return object;
  169270. }
  169271. module2.exports = copyObject;
  169272. }
  169273. });
  169274. // node_modules/lodash/_baseTimes.js
  169275. var require_baseTimes = __commonJS({
  169276. "node_modules/lodash/_baseTimes.js"(exports, module2) {
  169277. function baseTimes(n, iteratee) {
  169278. var index2 = -1, result = Array(n);
  169279. while (++index2 < n) {
  169280. result[index2] = iteratee(index2);
  169281. }
  169282. return result;
  169283. }
  169284. module2.exports = baseTimes;
  169285. }
  169286. });
  169287. // node_modules/lodash/isObjectLike.js
  169288. var require_isObjectLike = __commonJS({
  169289. "node_modules/lodash/isObjectLike.js"(exports, module2) {
  169290. function isObjectLike(value) {
  169291. return value != null && typeof value == "object";
  169292. }
  169293. module2.exports = isObjectLike;
  169294. }
  169295. });
  169296. // node_modules/lodash/_baseIsArguments.js
  169297. var require_baseIsArguments = __commonJS({
  169298. "node_modules/lodash/_baseIsArguments.js"(exports, module2) {
  169299. var baseGetTag = require_baseGetTag();
  169300. var isObjectLike = require_isObjectLike();
  169301. var argsTag = "[object Arguments]";
  169302. function baseIsArguments(value) {
  169303. return isObjectLike(value) && baseGetTag(value) == argsTag;
  169304. }
  169305. module2.exports = baseIsArguments;
  169306. }
  169307. });
  169308. // node_modules/lodash/isArguments.js
  169309. var require_isArguments = __commonJS({
  169310. "node_modules/lodash/isArguments.js"(exports, module2) {
  169311. var baseIsArguments = require_baseIsArguments();
  169312. var isObjectLike = require_isObjectLike();
  169313. var objectProto = Object.prototype;
  169314. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169315. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  169316. var isArguments = baseIsArguments(function() {
  169317. return arguments;
  169318. }()) ? baseIsArguments : function(value) {
  169319. return isObjectLike(value) && hasOwnProperty3.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  169320. };
  169321. module2.exports = isArguments;
  169322. }
  169323. });
  169324. // node_modules/lodash/isArray.js
  169325. var require_isArray = __commonJS({
  169326. "node_modules/lodash/isArray.js"(exports, module2) {
  169327. var isArray2 = Array.isArray;
  169328. module2.exports = isArray2;
  169329. }
  169330. });
  169331. // node_modules/lodash/stubFalse.js
  169332. var require_stubFalse = __commonJS({
  169333. "node_modules/lodash/stubFalse.js"(exports, module2) {
  169334. function stubFalse() {
  169335. return false;
  169336. }
  169337. module2.exports = stubFalse;
  169338. }
  169339. });
  169340. // node_modules/lodash/isBuffer.js
  169341. var require_isBuffer = __commonJS({
  169342. "node_modules/lodash/isBuffer.js"(exports, module2) {
  169343. var root3 = require_root();
  169344. var stubFalse = require_stubFalse();
  169345. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  169346. var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
  169347. var moduleExports = freeModule && freeModule.exports === freeExports;
  169348. var Buffer2 = moduleExports ? root3.Buffer : void 0;
  169349. var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
  169350. var isBuffer2 = nativeIsBuffer || stubFalse;
  169351. module2.exports = isBuffer2;
  169352. }
  169353. });
  169354. // node_modules/lodash/_isIndex.js
  169355. var require_isIndex = __commonJS({
  169356. "node_modules/lodash/_isIndex.js"(exports, module2) {
  169357. var MAX_SAFE_INTEGER = 9007199254740991;
  169358. var reIsUint = /^(?:0|[1-9]\d*)$/;
  169359. function isIndex(value, length) {
  169360. var type = typeof value;
  169361. length = length == null ? MAX_SAFE_INTEGER : length;
  169362. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
  169363. }
  169364. module2.exports = isIndex;
  169365. }
  169366. });
  169367. // node_modules/lodash/isLength.js
  169368. var require_isLength = __commonJS({
  169369. "node_modules/lodash/isLength.js"(exports, module2) {
  169370. var MAX_SAFE_INTEGER = 9007199254740991;
  169371. function isLength(value) {
  169372. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  169373. }
  169374. module2.exports = isLength;
  169375. }
  169376. });
  169377. // node_modules/lodash/_baseIsTypedArray.js
  169378. var require_baseIsTypedArray = __commonJS({
  169379. "node_modules/lodash/_baseIsTypedArray.js"(exports, module2) {
  169380. var baseGetTag = require_baseGetTag();
  169381. var isLength = require_isLength();
  169382. var isObjectLike = require_isObjectLike();
  169383. var argsTag = "[object Arguments]";
  169384. var arrayTag = "[object Array]";
  169385. var boolTag = "[object Boolean]";
  169386. var dateTag = "[object Date]";
  169387. var errorTag = "[object Error]";
  169388. var funcTag = "[object Function]";
  169389. var mapTag = "[object Map]";
  169390. var numberTag = "[object Number]";
  169391. var objectTag = "[object Object]";
  169392. var regexpTag = "[object RegExp]";
  169393. var setTag = "[object Set]";
  169394. var stringTag = "[object String]";
  169395. var weakMapTag = "[object WeakMap]";
  169396. var arrayBufferTag = "[object ArrayBuffer]";
  169397. var dataViewTag = "[object DataView]";
  169398. var float32Tag = "[object Float32Array]";
  169399. var float64Tag = "[object Float64Array]";
  169400. var int8Tag = "[object Int8Array]";
  169401. var int16Tag = "[object Int16Array]";
  169402. var int32Tag = "[object Int32Array]";
  169403. var uint8Tag = "[object Uint8Array]";
  169404. var uint8ClampedTag = "[object Uint8ClampedArray]";
  169405. var uint16Tag = "[object Uint16Array]";
  169406. var uint32Tag = "[object Uint32Array]";
  169407. var typedArrayTags = {};
  169408. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  169409. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  169410. function baseIsTypedArray(value) {
  169411. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  169412. }
  169413. module2.exports = baseIsTypedArray;
  169414. }
  169415. });
  169416. // node_modules/lodash/_baseUnary.js
  169417. var require_baseUnary = __commonJS({
  169418. "node_modules/lodash/_baseUnary.js"(exports, module2) {
  169419. function baseUnary(func) {
  169420. return function(value) {
  169421. return func(value);
  169422. };
  169423. }
  169424. module2.exports = baseUnary;
  169425. }
  169426. });
  169427. // node_modules/lodash/_nodeUtil.js
  169428. var require_nodeUtil = __commonJS({
  169429. "node_modules/lodash/_nodeUtil.js"(exports, module2) {
  169430. var freeGlobal = require_freeGlobal();
  169431. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  169432. var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
  169433. var moduleExports = freeModule && freeModule.exports === freeExports;
  169434. var freeProcess = moduleExports && freeGlobal.process;
  169435. var nodeUtil = function() {
  169436. try {
  169437. var types2 = freeModule && freeModule.require && freeModule.require("util").types;
  169438. if (types2) {
  169439. return types2;
  169440. }
  169441. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  169442. } catch (e) {
  169443. }
  169444. }();
  169445. module2.exports = nodeUtil;
  169446. }
  169447. });
  169448. // node_modules/lodash/isTypedArray.js
  169449. var require_isTypedArray = __commonJS({
  169450. "node_modules/lodash/isTypedArray.js"(exports, module2) {
  169451. var baseIsTypedArray = require_baseIsTypedArray();
  169452. var baseUnary = require_baseUnary();
  169453. var nodeUtil = require_nodeUtil();
  169454. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  169455. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  169456. module2.exports = isTypedArray;
  169457. }
  169458. });
  169459. // node_modules/lodash/_arrayLikeKeys.js
  169460. var require_arrayLikeKeys = __commonJS({
  169461. "node_modules/lodash/_arrayLikeKeys.js"(exports, module2) {
  169462. var baseTimes = require_baseTimes();
  169463. var isArguments = require_isArguments();
  169464. var isArray2 = require_isArray();
  169465. var isBuffer2 = require_isBuffer();
  169466. var isIndex = require_isIndex();
  169467. var isTypedArray = require_isTypedArray();
  169468. var objectProto = Object.prototype;
  169469. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169470. function arrayLikeKeys(value, inherited) {
  169471. var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer2(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
  169472. for (var key in value) {
  169473. if ((inherited || hasOwnProperty3.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
  169474. result.push(key);
  169475. }
  169476. }
  169477. return result;
  169478. }
  169479. module2.exports = arrayLikeKeys;
  169480. }
  169481. });
  169482. // node_modules/lodash/_isPrototype.js
  169483. var require_isPrototype = __commonJS({
  169484. "node_modules/lodash/_isPrototype.js"(exports, module2) {
  169485. var objectProto = Object.prototype;
  169486. function isPrototype(value) {
  169487. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
  169488. return value === proto;
  169489. }
  169490. module2.exports = isPrototype;
  169491. }
  169492. });
  169493. // node_modules/lodash/_overArg.js
  169494. var require_overArg = __commonJS({
  169495. "node_modules/lodash/_overArg.js"(exports, module2) {
  169496. function overArg(func, transform) {
  169497. return function(arg) {
  169498. return func(transform(arg));
  169499. };
  169500. }
  169501. module2.exports = overArg;
  169502. }
  169503. });
  169504. // node_modules/lodash/_nativeKeys.js
  169505. var require_nativeKeys = __commonJS({
  169506. "node_modules/lodash/_nativeKeys.js"(exports, module2) {
  169507. var overArg = require_overArg();
  169508. var nativeKeys = overArg(Object.keys, Object);
  169509. module2.exports = nativeKeys;
  169510. }
  169511. });
  169512. // node_modules/lodash/_baseKeys.js
  169513. var require_baseKeys = __commonJS({
  169514. "node_modules/lodash/_baseKeys.js"(exports, module2) {
  169515. var isPrototype = require_isPrototype();
  169516. var nativeKeys = require_nativeKeys();
  169517. var objectProto = Object.prototype;
  169518. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169519. function baseKeys(object) {
  169520. if (!isPrototype(object)) {
  169521. return nativeKeys(object);
  169522. }
  169523. var result = [];
  169524. for (var key in Object(object)) {
  169525. if (hasOwnProperty3.call(object, key) && key != "constructor") {
  169526. result.push(key);
  169527. }
  169528. }
  169529. return result;
  169530. }
  169531. module2.exports = baseKeys;
  169532. }
  169533. });
  169534. // node_modules/lodash/isArrayLike.js
  169535. var require_isArrayLike = __commonJS({
  169536. "node_modules/lodash/isArrayLike.js"(exports, module2) {
  169537. var isFunction = require_isFunction();
  169538. var isLength = require_isLength();
  169539. function isArrayLike(value) {
  169540. return value != null && isLength(value.length) && !isFunction(value);
  169541. }
  169542. module2.exports = isArrayLike;
  169543. }
  169544. });
  169545. // node_modules/lodash/keys.js
  169546. var require_keys = __commonJS({
  169547. "node_modules/lodash/keys.js"(exports, module2) {
  169548. var arrayLikeKeys = require_arrayLikeKeys();
  169549. var baseKeys = require_baseKeys();
  169550. var isArrayLike = require_isArrayLike();
  169551. function keys2(object) {
  169552. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  169553. }
  169554. module2.exports = keys2;
  169555. }
  169556. });
  169557. // node_modules/lodash/_baseAssign.js
  169558. var require_baseAssign = __commonJS({
  169559. "node_modules/lodash/_baseAssign.js"(exports, module2) {
  169560. var copyObject = require_copyObject();
  169561. var keys2 = require_keys();
  169562. function baseAssign(object, source) {
  169563. return object && copyObject(source, keys2(source), object);
  169564. }
  169565. module2.exports = baseAssign;
  169566. }
  169567. });
  169568. // node_modules/lodash/_nativeKeysIn.js
  169569. var require_nativeKeysIn = __commonJS({
  169570. "node_modules/lodash/_nativeKeysIn.js"(exports, module2) {
  169571. function nativeKeysIn(object) {
  169572. var result = [];
  169573. if (object != null) {
  169574. for (var key in Object(object)) {
  169575. result.push(key);
  169576. }
  169577. }
  169578. return result;
  169579. }
  169580. module2.exports = nativeKeysIn;
  169581. }
  169582. });
  169583. // node_modules/lodash/_baseKeysIn.js
  169584. var require_baseKeysIn = __commonJS({
  169585. "node_modules/lodash/_baseKeysIn.js"(exports, module2) {
  169586. var isObject = require_isObject();
  169587. var isPrototype = require_isPrototype();
  169588. var nativeKeysIn = require_nativeKeysIn();
  169589. var objectProto = Object.prototype;
  169590. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169591. function baseKeysIn(object) {
  169592. if (!isObject(object)) {
  169593. return nativeKeysIn(object);
  169594. }
  169595. var isProto = isPrototype(object), result = [];
  169596. for (var key in object) {
  169597. if (!(key == "constructor" && (isProto || !hasOwnProperty3.call(object, key)))) {
  169598. result.push(key);
  169599. }
  169600. }
  169601. return result;
  169602. }
  169603. module2.exports = baseKeysIn;
  169604. }
  169605. });
  169606. // node_modules/lodash/keysIn.js
  169607. var require_keysIn = __commonJS({
  169608. "node_modules/lodash/keysIn.js"(exports, module2) {
  169609. var arrayLikeKeys = require_arrayLikeKeys();
  169610. var baseKeysIn = require_baseKeysIn();
  169611. var isArrayLike = require_isArrayLike();
  169612. function keysIn(object) {
  169613. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  169614. }
  169615. module2.exports = keysIn;
  169616. }
  169617. });
  169618. // node_modules/lodash/_baseAssignIn.js
  169619. var require_baseAssignIn = __commonJS({
  169620. "node_modules/lodash/_baseAssignIn.js"(exports, module2) {
  169621. var copyObject = require_copyObject();
  169622. var keysIn = require_keysIn();
  169623. function baseAssignIn(object, source) {
  169624. return object && copyObject(source, keysIn(source), object);
  169625. }
  169626. module2.exports = baseAssignIn;
  169627. }
  169628. });
  169629. // node_modules/lodash/_cloneBuffer.js
  169630. var require_cloneBuffer = __commonJS({
  169631. "node_modules/lodash/_cloneBuffer.js"(exports, module2) {
  169632. var root3 = require_root();
  169633. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  169634. var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
  169635. var moduleExports = freeModule && freeModule.exports === freeExports;
  169636. var Buffer2 = moduleExports ? root3.Buffer : void 0;
  169637. var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
  169638. function cloneBuffer(buffer2, isDeep) {
  169639. if (isDeep) {
  169640. return buffer2.slice();
  169641. }
  169642. var length = buffer2.length, result = allocUnsafe ? allocUnsafe(length) : new buffer2.constructor(length);
  169643. buffer2.copy(result);
  169644. return result;
  169645. }
  169646. module2.exports = cloneBuffer;
  169647. }
  169648. });
  169649. // node_modules/lodash/_copyArray.js
  169650. var require_copyArray = __commonJS({
  169651. "node_modules/lodash/_copyArray.js"(exports, module2) {
  169652. function copyArray(source, array) {
  169653. var index2 = -1, length = source.length;
  169654. array || (array = Array(length));
  169655. while (++index2 < length) {
  169656. array[index2] = source[index2];
  169657. }
  169658. return array;
  169659. }
  169660. module2.exports = copyArray;
  169661. }
  169662. });
  169663. // node_modules/lodash/_arrayFilter.js
  169664. var require_arrayFilter = __commonJS({
  169665. "node_modules/lodash/_arrayFilter.js"(exports, module2) {
  169666. function arrayFilter(array, predicate) {
  169667. var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  169668. while (++index2 < length) {
  169669. var value = array[index2];
  169670. if (predicate(value, index2, array)) {
  169671. result[resIndex++] = value;
  169672. }
  169673. }
  169674. return result;
  169675. }
  169676. module2.exports = arrayFilter;
  169677. }
  169678. });
  169679. // node_modules/lodash/stubArray.js
  169680. var require_stubArray = __commonJS({
  169681. "node_modules/lodash/stubArray.js"(exports, module2) {
  169682. function stubArray() {
  169683. return [];
  169684. }
  169685. module2.exports = stubArray;
  169686. }
  169687. });
  169688. // node_modules/lodash/_getSymbols.js
  169689. var require_getSymbols = __commonJS({
  169690. "node_modules/lodash/_getSymbols.js"(exports, module2) {
  169691. var arrayFilter = require_arrayFilter();
  169692. var stubArray = require_stubArray();
  169693. var objectProto = Object.prototype;
  169694. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  169695. var nativeGetSymbols = Object.getOwnPropertySymbols;
  169696. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  169697. if (object == null) {
  169698. return [];
  169699. }
  169700. object = Object(object);
  169701. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  169702. return propertyIsEnumerable.call(object, symbol);
  169703. });
  169704. };
  169705. module2.exports = getSymbols;
  169706. }
  169707. });
  169708. // node_modules/lodash/_copySymbols.js
  169709. var require_copySymbols = __commonJS({
  169710. "node_modules/lodash/_copySymbols.js"(exports, module2) {
  169711. var copyObject = require_copyObject();
  169712. var getSymbols = require_getSymbols();
  169713. function copySymbols(source, object) {
  169714. return copyObject(source, getSymbols(source), object);
  169715. }
  169716. module2.exports = copySymbols;
  169717. }
  169718. });
  169719. // node_modules/lodash/_arrayPush.js
  169720. var require_arrayPush = __commonJS({
  169721. "node_modules/lodash/_arrayPush.js"(exports, module2) {
  169722. function arrayPush(array, values) {
  169723. var index2 = -1, length = values.length, offset2 = array.length;
  169724. while (++index2 < length) {
  169725. array[offset2 + index2] = values[index2];
  169726. }
  169727. return array;
  169728. }
  169729. module2.exports = arrayPush;
  169730. }
  169731. });
  169732. // node_modules/lodash/_getPrototype.js
  169733. var require_getPrototype = __commonJS({
  169734. "node_modules/lodash/_getPrototype.js"(exports, module2) {
  169735. var overArg = require_overArg();
  169736. var getPrototype = overArg(Object.getPrototypeOf, Object);
  169737. module2.exports = getPrototype;
  169738. }
  169739. });
  169740. // node_modules/lodash/_getSymbolsIn.js
  169741. var require_getSymbolsIn = __commonJS({
  169742. "node_modules/lodash/_getSymbolsIn.js"(exports, module2) {
  169743. var arrayPush = require_arrayPush();
  169744. var getPrototype = require_getPrototype();
  169745. var getSymbols = require_getSymbols();
  169746. var stubArray = require_stubArray();
  169747. var nativeGetSymbols = Object.getOwnPropertySymbols;
  169748. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  169749. var result = [];
  169750. while (object) {
  169751. arrayPush(result, getSymbols(object));
  169752. object = getPrototype(object);
  169753. }
  169754. return result;
  169755. };
  169756. module2.exports = getSymbolsIn;
  169757. }
  169758. });
  169759. // node_modules/lodash/_copySymbolsIn.js
  169760. var require_copySymbolsIn = __commonJS({
  169761. "node_modules/lodash/_copySymbolsIn.js"(exports, module2) {
  169762. var copyObject = require_copyObject();
  169763. var getSymbolsIn = require_getSymbolsIn();
  169764. function copySymbolsIn(source, object) {
  169765. return copyObject(source, getSymbolsIn(source), object);
  169766. }
  169767. module2.exports = copySymbolsIn;
  169768. }
  169769. });
  169770. // node_modules/lodash/_baseGetAllKeys.js
  169771. var require_baseGetAllKeys = __commonJS({
  169772. "node_modules/lodash/_baseGetAllKeys.js"(exports, module2) {
  169773. var arrayPush = require_arrayPush();
  169774. var isArray2 = require_isArray();
  169775. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  169776. var result = keysFunc(object);
  169777. return isArray2(object) ? result : arrayPush(result, symbolsFunc(object));
  169778. }
  169779. module2.exports = baseGetAllKeys;
  169780. }
  169781. });
  169782. // node_modules/lodash/_getAllKeys.js
  169783. var require_getAllKeys = __commonJS({
  169784. "node_modules/lodash/_getAllKeys.js"(exports, module2) {
  169785. var baseGetAllKeys = require_baseGetAllKeys();
  169786. var getSymbols = require_getSymbols();
  169787. var keys2 = require_keys();
  169788. function getAllKeys(object) {
  169789. return baseGetAllKeys(object, keys2, getSymbols);
  169790. }
  169791. module2.exports = getAllKeys;
  169792. }
  169793. });
  169794. // node_modules/lodash/_getAllKeysIn.js
  169795. var require_getAllKeysIn = __commonJS({
  169796. "node_modules/lodash/_getAllKeysIn.js"(exports, module2) {
  169797. var baseGetAllKeys = require_baseGetAllKeys();
  169798. var getSymbolsIn = require_getSymbolsIn();
  169799. var keysIn = require_keysIn();
  169800. function getAllKeysIn(object) {
  169801. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  169802. }
  169803. module2.exports = getAllKeysIn;
  169804. }
  169805. });
  169806. // node_modules/lodash/_DataView.js
  169807. var require_DataView = __commonJS({
  169808. "node_modules/lodash/_DataView.js"(exports, module2) {
  169809. var getNative = require_getNative();
  169810. var root3 = require_root();
  169811. var DataView = getNative(root3, "DataView");
  169812. module2.exports = DataView;
  169813. }
  169814. });
  169815. // node_modules/lodash/_Promise.js
  169816. var require_Promise = __commonJS({
  169817. "node_modules/lodash/_Promise.js"(exports, module2) {
  169818. var getNative = require_getNative();
  169819. var root3 = require_root();
  169820. var Promise2 = getNative(root3, "Promise");
  169821. module2.exports = Promise2;
  169822. }
  169823. });
  169824. // node_modules/lodash/_Set.js
  169825. var require_Set = __commonJS({
  169826. "node_modules/lodash/_Set.js"(exports, module2) {
  169827. var getNative = require_getNative();
  169828. var root3 = require_root();
  169829. var Set2 = getNative(root3, "Set");
  169830. module2.exports = Set2;
  169831. }
  169832. });
  169833. // node_modules/lodash/_WeakMap.js
  169834. var require_WeakMap = __commonJS({
  169835. "node_modules/lodash/_WeakMap.js"(exports, module2) {
  169836. var getNative = require_getNative();
  169837. var root3 = require_root();
  169838. var WeakMap2 = getNative(root3, "WeakMap");
  169839. module2.exports = WeakMap2;
  169840. }
  169841. });
  169842. // node_modules/lodash/_getTag.js
  169843. var require_getTag = __commonJS({
  169844. "node_modules/lodash/_getTag.js"(exports, module2) {
  169845. var DataView = require_DataView();
  169846. var Map2 = require_Map();
  169847. var Promise2 = require_Promise();
  169848. var Set2 = require_Set();
  169849. var WeakMap2 = require_WeakMap();
  169850. var baseGetTag = require_baseGetTag();
  169851. var toSource = require_toSource();
  169852. var mapTag = "[object Map]";
  169853. var objectTag = "[object Object]";
  169854. var promiseTag = "[object Promise]";
  169855. var setTag = "[object Set]";
  169856. var weakMapTag = "[object WeakMap]";
  169857. var dataViewTag = "[object DataView]";
  169858. var dataViewCtorString = toSource(DataView);
  169859. var mapCtorString = toSource(Map2);
  169860. var promiseCtorString = toSource(Promise2);
  169861. var setCtorString = toSource(Set2);
  169862. var weakMapCtorString = toSource(WeakMap2);
  169863. var getTag = baseGetTag;
  169864. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
  169865. getTag = function(value) {
  169866. var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
  169867. if (ctorString) {
  169868. switch (ctorString) {
  169869. case dataViewCtorString:
  169870. return dataViewTag;
  169871. case mapCtorString:
  169872. return mapTag;
  169873. case promiseCtorString:
  169874. return promiseTag;
  169875. case setCtorString:
  169876. return setTag;
  169877. case weakMapCtorString:
  169878. return weakMapTag;
  169879. }
  169880. }
  169881. return result;
  169882. };
  169883. }
  169884. module2.exports = getTag;
  169885. }
  169886. });
  169887. // node_modules/lodash/_initCloneArray.js
  169888. var require_initCloneArray = __commonJS({
  169889. "node_modules/lodash/_initCloneArray.js"(exports, module2) {
  169890. var objectProto = Object.prototype;
  169891. var hasOwnProperty3 = objectProto.hasOwnProperty;
  169892. function initCloneArray(array) {
  169893. var length = array.length, result = new array.constructor(length);
  169894. if (length && typeof array[0] == "string" && hasOwnProperty3.call(array, "index")) {
  169895. result.index = array.index;
  169896. result.input = array.input;
  169897. }
  169898. return result;
  169899. }
  169900. module2.exports = initCloneArray;
  169901. }
  169902. });
  169903. // node_modules/lodash/_Uint8Array.js
  169904. var require_Uint8Array = __commonJS({
  169905. "node_modules/lodash/_Uint8Array.js"(exports, module2) {
  169906. var root3 = require_root();
  169907. var Uint8Array2 = root3.Uint8Array;
  169908. module2.exports = Uint8Array2;
  169909. }
  169910. });
  169911. // node_modules/lodash/_cloneArrayBuffer.js
  169912. var require_cloneArrayBuffer = __commonJS({
  169913. "node_modules/lodash/_cloneArrayBuffer.js"(exports, module2) {
  169914. var Uint8Array2 = require_Uint8Array();
  169915. function cloneArrayBuffer(arrayBuffer) {
  169916. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  169917. new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
  169918. return result;
  169919. }
  169920. module2.exports = cloneArrayBuffer;
  169921. }
  169922. });
  169923. // node_modules/lodash/_cloneDataView.js
  169924. var require_cloneDataView = __commonJS({
  169925. "node_modules/lodash/_cloneDataView.js"(exports, module2) {
  169926. var cloneArrayBuffer = require_cloneArrayBuffer();
  169927. function cloneDataView(dataView, isDeep) {
  169928. var buffer2 = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  169929. return new dataView.constructor(buffer2, dataView.byteOffset, dataView.byteLength);
  169930. }
  169931. module2.exports = cloneDataView;
  169932. }
  169933. });
  169934. // node_modules/lodash/_cloneRegExp.js
  169935. var require_cloneRegExp = __commonJS({
  169936. "node_modules/lodash/_cloneRegExp.js"(exports, module2) {
  169937. var reFlags = /\w*$/;
  169938. function cloneRegExp(regexp) {
  169939. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  169940. result.lastIndex = regexp.lastIndex;
  169941. return result;
  169942. }
  169943. module2.exports = cloneRegExp;
  169944. }
  169945. });
  169946. // node_modules/lodash/_cloneSymbol.js
  169947. var require_cloneSymbol = __commonJS({
  169948. "node_modules/lodash/_cloneSymbol.js"(exports, module2) {
  169949. var Symbol2 = require_Symbol();
  169950. var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
  169951. var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
  169952. function cloneSymbol(symbol) {
  169953. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  169954. }
  169955. module2.exports = cloneSymbol;
  169956. }
  169957. });
  169958. // node_modules/lodash/_cloneTypedArray.js
  169959. var require_cloneTypedArray = __commonJS({
  169960. "node_modules/lodash/_cloneTypedArray.js"(exports, module2) {
  169961. var cloneArrayBuffer = require_cloneArrayBuffer();
  169962. function cloneTypedArray(typedArray, isDeep) {
  169963. var buffer2 = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  169964. return new typedArray.constructor(buffer2, typedArray.byteOffset, typedArray.length);
  169965. }
  169966. module2.exports = cloneTypedArray;
  169967. }
  169968. });
  169969. // node_modules/lodash/_initCloneByTag.js
  169970. var require_initCloneByTag = __commonJS({
  169971. "node_modules/lodash/_initCloneByTag.js"(exports, module2) {
  169972. var cloneArrayBuffer = require_cloneArrayBuffer();
  169973. var cloneDataView = require_cloneDataView();
  169974. var cloneRegExp = require_cloneRegExp();
  169975. var cloneSymbol = require_cloneSymbol();
  169976. var cloneTypedArray = require_cloneTypedArray();
  169977. var boolTag = "[object Boolean]";
  169978. var dateTag = "[object Date]";
  169979. var mapTag = "[object Map]";
  169980. var numberTag = "[object Number]";
  169981. var regexpTag = "[object RegExp]";
  169982. var setTag = "[object Set]";
  169983. var stringTag = "[object String]";
  169984. var symbolTag = "[object Symbol]";
  169985. var arrayBufferTag = "[object ArrayBuffer]";
  169986. var dataViewTag = "[object DataView]";
  169987. var float32Tag = "[object Float32Array]";
  169988. var float64Tag = "[object Float64Array]";
  169989. var int8Tag = "[object Int8Array]";
  169990. var int16Tag = "[object Int16Array]";
  169991. var int32Tag = "[object Int32Array]";
  169992. var uint8Tag = "[object Uint8Array]";
  169993. var uint8ClampedTag = "[object Uint8ClampedArray]";
  169994. var uint16Tag = "[object Uint16Array]";
  169995. var uint32Tag = "[object Uint32Array]";
  169996. function initCloneByTag(object, tag, isDeep) {
  169997. var Ctor = object.constructor;
  169998. switch (tag) {
  169999. case arrayBufferTag:
  170000. return cloneArrayBuffer(object);
  170001. case boolTag:
  170002. case dateTag:
  170003. return new Ctor(+object);
  170004. case dataViewTag:
  170005. return cloneDataView(object, isDeep);
  170006. case float32Tag:
  170007. case float64Tag:
  170008. case int8Tag:
  170009. case int16Tag:
  170010. case int32Tag:
  170011. case uint8Tag:
  170012. case uint8ClampedTag:
  170013. case uint16Tag:
  170014. case uint32Tag:
  170015. return cloneTypedArray(object, isDeep);
  170016. case mapTag:
  170017. return new Ctor();
  170018. case numberTag:
  170019. case stringTag:
  170020. return new Ctor(object);
  170021. case regexpTag:
  170022. return cloneRegExp(object);
  170023. case setTag:
  170024. return new Ctor();
  170025. case symbolTag:
  170026. return cloneSymbol(object);
  170027. }
  170028. }
  170029. module2.exports = initCloneByTag;
  170030. }
  170031. });
  170032. // node_modules/lodash/_baseCreate.js
  170033. var require_baseCreate = __commonJS({
  170034. "node_modules/lodash/_baseCreate.js"(exports, module2) {
  170035. var isObject = require_isObject();
  170036. var objectCreate = Object.create;
  170037. var baseCreate = function() {
  170038. function object() {
  170039. }
  170040. return function(proto) {
  170041. if (!isObject(proto)) {
  170042. return {};
  170043. }
  170044. if (objectCreate) {
  170045. return objectCreate(proto);
  170046. }
  170047. object.prototype = proto;
  170048. var result = new object();
  170049. object.prototype = void 0;
  170050. return result;
  170051. };
  170052. }();
  170053. module2.exports = baseCreate;
  170054. }
  170055. });
  170056. // node_modules/lodash/_initCloneObject.js
  170057. var require_initCloneObject = __commonJS({
  170058. "node_modules/lodash/_initCloneObject.js"(exports, module2) {
  170059. var baseCreate = require_baseCreate();
  170060. var getPrototype = require_getPrototype();
  170061. var isPrototype = require_isPrototype();
  170062. function initCloneObject(object) {
  170063. return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  170064. }
  170065. module2.exports = initCloneObject;
  170066. }
  170067. });
  170068. // node_modules/lodash/_baseIsMap.js
  170069. var require_baseIsMap = __commonJS({
  170070. "node_modules/lodash/_baseIsMap.js"(exports, module2) {
  170071. var getTag = require_getTag();
  170072. var isObjectLike = require_isObjectLike();
  170073. var mapTag = "[object Map]";
  170074. function baseIsMap(value) {
  170075. return isObjectLike(value) && getTag(value) == mapTag;
  170076. }
  170077. module2.exports = baseIsMap;
  170078. }
  170079. });
  170080. // node_modules/lodash/isMap.js
  170081. var require_isMap = __commonJS({
  170082. "node_modules/lodash/isMap.js"(exports, module2) {
  170083. var baseIsMap = require_baseIsMap();
  170084. var baseUnary = require_baseUnary();
  170085. var nodeUtil = require_nodeUtil();
  170086. var nodeIsMap = nodeUtil && nodeUtil.isMap;
  170087. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  170088. module2.exports = isMap;
  170089. }
  170090. });
  170091. // node_modules/lodash/_baseIsSet.js
  170092. var require_baseIsSet = __commonJS({
  170093. "node_modules/lodash/_baseIsSet.js"(exports, module2) {
  170094. var getTag = require_getTag();
  170095. var isObjectLike = require_isObjectLike();
  170096. var setTag = "[object Set]";
  170097. function baseIsSet(value) {
  170098. return isObjectLike(value) && getTag(value) == setTag;
  170099. }
  170100. module2.exports = baseIsSet;
  170101. }
  170102. });
  170103. // node_modules/lodash/isSet.js
  170104. var require_isSet = __commonJS({
  170105. "node_modules/lodash/isSet.js"(exports, module2) {
  170106. var baseIsSet = require_baseIsSet();
  170107. var baseUnary = require_baseUnary();
  170108. var nodeUtil = require_nodeUtil();
  170109. var nodeIsSet = nodeUtil && nodeUtil.isSet;
  170110. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  170111. module2.exports = isSet;
  170112. }
  170113. });
  170114. // node_modules/lodash/_baseClone.js
  170115. var require_baseClone = __commonJS({
  170116. "node_modules/lodash/_baseClone.js"(exports, module2) {
  170117. var Stack = require_Stack();
  170118. var arrayEach = require_arrayEach();
  170119. var assignValue = require_assignValue();
  170120. var baseAssign = require_baseAssign();
  170121. var baseAssignIn = require_baseAssignIn();
  170122. var cloneBuffer = require_cloneBuffer();
  170123. var copyArray = require_copyArray();
  170124. var copySymbols = require_copySymbols();
  170125. var copySymbolsIn = require_copySymbolsIn();
  170126. var getAllKeys = require_getAllKeys();
  170127. var getAllKeysIn = require_getAllKeysIn();
  170128. var getTag = require_getTag();
  170129. var initCloneArray = require_initCloneArray();
  170130. var initCloneByTag = require_initCloneByTag();
  170131. var initCloneObject = require_initCloneObject();
  170132. var isArray2 = require_isArray();
  170133. var isBuffer2 = require_isBuffer();
  170134. var isMap = require_isMap();
  170135. var isObject = require_isObject();
  170136. var isSet = require_isSet();
  170137. var keys2 = require_keys();
  170138. var keysIn = require_keysIn();
  170139. var CLONE_DEEP_FLAG = 1;
  170140. var CLONE_FLAT_FLAG = 2;
  170141. var CLONE_SYMBOLS_FLAG = 4;
  170142. var argsTag = "[object Arguments]";
  170143. var arrayTag = "[object Array]";
  170144. var boolTag = "[object Boolean]";
  170145. var dateTag = "[object Date]";
  170146. var errorTag = "[object Error]";
  170147. var funcTag = "[object Function]";
  170148. var genTag = "[object GeneratorFunction]";
  170149. var mapTag = "[object Map]";
  170150. var numberTag = "[object Number]";
  170151. var objectTag = "[object Object]";
  170152. var regexpTag = "[object RegExp]";
  170153. var setTag = "[object Set]";
  170154. var stringTag = "[object String]";
  170155. var symbolTag = "[object Symbol]";
  170156. var weakMapTag = "[object WeakMap]";
  170157. var arrayBufferTag = "[object ArrayBuffer]";
  170158. var dataViewTag = "[object DataView]";
  170159. var float32Tag = "[object Float32Array]";
  170160. var float64Tag = "[object Float64Array]";
  170161. var int8Tag = "[object Int8Array]";
  170162. var int16Tag = "[object Int16Array]";
  170163. var int32Tag = "[object Int32Array]";
  170164. var uint8Tag = "[object Uint8Array]";
  170165. var uint8ClampedTag = "[object Uint8ClampedArray]";
  170166. var uint16Tag = "[object Uint16Array]";
  170167. var uint32Tag = "[object Uint32Array]";
  170168. var cloneableTags = {};
  170169. cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  170170. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  170171. function baseClone(value, bitmask, customizer, key, object, stack) {
  170172. var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
  170173. if (customizer) {
  170174. result = object ? customizer(value, key, object, stack) : customizer(value);
  170175. }
  170176. if (result !== void 0) {
  170177. return result;
  170178. }
  170179. if (!isObject(value)) {
  170180. return value;
  170181. }
  170182. var isArr = isArray2(value);
  170183. if (isArr) {
  170184. result = initCloneArray(value);
  170185. if (!isDeep) {
  170186. return copyArray(value, result);
  170187. }
  170188. } else {
  170189. var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
  170190. if (isBuffer2(value)) {
  170191. return cloneBuffer(value, isDeep);
  170192. }
  170193. if (tag == objectTag || tag == argsTag || isFunc && !object) {
  170194. result = isFlat || isFunc ? {} : initCloneObject(value);
  170195. if (!isDeep) {
  170196. return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
  170197. }
  170198. } else {
  170199. if (!cloneableTags[tag]) {
  170200. return object ? value : {};
  170201. }
  170202. result = initCloneByTag(value, tag, isDeep);
  170203. }
  170204. }
  170205. stack || (stack = new Stack());
  170206. var stacked = stack.get(value);
  170207. if (stacked) {
  170208. return stacked;
  170209. }
  170210. stack.set(value, result);
  170211. if (isSet(value)) {
  170212. value.forEach(function(subValue) {
  170213. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  170214. });
  170215. } else if (isMap(value)) {
  170216. value.forEach(function(subValue, key2) {
  170217. result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  170218. });
  170219. }
  170220. var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys2;
  170221. var props = isArr ? void 0 : keysFunc(value);
  170222. arrayEach(props || value, function(subValue, key2) {
  170223. if (props) {
  170224. key2 = subValue;
  170225. subValue = value[key2];
  170226. }
  170227. assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  170228. });
  170229. return result;
  170230. }
  170231. module2.exports = baseClone;
  170232. }
  170233. });
  170234. // node_modules/lodash/cloneDeep.js
  170235. var require_cloneDeep8 = __commonJS({
  170236. "node_modules/lodash/cloneDeep.js"(exports, module2) {
  170237. var baseClone = require_baseClone();
  170238. var CLONE_DEEP_FLAG = 1;
  170239. var CLONE_SYMBOLS_FLAG = 4;
  170240. function cloneDeep2(value) {
  170241. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  170242. }
  170243. module2.exports = cloneDeep2;
  170244. }
  170245. });
  170246. // src/index.ts
  170247. var src_exports = {};
  170248. __export(src_exports, {
  170249. analyze: () => analyze2,
  170250. extractImports: () => extractImports,
  170251. plugin: () => plugin
  170252. });
  170253. module.exports = __toCommonJS(src_exports);
  170254. // src/analyze.ts
  170255. var t = __toESM(require_lib2());
  170256. var import_estree_to_babel = __toESM(require_estree_to_babel());
  170257. var babelTraverse = __toESM(require_lib37());
  170258. // node_modules/bail/index.js
  170259. function bail(error) {
  170260. if (error) {
  170261. throw error;
  170262. }
  170263. }
  170264. // node_modules/unified/lib/index.js
  170265. var import_is_buffer2 = __toESM(require_is_buffer(), 1);
  170266. var import_extend = __toESM(require_extend(), 1);
  170267. // node_modules/is-plain-obj/index.js
  170268. function isPlainObject(value) {
  170269. if (Object.prototype.toString.call(value) !== "[object Object]") {
  170270. return false;
  170271. }
  170272. const prototype = Object.getPrototypeOf(value);
  170273. return prototype === null || prototype === Object.prototype;
  170274. }
  170275. // node_modules/trough/index.js
  170276. function trough() {
  170277. const fns = [];
  170278. const pipeline = { run, use };
  170279. return pipeline;
  170280. function run(...values) {
  170281. let middlewareIndex = -1;
  170282. const callback = values.pop();
  170283. if (typeof callback !== "function") {
  170284. throw new TypeError("Expected function as last argument, not " + callback);
  170285. }
  170286. next(null, ...values);
  170287. function next(error, ...output) {
  170288. const fn = fns[++middlewareIndex];
  170289. let index2 = -1;
  170290. if (error) {
  170291. callback(error);
  170292. return;
  170293. }
  170294. while (++index2 < values.length) {
  170295. if (output[index2] === null || output[index2] === void 0) {
  170296. output[index2] = values[index2];
  170297. }
  170298. }
  170299. values = output;
  170300. if (fn) {
  170301. wrap(fn, next)(...output);
  170302. } else {
  170303. callback(null, ...output);
  170304. }
  170305. }
  170306. }
  170307. function use(middelware) {
  170308. if (typeof middelware !== "function") {
  170309. throw new TypeError(
  170310. "Expected `middelware` to be a function, not " + middelware
  170311. );
  170312. }
  170313. fns.push(middelware);
  170314. return pipeline;
  170315. }
  170316. }
  170317. function wrap(middleware, callback) {
  170318. let called;
  170319. return wrapped;
  170320. function wrapped(...parameters) {
  170321. const fnExpectsCallback = middleware.length > parameters.length;
  170322. let result;
  170323. if (fnExpectsCallback) {
  170324. parameters.push(done);
  170325. }
  170326. try {
  170327. result = middleware(...parameters);
  170328. } catch (error) {
  170329. const exception = error;
  170330. if (fnExpectsCallback && called) {
  170331. throw exception;
  170332. }
  170333. return done(exception);
  170334. }
  170335. if (!fnExpectsCallback) {
  170336. if (result instanceof Promise) {
  170337. result.then(then, done);
  170338. } else if (result instanceof Error) {
  170339. done(result);
  170340. } else {
  170341. then(result);
  170342. }
  170343. }
  170344. }
  170345. function done(error, ...output) {
  170346. if (!called) {
  170347. called = true;
  170348. callback(error, ...output);
  170349. }
  170350. }
  170351. function then(value) {
  170352. done(null, value);
  170353. }
  170354. }
  170355. // node_modules/vfile/lib/index.js
  170356. var import_is_buffer = __toESM(require_is_buffer2(), 1);
  170357. // node_modules/unist-util-stringify-position/index.js
  170358. var own = {}.hasOwnProperty;
  170359. function stringifyPosition(value) {
  170360. if (!value || typeof value !== "object") {
  170361. return "";
  170362. }
  170363. if (own.call(value, "position") || own.call(value, "type")) {
  170364. return position(value.position);
  170365. }
  170366. if (own.call(value, "start") || own.call(value, "end")) {
  170367. return position(value);
  170368. }
  170369. if (own.call(value, "line") || own.call(value, "column")) {
  170370. return point(value);
  170371. }
  170372. return "";
  170373. }
  170374. function point(point3) {
  170375. return index(point3 && point3.line) + ":" + index(point3 && point3.column);
  170376. }
  170377. function position(pos) {
  170378. return point(pos && pos.start) + "-" + point(pos && pos.end);
  170379. }
  170380. function index(value) {
  170381. return value && typeof value === "number" ? value : 1;
  170382. }
  170383. // node_modules/vfile-message/index.js
  170384. var VFileMessage = class extends Error {
  170385. constructor(reason, place, origin) {
  170386. var parts = [null, null];
  170387. var position3 = {
  170388. start: { line: null, column: null },
  170389. end: { line: null, column: null }
  170390. };
  170391. var index2;
  170392. super();
  170393. if (typeof place === "string") {
  170394. origin = place;
  170395. place = null;
  170396. }
  170397. if (typeof origin === "string") {
  170398. index2 = origin.indexOf(":");
  170399. if (index2 === -1) {
  170400. parts[1] = origin;
  170401. } else {
  170402. parts[0] = origin.slice(0, index2);
  170403. parts[1] = origin.slice(index2 + 1);
  170404. }
  170405. }
  170406. if (place) {
  170407. if ("type" in place || "position" in place) {
  170408. if (place.position) {
  170409. position3 = place.position;
  170410. }
  170411. } else if ("start" in place || "end" in place) {
  170412. position3 = place;
  170413. } else if ("line" in place || "column" in place) {
  170414. position3.start = place;
  170415. }
  170416. }
  170417. this.name = stringifyPosition(place) || "1:1";
  170418. this.message = typeof reason === "object" ? reason.message : reason;
  170419. this.stack = typeof reason === "object" ? reason.stack : "";
  170420. this.reason = this.message;
  170421. this.fatal;
  170422. this.line = position3.start.line;
  170423. this.column = position3.start.column;
  170424. this.source = parts[0];
  170425. this.ruleId = parts[1];
  170426. this.position = position3;
  170427. this.actual;
  170428. this.expected;
  170429. this.file;
  170430. this.url;
  170431. this.note;
  170432. }
  170433. };
  170434. VFileMessage.prototype.file = "";
  170435. VFileMessage.prototype.name = "";
  170436. VFileMessage.prototype.reason = "";
  170437. VFileMessage.prototype.message = "";
  170438. VFileMessage.prototype.stack = "";
  170439. VFileMessage.prototype.fatal = null;
  170440. VFileMessage.prototype.column = null;
  170441. VFileMessage.prototype.line = null;
  170442. VFileMessage.prototype.source = null;
  170443. VFileMessage.prototype.ruleId = null;
  170444. VFileMessage.prototype.position = null;
  170445. // node_modules/vfile/lib/minpath.js
  170446. var import_path = __toESM(require("path"), 1);
  170447. // node_modules/vfile/lib/minproc.js
  170448. var import_process = __toESM(require("process"), 1);
  170449. // node_modules/vfile/lib/minurl.js
  170450. var import_url = require("url");
  170451. // node_modules/vfile/lib/minurl.shared.js
  170452. function isUrl(fileURLOrPath) {
  170453. return fileURLOrPath !== null && typeof fileURLOrPath === "object" && fileURLOrPath.href && fileURLOrPath.origin;
  170454. }
  170455. // node_modules/vfile/lib/index.js
  170456. var order = ["history", "path", "basename", "stem", "extname", "dirname"];
  170457. var VFile = class {
  170458. constructor(value) {
  170459. let options;
  170460. if (!value) {
  170461. options = {};
  170462. } else if (typeof value === "string" || (0, import_is_buffer.default)(value)) {
  170463. options = { value };
  170464. } else if (isUrl(value)) {
  170465. options = { path: value };
  170466. } else {
  170467. options = value;
  170468. }
  170469. this.data = {};
  170470. this.messages = [];
  170471. this.history = [];
  170472. this.cwd = import_process.default.cwd();
  170473. this.value;
  170474. this.stored;
  170475. this.result;
  170476. this.map;
  170477. let index2 = -1;
  170478. while (++index2 < order.length) {
  170479. const prop2 = order[index2];
  170480. if (prop2 in options && options[prop2] !== void 0) {
  170481. this[prop2] = prop2 === "history" ? [...options[prop2]] : options[prop2];
  170482. }
  170483. }
  170484. let prop;
  170485. for (prop in options) {
  170486. if (!order.includes(prop))
  170487. this[prop] = options[prop];
  170488. }
  170489. }
  170490. get path() {
  170491. return this.history[this.history.length - 1];
  170492. }
  170493. set path(path) {
  170494. if (isUrl(path)) {
  170495. path = (0, import_url.fileURLToPath)(path);
  170496. }
  170497. assertNonEmpty(path, "path");
  170498. if (this.path !== path) {
  170499. this.history.push(path);
  170500. }
  170501. }
  170502. get dirname() {
  170503. return typeof this.path === "string" ? import_path.default.dirname(this.path) : void 0;
  170504. }
  170505. set dirname(dirname) {
  170506. assertPath(this.basename, "dirname");
  170507. this.path = import_path.default.join(dirname || "", this.basename);
  170508. }
  170509. get basename() {
  170510. return typeof this.path === "string" ? import_path.default.basename(this.path) : void 0;
  170511. }
  170512. set basename(basename) {
  170513. assertNonEmpty(basename, "basename");
  170514. assertPart(basename, "basename");
  170515. this.path = import_path.default.join(this.dirname || "", basename);
  170516. }
  170517. get extname() {
  170518. return typeof this.path === "string" ? import_path.default.extname(this.path) : void 0;
  170519. }
  170520. set extname(extname) {
  170521. assertPart(extname, "extname");
  170522. assertPath(this.dirname, "extname");
  170523. if (extname) {
  170524. if (extname.charCodeAt(0) !== 46) {
  170525. throw new Error("`extname` must start with `.`");
  170526. }
  170527. if (extname.includes(".", 1)) {
  170528. throw new Error("`extname` cannot contain multiple dots");
  170529. }
  170530. }
  170531. this.path = import_path.default.join(this.dirname, this.stem + (extname || ""));
  170532. }
  170533. get stem() {
  170534. return typeof this.path === "string" ? import_path.default.basename(this.path, this.extname) : void 0;
  170535. }
  170536. set stem(stem) {
  170537. assertNonEmpty(stem, "stem");
  170538. assertPart(stem, "stem");
  170539. this.path = import_path.default.join(this.dirname || "", stem + (this.extname || ""));
  170540. }
  170541. toString(encoding) {
  170542. return (this.value || "").toString(encoding);
  170543. }
  170544. message(reason, place, origin) {
  170545. const message = new VFileMessage(reason, place, origin);
  170546. if (this.path) {
  170547. message.name = this.path + ":" + message.name;
  170548. message.file = this.path;
  170549. }
  170550. message.fatal = false;
  170551. this.messages.push(message);
  170552. return message;
  170553. }
  170554. info(reason, place, origin) {
  170555. const message = this.message(reason, place, origin);
  170556. message.fatal = null;
  170557. return message;
  170558. }
  170559. fail(reason, place, origin) {
  170560. const message = this.message(reason, place, origin);
  170561. message.fatal = true;
  170562. throw message;
  170563. }
  170564. };
  170565. function assertPart(part, name2) {
  170566. if (part && part.includes(import_path.default.sep)) {
  170567. throw new Error(
  170568. "`" + name2 + "` cannot be a path: did not expect `" + import_path.default.sep + "`"
  170569. );
  170570. }
  170571. }
  170572. function assertNonEmpty(part, name2) {
  170573. if (!part) {
  170574. throw new Error("`" + name2 + "` cannot be empty");
  170575. }
  170576. }
  170577. function assertPath(path, name2) {
  170578. if (!path) {
  170579. throw new Error("Setting `" + name2 + "` requires `path` to be set too");
  170580. }
  170581. }
  170582. // node_modules/unified/lib/index.js
  170583. var unified = base().freeze();
  170584. var own2 = {}.hasOwnProperty;
  170585. function base() {
  170586. const transformers = trough();
  170587. const attachers = [];
  170588. let namespace = {};
  170589. let frozen;
  170590. let freezeIndex = -1;
  170591. processor.data = data2;
  170592. processor.Parser = void 0;
  170593. processor.Compiler = void 0;
  170594. processor.freeze = freeze;
  170595. processor.attachers = attachers;
  170596. processor.use = use;
  170597. processor.parse = parse4;
  170598. processor.stringify = stringify4;
  170599. processor.run = run;
  170600. processor.runSync = runSync;
  170601. processor.process = process3;
  170602. processor.processSync = processSync;
  170603. return processor;
  170604. function processor() {
  170605. const destination = base();
  170606. let index2 = -1;
  170607. while (++index2 < attachers.length) {
  170608. destination.use(...attachers[index2]);
  170609. }
  170610. destination.data((0, import_extend.default)(true, {}, namespace));
  170611. return destination;
  170612. }
  170613. function data2(key, value) {
  170614. if (typeof key === "string") {
  170615. if (arguments.length === 2) {
  170616. assertUnfrozen("data", frozen);
  170617. namespace[key] = value;
  170618. return processor;
  170619. }
  170620. return own2.call(namespace, key) && namespace[key] || null;
  170621. }
  170622. if (key) {
  170623. assertUnfrozen("data", frozen);
  170624. namespace = key;
  170625. return processor;
  170626. }
  170627. return namespace;
  170628. }
  170629. function freeze() {
  170630. if (frozen) {
  170631. return processor;
  170632. }
  170633. while (++freezeIndex < attachers.length) {
  170634. const [attacher, ...options] = attachers[freezeIndex];
  170635. if (options[0] === false) {
  170636. continue;
  170637. }
  170638. if (options[0] === true) {
  170639. options[1] = void 0;
  170640. }
  170641. const transformer = attacher.call(processor, ...options);
  170642. if (typeof transformer === "function") {
  170643. transformers.use(transformer);
  170644. }
  170645. }
  170646. frozen = true;
  170647. freezeIndex = Number.POSITIVE_INFINITY;
  170648. return processor;
  170649. }
  170650. function use(value, ...options) {
  170651. let settings;
  170652. assertUnfrozen("use", frozen);
  170653. if (value === null || value === void 0) {
  170654. } else if (typeof value === "function") {
  170655. addPlugin(value, ...options);
  170656. } else if (typeof value === "object") {
  170657. if (Array.isArray(value)) {
  170658. addList(value);
  170659. } else {
  170660. addPreset(value);
  170661. }
  170662. } else {
  170663. throw new TypeError("Expected usable value, not `" + value + "`");
  170664. }
  170665. if (settings) {
  170666. namespace.settings = Object.assign(namespace.settings || {}, settings);
  170667. }
  170668. return processor;
  170669. function add(value2) {
  170670. if (typeof value2 === "function") {
  170671. addPlugin(value2);
  170672. } else if (typeof value2 === "object") {
  170673. if (Array.isArray(value2)) {
  170674. const [plugin2, ...options2] = value2;
  170675. addPlugin(plugin2, ...options2);
  170676. } else {
  170677. addPreset(value2);
  170678. }
  170679. } else {
  170680. throw new TypeError("Expected usable value, not `" + value2 + "`");
  170681. }
  170682. }
  170683. function addPreset(result) {
  170684. addList(result.plugins);
  170685. if (result.settings) {
  170686. settings = Object.assign(settings || {}, result.settings);
  170687. }
  170688. }
  170689. function addList(plugins) {
  170690. let index2 = -1;
  170691. if (plugins === null || plugins === void 0) {
  170692. } else if (Array.isArray(plugins)) {
  170693. while (++index2 < plugins.length) {
  170694. const thing = plugins[index2];
  170695. add(thing);
  170696. }
  170697. } else {
  170698. throw new TypeError("Expected a list of plugins, not `" + plugins + "`");
  170699. }
  170700. }
  170701. function addPlugin(plugin2, value2) {
  170702. let index2 = -1;
  170703. let entry;
  170704. while (++index2 < attachers.length) {
  170705. if (attachers[index2][0] === plugin2) {
  170706. entry = attachers[index2];
  170707. break;
  170708. }
  170709. }
  170710. if (entry) {
  170711. if (isPlainObject(entry[1]) && isPlainObject(value2)) {
  170712. value2 = (0, import_extend.default)(true, entry[1], value2);
  170713. }
  170714. entry[1] = value2;
  170715. } else {
  170716. attachers.push([...arguments]);
  170717. }
  170718. }
  170719. }
  170720. function parse4(doc) {
  170721. processor.freeze();
  170722. const file = vfile(doc);
  170723. const Parser3 = processor.Parser;
  170724. assertParser("parse", Parser3);
  170725. if (newable(Parser3, "parse")) {
  170726. return new Parser3(String(file), file).parse();
  170727. }
  170728. return Parser3(String(file), file);
  170729. }
  170730. function stringify4(node, doc) {
  170731. processor.freeze();
  170732. const file = vfile(doc);
  170733. const Compiler = processor.Compiler;
  170734. assertCompiler("stringify", Compiler);
  170735. assertNode(node);
  170736. if (newable(Compiler, "compile")) {
  170737. return new Compiler(node, file).compile();
  170738. }
  170739. return Compiler(node, file);
  170740. }
  170741. function run(node, doc, callback) {
  170742. assertNode(node);
  170743. processor.freeze();
  170744. if (!callback && typeof doc === "function") {
  170745. callback = doc;
  170746. doc = void 0;
  170747. }
  170748. if (!callback) {
  170749. return new Promise(executor);
  170750. }
  170751. executor(null, callback);
  170752. function executor(resolve, reject) {
  170753. transformers.run(node, vfile(doc), done);
  170754. function done(error, tree, file) {
  170755. tree = tree || node;
  170756. if (error) {
  170757. reject(error);
  170758. } else if (resolve) {
  170759. resolve(tree);
  170760. } else {
  170761. callback(null, tree, file);
  170762. }
  170763. }
  170764. }
  170765. }
  170766. function runSync(node, file) {
  170767. let result;
  170768. let complete;
  170769. processor.run(node, file, done);
  170770. assertDone("runSync", "run", complete);
  170771. return result;
  170772. function done(error, tree) {
  170773. bail(error);
  170774. result = tree;
  170775. complete = true;
  170776. }
  170777. }
  170778. function process3(doc, callback) {
  170779. processor.freeze();
  170780. assertParser("process", processor.Parser);
  170781. assertCompiler("process", processor.Compiler);
  170782. if (!callback) {
  170783. return new Promise(executor);
  170784. }
  170785. executor(null, callback);
  170786. function executor(resolve, reject) {
  170787. const file = vfile(doc);
  170788. processor.run(processor.parse(file), file, (error, tree, file2) => {
  170789. if (error || !tree || !file2) {
  170790. done(error);
  170791. } else {
  170792. const result = processor.stringify(tree, file2);
  170793. if (result === void 0 || result === null) {
  170794. } else if (looksLikeAVFileValue(result)) {
  170795. file2.value = result;
  170796. } else {
  170797. file2.result = result;
  170798. }
  170799. done(error, file2);
  170800. }
  170801. });
  170802. function done(error, file2) {
  170803. if (error || !file2) {
  170804. reject(error);
  170805. } else if (resolve) {
  170806. resolve(file2);
  170807. } else {
  170808. callback(null, file2);
  170809. }
  170810. }
  170811. }
  170812. }
  170813. function processSync(doc) {
  170814. let complete;
  170815. processor.freeze();
  170816. assertParser("processSync", processor.Parser);
  170817. assertCompiler("processSync", processor.Compiler);
  170818. const file = vfile(doc);
  170819. processor.process(file, done);
  170820. assertDone("processSync", "process", complete);
  170821. return file;
  170822. function done(error) {
  170823. complete = true;
  170824. bail(error);
  170825. }
  170826. }
  170827. }
  170828. function newable(value, name2) {
  170829. return typeof value === "function" && value.prototype && (keys(value.prototype) || name2 in value.prototype);
  170830. }
  170831. function keys(value) {
  170832. let key;
  170833. for (key in value) {
  170834. if (own2.call(value, key)) {
  170835. return true;
  170836. }
  170837. }
  170838. return false;
  170839. }
  170840. function assertParser(name2, value) {
  170841. if (typeof value !== "function") {
  170842. throw new TypeError("Cannot `" + name2 + "` without `Parser`");
  170843. }
  170844. }
  170845. function assertCompiler(name2, value) {
  170846. if (typeof value !== "function") {
  170847. throw new TypeError("Cannot `" + name2 + "` without `Compiler`");
  170848. }
  170849. }
  170850. function assertUnfrozen(name2, frozen) {
  170851. if (frozen) {
  170852. throw new Error(
  170853. "Cannot call `" + name2 + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`."
  170854. );
  170855. }
  170856. }
  170857. function assertNode(node) {
  170858. if (!isPlainObject(node) || typeof node.type !== "string") {
  170859. throw new TypeError("Expected node, got `" + node + "`");
  170860. }
  170861. }
  170862. function assertDone(name2, asyncName, complete) {
  170863. if (!complete) {
  170864. throw new Error(
  170865. "`" + name2 + "` finished async. Use `" + asyncName + "` instead"
  170866. );
  170867. }
  170868. }
  170869. function vfile(value) {
  170870. return looksLikeAVFile(value) ? value : new VFile(value);
  170871. }
  170872. function looksLikeAVFile(value) {
  170873. return Boolean(
  170874. value && typeof value === "object" && "message" in value && "messages" in value
  170875. );
  170876. }
  170877. function looksLikeAVFileValue(value) {
  170878. return typeof value === "string" || (0, import_is_buffer2.default)(value);
  170879. }
  170880. // node_modules/acorn/dist/acorn.mjs
  170881. var reservedWords = {
  170882. 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
  170883. 5: "class enum extends super const export import",
  170884. 6: "enum",
  170885. strict: "implements interface let package private protected public static yield",
  170886. strictBind: "eval arguments"
  170887. };
  170888. var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
  170889. var keywords$1 = {
  170890. 5: ecma5AndLessKeywords,
  170891. "5module": ecma5AndLessKeywords + " export import",
  170892. 6: ecma5AndLessKeywords + " const class extends export import super"
  170893. };
  170894. var keywordRelationalOperator = /^in(stanceof)?$/;
  170895. 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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\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-\u1B4C\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-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  170896. 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\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  170897. var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
  170898. var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
  170899. nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
  170900. 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, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 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, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 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, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  170901. var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 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, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  170902. function isInAstralSet(code2, set) {
  170903. var pos = 65536;
  170904. for (var i = 0; i < set.length; i += 2) {
  170905. pos += set[i];
  170906. if (pos > code2) {
  170907. return false;
  170908. }
  170909. pos += set[i + 1];
  170910. if (pos >= code2) {
  170911. return true;
  170912. }
  170913. }
  170914. }
  170915. function isIdentifierStart(code2, astral) {
  170916. if (code2 < 65) {
  170917. return code2 === 36;
  170918. }
  170919. if (code2 < 91) {
  170920. return true;
  170921. }
  170922. if (code2 < 97) {
  170923. return code2 === 95;
  170924. }
  170925. if (code2 < 123) {
  170926. return true;
  170927. }
  170928. if (code2 <= 65535) {
  170929. return code2 >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code2));
  170930. }
  170931. if (astral === false) {
  170932. return false;
  170933. }
  170934. return isInAstralSet(code2, astralIdentifierStartCodes);
  170935. }
  170936. function isIdentifierChar(code2, astral) {
  170937. if (code2 < 48) {
  170938. return code2 === 36;
  170939. }
  170940. if (code2 < 58) {
  170941. return true;
  170942. }
  170943. if (code2 < 65) {
  170944. return false;
  170945. }
  170946. if (code2 < 91) {
  170947. return true;
  170948. }
  170949. if (code2 < 97) {
  170950. return code2 === 95;
  170951. }
  170952. if (code2 < 123) {
  170953. return true;
  170954. }
  170955. if (code2 <= 65535) {
  170956. return code2 >= 170 && nonASCIIidentifier.test(String.fromCharCode(code2));
  170957. }
  170958. if (astral === false) {
  170959. return false;
  170960. }
  170961. return isInAstralSet(code2, astralIdentifierStartCodes) || isInAstralSet(code2, astralIdentifierCodes);
  170962. }
  170963. var TokenType = function TokenType2(label, conf) {
  170964. if (conf === void 0)
  170965. conf = {};
  170966. this.label = label;
  170967. this.keyword = conf.keyword;
  170968. this.beforeExpr = !!conf.beforeExpr;
  170969. this.startsExpr = !!conf.startsExpr;
  170970. this.isLoop = !!conf.isLoop;
  170971. this.isAssign = !!conf.isAssign;
  170972. this.prefix = !!conf.prefix;
  170973. this.postfix = !!conf.postfix;
  170974. this.binop = conf.binop || null;
  170975. this.updateContext = null;
  170976. };
  170977. function binop(name2, prec) {
  170978. return new TokenType(name2, { beforeExpr: true, binop: prec });
  170979. }
  170980. var beforeExpr = { beforeExpr: true };
  170981. var startsExpr = { startsExpr: true };
  170982. var keywords = {};
  170983. function kw(name2, options) {
  170984. if (options === void 0)
  170985. options = {};
  170986. options.keyword = name2;
  170987. return keywords[name2] = new TokenType(name2, options);
  170988. }
  170989. var types$1 = {
  170990. num: new TokenType("num", startsExpr),
  170991. regexp: new TokenType("regexp", startsExpr),
  170992. string: new TokenType("string", startsExpr),
  170993. name: new TokenType("name", startsExpr),
  170994. privateId: new TokenType("privateId", startsExpr),
  170995. eof: new TokenType("eof"),
  170996. bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
  170997. bracketR: new TokenType("]"),
  170998. braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
  170999. braceR: new TokenType("}"),
  171000. parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
  171001. parenR: new TokenType(")"),
  171002. comma: new TokenType(",", beforeExpr),
  171003. semi: new TokenType(";", beforeExpr),
  171004. colon: new TokenType(":", beforeExpr),
  171005. dot: new TokenType("."),
  171006. question: new TokenType("?", beforeExpr),
  171007. questionDot: new TokenType("?."),
  171008. arrow: new TokenType("=>", beforeExpr),
  171009. template: new TokenType("template"),
  171010. invalidTemplate: new TokenType("invalidTemplate"),
  171011. ellipsis: new TokenType("...", beforeExpr),
  171012. backQuote: new TokenType("`", startsExpr),
  171013. dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),
  171014. eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
  171015. assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
  171016. incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
  171017. prefix: new TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }),
  171018. logicalOR: binop("||", 1),
  171019. logicalAND: binop("&&", 2),
  171020. bitwiseOR: binop("|", 3),
  171021. bitwiseXOR: binop("^", 4),
  171022. bitwiseAND: binop("&", 5),
  171023. equality: binop("==/!=/===/!==", 6),
  171024. relational: binop("</>/<=/>=", 7),
  171025. bitShift: binop("<</>>/>>>", 8),
  171026. plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
  171027. modulo: binop("%", 10),
  171028. star: binop("*", 10),
  171029. slash: binop("/", 10),
  171030. starstar: new TokenType("**", { beforeExpr: true }),
  171031. coalesce: binop("??", 1),
  171032. _break: kw("break"),
  171033. _case: kw("case", beforeExpr),
  171034. _catch: kw("catch"),
  171035. _continue: kw("continue"),
  171036. _debugger: kw("debugger"),
  171037. _default: kw("default", beforeExpr),
  171038. _do: kw("do", { isLoop: true, beforeExpr: true }),
  171039. _else: kw("else", beforeExpr),
  171040. _finally: kw("finally"),
  171041. _for: kw("for", { isLoop: true }),
  171042. _function: kw("function", startsExpr),
  171043. _if: kw("if"),
  171044. _return: kw("return", beforeExpr),
  171045. _switch: kw("switch"),
  171046. _throw: kw("throw", beforeExpr),
  171047. _try: kw("try"),
  171048. _var: kw("var"),
  171049. _const: kw("const"),
  171050. _while: kw("while", { isLoop: true }),
  171051. _with: kw("with"),
  171052. _new: kw("new", { beforeExpr: true, startsExpr: true }),
  171053. _this: kw("this", startsExpr),
  171054. _super: kw("super", startsExpr),
  171055. _class: kw("class", startsExpr),
  171056. _extends: kw("extends", beforeExpr),
  171057. _export: kw("export"),
  171058. _import: kw("import", startsExpr),
  171059. _null: kw("null", startsExpr),
  171060. _true: kw("true", startsExpr),
  171061. _false: kw("false", startsExpr),
  171062. _in: kw("in", { beforeExpr: true, binop: 7 }),
  171063. _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }),
  171064. _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }),
  171065. _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }),
  171066. _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true })
  171067. };
  171068. var lineBreak = /\r\n?|\n|\u2028|\u2029/;
  171069. var lineBreakG = new RegExp(lineBreak.source, "g");
  171070. function isNewLine(code2) {
  171071. return code2 === 10 || code2 === 13 || code2 === 8232 || code2 === 8233;
  171072. }
  171073. function nextLineBreak(code2, from, end) {
  171074. if (end === void 0)
  171075. end = code2.length;
  171076. for (var i = from; i < end; i++) {
  171077. var next = code2.charCodeAt(i);
  171078. if (isNewLine(next)) {
  171079. return i < end - 1 && next === 13 && code2.charCodeAt(i + 1) === 10 ? i + 2 : i + 1;
  171080. }
  171081. }
  171082. return -1;
  171083. }
  171084. var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
  171085. var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  171086. var ref = Object.prototype;
  171087. var hasOwnProperty = ref.hasOwnProperty;
  171088. var toString = ref.toString;
  171089. var hasOwn = Object.hasOwn || function(obj, propName) {
  171090. return hasOwnProperty.call(obj, propName);
  171091. };
  171092. var isArray = Array.isArray || function(obj) {
  171093. return toString.call(obj) === "[object Array]";
  171094. };
  171095. function wordsRegexp(words) {
  171096. return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
  171097. }
  171098. var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
  171099. var Position = function Position2(line, col) {
  171100. this.line = line;
  171101. this.column = col;
  171102. };
  171103. Position.prototype.offset = function offset(n) {
  171104. return new Position(this.line, this.column + n);
  171105. };
  171106. var SourceLocation = function SourceLocation2(p, start3, end) {
  171107. this.start = start3;
  171108. this.end = end;
  171109. if (p.sourceFile !== null) {
  171110. this.source = p.sourceFile;
  171111. }
  171112. };
  171113. function getLineInfo(input, offset2) {
  171114. for (var line = 1, cur = 0; ; ) {
  171115. var nextBreak = nextLineBreak(input, cur, offset2);
  171116. if (nextBreak < 0) {
  171117. return new Position(line, offset2 - cur);
  171118. }
  171119. ++line;
  171120. cur = nextBreak;
  171121. }
  171122. }
  171123. var defaultOptions = {
  171124. ecmaVersion: null,
  171125. sourceType: "script",
  171126. onInsertedSemicolon: null,
  171127. onTrailingComma: null,
  171128. allowReserved: null,
  171129. allowReturnOutsideFunction: false,
  171130. allowImportExportEverywhere: false,
  171131. allowAwaitOutsideFunction: null,
  171132. allowSuperOutsideMethod: null,
  171133. allowHashBang: false,
  171134. locations: false,
  171135. onToken: null,
  171136. onComment: null,
  171137. ranges: false,
  171138. program: null,
  171139. sourceFile: null,
  171140. directSourceFile: null,
  171141. preserveParens: false
  171142. };
  171143. var warnedAboutEcmaVersion = false;
  171144. function getOptions(opts) {
  171145. var options = {};
  171146. for (var opt in defaultOptions) {
  171147. options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt];
  171148. }
  171149. if (options.ecmaVersion === "latest") {
  171150. options.ecmaVersion = 1e8;
  171151. } else if (options.ecmaVersion == null) {
  171152. if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) {
  171153. warnedAboutEcmaVersion = true;
  171154. console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.");
  171155. }
  171156. options.ecmaVersion = 11;
  171157. } else if (options.ecmaVersion >= 2015) {
  171158. options.ecmaVersion -= 2009;
  171159. }
  171160. if (options.allowReserved == null) {
  171161. options.allowReserved = options.ecmaVersion < 5;
  171162. }
  171163. if (isArray(options.onToken)) {
  171164. var tokens = options.onToken;
  171165. options.onToken = function(token) {
  171166. return tokens.push(token);
  171167. };
  171168. }
  171169. if (isArray(options.onComment)) {
  171170. options.onComment = pushComment(options, options.onComment);
  171171. }
  171172. return options;
  171173. }
  171174. function pushComment(options, array) {
  171175. return function(block, text5, start3, end, startLoc, endLoc) {
  171176. var comment2 = {
  171177. type: block ? "Block" : "Line",
  171178. value: text5,
  171179. start: start3,
  171180. end
  171181. };
  171182. if (options.locations) {
  171183. comment2.loc = new SourceLocation(this, startLoc, endLoc);
  171184. }
  171185. if (options.ranges) {
  171186. comment2.range = [start3, end];
  171187. }
  171188. array.push(comment2);
  171189. };
  171190. }
  171191. var SCOPE_TOP = 1;
  171192. var SCOPE_FUNCTION = 2;
  171193. var SCOPE_ASYNC = 4;
  171194. var SCOPE_GENERATOR = 8;
  171195. var SCOPE_ARROW = 16;
  171196. var SCOPE_SIMPLE_CATCH = 32;
  171197. var SCOPE_SUPER = 64;
  171198. var SCOPE_DIRECT_SUPER = 128;
  171199. var SCOPE_CLASS_STATIC_BLOCK = 256;
  171200. var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
  171201. function functionFlags(async, generator) {
  171202. return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
  171203. }
  171204. var BIND_NONE = 0;
  171205. var BIND_VAR = 1;
  171206. var BIND_LEXICAL = 2;
  171207. var BIND_FUNCTION = 3;
  171208. var BIND_SIMPLE_CATCH = 4;
  171209. var BIND_OUTSIDE = 5;
  171210. var Parser = function Parser2(options, input, startPos) {
  171211. this.options = options = getOptions(options);
  171212. this.sourceFile = options.sourceFile;
  171213. this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
  171214. var reserved = "";
  171215. if (options.allowReserved !== true) {
  171216. reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];
  171217. if (options.sourceType === "module") {
  171218. reserved += " await";
  171219. }
  171220. }
  171221. this.reservedWords = wordsRegexp(reserved);
  171222. var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
  171223. this.reservedWordsStrict = wordsRegexp(reservedStrict);
  171224. this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
  171225. this.input = String(input);
  171226. this.containsEsc = false;
  171227. if (startPos) {
  171228. this.pos = startPos;
  171229. this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
  171230. this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
  171231. } else {
  171232. this.pos = this.lineStart = 0;
  171233. this.curLine = 1;
  171234. }
  171235. this.type = types$1.eof;
  171236. this.value = null;
  171237. this.start = this.end = this.pos;
  171238. this.startLoc = this.endLoc = this.curPosition();
  171239. this.lastTokEndLoc = this.lastTokStartLoc = null;
  171240. this.lastTokStart = this.lastTokEnd = this.pos;
  171241. this.context = this.initialContext();
  171242. this.exprAllowed = true;
  171243. this.inModule = options.sourceType === "module";
  171244. this.strict = this.inModule || this.strictDirective(this.pos);
  171245. this.potentialArrowAt = -1;
  171246. this.potentialArrowInForAwait = false;
  171247. this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
  171248. this.labels = [];
  171249. this.undefinedExports = /* @__PURE__ */ Object.create(null);
  171250. if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
  171251. this.skipLineComment(2);
  171252. }
  171253. this.scopeStack = [];
  171254. this.enterScope(SCOPE_TOP);
  171255. this.regexpState = null;
  171256. this.privateNameStack = [];
  171257. };
  171258. var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
  171259. Parser.prototype.parse = function parse() {
  171260. var node = this.options.program || this.startNode();
  171261. this.nextToken();
  171262. return this.parseTopLevel(node);
  171263. };
  171264. prototypeAccessors.inFunction.get = function() {
  171265. return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
  171266. };
  171267. prototypeAccessors.inGenerator.get = function() {
  171268. return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit;
  171269. };
  171270. prototypeAccessors.inAsync.get = function() {
  171271. return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit;
  171272. };
  171273. prototypeAccessors.canAwait.get = function() {
  171274. for (var i = this.scopeStack.length - 1; i >= 0; i--) {
  171275. var scope = this.scopeStack[i];
  171276. if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) {
  171277. return false;
  171278. }
  171279. if (scope.flags & SCOPE_FUNCTION) {
  171280. return (scope.flags & SCOPE_ASYNC) > 0;
  171281. }
  171282. }
  171283. return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
  171284. };
  171285. prototypeAccessors.allowSuper.get = function() {
  171286. var ref2 = this.currentThisScope();
  171287. var flags = ref2.flags;
  171288. var inClassFieldInit = ref2.inClassFieldInit;
  171289. return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
  171290. };
  171291. prototypeAccessors.allowDirectSuper.get = function() {
  171292. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
  171293. };
  171294. prototypeAccessors.treatFunctionsAsVar.get = function() {
  171295. return this.treatFunctionsAsVarInScope(this.currentScope());
  171296. };
  171297. prototypeAccessors.allowNewDotTarget.get = function() {
  171298. var ref2 = this.currentThisScope();
  171299. var flags = ref2.flags;
  171300. var inClassFieldInit = ref2.inClassFieldInit;
  171301. return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit;
  171302. };
  171303. prototypeAccessors.inClassStaticBlock.get = function() {
  171304. return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
  171305. };
  171306. Parser.extend = function extend2() {
  171307. var plugins = [], len = arguments.length;
  171308. while (len--)
  171309. plugins[len] = arguments[len];
  171310. var cls = this;
  171311. for (var i = 0; i < plugins.length; i++) {
  171312. cls = plugins[i](cls);
  171313. }
  171314. return cls;
  171315. };
  171316. Parser.parse = function parse2(input, options) {
  171317. return new this(options, input).parse();
  171318. };
  171319. Parser.parseExpressionAt = function parseExpressionAt(input, pos, options) {
  171320. var parser = new this(options, input, pos);
  171321. parser.nextToken();
  171322. return parser.parseExpression();
  171323. };
  171324. Parser.tokenizer = function tokenizer(input, options) {
  171325. return new this(options, input);
  171326. };
  171327. Object.defineProperties(Parser.prototype, prototypeAccessors);
  171328. var pp$9 = Parser.prototype;
  171329. var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
  171330. pp$9.strictDirective = function(start3) {
  171331. for (; ; ) {
  171332. skipWhiteSpace.lastIndex = start3;
  171333. start3 += skipWhiteSpace.exec(this.input)[0].length;
  171334. var match = literal.exec(this.input.slice(start3));
  171335. if (!match) {
  171336. return false;
  171337. }
  171338. if ((match[1] || match[2]) === "use strict") {
  171339. skipWhiteSpace.lastIndex = start3 + match[0].length;
  171340. var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
  171341. var next = this.input.charAt(end);
  171342. return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
  171343. }
  171344. start3 += match[0].length;
  171345. skipWhiteSpace.lastIndex = start3;
  171346. start3 += skipWhiteSpace.exec(this.input)[0].length;
  171347. if (this.input[start3] === ";") {
  171348. start3++;
  171349. }
  171350. }
  171351. };
  171352. pp$9.eat = function(type) {
  171353. if (this.type === type) {
  171354. this.next();
  171355. return true;
  171356. } else {
  171357. return false;
  171358. }
  171359. };
  171360. pp$9.isContextual = function(name2) {
  171361. return this.type === types$1.name && this.value === name2 && !this.containsEsc;
  171362. };
  171363. pp$9.eatContextual = function(name2) {
  171364. if (!this.isContextual(name2)) {
  171365. return false;
  171366. }
  171367. this.next();
  171368. return true;
  171369. };
  171370. pp$9.expectContextual = function(name2) {
  171371. if (!this.eatContextual(name2)) {
  171372. this.unexpected();
  171373. }
  171374. };
  171375. pp$9.canInsertSemicolon = function() {
  171376. return this.type === types$1.eof || this.type === types$1.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  171377. };
  171378. pp$9.insertSemicolon = function() {
  171379. if (this.canInsertSemicolon()) {
  171380. if (this.options.onInsertedSemicolon) {
  171381. this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
  171382. }
  171383. return true;
  171384. }
  171385. };
  171386. pp$9.semicolon = function() {
  171387. if (!this.eat(types$1.semi) && !this.insertSemicolon()) {
  171388. this.unexpected();
  171389. }
  171390. };
  171391. pp$9.afterTrailingComma = function(tokType, notNext) {
  171392. if (this.type === tokType) {
  171393. if (this.options.onTrailingComma) {
  171394. this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
  171395. }
  171396. if (!notNext) {
  171397. this.next();
  171398. }
  171399. return true;
  171400. }
  171401. };
  171402. pp$9.expect = function(type) {
  171403. this.eat(type) || this.unexpected();
  171404. };
  171405. pp$9.unexpected = function(pos) {
  171406. this.raise(pos != null ? pos : this.start, "Unexpected token");
  171407. };
  171408. function DestructuringErrors() {
  171409. this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
  171410. }
  171411. pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
  171412. if (!refDestructuringErrors) {
  171413. return;
  171414. }
  171415. if (refDestructuringErrors.trailingComma > -1) {
  171416. this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
  171417. }
  171418. var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
  171419. if (parens > -1) {
  171420. this.raiseRecoverable(parens, "Parenthesized pattern");
  171421. }
  171422. };
  171423. pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
  171424. if (!refDestructuringErrors) {
  171425. return false;
  171426. }
  171427. var shorthandAssign = refDestructuringErrors.shorthandAssign;
  171428. var doubleProto = refDestructuringErrors.doubleProto;
  171429. if (!andThrow) {
  171430. return shorthandAssign >= 0 || doubleProto >= 0;
  171431. }
  171432. if (shorthandAssign >= 0) {
  171433. this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
  171434. }
  171435. if (doubleProto >= 0) {
  171436. this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
  171437. }
  171438. };
  171439. pp$9.checkYieldAwaitInDefaultParams = function() {
  171440. if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
  171441. this.raise(this.yieldPos, "Yield expression cannot be a default value");
  171442. }
  171443. if (this.awaitPos) {
  171444. this.raise(this.awaitPos, "Await expression cannot be a default value");
  171445. }
  171446. };
  171447. pp$9.isSimpleAssignTarget = function(expr) {
  171448. if (expr.type === "ParenthesizedExpression") {
  171449. return this.isSimpleAssignTarget(expr.expression);
  171450. }
  171451. return expr.type === "Identifier" || expr.type === "MemberExpression";
  171452. };
  171453. var pp$8 = Parser.prototype;
  171454. pp$8.parseTopLevel = function(node) {
  171455. var exports = /* @__PURE__ */ Object.create(null);
  171456. if (!node.body) {
  171457. node.body = [];
  171458. }
  171459. while (this.type !== types$1.eof) {
  171460. var stmt = this.parseStatement(null, true, exports);
  171461. node.body.push(stmt);
  171462. }
  171463. if (this.inModule) {
  171464. for (var i = 0, list3 = Object.keys(this.undefinedExports); i < list3.length; i += 1) {
  171465. var name2 = list3[i];
  171466. this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
  171467. }
  171468. }
  171469. this.adaptDirectivePrologue(node.body);
  171470. this.next();
  171471. node.sourceType = this.options.sourceType;
  171472. return this.finishNode(node, "Program");
  171473. };
  171474. var loopLabel = { kind: "loop" };
  171475. var switchLabel = { kind: "switch" };
  171476. pp$8.isLet = function(context) {
  171477. if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
  171478. return false;
  171479. }
  171480. skipWhiteSpace.lastIndex = this.pos;
  171481. var skip = skipWhiteSpace.exec(this.input);
  171482. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  171483. if (nextCh === 91 || nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  171484. return true;
  171485. }
  171486. if (context) {
  171487. return false;
  171488. }
  171489. if (nextCh === 123) {
  171490. return true;
  171491. }
  171492. if (isIdentifierStart(nextCh, true)) {
  171493. var pos = next + 1;
  171494. while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) {
  171495. ++pos;
  171496. }
  171497. if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  171498. return true;
  171499. }
  171500. var ident = this.input.slice(next, pos);
  171501. if (!keywordRelationalOperator.test(ident)) {
  171502. return true;
  171503. }
  171504. }
  171505. return false;
  171506. };
  171507. pp$8.isAsyncFunction = function() {
  171508. if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
  171509. return false;
  171510. }
  171511. skipWhiteSpace.lastIndex = this.pos;
  171512. var skip = skipWhiteSpace.exec(this.input);
  171513. var next = this.pos + skip[0].length, after;
  171514. return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
  171515. };
  171516. pp$8.parseStatement = function(context, topLevel, exports) {
  171517. var starttype = this.type, node = this.startNode(), kind;
  171518. if (this.isLet(context)) {
  171519. starttype = types$1._var;
  171520. kind = "let";
  171521. }
  171522. switch (starttype) {
  171523. case types$1._break:
  171524. case types$1._continue:
  171525. return this.parseBreakContinueStatement(node, starttype.keyword);
  171526. case types$1._debugger:
  171527. return this.parseDebuggerStatement(node);
  171528. case types$1._do:
  171529. return this.parseDoStatement(node);
  171530. case types$1._for:
  171531. return this.parseForStatement(node);
  171532. case types$1._function:
  171533. if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
  171534. this.unexpected();
  171535. }
  171536. return this.parseFunctionStatement(node, false, !context);
  171537. case types$1._class:
  171538. if (context) {
  171539. this.unexpected();
  171540. }
  171541. return this.parseClass(node, true);
  171542. case types$1._if:
  171543. return this.parseIfStatement(node);
  171544. case types$1._return:
  171545. return this.parseReturnStatement(node);
  171546. case types$1._switch:
  171547. return this.parseSwitchStatement(node);
  171548. case types$1._throw:
  171549. return this.parseThrowStatement(node);
  171550. case types$1._try:
  171551. return this.parseTryStatement(node);
  171552. case types$1._const:
  171553. case types$1._var:
  171554. kind = kind || this.value;
  171555. if (context && kind !== "var") {
  171556. this.unexpected();
  171557. }
  171558. return this.parseVarStatement(node, kind);
  171559. case types$1._while:
  171560. return this.parseWhileStatement(node);
  171561. case types$1._with:
  171562. return this.parseWithStatement(node);
  171563. case types$1.braceL:
  171564. return this.parseBlock(true, node);
  171565. case types$1.semi:
  171566. return this.parseEmptyStatement(node);
  171567. case types$1._export:
  171568. case types$1._import:
  171569. if (this.options.ecmaVersion > 10 && starttype === types$1._import) {
  171570. skipWhiteSpace.lastIndex = this.pos;
  171571. var skip = skipWhiteSpace.exec(this.input);
  171572. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  171573. if (nextCh === 40 || nextCh === 46) {
  171574. return this.parseExpressionStatement(node, this.parseExpression());
  171575. }
  171576. }
  171577. if (!this.options.allowImportExportEverywhere) {
  171578. if (!topLevel) {
  171579. this.raise(this.start, "'import' and 'export' may only appear at the top level");
  171580. }
  171581. if (!this.inModule) {
  171582. this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
  171583. }
  171584. }
  171585. return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports);
  171586. default:
  171587. if (this.isAsyncFunction()) {
  171588. if (context) {
  171589. this.unexpected();
  171590. }
  171591. this.next();
  171592. return this.parseFunctionStatement(node, true, !context);
  171593. }
  171594. var maybeName = this.value, expr = this.parseExpression();
  171595. if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
  171596. return this.parseLabeledStatement(node, maybeName, expr, context);
  171597. } else {
  171598. return this.parseExpressionStatement(node, expr);
  171599. }
  171600. }
  171601. };
  171602. pp$8.parseBreakContinueStatement = function(node, keyword) {
  171603. var isBreak = keyword === "break";
  171604. this.next();
  171605. if (this.eat(types$1.semi) || this.insertSemicolon()) {
  171606. node.label = null;
  171607. } else if (this.type !== types$1.name) {
  171608. this.unexpected();
  171609. } else {
  171610. node.label = this.parseIdent();
  171611. this.semicolon();
  171612. }
  171613. var i = 0;
  171614. for (; i < this.labels.length; ++i) {
  171615. var lab = this.labels[i];
  171616. if (node.label == null || lab.name === node.label.name) {
  171617. if (lab.kind != null && (isBreak || lab.kind === "loop")) {
  171618. break;
  171619. }
  171620. if (node.label && isBreak) {
  171621. break;
  171622. }
  171623. }
  171624. }
  171625. if (i === this.labels.length) {
  171626. this.raise(node.start, "Unsyntactic " + keyword);
  171627. }
  171628. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  171629. };
  171630. pp$8.parseDebuggerStatement = function(node) {
  171631. this.next();
  171632. this.semicolon();
  171633. return this.finishNode(node, "DebuggerStatement");
  171634. };
  171635. pp$8.parseDoStatement = function(node) {
  171636. this.next();
  171637. this.labels.push(loopLabel);
  171638. node.body = this.parseStatement("do");
  171639. this.labels.pop();
  171640. this.expect(types$1._while);
  171641. node.test = this.parseParenExpression();
  171642. if (this.options.ecmaVersion >= 6) {
  171643. this.eat(types$1.semi);
  171644. } else {
  171645. this.semicolon();
  171646. }
  171647. return this.finishNode(node, "DoWhileStatement");
  171648. };
  171649. pp$8.parseForStatement = function(node) {
  171650. this.next();
  171651. var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
  171652. this.labels.push(loopLabel);
  171653. this.enterScope(0);
  171654. this.expect(types$1.parenL);
  171655. if (this.type === types$1.semi) {
  171656. if (awaitAt > -1) {
  171657. this.unexpected(awaitAt);
  171658. }
  171659. return this.parseFor(node, null);
  171660. }
  171661. var isLet = this.isLet();
  171662. if (this.type === types$1._var || this.type === types$1._const || isLet) {
  171663. var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
  171664. this.next();
  171665. this.parseVar(init$1, true, kind);
  171666. this.finishNode(init$1, "VariableDeclaration");
  171667. if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
  171668. if (this.options.ecmaVersion >= 9) {
  171669. if (this.type === types$1._in) {
  171670. if (awaitAt > -1) {
  171671. this.unexpected(awaitAt);
  171672. }
  171673. } else {
  171674. node.await = awaitAt > -1;
  171675. }
  171676. }
  171677. return this.parseForIn(node, init$1);
  171678. }
  171679. if (awaitAt > -1) {
  171680. this.unexpected(awaitAt);
  171681. }
  171682. return this.parseFor(node, init$1);
  171683. }
  171684. var startsWithLet = this.isContextual("let"), isForOf = false;
  171685. var refDestructuringErrors = new DestructuringErrors();
  171686. var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
  171687. if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  171688. if (this.options.ecmaVersion >= 9) {
  171689. if (this.type === types$1._in) {
  171690. if (awaitAt > -1) {
  171691. this.unexpected(awaitAt);
  171692. }
  171693. } else {
  171694. node.await = awaitAt > -1;
  171695. }
  171696. }
  171697. if (startsWithLet && isForOf) {
  171698. this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'.");
  171699. }
  171700. this.toAssignable(init, false, refDestructuringErrors);
  171701. this.checkLValPattern(init);
  171702. return this.parseForIn(node, init);
  171703. } else {
  171704. this.checkExpressionErrors(refDestructuringErrors, true);
  171705. }
  171706. if (awaitAt > -1) {
  171707. this.unexpected(awaitAt);
  171708. }
  171709. return this.parseFor(node, init);
  171710. };
  171711. pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
  171712. this.next();
  171713. return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
  171714. };
  171715. pp$8.parseIfStatement = function(node) {
  171716. this.next();
  171717. node.test = this.parseParenExpression();
  171718. node.consequent = this.parseStatement("if");
  171719. node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null;
  171720. return this.finishNode(node, "IfStatement");
  171721. };
  171722. pp$8.parseReturnStatement = function(node) {
  171723. if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
  171724. this.raise(this.start, "'return' outside of function");
  171725. }
  171726. this.next();
  171727. if (this.eat(types$1.semi) || this.insertSemicolon()) {
  171728. node.argument = null;
  171729. } else {
  171730. node.argument = this.parseExpression();
  171731. this.semicolon();
  171732. }
  171733. return this.finishNode(node, "ReturnStatement");
  171734. };
  171735. pp$8.parseSwitchStatement = function(node) {
  171736. this.next();
  171737. node.discriminant = this.parseParenExpression();
  171738. node.cases = [];
  171739. this.expect(types$1.braceL);
  171740. this.labels.push(switchLabel);
  171741. this.enterScope(0);
  171742. var cur;
  171743. for (var sawDefault = false; this.type !== types$1.braceR; ) {
  171744. if (this.type === types$1._case || this.type === types$1._default) {
  171745. var isCase = this.type === types$1._case;
  171746. if (cur) {
  171747. this.finishNode(cur, "SwitchCase");
  171748. }
  171749. node.cases.push(cur = this.startNode());
  171750. cur.consequent = [];
  171751. this.next();
  171752. if (isCase) {
  171753. cur.test = this.parseExpression();
  171754. } else {
  171755. if (sawDefault) {
  171756. this.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
  171757. }
  171758. sawDefault = true;
  171759. cur.test = null;
  171760. }
  171761. this.expect(types$1.colon);
  171762. } else {
  171763. if (!cur) {
  171764. this.unexpected();
  171765. }
  171766. cur.consequent.push(this.parseStatement(null));
  171767. }
  171768. }
  171769. this.exitScope();
  171770. if (cur) {
  171771. this.finishNode(cur, "SwitchCase");
  171772. }
  171773. this.next();
  171774. this.labels.pop();
  171775. return this.finishNode(node, "SwitchStatement");
  171776. };
  171777. pp$8.parseThrowStatement = function(node) {
  171778. this.next();
  171779. if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) {
  171780. this.raise(this.lastTokEnd, "Illegal newline after throw");
  171781. }
  171782. node.argument = this.parseExpression();
  171783. this.semicolon();
  171784. return this.finishNode(node, "ThrowStatement");
  171785. };
  171786. var empty$1 = [];
  171787. pp$8.parseTryStatement = function(node) {
  171788. this.next();
  171789. node.block = this.parseBlock();
  171790. node.handler = null;
  171791. if (this.type === types$1._catch) {
  171792. var clause = this.startNode();
  171793. this.next();
  171794. if (this.eat(types$1.parenL)) {
  171795. clause.param = this.parseBindingAtom();
  171796. var simple = clause.param.type === "Identifier";
  171797. this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);
  171798. this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);
  171799. this.expect(types$1.parenR);
  171800. } else {
  171801. if (this.options.ecmaVersion < 10) {
  171802. this.unexpected();
  171803. }
  171804. clause.param = null;
  171805. this.enterScope(0);
  171806. }
  171807. clause.body = this.parseBlock(false);
  171808. this.exitScope();
  171809. node.handler = this.finishNode(clause, "CatchClause");
  171810. }
  171811. node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
  171812. if (!node.handler && !node.finalizer) {
  171813. this.raise(node.start, "Missing catch or finally clause");
  171814. }
  171815. return this.finishNode(node, "TryStatement");
  171816. };
  171817. pp$8.parseVarStatement = function(node, kind) {
  171818. this.next();
  171819. this.parseVar(node, false, kind);
  171820. this.semicolon();
  171821. return this.finishNode(node, "VariableDeclaration");
  171822. };
  171823. pp$8.parseWhileStatement = function(node) {
  171824. this.next();
  171825. node.test = this.parseParenExpression();
  171826. this.labels.push(loopLabel);
  171827. node.body = this.parseStatement("while");
  171828. this.labels.pop();
  171829. return this.finishNode(node, "WhileStatement");
  171830. };
  171831. pp$8.parseWithStatement = function(node) {
  171832. if (this.strict) {
  171833. this.raise(this.start, "'with' in strict mode");
  171834. }
  171835. this.next();
  171836. node.object = this.parseParenExpression();
  171837. node.body = this.parseStatement("with");
  171838. return this.finishNode(node, "WithStatement");
  171839. };
  171840. pp$8.parseEmptyStatement = function(node) {
  171841. this.next();
  171842. return this.finishNode(node, "EmptyStatement");
  171843. };
  171844. pp$8.parseLabeledStatement = function(node, maybeName, expr, context) {
  171845. for (var i$1 = 0, list3 = this.labels; i$1 < list3.length; i$1 += 1) {
  171846. var label = list3[i$1];
  171847. if (label.name === maybeName) {
  171848. this.raise(expr.start, "Label '" + maybeName + "' is already declared");
  171849. }
  171850. }
  171851. var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null;
  171852. for (var i = this.labels.length - 1; i >= 0; i--) {
  171853. var label$1 = this.labels[i];
  171854. if (label$1.statementStart === node.start) {
  171855. label$1.statementStart = this.start;
  171856. label$1.kind = kind;
  171857. } else {
  171858. break;
  171859. }
  171860. }
  171861. this.labels.push({ name: maybeName, kind, statementStart: this.start });
  171862. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  171863. this.labels.pop();
  171864. node.label = expr;
  171865. return this.finishNode(node, "LabeledStatement");
  171866. };
  171867. pp$8.parseExpressionStatement = function(node, expr) {
  171868. node.expression = expr;
  171869. this.semicolon();
  171870. return this.finishNode(node, "ExpressionStatement");
  171871. };
  171872. pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
  171873. if (createNewLexicalScope === void 0)
  171874. createNewLexicalScope = true;
  171875. if (node === void 0)
  171876. node = this.startNode();
  171877. node.body = [];
  171878. this.expect(types$1.braceL);
  171879. if (createNewLexicalScope) {
  171880. this.enterScope(0);
  171881. }
  171882. while (this.type !== types$1.braceR) {
  171883. var stmt = this.parseStatement(null);
  171884. node.body.push(stmt);
  171885. }
  171886. if (exitStrict) {
  171887. this.strict = false;
  171888. }
  171889. this.next();
  171890. if (createNewLexicalScope) {
  171891. this.exitScope();
  171892. }
  171893. return this.finishNode(node, "BlockStatement");
  171894. };
  171895. pp$8.parseFor = function(node, init) {
  171896. node.init = init;
  171897. this.expect(types$1.semi);
  171898. node.test = this.type === types$1.semi ? null : this.parseExpression();
  171899. this.expect(types$1.semi);
  171900. node.update = this.type === types$1.parenR ? null : this.parseExpression();
  171901. this.expect(types$1.parenR);
  171902. node.body = this.parseStatement("for");
  171903. this.exitScope();
  171904. this.labels.pop();
  171905. return this.finishNode(node, "ForStatement");
  171906. };
  171907. pp$8.parseForIn = function(node, init) {
  171908. var isForIn = this.type === types$1._in;
  171909. this.next();
  171910. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  171911. this.raise(
  171912. init.start,
  171913. (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
  171914. );
  171915. }
  171916. node.left = init;
  171917. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
  171918. this.expect(types$1.parenR);
  171919. node.body = this.parseStatement("for");
  171920. this.exitScope();
  171921. this.labels.pop();
  171922. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  171923. };
  171924. pp$8.parseVar = function(node, isFor, kind) {
  171925. node.declarations = [];
  171926. node.kind = kind;
  171927. for (; ; ) {
  171928. var decl = this.startNode();
  171929. this.parseVarId(decl, kind);
  171930. if (this.eat(types$1.eq)) {
  171931. decl.init = this.parseMaybeAssign(isFor);
  171932. } else if (kind === "const" && !(this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  171933. this.unexpected();
  171934. } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) {
  171935. this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
  171936. } else {
  171937. decl.init = null;
  171938. }
  171939. node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
  171940. if (!this.eat(types$1.comma)) {
  171941. break;
  171942. }
  171943. }
  171944. return node;
  171945. };
  171946. pp$8.parseVarId = function(decl, kind) {
  171947. decl.id = this.parseBindingAtom();
  171948. this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
  171949. };
  171950. var FUNC_STATEMENT = 1;
  171951. var FUNC_HANGING_STATEMENT = 2;
  171952. var FUNC_NULLABLE_ID = 4;
  171953. pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
  171954. this.initFunction(node);
  171955. if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
  171956. if (this.type === types$1.star && statement & FUNC_HANGING_STATEMENT) {
  171957. this.unexpected();
  171958. }
  171959. node.generator = this.eat(types$1.star);
  171960. }
  171961. if (this.options.ecmaVersion >= 8) {
  171962. node.async = !!isAsync;
  171963. }
  171964. if (statement & FUNC_STATEMENT) {
  171965. node.id = statement & FUNC_NULLABLE_ID && this.type !== types$1.name ? null : this.parseIdent();
  171966. if (node.id && !(statement & FUNC_HANGING_STATEMENT)) {
  171967. this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION);
  171968. }
  171969. }
  171970. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  171971. this.yieldPos = 0;
  171972. this.awaitPos = 0;
  171973. this.awaitIdentPos = 0;
  171974. this.enterScope(functionFlags(node.async, node.generator));
  171975. if (!(statement & FUNC_STATEMENT)) {
  171976. node.id = this.type === types$1.name ? this.parseIdent() : null;
  171977. }
  171978. this.parseFunctionParams(node);
  171979. this.parseFunctionBody(node, allowExpressionBody, false, forInit);
  171980. this.yieldPos = oldYieldPos;
  171981. this.awaitPos = oldAwaitPos;
  171982. this.awaitIdentPos = oldAwaitIdentPos;
  171983. return this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression");
  171984. };
  171985. pp$8.parseFunctionParams = function(node) {
  171986. this.expect(types$1.parenL);
  171987. node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
  171988. this.checkYieldAwaitInDefaultParams();
  171989. };
  171990. pp$8.parseClass = function(node, isStatement) {
  171991. this.next();
  171992. var oldStrict = this.strict;
  171993. this.strict = true;
  171994. this.parseClassId(node, isStatement);
  171995. this.parseClassSuper(node);
  171996. var privateNameMap = this.enterClassBody();
  171997. var classBody = this.startNode();
  171998. var hadConstructor = false;
  171999. classBody.body = [];
  172000. this.expect(types$1.braceL);
  172001. while (this.type !== types$1.braceR) {
  172002. var element2 = this.parseClassElement(node.superClass !== null);
  172003. if (element2) {
  172004. classBody.body.push(element2);
  172005. if (element2.type === "MethodDefinition" && element2.kind === "constructor") {
  172006. if (hadConstructor) {
  172007. this.raise(element2.start, "Duplicate constructor in the same class");
  172008. }
  172009. hadConstructor = true;
  172010. } else if (element2.key && element2.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element2)) {
  172011. this.raiseRecoverable(element2.key.start, "Identifier '#" + element2.key.name + "' has already been declared");
  172012. }
  172013. }
  172014. }
  172015. this.strict = oldStrict;
  172016. this.next();
  172017. node.body = this.finishNode(classBody, "ClassBody");
  172018. this.exitClassBody();
  172019. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  172020. };
  172021. pp$8.parseClassElement = function(constructorAllowsSuper) {
  172022. if (this.eat(types$1.semi)) {
  172023. return null;
  172024. }
  172025. var ecmaVersion = this.options.ecmaVersion;
  172026. var node = this.startNode();
  172027. var keyName = "";
  172028. var isGenerator = false;
  172029. var isAsync = false;
  172030. var kind = "method";
  172031. var isStatic = false;
  172032. if (this.eatContextual("static")) {
  172033. if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {
  172034. this.parseClassStaticBlock(node);
  172035. return node;
  172036. }
  172037. if (this.isClassElementNameStart() || this.type === types$1.star) {
  172038. isStatic = true;
  172039. } else {
  172040. keyName = "static";
  172041. }
  172042. }
  172043. node.static = isStatic;
  172044. if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
  172045. if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) {
  172046. isAsync = true;
  172047. } else {
  172048. keyName = "async";
  172049. }
  172050. }
  172051. if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) {
  172052. isGenerator = true;
  172053. }
  172054. if (!keyName && !isAsync && !isGenerator) {
  172055. var lastValue = this.value;
  172056. if (this.eatContextual("get") || this.eatContextual("set")) {
  172057. if (this.isClassElementNameStart()) {
  172058. kind = lastValue;
  172059. } else {
  172060. keyName = lastValue;
  172061. }
  172062. }
  172063. }
  172064. if (keyName) {
  172065. node.computed = false;
  172066. node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
  172067. node.key.name = keyName;
  172068. this.finishNode(node.key, "Identifier");
  172069. } else {
  172070. this.parseClassElementName(node);
  172071. }
  172072. if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
  172073. var isConstructor = !node.static && checkKeyName(node, "constructor");
  172074. var allowsDirectSuper = isConstructor && constructorAllowsSuper;
  172075. if (isConstructor && kind !== "method") {
  172076. this.raise(node.key.start, "Constructor can't have get/set modifier");
  172077. }
  172078. node.kind = isConstructor ? "constructor" : kind;
  172079. this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
  172080. } else {
  172081. this.parseClassField(node);
  172082. }
  172083. return node;
  172084. };
  172085. pp$8.isClassElementNameStart = function() {
  172086. return this.type === types$1.name || this.type === types$1.privateId || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword;
  172087. };
  172088. pp$8.parseClassElementName = function(element2) {
  172089. if (this.type === types$1.privateId) {
  172090. if (this.value === "constructor") {
  172091. this.raise(this.start, "Classes can't have an element named '#constructor'");
  172092. }
  172093. element2.computed = false;
  172094. element2.key = this.parsePrivateIdent();
  172095. } else {
  172096. this.parsePropertyName(element2);
  172097. }
  172098. };
  172099. pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
  172100. var key = method.key;
  172101. if (method.kind === "constructor") {
  172102. if (isGenerator) {
  172103. this.raise(key.start, "Constructor can't be a generator");
  172104. }
  172105. if (isAsync) {
  172106. this.raise(key.start, "Constructor can't be an async method");
  172107. }
  172108. } else if (method.static && checkKeyName(method, "prototype")) {
  172109. this.raise(key.start, "Classes may not have a static property named prototype");
  172110. }
  172111. var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
  172112. if (method.kind === "get" && value.params.length !== 0) {
  172113. this.raiseRecoverable(value.start, "getter should have no params");
  172114. }
  172115. if (method.kind === "set" && value.params.length !== 1) {
  172116. this.raiseRecoverable(value.start, "setter should have exactly one param");
  172117. }
  172118. if (method.kind === "set" && value.params[0].type === "RestElement") {
  172119. this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params");
  172120. }
  172121. return this.finishNode(method, "MethodDefinition");
  172122. };
  172123. pp$8.parseClassField = function(field) {
  172124. if (checkKeyName(field, "constructor")) {
  172125. this.raise(field.key.start, "Classes can't have a field named 'constructor'");
  172126. } else if (field.static && checkKeyName(field, "prototype")) {
  172127. this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
  172128. }
  172129. if (this.eat(types$1.eq)) {
  172130. var scope = this.currentThisScope();
  172131. var inClassFieldInit = scope.inClassFieldInit;
  172132. scope.inClassFieldInit = true;
  172133. field.value = this.parseMaybeAssign();
  172134. scope.inClassFieldInit = inClassFieldInit;
  172135. } else {
  172136. field.value = null;
  172137. }
  172138. this.semicolon();
  172139. return this.finishNode(field, "PropertyDefinition");
  172140. };
  172141. pp$8.parseClassStaticBlock = function(node) {
  172142. node.body = [];
  172143. var oldLabels = this.labels;
  172144. this.labels = [];
  172145. this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER);
  172146. while (this.type !== types$1.braceR) {
  172147. var stmt = this.parseStatement(null);
  172148. node.body.push(stmt);
  172149. }
  172150. this.next();
  172151. this.exitScope();
  172152. this.labels = oldLabels;
  172153. return this.finishNode(node, "StaticBlock");
  172154. };
  172155. pp$8.parseClassId = function(node, isStatement) {
  172156. if (this.type === types$1.name) {
  172157. node.id = this.parseIdent();
  172158. if (isStatement) {
  172159. this.checkLValSimple(node.id, BIND_LEXICAL, false);
  172160. }
  172161. } else {
  172162. if (isStatement === true) {
  172163. this.unexpected();
  172164. }
  172165. node.id = null;
  172166. }
  172167. };
  172168. pp$8.parseClassSuper = function(node) {
  172169. node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(false) : null;
  172170. };
  172171. pp$8.enterClassBody = function() {
  172172. var element2 = { declared: /* @__PURE__ */ Object.create(null), used: [] };
  172173. this.privateNameStack.push(element2);
  172174. return element2.declared;
  172175. };
  172176. pp$8.exitClassBody = function() {
  172177. var ref2 = this.privateNameStack.pop();
  172178. var declared = ref2.declared;
  172179. var used = ref2.used;
  172180. var len = this.privateNameStack.length;
  172181. var parent = len === 0 ? null : this.privateNameStack[len - 1];
  172182. for (var i = 0; i < used.length; ++i) {
  172183. var id = used[i];
  172184. if (!hasOwn(declared, id.name)) {
  172185. if (parent) {
  172186. parent.used.push(id);
  172187. } else {
  172188. this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class");
  172189. }
  172190. }
  172191. }
  172192. };
  172193. function isPrivateNameConflicted(privateNameMap, element2) {
  172194. var name2 = element2.key.name;
  172195. var curr = privateNameMap[name2];
  172196. var next = "true";
  172197. if (element2.type === "MethodDefinition" && (element2.kind === "get" || element2.kind === "set")) {
  172198. next = (element2.static ? "s" : "i") + element2.kind;
  172199. }
  172200. if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") {
  172201. privateNameMap[name2] = "true";
  172202. return false;
  172203. } else if (!curr) {
  172204. privateNameMap[name2] = next;
  172205. return false;
  172206. } else {
  172207. return true;
  172208. }
  172209. }
  172210. function checkKeyName(node, name2) {
  172211. var computed = node.computed;
  172212. var key = node.key;
  172213. return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2);
  172214. }
  172215. pp$8.parseExport = function(node, exports) {
  172216. this.next();
  172217. if (this.eat(types$1.star)) {
  172218. if (this.options.ecmaVersion >= 11) {
  172219. if (this.eatContextual("as")) {
  172220. node.exported = this.parseModuleExportName();
  172221. this.checkExport(exports, node.exported.name, this.lastTokStart);
  172222. } else {
  172223. node.exported = null;
  172224. }
  172225. }
  172226. this.expectContextual("from");
  172227. if (this.type !== types$1.string) {
  172228. this.unexpected();
  172229. }
  172230. node.source = this.parseExprAtom();
  172231. this.semicolon();
  172232. return this.finishNode(node, "ExportAllDeclaration");
  172233. }
  172234. if (this.eat(types$1._default)) {
  172235. this.checkExport(exports, "default", this.lastTokStart);
  172236. var isAsync;
  172237. if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) {
  172238. var fNode = this.startNode();
  172239. this.next();
  172240. if (isAsync) {
  172241. this.next();
  172242. }
  172243. node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);
  172244. } else if (this.type === types$1._class) {
  172245. var cNode = this.startNode();
  172246. node.declaration = this.parseClass(cNode, "nullableID");
  172247. } else {
  172248. node.declaration = this.parseMaybeAssign();
  172249. this.semicolon();
  172250. }
  172251. return this.finishNode(node, "ExportDefaultDeclaration");
  172252. }
  172253. if (this.shouldParseExportStatement()) {
  172254. node.declaration = this.parseStatement(null);
  172255. if (node.declaration.type === "VariableDeclaration") {
  172256. this.checkVariableExport(exports, node.declaration.declarations);
  172257. } else {
  172258. this.checkExport(exports, node.declaration.id.name, node.declaration.id.start);
  172259. }
  172260. node.specifiers = [];
  172261. node.source = null;
  172262. } else {
  172263. node.declaration = null;
  172264. node.specifiers = this.parseExportSpecifiers(exports);
  172265. if (this.eatContextual("from")) {
  172266. if (this.type !== types$1.string) {
  172267. this.unexpected();
  172268. }
  172269. node.source = this.parseExprAtom();
  172270. } else {
  172271. for (var i = 0, list3 = node.specifiers; i < list3.length; i += 1) {
  172272. var spec = list3[i];
  172273. this.checkUnreserved(spec.local);
  172274. this.checkLocalExport(spec.local);
  172275. if (spec.local.type === "Literal") {
  172276. this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
  172277. }
  172278. }
  172279. node.source = null;
  172280. }
  172281. this.semicolon();
  172282. }
  172283. return this.finishNode(node, "ExportNamedDeclaration");
  172284. };
  172285. pp$8.checkExport = function(exports, name2, pos) {
  172286. if (!exports) {
  172287. return;
  172288. }
  172289. if (hasOwn(exports, name2)) {
  172290. this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
  172291. }
  172292. exports[name2] = true;
  172293. };
  172294. pp$8.checkPatternExport = function(exports, pat) {
  172295. var type = pat.type;
  172296. if (type === "Identifier") {
  172297. this.checkExport(exports, pat.name, pat.start);
  172298. } else if (type === "ObjectPattern") {
  172299. for (var i = 0, list3 = pat.properties; i < list3.length; i += 1) {
  172300. var prop = list3[i];
  172301. this.checkPatternExport(exports, prop);
  172302. }
  172303. } else if (type === "ArrayPattern") {
  172304. for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
  172305. var elt = list$1[i$1];
  172306. if (elt) {
  172307. this.checkPatternExport(exports, elt);
  172308. }
  172309. }
  172310. } else if (type === "Property") {
  172311. this.checkPatternExport(exports, pat.value);
  172312. } else if (type === "AssignmentPattern") {
  172313. this.checkPatternExport(exports, pat.left);
  172314. } else if (type === "RestElement") {
  172315. this.checkPatternExport(exports, pat.argument);
  172316. } else if (type === "ParenthesizedExpression") {
  172317. this.checkPatternExport(exports, pat.expression);
  172318. }
  172319. };
  172320. pp$8.checkVariableExport = function(exports, decls) {
  172321. if (!exports) {
  172322. return;
  172323. }
  172324. for (var i = 0, list3 = decls; i < list3.length; i += 1) {
  172325. var decl = list3[i];
  172326. this.checkPatternExport(exports, decl.id);
  172327. }
  172328. };
  172329. pp$8.shouldParseExportStatement = function() {
  172330. return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
  172331. };
  172332. pp$8.parseExportSpecifiers = function(exports) {
  172333. var nodes = [], first = true;
  172334. this.expect(types$1.braceL);
  172335. while (!this.eat(types$1.braceR)) {
  172336. if (!first) {
  172337. this.expect(types$1.comma);
  172338. if (this.afterTrailingComma(types$1.braceR)) {
  172339. break;
  172340. }
  172341. } else {
  172342. first = false;
  172343. }
  172344. var node = this.startNode();
  172345. node.local = this.parseModuleExportName();
  172346. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
  172347. this.checkExport(
  172348. exports,
  172349. node.exported[node.exported.type === "Identifier" ? "name" : "value"],
  172350. node.exported.start
  172351. );
  172352. nodes.push(this.finishNode(node, "ExportSpecifier"));
  172353. }
  172354. return nodes;
  172355. };
  172356. pp$8.parseImport = function(node) {
  172357. this.next();
  172358. if (this.type === types$1.string) {
  172359. node.specifiers = empty$1;
  172360. node.source = this.parseExprAtom();
  172361. } else {
  172362. node.specifiers = this.parseImportSpecifiers();
  172363. this.expectContextual("from");
  172364. node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();
  172365. }
  172366. this.semicolon();
  172367. return this.finishNode(node, "ImportDeclaration");
  172368. };
  172369. pp$8.parseImportSpecifiers = function() {
  172370. var nodes = [], first = true;
  172371. if (this.type === types$1.name) {
  172372. var node = this.startNode();
  172373. node.local = this.parseIdent();
  172374. this.checkLValSimple(node.local, BIND_LEXICAL);
  172375. nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
  172376. if (!this.eat(types$1.comma)) {
  172377. return nodes;
  172378. }
  172379. }
  172380. if (this.type === types$1.star) {
  172381. var node$1 = this.startNode();
  172382. this.next();
  172383. this.expectContextual("as");
  172384. node$1.local = this.parseIdent();
  172385. this.checkLValSimple(node$1.local, BIND_LEXICAL);
  172386. nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
  172387. return nodes;
  172388. }
  172389. this.expect(types$1.braceL);
  172390. while (!this.eat(types$1.braceR)) {
  172391. if (!first) {
  172392. this.expect(types$1.comma);
  172393. if (this.afterTrailingComma(types$1.braceR)) {
  172394. break;
  172395. }
  172396. } else {
  172397. first = false;
  172398. }
  172399. var node$2 = this.startNode();
  172400. node$2.imported = this.parseModuleExportName();
  172401. if (this.eatContextual("as")) {
  172402. node$2.local = this.parseIdent();
  172403. } else {
  172404. this.checkUnreserved(node$2.imported);
  172405. node$2.local = node$2.imported;
  172406. }
  172407. this.checkLValSimple(node$2.local, BIND_LEXICAL);
  172408. nodes.push(this.finishNode(node$2, "ImportSpecifier"));
  172409. }
  172410. return nodes;
  172411. };
  172412. pp$8.parseModuleExportName = function() {
  172413. if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
  172414. var stringLiteral = this.parseLiteral(this.value);
  172415. if (loneSurrogate.test(stringLiteral.value)) {
  172416. this.raise(stringLiteral.start, "An export name cannot include a lone surrogate.");
  172417. }
  172418. return stringLiteral;
  172419. }
  172420. return this.parseIdent(true);
  172421. };
  172422. pp$8.adaptDirectivePrologue = function(statements) {
  172423. for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
  172424. statements[i].directive = statements[i].expression.raw.slice(1, -1);
  172425. }
  172426. };
  172427. pp$8.isDirectiveCandidate = function(statement) {
  172428. return statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && (this.input[statement.start] === '"' || this.input[statement.start] === "'");
  172429. };
  172430. var pp$7 = Parser.prototype;
  172431. pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) {
  172432. if (this.options.ecmaVersion >= 6 && node) {
  172433. switch (node.type) {
  172434. case "Identifier":
  172435. if (this.inAsync && node.name === "await") {
  172436. this.raise(node.start, "Cannot use 'await' as identifier inside an async function");
  172437. }
  172438. break;
  172439. case "ObjectPattern":
  172440. case "ArrayPattern":
  172441. case "AssignmentPattern":
  172442. case "RestElement":
  172443. break;
  172444. case "ObjectExpression":
  172445. node.type = "ObjectPattern";
  172446. if (refDestructuringErrors) {
  172447. this.checkPatternErrors(refDestructuringErrors, true);
  172448. }
  172449. for (var i = 0, list3 = node.properties; i < list3.length; i += 1) {
  172450. var prop = list3[i];
  172451. this.toAssignable(prop, isBinding);
  172452. if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
  172453. this.raise(prop.argument.start, "Unexpected token");
  172454. }
  172455. }
  172456. break;
  172457. case "Property":
  172458. if (node.kind !== "init") {
  172459. this.raise(node.key.start, "Object pattern can't contain getter or setter");
  172460. }
  172461. this.toAssignable(node.value, isBinding);
  172462. break;
  172463. case "ArrayExpression":
  172464. node.type = "ArrayPattern";
  172465. if (refDestructuringErrors) {
  172466. this.checkPatternErrors(refDestructuringErrors, true);
  172467. }
  172468. this.toAssignableList(node.elements, isBinding);
  172469. break;
  172470. case "SpreadElement":
  172471. node.type = "RestElement";
  172472. this.toAssignable(node.argument, isBinding);
  172473. if (node.argument.type === "AssignmentPattern") {
  172474. this.raise(node.argument.start, "Rest elements cannot have a default value");
  172475. }
  172476. break;
  172477. case "AssignmentExpression":
  172478. if (node.operator !== "=") {
  172479. this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
  172480. }
  172481. node.type = "AssignmentPattern";
  172482. delete node.operator;
  172483. this.toAssignable(node.left, isBinding);
  172484. break;
  172485. case "ParenthesizedExpression":
  172486. this.toAssignable(node.expression, isBinding, refDestructuringErrors);
  172487. break;
  172488. case "ChainExpression":
  172489. this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
  172490. break;
  172491. case "MemberExpression":
  172492. if (!isBinding) {
  172493. break;
  172494. }
  172495. default:
  172496. this.raise(node.start, "Assigning to rvalue");
  172497. }
  172498. } else if (refDestructuringErrors) {
  172499. this.checkPatternErrors(refDestructuringErrors, true);
  172500. }
  172501. return node;
  172502. };
  172503. pp$7.toAssignableList = function(exprList, isBinding) {
  172504. var end = exprList.length;
  172505. for (var i = 0; i < end; i++) {
  172506. var elt = exprList[i];
  172507. if (elt) {
  172508. this.toAssignable(elt, isBinding);
  172509. }
  172510. }
  172511. if (end) {
  172512. var last = exprList[end - 1];
  172513. if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") {
  172514. this.unexpected(last.argument.start);
  172515. }
  172516. }
  172517. return exprList;
  172518. };
  172519. pp$7.parseSpread = function(refDestructuringErrors) {
  172520. var node = this.startNode();
  172521. this.next();
  172522. node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  172523. return this.finishNode(node, "SpreadElement");
  172524. };
  172525. pp$7.parseRestBinding = function() {
  172526. var node = this.startNode();
  172527. this.next();
  172528. if (this.options.ecmaVersion === 6 && this.type !== types$1.name) {
  172529. this.unexpected();
  172530. }
  172531. node.argument = this.parseBindingAtom();
  172532. return this.finishNode(node, "RestElement");
  172533. };
  172534. pp$7.parseBindingAtom = function() {
  172535. if (this.options.ecmaVersion >= 6) {
  172536. switch (this.type) {
  172537. case types$1.bracketL:
  172538. var node = this.startNode();
  172539. this.next();
  172540. node.elements = this.parseBindingList(types$1.bracketR, true, true);
  172541. return this.finishNode(node, "ArrayPattern");
  172542. case types$1.braceL:
  172543. return this.parseObj(true);
  172544. }
  172545. }
  172546. return this.parseIdent();
  172547. };
  172548. pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
  172549. var elts = [], first = true;
  172550. while (!this.eat(close)) {
  172551. if (first) {
  172552. first = false;
  172553. } else {
  172554. this.expect(types$1.comma);
  172555. }
  172556. if (allowEmpty && this.type === types$1.comma) {
  172557. elts.push(null);
  172558. } else if (allowTrailingComma && this.afterTrailingComma(close)) {
  172559. break;
  172560. } else if (this.type === types$1.ellipsis) {
  172561. var rest = this.parseRestBinding();
  172562. this.parseBindingListItem(rest);
  172563. elts.push(rest);
  172564. if (this.type === types$1.comma) {
  172565. this.raise(this.start, "Comma is not permitted after the rest element");
  172566. }
  172567. this.expect(close);
  172568. break;
  172569. } else {
  172570. var elem = this.parseMaybeDefault(this.start, this.startLoc);
  172571. this.parseBindingListItem(elem);
  172572. elts.push(elem);
  172573. }
  172574. }
  172575. return elts;
  172576. };
  172577. pp$7.parseBindingListItem = function(param) {
  172578. return param;
  172579. };
  172580. pp$7.parseMaybeDefault = function(startPos, startLoc, left) {
  172581. left = left || this.parseBindingAtom();
  172582. if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) {
  172583. return left;
  172584. }
  172585. var node = this.startNodeAt(startPos, startLoc);
  172586. node.left = left;
  172587. node.right = this.parseMaybeAssign();
  172588. return this.finishNode(node, "AssignmentPattern");
  172589. };
  172590. pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
  172591. if (bindingType === void 0)
  172592. bindingType = BIND_NONE;
  172593. var isBind = bindingType !== BIND_NONE;
  172594. switch (expr.type) {
  172595. case "Identifier":
  172596. if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
  172597. this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
  172598. }
  172599. if (isBind) {
  172600. if (bindingType === BIND_LEXICAL && expr.name === "let") {
  172601. this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name");
  172602. }
  172603. if (checkClashes) {
  172604. if (hasOwn(checkClashes, expr.name)) {
  172605. this.raiseRecoverable(expr.start, "Argument name clash");
  172606. }
  172607. checkClashes[expr.name] = true;
  172608. }
  172609. if (bindingType !== BIND_OUTSIDE) {
  172610. this.declareName(expr.name, bindingType, expr.start);
  172611. }
  172612. }
  172613. break;
  172614. case "ChainExpression":
  172615. this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
  172616. break;
  172617. case "MemberExpression":
  172618. if (isBind) {
  172619. this.raiseRecoverable(expr.start, "Binding member expression");
  172620. }
  172621. break;
  172622. case "ParenthesizedExpression":
  172623. if (isBind) {
  172624. this.raiseRecoverable(expr.start, "Binding parenthesized expression");
  172625. }
  172626. return this.checkLValSimple(expr.expression, bindingType, checkClashes);
  172627. default:
  172628. this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
  172629. }
  172630. };
  172631. pp$7.checkLValPattern = function(expr, bindingType, checkClashes) {
  172632. if (bindingType === void 0)
  172633. bindingType = BIND_NONE;
  172634. switch (expr.type) {
  172635. case "ObjectPattern":
  172636. for (var i = 0, list3 = expr.properties; i < list3.length; i += 1) {
  172637. var prop = list3[i];
  172638. this.checkLValInnerPattern(prop, bindingType, checkClashes);
  172639. }
  172640. break;
  172641. case "ArrayPattern":
  172642. for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
  172643. var elem = list$1[i$1];
  172644. if (elem) {
  172645. this.checkLValInnerPattern(elem, bindingType, checkClashes);
  172646. }
  172647. }
  172648. break;
  172649. default:
  172650. this.checkLValSimple(expr, bindingType, checkClashes);
  172651. }
  172652. };
  172653. pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
  172654. if (bindingType === void 0)
  172655. bindingType = BIND_NONE;
  172656. switch (expr.type) {
  172657. case "Property":
  172658. this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
  172659. break;
  172660. case "AssignmentPattern":
  172661. this.checkLValPattern(expr.left, bindingType, checkClashes);
  172662. break;
  172663. case "RestElement":
  172664. this.checkLValPattern(expr.argument, bindingType, checkClashes);
  172665. break;
  172666. default:
  172667. this.checkLValPattern(expr, bindingType, checkClashes);
  172668. }
  172669. };
  172670. var TokContext = function TokContext2(token, isExpr, preserveSpace, override, generator) {
  172671. this.token = token;
  172672. this.isExpr = !!isExpr;
  172673. this.preserveSpace = !!preserveSpace;
  172674. this.override = override;
  172675. this.generator = !!generator;
  172676. };
  172677. var types = {
  172678. b_stat: new TokContext("{", false),
  172679. b_expr: new TokContext("{", true),
  172680. b_tmpl: new TokContext("${", false),
  172681. p_stat: new TokContext("(", false),
  172682. p_expr: new TokContext("(", true),
  172683. q_tmpl: new TokContext("`", true, true, function(p) {
  172684. return p.tryReadTemplateToken();
  172685. }),
  172686. f_stat: new TokContext("function", false),
  172687. f_expr: new TokContext("function", true),
  172688. f_expr_gen: new TokContext("function", true, false, null, true),
  172689. f_gen: new TokContext("function", false, false, null, true)
  172690. };
  172691. var pp$6 = Parser.prototype;
  172692. pp$6.initialContext = function() {
  172693. return [types.b_stat];
  172694. };
  172695. pp$6.curContext = function() {
  172696. return this.context[this.context.length - 1];
  172697. };
  172698. pp$6.braceIsBlock = function(prevType) {
  172699. var parent = this.curContext();
  172700. if (parent === types.f_expr || parent === types.f_stat) {
  172701. return true;
  172702. }
  172703. if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) {
  172704. return !parent.isExpr;
  172705. }
  172706. if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) {
  172707. return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  172708. }
  172709. if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) {
  172710. return true;
  172711. }
  172712. if (prevType === types$1.braceL) {
  172713. return parent === types.b_stat;
  172714. }
  172715. if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) {
  172716. return false;
  172717. }
  172718. return !this.exprAllowed;
  172719. };
  172720. pp$6.inGeneratorContext = function() {
  172721. for (var i = this.context.length - 1; i >= 1; i--) {
  172722. var context = this.context[i];
  172723. if (context.token === "function") {
  172724. return context.generator;
  172725. }
  172726. }
  172727. return false;
  172728. };
  172729. pp$6.updateContext = function(prevType) {
  172730. var update, type = this.type;
  172731. if (type.keyword && prevType === types$1.dot) {
  172732. this.exprAllowed = false;
  172733. } else if (update = type.updateContext) {
  172734. update.call(this, prevType);
  172735. } else {
  172736. this.exprAllowed = type.beforeExpr;
  172737. }
  172738. };
  172739. pp$6.overrideContext = function(tokenCtx) {
  172740. if (this.curContext() !== tokenCtx) {
  172741. this.context[this.context.length - 1] = tokenCtx;
  172742. }
  172743. };
  172744. types$1.parenR.updateContext = types$1.braceR.updateContext = function() {
  172745. if (this.context.length === 1) {
  172746. this.exprAllowed = true;
  172747. return;
  172748. }
  172749. var out = this.context.pop();
  172750. if (out === types.b_stat && this.curContext().token === "function") {
  172751. out = this.context.pop();
  172752. }
  172753. this.exprAllowed = !out.isExpr;
  172754. };
  172755. types$1.braceL.updateContext = function(prevType) {
  172756. this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
  172757. this.exprAllowed = true;
  172758. };
  172759. types$1.dollarBraceL.updateContext = function() {
  172760. this.context.push(types.b_tmpl);
  172761. this.exprAllowed = true;
  172762. };
  172763. types$1.parenL.updateContext = function(prevType) {
  172764. var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while;
  172765. this.context.push(statementParens ? types.p_stat : types.p_expr);
  172766. this.exprAllowed = true;
  172767. };
  172768. types$1.incDec.updateContext = function() {
  172769. };
  172770. types$1._function.updateContext = types$1._class.updateContext = function(prevType) {
  172771. if (prevType.beforeExpr && prevType !== types$1._else && !(prevType === types$1.semi && this.curContext() !== types.p_stat) && !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) {
  172772. this.context.push(types.f_expr);
  172773. } else {
  172774. this.context.push(types.f_stat);
  172775. }
  172776. this.exprAllowed = false;
  172777. };
  172778. types$1.backQuote.updateContext = function() {
  172779. if (this.curContext() === types.q_tmpl) {
  172780. this.context.pop();
  172781. } else {
  172782. this.context.push(types.q_tmpl);
  172783. }
  172784. this.exprAllowed = false;
  172785. };
  172786. types$1.star.updateContext = function(prevType) {
  172787. if (prevType === types$1._function) {
  172788. var index2 = this.context.length - 1;
  172789. if (this.context[index2] === types.f_expr) {
  172790. this.context[index2] = types.f_expr_gen;
  172791. } else {
  172792. this.context[index2] = types.f_gen;
  172793. }
  172794. }
  172795. this.exprAllowed = true;
  172796. };
  172797. types$1.name.updateContext = function(prevType) {
  172798. var allowed = false;
  172799. if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) {
  172800. if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
  172801. allowed = true;
  172802. }
  172803. }
  172804. this.exprAllowed = allowed;
  172805. };
  172806. var pp$5 = Parser.prototype;
  172807. pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
  172808. if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
  172809. return;
  172810. }
  172811. if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
  172812. return;
  172813. }
  172814. var key = prop.key;
  172815. var name2;
  172816. switch (key.type) {
  172817. case "Identifier":
  172818. name2 = key.name;
  172819. break;
  172820. case "Literal":
  172821. name2 = String(key.value);
  172822. break;
  172823. default:
  172824. return;
  172825. }
  172826. var kind = prop.kind;
  172827. if (this.options.ecmaVersion >= 6) {
  172828. if (name2 === "__proto__" && kind === "init") {
  172829. if (propHash.proto) {
  172830. if (refDestructuringErrors) {
  172831. if (refDestructuringErrors.doubleProto < 0) {
  172832. refDestructuringErrors.doubleProto = key.start;
  172833. }
  172834. } else {
  172835. this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
  172836. }
  172837. }
  172838. propHash.proto = true;
  172839. }
  172840. return;
  172841. }
  172842. name2 = "$" + name2;
  172843. var other = propHash[name2];
  172844. if (other) {
  172845. var redefinition;
  172846. if (kind === "init") {
  172847. redefinition = this.strict && other.init || other.get || other.set;
  172848. } else {
  172849. redefinition = other.init || other[kind];
  172850. }
  172851. if (redefinition) {
  172852. this.raiseRecoverable(key.start, "Redefinition of property");
  172853. }
  172854. } else {
  172855. other = propHash[name2] = {
  172856. init: false,
  172857. get: false,
  172858. set: false
  172859. };
  172860. }
  172861. other[kind] = true;
  172862. };
  172863. pp$5.parseExpression = function(forInit, refDestructuringErrors) {
  172864. var startPos = this.start, startLoc = this.startLoc;
  172865. var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
  172866. if (this.type === types$1.comma) {
  172867. var node = this.startNodeAt(startPos, startLoc);
  172868. node.expressions = [expr];
  172869. while (this.eat(types$1.comma)) {
  172870. node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
  172871. }
  172872. return this.finishNode(node, "SequenceExpression");
  172873. }
  172874. return expr;
  172875. };
  172876. pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
  172877. if (this.isContextual("yield")) {
  172878. if (this.inGenerator) {
  172879. return this.parseYield(forInit);
  172880. } else {
  172881. this.exprAllowed = false;
  172882. }
  172883. }
  172884. var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
  172885. if (refDestructuringErrors) {
  172886. oldParenAssign = refDestructuringErrors.parenthesizedAssign;
  172887. oldTrailingComma = refDestructuringErrors.trailingComma;
  172888. oldDoubleProto = refDestructuringErrors.doubleProto;
  172889. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
  172890. } else {
  172891. refDestructuringErrors = new DestructuringErrors();
  172892. ownDestructuringErrors = true;
  172893. }
  172894. var startPos = this.start, startLoc = this.startLoc;
  172895. if (this.type === types$1.parenL || this.type === types$1.name) {
  172896. this.potentialArrowAt = this.start;
  172897. this.potentialArrowInForAwait = forInit === "await";
  172898. }
  172899. var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
  172900. if (afterLeftParse) {
  172901. left = afterLeftParse.call(this, left, startPos, startLoc);
  172902. }
  172903. if (this.type.isAssign) {
  172904. var node = this.startNodeAt(startPos, startLoc);
  172905. node.operator = this.value;
  172906. if (this.type === types$1.eq) {
  172907. left = this.toAssignable(left, false, refDestructuringErrors);
  172908. }
  172909. if (!ownDestructuringErrors) {
  172910. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
  172911. }
  172912. if (refDestructuringErrors.shorthandAssign >= left.start) {
  172913. refDestructuringErrors.shorthandAssign = -1;
  172914. }
  172915. if (this.type === types$1.eq) {
  172916. this.checkLValPattern(left);
  172917. } else {
  172918. this.checkLValSimple(left);
  172919. }
  172920. node.left = left;
  172921. this.next();
  172922. node.right = this.parseMaybeAssign(forInit);
  172923. if (oldDoubleProto > -1) {
  172924. refDestructuringErrors.doubleProto = oldDoubleProto;
  172925. }
  172926. return this.finishNode(node, "AssignmentExpression");
  172927. } else {
  172928. if (ownDestructuringErrors) {
  172929. this.checkExpressionErrors(refDestructuringErrors, true);
  172930. }
  172931. }
  172932. if (oldParenAssign > -1) {
  172933. refDestructuringErrors.parenthesizedAssign = oldParenAssign;
  172934. }
  172935. if (oldTrailingComma > -1) {
  172936. refDestructuringErrors.trailingComma = oldTrailingComma;
  172937. }
  172938. return left;
  172939. };
  172940. pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
  172941. var startPos = this.start, startLoc = this.startLoc;
  172942. var expr = this.parseExprOps(forInit, refDestructuringErrors);
  172943. if (this.checkExpressionErrors(refDestructuringErrors)) {
  172944. return expr;
  172945. }
  172946. if (this.eat(types$1.question)) {
  172947. var node = this.startNodeAt(startPos, startLoc);
  172948. node.test = expr;
  172949. node.consequent = this.parseMaybeAssign();
  172950. this.expect(types$1.colon);
  172951. node.alternate = this.parseMaybeAssign(forInit);
  172952. return this.finishNode(node, "ConditionalExpression");
  172953. }
  172954. return expr;
  172955. };
  172956. pp$5.parseExprOps = function(forInit, refDestructuringErrors) {
  172957. var startPos = this.start, startLoc = this.startLoc;
  172958. var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);
  172959. if (this.checkExpressionErrors(refDestructuringErrors)) {
  172960. return expr;
  172961. }
  172962. return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
  172963. };
  172964. pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
  172965. var prec = this.type.binop;
  172966. if (prec != null && (!forInit || this.type !== types$1._in)) {
  172967. if (prec > minPrec) {
  172968. var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND;
  172969. var coalesce = this.type === types$1.coalesce;
  172970. if (coalesce) {
  172971. prec = types$1.logicalAND.binop;
  172972. }
  172973. var op = this.value;
  172974. this.next();
  172975. var startPos = this.start, startLoc = this.startLoc;
  172976. var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
  172977. var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
  172978. if (logical && this.type === types$1.coalesce || coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND)) {
  172979. this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
  172980. }
  172981. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit);
  172982. }
  172983. }
  172984. return left;
  172985. };
  172986. pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {
  172987. if (right.type === "PrivateIdentifier") {
  172988. this.raise(right.start, "Private identifier can only be left side of binary expression");
  172989. }
  172990. var node = this.startNodeAt(startPos, startLoc);
  172991. node.left = left;
  172992. node.operator = op;
  172993. node.right = right;
  172994. return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
  172995. };
  172996. pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
  172997. var startPos = this.start, startLoc = this.startLoc, expr;
  172998. if (this.isContextual("await") && this.canAwait) {
  172999. expr = this.parseAwait(forInit);
  173000. sawUnary = true;
  173001. } else if (this.type.prefix) {
  173002. var node = this.startNode(), update = this.type === types$1.incDec;
  173003. node.operator = this.value;
  173004. node.prefix = true;
  173005. this.next();
  173006. node.argument = this.parseMaybeUnary(null, true, update, forInit);
  173007. this.checkExpressionErrors(refDestructuringErrors, true);
  173008. if (update) {
  173009. this.checkLValSimple(node.argument);
  173010. } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
  173011. this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
  173012. } else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) {
  173013. this.raiseRecoverable(node.start, "Private fields can not be deleted");
  173014. } else {
  173015. sawUnary = true;
  173016. }
  173017. expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
  173018. } else if (!sawUnary && this.type === types$1.privateId) {
  173019. if (forInit || this.privateNameStack.length === 0) {
  173020. this.unexpected();
  173021. }
  173022. expr = this.parsePrivateIdent();
  173023. if (this.type !== types$1._in) {
  173024. this.unexpected();
  173025. }
  173026. } else {
  173027. expr = this.parseExprSubscripts(refDestructuringErrors, forInit);
  173028. if (this.checkExpressionErrors(refDestructuringErrors)) {
  173029. return expr;
  173030. }
  173031. while (this.type.postfix && !this.canInsertSemicolon()) {
  173032. var node$1 = this.startNodeAt(startPos, startLoc);
  173033. node$1.operator = this.value;
  173034. node$1.prefix = false;
  173035. node$1.argument = expr;
  173036. this.checkLValSimple(expr);
  173037. this.next();
  173038. expr = this.finishNode(node$1, "UpdateExpression");
  173039. }
  173040. }
  173041. if (!incDec && this.eat(types$1.starstar)) {
  173042. if (sawUnary) {
  173043. this.unexpected(this.lastTokStart);
  173044. } else {
  173045. return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false);
  173046. }
  173047. } else {
  173048. return expr;
  173049. }
  173050. };
  173051. function isPrivateFieldAccess(node) {
  173052. return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression);
  173053. }
  173054. pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
  173055. var startPos = this.start, startLoc = this.startLoc;
  173056. var expr = this.parseExprAtom(refDestructuringErrors, forInit);
  173057. if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
  173058. return expr;
  173059. }
  173060. var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
  173061. if (refDestructuringErrors && result.type === "MemberExpression") {
  173062. if (refDestructuringErrors.parenthesizedAssign >= result.start) {
  173063. refDestructuringErrors.parenthesizedAssign = -1;
  173064. }
  173065. if (refDestructuringErrors.parenthesizedBind >= result.start) {
  173066. refDestructuringErrors.parenthesizedBind = -1;
  173067. }
  173068. if (refDestructuringErrors.trailingComma >= result.start) {
  173069. refDestructuringErrors.trailingComma = -1;
  173070. }
  173071. }
  173072. return result;
  173073. };
  173074. pp$5.parseSubscripts = function(base2, startPos, startLoc, noCalls, forInit) {
  173075. var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base2.type === "Identifier" && base2.name === "async" && this.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && this.potentialArrowAt === base2.start;
  173076. var optionalChained = false;
  173077. while (true) {
  173078. var element2 = this.parseSubscript(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
  173079. if (element2.optional) {
  173080. optionalChained = true;
  173081. }
  173082. if (element2 === base2 || element2.type === "ArrowFunctionExpression") {
  173083. if (optionalChained) {
  173084. var chainNode = this.startNodeAt(startPos, startLoc);
  173085. chainNode.expression = element2;
  173086. element2 = this.finishNode(chainNode, "ChainExpression");
  173087. }
  173088. return element2;
  173089. }
  173090. base2 = element2;
  173091. }
  173092. };
  173093. pp$5.parseSubscript = function(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
  173094. var optionalSupported = this.options.ecmaVersion >= 11;
  173095. var optional = optionalSupported && this.eat(types$1.questionDot);
  173096. if (noCalls && optional) {
  173097. this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
  173098. }
  173099. var computed = this.eat(types$1.bracketL);
  173100. if (computed || optional && this.type !== types$1.parenL && this.type !== types$1.backQuote || this.eat(types$1.dot)) {
  173101. var node = this.startNodeAt(startPos, startLoc);
  173102. node.object = base2;
  173103. if (computed) {
  173104. node.property = this.parseExpression();
  173105. this.expect(types$1.bracketR);
  173106. } else if (this.type === types$1.privateId && base2.type !== "Super") {
  173107. node.property = this.parsePrivateIdent();
  173108. } else {
  173109. node.property = this.parseIdent(this.options.allowReserved !== "never");
  173110. }
  173111. node.computed = !!computed;
  173112. if (optionalSupported) {
  173113. node.optional = optional;
  173114. }
  173115. base2 = this.finishNode(node, "MemberExpression");
  173116. } else if (!noCalls && this.eat(types$1.parenL)) {
  173117. var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  173118. this.yieldPos = 0;
  173119. this.awaitPos = 0;
  173120. this.awaitIdentPos = 0;
  173121. var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
  173122. if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types$1.arrow)) {
  173123. this.checkPatternErrors(refDestructuringErrors, false);
  173124. this.checkYieldAwaitInDefaultParams();
  173125. if (this.awaitIdentPos > 0) {
  173126. this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function");
  173127. }
  173128. this.yieldPos = oldYieldPos;
  173129. this.awaitPos = oldAwaitPos;
  173130. this.awaitIdentPos = oldAwaitIdentPos;
  173131. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit);
  173132. }
  173133. this.checkExpressionErrors(refDestructuringErrors, true);
  173134. this.yieldPos = oldYieldPos || this.yieldPos;
  173135. this.awaitPos = oldAwaitPos || this.awaitPos;
  173136. this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
  173137. var node$1 = this.startNodeAt(startPos, startLoc);
  173138. node$1.callee = base2;
  173139. node$1.arguments = exprList;
  173140. if (optionalSupported) {
  173141. node$1.optional = optional;
  173142. }
  173143. base2 = this.finishNode(node$1, "CallExpression");
  173144. } else if (this.type === types$1.backQuote) {
  173145. if (optional || optionalChained) {
  173146. this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
  173147. }
  173148. var node$2 = this.startNodeAt(startPos, startLoc);
  173149. node$2.tag = base2;
  173150. node$2.quasi = this.parseTemplate({ isTagged: true });
  173151. base2 = this.finishNode(node$2, "TaggedTemplateExpression");
  173152. }
  173153. return base2;
  173154. };
  173155. pp$5.parseExprAtom = function(refDestructuringErrors, forInit) {
  173156. if (this.type === types$1.slash) {
  173157. this.readRegexp();
  173158. }
  173159. var node, canBeArrow = this.potentialArrowAt === this.start;
  173160. switch (this.type) {
  173161. case types$1._super:
  173162. if (!this.allowSuper) {
  173163. this.raise(this.start, "'super' keyword outside a method");
  173164. }
  173165. node = this.startNode();
  173166. this.next();
  173167. if (this.type === types$1.parenL && !this.allowDirectSuper) {
  173168. this.raise(node.start, "super() call outside constructor of a subclass");
  173169. }
  173170. if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) {
  173171. this.unexpected();
  173172. }
  173173. return this.finishNode(node, "Super");
  173174. case types$1._this:
  173175. node = this.startNode();
  173176. this.next();
  173177. return this.finishNode(node, "ThisExpression");
  173178. case types$1.name:
  173179. var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
  173180. var id = this.parseIdent(false);
  173181. if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) {
  173182. this.overrideContext(types.f_expr);
  173183. return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit);
  173184. }
  173185. if (canBeArrow && !this.canInsertSemicolon()) {
  173186. if (this.eat(types$1.arrow)) {
  173187. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit);
  173188. }
  173189. if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
  173190. id = this.parseIdent(false);
  173191. if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) {
  173192. this.unexpected();
  173193. }
  173194. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit);
  173195. }
  173196. }
  173197. return id;
  173198. case types$1.regexp:
  173199. var value = this.value;
  173200. node = this.parseLiteral(value.value);
  173201. node.regex = { pattern: value.pattern, flags: value.flags };
  173202. return node;
  173203. case types$1.num:
  173204. case types$1.string:
  173205. return this.parseLiteral(this.value);
  173206. case types$1._null:
  173207. case types$1._true:
  173208. case types$1._false:
  173209. node = this.startNode();
  173210. node.value = this.type === types$1._null ? null : this.type === types$1._true;
  173211. node.raw = this.type.keyword;
  173212. this.next();
  173213. return this.finishNode(node, "Literal");
  173214. case types$1.parenL:
  173215. var start3 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
  173216. if (refDestructuringErrors) {
  173217. if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
  173218. refDestructuringErrors.parenthesizedAssign = start3;
  173219. }
  173220. if (refDestructuringErrors.parenthesizedBind < 0) {
  173221. refDestructuringErrors.parenthesizedBind = start3;
  173222. }
  173223. }
  173224. return expr;
  173225. case types$1.bracketL:
  173226. node = this.startNode();
  173227. this.next();
  173228. node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors);
  173229. return this.finishNode(node, "ArrayExpression");
  173230. case types$1.braceL:
  173231. this.overrideContext(types.b_expr);
  173232. return this.parseObj(false, refDestructuringErrors);
  173233. case types$1._function:
  173234. node = this.startNode();
  173235. this.next();
  173236. return this.parseFunction(node, 0);
  173237. case types$1._class:
  173238. return this.parseClass(this.startNode(), false);
  173239. case types$1._new:
  173240. return this.parseNew();
  173241. case types$1.backQuote:
  173242. return this.parseTemplate();
  173243. case types$1._import:
  173244. if (this.options.ecmaVersion >= 11) {
  173245. return this.parseExprImport();
  173246. } else {
  173247. return this.unexpected();
  173248. }
  173249. default:
  173250. this.unexpected();
  173251. }
  173252. };
  173253. pp$5.parseExprImport = function() {
  173254. var node = this.startNode();
  173255. if (this.containsEsc) {
  173256. this.raiseRecoverable(this.start, "Escape sequence in keyword import");
  173257. }
  173258. var meta = this.parseIdent(true);
  173259. switch (this.type) {
  173260. case types$1.parenL:
  173261. return this.parseDynamicImport(node);
  173262. case types$1.dot:
  173263. node.meta = meta;
  173264. return this.parseImportMeta(node);
  173265. default:
  173266. this.unexpected();
  173267. }
  173268. };
  173269. pp$5.parseDynamicImport = function(node) {
  173270. this.next();
  173271. node.source = this.parseMaybeAssign();
  173272. if (!this.eat(types$1.parenR)) {
  173273. var errorPos = this.start;
  173274. if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {
  173275. this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
  173276. } else {
  173277. this.unexpected(errorPos);
  173278. }
  173279. }
  173280. return this.finishNode(node, "ImportExpression");
  173281. };
  173282. pp$5.parseImportMeta = function(node) {
  173283. this.next();
  173284. var containsEsc = this.containsEsc;
  173285. node.property = this.parseIdent(true);
  173286. if (node.property.name !== "meta") {
  173287. this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'");
  173288. }
  173289. if (containsEsc) {
  173290. this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters");
  173291. }
  173292. if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) {
  173293. this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module");
  173294. }
  173295. return this.finishNode(node, "MetaProperty");
  173296. };
  173297. pp$5.parseLiteral = function(value) {
  173298. var node = this.startNode();
  173299. node.value = value;
  173300. node.raw = this.input.slice(this.start, this.end);
  173301. if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
  173302. node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
  173303. }
  173304. this.next();
  173305. return this.finishNode(node, "Literal");
  173306. };
  173307. pp$5.parseParenExpression = function() {
  173308. this.expect(types$1.parenL);
  173309. var val = this.parseExpression();
  173310. this.expect(types$1.parenR);
  173311. return val;
  173312. };
  173313. pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
  173314. var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
  173315. if (this.options.ecmaVersion >= 6) {
  173316. this.next();
  173317. var innerStartPos = this.start, innerStartLoc = this.startLoc;
  173318. var exprList = [], first = true, lastIsComma = false;
  173319. var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
  173320. this.yieldPos = 0;
  173321. this.awaitPos = 0;
  173322. while (this.type !== types$1.parenR) {
  173323. first ? first = false : this.expect(types$1.comma);
  173324. if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) {
  173325. lastIsComma = true;
  173326. break;
  173327. } else if (this.type === types$1.ellipsis) {
  173328. spreadStart = this.start;
  173329. exprList.push(this.parseParenItem(this.parseRestBinding()));
  173330. if (this.type === types$1.comma) {
  173331. this.raise(this.start, "Comma is not permitted after the rest element");
  173332. }
  173333. break;
  173334. } else {
  173335. exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
  173336. }
  173337. }
  173338. var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
  173339. this.expect(types$1.parenR);
  173340. if (canBeArrow && !this.canInsertSemicolon() && this.eat(types$1.arrow)) {
  173341. this.checkPatternErrors(refDestructuringErrors, false);
  173342. this.checkYieldAwaitInDefaultParams();
  173343. this.yieldPos = oldYieldPos;
  173344. this.awaitPos = oldAwaitPos;
  173345. return this.parseParenArrowList(startPos, startLoc, exprList, forInit);
  173346. }
  173347. if (!exprList.length || lastIsComma) {
  173348. this.unexpected(this.lastTokStart);
  173349. }
  173350. if (spreadStart) {
  173351. this.unexpected(spreadStart);
  173352. }
  173353. this.checkExpressionErrors(refDestructuringErrors, true);
  173354. this.yieldPos = oldYieldPos || this.yieldPos;
  173355. this.awaitPos = oldAwaitPos || this.awaitPos;
  173356. if (exprList.length > 1) {
  173357. val = this.startNodeAt(innerStartPos, innerStartLoc);
  173358. val.expressions = exprList;
  173359. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  173360. } else {
  173361. val = exprList[0];
  173362. }
  173363. } else {
  173364. val = this.parseParenExpression();
  173365. }
  173366. if (this.options.preserveParens) {
  173367. var par = this.startNodeAt(startPos, startLoc);
  173368. par.expression = val;
  173369. return this.finishNode(par, "ParenthesizedExpression");
  173370. } else {
  173371. return val;
  173372. }
  173373. };
  173374. pp$5.parseParenItem = function(item) {
  173375. return item;
  173376. };
  173377. pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
  173378. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit);
  173379. };
  173380. var empty = [];
  173381. pp$5.parseNew = function() {
  173382. if (this.containsEsc) {
  173383. this.raiseRecoverable(this.start, "Escape sequence in keyword new");
  173384. }
  173385. var node = this.startNode();
  173386. var meta = this.parseIdent(true);
  173387. if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) {
  173388. node.meta = meta;
  173389. var containsEsc = this.containsEsc;
  173390. node.property = this.parseIdent(true);
  173391. if (node.property.name !== "target") {
  173392. this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'");
  173393. }
  173394. if (containsEsc) {
  173395. this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters");
  173396. }
  173397. if (!this.allowNewDotTarget) {
  173398. this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block");
  173399. }
  173400. return this.finishNode(node, "MetaProperty");
  173401. }
  173402. var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types$1._import;
  173403. node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false);
  173404. if (isImport && node.callee.type === "ImportExpression") {
  173405. this.raise(startPos, "Cannot use new with import()");
  173406. }
  173407. if (this.eat(types$1.parenL)) {
  173408. node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
  173409. } else {
  173410. node.arguments = empty;
  173411. }
  173412. return this.finishNode(node, "NewExpression");
  173413. };
  173414. pp$5.parseTemplateElement = function(ref2) {
  173415. var isTagged = ref2.isTagged;
  173416. var elem = this.startNode();
  173417. if (this.type === types$1.invalidTemplate) {
  173418. if (!isTagged) {
  173419. this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
  173420. }
  173421. elem.value = {
  173422. raw: this.value,
  173423. cooked: null
  173424. };
  173425. } else {
  173426. elem.value = {
  173427. raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
  173428. cooked: this.value
  173429. };
  173430. }
  173431. this.next();
  173432. elem.tail = this.type === types$1.backQuote;
  173433. return this.finishNode(elem, "TemplateElement");
  173434. };
  173435. pp$5.parseTemplate = function(ref2) {
  173436. if (ref2 === void 0)
  173437. ref2 = {};
  173438. var isTagged = ref2.isTagged;
  173439. if (isTagged === void 0)
  173440. isTagged = false;
  173441. var node = this.startNode();
  173442. this.next();
  173443. node.expressions = [];
  173444. var curElt = this.parseTemplateElement({ isTagged });
  173445. node.quasis = [curElt];
  173446. while (!curElt.tail) {
  173447. if (this.type === types$1.eof) {
  173448. this.raise(this.pos, "Unterminated template literal");
  173449. }
  173450. this.expect(types$1.dollarBraceL);
  173451. node.expressions.push(this.parseExpression());
  173452. this.expect(types$1.braceR);
  173453. node.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
  173454. }
  173455. this.next();
  173456. return this.finishNode(node, "TemplateLiteral");
  173457. };
  173458. pp$5.isAsyncProp = function(prop) {
  173459. return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  173460. };
  173461. pp$5.parseObj = function(isPattern, refDestructuringErrors) {
  173462. var node = this.startNode(), first = true, propHash = {};
  173463. node.properties = [];
  173464. this.next();
  173465. while (!this.eat(types$1.braceR)) {
  173466. if (!first) {
  173467. this.expect(types$1.comma);
  173468. if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) {
  173469. break;
  173470. }
  173471. } else {
  173472. first = false;
  173473. }
  173474. var prop = this.parseProperty(isPattern, refDestructuringErrors);
  173475. if (!isPattern) {
  173476. this.checkPropClash(prop, propHash, refDestructuringErrors);
  173477. }
  173478. node.properties.push(prop);
  173479. }
  173480. return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
  173481. };
  173482. pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
  173483. var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
  173484. if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
  173485. if (isPattern) {
  173486. prop.argument = this.parseIdent(false);
  173487. if (this.type === types$1.comma) {
  173488. this.raise(this.start, "Comma is not permitted after the rest element");
  173489. }
  173490. return this.finishNode(prop, "RestElement");
  173491. }
  173492. if (this.type === types$1.parenL && refDestructuringErrors) {
  173493. if (refDestructuringErrors.parenthesizedAssign < 0) {
  173494. refDestructuringErrors.parenthesizedAssign = this.start;
  173495. }
  173496. if (refDestructuringErrors.parenthesizedBind < 0) {
  173497. refDestructuringErrors.parenthesizedBind = this.start;
  173498. }
  173499. }
  173500. prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  173501. if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
  173502. refDestructuringErrors.trailingComma = this.start;
  173503. }
  173504. return this.finishNode(prop, "SpreadElement");
  173505. }
  173506. if (this.options.ecmaVersion >= 6) {
  173507. prop.method = false;
  173508. prop.shorthand = false;
  173509. if (isPattern || refDestructuringErrors) {
  173510. startPos = this.start;
  173511. startLoc = this.startLoc;
  173512. }
  173513. if (!isPattern) {
  173514. isGenerator = this.eat(types$1.star);
  173515. }
  173516. }
  173517. var containsEsc = this.containsEsc;
  173518. this.parsePropertyName(prop);
  173519. if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
  173520. isAsync = true;
  173521. isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
  173522. this.parsePropertyName(prop, refDestructuringErrors);
  173523. } else {
  173524. isAsync = false;
  173525. }
  173526. this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
  173527. return this.finishNode(prop, "Property");
  173528. };
  173529. pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
  173530. if ((isGenerator || isAsync) && this.type === types$1.colon) {
  173531. this.unexpected();
  173532. }
  173533. if (this.eat(types$1.colon)) {
  173534. prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
  173535. prop.kind = "init";
  173536. } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
  173537. if (isPattern) {
  173538. this.unexpected();
  173539. }
  173540. prop.kind = "init";
  173541. prop.method = true;
  173542. prop.value = this.parseMethod(isGenerator, isAsync);
  173543. } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {
  173544. if (isGenerator || isAsync) {
  173545. this.unexpected();
  173546. }
  173547. prop.kind = prop.key.name;
  173548. this.parsePropertyName(prop);
  173549. prop.value = this.parseMethod(false);
  173550. var paramCount = prop.kind === "get" ? 0 : 1;
  173551. if (prop.value.params.length !== paramCount) {
  173552. var start3 = prop.value.start;
  173553. if (prop.kind === "get") {
  173554. this.raiseRecoverable(start3, "getter should have no params");
  173555. } else {
  173556. this.raiseRecoverable(start3, "setter should have exactly one param");
  173557. }
  173558. } else {
  173559. if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
  173560. this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
  173561. }
  173562. }
  173563. } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
  173564. if (isGenerator || isAsync) {
  173565. this.unexpected();
  173566. }
  173567. this.checkUnreserved(prop.key);
  173568. if (prop.key.name === "await" && !this.awaitIdentPos) {
  173569. this.awaitIdentPos = startPos;
  173570. }
  173571. prop.kind = "init";
  173572. if (isPattern) {
  173573. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  173574. } else if (this.type === types$1.eq && refDestructuringErrors) {
  173575. if (refDestructuringErrors.shorthandAssign < 0) {
  173576. refDestructuringErrors.shorthandAssign = this.start;
  173577. }
  173578. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  173579. } else {
  173580. prop.value = this.copyNode(prop.key);
  173581. }
  173582. prop.shorthand = true;
  173583. } else {
  173584. this.unexpected();
  173585. }
  173586. };
  173587. pp$5.parsePropertyName = function(prop) {
  173588. if (this.options.ecmaVersion >= 6) {
  173589. if (this.eat(types$1.bracketL)) {
  173590. prop.computed = true;
  173591. prop.key = this.parseMaybeAssign();
  173592. this.expect(types$1.bracketR);
  173593. return prop.key;
  173594. } else {
  173595. prop.computed = false;
  173596. }
  173597. }
  173598. return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
  173599. };
  173600. pp$5.initFunction = function(node) {
  173601. node.id = null;
  173602. if (this.options.ecmaVersion >= 6) {
  173603. node.generator = node.expression = false;
  173604. }
  173605. if (this.options.ecmaVersion >= 8) {
  173606. node.async = false;
  173607. }
  173608. };
  173609. pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
  173610. var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  173611. this.initFunction(node);
  173612. if (this.options.ecmaVersion >= 6) {
  173613. node.generator = isGenerator;
  173614. }
  173615. if (this.options.ecmaVersion >= 8) {
  173616. node.async = !!isAsync;
  173617. }
  173618. this.yieldPos = 0;
  173619. this.awaitPos = 0;
  173620. this.awaitIdentPos = 0;
  173621. this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
  173622. this.expect(types$1.parenL);
  173623. node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
  173624. this.checkYieldAwaitInDefaultParams();
  173625. this.parseFunctionBody(node, false, true, false);
  173626. this.yieldPos = oldYieldPos;
  173627. this.awaitPos = oldAwaitPos;
  173628. this.awaitIdentPos = oldAwaitIdentPos;
  173629. return this.finishNode(node, "FunctionExpression");
  173630. };
  173631. pp$5.parseArrowExpression = function(node, params, isAsync, forInit) {
  173632. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  173633. this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
  173634. this.initFunction(node);
  173635. if (this.options.ecmaVersion >= 8) {
  173636. node.async = !!isAsync;
  173637. }
  173638. this.yieldPos = 0;
  173639. this.awaitPos = 0;
  173640. this.awaitIdentPos = 0;
  173641. node.params = this.toAssignableList(params, true);
  173642. this.parseFunctionBody(node, true, false, forInit);
  173643. this.yieldPos = oldYieldPos;
  173644. this.awaitPos = oldAwaitPos;
  173645. this.awaitIdentPos = oldAwaitIdentPos;
  173646. return this.finishNode(node, "ArrowFunctionExpression");
  173647. };
  173648. pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
  173649. var isExpression = isArrowFunction && this.type !== types$1.braceL;
  173650. var oldStrict = this.strict, useStrict = false;
  173651. if (isExpression) {
  173652. node.body = this.parseMaybeAssign(forInit);
  173653. node.expression = true;
  173654. this.checkParams(node, false);
  173655. } else {
  173656. var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
  173657. if (!oldStrict || nonSimple) {
  173658. useStrict = this.strictDirective(this.end);
  173659. if (useStrict && nonSimple) {
  173660. this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
  173661. }
  173662. }
  173663. var oldLabels = this.labels;
  173664. this.labels = [];
  173665. if (useStrict) {
  173666. this.strict = true;
  173667. }
  173668. this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
  173669. if (this.strict && node.id) {
  173670. this.checkLValSimple(node.id, BIND_OUTSIDE);
  173671. }
  173672. node.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
  173673. node.expression = false;
  173674. this.adaptDirectivePrologue(node.body.body);
  173675. this.labels = oldLabels;
  173676. }
  173677. this.exitScope();
  173678. };
  173679. pp$5.isSimpleParamList = function(params) {
  173680. for (var i = 0, list3 = params; i < list3.length; i += 1) {
  173681. var param = list3[i];
  173682. if (param.type !== "Identifier") {
  173683. return false;
  173684. }
  173685. }
  173686. return true;
  173687. };
  173688. pp$5.checkParams = function(node, allowDuplicates) {
  173689. var nameHash = /* @__PURE__ */ Object.create(null);
  173690. for (var i = 0, list3 = node.params; i < list3.length; i += 1) {
  173691. var param = list3[i];
  173692. this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);
  173693. }
  173694. };
  173695. pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
  173696. var elts = [], first = true;
  173697. while (!this.eat(close)) {
  173698. if (!first) {
  173699. this.expect(types$1.comma);
  173700. if (allowTrailingComma && this.afterTrailingComma(close)) {
  173701. break;
  173702. }
  173703. } else {
  173704. first = false;
  173705. }
  173706. var elt = void 0;
  173707. if (allowEmpty && this.type === types$1.comma) {
  173708. elt = null;
  173709. } else if (this.type === types$1.ellipsis) {
  173710. elt = this.parseSpread(refDestructuringErrors);
  173711. if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) {
  173712. refDestructuringErrors.trailingComma = this.start;
  173713. }
  173714. } else {
  173715. elt = this.parseMaybeAssign(false, refDestructuringErrors);
  173716. }
  173717. elts.push(elt);
  173718. }
  173719. return elts;
  173720. };
  173721. pp$5.checkUnreserved = function(ref2) {
  173722. var start3 = ref2.start;
  173723. var end = ref2.end;
  173724. var name2 = ref2.name;
  173725. if (this.inGenerator && name2 === "yield") {
  173726. this.raiseRecoverable(start3, "Cannot use 'yield' as identifier inside a generator");
  173727. }
  173728. if (this.inAsync && name2 === "await") {
  173729. this.raiseRecoverable(start3, "Cannot use 'await' as identifier inside an async function");
  173730. }
  173731. if (this.currentThisScope().inClassFieldInit && name2 === "arguments") {
  173732. this.raiseRecoverable(start3, "Cannot use 'arguments' in class field initializer");
  173733. }
  173734. if (this.inClassStaticBlock && (name2 === "arguments" || name2 === "await")) {
  173735. this.raise(start3, "Cannot use " + name2 + " in class static initialization block");
  173736. }
  173737. if (this.keywords.test(name2)) {
  173738. this.raise(start3, "Unexpected keyword '" + name2 + "'");
  173739. }
  173740. if (this.options.ecmaVersion < 6 && this.input.slice(start3, end).indexOf("\\") !== -1) {
  173741. return;
  173742. }
  173743. var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
  173744. if (re.test(name2)) {
  173745. if (!this.inAsync && name2 === "await") {
  173746. this.raiseRecoverable(start3, "Cannot use keyword 'await' outside an async function");
  173747. }
  173748. this.raiseRecoverable(start3, "The keyword '" + name2 + "' is reserved");
  173749. }
  173750. };
  173751. pp$5.parseIdent = function(liberal, isBinding) {
  173752. var node = this.startNode();
  173753. if (this.type === types$1.name) {
  173754. node.name = this.value;
  173755. } else if (this.type.keyword) {
  173756. node.name = this.type.keyword;
  173757. if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
  173758. this.context.pop();
  173759. }
  173760. } else {
  173761. this.unexpected();
  173762. }
  173763. this.next(!!liberal);
  173764. this.finishNode(node, "Identifier");
  173765. if (!liberal) {
  173766. this.checkUnreserved(node);
  173767. if (node.name === "await" && !this.awaitIdentPos) {
  173768. this.awaitIdentPos = node.start;
  173769. }
  173770. }
  173771. return node;
  173772. };
  173773. pp$5.parsePrivateIdent = function() {
  173774. var node = this.startNode();
  173775. if (this.type === types$1.privateId) {
  173776. node.name = this.value;
  173777. } else {
  173778. this.unexpected();
  173779. }
  173780. this.next();
  173781. this.finishNode(node, "PrivateIdentifier");
  173782. if (this.privateNameStack.length === 0) {
  173783. this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class");
  173784. } else {
  173785. this.privateNameStack[this.privateNameStack.length - 1].used.push(node);
  173786. }
  173787. return node;
  173788. };
  173789. pp$5.parseYield = function(forInit) {
  173790. if (!this.yieldPos) {
  173791. this.yieldPos = this.start;
  173792. }
  173793. var node = this.startNode();
  173794. this.next();
  173795. if (this.type === types$1.semi || this.canInsertSemicolon() || this.type !== types$1.star && !this.type.startsExpr) {
  173796. node.delegate = false;
  173797. node.argument = null;
  173798. } else {
  173799. node.delegate = this.eat(types$1.star);
  173800. node.argument = this.parseMaybeAssign(forInit);
  173801. }
  173802. return this.finishNode(node, "YieldExpression");
  173803. };
  173804. pp$5.parseAwait = function(forInit) {
  173805. if (!this.awaitPos) {
  173806. this.awaitPos = this.start;
  173807. }
  173808. var node = this.startNode();
  173809. this.next();
  173810. node.argument = this.parseMaybeUnary(null, true, false, forInit);
  173811. return this.finishNode(node, "AwaitExpression");
  173812. };
  173813. var pp$4 = Parser.prototype;
  173814. pp$4.raise = function(pos, message) {
  173815. var loc = getLineInfo(this.input, pos);
  173816. message += " (" + loc.line + ":" + loc.column + ")";
  173817. var err = new SyntaxError(message);
  173818. err.pos = pos;
  173819. err.loc = loc;
  173820. err.raisedAt = this.pos;
  173821. throw err;
  173822. };
  173823. pp$4.raiseRecoverable = pp$4.raise;
  173824. pp$4.curPosition = function() {
  173825. if (this.options.locations) {
  173826. return new Position(this.curLine, this.pos - this.lineStart);
  173827. }
  173828. };
  173829. var pp$3 = Parser.prototype;
  173830. var Scope = function Scope2(flags) {
  173831. this.flags = flags;
  173832. this.var = [];
  173833. this.lexical = [];
  173834. this.functions = [];
  173835. this.inClassFieldInit = false;
  173836. };
  173837. pp$3.enterScope = function(flags) {
  173838. this.scopeStack.push(new Scope(flags));
  173839. };
  173840. pp$3.exitScope = function() {
  173841. this.scopeStack.pop();
  173842. };
  173843. pp$3.treatFunctionsAsVarInScope = function(scope) {
  173844. return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP;
  173845. };
  173846. pp$3.declareName = function(name2, bindingType, pos) {
  173847. var redeclared = false;
  173848. if (bindingType === BIND_LEXICAL) {
  173849. var scope = this.currentScope();
  173850. redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
  173851. scope.lexical.push(name2);
  173852. if (this.inModule && scope.flags & SCOPE_TOP) {
  173853. delete this.undefinedExports[name2];
  173854. }
  173855. } else if (bindingType === BIND_SIMPLE_CATCH) {
  173856. var scope$1 = this.currentScope();
  173857. scope$1.lexical.push(name2);
  173858. } else if (bindingType === BIND_FUNCTION) {
  173859. var scope$2 = this.currentScope();
  173860. if (this.treatFunctionsAsVar) {
  173861. redeclared = scope$2.lexical.indexOf(name2) > -1;
  173862. } else {
  173863. redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1;
  173864. }
  173865. scope$2.functions.push(name2);
  173866. } else {
  173867. for (var i = this.scopeStack.length - 1; i >= 0; --i) {
  173868. var scope$3 = this.scopeStack[i];
  173869. if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
  173870. redeclared = true;
  173871. break;
  173872. }
  173873. scope$3.var.push(name2);
  173874. if (this.inModule && scope$3.flags & SCOPE_TOP) {
  173875. delete this.undefinedExports[name2];
  173876. }
  173877. if (scope$3.flags & SCOPE_VAR) {
  173878. break;
  173879. }
  173880. }
  173881. }
  173882. if (redeclared) {
  173883. this.raiseRecoverable(pos, "Identifier '" + name2 + "' has already been declared");
  173884. }
  173885. };
  173886. pp$3.checkLocalExport = function(id) {
  173887. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {
  173888. this.undefinedExports[id.name] = id;
  173889. }
  173890. };
  173891. pp$3.currentScope = function() {
  173892. return this.scopeStack[this.scopeStack.length - 1];
  173893. };
  173894. pp$3.currentVarScope = function() {
  173895. for (var i = this.scopeStack.length - 1; ; i--) {
  173896. var scope = this.scopeStack[i];
  173897. if (scope.flags & SCOPE_VAR) {
  173898. return scope;
  173899. }
  173900. }
  173901. };
  173902. pp$3.currentThisScope = function() {
  173903. for (var i = this.scopeStack.length - 1; ; i--) {
  173904. var scope = this.scopeStack[i];
  173905. if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {
  173906. return scope;
  173907. }
  173908. }
  173909. };
  173910. var Node = function Node2(parser, pos, loc) {
  173911. this.type = "";
  173912. this.start = pos;
  173913. this.end = 0;
  173914. if (parser.options.locations) {
  173915. this.loc = new SourceLocation(parser, loc);
  173916. }
  173917. if (parser.options.directSourceFile) {
  173918. this.sourceFile = parser.options.directSourceFile;
  173919. }
  173920. if (parser.options.ranges) {
  173921. this.range = [pos, 0];
  173922. }
  173923. };
  173924. var pp$2 = Parser.prototype;
  173925. pp$2.startNode = function() {
  173926. return new Node(this, this.start, this.startLoc);
  173927. };
  173928. pp$2.startNodeAt = function(pos, loc) {
  173929. return new Node(this, pos, loc);
  173930. };
  173931. function finishNodeAt(node, type, pos, loc) {
  173932. node.type = type;
  173933. node.end = pos;
  173934. if (this.options.locations) {
  173935. node.loc.end = loc;
  173936. }
  173937. if (this.options.ranges) {
  173938. node.range[1] = pos;
  173939. }
  173940. return node;
  173941. }
  173942. pp$2.finishNode = function(node, type) {
  173943. return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
  173944. };
  173945. pp$2.finishNodeAt = function(node, type, pos, loc) {
  173946. return finishNodeAt.call(this, node, type, pos, loc);
  173947. };
  173948. pp$2.copyNode = function(node) {
  173949. var newNode = new Node(this, node.start, this.startLoc);
  173950. for (var prop in node) {
  173951. newNode[prop] = node[prop];
  173952. }
  173953. return newNode;
  173954. };
  173955. var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
  173956. var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
  173957. var ecma11BinaryProperties = ecma10BinaryProperties;
  173958. var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
  173959. var ecma13BinaryProperties = ecma12BinaryProperties;
  173960. var unicodeBinaryProperties = {
  173961. 9: ecma9BinaryProperties,
  173962. 10: ecma10BinaryProperties,
  173963. 11: ecma11BinaryProperties,
  173964. 12: ecma12BinaryProperties,
  173965. 13: ecma13BinaryProperties
  173966. };
  173967. var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
  173968. var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
  173969. var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
  173970. var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
  173971. var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
  173972. var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
  173973. var unicodeScriptValues = {
  173974. 9: ecma9ScriptValues,
  173975. 10: ecma10ScriptValues,
  173976. 11: ecma11ScriptValues,
  173977. 12: ecma12ScriptValues,
  173978. 13: ecma13ScriptValues
  173979. };
  173980. var data = {};
  173981. function buildUnicodeData(ecmaVersion) {
  173982. var d = data[ecmaVersion] = {
  173983. binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues),
  173984. nonBinary: {
  173985. General_Category: wordsRegexp(unicodeGeneralCategoryValues),
  173986. Script: wordsRegexp(unicodeScriptValues[ecmaVersion])
  173987. }
  173988. };
  173989. d.nonBinary.Script_Extensions = d.nonBinary.Script;
  173990. d.nonBinary.gc = d.nonBinary.General_Category;
  173991. d.nonBinary.sc = d.nonBinary.Script;
  173992. d.nonBinary.scx = d.nonBinary.Script_Extensions;
  173993. }
  173994. for (i = 0, list3 = [9, 10, 11, 12, 13]; i < list3.length; i += 1) {
  173995. ecmaVersion = list3[i];
  173996. buildUnicodeData(ecmaVersion);
  173997. }
  173998. var ecmaVersion;
  173999. var i;
  174000. var list3;
  174001. var pp$1 = Parser.prototype;
  174002. var RegExpValidationState = function RegExpValidationState2(parser) {
  174003. this.parser = parser;
  174004. this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
  174005. this.unicodeProperties = data[parser.options.ecmaVersion >= 13 ? 13 : parser.options.ecmaVersion];
  174006. this.source = "";
  174007. this.flags = "";
  174008. this.start = 0;
  174009. this.switchU = false;
  174010. this.switchN = false;
  174011. this.pos = 0;
  174012. this.lastIntValue = 0;
  174013. this.lastStringValue = "";
  174014. this.lastAssertionIsQuantifiable = false;
  174015. this.numCapturingParens = 0;
  174016. this.maxBackReference = 0;
  174017. this.groupNames = [];
  174018. this.backReferenceNames = [];
  174019. };
  174020. RegExpValidationState.prototype.reset = function reset(start3, pattern, flags) {
  174021. var unicode = flags.indexOf("u") !== -1;
  174022. this.start = start3 | 0;
  174023. this.source = pattern + "";
  174024. this.flags = flags;
  174025. this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
  174026. this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
  174027. };
  174028. RegExpValidationState.prototype.raise = function raise(message) {
  174029. this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
  174030. };
  174031. RegExpValidationState.prototype.at = function at(i, forceU) {
  174032. if (forceU === void 0)
  174033. forceU = false;
  174034. var s = this.source;
  174035. var l = s.length;
  174036. if (i >= l) {
  174037. return -1;
  174038. }
  174039. var c = s.charCodeAt(i);
  174040. if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i + 1 >= l) {
  174041. return c;
  174042. }
  174043. var next = s.charCodeAt(i + 1);
  174044. return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
  174045. };
  174046. RegExpValidationState.prototype.nextIndex = function nextIndex(i, forceU) {
  174047. if (forceU === void 0)
  174048. forceU = false;
  174049. var s = this.source;
  174050. var l = s.length;
  174051. if (i >= l) {
  174052. return l;
  174053. }
  174054. var c = s.charCodeAt(i), next;
  174055. if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 56320 || next > 57343) {
  174056. return i + 1;
  174057. }
  174058. return i + 2;
  174059. };
  174060. RegExpValidationState.prototype.current = function current(forceU) {
  174061. if (forceU === void 0)
  174062. forceU = false;
  174063. return this.at(this.pos, forceU);
  174064. };
  174065. RegExpValidationState.prototype.lookahead = function lookahead(forceU) {
  174066. if (forceU === void 0)
  174067. forceU = false;
  174068. return this.at(this.nextIndex(this.pos, forceU), forceU);
  174069. };
  174070. RegExpValidationState.prototype.advance = function advance(forceU) {
  174071. if (forceU === void 0)
  174072. forceU = false;
  174073. this.pos = this.nextIndex(this.pos, forceU);
  174074. };
  174075. RegExpValidationState.prototype.eat = function eat(ch, forceU) {
  174076. if (forceU === void 0)
  174077. forceU = false;
  174078. if (this.current(forceU) === ch) {
  174079. this.advance(forceU);
  174080. return true;
  174081. }
  174082. return false;
  174083. };
  174084. function codePointToString$1(ch) {
  174085. if (ch <= 65535) {
  174086. return String.fromCharCode(ch);
  174087. }
  174088. ch -= 65536;
  174089. return String.fromCharCode((ch >> 10) + 55296, (ch & 1023) + 56320);
  174090. }
  174091. pp$1.validateRegExpFlags = function(state) {
  174092. var validFlags = state.validFlags;
  174093. var flags = state.flags;
  174094. for (var i = 0; i < flags.length; i++) {
  174095. var flag = flags.charAt(i);
  174096. if (validFlags.indexOf(flag) === -1) {
  174097. this.raise(state.start, "Invalid regular expression flag");
  174098. }
  174099. if (flags.indexOf(flag, i + 1) > -1) {
  174100. this.raise(state.start, "Duplicate regular expression flag");
  174101. }
  174102. }
  174103. };
  174104. pp$1.validateRegExpPattern = function(state) {
  174105. this.regexp_pattern(state);
  174106. if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
  174107. state.switchN = true;
  174108. this.regexp_pattern(state);
  174109. }
  174110. };
  174111. pp$1.regexp_pattern = function(state) {
  174112. state.pos = 0;
  174113. state.lastIntValue = 0;
  174114. state.lastStringValue = "";
  174115. state.lastAssertionIsQuantifiable = false;
  174116. state.numCapturingParens = 0;
  174117. state.maxBackReference = 0;
  174118. state.groupNames.length = 0;
  174119. state.backReferenceNames.length = 0;
  174120. this.regexp_disjunction(state);
  174121. if (state.pos !== state.source.length) {
  174122. if (state.eat(41)) {
  174123. state.raise("Unmatched ')'");
  174124. }
  174125. if (state.eat(93) || state.eat(125)) {
  174126. state.raise("Lone quantifier brackets");
  174127. }
  174128. }
  174129. if (state.maxBackReference > state.numCapturingParens) {
  174130. state.raise("Invalid escape");
  174131. }
  174132. for (var i = 0, list3 = state.backReferenceNames; i < list3.length; i += 1) {
  174133. var name2 = list3[i];
  174134. if (state.groupNames.indexOf(name2) === -1) {
  174135. state.raise("Invalid named capture referenced");
  174136. }
  174137. }
  174138. };
  174139. pp$1.regexp_disjunction = function(state) {
  174140. this.regexp_alternative(state);
  174141. while (state.eat(124)) {
  174142. this.regexp_alternative(state);
  174143. }
  174144. if (this.regexp_eatQuantifier(state, true)) {
  174145. state.raise("Nothing to repeat");
  174146. }
  174147. if (state.eat(123)) {
  174148. state.raise("Lone quantifier brackets");
  174149. }
  174150. };
  174151. pp$1.regexp_alternative = function(state) {
  174152. while (state.pos < state.source.length && this.regexp_eatTerm(state)) {
  174153. }
  174154. };
  174155. pp$1.regexp_eatTerm = function(state) {
  174156. if (this.regexp_eatAssertion(state)) {
  174157. if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
  174158. if (state.switchU) {
  174159. state.raise("Invalid quantifier");
  174160. }
  174161. }
  174162. return true;
  174163. }
  174164. if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
  174165. this.regexp_eatQuantifier(state);
  174166. return true;
  174167. }
  174168. return false;
  174169. };
  174170. pp$1.regexp_eatAssertion = function(state) {
  174171. var start3 = state.pos;
  174172. state.lastAssertionIsQuantifiable = false;
  174173. if (state.eat(94) || state.eat(36)) {
  174174. return true;
  174175. }
  174176. if (state.eat(92)) {
  174177. if (state.eat(66) || state.eat(98)) {
  174178. return true;
  174179. }
  174180. state.pos = start3;
  174181. }
  174182. if (state.eat(40) && state.eat(63)) {
  174183. var lookbehind = false;
  174184. if (this.options.ecmaVersion >= 9) {
  174185. lookbehind = state.eat(60);
  174186. }
  174187. if (state.eat(61) || state.eat(33)) {
  174188. this.regexp_disjunction(state);
  174189. if (!state.eat(41)) {
  174190. state.raise("Unterminated group");
  174191. }
  174192. state.lastAssertionIsQuantifiable = !lookbehind;
  174193. return true;
  174194. }
  174195. }
  174196. state.pos = start3;
  174197. return false;
  174198. };
  174199. pp$1.regexp_eatQuantifier = function(state, noError) {
  174200. if (noError === void 0)
  174201. noError = false;
  174202. if (this.regexp_eatQuantifierPrefix(state, noError)) {
  174203. state.eat(63);
  174204. return true;
  174205. }
  174206. return false;
  174207. };
  174208. pp$1.regexp_eatQuantifierPrefix = function(state, noError) {
  174209. return state.eat(42) || state.eat(43) || state.eat(63) || this.regexp_eatBracedQuantifier(state, noError);
  174210. };
  174211. pp$1.regexp_eatBracedQuantifier = function(state, noError) {
  174212. var start3 = state.pos;
  174213. if (state.eat(123)) {
  174214. var min = 0, max = -1;
  174215. if (this.regexp_eatDecimalDigits(state)) {
  174216. min = state.lastIntValue;
  174217. if (state.eat(44) && this.regexp_eatDecimalDigits(state)) {
  174218. max = state.lastIntValue;
  174219. }
  174220. if (state.eat(125)) {
  174221. if (max !== -1 && max < min && !noError) {
  174222. state.raise("numbers out of order in {} quantifier");
  174223. }
  174224. return true;
  174225. }
  174226. }
  174227. if (state.switchU && !noError) {
  174228. state.raise("Incomplete quantifier");
  174229. }
  174230. state.pos = start3;
  174231. }
  174232. return false;
  174233. };
  174234. pp$1.regexp_eatAtom = function(state) {
  174235. return this.regexp_eatPatternCharacters(state) || state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
  174236. };
  174237. pp$1.regexp_eatReverseSolidusAtomEscape = function(state) {
  174238. var start3 = state.pos;
  174239. if (state.eat(92)) {
  174240. if (this.regexp_eatAtomEscape(state)) {
  174241. return true;
  174242. }
  174243. state.pos = start3;
  174244. }
  174245. return false;
  174246. };
  174247. pp$1.regexp_eatUncapturingGroup = function(state) {
  174248. var start3 = state.pos;
  174249. if (state.eat(40)) {
  174250. if (state.eat(63) && state.eat(58)) {
  174251. this.regexp_disjunction(state);
  174252. if (state.eat(41)) {
  174253. return true;
  174254. }
  174255. state.raise("Unterminated group");
  174256. }
  174257. state.pos = start3;
  174258. }
  174259. return false;
  174260. };
  174261. pp$1.regexp_eatCapturingGroup = function(state) {
  174262. if (state.eat(40)) {
  174263. if (this.options.ecmaVersion >= 9) {
  174264. this.regexp_groupSpecifier(state);
  174265. } else if (state.current() === 63) {
  174266. state.raise("Invalid group");
  174267. }
  174268. this.regexp_disjunction(state);
  174269. if (state.eat(41)) {
  174270. state.numCapturingParens += 1;
  174271. return true;
  174272. }
  174273. state.raise("Unterminated group");
  174274. }
  174275. return false;
  174276. };
  174277. pp$1.regexp_eatExtendedAtom = function(state) {
  174278. return state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
  174279. };
  174280. pp$1.regexp_eatInvalidBracedQuantifier = function(state) {
  174281. if (this.regexp_eatBracedQuantifier(state, true)) {
  174282. state.raise("Nothing to repeat");
  174283. }
  174284. return false;
  174285. };
  174286. pp$1.regexp_eatSyntaxCharacter = function(state) {
  174287. var ch = state.current();
  174288. if (isSyntaxCharacter(ch)) {
  174289. state.lastIntValue = ch;
  174290. state.advance();
  174291. return true;
  174292. }
  174293. return false;
  174294. };
  174295. function isSyntaxCharacter(ch) {
  174296. return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
  174297. }
  174298. pp$1.regexp_eatPatternCharacters = function(state) {
  174299. var start3 = state.pos;
  174300. var ch = 0;
  174301. while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {
  174302. state.advance();
  174303. }
  174304. return state.pos !== start3;
  174305. };
  174306. pp$1.regexp_eatExtendedPatternCharacter = function(state) {
  174307. var ch = state.current();
  174308. if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) {
  174309. state.advance();
  174310. return true;
  174311. }
  174312. return false;
  174313. };
  174314. pp$1.regexp_groupSpecifier = function(state) {
  174315. if (state.eat(63)) {
  174316. if (this.regexp_eatGroupName(state)) {
  174317. if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
  174318. state.raise("Duplicate capture group name");
  174319. }
  174320. state.groupNames.push(state.lastStringValue);
  174321. return;
  174322. }
  174323. state.raise("Invalid group");
  174324. }
  174325. };
  174326. pp$1.regexp_eatGroupName = function(state) {
  174327. state.lastStringValue = "";
  174328. if (state.eat(60)) {
  174329. if (this.regexp_eatRegExpIdentifierName(state) && state.eat(62)) {
  174330. return true;
  174331. }
  174332. state.raise("Invalid capture group name");
  174333. }
  174334. return false;
  174335. };
  174336. pp$1.regexp_eatRegExpIdentifierName = function(state) {
  174337. state.lastStringValue = "";
  174338. if (this.regexp_eatRegExpIdentifierStart(state)) {
  174339. state.lastStringValue += codePointToString$1(state.lastIntValue);
  174340. while (this.regexp_eatRegExpIdentifierPart(state)) {
  174341. state.lastStringValue += codePointToString$1(state.lastIntValue);
  174342. }
  174343. return true;
  174344. }
  174345. return false;
  174346. };
  174347. pp$1.regexp_eatRegExpIdentifierStart = function(state) {
  174348. var start3 = state.pos;
  174349. var forceU = this.options.ecmaVersion >= 11;
  174350. var ch = state.current(forceU);
  174351. state.advance(forceU);
  174352. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  174353. ch = state.lastIntValue;
  174354. }
  174355. if (isRegExpIdentifierStart(ch)) {
  174356. state.lastIntValue = ch;
  174357. return true;
  174358. }
  174359. state.pos = start3;
  174360. return false;
  174361. };
  174362. function isRegExpIdentifierStart(ch) {
  174363. return isIdentifierStart(ch, true) || ch === 36 || ch === 95;
  174364. }
  174365. pp$1.regexp_eatRegExpIdentifierPart = function(state) {
  174366. var start3 = state.pos;
  174367. var forceU = this.options.ecmaVersion >= 11;
  174368. var ch = state.current(forceU);
  174369. state.advance(forceU);
  174370. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  174371. ch = state.lastIntValue;
  174372. }
  174373. if (isRegExpIdentifierPart(ch)) {
  174374. state.lastIntValue = ch;
  174375. return true;
  174376. }
  174377. state.pos = start3;
  174378. return false;
  174379. };
  174380. function isRegExpIdentifierPart(ch) {
  174381. return isIdentifierChar(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
  174382. }
  174383. pp$1.regexp_eatAtomEscape = function(state) {
  174384. if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
  174385. return true;
  174386. }
  174387. if (state.switchU) {
  174388. if (state.current() === 99) {
  174389. state.raise("Invalid unicode escape");
  174390. }
  174391. state.raise("Invalid escape");
  174392. }
  174393. return false;
  174394. };
  174395. pp$1.regexp_eatBackReference = function(state) {
  174396. var start3 = state.pos;
  174397. if (this.regexp_eatDecimalEscape(state)) {
  174398. var n = state.lastIntValue;
  174399. if (state.switchU) {
  174400. if (n > state.maxBackReference) {
  174401. state.maxBackReference = n;
  174402. }
  174403. return true;
  174404. }
  174405. if (n <= state.numCapturingParens) {
  174406. return true;
  174407. }
  174408. state.pos = start3;
  174409. }
  174410. return false;
  174411. };
  174412. pp$1.regexp_eatKGroupName = function(state) {
  174413. if (state.eat(107)) {
  174414. if (this.regexp_eatGroupName(state)) {
  174415. state.backReferenceNames.push(state.lastStringValue);
  174416. return true;
  174417. }
  174418. state.raise("Invalid named reference");
  174419. }
  174420. return false;
  174421. };
  174422. pp$1.regexp_eatCharacterEscape = function(state) {
  174423. return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
  174424. };
  174425. pp$1.regexp_eatCControlLetter = function(state) {
  174426. var start3 = state.pos;
  174427. if (state.eat(99)) {
  174428. if (this.regexp_eatControlLetter(state)) {
  174429. return true;
  174430. }
  174431. state.pos = start3;
  174432. }
  174433. return false;
  174434. };
  174435. pp$1.regexp_eatZero = function(state) {
  174436. if (state.current() === 48 && !isDecimalDigit(state.lookahead())) {
  174437. state.lastIntValue = 0;
  174438. state.advance();
  174439. return true;
  174440. }
  174441. return false;
  174442. };
  174443. pp$1.regexp_eatControlEscape = function(state) {
  174444. var ch = state.current();
  174445. if (ch === 116) {
  174446. state.lastIntValue = 9;
  174447. state.advance();
  174448. return true;
  174449. }
  174450. if (ch === 110) {
  174451. state.lastIntValue = 10;
  174452. state.advance();
  174453. return true;
  174454. }
  174455. if (ch === 118) {
  174456. state.lastIntValue = 11;
  174457. state.advance();
  174458. return true;
  174459. }
  174460. if (ch === 102) {
  174461. state.lastIntValue = 12;
  174462. state.advance();
  174463. return true;
  174464. }
  174465. if (ch === 114) {
  174466. state.lastIntValue = 13;
  174467. state.advance();
  174468. return true;
  174469. }
  174470. return false;
  174471. };
  174472. pp$1.regexp_eatControlLetter = function(state) {
  174473. var ch = state.current();
  174474. if (isControlLetter(ch)) {
  174475. state.lastIntValue = ch % 32;
  174476. state.advance();
  174477. return true;
  174478. }
  174479. return false;
  174480. };
  174481. function isControlLetter(ch) {
  174482. return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
  174483. }
  174484. pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
  174485. if (forceU === void 0)
  174486. forceU = false;
  174487. var start3 = state.pos;
  174488. var switchU = forceU || state.switchU;
  174489. if (state.eat(117)) {
  174490. if (this.regexp_eatFixedHexDigits(state, 4)) {
  174491. var lead = state.lastIntValue;
  174492. if (switchU && lead >= 55296 && lead <= 56319) {
  174493. var leadSurrogateEnd = state.pos;
  174494. if (state.eat(92) && state.eat(117) && this.regexp_eatFixedHexDigits(state, 4)) {
  174495. var trail = state.lastIntValue;
  174496. if (trail >= 56320 && trail <= 57343) {
  174497. state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536;
  174498. return true;
  174499. }
  174500. }
  174501. state.pos = leadSurrogateEnd;
  174502. state.lastIntValue = lead;
  174503. }
  174504. return true;
  174505. }
  174506. if (switchU && state.eat(123) && this.regexp_eatHexDigits(state) && state.eat(125) && isValidUnicode(state.lastIntValue)) {
  174507. return true;
  174508. }
  174509. if (switchU) {
  174510. state.raise("Invalid unicode escape");
  174511. }
  174512. state.pos = start3;
  174513. }
  174514. return false;
  174515. };
  174516. function isValidUnicode(ch) {
  174517. return ch >= 0 && ch <= 1114111;
  174518. }
  174519. pp$1.regexp_eatIdentityEscape = function(state) {
  174520. if (state.switchU) {
  174521. if (this.regexp_eatSyntaxCharacter(state)) {
  174522. return true;
  174523. }
  174524. if (state.eat(47)) {
  174525. state.lastIntValue = 47;
  174526. return true;
  174527. }
  174528. return false;
  174529. }
  174530. var ch = state.current();
  174531. if (ch !== 99 && (!state.switchN || ch !== 107)) {
  174532. state.lastIntValue = ch;
  174533. state.advance();
  174534. return true;
  174535. }
  174536. return false;
  174537. };
  174538. pp$1.regexp_eatDecimalEscape = function(state) {
  174539. state.lastIntValue = 0;
  174540. var ch = state.current();
  174541. if (ch >= 49 && ch <= 57) {
  174542. do {
  174543. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  174544. state.advance();
  174545. } while ((ch = state.current()) >= 48 && ch <= 57);
  174546. return true;
  174547. }
  174548. return false;
  174549. };
  174550. pp$1.regexp_eatCharacterClassEscape = function(state) {
  174551. var ch = state.current();
  174552. if (isCharacterClassEscape(ch)) {
  174553. state.lastIntValue = -1;
  174554. state.advance();
  174555. return true;
  174556. }
  174557. if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 80 || ch === 112)) {
  174558. state.lastIntValue = -1;
  174559. state.advance();
  174560. if (state.eat(123) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(125)) {
  174561. return true;
  174562. }
  174563. state.raise("Invalid property name");
  174564. }
  174565. return false;
  174566. };
  174567. function isCharacterClassEscape(ch) {
  174568. return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
  174569. }
  174570. pp$1.regexp_eatUnicodePropertyValueExpression = function(state) {
  174571. var start3 = state.pos;
  174572. if (this.regexp_eatUnicodePropertyName(state) && state.eat(61)) {
  174573. var name2 = state.lastStringValue;
  174574. if (this.regexp_eatUnicodePropertyValue(state)) {
  174575. var value = state.lastStringValue;
  174576. this.regexp_validateUnicodePropertyNameAndValue(state, name2, value);
  174577. return true;
  174578. }
  174579. }
  174580. state.pos = start3;
  174581. if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
  174582. var nameOrValue = state.lastStringValue;
  174583. this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
  174584. return true;
  174585. }
  174586. return false;
  174587. };
  174588. pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value) {
  174589. if (!hasOwn(state.unicodeProperties.nonBinary, name2)) {
  174590. state.raise("Invalid property name");
  174591. }
  174592. if (!state.unicodeProperties.nonBinary[name2].test(value)) {
  174593. state.raise("Invalid property value");
  174594. }
  174595. };
  174596. pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
  174597. if (!state.unicodeProperties.binary.test(nameOrValue)) {
  174598. state.raise("Invalid property name");
  174599. }
  174600. };
  174601. pp$1.regexp_eatUnicodePropertyName = function(state) {
  174602. var ch = 0;
  174603. state.lastStringValue = "";
  174604. while (isUnicodePropertyNameCharacter(ch = state.current())) {
  174605. state.lastStringValue += codePointToString$1(ch);
  174606. state.advance();
  174607. }
  174608. return state.lastStringValue !== "";
  174609. };
  174610. function isUnicodePropertyNameCharacter(ch) {
  174611. return isControlLetter(ch) || ch === 95;
  174612. }
  174613. pp$1.regexp_eatUnicodePropertyValue = function(state) {
  174614. var ch = 0;
  174615. state.lastStringValue = "";
  174616. while (isUnicodePropertyValueCharacter(ch = state.current())) {
  174617. state.lastStringValue += codePointToString$1(ch);
  174618. state.advance();
  174619. }
  174620. return state.lastStringValue !== "";
  174621. };
  174622. function isUnicodePropertyValueCharacter(ch) {
  174623. return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch);
  174624. }
  174625. pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
  174626. return this.regexp_eatUnicodePropertyValue(state);
  174627. };
  174628. pp$1.regexp_eatCharacterClass = function(state) {
  174629. if (state.eat(91)) {
  174630. state.eat(94);
  174631. this.regexp_classRanges(state);
  174632. if (state.eat(93)) {
  174633. return true;
  174634. }
  174635. state.raise("Unterminated character class");
  174636. }
  174637. return false;
  174638. };
  174639. pp$1.regexp_classRanges = function(state) {
  174640. while (this.regexp_eatClassAtom(state)) {
  174641. var left = state.lastIntValue;
  174642. if (state.eat(45) && this.regexp_eatClassAtom(state)) {
  174643. var right = state.lastIntValue;
  174644. if (state.switchU && (left === -1 || right === -1)) {
  174645. state.raise("Invalid character class");
  174646. }
  174647. if (left !== -1 && right !== -1 && left > right) {
  174648. state.raise("Range out of order in character class");
  174649. }
  174650. }
  174651. }
  174652. };
  174653. pp$1.regexp_eatClassAtom = function(state) {
  174654. var start3 = state.pos;
  174655. if (state.eat(92)) {
  174656. if (this.regexp_eatClassEscape(state)) {
  174657. return true;
  174658. }
  174659. if (state.switchU) {
  174660. var ch$1 = state.current();
  174661. if (ch$1 === 99 || isOctalDigit(ch$1)) {
  174662. state.raise("Invalid class escape");
  174663. }
  174664. state.raise("Invalid escape");
  174665. }
  174666. state.pos = start3;
  174667. }
  174668. var ch = state.current();
  174669. if (ch !== 93) {
  174670. state.lastIntValue = ch;
  174671. state.advance();
  174672. return true;
  174673. }
  174674. return false;
  174675. };
  174676. pp$1.regexp_eatClassEscape = function(state) {
  174677. var start3 = state.pos;
  174678. if (state.eat(98)) {
  174679. state.lastIntValue = 8;
  174680. return true;
  174681. }
  174682. if (state.switchU && state.eat(45)) {
  174683. state.lastIntValue = 45;
  174684. return true;
  174685. }
  174686. if (!state.switchU && state.eat(99)) {
  174687. if (this.regexp_eatClassControlLetter(state)) {
  174688. return true;
  174689. }
  174690. state.pos = start3;
  174691. }
  174692. return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
  174693. };
  174694. pp$1.regexp_eatClassControlLetter = function(state) {
  174695. var ch = state.current();
  174696. if (isDecimalDigit(ch) || ch === 95) {
  174697. state.lastIntValue = ch % 32;
  174698. state.advance();
  174699. return true;
  174700. }
  174701. return false;
  174702. };
  174703. pp$1.regexp_eatHexEscapeSequence = function(state) {
  174704. var start3 = state.pos;
  174705. if (state.eat(120)) {
  174706. if (this.regexp_eatFixedHexDigits(state, 2)) {
  174707. return true;
  174708. }
  174709. if (state.switchU) {
  174710. state.raise("Invalid escape");
  174711. }
  174712. state.pos = start3;
  174713. }
  174714. return false;
  174715. };
  174716. pp$1.regexp_eatDecimalDigits = function(state) {
  174717. var start3 = state.pos;
  174718. var ch = 0;
  174719. state.lastIntValue = 0;
  174720. while (isDecimalDigit(ch = state.current())) {
  174721. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  174722. state.advance();
  174723. }
  174724. return state.pos !== start3;
  174725. };
  174726. function isDecimalDigit(ch) {
  174727. return ch >= 48 && ch <= 57;
  174728. }
  174729. pp$1.regexp_eatHexDigits = function(state) {
  174730. var start3 = state.pos;
  174731. var ch = 0;
  174732. state.lastIntValue = 0;
  174733. while (isHexDigit(ch = state.current())) {
  174734. state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
  174735. state.advance();
  174736. }
  174737. return state.pos !== start3;
  174738. };
  174739. function isHexDigit(ch) {
  174740. return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
  174741. }
  174742. function hexToInt(ch) {
  174743. if (ch >= 65 && ch <= 70) {
  174744. return 10 + (ch - 65);
  174745. }
  174746. if (ch >= 97 && ch <= 102) {
  174747. return 10 + (ch - 97);
  174748. }
  174749. return ch - 48;
  174750. }
  174751. pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) {
  174752. if (this.regexp_eatOctalDigit(state)) {
  174753. var n1 = state.lastIntValue;
  174754. if (this.regexp_eatOctalDigit(state)) {
  174755. var n2 = state.lastIntValue;
  174756. if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
  174757. state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
  174758. } else {
  174759. state.lastIntValue = n1 * 8 + n2;
  174760. }
  174761. } else {
  174762. state.lastIntValue = n1;
  174763. }
  174764. return true;
  174765. }
  174766. return false;
  174767. };
  174768. pp$1.regexp_eatOctalDigit = function(state) {
  174769. var ch = state.current();
  174770. if (isOctalDigit(ch)) {
  174771. state.lastIntValue = ch - 48;
  174772. state.advance();
  174773. return true;
  174774. }
  174775. state.lastIntValue = 0;
  174776. return false;
  174777. };
  174778. function isOctalDigit(ch) {
  174779. return ch >= 48 && ch <= 55;
  174780. }
  174781. pp$1.regexp_eatFixedHexDigits = function(state, length) {
  174782. var start3 = state.pos;
  174783. state.lastIntValue = 0;
  174784. for (var i = 0; i < length; ++i) {
  174785. var ch = state.current();
  174786. if (!isHexDigit(ch)) {
  174787. state.pos = start3;
  174788. return false;
  174789. }
  174790. state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
  174791. state.advance();
  174792. }
  174793. return true;
  174794. };
  174795. var Token = function Token2(p) {
  174796. this.type = p.type;
  174797. this.value = p.value;
  174798. this.start = p.start;
  174799. this.end = p.end;
  174800. if (p.options.locations) {
  174801. this.loc = new SourceLocation(p, p.startLoc, p.endLoc);
  174802. }
  174803. if (p.options.ranges) {
  174804. this.range = [p.start, p.end];
  174805. }
  174806. };
  174807. var pp = Parser.prototype;
  174808. pp.next = function(ignoreEscapeSequenceInKeyword) {
  174809. if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) {
  174810. this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword);
  174811. }
  174812. if (this.options.onToken) {
  174813. this.options.onToken(new Token(this));
  174814. }
  174815. this.lastTokEnd = this.end;
  174816. this.lastTokStart = this.start;
  174817. this.lastTokEndLoc = this.endLoc;
  174818. this.lastTokStartLoc = this.startLoc;
  174819. this.nextToken();
  174820. };
  174821. pp.getToken = function() {
  174822. this.next();
  174823. return new Token(this);
  174824. };
  174825. if (typeof Symbol !== "undefined") {
  174826. pp[Symbol.iterator] = function() {
  174827. var this$1$1 = this;
  174828. return {
  174829. next: function() {
  174830. var token = this$1$1.getToken();
  174831. return {
  174832. done: token.type === types$1.eof,
  174833. value: token
  174834. };
  174835. }
  174836. };
  174837. };
  174838. }
  174839. pp.nextToken = function() {
  174840. var curContext = this.curContext();
  174841. if (!curContext || !curContext.preserveSpace) {
  174842. this.skipSpace();
  174843. }
  174844. this.start = this.pos;
  174845. if (this.options.locations) {
  174846. this.startLoc = this.curPosition();
  174847. }
  174848. if (this.pos >= this.input.length) {
  174849. return this.finishToken(types$1.eof);
  174850. }
  174851. if (curContext.override) {
  174852. return curContext.override(this);
  174853. } else {
  174854. this.readToken(this.fullCharCodeAtPos());
  174855. }
  174856. };
  174857. pp.readToken = function(code2) {
  174858. if (isIdentifierStart(code2, this.options.ecmaVersion >= 6) || code2 === 92) {
  174859. return this.readWord();
  174860. }
  174861. return this.getTokenFromCode(code2);
  174862. };
  174863. pp.fullCharCodeAtPos = function() {
  174864. var code2 = this.input.charCodeAt(this.pos);
  174865. if (code2 <= 55295 || code2 >= 56320) {
  174866. return code2;
  174867. }
  174868. var next = this.input.charCodeAt(this.pos + 1);
  174869. return next <= 56319 || next >= 57344 ? code2 : (code2 << 10) + next - 56613888;
  174870. };
  174871. pp.skipBlockComment = function() {
  174872. var startLoc = this.options.onComment && this.curPosition();
  174873. var start3 = this.pos, end = this.input.indexOf("*/", this.pos += 2);
  174874. if (end === -1) {
  174875. this.raise(this.pos - 2, "Unterminated comment");
  174876. }
  174877. this.pos = end + 2;
  174878. if (this.options.locations) {
  174879. for (var nextBreak = void 0, pos = start3; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1; ) {
  174880. ++this.curLine;
  174881. pos = this.lineStart = nextBreak;
  174882. }
  174883. }
  174884. if (this.options.onComment) {
  174885. this.options.onComment(
  174886. true,
  174887. this.input.slice(start3 + 2, end),
  174888. start3,
  174889. this.pos,
  174890. startLoc,
  174891. this.curPosition()
  174892. );
  174893. }
  174894. };
  174895. pp.skipLineComment = function(startSkip) {
  174896. var start3 = this.pos;
  174897. var startLoc = this.options.onComment && this.curPosition();
  174898. var ch = this.input.charCodeAt(this.pos += startSkip);
  174899. while (this.pos < this.input.length && !isNewLine(ch)) {
  174900. ch = this.input.charCodeAt(++this.pos);
  174901. }
  174902. if (this.options.onComment) {
  174903. this.options.onComment(
  174904. false,
  174905. this.input.slice(start3 + startSkip, this.pos),
  174906. start3,
  174907. this.pos,
  174908. startLoc,
  174909. this.curPosition()
  174910. );
  174911. }
  174912. };
  174913. pp.skipSpace = function() {
  174914. loop:
  174915. while (this.pos < this.input.length) {
  174916. var ch = this.input.charCodeAt(this.pos);
  174917. switch (ch) {
  174918. case 32:
  174919. case 160:
  174920. ++this.pos;
  174921. break;
  174922. case 13:
  174923. if (this.input.charCodeAt(this.pos + 1) === 10) {
  174924. ++this.pos;
  174925. }
  174926. case 10:
  174927. case 8232:
  174928. case 8233:
  174929. ++this.pos;
  174930. if (this.options.locations) {
  174931. ++this.curLine;
  174932. this.lineStart = this.pos;
  174933. }
  174934. break;
  174935. case 47:
  174936. switch (this.input.charCodeAt(this.pos + 1)) {
  174937. case 42:
  174938. this.skipBlockComment();
  174939. break;
  174940. case 47:
  174941. this.skipLineComment(2);
  174942. break;
  174943. default:
  174944. break loop;
  174945. }
  174946. break;
  174947. default:
  174948. if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
  174949. ++this.pos;
  174950. } else {
  174951. break loop;
  174952. }
  174953. }
  174954. }
  174955. };
  174956. pp.finishToken = function(type, val) {
  174957. this.end = this.pos;
  174958. if (this.options.locations) {
  174959. this.endLoc = this.curPosition();
  174960. }
  174961. var prevType = this.type;
  174962. this.type = type;
  174963. this.value = val;
  174964. this.updateContext(prevType);
  174965. };
  174966. pp.readToken_dot = function() {
  174967. var next = this.input.charCodeAt(this.pos + 1);
  174968. if (next >= 48 && next <= 57) {
  174969. return this.readNumber(true);
  174970. }
  174971. var next2 = this.input.charCodeAt(this.pos + 2);
  174972. if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
  174973. this.pos += 3;
  174974. return this.finishToken(types$1.ellipsis);
  174975. } else {
  174976. ++this.pos;
  174977. return this.finishToken(types$1.dot);
  174978. }
  174979. };
  174980. pp.readToken_slash = function() {
  174981. var next = this.input.charCodeAt(this.pos + 1);
  174982. if (this.exprAllowed) {
  174983. ++this.pos;
  174984. return this.readRegexp();
  174985. }
  174986. if (next === 61) {
  174987. return this.finishOp(types$1.assign, 2);
  174988. }
  174989. return this.finishOp(types$1.slash, 1);
  174990. };
  174991. pp.readToken_mult_modulo_exp = function(code2) {
  174992. var next = this.input.charCodeAt(this.pos + 1);
  174993. var size = 1;
  174994. var tokentype = code2 === 42 ? types$1.star : types$1.modulo;
  174995. if (this.options.ecmaVersion >= 7 && code2 === 42 && next === 42) {
  174996. ++size;
  174997. tokentype = types$1.starstar;
  174998. next = this.input.charCodeAt(this.pos + 2);
  174999. }
  175000. if (next === 61) {
  175001. return this.finishOp(types$1.assign, size + 1);
  175002. }
  175003. return this.finishOp(tokentype, size);
  175004. };
  175005. pp.readToken_pipe_amp = function(code2) {
  175006. var next = this.input.charCodeAt(this.pos + 1);
  175007. if (next === code2) {
  175008. if (this.options.ecmaVersion >= 12) {
  175009. var next2 = this.input.charCodeAt(this.pos + 2);
  175010. if (next2 === 61) {
  175011. return this.finishOp(types$1.assign, 3);
  175012. }
  175013. }
  175014. return this.finishOp(code2 === 124 ? types$1.logicalOR : types$1.logicalAND, 2);
  175015. }
  175016. if (next === 61) {
  175017. return this.finishOp(types$1.assign, 2);
  175018. }
  175019. return this.finishOp(code2 === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1);
  175020. };
  175021. pp.readToken_caret = function() {
  175022. var next = this.input.charCodeAt(this.pos + 1);
  175023. if (next === 61) {
  175024. return this.finishOp(types$1.assign, 2);
  175025. }
  175026. return this.finishOp(types$1.bitwiseXOR, 1);
  175027. };
  175028. pp.readToken_plus_min = function(code2) {
  175029. var next = this.input.charCodeAt(this.pos + 1);
  175030. if (next === code2) {
  175031. if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
  175032. this.skipLineComment(3);
  175033. this.skipSpace();
  175034. return this.nextToken();
  175035. }
  175036. return this.finishOp(types$1.incDec, 2);
  175037. }
  175038. if (next === 61) {
  175039. return this.finishOp(types$1.assign, 2);
  175040. }
  175041. return this.finishOp(types$1.plusMin, 1);
  175042. };
  175043. pp.readToken_lt_gt = function(code2) {
  175044. var next = this.input.charCodeAt(this.pos + 1);
  175045. var size = 1;
  175046. if (next === code2) {
  175047. size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
  175048. if (this.input.charCodeAt(this.pos + size) === 61) {
  175049. return this.finishOp(types$1.assign, size + 1);
  175050. }
  175051. return this.finishOp(types$1.bitShift, size);
  175052. }
  175053. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
  175054. this.skipLineComment(4);
  175055. this.skipSpace();
  175056. return this.nextToken();
  175057. }
  175058. if (next === 61) {
  175059. size = 2;
  175060. }
  175061. return this.finishOp(types$1.relational, size);
  175062. };
  175063. pp.readToken_eq_excl = function(code2) {
  175064. var next = this.input.charCodeAt(this.pos + 1);
  175065. if (next === 61) {
  175066. return this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
  175067. }
  175068. if (code2 === 61 && next === 62 && this.options.ecmaVersion >= 6) {
  175069. this.pos += 2;
  175070. return this.finishToken(types$1.arrow);
  175071. }
  175072. return this.finishOp(code2 === 61 ? types$1.eq : types$1.prefix, 1);
  175073. };
  175074. pp.readToken_question = function() {
  175075. var ecmaVersion = this.options.ecmaVersion;
  175076. if (ecmaVersion >= 11) {
  175077. var next = this.input.charCodeAt(this.pos + 1);
  175078. if (next === 46) {
  175079. var next2 = this.input.charCodeAt(this.pos + 2);
  175080. if (next2 < 48 || next2 > 57) {
  175081. return this.finishOp(types$1.questionDot, 2);
  175082. }
  175083. }
  175084. if (next === 63) {
  175085. if (ecmaVersion >= 12) {
  175086. var next2$1 = this.input.charCodeAt(this.pos + 2);
  175087. if (next2$1 === 61) {
  175088. return this.finishOp(types$1.assign, 3);
  175089. }
  175090. }
  175091. return this.finishOp(types$1.coalesce, 2);
  175092. }
  175093. }
  175094. return this.finishOp(types$1.question, 1);
  175095. };
  175096. pp.readToken_numberSign = function() {
  175097. var ecmaVersion = this.options.ecmaVersion;
  175098. var code2 = 35;
  175099. if (ecmaVersion >= 13) {
  175100. ++this.pos;
  175101. code2 = this.fullCharCodeAtPos();
  175102. if (isIdentifierStart(code2, true) || code2 === 92) {
  175103. return this.finishToken(types$1.privateId, this.readWord1());
  175104. }
  175105. }
  175106. this.raise(this.pos, "Unexpected character '" + codePointToString(code2) + "'");
  175107. };
  175108. pp.getTokenFromCode = function(code2) {
  175109. switch (code2) {
  175110. case 46:
  175111. return this.readToken_dot();
  175112. case 40:
  175113. ++this.pos;
  175114. return this.finishToken(types$1.parenL);
  175115. case 41:
  175116. ++this.pos;
  175117. return this.finishToken(types$1.parenR);
  175118. case 59:
  175119. ++this.pos;
  175120. return this.finishToken(types$1.semi);
  175121. case 44:
  175122. ++this.pos;
  175123. return this.finishToken(types$1.comma);
  175124. case 91:
  175125. ++this.pos;
  175126. return this.finishToken(types$1.bracketL);
  175127. case 93:
  175128. ++this.pos;
  175129. return this.finishToken(types$1.bracketR);
  175130. case 123:
  175131. ++this.pos;
  175132. return this.finishToken(types$1.braceL);
  175133. case 125:
  175134. ++this.pos;
  175135. return this.finishToken(types$1.braceR);
  175136. case 58:
  175137. ++this.pos;
  175138. return this.finishToken(types$1.colon);
  175139. case 96:
  175140. if (this.options.ecmaVersion < 6) {
  175141. break;
  175142. }
  175143. ++this.pos;
  175144. return this.finishToken(types$1.backQuote);
  175145. case 48:
  175146. var next = this.input.charCodeAt(this.pos + 1);
  175147. if (next === 120 || next === 88) {
  175148. return this.readRadixNumber(16);
  175149. }
  175150. if (this.options.ecmaVersion >= 6) {
  175151. if (next === 111 || next === 79) {
  175152. return this.readRadixNumber(8);
  175153. }
  175154. if (next === 98 || next === 66) {
  175155. return this.readRadixNumber(2);
  175156. }
  175157. }
  175158. case 49:
  175159. case 50:
  175160. case 51:
  175161. case 52:
  175162. case 53:
  175163. case 54:
  175164. case 55:
  175165. case 56:
  175166. case 57:
  175167. return this.readNumber(false);
  175168. case 34:
  175169. case 39:
  175170. return this.readString(code2);
  175171. case 47:
  175172. return this.readToken_slash();
  175173. case 37:
  175174. case 42:
  175175. return this.readToken_mult_modulo_exp(code2);
  175176. case 124:
  175177. case 38:
  175178. return this.readToken_pipe_amp(code2);
  175179. case 94:
  175180. return this.readToken_caret();
  175181. case 43:
  175182. case 45:
  175183. return this.readToken_plus_min(code2);
  175184. case 60:
  175185. case 62:
  175186. return this.readToken_lt_gt(code2);
  175187. case 61:
  175188. case 33:
  175189. return this.readToken_eq_excl(code2);
  175190. case 63:
  175191. return this.readToken_question();
  175192. case 126:
  175193. return this.finishOp(types$1.prefix, 1);
  175194. case 35:
  175195. return this.readToken_numberSign();
  175196. }
  175197. this.raise(this.pos, "Unexpected character '" + codePointToString(code2) + "'");
  175198. };
  175199. pp.finishOp = function(type, size) {
  175200. var str = this.input.slice(this.pos, this.pos + size);
  175201. this.pos += size;
  175202. return this.finishToken(type, str);
  175203. };
  175204. pp.readRegexp = function() {
  175205. var escaped, inClass, start3 = this.pos;
  175206. for (; ; ) {
  175207. if (this.pos >= this.input.length) {
  175208. this.raise(start3, "Unterminated regular expression");
  175209. }
  175210. var ch = this.input.charAt(this.pos);
  175211. if (lineBreak.test(ch)) {
  175212. this.raise(start3, "Unterminated regular expression");
  175213. }
  175214. if (!escaped) {
  175215. if (ch === "[") {
  175216. inClass = true;
  175217. } else if (ch === "]" && inClass) {
  175218. inClass = false;
  175219. } else if (ch === "/" && !inClass) {
  175220. break;
  175221. }
  175222. escaped = ch === "\\";
  175223. } else {
  175224. escaped = false;
  175225. }
  175226. ++this.pos;
  175227. }
  175228. var pattern = this.input.slice(start3, this.pos);
  175229. ++this.pos;
  175230. var flagsStart = this.pos;
  175231. var flags = this.readWord1();
  175232. if (this.containsEsc) {
  175233. this.unexpected(flagsStart);
  175234. }
  175235. var state = this.regexpState || (this.regexpState = new RegExpValidationState(this));
  175236. state.reset(start3, pattern, flags);
  175237. this.validateRegExpFlags(state);
  175238. this.validateRegExpPattern(state);
  175239. var value = null;
  175240. try {
  175241. value = new RegExp(pattern, flags);
  175242. } catch (e) {
  175243. }
  175244. return this.finishToken(types$1.regexp, { pattern, flags, value });
  175245. };
  175246. pp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
  175247. var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
  175248. var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
  175249. var start3 = this.pos, total = 0, lastCode = 0;
  175250. for (var i = 0, e = len == null ? Infinity : len; i < e; ++i, ++this.pos) {
  175251. var code2 = this.input.charCodeAt(this.pos), val = void 0;
  175252. if (allowSeparators && code2 === 95) {
  175253. if (isLegacyOctalNumericLiteral) {
  175254. this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals");
  175255. }
  175256. if (lastCode === 95) {
  175257. this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
  175258. }
  175259. if (i === 0) {
  175260. this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
  175261. }
  175262. lastCode = code2;
  175263. continue;
  175264. }
  175265. if (code2 >= 97) {
  175266. val = code2 - 97 + 10;
  175267. } else if (code2 >= 65) {
  175268. val = code2 - 65 + 10;
  175269. } else if (code2 >= 48 && code2 <= 57) {
  175270. val = code2 - 48;
  175271. } else {
  175272. val = Infinity;
  175273. }
  175274. if (val >= radix) {
  175275. break;
  175276. }
  175277. lastCode = code2;
  175278. total = total * radix + val;
  175279. }
  175280. if (allowSeparators && lastCode === 95) {
  175281. this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits");
  175282. }
  175283. if (this.pos === start3 || len != null && this.pos - start3 !== len) {
  175284. return null;
  175285. }
  175286. return total;
  175287. };
  175288. function stringToNumber(str, isLegacyOctalNumericLiteral) {
  175289. if (isLegacyOctalNumericLiteral) {
  175290. return parseInt(str, 8);
  175291. }
  175292. return parseFloat(str.replace(/_/g, ""));
  175293. }
  175294. function stringToBigInt(str) {
  175295. if (typeof BigInt !== "function") {
  175296. return null;
  175297. }
  175298. return BigInt(str.replace(/_/g, ""));
  175299. }
  175300. pp.readRadixNumber = function(radix) {
  175301. var start3 = this.pos;
  175302. this.pos += 2;
  175303. var val = this.readInt(radix);
  175304. if (val == null) {
  175305. this.raise(this.start + 2, "Expected number in radix " + radix);
  175306. }
  175307. if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
  175308. val = stringToBigInt(this.input.slice(start3, this.pos));
  175309. ++this.pos;
  175310. } else if (isIdentifierStart(this.fullCharCodeAtPos())) {
  175311. this.raise(this.pos, "Identifier directly after number");
  175312. }
  175313. return this.finishToken(types$1.num, val);
  175314. };
  175315. pp.readNumber = function(startsWithDot) {
  175316. var start3 = this.pos;
  175317. if (!startsWithDot && this.readInt(10, void 0, true) === null) {
  175318. this.raise(start3, "Invalid number");
  175319. }
  175320. var octal = this.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  175321. if (octal && this.strict) {
  175322. this.raise(start3, "Invalid number");
  175323. }
  175324. var next = this.input.charCodeAt(this.pos);
  175325. if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
  175326. var val$1 = stringToBigInt(this.input.slice(start3, this.pos));
  175327. ++this.pos;
  175328. if (isIdentifierStart(this.fullCharCodeAtPos())) {
  175329. this.raise(this.pos, "Identifier directly after number");
  175330. }
  175331. return this.finishToken(types$1.num, val$1);
  175332. }
  175333. if (octal && /[89]/.test(this.input.slice(start3, this.pos))) {
  175334. octal = false;
  175335. }
  175336. if (next === 46 && !octal) {
  175337. ++this.pos;
  175338. this.readInt(10);
  175339. next = this.input.charCodeAt(this.pos);
  175340. }
  175341. if ((next === 69 || next === 101) && !octal) {
  175342. next = this.input.charCodeAt(++this.pos);
  175343. if (next === 43 || next === 45) {
  175344. ++this.pos;
  175345. }
  175346. if (this.readInt(10) === null) {
  175347. this.raise(start3, "Invalid number");
  175348. }
  175349. }
  175350. if (isIdentifierStart(this.fullCharCodeAtPos())) {
  175351. this.raise(this.pos, "Identifier directly after number");
  175352. }
  175353. var val = stringToNumber(this.input.slice(start3, this.pos), octal);
  175354. return this.finishToken(types$1.num, val);
  175355. };
  175356. pp.readCodePoint = function() {
  175357. var ch = this.input.charCodeAt(this.pos), code2;
  175358. if (ch === 123) {
  175359. if (this.options.ecmaVersion < 6) {
  175360. this.unexpected();
  175361. }
  175362. var codePos = ++this.pos;
  175363. code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
  175364. ++this.pos;
  175365. if (code2 > 1114111) {
  175366. this.invalidStringToken(codePos, "Code point out of bounds");
  175367. }
  175368. } else {
  175369. code2 = this.readHexChar(4);
  175370. }
  175371. return code2;
  175372. };
  175373. function codePointToString(code2) {
  175374. if (code2 <= 65535) {
  175375. return String.fromCharCode(code2);
  175376. }
  175377. code2 -= 65536;
  175378. return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320);
  175379. }
  175380. pp.readString = function(quote) {
  175381. var out = "", chunkStart = ++this.pos;
  175382. for (; ; ) {
  175383. if (this.pos >= this.input.length) {
  175384. this.raise(this.start, "Unterminated string constant");
  175385. }
  175386. var ch = this.input.charCodeAt(this.pos);
  175387. if (ch === quote) {
  175388. break;
  175389. }
  175390. if (ch === 92) {
  175391. out += this.input.slice(chunkStart, this.pos);
  175392. out += this.readEscapedChar(false);
  175393. chunkStart = this.pos;
  175394. } else if (ch === 8232 || ch === 8233) {
  175395. if (this.options.ecmaVersion < 10) {
  175396. this.raise(this.start, "Unterminated string constant");
  175397. }
  175398. ++this.pos;
  175399. if (this.options.locations) {
  175400. this.curLine++;
  175401. this.lineStart = this.pos;
  175402. }
  175403. } else {
  175404. if (isNewLine(ch)) {
  175405. this.raise(this.start, "Unterminated string constant");
  175406. }
  175407. ++this.pos;
  175408. }
  175409. }
  175410. out += this.input.slice(chunkStart, this.pos++);
  175411. return this.finishToken(types$1.string, out);
  175412. };
  175413. var INVALID_TEMPLATE_ESCAPE_ERROR = {};
  175414. pp.tryReadTemplateToken = function() {
  175415. this.inTemplateElement = true;
  175416. try {
  175417. this.readTmplToken();
  175418. } catch (err) {
  175419. if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {
  175420. this.readInvalidTemplateToken();
  175421. } else {
  175422. throw err;
  175423. }
  175424. }
  175425. this.inTemplateElement = false;
  175426. };
  175427. pp.invalidStringToken = function(position3, message) {
  175428. if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
  175429. throw INVALID_TEMPLATE_ESCAPE_ERROR;
  175430. } else {
  175431. this.raise(position3, message);
  175432. }
  175433. };
  175434. pp.readTmplToken = function() {
  175435. var out = "", chunkStart = this.pos;
  175436. for (; ; ) {
  175437. if (this.pos >= this.input.length) {
  175438. this.raise(this.start, "Unterminated template");
  175439. }
  175440. var ch = this.input.charCodeAt(this.pos);
  175441. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
  175442. if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) {
  175443. if (ch === 36) {
  175444. this.pos += 2;
  175445. return this.finishToken(types$1.dollarBraceL);
  175446. } else {
  175447. ++this.pos;
  175448. return this.finishToken(types$1.backQuote);
  175449. }
  175450. }
  175451. out += this.input.slice(chunkStart, this.pos);
  175452. return this.finishToken(types$1.template, out);
  175453. }
  175454. if (ch === 92) {
  175455. out += this.input.slice(chunkStart, this.pos);
  175456. out += this.readEscapedChar(true);
  175457. chunkStart = this.pos;
  175458. } else if (isNewLine(ch)) {
  175459. out += this.input.slice(chunkStart, this.pos);
  175460. ++this.pos;
  175461. switch (ch) {
  175462. case 13:
  175463. if (this.input.charCodeAt(this.pos) === 10) {
  175464. ++this.pos;
  175465. }
  175466. case 10:
  175467. out += "\n";
  175468. break;
  175469. default:
  175470. out += String.fromCharCode(ch);
  175471. break;
  175472. }
  175473. if (this.options.locations) {
  175474. ++this.curLine;
  175475. this.lineStart = this.pos;
  175476. }
  175477. chunkStart = this.pos;
  175478. } else {
  175479. ++this.pos;
  175480. }
  175481. }
  175482. };
  175483. pp.readInvalidTemplateToken = function() {
  175484. for (; this.pos < this.input.length; this.pos++) {
  175485. switch (this.input[this.pos]) {
  175486. case "\\":
  175487. ++this.pos;
  175488. break;
  175489. case "$":
  175490. if (this.input[this.pos + 1] !== "{") {
  175491. break;
  175492. }
  175493. case "`":
  175494. return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos));
  175495. }
  175496. }
  175497. this.raise(this.start, "Unterminated template");
  175498. };
  175499. pp.readEscapedChar = function(inTemplate) {
  175500. var ch = this.input.charCodeAt(++this.pos);
  175501. ++this.pos;
  175502. switch (ch) {
  175503. case 110:
  175504. return "\n";
  175505. case 114:
  175506. return "\r";
  175507. case 120:
  175508. return String.fromCharCode(this.readHexChar(2));
  175509. case 117:
  175510. return codePointToString(this.readCodePoint());
  175511. case 116:
  175512. return " ";
  175513. case 98:
  175514. return "\b";
  175515. case 118:
  175516. return "\v";
  175517. case 102:
  175518. return "\f";
  175519. case 13:
  175520. if (this.input.charCodeAt(this.pos) === 10) {
  175521. ++this.pos;
  175522. }
  175523. case 10:
  175524. if (this.options.locations) {
  175525. this.lineStart = this.pos;
  175526. ++this.curLine;
  175527. }
  175528. return "";
  175529. case 56:
  175530. case 57:
  175531. if (this.strict) {
  175532. this.invalidStringToken(
  175533. this.pos - 1,
  175534. "Invalid escape sequence"
  175535. );
  175536. }
  175537. if (inTemplate) {
  175538. var codePos = this.pos - 1;
  175539. this.invalidStringToken(
  175540. codePos,
  175541. "Invalid escape sequence in template string"
  175542. );
  175543. return null;
  175544. }
  175545. default:
  175546. if (ch >= 48 && ch <= 55) {
  175547. var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
  175548. var octal = parseInt(octalStr, 8);
  175549. if (octal > 255) {
  175550. octalStr = octalStr.slice(0, -1);
  175551. octal = parseInt(octalStr, 8);
  175552. }
  175553. this.pos += octalStr.length - 1;
  175554. ch = this.input.charCodeAt(this.pos);
  175555. if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
  175556. this.invalidStringToken(
  175557. this.pos - 1 - octalStr.length,
  175558. inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
  175559. );
  175560. }
  175561. return String.fromCharCode(octal);
  175562. }
  175563. if (isNewLine(ch)) {
  175564. return "";
  175565. }
  175566. return String.fromCharCode(ch);
  175567. }
  175568. };
  175569. pp.readHexChar = function(len) {
  175570. var codePos = this.pos;
  175571. var n = this.readInt(16, len);
  175572. if (n === null) {
  175573. this.invalidStringToken(codePos, "Bad character escape sequence");
  175574. }
  175575. return n;
  175576. };
  175577. pp.readWord1 = function() {
  175578. this.containsEsc = false;
  175579. var word = "", first = true, chunkStart = this.pos;
  175580. var astral = this.options.ecmaVersion >= 6;
  175581. while (this.pos < this.input.length) {
  175582. var ch = this.fullCharCodeAtPos();
  175583. if (isIdentifierChar(ch, astral)) {
  175584. this.pos += ch <= 65535 ? 1 : 2;
  175585. } else if (ch === 92) {
  175586. this.containsEsc = true;
  175587. word += this.input.slice(chunkStart, this.pos);
  175588. var escStart = this.pos;
  175589. if (this.input.charCodeAt(++this.pos) !== 117) {
  175590. this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
  175591. }
  175592. ++this.pos;
  175593. var esc = this.readCodePoint();
  175594. if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) {
  175595. this.invalidStringToken(escStart, "Invalid Unicode escape");
  175596. }
  175597. word += codePointToString(esc);
  175598. chunkStart = this.pos;
  175599. } else {
  175600. break;
  175601. }
  175602. first = false;
  175603. }
  175604. return word + this.input.slice(chunkStart, this.pos);
  175605. };
  175606. pp.readWord = function() {
  175607. var word = this.readWord1();
  175608. var type = types$1.name;
  175609. if (this.keywords.test(word)) {
  175610. type = keywords[word];
  175611. }
  175612. return this.finishToken(type, word);
  175613. };
  175614. var version = "8.7.0";
  175615. Parser.acorn = {
  175616. Parser,
  175617. version,
  175618. defaultOptions,
  175619. Position,
  175620. SourceLocation,
  175621. getLineInfo,
  175622. Node,
  175623. TokenType,
  175624. tokTypes: types$1,
  175625. keywordTypes: keywords,
  175626. TokContext,
  175627. tokContexts: types,
  175628. isIdentifierChar,
  175629. isIdentifierStart,
  175630. Token,
  175631. isNewLine,
  175632. lineBreak,
  175633. lineBreakG,
  175634. nonASCIIwhitespace
  175635. };
  175636. // node_modules/micromark-extension-mdxjs/index.js
  175637. var import_acorn_jsx = __toESM(require_acorn_jsx(), 1);
  175638. // node_modules/micromark-util-chunked/index.js
  175639. function splice(list3, start3, remove, items) {
  175640. const end = list3.length;
  175641. let chunkStart = 0;
  175642. let parameters;
  175643. if (start3 < 0) {
  175644. start3 = -start3 > end ? 0 : end + start3;
  175645. } else {
  175646. start3 = start3 > end ? end : start3;
  175647. }
  175648. remove = remove > 0 ? remove : 0;
  175649. if (items.length < 1e4) {
  175650. parameters = Array.from(items);
  175651. parameters.unshift(start3, remove);
  175652. [].splice.apply(list3, parameters);
  175653. } else {
  175654. if (remove)
  175655. [].splice.apply(list3, [start3, remove]);
  175656. while (chunkStart < items.length) {
  175657. parameters = items.slice(chunkStart, chunkStart + 1e4);
  175658. parameters.unshift(start3, 0);
  175659. [].splice.apply(list3, parameters);
  175660. chunkStart += 1e4;
  175661. start3 += 1e4;
  175662. }
  175663. }
  175664. }
  175665. function push(list3, items) {
  175666. if (list3.length > 0) {
  175667. splice(list3, list3.length, 0, items);
  175668. return list3;
  175669. }
  175670. return items;
  175671. }
  175672. // node_modules/micromark-util-combine-extensions/index.js
  175673. var hasOwnProperty2 = {}.hasOwnProperty;
  175674. function combineExtensions(extensions) {
  175675. const all4 = {};
  175676. let index2 = -1;
  175677. while (++index2 < extensions.length) {
  175678. syntaxExtension(all4, extensions[index2]);
  175679. }
  175680. return all4;
  175681. }
  175682. function syntaxExtension(all4, extension2) {
  175683. let hook;
  175684. for (hook in extension2) {
  175685. const maybe = hasOwnProperty2.call(all4, hook) ? all4[hook] : void 0;
  175686. const left = maybe || (all4[hook] = {});
  175687. const right = extension2[hook];
  175688. let code2;
  175689. for (code2 in right) {
  175690. if (!hasOwnProperty2.call(left, code2))
  175691. left[code2] = [];
  175692. const value = right[code2];
  175693. constructs(
  175694. left[code2],
  175695. Array.isArray(value) ? value : value ? [value] : []
  175696. );
  175697. }
  175698. }
  175699. }
  175700. function constructs(existing, list3) {
  175701. let index2 = -1;
  175702. const before = [];
  175703. while (++index2 < list3.length) {
  175704. ;
  175705. (list3[index2].add === "after" ? existing : before).push(list3[index2]);
  175706. }
  175707. splice(existing, 0, 0, before);
  175708. }
  175709. // node_modules/micromark-util-character/lib/unicode-punctuation-regex.js
  175710. var unicodePunctuationRegex = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;
  175711. // node_modules/micromark-util-character/index.js
  175712. var asciiAlpha = regexCheck(/[A-Za-z]/);
  175713. var asciiDigit = regexCheck(/\d/);
  175714. var asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
  175715. var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
  175716. var asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
  175717. var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
  175718. function asciiControl(code2) {
  175719. return code2 !== null && (code2 < 32 || code2 === 127);
  175720. }
  175721. function markdownLineEndingOrSpace(code2) {
  175722. return code2 !== null && (code2 < 0 || code2 === 32);
  175723. }
  175724. function markdownLineEnding(code2) {
  175725. return code2 !== null && code2 < -2;
  175726. }
  175727. function markdownSpace(code2) {
  175728. return code2 === -2 || code2 === -1 || code2 === 32;
  175729. }
  175730. var unicodeWhitespace = regexCheck(/\s/);
  175731. var unicodePunctuation = regexCheck(unicodePunctuationRegex);
  175732. function regexCheck(regex2) {
  175733. return check;
  175734. function check(code2) {
  175735. return code2 !== null && regex2.test(String.fromCharCode(code2));
  175736. }
  175737. }
  175738. // node_modules/micromark-factory-space/index.js
  175739. function factorySpace(effects, ok2, type, max) {
  175740. const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
  175741. let size = 0;
  175742. return start3;
  175743. function start3(code2) {
  175744. if (markdownSpace(code2)) {
  175745. effects.enter(type);
  175746. return prefix(code2);
  175747. }
  175748. return ok2(code2);
  175749. }
  175750. function prefix(code2) {
  175751. if (markdownSpace(code2) && size++ < limit) {
  175752. effects.consume(code2);
  175753. return prefix;
  175754. }
  175755. effects.exit(type);
  175756. return ok2(code2);
  175757. }
  175758. }
  175759. // node_modules/unist-util-position-from-estree/index.js
  175760. function positionFromEstree(value) {
  175761. const node = value || {};
  175762. const loc = node.loc || {};
  175763. const range = node.range || [0, 0];
  175764. const startOffset = range[0] || node.start;
  175765. const endOffset = range[1] || node.end;
  175766. return {
  175767. start: {
  175768. line: loc.start && typeof loc.start.line === "number" && loc.start.line > -1 ? loc.start.line : void 0,
  175769. column: loc.start && typeof loc.start.column === "number" && loc.start.column > -1 ? loc.start.column + 1 : void 0,
  175770. offset: typeof startOffset === "number" && startOffset > -1 ? startOffset : void 0
  175771. },
  175772. end: {
  175773. line: loc.end && typeof loc.end.line === "number" && loc.end.line > -1 ? loc.end.line : void 0,
  175774. column: loc.end && typeof loc.end.column === "number" && loc.end.column > -1 ? loc.end.column + 1 : void 0,
  175775. offset: typeof endOffset === "number" && endOffset > -1 ? endOffset : void 0
  175776. }
  175777. };
  175778. }
  175779. // node_modules/estree-util-visit/color.js
  175780. function color(d) {
  175781. return "\x1B[33m" + d + "\x1B[39m";
  175782. }
  175783. // node_modules/estree-util-visit/index.js
  175784. var own3 = {}.hasOwnProperty;
  175785. var CONTINUE = Symbol("continue");
  175786. var SKIP = Symbol("skip");
  175787. var EXIT = Symbol("exit");
  175788. function visit(tree, visitor) {
  175789. var enter;
  175790. var leave;
  175791. if (typeof visitor === "function") {
  175792. enter = visitor;
  175793. } else if (visitor && typeof visitor === "object") {
  175794. enter = visitor.enter;
  175795. leave = visitor.leave;
  175796. }
  175797. build(tree, null, null, [])();
  175798. function build(node, key, index2, parents) {
  175799. if (nodelike(node)) {
  175800. visit4.displayName = "node (" + color(node.type) + ")";
  175801. }
  175802. return visit4;
  175803. function visit4() {
  175804. var result = enter ? toResult(enter(node, key, index2, parents)) : [];
  175805. var cKey;
  175806. var cIndex;
  175807. var grandparents;
  175808. var subresult;
  175809. var value;
  175810. var subvalue;
  175811. if (result[0] === EXIT) {
  175812. return result;
  175813. }
  175814. if (result[0] !== SKIP) {
  175815. for (cKey in node) {
  175816. if (own3.call(node, cKey) && node[cKey] && typeof node[cKey] === "object" && cKey !== "data" && cKey !== "position") {
  175817. value = node[cKey];
  175818. grandparents = parents.concat(node);
  175819. if (Array.isArray(value)) {
  175820. cIndex = 0;
  175821. while (cIndex > -1 && cIndex < value.length) {
  175822. subvalue = value[cIndex];
  175823. if (nodelike(subvalue)) {
  175824. subresult = build(subvalue, cKey, cIndex, grandparents)();
  175825. if (subresult[0] === EXIT)
  175826. return subresult;
  175827. cIndex = typeof subresult[1] === "number" ? subresult[1] : cIndex + 1;
  175828. } else {
  175829. cIndex++;
  175830. }
  175831. }
  175832. } else if (nodelike(value)) {
  175833. subresult = build(value, cKey, null, grandparents)();
  175834. if (subresult[0] === EXIT)
  175835. return subresult;
  175836. }
  175837. }
  175838. }
  175839. }
  175840. return leave ? toResult(leave(node, key, index2, parents)) : result;
  175841. }
  175842. }
  175843. }
  175844. function toResult(value) {
  175845. if (Array.isArray(value)) {
  175846. return value;
  175847. }
  175848. if (typeof value === "number") {
  175849. return [CONTINUE, value];
  175850. }
  175851. return [value];
  175852. }
  175853. function nodelike(value) {
  175854. return Boolean(
  175855. value && typeof value === "object" && typeof value.type === "string" && value.type.length > 0
  175856. );
  175857. }
  175858. // node_modules/micromark-util-events-to-acorn/index.js
  175859. var own4 = {}.hasOwnProperty;
  175860. function eventsToAcorn(events, options) {
  175861. const {
  175862. prefix = "",
  175863. suffix = ""
  175864. } = options;
  175865. const comments = [];
  175866. const acornConfig = Object.assign({}, options.acornOptions, {
  175867. onComment: comments,
  175868. preserveParens: true
  175869. });
  175870. const chunks = [];
  175871. const lines = {};
  175872. let index2 = -1;
  175873. let swallow = false;
  175874. let estree;
  175875. let exception;
  175876. let mdStartOffset;
  175877. if (options.start) {
  175878. mdStartOffset = options.start.offset;
  175879. lines[options.start.line] = options.start;
  175880. }
  175881. while (++index2 < events.length) {
  175882. const token = events[index2][1];
  175883. if (events[index2][0] === "exit") {
  175884. chunks.push(events[index2][2].sliceSerialize(token));
  175885. if (mdStartOffset === void 0) {
  175886. mdStartOffset = events[index2][1].start.offset;
  175887. }
  175888. if (!(token.start.line in lines) || lines[token.start.line].offset > token.start.offset) {
  175889. lines[token.start.line] = token.start;
  175890. }
  175891. }
  175892. }
  175893. const source = chunks.join("");
  175894. const value = prefix + source + suffix;
  175895. const isEmptyExpression = options.expression && empty2(source);
  175896. if (isEmptyExpression && !options.allowEmpty) {
  175897. throw new VFileMessage("Unexpected empty expression", parseOffsetToUnistPoint(0), "micromark-extension-mdx-expression:unexpected-empty-expression");
  175898. }
  175899. try {
  175900. estree = options.expression && !isEmptyExpression ? options.acorn.parseExpressionAt(value, 0, acornConfig) : options.acorn.parse(value, acornConfig);
  175901. } catch (error_) {
  175902. const error = error_;
  175903. const point3 = parseOffsetToUnistPoint(error.pos);
  175904. error.message = String(error.message).replace(/ \(\d+:\d+\)$/, "");
  175905. error.pos = point3.offset;
  175906. error.loc = {
  175907. line: point3.line,
  175908. column: point3.column - 1
  175909. };
  175910. exception = error;
  175911. swallow = error.raisedAt >= prefix.length + source.length || error.message === "Unterminated comment";
  175912. }
  175913. if (estree && options.expression && !isEmptyExpression) {
  175914. if (empty2(value.slice(estree.end, value.length - suffix.length))) {
  175915. estree = {
  175916. type: "Program",
  175917. start: 0,
  175918. end: prefix.length + source.length,
  175919. body: [{
  175920. type: "ExpressionStatement",
  175921. expression: estree,
  175922. start: 0,
  175923. end: prefix.length + source.length
  175924. }],
  175925. sourceType: "module",
  175926. comments: []
  175927. };
  175928. } else {
  175929. const point3 = parseOffsetToUnistPoint(estree.end);
  175930. exception = new Error("Unexpected content after expression");
  175931. exception.pos = point3.offset;
  175932. exception.loc = {
  175933. line: point3.line,
  175934. column: point3.column - 1
  175935. };
  175936. estree = void 0;
  175937. }
  175938. }
  175939. if (estree) {
  175940. estree.comments = comments;
  175941. visit(estree, (esnode, field, index3, parents) => {
  175942. let context = parents[parents.length - 1];
  175943. let prop = field;
  175944. if (esnode.type === "ParenthesizedExpression" && context && prop) {
  175945. if (typeof index3 === "number") {
  175946. context = context[prop];
  175947. prop = index3;
  175948. }
  175949. context[prop] = esnode.expression;
  175950. }
  175951. const pointStart2 = parseOffsetToUnistPoint(esnode.start);
  175952. const pointEnd2 = parseOffsetToUnistPoint(esnode.end);
  175953. esnode.start = pointStart2.offset;
  175954. esnode.end = pointEnd2.offset;
  175955. esnode.loc = {
  175956. start: {
  175957. line: pointStart2.line,
  175958. column: pointStart2.column - 1
  175959. },
  175960. end: {
  175961. line: pointEnd2.line,
  175962. column: pointEnd2.column - 1
  175963. }
  175964. };
  175965. esnode.range = [esnode.start, esnode.end];
  175966. });
  175967. }
  175968. return {
  175969. estree,
  175970. error: exception,
  175971. swallow
  175972. };
  175973. function parseOffsetToUnistPoint(offset2) {
  175974. let srcOffset = offset2 - prefix.length;
  175975. let line;
  175976. let lineStart;
  175977. if (srcOffset < 0) {
  175978. srcOffset = 0;
  175979. } else if (srcOffset > source.length) {
  175980. srcOffset = source.length;
  175981. }
  175982. srcOffset += mdStartOffset;
  175983. for (line in lines) {
  175984. if (own4.call(lines, line)) {
  175985. if (!lineStart) {
  175986. lineStart = lines[line];
  175987. }
  175988. if (lines[line].offset > offset2) {
  175989. break;
  175990. }
  175991. lineStart = lines[line];
  175992. }
  175993. }
  175994. return {
  175995. line: lineStart.line,
  175996. column: lineStart.column + (srcOffset - lineStart.offset),
  175997. offset: srcOffset
  175998. };
  175999. }
  176000. }
  176001. function empty2(value) {
  176002. return /^\s*$/.test(value.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g, ""));
  176003. }
  176004. // node_modules/micromark-factory-mdx-expression/index.js
  176005. function factoryMdxExpression(effects, ok2, type, markerType, chunkType, acorn, acornOptions, addResult, spread, allowEmpty, allowLazy, startColumn) {
  176006. const self2 = this;
  176007. const eventStart = this.events.length + 3;
  176008. const tail = this.events[this.events.length - 1];
  176009. const initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  176010. const prefixExpressionIndent = initialPrefix ? initialPrefix + 1 : 0;
  176011. let balance = 1;
  176012. let startPosition;
  176013. let lastCrash;
  176014. return start3;
  176015. function start3(code2) {
  176016. effects.enter(type);
  176017. effects.enter(markerType);
  176018. effects.consume(code2);
  176019. effects.exit(markerType);
  176020. startPosition = self2.now();
  176021. return atBreak;
  176022. }
  176023. function atBreak(code2) {
  176024. if (code2 === null) {
  176025. throw lastCrash || new VFileMessage(
  176026. "Unexpected end of file in expression, expected a corresponding closing brace for `{`",
  176027. self2.now(),
  176028. "micromark-extension-mdx-expression:unexpected-eof"
  176029. );
  176030. }
  176031. if (code2 === 125) {
  176032. return atClosingBrace(code2);
  176033. }
  176034. if (markdownLineEnding(code2)) {
  176035. effects.enter("lineEnding");
  176036. effects.consume(code2);
  176037. effects.exit("lineEnding");
  176038. const prefixTagIndent = startColumn ? startColumn + 4 - self2.now().column : 0;
  176039. const indent = Math.max(prefixExpressionIndent, prefixTagIndent);
  176040. return indent ? factorySpace(effects, atBreak, "linePrefix", indent) : atBreak;
  176041. }
  176042. const now = self2.now();
  176043. if (now.line !== startPosition.line && !allowLazy && self2.parser.lazy[now.line]) {
  176044. throw new VFileMessage(
  176045. "Unexpected end of file in expression, expected a corresponding closing brace for `{`",
  176046. self2.now(),
  176047. "micromark-extension-mdx-expression:unexpected-eof"
  176048. );
  176049. }
  176050. effects.enter(chunkType);
  176051. return inside(code2);
  176052. }
  176053. function inside(code2) {
  176054. if (code2 === null || code2 === 125 || markdownLineEnding(code2)) {
  176055. effects.exit(chunkType);
  176056. return atBreak(code2);
  176057. }
  176058. if (code2 === 123 && !acorn) {
  176059. effects.consume(code2);
  176060. balance++;
  176061. return inside;
  176062. }
  176063. effects.consume(code2);
  176064. return inside;
  176065. }
  176066. function atClosingBrace(code2) {
  176067. balance--;
  176068. if (!acorn) {
  176069. if (balance) {
  176070. effects.enter(chunkType);
  176071. effects.consume(code2);
  176072. return inside;
  176073. }
  176074. effects.enter(markerType);
  176075. effects.consume(code2);
  176076. effects.exit(markerType);
  176077. effects.exit(type);
  176078. return ok2;
  176079. }
  176080. const result = eventsToAcorn(self2.events.slice(eventStart), {
  176081. acorn,
  176082. acornOptions,
  176083. start: startPosition,
  176084. expression: true,
  176085. allowEmpty,
  176086. prefix: spread ? "({" : "",
  176087. suffix: spread ? "})" : ""
  176088. });
  176089. const estree = result.estree;
  176090. if (spread && estree) {
  176091. const head = estree.body[0];
  176092. if (head.type !== "ExpressionStatement" || head.expression.type !== "ObjectExpression") {
  176093. throw new VFileMessage(
  176094. "Unexpected `" + head.type + "` in code: expected an object spread (`{...spread}`)",
  176095. positionFromEstree(head).start,
  176096. "micromark-extension-mdx-expression:non-spread"
  176097. );
  176098. } else if (head.expression.properties[1]) {
  176099. throw new VFileMessage(
  176100. "Unexpected extra content in spread: only a single spread is supported",
  176101. positionFromEstree(head.expression.properties[1]).start,
  176102. "micromark-extension-mdx-expression:spread-extra"
  176103. );
  176104. } else if (head.expression.properties[0] && head.expression.properties[0].type !== "SpreadElement") {
  176105. throw new VFileMessage(
  176106. "Unexpected `" + head.expression.properties[0].type + "` in code: only spread elements are supported",
  176107. positionFromEstree(head.expression.properties[0]).start,
  176108. "micromark-extension-mdx-expression:non-spread"
  176109. );
  176110. }
  176111. }
  176112. if (result.error) {
  176113. lastCrash = new VFileMessage(
  176114. "Could not parse expression with acorn: " + result.error.message,
  176115. {
  176116. line: result.error.loc.line,
  176117. column: result.error.loc.column + 1,
  176118. offset: result.error.pos
  176119. },
  176120. "micromark-extension-mdx-expression:acorn"
  176121. );
  176122. if (code2 !== null && result.swallow) {
  176123. effects.enter(chunkType);
  176124. effects.consume(code2);
  176125. return inside;
  176126. }
  176127. throw lastCrash;
  176128. }
  176129. effects.enter(markerType);
  176130. effects.consume(code2);
  176131. effects.exit(markerType);
  176132. Object.assign(
  176133. effects.exit(type),
  176134. addResult ? {
  176135. estree
  176136. } : void 0
  176137. );
  176138. return ok2;
  176139. }
  176140. }
  176141. // node_modules/micromark-extension-mdx-expression/lib/syntax.js
  176142. function mdxExpression(options = {}) {
  176143. const addResult = options.addResult;
  176144. const acorn = options.acorn;
  176145. const spread = options.spread;
  176146. let allowEmpty = options.allowEmpty;
  176147. let acornOptions;
  176148. if (allowEmpty === null || allowEmpty === void 0) {
  176149. allowEmpty = true;
  176150. }
  176151. if (acorn) {
  176152. if (!acorn.parseExpressionAt) {
  176153. throw new Error(
  176154. "Expected a proper `acorn` instance passed in as `options.acorn`"
  176155. );
  176156. }
  176157. acornOptions = Object.assign(
  176158. {
  176159. ecmaVersion: 2020,
  176160. sourceType: "module"
  176161. },
  176162. options.acornOptions
  176163. );
  176164. } else if (options.acornOptions || options.addResult) {
  176165. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  176166. }
  176167. return {
  176168. flow: {
  176169. [123]: {
  176170. tokenize: tokenizeFlowExpression,
  176171. concrete: true
  176172. }
  176173. },
  176174. text: {
  176175. [123]: {
  176176. tokenize: tokenizeTextExpression
  176177. }
  176178. }
  176179. };
  176180. function tokenizeFlowExpression(effects, ok2, nok) {
  176181. const self2 = this;
  176182. return start3;
  176183. function start3(code2) {
  176184. return factoryMdxExpression.call(
  176185. self2,
  176186. effects,
  176187. factorySpace(effects, after, "whitespace"),
  176188. "mdxFlowExpression",
  176189. "mdxFlowExpressionMarker",
  176190. "mdxFlowExpressionChunk",
  176191. acorn,
  176192. acornOptions,
  176193. addResult,
  176194. spread,
  176195. allowEmpty
  176196. )(code2);
  176197. }
  176198. function after(code2) {
  176199. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  176200. }
  176201. }
  176202. function tokenizeTextExpression(effects, ok2) {
  176203. const self2 = this;
  176204. return start3;
  176205. function start3(code2) {
  176206. return factoryMdxExpression.call(
  176207. self2,
  176208. effects,
  176209. ok2,
  176210. "mdxTextExpression",
  176211. "mdxTextExpressionMarker",
  176212. "mdxTextExpressionChunk",
  176213. acorn,
  176214. acornOptions,
  176215. addResult,
  176216. spread,
  176217. allowEmpty,
  176218. true
  176219. )(code2);
  176220. }
  176221. }
  176222. }
  176223. // node_modules/estree-util-is-identifier-name/regex.js
  176224. var start = /[$A-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
  176225. var cont = /[\d\u00B7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\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\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]/;
  176226. // node_modules/estree-util-is-identifier-name/index.js
  176227. function start2(code2) {
  176228. return start.test(String.fromCharCode(code2));
  176229. }
  176230. function cont2(code2) {
  176231. var character = String.fromCharCode(code2);
  176232. return start.test(character) || cont.test(character);
  176233. }
  176234. function name(name2) {
  176235. var index2 = -1;
  176236. while (++index2 < name2.length) {
  176237. if (!(index2 ? cont2 : start2)(name2.charCodeAt(index2)))
  176238. return false;
  176239. }
  176240. return index2 > 0;
  176241. }
  176242. // node_modules/micromark-extension-mdx-jsx/lib/factory-tag.js
  176243. var lazyLineEnd = {
  176244. tokenize: tokenizeLazyLineEnd,
  176245. partial: true
  176246. };
  176247. function factoryTag(effects, ok2, nok, acorn, acornOptions, addResult, allowLazy, tagType, tagMarkerType, tagClosingMarkerType, tagSelfClosingMarker, tagNameType, tagNamePrimaryType, tagNameMemberMarkerType, tagNameMemberType, tagNamePrefixMarkerType, tagNameLocalType, tagExpressionAttributeType, tagExpressionAttributeMarkerType, tagExpressionAttributeValueType, tagAttributeType, tagAttributeNameType, tagAttributeNamePrimaryType, tagAttributeNamePrefixMarkerType, tagAttributeNameLocalType, tagAttributeInitializerMarkerType, tagAttributeValueLiteralType, tagAttributeValueLiteralMarkerType, tagAttributeValueLiteralValueType, tagAttributeValueExpressionType, tagAttributeValueExpressionMarkerType, tagAttributeValueExpressionValueType) {
  176248. const self2 = this;
  176249. let returnState;
  176250. let marker;
  176251. let startPoint;
  176252. return start3;
  176253. function start3(code2) {
  176254. startPoint = self2.now();
  176255. effects.enter(tagType);
  176256. effects.enter(tagMarkerType);
  176257. effects.consume(code2);
  176258. effects.exit(tagMarkerType);
  176259. return afterStart;
  176260. }
  176261. function afterStart(code2) {
  176262. if (markdownLineEnding(code2) || markdownSpace(code2)) {
  176263. return nok(code2);
  176264. }
  176265. returnState = beforeName;
  176266. return optionalEsWhitespace(code2);
  176267. }
  176268. function beforeName(code2) {
  176269. if (code2 === 47) {
  176270. effects.enter(tagClosingMarkerType);
  176271. effects.consume(code2);
  176272. effects.exit(tagClosingMarkerType);
  176273. returnState = beforeClosingTagName;
  176274. return optionalEsWhitespace;
  176275. }
  176276. if (code2 === 62) {
  176277. return tagEnd(code2);
  176278. }
  176279. if (code2 !== null && start2(code2)) {
  176280. effects.enter(tagNameType);
  176281. effects.enter(tagNamePrimaryType);
  176282. effects.consume(code2);
  176283. return primaryName;
  176284. }
  176285. crash(
  176286. code2,
  176287. "before name",
  176288. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 33 ? " (note: to create a comment in MDX, use `{/* text */}`)" : "")
  176289. );
  176290. }
  176291. function beforeClosingTagName(code2) {
  176292. if (code2 === 62) {
  176293. return tagEnd(code2);
  176294. }
  176295. if (code2 !== null && start2(code2)) {
  176296. effects.enter(tagNameType);
  176297. effects.enter(tagNamePrimaryType);
  176298. effects.consume(code2);
  176299. return primaryName;
  176300. }
  176301. crash(
  176302. code2,
  176303. "before name",
  176304. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 42 || code2 === 47 ? " (note: JS comments in JSX tags are not supported in MDX)" : "")
  176305. );
  176306. }
  176307. function primaryName(code2) {
  176308. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176309. effects.consume(code2);
  176310. return primaryName;
  176311. }
  176312. if (code2 === 46 || code2 === 47 || code2 === 58 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176313. effects.exit(tagNamePrimaryType);
  176314. returnState = afterPrimaryName;
  176315. return optionalEsWhitespace(code2);
  176316. }
  176317. crash(
  176318. code2,
  176319. "in name",
  176320. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag" + (code2 === 64 ? " (note: to create a link in MDX, use `[text](url)`)" : "")
  176321. );
  176322. }
  176323. function afterPrimaryName(code2) {
  176324. if (code2 === 46) {
  176325. effects.enter(tagNameMemberMarkerType);
  176326. effects.consume(code2);
  176327. effects.exit(tagNameMemberMarkerType);
  176328. returnState = beforeMemberName;
  176329. return optionalEsWhitespace;
  176330. }
  176331. if (code2 === 58) {
  176332. effects.enter(tagNamePrefixMarkerType);
  176333. effects.consume(code2);
  176334. effects.exit(tagNamePrefixMarkerType);
  176335. returnState = beforeLocalName;
  176336. return optionalEsWhitespace;
  176337. }
  176338. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  176339. effects.exit(tagNameType);
  176340. return beforeAttribute(code2);
  176341. }
  176342. crash(
  176343. code2,
  176344. "after name",
  176345. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176346. );
  176347. }
  176348. function beforeMemberName(code2) {
  176349. if (code2 !== null && start2(code2)) {
  176350. effects.enter(tagNameMemberType);
  176351. effects.consume(code2);
  176352. return memberName;
  176353. }
  176354. crash(
  176355. code2,
  176356. "before member name",
  176357. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176358. );
  176359. }
  176360. function memberName(code2) {
  176361. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176362. effects.consume(code2);
  176363. return memberName;
  176364. }
  176365. if (code2 === 46 || code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176366. effects.exit(tagNameMemberType);
  176367. returnState = afterMemberName;
  176368. return optionalEsWhitespace(code2);
  176369. }
  176370. crash(
  176371. code2,
  176372. "in member name",
  176373. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag" + (code2 === 64 ? " (note: to create a link in MDX, use `[text](url)`)" : "")
  176374. );
  176375. }
  176376. function afterMemberName(code2) {
  176377. if (code2 === 46) {
  176378. effects.enter(tagNameMemberMarkerType);
  176379. effects.consume(code2);
  176380. effects.exit(tagNameMemberMarkerType);
  176381. returnState = beforeMemberName;
  176382. return optionalEsWhitespace;
  176383. }
  176384. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  176385. effects.exit(tagNameType);
  176386. return beforeAttribute(code2);
  176387. }
  176388. crash(
  176389. code2,
  176390. "after member name",
  176391. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176392. );
  176393. }
  176394. function beforeLocalName(code2) {
  176395. if (code2 !== null && start2(code2)) {
  176396. effects.enter(tagNameLocalType);
  176397. effects.consume(code2);
  176398. return localName;
  176399. }
  176400. crash(
  176401. code2,
  176402. "before local name",
  176403. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 43 || code2 !== null && code2 > 46 && code2 < 58 ? " (note: to create a link in MDX, use `[text](url)`)" : "")
  176404. );
  176405. }
  176406. function localName(code2) {
  176407. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176408. effects.consume(code2);
  176409. return localName;
  176410. }
  176411. if (code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176412. effects.exit(tagNameLocalType);
  176413. returnState = afterLocalName;
  176414. return optionalEsWhitespace(code2);
  176415. }
  176416. crash(
  176417. code2,
  176418. "in local name",
  176419. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176420. );
  176421. }
  176422. function afterLocalName(code2) {
  176423. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  176424. effects.exit(tagNameType);
  176425. return beforeAttribute(code2);
  176426. }
  176427. crash(
  176428. code2,
  176429. "after local name",
  176430. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176431. );
  176432. }
  176433. function beforeAttribute(code2) {
  176434. if (code2 === 47) {
  176435. effects.enter(tagSelfClosingMarker);
  176436. effects.consume(code2);
  176437. effects.exit(tagSelfClosingMarker);
  176438. returnState = selfClosing;
  176439. return optionalEsWhitespace;
  176440. }
  176441. if (code2 === 62) {
  176442. return tagEnd(code2);
  176443. }
  176444. if (code2 === 123) {
  176445. return factoryMdxExpression.call(
  176446. self2,
  176447. effects,
  176448. afterAttributeExpression,
  176449. tagExpressionAttributeType,
  176450. tagExpressionAttributeMarkerType,
  176451. tagExpressionAttributeValueType,
  176452. acorn,
  176453. acornOptions,
  176454. addResult,
  176455. true,
  176456. false,
  176457. allowLazy,
  176458. startPoint.column
  176459. )(code2);
  176460. }
  176461. if (code2 !== null && start2(code2)) {
  176462. effects.enter(tagAttributeType);
  176463. effects.enter(tagAttributeNameType);
  176464. effects.enter(tagAttributeNamePrimaryType);
  176465. effects.consume(code2);
  176466. return attributePrimaryName;
  176467. }
  176468. crash(
  176469. code2,
  176470. "before attribute name",
  176471. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  176472. );
  176473. }
  176474. function afterAttributeExpression(code2) {
  176475. returnState = beforeAttribute;
  176476. return optionalEsWhitespace(code2);
  176477. }
  176478. function attributePrimaryName(code2) {
  176479. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176480. effects.consume(code2);
  176481. return attributePrimaryName;
  176482. }
  176483. if (code2 === 47 || code2 === 58 || code2 === 61 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176484. effects.exit(tagAttributeNamePrimaryType);
  176485. returnState = afterAttributePrimaryName;
  176486. return optionalEsWhitespace(code2);
  176487. }
  176488. crash(
  176489. code2,
  176490. "in attribute name",
  176491. "an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag"
  176492. );
  176493. }
  176494. function afterAttributePrimaryName(code2) {
  176495. if (code2 === 58) {
  176496. effects.enter(tagAttributeNamePrefixMarkerType);
  176497. effects.consume(code2);
  176498. effects.exit(tagAttributeNamePrefixMarkerType);
  176499. returnState = beforeAttributeLocalName;
  176500. return optionalEsWhitespace;
  176501. }
  176502. if (code2 === 61) {
  176503. effects.exit(tagAttributeNameType);
  176504. effects.enter(tagAttributeInitializerMarkerType);
  176505. effects.consume(code2);
  176506. effects.exit(tagAttributeInitializerMarkerType);
  176507. returnState = beforeAttributeValue;
  176508. return optionalEsWhitespace;
  176509. }
  176510. if (code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || code2 !== null && start2(code2)) {
  176511. effects.exit(tagAttributeNameType);
  176512. effects.exit(tagAttributeType);
  176513. returnState = beforeAttribute;
  176514. return optionalEsWhitespace(code2);
  176515. }
  176516. crash(
  176517. code2,
  176518. "after attribute name",
  176519. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  176520. );
  176521. }
  176522. function beforeAttributeLocalName(code2) {
  176523. if (code2 !== null && start2(code2)) {
  176524. effects.enter(tagAttributeNameLocalType);
  176525. effects.consume(code2);
  176526. return attributeLocalName;
  176527. }
  176528. crash(
  176529. code2,
  176530. "before local attribute name",
  176531. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  176532. );
  176533. }
  176534. function attributeLocalName(code2) {
  176535. if (code2 === 45 || code2 !== null && cont2(code2)) {
  176536. effects.consume(code2);
  176537. return attributeLocalName;
  176538. }
  176539. if (code2 === 47 || code2 === 61 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176540. effects.exit(tagAttributeNameLocalType);
  176541. effects.exit(tagAttributeNameType);
  176542. returnState = afterAttributeLocalName;
  176543. return optionalEsWhitespace(code2);
  176544. }
  176545. crash(
  176546. code2,
  176547. "in local attribute name",
  176548. "an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag"
  176549. );
  176550. }
  176551. function afterAttributeLocalName(code2) {
  176552. if (code2 === 61) {
  176553. effects.enter(tagAttributeInitializerMarkerType);
  176554. effects.consume(code2);
  176555. effects.exit(tagAttributeInitializerMarkerType);
  176556. returnState = beforeAttributeValue;
  176557. return optionalEsWhitespace;
  176558. }
  176559. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  176560. effects.exit(tagAttributeType);
  176561. return beforeAttribute(code2);
  176562. }
  176563. crash(
  176564. code2,
  176565. "after local attribute name",
  176566. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  176567. );
  176568. }
  176569. function beforeAttributeValue(code2) {
  176570. if (code2 === 34 || code2 === 39) {
  176571. effects.enter(tagAttributeValueLiteralType);
  176572. effects.enter(tagAttributeValueLiteralMarkerType);
  176573. effects.consume(code2);
  176574. effects.exit(tagAttributeValueLiteralMarkerType);
  176575. marker = code2;
  176576. return attributeValueQuotedStart;
  176577. }
  176578. if (code2 === 123) {
  176579. return factoryMdxExpression.call(
  176580. self2,
  176581. effects,
  176582. afterAttributeValueExpression,
  176583. tagAttributeValueExpressionType,
  176584. tagAttributeValueExpressionMarkerType,
  176585. tagAttributeValueExpressionValueType,
  176586. acorn,
  176587. acornOptions,
  176588. addResult,
  176589. false,
  176590. false,
  176591. allowLazy,
  176592. startPoint.column
  176593. )(code2);
  176594. }
  176595. crash(
  176596. code2,
  176597. "before attribute value",
  176598. "a character that can start an attribute value, such as `\"`, `'`, or `{`" + (code2 === 60 ? " (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)" : "")
  176599. );
  176600. }
  176601. function afterAttributeValueExpression(code2) {
  176602. effects.exit(tagAttributeType);
  176603. returnState = beforeAttribute;
  176604. return optionalEsWhitespace(code2);
  176605. }
  176606. function attributeValueQuotedStart(code2) {
  176607. if (code2 === null) {
  176608. crash(
  176609. code2,
  176610. "in attribute value",
  176611. "a corresponding closing quote `" + String.fromCharCode(marker) + "`"
  176612. );
  176613. }
  176614. if (code2 === marker) {
  176615. effects.enter(tagAttributeValueLiteralMarkerType);
  176616. effects.consume(code2);
  176617. effects.exit(tagAttributeValueLiteralMarkerType);
  176618. effects.exit(tagAttributeValueLiteralType);
  176619. effects.exit(tagAttributeType);
  176620. marker = void 0;
  176621. returnState = beforeAttribute;
  176622. return optionalEsWhitespace;
  176623. }
  176624. if (markdownLineEnding(code2)) {
  176625. returnState = attributeValueQuotedStart;
  176626. return optionalEsWhitespace(code2);
  176627. }
  176628. effects.enter(tagAttributeValueLiteralValueType);
  176629. return attributeValueQuoted(code2);
  176630. }
  176631. function attributeValueQuoted(code2) {
  176632. if (code2 === null || code2 === marker || markdownLineEnding(code2)) {
  176633. effects.exit(tagAttributeValueLiteralValueType);
  176634. return attributeValueQuotedStart(code2);
  176635. }
  176636. effects.consume(code2);
  176637. return attributeValueQuoted;
  176638. }
  176639. function selfClosing(code2) {
  176640. if (code2 === 62) {
  176641. return tagEnd(code2);
  176642. }
  176643. crash(
  176644. code2,
  176645. "after self-closing slash",
  176646. "`>` to end the tag" + (code2 === 42 || code2 === 47 ? " (note: JS comments in JSX tags are not supported in MDX)" : "")
  176647. );
  176648. }
  176649. function tagEnd(code2) {
  176650. effects.enter(tagMarkerType);
  176651. effects.consume(code2);
  176652. effects.exit(tagMarkerType);
  176653. effects.exit(tagType);
  176654. return ok2;
  176655. }
  176656. function optionalEsWhitespace(code2) {
  176657. if (markdownLineEnding(code2)) {
  176658. if (allowLazy) {
  176659. effects.enter("lineEnding");
  176660. effects.consume(code2);
  176661. effects.exit("lineEnding");
  176662. return factorySpace(effects, optionalEsWhitespace, "linePrefix", 4);
  176663. }
  176664. return effects.attempt(
  176665. lazyLineEnd,
  176666. factorySpace(effects, optionalEsWhitespace, "linePrefix", 4),
  176667. crashEol
  176668. )(code2);
  176669. }
  176670. if (markdownSpace(code2) || unicodeWhitespace(code2)) {
  176671. effects.enter("esWhitespace");
  176672. return optionalEsWhitespaceContinue(code2);
  176673. }
  176674. return returnState(code2);
  176675. }
  176676. function optionalEsWhitespaceContinue(code2) {
  176677. if (markdownLineEnding(code2) || !(markdownSpace(code2) || unicodeWhitespace(code2))) {
  176678. effects.exit("esWhitespace");
  176679. return optionalEsWhitespace(code2);
  176680. }
  176681. effects.consume(code2);
  176682. return optionalEsWhitespaceContinue;
  176683. }
  176684. function crashEol() {
  176685. throw new VFileMessage(
  176686. "Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",
  176687. self2.now(),
  176688. "micromark-extension-mdx-jsx:unexpected-eof"
  176689. );
  176690. }
  176691. function crash(code2, at2, expect) {
  176692. throw new VFileMessage(
  176693. "Unexpected " + (code2 === null ? "end of file" : "character `" + (code2 === 96 ? "` ` `" : String.fromCharCode(code2)) + "` (" + serializeCharCode(code2) + ")") + " " + at2 + ", expected " + expect,
  176694. self2.now(),
  176695. "micromark-extension-mdx-jsx:unexpected-" + (code2 === null ? "eof" : "character")
  176696. );
  176697. }
  176698. }
  176699. function tokenizeLazyLineEnd(effects, ok2, nok) {
  176700. const self2 = this;
  176701. return start3;
  176702. function start3(code2) {
  176703. effects.enter("lineEnding");
  176704. effects.consume(code2);
  176705. effects.exit("lineEnding");
  176706. return lineStart;
  176707. }
  176708. function lineStart(code2) {
  176709. return self2.parser.lazy[self2.now().line] ? nok(code2) : ok2(code2);
  176710. }
  176711. }
  176712. function serializeCharCode(code2) {
  176713. return "U+" + code2.toString(16).toUpperCase().padStart(4, "0");
  176714. }
  176715. // node_modules/micromark-extension-mdx-jsx/lib/jsx-text.js
  176716. function jsxText(acorn, acornOptions, addResult) {
  176717. return {
  176718. tokenize: tokenizeJsxText
  176719. };
  176720. function tokenizeJsxText(effects, ok2, nok) {
  176721. return factoryTag.call(
  176722. this,
  176723. effects,
  176724. ok2,
  176725. nok,
  176726. acorn,
  176727. acornOptions,
  176728. addResult,
  176729. true,
  176730. "mdxJsxTextTag",
  176731. "mdxJsxTextTagMarker",
  176732. "mdxJsxTextTagClosingMarker",
  176733. "mdxJsxTextTagSelfClosingMarker",
  176734. "mdxJsxTextTagName",
  176735. "mdxJsxTextTagNamePrimary",
  176736. "mdxJsxTextTagNameMemberMarker",
  176737. "mdxJsxTextTagNameMember",
  176738. "mdxJsxTextTagNamePrefixMarker",
  176739. "mdxJsxTextTagNameLocal",
  176740. "mdxJsxTextTagExpressionAttribute",
  176741. "mdxJsxTextTagExpressionAttributeMarker",
  176742. "mdxJsxTextTagExpressionAttributeValue",
  176743. "mdxJsxTextTagAttribute",
  176744. "mdxJsxTextTagAttributeName",
  176745. "mdxJsxTextTagAttributeNamePrimary",
  176746. "mdxJsxTextTagAttributeNamePrefixMarker",
  176747. "mdxJsxTextTagAttributeNameLocal",
  176748. "mdxJsxTextTagAttributeInitializerMarker",
  176749. "mdxJsxTextTagAttributeValueLiteral",
  176750. "mdxJsxTextTagAttributeValueLiteralMarker",
  176751. "mdxJsxTextTagAttributeValueLiteralValue",
  176752. "mdxJsxTextTagAttributeValueExpression",
  176753. "mdxJsxTextTagAttributeValueExpressionMarker",
  176754. "mdxJsxTextTagAttributeValueExpressionValue"
  176755. );
  176756. }
  176757. }
  176758. // node_modules/micromark-extension-mdx-jsx/lib/jsx-flow.js
  176759. function jsxFlow(acorn, acornOptions, addResult) {
  176760. return {
  176761. tokenize: tokenizeJsxFlow,
  176762. concrete: true
  176763. };
  176764. function tokenizeJsxFlow(effects, ok2, nok) {
  176765. const self2 = this;
  176766. return start3;
  176767. function start3(code2) {
  176768. return factoryTag.call(
  176769. self2,
  176770. effects,
  176771. factorySpace(effects, after, "whitespace"),
  176772. nok,
  176773. acorn,
  176774. acornOptions,
  176775. addResult,
  176776. false,
  176777. "mdxJsxFlowTag",
  176778. "mdxJsxFlowTagMarker",
  176779. "mdxJsxFlowTagClosingMarker",
  176780. "mdxJsxFlowTagSelfClosingMarker",
  176781. "mdxJsxFlowTagName",
  176782. "mdxJsxFlowTagNamePrimary",
  176783. "mdxJsxFlowTagNameMemberMarker",
  176784. "mdxJsxFlowTagNameMember",
  176785. "mdxJsxFlowTagNamePrefixMarker",
  176786. "mdxJsxFlowTagNameLocal",
  176787. "mdxJsxFlowTagExpressionAttribute",
  176788. "mdxJsxFlowTagExpressionAttributeMarker",
  176789. "mdxJsxFlowTagExpressionAttributeValue",
  176790. "mdxJsxFlowTagAttribute",
  176791. "mdxJsxFlowTagAttributeName",
  176792. "mdxJsxFlowTagAttributeNamePrimary",
  176793. "mdxJsxFlowTagAttributeNamePrefixMarker",
  176794. "mdxJsxFlowTagAttributeNameLocal",
  176795. "mdxJsxFlowTagAttributeInitializerMarker",
  176796. "mdxJsxFlowTagAttributeValueLiteral",
  176797. "mdxJsxFlowTagAttributeValueLiteralMarker",
  176798. "mdxJsxFlowTagAttributeValueLiteralValue",
  176799. "mdxJsxFlowTagAttributeValueExpression",
  176800. "mdxJsxFlowTagAttributeValueExpressionMarker",
  176801. "mdxJsxFlowTagAttributeValueExpressionValue"
  176802. )(code2);
  176803. }
  176804. function after(code2) {
  176805. return code2 === 60 ? start3(code2) : code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  176806. }
  176807. }
  176808. }
  176809. // node_modules/micromark-extension-mdx-jsx/lib/syntax.js
  176810. function mdxJsx(options = {}) {
  176811. const acorn = options.acorn;
  176812. let acornOptions;
  176813. if (acorn) {
  176814. if (!acorn.parse || !acorn.parseExpressionAt) {
  176815. throw new Error(
  176816. "Expected a proper `acorn` instance passed in as `options.acorn`"
  176817. );
  176818. }
  176819. acornOptions = Object.assign(
  176820. {
  176821. ecmaVersion: 2020,
  176822. sourceType: "module"
  176823. },
  176824. options.acornOptions,
  176825. {
  176826. locations: true
  176827. }
  176828. );
  176829. } else if (options.acornOptions || options.addResult) {
  176830. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  176831. }
  176832. return {
  176833. flow: {
  176834. [60]: jsxFlow(acorn, acornOptions, options.addResult)
  176835. },
  176836. text: {
  176837. [60]: jsxText(acorn, acornOptions, options.addResult)
  176838. }
  176839. };
  176840. }
  176841. // node_modules/micromark-extension-mdx-md/index.js
  176842. var mdxMd = {
  176843. disable: { null: ["autolink", "codeIndented", "htmlFlow", "htmlText"] }
  176844. };
  176845. // node_modules/micromark-util-classify-character/index.js
  176846. function classifyCharacter(code2) {
  176847. if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  176848. return 1;
  176849. }
  176850. if (unicodePunctuation(code2)) {
  176851. return 2;
  176852. }
  176853. }
  176854. // node_modules/micromark-util-resolve-all/index.js
  176855. function resolveAll(constructs2, events, context) {
  176856. const called = [];
  176857. let index2 = -1;
  176858. while (++index2 < constructs2.length) {
  176859. const resolve = constructs2[index2].resolveAll;
  176860. if (resolve && !called.includes(resolve)) {
  176861. events = resolve(events, context);
  176862. called.push(resolve);
  176863. }
  176864. }
  176865. return events;
  176866. }
  176867. // node_modules/micromark-core-commonmark/lib/attention.js
  176868. var attention = {
  176869. name: "attention",
  176870. tokenize: tokenizeAttention,
  176871. resolveAll: resolveAllAttention
  176872. };
  176873. function resolveAllAttention(events, context) {
  176874. let index2 = -1;
  176875. let open;
  176876. let group;
  176877. let text5;
  176878. let openingSequence;
  176879. let closingSequence;
  176880. let use;
  176881. let nextEvents;
  176882. let offset2;
  176883. while (++index2 < events.length) {
  176884. if (events[index2][0] === "enter" && events[index2][1].type === "attentionSequence" && events[index2][1]._close) {
  176885. open = index2;
  176886. while (open--) {
  176887. if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index2][1]).charCodeAt(0)) {
  176888. if ((events[open][1]._close || events[index2][1]._open) && (events[index2][1].end.offset - events[index2][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index2][1].end.offset - events[index2][1].start.offset) % 3)) {
  176889. continue;
  176890. }
  176891. use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index2][1].end.offset - events[index2][1].start.offset > 1 ? 2 : 1;
  176892. const start3 = Object.assign({}, events[open][1].end);
  176893. const end = Object.assign({}, events[index2][1].start);
  176894. movePoint(start3, -use);
  176895. movePoint(end, use);
  176896. openingSequence = {
  176897. type: use > 1 ? "strongSequence" : "emphasisSequence",
  176898. start: start3,
  176899. end: Object.assign({}, events[open][1].end)
  176900. };
  176901. closingSequence = {
  176902. type: use > 1 ? "strongSequence" : "emphasisSequence",
  176903. start: Object.assign({}, events[index2][1].start),
  176904. end
  176905. };
  176906. text5 = {
  176907. type: use > 1 ? "strongText" : "emphasisText",
  176908. start: Object.assign({}, events[open][1].end),
  176909. end: Object.assign({}, events[index2][1].start)
  176910. };
  176911. group = {
  176912. type: use > 1 ? "strong" : "emphasis",
  176913. start: Object.assign({}, openingSequence.start),
  176914. end: Object.assign({}, closingSequence.end)
  176915. };
  176916. events[open][1].end = Object.assign({}, openingSequence.start);
  176917. events[index2][1].start = Object.assign({}, closingSequence.end);
  176918. nextEvents = [];
  176919. if (events[open][1].end.offset - events[open][1].start.offset) {
  176920. nextEvents = push(nextEvents, [
  176921. ["enter", events[open][1], context],
  176922. ["exit", events[open][1], context]
  176923. ]);
  176924. }
  176925. nextEvents = push(nextEvents, [
  176926. ["enter", group, context],
  176927. ["enter", openingSequence, context],
  176928. ["exit", openingSequence, context],
  176929. ["enter", text5, context]
  176930. ]);
  176931. nextEvents = push(
  176932. nextEvents,
  176933. resolveAll(
  176934. context.parser.constructs.insideSpan.null,
  176935. events.slice(open + 1, index2),
  176936. context
  176937. )
  176938. );
  176939. nextEvents = push(nextEvents, [
  176940. ["exit", text5, context],
  176941. ["enter", closingSequence, context],
  176942. ["exit", closingSequence, context],
  176943. ["exit", group, context]
  176944. ]);
  176945. if (events[index2][1].end.offset - events[index2][1].start.offset) {
  176946. offset2 = 2;
  176947. nextEvents = push(nextEvents, [
  176948. ["enter", events[index2][1], context],
  176949. ["exit", events[index2][1], context]
  176950. ]);
  176951. } else {
  176952. offset2 = 0;
  176953. }
  176954. splice(events, open - 1, index2 - open + 3, nextEvents);
  176955. index2 = open + nextEvents.length - offset2 - 2;
  176956. break;
  176957. }
  176958. }
  176959. }
  176960. }
  176961. index2 = -1;
  176962. while (++index2 < events.length) {
  176963. if (events[index2][1].type === "attentionSequence") {
  176964. events[index2][1].type = "data";
  176965. }
  176966. }
  176967. return events;
  176968. }
  176969. function tokenizeAttention(effects, ok2) {
  176970. const attentionMarkers2 = this.parser.constructs.attentionMarkers.null;
  176971. const previous2 = this.previous;
  176972. const before = classifyCharacter(previous2);
  176973. let marker;
  176974. return start3;
  176975. function start3(code2) {
  176976. effects.enter("attentionSequence");
  176977. marker = code2;
  176978. return sequence(code2);
  176979. }
  176980. function sequence(code2) {
  176981. if (code2 === marker) {
  176982. effects.consume(code2);
  176983. return sequence;
  176984. }
  176985. const token = effects.exit("attentionSequence");
  176986. const after = classifyCharacter(code2);
  176987. const open = !after || after === 2 && before || attentionMarkers2.includes(code2);
  176988. const close = !before || before === 2 && after || attentionMarkers2.includes(previous2);
  176989. token._open = Boolean(marker === 42 ? open : open && (before || !close));
  176990. token._close = Boolean(marker === 42 ? close : close && (after || !open));
  176991. return ok2(code2);
  176992. }
  176993. }
  176994. function movePoint(point3, offset2) {
  176995. point3.column += offset2;
  176996. point3.offset += offset2;
  176997. point3._bufferIndex += offset2;
  176998. }
  176999. // node_modules/micromark-core-commonmark/lib/autolink.js
  177000. var autolink = {
  177001. name: "autolink",
  177002. tokenize: tokenizeAutolink
  177003. };
  177004. function tokenizeAutolink(effects, ok2, nok) {
  177005. let size = 1;
  177006. return start3;
  177007. function start3(code2) {
  177008. effects.enter("autolink");
  177009. effects.enter("autolinkMarker");
  177010. effects.consume(code2);
  177011. effects.exit("autolinkMarker");
  177012. effects.enter("autolinkProtocol");
  177013. return open;
  177014. }
  177015. function open(code2) {
  177016. if (asciiAlpha(code2)) {
  177017. effects.consume(code2);
  177018. return schemeOrEmailAtext;
  177019. }
  177020. return asciiAtext(code2) ? emailAtext(code2) : nok(code2);
  177021. }
  177022. function schemeOrEmailAtext(code2) {
  177023. return code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2) ? schemeInsideOrEmailAtext(code2) : emailAtext(code2);
  177024. }
  177025. function schemeInsideOrEmailAtext(code2) {
  177026. if (code2 === 58) {
  177027. effects.consume(code2);
  177028. return urlInside;
  177029. }
  177030. if ((code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) && size++ < 32) {
  177031. effects.consume(code2);
  177032. return schemeInsideOrEmailAtext;
  177033. }
  177034. return emailAtext(code2);
  177035. }
  177036. function urlInside(code2) {
  177037. if (code2 === 62) {
  177038. effects.exit("autolinkProtocol");
  177039. return end(code2);
  177040. }
  177041. if (code2 === null || code2 === 32 || code2 === 60 || asciiControl(code2)) {
  177042. return nok(code2);
  177043. }
  177044. effects.consume(code2);
  177045. return urlInside;
  177046. }
  177047. function emailAtext(code2) {
  177048. if (code2 === 64) {
  177049. effects.consume(code2);
  177050. size = 0;
  177051. return emailAtSignOrDot;
  177052. }
  177053. if (asciiAtext(code2)) {
  177054. effects.consume(code2);
  177055. return emailAtext;
  177056. }
  177057. return nok(code2);
  177058. }
  177059. function emailAtSignOrDot(code2) {
  177060. return asciiAlphanumeric(code2) ? emailLabel(code2) : nok(code2);
  177061. }
  177062. function emailLabel(code2) {
  177063. if (code2 === 46) {
  177064. effects.consume(code2);
  177065. size = 0;
  177066. return emailAtSignOrDot;
  177067. }
  177068. if (code2 === 62) {
  177069. effects.exit("autolinkProtocol").type = "autolinkEmail";
  177070. return end(code2);
  177071. }
  177072. return emailValue(code2);
  177073. }
  177074. function emailValue(code2) {
  177075. if ((code2 === 45 || asciiAlphanumeric(code2)) && size++ < 63) {
  177076. effects.consume(code2);
  177077. return code2 === 45 ? emailValue : emailLabel;
  177078. }
  177079. return nok(code2);
  177080. }
  177081. function end(code2) {
  177082. effects.enter("autolinkMarker");
  177083. effects.consume(code2);
  177084. effects.exit("autolinkMarker");
  177085. effects.exit("autolink");
  177086. return ok2;
  177087. }
  177088. }
  177089. // node_modules/micromark-core-commonmark/lib/blank-line.js
  177090. var blankLine = {
  177091. tokenize: tokenizeBlankLine,
  177092. partial: true
  177093. };
  177094. function tokenizeBlankLine(effects, ok2, nok) {
  177095. return factorySpace(effects, afterWhitespace, "linePrefix");
  177096. function afterWhitespace(code2) {
  177097. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  177098. }
  177099. }
  177100. // node_modules/micromark-core-commonmark/lib/block-quote.js
  177101. var blockQuote = {
  177102. name: "blockQuote",
  177103. tokenize: tokenizeBlockQuoteStart,
  177104. continuation: {
  177105. tokenize: tokenizeBlockQuoteContinuation
  177106. },
  177107. exit
  177108. };
  177109. function tokenizeBlockQuoteStart(effects, ok2, nok) {
  177110. const self2 = this;
  177111. return start3;
  177112. function start3(code2) {
  177113. if (code2 === 62) {
  177114. const state = self2.containerState;
  177115. if (!state.open) {
  177116. effects.enter("blockQuote", {
  177117. _container: true
  177118. });
  177119. state.open = true;
  177120. }
  177121. effects.enter("blockQuotePrefix");
  177122. effects.enter("blockQuoteMarker");
  177123. effects.consume(code2);
  177124. effects.exit("blockQuoteMarker");
  177125. return after;
  177126. }
  177127. return nok(code2);
  177128. }
  177129. function after(code2) {
  177130. if (markdownSpace(code2)) {
  177131. effects.enter("blockQuotePrefixWhitespace");
  177132. effects.consume(code2);
  177133. effects.exit("blockQuotePrefixWhitespace");
  177134. effects.exit("blockQuotePrefix");
  177135. return ok2;
  177136. }
  177137. effects.exit("blockQuotePrefix");
  177138. return ok2(code2);
  177139. }
  177140. }
  177141. function tokenizeBlockQuoteContinuation(effects, ok2, nok) {
  177142. return factorySpace(
  177143. effects,
  177144. effects.attempt(blockQuote, ok2, nok),
  177145. "linePrefix",
  177146. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  177147. );
  177148. }
  177149. function exit(effects) {
  177150. effects.exit("blockQuote");
  177151. }
  177152. // node_modules/micromark-core-commonmark/lib/character-escape.js
  177153. var characterEscape = {
  177154. name: "characterEscape",
  177155. tokenize: tokenizeCharacterEscape
  177156. };
  177157. function tokenizeCharacterEscape(effects, ok2, nok) {
  177158. return start3;
  177159. function start3(code2) {
  177160. effects.enter("characterEscape");
  177161. effects.enter("escapeMarker");
  177162. effects.consume(code2);
  177163. effects.exit("escapeMarker");
  177164. return open;
  177165. }
  177166. function open(code2) {
  177167. if (asciiPunctuation(code2)) {
  177168. effects.enter("characterEscapeValue");
  177169. effects.consume(code2);
  177170. effects.exit("characterEscapeValue");
  177171. effects.exit("characterEscape");
  177172. return ok2;
  177173. }
  177174. return nok(code2);
  177175. }
  177176. }
  177177. // node_modules/character-entities/index.js
  177178. var characterEntities = {
  177179. AEli: "\xC6",
  177180. AElig: "\xC6",
  177181. AM: "&",
  177182. AMP: "&",
  177183. Aacut: "\xC1",
  177184. Aacute: "\xC1",
  177185. Abreve: "\u0102",
  177186. Acir: "\xC2",
  177187. Acirc: "\xC2",
  177188. Acy: "\u0410",
  177189. Afr: "\u{1D504}",
  177190. Agrav: "\xC0",
  177191. Agrave: "\xC0",
  177192. Alpha: "\u0391",
  177193. Amacr: "\u0100",
  177194. And: "\u2A53",
  177195. Aogon: "\u0104",
  177196. Aopf: "\u{1D538}",
  177197. ApplyFunction: "\u2061",
  177198. Arin: "\xC5",
  177199. Aring: "\xC5",
  177200. Ascr: "\u{1D49C}",
  177201. Assign: "\u2254",
  177202. Atild: "\xC3",
  177203. Atilde: "\xC3",
  177204. Aum: "\xC4",
  177205. Auml: "\xC4",
  177206. Backslash: "\u2216",
  177207. Barv: "\u2AE7",
  177208. Barwed: "\u2306",
  177209. Bcy: "\u0411",
  177210. Because: "\u2235",
  177211. Bernoullis: "\u212C",
  177212. Beta: "\u0392",
  177213. Bfr: "\u{1D505}",
  177214. Bopf: "\u{1D539}",
  177215. Breve: "\u02D8",
  177216. Bscr: "\u212C",
  177217. Bumpeq: "\u224E",
  177218. CHcy: "\u0427",
  177219. COP: "\xA9",
  177220. COPY: "\xA9",
  177221. Cacute: "\u0106",
  177222. Cap: "\u22D2",
  177223. CapitalDifferentialD: "\u2145",
  177224. Cayleys: "\u212D",
  177225. Ccaron: "\u010C",
  177226. Ccedi: "\xC7",
  177227. Ccedil: "\xC7",
  177228. Ccirc: "\u0108",
  177229. Cconint: "\u2230",
  177230. Cdot: "\u010A",
  177231. Cedilla: "\xB8",
  177232. CenterDot: "\xB7",
  177233. Cfr: "\u212D",
  177234. Chi: "\u03A7",
  177235. CircleDot: "\u2299",
  177236. CircleMinus: "\u2296",
  177237. CirclePlus: "\u2295",
  177238. CircleTimes: "\u2297",
  177239. ClockwiseContourIntegral: "\u2232",
  177240. CloseCurlyDoubleQuote: "\u201D",
  177241. CloseCurlyQuote: "\u2019",
  177242. Colon: "\u2237",
  177243. Colone: "\u2A74",
  177244. Congruent: "\u2261",
  177245. Conint: "\u222F",
  177246. ContourIntegral: "\u222E",
  177247. Copf: "\u2102",
  177248. Coproduct: "\u2210",
  177249. CounterClockwiseContourIntegral: "\u2233",
  177250. Cross: "\u2A2F",
  177251. Cscr: "\u{1D49E}",
  177252. Cup: "\u22D3",
  177253. CupCap: "\u224D",
  177254. DD: "\u2145",
  177255. DDotrahd: "\u2911",
  177256. DJcy: "\u0402",
  177257. DScy: "\u0405",
  177258. DZcy: "\u040F",
  177259. Dagger: "\u2021",
  177260. Darr: "\u21A1",
  177261. Dashv: "\u2AE4",
  177262. Dcaron: "\u010E",
  177263. Dcy: "\u0414",
  177264. Del: "\u2207",
  177265. Delta: "\u0394",
  177266. Dfr: "\u{1D507}",
  177267. DiacriticalAcute: "\xB4",
  177268. DiacriticalDot: "\u02D9",
  177269. DiacriticalDoubleAcute: "\u02DD",
  177270. DiacriticalGrave: "`",
  177271. DiacriticalTilde: "\u02DC",
  177272. Diamond: "\u22C4",
  177273. DifferentialD: "\u2146",
  177274. Dopf: "\u{1D53B}",
  177275. Dot: "\xA8",
  177276. DotDot: "\u20DC",
  177277. DotEqual: "\u2250",
  177278. DoubleContourIntegral: "\u222F",
  177279. DoubleDot: "\xA8",
  177280. DoubleDownArrow: "\u21D3",
  177281. DoubleLeftArrow: "\u21D0",
  177282. DoubleLeftRightArrow: "\u21D4",
  177283. DoubleLeftTee: "\u2AE4",
  177284. DoubleLongLeftArrow: "\u27F8",
  177285. DoubleLongLeftRightArrow: "\u27FA",
  177286. DoubleLongRightArrow: "\u27F9",
  177287. DoubleRightArrow: "\u21D2",
  177288. DoubleRightTee: "\u22A8",
  177289. DoubleUpArrow: "\u21D1",
  177290. DoubleUpDownArrow: "\u21D5",
  177291. DoubleVerticalBar: "\u2225",
  177292. DownArrow: "\u2193",
  177293. DownArrowBar: "\u2913",
  177294. DownArrowUpArrow: "\u21F5",
  177295. DownBreve: "\u0311",
  177296. DownLeftRightVector: "\u2950",
  177297. DownLeftTeeVector: "\u295E",
  177298. DownLeftVector: "\u21BD",
  177299. DownLeftVectorBar: "\u2956",
  177300. DownRightTeeVector: "\u295F",
  177301. DownRightVector: "\u21C1",
  177302. DownRightVectorBar: "\u2957",
  177303. DownTee: "\u22A4",
  177304. DownTeeArrow: "\u21A7",
  177305. Downarrow: "\u21D3",
  177306. Dscr: "\u{1D49F}",
  177307. Dstrok: "\u0110",
  177308. ENG: "\u014A",
  177309. ET: "\xD0",
  177310. ETH: "\xD0",
  177311. Eacut: "\xC9",
  177312. Eacute: "\xC9",
  177313. Ecaron: "\u011A",
  177314. Ecir: "\xCA",
  177315. Ecirc: "\xCA",
  177316. Ecy: "\u042D",
  177317. Edot: "\u0116",
  177318. Efr: "\u{1D508}",
  177319. Egrav: "\xC8",
  177320. Egrave: "\xC8",
  177321. Element: "\u2208",
  177322. Emacr: "\u0112",
  177323. EmptySmallSquare: "\u25FB",
  177324. EmptyVerySmallSquare: "\u25AB",
  177325. Eogon: "\u0118",
  177326. Eopf: "\u{1D53C}",
  177327. Epsilon: "\u0395",
  177328. Equal: "\u2A75",
  177329. EqualTilde: "\u2242",
  177330. Equilibrium: "\u21CC",
  177331. Escr: "\u2130",
  177332. Esim: "\u2A73",
  177333. Eta: "\u0397",
  177334. Eum: "\xCB",
  177335. Euml: "\xCB",
  177336. Exists: "\u2203",
  177337. ExponentialE: "\u2147",
  177338. Fcy: "\u0424",
  177339. Ffr: "\u{1D509}",
  177340. FilledSmallSquare: "\u25FC",
  177341. FilledVerySmallSquare: "\u25AA",
  177342. Fopf: "\u{1D53D}",
  177343. ForAll: "\u2200",
  177344. Fouriertrf: "\u2131",
  177345. Fscr: "\u2131",
  177346. GJcy: "\u0403",
  177347. G: ">",
  177348. GT: ">",
  177349. Gamma: "\u0393",
  177350. Gammad: "\u03DC",
  177351. Gbreve: "\u011E",
  177352. Gcedil: "\u0122",
  177353. Gcirc: "\u011C",
  177354. Gcy: "\u0413",
  177355. Gdot: "\u0120",
  177356. Gfr: "\u{1D50A}",
  177357. Gg: "\u22D9",
  177358. Gopf: "\u{1D53E}",
  177359. GreaterEqual: "\u2265",
  177360. GreaterEqualLess: "\u22DB",
  177361. GreaterFullEqual: "\u2267",
  177362. GreaterGreater: "\u2AA2",
  177363. GreaterLess: "\u2277",
  177364. GreaterSlantEqual: "\u2A7E",
  177365. GreaterTilde: "\u2273",
  177366. Gscr: "\u{1D4A2}",
  177367. Gt: "\u226B",
  177368. HARDcy: "\u042A",
  177369. Hacek: "\u02C7",
  177370. Hat: "^",
  177371. Hcirc: "\u0124",
  177372. Hfr: "\u210C",
  177373. HilbertSpace: "\u210B",
  177374. Hopf: "\u210D",
  177375. HorizontalLine: "\u2500",
  177376. Hscr: "\u210B",
  177377. Hstrok: "\u0126",
  177378. HumpDownHump: "\u224E",
  177379. HumpEqual: "\u224F",
  177380. IEcy: "\u0415",
  177381. IJlig: "\u0132",
  177382. IOcy: "\u0401",
  177383. Iacut: "\xCD",
  177384. Iacute: "\xCD",
  177385. Icir: "\xCE",
  177386. Icirc: "\xCE",
  177387. Icy: "\u0418",
  177388. Idot: "\u0130",
  177389. Ifr: "\u2111",
  177390. Igrav: "\xCC",
  177391. Igrave: "\xCC",
  177392. Im: "\u2111",
  177393. Imacr: "\u012A",
  177394. ImaginaryI: "\u2148",
  177395. Implies: "\u21D2",
  177396. Int: "\u222C",
  177397. Integral: "\u222B",
  177398. Intersection: "\u22C2",
  177399. InvisibleComma: "\u2063",
  177400. InvisibleTimes: "\u2062",
  177401. Iogon: "\u012E",
  177402. Iopf: "\u{1D540}",
  177403. Iota: "\u0399",
  177404. Iscr: "\u2110",
  177405. Itilde: "\u0128",
  177406. Iukcy: "\u0406",
  177407. Ium: "\xCF",
  177408. Iuml: "\xCF",
  177409. Jcirc: "\u0134",
  177410. Jcy: "\u0419",
  177411. Jfr: "\u{1D50D}",
  177412. Jopf: "\u{1D541}",
  177413. Jscr: "\u{1D4A5}",
  177414. Jsercy: "\u0408",
  177415. Jukcy: "\u0404",
  177416. KHcy: "\u0425",
  177417. KJcy: "\u040C",
  177418. Kappa: "\u039A",
  177419. Kcedil: "\u0136",
  177420. Kcy: "\u041A",
  177421. Kfr: "\u{1D50E}",
  177422. Kopf: "\u{1D542}",
  177423. Kscr: "\u{1D4A6}",
  177424. LJcy: "\u0409",
  177425. L: "<",
  177426. LT: "<",
  177427. Lacute: "\u0139",
  177428. Lambda: "\u039B",
  177429. Lang: "\u27EA",
  177430. Laplacetrf: "\u2112",
  177431. Larr: "\u219E",
  177432. Lcaron: "\u013D",
  177433. Lcedil: "\u013B",
  177434. Lcy: "\u041B",
  177435. LeftAngleBracket: "\u27E8",
  177436. LeftArrow: "\u2190",
  177437. LeftArrowBar: "\u21E4",
  177438. LeftArrowRightArrow: "\u21C6",
  177439. LeftCeiling: "\u2308",
  177440. LeftDoubleBracket: "\u27E6",
  177441. LeftDownTeeVector: "\u2961",
  177442. LeftDownVector: "\u21C3",
  177443. LeftDownVectorBar: "\u2959",
  177444. LeftFloor: "\u230A",
  177445. LeftRightArrow: "\u2194",
  177446. LeftRightVector: "\u294E",
  177447. LeftTee: "\u22A3",
  177448. LeftTeeArrow: "\u21A4",
  177449. LeftTeeVector: "\u295A",
  177450. LeftTriangle: "\u22B2",
  177451. LeftTriangleBar: "\u29CF",
  177452. LeftTriangleEqual: "\u22B4",
  177453. LeftUpDownVector: "\u2951",
  177454. LeftUpTeeVector: "\u2960",
  177455. LeftUpVector: "\u21BF",
  177456. LeftUpVectorBar: "\u2958",
  177457. LeftVector: "\u21BC",
  177458. LeftVectorBar: "\u2952",
  177459. Leftarrow: "\u21D0",
  177460. Leftrightarrow: "\u21D4",
  177461. LessEqualGreater: "\u22DA",
  177462. LessFullEqual: "\u2266",
  177463. LessGreater: "\u2276",
  177464. LessLess: "\u2AA1",
  177465. LessSlantEqual: "\u2A7D",
  177466. LessTilde: "\u2272",
  177467. Lfr: "\u{1D50F}",
  177468. Ll: "\u22D8",
  177469. Lleftarrow: "\u21DA",
  177470. Lmidot: "\u013F",
  177471. LongLeftArrow: "\u27F5",
  177472. LongLeftRightArrow: "\u27F7",
  177473. LongRightArrow: "\u27F6",
  177474. Longleftarrow: "\u27F8",
  177475. Longleftrightarrow: "\u27FA",
  177476. Longrightarrow: "\u27F9",
  177477. Lopf: "\u{1D543}",
  177478. LowerLeftArrow: "\u2199",
  177479. LowerRightArrow: "\u2198",
  177480. Lscr: "\u2112",
  177481. Lsh: "\u21B0",
  177482. Lstrok: "\u0141",
  177483. Lt: "\u226A",
  177484. Map: "\u2905",
  177485. Mcy: "\u041C",
  177486. MediumSpace: "\u205F",
  177487. Mellintrf: "\u2133",
  177488. Mfr: "\u{1D510}",
  177489. MinusPlus: "\u2213",
  177490. Mopf: "\u{1D544}",
  177491. Mscr: "\u2133",
  177492. Mu: "\u039C",
  177493. NJcy: "\u040A",
  177494. Nacute: "\u0143",
  177495. Ncaron: "\u0147",
  177496. Ncedil: "\u0145",
  177497. Ncy: "\u041D",
  177498. NegativeMediumSpace: "\u200B",
  177499. NegativeThickSpace: "\u200B",
  177500. NegativeThinSpace: "\u200B",
  177501. NegativeVeryThinSpace: "\u200B",
  177502. NestedGreaterGreater: "\u226B",
  177503. NestedLessLess: "\u226A",
  177504. NewLine: "\n",
  177505. Nfr: "\u{1D511}",
  177506. NoBreak: "\u2060",
  177507. NonBreakingSpace: "\xA0",
  177508. Nopf: "\u2115",
  177509. Not: "\u2AEC",
  177510. NotCongruent: "\u2262",
  177511. NotCupCap: "\u226D",
  177512. NotDoubleVerticalBar: "\u2226",
  177513. NotElement: "\u2209",
  177514. NotEqual: "\u2260",
  177515. NotEqualTilde: "\u2242\u0338",
  177516. NotExists: "\u2204",
  177517. NotGreater: "\u226F",
  177518. NotGreaterEqual: "\u2271",
  177519. NotGreaterFullEqual: "\u2267\u0338",
  177520. NotGreaterGreater: "\u226B\u0338",
  177521. NotGreaterLess: "\u2279",
  177522. NotGreaterSlantEqual: "\u2A7E\u0338",
  177523. NotGreaterTilde: "\u2275",
  177524. NotHumpDownHump: "\u224E\u0338",
  177525. NotHumpEqual: "\u224F\u0338",
  177526. NotLeftTriangle: "\u22EA",
  177527. NotLeftTriangleBar: "\u29CF\u0338",
  177528. NotLeftTriangleEqual: "\u22EC",
  177529. NotLess: "\u226E",
  177530. NotLessEqual: "\u2270",
  177531. NotLessGreater: "\u2278",
  177532. NotLessLess: "\u226A\u0338",
  177533. NotLessSlantEqual: "\u2A7D\u0338",
  177534. NotLessTilde: "\u2274",
  177535. NotNestedGreaterGreater: "\u2AA2\u0338",
  177536. NotNestedLessLess: "\u2AA1\u0338",
  177537. NotPrecedes: "\u2280",
  177538. NotPrecedesEqual: "\u2AAF\u0338",
  177539. NotPrecedesSlantEqual: "\u22E0",
  177540. NotReverseElement: "\u220C",
  177541. NotRightTriangle: "\u22EB",
  177542. NotRightTriangleBar: "\u29D0\u0338",
  177543. NotRightTriangleEqual: "\u22ED",
  177544. NotSquareSubset: "\u228F\u0338",
  177545. NotSquareSubsetEqual: "\u22E2",
  177546. NotSquareSuperset: "\u2290\u0338",
  177547. NotSquareSupersetEqual: "\u22E3",
  177548. NotSubset: "\u2282\u20D2",
  177549. NotSubsetEqual: "\u2288",
  177550. NotSucceeds: "\u2281",
  177551. NotSucceedsEqual: "\u2AB0\u0338",
  177552. NotSucceedsSlantEqual: "\u22E1",
  177553. NotSucceedsTilde: "\u227F\u0338",
  177554. NotSuperset: "\u2283\u20D2",
  177555. NotSupersetEqual: "\u2289",
  177556. NotTilde: "\u2241",
  177557. NotTildeEqual: "\u2244",
  177558. NotTildeFullEqual: "\u2247",
  177559. NotTildeTilde: "\u2249",
  177560. NotVerticalBar: "\u2224",
  177561. Nscr: "\u{1D4A9}",
  177562. Ntild: "\xD1",
  177563. Ntilde: "\xD1",
  177564. Nu: "\u039D",
  177565. OElig: "\u0152",
  177566. Oacut: "\xD3",
  177567. Oacute: "\xD3",
  177568. Ocir: "\xD4",
  177569. Ocirc: "\xD4",
  177570. Ocy: "\u041E",
  177571. Odblac: "\u0150",
  177572. Ofr: "\u{1D512}",
  177573. Ograv: "\xD2",
  177574. Ograve: "\xD2",
  177575. Omacr: "\u014C",
  177576. Omega: "\u03A9",
  177577. Omicron: "\u039F",
  177578. Oopf: "\u{1D546}",
  177579. OpenCurlyDoubleQuote: "\u201C",
  177580. OpenCurlyQuote: "\u2018",
  177581. Or: "\u2A54",
  177582. Oscr: "\u{1D4AA}",
  177583. Oslas: "\xD8",
  177584. Oslash: "\xD8",
  177585. Otild: "\xD5",
  177586. Otilde: "\xD5",
  177587. Otimes: "\u2A37",
  177588. Oum: "\xD6",
  177589. Ouml: "\xD6",
  177590. OverBar: "\u203E",
  177591. OverBrace: "\u23DE",
  177592. OverBracket: "\u23B4",
  177593. OverParenthesis: "\u23DC",
  177594. PartialD: "\u2202",
  177595. Pcy: "\u041F",
  177596. Pfr: "\u{1D513}",
  177597. Phi: "\u03A6",
  177598. Pi: "\u03A0",
  177599. PlusMinus: "\xB1",
  177600. Poincareplane: "\u210C",
  177601. Popf: "\u2119",
  177602. Pr: "\u2ABB",
  177603. Precedes: "\u227A",
  177604. PrecedesEqual: "\u2AAF",
  177605. PrecedesSlantEqual: "\u227C",
  177606. PrecedesTilde: "\u227E",
  177607. Prime: "\u2033",
  177608. Product: "\u220F",
  177609. Proportion: "\u2237",
  177610. Proportional: "\u221D",
  177611. Pscr: "\u{1D4AB}",
  177612. Psi: "\u03A8",
  177613. QUO: '"',
  177614. QUOT: '"',
  177615. Qfr: "\u{1D514}",
  177616. Qopf: "\u211A",
  177617. Qscr: "\u{1D4AC}",
  177618. RBarr: "\u2910",
  177619. RE: "\xAE",
  177620. REG: "\xAE",
  177621. Racute: "\u0154",
  177622. Rang: "\u27EB",
  177623. Rarr: "\u21A0",
  177624. Rarrtl: "\u2916",
  177625. Rcaron: "\u0158",
  177626. Rcedil: "\u0156",
  177627. Rcy: "\u0420",
  177628. Re: "\u211C",
  177629. ReverseElement: "\u220B",
  177630. ReverseEquilibrium: "\u21CB",
  177631. ReverseUpEquilibrium: "\u296F",
  177632. Rfr: "\u211C",
  177633. Rho: "\u03A1",
  177634. RightAngleBracket: "\u27E9",
  177635. RightArrow: "\u2192",
  177636. RightArrowBar: "\u21E5",
  177637. RightArrowLeftArrow: "\u21C4",
  177638. RightCeiling: "\u2309",
  177639. RightDoubleBracket: "\u27E7",
  177640. RightDownTeeVector: "\u295D",
  177641. RightDownVector: "\u21C2",
  177642. RightDownVectorBar: "\u2955",
  177643. RightFloor: "\u230B",
  177644. RightTee: "\u22A2",
  177645. RightTeeArrow: "\u21A6",
  177646. RightTeeVector: "\u295B",
  177647. RightTriangle: "\u22B3",
  177648. RightTriangleBar: "\u29D0",
  177649. RightTriangleEqual: "\u22B5",
  177650. RightUpDownVector: "\u294F",
  177651. RightUpTeeVector: "\u295C",
  177652. RightUpVector: "\u21BE",
  177653. RightUpVectorBar: "\u2954",
  177654. RightVector: "\u21C0",
  177655. RightVectorBar: "\u2953",
  177656. Rightarrow: "\u21D2",
  177657. Ropf: "\u211D",
  177658. RoundImplies: "\u2970",
  177659. Rrightarrow: "\u21DB",
  177660. Rscr: "\u211B",
  177661. Rsh: "\u21B1",
  177662. RuleDelayed: "\u29F4",
  177663. SHCHcy: "\u0429",
  177664. SHcy: "\u0428",
  177665. SOFTcy: "\u042C",
  177666. Sacute: "\u015A",
  177667. Sc: "\u2ABC",
  177668. Scaron: "\u0160",
  177669. Scedil: "\u015E",
  177670. Scirc: "\u015C",
  177671. Scy: "\u0421",
  177672. Sfr: "\u{1D516}",
  177673. ShortDownArrow: "\u2193",
  177674. ShortLeftArrow: "\u2190",
  177675. ShortRightArrow: "\u2192",
  177676. ShortUpArrow: "\u2191",
  177677. Sigma: "\u03A3",
  177678. SmallCircle: "\u2218",
  177679. Sopf: "\u{1D54A}",
  177680. Sqrt: "\u221A",
  177681. Square: "\u25A1",
  177682. SquareIntersection: "\u2293",
  177683. SquareSubset: "\u228F",
  177684. SquareSubsetEqual: "\u2291",
  177685. SquareSuperset: "\u2290",
  177686. SquareSupersetEqual: "\u2292",
  177687. SquareUnion: "\u2294",
  177688. Sscr: "\u{1D4AE}",
  177689. Star: "\u22C6",
  177690. Sub: "\u22D0",
  177691. Subset: "\u22D0",
  177692. SubsetEqual: "\u2286",
  177693. Succeeds: "\u227B",
  177694. SucceedsEqual: "\u2AB0",
  177695. SucceedsSlantEqual: "\u227D",
  177696. SucceedsTilde: "\u227F",
  177697. SuchThat: "\u220B",
  177698. Sum: "\u2211",
  177699. Sup: "\u22D1",
  177700. Superset: "\u2283",
  177701. SupersetEqual: "\u2287",
  177702. Supset: "\u22D1",
  177703. THOR: "\xDE",
  177704. THORN: "\xDE",
  177705. TRADE: "\u2122",
  177706. TSHcy: "\u040B",
  177707. TScy: "\u0426",
  177708. Tab: " ",
  177709. Tau: "\u03A4",
  177710. Tcaron: "\u0164",
  177711. Tcedil: "\u0162",
  177712. Tcy: "\u0422",
  177713. Tfr: "\u{1D517}",
  177714. Therefore: "\u2234",
  177715. Theta: "\u0398",
  177716. ThickSpace: "\u205F\u200A",
  177717. ThinSpace: "\u2009",
  177718. Tilde: "\u223C",
  177719. TildeEqual: "\u2243",
  177720. TildeFullEqual: "\u2245",
  177721. TildeTilde: "\u2248",
  177722. Topf: "\u{1D54B}",
  177723. TripleDot: "\u20DB",
  177724. Tscr: "\u{1D4AF}",
  177725. Tstrok: "\u0166",
  177726. Uacut: "\xDA",
  177727. Uacute: "\xDA",
  177728. Uarr: "\u219F",
  177729. Uarrocir: "\u2949",
  177730. Ubrcy: "\u040E",
  177731. Ubreve: "\u016C",
  177732. Ucir: "\xDB",
  177733. Ucirc: "\xDB",
  177734. Ucy: "\u0423",
  177735. Udblac: "\u0170",
  177736. Ufr: "\u{1D518}",
  177737. Ugrav: "\xD9",
  177738. Ugrave: "\xD9",
  177739. Umacr: "\u016A",
  177740. UnderBar: "_",
  177741. UnderBrace: "\u23DF",
  177742. UnderBracket: "\u23B5",
  177743. UnderParenthesis: "\u23DD",
  177744. Union: "\u22C3",
  177745. UnionPlus: "\u228E",
  177746. Uogon: "\u0172",
  177747. Uopf: "\u{1D54C}",
  177748. UpArrow: "\u2191",
  177749. UpArrowBar: "\u2912",
  177750. UpArrowDownArrow: "\u21C5",
  177751. UpDownArrow: "\u2195",
  177752. UpEquilibrium: "\u296E",
  177753. UpTee: "\u22A5",
  177754. UpTeeArrow: "\u21A5",
  177755. Uparrow: "\u21D1",
  177756. Updownarrow: "\u21D5",
  177757. UpperLeftArrow: "\u2196",
  177758. UpperRightArrow: "\u2197",
  177759. Upsi: "\u03D2",
  177760. Upsilon: "\u03A5",
  177761. Uring: "\u016E",
  177762. Uscr: "\u{1D4B0}",
  177763. Utilde: "\u0168",
  177764. Uum: "\xDC",
  177765. Uuml: "\xDC",
  177766. VDash: "\u22AB",
  177767. Vbar: "\u2AEB",
  177768. Vcy: "\u0412",
  177769. Vdash: "\u22A9",
  177770. Vdashl: "\u2AE6",
  177771. Vee: "\u22C1",
  177772. Verbar: "\u2016",
  177773. Vert: "\u2016",
  177774. VerticalBar: "\u2223",
  177775. VerticalLine: "|",
  177776. VerticalSeparator: "\u2758",
  177777. VerticalTilde: "\u2240",
  177778. VeryThinSpace: "\u200A",
  177779. Vfr: "\u{1D519}",
  177780. Vopf: "\u{1D54D}",
  177781. Vscr: "\u{1D4B1}",
  177782. Vvdash: "\u22AA",
  177783. Wcirc: "\u0174",
  177784. Wedge: "\u22C0",
  177785. Wfr: "\u{1D51A}",
  177786. Wopf: "\u{1D54E}",
  177787. Wscr: "\u{1D4B2}",
  177788. Xfr: "\u{1D51B}",
  177789. Xi: "\u039E",
  177790. Xopf: "\u{1D54F}",
  177791. Xscr: "\u{1D4B3}",
  177792. YAcy: "\u042F",
  177793. YIcy: "\u0407",
  177794. YUcy: "\u042E",
  177795. Yacut: "\xDD",
  177796. Yacute: "\xDD",
  177797. Ycirc: "\u0176",
  177798. Ycy: "\u042B",
  177799. Yfr: "\u{1D51C}",
  177800. Yopf: "\u{1D550}",
  177801. Yscr: "\u{1D4B4}",
  177802. Yuml: "\u0178",
  177803. ZHcy: "\u0416",
  177804. Zacute: "\u0179",
  177805. Zcaron: "\u017D",
  177806. Zcy: "\u0417",
  177807. Zdot: "\u017B",
  177808. ZeroWidthSpace: "\u200B",
  177809. Zeta: "\u0396",
  177810. Zfr: "\u2128",
  177811. Zopf: "\u2124",
  177812. Zscr: "\u{1D4B5}",
  177813. aacut: "\xE1",
  177814. aacute: "\xE1",
  177815. abreve: "\u0103",
  177816. ac: "\u223E",
  177817. acE: "\u223E\u0333",
  177818. acd: "\u223F",
  177819. acir: "\xE2",
  177820. acirc: "\xE2",
  177821. acut: "\xB4",
  177822. acute: "\xB4",
  177823. acy: "\u0430",
  177824. aeli: "\xE6",
  177825. aelig: "\xE6",
  177826. af: "\u2061",
  177827. afr: "\u{1D51E}",
  177828. agrav: "\xE0",
  177829. agrave: "\xE0",
  177830. alefsym: "\u2135",
  177831. aleph: "\u2135",
  177832. alpha: "\u03B1",
  177833. amacr: "\u0101",
  177834. amalg: "\u2A3F",
  177835. am: "&",
  177836. amp: "&",
  177837. and: "\u2227",
  177838. andand: "\u2A55",
  177839. andd: "\u2A5C",
  177840. andslope: "\u2A58",
  177841. andv: "\u2A5A",
  177842. ang: "\u2220",
  177843. ange: "\u29A4",
  177844. angle: "\u2220",
  177845. angmsd: "\u2221",
  177846. angmsdaa: "\u29A8",
  177847. angmsdab: "\u29A9",
  177848. angmsdac: "\u29AA",
  177849. angmsdad: "\u29AB",
  177850. angmsdae: "\u29AC",
  177851. angmsdaf: "\u29AD",
  177852. angmsdag: "\u29AE",
  177853. angmsdah: "\u29AF",
  177854. angrt: "\u221F",
  177855. angrtvb: "\u22BE",
  177856. angrtvbd: "\u299D",
  177857. angsph: "\u2222",
  177858. angst: "\xC5",
  177859. angzarr: "\u237C",
  177860. aogon: "\u0105",
  177861. aopf: "\u{1D552}",
  177862. ap: "\u2248",
  177863. apE: "\u2A70",
  177864. apacir: "\u2A6F",
  177865. ape: "\u224A",
  177866. apid: "\u224B",
  177867. apos: "'",
  177868. approx: "\u2248",
  177869. approxeq: "\u224A",
  177870. arin: "\xE5",
  177871. aring: "\xE5",
  177872. ascr: "\u{1D4B6}",
  177873. ast: "*",
  177874. asymp: "\u2248",
  177875. asympeq: "\u224D",
  177876. atild: "\xE3",
  177877. atilde: "\xE3",
  177878. aum: "\xE4",
  177879. auml: "\xE4",
  177880. awconint: "\u2233",
  177881. awint: "\u2A11",
  177882. bNot: "\u2AED",
  177883. backcong: "\u224C",
  177884. backepsilon: "\u03F6",
  177885. backprime: "\u2035",
  177886. backsim: "\u223D",
  177887. backsimeq: "\u22CD",
  177888. barvee: "\u22BD",
  177889. barwed: "\u2305",
  177890. barwedge: "\u2305",
  177891. bbrk: "\u23B5",
  177892. bbrktbrk: "\u23B6",
  177893. bcong: "\u224C",
  177894. bcy: "\u0431",
  177895. bdquo: "\u201E",
  177896. becaus: "\u2235",
  177897. because: "\u2235",
  177898. bemptyv: "\u29B0",
  177899. bepsi: "\u03F6",
  177900. bernou: "\u212C",
  177901. beta: "\u03B2",
  177902. beth: "\u2136",
  177903. between: "\u226C",
  177904. bfr: "\u{1D51F}",
  177905. bigcap: "\u22C2",
  177906. bigcirc: "\u25EF",
  177907. bigcup: "\u22C3",
  177908. bigodot: "\u2A00",
  177909. bigoplus: "\u2A01",
  177910. bigotimes: "\u2A02",
  177911. bigsqcup: "\u2A06",
  177912. bigstar: "\u2605",
  177913. bigtriangledown: "\u25BD",
  177914. bigtriangleup: "\u25B3",
  177915. biguplus: "\u2A04",
  177916. bigvee: "\u22C1",
  177917. bigwedge: "\u22C0",
  177918. bkarow: "\u290D",
  177919. blacklozenge: "\u29EB",
  177920. blacksquare: "\u25AA",
  177921. blacktriangle: "\u25B4",
  177922. blacktriangledown: "\u25BE",
  177923. blacktriangleleft: "\u25C2",
  177924. blacktriangleright: "\u25B8",
  177925. blank: "\u2423",
  177926. blk12: "\u2592",
  177927. blk14: "\u2591",
  177928. blk34: "\u2593",
  177929. block: "\u2588",
  177930. bne: "=\u20E5",
  177931. bnequiv: "\u2261\u20E5",
  177932. bnot: "\u2310",
  177933. bopf: "\u{1D553}",
  177934. bot: "\u22A5",
  177935. bottom: "\u22A5",
  177936. bowtie: "\u22C8",
  177937. boxDL: "\u2557",
  177938. boxDR: "\u2554",
  177939. boxDl: "\u2556",
  177940. boxDr: "\u2553",
  177941. boxH: "\u2550",
  177942. boxHD: "\u2566",
  177943. boxHU: "\u2569",
  177944. boxHd: "\u2564",
  177945. boxHu: "\u2567",
  177946. boxUL: "\u255D",
  177947. boxUR: "\u255A",
  177948. boxUl: "\u255C",
  177949. boxUr: "\u2559",
  177950. boxV: "\u2551",
  177951. boxVH: "\u256C",
  177952. boxVL: "\u2563",
  177953. boxVR: "\u2560",
  177954. boxVh: "\u256B",
  177955. boxVl: "\u2562",
  177956. boxVr: "\u255F",
  177957. boxbox: "\u29C9",
  177958. boxdL: "\u2555",
  177959. boxdR: "\u2552",
  177960. boxdl: "\u2510",
  177961. boxdr: "\u250C",
  177962. boxh: "\u2500",
  177963. boxhD: "\u2565",
  177964. boxhU: "\u2568",
  177965. boxhd: "\u252C",
  177966. boxhu: "\u2534",
  177967. boxminus: "\u229F",
  177968. boxplus: "\u229E",
  177969. boxtimes: "\u22A0",
  177970. boxuL: "\u255B",
  177971. boxuR: "\u2558",
  177972. boxul: "\u2518",
  177973. boxur: "\u2514",
  177974. boxv: "\u2502",
  177975. boxvH: "\u256A",
  177976. boxvL: "\u2561",
  177977. boxvR: "\u255E",
  177978. boxvh: "\u253C",
  177979. boxvl: "\u2524",
  177980. boxvr: "\u251C",
  177981. bprime: "\u2035",
  177982. breve: "\u02D8",
  177983. brvba: "\xA6",
  177984. brvbar: "\xA6",
  177985. bscr: "\u{1D4B7}",
  177986. bsemi: "\u204F",
  177987. bsim: "\u223D",
  177988. bsime: "\u22CD",
  177989. bsol: "\\",
  177990. bsolb: "\u29C5",
  177991. bsolhsub: "\u27C8",
  177992. bull: "\u2022",
  177993. bullet: "\u2022",
  177994. bump: "\u224E",
  177995. bumpE: "\u2AAE",
  177996. bumpe: "\u224F",
  177997. bumpeq: "\u224F",
  177998. cacute: "\u0107",
  177999. cap: "\u2229",
  178000. capand: "\u2A44",
  178001. capbrcup: "\u2A49",
  178002. capcap: "\u2A4B",
  178003. capcup: "\u2A47",
  178004. capdot: "\u2A40",
  178005. caps: "\u2229\uFE00",
  178006. caret: "\u2041",
  178007. caron: "\u02C7",
  178008. ccaps: "\u2A4D",
  178009. ccaron: "\u010D",
  178010. ccedi: "\xE7",
  178011. ccedil: "\xE7",
  178012. ccirc: "\u0109",
  178013. ccups: "\u2A4C",
  178014. ccupssm: "\u2A50",
  178015. cdot: "\u010B",
  178016. cedi: "\xB8",
  178017. cedil: "\xB8",
  178018. cemptyv: "\u29B2",
  178019. cen: "\xA2",
  178020. cent: "\xA2",
  178021. centerdot: "\xB7",
  178022. cfr: "\u{1D520}",
  178023. chcy: "\u0447",
  178024. check: "\u2713",
  178025. checkmark: "\u2713",
  178026. chi: "\u03C7",
  178027. cir: "\u25CB",
  178028. cirE: "\u29C3",
  178029. circ: "\u02C6",
  178030. circeq: "\u2257",
  178031. circlearrowleft: "\u21BA",
  178032. circlearrowright: "\u21BB",
  178033. circledR: "\xAE",
  178034. circledS: "\u24C8",
  178035. circledast: "\u229B",
  178036. circledcirc: "\u229A",
  178037. circleddash: "\u229D",
  178038. cire: "\u2257",
  178039. cirfnint: "\u2A10",
  178040. cirmid: "\u2AEF",
  178041. cirscir: "\u29C2",
  178042. clubs: "\u2663",
  178043. clubsuit: "\u2663",
  178044. colon: ":",
  178045. colone: "\u2254",
  178046. coloneq: "\u2254",
  178047. comma: ",",
  178048. commat: "@",
  178049. comp: "\u2201",
  178050. compfn: "\u2218",
  178051. complement: "\u2201",
  178052. complexes: "\u2102",
  178053. cong: "\u2245",
  178054. congdot: "\u2A6D",
  178055. conint: "\u222E",
  178056. copf: "\u{1D554}",
  178057. coprod: "\u2210",
  178058. cop: "\xA9",
  178059. copy: "\xA9",
  178060. copysr: "\u2117",
  178061. crarr: "\u21B5",
  178062. cross: "\u2717",
  178063. cscr: "\u{1D4B8}",
  178064. csub: "\u2ACF",
  178065. csube: "\u2AD1",
  178066. csup: "\u2AD0",
  178067. csupe: "\u2AD2",
  178068. ctdot: "\u22EF",
  178069. cudarrl: "\u2938",
  178070. cudarrr: "\u2935",
  178071. cuepr: "\u22DE",
  178072. cuesc: "\u22DF",
  178073. cularr: "\u21B6",
  178074. cularrp: "\u293D",
  178075. cup: "\u222A",
  178076. cupbrcap: "\u2A48",
  178077. cupcap: "\u2A46",
  178078. cupcup: "\u2A4A",
  178079. cupdot: "\u228D",
  178080. cupor: "\u2A45",
  178081. cups: "\u222A\uFE00",
  178082. curarr: "\u21B7",
  178083. curarrm: "\u293C",
  178084. curlyeqprec: "\u22DE",
  178085. curlyeqsucc: "\u22DF",
  178086. curlyvee: "\u22CE",
  178087. curlywedge: "\u22CF",
  178088. curre: "\xA4",
  178089. curren: "\xA4",
  178090. curvearrowleft: "\u21B6",
  178091. curvearrowright: "\u21B7",
  178092. cuvee: "\u22CE",
  178093. cuwed: "\u22CF",
  178094. cwconint: "\u2232",
  178095. cwint: "\u2231",
  178096. cylcty: "\u232D",
  178097. dArr: "\u21D3",
  178098. dHar: "\u2965",
  178099. dagger: "\u2020",
  178100. daleth: "\u2138",
  178101. darr: "\u2193",
  178102. dash: "\u2010",
  178103. dashv: "\u22A3",
  178104. dbkarow: "\u290F",
  178105. dblac: "\u02DD",
  178106. dcaron: "\u010F",
  178107. dcy: "\u0434",
  178108. dd: "\u2146",
  178109. ddagger: "\u2021",
  178110. ddarr: "\u21CA",
  178111. ddotseq: "\u2A77",
  178112. de: "\xB0",
  178113. deg: "\xB0",
  178114. delta: "\u03B4",
  178115. demptyv: "\u29B1",
  178116. dfisht: "\u297F",
  178117. dfr: "\u{1D521}",
  178118. dharl: "\u21C3",
  178119. dharr: "\u21C2",
  178120. diam: "\u22C4",
  178121. diamond: "\u22C4",
  178122. diamondsuit: "\u2666",
  178123. diams: "\u2666",
  178124. die: "\xA8",
  178125. digamma: "\u03DD",
  178126. disin: "\u22F2",
  178127. div: "\xF7",
  178128. divid: "\xF7",
  178129. divide: "\xF7",
  178130. divideontimes: "\u22C7",
  178131. divonx: "\u22C7",
  178132. djcy: "\u0452",
  178133. dlcorn: "\u231E",
  178134. dlcrop: "\u230D",
  178135. dollar: "$",
  178136. dopf: "\u{1D555}",
  178137. dot: "\u02D9",
  178138. doteq: "\u2250",
  178139. doteqdot: "\u2251",
  178140. dotminus: "\u2238",
  178141. dotplus: "\u2214",
  178142. dotsquare: "\u22A1",
  178143. doublebarwedge: "\u2306",
  178144. downarrow: "\u2193",
  178145. downdownarrows: "\u21CA",
  178146. downharpoonleft: "\u21C3",
  178147. downharpoonright: "\u21C2",
  178148. drbkarow: "\u2910",
  178149. drcorn: "\u231F",
  178150. drcrop: "\u230C",
  178151. dscr: "\u{1D4B9}",
  178152. dscy: "\u0455",
  178153. dsol: "\u29F6",
  178154. dstrok: "\u0111",
  178155. dtdot: "\u22F1",
  178156. dtri: "\u25BF",
  178157. dtrif: "\u25BE",
  178158. duarr: "\u21F5",
  178159. duhar: "\u296F",
  178160. dwangle: "\u29A6",
  178161. dzcy: "\u045F",
  178162. dzigrarr: "\u27FF",
  178163. eDDot: "\u2A77",
  178164. eDot: "\u2251",
  178165. eacut: "\xE9",
  178166. eacute: "\xE9",
  178167. easter: "\u2A6E",
  178168. ecaron: "\u011B",
  178169. ecir: "\xEA",
  178170. ecirc: "\xEA",
  178171. ecolon: "\u2255",
  178172. ecy: "\u044D",
  178173. edot: "\u0117",
  178174. ee: "\u2147",
  178175. efDot: "\u2252",
  178176. efr: "\u{1D522}",
  178177. eg: "\u2A9A",
  178178. egrav: "\xE8",
  178179. egrave: "\xE8",
  178180. egs: "\u2A96",
  178181. egsdot: "\u2A98",
  178182. el: "\u2A99",
  178183. elinters: "\u23E7",
  178184. ell: "\u2113",
  178185. els: "\u2A95",
  178186. elsdot: "\u2A97",
  178187. emacr: "\u0113",
  178188. empty: "\u2205",
  178189. emptyset: "\u2205",
  178190. emptyv: "\u2205",
  178191. emsp13: "\u2004",
  178192. emsp14: "\u2005",
  178193. emsp: "\u2003",
  178194. eng: "\u014B",
  178195. ensp: "\u2002",
  178196. eogon: "\u0119",
  178197. eopf: "\u{1D556}",
  178198. epar: "\u22D5",
  178199. eparsl: "\u29E3",
  178200. eplus: "\u2A71",
  178201. epsi: "\u03B5",
  178202. epsilon: "\u03B5",
  178203. epsiv: "\u03F5",
  178204. eqcirc: "\u2256",
  178205. eqcolon: "\u2255",
  178206. eqsim: "\u2242",
  178207. eqslantgtr: "\u2A96",
  178208. eqslantless: "\u2A95",
  178209. equals: "=",
  178210. equest: "\u225F",
  178211. equiv: "\u2261",
  178212. equivDD: "\u2A78",
  178213. eqvparsl: "\u29E5",
  178214. erDot: "\u2253",
  178215. erarr: "\u2971",
  178216. escr: "\u212F",
  178217. esdot: "\u2250",
  178218. esim: "\u2242",
  178219. eta: "\u03B7",
  178220. et: "\xF0",
  178221. eth: "\xF0",
  178222. eum: "\xEB",
  178223. euml: "\xEB",
  178224. euro: "\u20AC",
  178225. excl: "!",
  178226. exist: "\u2203",
  178227. expectation: "\u2130",
  178228. exponentiale: "\u2147",
  178229. fallingdotseq: "\u2252",
  178230. fcy: "\u0444",
  178231. female: "\u2640",
  178232. ffilig: "\uFB03",
  178233. fflig: "\uFB00",
  178234. ffllig: "\uFB04",
  178235. ffr: "\u{1D523}",
  178236. filig: "\uFB01",
  178237. fjlig: "fj",
  178238. flat: "\u266D",
  178239. fllig: "\uFB02",
  178240. fltns: "\u25B1",
  178241. fnof: "\u0192",
  178242. fopf: "\u{1D557}",
  178243. forall: "\u2200",
  178244. fork: "\u22D4",
  178245. forkv: "\u2AD9",
  178246. fpartint: "\u2A0D",
  178247. frac1: "\xBC",
  178248. frac12: "\xBD",
  178249. frac13: "\u2153",
  178250. frac14: "\xBC",
  178251. frac15: "\u2155",
  178252. frac16: "\u2159",
  178253. frac18: "\u215B",
  178254. frac23: "\u2154",
  178255. frac25: "\u2156",
  178256. frac3: "\xBE",
  178257. frac34: "\xBE",
  178258. frac35: "\u2157",
  178259. frac38: "\u215C",
  178260. frac45: "\u2158",
  178261. frac56: "\u215A",
  178262. frac58: "\u215D",
  178263. frac78: "\u215E",
  178264. frasl: "\u2044",
  178265. frown: "\u2322",
  178266. fscr: "\u{1D4BB}",
  178267. gE: "\u2267",
  178268. gEl: "\u2A8C",
  178269. gacute: "\u01F5",
  178270. gamma: "\u03B3",
  178271. gammad: "\u03DD",
  178272. gap: "\u2A86",
  178273. gbreve: "\u011F",
  178274. gcirc: "\u011D",
  178275. gcy: "\u0433",
  178276. gdot: "\u0121",
  178277. ge: "\u2265",
  178278. gel: "\u22DB",
  178279. geq: "\u2265",
  178280. geqq: "\u2267",
  178281. geqslant: "\u2A7E",
  178282. ges: "\u2A7E",
  178283. gescc: "\u2AA9",
  178284. gesdot: "\u2A80",
  178285. gesdoto: "\u2A82",
  178286. gesdotol: "\u2A84",
  178287. gesl: "\u22DB\uFE00",
  178288. gesles: "\u2A94",
  178289. gfr: "\u{1D524}",
  178290. gg: "\u226B",
  178291. ggg: "\u22D9",
  178292. gimel: "\u2137",
  178293. gjcy: "\u0453",
  178294. gl: "\u2277",
  178295. glE: "\u2A92",
  178296. gla: "\u2AA5",
  178297. glj: "\u2AA4",
  178298. gnE: "\u2269",
  178299. gnap: "\u2A8A",
  178300. gnapprox: "\u2A8A",
  178301. gne: "\u2A88",
  178302. gneq: "\u2A88",
  178303. gneqq: "\u2269",
  178304. gnsim: "\u22E7",
  178305. gopf: "\u{1D558}",
  178306. grave: "`",
  178307. gscr: "\u210A",
  178308. gsim: "\u2273",
  178309. gsime: "\u2A8E",
  178310. gsiml: "\u2A90",
  178311. g: ">",
  178312. gt: ">",
  178313. gtcc: "\u2AA7",
  178314. gtcir: "\u2A7A",
  178315. gtdot: "\u22D7",
  178316. gtlPar: "\u2995",
  178317. gtquest: "\u2A7C",
  178318. gtrapprox: "\u2A86",
  178319. gtrarr: "\u2978",
  178320. gtrdot: "\u22D7",
  178321. gtreqless: "\u22DB",
  178322. gtreqqless: "\u2A8C",
  178323. gtrless: "\u2277",
  178324. gtrsim: "\u2273",
  178325. gvertneqq: "\u2269\uFE00",
  178326. gvnE: "\u2269\uFE00",
  178327. hArr: "\u21D4",
  178328. hairsp: "\u200A",
  178329. half: "\xBD",
  178330. hamilt: "\u210B",
  178331. hardcy: "\u044A",
  178332. harr: "\u2194",
  178333. harrcir: "\u2948",
  178334. harrw: "\u21AD",
  178335. hbar: "\u210F",
  178336. hcirc: "\u0125",
  178337. hearts: "\u2665",
  178338. heartsuit: "\u2665",
  178339. hellip: "\u2026",
  178340. hercon: "\u22B9",
  178341. hfr: "\u{1D525}",
  178342. hksearow: "\u2925",
  178343. hkswarow: "\u2926",
  178344. hoarr: "\u21FF",
  178345. homtht: "\u223B",
  178346. hookleftarrow: "\u21A9",
  178347. hookrightarrow: "\u21AA",
  178348. hopf: "\u{1D559}",
  178349. horbar: "\u2015",
  178350. hscr: "\u{1D4BD}",
  178351. hslash: "\u210F",
  178352. hstrok: "\u0127",
  178353. hybull: "\u2043",
  178354. hyphen: "\u2010",
  178355. iacut: "\xED",
  178356. iacute: "\xED",
  178357. ic: "\u2063",
  178358. icir: "\xEE",
  178359. icirc: "\xEE",
  178360. icy: "\u0438",
  178361. iecy: "\u0435",
  178362. iexc: "\xA1",
  178363. iexcl: "\xA1",
  178364. iff: "\u21D4",
  178365. ifr: "\u{1D526}",
  178366. igrav: "\xEC",
  178367. igrave: "\xEC",
  178368. ii: "\u2148",
  178369. iiiint: "\u2A0C",
  178370. iiint: "\u222D",
  178371. iinfin: "\u29DC",
  178372. iiota: "\u2129",
  178373. ijlig: "\u0133",
  178374. imacr: "\u012B",
  178375. image: "\u2111",
  178376. imagline: "\u2110",
  178377. imagpart: "\u2111",
  178378. imath: "\u0131",
  178379. imof: "\u22B7",
  178380. imped: "\u01B5",
  178381. in: "\u2208",
  178382. incare: "\u2105",
  178383. infin: "\u221E",
  178384. infintie: "\u29DD",
  178385. inodot: "\u0131",
  178386. int: "\u222B",
  178387. intcal: "\u22BA",
  178388. integers: "\u2124",
  178389. intercal: "\u22BA",
  178390. intlarhk: "\u2A17",
  178391. intprod: "\u2A3C",
  178392. iocy: "\u0451",
  178393. iogon: "\u012F",
  178394. iopf: "\u{1D55A}",
  178395. iota: "\u03B9",
  178396. iprod: "\u2A3C",
  178397. iques: "\xBF",
  178398. iquest: "\xBF",
  178399. iscr: "\u{1D4BE}",
  178400. isin: "\u2208",
  178401. isinE: "\u22F9",
  178402. isindot: "\u22F5",
  178403. isins: "\u22F4",
  178404. isinsv: "\u22F3",
  178405. isinv: "\u2208",
  178406. it: "\u2062",
  178407. itilde: "\u0129",
  178408. iukcy: "\u0456",
  178409. ium: "\xEF",
  178410. iuml: "\xEF",
  178411. jcirc: "\u0135",
  178412. jcy: "\u0439",
  178413. jfr: "\u{1D527}",
  178414. jmath: "\u0237",
  178415. jopf: "\u{1D55B}",
  178416. jscr: "\u{1D4BF}",
  178417. jsercy: "\u0458",
  178418. jukcy: "\u0454",
  178419. kappa: "\u03BA",
  178420. kappav: "\u03F0",
  178421. kcedil: "\u0137",
  178422. kcy: "\u043A",
  178423. kfr: "\u{1D528}",
  178424. kgreen: "\u0138",
  178425. khcy: "\u0445",
  178426. kjcy: "\u045C",
  178427. kopf: "\u{1D55C}",
  178428. kscr: "\u{1D4C0}",
  178429. lAarr: "\u21DA",
  178430. lArr: "\u21D0",
  178431. lAtail: "\u291B",
  178432. lBarr: "\u290E",
  178433. lE: "\u2266",
  178434. lEg: "\u2A8B",
  178435. lHar: "\u2962",
  178436. lacute: "\u013A",
  178437. laemptyv: "\u29B4",
  178438. lagran: "\u2112",
  178439. lambda: "\u03BB",
  178440. lang: "\u27E8",
  178441. langd: "\u2991",
  178442. langle: "\u27E8",
  178443. lap: "\u2A85",
  178444. laqu: "\xAB",
  178445. laquo: "\xAB",
  178446. larr: "\u2190",
  178447. larrb: "\u21E4",
  178448. larrbfs: "\u291F",
  178449. larrfs: "\u291D",
  178450. larrhk: "\u21A9",
  178451. larrlp: "\u21AB",
  178452. larrpl: "\u2939",
  178453. larrsim: "\u2973",
  178454. larrtl: "\u21A2",
  178455. lat: "\u2AAB",
  178456. latail: "\u2919",
  178457. late: "\u2AAD",
  178458. lates: "\u2AAD\uFE00",
  178459. lbarr: "\u290C",
  178460. lbbrk: "\u2772",
  178461. lbrace: "{",
  178462. lbrack: "[",
  178463. lbrke: "\u298B",
  178464. lbrksld: "\u298F",
  178465. lbrkslu: "\u298D",
  178466. lcaron: "\u013E",
  178467. lcedil: "\u013C",
  178468. lceil: "\u2308",
  178469. lcub: "{",
  178470. lcy: "\u043B",
  178471. ldca: "\u2936",
  178472. ldquo: "\u201C",
  178473. ldquor: "\u201E",
  178474. ldrdhar: "\u2967",
  178475. ldrushar: "\u294B",
  178476. ldsh: "\u21B2",
  178477. le: "\u2264",
  178478. leftarrow: "\u2190",
  178479. leftarrowtail: "\u21A2",
  178480. leftharpoondown: "\u21BD",
  178481. leftharpoonup: "\u21BC",
  178482. leftleftarrows: "\u21C7",
  178483. leftrightarrow: "\u2194",
  178484. leftrightarrows: "\u21C6",
  178485. leftrightharpoons: "\u21CB",
  178486. leftrightsquigarrow: "\u21AD",
  178487. leftthreetimes: "\u22CB",
  178488. leg: "\u22DA",
  178489. leq: "\u2264",
  178490. leqq: "\u2266",
  178491. leqslant: "\u2A7D",
  178492. les: "\u2A7D",
  178493. lescc: "\u2AA8",
  178494. lesdot: "\u2A7F",
  178495. lesdoto: "\u2A81",
  178496. lesdotor: "\u2A83",
  178497. lesg: "\u22DA\uFE00",
  178498. lesges: "\u2A93",
  178499. lessapprox: "\u2A85",
  178500. lessdot: "\u22D6",
  178501. lesseqgtr: "\u22DA",
  178502. lesseqqgtr: "\u2A8B",
  178503. lessgtr: "\u2276",
  178504. lesssim: "\u2272",
  178505. lfisht: "\u297C",
  178506. lfloor: "\u230A",
  178507. lfr: "\u{1D529}",
  178508. lg: "\u2276",
  178509. lgE: "\u2A91",
  178510. lhard: "\u21BD",
  178511. lharu: "\u21BC",
  178512. lharul: "\u296A",
  178513. lhblk: "\u2584",
  178514. ljcy: "\u0459",
  178515. ll: "\u226A",
  178516. llarr: "\u21C7",
  178517. llcorner: "\u231E",
  178518. llhard: "\u296B",
  178519. lltri: "\u25FA",
  178520. lmidot: "\u0140",
  178521. lmoust: "\u23B0",
  178522. lmoustache: "\u23B0",
  178523. lnE: "\u2268",
  178524. lnap: "\u2A89",
  178525. lnapprox: "\u2A89",
  178526. lne: "\u2A87",
  178527. lneq: "\u2A87",
  178528. lneqq: "\u2268",
  178529. lnsim: "\u22E6",
  178530. loang: "\u27EC",
  178531. loarr: "\u21FD",
  178532. lobrk: "\u27E6",
  178533. longleftarrow: "\u27F5",
  178534. longleftrightarrow: "\u27F7",
  178535. longmapsto: "\u27FC",
  178536. longrightarrow: "\u27F6",
  178537. looparrowleft: "\u21AB",
  178538. looparrowright: "\u21AC",
  178539. lopar: "\u2985",
  178540. lopf: "\u{1D55D}",
  178541. loplus: "\u2A2D",
  178542. lotimes: "\u2A34",
  178543. lowast: "\u2217",
  178544. lowbar: "_",
  178545. loz: "\u25CA",
  178546. lozenge: "\u25CA",
  178547. lozf: "\u29EB",
  178548. lpar: "(",
  178549. lparlt: "\u2993",
  178550. lrarr: "\u21C6",
  178551. lrcorner: "\u231F",
  178552. lrhar: "\u21CB",
  178553. lrhard: "\u296D",
  178554. lrm: "\u200E",
  178555. lrtri: "\u22BF",
  178556. lsaquo: "\u2039",
  178557. lscr: "\u{1D4C1}",
  178558. lsh: "\u21B0",
  178559. lsim: "\u2272",
  178560. lsime: "\u2A8D",
  178561. lsimg: "\u2A8F",
  178562. lsqb: "[",
  178563. lsquo: "\u2018",
  178564. lsquor: "\u201A",
  178565. lstrok: "\u0142",
  178566. l: "<",
  178567. lt: "<",
  178568. ltcc: "\u2AA6",
  178569. ltcir: "\u2A79",
  178570. ltdot: "\u22D6",
  178571. lthree: "\u22CB",
  178572. ltimes: "\u22C9",
  178573. ltlarr: "\u2976",
  178574. ltquest: "\u2A7B",
  178575. ltrPar: "\u2996",
  178576. ltri: "\u25C3",
  178577. ltrie: "\u22B4",
  178578. ltrif: "\u25C2",
  178579. lurdshar: "\u294A",
  178580. luruhar: "\u2966",
  178581. lvertneqq: "\u2268\uFE00",
  178582. lvnE: "\u2268\uFE00",
  178583. mDDot: "\u223A",
  178584. mac: "\xAF",
  178585. macr: "\xAF",
  178586. male: "\u2642",
  178587. malt: "\u2720",
  178588. maltese: "\u2720",
  178589. map: "\u21A6",
  178590. mapsto: "\u21A6",
  178591. mapstodown: "\u21A7",
  178592. mapstoleft: "\u21A4",
  178593. mapstoup: "\u21A5",
  178594. marker: "\u25AE",
  178595. mcomma: "\u2A29",
  178596. mcy: "\u043C",
  178597. mdash: "\u2014",
  178598. measuredangle: "\u2221",
  178599. mfr: "\u{1D52A}",
  178600. mho: "\u2127",
  178601. micr: "\xB5",
  178602. micro: "\xB5",
  178603. mid: "\u2223",
  178604. midast: "*",
  178605. midcir: "\u2AF0",
  178606. middo: "\xB7",
  178607. middot: "\xB7",
  178608. minus: "\u2212",
  178609. minusb: "\u229F",
  178610. minusd: "\u2238",
  178611. minusdu: "\u2A2A",
  178612. mlcp: "\u2ADB",
  178613. mldr: "\u2026",
  178614. mnplus: "\u2213",
  178615. models: "\u22A7",
  178616. mopf: "\u{1D55E}",
  178617. mp: "\u2213",
  178618. mscr: "\u{1D4C2}",
  178619. mstpos: "\u223E",
  178620. mu: "\u03BC",
  178621. multimap: "\u22B8",
  178622. mumap: "\u22B8",
  178623. nGg: "\u22D9\u0338",
  178624. nGt: "\u226B\u20D2",
  178625. nGtv: "\u226B\u0338",
  178626. nLeftarrow: "\u21CD",
  178627. nLeftrightarrow: "\u21CE",
  178628. nLl: "\u22D8\u0338",
  178629. nLt: "\u226A\u20D2",
  178630. nLtv: "\u226A\u0338",
  178631. nRightarrow: "\u21CF",
  178632. nVDash: "\u22AF",
  178633. nVdash: "\u22AE",
  178634. nabla: "\u2207",
  178635. nacute: "\u0144",
  178636. nang: "\u2220\u20D2",
  178637. nap: "\u2249",
  178638. napE: "\u2A70\u0338",
  178639. napid: "\u224B\u0338",
  178640. napos: "\u0149",
  178641. napprox: "\u2249",
  178642. natur: "\u266E",
  178643. natural: "\u266E",
  178644. naturals: "\u2115",
  178645. nbs: "\xA0",
  178646. nbsp: "\xA0",
  178647. nbump: "\u224E\u0338",
  178648. nbumpe: "\u224F\u0338",
  178649. ncap: "\u2A43",
  178650. ncaron: "\u0148",
  178651. ncedil: "\u0146",
  178652. ncong: "\u2247",
  178653. ncongdot: "\u2A6D\u0338",
  178654. ncup: "\u2A42",
  178655. ncy: "\u043D",
  178656. ndash: "\u2013",
  178657. ne: "\u2260",
  178658. neArr: "\u21D7",
  178659. nearhk: "\u2924",
  178660. nearr: "\u2197",
  178661. nearrow: "\u2197",
  178662. nedot: "\u2250\u0338",
  178663. nequiv: "\u2262",
  178664. nesear: "\u2928",
  178665. nesim: "\u2242\u0338",
  178666. nexist: "\u2204",
  178667. nexists: "\u2204",
  178668. nfr: "\u{1D52B}",
  178669. ngE: "\u2267\u0338",
  178670. nge: "\u2271",
  178671. ngeq: "\u2271",
  178672. ngeqq: "\u2267\u0338",
  178673. ngeqslant: "\u2A7E\u0338",
  178674. nges: "\u2A7E\u0338",
  178675. ngsim: "\u2275",
  178676. ngt: "\u226F",
  178677. ngtr: "\u226F",
  178678. nhArr: "\u21CE",
  178679. nharr: "\u21AE",
  178680. nhpar: "\u2AF2",
  178681. ni: "\u220B",
  178682. nis: "\u22FC",
  178683. nisd: "\u22FA",
  178684. niv: "\u220B",
  178685. njcy: "\u045A",
  178686. nlArr: "\u21CD",
  178687. nlE: "\u2266\u0338",
  178688. nlarr: "\u219A",
  178689. nldr: "\u2025",
  178690. nle: "\u2270",
  178691. nleftarrow: "\u219A",
  178692. nleftrightarrow: "\u21AE",
  178693. nleq: "\u2270",
  178694. nleqq: "\u2266\u0338",
  178695. nleqslant: "\u2A7D\u0338",
  178696. nles: "\u2A7D\u0338",
  178697. nless: "\u226E",
  178698. nlsim: "\u2274",
  178699. nlt: "\u226E",
  178700. nltri: "\u22EA",
  178701. nltrie: "\u22EC",
  178702. nmid: "\u2224",
  178703. nopf: "\u{1D55F}",
  178704. no: "\xAC",
  178705. not: "\xAC",
  178706. notin: "\u2209",
  178707. notinE: "\u22F9\u0338",
  178708. notindot: "\u22F5\u0338",
  178709. notinva: "\u2209",
  178710. notinvb: "\u22F7",
  178711. notinvc: "\u22F6",
  178712. notni: "\u220C",
  178713. notniva: "\u220C",
  178714. notnivb: "\u22FE",
  178715. notnivc: "\u22FD",
  178716. npar: "\u2226",
  178717. nparallel: "\u2226",
  178718. nparsl: "\u2AFD\u20E5",
  178719. npart: "\u2202\u0338",
  178720. npolint: "\u2A14",
  178721. npr: "\u2280",
  178722. nprcue: "\u22E0",
  178723. npre: "\u2AAF\u0338",
  178724. nprec: "\u2280",
  178725. npreceq: "\u2AAF\u0338",
  178726. nrArr: "\u21CF",
  178727. nrarr: "\u219B",
  178728. nrarrc: "\u2933\u0338",
  178729. nrarrw: "\u219D\u0338",
  178730. nrightarrow: "\u219B",
  178731. nrtri: "\u22EB",
  178732. nrtrie: "\u22ED",
  178733. nsc: "\u2281",
  178734. nsccue: "\u22E1",
  178735. nsce: "\u2AB0\u0338",
  178736. nscr: "\u{1D4C3}",
  178737. nshortmid: "\u2224",
  178738. nshortparallel: "\u2226",
  178739. nsim: "\u2241",
  178740. nsime: "\u2244",
  178741. nsimeq: "\u2244",
  178742. nsmid: "\u2224",
  178743. nspar: "\u2226",
  178744. nsqsube: "\u22E2",
  178745. nsqsupe: "\u22E3",
  178746. nsub: "\u2284",
  178747. nsubE: "\u2AC5\u0338",
  178748. nsube: "\u2288",
  178749. nsubset: "\u2282\u20D2",
  178750. nsubseteq: "\u2288",
  178751. nsubseteqq: "\u2AC5\u0338",
  178752. nsucc: "\u2281",
  178753. nsucceq: "\u2AB0\u0338",
  178754. nsup: "\u2285",
  178755. nsupE: "\u2AC6\u0338",
  178756. nsupe: "\u2289",
  178757. nsupset: "\u2283\u20D2",
  178758. nsupseteq: "\u2289",
  178759. nsupseteqq: "\u2AC6\u0338",
  178760. ntgl: "\u2279",
  178761. ntild: "\xF1",
  178762. ntilde: "\xF1",
  178763. ntlg: "\u2278",
  178764. ntriangleleft: "\u22EA",
  178765. ntrianglelefteq: "\u22EC",
  178766. ntriangleright: "\u22EB",
  178767. ntrianglerighteq: "\u22ED",
  178768. nu: "\u03BD",
  178769. num: "#",
  178770. numero: "\u2116",
  178771. numsp: "\u2007",
  178772. nvDash: "\u22AD",
  178773. nvHarr: "\u2904",
  178774. nvap: "\u224D\u20D2",
  178775. nvdash: "\u22AC",
  178776. nvge: "\u2265\u20D2",
  178777. nvgt: ">\u20D2",
  178778. nvinfin: "\u29DE",
  178779. nvlArr: "\u2902",
  178780. nvle: "\u2264\u20D2",
  178781. nvlt: "<\u20D2",
  178782. nvltrie: "\u22B4\u20D2",
  178783. nvrArr: "\u2903",
  178784. nvrtrie: "\u22B5\u20D2",
  178785. nvsim: "\u223C\u20D2",
  178786. nwArr: "\u21D6",
  178787. nwarhk: "\u2923",
  178788. nwarr: "\u2196",
  178789. nwarrow: "\u2196",
  178790. nwnear: "\u2927",
  178791. oS: "\u24C8",
  178792. oacut: "\xF3",
  178793. oacute: "\xF3",
  178794. oast: "\u229B",
  178795. ocir: "\xF4",
  178796. ocirc: "\xF4",
  178797. ocy: "\u043E",
  178798. odash: "\u229D",
  178799. odblac: "\u0151",
  178800. odiv: "\u2A38",
  178801. odot: "\u2299",
  178802. odsold: "\u29BC",
  178803. oelig: "\u0153",
  178804. ofcir: "\u29BF",
  178805. ofr: "\u{1D52C}",
  178806. ogon: "\u02DB",
  178807. ograv: "\xF2",
  178808. ograve: "\xF2",
  178809. ogt: "\u29C1",
  178810. ohbar: "\u29B5",
  178811. ohm: "\u03A9",
  178812. oint: "\u222E",
  178813. olarr: "\u21BA",
  178814. olcir: "\u29BE",
  178815. olcross: "\u29BB",
  178816. oline: "\u203E",
  178817. olt: "\u29C0",
  178818. omacr: "\u014D",
  178819. omega: "\u03C9",
  178820. omicron: "\u03BF",
  178821. omid: "\u29B6",
  178822. ominus: "\u2296",
  178823. oopf: "\u{1D560}",
  178824. opar: "\u29B7",
  178825. operp: "\u29B9",
  178826. oplus: "\u2295",
  178827. or: "\u2228",
  178828. orarr: "\u21BB",
  178829. ord: "\xBA",
  178830. order: "\u2134",
  178831. orderof: "\u2134",
  178832. ordf: "\xAA",
  178833. ordm: "\xBA",
  178834. origof: "\u22B6",
  178835. oror: "\u2A56",
  178836. orslope: "\u2A57",
  178837. orv: "\u2A5B",
  178838. oscr: "\u2134",
  178839. oslas: "\xF8",
  178840. oslash: "\xF8",
  178841. osol: "\u2298",
  178842. otild: "\xF5",
  178843. otilde: "\xF5",
  178844. otimes: "\u2297",
  178845. otimesas: "\u2A36",
  178846. oum: "\xF6",
  178847. ouml: "\xF6",
  178848. ovbar: "\u233D",
  178849. par: "\xB6",
  178850. para: "\xB6",
  178851. parallel: "\u2225",
  178852. parsim: "\u2AF3",
  178853. parsl: "\u2AFD",
  178854. part: "\u2202",
  178855. pcy: "\u043F",
  178856. percnt: "%",
  178857. period: ".",
  178858. permil: "\u2030",
  178859. perp: "\u22A5",
  178860. pertenk: "\u2031",
  178861. pfr: "\u{1D52D}",
  178862. phi: "\u03C6",
  178863. phiv: "\u03D5",
  178864. phmmat: "\u2133",
  178865. phone: "\u260E",
  178866. pi: "\u03C0",
  178867. pitchfork: "\u22D4",
  178868. piv: "\u03D6",
  178869. planck: "\u210F",
  178870. planckh: "\u210E",
  178871. plankv: "\u210F",
  178872. plus: "+",
  178873. plusacir: "\u2A23",
  178874. plusb: "\u229E",
  178875. pluscir: "\u2A22",
  178876. plusdo: "\u2214",
  178877. plusdu: "\u2A25",
  178878. pluse: "\u2A72",
  178879. plusm: "\xB1",
  178880. plusmn: "\xB1",
  178881. plussim: "\u2A26",
  178882. plustwo: "\u2A27",
  178883. pm: "\xB1",
  178884. pointint: "\u2A15",
  178885. popf: "\u{1D561}",
  178886. poun: "\xA3",
  178887. pound: "\xA3",
  178888. pr: "\u227A",
  178889. prE: "\u2AB3",
  178890. prap: "\u2AB7",
  178891. prcue: "\u227C",
  178892. pre: "\u2AAF",
  178893. prec: "\u227A",
  178894. precapprox: "\u2AB7",
  178895. preccurlyeq: "\u227C",
  178896. preceq: "\u2AAF",
  178897. precnapprox: "\u2AB9",
  178898. precneqq: "\u2AB5",
  178899. precnsim: "\u22E8",
  178900. precsim: "\u227E",
  178901. prime: "\u2032",
  178902. primes: "\u2119",
  178903. prnE: "\u2AB5",
  178904. prnap: "\u2AB9",
  178905. prnsim: "\u22E8",
  178906. prod: "\u220F",
  178907. profalar: "\u232E",
  178908. profline: "\u2312",
  178909. profsurf: "\u2313",
  178910. prop: "\u221D",
  178911. propto: "\u221D",
  178912. prsim: "\u227E",
  178913. prurel: "\u22B0",
  178914. pscr: "\u{1D4C5}",
  178915. psi: "\u03C8",
  178916. puncsp: "\u2008",
  178917. qfr: "\u{1D52E}",
  178918. qint: "\u2A0C",
  178919. qopf: "\u{1D562}",
  178920. qprime: "\u2057",
  178921. qscr: "\u{1D4C6}",
  178922. quaternions: "\u210D",
  178923. quatint: "\u2A16",
  178924. quest: "?",
  178925. questeq: "\u225F",
  178926. quo: '"',
  178927. quot: '"',
  178928. rAarr: "\u21DB",
  178929. rArr: "\u21D2",
  178930. rAtail: "\u291C",
  178931. rBarr: "\u290F",
  178932. rHar: "\u2964",
  178933. race: "\u223D\u0331",
  178934. racute: "\u0155",
  178935. radic: "\u221A",
  178936. raemptyv: "\u29B3",
  178937. rang: "\u27E9",
  178938. rangd: "\u2992",
  178939. range: "\u29A5",
  178940. rangle: "\u27E9",
  178941. raqu: "\xBB",
  178942. raquo: "\xBB",
  178943. rarr: "\u2192",
  178944. rarrap: "\u2975",
  178945. rarrb: "\u21E5",
  178946. rarrbfs: "\u2920",
  178947. rarrc: "\u2933",
  178948. rarrfs: "\u291E",
  178949. rarrhk: "\u21AA",
  178950. rarrlp: "\u21AC",
  178951. rarrpl: "\u2945",
  178952. rarrsim: "\u2974",
  178953. rarrtl: "\u21A3",
  178954. rarrw: "\u219D",
  178955. ratail: "\u291A",
  178956. ratio: "\u2236",
  178957. rationals: "\u211A",
  178958. rbarr: "\u290D",
  178959. rbbrk: "\u2773",
  178960. rbrace: "}",
  178961. rbrack: "]",
  178962. rbrke: "\u298C",
  178963. rbrksld: "\u298E",
  178964. rbrkslu: "\u2990",
  178965. rcaron: "\u0159",
  178966. rcedil: "\u0157",
  178967. rceil: "\u2309",
  178968. rcub: "}",
  178969. rcy: "\u0440",
  178970. rdca: "\u2937",
  178971. rdldhar: "\u2969",
  178972. rdquo: "\u201D",
  178973. rdquor: "\u201D",
  178974. rdsh: "\u21B3",
  178975. real: "\u211C",
  178976. realine: "\u211B",
  178977. realpart: "\u211C",
  178978. reals: "\u211D",
  178979. rect: "\u25AD",
  178980. re: "\xAE",
  178981. reg: "\xAE",
  178982. rfisht: "\u297D",
  178983. rfloor: "\u230B",
  178984. rfr: "\u{1D52F}",
  178985. rhard: "\u21C1",
  178986. rharu: "\u21C0",
  178987. rharul: "\u296C",
  178988. rho: "\u03C1",
  178989. rhov: "\u03F1",
  178990. rightarrow: "\u2192",
  178991. rightarrowtail: "\u21A3",
  178992. rightharpoondown: "\u21C1",
  178993. rightharpoonup: "\u21C0",
  178994. rightleftarrows: "\u21C4",
  178995. rightleftharpoons: "\u21CC",
  178996. rightrightarrows: "\u21C9",
  178997. rightsquigarrow: "\u219D",
  178998. rightthreetimes: "\u22CC",
  178999. ring: "\u02DA",
  179000. risingdotseq: "\u2253",
  179001. rlarr: "\u21C4",
  179002. rlhar: "\u21CC",
  179003. rlm: "\u200F",
  179004. rmoust: "\u23B1",
  179005. rmoustache: "\u23B1",
  179006. rnmid: "\u2AEE",
  179007. roang: "\u27ED",
  179008. roarr: "\u21FE",
  179009. robrk: "\u27E7",
  179010. ropar: "\u2986",
  179011. ropf: "\u{1D563}",
  179012. roplus: "\u2A2E",
  179013. rotimes: "\u2A35",
  179014. rpar: ")",
  179015. rpargt: "\u2994",
  179016. rppolint: "\u2A12",
  179017. rrarr: "\u21C9",
  179018. rsaquo: "\u203A",
  179019. rscr: "\u{1D4C7}",
  179020. rsh: "\u21B1",
  179021. rsqb: "]",
  179022. rsquo: "\u2019",
  179023. rsquor: "\u2019",
  179024. rthree: "\u22CC",
  179025. rtimes: "\u22CA",
  179026. rtri: "\u25B9",
  179027. rtrie: "\u22B5",
  179028. rtrif: "\u25B8",
  179029. rtriltri: "\u29CE",
  179030. ruluhar: "\u2968",
  179031. rx: "\u211E",
  179032. sacute: "\u015B",
  179033. sbquo: "\u201A",
  179034. sc: "\u227B",
  179035. scE: "\u2AB4",
  179036. scap: "\u2AB8",
  179037. scaron: "\u0161",
  179038. sccue: "\u227D",
  179039. sce: "\u2AB0",
  179040. scedil: "\u015F",
  179041. scirc: "\u015D",
  179042. scnE: "\u2AB6",
  179043. scnap: "\u2ABA",
  179044. scnsim: "\u22E9",
  179045. scpolint: "\u2A13",
  179046. scsim: "\u227F",
  179047. scy: "\u0441",
  179048. sdot: "\u22C5",
  179049. sdotb: "\u22A1",
  179050. sdote: "\u2A66",
  179051. seArr: "\u21D8",
  179052. searhk: "\u2925",
  179053. searr: "\u2198",
  179054. searrow: "\u2198",
  179055. sec: "\xA7",
  179056. sect: "\xA7",
  179057. semi: ";",
  179058. seswar: "\u2929",
  179059. setminus: "\u2216",
  179060. setmn: "\u2216",
  179061. sext: "\u2736",
  179062. sfr: "\u{1D530}",
  179063. sfrown: "\u2322",
  179064. sharp: "\u266F",
  179065. shchcy: "\u0449",
  179066. shcy: "\u0448",
  179067. shortmid: "\u2223",
  179068. shortparallel: "\u2225",
  179069. sh: "\xAD",
  179070. shy: "\xAD",
  179071. sigma: "\u03C3",
  179072. sigmaf: "\u03C2",
  179073. sigmav: "\u03C2",
  179074. sim: "\u223C",
  179075. simdot: "\u2A6A",
  179076. sime: "\u2243",
  179077. simeq: "\u2243",
  179078. simg: "\u2A9E",
  179079. simgE: "\u2AA0",
  179080. siml: "\u2A9D",
  179081. simlE: "\u2A9F",
  179082. simne: "\u2246",
  179083. simplus: "\u2A24",
  179084. simrarr: "\u2972",
  179085. slarr: "\u2190",
  179086. smallsetminus: "\u2216",
  179087. smashp: "\u2A33",
  179088. smeparsl: "\u29E4",
  179089. smid: "\u2223",
  179090. smile: "\u2323",
  179091. smt: "\u2AAA",
  179092. smte: "\u2AAC",
  179093. smtes: "\u2AAC\uFE00",
  179094. softcy: "\u044C",
  179095. sol: "/",
  179096. solb: "\u29C4",
  179097. solbar: "\u233F",
  179098. sopf: "\u{1D564}",
  179099. spades: "\u2660",
  179100. spadesuit: "\u2660",
  179101. spar: "\u2225",
  179102. sqcap: "\u2293",
  179103. sqcaps: "\u2293\uFE00",
  179104. sqcup: "\u2294",
  179105. sqcups: "\u2294\uFE00",
  179106. sqsub: "\u228F",
  179107. sqsube: "\u2291",
  179108. sqsubset: "\u228F",
  179109. sqsubseteq: "\u2291",
  179110. sqsup: "\u2290",
  179111. sqsupe: "\u2292",
  179112. sqsupset: "\u2290",
  179113. sqsupseteq: "\u2292",
  179114. squ: "\u25A1",
  179115. square: "\u25A1",
  179116. squarf: "\u25AA",
  179117. squf: "\u25AA",
  179118. srarr: "\u2192",
  179119. sscr: "\u{1D4C8}",
  179120. ssetmn: "\u2216",
  179121. ssmile: "\u2323",
  179122. sstarf: "\u22C6",
  179123. star: "\u2606",
  179124. starf: "\u2605",
  179125. straightepsilon: "\u03F5",
  179126. straightphi: "\u03D5",
  179127. strns: "\xAF",
  179128. sub: "\u2282",
  179129. subE: "\u2AC5",
  179130. subdot: "\u2ABD",
  179131. sube: "\u2286",
  179132. subedot: "\u2AC3",
  179133. submult: "\u2AC1",
  179134. subnE: "\u2ACB",
  179135. subne: "\u228A",
  179136. subplus: "\u2ABF",
  179137. subrarr: "\u2979",
  179138. subset: "\u2282",
  179139. subseteq: "\u2286",
  179140. subseteqq: "\u2AC5",
  179141. subsetneq: "\u228A",
  179142. subsetneqq: "\u2ACB",
  179143. subsim: "\u2AC7",
  179144. subsub: "\u2AD5",
  179145. subsup: "\u2AD3",
  179146. succ: "\u227B",
  179147. succapprox: "\u2AB8",
  179148. succcurlyeq: "\u227D",
  179149. succeq: "\u2AB0",
  179150. succnapprox: "\u2ABA",
  179151. succneqq: "\u2AB6",
  179152. succnsim: "\u22E9",
  179153. succsim: "\u227F",
  179154. sum: "\u2211",
  179155. sung: "\u266A",
  179156. sup: "\u2283",
  179157. sup1: "\xB9",
  179158. sup2: "\xB2",
  179159. sup3: "\xB3",
  179160. supE: "\u2AC6",
  179161. supdot: "\u2ABE",
  179162. supdsub: "\u2AD8",
  179163. supe: "\u2287",
  179164. supedot: "\u2AC4",
  179165. suphsol: "\u27C9",
  179166. suphsub: "\u2AD7",
  179167. suplarr: "\u297B",
  179168. supmult: "\u2AC2",
  179169. supnE: "\u2ACC",
  179170. supne: "\u228B",
  179171. supplus: "\u2AC0",
  179172. supset: "\u2283",
  179173. supseteq: "\u2287",
  179174. supseteqq: "\u2AC6",
  179175. supsetneq: "\u228B",
  179176. supsetneqq: "\u2ACC",
  179177. supsim: "\u2AC8",
  179178. supsub: "\u2AD4",
  179179. supsup: "\u2AD6",
  179180. swArr: "\u21D9",
  179181. swarhk: "\u2926",
  179182. swarr: "\u2199",
  179183. swarrow: "\u2199",
  179184. swnwar: "\u292A",
  179185. szli: "\xDF",
  179186. szlig: "\xDF",
  179187. target: "\u2316",
  179188. tau: "\u03C4",
  179189. tbrk: "\u23B4",
  179190. tcaron: "\u0165",
  179191. tcedil: "\u0163",
  179192. tcy: "\u0442",
  179193. tdot: "\u20DB",
  179194. telrec: "\u2315",
  179195. tfr: "\u{1D531}",
  179196. there4: "\u2234",
  179197. therefore: "\u2234",
  179198. theta: "\u03B8",
  179199. thetasym: "\u03D1",
  179200. thetav: "\u03D1",
  179201. thickapprox: "\u2248",
  179202. thicksim: "\u223C",
  179203. thinsp: "\u2009",
  179204. thkap: "\u2248",
  179205. thksim: "\u223C",
  179206. thor: "\xFE",
  179207. thorn: "\xFE",
  179208. tilde: "\u02DC",
  179209. time: "\xD7",
  179210. times: "\xD7",
  179211. timesb: "\u22A0",
  179212. timesbar: "\u2A31",
  179213. timesd: "\u2A30",
  179214. tint: "\u222D",
  179215. toea: "\u2928",
  179216. top: "\u22A4",
  179217. topbot: "\u2336",
  179218. topcir: "\u2AF1",
  179219. topf: "\u{1D565}",
  179220. topfork: "\u2ADA",
  179221. tosa: "\u2929",
  179222. tprime: "\u2034",
  179223. trade: "\u2122",
  179224. triangle: "\u25B5",
  179225. triangledown: "\u25BF",
  179226. triangleleft: "\u25C3",
  179227. trianglelefteq: "\u22B4",
  179228. triangleq: "\u225C",
  179229. triangleright: "\u25B9",
  179230. trianglerighteq: "\u22B5",
  179231. tridot: "\u25EC",
  179232. trie: "\u225C",
  179233. triminus: "\u2A3A",
  179234. triplus: "\u2A39",
  179235. trisb: "\u29CD",
  179236. tritime: "\u2A3B",
  179237. trpezium: "\u23E2",
  179238. tscr: "\u{1D4C9}",
  179239. tscy: "\u0446",
  179240. tshcy: "\u045B",
  179241. tstrok: "\u0167",
  179242. twixt: "\u226C",
  179243. twoheadleftarrow: "\u219E",
  179244. twoheadrightarrow: "\u21A0",
  179245. uArr: "\u21D1",
  179246. uHar: "\u2963",
  179247. uacut: "\xFA",
  179248. uacute: "\xFA",
  179249. uarr: "\u2191",
  179250. ubrcy: "\u045E",
  179251. ubreve: "\u016D",
  179252. ucir: "\xFB",
  179253. ucirc: "\xFB",
  179254. ucy: "\u0443",
  179255. udarr: "\u21C5",
  179256. udblac: "\u0171",
  179257. udhar: "\u296E",
  179258. ufisht: "\u297E",
  179259. ufr: "\u{1D532}",
  179260. ugrav: "\xF9",
  179261. ugrave: "\xF9",
  179262. uharl: "\u21BF",
  179263. uharr: "\u21BE",
  179264. uhblk: "\u2580",
  179265. ulcorn: "\u231C",
  179266. ulcorner: "\u231C",
  179267. ulcrop: "\u230F",
  179268. ultri: "\u25F8",
  179269. umacr: "\u016B",
  179270. um: "\xA8",
  179271. uml: "\xA8",
  179272. uogon: "\u0173",
  179273. uopf: "\u{1D566}",
  179274. uparrow: "\u2191",
  179275. updownarrow: "\u2195",
  179276. upharpoonleft: "\u21BF",
  179277. upharpoonright: "\u21BE",
  179278. uplus: "\u228E",
  179279. upsi: "\u03C5",
  179280. upsih: "\u03D2",
  179281. upsilon: "\u03C5",
  179282. upuparrows: "\u21C8",
  179283. urcorn: "\u231D",
  179284. urcorner: "\u231D",
  179285. urcrop: "\u230E",
  179286. uring: "\u016F",
  179287. urtri: "\u25F9",
  179288. uscr: "\u{1D4CA}",
  179289. utdot: "\u22F0",
  179290. utilde: "\u0169",
  179291. utri: "\u25B5",
  179292. utrif: "\u25B4",
  179293. uuarr: "\u21C8",
  179294. uum: "\xFC",
  179295. uuml: "\xFC",
  179296. uwangle: "\u29A7",
  179297. vArr: "\u21D5",
  179298. vBar: "\u2AE8",
  179299. vBarv: "\u2AE9",
  179300. vDash: "\u22A8",
  179301. vangrt: "\u299C",
  179302. varepsilon: "\u03F5",
  179303. varkappa: "\u03F0",
  179304. varnothing: "\u2205",
  179305. varphi: "\u03D5",
  179306. varpi: "\u03D6",
  179307. varpropto: "\u221D",
  179308. varr: "\u2195",
  179309. varrho: "\u03F1",
  179310. varsigma: "\u03C2",
  179311. varsubsetneq: "\u228A\uFE00",
  179312. varsubsetneqq: "\u2ACB\uFE00",
  179313. varsupsetneq: "\u228B\uFE00",
  179314. varsupsetneqq: "\u2ACC\uFE00",
  179315. vartheta: "\u03D1",
  179316. vartriangleleft: "\u22B2",
  179317. vartriangleright: "\u22B3",
  179318. vcy: "\u0432",
  179319. vdash: "\u22A2",
  179320. vee: "\u2228",
  179321. veebar: "\u22BB",
  179322. veeeq: "\u225A",
  179323. vellip: "\u22EE",
  179324. verbar: "|",
  179325. vert: "|",
  179326. vfr: "\u{1D533}",
  179327. vltri: "\u22B2",
  179328. vnsub: "\u2282\u20D2",
  179329. vnsup: "\u2283\u20D2",
  179330. vopf: "\u{1D567}",
  179331. vprop: "\u221D",
  179332. vrtri: "\u22B3",
  179333. vscr: "\u{1D4CB}",
  179334. vsubnE: "\u2ACB\uFE00",
  179335. vsubne: "\u228A\uFE00",
  179336. vsupnE: "\u2ACC\uFE00",
  179337. vsupne: "\u228B\uFE00",
  179338. vzigzag: "\u299A",
  179339. wcirc: "\u0175",
  179340. wedbar: "\u2A5F",
  179341. wedge: "\u2227",
  179342. wedgeq: "\u2259",
  179343. weierp: "\u2118",
  179344. wfr: "\u{1D534}",
  179345. wopf: "\u{1D568}",
  179346. wp: "\u2118",
  179347. wr: "\u2240",
  179348. wreath: "\u2240",
  179349. wscr: "\u{1D4CC}",
  179350. xcap: "\u22C2",
  179351. xcirc: "\u25EF",
  179352. xcup: "\u22C3",
  179353. xdtri: "\u25BD",
  179354. xfr: "\u{1D535}",
  179355. xhArr: "\u27FA",
  179356. xharr: "\u27F7",
  179357. xi: "\u03BE",
  179358. xlArr: "\u27F8",
  179359. xlarr: "\u27F5",
  179360. xmap: "\u27FC",
  179361. xnis: "\u22FB",
  179362. xodot: "\u2A00",
  179363. xopf: "\u{1D569}",
  179364. xoplus: "\u2A01",
  179365. xotime: "\u2A02",
  179366. xrArr: "\u27F9",
  179367. xrarr: "\u27F6",
  179368. xscr: "\u{1D4CD}",
  179369. xsqcup: "\u2A06",
  179370. xuplus: "\u2A04",
  179371. xutri: "\u25B3",
  179372. xvee: "\u22C1",
  179373. xwedge: "\u22C0",
  179374. yacut: "\xFD",
  179375. yacute: "\xFD",
  179376. yacy: "\u044F",
  179377. ycirc: "\u0177",
  179378. ycy: "\u044B",
  179379. ye: "\xA5",
  179380. yen: "\xA5",
  179381. yfr: "\u{1D536}",
  179382. yicy: "\u0457",
  179383. yopf: "\u{1D56A}",
  179384. yscr: "\u{1D4CE}",
  179385. yucy: "\u044E",
  179386. yum: "\xFF",
  179387. yuml: "\xFF",
  179388. zacute: "\u017A",
  179389. zcaron: "\u017E",
  179390. zcy: "\u0437",
  179391. zdot: "\u017C",
  179392. zeetrf: "\u2128",
  179393. zeta: "\u03B6",
  179394. zfr: "\u{1D537}",
  179395. zhcy: "\u0436",
  179396. zigrarr: "\u21DD",
  179397. zopf: "\u{1D56B}",
  179398. zscr: "\u{1D4CF}",
  179399. zwj: "\u200D",
  179400. zwnj: "\u200C"
  179401. };
  179402. // node_modules/decode-named-character-reference/index.js
  179403. var own5 = {}.hasOwnProperty;
  179404. function decodeNamedCharacterReference(value) {
  179405. return own5.call(characterEntities, value) ? characterEntities[value] : false;
  179406. }
  179407. // node_modules/micromark-core-commonmark/lib/character-reference.js
  179408. var characterReference = {
  179409. name: "characterReference",
  179410. tokenize: tokenizeCharacterReference
  179411. };
  179412. function tokenizeCharacterReference(effects, ok2, nok) {
  179413. const self2 = this;
  179414. let size = 0;
  179415. let max;
  179416. let test;
  179417. return start3;
  179418. function start3(code2) {
  179419. effects.enter("characterReference");
  179420. effects.enter("characterReferenceMarker");
  179421. effects.consume(code2);
  179422. effects.exit("characterReferenceMarker");
  179423. return open;
  179424. }
  179425. function open(code2) {
  179426. if (code2 === 35) {
  179427. effects.enter("characterReferenceMarkerNumeric");
  179428. effects.consume(code2);
  179429. effects.exit("characterReferenceMarkerNumeric");
  179430. return numeric;
  179431. }
  179432. effects.enter("characterReferenceValue");
  179433. max = 31;
  179434. test = asciiAlphanumeric;
  179435. return value(code2);
  179436. }
  179437. function numeric(code2) {
  179438. if (code2 === 88 || code2 === 120) {
  179439. effects.enter("characterReferenceMarkerHexadecimal");
  179440. effects.consume(code2);
  179441. effects.exit("characterReferenceMarkerHexadecimal");
  179442. effects.enter("characterReferenceValue");
  179443. max = 6;
  179444. test = asciiHexDigit;
  179445. return value;
  179446. }
  179447. effects.enter("characterReferenceValue");
  179448. max = 7;
  179449. test = asciiDigit;
  179450. return value(code2);
  179451. }
  179452. function value(code2) {
  179453. let token;
  179454. if (code2 === 59 && size) {
  179455. token = effects.exit("characterReferenceValue");
  179456. if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self2.sliceSerialize(token))) {
  179457. return nok(code2);
  179458. }
  179459. effects.enter("characterReferenceMarker");
  179460. effects.consume(code2);
  179461. effects.exit("characterReferenceMarker");
  179462. effects.exit("characterReference");
  179463. return ok2;
  179464. }
  179465. if (test(code2) && size++ < max) {
  179466. effects.consume(code2);
  179467. return value;
  179468. }
  179469. return nok(code2);
  179470. }
  179471. }
  179472. // node_modules/micromark-core-commonmark/lib/code-fenced.js
  179473. var codeFenced = {
  179474. name: "codeFenced",
  179475. tokenize: tokenizeCodeFenced,
  179476. concrete: true
  179477. };
  179478. function tokenizeCodeFenced(effects, ok2, nok) {
  179479. const self2 = this;
  179480. const closingFenceConstruct = {
  179481. tokenize: tokenizeClosingFence,
  179482. partial: true
  179483. };
  179484. const nonLazyLine = {
  179485. tokenize: tokenizeNonLazyLine,
  179486. partial: true
  179487. };
  179488. const tail = this.events[this.events.length - 1];
  179489. const initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  179490. let sizeOpen = 0;
  179491. let marker;
  179492. return start3;
  179493. function start3(code2) {
  179494. effects.enter("codeFenced");
  179495. effects.enter("codeFencedFence");
  179496. effects.enter("codeFencedFenceSequence");
  179497. marker = code2;
  179498. return sequenceOpen(code2);
  179499. }
  179500. function sequenceOpen(code2) {
  179501. if (code2 === marker) {
  179502. effects.consume(code2);
  179503. sizeOpen++;
  179504. return sequenceOpen;
  179505. }
  179506. effects.exit("codeFencedFenceSequence");
  179507. return sizeOpen < 3 ? nok(code2) : factorySpace(effects, infoOpen, "whitespace")(code2);
  179508. }
  179509. function infoOpen(code2) {
  179510. if (code2 === null || markdownLineEnding(code2)) {
  179511. return openAfter(code2);
  179512. }
  179513. effects.enter("codeFencedFenceInfo");
  179514. effects.enter("chunkString", {
  179515. contentType: "string"
  179516. });
  179517. return info(code2);
  179518. }
  179519. function info(code2) {
  179520. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  179521. effects.exit("chunkString");
  179522. effects.exit("codeFencedFenceInfo");
  179523. return factorySpace(effects, infoAfter, "whitespace")(code2);
  179524. }
  179525. if (code2 === 96 && code2 === marker)
  179526. return nok(code2);
  179527. effects.consume(code2);
  179528. return info;
  179529. }
  179530. function infoAfter(code2) {
  179531. if (code2 === null || markdownLineEnding(code2)) {
  179532. return openAfter(code2);
  179533. }
  179534. effects.enter("codeFencedFenceMeta");
  179535. effects.enter("chunkString", {
  179536. contentType: "string"
  179537. });
  179538. return meta(code2);
  179539. }
  179540. function meta(code2) {
  179541. if (code2 === null || markdownLineEnding(code2)) {
  179542. effects.exit("chunkString");
  179543. effects.exit("codeFencedFenceMeta");
  179544. return openAfter(code2);
  179545. }
  179546. if (code2 === 96 && code2 === marker)
  179547. return nok(code2);
  179548. effects.consume(code2);
  179549. return meta;
  179550. }
  179551. function openAfter(code2) {
  179552. effects.exit("codeFencedFence");
  179553. return self2.interrupt ? ok2(code2) : contentStart(code2);
  179554. }
  179555. function contentStart(code2) {
  179556. if (code2 === null) {
  179557. return after(code2);
  179558. }
  179559. if (markdownLineEnding(code2)) {
  179560. return effects.attempt(
  179561. nonLazyLine,
  179562. effects.attempt(
  179563. closingFenceConstruct,
  179564. after,
  179565. initialPrefix ? factorySpace(
  179566. effects,
  179567. contentStart,
  179568. "linePrefix",
  179569. initialPrefix + 1
  179570. ) : contentStart
  179571. ),
  179572. after
  179573. )(code2);
  179574. }
  179575. effects.enter("codeFlowValue");
  179576. return contentContinue(code2);
  179577. }
  179578. function contentContinue(code2) {
  179579. if (code2 === null || markdownLineEnding(code2)) {
  179580. effects.exit("codeFlowValue");
  179581. return contentStart(code2);
  179582. }
  179583. effects.consume(code2);
  179584. return contentContinue;
  179585. }
  179586. function after(code2) {
  179587. effects.exit("codeFenced");
  179588. return ok2(code2);
  179589. }
  179590. function tokenizeNonLazyLine(effects2, ok3, nok2) {
  179591. const self3 = this;
  179592. return start4;
  179593. function start4(code2) {
  179594. effects2.enter("lineEnding");
  179595. effects2.consume(code2);
  179596. effects2.exit("lineEnding");
  179597. return lineStart;
  179598. }
  179599. function lineStart(code2) {
  179600. return self3.parser.lazy[self3.now().line] ? nok2(code2) : ok3(code2);
  179601. }
  179602. }
  179603. function tokenizeClosingFence(effects2, ok3, nok2) {
  179604. let size = 0;
  179605. return factorySpace(
  179606. effects2,
  179607. closingSequenceStart,
  179608. "linePrefix",
  179609. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  179610. );
  179611. function closingSequenceStart(code2) {
  179612. effects2.enter("codeFencedFence");
  179613. effects2.enter("codeFencedFenceSequence");
  179614. return closingSequence(code2);
  179615. }
  179616. function closingSequence(code2) {
  179617. if (code2 === marker) {
  179618. effects2.consume(code2);
  179619. size++;
  179620. return closingSequence;
  179621. }
  179622. if (size < sizeOpen)
  179623. return nok2(code2);
  179624. effects2.exit("codeFencedFenceSequence");
  179625. return factorySpace(effects2, closingSequenceEnd, "whitespace")(code2);
  179626. }
  179627. function closingSequenceEnd(code2) {
  179628. if (code2 === null || markdownLineEnding(code2)) {
  179629. effects2.exit("codeFencedFence");
  179630. return ok3(code2);
  179631. }
  179632. return nok2(code2);
  179633. }
  179634. }
  179635. }
  179636. // node_modules/micromark-core-commonmark/lib/code-indented.js
  179637. var codeIndented = {
  179638. name: "codeIndented",
  179639. tokenize: tokenizeCodeIndented
  179640. };
  179641. var indentedContent = {
  179642. tokenize: tokenizeIndentedContent,
  179643. partial: true
  179644. };
  179645. function tokenizeCodeIndented(effects, ok2, nok) {
  179646. const self2 = this;
  179647. return start3;
  179648. function start3(code2) {
  179649. effects.enter("codeIndented");
  179650. return factorySpace(effects, afterStartPrefix, "linePrefix", 4 + 1)(code2);
  179651. }
  179652. function afterStartPrefix(code2) {
  179653. const tail = self2.events[self2.events.length - 1];
  179654. return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? afterPrefix(code2) : nok(code2);
  179655. }
  179656. function afterPrefix(code2) {
  179657. if (code2 === null) {
  179658. return after(code2);
  179659. }
  179660. if (markdownLineEnding(code2)) {
  179661. return effects.attempt(indentedContent, afterPrefix, after)(code2);
  179662. }
  179663. effects.enter("codeFlowValue");
  179664. return content3(code2);
  179665. }
  179666. function content3(code2) {
  179667. if (code2 === null || markdownLineEnding(code2)) {
  179668. effects.exit("codeFlowValue");
  179669. return afterPrefix(code2);
  179670. }
  179671. effects.consume(code2);
  179672. return content3;
  179673. }
  179674. function after(code2) {
  179675. effects.exit("codeIndented");
  179676. return ok2(code2);
  179677. }
  179678. }
  179679. function tokenizeIndentedContent(effects, ok2, nok) {
  179680. const self2 = this;
  179681. return start3;
  179682. function start3(code2) {
  179683. if (self2.parser.lazy[self2.now().line]) {
  179684. return nok(code2);
  179685. }
  179686. if (markdownLineEnding(code2)) {
  179687. effects.enter("lineEnding");
  179688. effects.consume(code2);
  179689. effects.exit("lineEnding");
  179690. return start3;
  179691. }
  179692. return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code2);
  179693. }
  179694. function afterPrefix(code2) {
  179695. const tail = self2.events[self2.events.length - 1];
  179696. return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok2(code2) : markdownLineEnding(code2) ? start3(code2) : nok(code2);
  179697. }
  179698. }
  179699. // node_modules/micromark-core-commonmark/lib/code-text.js
  179700. var codeText = {
  179701. name: "codeText",
  179702. tokenize: tokenizeCodeText,
  179703. resolve: resolveCodeText,
  179704. previous
  179705. };
  179706. function resolveCodeText(events) {
  179707. let tailExitIndex = events.length - 4;
  179708. let headEnterIndex = 3;
  179709. let index2;
  179710. let enter;
  179711. if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
  179712. index2 = headEnterIndex;
  179713. while (++index2 < tailExitIndex) {
  179714. if (events[index2][1].type === "codeTextData") {
  179715. events[headEnterIndex][1].type = "codeTextPadding";
  179716. events[tailExitIndex][1].type = "codeTextPadding";
  179717. headEnterIndex += 2;
  179718. tailExitIndex -= 2;
  179719. break;
  179720. }
  179721. }
  179722. }
  179723. index2 = headEnterIndex - 1;
  179724. tailExitIndex++;
  179725. while (++index2 <= tailExitIndex) {
  179726. if (enter === void 0) {
  179727. if (index2 !== tailExitIndex && events[index2][1].type !== "lineEnding") {
  179728. enter = index2;
  179729. }
  179730. } else if (index2 === tailExitIndex || events[index2][1].type === "lineEnding") {
  179731. events[enter][1].type = "codeTextData";
  179732. if (index2 !== enter + 2) {
  179733. events[enter][1].end = events[index2 - 1][1].end;
  179734. events.splice(enter + 2, index2 - enter - 2);
  179735. tailExitIndex -= index2 - enter - 2;
  179736. index2 = enter + 2;
  179737. }
  179738. enter = void 0;
  179739. }
  179740. }
  179741. return events;
  179742. }
  179743. function previous(code2) {
  179744. return code2 !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
  179745. }
  179746. function tokenizeCodeText(effects, ok2, nok) {
  179747. const self2 = this;
  179748. let sizeOpen = 0;
  179749. let size;
  179750. let token;
  179751. return start3;
  179752. function start3(code2) {
  179753. effects.enter("codeText");
  179754. effects.enter("codeTextSequence");
  179755. return openingSequence(code2);
  179756. }
  179757. function openingSequence(code2) {
  179758. if (code2 === 96) {
  179759. effects.consume(code2);
  179760. sizeOpen++;
  179761. return openingSequence;
  179762. }
  179763. effects.exit("codeTextSequence");
  179764. return gap(code2);
  179765. }
  179766. function gap(code2) {
  179767. if (code2 === null) {
  179768. return nok(code2);
  179769. }
  179770. if (code2 === 96) {
  179771. token = effects.enter("codeTextSequence");
  179772. size = 0;
  179773. return closingSequence(code2);
  179774. }
  179775. if (code2 === 32) {
  179776. effects.enter("space");
  179777. effects.consume(code2);
  179778. effects.exit("space");
  179779. return gap;
  179780. }
  179781. if (markdownLineEnding(code2)) {
  179782. effects.enter("lineEnding");
  179783. effects.consume(code2);
  179784. effects.exit("lineEnding");
  179785. return gap;
  179786. }
  179787. effects.enter("codeTextData");
  179788. return data2(code2);
  179789. }
  179790. function data2(code2) {
  179791. if (code2 === null || code2 === 32 || code2 === 96 || markdownLineEnding(code2)) {
  179792. effects.exit("codeTextData");
  179793. return gap(code2);
  179794. }
  179795. effects.consume(code2);
  179796. return data2;
  179797. }
  179798. function closingSequence(code2) {
  179799. if (code2 === 96) {
  179800. effects.consume(code2);
  179801. size++;
  179802. return closingSequence;
  179803. }
  179804. if (size === sizeOpen) {
  179805. effects.exit("codeTextSequence");
  179806. effects.exit("codeText");
  179807. return ok2(code2);
  179808. }
  179809. token.type = "codeTextData";
  179810. return data2(code2);
  179811. }
  179812. }
  179813. // node_modules/micromark-util-subtokenize/index.js
  179814. function subtokenize(events) {
  179815. const jumps = {};
  179816. let index2 = -1;
  179817. let event;
  179818. let lineIndex;
  179819. let otherIndex;
  179820. let otherEvent;
  179821. let parameters;
  179822. let subevents;
  179823. let more;
  179824. while (++index2 < events.length) {
  179825. while (index2 in jumps) {
  179826. index2 = jumps[index2];
  179827. }
  179828. event = events[index2];
  179829. if (index2 && event[1].type === "chunkFlow" && events[index2 - 1][1].type === "listItemPrefix") {
  179830. subevents = event[1]._tokenizer.events;
  179831. otherIndex = 0;
  179832. if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") {
  179833. otherIndex += 2;
  179834. }
  179835. if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") {
  179836. while (++otherIndex < subevents.length) {
  179837. if (subevents[otherIndex][1].type === "content") {
  179838. break;
  179839. }
  179840. if (subevents[otherIndex][1].type === "chunkText") {
  179841. subevents[otherIndex][1]._isInFirstContentOfListItem = true;
  179842. otherIndex++;
  179843. }
  179844. }
  179845. }
  179846. }
  179847. if (event[0] === "enter") {
  179848. if (event[1].contentType) {
  179849. Object.assign(jumps, subcontent(events, index2));
  179850. index2 = jumps[index2];
  179851. more = true;
  179852. }
  179853. } else if (event[1]._container) {
  179854. otherIndex = index2;
  179855. lineIndex = void 0;
  179856. while (otherIndex--) {
  179857. otherEvent = events[otherIndex];
  179858. if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") {
  179859. if (otherEvent[0] === "enter") {
  179860. if (lineIndex) {
  179861. events[lineIndex][1].type = "lineEndingBlank";
  179862. }
  179863. otherEvent[1].type = "lineEnding";
  179864. lineIndex = otherIndex;
  179865. }
  179866. } else {
  179867. break;
  179868. }
  179869. }
  179870. if (lineIndex) {
  179871. event[1].end = Object.assign({}, events[lineIndex][1].start);
  179872. parameters = events.slice(lineIndex, index2);
  179873. parameters.unshift(event);
  179874. splice(events, lineIndex, index2 - lineIndex + 1, parameters);
  179875. }
  179876. }
  179877. }
  179878. return !more;
  179879. }
  179880. function subcontent(events, eventIndex) {
  179881. const token = events[eventIndex][1];
  179882. const context = events[eventIndex][2];
  179883. let startPosition = eventIndex - 1;
  179884. const startPositions = [];
  179885. const tokenizer2 = token._tokenizer || context.parser[token.contentType](token.start);
  179886. const childEvents = tokenizer2.events;
  179887. const jumps = [];
  179888. const gaps = {};
  179889. let stream;
  179890. let previous2;
  179891. let index2 = -1;
  179892. let current2 = token;
  179893. let adjust = 0;
  179894. let start3 = 0;
  179895. const breaks = [start3];
  179896. while (current2) {
  179897. while (events[++startPosition][1] !== current2) {
  179898. }
  179899. startPositions.push(startPosition);
  179900. if (!current2._tokenizer) {
  179901. stream = context.sliceStream(current2);
  179902. if (!current2.next) {
  179903. stream.push(null);
  179904. }
  179905. if (previous2) {
  179906. tokenizer2.defineSkip(current2.start);
  179907. }
  179908. if (current2._isInFirstContentOfListItem) {
  179909. tokenizer2._gfmTasklistFirstContentOfListItem = true;
  179910. }
  179911. tokenizer2.write(stream);
  179912. if (current2._isInFirstContentOfListItem) {
  179913. tokenizer2._gfmTasklistFirstContentOfListItem = void 0;
  179914. }
  179915. }
  179916. previous2 = current2;
  179917. current2 = current2.next;
  179918. }
  179919. current2 = token;
  179920. while (++index2 < childEvents.length) {
  179921. if (childEvents[index2][0] === "exit" && childEvents[index2 - 1][0] === "enter" && childEvents[index2][1].type === childEvents[index2 - 1][1].type && childEvents[index2][1].start.line !== childEvents[index2][1].end.line) {
  179922. start3 = index2 + 1;
  179923. breaks.push(start3);
  179924. current2._tokenizer = void 0;
  179925. current2.previous = void 0;
  179926. current2 = current2.next;
  179927. }
  179928. }
  179929. tokenizer2.events = [];
  179930. if (current2) {
  179931. current2._tokenizer = void 0;
  179932. current2.previous = void 0;
  179933. } else {
  179934. breaks.pop();
  179935. }
  179936. index2 = breaks.length;
  179937. while (index2--) {
  179938. const slice2 = childEvents.slice(breaks[index2], breaks[index2 + 1]);
  179939. const start4 = startPositions.pop();
  179940. jumps.unshift([start4, start4 + slice2.length - 1]);
  179941. splice(events, start4, 2, slice2);
  179942. }
  179943. index2 = -1;
  179944. while (++index2 < jumps.length) {
  179945. gaps[adjust + jumps[index2][0]] = adjust + jumps[index2][1];
  179946. adjust += jumps[index2][1] - jumps[index2][0] - 1;
  179947. }
  179948. return gaps;
  179949. }
  179950. // node_modules/micromark-core-commonmark/lib/content.js
  179951. var content = {
  179952. tokenize: tokenizeContent,
  179953. resolve: resolveContent
  179954. };
  179955. var continuationConstruct = {
  179956. tokenize: tokenizeContinuation,
  179957. partial: true
  179958. };
  179959. function resolveContent(events) {
  179960. subtokenize(events);
  179961. return events;
  179962. }
  179963. function tokenizeContent(effects, ok2) {
  179964. let previous2;
  179965. return start3;
  179966. function start3(code2) {
  179967. effects.enter("content");
  179968. previous2 = effects.enter("chunkContent", {
  179969. contentType: "content"
  179970. });
  179971. return data2(code2);
  179972. }
  179973. function data2(code2) {
  179974. if (code2 === null) {
  179975. return contentEnd(code2);
  179976. }
  179977. if (markdownLineEnding(code2)) {
  179978. return effects.check(
  179979. continuationConstruct,
  179980. contentContinue,
  179981. contentEnd
  179982. )(code2);
  179983. }
  179984. effects.consume(code2);
  179985. return data2;
  179986. }
  179987. function contentEnd(code2) {
  179988. effects.exit("chunkContent");
  179989. effects.exit("content");
  179990. return ok2(code2);
  179991. }
  179992. function contentContinue(code2) {
  179993. effects.consume(code2);
  179994. effects.exit("chunkContent");
  179995. previous2.next = effects.enter("chunkContent", {
  179996. contentType: "content",
  179997. previous: previous2
  179998. });
  179999. previous2 = previous2.next;
  180000. return data2;
  180001. }
  180002. }
  180003. function tokenizeContinuation(effects, ok2, nok) {
  180004. const self2 = this;
  180005. return startLookahead;
  180006. function startLookahead(code2) {
  180007. effects.exit("chunkContent");
  180008. effects.enter("lineEnding");
  180009. effects.consume(code2);
  180010. effects.exit("lineEnding");
  180011. return factorySpace(effects, prefixed, "linePrefix");
  180012. }
  180013. function prefixed(code2) {
  180014. if (code2 === null || markdownLineEnding(code2)) {
  180015. return nok(code2);
  180016. }
  180017. const tail = self2.events[self2.events.length - 1];
  180018. if (!self2.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) {
  180019. return ok2(code2);
  180020. }
  180021. return effects.interrupt(self2.parser.constructs.flow, nok, ok2)(code2);
  180022. }
  180023. }
  180024. // node_modules/micromark-factory-destination/index.js
  180025. function factoryDestination(effects, ok2, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
  180026. const limit = max || Number.POSITIVE_INFINITY;
  180027. let balance = 0;
  180028. return start3;
  180029. function start3(code2) {
  180030. if (code2 === 60) {
  180031. effects.enter(type);
  180032. effects.enter(literalType);
  180033. effects.enter(literalMarkerType);
  180034. effects.consume(code2);
  180035. effects.exit(literalMarkerType);
  180036. return destinationEnclosedBefore;
  180037. }
  180038. if (code2 === null || code2 === 41 || asciiControl(code2)) {
  180039. return nok(code2);
  180040. }
  180041. effects.enter(type);
  180042. effects.enter(rawType);
  180043. effects.enter(stringType);
  180044. effects.enter("chunkString", {
  180045. contentType: "string"
  180046. });
  180047. return destinationRaw(code2);
  180048. }
  180049. function destinationEnclosedBefore(code2) {
  180050. if (code2 === 62) {
  180051. effects.enter(literalMarkerType);
  180052. effects.consume(code2);
  180053. effects.exit(literalMarkerType);
  180054. effects.exit(literalType);
  180055. effects.exit(type);
  180056. return ok2;
  180057. }
  180058. effects.enter(stringType);
  180059. effects.enter("chunkString", {
  180060. contentType: "string"
  180061. });
  180062. return destinationEnclosed(code2);
  180063. }
  180064. function destinationEnclosed(code2) {
  180065. if (code2 === 62) {
  180066. effects.exit("chunkString");
  180067. effects.exit(stringType);
  180068. return destinationEnclosedBefore(code2);
  180069. }
  180070. if (code2 === null || code2 === 60 || markdownLineEnding(code2)) {
  180071. return nok(code2);
  180072. }
  180073. effects.consume(code2);
  180074. return code2 === 92 ? destinationEnclosedEscape : destinationEnclosed;
  180075. }
  180076. function destinationEnclosedEscape(code2) {
  180077. if (code2 === 60 || code2 === 62 || code2 === 92) {
  180078. effects.consume(code2);
  180079. return destinationEnclosed;
  180080. }
  180081. return destinationEnclosed(code2);
  180082. }
  180083. function destinationRaw(code2) {
  180084. if (code2 === 40) {
  180085. if (++balance > limit)
  180086. return nok(code2);
  180087. effects.consume(code2);
  180088. return destinationRaw;
  180089. }
  180090. if (code2 === 41) {
  180091. if (!balance--) {
  180092. effects.exit("chunkString");
  180093. effects.exit(stringType);
  180094. effects.exit(rawType);
  180095. effects.exit(type);
  180096. return ok2(code2);
  180097. }
  180098. effects.consume(code2);
  180099. return destinationRaw;
  180100. }
  180101. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  180102. if (balance)
  180103. return nok(code2);
  180104. effects.exit("chunkString");
  180105. effects.exit(stringType);
  180106. effects.exit(rawType);
  180107. effects.exit(type);
  180108. return ok2(code2);
  180109. }
  180110. if (asciiControl(code2))
  180111. return nok(code2);
  180112. effects.consume(code2);
  180113. return code2 === 92 ? destinationRawEscape : destinationRaw;
  180114. }
  180115. function destinationRawEscape(code2) {
  180116. if (code2 === 40 || code2 === 41 || code2 === 92) {
  180117. effects.consume(code2);
  180118. return destinationRaw;
  180119. }
  180120. return destinationRaw(code2);
  180121. }
  180122. }
  180123. // node_modules/micromark-factory-label/index.js
  180124. function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
  180125. const self2 = this;
  180126. let size = 0;
  180127. let data2;
  180128. return start3;
  180129. function start3(code2) {
  180130. effects.enter(type);
  180131. effects.enter(markerType);
  180132. effects.consume(code2);
  180133. effects.exit(markerType);
  180134. effects.enter(stringType);
  180135. return atBreak;
  180136. }
  180137. function atBreak(code2) {
  180138. if (code2 === null || code2 === 91 || code2 === 93 && !data2 || code2 === 94 && !size && "_hiddenFootnoteSupport" in self2.parser.constructs || size > 999) {
  180139. return nok(code2);
  180140. }
  180141. if (code2 === 93) {
  180142. effects.exit(stringType);
  180143. effects.enter(markerType);
  180144. effects.consume(code2);
  180145. effects.exit(markerType);
  180146. effects.exit(type);
  180147. return ok2;
  180148. }
  180149. if (markdownLineEnding(code2)) {
  180150. effects.enter("lineEnding");
  180151. effects.consume(code2);
  180152. effects.exit("lineEnding");
  180153. return atBreak;
  180154. }
  180155. effects.enter("chunkString", {
  180156. contentType: "string"
  180157. });
  180158. return label(code2);
  180159. }
  180160. function label(code2) {
  180161. if (code2 === null || code2 === 91 || code2 === 93 || markdownLineEnding(code2) || size++ > 999) {
  180162. effects.exit("chunkString");
  180163. return atBreak(code2);
  180164. }
  180165. effects.consume(code2);
  180166. data2 = data2 || !markdownSpace(code2);
  180167. return code2 === 92 ? labelEscape : label;
  180168. }
  180169. function labelEscape(code2) {
  180170. if (code2 === 91 || code2 === 92 || code2 === 93) {
  180171. effects.consume(code2);
  180172. size++;
  180173. return label;
  180174. }
  180175. return label(code2);
  180176. }
  180177. }
  180178. // node_modules/micromark-factory-title/index.js
  180179. function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
  180180. let marker;
  180181. return start3;
  180182. function start3(code2) {
  180183. effects.enter(type);
  180184. effects.enter(markerType);
  180185. effects.consume(code2);
  180186. effects.exit(markerType);
  180187. marker = code2 === 40 ? 41 : code2;
  180188. return atFirstTitleBreak;
  180189. }
  180190. function atFirstTitleBreak(code2) {
  180191. if (code2 === marker) {
  180192. effects.enter(markerType);
  180193. effects.consume(code2);
  180194. effects.exit(markerType);
  180195. effects.exit(type);
  180196. return ok2;
  180197. }
  180198. effects.enter(stringType);
  180199. return atTitleBreak(code2);
  180200. }
  180201. function atTitleBreak(code2) {
  180202. if (code2 === marker) {
  180203. effects.exit(stringType);
  180204. return atFirstTitleBreak(marker);
  180205. }
  180206. if (code2 === null) {
  180207. return nok(code2);
  180208. }
  180209. if (markdownLineEnding(code2)) {
  180210. effects.enter("lineEnding");
  180211. effects.consume(code2);
  180212. effects.exit("lineEnding");
  180213. return factorySpace(effects, atTitleBreak, "linePrefix");
  180214. }
  180215. effects.enter("chunkString", {
  180216. contentType: "string"
  180217. });
  180218. return title(code2);
  180219. }
  180220. function title(code2) {
  180221. if (code2 === marker || code2 === null || markdownLineEnding(code2)) {
  180222. effects.exit("chunkString");
  180223. return atTitleBreak(code2);
  180224. }
  180225. effects.consume(code2);
  180226. return code2 === 92 ? titleEscape : title;
  180227. }
  180228. function titleEscape(code2) {
  180229. if (code2 === marker || code2 === 92) {
  180230. effects.consume(code2);
  180231. return title;
  180232. }
  180233. return title(code2);
  180234. }
  180235. }
  180236. // node_modules/micromark-factory-whitespace/index.js
  180237. function factoryWhitespace(effects, ok2) {
  180238. let seen;
  180239. return start3;
  180240. function start3(code2) {
  180241. if (markdownLineEnding(code2)) {
  180242. effects.enter("lineEnding");
  180243. effects.consume(code2);
  180244. effects.exit("lineEnding");
  180245. seen = true;
  180246. return start3;
  180247. }
  180248. if (markdownSpace(code2)) {
  180249. return factorySpace(
  180250. effects,
  180251. start3,
  180252. seen ? "linePrefix" : "lineSuffix"
  180253. )(code2);
  180254. }
  180255. return ok2(code2);
  180256. }
  180257. }
  180258. // node_modules/micromark-util-normalize-identifier/index.js
  180259. function normalizeIdentifier(value) {
  180260. return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
  180261. }
  180262. // node_modules/micromark-core-commonmark/lib/definition.js
  180263. var definition = {
  180264. name: "definition",
  180265. tokenize: tokenizeDefinition
  180266. };
  180267. var titleConstruct = {
  180268. tokenize: tokenizeTitle,
  180269. partial: true
  180270. };
  180271. function tokenizeDefinition(effects, ok2, nok) {
  180272. const self2 = this;
  180273. let identifier;
  180274. return start3;
  180275. function start3(code2) {
  180276. effects.enter("definition");
  180277. return factoryLabel.call(
  180278. self2,
  180279. effects,
  180280. labelAfter,
  180281. nok,
  180282. "definitionLabel",
  180283. "definitionLabelMarker",
  180284. "definitionLabelString"
  180285. )(code2);
  180286. }
  180287. function labelAfter(code2) {
  180288. identifier = normalizeIdentifier(
  180289. self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1)
  180290. );
  180291. if (code2 === 58) {
  180292. effects.enter("definitionMarker");
  180293. effects.consume(code2);
  180294. effects.exit("definitionMarker");
  180295. return factoryWhitespace(
  180296. effects,
  180297. factoryDestination(
  180298. effects,
  180299. effects.attempt(
  180300. titleConstruct,
  180301. factorySpace(effects, after, "whitespace"),
  180302. factorySpace(effects, after, "whitespace")
  180303. ),
  180304. nok,
  180305. "definitionDestination",
  180306. "definitionDestinationLiteral",
  180307. "definitionDestinationLiteralMarker",
  180308. "definitionDestinationRaw",
  180309. "definitionDestinationString"
  180310. )
  180311. );
  180312. }
  180313. return nok(code2);
  180314. }
  180315. function after(code2) {
  180316. if (code2 === null || markdownLineEnding(code2)) {
  180317. effects.exit("definition");
  180318. if (!self2.parser.defined.includes(identifier)) {
  180319. self2.parser.defined.push(identifier);
  180320. }
  180321. return ok2(code2);
  180322. }
  180323. return nok(code2);
  180324. }
  180325. }
  180326. function tokenizeTitle(effects, ok2, nok) {
  180327. return start3;
  180328. function start3(code2) {
  180329. return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, before)(code2) : nok(code2);
  180330. }
  180331. function before(code2) {
  180332. if (code2 === 34 || code2 === 39 || code2 === 40) {
  180333. return factoryTitle(
  180334. effects,
  180335. factorySpace(effects, after, "whitespace"),
  180336. nok,
  180337. "definitionTitle",
  180338. "definitionTitleMarker",
  180339. "definitionTitleString"
  180340. )(code2);
  180341. }
  180342. return nok(code2);
  180343. }
  180344. function after(code2) {
  180345. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  180346. }
  180347. }
  180348. // node_modules/micromark-core-commonmark/lib/hard-break-escape.js
  180349. var hardBreakEscape = {
  180350. name: "hardBreakEscape",
  180351. tokenize: tokenizeHardBreakEscape
  180352. };
  180353. function tokenizeHardBreakEscape(effects, ok2, nok) {
  180354. return start3;
  180355. function start3(code2) {
  180356. effects.enter("hardBreakEscape");
  180357. effects.enter("escapeMarker");
  180358. effects.consume(code2);
  180359. return open;
  180360. }
  180361. function open(code2) {
  180362. if (markdownLineEnding(code2)) {
  180363. effects.exit("escapeMarker");
  180364. effects.exit("hardBreakEscape");
  180365. return ok2(code2);
  180366. }
  180367. return nok(code2);
  180368. }
  180369. }
  180370. // node_modules/micromark-core-commonmark/lib/heading-atx.js
  180371. var headingAtx = {
  180372. name: "headingAtx",
  180373. tokenize: tokenizeHeadingAtx,
  180374. resolve: resolveHeadingAtx
  180375. };
  180376. function resolveHeadingAtx(events, context) {
  180377. let contentEnd = events.length - 2;
  180378. let contentStart = 3;
  180379. let content3;
  180380. let text5;
  180381. if (events[contentStart][1].type === "whitespace") {
  180382. contentStart += 2;
  180383. }
  180384. if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") {
  180385. contentEnd -= 2;
  180386. }
  180387. if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) {
  180388. contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
  180389. }
  180390. if (contentEnd > contentStart) {
  180391. content3 = {
  180392. type: "atxHeadingText",
  180393. start: events[contentStart][1].start,
  180394. end: events[contentEnd][1].end
  180395. };
  180396. text5 = {
  180397. type: "chunkText",
  180398. start: events[contentStart][1].start,
  180399. end: events[contentEnd][1].end,
  180400. contentType: "text"
  180401. };
  180402. splice(events, contentStart, contentEnd - contentStart + 1, [
  180403. ["enter", content3, context],
  180404. ["enter", text5, context],
  180405. ["exit", text5, context],
  180406. ["exit", content3, context]
  180407. ]);
  180408. }
  180409. return events;
  180410. }
  180411. function tokenizeHeadingAtx(effects, ok2, nok) {
  180412. const self2 = this;
  180413. let size = 0;
  180414. return start3;
  180415. function start3(code2) {
  180416. effects.enter("atxHeading");
  180417. effects.enter("atxHeadingSequence");
  180418. return fenceOpenInside(code2);
  180419. }
  180420. function fenceOpenInside(code2) {
  180421. if (code2 === 35 && size++ < 6) {
  180422. effects.consume(code2);
  180423. return fenceOpenInside;
  180424. }
  180425. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  180426. effects.exit("atxHeadingSequence");
  180427. return self2.interrupt ? ok2(code2) : headingBreak(code2);
  180428. }
  180429. return nok(code2);
  180430. }
  180431. function headingBreak(code2) {
  180432. if (code2 === 35) {
  180433. effects.enter("atxHeadingSequence");
  180434. return sequence(code2);
  180435. }
  180436. if (code2 === null || markdownLineEnding(code2)) {
  180437. effects.exit("atxHeading");
  180438. return ok2(code2);
  180439. }
  180440. if (markdownSpace(code2)) {
  180441. return factorySpace(effects, headingBreak, "whitespace")(code2);
  180442. }
  180443. effects.enter("atxHeadingText");
  180444. return data2(code2);
  180445. }
  180446. function sequence(code2) {
  180447. if (code2 === 35) {
  180448. effects.consume(code2);
  180449. return sequence;
  180450. }
  180451. effects.exit("atxHeadingSequence");
  180452. return headingBreak(code2);
  180453. }
  180454. function data2(code2) {
  180455. if (code2 === null || code2 === 35 || markdownLineEndingOrSpace(code2)) {
  180456. effects.exit("atxHeadingText");
  180457. return headingBreak(code2);
  180458. }
  180459. effects.consume(code2);
  180460. return data2;
  180461. }
  180462. }
  180463. // node_modules/micromark-util-html-tag-name/index.js
  180464. var htmlBlockNames = [
  180465. "address",
  180466. "article",
  180467. "aside",
  180468. "base",
  180469. "basefont",
  180470. "blockquote",
  180471. "body",
  180472. "caption",
  180473. "center",
  180474. "col",
  180475. "colgroup",
  180476. "dd",
  180477. "details",
  180478. "dialog",
  180479. "dir",
  180480. "div",
  180481. "dl",
  180482. "dt",
  180483. "fieldset",
  180484. "figcaption",
  180485. "figure",
  180486. "footer",
  180487. "form",
  180488. "frame",
  180489. "frameset",
  180490. "h1",
  180491. "h2",
  180492. "h3",
  180493. "h4",
  180494. "h5",
  180495. "h6",
  180496. "head",
  180497. "header",
  180498. "hr",
  180499. "html",
  180500. "iframe",
  180501. "legend",
  180502. "li",
  180503. "link",
  180504. "main",
  180505. "menu",
  180506. "menuitem",
  180507. "nav",
  180508. "noframes",
  180509. "ol",
  180510. "optgroup",
  180511. "option",
  180512. "p",
  180513. "param",
  180514. "section",
  180515. "source",
  180516. "summary",
  180517. "table",
  180518. "tbody",
  180519. "td",
  180520. "tfoot",
  180521. "th",
  180522. "thead",
  180523. "title",
  180524. "tr",
  180525. "track",
  180526. "ul"
  180527. ];
  180528. var htmlRawNames = ["pre", "script", "style", "textarea"];
  180529. // node_modules/micromark-core-commonmark/lib/html-flow.js
  180530. var htmlFlow = {
  180531. name: "htmlFlow",
  180532. tokenize: tokenizeHtmlFlow,
  180533. resolveTo: resolveToHtmlFlow,
  180534. concrete: true
  180535. };
  180536. var nextBlankConstruct = {
  180537. tokenize: tokenizeNextBlank,
  180538. partial: true
  180539. };
  180540. function resolveToHtmlFlow(events) {
  180541. let index2 = events.length;
  180542. while (index2--) {
  180543. if (events[index2][0] === "enter" && events[index2][1].type === "htmlFlow") {
  180544. break;
  180545. }
  180546. }
  180547. if (index2 > 1 && events[index2 - 2][1].type === "linePrefix") {
  180548. events[index2][1].start = events[index2 - 2][1].start;
  180549. events[index2 + 1][1].start = events[index2 - 2][1].start;
  180550. events.splice(index2 - 2, 2);
  180551. }
  180552. return events;
  180553. }
  180554. function tokenizeHtmlFlow(effects, ok2, nok) {
  180555. const self2 = this;
  180556. let kind;
  180557. let startTag;
  180558. let buffer2;
  180559. let index2;
  180560. let marker;
  180561. return start3;
  180562. function start3(code2) {
  180563. effects.enter("htmlFlow");
  180564. effects.enter("htmlFlowData");
  180565. effects.consume(code2);
  180566. return open;
  180567. }
  180568. function open(code2) {
  180569. if (code2 === 33) {
  180570. effects.consume(code2);
  180571. return declarationStart;
  180572. }
  180573. if (code2 === 47) {
  180574. effects.consume(code2);
  180575. return tagCloseStart;
  180576. }
  180577. if (code2 === 63) {
  180578. effects.consume(code2);
  180579. kind = 3;
  180580. return self2.interrupt ? ok2 : continuationDeclarationInside;
  180581. }
  180582. if (asciiAlpha(code2)) {
  180583. effects.consume(code2);
  180584. buffer2 = String.fromCharCode(code2);
  180585. startTag = true;
  180586. return tagName;
  180587. }
  180588. return nok(code2);
  180589. }
  180590. function declarationStart(code2) {
  180591. if (code2 === 45) {
  180592. effects.consume(code2);
  180593. kind = 2;
  180594. return commentOpenInside;
  180595. }
  180596. if (code2 === 91) {
  180597. effects.consume(code2);
  180598. kind = 5;
  180599. buffer2 = "CDATA[";
  180600. index2 = 0;
  180601. return cdataOpenInside;
  180602. }
  180603. if (asciiAlpha(code2)) {
  180604. effects.consume(code2);
  180605. kind = 4;
  180606. return self2.interrupt ? ok2 : continuationDeclarationInside;
  180607. }
  180608. return nok(code2);
  180609. }
  180610. function commentOpenInside(code2) {
  180611. if (code2 === 45) {
  180612. effects.consume(code2);
  180613. return self2.interrupt ? ok2 : continuationDeclarationInside;
  180614. }
  180615. return nok(code2);
  180616. }
  180617. function cdataOpenInside(code2) {
  180618. if (code2 === buffer2.charCodeAt(index2++)) {
  180619. effects.consume(code2);
  180620. return index2 === buffer2.length ? self2.interrupt ? ok2 : continuation : cdataOpenInside;
  180621. }
  180622. return nok(code2);
  180623. }
  180624. function tagCloseStart(code2) {
  180625. if (asciiAlpha(code2)) {
  180626. effects.consume(code2);
  180627. buffer2 = String.fromCharCode(code2);
  180628. return tagName;
  180629. }
  180630. return nok(code2);
  180631. }
  180632. function tagName(code2) {
  180633. if (code2 === null || code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
  180634. if (code2 !== 47 && startTag && htmlRawNames.includes(buffer2.toLowerCase())) {
  180635. kind = 1;
  180636. return self2.interrupt ? ok2(code2) : continuation(code2);
  180637. }
  180638. if (htmlBlockNames.includes(buffer2.toLowerCase())) {
  180639. kind = 6;
  180640. if (code2 === 47) {
  180641. effects.consume(code2);
  180642. return basicSelfClosing;
  180643. }
  180644. return self2.interrupt ? ok2(code2) : continuation(code2);
  180645. }
  180646. kind = 7;
  180647. return self2.interrupt && !self2.parser.lazy[self2.now().line] ? nok(code2) : startTag ? completeAttributeNameBefore(code2) : completeClosingTagAfter(code2);
  180648. }
  180649. if (code2 === 45 || asciiAlphanumeric(code2)) {
  180650. effects.consume(code2);
  180651. buffer2 += String.fromCharCode(code2);
  180652. return tagName;
  180653. }
  180654. return nok(code2);
  180655. }
  180656. function basicSelfClosing(code2) {
  180657. if (code2 === 62) {
  180658. effects.consume(code2);
  180659. return self2.interrupt ? ok2 : continuation;
  180660. }
  180661. return nok(code2);
  180662. }
  180663. function completeClosingTagAfter(code2) {
  180664. if (markdownSpace(code2)) {
  180665. effects.consume(code2);
  180666. return completeClosingTagAfter;
  180667. }
  180668. return completeEnd(code2);
  180669. }
  180670. function completeAttributeNameBefore(code2) {
  180671. if (code2 === 47) {
  180672. effects.consume(code2);
  180673. return completeEnd;
  180674. }
  180675. if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) {
  180676. effects.consume(code2);
  180677. return completeAttributeName;
  180678. }
  180679. if (markdownSpace(code2)) {
  180680. effects.consume(code2);
  180681. return completeAttributeNameBefore;
  180682. }
  180683. return completeEnd(code2);
  180684. }
  180685. function completeAttributeName(code2) {
  180686. if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) {
  180687. effects.consume(code2);
  180688. return completeAttributeName;
  180689. }
  180690. return completeAttributeNameAfter(code2);
  180691. }
  180692. function completeAttributeNameAfter(code2) {
  180693. if (code2 === 61) {
  180694. effects.consume(code2);
  180695. return completeAttributeValueBefore;
  180696. }
  180697. if (markdownSpace(code2)) {
  180698. effects.consume(code2);
  180699. return completeAttributeNameAfter;
  180700. }
  180701. return completeAttributeNameBefore(code2);
  180702. }
  180703. function completeAttributeValueBefore(code2) {
  180704. if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) {
  180705. return nok(code2);
  180706. }
  180707. if (code2 === 34 || code2 === 39) {
  180708. effects.consume(code2);
  180709. marker = code2;
  180710. return completeAttributeValueQuoted;
  180711. }
  180712. if (markdownSpace(code2)) {
  180713. effects.consume(code2);
  180714. return completeAttributeValueBefore;
  180715. }
  180716. marker = null;
  180717. return completeAttributeValueUnquoted(code2);
  180718. }
  180719. function completeAttributeValueQuoted(code2) {
  180720. if (code2 === null || markdownLineEnding(code2)) {
  180721. return nok(code2);
  180722. }
  180723. if (code2 === marker) {
  180724. effects.consume(code2);
  180725. return completeAttributeValueQuotedAfter;
  180726. }
  180727. effects.consume(code2);
  180728. return completeAttributeValueQuoted;
  180729. }
  180730. function completeAttributeValueUnquoted(code2) {
  180731. if (code2 === null || code2 === 34 || code2 === 39 || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96 || markdownLineEndingOrSpace(code2)) {
  180732. return completeAttributeNameAfter(code2);
  180733. }
  180734. effects.consume(code2);
  180735. return completeAttributeValueUnquoted;
  180736. }
  180737. function completeAttributeValueQuotedAfter(code2) {
  180738. if (code2 === 47 || code2 === 62 || markdownSpace(code2)) {
  180739. return completeAttributeNameBefore(code2);
  180740. }
  180741. return nok(code2);
  180742. }
  180743. function completeEnd(code2) {
  180744. if (code2 === 62) {
  180745. effects.consume(code2);
  180746. return completeAfter;
  180747. }
  180748. return nok(code2);
  180749. }
  180750. function completeAfter(code2) {
  180751. if (markdownSpace(code2)) {
  180752. effects.consume(code2);
  180753. return completeAfter;
  180754. }
  180755. return code2 === null || markdownLineEnding(code2) ? continuation(code2) : nok(code2);
  180756. }
  180757. function continuation(code2) {
  180758. if (code2 === 45 && kind === 2) {
  180759. effects.consume(code2);
  180760. return continuationCommentInside;
  180761. }
  180762. if (code2 === 60 && kind === 1) {
  180763. effects.consume(code2);
  180764. return continuationRawTagOpen;
  180765. }
  180766. if (code2 === 62 && kind === 4) {
  180767. effects.consume(code2);
  180768. return continuationClose;
  180769. }
  180770. if (code2 === 63 && kind === 3) {
  180771. effects.consume(code2);
  180772. return continuationDeclarationInside;
  180773. }
  180774. if (code2 === 93 && kind === 5) {
  180775. effects.consume(code2);
  180776. return continuationCharacterDataInside;
  180777. }
  180778. if (markdownLineEnding(code2) && (kind === 6 || kind === 7)) {
  180779. return effects.check(
  180780. nextBlankConstruct,
  180781. continuationClose,
  180782. continuationAtLineEnding
  180783. )(code2);
  180784. }
  180785. if (code2 === null || markdownLineEnding(code2)) {
  180786. return continuationAtLineEnding(code2);
  180787. }
  180788. effects.consume(code2);
  180789. return continuation;
  180790. }
  180791. function continuationAtLineEnding(code2) {
  180792. effects.exit("htmlFlowData");
  180793. return htmlContinueStart(code2);
  180794. }
  180795. function htmlContinueStart(code2) {
  180796. if (code2 === null) {
  180797. return done(code2);
  180798. }
  180799. if (markdownLineEnding(code2)) {
  180800. return effects.attempt(
  180801. {
  180802. tokenize: htmlLineEnd,
  180803. partial: true
  180804. },
  180805. htmlContinueStart,
  180806. done
  180807. )(code2);
  180808. }
  180809. effects.enter("htmlFlowData");
  180810. return continuation(code2);
  180811. }
  180812. function htmlLineEnd(effects2, ok3, nok2) {
  180813. return start4;
  180814. function start4(code2) {
  180815. effects2.enter("lineEnding");
  180816. effects2.consume(code2);
  180817. effects2.exit("lineEnding");
  180818. return lineStart;
  180819. }
  180820. function lineStart(code2) {
  180821. return self2.parser.lazy[self2.now().line] ? nok2(code2) : ok3(code2);
  180822. }
  180823. }
  180824. function continuationCommentInside(code2) {
  180825. if (code2 === 45) {
  180826. effects.consume(code2);
  180827. return continuationDeclarationInside;
  180828. }
  180829. return continuation(code2);
  180830. }
  180831. function continuationRawTagOpen(code2) {
  180832. if (code2 === 47) {
  180833. effects.consume(code2);
  180834. buffer2 = "";
  180835. return continuationRawEndTag;
  180836. }
  180837. return continuation(code2);
  180838. }
  180839. function continuationRawEndTag(code2) {
  180840. if (code2 === 62 && htmlRawNames.includes(buffer2.toLowerCase())) {
  180841. effects.consume(code2);
  180842. return continuationClose;
  180843. }
  180844. if (asciiAlpha(code2) && buffer2.length < 8) {
  180845. effects.consume(code2);
  180846. buffer2 += String.fromCharCode(code2);
  180847. return continuationRawEndTag;
  180848. }
  180849. return continuation(code2);
  180850. }
  180851. function continuationCharacterDataInside(code2) {
  180852. if (code2 === 93) {
  180853. effects.consume(code2);
  180854. return continuationDeclarationInside;
  180855. }
  180856. return continuation(code2);
  180857. }
  180858. function continuationDeclarationInside(code2) {
  180859. if (code2 === 62) {
  180860. effects.consume(code2);
  180861. return continuationClose;
  180862. }
  180863. if (code2 === 45 && kind === 2) {
  180864. effects.consume(code2);
  180865. return continuationDeclarationInside;
  180866. }
  180867. return continuation(code2);
  180868. }
  180869. function continuationClose(code2) {
  180870. if (code2 === null || markdownLineEnding(code2)) {
  180871. effects.exit("htmlFlowData");
  180872. return done(code2);
  180873. }
  180874. effects.consume(code2);
  180875. return continuationClose;
  180876. }
  180877. function done(code2) {
  180878. effects.exit("htmlFlow");
  180879. return ok2(code2);
  180880. }
  180881. }
  180882. function tokenizeNextBlank(effects, ok2, nok) {
  180883. return start3;
  180884. function start3(code2) {
  180885. effects.exit("htmlFlowData");
  180886. effects.enter("lineEndingBlank");
  180887. effects.consume(code2);
  180888. effects.exit("lineEndingBlank");
  180889. return effects.attempt(blankLine, ok2, nok);
  180890. }
  180891. }
  180892. // node_modules/micromark-core-commonmark/lib/html-text.js
  180893. var htmlText = {
  180894. name: "htmlText",
  180895. tokenize: tokenizeHtmlText
  180896. };
  180897. function tokenizeHtmlText(effects, ok2, nok) {
  180898. const self2 = this;
  180899. let marker;
  180900. let buffer2;
  180901. let index2;
  180902. let returnState;
  180903. return start3;
  180904. function start3(code2) {
  180905. effects.enter("htmlText");
  180906. effects.enter("htmlTextData");
  180907. effects.consume(code2);
  180908. return open;
  180909. }
  180910. function open(code2) {
  180911. if (code2 === 33) {
  180912. effects.consume(code2);
  180913. return declarationOpen;
  180914. }
  180915. if (code2 === 47) {
  180916. effects.consume(code2);
  180917. return tagCloseStart;
  180918. }
  180919. if (code2 === 63) {
  180920. effects.consume(code2);
  180921. return instruction;
  180922. }
  180923. if (asciiAlpha(code2)) {
  180924. effects.consume(code2);
  180925. return tagOpen;
  180926. }
  180927. return nok(code2);
  180928. }
  180929. function declarationOpen(code2) {
  180930. if (code2 === 45) {
  180931. effects.consume(code2);
  180932. return commentOpen;
  180933. }
  180934. if (code2 === 91) {
  180935. effects.consume(code2);
  180936. buffer2 = "CDATA[";
  180937. index2 = 0;
  180938. return cdataOpen;
  180939. }
  180940. if (asciiAlpha(code2)) {
  180941. effects.consume(code2);
  180942. return declaration;
  180943. }
  180944. return nok(code2);
  180945. }
  180946. function commentOpen(code2) {
  180947. if (code2 === 45) {
  180948. effects.consume(code2);
  180949. return commentStart;
  180950. }
  180951. return nok(code2);
  180952. }
  180953. function commentStart(code2) {
  180954. if (code2 === null || code2 === 62) {
  180955. return nok(code2);
  180956. }
  180957. if (code2 === 45) {
  180958. effects.consume(code2);
  180959. return commentStartDash;
  180960. }
  180961. return comment2(code2);
  180962. }
  180963. function commentStartDash(code2) {
  180964. if (code2 === null || code2 === 62) {
  180965. return nok(code2);
  180966. }
  180967. return comment2(code2);
  180968. }
  180969. function comment2(code2) {
  180970. if (code2 === null) {
  180971. return nok(code2);
  180972. }
  180973. if (code2 === 45) {
  180974. effects.consume(code2);
  180975. return commentClose;
  180976. }
  180977. if (markdownLineEnding(code2)) {
  180978. returnState = comment2;
  180979. return atLineEnding(code2);
  180980. }
  180981. effects.consume(code2);
  180982. return comment2;
  180983. }
  180984. function commentClose(code2) {
  180985. if (code2 === 45) {
  180986. effects.consume(code2);
  180987. return end;
  180988. }
  180989. return comment2(code2);
  180990. }
  180991. function cdataOpen(code2) {
  180992. if (code2 === buffer2.charCodeAt(index2++)) {
  180993. effects.consume(code2);
  180994. return index2 === buffer2.length ? cdata : cdataOpen;
  180995. }
  180996. return nok(code2);
  180997. }
  180998. function cdata(code2) {
  180999. if (code2 === null) {
  181000. return nok(code2);
  181001. }
  181002. if (code2 === 93) {
  181003. effects.consume(code2);
  181004. return cdataClose;
  181005. }
  181006. if (markdownLineEnding(code2)) {
  181007. returnState = cdata;
  181008. return atLineEnding(code2);
  181009. }
  181010. effects.consume(code2);
  181011. return cdata;
  181012. }
  181013. function cdataClose(code2) {
  181014. if (code2 === 93) {
  181015. effects.consume(code2);
  181016. return cdataEnd;
  181017. }
  181018. return cdata(code2);
  181019. }
  181020. function cdataEnd(code2) {
  181021. if (code2 === 62) {
  181022. return end(code2);
  181023. }
  181024. if (code2 === 93) {
  181025. effects.consume(code2);
  181026. return cdataEnd;
  181027. }
  181028. return cdata(code2);
  181029. }
  181030. function declaration(code2) {
  181031. if (code2 === null || code2 === 62) {
  181032. return end(code2);
  181033. }
  181034. if (markdownLineEnding(code2)) {
  181035. returnState = declaration;
  181036. return atLineEnding(code2);
  181037. }
  181038. effects.consume(code2);
  181039. return declaration;
  181040. }
  181041. function instruction(code2) {
  181042. if (code2 === null) {
  181043. return nok(code2);
  181044. }
  181045. if (code2 === 63) {
  181046. effects.consume(code2);
  181047. return instructionClose;
  181048. }
  181049. if (markdownLineEnding(code2)) {
  181050. returnState = instruction;
  181051. return atLineEnding(code2);
  181052. }
  181053. effects.consume(code2);
  181054. return instruction;
  181055. }
  181056. function instructionClose(code2) {
  181057. return code2 === 62 ? end(code2) : instruction(code2);
  181058. }
  181059. function tagCloseStart(code2) {
  181060. if (asciiAlpha(code2)) {
  181061. effects.consume(code2);
  181062. return tagClose;
  181063. }
  181064. return nok(code2);
  181065. }
  181066. function tagClose(code2) {
  181067. if (code2 === 45 || asciiAlphanumeric(code2)) {
  181068. effects.consume(code2);
  181069. return tagClose;
  181070. }
  181071. return tagCloseBetween(code2);
  181072. }
  181073. function tagCloseBetween(code2) {
  181074. if (markdownLineEnding(code2)) {
  181075. returnState = tagCloseBetween;
  181076. return atLineEnding(code2);
  181077. }
  181078. if (markdownSpace(code2)) {
  181079. effects.consume(code2);
  181080. return tagCloseBetween;
  181081. }
  181082. return end(code2);
  181083. }
  181084. function tagOpen(code2) {
  181085. if (code2 === 45 || asciiAlphanumeric(code2)) {
  181086. effects.consume(code2);
  181087. return tagOpen;
  181088. }
  181089. if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
  181090. return tagOpenBetween(code2);
  181091. }
  181092. return nok(code2);
  181093. }
  181094. function tagOpenBetween(code2) {
  181095. if (code2 === 47) {
  181096. effects.consume(code2);
  181097. return end;
  181098. }
  181099. if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) {
  181100. effects.consume(code2);
  181101. return tagOpenAttributeName;
  181102. }
  181103. if (markdownLineEnding(code2)) {
  181104. returnState = tagOpenBetween;
  181105. return atLineEnding(code2);
  181106. }
  181107. if (markdownSpace(code2)) {
  181108. effects.consume(code2);
  181109. return tagOpenBetween;
  181110. }
  181111. return end(code2);
  181112. }
  181113. function tagOpenAttributeName(code2) {
  181114. if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) {
  181115. effects.consume(code2);
  181116. return tagOpenAttributeName;
  181117. }
  181118. return tagOpenAttributeNameAfter(code2);
  181119. }
  181120. function tagOpenAttributeNameAfter(code2) {
  181121. if (code2 === 61) {
  181122. effects.consume(code2);
  181123. return tagOpenAttributeValueBefore;
  181124. }
  181125. if (markdownLineEnding(code2)) {
  181126. returnState = tagOpenAttributeNameAfter;
  181127. return atLineEnding(code2);
  181128. }
  181129. if (markdownSpace(code2)) {
  181130. effects.consume(code2);
  181131. return tagOpenAttributeNameAfter;
  181132. }
  181133. return tagOpenBetween(code2);
  181134. }
  181135. function tagOpenAttributeValueBefore(code2) {
  181136. if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) {
  181137. return nok(code2);
  181138. }
  181139. if (code2 === 34 || code2 === 39) {
  181140. effects.consume(code2);
  181141. marker = code2;
  181142. return tagOpenAttributeValueQuoted;
  181143. }
  181144. if (markdownLineEnding(code2)) {
  181145. returnState = tagOpenAttributeValueBefore;
  181146. return atLineEnding(code2);
  181147. }
  181148. if (markdownSpace(code2)) {
  181149. effects.consume(code2);
  181150. return tagOpenAttributeValueBefore;
  181151. }
  181152. effects.consume(code2);
  181153. marker = void 0;
  181154. return tagOpenAttributeValueUnquoted;
  181155. }
  181156. function tagOpenAttributeValueQuoted(code2) {
  181157. if (code2 === marker) {
  181158. effects.consume(code2);
  181159. return tagOpenAttributeValueQuotedAfter;
  181160. }
  181161. if (code2 === null) {
  181162. return nok(code2);
  181163. }
  181164. if (markdownLineEnding(code2)) {
  181165. returnState = tagOpenAttributeValueQuoted;
  181166. return atLineEnding(code2);
  181167. }
  181168. effects.consume(code2);
  181169. return tagOpenAttributeValueQuoted;
  181170. }
  181171. function tagOpenAttributeValueQuotedAfter(code2) {
  181172. if (code2 === 62 || code2 === 47 || markdownLineEndingOrSpace(code2)) {
  181173. return tagOpenBetween(code2);
  181174. }
  181175. return nok(code2);
  181176. }
  181177. function tagOpenAttributeValueUnquoted(code2) {
  181178. if (code2 === null || code2 === 34 || code2 === 39 || code2 === 60 || code2 === 61 || code2 === 96) {
  181179. return nok(code2);
  181180. }
  181181. if (code2 === 62 || markdownLineEndingOrSpace(code2)) {
  181182. return tagOpenBetween(code2);
  181183. }
  181184. effects.consume(code2);
  181185. return tagOpenAttributeValueUnquoted;
  181186. }
  181187. function atLineEnding(code2) {
  181188. effects.exit("htmlTextData");
  181189. effects.enter("lineEnding");
  181190. effects.consume(code2);
  181191. effects.exit("lineEnding");
  181192. return factorySpace(
  181193. effects,
  181194. afterPrefix,
  181195. "linePrefix",
  181196. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  181197. );
  181198. }
  181199. function afterPrefix(code2) {
  181200. effects.enter("htmlTextData");
  181201. return returnState(code2);
  181202. }
  181203. function end(code2) {
  181204. if (code2 === 62) {
  181205. effects.consume(code2);
  181206. effects.exit("htmlTextData");
  181207. effects.exit("htmlText");
  181208. return ok2;
  181209. }
  181210. return nok(code2);
  181211. }
  181212. }
  181213. // node_modules/micromark-core-commonmark/lib/label-end.js
  181214. var labelEnd = {
  181215. name: "labelEnd",
  181216. tokenize: tokenizeLabelEnd,
  181217. resolveTo: resolveToLabelEnd,
  181218. resolveAll: resolveAllLabelEnd
  181219. };
  181220. var resourceConstruct = {
  181221. tokenize: tokenizeResource
  181222. };
  181223. var fullReferenceConstruct = {
  181224. tokenize: tokenizeFullReference
  181225. };
  181226. var collapsedReferenceConstruct = {
  181227. tokenize: tokenizeCollapsedReference
  181228. };
  181229. function resolveAllLabelEnd(events) {
  181230. let index2 = -1;
  181231. let token;
  181232. while (++index2 < events.length) {
  181233. token = events[index2][1];
  181234. if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
  181235. events.splice(index2 + 1, token.type === "labelImage" ? 4 : 2);
  181236. token.type = "data";
  181237. index2++;
  181238. }
  181239. }
  181240. return events;
  181241. }
  181242. function resolveToLabelEnd(events, context) {
  181243. let index2 = events.length;
  181244. let offset2 = 0;
  181245. let token;
  181246. let open;
  181247. let close;
  181248. let media;
  181249. while (index2--) {
  181250. token = events[index2][1];
  181251. if (open) {
  181252. if (token.type === "link" || token.type === "labelLink" && token._inactive) {
  181253. break;
  181254. }
  181255. if (events[index2][0] === "enter" && token.type === "labelLink") {
  181256. token._inactive = true;
  181257. }
  181258. } else if (close) {
  181259. if (events[index2][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
  181260. open = index2;
  181261. if (token.type !== "labelLink") {
  181262. offset2 = 2;
  181263. break;
  181264. }
  181265. }
  181266. } else if (token.type === "labelEnd") {
  181267. close = index2;
  181268. }
  181269. }
  181270. const group = {
  181271. type: events[open][1].type === "labelLink" ? "link" : "image",
  181272. start: Object.assign({}, events[open][1].start),
  181273. end: Object.assign({}, events[events.length - 1][1].end)
  181274. };
  181275. const label = {
  181276. type: "label",
  181277. start: Object.assign({}, events[open][1].start),
  181278. end: Object.assign({}, events[close][1].end)
  181279. };
  181280. const text5 = {
  181281. type: "labelText",
  181282. start: Object.assign({}, events[open + offset2 + 2][1].end),
  181283. end: Object.assign({}, events[close - 2][1].start)
  181284. };
  181285. media = [
  181286. ["enter", group, context],
  181287. ["enter", label, context]
  181288. ];
  181289. media = push(media, events.slice(open + 1, open + offset2 + 3));
  181290. media = push(media, [["enter", text5, context]]);
  181291. media = push(
  181292. media,
  181293. resolveAll(
  181294. context.parser.constructs.insideSpan.null,
  181295. events.slice(open + offset2 + 4, close - 3),
  181296. context
  181297. )
  181298. );
  181299. media = push(media, [
  181300. ["exit", text5, context],
  181301. events[close - 2],
  181302. events[close - 1],
  181303. ["exit", label, context]
  181304. ]);
  181305. media = push(media, events.slice(close + 1));
  181306. media = push(media, [["exit", group, context]]);
  181307. splice(events, open, events.length, media);
  181308. return events;
  181309. }
  181310. function tokenizeLabelEnd(effects, ok2, nok) {
  181311. const self2 = this;
  181312. let index2 = self2.events.length;
  181313. let labelStart;
  181314. let defined;
  181315. while (index2--) {
  181316. if ((self2.events[index2][1].type === "labelImage" || self2.events[index2][1].type === "labelLink") && !self2.events[index2][1]._balanced) {
  181317. labelStart = self2.events[index2][1];
  181318. break;
  181319. }
  181320. }
  181321. return start3;
  181322. function start3(code2) {
  181323. if (!labelStart) {
  181324. return nok(code2);
  181325. }
  181326. if (labelStart._inactive)
  181327. return balanced(code2);
  181328. defined = self2.parser.defined.includes(
  181329. normalizeIdentifier(
  181330. self2.sliceSerialize({
  181331. start: labelStart.end,
  181332. end: self2.now()
  181333. })
  181334. )
  181335. );
  181336. effects.enter("labelEnd");
  181337. effects.enter("labelMarker");
  181338. effects.consume(code2);
  181339. effects.exit("labelMarker");
  181340. effects.exit("labelEnd");
  181341. return afterLabelEnd;
  181342. }
  181343. function afterLabelEnd(code2) {
  181344. if (code2 === 40) {
  181345. return effects.attempt(
  181346. resourceConstruct,
  181347. ok2,
  181348. defined ? ok2 : balanced
  181349. )(code2);
  181350. }
  181351. if (code2 === 91) {
  181352. return effects.attempt(
  181353. fullReferenceConstruct,
  181354. ok2,
  181355. defined ? effects.attempt(collapsedReferenceConstruct, ok2, balanced) : balanced
  181356. )(code2);
  181357. }
  181358. return defined ? ok2(code2) : balanced(code2);
  181359. }
  181360. function balanced(code2) {
  181361. labelStart._balanced = true;
  181362. return nok(code2);
  181363. }
  181364. }
  181365. function tokenizeResource(effects, ok2, nok) {
  181366. return start3;
  181367. function start3(code2) {
  181368. effects.enter("resource");
  181369. effects.enter("resourceMarker");
  181370. effects.consume(code2);
  181371. effects.exit("resourceMarker");
  181372. return factoryWhitespace(effects, open);
  181373. }
  181374. function open(code2) {
  181375. if (code2 === 41) {
  181376. return end(code2);
  181377. }
  181378. return factoryDestination(
  181379. effects,
  181380. destinationAfter,
  181381. nok,
  181382. "resourceDestination",
  181383. "resourceDestinationLiteral",
  181384. "resourceDestinationLiteralMarker",
  181385. "resourceDestinationRaw",
  181386. "resourceDestinationString",
  181387. 32
  181388. )(code2);
  181389. }
  181390. function destinationAfter(code2) {
  181391. return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, between)(code2) : end(code2);
  181392. }
  181393. function between(code2) {
  181394. if (code2 === 34 || code2 === 39 || code2 === 40) {
  181395. return factoryTitle(
  181396. effects,
  181397. factoryWhitespace(effects, end),
  181398. nok,
  181399. "resourceTitle",
  181400. "resourceTitleMarker",
  181401. "resourceTitleString"
  181402. )(code2);
  181403. }
  181404. return end(code2);
  181405. }
  181406. function end(code2) {
  181407. if (code2 === 41) {
  181408. effects.enter("resourceMarker");
  181409. effects.consume(code2);
  181410. effects.exit("resourceMarker");
  181411. effects.exit("resource");
  181412. return ok2;
  181413. }
  181414. return nok(code2);
  181415. }
  181416. }
  181417. function tokenizeFullReference(effects, ok2, nok) {
  181418. const self2 = this;
  181419. return start3;
  181420. function start3(code2) {
  181421. return factoryLabel.call(
  181422. self2,
  181423. effects,
  181424. afterLabel,
  181425. nok,
  181426. "reference",
  181427. "referenceMarker",
  181428. "referenceString"
  181429. )(code2);
  181430. }
  181431. function afterLabel(code2) {
  181432. return self2.parser.defined.includes(
  181433. normalizeIdentifier(
  181434. self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1)
  181435. )
  181436. ) ? ok2(code2) : nok(code2);
  181437. }
  181438. }
  181439. function tokenizeCollapsedReference(effects, ok2, nok) {
  181440. return start3;
  181441. function start3(code2) {
  181442. effects.enter("reference");
  181443. effects.enter("referenceMarker");
  181444. effects.consume(code2);
  181445. effects.exit("referenceMarker");
  181446. return open;
  181447. }
  181448. function open(code2) {
  181449. if (code2 === 93) {
  181450. effects.enter("referenceMarker");
  181451. effects.consume(code2);
  181452. effects.exit("referenceMarker");
  181453. effects.exit("reference");
  181454. return ok2;
  181455. }
  181456. return nok(code2);
  181457. }
  181458. }
  181459. // node_modules/micromark-core-commonmark/lib/label-start-image.js
  181460. var labelStartImage = {
  181461. name: "labelStartImage",
  181462. tokenize: tokenizeLabelStartImage,
  181463. resolveAll: labelEnd.resolveAll
  181464. };
  181465. function tokenizeLabelStartImage(effects, ok2, nok) {
  181466. const self2 = this;
  181467. return start3;
  181468. function start3(code2) {
  181469. effects.enter("labelImage");
  181470. effects.enter("labelImageMarker");
  181471. effects.consume(code2);
  181472. effects.exit("labelImageMarker");
  181473. return open;
  181474. }
  181475. function open(code2) {
  181476. if (code2 === 91) {
  181477. effects.enter("labelMarker");
  181478. effects.consume(code2);
  181479. effects.exit("labelMarker");
  181480. effects.exit("labelImage");
  181481. return after;
  181482. }
  181483. return nok(code2);
  181484. }
  181485. function after(code2) {
  181486. return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok2(code2);
  181487. }
  181488. }
  181489. // node_modules/micromark-core-commonmark/lib/label-start-link.js
  181490. var labelStartLink = {
  181491. name: "labelStartLink",
  181492. tokenize: tokenizeLabelStartLink,
  181493. resolveAll: labelEnd.resolveAll
  181494. };
  181495. function tokenizeLabelStartLink(effects, ok2, nok) {
  181496. const self2 = this;
  181497. return start3;
  181498. function start3(code2) {
  181499. effects.enter("labelLink");
  181500. effects.enter("labelMarker");
  181501. effects.consume(code2);
  181502. effects.exit("labelMarker");
  181503. effects.exit("labelLink");
  181504. return after;
  181505. }
  181506. function after(code2) {
  181507. return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok2(code2);
  181508. }
  181509. }
  181510. // node_modules/micromark-core-commonmark/lib/line-ending.js
  181511. var lineEnding = {
  181512. name: "lineEnding",
  181513. tokenize: tokenizeLineEnding
  181514. };
  181515. function tokenizeLineEnding(effects, ok2) {
  181516. return start3;
  181517. function start3(code2) {
  181518. effects.enter("lineEnding");
  181519. effects.consume(code2);
  181520. effects.exit("lineEnding");
  181521. return factorySpace(effects, ok2, "linePrefix");
  181522. }
  181523. }
  181524. // node_modules/micromark-core-commonmark/lib/thematic-break.js
  181525. var thematicBreak = {
  181526. name: "thematicBreak",
  181527. tokenize: tokenizeThematicBreak
  181528. };
  181529. function tokenizeThematicBreak(effects, ok2, nok) {
  181530. let size = 0;
  181531. let marker;
  181532. return start3;
  181533. function start3(code2) {
  181534. effects.enter("thematicBreak");
  181535. marker = code2;
  181536. return atBreak(code2);
  181537. }
  181538. function atBreak(code2) {
  181539. if (code2 === marker) {
  181540. effects.enter("thematicBreakSequence");
  181541. return sequence(code2);
  181542. }
  181543. if (markdownSpace(code2)) {
  181544. return factorySpace(effects, atBreak, "whitespace")(code2);
  181545. }
  181546. if (size < 3 || code2 !== null && !markdownLineEnding(code2)) {
  181547. return nok(code2);
  181548. }
  181549. effects.exit("thematicBreak");
  181550. return ok2(code2);
  181551. }
  181552. function sequence(code2) {
  181553. if (code2 === marker) {
  181554. effects.consume(code2);
  181555. size++;
  181556. return sequence;
  181557. }
  181558. effects.exit("thematicBreakSequence");
  181559. return atBreak(code2);
  181560. }
  181561. }
  181562. // node_modules/micromark-core-commonmark/lib/list.js
  181563. var list = {
  181564. name: "list",
  181565. tokenize: tokenizeListStart,
  181566. continuation: {
  181567. tokenize: tokenizeListContinuation
  181568. },
  181569. exit: tokenizeListEnd
  181570. };
  181571. var listItemPrefixWhitespaceConstruct = {
  181572. tokenize: tokenizeListItemPrefixWhitespace,
  181573. partial: true
  181574. };
  181575. var indentConstruct = {
  181576. tokenize: tokenizeIndent,
  181577. partial: true
  181578. };
  181579. function tokenizeListStart(effects, ok2, nok) {
  181580. const self2 = this;
  181581. const tail = self2.events[self2.events.length - 1];
  181582. let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  181583. let size = 0;
  181584. return start3;
  181585. function start3(code2) {
  181586. const kind = self2.containerState.type || (code2 === 42 || code2 === 43 || code2 === 45 ? "listUnordered" : "listOrdered");
  181587. if (kind === "listUnordered" ? !self2.containerState.marker || code2 === self2.containerState.marker : asciiDigit(code2)) {
  181588. if (!self2.containerState.type) {
  181589. self2.containerState.type = kind;
  181590. effects.enter(kind, {
  181591. _container: true
  181592. });
  181593. }
  181594. if (kind === "listUnordered") {
  181595. effects.enter("listItemPrefix");
  181596. return code2 === 42 || code2 === 45 ? effects.check(thematicBreak, nok, atMarker)(code2) : atMarker(code2);
  181597. }
  181598. if (!self2.interrupt || code2 === 49) {
  181599. effects.enter("listItemPrefix");
  181600. effects.enter("listItemValue");
  181601. return inside(code2);
  181602. }
  181603. }
  181604. return nok(code2);
  181605. }
  181606. function inside(code2) {
  181607. if (asciiDigit(code2) && ++size < 10) {
  181608. effects.consume(code2);
  181609. return inside;
  181610. }
  181611. if ((!self2.interrupt || size < 2) && (self2.containerState.marker ? code2 === self2.containerState.marker : code2 === 41 || code2 === 46)) {
  181612. effects.exit("listItemValue");
  181613. return atMarker(code2);
  181614. }
  181615. return nok(code2);
  181616. }
  181617. function atMarker(code2) {
  181618. effects.enter("listItemMarker");
  181619. effects.consume(code2);
  181620. effects.exit("listItemMarker");
  181621. self2.containerState.marker = self2.containerState.marker || code2;
  181622. return effects.check(
  181623. blankLine,
  181624. self2.interrupt ? nok : onBlank,
  181625. effects.attempt(
  181626. listItemPrefixWhitespaceConstruct,
  181627. endOfPrefix,
  181628. otherPrefix
  181629. )
  181630. );
  181631. }
  181632. function onBlank(code2) {
  181633. self2.containerState.initialBlankLine = true;
  181634. initialSize++;
  181635. return endOfPrefix(code2);
  181636. }
  181637. function otherPrefix(code2) {
  181638. if (markdownSpace(code2)) {
  181639. effects.enter("listItemPrefixWhitespace");
  181640. effects.consume(code2);
  181641. effects.exit("listItemPrefixWhitespace");
  181642. return endOfPrefix;
  181643. }
  181644. return nok(code2);
  181645. }
  181646. function endOfPrefix(code2) {
  181647. self2.containerState.size = initialSize + self2.sliceSerialize(effects.exit("listItemPrefix"), true).length;
  181648. return ok2(code2);
  181649. }
  181650. }
  181651. function tokenizeListContinuation(effects, ok2, nok) {
  181652. const self2 = this;
  181653. self2.containerState._closeFlow = void 0;
  181654. return effects.check(blankLine, onBlank, notBlank);
  181655. function onBlank(code2) {
  181656. self2.containerState.furtherBlankLines = self2.containerState.furtherBlankLines || self2.containerState.initialBlankLine;
  181657. return factorySpace(
  181658. effects,
  181659. ok2,
  181660. "listItemIndent",
  181661. self2.containerState.size + 1
  181662. )(code2);
  181663. }
  181664. function notBlank(code2) {
  181665. if (self2.containerState.furtherBlankLines || !markdownSpace(code2)) {
  181666. self2.containerState.furtherBlankLines = void 0;
  181667. self2.containerState.initialBlankLine = void 0;
  181668. return notInCurrentItem(code2);
  181669. }
  181670. self2.containerState.furtherBlankLines = void 0;
  181671. self2.containerState.initialBlankLine = void 0;
  181672. return effects.attempt(indentConstruct, ok2, notInCurrentItem)(code2);
  181673. }
  181674. function notInCurrentItem(code2) {
  181675. self2.containerState._closeFlow = true;
  181676. self2.interrupt = void 0;
  181677. return factorySpace(
  181678. effects,
  181679. effects.attempt(list, ok2, nok),
  181680. "linePrefix",
  181681. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  181682. )(code2);
  181683. }
  181684. }
  181685. function tokenizeIndent(effects, ok2, nok) {
  181686. const self2 = this;
  181687. return factorySpace(
  181688. effects,
  181689. afterPrefix,
  181690. "listItemIndent",
  181691. self2.containerState.size + 1
  181692. );
  181693. function afterPrefix(code2) {
  181694. const tail = self2.events[self2.events.length - 1];
  181695. return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self2.containerState.size ? ok2(code2) : nok(code2);
  181696. }
  181697. }
  181698. function tokenizeListEnd(effects) {
  181699. effects.exit(this.containerState.type);
  181700. }
  181701. function tokenizeListItemPrefixWhitespace(effects, ok2, nok) {
  181702. const self2 = this;
  181703. return factorySpace(
  181704. effects,
  181705. afterPrefix,
  181706. "listItemPrefixWhitespace",
  181707. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1
  181708. );
  181709. function afterPrefix(code2) {
  181710. const tail = self2.events[self2.events.length - 1];
  181711. return !markdownSpace(code2) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok2(code2) : nok(code2);
  181712. }
  181713. }
  181714. // node_modules/micromark-core-commonmark/lib/setext-underline.js
  181715. var setextUnderline = {
  181716. name: "setextUnderline",
  181717. tokenize: tokenizeSetextUnderline,
  181718. resolveTo: resolveToSetextUnderline
  181719. };
  181720. function resolveToSetextUnderline(events, context) {
  181721. let index2 = events.length;
  181722. let content3;
  181723. let text5;
  181724. let definition2;
  181725. while (index2--) {
  181726. if (events[index2][0] === "enter") {
  181727. if (events[index2][1].type === "content") {
  181728. content3 = index2;
  181729. break;
  181730. }
  181731. if (events[index2][1].type === "paragraph") {
  181732. text5 = index2;
  181733. }
  181734. } else {
  181735. if (events[index2][1].type === "content") {
  181736. events.splice(index2, 1);
  181737. }
  181738. if (!definition2 && events[index2][1].type === "definition") {
  181739. definition2 = index2;
  181740. }
  181741. }
  181742. }
  181743. const heading2 = {
  181744. type: "setextHeading",
  181745. start: Object.assign({}, events[text5][1].start),
  181746. end: Object.assign({}, events[events.length - 1][1].end)
  181747. };
  181748. events[text5][1].type = "setextHeadingText";
  181749. if (definition2) {
  181750. events.splice(text5, 0, ["enter", heading2, context]);
  181751. events.splice(definition2 + 1, 0, ["exit", events[content3][1], context]);
  181752. events[content3][1].end = Object.assign({}, events[definition2][1].end);
  181753. } else {
  181754. events[content3][1] = heading2;
  181755. }
  181756. events.push(["exit", heading2, context]);
  181757. return events;
  181758. }
  181759. function tokenizeSetextUnderline(effects, ok2, nok) {
  181760. const self2 = this;
  181761. let index2 = self2.events.length;
  181762. let marker;
  181763. let paragraph2;
  181764. while (index2--) {
  181765. if (self2.events[index2][1].type !== "lineEnding" && self2.events[index2][1].type !== "linePrefix" && self2.events[index2][1].type !== "content") {
  181766. paragraph2 = self2.events[index2][1].type === "paragraph";
  181767. break;
  181768. }
  181769. }
  181770. return start3;
  181771. function start3(code2) {
  181772. if (!self2.parser.lazy[self2.now().line] && (self2.interrupt || paragraph2)) {
  181773. effects.enter("setextHeadingLine");
  181774. effects.enter("setextHeadingLineSequence");
  181775. marker = code2;
  181776. return closingSequence(code2);
  181777. }
  181778. return nok(code2);
  181779. }
  181780. function closingSequence(code2) {
  181781. if (code2 === marker) {
  181782. effects.consume(code2);
  181783. return closingSequence;
  181784. }
  181785. effects.exit("setextHeadingLineSequence");
  181786. return factorySpace(effects, closingSequenceEnd, "lineSuffix")(code2);
  181787. }
  181788. function closingSequenceEnd(code2) {
  181789. if (code2 === null || markdownLineEnding(code2)) {
  181790. effects.exit("setextHeadingLine");
  181791. return ok2(code2);
  181792. }
  181793. return nok(code2);
  181794. }
  181795. }
  181796. // node_modules/micromark-extension-mdxjs-esm/lib/syntax.js
  181797. var nextBlankConstruct2 = {
  181798. tokenize: tokenizeNextBlank2,
  181799. partial: true
  181800. };
  181801. var allowedAcornTypes = /* @__PURE__ */ new Set([
  181802. "ExportAllDeclaration",
  181803. "ExportDefaultDeclaration",
  181804. "ExportNamedDeclaration",
  181805. "ImportDeclaration"
  181806. ]);
  181807. function mdxjsEsm(options) {
  181808. const exportImportConstruct = {
  181809. tokenize: tokenizeExportImport,
  181810. concrete: true
  181811. };
  181812. if (!options || !options.acorn || !options.acorn.parse) {
  181813. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  181814. }
  181815. const acorn = options.acorn;
  181816. const acornOptions = Object.assign(
  181817. {
  181818. ecmaVersion: 2020,
  181819. sourceType: "module"
  181820. },
  181821. options.acornOptions
  181822. );
  181823. return {
  181824. flow: {
  181825. [101]: exportImportConstruct,
  181826. [105]: exportImportConstruct
  181827. }
  181828. };
  181829. function tokenizeExportImport(effects, ok2, nok) {
  181830. const self2 = this;
  181831. const definedModuleSpecifiers = self2.parser.definedModuleSpecifiers || (self2.parser.definedModuleSpecifiers = []);
  181832. const eventStart = this.events.length + 1;
  181833. let index2 = 0;
  181834. let buffer2;
  181835. return self2.interrupt ? nok : start3;
  181836. function start3(code2) {
  181837. if (self2.now().column > 1)
  181838. return nok(code2);
  181839. buffer2 = code2 === 101 ? "export" : "import";
  181840. effects.enter("mdxjsEsm");
  181841. effects.enter("mdxjsEsmData");
  181842. return keyword(code2);
  181843. }
  181844. function keyword(code2) {
  181845. if (code2 === buffer2.charCodeAt(index2++)) {
  181846. effects.consume(code2);
  181847. return index2 === buffer2.length ? after : keyword;
  181848. }
  181849. return nok(code2);
  181850. }
  181851. function after(code2) {
  181852. if (unicodeWhitespace(code2)) {
  181853. effects.consume(code2);
  181854. return rest;
  181855. }
  181856. return nok(code2);
  181857. }
  181858. function rest(code2) {
  181859. if (code2 === null) {
  181860. return atEnd(code2);
  181861. }
  181862. if (markdownLineEnding(code2)) {
  181863. return effects.check(nextBlankConstruct2, atEnd, atEol)(code2);
  181864. }
  181865. effects.consume(code2);
  181866. return rest;
  181867. }
  181868. function atEol(code2) {
  181869. effects.exit("mdxjsEsmData");
  181870. return lineStart(code2);
  181871. }
  181872. function lineStart(code2) {
  181873. if (markdownLineEnding(code2)) {
  181874. effects.enter("lineEnding");
  181875. effects.consume(code2);
  181876. effects.exit("lineEnding");
  181877. return lineStart;
  181878. }
  181879. effects.enter("mdxjsEsmData");
  181880. return rest(code2);
  181881. }
  181882. function atEnd(code2) {
  181883. effects.exit("mdxjsEsmData");
  181884. let index3 = -1;
  181885. const result = eventsToAcorn(self2.events.slice(eventStart), {
  181886. acorn,
  181887. acornOptions,
  181888. prefix: definedModuleSpecifiers.length > 0 ? "var " + definedModuleSpecifiers.join(",") + "\n" : ""
  181889. });
  181890. if (code2 !== null && result.swallow) {
  181891. return lineStart(code2);
  181892. }
  181893. if (result.error) {
  181894. throw new VFileMessage(
  181895. "Could not parse import/exports with acorn: " + String(result.error),
  181896. {
  181897. line: result.error.loc.line,
  181898. column: result.error.loc.column + 1,
  181899. offset: result.error.pos
  181900. },
  181901. "micromark-extension-mdxjs-esm:acorn"
  181902. );
  181903. }
  181904. if (definedModuleSpecifiers.length > 0) {
  181905. result.estree.body.shift();
  181906. }
  181907. while (++index3 < result.estree.body.length) {
  181908. const node = result.estree.body[index3];
  181909. if (!allowedAcornTypes.has(node.type)) {
  181910. throw new VFileMessage(
  181911. "Unexpected `" + node.type + "` in code: only import/exports are supported",
  181912. positionFromEstree(node),
  181913. "micromark-extension-mdxjs-esm:non-esm"
  181914. );
  181915. }
  181916. if (node.type === "ImportDeclaration" && !self2.interrupt) {
  181917. let index4 = -1;
  181918. while (++index4 < node.specifiers.length) {
  181919. definedModuleSpecifiers.push(node.specifiers[index4].local.name);
  181920. }
  181921. }
  181922. }
  181923. Object.assign(
  181924. effects.exit("mdxjsEsm"),
  181925. options.addResult ? {
  181926. estree: result.estree
  181927. } : void 0
  181928. );
  181929. return ok2(code2);
  181930. }
  181931. }
  181932. }
  181933. function tokenizeNextBlank2(effects, ok2, nok) {
  181934. return start3;
  181935. function start3(code2) {
  181936. effects.exit("mdxjsEsmData");
  181937. effects.enter("lineEndingBlank");
  181938. effects.consume(code2);
  181939. effects.exit("lineEndingBlank");
  181940. return effects.attempt(blankLine, ok2, nok);
  181941. }
  181942. }
  181943. // node_modules/micromark-extension-mdxjs/index.js
  181944. function mdxjs(options) {
  181945. const settings = Object.assign(
  181946. {
  181947. acorn: Parser.extend((0, import_acorn_jsx.default)()),
  181948. acornOptions: { ecmaVersion: 2020, sourceType: "module" },
  181949. addResult: true
  181950. },
  181951. options
  181952. );
  181953. return combineExtensions([
  181954. mdxjsEsm(settings),
  181955. mdxExpression(settings),
  181956. mdxJsx(settings),
  181957. mdxMd
  181958. ]);
  181959. }
  181960. // node_modules/mdast-util-mdx-expression/index.js
  181961. var mdxExpressionFromMarkdown = {
  181962. enter: {
  181963. mdxFlowExpression: enterMdxFlowExpression,
  181964. mdxTextExpression: enterMdxTextExpression
  181965. },
  181966. exit: {
  181967. mdxFlowExpression: exitMdxExpression,
  181968. mdxFlowExpressionChunk: exitMdxExpressionData,
  181969. mdxTextExpression: exitMdxExpression,
  181970. mdxTextExpressionChunk: exitMdxExpressionData
  181971. }
  181972. };
  181973. var mdxExpressionToMarkdown = {
  181974. handlers: {
  181975. mdxFlowExpression: handleMdxExpression,
  181976. mdxTextExpression: handleMdxExpression
  181977. },
  181978. unsafe: [
  181979. { character: "{", inConstruct: ["phrasing"] },
  181980. { atBreak: true, character: "{" }
  181981. ]
  181982. };
  181983. function enterMdxFlowExpression(token) {
  181984. this.enter({ type: "mdxFlowExpression", value: "" }, token);
  181985. this.buffer();
  181986. }
  181987. function enterMdxTextExpression(token) {
  181988. this.enter({ type: "mdxTextExpression", value: "" }, token);
  181989. this.buffer();
  181990. }
  181991. function exitMdxExpression(token) {
  181992. const value = this.resume();
  181993. const estree = token.estree;
  181994. const node = this.exit(token);
  181995. node.value = value;
  181996. if (estree) {
  181997. node.data = { estree };
  181998. }
  181999. }
  182000. function exitMdxExpressionData(token) {
  182001. this.config.enter.data.call(this, token);
  182002. this.config.exit.data.call(this, token);
  182003. }
  182004. function handleMdxExpression(node) {
  182005. const value = node.value || "";
  182006. return "{" + value + "}";
  182007. }
  182008. // node_modules/ccount/index.js
  182009. function ccount(value, character) {
  182010. const source = String(value);
  182011. if (typeof character !== "string") {
  182012. throw new TypeError("Expected character");
  182013. }
  182014. let count = 0;
  182015. let index2 = source.indexOf(character);
  182016. while (index2 !== -1) {
  182017. count++;
  182018. index2 = source.indexOf(character, index2 + character.length);
  182019. }
  182020. return count;
  182021. }
  182022. // node_modules/character-entities-legacy/index.js
  182023. var characterEntitiesLegacy = [
  182024. "AElig",
  182025. "AMP",
  182026. "Aacute",
  182027. "Acirc",
  182028. "Agrave",
  182029. "Aring",
  182030. "Atilde",
  182031. "Auml",
  182032. "COPY",
  182033. "Ccedil",
  182034. "ETH",
  182035. "Eacute",
  182036. "Ecirc",
  182037. "Egrave",
  182038. "Euml",
  182039. "GT",
  182040. "Iacute",
  182041. "Icirc",
  182042. "Igrave",
  182043. "Iuml",
  182044. "LT",
  182045. "Ntilde",
  182046. "Oacute",
  182047. "Ocirc",
  182048. "Ograve",
  182049. "Oslash",
  182050. "Otilde",
  182051. "Ouml",
  182052. "QUOT",
  182053. "REG",
  182054. "THORN",
  182055. "Uacute",
  182056. "Ucirc",
  182057. "Ugrave",
  182058. "Uuml",
  182059. "Yacute",
  182060. "aacute",
  182061. "acirc",
  182062. "acute",
  182063. "aelig",
  182064. "agrave",
  182065. "amp",
  182066. "aring",
  182067. "atilde",
  182068. "auml",
  182069. "brvbar",
  182070. "ccedil",
  182071. "cedil",
  182072. "cent",
  182073. "copy",
  182074. "curren",
  182075. "deg",
  182076. "divide",
  182077. "eacute",
  182078. "ecirc",
  182079. "egrave",
  182080. "eth",
  182081. "euml",
  182082. "frac12",
  182083. "frac14",
  182084. "frac34",
  182085. "gt",
  182086. "iacute",
  182087. "icirc",
  182088. "iexcl",
  182089. "igrave",
  182090. "iquest",
  182091. "iuml",
  182092. "laquo",
  182093. "lt",
  182094. "macr",
  182095. "micro",
  182096. "middot",
  182097. "nbsp",
  182098. "not",
  182099. "ntilde",
  182100. "oacute",
  182101. "ocirc",
  182102. "ograve",
  182103. "ordf",
  182104. "ordm",
  182105. "oslash",
  182106. "otilde",
  182107. "ouml",
  182108. "para",
  182109. "plusmn",
  182110. "pound",
  182111. "quot",
  182112. "raquo",
  182113. "reg",
  182114. "sect",
  182115. "shy",
  182116. "sup1",
  182117. "sup2",
  182118. "sup3",
  182119. "szlig",
  182120. "thorn",
  182121. "times",
  182122. "uacute",
  182123. "ucirc",
  182124. "ugrave",
  182125. "uml",
  182126. "uuml",
  182127. "yacute",
  182128. "yen",
  182129. "yuml"
  182130. ];
  182131. // node_modules/character-reference-invalid/index.js
  182132. var characterReferenceInvalid = {
  182133. 0: "\uFFFD",
  182134. 128: "\u20AC",
  182135. 130: "\u201A",
  182136. 131: "\u0192",
  182137. 132: "\u201E",
  182138. 133: "\u2026",
  182139. 134: "\u2020",
  182140. 135: "\u2021",
  182141. 136: "\u02C6",
  182142. 137: "\u2030",
  182143. 138: "\u0160",
  182144. 139: "\u2039",
  182145. 140: "\u0152",
  182146. 142: "\u017D",
  182147. 145: "\u2018",
  182148. 146: "\u2019",
  182149. 147: "\u201C",
  182150. 148: "\u201D",
  182151. 149: "\u2022",
  182152. 150: "\u2013",
  182153. 151: "\u2014",
  182154. 152: "\u02DC",
  182155. 153: "\u2122",
  182156. 154: "\u0161",
  182157. 155: "\u203A",
  182158. 156: "\u0153",
  182159. 158: "\u017E",
  182160. 159: "\u0178"
  182161. };
  182162. // node_modules/is-decimal/index.js
  182163. function isDecimal(character) {
  182164. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  182165. return code2 >= 48 && code2 <= 57;
  182166. }
  182167. // node_modules/is-hexadecimal/index.js
  182168. function isHexadecimal(character) {
  182169. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  182170. return code2 >= 97 && code2 <= 102 || code2 >= 65 && code2 <= 70 || code2 >= 48 && code2 <= 57;
  182171. }
  182172. // node_modules/is-alphabetical/index.js
  182173. function isAlphabetical(character) {
  182174. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  182175. return code2 >= 97 && code2 <= 122 || code2 >= 65 && code2 <= 90;
  182176. }
  182177. // node_modules/is-alphanumerical/index.js
  182178. function isAlphanumerical(character) {
  182179. return isAlphabetical(character) || isDecimal(character);
  182180. }
  182181. // node_modules/parse-entities/lib/index.js
  182182. var fromCharCode = String.fromCharCode;
  182183. var messages = [
  182184. "",
  182185. "Named character references must be terminated by a semicolon",
  182186. "Numeric character references must be terminated by a semicolon",
  182187. "Named character references cannot be empty",
  182188. "Numeric character references cannot be empty",
  182189. "Named character references must be known",
  182190. "Numeric character references cannot be disallowed",
  182191. "Numeric character references cannot be outside the permissible Unicode range"
  182192. ];
  182193. function parseEntities(value, options = {}) {
  182194. const additional = typeof options.additional === "string" ? options.additional.charCodeAt(0) : options.additional;
  182195. const result = [];
  182196. let index2 = 0;
  182197. let lines = -1;
  182198. let queue = "";
  182199. let point3;
  182200. let indent;
  182201. if (options.position) {
  182202. if ("start" in options.position || "indent" in options.position) {
  182203. indent = options.position.indent;
  182204. point3 = options.position.start;
  182205. } else {
  182206. point3 = options.position;
  182207. }
  182208. }
  182209. let line = (point3 ? point3.line : 0) || 1;
  182210. let column = (point3 ? point3.column : 0) || 1;
  182211. let previous2 = now();
  182212. let character;
  182213. index2--;
  182214. while (++index2 <= value.length) {
  182215. if (character === 10) {
  182216. column = (indent ? indent[lines] : 0) || 1;
  182217. }
  182218. character = value.charCodeAt(index2);
  182219. if (character === 38) {
  182220. const following = value.charCodeAt(index2 + 1);
  182221. if (following === 9 || following === 10 || following === 12 || following === 32 || following === 38 || following === 60 || Number.isNaN(following) || additional && following === additional) {
  182222. queue += fromCharCode(character);
  182223. column++;
  182224. continue;
  182225. }
  182226. const start3 = index2 + 1;
  182227. let begin = start3;
  182228. let end = start3;
  182229. let type;
  182230. if (following === 35) {
  182231. end = ++begin;
  182232. const following2 = value.charCodeAt(end);
  182233. if (following2 === 88 || following2 === 120) {
  182234. type = "hexadecimal";
  182235. end = ++begin;
  182236. } else {
  182237. type = "decimal";
  182238. }
  182239. } else {
  182240. type = "named";
  182241. }
  182242. let characterReferenceCharacters = "";
  182243. let characterReference2 = "";
  182244. let characters = "";
  182245. const test = type === "named" ? isAlphanumerical : type === "decimal" ? isDecimal : isHexadecimal;
  182246. end--;
  182247. while (++end <= value.length) {
  182248. const following2 = value.charCodeAt(end);
  182249. if (!test(following2)) {
  182250. break;
  182251. }
  182252. characters += fromCharCode(following2);
  182253. if (type === "named" && characterEntitiesLegacy.includes(characters)) {
  182254. characterReferenceCharacters = characters;
  182255. characterReference2 = decodeNamedCharacterReference(characters);
  182256. }
  182257. }
  182258. let terminated = value.charCodeAt(end) === 59;
  182259. if (terminated) {
  182260. end++;
  182261. const namedReference = type === "named" ? decodeNamedCharacterReference(characters) : false;
  182262. if (namedReference) {
  182263. characterReferenceCharacters = characters;
  182264. characterReference2 = namedReference;
  182265. }
  182266. }
  182267. let diff = 1 + end - start3;
  182268. let reference = "";
  182269. if (!terminated && options.nonTerminated === false) {
  182270. } else if (!characters) {
  182271. if (type !== "named") {
  182272. warning(4, diff);
  182273. }
  182274. } else if (type === "named") {
  182275. if (terminated && !characterReference2) {
  182276. warning(5, 1);
  182277. } else {
  182278. if (characterReferenceCharacters !== characters) {
  182279. end = begin + characterReferenceCharacters.length;
  182280. diff = 1 + end - begin;
  182281. terminated = false;
  182282. }
  182283. if (!terminated) {
  182284. const reason = characterReferenceCharacters ? 1 : 3;
  182285. if (options.attribute) {
  182286. const following2 = value.charCodeAt(end);
  182287. if (following2 === 61) {
  182288. warning(reason, diff);
  182289. characterReference2 = "";
  182290. } else if (isAlphanumerical(following2)) {
  182291. characterReference2 = "";
  182292. } else {
  182293. warning(reason, diff);
  182294. }
  182295. } else {
  182296. warning(reason, diff);
  182297. }
  182298. }
  182299. }
  182300. reference = characterReference2;
  182301. } else {
  182302. if (!terminated) {
  182303. warning(2, diff);
  182304. }
  182305. let referenceCode = Number.parseInt(
  182306. characters,
  182307. type === "hexadecimal" ? 16 : 10
  182308. );
  182309. if (prohibited(referenceCode)) {
  182310. warning(7, diff);
  182311. reference = fromCharCode(65533);
  182312. } else if (referenceCode in characterReferenceInvalid) {
  182313. warning(6, diff);
  182314. reference = characterReferenceInvalid[referenceCode];
  182315. } else {
  182316. let output = "";
  182317. if (disallowed(referenceCode)) {
  182318. warning(6, diff);
  182319. }
  182320. if (referenceCode > 65535) {
  182321. referenceCode -= 65536;
  182322. output += fromCharCode(referenceCode >>> (10 & 1023) | 55296);
  182323. referenceCode = 56320 | referenceCode & 1023;
  182324. }
  182325. reference = output + fromCharCode(referenceCode);
  182326. }
  182327. }
  182328. if (reference) {
  182329. flush();
  182330. previous2 = now();
  182331. index2 = end - 1;
  182332. column += end - start3 + 1;
  182333. result.push(reference);
  182334. const next = now();
  182335. next.offset++;
  182336. if (options.reference) {
  182337. options.reference.call(
  182338. options.referenceContext,
  182339. reference,
  182340. { start: previous2, end: next },
  182341. value.slice(start3 - 1, end)
  182342. );
  182343. }
  182344. previous2 = next;
  182345. } else {
  182346. characters = value.slice(start3 - 1, end);
  182347. queue += characters;
  182348. column += characters.length;
  182349. index2 = end - 1;
  182350. }
  182351. } else {
  182352. if (character === 10) {
  182353. line++;
  182354. lines++;
  182355. column = 0;
  182356. }
  182357. if (Number.isNaN(character)) {
  182358. flush();
  182359. } else {
  182360. queue += fromCharCode(character);
  182361. column++;
  182362. }
  182363. }
  182364. }
  182365. return result.join("");
  182366. function now() {
  182367. return {
  182368. line,
  182369. column,
  182370. offset: index2 + ((point3 ? point3.offset : 0) || 0)
  182371. };
  182372. }
  182373. function warning(code2, offset2) {
  182374. let position3;
  182375. if (options.warning) {
  182376. position3 = now();
  182377. position3.column += offset2;
  182378. position3.offset += offset2;
  182379. options.warning.call(
  182380. options.warningContext,
  182381. messages[code2],
  182382. position3,
  182383. code2
  182384. );
  182385. }
  182386. }
  182387. function flush() {
  182388. if (queue) {
  182389. result.push(queue);
  182390. if (options.text) {
  182391. options.text.call(options.textContext, queue, {
  182392. start: previous2,
  182393. end: now()
  182394. });
  182395. }
  182396. queue = "";
  182397. }
  182398. }
  182399. }
  182400. function prohibited(code2) {
  182401. return code2 >= 55296 && code2 <= 57343 || code2 > 1114111;
  182402. }
  182403. function disallowed(code2) {
  182404. return code2 >= 1 && code2 <= 8 || code2 === 11 || code2 >= 13 && code2 <= 31 || code2 >= 127 && code2 <= 159 || code2 >= 64976 && code2 <= 65007 || (code2 & 65535) === 65535 || (code2 & 65535) === 65534;
  182405. }
  182406. // node_modules/stringify-entities/lib/core.js
  182407. function core(value, options) {
  182408. value = value.replace(
  182409. options.subset ? charactersToExpression(options.subset) : /["&'<>`]/g,
  182410. basic
  182411. );
  182412. if (options.subset || options.escapeOnly) {
  182413. return value;
  182414. }
  182415. return value.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, surrogate).replace(
  182416. /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,
  182417. basic
  182418. );
  182419. function surrogate(pair, index2, all4) {
  182420. return options.format(
  182421. (pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536,
  182422. all4.charCodeAt(index2 + 2),
  182423. options
  182424. );
  182425. }
  182426. function basic(character, index2, all4) {
  182427. return options.format(
  182428. character.charCodeAt(0),
  182429. all4.charCodeAt(index2 + 1),
  182430. options
  182431. );
  182432. }
  182433. }
  182434. function charactersToExpression(subset) {
  182435. const groups = [];
  182436. let index2 = -1;
  182437. while (++index2 < subset.length) {
  182438. groups.push(subset[index2].replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"));
  182439. }
  182440. return new RegExp("(?:" + groups.join("|") + ")", "g");
  182441. }
  182442. // node_modules/stringify-entities/lib/util/format-basic.js
  182443. function formatBasic(code2) {
  182444. return "&#x" + code2.toString(16).toUpperCase() + ";";
  182445. }
  182446. // node_modules/stringify-entities/lib/index.js
  182447. function stringifyEntitiesLight(value, options) {
  182448. return core(value, Object.assign({ format: formatBasic }, options));
  182449. }
  182450. // node_modules/mdast-util-to-markdown/lib/util/track.js
  182451. function track(options_) {
  182452. const options = options_ || {};
  182453. const now = options.now || {};
  182454. let lineShift = options.lineShift || 0;
  182455. let line = now.line || 1;
  182456. let column = now.column || 1;
  182457. return { move, current: current2, shift };
  182458. function current2() {
  182459. return { now: { line, column }, lineShift };
  182460. }
  182461. function shift(value) {
  182462. lineShift += value;
  182463. }
  182464. function move(value = "") {
  182465. const chunks = value.split(/\r?\n|\r/g);
  182466. const tail = chunks[chunks.length - 1];
  182467. line += chunks.length - 1;
  182468. column = chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift;
  182469. return value;
  182470. }
  182471. }
  182472. // node_modules/mdast-util-to-markdown/lib/util/container-flow.js
  182473. function containerFlow(parent, context, safeOptions) {
  182474. const indexStack = context.indexStack;
  182475. const children = parent.children || [];
  182476. const tracker = track(safeOptions);
  182477. const results = [];
  182478. let index2 = -1;
  182479. indexStack.push(-1);
  182480. while (++index2 < children.length) {
  182481. const child = children[index2];
  182482. indexStack[indexStack.length - 1] = index2;
  182483. results.push(
  182484. tracker.move(
  182485. context.handle(child, parent, context, {
  182486. before: "\n",
  182487. after: "\n",
  182488. ...tracker.current()
  182489. })
  182490. )
  182491. );
  182492. if (child.type !== "list") {
  182493. context.bulletLastUsed = void 0;
  182494. }
  182495. if (index2 < children.length - 1) {
  182496. results.push(tracker.move(between(child, children[index2 + 1])));
  182497. }
  182498. }
  182499. indexStack.pop();
  182500. return results.join("");
  182501. function between(left, right) {
  182502. let index3 = context.join.length;
  182503. while (index3--) {
  182504. const result = context.join[index3](left, right, parent, context);
  182505. if (result === true || result === 1) {
  182506. break;
  182507. }
  182508. if (typeof result === "number") {
  182509. return "\n".repeat(1 + result);
  182510. }
  182511. if (result === false) {
  182512. return "\n\n<!---->\n\n";
  182513. }
  182514. }
  182515. return "\n\n";
  182516. }
  182517. }
  182518. // node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
  182519. function containerPhrasing(parent, context, safeOptions) {
  182520. const indexStack = context.indexStack;
  182521. const children = parent.children || [];
  182522. const results = [];
  182523. let index2 = -1;
  182524. let before = safeOptions.before;
  182525. indexStack.push(-1);
  182526. let tracker = track(safeOptions);
  182527. while (++index2 < children.length) {
  182528. const child = children[index2];
  182529. let after;
  182530. indexStack[indexStack.length - 1] = index2;
  182531. if (index2 + 1 < children.length) {
  182532. let handle = context.handle.handlers[children[index2 + 1].type];
  182533. if (handle && handle.peek)
  182534. handle = handle.peek;
  182535. after = handle ? handle(children[index2 + 1], parent, context, {
  182536. before: "",
  182537. after: "",
  182538. ...tracker.current()
  182539. }).charAt(0) : "";
  182540. } else {
  182541. after = safeOptions.after;
  182542. }
  182543. if (results.length > 0 && (before === "\r" || before === "\n") && child.type === "html") {
  182544. results[results.length - 1] = results[results.length - 1].replace(
  182545. /(\r?\n|\r)$/,
  182546. " "
  182547. );
  182548. before = " ";
  182549. tracker = track(safeOptions);
  182550. tracker.move(results.join(""));
  182551. }
  182552. results.push(
  182553. tracker.move(
  182554. context.handle(child, parent, context, {
  182555. ...tracker.current(),
  182556. before,
  182557. after
  182558. })
  182559. )
  182560. );
  182561. before = results[results.length - 1].slice(-1);
  182562. }
  182563. indexStack.pop();
  182564. return results.join("");
  182565. }
  182566. // node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
  182567. var eol = /\r?\n|\r/g;
  182568. function indentLines(value, map) {
  182569. const result = [];
  182570. let start3 = 0;
  182571. let line = 0;
  182572. let match;
  182573. while (match = eol.exec(value)) {
  182574. one3(value.slice(start3, match.index));
  182575. result.push(match[0]);
  182576. start3 = match.index + match[0].length;
  182577. line++;
  182578. }
  182579. one3(value.slice(start3));
  182580. return result.join("");
  182581. function one3(value2) {
  182582. result.push(map(value2, line, !value2));
  182583. }
  182584. }
  182585. // node_modules/mdast-util-mdx-jsx/lib/index.js
  182586. function mdxJsxFromMarkdown() {
  182587. return {
  182588. canContainEols: ["mdxJsxTextElement"],
  182589. enter: {
  182590. mdxJsxFlowTag: enterMdxJsxTag,
  182591. mdxJsxFlowTagClosingMarker: enterMdxJsxTagClosingMarker,
  182592. mdxJsxFlowTagAttribute: enterMdxJsxTagAttribute,
  182593. mdxJsxFlowTagExpressionAttribute: enterMdxJsxTagExpressionAttribute,
  182594. mdxJsxFlowTagAttributeValueLiteral: buffer2,
  182595. mdxJsxFlowTagAttributeValueExpression: buffer2,
  182596. mdxJsxFlowTagSelfClosingMarker: enterMdxJsxTagSelfClosingMarker,
  182597. mdxJsxTextTag: enterMdxJsxTag,
  182598. mdxJsxTextTagClosingMarker: enterMdxJsxTagClosingMarker,
  182599. mdxJsxTextTagAttribute: enterMdxJsxTagAttribute,
  182600. mdxJsxTextTagExpressionAttribute: enterMdxJsxTagExpressionAttribute,
  182601. mdxJsxTextTagAttributeValueLiteral: buffer2,
  182602. mdxJsxTextTagAttributeValueExpression: buffer2,
  182603. mdxJsxTextTagSelfClosingMarker: enterMdxJsxTagSelfClosingMarker
  182604. },
  182605. exit: {
  182606. mdxJsxFlowTagClosingMarker: exitMdxJsxTagClosingMarker,
  182607. mdxJsxFlowTagNamePrimary: exitMdxJsxTagNamePrimary,
  182608. mdxJsxFlowTagNameMember: exitMdxJsxTagNameMember,
  182609. mdxJsxFlowTagNameLocal: exitMdxJsxTagNameLocal,
  182610. mdxJsxFlowTagExpressionAttribute: exitMdxJsxTagExpressionAttribute,
  182611. mdxJsxFlowTagExpressionAttributeValue: data2,
  182612. mdxJsxFlowTagAttributeNamePrimary: exitMdxJsxTagAttributeNamePrimary,
  182613. mdxJsxFlowTagAttributeNameLocal: exitMdxJsxTagAttributeNameLocal,
  182614. mdxJsxFlowTagAttributeValueLiteral: exitMdxJsxTagAttributeValueLiteral,
  182615. mdxJsxFlowTagAttributeValueLiteralValue: data2,
  182616. mdxJsxFlowTagAttributeValueExpression: exitMdxJsxTagAttributeValueExpression,
  182617. mdxJsxFlowTagAttributeValueExpressionValue: data2,
  182618. mdxJsxFlowTagSelfClosingMarker: exitMdxJsxTagSelfClosingMarker,
  182619. mdxJsxFlowTag: exitMdxJsxTag,
  182620. mdxJsxTextTagClosingMarker: exitMdxJsxTagClosingMarker,
  182621. mdxJsxTextTagNamePrimary: exitMdxJsxTagNamePrimary,
  182622. mdxJsxTextTagNameMember: exitMdxJsxTagNameMember,
  182623. mdxJsxTextTagNameLocal: exitMdxJsxTagNameLocal,
  182624. mdxJsxTextTagExpressionAttribute: exitMdxJsxTagExpressionAttribute,
  182625. mdxJsxTextTagExpressionAttributeValue: data2,
  182626. mdxJsxTextTagAttributeNamePrimary: exitMdxJsxTagAttributeNamePrimary,
  182627. mdxJsxTextTagAttributeNameLocal: exitMdxJsxTagAttributeNameLocal,
  182628. mdxJsxTextTagAttributeValueLiteral: exitMdxJsxTagAttributeValueLiteral,
  182629. mdxJsxTextTagAttributeValueLiteralValue: data2,
  182630. mdxJsxTextTagAttributeValueExpression: exitMdxJsxTagAttributeValueExpression,
  182631. mdxJsxTextTagAttributeValueExpressionValue: data2,
  182632. mdxJsxTextTagSelfClosingMarker: exitMdxJsxTagSelfClosingMarker,
  182633. mdxJsxTextTag: exitMdxJsxTag
  182634. }
  182635. };
  182636. function buffer2() {
  182637. this.buffer();
  182638. }
  182639. function data2(token) {
  182640. this.config.enter.data.call(this, token);
  182641. this.config.exit.data.call(this, token);
  182642. }
  182643. function enterMdxJsxTag(token) {
  182644. const tag = { name: null, attributes: [], start: token.start, end: token.end };
  182645. if (!this.getData("mdxJsxTagStack"))
  182646. this.setData("mdxJsxTagStack", []);
  182647. this.setData("mdxJsxTag", tag);
  182648. this.buffer();
  182649. }
  182650. function enterMdxJsxTagClosingMarker(token) {
  182651. const stack = this.getData("mdxJsxTagStack");
  182652. if (stack.length === 0) {
  182653. throw new VFileMessage(
  182654. "Unexpected closing slash `/` in tag, expected an open tag first",
  182655. { start: token.start, end: token.end },
  182656. "mdast-util-mdx-jsx:unexpected-closing-slash"
  182657. );
  182658. }
  182659. }
  182660. function enterMdxJsxTagAnyAttribute(token) {
  182661. const tag = this.getData("mdxJsxTag");
  182662. if (tag.close) {
  182663. throw new VFileMessage(
  182664. "Unexpected attribute in closing tag, expected the end of the tag",
  182665. { start: token.start, end: token.end },
  182666. "mdast-util-mdx-jsx:unexpected-attribute"
  182667. );
  182668. }
  182669. }
  182670. function enterMdxJsxTagSelfClosingMarker(token) {
  182671. const tag = this.getData("mdxJsxTag");
  182672. if (tag.close) {
  182673. throw new VFileMessage(
  182674. "Unexpected self-closing slash `/` in closing tag, expected the end of the tag",
  182675. { start: token.start, end: token.end },
  182676. "mdast-util-mdx-jsx:unexpected-self-closing-slash"
  182677. );
  182678. }
  182679. }
  182680. function exitMdxJsxTagClosingMarker() {
  182681. const tag = this.getData("mdxJsxTag");
  182682. tag.close = true;
  182683. }
  182684. function exitMdxJsxTagNamePrimary(token) {
  182685. const tag = this.getData("mdxJsxTag");
  182686. tag.name = this.sliceSerialize(token);
  182687. }
  182688. function exitMdxJsxTagNameMember(token) {
  182689. const tag = this.getData("mdxJsxTag");
  182690. tag.name += "." + this.sliceSerialize(token);
  182691. }
  182692. function exitMdxJsxTagNameLocal(token) {
  182693. const tag = this.getData("mdxJsxTag");
  182694. tag.name += ":" + this.sliceSerialize(token);
  182695. }
  182696. function enterMdxJsxTagAttribute(token) {
  182697. const tag = this.getData("mdxJsxTag");
  182698. enterMdxJsxTagAnyAttribute.call(this, token);
  182699. tag.attributes.push({ type: "mdxJsxAttribute", name: "", value: null });
  182700. }
  182701. function enterMdxJsxTagExpressionAttribute(token) {
  182702. const tag = this.getData("mdxJsxTag");
  182703. enterMdxJsxTagAnyAttribute.call(this, token);
  182704. tag.attributes.push({ type: "mdxJsxExpressionAttribute", value: "" });
  182705. this.buffer();
  182706. }
  182707. function exitMdxJsxTagExpressionAttribute(token) {
  182708. const tag = this.getData("mdxJsxTag");
  182709. const tail = tag.attributes[tag.attributes.length - 1];
  182710. const estree = token.estree;
  182711. tail.value = this.resume();
  182712. if (estree) {
  182713. tail.data = { estree };
  182714. }
  182715. }
  182716. function exitMdxJsxTagAttributeNamePrimary(token) {
  182717. const tag = this.getData("mdxJsxTag");
  182718. const node = tag.attributes[tag.attributes.length - 1];
  182719. node.name = this.sliceSerialize(token);
  182720. }
  182721. function exitMdxJsxTagAttributeNameLocal(token) {
  182722. const tag = this.getData("mdxJsxTag");
  182723. const node = tag.attributes[tag.attributes.length - 1];
  182724. node.name += ":" + this.sliceSerialize(token);
  182725. }
  182726. function exitMdxJsxTagAttributeValueLiteral() {
  182727. const tag = this.getData("mdxJsxTag");
  182728. tag.attributes[tag.attributes.length - 1].value = parseEntities(
  182729. this.resume(),
  182730. { nonTerminated: false }
  182731. );
  182732. }
  182733. function exitMdxJsxTagAttributeValueExpression(token) {
  182734. const tag = this.getData("mdxJsxTag");
  182735. const tail = tag.attributes[tag.attributes.length - 1];
  182736. const node = { type: "mdxJsxAttributeValueExpression", value: this.resume() };
  182737. const estree = token.estree;
  182738. if (estree) {
  182739. node.data = { estree };
  182740. }
  182741. tail.value = node;
  182742. }
  182743. function exitMdxJsxTagSelfClosingMarker() {
  182744. const tag = this.getData("mdxJsxTag");
  182745. tag.selfClosing = true;
  182746. }
  182747. function exitMdxJsxTag(token) {
  182748. const tag = this.getData("mdxJsxTag");
  182749. const stack = this.getData("mdxJsxTagStack");
  182750. const tail = stack[stack.length - 1];
  182751. if (tag.close && tail.name !== tag.name) {
  182752. throw new VFileMessage(
  182753. "Unexpected closing tag `" + serializeAbbreviatedTag(tag) + "`, expected corresponding closing tag for `" + serializeAbbreviatedTag(tail) + "` (" + stringifyPosition(tail) + ")",
  182754. { start: token.start, end: token.end },
  182755. "mdast-util-mdx-jsx:end-tag-mismatch"
  182756. );
  182757. }
  182758. this.resume();
  182759. if (tag.close) {
  182760. stack.pop();
  182761. } else {
  182762. this.enter(
  182763. {
  182764. type: token.type === "mdxJsxTextTag" ? "mdxJsxTextElement" : "mdxJsxFlowElement",
  182765. name: tag.name,
  182766. attributes: tag.attributes,
  182767. children: []
  182768. },
  182769. token,
  182770. onErrorRightIsTag
  182771. );
  182772. }
  182773. if (tag.selfClosing || tag.close) {
  182774. this.exit(token, onErrorLeftIsTag);
  182775. } else {
  182776. stack.push(tag);
  182777. }
  182778. }
  182779. function onErrorRightIsTag(closing, open) {
  182780. const tag = this.getData("mdxJsxTag");
  182781. const place = closing ? " before the end of `" + closing.type + "`" : "";
  182782. const position3 = closing ? { start: closing.start, end: closing.end } : void 0;
  182783. throw new VFileMessage(
  182784. "Expected a closing tag for `" + serializeAbbreviatedTag(tag) + "` (" + stringifyPosition({ start: open.start, end: open.end }) + ")" + place,
  182785. position3,
  182786. "mdast-util-mdx-jsx:end-tag-mismatch"
  182787. );
  182788. }
  182789. function onErrorLeftIsTag(a, b) {
  182790. const tag = this.getData("mdxJsxTag");
  182791. throw new VFileMessage(
  182792. "Expected the closing tag `" + serializeAbbreviatedTag(tag) + "` either after the end of `" + b.type + "` (" + stringifyPosition(b.end) + ") or another opening tag after the start of `" + b.type + "` (" + stringifyPosition(b.start) + ")",
  182793. { start: a.start, end: a.end },
  182794. "mdast-util-mdx-jsx:end-tag-mismatch"
  182795. );
  182796. }
  182797. function serializeAbbreviatedTag(tag) {
  182798. return "<" + (tag.close ? "/" : "") + (tag.name || "") + ">";
  182799. }
  182800. }
  182801. function mdxJsxToMarkdown(options = {}) {
  182802. const {
  182803. quote = '"',
  182804. quoteSmart,
  182805. tightSelfClosing,
  182806. printWidth = Number.POSITIVE_INFINITY
  182807. } = options;
  182808. const alternative = quote === '"' ? "'" : '"';
  182809. if (quote !== '"' && quote !== "'") {
  182810. throw new Error(
  182811. "Cannot serialize attribute values with `" + quote + "` for `options.quote`, expected `\"`, or `'`"
  182812. );
  182813. }
  182814. mdxElement.peek = peekElement;
  182815. return {
  182816. handlers: {
  182817. mdxJsxFlowElement: mdxElement,
  182818. mdxJsxTextElement: mdxElement
  182819. },
  182820. unsafe: [
  182821. { character: "<", inConstruct: ["phrasing"] },
  182822. { atBreak: true, character: "<" }
  182823. ],
  182824. fences: true,
  182825. resourceLink: true
  182826. };
  182827. function mdxElement(node, _, context, safeOptions) {
  182828. const tracker = track(safeOptions);
  182829. const selfClosing = node.name && (!node.children || node.children.length === 0);
  182830. const exit2 = context.enter(node.type);
  182831. let index2 = -1;
  182832. const serializedAttributes = [];
  182833. let value = tracker.move("<" + (node.name || ""));
  182834. if (node.attributes && node.attributes.length > 0) {
  182835. if (!node.name) {
  182836. throw new Error("Cannot serialize fragment w/ attributes");
  182837. }
  182838. while (++index2 < node.attributes.length) {
  182839. const attribute = node.attributes[index2];
  182840. let result;
  182841. if (attribute.type === "mdxJsxExpressionAttribute") {
  182842. result = "{" + (attribute.value || "") + "}";
  182843. } else {
  182844. if (!attribute.name) {
  182845. throw new Error("Cannot serialize attribute w/o name");
  182846. }
  182847. const value2 = attribute.value;
  182848. const left = attribute.name;
  182849. let right = "";
  182850. if (value2 === void 0 || value2 === null) {
  182851. } else if (typeof value2 === "object") {
  182852. right = "{" + (value2.value || "") + "}";
  182853. } else {
  182854. const appliedQuote = quoteSmart && ccount(value2, quote) > ccount(value2, alternative) ? alternative : quote;
  182855. right = appliedQuote + stringifyEntitiesLight(value2, { subset: [appliedQuote] }) + appliedQuote;
  182856. }
  182857. result = left + (right ? "=" : "") + right;
  182858. }
  182859. serializedAttributes.push(result);
  182860. }
  182861. }
  182862. let attributesOnTheirOwnLine = false;
  182863. const attributesOnOneLine = serializedAttributes.join(" ");
  182864. if (node.type === "mdxJsxFlowElement" && (/\r?\n|\r/.test(attributesOnOneLine) || tracker.current().now.column + attributesOnOneLine.length + (selfClosing ? tightSelfClosing ? 2 : 3 : 1) > printWidth)) {
  182865. attributesOnTheirOwnLine = true;
  182866. }
  182867. if (attributesOnTheirOwnLine) {
  182868. value += tracker.move(
  182869. "\n" + indentLines(serializedAttributes.join("\n"), map)
  182870. );
  182871. } else if (attributesOnOneLine) {
  182872. value += tracker.move(" " + attributesOnOneLine);
  182873. }
  182874. if (attributesOnTheirOwnLine) {
  182875. value += tracker.move("\n");
  182876. }
  182877. if (selfClosing) {
  182878. value += tracker.move(
  182879. (tightSelfClosing || attributesOnTheirOwnLine ? "" : " ") + "/"
  182880. );
  182881. }
  182882. value += tracker.move(">");
  182883. if (node.children && node.children.length > 0) {
  182884. if (node.type === "mdxJsxFlowElement") {
  182885. tracker.shift(2);
  182886. value += tracker.move("\n");
  182887. value += tracker.move(
  182888. indentLines(containerFlow(node, context, tracker.current()), map)
  182889. );
  182890. value += tracker.move("\n");
  182891. } else {
  182892. value += tracker.move(
  182893. containerPhrasing(node, context, {
  182894. ...tracker.current(),
  182895. before: "<",
  182896. after: ">"
  182897. })
  182898. );
  182899. }
  182900. }
  182901. if (!selfClosing) {
  182902. value += tracker.move("</" + (node.name || "") + ">");
  182903. }
  182904. exit2();
  182905. return value;
  182906. }
  182907. function map(line, _, blank) {
  182908. return (blank ? "" : " ") + line;
  182909. }
  182910. function peekElement() {
  182911. return "<";
  182912. }
  182913. }
  182914. // node_modules/mdast-util-mdxjs-esm/index.js
  182915. var mdxjsEsmFromMarkdown = {
  182916. enter: { mdxjsEsm: enterMdxjsEsm },
  182917. exit: { mdxjsEsm: exitMdxjsEsm, mdxjsEsmData: exitMdxjsEsmData }
  182918. };
  182919. var mdxjsEsmToMarkdown = { handlers: { mdxjsEsm: handleMdxjsEsm } };
  182920. function enterMdxjsEsm(token) {
  182921. this.enter({ type: "mdxjsEsm", value: "" }, token);
  182922. this.buffer();
  182923. }
  182924. function exitMdxjsEsm(token) {
  182925. const value = this.resume();
  182926. const node = this.exit(token);
  182927. const estree = token.estree;
  182928. node.value = value;
  182929. if (estree) {
  182930. node.data = { estree };
  182931. }
  182932. }
  182933. function exitMdxjsEsmData(token) {
  182934. this.config.enter.data.call(this, token);
  182935. this.config.exit.data.call(this, token);
  182936. }
  182937. function handleMdxjsEsm(node) {
  182938. return node.value || "";
  182939. }
  182940. // node_modules/mdast-util-mdx/index.js
  182941. function mdxFromMarkdown() {
  182942. return [mdxExpressionFromMarkdown, mdxJsxFromMarkdown(), mdxjsEsmFromMarkdown];
  182943. }
  182944. function mdxToMarkdown(options) {
  182945. return {
  182946. extensions: [
  182947. mdxExpressionToMarkdown,
  182948. mdxJsxToMarkdown(options),
  182949. mdxjsEsmToMarkdown
  182950. ]
  182951. };
  182952. }
  182953. // node_modules/remark-mdx/index.js
  182954. function remarkMdx(options = {}) {
  182955. const data2 = this.data();
  182956. add("micromarkExtensions", mdxjs(options));
  182957. add("fromMarkdownExtensions", mdxFromMarkdown());
  182958. add("toMarkdownExtensions", mdxToMarkdown(options));
  182959. function add(field, value) {
  182960. const list3 = data2[field] ? data2[field] : data2[field] = [];
  182961. list3.push(value);
  182962. }
  182963. }
  182964. // node_modules/mdast-util-to-string/index.js
  182965. function toString2(node, options) {
  182966. var { includeImageAlt = true } = options || {};
  182967. return one(node, includeImageAlt);
  182968. }
  182969. function one(node, includeImageAlt) {
  182970. return node && typeof node === "object" && (node.value || (includeImageAlt ? node.alt : "") || "children" in node && all(node.children, includeImageAlt) || Array.isArray(node) && all(node, includeImageAlt)) || "";
  182971. }
  182972. function all(values, includeImageAlt) {
  182973. var result = [];
  182974. var index2 = -1;
  182975. while (++index2 < values.length) {
  182976. result[index2] = one(values[index2], includeImageAlt);
  182977. }
  182978. return result.join("");
  182979. }
  182980. // node_modules/micromark/lib/initialize/content.js
  182981. var content2 = {
  182982. tokenize: initializeContent
  182983. };
  182984. function initializeContent(effects) {
  182985. const contentStart = effects.attempt(
  182986. this.parser.constructs.contentInitial,
  182987. afterContentStartConstruct,
  182988. paragraphInitial
  182989. );
  182990. let previous2;
  182991. return contentStart;
  182992. function afterContentStartConstruct(code2) {
  182993. if (code2 === null) {
  182994. effects.consume(code2);
  182995. return;
  182996. }
  182997. effects.enter("lineEnding");
  182998. effects.consume(code2);
  182999. effects.exit("lineEnding");
  183000. return factorySpace(effects, contentStart, "linePrefix");
  183001. }
  183002. function paragraphInitial(code2) {
  183003. effects.enter("paragraph");
  183004. return lineStart(code2);
  183005. }
  183006. function lineStart(code2) {
  183007. const token = effects.enter("chunkText", {
  183008. contentType: "text",
  183009. previous: previous2
  183010. });
  183011. if (previous2) {
  183012. previous2.next = token;
  183013. }
  183014. previous2 = token;
  183015. return data2(code2);
  183016. }
  183017. function data2(code2) {
  183018. if (code2 === null) {
  183019. effects.exit("chunkText");
  183020. effects.exit("paragraph");
  183021. effects.consume(code2);
  183022. return;
  183023. }
  183024. if (markdownLineEnding(code2)) {
  183025. effects.consume(code2);
  183026. effects.exit("chunkText");
  183027. return lineStart;
  183028. }
  183029. effects.consume(code2);
  183030. return data2;
  183031. }
  183032. }
  183033. // node_modules/micromark/lib/initialize/document.js
  183034. var document2 = {
  183035. tokenize: initializeDocument
  183036. };
  183037. var containerConstruct = {
  183038. tokenize: tokenizeContainer
  183039. };
  183040. function initializeDocument(effects) {
  183041. const self2 = this;
  183042. const stack = [];
  183043. let continued = 0;
  183044. let childFlow;
  183045. let childToken;
  183046. let lineStartOffset;
  183047. return start3;
  183048. function start3(code2) {
  183049. if (continued < stack.length) {
  183050. const item = stack[continued];
  183051. self2.containerState = item[1];
  183052. return effects.attempt(
  183053. item[0].continuation,
  183054. documentContinue,
  183055. checkNewContainers
  183056. )(code2);
  183057. }
  183058. return checkNewContainers(code2);
  183059. }
  183060. function documentContinue(code2) {
  183061. continued++;
  183062. if (self2.containerState._closeFlow) {
  183063. self2.containerState._closeFlow = void 0;
  183064. if (childFlow) {
  183065. closeFlow();
  183066. }
  183067. const indexBeforeExits = self2.events.length;
  183068. let indexBeforeFlow = indexBeforeExits;
  183069. let point3;
  183070. while (indexBeforeFlow--) {
  183071. if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
  183072. point3 = self2.events[indexBeforeFlow][1].end;
  183073. break;
  183074. }
  183075. }
  183076. exitContainers(continued);
  183077. let index2 = indexBeforeExits;
  183078. while (index2 < self2.events.length) {
  183079. self2.events[index2][1].end = Object.assign({}, point3);
  183080. index2++;
  183081. }
  183082. splice(
  183083. self2.events,
  183084. indexBeforeFlow + 1,
  183085. 0,
  183086. self2.events.slice(indexBeforeExits)
  183087. );
  183088. self2.events.length = index2;
  183089. return checkNewContainers(code2);
  183090. }
  183091. return start3(code2);
  183092. }
  183093. function checkNewContainers(code2) {
  183094. if (continued === stack.length) {
  183095. if (!childFlow) {
  183096. return documentContinued(code2);
  183097. }
  183098. if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {
  183099. return flowStart(code2);
  183100. }
  183101. self2.interrupt = Boolean(
  183102. childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack
  183103. );
  183104. }
  183105. self2.containerState = {};
  183106. return effects.check(
  183107. containerConstruct,
  183108. thereIsANewContainer,
  183109. thereIsNoNewContainer
  183110. )(code2);
  183111. }
  183112. function thereIsANewContainer(code2) {
  183113. if (childFlow)
  183114. closeFlow();
  183115. exitContainers(continued);
  183116. return documentContinued(code2);
  183117. }
  183118. function thereIsNoNewContainer(code2) {
  183119. self2.parser.lazy[self2.now().line] = continued !== stack.length;
  183120. lineStartOffset = self2.now().offset;
  183121. return flowStart(code2);
  183122. }
  183123. function documentContinued(code2) {
  183124. self2.containerState = {};
  183125. return effects.attempt(
  183126. containerConstruct,
  183127. containerContinue,
  183128. flowStart
  183129. )(code2);
  183130. }
  183131. function containerContinue(code2) {
  183132. continued++;
  183133. stack.push([self2.currentConstruct, self2.containerState]);
  183134. return documentContinued(code2);
  183135. }
  183136. function flowStart(code2) {
  183137. if (code2 === null) {
  183138. if (childFlow)
  183139. closeFlow();
  183140. exitContainers(0);
  183141. effects.consume(code2);
  183142. return;
  183143. }
  183144. childFlow = childFlow || self2.parser.flow(self2.now());
  183145. effects.enter("chunkFlow", {
  183146. contentType: "flow",
  183147. previous: childToken,
  183148. _tokenizer: childFlow
  183149. });
  183150. return flowContinue(code2);
  183151. }
  183152. function flowContinue(code2) {
  183153. if (code2 === null) {
  183154. writeToChild(effects.exit("chunkFlow"), true);
  183155. exitContainers(0);
  183156. effects.consume(code2);
  183157. return;
  183158. }
  183159. if (markdownLineEnding(code2)) {
  183160. effects.consume(code2);
  183161. writeToChild(effects.exit("chunkFlow"));
  183162. continued = 0;
  183163. self2.interrupt = void 0;
  183164. return start3;
  183165. }
  183166. effects.consume(code2);
  183167. return flowContinue;
  183168. }
  183169. function writeToChild(token, eof) {
  183170. const stream = self2.sliceStream(token);
  183171. if (eof)
  183172. stream.push(null);
  183173. token.previous = childToken;
  183174. if (childToken)
  183175. childToken.next = token;
  183176. childToken = token;
  183177. childFlow.defineSkip(token.start);
  183178. childFlow.write(stream);
  183179. if (self2.parser.lazy[token.start.line]) {
  183180. let index2 = childFlow.events.length;
  183181. while (index2--) {
  183182. if (childFlow.events[index2][1].start.offset < lineStartOffset && (!childFlow.events[index2][1].end || childFlow.events[index2][1].end.offset > lineStartOffset)) {
  183183. return;
  183184. }
  183185. }
  183186. const indexBeforeExits = self2.events.length;
  183187. let indexBeforeFlow = indexBeforeExits;
  183188. let seen;
  183189. let point3;
  183190. while (indexBeforeFlow--) {
  183191. if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
  183192. if (seen) {
  183193. point3 = self2.events[indexBeforeFlow][1].end;
  183194. break;
  183195. }
  183196. seen = true;
  183197. }
  183198. }
  183199. exitContainers(continued);
  183200. index2 = indexBeforeExits;
  183201. while (index2 < self2.events.length) {
  183202. self2.events[index2][1].end = Object.assign({}, point3);
  183203. index2++;
  183204. }
  183205. splice(
  183206. self2.events,
  183207. indexBeforeFlow + 1,
  183208. 0,
  183209. self2.events.slice(indexBeforeExits)
  183210. );
  183211. self2.events.length = index2;
  183212. }
  183213. }
  183214. function exitContainers(size) {
  183215. let index2 = stack.length;
  183216. while (index2-- > size) {
  183217. const entry = stack[index2];
  183218. self2.containerState = entry[1];
  183219. entry[0].exit.call(self2, effects);
  183220. }
  183221. stack.length = size;
  183222. }
  183223. function closeFlow() {
  183224. childFlow.write([null]);
  183225. childToken = void 0;
  183226. childFlow = void 0;
  183227. self2.containerState._closeFlow = void 0;
  183228. }
  183229. }
  183230. function tokenizeContainer(effects, ok2, nok) {
  183231. return factorySpace(
  183232. effects,
  183233. effects.attempt(this.parser.constructs.document, ok2, nok),
  183234. "linePrefix",
  183235. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  183236. );
  183237. }
  183238. // node_modules/micromark/lib/initialize/flow.js
  183239. var flow = {
  183240. tokenize: initializeFlow
  183241. };
  183242. function initializeFlow(effects) {
  183243. const self2 = this;
  183244. const initial = effects.attempt(
  183245. blankLine,
  183246. atBlankEnding,
  183247. effects.attempt(
  183248. this.parser.constructs.flowInitial,
  183249. afterConstruct,
  183250. factorySpace(
  183251. effects,
  183252. effects.attempt(
  183253. this.parser.constructs.flow,
  183254. afterConstruct,
  183255. effects.attempt(content, afterConstruct)
  183256. ),
  183257. "linePrefix"
  183258. )
  183259. )
  183260. );
  183261. return initial;
  183262. function atBlankEnding(code2) {
  183263. if (code2 === null) {
  183264. effects.consume(code2);
  183265. return;
  183266. }
  183267. effects.enter("lineEndingBlank");
  183268. effects.consume(code2);
  183269. effects.exit("lineEndingBlank");
  183270. self2.currentConstruct = void 0;
  183271. return initial;
  183272. }
  183273. function afterConstruct(code2) {
  183274. if (code2 === null) {
  183275. effects.consume(code2);
  183276. return;
  183277. }
  183278. effects.enter("lineEnding");
  183279. effects.consume(code2);
  183280. effects.exit("lineEnding");
  183281. self2.currentConstruct = void 0;
  183282. return initial;
  183283. }
  183284. }
  183285. // node_modules/micromark/lib/initialize/text.js
  183286. var resolver = {
  183287. resolveAll: createResolver()
  183288. };
  183289. var string = initializeFactory("string");
  183290. var text = initializeFactory("text");
  183291. function initializeFactory(field) {
  183292. return {
  183293. tokenize: initializeText,
  183294. resolveAll: createResolver(
  183295. field === "text" ? resolveAllLineSuffixes : void 0
  183296. )
  183297. };
  183298. function initializeText(effects) {
  183299. const self2 = this;
  183300. const constructs2 = this.parser.constructs[field];
  183301. const text5 = effects.attempt(constructs2, start3, notText);
  183302. return start3;
  183303. function start3(code2) {
  183304. return atBreak(code2) ? text5(code2) : notText(code2);
  183305. }
  183306. function notText(code2) {
  183307. if (code2 === null) {
  183308. effects.consume(code2);
  183309. return;
  183310. }
  183311. effects.enter("data");
  183312. effects.consume(code2);
  183313. return data2;
  183314. }
  183315. function data2(code2) {
  183316. if (atBreak(code2)) {
  183317. effects.exit("data");
  183318. return text5(code2);
  183319. }
  183320. effects.consume(code2);
  183321. return data2;
  183322. }
  183323. function atBreak(code2) {
  183324. if (code2 === null) {
  183325. return true;
  183326. }
  183327. const list3 = constructs2[code2];
  183328. let index2 = -1;
  183329. if (list3) {
  183330. while (++index2 < list3.length) {
  183331. const item = list3[index2];
  183332. if (!item.previous || item.previous.call(self2, self2.previous)) {
  183333. return true;
  183334. }
  183335. }
  183336. }
  183337. return false;
  183338. }
  183339. }
  183340. }
  183341. function createResolver(extraResolver) {
  183342. return resolveAllText;
  183343. function resolveAllText(events, context) {
  183344. let index2 = -1;
  183345. let enter;
  183346. while (++index2 <= events.length) {
  183347. if (enter === void 0) {
  183348. if (events[index2] && events[index2][1].type === "data") {
  183349. enter = index2;
  183350. index2++;
  183351. }
  183352. } else if (!events[index2] || events[index2][1].type !== "data") {
  183353. if (index2 !== enter + 2) {
  183354. events[enter][1].end = events[index2 - 1][1].end;
  183355. events.splice(enter + 2, index2 - enter - 2);
  183356. index2 = enter + 2;
  183357. }
  183358. enter = void 0;
  183359. }
  183360. }
  183361. return extraResolver ? extraResolver(events, context) : events;
  183362. }
  183363. }
  183364. function resolveAllLineSuffixes(events, context) {
  183365. let eventIndex = 0;
  183366. while (++eventIndex <= events.length) {
  183367. if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
  183368. const data2 = events[eventIndex - 1][1];
  183369. const chunks = context.sliceStream(data2);
  183370. let index2 = chunks.length;
  183371. let bufferIndex = -1;
  183372. let size = 0;
  183373. let tabs;
  183374. while (index2--) {
  183375. const chunk = chunks[index2];
  183376. if (typeof chunk === "string") {
  183377. bufferIndex = chunk.length;
  183378. while (chunk.charCodeAt(bufferIndex - 1) === 32) {
  183379. size++;
  183380. bufferIndex--;
  183381. }
  183382. if (bufferIndex)
  183383. break;
  183384. bufferIndex = -1;
  183385. } else if (chunk === -2) {
  183386. tabs = true;
  183387. size++;
  183388. } else if (chunk === -1) {
  183389. } else {
  183390. index2++;
  183391. break;
  183392. }
  183393. }
  183394. if (size) {
  183395. const token = {
  183396. type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing",
  183397. start: {
  183398. line: data2.end.line,
  183399. column: data2.end.column - size,
  183400. offset: data2.end.offset - size,
  183401. _index: data2.start._index + index2,
  183402. _bufferIndex: index2 ? bufferIndex : data2.start._bufferIndex + bufferIndex
  183403. },
  183404. end: Object.assign({}, data2.end)
  183405. };
  183406. data2.end = Object.assign({}, token.start);
  183407. if (data2.start.offset === data2.end.offset) {
  183408. Object.assign(data2, token);
  183409. } else {
  183410. events.splice(
  183411. eventIndex,
  183412. 0,
  183413. ["enter", token, context],
  183414. ["exit", token, context]
  183415. );
  183416. eventIndex += 2;
  183417. }
  183418. }
  183419. eventIndex++;
  183420. }
  183421. }
  183422. return events;
  183423. }
  183424. // node_modules/micromark/lib/create-tokenizer.js
  183425. function createTokenizer(parser, initialize, from) {
  183426. let point3 = Object.assign(
  183427. from ? Object.assign({}, from) : {
  183428. line: 1,
  183429. column: 1,
  183430. offset: 0
  183431. },
  183432. {
  183433. _index: 0,
  183434. _bufferIndex: -1
  183435. }
  183436. );
  183437. const columnStart = {};
  183438. const resolveAllConstructs = [];
  183439. let chunks = [];
  183440. let stack = [];
  183441. let consumed = true;
  183442. const effects = {
  183443. consume,
  183444. enter,
  183445. exit: exit2,
  183446. attempt: constructFactory(onsuccessfulconstruct),
  183447. check: constructFactory(onsuccessfulcheck),
  183448. interrupt: constructFactory(onsuccessfulcheck, {
  183449. interrupt: true
  183450. })
  183451. };
  183452. const context = {
  183453. previous: null,
  183454. code: null,
  183455. containerState: {},
  183456. events: [],
  183457. parser,
  183458. sliceStream,
  183459. sliceSerialize,
  183460. now,
  183461. defineSkip,
  183462. write
  183463. };
  183464. let state = initialize.tokenize.call(context, effects);
  183465. let expectedCode;
  183466. if (initialize.resolveAll) {
  183467. resolveAllConstructs.push(initialize);
  183468. }
  183469. return context;
  183470. function write(slice2) {
  183471. chunks = push(chunks, slice2);
  183472. main();
  183473. if (chunks[chunks.length - 1] !== null) {
  183474. return [];
  183475. }
  183476. addResult(initialize, 0);
  183477. context.events = resolveAll(resolveAllConstructs, context.events, context);
  183478. return context.events;
  183479. }
  183480. function sliceSerialize(token, expandTabs) {
  183481. return serializeChunks(sliceStream(token), expandTabs);
  183482. }
  183483. function sliceStream(token) {
  183484. return sliceChunks(chunks, token);
  183485. }
  183486. function now() {
  183487. return Object.assign({}, point3);
  183488. }
  183489. function defineSkip(value) {
  183490. columnStart[value.line] = value.column;
  183491. accountForPotentialSkip();
  183492. }
  183493. function main() {
  183494. let chunkIndex;
  183495. while (point3._index < chunks.length) {
  183496. const chunk = chunks[point3._index];
  183497. if (typeof chunk === "string") {
  183498. chunkIndex = point3._index;
  183499. if (point3._bufferIndex < 0) {
  183500. point3._bufferIndex = 0;
  183501. }
  183502. while (point3._index === chunkIndex && point3._bufferIndex < chunk.length) {
  183503. go(chunk.charCodeAt(point3._bufferIndex));
  183504. }
  183505. } else {
  183506. go(chunk);
  183507. }
  183508. }
  183509. }
  183510. function go(code2) {
  183511. consumed = void 0;
  183512. expectedCode = code2;
  183513. state = state(code2);
  183514. }
  183515. function consume(code2) {
  183516. if (markdownLineEnding(code2)) {
  183517. point3.line++;
  183518. point3.column = 1;
  183519. point3.offset += code2 === -3 ? 2 : 1;
  183520. accountForPotentialSkip();
  183521. } else if (code2 !== -1) {
  183522. point3.column++;
  183523. point3.offset++;
  183524. }
  183525. if (point3._bufferIndex < 0) {
  183526. point3._index++;
  183527. } else {
  183528. point3._bufferIndex++;
  183529. if (point3._bufferIndex === chunks[point3._index].length) {
  183530. point3._bufferIndex = -1;
  183531. point3._index++;
  183532. }
  183533. }
  183534. context.previous = code2;
  183535. consumed = true;
  183536. }
  183537. function enter(type, fields) {
  183538. const token = fields || {};
  183539. token.type = type;
  183540. token.start = now();
  183541. context.events.push(["enter", token, context]);
  183542. stack.push(token);
  183543. return token;
  183544. }
  183545. function exit2(type) {
  183546. const token = stack.pop();
  183547. token.end = now();
  183548. context.events.push(["exit", token, context]);
  183549. return token;
  183550. }
  183551. function onsuccessfulconstruct(construct, info) {
  183552. addResult(construct, info.from);
  183553. }
  183554. function onsuccessfulcheck(_, info) {
  183555. info.restore();
  183556. }
  183557. function constructFactory(onreturn, fields) {
  183558. return hook;
  183559. function hook(constructs2, returnState, bogusState) {
  183560. let listOfConstructs;
  183561. let constructIndex;
  183562. let currentConstruct;
  183563. let info;
  183564. return Array.isArray(constructs2) ? handleListOfConstructs(constructs2) : "tokenize" in constructs2 ? handleListOfConstructs([constructs2]) : handleMapOfConstructs(constructs2);
  183565. function handleMapOfConstructs(map) {
  183566. return start3;
  183567. function start3(code2) {
  183568. const def = code2 !== null && map[code2];
  183569. const all4 = code2 !== null && map.null;
  183570. const list3 = [
  183571. ...Array.isArray(def) ? def : def ? [def] : [],
  183572. ...Array.isArray(all4) ? all4 : all4 ? [all4] : []
  183573. ];
  183574. return handleListOfConstructs(list3)(code2);
  183575. }
  183576. }
  183577. function handleListOfConstructs(list3) {
  183578. listOfConstructs = list3;
  183579. constructIndex = 0;
  183580. if (list3.length === 0) {
  183581. return bogusState;
  183582. }
  183583. return handleConstruct(list3[constructIndex]);
  183584. }
  183585. function handleConstruct(construct) {
  183586. return start3;
  183587. function start3(code2) {
  183588. info = store();
  183589. currentConstruct = construct;
  183590. if (!construct.partial) {
  183591. context.currentConstruct = construct;
  183592. }
  183593. if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) {
  183594. return nok(code2);
  183595. }
  183596. return construct.tokenize.call(
  183597. fields ? Object.assign(Object.create(context), fields) : context,
  183598. effects,
  183599. ok2,
  183600. nok
  183601. )(code2);
  183602. }
  183603. }
  183604. function ok2(code2) {
  183605. consumed = true;
  183606. onreturn(currentConstruct, info);
  183607. return returnState;
  183608. }
  183609. function nok(code2) {
  183610. consumed = true;
  183611. info.restore();
  183612. if (++constructIndex < listOfConstructs.length) {
  183613. return handleConstruct(listOfConstructs[constructIndex]);
  183614. }
  183615. return bogusState;
  183616. }
  183617. }
  183618. }
  183619. function addResult(construct, from2) {
  183620. if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {
  183621. resolveAllConstructs.push(construct);
  183622. }
  183623. if (construct.resolve) {
  183624. splice(
  183625. context.events,
  183626. from2,
  183627. context.events.length - from2,
  183628. construct.resolve(context.events.slice(from2), context)
  183629. );
  183630. }
  183631. if (construct.resolveTo) {
  183632. context.events = construct.resolveTo(context.events, context);
  183633. }
  183634. }
  183635. function store() {
  183636. const startPoint = now();
  183637. const startPrevious = context.previous;
  183638. const startCurrentConstruct = context.currentConstruct;
  183639. const startEventsIndex = context.events.length;
  183640. const startStack = Array.from(stack);
  183641. return {
  183642. restore,
  183643. from: startEventsIndex
  183644. };
  183645. function restore() {
  183646. point3 = startPoint;
  183647. context.previous = startPrevious;
  183648. context.currentConstruct = startCurrentConstruct;
  183649. context.events.length = startEventsIndex;
  183650. stack = startStack;
  183651. accountForPotentialSkip();
  183652. }
  183653. }
  183654. function accountForPotentialSkip() {
  183655. if (point3.line in columnStart && point3.column < 2) {
  183656. point3.column = columnStart[point3.line];
  183657. point3.offset += columnStart[point3.line] - 1;
  183658. }
  183659. }
  183660. }
  183661. function sliceChunks(chunks, token) {
  183662. const startIndex = token.start._index;
  183663. const startBufferIndex = token.start._bufferIndex;
  183664. const endIndex = token.end._index;
  183665. const endBufferIndex = token.end._bufferIndex;
  183666. let view;
  183667. if (startIndex === endIndex) {
  183668. view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];
  183669. } else {
  183670. view = chunks.slice(startIndex, endIndex);
  183671. if (startBufferIndex > -1) {
  183672. view[0] = view[0].slice(startBufferIndex);
  183673. }
  183674. if (endBufferIndex > 0) {
  183675. view.push(chunks[endIndex].slice(0, endBufferIndex));
  183676. }
  183677. }
  183678. return view;
  183679. }
  183680. function serializeChunks(chunks, expandTabs) {
  183681. let index2 = -1;
  183682. const result = [];
  183683. let atTab;
  183684. while (++index2 < chunks.length) {
  183685. const chunk = chunks[index2];
  183686. let value;
  183687. if (typeof chunk === "string") {
  183688. value = chunk;
  183689. } else
  183690. switch (chunk) {
  183691. case -5: {
  183692. value = "\r";
  183693. break;
  183694. }
  183695. case -4: {
  183696. value = "\n";
  183697. break;
  183698. }
  183699. case -3: {
  183700. value = "\r\n";
  183701. break;
  183702. }
  183703. case -2: {
  183704. value = expandTabs ? " " : " ";
  183705. break;
  183706. }
  183707. case -1: {
  183708. if (!expandTabs && atTab)
  183709. continue;
  183710. value = " ";
  183711. break;
  183712. }
  183713. default: {
  183714. value = String.fromCharCode(chunk);
  183715. }
  183716. }
  183717. atTab = chunk === -2;
  183718. result.push(value);
  183719. }
  183720. return result.join("");
  183721. }
  183722. // node_modules/micromark/lib/constructs.js
  183723. var constructs_exports = {};
  183724. __export(constructs_exports, {
  183725. attentionMarkers: () => attentionMarkers,
  183726. contentInitial: () => contentInitial,
  183727. disable: () => disable,
  183728. document: () => document3,
  183729. flow: () => flow2,
  183730. flowInitial: () => flowInitial,
  183731. insideSpan: () => insideSpan,
  183732. string: () => string2,
  183733. text: () => text2
  183734. });
  183735. var document3 = {
  183736. [42]: list,
  183737. [43]: list,
  183738. [45]: list,
  183739. [48]: list,
  183740. [49]: list,
  183741. [50]: list,
  183742. [51]: list,
  183743. [52]: list,
  183744. [53]: list,
  183745. [54]: list,
  183746. [55]: list,
  183747. [56]: list,
  183748. [57]: list,
  183749. [62]: blockQuote
  183750. };
  183751. var contentInitial = {
  183752. [91]: definition
  183753. };
  183754. var flowInitial = {
  183755. [-2]: codeIndented,
  183756. [-1]: codeIndented,
  183757. [32]: codeIndented
  183758. };
  183759. var flow2 = {
  183760. [35]: headingAtx,
  183761. [42]: thematicBreak,
  183762. [45]: [setextUnderline, thematicBreak],
  183763. [60]: htmlFlow,
  183764. [61]: setextUnderline,
  183765. [95]: thematicBreak,
  183766. [96]: codeFenced,
  183767. [126]: codeFenced
  183768. };
  183769. var string2 = {
  183770. [38]: characterReference,
  183771. [92]: characterEscape
  183772. };
  183773. var text2 = {
  183774. [-5]: lineEnding,
  183775. [-4]: lineEnding,
  183776. [-3]: lineEnding,
  183777. [33]: labelStartImage,
  183778. [38]: characterReference,
  183779. [42]: attention,
  183780. [60]: [autolink, htmlText],
  183781. [91]: labelStartLink,
  183782. [92]: [hardBreakEscape, characterEscape],
  183783. [93]: labelEnd,
  183784. [95]: attention,
  183785. [96]: codeText
  183786. };
  183787. var insideSpan = {
  183788. null: [attention, resolver]
  183789. };
  183790. var attentionMarkers = {
  183791. null: [42, 95]
  183792. };
  183793. var disable = {
  183794. null: []
  183795. };
  183796. // node_modules/micromark/lib/parse.js
  183797. function parse3(options = {}) {
  183798. const constructs2 = combineExtensions(
  183799. [constructs_exports].concat(options.extensions || [])
  183800. );
  183801. const parser = {
  183802. defined: [],
  183803. lazy: {},
  183804. constructs: constructs2,
  183805. content: create5(content2),
  183806. document: create5(document2),
  183807. flow: create5(flow),
  183808. string: create5(string),
  183809. text: create5(text)
  183810. };
  183811. return parser;
  183812. function create5(initial) {
  183813. return creator;
  183814. function creator(from) {
  183815. return createTokenizer(parser, initial, from);
  183816. }
  183817. }
  183818. }
  183819. // node_modules/micromark/lib/preprocess.js
  183820. var search = /[\0\t\n\r]/g;
  183821. function preprocess() {
  183822. let column = 1;
  183823. let buffer2 = "";
  183824. let start3 = true;
  183825. let atCarriageReturn;
  183826. return preprocessor;
  183827. function preprocessor(value, encoding, end) {
  183828. const chunks = [];
  183829. let match;
  183830. let next;
  183831. let startPosition;
  183832. let endPosition;
  183833. let code2;
  183834. value = buffer2 + value.toString(encoding);
  183835. startPosition = 0;
  183836. buffer2 = "";
  183837. if (start3) {
  183838. if (value.charCodeAt(0) === 65279) {
  183839. startPosition++;
  183840. }
  183841. start3 = void 0;
  183842. }
  183843. while (startPosition < value.length) {
  183844. search.lastIndex = startPosition;
  183845. match = search.exec(value);
  183846. endPosition = match && match.index !== void 0 ? match.index : value.length;
  183847. code2 = value.charCodeAt(endPosition);
  183848. if (!match) {
  183849. buffer2 = value.slice(startPosition);
  183850. break;
  183851. }
  183852. if (code2 === 10 && startPosition === endPosition && atCarriageReturn) {
  183853. chunks.push(-3);
  183854. atCarriageReturn = void 0;
  183855. } else {
  183856. if (atCarriageReturn) {
  183857. chunks.push(-5);
  183858. atCarriageReturn = void 0;
  183859. }
  183860. if (startPosition < endPosition) {
  183861. chunks.push(value.slice(startPosition, endPosition));
  183862. column += endPosition - startPosition;
  183863. }
  183864. switch (code2) {
  183865. case 0: {
  183866. chunks.push(65533);
  183867. column++;
  183868. break;
  183869. }
  183870. case 9: {
  183871. next = Math.ceil(column / 4) * 4;
  183872. chunks.push(-2);
  183873. while (column++ < next)
  183874. chunks.push(-1);
  183875. break;
  183876. }
  183877. case 10: {
  183878. chunks.push(-4);
  183879. column = 1;
  183880. break;
  183881. }
  183882. default: {
  183883. atCarriageReturn = true;
  183884. column = 1;
  183885. }
  183886. }
  183887. }
  183888. startPosition = endPosition + 1;
  183889. }
  183890. if (end) {
  183891. if (atCarriageReturn)
  183892. chunks.push(-5);
  183893. if (buffer2)
  183894. chunks.push(buffer2);
  183895. chunks.push(null);
  183896. }
  183897. return chunks;
  183898. }
  183899. }
  183900. // node_modules/micromark/lib/postprocess.js
  183901. function postprocess(events) {
  183902. while (!subtokenize(events)) {
  183903. }
  183904. return events;
  183905. }
  183906. // node_modules/micromark-util-decode-numeric-character-reference/index.js
  183907. function decodeNumericCharacterReference(value, base2) {
  183908. const code2 = Number.parseInt(value, base2);
  183909. if (code2 < 9 || code2 === 11 || code2 > 13 && code2 < 32 || code2 > 126 && code2 < 160 || code2 > 55295 && code2 < 57344 || code2 > 64975 && code2 < 65008 || (code2 & 65535) === 65535 || (code2 & 65535) === 65534 || code2 > 1114111) {
  183910. return "\uFFFD";
  183911. }
  183912. return String.fromCharCode(code2);
  183913. }
  183914. // node_modules/micromark-util-decode-string/index.js
  183915. var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
  183916. function decodeString(value) {
  183917. return value.replace(characterEscapeOrReference, decode);
  183918. }
  183919. function decode($0, $1, $2) {
  183920. if ($1) {
  183921. return $1;
  183922. }
  183923. const head = $2.charCodeAt(0);
  183924. if (head === 35) {
  183925. const head2 = $2.charCodeAt(1);
  183926. const hex = head2 === 120 || head2 === 88;
  183927. return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);
  183928. }
  183929. return decodeNamedCharacterReference($2) || $0;
  183930. }
  183931. // node_modules/mdast-util-from-markdown/lib/index.js
  183932. var own6 = {}.hasOwnProperty;
  183933. var fromMarkdown = function(value, encoding, options) {
  183934. if (typeof encoding !== "string") {
  183935. options = encoding;
  183936. encoding = void 0;
  183937. }
  183938. return compiler(options)(
  183939. postprocess(
  183940. parse3(options).document().write(preprocess()(value, encoding, true))
  183941. )
  183942. );
  183943. };
  183944. function compiler(options = {}) {
  183945. const config = configure(
  183946. {
  183947. transforms: [],
  183948. canContainEols: [
  183949. "emphasis",
  183950. "fragment",
  183951. "heading",
  183952. "paragraph",
  183953. "strong"
  183954. ],
  183955. enter: {
  183956. autolink: opener(link2),
  183957. autolinkProtocol: onenterdata,
  183958. autolinkEmail: onenterdata,
  183959. atxHeading: opener(heading2),
  183960. blockQuote: opener(blockQuote2),
  183961. characterEscape: onenterdata,
  183962. characterReference: onenterdata,
  183963. codeFenced: opener(codeFlow),
  183964. codeFencedFenceInfo: buffer2,
  183965. codeFencedFenceMeta: buffer2,
  183966. codeIndented: opener(codeFlow, buffer2),
  183967. codeText: opener(codeText2, buffer2),
  183968. codeTextData: onenterdata,
  183969. data: onenterdata,
  183970. codeFlowValue: onenterdata,
  183971. definition: opener(definition2),
  183972. definitionDestinationString: buffer2,
  183973. definitionLabelString: buffer2,
  183974. definitionTitleString: buffer2,
  183975. emphasis: opener(emphasis2),
  183976. hardBreakEscape: opener(hardBreak2),
  183977. hardBreakTrailing: opener(hardBreak2),
  183978. htmlFlow: opener(html4, buffer2),
  183979. htmlFlowData: onenterdata,
  183980. htmlText: opener(html4, buffer2),
  183981. htmlTextData: onenterdata,
  183982. image: opener(image2),
  183983. label: buffer2,
  183984. link: opener(link2),
  183985. listItem: opener(listItem2),
  183986. listItemValue: onenterlistitemvalue,
  183987. listOrdered: opener(list3, onenterlistordered),
  183988. listUnordered: opener(list3),
  183989. paragraph: opener(paragraph2),
  183990. reference: onenterreference,
  183991. referenceString: buffer2,
  183992. resourceDestinationString: buffer2,
  183993. resourceTitleString: buffer2,
  183994. setextHeading: opener(heading2),
  183995. strong: opener(strong2),
  183996. thematicBreak: opener(thematicBreak3)
  183997. },
  183998. exit: {
  183999. atxHeading: closer(),
  184000. atxHeadingSequence: onexitatxheadingsequence,
  184001. autolink: closer(),
  184002. autolinkEmail: onexitautolinkemail,
  184003. autolinkProtocol: onexitautolinkprotocol,
  184004. blockQuote: closer(),
  184005. characterEscapeValue: onexitdata,
  184006. characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
  184007. characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
  184008. characterReferenceValue: onexitcharacterreferencevalue,
  184009. codeFenced: closer(onexitcodefenced),
  184010. codeFencedFence: onexitcodefencedfence,
  184011. codeFencedFenceInfo: onexitcodefencedfenceinfo,
  184012. codeFencedFenceMeta: onexitcodefencedfencemeta,
  184013. codeFlowValue: onexitdata,
  184014. codeIndented: closer(onexitcodeindented),
  184015. codeText: closer(onexitcodetext),
  184016. codeTextData: onexitdata,
  184017. data: onexitdata,
  184018. definition: closer(),
  184019. definitionDestinationString: onexitdefinitiondestinationstring,
  184020. definitionLabelString: onexitdefinitionlabelstring,
  184021. definitionTitleString: onexitdefinitiontitlestring,
  184022. emphasis: closer(),
  184023. hardBreakEscape: closer(onexithardbreak),
  184024. hardBreakTrailing: closer(onexithardbreak),
  184025. htmlFlow: closer(onexithtmlflow),
  184026. htmlFlowData: onexitdata,
  184027. htmlText: closer(onexithtmltext),
  184028. htmlTextData: onexitdata,
  184029. image: closer(onexitimage),
  184030. label: onexitlabel,
  184031. labelText: onexitlabeltext,
  184032. lineEnding: onexitlineending,
  184033. link: closer(onexitlink),
  184034. listItem: closer(),
  184035. listOrdered: closer(),
  184036. listUnordered: closer(),
  184037. paragraph: closer(),
  184038. referenceString: onexitreferencestring,
  184039. resourceDestinationString: onexitresourcedestinationstring,
  184040. resourceTitleString: onexitresourcetitlestring,
  184041. resource: onexitresource,
  184042. setextHeading: closer(onexitsetextheading),
  184043. setextHeadingLineSequence: onexitsetextheadinglinesequence,
  184044. setextHeadingText: onexitsetextheadingtext,
  184045. strong: closer(),
  184046. thematicBreak: closer()
  184047. }
  184048. },
  184049. options.mdastExtensions || []
  184050. );
  184051. const data2 = {};
  184052. return compile2;
  184053. function compile2(events) {
  184054. let tree = {
  184055. type: "root",
  184056. children: []
  184057. };
  184058. const stack = [tree];
  184059. const tokenStack = [];
  184060. const listStack = [];
  184061. const context = {
  184062. stack,
  184063. tokenStack,
  184064. config,
  184065. enter,
  184066. exit: exit2,
  184067. buffer: buffer2,
  184068. resume,
  184069. setData,
  184070. getData
  184071. };
  184072. let index2 = -1;
  184073. while (++index2 < events.length) {
  184074. if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
  184075. if (events[index2][0] === "enter") {
  184076. listStack.push(index2);
  184077. } else {
  184078. const tail = listStack.pop();
  184079. index2 = prepareList(events, tail, index2);
  184080. }
  184081. }
  184082. }
  184083. index2 = -1;
  184084. while (++index2 < events.length) {
  184085. const handler = config[events[index2][0]];
  184086. if (own6.call(handler, events[index2][1].type)) {
  184087. handler[events[index2][1].type].call(
  184088. Object.assign(
  184089. {
  184090. sliceSerialize: events[index2][2].sliceSerialize
  184091. },
  184092. context
  184093. ),
  184094. events[index2][1]
  184095. );
  184096. }
  184097. }
  184098. if (tokenStack.length > 0) {
  184099. const tail = tokenStack[tokenStack.length - 1];
  184100. const handler = tail[1] || defaultOnError;
  184101. handler.call(context, void 0, tail[0]);
  184102. }
  184103. tree.position = {
  184104. start: point3(
  184105. events.length > 0 ? events[0][1].start : {
  184106. line: 1,
  184107. column: 1,
  184108. offset: 0
  184109. }
  184110. ),
  184111. end: point3(
  184112. events.length > 0 ? events[events.length - 2][1].end : {
  184113. line: 1,
  184114. column: 1,
  184115. offset: 0
  184116. }
  184117. )
  184118. };
  184119. index2 = -1;
  184120. while (++index2 < config.transforms.length) {
  184121. tree = config.transforms[index2](tree) || tree;
  184122. }
  184123. return tree;
  184124. }
  184125. function prepareList(events, start3, length) {
  184126. let index2 = start3 - 1;
  184127. let containerBalance = -1;
  184128. let listSpread = false;
  184129. let listItem3;
  184130. let lineIndex;
  184131. let firstBlankLineIndex;
  184132. let atMarker;
  184133. while (++index2 <= length) {
  184134. const event = events[index2];
  184135. if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") {
  184136. if (event[0] === "enter") {
  184137. containerBalance++;
  184138. } else {
  184139. containerBalance--;
  184140. }
  184141. atMarker = void 0;
  184142. } else if (event[1].type === "lineEndingBlank") {
  184143. if (event[0] === "enter") {
  184144. if (listItem3 && !atMarker && !containerBalance && !firstBlankLineIndex) {
  184145. firstBlankLineIndex = index2;
  184146. }
  184147. atMarker = void 0;
  184148. }
  184149. } else if (event[1].type === "linePrefix" || event[1].type === "listItemValue" || event[1].type === "listItemMarker" || event[1].type === "listItemPrefix" || event[1].type === "listItemPrefixWhitespace") {
  184150. } else {
  184151. atMarker = void 0;
  184152. }
  184153. if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
  184154. if (listItem3) {
  184155. let tailIndex = index2;
  184156. lineIndex = void 0;
  184157. while (tailIndex--) {
  184158. const tailEvent = events[tailIndex];
  184159. if (tailEvent[1].type === "lineEnding" || tailEvent[1].type === "lineEndingBlank") {
  184160. if (tailEvent[0] === "exit")
  184161. continue;
  184162. if (lineIndex) {
  184163. events[lineIndex][1].type = "lineEndingBlank";
  184164. listSpread = true;
  184165. }
  184166. tailEvent[1].type = "lineEnding";
  184167. lineIndex = tailIndex;
  184168. } else if (tailEvent[1].type === "linePrefix" || tailEvent[1].type === "blockQuotePrefix" || tailEvent[1].type === "blockQuotePrefixWhitespace" || tailEvent[1].type === "blockQuoteMarker" || tailEvent[1].type === "listItemIndent") {
  184169. } else {
  184170. break;
  184171. }
  184172. }
  184173. if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) {
  184174. listItem3._spread = true;
  184175. }
  184176. listItem3.end = Object.assign(
  184177. {},
  184178. lineIndex ? events[lineIndex][1].start : event[1].end
  184179. );
  184180. events.splice(lineIndex || index2, 0, ["exit", listItem3, event[2]]);
  184181. index2++;
  184182. length++;
  184183. }
  184184. if (event[1].type === "listItemPrefix") {
  184185. listItem3 = {
  184186. type: "listItem",
  184187. _spread: false,
  184188. start: Object.assign({}, event[1].start)
  184189. };
  184190. events.splice(index2, 0, ["enter", listItem3, event[2]]);
  184191. index2++;
  184192. length++;
  184193. firstBlankLineIndex = void 0;
  184194. atMarker = true;
  184195. }
  184196. }
  184197. }
  184198. events[start3][1]._spread = listSpread;
  184199. return length;
  184200. }
  184201. function setData(key, value) {
  184202. data2[key] = value;
  184203. }
  184204. function getData(key) {
  184205. return data2[key];
  184206. }
  184207. function point3(d) {
  184208. return {
  184209. line: d.line,
  184210. column: d.column,
  184211. offset: d.offset
  184212. };
  184213. }
  184214. function opener(create5, and) {
  184215. return open;
  184216. function open(token) {
  184217. enter.call(this, create5(token), token);
  184218. if (and)
  184219. and.call(this, token);
  184220. }
  184221. }
  184222. function buffer2() {
  184223. this.stack.push({
  184224. type: "fragment",
  184225. children: []
  184226. });
  184227. }
  184228. function enter(node, token, errorHandler) {
  184229. const parent = this.stack[this.stack.length - 1];
  184230. parent.children.push(node);
  184231. this.stack.push(node);
  184232. this.tokenStack.push([token, errorHandler]);
  184233. node.position = {
  184234. start: point3(token.start)
  184235. };
  184236. return node;
  184237. }
  184238. function closer(and) {
  184239. return close;
  184240. function close(token) {
  184241. if (and)
  184242. and.call(this, token);
  184243. exit2.call(this, token);
  184244. }
  184245. }
  184246. function exit2(token, onExitError) {
  184247. const node = this.stack.pop();
  184248. const open = this.tokenStack.pop();
  184249. if (!open) {
  184250. throw new Error(
  184251. "Cannot close `" + token.type + "` (" + stringifyPosition({
  184252. start: token.start,
  184253. end: token.end
  184254. }) + "): it\u2019s not open"
  184255. );
  184256. } else if (open[0].type !== token.type) {
  184257. if (onExitError) {
  184258. onExitError.call(this, token, open[0]);
  184259. } else {
  184260. const handler = open[1] || defaultOnError;
  184261. handler.call(this, token, open[0]);
  184262. }
  184263. }
  184264. node.position.end = point3(token.end);
  184265. return node;
  184266. }
  184267. function resume() {
  184268. return toString2(this.stack.pop());
  184269. }
  184270. function onenterlistordered() {
  184271. setData("expectingFirstListItemValue", true);
  184272. }
  184273. function onenterlistitemvalue(token) {
  184274. if (getData("expectingFirstListItemValue")) {
  184275. const ancestor = this.stack[this.stack.length - 2];
  184276. ancestor.start = Number.parseInt(this.sliceSerialize(token), 10);
  184277. setData("expectingFirstListItemValue");
  184278. }
  184279. }
  184280. function onexitcodefencedfenceinfo() {
  184281. const data3 = this.resume();
  184282. const node = this.stack[this.stack.length - 1];
  184283. node.lang = data3;
  184284. }
  184285. function onexitcodefencedfencemeta() {
  184286. const data3 = this.resume();
  184287. const node = this.stack[this.stack.length - 1];
  184288. node.meta = data3;
  184289. }
  184290. function onexitcodefencedfence() {
  184291. if (getData("flowCodeInside"))
  184292. return;
  184293. this.buffer();
  184294. setData("flowCodeInside", true);
  184295. }
  184296. function onexitcodefenced() {
  184297. const data3 = this.resume();
  184298. const node = this.stack[this.stack.length - 1];
  184299. node.value = data3.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, "");
  184300. setData("flowCodeInside");
  184301. }
  184302. function onexitcodeindented() {
  184303. const data3 = this.resume();
  184304. const node = this.stack[this.stack.length - 1];
  184305. node.value = data3.replace(/(\r?\n|\r)$/g, "");
  184306. }
  184307. function onexitdefinitionlabelstring(token) {
  184308. const label = this.resume();
  184309. const node = this.stack[this.stack.length - 1];
  184310. node.label = label;
  184311. node.identifier = normalizeIdentifier(
  184312. this.sliceSerialize(token)
  184313. ).toLowerCase();
  184314. }
  184315. function onexitdefinitiontitlestring() {
  184316. const data3 = this.resume();
  184317. const node = this.stack[this.stack.length - 1];
  184318. node.title = data3;
  184319. }
  184320. function onexitdefinitiondestinationstring() {
  184321. const data3 = this.resume();
  184322. const node = this.stack[this.stack.length - 1];
  184323. node.url = data3;
  184324. }
  184325. function onexitatxheadingsequence(token) {
  184326. const node = this.stack[this.stack.length - 1];
  184327. if (!node.depth) {
  184328. const depth = this.sliceSerialize(token).length;
  184329. node.depth = depth;
  184330. }
  184331. }
  184332. function onexitsetextheadingtext() {
  184333. setData("setextHeadingSlurpLineEnding", true);
  184334. }
  184335. function onexitsetextheadinglinesequence(token) {
  184336. const node = this.stack[this.stack.length - 1];
  184337. node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2;
  184338. }
  184339. function onexitsetextheading() {
  184340. setData("setextHeadingSlurpLineEnding");
  184341. }
  184342. function onenterdata(token) {
  184343. const parent = this.stack[this.stack.length - 1];
  184344. let tail = parent.children[parent.children.length - 1];
  184345. if (!tail || tail.type !== "text") {
  184346. tail = text5();
  184347. tail.position = {
  184348. start: point3(token.start)
  184349. };
  184350. parent.children.push(tail);
  184351. }
  184352. this.stack.push(tail);
  184353. }
  184354. function onexitdata(token) {
  184355. const tail = this.stack.pop();
  184356. tail.value += this.sliceSerialize(token);
  184357. tail.position.end = point3(token.end);
  184358. }
  184359. function onexitlineending(token) {
  184360. const context = this.stack[this.stack.length - 1];
  184361. if (getData("atHardBreak")) {
  184362. const tail = context.children[context.children.length - 1];
  184363. tail.position.end = point3(token.end);
  184364. setData("atHardBreak");
  184365. return;
  184366. }
  184367. if (!getData("setextHeadingSlurpLineEnding") && config.canContainEols.includes(context.type)) {
  184368. onenterdata.call(this, token);
  184369. onexitdata.call(this, token);
  184370. }
  184371. }
  184372. function onexithardbreak() {
  184373. setData("atHardBreak", true);
  184374. }
  184375. function onexithtmlflow() {
  184376. const data3 = this.resume();
  184377. const node = this.stack[this.stack.length - 1];
  184378. node.value = data3;
  184379. }
  184380. function onexithtmltext() {
  184381. const data3 = this.resume();
  184382. const node = this.stack[this.stack.length - 1];
  184383. node.value = data3;
  184384. }
  184385. function onexitcodetext() {
  184386. const data3 = this.resume();
  184387. const node = this.stack[this.stack.length - 1];
  184388. node.value = data3;
  184389. }
  184390. function onexitlink() {
  184391. const context = this.stack[this.stack.length - 1];
  184392. if (getData("inReference")) {
  184393. context.type += "Reference";
  184394. context.referenceType = getData("referenceType") || "shortcut";
  184395. delete context.url;
  184396. delete context.title;
  184397. } else {
  184398. delete context.identifier;
  184399. delete context.label;
  184400. }
  184401. setData("referenceType");
  184402. }
  184403. function onexitimage() {
  184404. const context = this.stack[this.stack.length - 1];
  184405. if (getData("inReference")) {
  184406. context.type += "Reference";
  184407. context.referenceType = getData("referenceType") || "shortcut";
  184408. delete context.url;
  184409. delete context.title;
  184410. } else {
  184411. delete context.identifier;
  184412. delete context.label;
  184413. }
  184414. setData("referenceType");
  184415. }
  184416. function onexitlabeltext(token) {
  184417. const ancestor = this.stack[this.stack.length - 2];
  184418. const string3 = this.sliceSerialize(token);
  184419. ancestor.label = decodeString(string3);
  184420. ancestor.identifier = normalizeIdentifier(string3).toLowerCase();
  184421. }
  184422. function onexitlabel() {
  184423. const fragment = this.stack[this.stack.length - 1];
  184424. const value = this.resume();
  184425. const node = this.stack[this.stack.length - 1];
  184426. setData("inReference", true);
  184427. if (node.type === "link") {
  184428. node.children = fragment.children;
  184429. } else {
  184430. node.alt = value;
  184431. }
  184432. }
  184433. function onexitresourcedestinationstring() {
  184434. const data3 = this.resume();
  184435. const node = this.stack[this.stack.length - 1];
  184436. node.url = data3;
  184437. }
  184438. function onexitresourcetitlestring() {
  184439. const data3 = this.resume();
  184440. const node = this.stack[this.stack.length - 1];
  184441. node.title = data3;
  184442. }
  184443. function onexitresource() {
  184444. setData("inReference");
  184445. }
  184446. function onenterreference() {
  184447. setData("referenceType", "collapsed");
  184448. }
  184449. function onexitreferencestring(token) {
  184450. const label = this.resume();
  184451. const node = this.stack[this.stack.length - 1];
  184452. node.label = label;
  184453. node.identifier = normalizeIdentifier(
  184454. this.sliceSerialize(token)
  184455. ).toLowerCase();
  184456. setData("referenceType", "full");
  184457. }
  184458. function onexitcharacterreferencemarker(token) {
  184459. setData("characterReferenceType", token.type);
  184460. }
  184461. function onexitcharacterreferencevalue(token) {
  184462. const data3 = this.sliceSerialize(token);
  184463. const type = getData("characterReferenceType");
  184464. let value;
  184465. if (type) {
  184466. value = decodeNumericCharacterReference(
  184467. data3,
  184468. type === "characterReferenceMarkerNumeric" ? 10 : 16
  184469. );
  184470. setData("characterReferenceType");
  184471. } else {
  184472. value = decodeNamedCharacterReference(data3);
  184473. }
  184474. const tail = this.stack.pop();
  184475. tail.value += value;
  184476. tail.position.end = point3(token.end);
  184477. }
  184478. function onexitautolinkprotocol(token) {
  184479. onexitdata.call(this, token);
  184480. const node = this.stack[this.stack.length - 1];
  184481. node.url = this.sliceSerialize(token);
  184482. }
  184483. function onexitautolinkemail(token) {
  184484. onexitdata.call(this, token);
  184485. const node = this.stack[this.stack.length - 1];
  184486. node.url = "mailto:" + this.sliceSerialize(token);
  184487. }
  184488. function blockQuote2() {
  184489. return {
  184490. type: "blockquote",
  184491. children: []
  184492. };
  184493. }
  184494. function codeFlow() {
  184495. return {
  184496. type: "code",
  184497. lang: null,
  184498. meta: null,
  184499. value: ""
  184500. };
  184501. }
  184502. function codeText2() {
  184503. return {
  184504. type: "inlineCode",
  184505. value: ""
  184506. };
  184507. }
  184508. function definition2() {
  184509. return {
  184510. type: "definition",
  184511. identifier: "",
  184512. label: null,
  184513. title: null,
  184514. url: ""
  184515. };
  184516. }
  184517. function emphasis2() {
  184518. return {
  184519. type: "emphasis",
  184520. children: []
  184521. };
  184522. }
  184523. function heading2() {
  184524. return {
  184525. type: "heading",
  184526. depth: void 0,
  184527. children: []
  184528. };
  184529. }
  184530. function hardBreak2() {
  184531. return {
  184532. type: "break"
  184533. };
  184534. }
  184535. function html4() {
  184536. return {
  184537. type: "html",
  184538. value: ""
  184539. };
  184540. }
  184541. function image2() {
  184542. return {
  184543. type: "image",
  184544. title: null,
  184545. url: "",
  184546. alt: null
  184547. };
  184548. }
  184549. function link2() {
  184550. return {
  184551. type: "link",
  184552. title: null,
  184553. url: "",
  184554. children: []
  184555. };
  184556. }
  184557. function list3(token) {
  184558. return {
  184559. type: "list",
  184560. ordered: token.type === "listOrdered",
  184561. start: null,
  184562. spread: token._spread,
  184563. children: []
  184564. };
  184565. }
  184566. function listItem2(token) {
  184567. return {
  184568. type: "listItem",
  184569. spread: token._spread,
  184570. checked: null,
  184571. children: []
  184572. };
  184573. }
  184574. function paragraph2() {
  184575. return {
  184576. type: "paragraph",
  184577. children: []
  184578. };
  184579. }
  184580. function strong2() {
  184581. return {
  184582. type: "strong",
  184583. children: []
  184584. };
  184585. }
  184586. function text5() {
  184587. return {
  184588. type: "text",
  184589. value: ""
  184590. };
  184591. }
  184592. function thematicBreak3() {
  184593. return {
  184594. type: "thematicBreak"
  184595. };
  184596. }
  184597. }
  184598. function configure(combined, extensions) {
  184599. let index2 = -1;
  184600. while (++index2 < extensions.length) {
  184601. const value = extensions[index2];
  184602. if (Array.isArray(value)) {
  184603. configure(combined, value);
  184604. } else {
  184605. extension(combined, value);
  184606. }
  184607. }
  184608. return combined;
  184609. }
  184610. function extension(combined, extension2) {
  184611. let key;
  184612. for (key in extension2) {
  184613. if (own6.call(extension2, key)) {
  184614. const list3 = key === "canContainEols" || key === "transforms";
  184615. const maybe = own6.call(combined, key) ? combined[key] : void 0;
  184616. const left = maybe || (combined[key] = list3 ? [] : {});
  184617. const right = extension2[key];
  184618. if (right) {
  184619. if (list3) {
  184620. combined[key] = [...left, ...right];
  184621. } else {
  184622. Object.assign(left, right);
  184623. }
  184624. }
  184625. }
  184626. }
  184627. }
  184628. function defaultOnError(left, right) {
  184629. if (left) {
  184630. throw new Error(
  184631. "Cannot close `" + left.type + "` (" + stringifyPosition({
  184632. start: left.start,
  184633. end: left.end
  184634. }) + "): a different token (`" + right.type + "`, " + stringifyPosition({
  184635. start: right.start,
  184636. end: right.end
  184637. }) + ") is open"
  184638. );
  184639. } else {
  184640. throw new Error(
  184641. "Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
  184642. start: right.start,
  184643. end: right.end
  184644. }) + ") is still open"
  184645. );
  184646. }
  184647. }
  184648. // node_modules/remark-parse/lib/index.js
  184649. function remarkParse(options) {
  184650. const parser = (doc) => {
  184651. const settings = this.data("settings");
  184652. return fromMarkdown(
  184653. doc,
  184654. Object.assign({}, settings, options, {
  184655. extensions: this.data("micromarkExtensions") || [],
  184656. mdastExtensions: this.data("fromMarkdownExtensions") || []
  184657. })
  184658. );
  184659. };
  184660. Object.assign(this, { Parser: parser });
  184661. }
  184662. // node_modules/remark-parse/index.js
  184663. var remark_parse_default = remarkParse;
  184664. // node_modules/unist-builder/index.js
  184665. var u = function(type, props, value) {
  184666. var node = { type: String(type) };
  184667. if ((value === void 0 || value === null) && (typeof props === "string" || Array.isArray(props))) {
  184668. value = props;
  184669. } else {
  184670. Object.assign(node, props);
  184671. }
  184672. if (Array.isArray(value)) {
  184673. node.children = value;
  184674. } else if (value !== void 0 && value !== null) {
  184675. node.value = String(value);
  184676. }
  184677. return node;
  184678. };
  184679. // node_modules/mdast-util-to-hast/lib/traverse.js
  184680. var own7 = {}.hasOwnProperty;
  184681. function unknown(h, node) {
  184682. const data2 = node.data || {};
  184683. if ("value" in node && !(own7.call(data2, "hName") || own7.call(data2, "hProperties") || own7.call(data2, "hChildren"))) {
  184684. return h.augment(node, u("text", node.value));
  184685. }
  184686. return h(node, "div", all2(h, node));
  184687. }
  184688. function one2(h, node, parent) {
  184689. const type = node && node.type;
  184690. let fn;
  184691. if (!type) {
  184692. throw new Error("Expected node, got `" + node + "`");
  184693. }
  184694. if (own7.call(h.handlers, type)) {
  184695. fn = h.handlers[type];
  184696. } else if (h.passThrough && h.passThrough.includes(type)) {
  184697. fn = returnNode;
  184698. } else {
  184699. fn = h.unknownHandler;
  184700. }
  184701. return (typeof fn === "function" ? fn : unknown)(h, node, parent);
  184702. }
  184703. function returnNode(h, node) {
  184704. return "children" in node ? { ...node, children: all2(h, node) } : node;
  184705. }
  184706. function all2(h, parent) {
  184707. const values = [];
  184708. if ("children" in parent) {
  184709. const nodes = parent.children;
  184710. let index2 = -1;
  184711. while (++index2 < nodes.length) {
  184712. const result = one2(h, nodes[index2], parent);
  184713. if (result) {
  184714. if (index2 && nodes[index2 - 1].type === "break") {
  184715. if (!Array.isArray(result) && result.type === "text") {
  184716. result.value = result.value.replace(/^\s+/, "");
  184717. }
  184718. if (!Array.isArray(result) && result.type === "element") {
  184719. const head = result.children[0];
  184720. if (head && head.type === "text") {
  184721. head.value = head.value.replace(/^\s+/, "");
  184722. }
  184723. }
  184724. }
  184725. if (Array.isArray(result)) {
  184726. values.push(...result);
  184727. } else {
  184728. values.push(result);
  184729. }
  184730. }
  184731. }
  184732. }
  184733. return values;
  184734. }
  184735. // node_modules/unist-util-is/index.js
  184736. var convert = function(test) {
  184737. if (test === void 0 || test === null) {
  184738. return ok;
  184739. }
  184740. if (typeof test === "string") {
  184741. return typeFactory(test);
  184742. }
  184743. if (typeof test === "object") {
  184744. return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
  184745. }
  184746. if (typeof test === "function") {
  184747. return castFactory(test);
  184748. }
  184749. throw new Error("Expected function, string, or object as test");
  184750. };
  184751. function anyFactory(tests) {
  184752. const checks2 = [];
  184753. let index2 = -1;
  184754. while (++index2 < tests.length) {
  184755. checks2[index2] = convert(tests[index2]);
  184756. }
  184757. return castFactory(any);
  184758. function any(...parameters) {
  184759. let index3 = -1;
  184760. while (++index3 < checks2.length) {
  184761. if (checks2[index3].call(this, ...parameters))
  184762. return true;
  184763. }
  184764. return false;
  184765. }
  184766. }
  184767. function propsFactory(check) {
  184768. return castFactory(all4);
  184769. function all4(node) {
  184770. let key;
  184771. for (key in check) {
  184772. if (node[key] !== check[key])
  184773. return false;
  184774. }
  184775. return true;
  184776. }
  184777. }
  184778. function typeFactory(check) {
  184779. return castFactory(type);
  184780. function type(node) {
  184781. return node && node.type === check;
  184782. }
  184783. }
  184784. function castFactory(check) {
  184785. return assertion;
  184786. function assertion(...parameters) {
  184787. return Boolean(check.call(this, ...parameters));
  184788. }
  184789. }
  184790. function ok() {
  184791. return true;
  184792. }
  184793. // node_modules/unist-util-visit-parents/color.js
  184794. function color2(d) {
  184795. return "\x1B[33m" + d + "\x1B[39m";
  184796. }
  184797. // node_modules/unist-util-visit-parents/index.js
  184798. var CONTINUE2 = true;
  184799. var SKIP2 = "skip";
  184800. var EXIT2 = false;
  184801. var visitParents = function(tree, test, visitor, reverse) {
  184802. if (typeof test === "function" && typeof visitor !== "function") {
  184803. reverse = visitor;
  184804. visitor = test;
  184805. test = null;
  184806. }
  184807. const is = convert(test);
  184808. const step = reverse ? -1 : 1;
  184809. factory2(tree, null, [])();
  184810. function factory2(node, index2, parents) {
  184811. const value = typeof node === "object" && node !== null ? node : {};
  184812. let name2;
  184813. if (typeof value.type === "string") {
  184814. name2 = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
  184815. Object.defineProperty(visit4, "name", {
  184816. value: "node (" + color2(value.type + (name2 ? "<" + name2 + ">" : "")) + ")"
  184817. });
  184818. }
  184819. return visit4;
  184820. function visit4() {
  184821. let result = [];
  184822. let subresult;
  184823. let offset2;
  184824. let grandparents;
  184825. if (!test || is(node, index2, parents[parents.length - 1] || null)) {
  184826. result = toResult2(visitor(node, parents));
  184827. if (result[0] === EXIT2) {
  184828. return result;
  184829. }
  184830. }
  184831. if (node.children && result[0] !== SKIP2) {
  184832. offset2 = (reverse ? node.children.length : -1) + step;
  184833. grandparents = parents.concat(node);
  184834. while (offset2 > -1 && offset2 < node.children.length) {
  184835. subresult = factory2(node.children[offset2], offset2, grandparents)();
  184836. if (subresult[0] === EXIT2) {
  184837. return subresult;
  184838. }
  184839. offset2 = typeof subresult[1] === "number" ? subresult[1] : offset2 + step;
  184840. }
  184841. }
  184842. return result;
  184843. }
  184844. }
  184845. };
  184846. function toResult2(value) {
  184847. if (Array.isArray(value)) {
  184848. return value;
  184849. }
  184850. if (typeof value === "number") {
  184851. return [CONTINUE2, value];
  184852. }
  184853. return [value];
  184854. }
  184855. // node_modules/unist-util-visit/index.js
  184856. var visit2 = function(tree, test, visitor, reverse) {
  184857. if (typeof test === "function" && typeof visitor !== "function") {
  184858. reverse = visitor;
  184859. visitor = test;
  184860. test = null;
  184861. }
  184862. visitParents(tree, test, overload, reverse);
  184863. function overload(node, parents) {
  184864. const parent = parents[parents.length - 1];
  184865. return visitor(
  184866. node,
  184867. parent ? parent.children.indexOf(node) : null,
  184868. parent
  184869. );
  184870. }
  184871. };
  184872. // node_modules/unist-util-position/index.js
  184873. var pointStart = point2("start");
  184874. var pointEnd = point2("end");
  184875. function position2(node) {
  184876. return { start: pointStart(node), end: pointEnd(node) };
  184877. }
  184878. function point2(type) {
  184879. return point3;
  184880. function point3(node) {
  184881. var point4 = node && node.position && node.position[type] || {};
  184882. return {
  184883. line: point4.line || null,
  184884. column: point4.column || null,
  184885. offset: point4.offset > -1 ? point4.offset : null
  184886. };
  184887. }
  184888. }
  184889. // node_modules/unist-util-generated/index.js
  184890. function generated(node) {
  184891. return !node || !node.position || !node.position.start || !node.position.start.line || !node.position.start.column || !node.position.end || !node.position.end.line || !node.position.end.column;
  184892. }
  184893. // node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/color.js
  184894. function color3(d) {
  184895. return "\x1B[33m" + d + "\x1B[39m";
  184896. }
  184897. // node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/index.js
  184898. var CONTINUE3 = true;
  184899. var SKIP3 = "skip";
  184900. var EXIT3 = false;
  184901. var visitParents2 = function(tree, test, visitor, reverse) {
  184902. if (typeof test === "function" && typeof visitor !== "function") {
  184903. reverse = visitor;
  184904. visitor = test;
  184905. test = null;
  184906. }
  184907. var is = convert(test);
  184908. var step = reverse ? -1 : 1;
  184909. factory2(tree, null, [])();
  184910. function factory2(node, index2, parents) {
  184911. var value = typeof node === "object" && node !== null ? node : {};
  184912. var name2;
  184913. if (typeof value.type === "string") {
  184914. name2 = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
  184915. Object.defineProperty(visit4, "name", {
  184916. value: "node (" + color3(value.type + (name2 ? "<" + name2 + ">" : "")) + ")"
  184917. });
  184918. }
  184919. return visit4;
  184920. function visit4() {
  184921. var result = [];
  184922. var subresult;
  184923. var offset2;
  184924. var grandparents;
  184925. if (!test || is(node, index2, parents[parents.length - 1] || null)) {
  184926. result = toResult3(visitor(node, parents));
  184927. if (result[0] === EXIT3) {
  184928. return result;
  184929. }
  184930. }
  184931. if (node.children && result[0] !== SKIP3) {
  184932. offset2 = (reverse ? node.children.length : -1) + step;
  184933. grandparents = parents.concat(node);
  184934. while (offset2 > -1 && offset2 < node.children.length) {
  184935. subresult = factory2(node.children[offset2], offset2, grandparents)();
  184936. if (subresult[0] === EXIT3) {
  184937. return subresult;
  184938. }
  184939. offset2 = typeof subresult[1] === "number" ? subresult[1] : offset2 + step;
  184940. }
  184941. }
  184942. return result;
  184943. }
  184944. }
  184945. };
  184946. function toResult3(value) {
  184947. if (Array.isArray(value)) {
  184948. return value;
  184949. }
  184950. if (typeof value === "number") {
  184951. return [CONTINUE3, value];
  184952. }
  184953. return [value];
  184954. }
  184955. // node_modules/mdast-util-definitions/node_modules/unist-util-visit/index.js
  184956. var visit3 = function(tree, test, visitor, reverse) {
  184957. if (typeof test === "function" && typeof visitor !== "function") {
  184958. reverse = visitor;
  184959. visitor = test;
  184960. test = null;
  184961. }
  184962. visitParents2(tree, test, overload, reverse);
  184963. function overload(node, parents) {
  184964. var parent = parents[parents.length - 1];
  184965. return visitor(
  184966. node,
  184967. parent ? parent.children.indexOf(node) : null,
  184968. parent
  184969. );
  184970. }
  184971. };
  184972. // node_modules/mdast-util-definitions/index.js
  184973. var own8 = {}.hasOwnProperty;
  184974. function definitions(node) {
  184975. const cache = /* @__PURE__ */ Object.create(null);
  184976. if (!node || !node.type) {
  184977. throw new Error("mdast-util-definitions expected node");
  184978. }
  184979. visit3(node, "definition", ondefinition);
  184980. return getDefinition;
  184981. function ondefinition(definition2) {
  184982. const id = clean(definition2.identifier);
  184983. if (id && !own8.call(cache, id)) {
  184984. cache[id] = definition2;
  184985. }
  184986. }
  184987. function getDefinition(identifier) {
  184988. const id = clean(identifier);
  184989. return id && own8.call(cache, id) ? cache[id] : null;
  184990. }
  184991. }
  184992. function clean(value) {
  184993. return String(value || "").toUpperCase();
  184994. }
  184995. // node_modules/micromark-util-encode/index.js
  184996. var characterReferences = { '"': "quot", "&": "amp", "<": "lt", ">": "gt" };
  184997. function encode(value) {
  184998. return value.replace(/["&<>]/g, replace);
  184999. function replace(value2) {
  185000. return "&" + characterReferences[value2] + ";";
  185001. }
  185002. }
  185003. // node_modules/micromark-util-sanitize-uri/index.js
  185004. function sanitizeUri(url, protocol) {
  185005. const value = encode(normalizeUri(url || ""));
  185006. if (!protocol) {
  185007. return value;
  185008. }
  185009. const colon = value.indexOf(":");
  185010. const questionMark = value.indexOf("?");
  185011. const numberSign = value.indexOf("#");
  185012. const slash = value.indexOf("/");
  185013. if (colon < 0 || slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign || protocol.test(value.slice(0, colon))) {
  185014. return value;
  185015. }
  185016. return "";
  185017. }
  185018. function normalizeUri(value) {
  185019. const result = [];
  185020. let index2 = -1;
  185021. let start3 = 0;
  185022. let skip = 0;
  185023. while (++index2 < value.length) {
  185024. const code2 = value.charCodeAt(index2);
  185025. let replace = "";
  185026. if (code2 === 37 && asciiAlphanumeric(value.charCodeAt(index2 + 1)) && asciiAlphanumeric(value.charCodeAt(index2 + 2))) {
  185027. skip = 2;
  185028. } else if (code2 < 128) {
  185029. if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code2))) {
  185030. replace = String.fromCharCode(code2);
  185031. }
  185032. } else if (code2 > 55295 && code2 < 57344) {
  185033. const next = value.charCodeAt(index2 + 1);
  185034. if (code2 < 56320 && next > 56319 && next < 57344) {
  185035. replace = String.fromCharCode(code2, next);
  185036. skip = 1;
  185037. } else {
  185038. replace = "\uFFFD";
  185039. }
  185040. } else {
  185041. replace = String.fromCharCode(code2);
  185042. }
  185043. if (replace) {
  185044. result.push(value.slice(start3, index2), encodeURIComponent(replace));
  185045. start3 = index2 + skip + 1;
  185046. replace = "";
  185047. }
  185048. if (skip) {
  185049. index2 += skip;
  185050. skip = 0;
  185051. }
  185052. }
  185053. return result.join("") + value.slice(start3);
  185054. }
  185055. // node_modules/mdast-util-to-hast/lib/wrap.js
  185056. function wrap2(nodes, loose) {
  185057. const result = [];
  185058. let index2 = -1;
  185059. if (loose) {
  185060. result.push(u("text", "\n"));
  185061. }
  185062. while (++index2 < nodes.length) {
  185063. if (index2)
  185064. result.push(u("text", "\n"));
  185065. result.push(nodes[index2]);
  185066. }
  185067. if (loose && nodes.length > 0) {
  185068. result.push(u("text", "\n"));
  185069. }
  185070. return result;
  185071. }
  185072. // node_modules/mdast-util-to-hast/lib/footer.js
  185073. function footer(h) {
  185074. let index2 = -1;
  185075. const listItems = [];
  185076. while (++index2 < h.footnoteOrder.length) {
  185077. const def = h.footnoteById[h.footnoteOrder[index2].toUpperCase()];
  185078. if (!def) {
  185079. continue;
  185080. }
  185081. const content3 = all2(h, def);
  185082. const id = String(def.identifier);
  185083. const safeId = sanitizeUri(id.toLowerCase());
  185084. let referenceIndex = 0;
  185085. const backReferences = [];
  185086. while (++referenceIndex <= h.footnoteCounts[id]) {
  185087. const backReference = {
  185088. type: "element",
  185089. tagName: "a",
  185090. properties: {
  185091. href: "#" + h.clobberPrefix + "fnref-" + safeId + (referenceIndex > 1 ? "-" + referenceIndex : ""),
  185092. dataFootnoteBackref: true,
  185093. className: ["data-footnote-backref"],
  185094. ariaLabel: h.footnoteBackLabel
  185095. },
  185096. children: [{ type: "text", value: "\u21A9" }]
  185097. };
  185098. if (referenceIndex > 1) {
  185099. backReference.children.push({
  185100. type: "element",
  185101. tagName: "sup",
  185102. children: [{ type: "text", value: String(referenceIndex) }]
  185103. });
  185104. }
  185105. if (backReferences.length > 0) {
  185106. backReferences.push({ type: "text", value: " " });
  185107. }
  185108. backReferences.push(backReference);
  185109. }
  185110. const tail = content3[content3.length - 1];
  185111. if (tail && tail.type === "element" && tail.tagName === "p") {
  185112. const tailTail = tail.children[tail.children.length - 1];
  185113. if (tailTail && tailTail.type === "text") {
  185114. tailTail.value += " ";
  185115. } else {
  185116. tail.children.push({ type: "text", value: " " });
  185117. }
  185118. tail.children.push(...backReferences);
  185119. } else {
  185120. content3.push(...backReferences);
  185121. }
  185122. const listItem2 = {
  185123. type: "element",
  185124. tagName: "li",
  185125. properties: { id: h.clobberPrefix + "fn-" + safeId },
  185126. children: wrap2(content3, true)
  185127. };
  185128. if (def.position) {
  185129. listItem2.position = def.position;
  185130. }
  185131. listItems.push(listItem2);
  185132. }
  185133. if (listItems.length === 0) {
  185134. return null;
  185135. }
  185136. return {
  185137. type: "element",
  185138. tagName: "section",
  185139. properties: { dataFootnotes: true, className: ["footnotes"] },
  185140. children: [
  185141. {
  185142. type: "element",
  185143. tagName: "h2",
  185144. properties: { id: "footnote-label", className: ["sr-only"] },
  185145. children: [u("text", h.footnoteLabel)]
  185146. },
  185147. { type: "text", value: "\n" },
  185148. {
  185149. type: "element",
  185150. tagName: "ol",
  185151. properties: {},
  185152. children: wrap2(listItems, true)
  185153. },
  185154. { type: "text", value: "\n" }
  185155. ]
  185156. };
  185157. }
  185158. // node_modules/mdast-util-to-hast/lib/handlers/blockquote.js
  185159. function blockquote(h, node) {
  185160. return h(node, "blockquote", wrap2(all2(h, node), true));
  185161. }
  185162. // node_modules/mdast-util-to-hast/lib/handlers/break.js
  185163. function hardBreak(h, node) {
  185164. return [h(node, "br"), u("text", "\n")];
  185165. }
  185166. // node_modules/mdast-util-to-hast/lib/handlers/code.js
  185167. function code(h, node) {
  185168. const value = node.value ? node.value + "\n" : "";
  185169. const lang = node.lang && node.lang.match(/^[^ \t]+(?=[ \t]|$)/);
  185170. const props = {};
  185171. if (lang) {
  185172. props.className = ["language-" + lang];
  185173. }
  185174. const code2 = h(node, "code", props, [u("text", value)]);
  185175. if (node.meta) {
  185176. code2.data = { meta: node.meta };
  185177. }
  185178. return h(node.position, "pre", [code2]);
  185179. }
  185180. // node_modules/mdast-util-to-hast/lib/handlers/delete.js
  185181. function strikethrough(h, node) {
  185182. return h(node, "del", all2(h, node));
  185183. }
  185184. // node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
  185185. function emphasis(h, node) {
  185186. return h(node, "em", all2(h, node));
  185187. }
  185188. // node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
  185189. function footnoteReference(h, node) {
  185190. const id = String(node.identifier);
  185191. const safeId = sanitizeUri(id.toLowerCase());
  185192. const index2 = h.footnoteOrder.indexOf(id);
  185193. let counter;
  185194. if (index2 === -1) {
  185195. h.footnoteOrder.push(id);
  185196. h.footnoteCounts[id] = 1;
  185197. counter = h.footnoteOrder.length;
  185198. } else {
  185199. h.footnoteCounts[id]++;
  185200. counter = index2 + 1;
  185201. }
  185202. const reuseCounter = h.footnoteCounts[id];
  185203. return h(node, "sup", [
  185204. h(
  185205. node.position,
  185206. "a",
  185207. {
  185208. href: "#" + h.clobberPrefix + "fn-" + safeId,
  185209. id: h.clobberPrefix + "fnref-" + safeId + (reuseCounter > 1 ? "-" + reuseCounter : ""),
  185210. dataFootnoteRef: true,
  185211. ariaDescribedBy: "footnote-label"
  185212. },
  185213. [u("text", String(counter))]
  185214. )
  185215. ]);
  185216. }
  185217. // node_modules/mdast-util-to-hast/lib/handlers/footnote.js
  185218. function footnote(h, node) {
  185219. const footnoteById = h.footnoteById;
  185220. let no = 1;
  185221. while (no in footnoteById)
  185222. no++;
  185223. const identifier = String(no);
  185224. footnoteById[identifier] = {
  185225. type: "footnoteDefinition",
  185226. identifier,
  185227. children: [{ type: "paragraph", children: node.children }],
  185228. position: node.position
  185229. };
  185230. return footnoteReference(h, {
  185231. type: "footnoteReference",
  185232. identifier,
  185233. position: node.position
  185234. });
  185235. }
  185236. // node_modules/mdast-util-to-hast/lib/handlers/heading.js
  185237. function heading(h, node) {
  185238. return h(node, "h" + node.depth, all2(h, node));
  185239. }
  185240. // node_modules/mdast-util-to-hast/lib/handlers/html.js
  185241. function html(h, node) {
  185242. return h.dangerous ? h.augment(node, u("raw", node.value)) : null;
  185243. }
  185244. // node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
  185245. var import_encode = __toESM(require_encode(), 1);
  185246. // node_modules/mdast-util-to-hast/lib/revert.js
  185247. function revert(h, node) {
  185248. const subtype = node.referenceType;
  185249. let suffix = "]";
  185250. if (subtype === "collapsed") {
  185251. suffix += "[]";
  185252. } else if (subtype === "full") {
  185253. suffix += "[" + (node.label || node.identifier) + "]";
  185254. }
  185255. if (node.type === "imageReference") {
  185256. return u("text", "![" + node.alt + suffix);
  185257. }
  185258. const contents = all2(h, node);
  185259. const head = contents[0];
  185260. if (head && head.type === "text") {
  185261. head.value = "[" + head.value;
  185262. } else {
  185263. contents.unshift(u("text", "["));
  185264. }
  185265. const tail = contents[contents.length - 1];
  185266. if (tail && tail.type === "text") {
  185267. tail.value += suffix;
  185268. } else {
  185269. contents.push(u("text", suffix));
  185270. }
  185271. return contents;
  185272. }
  185273. // node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
  185274. function imageReference(h, node) {
  185275. const def = h.definition(node.identifier);
  185276. if (!def) {
  185277. return revert(h, node);
  185278. }
  185279. const props = { src: (0, import_encode.default)(def.url || ""), alt: node.alt };
  185280. if (def.title !== null && def.title !== void 0) {
  185281. props.title = def.title;
  185282. }
  185283. return h(node, "img", props);
  185284. }
  185285. // node_modules/mdast-util-to-hast/lib/handlers/image.js
  185286. var import_encode2 = __toESM(require_encode(), 1);
  185287. function image(h, node) {
  185288. const props = { src: (0, import_encode2.default)(node.url), alt: node.alt };
  185289. if (node.title !== null && node.title !== void 0) {
  185290. props.title = node.title;
  185291. }
  185292. return h(node, "img", props);
  185293. }
  185294. // node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
  185295. function inlineCode(h, node) {
  185296. return h(node, "code", [u("text", node.value.replace(/\r?\n|\r/g, " "))]);
  185297. }
  185298. // node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
  185299. var import_encode3 = __toESM(require_encode(), 1);
  185300. function linkReference(h, node) {
  185301. const def = h.definition(node.identifier);
  185302. if (!def) {
  185303. return revert(h, node);
  185304. }
  185305. const props = { href: (0, import_encode3.default)(def.url || "") };
  185306. if (def.title !== null && def.title !== void 0) {
  185307. props.title = def.title;
  185308. }
  185309. return h(node, "a", props, all2(h, node));
  185310. }
  185311. // node_modules/mdast-util-to-hast/lib/handlers/link.js
  185312. var import_encode4 = __toESM(require_encode(), 1);
  185313. function link(h, node) {
  185314. const props = { href: (0, import_encode4.default)(node.url) };
  185315. if (node.title !== null && node.title !== void 0) {
  185316. props.title = node.title;
  185317. }
  185318. return h(node, "a", props, all2(h, node));
  185319. }
  185320. // node_modules/mdast-util-to-hast/lib/handlers/list-item.js
  185321. function listItem(h, node, parent) {
  185322. const result = all2(h, node);
  185323. const loose = parent ? listLoose(parent) : listItemLoose(node);
  185324. const props = {};
  185325. const wrapped = [];
  185326. if (typeof node.checked === "boolean") {
  185327. let paragraph2;
  185328. if (result[0] && result[0].type === "element" && result[0].tagName === "p") {
  185329. paragraph2 = result[0];
  185330. } else {
  185331. paragraph2 = h(null, "p", []);
  185332. result.unshift(paragraph2);
  185333. }
  185334. if (paragraph2.children.length > 0) {
  185335. paragraph2.children.unshift(u("text", " "));
  185336. }
  185337. paragraph2.children.unshift(
  185338. h(null, "input", {
  185339. type: "checkbox",
  185340. checked: node.checked,
  185341. disabled: true
  185342. })
  185343. );
  185344. props.className = ["task-list-item"];
  185345. }
  185346. let index2 = -1;
  185347. while (++index2 < result.length) {
  185348. const child = result[index2];
  185349. if (loose || index2 !== 0 || child.type !== "element" || child.tagName !== "p") {
  185350. wrapped.push(u("text", "\n"));
  185351. }
  185352. if (child.type === "element" && child.tagName === "p" && !loose) {
  185353. wrapped.push(...child.children);
  185354. } else {
  185355. wrapped.push(child);
  185356. }
  185357. }
  185358. const tail = result[result.length - 1];
  185359. if (tail && (loose || !("tagName" in tail) || tail.tagName !== "p")) {
  185360. wrapped.push(u("text", "\n"));
  185361. }
  185362. return h(node, "li", props, wrapped);
  185363. }
  185364. function listLoose(node) {
  185365. let loose = node.spread;
  185366. const children = node.children;
  185367. let index2 = -1;
  185368. while (!loose && ++index2 < children.length) {
  185369. loose = listItemLoose(children[index2]);
  185370. }
  185371. return Boolean(loose);
  185372. }
  185373. function listItemLoose(node) {
  185374. const spread = node.spread;
  185375. return spread === void 0 || spread === null ? node.children.length > 1 : spread;
  185376. }
  185377. // node_modules/mdast-util-to-hast/lib/handlers/list.js
  185378. function list2(h, node) {
  185379. const props = {};
  185380. const name2 = node.ordered ? "ol" : "ul";
  185381. const items = all2(h, node);
  185382. let index2 = -1;
  185383. if (typeof node.start === "number" && node.start !== 1) {
  185384. props.start = node.start;
  185385. }
  185386. while (++index2 < items.length) {
  185387. const item = items[index2];
  185388. if (item.type === "element" && item.tagName === "li" && item.properties && Array.isArray(item.properties.className) && item.properties.className.includes("task-list-item")) {
  185389. props.className = ["contains-task-list"];
  185390. break;
  185391. }
  185392. }
  185393. return h(node, name2, props, wrap2(items, true));
  185394. }
  185395. // node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
  185396. function paragraph(h, node) {
  185397. return h(node, "p", all2(h, node));
  185398. }
  185399. // node_modules/mdast-util-to-hast/lib/handlers/root.js
  185400. function root(h, node) {
  185401. return h.augment(node, u("root", wrap2(all2(h, node))));
  185402. }
  185403. // node_modules/mdast-util-to-hast/lib/handlers/strong.js
  185404. function strong(h, node) {
  185405. return h(node, "strong", all2(h, node));
  185406. }
  185407. // node_modules/mdast-util-to-hast/lib/handlers/table.js
  185408. function table(h, node) {
  185409. const rows = node.children;
  185410. let index2 = -1;
  185411. const align = node.align || [];
  185412. const result = [];
  185413. while (++index2 < rows.length) {
  185414. const row = rows[index2].children;
  185415. const name2 = index2 === 0 ? "th" : "td";
  185416. const out = [];
  185417. let cellIndex = -1;
  185418. const length = node.align ? align.length : row.length;
  185419. while (++cellIndex < length) {
  185420. const cell = row[cellIndex];
  185421. out.push(
  185422. h(cell, name2, { align: align[cellIndex] }, cell ? all2(h, cell) : [])
  185423. );
  185424. }
  185425. result[index2] = h(rows[index2], "tr", wrap2(out, true));
  185426. }
  185427. return h(
  185428. node,
  185429. "table",
  185430. wrap2(
  185431. [h(result[0].position, "thead", wrap2([result[0]], true))].concat(
  185432. result[1] ? h(
  185433. {
  185434. start: pointStart(result[1]),
  185435. end: pointEnd(result[result.length - 1])
  185436. },
  185437. "tbody",
  185438. wrap2(result.slice(1), true)
  185439. ) : []
  185440. ),
  185441. true
  185442. )
  185443. );
  185444. }
  185445. // node_modules/mdast-util-to-hast/lib/handlers/text.js
  185446. function text3(h, node) {
  185447. return h.augment(
  185448. node,
  185449. u("text", String(node.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g, "$1"))
  185450. );
  185451. }
  185452. // node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
  185453. function thematicBreak2(h, node) {
  185454. return h(node, "hr");
  185455. }
  185456. // node_modules/mdast-util-to-hast/lib/handlers/index.js
  185457. var handlers = {
  185458. blockquote,
  185459. break: hardBreak,
  185460. code,
  185461. delete: strikethrough,
  185462. emphasis,
  185463. footnoteReference,
  185464. footnote,
  185465. heading,
  185466. html,
  185467. imageReference,
  185468. image,
  185469. inlineCode,
  185470. linkReference,
  185471. link,
  185472. listItem,
  185473. list: list2,
  185474. paragraph,
  185475. root,
  185476. strong,
  185477. table,
  185478. text: text3,
  185479. thematicBreak: thematicBreak2,
  185480. toml: ignore,
  185481. yaml: ignore,
  185482. definition: ignore,
  185483. footnoteDefinition: ignore
  185484. };
  185485. function ignore() {
  185486. return null;
  185487. }
  185488. // node_modules/mdast-util-to-hast/lib/index.js
  185489. var own9 = {}.hasOwnProperty;
  185490. function factory(tree, options) {
  185491. const settings = options || {};
  185492. const dangerous = settings.allowDangerousHtml || false;
  185493. const footnoteById = {};
  185494. h.dangerous = dangerous;
  185495. h.clobberPrefix = settings.clobberPrefix === void 0 || settings.clobberPrefix === null ? "user-content-" : settings.clobberPrefix;
  185496. h.footnoteLabel = settings.footnoteLabel || "Footnotes";
  185497. h.footnoteBackLabel = settings.footnoteBackLabel || "Back to content";
  185498. h.definition = definitions(tree);
  185499. h.footnoteById = footnoteById;
  185500. h.footnoteOrder = [];
  185501. h.footnoteCounts = {};
  185502. h.augment = augment;
  185503. h.handlers = { ...handlers, ...settings.handlers };
  185504. h.unknownHandler = settings.unknownHandler;
  185505. h.passThrough = settings.passThrough;
  185506. visit2(tree, "footnoteDefinition", (definition2) => {
  185507. const id = String(definition2.identifier).toUpperCase();
  185508. if (!own9.call(footnoteById, id)) {
  185509. footnoteById[id] = definition2;
  185510. }
  185511. });
  185512. return h;
  185513. function augment(left, right) {
  185514. if (left && "data" in left && left.data) {
  185515. const data2 = left.data;
  185516. if (data2.hName) {
  185517. if (right.type !== "element") {
  185518. right = {
  185519. type: "element",
  185520. tagName: "",
  185521. properties: {},
  185522. children: []
  185523. };
  185524. }
  185525. right.tagName = data2.hName;
  185526. }
  185527. if (right.type === "element" && data2.hProperties) {
  185528. right.properties = { ...right.properties, ...data2.hProperties };
  185529. }
  185530. if ("children" in right && right.children && data2.hChildren) {
  185531. right.children = data2.hChildren;
  185532. }
  185533. }
  185534. if (left) {
  185535. const ctx = "type" in left ? left : { position: left };
  185536. if (!generated(ctx)) {
  185537. right.position = { start: pointStart(ctx), end: pointEnd(ctx) };
  185538. }
  185539. }
  185540. return right;
  185541. }
  185542. function h(node, tagName, props, children) {
  185543. if (Array.isArray(props)) {
  185544. children = props;
  185545. props = {};
  185546. }
  185547. return augment(node, {
  185548. type: "element",
  185549. tagName,
  185550. properties: props || {},
  185551. children: children || []
  185552. });
  185553. }
  185554. }
  185555. function toHast(tree, options) {
  185556. const h = factory(tree, options);
  185557. const node = one2(h, tree, null);
  185558. const foot = footer(h);
  185559. if (foot) {
  185560. node.children.push(u("text", "\n"), foot);
  185561. }
  185562. return Array.isArray(node) ? { type: "root", children: node } : node;
  185563. }
  185564. // node_modules/remark-rehype/lib/index.js
  185565. var remarkRehype = function(destination, options) {
  185566. return destination && "run" in destination ? bridge(destination, options) : mutate(destination || options);
  185567. };
  185568. var lib_default = remarkRehype;
  185569. function bridge(destination, options) {
  185570. return (node, file, next) => {
  185571. destination.run(toHast(node, options), file, (error) => {
  185572. next(error);
  185573. });
  185574. };
  185575. }
  185576. function mutate(options) {
  185577. return (node) => toHast(node, options);
  185578. }
  185579. // node_modules/estree-walker/src/walker.js
  185580. var WalkerBase = class {
  185581. constructor() {
  185582. this.should_skip = false;
  185583. this.should_remove = false;
  185584. this.replacement = null;
  185585. this.context = {
  185586. skip: () => this.should_skip = true,
  185587. remove: () => this.should_remove = true,
  185588. replace: (node) => this.replacement = node
  185589. };
  185590. }
  185591. replace(parent, prop, index2, node) {
  185592. if (parent) {
  185593. if (index2 !== null) {
  185594. parent[prop][index2] = node;
  185595. } else {
  185596. parent[prop] = node;
  185597. }
  185598. }
  185599. }
  185600. remove(parent, prop, index2) {
  185601. if (parent) {
  185602. if (index2 !== null) {
  185603. parent[prop].splice(index2, 1);
  185604. } else {
  185605. delete parent[prop];
  185606. }
  185607. }
  185608. }
  185609. };
  185610. // node_modules/estree-walker/src/sync.js
  185611. var SyncWalker = class extends WalkerBase {
  185612. constructor(enter, leave) {
  185613. super();
  185614. this.enter = enter;
  185615. this.leave = leave;
  185616. }
  185617. visit(node, parent, prop, index2) {
  185618. if (node) {
  185619. if (this.enter) {
  185620. const _should_skip = this.should_skip;
  185621. const _should_remove = this.should_remove;
  185622. const _replacement = this.replacement;
  185623. this.should_skip = false;
  185624. this.should_remove = false;
  185625. this.replacement = null;
  185626. this.enter.call(this.context, node, parent, prop, index2);
  185627. if (this.replacement) {
  185628. node = this.replacement;
  185629. this.replace(parent, prop, index2, node);
  185630. }
  185631. if (this.should_remove) {
  185632. this.remove(parent, prop, index2);
  185633. }
  185634. const skipped = this.should_skip;
  185635. const removed = this.should_remove;
  185636. this.should_skip = _should_skip;
  185637. this.should_remove = _should_remove;
  185638. this.replacement = _replacement;
  185639. if (skipped)
  185640. return node;
  185641. if (removed)
  185642. return null;
  185643. }
  185644. for (const key in node) {
  185645. const value = node[key];
  185646. if (typeof value !== "object") {
  185647. continue;
  185648. } else if (Array.isArray(value)) {
  185649. for (let i = 0; i < value.length; i += 1) {
  185650. if (value[i] !== null && typeof value[i].type === "string") {
  185651. if (!this.visit(value[i], node, key, i)) {
  185652. i--;
  185653. }
  185654. }
  185655. }
  185656. } else if (value !== null && typeof value.type === "string") {
  185657. this.visit(value, node, key, null);
  185658. }
  185659. }
  185660. if (this.leave) {
  185661. const _replacement = this.replacement;
  185662. const _should_remove = this.should_remove;
  185663. this.replacement = null;
  185664. this.should_remove = false;
  185665. this.leave.call(this.context, node, parent, prop, index2);
  185666. if (this.replacement) {
  185667. node = this.replacement;
  185668. this.replace(parent, prop, index2, node);
  185669. }
  185670. if (this.should_remove) {
  185671. this.remove(parent, prop, index2);
  185672. }
  185673. const removed = this.should_remove;
  185674. this.replacement = _replacement;
  185675. this.should_remove = _should_remove;
  185676. if (removed)
  185677. return null;
  185678. }
  185679. }
  185680. return node;
  185681. }
  185682. };
  185683. // node_modules/estree-walker/src/index.js
  185684. function walk(ast, { enter, leave }) {
  185685. const instance = new SyncWalker(enter, leave);
  185686. return instance.visit(ast, null);
  185687. }
  185688. // node_modules/estree-util-build-jsx/index.js
  185689. var regex = /@(jsx|jsxFrag|jsxImportSource|jsxRuntime)\s+(\S+)/g;
  185690. function buildJsx(tree, options = {}) {
  185691. var automatic = options.runtime === "automatic";
  185692. var annotations = {};
  185693. var imports = {};
  185694. walk(tree, { enter, leave });
  185695. return tree;
  185696. function enter(node) {
  185697. var comments;
  185698. var index2;
  185699. var match;
  185700. if (node.type === "Program") {
  185701. comments = node.comments || [];
  185702. index2 = -1;
  185703. while (++index2 < comments.length) {
  185704. regex.lastIndex = 0;
  185705. while (match = regex.exec(comments[index2].value)) {
  185706. annotations[match[1]] = match[2];
  185707. }
  185708. }
  185709. if (annotations.jsxRuntime) {
  185710. if (annotations.jsxRuntime === "automatic") {
  185711. automatic = true;
  185712. if (annotations.jsx) {
  185713. throw new Error("Unexpected `@jsx` pragma w/ automatic runtime");
  185714. }
  185715. if (annotations.jsxFrag) {
  185716. throw new Error("Unexpected `@jsxFrag` pragma w/ automatic runtime");
  185717. }
  185718. } else if (annotations.jsxRuntime === "classic") {
  185719. automatic = false;
  185720. if (annotations.jsxImportSource) {
  185721. throw new Error("Unexpected `@jsxImportSource` w/ classic runtime");
  185722. }
  185723. } else {
  185724. throw new Error(
  185725. "Unexpected `jsxRuntime` `" + annotations.jsxRuntime + "`, expected `automatic` or `classic`"
  185726. );
  185727. }
  185728. }
  185729. }
  185730. }
  185731. function leave(node) {
  185732. var parameters = [];
  185733. var children = [];
  185734. var objects = [];
  185735. var fields = [];
  185736. var index2 = -1;
  185737. var child;
  185738. var name2;
  185739. var props;
  185740. var attributes;
  185741. var attribute;
  185742. var spread;
  185743. var key;
  185744. var callee;
  185745. var specifiers;
  185746. var prop;
  185747. var value;
  185748. if (node.type === "Program") {
  185749. specifiers = [];
  185750. if (imports.fragment) {
  185751. specifiers.push({
  185752. type: "ImportSpecifier",
  185753. imported: { type: "Identifier", name: "Fragment" },
  185754. local: { type: "Identifier", name: "_Fragment" }
  185755. });
  185756. }
  185757. if (imports.jsx) {
  185758. specifiers.push({
  185759. type: "ImportSpecifier",
  185760. imported: { type: "Identifier", name: "jsx" },
  185761. local: { type: "Identifier", name: "_jsx" }
  185762. });
  185763. }
  185764. if (imports.jsxs) {
  185765. specifiers.push({
  185766. type: "ImportSpecifier",
  185767. imported: { type: "Identifier", name: "jsxs" },
  185768. local: { type: "Identifier", name: "_jsxs" }
  185769. });
  185770. }
  185771. if (specifiers.length > 0) {
  185772. node.body.unshift({
  185773. type: "ImportDeclaration",
  185774. specifiers,
  185775. source: {
  185776. type: "Literal",
  185777. value: (annotations.jsxImportSource || options.importSource || "react") + "/jsx-runtime"
  185778. }
  185779. });
  185780. }
  185781. }
  185782. if (node.type !== "JSXElement" && node.type !== "JSXFragment") {
  185783. return;
  185784. }
  185785. while (++index2 < node.children.length) {
  185786. child = node.children[index2];
  185787. if (child.type === "JSXExpressionContainer") {
  185788. if (child.expression.type !== "JSXEmptyExpression") {
  185789. children.push(child.expression);
  185790. }
  185791. } else if (child.type === "JSXText") {
  185792. value = child.value.replace(/\t/g, " ").replace(/ *(\r?\n|\r) */g, "\n").replace(/\n+/g, "\n").replace(/\n+$/, "").replace(/\n/g, " ");
  185793. if (value) {
  185794. children.push(create(child, { type: "Literal", value }));
  185795. }
  185796. } else {
  185797. children.push(child);
  185798. }
  185799. }
  185800. if (node.type === "JSXElement") {
  185801. name2 = toIdentifier(node.openingElement.name);
  185802. if (name2.type === "Identifier" && /^[a-z]/.test(name2.name)) {
  185803. name2 = create(name2, { type: "Literal", value: name2.name });
  185804. }
  185805. attributes = node.openingElement.attributes;
  185806. index2 = -1;
  185807. while (++index2 < attributes.length) {
  185808. attribute = attributes[index2];
  185809. if (attribute.type === "JSXSpreadAttribute") {
  185810. if (fields.length > 0) {
  185811. objects.push({ type: "ObjectExpression", properties: fields });
  185812. fields = [];
  185813. }
  185814. objects.push(attribute.argument);
  185815. spread = true;
  185816. } else {
  185817. prop = toProperty(attribute);
  185818. if (automatic && prop.key.type === "Identifier" && prop.key.name === "key") {
  185819. if (spread) {
  185820. throw new Error(
  185821. "Expected `key` to come before any spread expressions"
  185822. );
  185823. }
  185824. key = prop.value;
  185825. } else {
  185826. fields.push(prop);
  185827. }
  185828. }
  185829. }
  185830. } else if (automatic) {
  185831. imports.fragment = true;
  185832. name2 = { type: "Identifier", name: "_Fragment" };
  185833. } else {
  185834. name2 = toMemberExpression(
  185835. annotations.jsxFrag || options.pragmaFrag || "React.Fragment"
  185836. );
  185837. }
  185838. if (automatic && children.length > 0) {
  185839. fields.push({
  185840. type: "Property",
  185841. key: { type: "Identifier", name: "children" },
  185842. value: children.length > 1 ? { type: "ArrayExpression", elements: children } : children[0],
  185843. kind: "init",
  185844. method: false,
  185845. shorthand: false,
  185846. computed: false
  185847. });
  185848. } else {
  185849. parameters = children;
  185850. }
  185851. if (fields.length > 0) {
  185852. objects.push({ type: "ObjectExpression", properties: fields });
  185853. }
  185854. if (objects.length > 1) {
  185855. if (objects[0].type !== "ObjectExpression") {
  185856. objects.unshift({ type: "ObjectExpression", properties: [] });
  185857. }
  185858. props = {
  185859. type: "CallExpression",
  185860. callee: toMemberExpression("Object.assign"),
  185861. arguments: objects,
  185862. optional: false
  185863. };
  185864. } else if (objects.length > 0) {
  185865. props = objects[0];
  185866. }
  185867. if (automatic) {
  185868. if (children.length > 1) {
  185869. imports.jsxs = true;
  185870. callee = { type: "Identifier", name: "_jsxs" };
  185871. } else {
  185872. imports.jsx = true;
  185873. callee = { type: "Identifier", name: "_jsx" };
  185874. }
  185875. parameters.push(props || { type: "ObjectExpression", properties: [] });
  185876. if (key) {
  185877. parameters.push(key);
  185878. }
  185879. } else {
  185880. if (props || parameters.length > 0) {
  185881. parameters.unshift(props || { type: "Literal", value: null });
  185882. }
  185883. callee = toMemberExpression(
  185884. annotations.jsx || options.pragma || "React.createElement"
  185885. );
  185886. }
  185887. parameters.unshift(name2);
  185888. this.replace(
  185889. create(node, {
  185890. type: "CallExpression",
  185891. callee,
  185892. arguments: parameters,
  185893. optional: false
  185894. })
  185895. );
  185896. }
  185897. }
  185898. function toProperty(node) {
  185899. var value;
  185900. if (node.value) {
  185901. if (node.value.type === "JSXExpressionContainer") {
  185902. value = node.value.expression;
  185903. } else {
  185904. value = node.value;
  185905. delete value.raw;
  185906. }
  185907. } else {
  185908. value = { type: "Literal", value: true };
  185909. }
  185910. return create(node, {
  185911. type: "Property",
  185912. key: toIdentifier(node.name),
  185913. value,
  185914. kind: "init",
  185915. method: false,
  185916. shorthand: false,
  185917. computed: false
  185918. });
  185919. }
  185920. function toIdentifier(node) {
  185921. var replace;
  185922. var id;
  185923. if (node.type === "JSXMemberExpression") {
  185924. id = toIdentifier(node.property);
  185925. replace = {
  185926. type: "MemberExpression",
  185927. object: toIdentifier(node.object),
  185928. property: id,
  185929. computed: id.type === "Literal",
  185930. optional: false
  185931. };
  185932. } else if (node.type === "JSXNamespacedName") {
  185933. replace = {
  185934. type: "Literal",
  185935. value: node.namespace.name + ":" + node.name.name
  185936. };
  185937. } else {
  185938. replace = name(node.name) ? { type: "Identifier", name: node.name } : { type: "Literal", value: node.name };
  185939. }
  185940. return create(node, replace);
  185941. }
  185942. function toMemberExpression(id) {
  185943. var identifiers = id.split(".");
  185944. var index2 = -1;
  185945. var result;
  185946. var prop;
  185947. while (++index2 < identifiers.length) {
  185948. prop = name(identifiers[index2]) ? { type: "Identifier", name: identifiers[index2] } : { type: "Literal", value: identifiers[index2] };
  185949. result = index2 ? {
  185950. type: "MemberExpression",
  185951. object: result,
  185952. property: prop,
  185953. computed: index2 && prop.type === "Literal",
  185954. optional: false
  185955. } : prop;
  185956. }
  185957. return result;
  185958. }
  185959. function create(from, node) {
  185960. var fields = ["start", "end", "loc", "range", "comments"];
  185961. var index2 = -1;
  185962. var field;
  185963. while (++index2 < fields.length) {
  185964. field = fields[index2];
  185965. if (field in from) {
  185966. node[field] = from[field];
  185967. }
  185968. }
  185969. return node;
  185970. }
  185971. // node_modules/@mdx-js/mdx/lib/util/estree-util-create.js
  185972. function create2(template, node) {
  185973. const fields = ["start", "end", "loc", "range", "comments"];
  185974. let index2 = -1;
  185975. while (++index2 < fields.length) {
  185976. const field = fields[index2];
  185977. if (field in template) {
  185978. node[field] = template[field];
  185979. }
  185980. }
  185981. return node;
  185982. }
  185983. // node_modules/@mdx-js/mdx/lib/util/estree-util-specifiers-to-declarations.js
  185984. function specifiersToDeclarations(specifiers, init) {
  185985. let index2 = -1;
  185986. const declarations = [];
  185987. const otherSpecifiers = [];
  185988. let importNamespaceSpecifier;
  185989. while (++index2 < specifiers.length) {
  185990. const specifier = specifiers[index2];
  185991. if (specifier.type === "ImportNamespaceSpecifier") {
  185992. importNamespaceSpecifier = specifier;
  185993. } else {
  185994. otherSpecifiers.push(specifier);
  185995. }
  185996. }
  185997. if (importNamespaceSpecifier) {
  185998. declarations.push(
  185999. create2(importNamespaceSpecifier, {
  186000. type: "VariableDeclarator",
  186001. id: importNamespaceSpecifier.local,
  186002. init
  186003. })
  186004. );
  186005. }
  186006. declarations.push({
  186007. type: "VariableDeclarator",
  186008. id: {
  186009. type: "ObjectPattern",
  186010. properties: otherSpecifiers.map((specifier) => {
  186011. let key = specifier.type === "ImportSpecifier" ? specifier.imported : specifier.type === "ExportSpecifier" ? specifier.exported : { type: "Identifier", name: "default" };
  186012. let value = specifier.local;
  186013. if (specifier.type === "ExportSpecifier") {
  186014. value = key;
  186015. key = specifier.local;
  186016. }
  186017. return create2(specifier, {
  186018. type: "Property",
  186019. kind: "init",
  186020. shorthand: key.name === value.name,
  186021. method: false,
  186022. computed: false,
  186023. key,
  186024. value
  186025. });
  186026. })
  186027. },
  186028. init: importNamespaceSpecifier ? { type: "Identifier", name: importNamespaceSpecifier.local.name } : init
  186029. });
  186030. return declarations;
  186031. }
  186032. // node_modules/@mdx-js/mdx/lib/util/estree-util-to-id-or-member-expression.js
  186033. var toIdOrMemberExpression = toIdOrMemberExpressionFactory(
  186034. "Identifier",
  186035. "MemberExpression",
  186036. name
  186037. );
  186038. var toJsxIdOrMemberExpression = toIdOrMemberExpressionFactory(
  186039. "JSXIdentifier",
  186040. "JSXMemberExpression",
  186041. isJsxIdentifierName
  186042. );
  186043. function toIdOrMemberExpressionFactory(idType, memberType, isIdentifier2) {
  186044. return toIdOrMemberExpression2;
  186045. function toIdOrMemberExpression2(ids) {
  186046. let index2 = -1;
  186047. let object;
  186048. while (++index2 < ids.length) {
  186049. const name2 = ids[index2];
  186050. const valid2 = typeof name2 === "string" && isIdentifier2(name2);
  186051. if (idType === "JSXIdentifier" && !valid2) {
  186052. throw new Error("Cannot turn `" + name2 + "` into a JSX identifier");
  186053. }
  186054. const id = valid2 ? { type: idType, name: name2 } : { type: "Literal", value: name2 };
  186055. object = object ? {
  186056. type: memberType,
  186057. object,
  186058. property: id,
  186059. computed: id.type === "Literal",
  186060. optional: false
  186061. } : id;
  186062. }
  186063. if (!object)
  186064. throw new Error("Expected non-empty `ids` to be passed");
  186065. if (object.type === "Literal")
  186066. throw new Error("Expected identifier as left-most value");
  186067. return object;
  186068. }
  186069. }
  186070. function isJsxIdentifierName(name2) {
  186071. let index2 = -1;
  186072. while (++index2 < name2.length) {
  186073. if (!(index2 ? jsxCont : start2)(name2.charCodeAt(index2)))
  186074. return false;
  186075. }
  186076. return index2 > 0;
  186077. }
  186078. function jsxCont(code2) {
  186079. return code2 === 45 || cont2(code2);
  186080. }
  186081. // node_modules/@mdx-js/mdx/lib/plugin/recma-jsx-build.js
  186082. function recmaJsxBuild(options = {}) {
  186083. const { outputFormat } = options;
  186084. return (tree) => {
  186085. buildJsx(tree);
  186086. if (outputFormat === "function-body" && tree.body[0] && tree.body[0].type === "ImportDeclaration" && typeof tree.body[0].source.value === "string" && /\/jsx-runtime$/.test(tree.body[0].source.value)) {
  186087. tree.body[0] = {
  186088. type: "VariableDeclaration",
  186089. kind: "const",
  186090. declarations: specifiersToDeclarations(
  186091. tree.body[0].specifiers,
  186092. toIdOrMemberExpression(["arguments", 0])
  186093. )
  186094. };
  186095. }
  186096. };
  186097. }
  186098. // node_modules/@mdx-js/mdx/lib/plugin/recma-document.js
  186099. var import_url2 = require("url");
  186100. // node_modules/is-reference/src/index.js
  186101. function is_reference(node, parent) {
  186102. if (node.type === "MemberExpression") {
  186103. return !node.computed && is_reference(node.object, node);
  186104. }
  186105. if (node.type === "Identifier") {
  186106. if (!parent)
  186107. return true;
  186108. switch (parent.type) {
  186109. case "MemberExpression":
  186110. return parent.computed || node === parent.object;
  186111. case "MethodDefinition":
  186112. return parent.computed;
  186113. case "PropertyDefinition":
  186114. return parent.computed || node === parent.value;
  186115. case "Property":
  186116. return parent.computed || node === parent.value;
  186117. case "ExportSpecifier":
  186118. case "ImportSpecifier":
  186119. return node === parent.local;
  186120. case "LabeledStatement":
  186121. case "BreakStatement":
  186122. case "ContinueStatement":
  186123. return false;
  186124. default:
  186125. return true;
  186126. }
  186127. }
  186128. return false;
  186129. }
  186130. // node_modules/periscopic/src/index.js
  186131. function analyze(expression) {
  186132. const map = /* @__PURE__ */ new WeakMap();
  186133. const globals = /* @__PURE__ */ new Map();
  186134. const scope = new Scope3(null, false);
  186135. const references = [];
  186136. let current_scope = scope;
  186137. walk(expression, {
  186138. enter(node, parent) {
  186139. switch (node.type) {
  186140. case "Identifier":
  186141. if (is_reference(node, parent)) {
  186142. references.push([current_scope, node]);
  186143. }
  186144. break;
  186145. case "ImportDeclaration":
  186146. node.specifiers.forEach((specifier) => {
  186147. current_scope.declarations.set(specifier.local.name, specifier);
  186148. });
  186149. break;
  186150. case "FunctionExpression":
  186151. case "FunctionDeclaration":
  186152. case "ArrowFunctionExpression":
  186153. if (node.type === "FunctionDeclaration") {
  186154. if (node.id) {
  186155. current_scope.declarations.set(node.id.name, node);
  186156. }
  186157. map.set(node, current_scope = new Scope3(current_scope, false));
  186158. } else {
  186159. map.set(node, current_scope = new Scope3(current_scope, false));
  186160. if (node.type === "FunctionExpression" && node.id) {
  186161. current_scope.declarations.set(node.id.name, node);
  186162. }
  186163. }
  186164. node.params.forEach((param) => {
  186165. extract_names(param).forEach((name2) => {
  186166. current_scope.declarations.set(name2, node);
  186167. });
  186168. });
  186169. break;
  186170. case "ForStatement":
  186171. case "ForInStatement":
  186172. case "ForOfStatement":
  186173. map.set(node, current_scope = new Scope3(current_scope, true));
  186174. break;
  186175. case "BlockStatement":
  186176. map.set(node, current_scope = new Scope3(current_scope, true));
  186177. break;
  186178. case "ClassDeclaration":
  186179. case "VariableDeclaration":
  186180. current_scope.add_declaration(node);
  186181. break;
  186182. case "CatchClause":
  186183. map.set(node, current_scope = new Scope3(current_scope, true));
  186184. if (node.param) {
  186185. extract_names(node.param).forEach((name2) => {
  186186. current_scope.declarations.set(name2, node.param);
  186187. });
  186188. }
  186189. break;
  186190. }
  186191. },
  186192. leave(node) {
  186193. if (map.has(node)) {
  186194. current_scope = current_scope.parent;
  186195. }
  186196. }
  186197. });
  186198. for (let i = references.length - 1; i >= 0; --i) {
  186199. const [scope2, reference] = references[i];
  186200. if (!scope2.references.has(reference.name)) {
  186201. add_reference(scope2, reference.name);
  186202. }
  186203. if (!scope2.find_owner(reference.name)) {
  186204. globals.set(reference.name, reference);
  186205. }
  186206. }
  186207. return { map, scope, globals };
  186208. }
  186209. function add_reference(scope, name2) {
  186210. scope.references.add(name2);
  186211. if (scope.parent)
  186212. add_reference(scope.parent, name2);
  186213. }
  186214. var Scope3 = class {
  186215. constructor(parent, block) {
  186216. this.parent = parent;
  186217. this.block = block;
  186218. this.declarations = /* @__PURE__ */ new Map();
  186219. this.initialised_declarations = /* @__PURE__ */ new Set();
  186220. this.references = /* @__PURE__ */ new Set();
  186221. }
  186222. add_declaration(node) {
  186223. if (node.type === "VariableDeclaration") {
  186224. if (node.kind === "var" && this.block && this.parent) {
  186225. this.parent.add_declaration(node);
  186226. } else {
  186227. const handle_declarator = (declarator) => {
  186228. extract_names(declarator.id).forEach((name2) => {
  186229. this.declarations.set(name2, node);
  186230. if (declarator.init)
  186231. this.initialised_declarations.add(name2);
  186232. });
  186233. ;
  186234. };
  186235. node.declarations.forEach(handle_declarator);
  186236. }
  186237. } else if (node.id) {
  186238. this.declarations.set(node.id.name, node);
  186239. }
  186240. }
  186241. find_owner(name2) {
  186242. if (this.declarations.has(name2))
  186243. return this;
  186244. return this.parent && this.parent.find_owner(name2);
  186245. }
  186246. has(name2) {
  186247. return this.declarations.has(name2) || !!this.parent && this.parent.has(name2);
  186248. }
  186249. };
  186250. function extract_names(param) {
  186251. return extract_identifiers(param).map((node) => node.name);
  186252. }
  186253. function extract_identifiers(param, nodes = []) {
  186254. switch (param.type) {
  186255. case "Identifier":
  186256. nodes.push(param);
  186257. break;
  186258. case "MemberExpression":
  186259. let object = param;
  186260. while (object.type === "MemberExpression") {
  186261. object = object.object;
  186262. }
  186263. nodes.push(object);
  186264. break;
  186265. case "ObjectPattern":
  186266. const handle_prop = (prop) => {
  186267. if (prop.type === "RestElement") {
  186268. extract_identifiers(prop.argument, nodes);
  186269. } else {
  186270. extract_identifiers(prop.value, nodes);
  186271. }
  186272. };
  186273. param.properties.forEach(handle_prop);
  186274. break;
  186275. case "ArrayPattern":
  186276. const handle_element = (element2) => {
  186277. if (element2)
  186278. extract_identifiers(element2, nodes);
  186279. };
  186280. param.elements.forEach(handle_element);
  186281. break;
  186282. case "RestElement":
  186283. extract_identifiers(param.argument, nodes);
  186284. break;
  186285. case "AssignmentPattern":
  186286. extract_identifiers(param.left, nodes);
  186287. break;
  186288. }
  186289. return nodes;
  186290. }
  186291. // node_modules/@mdx-js/mdx/lib/util/estree-util-declaration-to-expression.js
  186292. function declarationToExpression(declaration) {
  186293. if (declaration.type === "FunctionDeclaration") {
  186294. return { ...declaration, type: "FunctionExpression" };
  186295. }
  186296. if (declaration.type === "ClassDeclaration") {
  186297. return { ...declaration, type: "ClassExpression" };
  186298. }
  186299. throw new Error("Cannot turn `" + declaration.type + "` into an expression");
  186300. }
  186301. // node_modules/@mdx-js/mdx/lib/util/estree-util-is-declaration.js
  186302. function isDeclaration(node) {
  186303. const type = node && typeof node === "object" && node.type;
  186304. return Boolean(
  186305. type === "FunctionDeclaration" || type === "ClassDeclaration" || type === "VariableDeclaration"
  186306. );
  186307. }
  186308. // node_modules/@mdx-js/mdx/lib/plugin/recma-document.js
  186309. function recmaDocument(options = {}) {
  186310. const {
  186311. baseUrl,
  186312. useDynamicImport,
  186313. outputFormat = "program",
  186314. pragma = "React.createElement",
  186315. pragmaFrag = "React.Fragment",
  186316. pragmaImportSource = "react",
  186317. jsxImportSource = "react",
  186318. jsxRuntime = "automatic"
  186319. } = options;
  186320. return (tree, file) => {
  186321. const exportedIdentifiers = [];
  186322. const replacement = [];
  186323. const pragmas = [];
  186324. let exportAllCount = 0;
  186325. let layout;
  186326. let content3;
  186327. let child;
  186328. if (!tree.comments)
  186329. tree.comments = [];
  186330. if (jsxRuntime) {
  186331. pragmas.push("@jsxRuntime " + jsxRuntime);
  186332. }
  186333. if (jsxRuntime === "automatic" && jsxImportSource) {
  186334. pragmas.push("@jsxImportSource " + jsxImportSource);
  186335. }
  186336. if (jsxRuntime === "classic" && pragma) {
  186337. pragmas.push("@jsx " + pragma);
  186338. }
  186339. if (jsxRuntime === "classic" && pragmaFrag) {
  186340. pragmas.push("@jsxFrag " + pragmaFrag);
  186341. }
  186342. if (pragmas.length > 0) {
  186343. tree.comments.unshift({ type: "Block", value: pragmas.join(" ") });
  186344. }
  186345. if (jsxRuntime === "classic" && pragmaImportSource) {
  186346. if (!pragma) {
  186347. throw new Error(
  186348. "Missing `pragma` in classic runtime with `pragmaImportSource`"
  186349. );
  186350. }
  186351. handleEsm({
  186352. type: "ImportDeclaration",
  186353. specifiers: [
  186354. {
  186355. type: "ImportDefaultSpecifier",
  186356. local: { type: "Identifier", name: pragma.split(".")[0] }
  186357. }
  186358. ],
  186359. source: { type: "Literal", value: pragmaImportSource }
  186360. });
  186361. }
  186362. for (child of tree.body) {
  186363. if (child.type === "ExportDefaultDeclaration") {
  186364. if (layout) {
  186365. file.fail(
  186366. "Cannot specify multiple layouts (previous: " + stringifyPosition(positionFromEstree(layout)) + ")",
  186367. positionFromEstree(child),
  186368. "recma-document:duplicate-layout"
  186369. );
  186370. }
  186371. layout = child;
  186372. replacement.push({
  186373. type: "VariableDeclaration",
  186374. kind: "const",
  186375. declarations: [
  186376. {
  186377. type: "VariableDeclarator",
  186378. id: { type: "Identifier", name: "MDXLayout" },
  186379. init: isDeclaration(child.declaration) ? declarationToExpression(child.declaration) : child.declaration
  186380. }
  186381. ]
  186382. });
  186383. } else if (child.type === "ExportNamedDeclaration" && child.source) {
  186384. const source = child.source;
  186385. child.specifiers = child.specifiers.filter((specifier) => {
  186386. if (specifier.exported.name === "default") {
  186387. if (layout) {
  186388. file.fail(
  186389. "Cannot specify multiple layouts (previous: " + stringifyPosition(positionFromEstree(layout)) + ")",
  186390. positionFromEstree(child),
  186391. "recma-document:duplicate-layout"
  186392. );
  186393. }
  186394. layout = specifier;
  186395. handleEsm(
  186396. create2(specifier, {
  186397. type: "ImportDeclaration",
  186398. specifiers: [
  186399. specifier.local.name === "default" ? {
  186400. type: "ImportDefaultSpecifier",
  186401. local: { type: "Identifier", name: "MDXLayout" }
  186402. } : create2(specifier.local, {
  186403. type: "ImportSpecifier",
  186404. imported: specifier.local,
  186405. local: { type: "Identifier", name: "MDXLayout" }
  186406. })
  186407. ],
  186408. source: create2(source, { type: "Literal", value: source.value })
  186409. })
  186410. );
  186411. return false;
  186412. }
  186413. return true;
  186414. });
  186415. if (child.specifiers.length > 0) {
  186416. handleExport(child);
  186417. }
  186418. } else if (child.type === "ExportNamedDeclaration" || child.type === "ExportAllDeclaration") {
  186419. handleExport(child);
  186420. } else if (child.type === "ImportDeclaration") {
  186421. handleEsm(child);
  186422. } else if (child.type === "ExpressionStatement" && (child.expression.type === "JSXFragment" || child.expression.type === "JSXElement")) {
  186423. content3 = true;
  186424. replacement.push(createMdxContent(child.expression));
  186425. } else {
  186426. replacement.push(child);
  186427. }
  186428. }
  186429. if (!content3) {
  186430. replacement.push(createMdxContent());
  186431. }
  186432. exportedIdentifiers.push(["MDXContent", "default"]);
  186433. if (outputFormat === "function-body") {
  186434. replacement.push({
  186435. type: "ReturnStatement",
  186436. argument: {
  186437. type: "ObjectExpression",
  186438. properties: [
  186439. ...Array.from({ length: exportAllCount }).map(
  186440. (_, index2) => ({
  186441. type: "SpreadElement",
  186442. argument: { type: "Identifier", name: "_exportAll" + (index2 + 1) }
  186443. })
  186444. ),
  186445. ...exportedIdentifiers.map((d) => {
  186446. const prop = {
  186447. type: "Property",
  186448. kind: "init",
  186449. method: false,
  186450. computed: false,
  186451. shorthand: typeof d === "string",
  186452. key: {
  186453. type: "Identifier",
  186454. name: typeof d === "string" ? d : d[1]
  186455. },
  186456. value: {
  186457. type: "Identifier",
  186458. name: typeof d === "string" ? d : d[0]
  186459. }
  186460. };
  186461. return prop;
  186462. })
  186463. ]
  186464. }
  186465. });
  186466. } else {
  186467. replacement.push({
  186468. type: "ExportDefaultDeclaration",
  186469. declaration: { type: "Identifier", name: "MDXContent" }
  186470. });
  186471. }
  186472. tree.body = replacement;
  186473. function handleExport(node) {
  186474. if (node.type === "ExportNamedDeclaration") {
  186475. if (node.declaration) {
  186476. exportedIdentifiers.push(
  186477. ...analyze(node.declaration).scope.declarations.keys()
  186478. );
  186479. }
  186480. for (child of node.specifiers) {
  186481. exportedIdentifiers.push(child.exported.name);
  186482. }
  186483. }
  186484. handleEsm(node);
  186485. }
  186486. function handleEsm(node) {
  186487. if (baseUrl && node.source) {
  186488. let value = String(node.source.value);
  186489. try {
  186490. value = String(new import_url2.URL(value));
  186491. } catch {
  186492. if (/^\.{0,2}\//.test(value)) {
  186493. value = String(new import_url2.URL(value, baseUrl));
  186494. }
  186495. }
  186496. node.source = create2(node.source, { type: "Literal", value });
  186497. }
  186498. let replace;
  186499. let init;
  186500. if (outputFormat === "function-body") {
  186501. if (node.type === "ImportDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ExportNamedDeclaration" && node.source) {
  186502. if (!useDynamicImport) {
  186503. file.fail(
  186504. "Cannot use `import` or `export \u2026 from` in `evaluate` (outputting a function body) by default: please set `useDynamicImport: true` (and probably specify a `baseUrl`)",
  186505. positionFromEstree(node),
  186506. "recma-document:invalid-esm-statement"
  186507. );
  186508. }
  186509. if (!node.source) {
  186510. throw new Error("Expected `node.source` to be defined");
  186511. }
  186512. init = {
  186513. type: "AwaitExpression",
  186514. argument: create2(node, {
  186515. type: "ImportExpression",
  186516. source: node.source
  186517. })
  186518. };
  186519. if ((node.type === "ImportDeclaration" || node.type === "ExportNamedDeclaration") && node.specifiers.length === 0) {
  186520. replace = { type: "ExpressionStatement", expression: init };
  186521. } else {
  186522. replace = {
  186523. type: "VariableDeclaration",
  186524. kind: "const",
  186525. declarations: node.type === "ExportAllDeclaration" ? [
  186526. {
  186527. type: "VariableDeclarator",
  186528. id: {
  186529. type: "Identifier",
  186530. name: "_exportAll" + ++exportAllCount
  186531. },
  186532. init
  186533. }
  186534. ] : specifiersToDeclarations(node.specifiers, init)
  186535. };
  186536. }
  186537. } else if (node.declaration) {
  186538. replace = node.declaration;
  186539. } else {
  186540. const declarators = node.specifiers.filter(
  186541. (specifier) => specifier.local.name !== specifier.exported.name
  186542. ).map((specifier) => ({
  186543. type: "VariableDeclarator",
  186544. id: specifier.exported,
  186545. init: specifier.local
  186546. }));
  186547. if (declarators.length > 0) {
  186548. replace = {
  186549. type: "VariableDeclaration",
  186550. kind: "const",
  186551. declarations: declarators
  186552. };
  186553. }
  186554. }
  186555. } else {
  186556. replace = node;
  186557. }
  186558. if (replace) {
  186559. replacement.push(replace);
  186560. }
  186561. }
  186562. };
  186563. function createMdxContent(content3) {
  186564. const element2 = {
  186565. type: "JSXElement",
  186566. openingElement: {
  186567. type: "JSXOpeningElement",
  186568. name: { type: "JSXIdentifier", name: "MDXLayout" },
  186569. attributes: [
  186570. {
  186571. type: "JSXSpreadAttribute",
  186572. argument: { type: "Identifier", name: "props" }
  186573. }
  186574. ],
  186575. selfClosing: false
  186576. },
  186577. closingElement: {
  186578. type: "JSXClosingElement",
  186579. name: { type: "JSXIdentifier", name: "MDXLayout" }
  186580. },
  186581. children: [
  186582. {
  186583. type: "JSXElement",
  186584. openingElement: {
  186585. type: "JSXOpeningElement",
  186586. name: { type: "JSXIdentifier", name: "_createMdxContent" },
  186587. attributes: [],
  186588. selfClosing: true
  186589. },
  186590. closingElement: null,
  186591. children: []
  186592. }
  186593. ]
  186594. };
  186595. const consequent = element2;
  186596. let argument = content3 || { type: "Literal", value: null };
  186597. if (argument && argument.type === "JSXFragment" && argument.children.length === 1 && argument.children[0].type === "JSXElement") {
  186598. argument = argument.children[0];
  186599. }
  186600. return {
  186601. type: "FunctionDeclaration",
  186602. id: { type: "Identifier", name: "MDXContent" },
  186603. params: [
  186604. {
  186605. type: "AssignmentPattern",
  186606. left: { type: "Identifier", name: "props" },
  186607. right: { type: "ObjectExpression", properties: [] }
  186608. }
  186609. ],
  186610. body: {
  186611. type: "BlockStatement",
  186612. body: [
  186613. {
  186614. type: "ReturnStatement",
  186615. argument: {
  186616. type: "ConditionalExpression",
  186617. test: { type: "Identifier", name: "MDXLayout" },
  186618. consequent,
  186619. alternate: {
  186620. type: "CallExpression",
  186621. callee: { type: "Identifier", name: "_createMdxContent" },
  186622. arguments: [],
  186623. optional: false
  186624. }
  186625. }
  186626. },
  186627. {
  186628. type: "FunctionDeclaration",
  186629. id: { type: "Identifier", name: "_createMdxContent" },
  186630. params: [],
  186631. body: {
  186632. type: "BlockStatement",
  186633. body: [{ type: "ReturnStatement", argument }]
  186634. }
  186635. }
  186636. ]
  186637. }
  186638. };
  186639. }
  186640. }
  186641. // node_modules/@mdx-js/mdx/lib/util/estree-util-to-binary-addition.js
  186642. function toBinaryAddition(expressions) {
  186643. let index2 = -1;
  186644. let left;
  186645. while (++index2 < expressions.length) {
  186646. const right = expressions[index2];
  186647. left = left ? { type: "BinaryExpression", left, operator: "+", right } : right;
  186648. }
  186649. if (!left)
  186650. throw new Error("Expected non-empty `expressions` to be passed");
  186651. return left;
  186652. }
  186653. // node_modules/@mdx-js/mdx/lib/plugin/recma-jsx-rewrite.js
  186654. var own10 = {}.hasOwnProperty;
  186655. function recmaJsxRewrite(options = {}) {
  186656. const { development: development2, providerImportSource, outputFormat } = options;
  186657. return (tree, file) => {
  186658. const scopeInfo = analyze(tree);
  186659. const fnStack = [];
  186660. let importProvider;
  186661. let createErrorHelper;
  186662. let currentScope;
  186663. walk(tree, {
  186664. enter(_node) {
  186665. const node = _node;
  186666. if (node.type === "FunctionDeclaration" || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression") {
  186667. fnStack.push({
  186668. objects: [],
  186669. components: [],
  186670. tags: [],
  186671. references: {},
  186672. node
  186673. });
  186674. }
  186675. let fnScope = fnStack[0];
  186676. if (!fnScope || !isNamedFunction(fnScope.node, "MDXContent") && !providerImportSource) {
  186677. return;
  186678. }
  186679. if (fnStack[1] && isNamedFunction(fnStack[1].node, "_createMdxContent")) {
  186680. fnScope = fnStack[1];
  186681. }
  186682. const newScope = scopeInfo.map.get(node);
  186683. if (newScope) {
  186684. newScope.node = node;
  186685. currentScope = newScope;
  186686. }
  186687. if (currentScope && node.type === "JSXElement") {
  186688. let name2 = node.openingElement.name;
  186689. if (name2.type === "JSXMemberExpression") {
  186690. const ids = [];
  186691. while (name2.type === "JSXMemberExpression") {
  186692. ids.unshift(name2.property.name);
  186693. name2 = name2.object;
  186694. }
  186695. ids.unshift(name2.name);
  186696. const fullId = ids.join(".");
  186697. const id = name2.name;
  186698. if (!own10.call(fnScope.references, fullId)) {
  186699. fnScope.references[fullId] = { node, component: true };
  186700. }
  186701. if (!fnScope.objects.includes(id) && !inScope(currentScope, id)) {
  186702. fnScope.objects.push(id);
  186703. }
  186704. } else if (name2.type === "JSXNamespacedName") {
  186705. } else if (name(name2.name) && !/^[a-z]/.test(name2.name)) {
  186706. const id = name2.name;
  186707. if (!inScope(currentScope, id)) {
  186708. if (id !== "MDXLayout" && !own10.call(fnScope.references, id)) {
  186709. fnScope.references[id] = { node, component: true };
  186710. }
  186711. if (!fnScope.components.includes(id)) {
  186712. fnScope.components.push(id);
  186713. }
  186714. }
  186715. } else if (node.data && node.data._mdxExplicitJsx) {
  186716. } else {
  186717. const id = name2.name;
  186718. if (!fnScope.tags.includes(id)) {
  186719. fnScope.tags.push(id);
  186720. }
  186721. node.openingElement.name = toJsxIdOrMemberExpression([
  186722. "_components",
  186723. id
  186724. ]);
  186725. if (node.closingElement) {
  186726. node.closingElement.name = toJsxIdOrMemberExpression([
  186727. "_components",
  186728. id
  186729. ]);
  186730. }
  186731. }
  186732. }
  186733. },
  186734. leave(node) {
  186735. const defaults = [];
  186736. const actual = [];
  186737. const parameters = [];
  186738. const declarations = [];
  186739. if (currentScope && currentScope.node === node) {
  186740. currentScope = currentScope.parent;
  186741. }
  186742. if (node.type === "FunctionDeclaration" || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression") {
  186743. const fn = node;
  186744. const scope = fnStack[fnStack.length - 1];
  186745. let name2;
  186746. for (name2 of scope.tags) {
  186747. defaults.push({
  186748. type: "Property",
  186749. kind: "init",
  186750. key: name(name2) ? { type: "Identifier", name: name2 } : { type: "Literal", value: name2 },
  186751. value: { type: "Literal", value: name2 },
  186752. method: false,
  186753. shorthand: false,
  186754. computed: false
  186755. });
  186756. }
  186757. actual.push(...scope.components);
  186758. for (name2 of scope.objects) {
  186759. if (!actual.includes(name2)) {
  186760. actual.push(name2);
  186761. }
  186762. }
  186763. let key;
  186764. for (key in scope.references) {
  186765. if (own10.call(scope.references, key)) {
  186766. const parts = key.split(".");
  186767. let index2 = 0;
  186768. while (++index2 < parts.length) {
  186769. const partial = parts.slice(0, index2).join(".");
  186770. if (!own10.call(scope.references, partial)) {
  186771. scope.references[partial] = {
  186772. node: scope.references[key].node,
  186773. component: false
  186774. };
  186775. }
  186776. }
  186777. }
  186778. }
  186779. if (defaults.length > 0 || actual.length > 0) {
  186780. if (providerImportSource) {
  186781. importProvider = true;
  186782. parameters.push({
  186783. type: "CallExpression",
  186784. callee: { type: "Identifier", name: "_provideComponents" },
  186785. arguments: [],
  186786. optional: false
  186787. });
  186788. }
  186789. if (isNamedFunction(scope.node, "MDXContent") || isNamedFunction(scope.node, "_createMdxContent")) {
  186790. parameters.push(toIdOrMemberExpression(["props", "components"]));
  186791. }
  186792. if (defaults.length > 0 || parameters.length > 1) {
  186793. parameters.unshift({
  186794. type: "ObjectExpression",
  186795. properties: defaults
  186796. });
  186797. }
  186798. let componentsInit = parameters.length > 1 ? {
  186799. type: "CallExpression",
  186800. callee: toIdOrMemberExpression(["Object", "assign"]),
  186801. arguments: parameters,
  186802. optional: false
  186803. } : parameters[0].type === "MemberExpression" ? {
  186804. type: "LogicalExpression",
  186805. operator: "||",
  186806. left: parameters[0],
  186807. right: { type: "ObjectExpression", properties: [] }
  186808. } : parameters[0];
  186809. let componentsPattern;
  186810. if (actual.length > 0) {
  186811. componentsPattern = {
  186812. type: "ObjectPattern",
  186813. properties: actual.map((name3) => ({
  186814. type: "Property",
  186815. kind: "init",
  186816. key: {
  186817. type: "Identifier",
  186818. name: name3 === "MDXLayout" ? "wrapper" : name3
  186819. },
  186820. value: { type: "Identifier", name: name3 },
  186821. method: false,
  186822. shorthand: name3 !== "MDXLayout",
  186823. computed: false
  186824. }))
  186825. };
  186826. }
  186827. if (scope.tags.length > 0) {
  186828. declarations.push({
  186829. type: "VariableDeclarator",
  186830. id: { type: "Identifier", name: "_components" },
  186831. init: componentsInit
  186832. });
  186833. componentsInit = { type: "Identifier", name: "_components" };
  186834. }
  186835. if (componentsPattern) {
  186836. declarations.push({
  186837. type: "VariableDeclarator",
  186838. id: componentsPattern,
  186839. init: componentsInit
  186840. });
  186841. }
  186842. if (fn.body.type !== "BlockStatement") {
  186843. fn.body = {
  186844. type: "BlockStatement",
  186845. body: [{ type: "ReturnStatement", argument: fn.body }]
  186846. };
  186847. }
  186848. const statements = [
  186849. {
  186850. type: "VariableDeclaration",
  186851. kind: "const",
  186852. declarations
  186853. }
  186854. ];
  186855. const references = Object.keys(scope.references).sort();
  186856. let index2 = -1;
  186857. while (++index2 < references.length) {
  186858. const id = references[index2];
  186859. const info = scope.references[id];
  186860. const place = stringifyPosition(positionFromEstree(info.node));
  186861. const parameters2 = [
  186862. { type: "Literal", value: id },
  186863. { type: "Literal", value: info.component }
  186864. ];
  186865. createErrorHelper = true;
  186866. if (development2 && place !== "1:1-1:1") {
  186867. parameters2.push({ type: "Literal", value: place });
  186868. }
  186869. statements.push({
  186870. type: "IfStatement",
  186871. test: {
  186872. type: "UnaryExpression",
  186873. operator: "!",
  186874. prefix: true,
  186875. argument: toIdOrMemberExpression(id.split("."))
  186876. },
  186877. consequent: {
  186878. type: "ExpressionStatement",
  186879. expression: {
  186880. type: "CallExpression",
  186881. callee: { type: "Identifier", name: "_missingMdxReference" },
  186882. arguments: parameters2,
  186883. optional: false
  186884. }
  186885. },
  186886. alternate: null
  186887. });
  186888. }
  186889. fn.body.body.unshift(...statements);
  186890. }
  186891. fnStack.pop();
  186892. }
  186893. }
  186894. });
  186895. if (importProvider && providerImportSource) {
  186896. tree.body.unshift(
  186897. createImportProvider(providerImportSource, outputFormat)
  186898. );
  186899. }
  186900. if (createErrorHelper) {
  186901. const message = [
  186902. { type: "Literal", value: "Expected " },
  186903. {
  186904. type: "ConditionalExpression",
  186905. test: { type: "Identifier", name: "component" },
  186906. consequent: { type: "Literal", value: "component" },
  186907. alternate: { type: "Literal", value: "object" }
  186908. },
  186909. { type: "Literal", value: " `" },
  186910. { type: "Identifier", name: "id" },
  186911. {
  186912. type: "Literal",
  186913. value: "` to be defined: you likely forgot to import, pass, or provide it."
  186914. }
  186915. ];
  186916. const parameters = [
  186917. { type: "Identifier", name: "id" },
  186918. { type: "Identifier", name: "component" }
  186919. ];
  186920. if (development2) {
  186921. message.push({
  186922. type: "ConditionalExpression",
  186923. test: { type: "Identifier", name: "place" },
  186924. consequent: toBinaryAddition([
  186925. { type: "Literal", value: "\nIt\u2019s referenced in your code at `" },
  186926. { type: "Identifier", name: "place" },
  186927. {
  186928. type: "Literal",
  186929. value: (file.path ? "` in `" + file.path : "") + "`"
  186930. }
  186931. ]),
  186932. alternate: { type: "Literal", value: "" }
  186933. });
  186934. parameters.push({ type: "Identifier", name: "place" });
  186935. }
  186936. tree.body.push({
  186937. type: "FunctionDeclaration",
  186938. id: { type: "Identifier", name: "_missingMdxReference" },
  186939. generator: false,
  186940. async: false,
  186941. params: parameters,
  186942. body: {
  186943. type: "BlockStatement",
  186944. body: [
  186945. {
  186946. type: "ThrowStatement",
  186947. argument: {
  186948. type: "NewExpression",
  186949. callee: { type: "Identifier", name: "Error" },
  186950. arguments: [toBinaryAddition(message)]
  186951. }
  186952. }
  186953. ]
  186954. }
  186955. });
  186956. }
  186957. };
  186958. }
  186959. function createImportProvider(providerImportSource, outputFormat) {
  186960. const specifiers = [
  186961. {
  186962. type: "ImportSpecifier",
  186963. imported: { type: "Identifier", name: "useMDXComponents" },
  186964. local: { type: "Identifier", name: "_provideComponents" }
  186965. }
  186966. ];
  186967. return outputFormat === "function-body" ? {
  186968. type: "VariableDeclaration",
  186969. kind: "const",
  186970. declarations: specifiersToDeclarations(
  186971. specifiers,
  186972. toIdOrMemberExpression(["arguments", 0])
  186973. )
  186974. } : {
  186975. type: "ImportDeclaration",
  186976. specifiers,
  186977. source: { type: "Literal", value: providerImportSource }
  186978. };
  186979. }
  186980. function isNamedFunction(node, name2) {
  186981. return Boolean(node && "id" in node && node.id && node.id.name === name2);
  186982. }
  186983. function inScope(scope, id) {
  186984. let currentScope = scope;
  186985. while (currentScope) {
  186986. if (currentScope.declarations.has(id)) {
  186987. return true;
  186988. }
  186989. currentScope = currentScope.parent;
  186990. }
  186991. return false;
  186992. }
  186993. // node_modules/astring/dist/astring.mjs
  186994. var { stringify } = JSON;
  186995. if (!String.prototype.repeat) {
  186996. throw new Error(
  186997. "String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation"
  186998. );
  186999. }
  187000. if (!String.prototype.endsWith) {
  187001. throw new Error(
  187002. "String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation"
  187003. );
  187004. }
  187005. var OPERATOR_PRECEDENCE = {
  187006. "||": 3,
  187007. "&&": 4,
  187008. "|": 5,
  187009. "??": 5,
  187010. "^": 6,
  187011. "&": 7,
  187012. "==": 8,
  187013. "!=": 8,
  187014. "===": 8,
  187015. "!==": 8,
  187016. "<": 9,
  187017. ">": 9,
  187018. "<=": 9,
  187019. ">=": 9,
  187020. in: 9,
  187021. instanceof: 9,
  187022. "<<": 10,
  187023. ">>": 10,
  187024. ">>>": 10,
  187025. "+": 11,
  187026. "-": 11,
  187027. "*": 12,
  187028. "%": 12,
  187029. "/": 12,
  187030. "**": 13
  187031. };
  187032. var NEEDS_PARENTHESES = 17;
  187033. var EXPRESSIONS_PRECEDENCE = {
  187034. ArrayExpression: 20,
  187035. TaggedTemplateExpression: 20,
  187036. ThisExpression: 20,
  187037. Identifier: 20,
  187038. PrivateIdentifier: 20,
  187039. Literal: 18,
  187040. TemplateLiteral: 20,
  187041. Super: 20,
  187042. SequenceExpression: 20,
  187043. MemberExpression: 19,
  187044. ChainExpression: 19,
  187045. CallExpression: 19,
  187046. NewExpression: 19,
  187047. ArrowFunctionExpression: NEEDS_PARENTHESES,
  187048. ClassExpression: NEEDS_PARENTHESES,
  187049. FunctionExpression: NEEDS_PARENTHESES,
  187050. ObjectExpression: NEEDS_PARENTHESES,
  187051. UpdateExpression: 16,
  187052. UnaryExpression: 15,
  187053. AwaitExpression: 15,
  187054. BinaryExpression: 14,
  187055. LogicalExpression: 13,
  187056. ConditionalExpression: 4,
  187057. AssignmentExpression: 3,
  187058. YieldExpression: 2,
  187059. RestElement: 1
  187060. };
  187061. function formatSequence(state, nodes) {
  187062. const { generator } = state;
  187063. state.write("(");
  187064. if (nodes != null && nodes.length > 0) {
  187065. generator[nodes[0].type](nodes[0], state);
  187066. const { length } = nodes;
  187067. for (let i = 1; i < length; i++) {
  187068. const param = nodes[i];
  187069. state.write(", ");
  187070. generator[param.type](param, state);
  187071. }
  187072. }
  187073. state.write(")");
  187074. }
  187075. function expressionNeedsParenthesis(state, node, parentNode, isRightHand) {
  187076. const nodePrecedence = state.expressionsPrecedence[node.type];
  187077. if (nodePrecedence === NEEDS_PARENTHESES) {
  187078. return true;
  187079. }
  187080. const parentNodePrecedence = state.expressionsPrecedence[parentNode.type];
  187081. if (nodePrecedence !== parentNodePrecedence) {
  187082. return !isRightHand && nodePrecedence === 15 && parentNodePrecedence === 14 && parentNode.operator === "**" || nodePrecedence < parentNodePrecedence;
  187083. }
  187084. if (nodePrecedence !== 13 && nodePrecedence !== 14) {
  187085. return false;
  187086. }
  187087. if (node.operator === "**" && parentNode.operator === "**") {
  187088. return !isRightHand;
  187089. }
  187090. if (isRightHand) {
  187091. return OPERATOR_PRECEDENCE[node.operator] <= OPERATOR_PRECEDENCE[parentNode.operator];
  187092. }
  187093. return OPERATOR_PRECEDENCE[node.operator] < OPERATOR_PRECEDENCE[parentNode.operator];
  187094. }
  187095. function formatExpression(state, node, parentNode, isRightHand) {
  187096. const { generator } = state;
  187097. if (expressionNeedsParenthesis(state, node, parentNode, isRightHand)) {
  187098. state.write("(");
  187099. generator[node.type](node, state);
  187100. state.write(")");
  187101. } else {
  187102. generator[node.type](node, state);
  187103. }
  187104. }
  187105. function reindent(state, text5, indent, lineEnd) {
  187106. const lines = text5.split("\n");
  187107. const end = lines.length - 1;
  187108. state.write(lines[0].trim());
  187109. if (end > 0) {
  187110. state.write(lineEnd);
  187111. for (let i = 1; i < end; i++) {
  187112. state.write(indent + lines[i].trim() + lineEnd);
  187113. }
  187114. state.write(indent + lines[end].trim());
  187115. }
  187116. }
  187117. function formatComments(state, comments, indent, lineEnd) {
  187118. const { length } = comments;
  187119. for (let i = 0; i < length; i++) {
  187120. const comment2 = comments[i];
  187121. state.write(indent);
  187122. if (comment2.type[0] === "L") {
  187123. state.write("// " + comment2.value.trim() + "\n", comment2);
  187124. } else {
  187125. state.write("/*");
  187126. reindent(state, comment2.value, indent, lineEnd);
  187127. state.write("*/" + lineEnd);
  187128. }
  187129. }
  187130. }
  187131. function hasCallExpression(node) {
  187132. let currentNode = node;
  187133. while (currentNode != null) {
  187134. const { type } = currentNode;
  187135. if (type[0] === "C" && type[1] === "a") {
  187136. return true;
  187137. } else if (type[0] === "M" && type[1] === "e" && type[2] === "m") {
  187138. currentNode = currentNode.object;
  187139. } else {
  187140. return false;
  187141. }
  187142. }
  187143. }
  187144. function formatVariableDeclaration(state, node) {
  187145. const { generator } = state;
  187146. const { declarations } = node;
  187147. state.write(node.kind + " ");
  187148. const { length } = declarations;
  187149. if (length > 0) {
  187150. generator.VariableDeclarator(declarations[0], state);
  187151. for (let i = 1; i < length; i++) {
  187152. state.write(", ");
  187153. generator.VariableDeclarator(declarations[i], state);
  187154. }
  187155. }
  187156. }
  187157. var ForInStatement;
  187158. var FunctionDeclaration;
  187159. var RestElement;
  187160. var BinaryExpression;
  187161. var ArrayExpression;
  187162. var BlockStatement;
  187163. var GENERATOR = {
  187164. Program(node, state) {
  187165. const indent = state.indent.repeat(state.indentLevel);
  187166. const { lineEnd, writeComments } = state;
  187167. if (writeComments && node.comments != null) {
  187168. formatComments(state, node.comments, indent, lineEnd);
  187169. }
  187170. const statements = node.body;
  187171. const { length } = statements;
  187172. for (let i = 0; i < length; i++) {
  187173. const statement = statements[i];
  187174. if (writeComments && statement.comments != null) {
  187175. formatComments(state, statement.comments, indent, lineEnd);
  187176. }
  187177. state.write(indent);
  187178. this[statement.type](statement, state);
  187179. state.write(lineEnd);
  187180. }
  187181. if (writeComments && node.trailingComments != null) {
  187182. formatComments(state, node.trailingComments, indent, lineEnd);
  187183. }
  187184. },
  187185. BlockStatement: BlockStatement = function(node, state) {
  187186. const indent = state.indent.repeat(state.indentLevel++);
  187187. const { lineEnd, writeComments } = state;
  187188. const statementIndent = indent + state.indent;
  187189. state.write("{");
  187190. const statements = node.body;
  187191. if (statements != null && statements.length > 0) {
  187192. state.write(lineEnd);
  187193. if (writeComments && node.comments != null) {
  187194. formatComments(state, node.comments, statementIndent, lineEnd);
  187195. }
  187196. const { length } = statements;
  187197. for (let i = 0; i < length; i++) {
  187198. const statement = statements[i];
  187199. if (writeComments && statement.comments != null) {
  187200. formatComments(state, statement.comments, statementIndent, lineEnd);
  187201. }
  187202. state.write(statementIndent);
  187203. this[statement.type](statement, state);
  187204. state.write(lineEnd);
  187205. }
  187206. state.write(indent);
  187207. } else {
  187208. if (writeComments && node.comments != null) {
  187209. state.write(lineEnd);
  187210. formatComments(state, node.comments, statementIndent, lineEnd);
  187211. state.write(indent);
  187212. }
  187213. }
  187214. if (writeComments && node.trailingComments != null) {
  187215. formatComments(state, node.trailingComments, statementIndent, lineEnd);
  187216. }
  187217. state.write("}");
  187218. state.indentLevel--;
  187219. },
  187220. ClassBody: BlockStatement,
  187221. StaticBlock(node, state) {
  187222. state.write("static ");
  187223. this.BlockStatement(node, state);
  187224. },
  187225. EmptyStatement(node, state) {
  187226. state.write(";");
  187227. },
  187228. ExpressionStatement(node, state) {
  187229. const precedence = state.expressionsPrecedence[node.expression.type];
  187230. if (precedence === NEEDS_PARENTHESES || precedence === 3 && node.expression.left.type[0] === "O") {
  187231. state.write("(");
  187232. this[node.expression.type](node.expression, state);
  187233. state.write(")");
  187234. } else {
  187235. this[node.expression.type](node.expression, state);
  187236. }
  187237. state.write(";");
  187238. },
  187239. IfStatement(node, state) {
  187240. state.write("if (");
  187241. this[node.test.type](node.test, state);
  187242. state.write(") ");
  187243. this[node.consequent.type](node.consequent, state);
  187244. if (node.alternate != null) {
  187245. state.write(" else ");
  187246. this[node.alternate.type](node.alternate, state);
  187247. }
  187248. },
  187249. LabeledStatement(node, state) {
  187250. this[node.label.type](node.label, state);
  187251. state.write(": ");
  187252. this[node.body.type](node.body, state);
  187253. },
  187254. BreakStatement(node, state) {
  187255. state.write("break");
  187256. if (node.label != null) {
  187257. state.write(" ");
  187258. this[node.label.type](node.label, state);
  187259. }
  187260. state.write(";");
  187261. },
  187262. ContinueStatement(node, state) {
  187263. state.write("continue");
  187264. if (node.label != null) {
  187265. state.write(" ");
  187266. this[node.label.type](node.label, state);
  187267. }
  187268. state.write(";");
  187269. },
  187270. WithStatement(node, state) {
  187271. state.write("with (");
  187272. this[node.object.type](node.object, state);
  187273. state.write(") ");
  187274. this[node.body.type](node.body, state);
  187275. },
  187276. SwitchStatement(node, state) {
  187277. const indent = state.indent.repeat(state.indentLevel++);
  187278. const { lineEnd, writeComments } = state;
  187279. state.indentLevel++;
  187280. const caseIndent = indent + state.indent;
  187281. const statementIndent = caseIndent + state.indent;
  187282. state.write("switch (");
  187283. this[node.discriminant.type](node.discriminant, state);
  187284. state.write(") {" + lineEnd);
  187285. const { cases: occurences } = node;
  187286. const { length: occurencesCount } = occurences;
  187287. for (let i = 0; i < occurencesCount; i++) {
  187288. const occurence = occurences[i];
  187289. if (writeComments && occurence.comments != null) {
  187290. formatComments(state, occurence.comments, caseIndent, lineEnd);
  187291. }
  187292. if (occurence.test) {
  187293. state.write(caseIndent + "case ");
  187294. this[occurence.test.type](occurence.test, state);
  187295. state.write(":" + lineEnd);
  187296. } else {
  187297. state.write(caseIndent + "default:" + lineEnd);
  187298. }
  187299. const { consequent } = occurence;
  187300. const { length: consequentCount } = consequent;
  187301. for (let i2 = 0; i2 < consequentCount; i2++) {
  187302. const statement = consequent[i2];
  187303. if (writeComments && statement.comments != null) {
  187304. formatComments(state, statement.comments, statementIndent, lineEnd);
  187305. }
  187306. state.write(statementIndent);
  187307. this[statement.type](statement, state);
  187308. state.write(lineEnd);
  187309. }
  187310. }
  187311. state.indentLevel -= 2;
  187312. state.write(indent + "}");
  187313. },
  187314. ReturnStatement(node, state) {
  187315. state.write("return");
  187316. if (node.argument) {
  187317. state.write(" ");
  187318. this[node.argument.type](node.argument, state);
  187319. }
  187320. state.write(";");
  187321. },
  187322. ThrowStatement(node, state) {
  187323. state.write("throw ");
  187324. this[node.argument.type](node.argument, state);
  187325. state.write(";");
  187326. },
  187327. TryStatement(node, state) {
  187328. state.write("try ");
  187329. this[node.block.type](node.block, state);
  187330. if (node.handler) {
  187331. const { handler } = node;
  187332. if (handler.param == null) {
  187333. state.write(" catch ");
  187334. } else {
  187335. state.write(" catch (");
  187336. this[handler.param.type](handler.param, state);
  187337. state.write(") ");
  187338. }
  187339. this[handler.body.type](handler.body, state);
  187340. }
  187341. if (node.finalizer) {
  187342. state.write(" finally ");
  187343. this[node.finalizer.type](node.finalizer, state);
  187344. }
  187345. },
  187346. WhileStatement(node, state) {
  187347. state.write("while (");
  187348. this[node.test.type](node.test, state);
  187349. state.write(") ");
  187350. this[node.body.type](node.body, state);
  187351. },
  187352. DoWhileStatement(node, state) {
  187353. state.write("do ");
  187354. this[node.body.type](node.body, state);
  187355. state.write(" while (");
  187356. this[node.test.type](node.test, state);
  187357. state.write(");");
  187358. },
  187359. ForStatement(node, state) {
  187360. state.write("for (");
  187361. if (node.init != null) {
  187362. const { init } = node;
  187363. if (init.type[0] === "V") {
  187364. formatVariableDeclaration(state, init);
  187365. } else {
  187366. this[init.type](init, state);
  187367. }
  187368. }
  187369. state.write("; ");
  187370. if (node.test) {
  187371. this[node.test.type](node.test, state);
  187372. }
  187373. state.write("; ");
  187374. if (node.update) {
  187375. this[node.update.type](node.update, state);
  187376. }
  187377. state.write(") ");
  187378. this[node.body.type](node.body, state);
  187379. },
  187380. ForInStatement: ForInStatement = function(node, state) {
  187381. state.write(`for ${node.await ? "await " : ""}(`);
  187382. const { left } = node;
  187383. if (left.type[0] === "V") {
  187384. formatVariableDeclaration(state, left);
  187385. } else {
  187386. this[left.type](left, state);
  187387. }
  187388. state.write(node.type[3] === "I" ? " in " : " of ");
  187389. this[node.right.type](node.right, state);
  187390. state.write(") ");
  187391. this[node.body.type](node.body, state);
  187392. },
  187393. ForOfStatement: ForInStatement,
  187394. DebuggerStatement(node, state) {
  187395. state.write("debugger;", node);
  187396. },
  187397. FunctionDeclaration: FunctionDeclaration = function(node, state) {
  187398. state.write(
  187399. (node.async ? "async " : "") + (node.generator ? "function* " : "function ") + (node.id ? node.id.name : ""),
  187400. node
  187401. );
  187402. formatSequence(state, node.params);
  187403. state.write(" ");
  187404. this[node.body.type](node.body, state);
  187405. },
  187406. FunctionExpression: FunctionDeclaration,
  187407. VariableDeclaration(node, state) {
  187408. formatVariableDeclaration(state, node);
  187409. state.write(";");
  187410. },
  187411. VariableDeclarator(node, state) {
  187412. this[node.id.type](node.id, state);
  187413. if (node.init != null) {
  187414. state.write(" = ");
  187415. this[node.init.type](node.init, state);
  187416. }
  187417. },
  187418. ClassDeclaration(node, state) {
  187419. state.write("class " + (node.id ? `${node.id.name} ` : ""), node);
  187420. if (node.superClass) {
  187421. state.write("extends ");
  187422. const { superClass } = node;
  187423. const { type } = superClass;
  187424. const precedence = state.expressionsPrecedence[type];
  187425. if ((type[0] !== "C" || type[1] !== "l" || type[5] !== "E") && (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.ClassExpression)) {
  187426. state.write("(");
  187427. this[node.superClass.type](superClass, state);
  187428. state.write(")");
  187429. } else {
  187430. this[superClass.type](superClass, state);
  187431. }
  187432. state.write(" ");
  187433. }
  187434. this.ClassBody(node.body, state);
  187435. },
  187436. ImportDeclaration(node, state) {
  187437. state.write("import ");
  187438. const { specifiers } = node;
  187439. const { length } = specifiers;
  187440. let i = 0;
  187441. if (length > 0) {
  187442. for (; i < length; ) {
  187443. if (i > 0) {
  187444. state.write(", ");
  187445. }
  187446. const specifier = specifiers[i];
  187447. const type = specifier.type[6];
  187448. if (type === "D") {
  187449. state.write(specifier.local.name, specifier);
  187450. i++;
  187451. } else if (type === "N") {
  187452. state.write("* as " + specifier.local.name, specifier);
  187453. i++;
  187454. } else {
  187455. break;
  187456. }
  187457. }
  187458. if (i < length) {
  187459. state.write("{");
  187460. for (; ; ) {
  187461. const specifier = specifiers[i];
  187462. const { name: name2 } = specifier.imported;
  187463. state.write(name2, specifier);
  187464. if (name2 !== specifier.local.name) {
  187465. state.write(" as " + specifier.local.name);
  187466. }
  187467. if (++i < length) {
  187468. state.write(", ");
  187469. } else {
  187470. break;
  187471. }
  187472. }
  187473. state.write("}");
  187474. }
  187475. state.write(" from ");
  187476. }
  187477. this.Literal(node.source, state);
  187478. state.write(";");
  187479. },
  187480. ImportExpression(node, state) {
  187481. state.write("import(");
  187482. this[node.source.type](node.source, state);
  187483. state.write(")");
  187484. },
  187485. ExportDefaultDeclaration(node, state) {
  187486. state.write("export default ");
  187487. this[node.declaration.type](node.declaration, state);
  187488. if (state.expressionsPrecedence[node.declaration.type] != null && node.declaration.type[0] !== "F") {
  187489. state.write(";");
  187490. }
  187491. },
  187492. ExportNamedDeclaration(node, state) {
  187493. state.write("export ");
  187494. if (node.declaration) {
  187495. this[node.declaration.type](node.declaration, state);
  187496. } else {
  187497. state.write("{");
  187498. const { specifiers } = node, { length } = specifiers;
  187499. if (length > 0) {
  187500. for (let i = 0; ; ) {
  187501. const specifier = specifiers[i];
  187502. const { name: name2 } = specifier.local;
  187503. state.write(name2, specifier);
  187504. if (name2 !== specifier.exported.name) {
  187505. state.write(" as " + specifier.exported.name);
  187506. }
  187507. if (++i < length) {
  187508. state.write(", ");
  187509. } else {
  187510. break;
  187511. }
  187512. }
  187513. }
  187514. state.write("}");
  187515. if (node.source) {
  187516. state.write(" from ");
  187517. this.Literal(node.source, state);
  187518. }
  187519. state.write(";");
  187520. }
  187521. },
  187522. ExportAllDeclaration(node, state) {
  187523. if (node.exported != null) {
  187524. state.write("export * as " + node.exported.name + " from ");
  187525. } else {
  187526. state.write("export * from ");
  187527. }
  187528. this.Literal(node.source, state);
  187529. state.write(";");
  187530. },
  187531. MethodDefinition(node, state) {
  187532. if (node.static) {
  187533. state.write("static ");
  187534. }
  187535. const kind = node.kind[0];
  187536. if (kind === "g" || kind === "s") {
  187537. state.write(node.kind + " ");
  187538. }
  187539. if (node.value.async) {
  187540. state.write("async ");
  187541. }
  187542. if (node.value.generator) {
  187543. state.write("*");
  187544. }
  187545. if (node.computed) {
  187546. state.write("[");
  187547. this[node.key.type](node.key, state);
  187548. state.write("]");
  187549. } else {
  187550. this[node.key.type](node.key, state);
  187551. }
  187552. formatSequence(state, node.value.params);
  187553. state.write(" ");
  187554. this[node.value.body.type](node.value.body, state);
  187555. },
  187556. ClassExpression(node, state) {
  187557. this.ClassDeclaration(node, state);
  187558. },
  187559. ArrowFunctionExpression(node, state) {
  187560. state.write(node.async ? "async " : "", node);
  187561. const { params } = node;
  187562. if (params != null) {
  187563. if (params.length === 1 && params[0].type[0] === "I") {
  187564. state.write(params[0].name, params[0]);
  187565. } else {
  187566. formatSequence(state, node.params);
  187567. }
  187568. }
  187569. state.write(" => ");
  187570. if (node.body.type[0] === "O") {
  187571. state.write("(");
  187572. this.ObjectExpression(node.body, state);
  187573. state.write(")");
  187574. } else {
  187575. this[node.body.type](node.body, state);
  187576. }
  187577. },
  187578. ThisExpression(node, state) {
  187579. state.write("this", node);
  187580. },
  187581. Super(node, state) {
  187582. state.write("super", node);
  187583. },
  187584. RestElement: RestElement = function(node, state) {
  187585. state.write("...");
  187586. this[node.argument.type](node.argument, state);
  187587. },
  187588. SpreadElement: RestElement,
  187589. YieldExpression(node, state) {
  187590. state.write(node.delegate ? "yield*" : "yield");
  187591. if (node.argument) {
  187592. state.write(" ");
  187593. this[node.argument.type](node.argument, state);
  187594. }
  187595. },
  187596. AwaitExpression(node, state) {
  187597. state.write("await ", node);
  187598. formatExpression(state, node.argument, node);
  187599. },
  187600. TemplateLiteral(node, state) {
  187601. const { quasis, expressions } = node;
  187602. state.write("`");
  187603. const { length } = expressions;
  187604. for (let i = 0; i < length; i++) {
  187605. const expression = expressions[i];
  187606. const quasi2 = quasis[i];
  187607. state.write(quasi2.value.raw, quasi2);
  187608. state.write("${");
  187609. this[expression.type](expression, state);
  187610. state.write("}");
  187611. }
  187612. const quasi = quasis[quasis.length - 1];
  187613. state.write(quasi.value.raw, quasi);
  187614. state.write("`");
  187615. },
  187616. TemplateElement(node, state) {
  187617. state.write(node.value.raw, node);
  187618. },
  187619. TaggedTemplateExpression(node, state) {
  187620. formatExpression(state, node.tag, node);
  187621. this[node.quasi.type](node.quasi, state);
  187622. },
  187623. ArrayExpression: ArrayExpression = function(node, state) {
  187624. state.write("[");
  187625. if (node.elements.length > 0) {
  187626. const { elements } = node, { length } = elements;
  187627. for (let i = 0; ; ) {
  187628. const element2 = elements[i];
  187629. if (element2 != null) {
  187630. this[element2.type](element2, state);
  187631. }
  187632. if (++i < length) {
  187633. state.write(", ");
  187634. } else {
  187635. if (element2 == null) {
  187636. state.write(", ");
  187637. }
  187638. break;
  187639. }
  187640. }
  187641. }
  187642. state.write("]");
  187643. },
  187644. ArrayPattern: ArrayExpression,
  187645. ObjectExpression(node, state) {
  187646. const indent = state.indent.repeat(state.indentLevel++);
  187647. const { lineEnd, writeComments } = state;
  187648. const propertyIndent = indent + state.indent;
  187649. state.write("{");
  187650. if (node.properties.length > 0) {
  187651. state.write(lineEnd);
  187652. if (writeComments && node.comments != null) {
  187653. formatComments(state, node.comments, propertyIndent, lineEnd);
  187654. }
  187655. const comma = "," + lineEnd;
  187656. const { properties } = node, { length } = properties;
  187657. for (let i = 0; ; ) {
  187658. const property = properties[i];
  187659. if (writeComments && property.comments != null) {
  187660. formatComments(state, property.comments, propertyIndent, lineEnd);
  187661. }
  187662. state.write(propertyIndent);
  187663. this[property.type](property, state);
  187664. if (++i < length) {
  187665. state.write(comma);
  187666. } else {
  187667. break;
  187668. }
  187669. }
  187670. state.write(lineEnd);
  187671. if (writeComments && node.trailingComments != null) {
  187672. formatComments(state, node.trailingComments, propertyIndent, lineEnd);
  187673. }
  187674. state.write(indent + "}");
  187675. } else if (writeComments) {
  187676. if (node.comments != null) {
  187677. state.write(lineEnd);
  187678. formatComments(state, node.comments, propertyIndent, lineEnd);
  187679. if (node.trailingComments != null) {
  187680. formatComments(state, node.trailingComments, propertyIndent, lineEnd);
  187681. }
  187682. state.write(indent + "}");
  187683. } else if (node.trailingComments != null) {
  187684. state.write(lineEnd);
  187685. formatComments(state, node.trailingComments, propertyIndent, lineEnd);
  187686. state.write(indent + "}");
  187687. } else {
  187688. state.write("}");
  187689. }
  187690. } else {
  187691. state.write("}");
  187692. }
  187693. state.indentLevel--;
  187694. },
  187695. Property(node, state) {
  187696. if (node.method || node.kind[0] !== "i") {
  187697. this.MethodDefinition(node, state);
  187698. } else {
  187699. if (!node.shorthand) {
  187700. if (node.computed) {
  187701. state.write("[");
  187702. this[node.key.type](node.key, state);
  187703. state.write("]");
  187704. } else {
  187705. this[node.key.type](node.key, state);
  187706. }
  187707. state.write(": ");
  187708. }
  187709. this[node.value.type](node.value, state);
  187710. }
  187711. },
  187712. PropertyDefinition(node, state) {
  187713. if (node.static) {
  187714. state.write("static ");
  187715. }
  187716. this[node.key.type](node.key, state);
  187717. state.write(" = ");
  187718. this[node.value.type](node.value, state);
  187719. },
  187720. ObjectPattern(node, state) {
  187721. state.write("{");
  187722. if (node.properties.length > 0) {
  187723. const { properties } = node, { length } = properties;
  187724. for (let i = 0; ; ) {
  187725. this[properties[i].type](properties[i], state);
  187726. if (++i < length) {
  187727. state.write(", ");
  187728. } else {
  187729. break;
  187730. }
  187731. }
  187732. }
  187733. state.write("}");
  187734. },
  187735. SequenceExpression(node, state) {
  187736. formatSequence(state, node.expressions);
  187737. },
  187738. UnaryExpression(node, state) {
  187739. if (node.prefix) {
  187740. const {
  187741. operator,
  187742. argument,
  187743. argument: { type }
  187744. } = node;
  187745. state.write(operator);
  187746. const needsParentheses = expressionNeedsParenthesis(state, argument, node);
  187747. if (!needsParentheses && (operator.length > 1 || type[0] === "U" && (type[1] === "n" || type[1] === "p") && argument.prefix && argument.operator[0] === operator && (operator === "+" || operator === "-"))) {
  187748. state.write(" ");
  187749. }
  187750. if (needsParentheses) {
  187751. state.write(operator.length > 1 ? " (" : "(");
  187752. this[type](argument, state);
  187753. state.write(")");
  187754. } else {
  187755. this[type](argument, state);
  187756. }
  187757. } else {
  187758. this[node.argument.type](node.argument, state);
  187759. state.write(node.operator);
  187760. }
  187761. },
  187762. UpdateExpression(node, state) {
  187763. if (node.prefix) {
  187764. state.write(node.operator);
  187765. this[node.argument.type](node.argument, state);
  187766. } else {
  187767. this[node.argument.type](node.argument, state);
  187768. state.write(node.operator);
  187769. }
  187770. },
  187771. AssignmentExpression(node, state) {
  187772. this[node.left.type](node.left, state);
  187773. state.write(" " + node.operator + " ");
  187774. this[node.right.type](node.right, state);
  187775. },
  187776. AssignmentPattern(node, state) {
  187777. this[node.left.type](node.left, state);
  187778. state.write(" = ");
  187779. this[node.right.type](node.right, state);
  187780. },
  187781. BinaryExpression: BinaryExpression = function(node, state) {
  187782. const isIn = node.operator === "in";
  187783. if (isIn) {
  187784. state.write("(");
  187785. }
  187786. formatExpression(state, node.left, node, false);
  187787. state.write(" " + node.operator + " ");
  187788. formatExpression(state, node.right, node, true);
  187789. if (isIn) {
  187790. state.write(")");
  187791. }
  187792. },
  187793. LogicalExpression: BinaryExpression,
  187794. ConditionalExpression(node, state) {
  187795. const { test } = node;
  187796. const precedence = state.expressionsPrecedence[test.type];
  187797. if (precedence === NEEDS_PARENTHESES || precedence <= state.expressionsPrecedence.ConditionalExpression) {
  187798. state.write("(");
  187799. this[test.type](test, state);
  187800. state.write(")");
  187801. } else {
  187802. this[test.type](test, state);
  187803. }
  187804. state.write(" ? ");
  187805. this[node.consequent.type](node.consequent, state);
  187806. state.write(" : ");
  187807. this[node.alternate.type](node.alternate, state);
  187808. },
  187809. NewExpression(node, state) {
  187810. state.write("new ");
  187811. const precedence = state.expressionsPrecedence[node.callee.type];
  187812. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression || hasCallExpression(node.callee)) {
  187813. state.write("(");
  187814. this[node.callee.type](node.callee, state);
  187815. state.write(")");
  187816. } else {
  187817. this[node.callee.type](node.callee, state);
  187818. }
  187819. formatSequence(state, node["arguments"]);
  187820. },
  187821. CallExpression(node, state) {
  187822. const precedence = state.expressionsPrecedence[node.callee.type];
  187823. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression) {
  187824. state.write("(");
  187825. this[node.callee.type](node.callee, state);
  187826. state.write(")");
  187827. } else {
  187828. this[node.callee.type](node.callee, state);
  187829. }
  187830. if (node.optional) {
  187831. state.write("?.");
  187832. }
  187833. formatSequence(state, node["arguments"]);
  187834. },
  187835. ChainExpression(node, state) {
  187836. this[node.expression.type](node.expression, state);
  187837. },
  187838. MemberExpression(node, state) {
  187839. const precedence = state.expressionsPrecedence[node.object.type];
  187840. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.MemberExpression) {
  187841. state.write("(");
  187842. this[node.object.type](node.object, state);
  187843. state.write(")");
  187844. } else {
  187845. this[node.object.type](node.object, state);
  187846. }
  187847. if (node.computed) {
  187848. if (node.optional) {
  187849. state.write("?.");
  187850. }
  187851. state.write("[");
  187852. this[node.property.type](node.property, state);
  187853. state.write("]");
  187854. } else {
  187855. if (node.optional) {
  187856. state.write("?.");
  187857. } else {
  187858. state.write(".");
  187859. }
  187860. this[node.property.type](node.property, state);
  187861. }
  187862. },
  187863. MetaProperty(node, state) {
  187864. state.write(node.meta.name + "." + node.property.name, node);
  187865. },
  187866. Identifier(node, state) {
  187867. state.write(node.name, node);
  187868. },
  187869. PrivateIdentifier(node, state) {
  187870. state.write(`#${node.name}`, node);
  187871. },
  187872. Literal(node, state) {
  187873. if (node.raw != null) {
  187874. state.write(node.raw, node);
  187875. } else if (node.regex != null) {
  187876. this.RegExpLiteral(node, state);
  187877. } else if (node.bigint != null) {
  187878. state.write(node.bigint + "n", node);
  187879. } else {
  187880. state.write(stringify(node.value), node);
  187881. }
  187882. },
  187883. RegExpLiteral(node, state) {
  187884. const { regex: regex2 } = node;
  187885. state.write(`/${regex2.pattern}/${regex2.flags}`, node);
  187886. }
  187887. };
  187888. var EMPTY_OBJECT = {};
  187889. var State = class {
  187890. constructor(options) {
  187891. const setup = options == null ? EMPTY_OBJECT : options;
  187892. this.output = "";
  187893. if (setup.output != null) {
  187894. this.output = setup.output;
  187895. this.write = this.writeToStream;
  187896. } else {
  187897. this.output = "";
  187898. }
  187899. this.generator = setup.generator != null ? setup.generator : GENERATOR;
  187900. this.expressionsPrecedence = setup.expressionsPrecedence != null ? setup.expressionsPrecedence : EXPRESSIONS_PRECEDENCE;
  187901. this.indent = setup.indent != null ? setup.indent : " ";
  187902. this.lineEnd = setup.lineEnd != null ? setup.lineEnd : "\n";
  187903. this.indentLevel = setup.startingIndentLevel != null ? setup.startingIndentLevel : 0;
  187904. this.writeComments = setup.comments ? setup.comments : false;
  187905. if (setup.sourceMap != null) {
  187906. this.write = setup.output == null ? this.writeAndMap : this.writeToStreamAndMap;
  187907. this.sourceMap = setup.sourceMap;
  187908. this.line = 1;
  187909. this.column = 0;
  187910. this.lineEndSize = this.lineEnd.split("\n").length - 1;
  187911. this.mapping = {
  187912. original: null,
  187913. generated: this,
  187914. name: void 0,
  187915. source: setup.sourceMap.file || setup.sourceMap._file
  187916. };
  187917. }
  187918. }
  187919. write(code2) {
  187920. this.output += code2;
  187921. }
  187922. writeToStream(code2) {
  187923. this.output.write(code2);
  187924. }
  187925. writeAndMap(code2, node) {
  187926. this.output += code2;
  187927. this.map(code2, node);
  187928. }
  187929. writeToStreamAndMap(code2, node) {
  187930. this.output.write(code2);
  187931. this.map(code2, node);
  187932. }
  187933. map(code2, node) {
  187934. if (node != null) {
  187935. const { type } = node;
  187936. if (type[0] === "L" && type[2] === "n") {
  187937. this.column = 0;
  187938. this.line++;
  187939. return;
  187940. }
  187941. if (node.loc != null) {
  187942. const { mapping } = this;
  187943. mapping.original = node.loc.start;
  187944. mapping.name = node.name;
  187945. this.sourceMap.addMapping(mapping);
  187946. }
  187947. if (type[0] === "T" && type[8] === "E" || type[0] === "L" && type[1] === "i" && typeof node.value === "string") {
  187948. const { length: length2 } = code2;
  187949. let { column, line } = this;
  187950. for (let i = 0; i < length2; i++) {
  187951. if (code2[i] === "\n") {
  187952. column = 0;
  187953. line++;
  187954. } else {
  187955. column++;
  187956. }
  187957. }
  187958. this.column = column;
  187959. this.line = line;
  187960. return;
  187961. }
  187962. }
  187963. const { length } = code2;
  187964. const { lineEnd } = this;
  187965. if (length > 0) {
  187966. if (this.lineEndSize > 0 && (lineEnd.length === 1 ? code2[length - 1] === lineEnd : code2.endsWith(lineEnd))) {
  187967. this.line += this.lineEndSize;
  187968. this.column = 0;
  187969. } else {
  187970. this.column += length;
  187971. }
  187972. }
  187973. }
  187974. toString() {
  187975. return this.output;
  187976. }
  187977. };
  187978. function generate(node, options) {
  187979. const state = new State(options);
  187980. state.generator[node.type](node, state);
  187981. return state.output;
  187982. }
  187983. // node_modules/@mdx-js/mdx/lib/plugin/recma-stringify.js
  187984. function recmaStringify(options = {}) {
  187985. const { SourceMapGenerator } = options;
  187986. Object.assign(this, { Compiler: compiler2 });
  187987. function compiler2(tree, file) {
  187988. let sourceMap;
  187989. if (SourceMapGenerator) {
  187990. sourceMap = new SourceMapGenerator({ file: file.path || "unknown.mdx" });
  187991. }
  187992. const generator = {
  187993. ...GENERATOR,
  187994. JSXAttribute,
  187995. JSXClosingElement,
  187996. JSXClosingFragment,
  187997. JSXElement,
  187998. JSXEmptyExpression,
  187999. JSXExpressionContainer,
  188000. JSXFragment,
  188001. JSXIdentifier,
  188002. JSXMemberExpression,
  188003. JSXNamespacedName,
  188004. JSXOpeningElement,
  188005. JSXOpeningFragment,
  188006. JSXSpreadAttribute,
  188007. JSXText
  188008. };
  188009. const result = generate(tree, {
  188010. generator,
  188011. comments: true,
  188012. sourceMap
  188013. });
  188014. if (sourceMap) {
  188015. file.map = sourceMap.toJSON();
  188016. }
  188017. return result;
  188018. }
  188019. }
  188020. function JSXAttribute(node, state) {
  188021. this[node.name.type](node.name, state);
  188022. if (node.value !== void 0 && node.value !== null) {
  188023. state.write("=");
  188024. if (node.value.type === "Literal") {
  188025. state.write(
  188026. '"' + encodeJsx(String(node.value.value)).replace(/"/g, "&quot;") + '"',
  188027. node
  188028. );
  188029. } else {
  188030. this[node.value.type](node.value, state);
  188031. }
  188032. }
  188033. }
  188034. function JSXClosingElement(node, state) {
  188035. state.write("</");
  188036. this[node.name.type](node.name, state);
  188037. state.write(">");
  188038. }
  188039. function JSXClosingFragment(node, state) {
  188040. state.write("</>", node);
  188041. }
  188042. function JSXElement(node, state) {
  188043. let index2 = -1;
  188044. this[node.openingElement.type](node.openingElement, state);
  188045. if (node.children) {
  188046. while (++index2 < node.children.length) {
  188047. const child = node.children[index2];
  188048. if (child.type === "JSXSpreadChild") {
  188049. throw new Error("JSX spread children are not supported");
  188050. }
  188051. this[child.type](child, state);
  188052. }
  188053. }
  188054. if (node.closingElement) {
  188055. this[node.closingElement.type](node.closingElement, state);
  188056. }
  188057. }
  188058. function JSXEmptyExpression() {
  188059. }
  188060. function JSXExpressionContainer(node, state) {
  188061. state.write("{");
  188062. this[node.expression.type](node.expression, state);
  188063. state.write("}");
  188064. }
  188065. function JSXFragment(node, state) {
  188066. let index2 = -1;
  188067. this[node.openingFragment.type](node.openingFragment, state);
  188068. if (node.children) {
  188069. while (++index2 < node.children.length) {
  188070. const child = node.children[index2];
  188071. if (child.type === "JSXSpreadChild") {
  188072. throw new Error("JSX spread children are not supported");
  188073. }
  188074. this[child.type](child, state);
  188075. }
  188076. }
  188077. this[node.closingFragment.type](node.closingFragment, state);
  188078. }
  188079. function JSXIdentifier(node, state) {
  188080. state.write(node.name, node);
  188081. }
  188082. function JSXMemberExpression(node, state) {
  188083. this[node.object.type](node.object, state);
  188084. state.write(".");
  188085. this[node.property.type](node.property, state);
  188086. }
  188087. function JSXNamespacedName(node, state) {
  188088. this[node.namespace.type](node.namespace, state);
  188089. state.write(":");
  188090. this[node.name.type](node.name, state);
  188091. }
  188092. function JSXOpeningElement(node, state) {
  188093. let index2 = -1;
  188094. state.write("<");
  188095. this[node.name.type](node.name, state);
  188096. if (node.attributes) {
  188097. while (++index2 < node.attributes.length) {
  188098. state.write(" ");
  188099. this[node.attributes[index2].type](node.attributes[index2], state);
  188100. }
  188101. }
  188102. state.write(node.selfClosing ? " />" : ">");
  188103. }
  188104. function JSXOpeningFragment(node, state) {
  188105. state.write("<>", node);
  188106. }
  188107. function JSXSpreadAttribute(node, state) {
  188108. state.write("{");
  188109. this.SpreadElement(node, state);
  188110. state.write("}");
  188111. }
  188112. function JSXText(node, state) {
  188113. state.write(
  188114. encodeJsx(node.value).replace(
  188115. /<|{/g,
  188116. ($0) => $0 === "<" ? "&lt;" : "&#123;"
  188117. ),
  188118. node
  188119. );
  188120. }
  188121. function encodeJsx(value) {
  188122. return value.replace(/&(?=[#a-z])/gi, "&amp;");
  188123. }
  188124. // node_modules/comma-separated-tokens/index.js
  188125. function stringify2(values, options) {
  188126. var settings = options || {};
  188127. if (values[values.length - 1] === "") {
  188128. values = values.concat("");
  188129. }
  188130. return values.join(
  188131. (settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
  188132. ).trim();
  188133. }
  188134. // node_modules/estree-util-attach-comments/index.js
  188135. var push2 = [].push;
  188136. function attachComments(tree, comments) {
  188137. var list3 = (comments || []).concat().sort(compare);
  188138. if (list3.length)
  188139. walk2(tree, { comments: list3, index: 0 });
  188140. return tree;
  188141. }
  188142. function walk2(node, state) {
  188143. var children = [];
  188144. var comments = [];
  188145. var key;
  188146. var value;
  188147. var index2;
  188148. if (state.index === state.comments.length) {
  188149. return;
  188150. }
  188151. for (key in node) {
  188152. value = node[key];
  188153. if (value && typeof value === "object" && key !== "comments") {
  188154. if (Array.isArray(value)) {
  188155. index2 = -1;
  188156. while (++index2 < value.length) {
  188157. if (value[index2] && typeof value[index2].type === "string") {
  188158. children.push(value[index2]);
  188159. }
  188160. }
  188161. } else if (typeof value.type === "string") {
  188162. children.push(value);
  188163. }
  188164. }
  188165. }
  188166. children.sort(compare);
  188167. push2.apply(
  188168. comments,
  188169. slice(state, node, false, { leading: true, trailing: false })
  188170. );
  188171. index2 = -1;
  188172. while (++index2 < children.length) {
  188173. walk2(children[index2], state);
  188174. }
  188175. push2.apply(
  188176. comments,
  188177. slice(state, node, true, {
  188178. leading: false,
  188179. trailing: Boolean(children.length)
  188180. })
  188181. );
  188182. if (comments.length) {
  188183. node.comments = comments;
  188184. }
  188185. }
  188186. function slice(state, node, compareEnd, fields) {
  188187. var result = [];
  188188. while (state.comments[state.index] && compare(state.comments[state.index], node, compareEnd) < 1) {
  188189. result.push(Object.assign({}, state.comments[state.index++], fields));
  188190. }
  188191. return result;
  188192. }
  188193. function compare(left, right, compareEnd) {
  188194. var field = compareEnd ? "end" : "start";
  188195. if (left.range && right.range) {
  188196. return left.range[0] - right.range[compareEnd ? 1 : 0];
  188197. }
  188198. if (left.loc && left.loc.start && right.loc && right.loc[field]) {
  188199. return left.loc.start.line - right.loc[field].line || left.loc.start.column - right.loc[field].column;
  188200. }
  188201. if ("start" in left && field in right) {
  188202. return left.start - right[field];
  188203. }
  188204. return NaN;
  188205. }
  188206. // node_modules/hast-util-whitespace/index.js
  188207. function whitespace(thing) {
  188208. var value = thing && typeof thing === "object" && thing.type === "text" ? thing.value || "" : thing;
  188209. return typeof value === "string" && value.replace(/[ \t\n\f\r]/g, "") === "";
  188210. }
  188211. // node_modules/property-information/lib/util/schema.js
  188212. var Schema = class {
  188213. constructor(property, normal, space) {
  188214. this.property = property;
  188215. this.normal = normal;
  188216. if (space) {
  188217. this.space = space;
  188218. }
  188219. }
  188220. };
  188221. Schema.prototype.property = {};
  188222. Schema.prototype.normal = {};
  188223. Schema.prototype.space = null;
  188224. // node_modules/property-information/lib/util/merge.js
  188225. function merge(definitions2, space) {
  188226. const property = {};
  188227. const normal = {};
  188228. let index2 = -1;
  188229. while (++index2 < definitions2.length) {
  188230. Object.assign(property, definitions2[index2].property);
  188231. Object.assign(normal, definitions2[index2].normal);
  188232. }
  188233. return new Schema(property, normal, space);
  188234. }
  188235. // node_modules/property-information/lib/normalize.js
  188236. function normalize5(value) {
  188237. return value.toLowerCase();
  188238. }
  188239. // node_modules/property-information/lib/util/info.js
  188240. var Info = class {
  188241. constructor(property, attribute) {
  188242. this.property = property;
  188243. this.attribute = attribute;
  188244. }
  188245. };
  188246. Info.prototype.space = null;
  188247. Info.prototype.boolean = false;
  188248. Info.prototype.booleanish = false;
  188249. Info.prototype.overloadedBoolean = false;
  188250. Info.prototype.number = false;
  188251. Info.prototype.commaSeparated = false;
  188252. Info.prototype.spaceSeparated = false;
  188253. Info.prototype.commaOrSpaceSeparated = false;
  188254. Info.prototype.mustUseProperty = false;
  188255. Info.prototype.defined = false;
  188256. // node_modules/property-information/lib/util/types.js
  188257. var types_exports = {};
  188258. __export(types_exports, {
  188259. boolean: () => boolean,
  188260. booleanish: () => booleanish,
  188261. commaOrSpaceSeparated: () => commaOrSpaceSeparated,
  188262. commaSeparated: () => commaSeparated,
  188263. number: () => number,
  188264. overloadedBoolean: () => overloadedBoolean,
  188265. spaceSeparated: () => spaceSeparated
  188266. });
  188267. var powers = 0;
  188268. var boolean = increment();
  188269. var booleanish = increment();
  188270. var overloadedBoolean = increment();
  188271. var number = increment();
  188272. var spaceSeparated = increment();
  188273. var commaSeparated = increment();
  188274. var commaOrSpaceSeparated = increment();
  188275. function increment() {
  188276. return 2 ** ++powers;
  188277. }
  188278. // node_modules/property-information/lib/util/defined-info.js
  188279. var checks = Object.keys(types_exports);
  188280. var DefinedInfo = class extends Info {
  188281. constructor(property, attribute, mask, space) {
  188282. let index2 = -1;
  188283. super(property, attribute);
  188284. mark(this, "space", space);
  188285. if (typeof mask === "number") {
  188286. while (++index2 < checks.length) {
  188287. const check = checks[index2];
  188288. mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]);
  188289. }
  188290. }
  188291. }
  188292. };
  188293. DefinedInfo.prototype.defined = true;
  188294. function mark(values, key, value) {
  188295. if (value) {
  188296. values[key] = value;
  188297. }
  188298. }
  188299. // node_modules/property-information/lib/util/create.js
  188300. var own11 = {}.hasOwnProperty;
  188301. function create3(definition2) {
  188302. const property = {};
  188303. const normal = {};
  188304. let prop;
  188305. for (prop in definition2.properties) {
  188306. if (own11.call(definition2.properties, prop)) {
  188307. const value = definition2.properties[prop];
  188308. const info = new DefinedInfo(
  188309. prop,
  188310. definition2.transform(definition2.attributes || {}, prop),
  188311. value,
  188312. definition2.space
  188313. );
  188314. if (definition2.mustUseProperty && definition2.mustUseProperty.includes(prop)) {
  188315. info.mustUseProperty = true;
  188316. }
  188317. property[prop] = info;
  188318. normal[normalize5(prop)] = prop;
  188319. normal[normalize5(info.attribute)] = prop;
  188320. }
  188321. }
  188322. return new Schema(property, normal, definition2.space);
  188323. }
  188324. // node_modules/property-information/lib/xlink.js
  188325. var xlink = create3({
  188326. space: "xlink",
  188327. transform(_, prop) {
  188328. return "xlink:" + prop.slice(5).toLowerCase();
  188329. },
  188330. properties: {
  188331. xLinkActuate: null,
  188332. xLinkArcRole: null,
  188333. xLinkHref: null,
  188334. xLinkRole: null,
  188335. xLinkShow: null,
  188336. xLinkTitle: null,
  188337. xLinkType: null
  188338. }
  188339. });
  188340. // node_modules/property-information/lib/xml.js
  188341. var xml = create3({
  188342. space: "xml",
  188343. transform(_, prop) {
  188344. return "xml:" + prop.slice(3).toLowerCase();
  188345. },
  188346. properties: { xmlLang: null, xmlBase: null, xmlSpace: null }
  188347. });
  188348. // node_modules/property-information/lib/util/case-sensitive-transform.js
  188349. function caseSensitiveTransform(attributes, attribute) {
  188350. return attribute in attributes ? attributes[attribute] : attribute;
  188351. }
  188352. // node_modules/property-information/lib/util/case-insensitive-transform.js
  188353. function caseInsensitiveTransform(attributes, property) {
  188354. return caseSensitiveTransform(attributes, property.toLowerCase());
  188355. }
  188356. // node_modules/property-information/lib/xmlns.js
  188357. var xmlns = create3({
  188358. space: "xmlns",
  188359. attributes: { xmlnsxlink: "xmlns:xlink" },
  188360. transform: caseInsensitiveTransform,
  188361. properties: { xmlns: null, xmlnsXLink: null }
  188362. });
  188363. // node_modules/property-information/lib/aria.js
  188364. var aria = create3({
  188365. transform(_, prop) {
  188366. return prop === "role" ? prop : "aria-" + prop.slice(4).toLowerCase();
  188367. },
  188368. properties: {
  188369. ariaActiveDescendant: null,
  188370. ariaAtomic: booleanish,
  188371. ariaAutoComplete: null,
  188372. ariaBusy: booleanish,
  188373. ariaChecked: booleanish,
  188374. ariaColCount: number,
  188375. ariaColIndex: number,
  188376. ariaColSpan: number,
  188377. ariaControls: spaceSeparated,
  188378. ariaCurrent: null,
  188379. ariaDescribedBy: spaceSeparated,
  188380. ariaDetails: null,
  188381. ariaDisabled: booleanish,
  188382. ariaDropEffect: spaceSeparated,
  188383. ariaErrorMessage: null,
  188384. ariaExpanded: booleanish,
  188385. ariaFlowTo: spaceSeparated,
  188386. ariaGrabbed: booleanish,
  188387. ariaHasPopup: null,
  188388. ariaHidden: booleanish,
  188389. ariaInvalid: null,
  188390. ariaKeyShortcuts: null,
  188391. ariaLabel: null,
  188392. ariaLabelledBy: spaceSeparated,
  188393. ariaLevel: number,
  188394. ariaLive: null,
  188395. ariaModal: booleanish,
  188396. ariaMultiLine: booleanish,
  188397. ariaMultiSelectable: booleanish,
  188398. ariaOrientation: null,
  188399. ariaOwns: spaceSeparated,
  188400. ariaPlaceholder: null,
  188401. ariaPosInSet: number,
  188402. ariaPressed: booleanish,
  188403. ariaReadOnly: booleanish,
  188404. ariaRelevant: null,
  188405. ariaRequired: booleanish,
  188406. ariaRoleDescription: spaceSeparated,
  188407. ariaRowCount: number,
  188408. ariaRowIndex: number,
  188409. ariaRowSpan: number,
  188410. ariaSelected: booleanish,
  188411. ariaSetSize: number,
  188412. ariaSort: null,
  188413. ariaValueMax: number,
  188414. ariaValueMin: number,
  188415. ariaValueNow: number,
  188416. ariaValueText: null,
  188417. role: null
  188418. }
  188419. });
  188420. // node_modules/property-information/lib/html.js
  188421. var html2 = create3({
  188422. space: "html",
  188423. attributes: {
  188424. acceptcharset: "accept-charset",
  188425. classname: "class",
  188426. htmlfor: "for",
  188427. httpequiv: "http-equiv"
  188428. },
  188429. transform: caseInsensitiveTransform,
  188430. mustUseProperty: ["checked", "multiple", "muted", "selected"],
  188431. properties: {
  188432. abbr: null,
  188433. accept: commaSeparated,
  188434. acceptCharset: spaceSeparated,
  188435. accessKey: spaceSeparated,
  188436. action: null,
  188437. allow: null,
  188438. allowFullScreen: boolean,
  188439. allowPaymentRequest: boolean,
  188440. allowUserMedia: boolean,
  188441. alt: null,
  188442. as: null,
  188443. async: boolean,
  188444. autoCapitalize: null,
  188445. autoComplete: spaceSeparated,
  188446. autoFocus: boolean,
  188447. autoPlay: boolean,
  188448. capture: boolean,
  188449. charSet: null,
  188450. checked: boolean,
  188451. cite: null,
  188452. className: spaceSeparated,
  188453. cols: number,
  188454. colSpan: null,
  188455. content: null,
  188456. contentEditable: booleanish,
  188457. controls: boolean,
  188458. controlsList: spaceSeparated,
  188459. coords: number | commaSeparated,
  188460. crossOrigin: null,
  188461. data: null,
  188462. dateTime: null,
  188463. decoding: null,
  188464. default: boolean,
  188465. defer: boolean,
  188466. dir: null,
  188467. dirName: null,
  188468. disabled: boolean,
  188469. download: overloadedBoolean,
  188470. draggable: booleanish,
  188471. encType: null,
  188472. enterKeyHint: null,
  188473. form: null,
  188474. formAction: null,
  188475. formEncType: null,
  188476. formMethod: null,
  188477. formNoValidate: boolean,
  188478. formTarget: null,
  188479. headers: spaceSeparated,
  188480. height: number,
  188481. hidden: boolean,
  188482. high: number,
  188483. href: null,
  188484. hrefLang: null,
  188485. htmlFor: spaceSeparated,
  188486. httpEquiv: spaceSeparated,
  188487. id: null,
  188488. imageSizes: null,
  188489. imageSrcSet: null,
  188490. inputMode: null,
  188491. integrity: null,
  188492. is: null,
  188493. isMap: boolean,
  188494. itemId: null,
  188495. itemProp: spaceSeparated,
  188496. itemRef: spaceSeparated,
  188497. itemScope: boolean,
  188498. itemType: spaceSeparated,
  188499. kind: null,
  188500. label: null,
  188501. lang: null,
  188502. language: null,
  188503. list: null,
  188504. loading: null,
  188505. loop: boolean,
  188506. low: number,
  188507. manifest: null,
  188508. max: null,
  188509. maxLength: number,
  188510. media: null,
  188511. method: null,
  188512. min: null,
  188513. minLength: number,
  188514. multiple: boolean,
  188515. muted: boolean,
  188516. name: null,
  188517. nonce: null,
  188518. noModule: boolean,
  188519. noValidate: boolean,
  188520. onAbort: null,
  188521. onAfterPrint: null,
  188522. onAuxClick: null,
  188523. onBeforePrint: null,
  188524. onBeforeUnload: null,
  188525. onBlur: null,
  188526. onCancel: null,
  188527. onCanPlay: null,
  188528. onCanPlayThrough: null,
  188529. onChange: null,
  188530. onClick: null,
  188531. onClose: null,
  188532. onContextLost: null,
  188533. onContextMenu: null,
  188534. onContextRestored: null,
  188535. onCopy: null,
  188536. onCueChange: null,
  188537. onCut: null,
  188538. onDblClick: null,
  188539. onDrag: null,
  188540. onDragEnd: null,
  188541. onDragEnter: null,
  188542. onDragExit: null,
  188543. onDragLeave: null,
  188544. onDragOver: null,
  188545. onDragStart: null,
  188546. onDrop: null,
  188547. onDurationChange: null,
  188548. onEmptied: null,
  188549. onEnded: null,
  188550. onError: null,
  188551. onFocus: null,
  188552. onFormData: null,
  188553. onHashChange: null,
  188554. onInput: null,
  188555. onInvalid: null,
  188556. onKeyDown: null,
  188557. onKeyPress: null,
  188558. onKeyUp: null,
  188559. onLanguageChange: null,
  188560. onLoad: null,
  188561. onLoadedData: null,
  188562. onLoadedMetadata: null,
  188563. onLoadEnd: null,
  188564. onLoadStart: null,
  188565. onMessage: null,
  188566. onMessageError: null,
  188567. onMouseDown: null,
  188568. onMouseEnter: null,
  188569. onMouseLeave: null,
  188570. onMouseMove: null,
  188571. onMouseOut: null,
  188572. onMouseOver: null,
  188573. onMouseUp: null,
  188574. onOffline: null,
  188575. onOnline: null,
  188576. onPageHide: null,
  188577. onPageShow: null,
  188578. onPaste: null,
  188579. onPause: null,
  188580. onPlay: null,
  188581. onPlaying: null,
  188582. onPopState: null,
  188583. onProgress: null,
  188584. onRateChange: null,
  188585. onRejectionHandled: null,
  188586. onReset: null,
  188587. onResize: null,
  188588. onScroll: null,
  188589. onSecurityPolicyViolation: null,
  188590. onSeeked: null,
  188591. onSeeking: null,
  188592. onSelect: null,
  188593. onSlotChange: null,
  188594. onStalled: null,
  188595. onStorage: null,
  188596. onSubmit: null,
  188597. onSuspend: null,
  188598. onTimeUpdate: null,
  188599. onToggle: null,
  188600. onUnhandledRejection: null,
  188601. onUnload: null,
  188602. onVolumeChange: null,
  188603. onWaiting: null,
  188604. onWheel: null,
  188605. open: boolean,
  188606. optimum: number,
  188607. pattern: null,
  188608. ping: spaceSeparated,
  188609. placeholder: null,
  188610. playsInline: boolean,
  188611. poster: null,
  188612. preload: null,
  188613. readOnly: boolean,
  188614. referrerPolicy: null,
  188615. rel: spaceSeparated,
  188616. required: boolean,
  188617. reversed: boolean,
  188618. rows: number,
  188619. rowSpan: number,
  188620. sandbox: spaceSeparated,
  188621. scope: null,
  188622. scoped: boolean,
  188623. seamless: boolean,
  188624. selected: boolean,
  188625. shape: null,
  188626. size: number,
  188627. sizes: null,
  188628. slot: null,
  188629. span: number,
  188630. spellCheck: booleanish,
  188631. src: null,
  188632. srcDoc: null,
  188633. srcLang: null,
  188634. srcSet: null,
  188635. start: number,
  188636. step: null,
  188637. style: null,
  188638. tabIndex: number,
  188639. target: null,
  188640. title: null,
  188641. translate: null,
  188642. type: null,
  188643. typeMustMatch: boolean,
  188644. useMap: null,
  188645. value: booleanish,
  188646. width: number,
  188647. wrap: null,
  188648. align: null,
  188649. aLink: null,
  188650. archive: spaceSeparated,
  188651. axis: null,
  188652. background: null,
  188653. bgColor: null,
  188654. border: number,
  188655. borderColor: null,
  188656. bottomMargin: number,
  188657. cellPadding: null,
  188658. cellSpacing: null,
  188659. char: null,
  188660. charOff: null,
  188661. classId: null,
  188662. clear: null,
  188663. code: null,
  188664. codeBase: null,
  188665. codeType: null,
  188666. color: null,
  188667. compact: boolean,
  188668. declare: boolean,
  188669. event: null,
  188670. face: null,
  188671. frame: null,
  188672. frameBorder: null,
  188673. hSpace: number,
  188674. leftMargin: number,
  188675. link: null,
  188676. longDesc: null,
  188677. lowSrc: null,
  188678. marginHeight: number,
  188679. marginWidth: number,
  188680. noResize: boolean,
  188681. noHref: boolean,
  188682. noShade: boolean,
  188683. noWrap: boolean,
  188684. object: null,
  188685. profile: null,
  188686. prompt: null,
  188687. rev: null,
  188688. rightMargin: number,
  188689. rules: null,
  188690. scheme: null,
  188691. scrolling: booleanish,
  188692. standby: null,
  188693. summary: null,
  188694. text: null,
  188695. topMargin: number,
  188696. valueType: null,
  188697. version: null,
  188698. vAlign: null,
  188699. vLink: null,
  188700. vSpace: number,
  188701. allowTransparency: null,
  188702. autoCorrect: null,
  188703. autoSave: null,
  188704. disablePictureInPicture: boolean,
  188705. disableRemotePlayback: boolean,
  188706. prefix: null,
  188707. property: null,
  188708. results: number,
  188709. security: null,
  188710. unselectable: null
  188711. }
  188712. });
  188713. // node_modules/property-information/lib/svg.js
  188714. var svg = create3({
  188715. space: "svg",
  188716. attributes: {
  188717. accentHeight: "accent-height",
  188718. alignmentBaseline: "alignment-baseline",
  188719. arabicForm: "arabic-form",
  188720. baselineShift: "baseline-shift",
  188721. capHeight: "cap-height",
  188722. className: "class",
  188723. clipPath: "clip-path",
  188724. clipRule: "clip-rule",
  188725. colorInterpolation: "color-interpolation",
  188726. colorInterpolationFilters: "color-interpolation-filters",
  188727. colorProfile: "color-profile",
  188728. colorRendering: "color-rendering",
  188729. crossOrigin: "crossorigin",
  188730. dataType: "datatype",
  188731. dominantBaseline: "dominant-baseline",
  188732. enableBackground: "enable-background",
  188733. fillOpacity: "fill-opacity",
  188734. fillRule: "fill-rule",
  188735. floodColor: "flood-color",
  188736. floodOpacity: "flood-opacity",
  188737. fontFamily: "font-family",
  188738. fontSize: "font-size",
  188739. fontSizeAdjust: "font-size-adjust",
  188740. fontStretch: "font-stretch",
  188741. fontStyle: "font-style",
  188742. fontVariant: "font-variant",
  188743. fontWeight: "font-weight",
  188744. glyphName: "glyph-name",
  188745. glyphOrientationHorizontal: "glyph-orientation-horizontal",
  188746. glyphOrientationVertical: "glyph-orientation-vertical",
  188747. hrefLang: "hreflang",
  188748. horizAdvX: "horiz-adv-x",
  188749. horizOriginX: "horiz-origin-x",
  188750. horizOriginY: "horiz-origin-y",
  188751. imageRendering: "image-rendering",
  188752. letterSpacing: "letter-spacing",
  188753. lightingColor: "lighting-color",
  188754. markerEnd: "marker-end",
  188755. markerMid: "marker-mid",
  188756. markerStart: "marker-start",
  188757. navDown: "nav-down",
  188758. navDownLeft: "nav-down-left",
  188759. navDownRight: "nav-down-right",
  188760. navLeft: "nav-left",
  188761. navNext: "nav-next",
  188762. navPrev: "nav-prev",
  188763. navRight: "nav-right",
  188764. navUp: "nav-up",
  188765. navUpLeft: "nav-up-left",
  188766. navUpRight: "nav-up-right",
  188767. onAbort: "onabort",
  188768. onActivate: "onactivate",
  188769. onAfterPrint: "onafterprint",
  188770. onBeforePrint: "onbeforeprint",
  188771. onBegin: "onbegin",
  188772. onCancel: "oncancel",
  188773. onCanPlay: "oncanplay",
  188774. onCanPlayThrough: "oncanplaythrough",
  188775. onChange: "onchange",
  188776. onClick: "onclick",
  188777. onClose: "onclose",
  188778. onCopy: "oncopy",
  188779. onCueChange: "oncuechange",
  188780. onCut: "oncut",
  188781. onDblClick: "ondblclick",
  188782. onDrag: "ondrag",
  188783. onDragEnd: "ondragend",
  188784. onDragEnter: "ondragenter",
  188785. onDragExit: "ondragexit",
  188786. onDragLeave: "ondragleave",
  188787. onDragOver: "ondragover",
  188788. onDragStart: "ondragstart",
  188789. onDrop: "ondrop",
  188790. onDurationChange: "ondurationchange",
  188791. onEmptied: "onemptied",
  188792. onEnd: "onend",
  188793. onEnded: "onended",
  188794. onError: "onerror",
  188795. onFocus: "onfocus",
  188796. onFocusIn: "onfocusin",
  188797. onFocusOut: "onfocusout",
  188798. onHashChange: "onhashchange",
  188799. onInput: "oninput",
  188800. onInvalid: "oninvalid",
  188801. onKeyDown: "onkeydown",
  188802. onKeyPress: "onkeypress",
  188803. onKeyUp: "onkeyup",
  188804. onLoad: "onload",
  188805. onLoadedData: "onloadeddata",
  188806. onLoadedMetadata: "onloadedmetadata",
  188807. onLoadStart: "onloadstart",
  188808. onMessage: "onmessage",
  188809. onMouseDown: "onmousedown",
  188810. onMouseEnter: "onmouseenter",
  188811. onMouseLeave: "onmouseleave",
  188812. onMouseMove: "onmousemove",
  188813. onMouseOut: "onmouseout",
  188814. onMouseOver: "onmouseover",
  188815. onMouseUp: "onmouseup",
  188816. onMouseWheel: "onmousewheel",
  188817. onOffline: "onoffline",
  188818. onOnline: "ononline",
  188819. onPageHide: "onpagehide",
  188820. onPageShow: "onpageshow",
  188821. onPaste: "onpaste",
  188822. onPause: "onpause",
  188823. onPlay: "onplay",
  188824. onPlaying: "onplaying",
  188825. onPopState: "onpopstate",
  188826. onProgress: "onprogress",
  188827. onRateChange: "onratechange",
  188828. onRepeat: "onrepeat",
  188829. onReset: "onreset",
  188830. onResize: "onresize",
  188831. onScroll: "onscroll",
  188832. onSeeked: "onseeked",
  188833. onSeeking: "onseeking",
  188834. onSelect: "onselect",
  188835. onShow: "onshow",
  188836. onStalled: "onstalled",
  188837. onStorage: "onstorage",
  188838. onSubmit: "onsubmit",
  188839. onSuspend: "onsuspend",
  188840. onTimeUpdate: "ontimeupdate",
  188841. onToggle: "ontoggle",
  188842. onUnload: "onunload",
  188843. onVolumeChange: "onvolumechange",
  188844. onWaiting: "onwaiting",
  188845. onZoom: "onzoom",
  188846. overlinePosition: "overline-position",
  188847. overlineThickness: "overline-thickness",
  188848. paintOrder: "paint-order",
  188849. panose1: "panose-1",
  188850. pointerEvents: "pointer-events",
  188851. referrerPolicy: "referrerpolicy",
  188852. renderingIntent: "rendering-intent",
  188853. shapeRendering: "shape-rendering",
  188854. stopColor: "stop-color",
  188855. stopOpacity: "stop-opacity",
  188856. strikethroughPosition: "strikethrough-position",
  188857. strikethroughThickness: "strikethrough-thickness",
  188858. strokeDashArray: "stroke-dasharray",
  188859. strokeDashOffset: "stroke-dashoffset",
  188860. strokeLineCap: "stroke-linecap",
  188861. strokeLineJoin: "stroke-linejoin",
  188862. strokeMiterLimit: "stroke-miterlimit",
  188863. strokeOpacity: "stroke-opacity",
  188864. strokeWidth: "stroke-width",
  188865. tabIndex: "tabindex",
  188866. textAnchor: "text-anchor",
  188867. textDecoration: "text-decoration",
  188868. textRendering: "text-rendering",
  188869. typeOf: "typeof",
  188870. underlinePosition: "underline-position",
  188871. underlineThickness: "underline-thickness",
  188872. unicodeBidi: "unicode-bidi",
  188873. unicodeRange: "unicode-range",
  188874. unitsPerEm: "units-per-em",
  188875. vAlphabetic: "v-alphabetic",
  188876. vHanging: "v-hanging",
  188877. vIdeographic: "v-ideographic",
  188878. vMathematical: "v-mathematical",
  188879. vectorEffect: "vector-effect",
  188880. vertAdvY: "vert-adv-y",
  188881. vertOriginX: "vert-origin-x",
  188882. vertOriginY: "vert-origin-y",
  188883. wordSpacing: "word-spacing",
  188884. writingMode: "writing-mode",
  188885. xHeight: "x-height",
  188886. playbackOrder: "playbackorder",
  188887. timelineBegin: "timelinebegin"
  188888. },
  188889. transform: caseSensitiveTransform,
  188890. properties: {
  188891. about: commaOrSpaceSeparated,
  188892. accentHeight: number,
  188893. accumulate: null,
  188894. additive: null,
  188895. alignmentBaseline: null,
  188896. alphabetic: number,
  188897. amplitude: number,
  188898. arabicForm: null,
  188899. ascent: number,
  188900. attributeName: null,
  188901. attributeType: null,
  188902. azimuth: number,
  188903. bandwidth: null,
  188904. baselineShift: null,
  188905. baseFrequency: null,
  188906. baseProfile: null,
  188907. bbox: null,
  188908. begin: null,
  188909. bias: number,
  188910. by: null,
  188911. calcMode: null,
  188912. capHeight: number,
  188913. className: spaceSeparated,
  188914. clip: null,
  188915. clipPath: null,
  188916. clipPathUnits: null,
  188917. clipRule: null,
  188918. color: null,
  188919. colorInterpolation: null,
  188920. colorInterpolationFilters: null,
  188921. colorProfile: null,
  188922. colorRendering: null,
  188923. content: null,
  188924. contentScriptType: null,
  188925. contentStyleType: null,
  188926. crossOrigin: null,
  188927. cursor: null,
  188928. cx: null,
  188929. cy: null,
  188930. d: null,
  188931. dataType: null,
  188932. defaultAction: null,
  188933. descent: number,
  188934. diffuseConstant: number,
  188935. direction: null,
  188936. display: null,
  188937. dur: null,
  188938. divisor: number,
  188939. dominantBaseline: null,
  188940. download: boolean,
  188941. dx: null,
  188942. dy: null,
  188943. edgeMode: null,
  188944. editable: null,
  188945. elevation: number,
  188946. enableBackground: null,
  188947. end: null,
  188948. event: null,
  188949. exponent: number,
  188950. externalResourcesRequired: null,
  188951. fill: null,
  188952. fillOpacity: number,
  188953. fillRule: null,
  188954. filter: null,
  188955. filterRes: null,
  188956. filterUnits: null,
  188957. floodColor: null,
  188958. floodOpacity: null,
  188959. focusable: null,
  188960. focusHighlight: null,
  188961. fontFamily: null,
  188962. fontSize: null,
  188963. fontSizeAdjust: null,
  188964. fontStretch: null,
  188965. fontStyle: null,
  188966. fontVariant: null,
  188967. fontWeight: null,
  188968. format: null,
  188969. fr: null,
  188970. from: null,
  188971. fx: null,
  188972. fy: null,
  188973. g1: commaSeparated,
  188974. g2: commaSeparated,
  188975. glyphName: commaSeparated,
  188976. glyphOrientationHorizontal: null,
  188977. glyphOrientationVertical: null,
  188978. glyphRef: null,
  188979. gradientTransform: null,
  188980. gradientUnits: null,
  188981. handler: null,
  188982. hanging: number,
  188983. hatchContentUnits: null,
  188984. hatchUnits: null,
  188985. height: null,
  188986. href: null,
  188987. hrefLang: null,
  188988. horizAdvX: number,
  188989. horizOriginX: number,
  188990. horizOriginY: number,
  188991. id: null,
  188992. ideographic: number,
  188993. imageRendering: null,
  188994. initialVisibility: null,
  188995. in: null,
  188996. in2: null,
  188997. intercept: number,
  188998. k: number,
  188999. k1: number,
  189000. k2: number,
  189001. k3: number,
  189002. k4: number,
  189003. kernelMatrix: commaOrSpaceSeparated,
  189004. kernelUnitLength: null,
  189005. keyPoints: null,
  189006. keySplines: null,
  189007. keyTimes: null,
  189008. kerning: null,
  189009. lang: null,
  189010. lengthAdjust: null,
  189011. letterSpacing: null,
  189012. lightingColor: null,
  189013. limitingConeAngle: number,
  189014. local: null,
  189015. markerEnd: null,
  189016. markerMid: null,
  189017. markerStart: null,
  189018. markerHeight: null,
  189019. markerUnits: null,
  189020. markerWidth: null,
  189021. mask: null,
  189022. maskContentUnits: null,
  189023. maskUnits: null,
  189024. mathematical: null,
  189025. max: null,
  189026. media: null,
  189027. mediaCharacterEncoding: null,
  189028. mediaContentEncodings: null,
  189029. mediaSize: number,
  189030. mediaTime: null,
  189031. method: null,
  189032. min: null,
  189033. mode: null,
  189034. name: null,
  189035. navDown: null,
  189036. navDownLeft: null,
  189037. navDownRight: null,
  189038. navLeft: null,
  189039. navNext: null,
  189040. navPrev: null,
  189041. navRight: null,
  189042. navUp: null,
  189043. navUpLeft: null,
  189044. navUpRight: null,
  189045. numOctaves: null,
  189046. observer: null,
  189047. offset: null,
  189048. onAbort: null,
  189049. onActivate: null,
  189050. onAfterPrint: null,
  189051. onBeforePrint: null,
  189052. onBegin: null,
  189053. onCancel: null,
  189054. onCanPlay: null,
  189055. onCanPlayThrough: null,
  189056. onChange: null,
  189057. onClick: null,
  189058. onClose: null,
  189059. onCopy: null,
  189060. onCueChange: null,
  189061. onCut: null,
  189062. onDblClick: null,
  189063. onDrag: null,
  189064. onDragEnd: null,
  189065. onDragEnter: null,
  189066. onDragExit: null,
  189067. onDragLeave: null,
  189068. onDragOver: null,
  189069. onDragStart: null,
  189070. onDrop: null,
  189071. onDurationChange: null,
  189072. onEmptied: null,
  189073. onEnd: null,
  189074. onEnded: null,
  189075. onError: null,
  189076. onFocus: null,
  189077. onFocusIn: null,
  189078. onFocusOut: null,
  189079. onHashChange: null,
  189080. onInput: null,
  189081. onInvalid: null,
  189082. onKeyDown: null,
  189083. onKeyPress: null,
  189084. onKeyUp: null,
  189085. onLoad: null,
  189086. onLoadedData: null,
  189087. onLoadedMetadata: null,
  189088. onLoadStart: null,
  189089. onMessage: null,
  189090. onMouseDown: null,
  189091. onMouseEnter: null,
  189092. onMouseLeave: null,
  189093. onMouseMove: null,
  189094. onMouseOut: null,
  189095. onMouseOver: null,
  189096. onMouseUp: null,
  189097. onMouseWheel: null,
  189098. onOffline: null,
  189099. onOnline: null,
  189100. onPageHide: null,
  189101. onPageShow: null,
  189102. onPaste: null,
  189103. onPause: null,
  189104. onPlay: null,
  189105. onPlaying: null,
  189106. onPopState: null,
  189107. onProgress: null,
  189108. onRateChange: null,
  189109. onRepeat: null,
  189110. onReset: null,
  189111. onResize: null,
  189112. onScroll: null,
  189113. onSeeked: null,
  189114. onSeeking: null,
  189115. onSelect: null,
  189116. onShow: null,
  189117. onStalled: null,
  189118. onStorage: null,
  189119. onSubmit: null,
  189120. onSuspend: null,
  189121. onTimeUpdate: null,
  189122. onToggle: null,
  189123. onUnload: null,
  189124. onVolumeChange: null,
  189125. onWaiting: null,
  189126. onZoom: null,
  189127. opacity: null,
  189128. operator: null,
  189129. order: null,
  189130. orient: null,
  189131. orientation: null,
  189132. origin: null,
  189133. overflow: null,
  189134. overlay: null,
  189135. overlinePosition: number,
  189136. overlineThickness: number,
  189137. paintOrder: null,
  189138. panose1: null,
  189139. path: null,
  189140. pathLength: number,
  189141. patternContentUnits: null,
  189142. patternTransform: null,
  189143. patternUnits: null,
  189144. phase: null,
  189145. ping: spaceSeparated,
  189146. pitch: null,
  189147. playbackOrder: null,
  189148. pointerEvents: null,
  189149. points: null,
  189150. pointsAtX: number,
  189151. pointsAtY: number,
  189152. pointsAtZ: number,
  189153. preserveAlpha: null,
  189154. preserveAspectRatio: null,
  189155. primitiveUnits: null,
  189156. propagate: null,
  189157. property: commaOrSpaceSeparated,
  189158. r: null,
  189159. radius: null,
  189160. referrerPolicy: null,
  189161. refX: null,
  189162. refY: null,
  189163. rel: commaOrSpaceSeparated,
  189164. rev: commaOrSpaceSeparated,
  189165. renderingIntent: null,
  189166. repeatCount: null,
  189167. repeatDur: null,
  189168. requiredExtensions: commaOrSpaceSeparated,
  189169. requiredFeatures: commaOrSpaceSeparated,
  189170. requiredFonts: commaOrSpaceSeparated,
  189171. requiredFormats: commaOrSpaceSeparated,
  189172. resource: null,
  189173. restart: null,
  189174. result: null,
  189175. rotate: null,
  189176. rx: null,
  189177. ry: null,
  189178. scale: null,
  189179. seed: null,
  189180. shapeRendering: null,
  189181. side: null,
  189182. slope: null,
  189183. snapshotTime: null,
  189184. specularConstant: number,
  189185. specularExponent: number,
  189186. spreadMethod: null,
  189187. spacing: null,
  189188. startOffset: null,
  189189. stdDeviation: null,
  189190. stemh: null,
  189191. stemv: null,
  189192. stitchTiles: null,
  189193. stopColor: null,
  189194. stopOpacity: null,
  189195. strikethroughPosition: number,
  189196. strikethroughThickness: number,
  189197. string: null,
  189198. stroke: null,
  189199. strokeDashArray: commaOrSpaceSeparated,
  189200. strokeDashOffset: null,
  189201. strokeLineCap: null,
  189202. strokeLineJoin: null,
  189203. strokeMiterLimit: number,
  189204. strokeOpacity: number,
  189205. strokeWidth: null,
  189206. style: null,
  189207. surfaceScale: number,
  189208. syncBehavior: null,
  189209. syncBehaviorDefault: null,
  189210. syncMaster: null,
  189211. syncTolerance: null,
  189212. syncToleranceDefault: null,
  189213. systemLanguage: commaOrSpaceSeparated,
  189214. tabIndex: number,
  189215. tableValues: null,
  189216. target: null,
  189217. targetX: number,
  189218. targetY: number,
  189219. textAnchor: null,
  189220. textDecoration: null,
  189221. textRendering: null,
  189222. textLength: null,
  189223. timelineBegin: null,
  189224. title: null,
  189225. transformBehavior: null,
  189226. type: null,
  189227. typeOf: commaOrSpaceSeparated,
  189228. to: null,
  189229. transform: null,
  189230. u1: null,
  189231. u2: null,
  189232. underlinePosition: number,
  189233. underlineThickness: number,
  189234. unicode: null,
  189235. unicodeBidi: null,
  189236. unicodeRange: null,
  189237. unitsPerEm: number,
  189238. values: null,
  189239. vAlphabetic: number,
  189240. vMathematical: number,
  189241. vectorEffect: null,
  189242. vHanging: number,
  189243. vIdeographic: number,
  189244. version: null,
  189245. vertAdvY: number,
  189246. vertOriginX: number,
  189247. vertOriginY: number,
  189248. viewBox: null,
  189249. viewTarget: null,
  189250. visibility: null,
  189251. width: null,
  189252. widths: null,
  189253. wordSpacing: null,
  189254. writingMode: null,
  189255. x: null,
  189256. x1: null,
  189257. x2: null,
  189258. xChannelSelector: null,
  189259. xHeight: number,
  189260. y: null,
  189261. y1: null,
  189262. y2: null,
  189263. yChannelSelector: null,
  189264. z: null,
  189265. zoomAndPan: null
  189266. }
  189267. });
  189268. // node_modules/property-information/lib/find.js
  189269. var valid = /^data[-\w.:]+$/i;
  189270. var dash = /-[a-z]/g;
  189271. var cap = /[A-Z]/g;
  189272. function find(schema, value) {
  189273. const normal = normalize5(value);
  189274. let prop = value;
  189275. let Type = Info;
  189276. if (normal in schema.normal) {
  189277. return schema.property[schema.normal[normal]];
  189278. }
  189279. if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
  189280. if (value.charAt(4) === "-") {
  189281. const rest = value.slice(5).replace(dash, camelcase);
  189282. prop = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
  189283. } else {
  189284. const rest = value.slice(4);
  189285. if (!dash.test(rest)) {
  189286. let dashes = rest.replace(cap, kebab);
  189287. if (dashes.charAt(0) !== "-") {
  189288. dashes = "-" + dashes;
  189289. }
  189290. value = "data" + dashes;
  189291. }
  189292. }
  189293. Type = DefinedInfo;
  189294. }
  189295. return new Type(prop, value);
  189296. }
  189297. function kebab($0) {
  189298. return "-" + $0.toLowerCase();
  189299. }
  189300. function camelcase($0) {
  189301. return $0.charAt(1).toUpperCase();
  189302. }
  189303. // node_modules/property-information/lib/hast-to-react.js
  189304. var hastToReact = {
  189305. classId: "classID",
  189306. dataType: "datatype",
  189307. itemId: "itemID",
  189308. strokeDashArray: "strokeDasharray",
  189309. strokeDashOffset: "strokeDashoffset",
  189310. strokeLineCap: "strokeLinecap",
  189311. strokeLineJoin: "strokeLinejoin",
  189312. strokeMiterLimit: "strokeMiterlimit",
  189313. typeOf: "typeof",
  189314. xLinkActuate: "xlinkActuate",
  189315. xLinkArcRole: "xlinkArcrole",
  189316. xLinkHref: "xlinkHref",
  189317. xLinkRole: "xlinkRole",
  189318. xLinkShow: "xlinkShow",
  189319. xLinkTitle: "xlinkTitle",
  189320. xLinkType: "xlinkType",
  189321. xmlnsXLink: "xmlnsXlink"
  189322. };
  189323. // node_modules/property-information/index.js
  189324. var html3 = merge([xml, xlink, xmlns, aria, html2], "html");
  189325. var svg2 = merge([xml, xlink, xmlns, aria, svg], "svg");
  189326. // node_modules/space-separated-tokens/index.js
  189327. function stringify3(values) {
  189328. return values.join(" ").trim();
  189329. }
  189330. // node_modules/hast-util-to-estree/index.js
  189331. var import_style_to_object = __toESM(require_style_to_object(), 1);
  189332. // node_modules/zwitch/index.js
  189333. var own12 = {}.hasOwnProperty;
  189334. function zwitch(key, options) {
  189335. var settings = options || {};
  189336. function one3(value) {
  189337. var fn = one3.invalid;
  189338. var handlers2 = one3.handlers;
  189339. if (value && own12.call(value, key)) {
  189340. fn = own12.call(handlers2, value[key]) ? handlers2[value[key]] : one3.unknown;
  189341. }
  189342. if (fn) {
  189343. return fn.apply(this, arguments);
  189344. }
  189345. }
  189346. one3.handlers = settings.handlers || {};
  189347. one3.invalid = settings.invalid;
  189348. one3.unknown = settings.unknown;
  189349. return one3;
  189350. }
  189351. // node_modules/hast-util-to-estree/index.js
  189352. var toReact = hastToReact;
  189353. var own13 = {}.hasOwnProperty;
  189354. var tableElements = /* @__PURE__ */ new Set([
  189355. "table",
  189356. "thead",
  189357. "tbody",
  189358. "tfoot",
  189359. "tr",
  189360. "th",
  189361. "td"
  189362. ]);
  189363. function toEstree(tree, options = {}) {
  189364. const context = {
  189365. schema: options.space === "svg" ? svg2 : html3,
  189366. comments: [],
  189367. esm: [],
  189368. handle: zwitch("type", {
  189369. invalid,
  189370. unknown: unknown2,
  189371. handlers: Object.assign(
  189372. {},
  189373. {
  189374. comment,
  189375. doctype: ignore2,
  189376. element,
  189377. mdxjsEsm: mdxjsEsm2,
  189378. mdxFlowExpression: mdxExpression2,
  189379. mdxJsxFlowElement: mdxJsxElement,
  189380. mdxJsxTextElement: mdxJsxElement,
  189381. mdxTextExpression: mdxExpression2,
  189382. root: root2,
  189383. text: text4
  189384. },
  189385. options.handlers
  189386. )
  189387. })
  189388. };
  189389. let result = context.handle(tree, context);
  189390. const body = context.esm;
  189391. if (result) {
  189392. if (result.type !== "JSXFragment" && result.type !== "JSXElement") {
  189393. result = create4(tree, {
  189394. type: "JSXFragment",
  189395. openingFragment: { type: "JSXOpeningFragment" },
  189396. closingFragment: { type: "JSXClosingFragment" },
  189397. children: [result]
  189398. });
  189399. }
  189400. body.push(create4(tree, { type: "ExpressionStatement", expression: result }));
  189401. }
  189402. return create4(tree, {
  189403. type: "Program",
  189404. body,
  189405. sourceType: "module",
  189406. comments: context.comments
  189407. });
  189408. }
  189409. function invalid(value) {
  189410. throw new Error("Cannot handle value `" + value + "`, expected node");
  189411. }
  189412. function unknown2(node) {
  189413. throw new Error("Cannot handle unknown node `" + node.type + "`");
  189414. }
  189415. function ignore2() {
  189416. }
  189417. function comment(node, context) {
  189418. const esnode = inherit(node, { type: "Block", value: node.value });
  189419. context.comments.push(esnode);
  189420. return create4(node, {
  189421. type: "JSXExpressionContainer",
  189422. expression: create4(node, {
  189423. type: "JSXEmptyExpression",
  189424. comments: [Object.assign({}, esnode, { leading: false, trailing: true })]
  189425. })
  189426. });
  189427. }
  189428. function element(node, context) {
  189429. const parentSchema = context.schema;
  189430. let schema = parentSchema;
  189431. const props = node.properties || {};
  189432. if (parentSchema.space === "html" && node.tagName.toLowerCase() === "svg") {
  189433. schema = svg2;
  189434. context.schema = schema;
  189435. }
  189436. const children = all3(node, context);
  189437. const attributes = [];
  189438. let prop;
  189439. for (prop in props) {
  189440. if (own13.call(props, prop)) {
  189441. let value = props[prop];
  189442. const info = find(schema, prop);
  189443. let attributeValue;
  189444. if (value === void 0 || value === null || typeof value === "number" && Number.isNaN(value) || value === false || !value && info.boolean) {
  189445. continue;
  189446. }
  189447. prop = info.space ? toReact[info.property] || info.property : info.attribute;
  189448. if (Array.isArray(value)) {
  189449. value = info.commaSeparated ? stringify2(value) : stringify3(value);
  189450. }
  189451. if (prop === "style") {
  189452. const styleValue = typeof value === "string" ? parseStyle(value, node.tagName) : value;
  189453. const cssProperties = [];
  189454. let cssProp;
  189455. for (cssProp in styleValue) {
  189456. if (own13.call(styleValue, cssProp)) {
  189457. cssProperties.push({
  189458. type: "Property",
  189459. method: false,
  189460. shorthand: false,
  189461. computed: false,
  189462. key: { type: "Identifier", name: cssProp },
  189463. value: { type: "Literal", value: String(styleValue[cssProp]) },
  189464. kind: "init"
  189465. });
  189466. }
  189467. }
  189468. attributeValue = {
  189469. type: "JSXExpressionContainer",
  189470. expression: { type: "ObjectExpression", properties: cssProperties }
  189471. };
  189472. } else if (value === true) {
  189473. attributeValue = null;
  189474. } else {
  189475. attributeValue = { type: "Literal", value: String(value) };
  189476. }
  189477. if (jsxIdentifierName(prop)) {
  189478. attributes.push({
  189479. type: "JSXAttribute",
  189480. name: { type: "JSXIdentifier", name: prop },
  189481. value: attributeValue
  189482. });
  189483. } else {
  189484. attributes.push({
  189485. type: "JSXSpreadAttribute",
  189486. argument: {
  189487. type: "ObjectExpression",
  189488. properties: [
  189489. {
  189490. type: "Property",
  189491. method: false,
  189492. shorthand: false,
  189493. computed: false,
  189494. key: { type: "Literal", value: String(prop) },
  189495. value: attributeValue || { type: "Literal", value: true },
  189496. kind: "init"
  189497. }
  189498. ]
  189499. }
  189500. });
  189501. }
  189502. }
  189503. }
  189504. context.schema = parentSchema;
  189505. return inherit(node, {
  189506. type: "JSXElement",
  189507. openingElement: {
  189508. type: "JSXOpeningElement",
  189509. attributes,
  189510. name: createJsxName(node.tagName),
  189511. selfClosing: children.length === 0
  189512. },
  189513. closingElement: children.length > 0 ? { type: "JSXClosingElement", name: createJsxName(node.tagName) } : null,
  189514. children
  189515. });
  189516. }
  189517. function mdxjsEsm2(node, context) {
  189518. const estree = node.data && node.data.estree;
  189519. const comments = estree && estree.comments || [];
  189520. if (estree) {
  189521. context.comments.push(...comments);
  189522. attachComments(estree, comments);
  189523. context.esm.push(...estree.body);
  189524. }
  189525. }
  189526. function mdxExpression2(node, context) {
  189527. const estree = node.data && node.data.estree;
  189528. const comments = estree && estree.comments || [];
  189529. let expression;
  189530. if (estree) {
  189531. context.comments.push(...comments);
  189532. attachComments(estree, estree.comments);
  189533. expression = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression || void 0;
  189534. }
  189535. return inherit(node, {
  189536. type: "JSXExpressionContainer",
  189537. expression: expression || create4(node, { type: "JSXEmptyExpression" })
  189538. });
  189539. }
  189540. function mdxJsxElement(node, context) {
  189541. const parentSchema = context.schema;
  189542. let schema = parentSchema;
  189543. const attrs = node.attributes || [];
  189544. let index2 = -1;
  189545. if (node.name && parentSchema.space === "html" && node.name.toLowerCase() === "svg") {
  189546. schema = svg2;
  189547. context.schema = schema;
  189548. }
  189549. const children = all3(node, context);
  189550. const attributes = [];
  189551. while (++index2 < attrs.length) {
  189552. const attr = attrs[index2];
  189553. const value = attr.value;
  189554. let attributeValue;
  189555. if (attr.type === "mdxJsxAttribute") {
  189556. if (value === void 0 || value === null) {
  189557. attributeValue = null;
  189558. } else if (typeof value === "object") {
  189559. const estree = value.data && value.data.estree;
  189560. const comments = estree && estree.comments || [];
  189561. let expression;
  189562. if (estree) {
  189563. context.comments.push(...comments);
  189564. attachComments(estree, estree.comments);
  189565. expression = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression || void 0;
  189566. }
  189567. attributeValue = inherit(value, {
  189568. type: "JSXExpressionContainer",
  189569. expression: expression || { type: "JSXEmptyExpression" }
  189570. });
  189571. } else {
  189572. attributeValue = { type: "Literal", value: String(value) };
  189573. }
  189574. attributes.push(
  189575. inherit(attr, {
  189576. type: "JSXAttribute",
  189577. name: createJsxName(attr.name, true),
  189578. value: attributeValue
  189579. })
  189580. );
  189581. } else {
  189582. const estree = attr.data && attr.data.estree;
  189583. const comments = estree && estree.comments || [];
  189584. let argumentValue;
  189585. if (estree) {
  189586. context.comments.push(...comments);
  189587. attachComments(estree, estree.comments);
  189588. argumentValue = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression && estree.body[0].expression.type === "ObjectExpression" && estree.body[0].expression.properties && estree.body[0].expression.properties[0] && estree.body[0].expression.properties[0].type === "SpreadElement" && estree.body[0].expression.properties[0].argument || void 0;
  189589. }
  189590. attributes.push(
  189591. inherit(attr, {
  189592. type: "JSXSpreadAttribute",
  189593. argument: argumentValue || { type: "ObjectExpression", properties: [] }
  189594. })
  189595. );
  189596. }
  189597. }
  189598. context.schema = parentSchema;
  189599. return inherit(
  189600. node,
  189601. node.name ? {
  189602. type: "JSXElement",
  189603. openingElement: {
  189604. type: "JSXOpeningElement",
  189605. attributes,
  189606. name: createJsxName(node.name),
  189607. selfClosing: children.length === 0
  189608. },
  189609. closingElement: children.length > 0 ? { type: "JSXClosingElement", name: createJsxName(node.name) } : null,
  189610. children
  189611. } : {
  189612. type: "JSXFragment",
  189613. openingFragment: { type: "JSXOpeningFragment" },
  189614. closingFragment: { type: "JSXClosingFragment" },
  189615. children
  189616. }
  189617. );
  189618. }
  189619. function root2(node, context) {
  189620. const children = all3(node, context);
  189621. const cleanChildren = [];
  189622. let index2 = -1;
  189623. let queue;
  189624. while (++index2 < children.length) {
  189625. const child = children[index2];
  189626. if (child.type === "JSXExpressionContainer" && child.expression.type === "Literal" && whitespace(child.expression.value)) {
  189627. if (queue)
  189628. queue.push(child);
  189629. } else {
  189630. if (queue)
  189631. cleanChildren.push(...queue);
  189632. cleanChildren.push(child);
  189633. queue = [];
  189634. }
  189635. }
  189636. return inherit(node, {
  189637. type: "JSXFragment",
  189638. openingFragment: { type: "JSXOpeningFragment" },
  189639. closingFragment: { type: "JSXClosingFragment" },
  189640. children: cleanChildren
  189641. });
  189642. }
  189643. function text4(node) {
  189644. const value = String(node.value || "");
  189645. if (!value)
  189646. return;
  189647. return create4(node, {
  189648. type: "JSXExpressionContainer",
  189649. expression: inherit(node, { type: "Literal", value })
  189650. });
  189651. }
  189652. function all3(parent, context) {
  189653. const children = parent.children || [];
  189654. let index2 = -1;
  189655. const results = [];
  189656. const ignoreLineBreak = context.schema.space === "html" && parent.type === "element" && tableElements.has(parent.tagName.toLowerCase());
  189657. while (++index2 < children.length) {
  189658. const child = children[index2];
  189659. if (ignoreLineBreak && child.type === "text" && child.value === "\n") {
  189660. continue;
  189661. }
  189662. const result = context.handle(child, context);
  189663. if (Array.isArray(result)) {
  189664. results.push(...result);
  189665. } else if (result) {
  189666. results.push(result);
  189667. }
  189668. }
  189669. return results;
  189670. }
  189671. function inherit(hast, esnode) {
  189672. const left = hast.data;
  189673. let right;
  189674. let key;
  189675. create4(hast, esnode);
  189676. if (left) {
  189677. for (key in left) {
  189678. if (own13.call(left, key) && key !== "estree") {
  189679. if (!right)
  189680. right = {};
  189681. right[key] = left[key];
  189682. }
  189683. }
  189684. if (right) {
  189685. esnode.data = right;
  189686. }
  189687. }
  189688. return esnode;
  189689. }
  189690. function create4(hast, esnode) {
  189691. const p = position2(hast);
  189692. if (p.start.line && p.start.offset !== void 0 && p.end.offset !== void 0) {
  189693. esnode.start = p.start.offset;
  189694. esnode.end = p.end.offset;
  189695. esnode.loc = {
  189696. start: { line: p.start.line, column: p.start.column - 1 },
  189697. end: { line: p.end.line, column: p.end.column - 1 }
  189698. };
  189699. esnode.range = [p.start.offset, p.end.offset];
  189700. }
  189701. return esnode;
  189702. }
  189703. var createJsxName = function(name2, attribute) {
  189704. if (!attribute && name2.includes(".")) {
  189705. const parts = name2.split(".");
  189706. let part = parts.shift();
  189707. let node = { type: "JSXIdentifier", name: part };
  189708. while (part = parts.shift()) {
  189709. node = {
  189710. type: "JSXMemberExpression",
  189711. object: node,
  189712. property: { type: "JSXIdentifier", name: part }
  189713. };
  189714. }
  189715. return node;
  189716. }
  189717. if (name2.includes(":")) {
  189718. const parts = name2.split(":");
  189719. return {
  189720. type: "JSXNamespacedName",
  189721. namespace: { type: "JSXIdentifier", name: parts[0] },
  189722. name: { type: "JSXIdentifier", name: parts[1] }
  189723. };
  189724. }
  189725. return { type: "JSXIdentifier", name: name2 };
  189726. };
  189727. function parseStyle(value, tagName) {
  189728. const result = {};
  189729. try {
  189730. (0, import_style_to_object.default)(value, iterator);
  189731. } catch (error) {
  189732. const exception = error;
  189733. exception.message = tagName + "[style]" + exception.message.slice("undefined".length);
  189734. throw error;
  189735. }
  189736. return result;
  189737. function iterator(name2, value2) {
  189738. if (name2.slice(0, 4) === "-ms-")
  189739. name2 = "ms-" + name2.slice(4);
  189740. result[name2.replace(/-([a-z])/g, styleReplacer)] = value2;
  189741. }
  189742. }
  189743. function styleReplacer(_, $1) {
  189744. return $1.toUpperCase();
  189745. }
  189746. function jsxIdentifierName(name2) {
  189747. let index2 = -1;
  189748. while (++index2 < name2.length) {
  189749. if (!(index2 ? cont3 : start2)(name2.charCodeAt(index2)))
  189750. return false;
  189751. }
  189752. return index2 > 0;
  189753. function cont3(code2) {
  189754. return cont2(code2) || code2 === 45;
  189755. }
  189756. }
  189757. // node_modules/@mdx-js/mdx/lib/plugin/rehype-recma.js
  189758. function rehypeRecma() {
  189759. return (tree) => toEstree(tree);
  189760. }
  189761. // node_modules/@mdx-js/mdx/lib/plugin/rehype-remove-raw.js
  189762. function rehypeRemoveRaw() {
  189763. return (tree) => {
  189764. visit2(tree, "raw", (_, index2, parent) => {
  189765. if (parent && typeof index2 === "number") {
  189766. parent.children.splice(index2, 1);
  189767. return index2;
  189768. }
  189769. });
  189770. };
  189771. }
  189772. // node_modules/@mdx-js/mdx/lib/plugin/remark-mark-and-unravel.js
  189773. function remarkMarkAndUnravel() {
  189774. return (tree) => {
  189775. visit2(tree, (node, index2, parent_) => {
  189776. const parent = parent_;
  189777. let offset2 = -1;
  189778. let all4 = true;
  189779. let oneOrMore;
  189780. if (parent && typeof index2 === "number" && node.type === "paragraph") {
  189781. const children = node.children;
  189782. while (++offset2 < children.length) {
  189783. const child = children[offset2];
  189784. if (child.type === "mdxJsxTextElement" || child.type === "mdxTextExpression") {
  189785. oneOrMore = true;
  189786. } else if (child.type === "text" && /^[\t\r\n ]+$/.test(String(child.value))) {
  189787. } else {
  189788. all4 = false;
  189789. break;
  189790. }
  189791. }
  189792. if (all4 && oneOrMore) {
  189793. offset2 = -1;
  189794. while (++offset2 < children.length) {
  189795. const child = children[offset2];
  189796. if (child.type === "mdxJsxTextElement") {
  189797. child.type = "mdxJsxFlowElement";
  189798. }
  189799. if (child.type === "mdxTextExpression") {
  189800. child.type = "mdxFlowExpression";
  189801. }
  189802. }
  189803. parent.children.splice(index2, 1, ...children);
  189804. return index2;
  189805. }
  189806. }
  189807. if (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") {
  189808. const data2 = node.data || (node.data = {});
  189809. data2._mdxExplicitJsx = true;
  189810. }
  189811. });
  189812. };
  189813. }
  189814. // node_modules/@mdx-js/mdx/lib/node-types.js
  189815. var nodeTypes = [
  189816. "mdxFlowExpression",
  189817. "mdxJsxFlowElement",
  189818. "mdxJsxTextElement",
  189819. "mdxTextExpression",
  189820. "mdxjsEsm"
  189821. ];
  189822. // node_modules/@mdx-js/mdx/lib/condition.js
  189823. var import_process2 = __toESM(require("process"), 1);
  189824. var development = import_process2.default.env.NODE_ENV === "development";
  189825. // node_modules/@mdx-js/mdx/lib/core.js
  189826. var removedOptions = [
  189827. "filepath",
  189828. "compilers",
  189829. "hastPlugins",
  189830. "mdPlugins",
  189831. "skipExport",
  189832. "wrapExport"
  189833. ];
  189834. function createProcessor(options = {}) {
  189835. const {
  189836. development: development2 = development,
  189837. jsx,
  189838. format,
  189839. outputFormat,
  189840. providerImportSource,
  189841. recmaPlugins,
  189842. rehypePlugins,
  189843. remarkPlugins,
  189844. SourceMapGenerator,
  189845. ...rest
  189846. } = options;
  189847. let index2 = -1;
  189848. while (++index2 < removedOptions.length) {
  189849. const key = removedOptions[index2];
  189850. if (key in options) {
  189851. throw new Error(
  189852. "`options." + key + "` is no longer supported. Please see <https://mdxjs.com/migrating/v2/> for more information"
  189853. );
  189854. }
  189855. }
  189856. if (format === "detect") {
  189857. throw new Error(
  189858. "Incorrect `format: 'detect'`: `createProcessor` can support either `md` or `mdx`; it does not support detecting the format"
  189859. );
  189860. }
  189861. const pipeline = unified().use(remark_parse_default);
  189862. if (format !== "md") {
  189863. pipeline.use(remarkMdx);
  189864. }
  189865. pipeline.use(remarkMarkAndUnravel).use(remarkPlugins || []).use(lib_default, { allowDangerousHtml: true, passThrough: nodeTypes }).use(rehypePlugins || []);
  189866. if (format === "md") {
  189867. pipeline.use(rehypeRemoveRaw);
  189868. }
  189869. pipeline.use(rehypeRecma).use(recmaDocument, { ...rest, outputFormat }).use(recmaJsxRewrite, { development: development2, providerImportSource, outputFormat });
  189870. if (!jsx) {
  189871. pipeline.use(recmaJsxBuild, { outputFormat });
  189872. }
  189873. pipeline.use(recmaStringify, { SourceMapGenerator }).use(recmaPlugins || []);
  189874. return pipeline;
  189875. }
  189876. // node_modules/@mdx-js/mdx/lib/util/extnames.js
  189877. var import_markdown_extensions = __toESM(require_markdown_extensions2(), 1);
  189878. var md = import_markdown_extensions.default.map((d) => "." + d);
  189879. // node_modules/@mdx-js/mdx/lib/util/resolve-file-and-options.js
  189880. function resolveFileAndOptions(vfileCompatible, options) {
  189881. const file = looksLikeAVFile2(vfileCompatible) ? vfileCompatible : new VFile(vfileCompatible);
  189882. const { format, ...rest } = options || {};
  189883. return {
  189884. file,
  189885. options: {
  189886. format: format === "md" || format === "mdx" ? format : file.extname && (rest.mdExtensions || md).includes(file.extname) ? "md" : "mdx",
  189887. ...rest
  189888. }
  189889. };
  189890. }
  189891. function looksLikeAVFile2(value) {
  189892. return Boolean(
  189893. value && typeof value === "object" && "message" in value && "messages" in value
  189894. );
  189895. }
  189896. // node_modules/@mdx-js/mdx/lib/compile.js
  189897. function compileSync(vfileCompatible, compileOptions) {
  189898. const { file, options } = resolveFileAndOptions(vfileCompatible, compileOptions);
  189899. return createProcessor(options).processSync(file);
  189900. }
  189901. // src/analyze.ts
  189902. var import_cloneDeep = __toESM(require_cloneDeep8());
  189903. var getAttr = (elt, what) => {
  189904. const attr = elt.attributes.find((n) => n.name.name === what);
  189905. return attr;
  189906. };
  189907. var getAttrValue = (elt, what) => {
  189908. return getAttr(elt, what)?.value;
  189909. };
  189910. var extractTitle = (root3, varToImport) => {
  189911. const result = { title: void 0, of: void 0, name: void 0, isTemplate: false };
  189912. let contents;
  189913. root3.program.body.forEach((child) => {
  189914. if (t.isExpressionStatement(child) && t.isJSXFragment(child.expression)) {
  189915. if (contents)
  189916. throw new Error("duplicate contents");
  189917. contents = child;
  189918. }
  189919. });
  189920. if (contents) {
  189921. const jsx = contents.expression;
  189922. jsx.children.forEach((child) => {
  189923. if (t.isJSXElement(child)) {
  189924. if (t.isJSXIdentifier(child.openingElement.name)) {
  189925. const name2 = child.openingElement.name.name;
  189926. if (name2 === "Meta") {
  189927. if (result.title || result.name || result.of) {
  189928. throw new Error("Meta can only be declared once");
  189929. }
  189930. const titleAttrValue = getAttrValue(child.openingElement, "title");
  189931. if (titleAttrValue) {
  189932. if (t.isStringLiteral(titleAttrValue)) {
  189933. result.title = titleAttrValue.value;
  189934. } else {
  189935. throw new Error(`Expected string literal title, received ${titleAttrValue.type}`);
  189936. }
  189937. }
  189938. const nameAttrValue = getAttrValue(child.openingElement, "name");
  189939. if (nameAttrValue) {
  189940. if (t.isStringLiteral(nameAttrValue)) {
  189941. result.name = nameAttrValue.value;
  189942. } else {
  189943. throw new Error(`Expected string literal name, received ${nameAttrValue.type}`);
  189944. }
  189945. }
  189946. const ofAttrValue = getAttrValue(child.openingElement, "of");
  189947. if (ofAttrValue) {
  189948. if (t.isJSXExpressionContainer(ofAttrValue)) {
  189949. const of = ofAttrValue.expression;
  189950. if (t.isIdentifier(of)) {
  189951. const importName = varToImport[of.name];
  189952. if (importName) {
  189953. result.of = importName;
  189954. } else {
  189955. throw new Error(`Unknown identifier ${of.name}`);
  189956. }
  189957. } else {
  189958. throw new Error(`Expected identifier, received ${of.type}`);
  189959. }
  189960. } else {
  189961. throw new Error(`Expected JSX expression, received ${ofAttrValue.type}`);
  189962. }
  189963. }
  189964. const isTemplateAttr = getAttr(child.openingElement, "isTemplate");
  189965. if (isTemplateAttr) {
  189966. if (!isTemplateAttr.value) {
  189967. result.isTemplate = true;
  189968. } else if (t.isJSXExpressionContainer(isTemplateAttr.value)) {
  189969. const isTemplate = isTemplateAttr.value.expression;
  189970. if (t.isBooleanLiteral(isTemplate)) {
  189971. result.isTemplate = isTemplate.value;
  189972. } else {
  189973. throw new Error(`Expected boolean isTemplate, received ${isTemplate.type}`);
  189974. }
  189975. } else {
  189976. throw new Error(
  189977. `Expected JSX expression isTemplate, received ${isTemplateAttr.value.type}`
  189978. );
  189979. }
  189980. }
  189981. }
  189982. }
  189983. } else if (t.isJSXExpressionContainer(child)) {
  189984. } else {
  189985. throw new Error(`Unexpected JSX child: ${child.type}`);
  189986. }
  189987. });
  189988. }
  189989. return result;
  189990. };
  189991. var getTraverse = (input) => {
  189992. switch (true) {
  189993. case typeof input === "function": {
  189994. return input;
  189995. }
  189996. case typeof input.traverse === "function": {
  189997. return input.traverse;
  189998. }
  189999. case typeof input.default === "function": {
  190000. return input.default;
  190001. }
  190002. case typeof input.default.default === "function": {
  190003. return input.default.default;
  190004. }
  190005. default: {
  190006. throw new Error(`Unable to get traverse function from ${input}`);
  190007. }
  190008. }
  190009. };
  190010. var extractImports = (root3) => {
  190011. const varToImport = {};
  190012. getTraverse(babelTraverse)(root3, {
  190013. ImportDeclaration: {
  190014. enter({ node }) {
  190015. const { source, specifiers } = node;
  190016. if (t.isStringLiteral(source)) {
  190017. specifiers.forEach((s) => {
  190018. varToImport[s.local.name] = source.value;
  190019. });
  190020. } else {
  190021. throw new Error("MDX: unexpected import source");
  190022. }
  190023. }
  190024. }
  190025. });
  190026. return varToImport;
  190027. };
  190028. var plugin = (store) => (root3) => {
  190029. const estree = store.toEstree(root3);
  190030. const clone = (0, import_cloneDeep.default)(estree);
  190031. const babel = (0, import_estree_to_babel.default)(clone);
  190032. const varToImport = extractImports(babel);
  190033. const { title, of, name: name2, isTemplate } = extractTitle(babel, varToImport);
  190034. store.title = title;
  190035. store.of = of;
  190036. store.name = name2;
  190037. store.isTemplate = isTemplate;
  190038. store.imports = Array.from(new Set(Object.values(varToImport)));
  190039. return root3;
  190040. };
  190041. var analyze2 = (code2) => {
  190042. const store = {
  190043. title: void 0,
  190044. of: void 0,
  190045. name: void 0,
  190046. isTemplate: false,
  190047. imports: void 0,
  190048. toEstree
  190049. };
  190050. compileSync(code2, {
  190051. rehypePlugins: [[plugin, store]]
  190052. });
  190053. const { title, of, name: name2, isTemplate, imports = [] } = store;
  190054. return { title, of, name: name2, isTemplate, imports };
  190055. };
  190056. // Annotate the CommonJS export names for ESM import in node:
  190057. 0 && (module.exports = {
  190058. analyze,
  190059. extractImports,
  190060. plugin
  190061. });
  190062. /*!
  190063. * Determine if an object is a Buffer
  190064. *
  190065. * @author Feross Aboukhadijeh <https://feross.org>
  190066. * @license MIT
  190067. */