internal.mjs 226 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531
  1. import { createRequire as __prettierCreateRequire } from "module";
  2. import { fileURLToPath as __prettierFileUrlToPath } from "url";
  3. import { dirname as __prettierDirname } from "path";
  4. const require = __prettierCreateRequire(import.meta.url);
  5. const __filename = __prettierFileUrlToPath(import.meta.url);
  6. const __dirname = __prettierDirname(__filename);
  7. var __create = Object.create;
  8. var __defProp = Object.defineProperty;
  9. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  10. var __getOwnPropNames = Object.getOwnPropertyNames;
  11. var __getProtoOf = Object.getPrototypeOf;
  12. var __hasOwnProp = Object.prototype.hasOwnProperty;
  13. var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
  14. get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
  15. }) : x)(function(x) {
  16. if (typeof require !== "undefined")
  17. return require.apply(this, arguments);
  18. throw Error('Dynamic require of "' + x + '" is not supported');
  19. });
  20. var __commonJS = (cb, mod) => function __require2() {
  21. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  22. };
  23. var __copyProps = (to, from, except, desc) => {
  24. if (from && typeof from === "object" || typeof from === "function") {
  25. for (let key of __getOwnPropNames(from))
  26. if (!__hasOwnProp.call(to, key) && key !== except)
  27. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  28. }
  29. return to;
  30. };
  31. var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  32. // If the importer is in node compatibility mode or this is not an ESM
  33. // file that has been converted to a CommonJS file using a Babel-
  34. // compatible transform (i.e. "__esModule" has not been set), then set
  35. // "default" to the CommonJS "module.exports" for node compatibility.
  36. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  37. mod
  38. ));
  39. // node_modules/cosmiconfig/dist/cacheWrapper.js
  40. var require_cacheWrapper = __commonJS({
  41. "node_modules/cosmiconfig/dist/cacheWrapper.js"(exports) {
  42. "use strict";
  43. Object.defineProperty(exports, "__esModule", {
  44. value: true
  45. });
  46. exports.cacheWrapper = cacheWrapper;
  47. exports.cacheWrapperSync = cacheWrapperSync;
  48. async function cacheWrapper(cache, key, fn) {
  49. const cached = cache.get(key);
  50. if (cached !== void 0) {
  51. return cached;
  52. }
  53. const result = await fn();
  54. cache.set(key, result);
  55. return result;
  56. }
  57. function cacheWrapperSync(cache, key, fn) {
  58. const cached = cache.get(key);
  59. if (cached !== void 0) {
  60. return cached;
  61. }
  62. const result = fn();
  63. cache.set(key, result);
  64. return result;
  65. }
  66. }
  67. });
  68. // node_modules/cosmiconfig/dist/getPropertyByPath.js
  69. var require_getPropertyByPath = __commonJS({
  70. "node_modules/cosmiconfig/dist/getPropertyByPath.js"(exports) {
  71. "use strict";
  72. Object.defineProperty(exports, "__esModule", {
  73. value: true
  74. });
  75. exports.getPropertyByPath = getPropertyByPath;
  76. function getPropertyByPath(source, path) {
  77. if (typeof path === "string" && Object.prototype.hasOwnProperty.call(source, path)) {
  78. return source[path];
  79. }
  80. const parsedPath = typeof path === "string" ? path.split(".") : path;
  81. return parsedPath.reduce((previous, key) => {
  82. if (previous === void 0) {
  83. return previous;
  84. }
  85. return previous[key];
  86. }, source);
  87. }
  88. }
  89. });
  90. // node_modules/import-fresh/node_modules/resolve-from/index.js
  91. var require_resolve_from = __commonJS({
  92. "node_modules/import-fresh/node_modules/resolve-from/index.js"(exports, module) {
  93. "use strict";
  94. var path = __require("path");
  95. var Module = __require("module");
  96. var fs2 = __require("fs");
  97. var resolveFrom = (fromDir, moduleId, silent) => {
  98. if (typeof fromDir !== "string") {
  99. throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``);
  100. }
  101. if (typeof moduleId !== "string") {
  102. throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``);
  103. }
  104. try {
  105. fromDir = fs2.realpathSync(fromDir);
  106. } catch (err) {
  107. if (err.code === "ENOENT") {
  108. fromDir = path.resolve(fromDir);
  109. } else if (silent) {
  110. return null;
  111. } else {
  112. throw err;
  113. }
  114. }
  115. const fromFile = path.join(fromDir, "noop.js");
  116. const resolveFileName = () => Module._resolveFilename(moduleId, {
  117. id: fromFile,
  118. filename: fromFile,
  119. paths: Module._nodeModulePaths(fromDir)
  120. });
  121. if (silent) {
  122. try {
  123. return resolveFileName();
  124. } catch (err) {
  125. return null;
  126. }
  127. }
  128. return resolveFileName();
  129. };
  130. module.exports = (fromDir, moduleId) => resolveFrom(fromDir, moduleId);
  131. module.exports.silent = (fromDir, moduleId) => resolveFrom(fromDir, moduleId, true);
  132. }
  133. });
  134. // scripts/build/shims/parent-module.cjs
  135. var require_parent_module = __commonJS({
  136. "scripts/build/shims/parent-module.cjs"(exports, module) {
  137. "use strict";
  138. var parentModule = (file) => file;
  139. module.exports = parentModule;
  140. }
  141. });
  142. // node_modules/import-fresh/index.js
  143. var require_import_fresh = __commonJS({
  144. "node_modules/import-fresh/index.js"(exports, module) {
  145. "use strict";
  146. var path = __require("path");
  147. var resolveFrom = require_resolve_from();
  148. var parentModule = require_parent_module();
  149. module.exports = (moduleId) => {
  150. if (typeof moduleId !== "string") {
  151. throw new TypeError("Expected a string");
  152. }
  153. const parentPath = parentModule(__filename);
  154. const cwd = parentPath ? path.dirname(parentPath) : __dirname;
  155. const filePath = resolveFrom(cwd, moduleId);
  156. const oldModule = __require.cache[filePath];
  157. if (oldModule && oldModule.parent) {
  158. let i = oldModule.parent.children.length;
  159. while (i--) {
  160. if (oldModule.parent.children[i].id === filePath) {
  161. oldModule.parent.children.splice(i, 1);
  162. }
  163. }
  164. }
  165. delete __require.cache[filePath];
  166. const parent = __require.cache[parentPath];
  167. return parent === void 0 ? __require(filePath) : parent.require(filePath);
  168. };
  169. }
  170. });
  171. // node_modules/is-arrayish/index.js
  172. var require_is_arrayish = __commonJS({
  173. "node_modules/is-arrayish/index.js"(exports, module) {
  174. "use strict";
  175. module.exports = function isArrayish(obj) {
  176. if (!obj) {
  177. return false;
  178. }
  179. return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function;
  180. };
  181. }
  182. });
  183. // node_modules/error-ex/index.js
  184. var require_error_ex = __commonJS({
  185. "node_modules/error-ex/index.js"(exports, module) {
  186. "use strict";
  187. var util = __require("util");
  188. var isArrayish = require_is_arrayish();
  189. var errorEx = function errorEx2(name, properties) {
  190. if (!name || name.constructor !== String) {
  191. properties = name || {};
  192. name = Error.name;
  193. }
  194. var errorExError = function ErrorEXError(message) {
  195. if (!this) {
  196. return new ErrorEXError(message);
  197. }
  198. message = message instanceof Error ? message.message : message || this.message;
  199. Error.call(this, message);
  200. Error.captureStackTrace(this, errorExError);
  201. this.name = name;
  202. Object.defineProperty(this, "message", {
  203. configurable: true,
  204. enumerable: false,
  205. get: function() {
  206. var newMessage = message.split(/\r?\n/g);
  207. for (var key in properties) {
  208. if (!properties.hasOwnProperty(key)) {
  209. continue;
  210. }
  211. var modifier = properties[key];
  212. if ("message" in modifier) {
  213. newMessage = modifier.message(this[key], newMessage) || newMessage;
  214. if (!isArrayish(newMessage)) {
  215. newMessage = [newMessage];
  216. }
  217. }
  218. }
  219. return newMessage.join("\n");
  220. },
  221. set: function(v) {
  222. message = v;
  223. }
  224. });
  225. var overwrittenStack = null;
  226. var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack");
  227. var stackGetter = stackDescriptor.get;
  228. var stackValue = stackDescriptor.value;
  229. delete stackDescriptor.value;
  230. delete stackDescriptor.writable;
  231. stackDescriptor.set = function(newstack) {
  232. overwrittenStack = newstack;
  233. };
  234. stackDescriptor.get = function() {
  235. var stack = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g);
  236. if (!overwrittenStack) {
  237. stack[0] = this.name + ": " + this.message;
  238. }
  239. var lineCount = 1;
  240. for (var key in properties) {
  241. if (!properties.hasOwnProperty(key)) {
  242. continue;
  243. }
  244. var modifier = properties[key];
  245. if ("line" in modifier) {
  246. var line = modifier.line(this[key]);
  247. if (line) {
  248. stack.splice(lineCount++, 0, " " + line);
  249. }
  250. }
  251. if ("stack" in modifier) {
  252. modifier.stack(this[key], stack);
  253. }
  254. }
  255. return stack.join("\n");
  256. };
  257. Object.defineProperty(this, "stack", stackDescriptor);
  258. };
  259. if (Object.setPrototypeOf) {
  260. Object.setPrototypeOf(errorExError.prototype, Error.prototype);
  261. Object.setPrototypeOf(errorExError, Error);
  262. } else {
  263. util.inherits(errorExError, Error);
  264. }
  265. return errorExError;
  266. };
  267. errorEx.append = function(str, def) {
  268. return {
  269. message: function(v, message) {
  270. v = v || def;
  271. if (v) {
  272. message[0] += " " + str.replace("%s", v.toString());
  273. }
  274. return message;
  275. }
  276. };
  277. };
  278. errorEx.line = function(str, def) {
  279. return {
  280. line: function(v) {
  281. v = v || def;
  282. if (v) {
  283. return str.replace("%s", v.toString());
  284. }
  285. return null;
  286. }
  287. };
  288. };
  289. module.exports = errorEx;
  290. }
  291. });
  292. // node_modules/json-parse-even-better-errors/index.js
  293. var require_json_parse_even_better_errors = __commonJS({
  294. "node_modules/json-parse-even-better-errors/index.js"(exports, module) {
  295. "use strict";
  296. var hexify = (char) => {
  297. const h = char.charCodeAt(0).toString(16).toUpperCase();
  298. return "0x" + (h.length % 2 ? "0" : "") + h;
  299. };
  300. var parseError = (e, txt, context) => {
  301. if (!txt) {
  302. return {
  303. message: e.message + " while parsing empty string",
  304. position: 0
  305. };
  306. }
  307. const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);
  308. const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null;
  309. const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message;
  310. if (errIdx !== null && errIdx !== void 0) {
  311. const start = errIdx <= context ? 0 : errIdx - context;
  312. const end = errIdx + context >= txt.length ? txt.length : errIdx + context;
  313. const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "...");
  314. const near = txt === slice ? "" : "near ";
  315. return {
  316. message: msg + ` while parsing ${near}${JSON.stringify(slice)}`,
  317. position: errIdx
  318. };
  319. } else {
  320. return {
  321. message: msg + ` while parsing '${txt.slice(0, context * 2)}'`,
  322. position: 0
  323. };
  324. }
  325. };
  326. var JSONParseError = class extends SyntaxError {
  327. constructor(er, txt, context, caller) {
  328. context = context || 20;
  329. const metadata = parseError(er, txt, context);
  330. super(metadata.message);
  331. Object.assign(this, metadata);
  332. this.code = "EJSONPARSE";
  333. this.systemError = er;
  334. Error.captureStackTrace(this, caller || this.constructor);
  335. }
  336. get name() {
  337. return this.constructor.name;
  338. }
  339. set name(n) {
  340. }
  341. get [Symbol.toStringTag]() {
  342. return this.constructor.name;
  343. }
  344. };
  345. var kIndent = Symbol.for("indent");
  346. var kNewline = Symbol.for("newline");
  347. var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;
  348. var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
  349. var parseJson = (txt, reviver, context) => {
  350. const parseText = stripBOM(txt);
  351. context = context || 20;
  352. try {
  353. const [, newline = "\n", indent = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [, "", ""];
  354. const result = JSON.parse(parseText, reviver);
  355. if (result && typeof result === "object") {
  356. result[kNewline] = newline;
  357. result[kIndent] = indent;
  358. }
  359. return result;
  360. } catch (e) {
  361. if (typeof txt !== "string" && !Buffer.isBuffer(txt)) {
  362. const isEmptyArray = Array.isArray(txt) && txt.length === 0;
  363. throw Object.assign(new TypeError(
  364. `Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}`
  365. ), {
  366. code: "EJSONPARSE",
  367. systemError: e
  368. });
  369. }
  370. throw new JSONParseError(e, parseText, context, parseJson);
  371. }
  372. };
  373. var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, "");
  374. module.exports = parseJson;
  375. parseJson.JSONParseError = JSONParseError;
  376. parseJson.noExceptions = (txt, reviver) => {
  377. try {
  378. return JSON.parse(stripBOM(txt), reviver);
  379. } catch (e) {
  380. }
  381. };
  382. }
  383. });
  384. // node_modules/parse-json/node_modules/lines-and-columns/build/index.js
  385. var require_build = __commonJS({
  386. "node_modules/parse-json/node_modules/lines-and-columns/build/index.js"(exports) {
  387. "use strict";
  388. exports.__esModule = true;
  389. exports.LinesAndColumns = void 0;
  390. var LF = "\n";
  391. var CR = "\r";
  392. var LinesAndColumns = (
  393. /** @class */
  394. function() {
  395. function LinesAndColumns2(string) {
  396. this.string = string;
  397. var offsets = [0];
  398. for (var offset = 0; offset < string.length; ) {
  399. switch (string[offset]) {
  400. case LF:
  401. offset += LF.length;
  402. offsets.push(offset);
  403. break;
  404. case CR:
  405. offset += CR.length;
  406. if (string[offset] === LF) {
  407. offset += LF.length;
  408. }
  409. offsets.push(offset);
  410. break;
  411. default:
  412. offset++;
  413. break;
  414. }
  415. }
  416. this.offsets = offsets;
  417. }
  418. LinesAndColumns2.prototype.locationForIndex = function(index) {
  419. if (index < 0 || index > this.string.length) {
  420. return null;
  421. }
  422. var line = 0;
  423. var offsets = this.offsets;
  424. while (offsets[line + 1] <= index) {
  425. line++;
  426. }
  427. var column = index - offsets[line];
  428. return { line, column };
  429. };
  430. LinesAndColumns2.prototype.indexForLocation = function(location) {
  431. var line = location.line, column = location.column;
  432. if (line < 0 || line >= this.offsets.length) {
  433. return null;
  434. }
  435. if (column < 0 || column > this.lengthOfLine(line)) {
  436. return null;
  437. }
  438. return this.offsets[line] + column;
  439. };
  440. LinesAndColumns2.prototype.lengthOfLine = function(line) {
  441. var offset = this.offsets[line];
  442. var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1];
  443. return nextOffset - offset;
  444. };
  445. return LinesAndColumns2;
  446. }()
  447. );
  448. exports.LinesAndColumns = LinesAndColumns;
  449. exports["default"] = LinesAndColumns;
  450. }
  451. });
  452. // node_modules/js-tokens/index.js
  453. var require_js_tokens = __commonJS({
  454. "node_modules/js-tokens/index.js"(exports) {
  455. Object.defineProperty(exports, "__esModule", {
  456. value: true
  457. });
  458. 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;
  459. exports.matchToToken = function(match) {
  460. var token = { type: "invalid", value: match[0], closed: void 0 };
  461. if (match[1])
  462. token.type = "string", token.closed = !!(match[3] || match[4]);
  463. else if (match[5])
  464. token.type = "comment";
  465. else if (match[6])
  466. token.type = "comment", token.closed = !!match[7];
  467. else if (match[8])
  468. token.type = "regex";
  469. else if (match[9])
  470. token.type = "number";
  471. else if (match[10])
  472. token.type = "name";
  473. else if (match[11])
  474. token.type = "punctuator";
  475. else if (match[12])
  476. token.type = "whitespace";
  477. return token;
  478. };
  479. }
  480. });
  481. // node_modules/@babel/helper-validator-identifier/lib/identifier.js
  482. var require_identifier = __commonJS({
  483. "node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  484. "use strict";
  485. Object.defineProperty(exports, "__esModule", {
  486. value: true
  487. });
  488. exports.isIdentifierChar = isIdentifierChar;
  489. exports.isIdentifierName = isIdentifierName;
  490. exports.isIdentifierStart = isIdentifierStart;
  491. 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";
  492. 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\u0CF3\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-\u0ECE\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";
  493. var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
  494. var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
  495. nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
  496. 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, 20, 1, 64, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 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, 16, 0, 30, 2, 3, 0, 15, 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, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 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, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191];
  497. 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, 81, 2, 71, 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, 3, 0, 158, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  498. function isInAstralSet(code, set) {
  499. let pos = 65536;
  500. for (let i = 0, length = set.length; i < length; i += 2) {
  501. pos += set[i];
  502. if (pos > code)
  503. return false;
  504. pos += set[i + 1];
  505. if (pos >= code)
  506. return true;
  507. }
  508. return false;
  509. }
  510. function isIdentifierStart(code) {
  511. if (code < 65)
  512. return code === 36;
  513. if (code <= 90)
  514. return true;
  515. if (code < 97)
  516. return code === 95;
  517. if (code <= 122)
  518. return true;
  519. if (code <= 65535) {
  520. return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
  521. }
  522. return isInAstralSet(code, astralIdentifierStartCodes);
  523. }
  524. function isIdentifierChar(code) {
  525. if (code < 48)
  526. return code === 36;
  527. if (code < 58)
  528. return true;
  529. if (code < 65)
  530. return false;
  531. if (code <= 90)
  532. return true;
  533. if (code < 97)
  534. return code === 95;
  535. if (code <= 122)
  536. return true;
  537. if (code <= 65535) {
  538. return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
  539. }
  540. return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
  541. }
  542. function isIdentifierName(name) {
  543. let isFirst = true;
  544. for (let i = 0; i < name.length; i++) {
  545. let cp = name.charCodeAt(i);
  546. if ((cp & 64512) === 55296 && i + 1 < name.length) {
  547. const trail = name.charCodeAt(++i);
  548. if ((trail & 64512) === 56320) {
  549. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  550. }
  551. }
  552. if (isFirst) {
  553. isFirst = false;
  554. if (!isIdentifierStart(cp)) {
  555. return false;
  556. }
  557. } else if (!isIdentifierChar(cp)) {
  558. return false;
  559. }
  560. }
  561. return !isFirst;
  562. }
  563. }
  564. });
  565. // node_modules/@babel/helper-validator-identifier/lib/keyword.js
  566. var require_keyword = __commonJS({
  567. "node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  568. "use strict";
  569. Object.defineProperty(exports, "__esModule", {
  570. value: true
  571. });
  572. exports.isKeyword = isKeyword;
  573. exports.isReservedWord = isReservedWord;
  574. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  575. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  576. exports.isStrictReservedWord = isStrictReservedWord;
  577. var reservedWords = {
  578. 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"],
  579. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  580. strictBind: ["eval", "arguments"]
  581. };
  582. var keywords = new Set(reservedWords.keyword);
  583. var reservedWordsStrictSet = new Set(reservedWords.strict);
  584. var reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
  585. function isReservedWord(word, inModule) {
  586. return inModule && word === "await" || word === "enum";
  587. }
  588. function isStrictReservedWord(word, inModule) {
  589. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  590. }
  591. function isStrictBindOnlyReservedWord(word) {
  592. return reservedWordsStrictBindSet.has(word);
  593. }
  594. function isStrictBindReservedWord(word, inModule) {
  595. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  596. }
  597. function isKeyword(word) {
  598. return keywords.has(word);
  599. }
  600. }
  601. });
  602. // node_modules/@babel/helper-validator-identifier/lib/index.js
  603. var require_lib = __commonJS({
  604. "node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  605. "use strict";
  606. Object.defineProperty(exports, "__esModule", {
  607. value: true
  608. });
  609. Object.defineProperty(exports, "isIdentifierChar", {
  610. enumerable: true,
  611. get: function() {
  612. return _identifier.isIdentifierChar;
  613. }
  614. });
  615. Object.defineProperty(exports, "isIdentifierName", {
  616. enumerable: true,
  617. get: function() {
  618. return _identifier.isIdentifierName;
  619. }
  620. });
  621. Object.defineProperty(exports, "isIdentifierStart", {
  622. enumerable: true,
  623. get: function() {
  624. return _identifier.isIdentifierStart;
  625. }
  626. });
  627. Object.defineProperty(exports, "isKeyword", {
  628. enumerable: true,
  629. get: function() {
  630. return _keyword.isKeyword;
  631. }
  632. });
  633. Object.defineProperty(exports, "isReservedWord", {
  634. enumerable: true,
  635. get: function() {
  636. return _keyword.isReservedWord;
  637. }
  638. });
  639. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  640. enumerable: true,
  641. get: function() {
  642. return _keyword.isStrictBindOnlyReservedWord;
  643. }
  644. });
  645. Object.defineProperty(exports, "isStrictBindReservedWord", {
  646. enumerable: true,
  647. get: function() {
  648. return _keyword.isStrictBindReservedWord;
  649. }
  650. });
  651. Object.defineProperty(exports, "isStrictReservedWord", {
  652. enumerable: true,
  653. get: function() {
  654. return _keyword.isStrictReservedWord;
  655. }
  656. });
  657. var _identifier = require_identifier();
  658. var _keyword = require_keyword();
  659. }
  660. });
  661. // node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js
  662. var require_escape_string_regexp = __commonJS({
  663. "node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js"(exports, module) {
  664. "use strict";
  665. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  666. module.exports = function(str) {
  667. if (typeof str !== "string") {
  668. throw new TypeError("Expected a string");
  669. }
  670. return str.replace(matchOperatorsRe, "\\$&");
  671. };
  672. }
  673. });
  674. // node_modules/color-name/index.js
  675. var require_color_name = __commonJS({
  676. "node_modules/color-name/index.js"(exports, module) {
  677. "use strict";
  678. module.exports = {
  679. "aliceblue": [240, 248, 255],
  680. "antiquewhite": [250, 235, 215],
  681. "aqua": [0, 255, 255],
  682. "aquamarine": [127, 255, 212],
  683. "azure": [240, 255, 255],
  684. "beige": [245, 245, 220],
  685. "bisque": [255, 228, 196],
  686. "black": [0, 0, 0],
  687. "blanchedalmond": [255, 235, 205],
  688. "blue": [0, 0, 255],
  689. "blueviolet": [138, 43, 226],
  690. "brown": [165, 42, 42],
  691. "burlywood": [222, 184, 135],
  692. "cadetblue": [95, 158, 160],
  693. "chartreuse": [127, 255, 0],
  694. "chocolate": [210, 105, 30],
  695. "coral": [255, 127, 80],
  696. "cornflowerblue": [100, 149, 237],
  697. "cornsilk": [255, 248, 220],
  698. "crimson": [220, 20, 60],
  699. "cyan": [0, 255, 255],
  700. "darkblue": [0, 0, 139],
  701. "darkcyan": [0, 139, 139],
  702. "darkgoldenrod": [184, 134, 11],
  703. "darkgray": [169, 169, 169],
  704. "darkgreen": [0, 100, 0],
  705. "darkgrey": [169, 169, 169],
  706. "darkkhaki": [189, 183, 107],
  707. "darkmagenta": [139, 0, 139],
  708. "darkolivegreen": [85, 107, 47],
  709. "darkorange": [255, 140, 0],
  710. "darkorchid": [153, 50, 204],
  711. "darkred": [139, 0, 0],
  712. "darksalmon": [233, 150, 122],
  713. "darkseagreen": [143, 188, 143],
  714. "darkslateblue": [72, 61, 139],
  715. "darkslategray": [47, 79, 79],
  716. "darkslategrey": [47, 79, 79],
  717. "darkturquoise": [0, 206, 209],
  718. "darkviolet": [148, 0, 211],
  719. "deeppink": [255, 20, 147],
  720. "deepskyblue": [0, 191, 255],
  721. "dimgray": [105, 105, 105],
  722. "dimgrey": [105, 105, 105],
  723. "dodgerblue": [30, 144, 255],
  724. "firebrick": [178, 34, 34],
  725. "floralwhite": [255, 250, 240],
  726. "forestgreen": [34, 139, 34],
  727. "fuchsia": [255, 0, 255],
  728. "gainsboro": [220, 220, 220],
  729. "ghostwhite": [248, 248, 255],
  730. "gold": [255, 215, 0],
  731. "goldenrod": [218, 165, 32],
  732. "gray": [128, 128, 128],
  733. "green": [0, 128, 0],
  734. "greenyellow": [173, 255, 47],
  735. "grey": [128, 128, 128],
  736. "honeydew": [240, 255, 240],
  737. "hotpink": [255, 105, 180],
  738. "indianred": [205, 92, 92],
  739. "indigo": [75, 0, 130],
  740. "ivory": [255, 255, 240],
  741. "khaki": [240, 230, 140],
  742. "lavender": [230, 230, 250],
  743. "lavenderblush": [255, 240, 245],
  744. "lawngreen": [124, 252, 0],
  745. "lemonchiffon": [255, 250, 205],
  746. "lightblue": [173, 216, 230],
  747. "lightcoral": [240, 128, 128],
  748. "lightcyan": [224, 255, 255],
  749. "lightgoldenrodyellow": [250, 250, 210],
  750. "lightgray": [211, 211, 211],
  751. "lightgreen": [144, 238, 144],
  752. "lightgrey": [211, 211, 211],
  753. "lightpink": [255, 182, 193],
  754. "lightsalmon": [255, 160, 122],
  755. "lightseagreen": [32, 178, 170],
  756. "lightskyblue": [135, 206, 250],
  757. "lightslategray": [119, 136, 153],
  758. "lightslategrey": [119, 136, 153],
  759. "lightsteelblue": [176, 196, 222],
  760. "lightyellow": [255, 255, 224],
  761. "lime": [0, 255, 0],
  762. "limegreen": [50, 205, 50],
  763. "linen": [250, 240, 230],
  764. "magenta": [255, 0, 255],
  765. "maroon": [128, 0, 0],
  766. "mediumaquamarine": [102, 205, 170],
  767. "mediumblue": [0, 0, 205],
  768. "mediumorchid": [186, 85, 211],
  769. "mediumpurple": [147, 112, 219],
  770. "mediumseagreen": [60, 179, 113],
  771. "mediumslateblue": [123, 104, 238],
  772. "mediumspringgreen": [0, 250, 154],
  773. "mediumturquoise": [72, 209, 204],
  774. "mediumvioletred": [199, 21, 133],
  775. "midnightblue": [25, 25, 112],
  776. "mintcream": [245, 255, 250],
  777. "mistyrose": [255, 228, 225],
  778. "moccasin": [255, 228, 181],
  779. "navajowhite": [255, 222, 173],
  780. "navy": [0, 0, 128],
  781. "oldlace": [253, 245, 230],
  782. "olive": [128, 128, 0],
  783. "olivedrab": [107, 142, 35],
  784. "orange": [255, 165, 0],
  785. "orangered": [255, 69, 0],
  786. "orchid": [218, 112, 214],
  787. "palegoldenrod": [238, 232, 170],
  788. "palegreen": [152, 251, 152],
  789. "paleturquoise": [175, 238, 238],
  790. "palevioletred": [219, 112, 147],
  791. "papayawhip": [255, 239, 213],
  792. "peachpuff": [255, 218, 185],
  793. "peru": [205, 133, 63],
  794. "pink": [255, 192, 203],
  795. "plum": [221, 160, 221],
  796. "powderblue": [176, 224, 230],
  797. "purple": [128, 0, 128],
  798. "rebeccapurple": [102, 51, 153],
  799. "red": [255, 0, 0],
  800. "rosybrown": [188, 143, 143],
  801. "royalblue": [65, 105, 225],
  802. "saddlebrown": [139, 69, 19],
  803. "salmon": [250, 128, 114],
  804. "sandybrown": [244, 164, 96],
  805. "seagreen": [46, 139, 87],
  806. "seashell": [255, 245, 238],
  807. "sienna": [160, 82, 45],
  808. "silver": [192, 192, 192],
  809. "skyblue": [135, 206, 235],
  810. "slateblue": [106, 90, 205],
  811. "slategray": [112, 128, 144],
  812. "slategrey": [112, 128, 144],
  813. "snow": [255, 250, 250],
  814. "springgreen": [0, 255, 127],
  815. "steelblue": [70, 130, 180],
  816. "tan": [210, 180, 140],
  817. "teal": [0, 128, 128],
  818. "thistle": [216, 191, 216],
  819. "tomato": [255, 99, 71],
  820. "turquoise": [64, 224, 208],
  821. "violet": [238, 130, 238],
  822. "wheat": [245, 222, 179],
  823. "white": [255, 255, 255],
  824. "whitesmoke": [245, 245, 245],
  825. "yellow": [255, 255, 0],
  826. "yellowgreen": [154, 205, 50]
  827. };
  828. }
  829. });
  830. // node_modules/color-convert/conversions.js
  831. var require_conversions = __commonJS({
  832. "node_modules/color-convert/conversions.js"(exports, module) {
  833. var cssKeywords = require_color_name();
  834. var reverseKeywords = {};
  835. for (key in cssKeywords) {
  836. if (cssKeywords.hasOwnProperty(key)) {
  837. reverseKeywords[cssKeywords[key]] = key;
  838. }
  839. }
  840. var key;
  841. var convert = module.exports = {
  842. rgb: { channels: 3, labels: "rgb" },
  843. hsl: { channels: 3, labels: "hsl" },
  844. hsv: { channels: 3, labels: "hsv" },
  845. hwb: { channels: 3, labels: "hwb" },
  846. cmyk: { channels: 4, labels: "cmyk" },
  847. xyz: { channels: 3, labels: "xyz" },
  848. lab: { channels: 3, labels: "lab" },
  849. lch: { channels: 3, labels: "lch" },
  850. hex: { channels: 1, labels: ["hex"] },
  851. keyword: { channels: 1, labels: ["keyword"] },
  852. ansi16: { channels: 1, labels: ["ansi16"] },
  853. ansi256: { channels: 1, labels: ["ansi256"] },
  854. hcg: { channels: 3, labels: ["h", "c", "g"] },
  855. apple: { channels: 3, labels: ["r16", "g16", "b16"] },
  856. gray: { channels: 1, labels: ["gray"] }
  857. };
  858. for (model in convert) {
  859. if (convert.hasOwnProperty(model)) {
  860. if (!("channels" in convert[model])) {
  861. throw new Error("missing channels property: " + model);
  862. }
  863. if (!("labels" in convert[model])) {
  864. throw new Error("missing channel labels property: " + model);
  865. }
  866. if (convert[model].labels.length !== convert[model].channels) {
  867. throw new Error("channel and label counts mismatch: " + model);
  868. }
  869. channels = convert[model].channels;
  870. labels = convert[model].labels;
  871. delete convert[model].channels;
  872. delete convert[model].labels;
  873. Object.defineProperty(convert[model], "channels", { value: channels });
  874. Object.defineProperty(convert[model], "labels", { value: labels });
  875. }
  876. }
  877. var channels;
  878. var labels;
  879. var model;
  880. convert.rgb.hsl = function(rgb) {
  881. var r = rgb[0] / 255;
  882. var g = rgb[1] / 255;
  883. var b = rgb[2] / 255;
  884. var min = Math.min(r, g, b);
  885. var max = Math.max(r, g, b);
  886. var delta = max - min;
  887. var h;
  888. var s;
  889. var l;
  890. if (max === min) {
  891. h = 0;
  892. } else if (r === max) {
  893. h = (g - b) / delta;
  894. } else if (g === max) {
  895. h = 2 + (b - r) / delta;
  896. } else if (b === max) {
  897. h = 4 + (r - g) / delta;
  898. }
  899. h = Math.min(h * 60, 360);
  900. if (h < 0) {
  901. h += 360;
  902. }
  903. l = (min + max) / 2;
  904. if (max === min) {
  905. s = 0;
  906. } else if (l <= 0.5) {
  907. s = delta / (max + min);
  908. } else {
  909. s = delta / (2 - max - min);
  910. }
  911. return [h, s * 100, l * 100];
  912. };
  913. convert.rgb.hsv = function(rgb) {
  914. var rdif;
  915. var gdif;
  916. var bdif;
  917. var h;
  918. var s;
  919. var r = rgb[0] / 255;
  920. var g = rgb[1] / 255;
  921. var b = rgb[2] / 255;
  922. var v = Math.max(r, g, b);
  923. var diff = v - Math.min(r, g, b);
  924. var diffc = function(c) {
  925. return (v - c) / 6 / diff + 1 / 2;
  926. };
  927. if (diff === 0) {
  928. h = s = 0;
  929. } else {
  930. s = diff / v;
  931. rdif = diffc(r);
  932. gdif = diffc(g);
  933. bdif = diffc(b);
  934. if (r === v) {
  935. h = bdif - gdif;
  936. } else if (g === v) {
  937. h = 1 / 3 + rdif - bdif;
  938. } else if (b === v) {
  939. h = 2 / 3 + gdif - rdif;
  940. }
  941. if (h < 0) {
  942. h += 1;
  943. } else if (h > 1) {
  944. h -= 1;
  945. }
  946. }
  947. return [
  948. h * 360,
  949. s * 100,
  950. v * 100
  951. ];
  952. };
  953. convert.rgb.hwb = function(rgb) {
  954. var r = rgb[0];
  955. var g = rgb[1];
  956. var b = rgb[2];
  957. var h = convert.rgb.hsl(rgb)[0];
  958. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  959. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  960. return [h, w * 100, b * 100];
  961. };
  962. convert.rgb.cmyk = function(rgb) {
  963. var r = rgb[0] / 255;
  964. var g = rgb[1] / 255;
  965. var b = rgb[2] / 255;
  966. var c;
  967. var m;
  968. var y;
  969. var k;
  970. k = Math.min(1 - r, 1 - g, 1 - b);
  971. c = (1 - r - k) / (1 - k) || 0;
  972. m = (1 - g - k) / (1 - k) || 0;
  973. y = (1 - b - k) / (1 - k) || 0;
  974. return [c * 100, m * 100, y * 100, k * 100];
  975. };
  976. function comparativeDistance(x, y) {
  977. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  978. }
  979. convert.rgb.keyword = function(rgb) {
  980. var reversed = reverseKeywords[rgb];
  981. if (reversed) {
  982. return reversed;
  983. }
  984. var currentClosestDistance = Infinity;
  985. var currentClosestKeyword;
  986. for (var keyword in cssKeywords) {
  987. if (cssKeywords.hasOwnProperty(keyword)) {
  988. var value = cssKeywords[keyword];
  989. var distance = comparativeDistance(rgb, value);
  990. if (distance < currentClosestDistance) {
  991. currentClosestDistance = distance;
  992. currentClosestKeyword = keyword;
  993. }
  994. }
  995. }
  996. return currentClosestKeyword;
  997. };
  998. convert.keyword.rgb = function(keyword) {
  999. return cssKeywords[keyword];
  1000. };
  1001. convert.rgb.xyz = function(rgb) {
  1002. var r = rgb[0] / 255;
  1003. var g = rgb[1] / 255;
  1004. var b = rgb[2] / 255;
  1005. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  1006. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  1007. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  1008. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  1009. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  1010. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  1011. return [x * 100, y * 100, z * 100];
  1012. };
  1013. convert.rgb.lab = function(rgb) {
  1014. var xyz = convert.rgb.xyz(rgb);
  1015. var x = xyz[0];
  1016. var y = xyz[1];
  1017. var z = xyz[2];
  1018. var l;
  1019. var a;
  1020. var b;
  1021. x /= 95.047;
  1022. y /= 100;
  1023. z /= 108.883;
  1024. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  1025. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  1026. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  1027. l = 116 * y - 16;
  1028. a = 500 * (x - y);
  1029. b = 200 * (y - z);
  1030. return [l, a, b];
  1031. };
  1032. convert.hsl.rgb = function(hsl) {
  1033. var h = hsl[0] / 360;
  1034. var s = hsl[1] / 100;
  1035. var l = hsl[2] / 100;
  1036. var t1;
  1037. var t2;
  1038. var t3;
  1039. var rgb;
  1040. var val;
  1041. if (s === 0) {
  1042. val = l * 255;
  1043. return [val, val, val];
  1044. }
  1045. if (l < 0.5) {
  1046. t2 = l * (1 + s);
  1047. } else {
  1048. t2 = l + s - l * s;
  1049. }
  1050. t1 = 2 * l - t2;
  1051. rgb = [0, 0, 0];
  1052. for (var i = 0; i < 3; i++) {
  1053. t3 = h + 1 / 3 * -(i - 1);
  1054. if (t3 < 0) {
  1055. t3++;
  1056. }
  1057. if (t3 > 1) {
  1058. t3--;
  1059. }
  1060. if (6 * t3 < 1) {
  1061. val = t1 + (t2 - t1) * 6 * t3;
  1062. } else if (2 * t3 < 1) {
  1063. val = t2;
  1064. } else if (3 * t3 < 2) {
  1065. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  1066. } else {
  1067. val = t1;
  1068. }
  1069. rgb[i] = val * 255;
  1070. }
  1071. return rgb;
  1072. };
  1073. convert.hsl.hsv = function(hsl) {
  1074. var h = hsl[0];
  1075. var s = hsl[1] / 100;
  1076. var l = hsl[2] / 100;
  1077. var smin = s;
  1078. var lmin = Math.max(l, 0.01);
  1079. var sv;
  1080. var v;
  1081. l *= 2;
  1082. s *= l <= 1 ? l : 2 - l;
  1083. smin *= lmin <= 1 ? lmin : 2 - lmin;
  1084. v = (l + s) / 2;
  1085. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  1086. return [h, sv * 100, v * 100];
  1087. };
  1088. convert.hsv.rgb = function(hsv) {
  1089. var h = hsv[0] / 60;
  1090. var s = hsv[1] / 100;
  1091. var v = hsv[2] / 100;
  1092. var hi = Math.floor(h) % 6;
  1093. var f = h - Math.floor(h);
  1094. var p = 255 * v * (1 - s);
  1095. var q = 255 * v * (1 - s * f);
  1096. var t = 255 * v * (1 - s * (1 - f));
  1097. v *= 255;
  1098. switch (hi) {
  1099. case 0:
  1100. return [v, t, p];
  1101. case 1:
  1102. return [q, v, p];
  1103. case 2:
  1104. return [p, v, t];
  1105. case 3:
  1106. return [p, q, v];
  1107. case 4:
  1108. return [t, p, v];
  1109. case 5:
  1110. return [v, p, q];
  1111. }
  1112. };
  1113. convert.hsv.hsl = function(hsv) {
  1114. var h = hsv[0];
  1115. var s = hsv[1] / 100;
  1116. var v = hsv[2] / 100;
  1117. var vmin = Math.max(v, 0.01);
  1118. var lmin;
  1119. var sl;
  1120. var l;
  1121. l = (2 - s) * v;
  1122. lmin = (2 - s) * vmin;
  1123. sl = s * vmin;
  1124. sl /= lmin <= 1 ? lmin : 2 - lmin;
  1125. sl = sl || 0;
  1126. l /= 2;
  1127. return [h, sl * 100, l * 100];
  1128. };
  1129. convert.hwb.rgb = function(hwb) {
  1130. var h = hwb[0] / 360;
  1131. var wh = hwb[1] / 100;
  1132. var bl = hwb[2] / 100;
  1133. var ratio = wh + bl;
  1134. var i;
  1135. var v;
  1136. var f;
  1137. var n;
  1138. if (ratio > 1) {
  1139. wh /= ratio;
  1140. bl /= ratio;
  1141. }
  1142. i = Math.floor(6 * h);
  1143. v = 1 - bl;
  1144. f = 6 * h - i;
  1145. if ((i & 1) !== 0) {
  1146. f = 1 - f;
  1147. }
  1148. n = wh + f * (v - wh);
  1149. var r;
  1150. var g;
  1151. var b;
  1152. switch (i) {
  1153. default:
  1154. case 6:
  1155. case 0:
  1156. r = v;
  1157. g = n;
  1158. b = wh;
  1159. break;
  1160. case 1:
  1161. r = n;
  1162. g = v;
  1163. b = wh;
  1164. break;
  1165. case 2:
  1166. r = wh;
  1167. g = v;
  1168. b = n;
  1169. break;
  1170. case 3:
  1171. r = wh;
  1172. g = n;
  1173. b = v;
  1174. break;
  1175. case 4:
  1176. r = n;
  1177. g = wh;
  1178. b = v;
  1179. break;
  1180. case 5:
  1181. r = v;
  1182. g = wh;
  1183. b = n;
  1184. break;
  1185. }
  1186. return [r * 255, g * 255, b * 255];
  1187. };
  1188. convert.cmyk.rgb = function(cmyk) {
  1189. var c = cmyk[0] / 100;
  1190. var m = cmyk[1] / 100;
  1191. var y = cmyk[2] / 100;
  1192. var k = cmyk[3] / 100;
  1193. var r;
  1194. var g;
  1195. var b;
  1196. r = 1 - Math.min(1, c * (1 - k) + k);
  1197. g = 1 - Math.min(1, m * (1 - k) + k);
  1198. b = 1 - Math.min(1, y * (1 - k) + k);
  1199. return [r * 255, g * 255, b * 255];
  1200. };
  1201. convert.xyz.rgb = function(xyz) {
  1202. var x = xyz[0] / 100;
  1203. var y = xyz[1] / 100;
  1204. var z = xyz[2] / 100;
  1205. var r;
  1206. var g;
  1207. var b;
  1208. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  1209. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  1210. b = x * 0.0557 + y * -0.204 + z * 1.057;
  1211. r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
  1212. g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
  1213. b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
  1214. r = Math.min(Math.max(0, r), 1);
  1215. g = Math.min(Math.max(0, g), 1);
  1216. b = Math.min(Math.max(0, b), 1);
  1217. return [r * 255, g * 255, b * 255];
  1218. };
  1219. convert.xyz.lab = function(xyz) {
  1220. var x = xyz[0];
  1221. var y = xyz[1];
  1222. var z = xyz[2];
  1223. var l;
  1224. var a;
  1225. var b;
  1226. x /= 95.047;
  1227. y /= 100;
  1228. z /= 108.883;
  1229. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  1230. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  1231. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  1232. l = 116 * y - 16;
  1233. a = 500 * (x - y);
  1234. b = 200 * (y - z);
  1235. return [l, a, b];
  1236. };
  1237. convert.lab.xyz = function(lab) {
  1238. var l = lab[0];
  1239. var a = lab[1];
  1240. var b = lab[2];
  1241. var x;
  1242. var y;
  1243. var z;
  1244. y = (l + 16) / 116;
  1245. x = a / 500 + y;
  1246. z = y - b / 200;
  1247. var y2 = Math.pow(y, 3);
  1248. var x2 = Math.pow(x, 3);
  1249. var z2 = Math.pow(z, 3);
  1250. y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
  1251. x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
  1252. z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
  1253. x *= 95.047;
  1254. y *= 100;
  1255. z *= 108.883;
  1256. return [x, y, z];
  1257. };
  1258. convert.lab.lch = function(lab) {
  1259. var l = lab[0];
  1260. var a = lab[1];
  1261. var b = lab[2];
  1262. var hr;
  1263. var h;
  1264. var c;
  1265. hr = Math.atan2(b, a);
  1266. h = hr * 360 / 2 / Math.PI;
  1267. if (h < 0) {
  1268. h += 360;
  1269. }
  1270. c = Math.sqrt(a * a + b * b);
  1271. return [l, c, h];
  1272. };
  1273. convert.lch.lab = function(lch) {
  1274. var l = lch[0];
  1275. var c = lch[1];
  1276. var h = lch[2];
  1277. var a;
  1278. var b;
  1279. var hr;
  1280. hr = h / 360 * 2 * Math.PI;
  1281. a = c * Math.cos(hr);
  1282. b = c * Math.sin(hr);
  1283. return [l, a, b];
  1284. };
  1285. convert.rgb.ansi16 = function(args) {
  1286. var r = args[0];
  1287. var g = args[1];
  1288. var b = args[2];
  1289. var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
  1290. value = Math.round(value / 50);
  1291. if (value === 0) {
  1292. return 30;
  1293. }
  1294. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  1295. if (value === 2) {
  1296. ansi += 60;
  1297. }
  1298. return ansi;
  1299. };
  1300. convert.hsv.ansi16 = function(args) {
  1301. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
  1302. };
  1303. convert.rgb.ansi256 = function(args) {
  1304. var r = args[0];
  1305. var g = args[1];
  1306. var b = args[2];
  1307. if (r === g && g === b) {
  1308. if (r < 8) {
  1309. return 16;
  1310. }
  1311. if (r > 248) {
  1312. return 231;
  1313. }
  1314. return Math.round((r - 8) / 247 * 24) + 232;
  1315. }
  1316. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  1317. return ansi;
  1318. };
  1319. convert.ansi16.rgb = function(args) {
  1320. var color = args % 10;
  1321. if (color === 0 || color === 7) {
  1322. if (args > 50) {
  1323. color += 3.5;
  1324. }
  1325. color = color / 10.5 * 255;
  1326. return [color, color, color];
  1327. }
  1328. var mult = (~~(args > 50) + 1) * 0.5;
  1329. var r = (color & 1) * mult * 255;
  1330. var g = (color >> 1 & 1) * mult * 255;
  1331. var b = (color >> 2 & 1) * mult * 255;
  1332. return [r, g, b];
  1333. };
  1334. convert.ansi256.rgb = function(args) {
  1335. if (args >= 232) {
  1336. var c = (args - 232) * 10 + 8;
  1337. return [c, c, c];
  1338. }
  1339. args -= 16;
  1340. var rem;
  1341. var r = Math.floor(args / 36) / 5 * 255;
  1342. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  1343. var b = rem % 6 / 5 * 255;
  1344. return [r, g, b];
  1345. };
  1346. convert.rgb.hex = function(args) {
  1347. var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
  1348. var string = integer.toString(16).toUpperCase();
  1349. return "000000".substring(string.length) + string;
  1350. };
  1351. convert.hex.rgb = function(args) {
  1352. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  1353. if (!match) {
  1354. return [0, 0, 0];
  1355. }
  1356. var colorString = match[0];
  1357. if (match[0].length === 3) {
  1358. colorString = colorString.split("").map(function(char) {
  1359. return char + char;
  1360. }).join("");
  1361. }
  1362. var integer = parseInt(colorString, 16);
  1363. var r = integer >> 16 & 255;
  1364. var g = integer >> 8 & 255;
  1365. var b = integer & 255;
  1366. return [r, g, b];
  1367. };
  1368. convert.rgb.hcg = function(rgb) {
  1369. var r = rgb[0] / 255;
  1370. var g = rgb[1] / 255;
  1371. var b = rgb[2] / 255;
  1372. var max = Math.max(Math.max(r, g), b);
  1373. var min = Math.min(Math.min(r, g), b);
  1374. var chroma = max - min;
  1375. var grayscale;
  1376. var hue;
  1377. if (chroma < 1) {
  1378. grayscale = min / (1 - chroma);
  1379. } else {
  1380. grayscale = 0;
  1381. }
  1382. if (chroma <= 0) {
  1383. hue = 0;
  1384. } else if (max === r) {
  1385. hue = (g - b) / chroma % 6;
  1386. } else if (max === g) {
  1387. hue = 2 + (b - r) / chroma;
  1388. } else {
  1389. hue = 4 + (r - g) / chroma + 4;
  1390. }
  1391. hue /= 6;
  1392. hue %= 1;
  1393. return [hue * 360, chroma * 100, grayscale * 100];
  1394. };
  1395. convert.hsl.hcg = function(hsl) {
  1396. var s = hsl[1] / 100;
  1397. var l = hsl[2] / 100;
  1398. var c = 1;
  1399. var f = 0;
  1400. if (l < 0.5) {
  1401. c = 2 * s * l;
  1402. } else {
  1403. c = 2 * s * (1 - l);
  1404. }
  1405. if (c < 1) {
  1406. f = (l - 0.5 * c) / (1 - c);
  1407. }
  1408. return [hsl[0], c * 100, f * 100];
  1409. };
  1410. convert.hsv.hcg = function(hsv) {
  1411. var s = hsv[1] / 100;
  1412. var v = hsv[2] / 100;
  1413. var c = s * v;
  1414. var f = 0;
  1415. if (c < 1) {
  1416. f = (v - c) / (1 - c);
  1417. }
  1418. return [hsv[0], c * 100, f * 100];
  1419. };
  1420. convert.hcg.rgb = function(hcg) {
  1421. var h = hcg[0] / 360;
  1422. var c = hcg[1] / 100;
  1423. var g = hcg[2] / 100;
  1424. if (c === 0) {
  1425. return [g * 255, g * 255, g * 255];
  1426. }
  1427. var pure = [0, 0, 0];
  1428. var hi = h % 1 * 6;
  1429. var v = hi % 1;
  1430. var w = 1 - v;
  1431. var mg = 0;
  1432. switch (Math.floor(hi)) {
  1433. case 0:
  1434. pure[0] = 1;
  1435. pure[1] = v;
  1436. pure[2] = 0;
  1437. break;
  1438. case 1:
  1439. pure[0] = w;
  1440. pure[1] = 1;
  1441. pure[2] = 0;
  1442. break;
  1443. case 2:
  1444. pure[0] = 0;
  1445. pure[1] = 1;
  1446. pure[2] = v;
  1447. break;
  1448. case 3:
  1449. pure[0] = 0;
  1450. pure[1] = w;
  1451. pure[2] = 1;
  1452. break;
  1453. case 4:
  1454. pure[0] = v;
  1455. pure[1] = 0;
  1456. pure[2] = 1;
  1457. break;
  1458. default:
  1459. pure[0] = 1;
  1460. pure[1] = 0;
  1461. pure[2] = w;
  1462. }
  1463. mg = (1 - c) * g;
  1464. return [
  1465. (c * pure[0] + mg) * 255,
  1466. (c * pure[1] + mg) * 255,
  1467. (c * pure[2] + mg) * 255
  1468. ];
  1469. };
  1470. convert.hcg.hsv = function(hcg) {
  1471. var c = hcg[1] / 100;
  1472. var g = hcg[2] / 100;
  1473. var v = c + g * (1 - c);
  1474. var f = 0;
  1475. if (v > 0) {
  1476. f = c / v;
  1477. }
  1478. return [hcg[0], f * 100, v * 100];
  1479. };
  1480. convert.hcg.hsl = function(hcg) {
  1481. var c = hcg[1] / 100;
  1482. var g = hcg[2] / 100;
  1483. var l = g * (1 - c) + 0.5 * c;
  1484. var s = 0;
  1485. if (l > 0 && l < 0.5) {
  1486. s = c / (2 * l);
  1487. } else if (l >= 0.5 && l < 1) {
  1488. s = c / (2 * (1 - l));
  1489. }
  1490. return [hcg[0], s * 100, l * 100];
  1491. };
  1492. convert.hcg.hwb = function(hcg) {
  1493. var c = hcg[1] / 100;
  1494. var g = hcg[2] / 100;
  1495. var v = c + g * (1 - c);
  1496. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  1497. };
  1498. convert.hwb.hcg = function(hwb) {
  1499. var w = hwb[1] / 100;
  1500. var b = hwb[2] / 100;
  1501. var v = 1 - b;
  1502. var c = v - w;
  1503. var g = 0;
  1504. if (c < 1) {
  1505. g = (v - c) / (1 - c);
  1506. }
  1507. return [hwb[0], c * 100, g * 100];
  1508. };
  1509. convert.apple.rgb = function(apple) {
  1510. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  1511. };
  1512. convert.rgb.apple = function(rgb) {
  1513. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  1514. };
  1515. convert.gray.rgb = function(args) {
  1516. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  1517. };
  1518. convert.gray.hsl = convert.gray.hsv = function(args) {
  1519. return [0, 0, args[0]];
  1520. };
  1521. convert.gray.hwb = function(gray) {
  1522. return [0, 100, gray[0]];
  1523. };
  1524. convert.gray.cmyk = function(gray) {
  1525. return [0, 0, 0, gray[0]];
  1526. };
  1527. convert.gray.lab = function(gray) {
  1528. return [gray[0], 0, 0];
  1529. };
  1530. convert.gray.hex = function(gray) {
  1531. var val = Math.round(gray[0] / 100 * 255) & 255;
  1532. var integer = (val << 16) + (val << 8) + val;
  1533. var string = integer.toString(16).toUpperCase();
  1534. return "000000".substring(string.length) + string;
  1535. };
  1536. convert.rgb.gray = function(rgb) {
  1537. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  1538. return [val / 255 * 100];
  1539. };
  1540. }
  1541. });
  1542. // node_modules/color-convert/route.js
  1543. var require_route = __commonJS({
  1544. "node_modules/color-convert/route.js"(exports, module) {
  1545. var conversions = require_conversions();
  1546. function buildGraph() {
  1547. var graph = {};
  1548. var models = Object.keys(conversions);
  1549. for (var len = models.length, i = 0; i < len; i++) {
  1550. graph[models[i]] = {
  1551. // http://jsperf.com/1-vs-infinity
  1552. // micro-opt, but this is simple.
  1553. distance: -1,
  1554. parent: null
  1555. };
  1556. }
  1557. return graph;
  1558. }
  1559. function deriveBFS(fromModel) {
  1560. var graph = buildGraph();
  1561. var queue = [fromModel];
  1562. graph[fromModel].distance = 0;
  1563. while (queue.length) {
  1564. var current = queue.pop();
  1565. var adjacents = Object.keys(conversions[current]);
  1566. for (var len = adjacents.length, i = 0; i < len; i++) {
  1567. var adjacent = adjacents[i];
  1568. var node = graph[adjacent];
  1569. if (node.distance === -1) {
  1570. node.distance = graph[current].distance + 1;
  1571. node.parent = current;
  1572. queue.unshift(adjacent);
  1573. }
  1574. }
  1575. }
  1576. return graph;
  1577. }
  1578. function link(from, to) {
  1579. return function(args) {
  1580. return to(from(args));
  1581. };
  1582. }
  1583. function wrapConversion(toModel, graph) {
  1584. var path = [graph[toModel].parent, toModel];
  1585. var fn = conversions[graph[toModel].parent][toModel];
  1586. var cur = graph[toModel].parent;
  1587. while (graph[cur].parent) {
  1588. path.unshift(graph[cur].parent);
  1589. fn = link(conversions[graph[cur].parent][cur], fn);
  1590. cur = graph[cur].parent;
  1591. }
  1592. fn.conversion = path;
  1593. return fn;
  1594. }
  1595. module.exports = function(fromModel) {
  1596. var graph = deriveBFS(fromModel);
  1597. var conversion = {};
  1598. var models = Object.keys(graph);
  1599. for (var len = models.length, i = 0; i < len; i++) {
  1600. var toModel = models[i];
  1601. var node = graph[toModel];
  1602. if (node.parent === null) {
  1603. continue;
  1604. }
  1605. conversion[toModel] = wrapConversion(toModel, graph);
  1606. }
  1607. return conversion;
  1608. };
  1609. }
  1610. });
  1611. // node_modules/color-convert/index.js
  1612. var require_color_convert = __commonJS({
  1613. "node_modules/color-convert/index.js"(exports, module) {
  1614. var conversions = require_conversions();
  1615. var route = require_route();
  1616. var convert = {};
  1617. var models = Object.keys(conversions);
  1618. function wrapRaw(fn) {
  1619. var wrappedFn = function(args) {
  1620. if (args === void 0 || args === null) {
  1621. return args;
  1622. }
  1623. if (arguments.length > 1) {
  1624. args = Array.prototype.slice.call(arguments);
  1625. }
  1626. return fn(args);
  1627. };
  1628. if ("conversion" in fn) {
  1629. wrappedFn.conversion = fn.conversion;
  1630. }
  1631. return wrappedFn;
  1632. }
  1633. function wrapRounded(fn) {
  1634. var wrappedFn = function(args) {
  1635. if (args === void 0 || args === null) {
  1636. return args;
  1637. }
  1638. if (arguments.length > 1) {
  1639. args = Array.prototype.slice.call(arguments);
  1640. }
  1641. var result = fn(args);
  1642. if (typeof result === "object") {
  1643. for (var len = result.length, i = 0; i < len; i++) {
  1644. result[i] = Math.round(result[i]);
  1645. }
  1646. }
  1647. return result;
  1648. };
  1649. if ("conversion" in fn) {
  1650. wrappedFn.conversion = fn.conversion;
  1651. }
  1652. return wrappedFn;
  1653. }
  1654. models.forEach(function(fromModel) {
  1655. convert[fromModel] = {};
  1656. Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
  1657. Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
  1658. var routes = route(fromModel);
  1659. var routeModels = Object.keys(routes);
  1660. routeModels.forEach(function(toModel) {
  1661. var fn = routes[toModel];
  1662. convert[fromModel][toModel] = wrapRounded(fn);
  1663. convert[fromModel][toModel].raw = wrapRaw(fn);
  1664. });
  1665. });
  1666. module.exports = convert;
  1667. }
  1668. });
  1669. // node_modules/ansi-styles/index.js
  1670. var require_ansi_styles = __commonJS({
  1671. "node_modules/ansi-styles/index.js"(exports, module) {
  1672. "use strict";
  1673. var colorConvert = require_color_convert();
  1674. var wrapAnsi16 = (fn, offset) => function() {
  1675. const code = fn.apply(colorConvert, arguments);
  1676. return `\x1B[${code + offset}m`;
  1677. };
  1678. var wrapAnsi256 = (fn, offset) => function() {
  1679. const code = fn.apply(colorConvert, arguments);
  1680. return `\x1B[${38 + offset};5;${code}m`;
  1681. };
  1682. var wrapAnsi16m = (fn, offset) => function() {
  1683. const rgb = fn.apply(colorConvert, arguments);
  1684. return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  1685. };
  1686. function assembleStyles() {
  1687. const codes = /* @__PURE__ */ new Map();
  1688. const styles = {
  1689. modifier: {
  1690. reset: [0, 0],
  1691. // 21 isn't widely supported and 22 does the same thing
  1692. bold: [1, 22],
  1693. dim: [2, 22],
  1694. italic: [3, 23],
  1695. underline: [4, 24],
  1696. inverse: [7, 27],
  1697. hidden: [8, 28],
  1698. strikethrough: [9, 29]
  1699. },
  1700. color: {
  1701. black: [30, 39],
  1702. red: [31, 39],
  1703. green: [32, 39],
  1704. yellow: [33, 39],
  1705. blue: [34, 39],
  1706. magenta: [35, 39],
  1707. cyan: [36, 39],
  1708. white: [37, 39],
  1709. gray: [90, 39],
  1710. // Bright color
  1711. redBright: [91, 39],
  1712. greenBright: [92, 39],
  1713. yellowBright: [93, 39],
  1714. blueBright: [94, 39],
  1715. magentaBright: [95, 39],
  1716. cyanBright: [96, 39],
  1717. whiteBright: [97, 39]
  1718. },
  1719. bgColor: {
  1720. bgBlack: [40, 49],
  1721. bgRed: [41, 49],
  1722. bgGreen: [42, 49],
  1723. bgYellow: [43, 49],
  1724. bgBlue: [44, 49],
  1725. bgMagenta: [45, 49],
  1726. bgCyan: [46, 49],
  1727. bgWhite: [47, 49],
  1728. // Bright color
  1729. bgBlackBright: [100, 49],
  1730. bgRedBright: [101, 49],
  1731. bgGreenBright: [102, 49],
  1732. bgYellowBright: [103, 49],
  1733. bgBlueBright: [104, 49],
  1734. bgMagentaBright: [105, 49],
  1735. bgCyanBright: [106, 49],
  1736. bgWhiteBright: [107, 49]
  1737. }
  1738. };
  1739. styles.color.grey = styles.color.gray;
  1740. for (const groupName of Object.keys(styles)) {
  1741. const group = styles[groupName];
  1742. for (const styleName of Object.keys(group)) {
  1743. const style = group[styleName];
  1744. styles[styleName] = {
  1745. open: `\x1B[${style[0]}m`,
  1746. close: `\x1B[${style[1]}m`
  1747. };
  1748. group[styleName] = styles[styleName];
  1749. codes.set(style[0], style[1]);
  1750. }
  1751. Object.defineProperty(styles, groupName, {
  1752. value: group,
  1753. enumerable: false
  1754. });
  1755. Object.defineProperty(styles, "codes", {
  1756. value: codes,
  1757. enumerable: false
  1758. });
  1759. }
  1760. const ansi2ansi = (n) => n;
  1761. const rgb2rgb = (r, g, b) => [r, g, b];
  1762. styles.color.close = "\x1B[39m";
  1763. styles.bgColor.close = "\x1B[49m";
  1764. styles.color.ansi = {
  1765. ansi: wrapAnsi16(ansi2ansi, 0)
  1766. };
  1767. styles.color.ansi256 = {
  1768. ansi256: wrapAnsi256(ansi2ansi, 0)
  1769. };
  1770. styles.color.ansi16m = {
  1771. rgb: wrapAnsi16m(rgb2rgb, 0)
  1772. };
  1773. styles.bgColor.ansi = {
  1774. ansi: wrapAnsi16(ansi2ansi, 10)
  1775. };
  1776. styles.bgColor.ansi256 = {
  1777. ansi256: wrapAnsi256(ansi2ansi, 10)
  1778. };
  1779. styles.bgColor.ansi16m = {
  1780. rgb: wrapAnsi16m(rgb2rgb, 10)
  1781. };
  1782. for (let key of Object.keys(colorConvert)) {
  1783. if (typeof colorConvert[key] !== "object") {
  1784. continue;
  1785. }
  1786. const suite = colorConvert[key];
  1787. if (key === "ansi16") {
  1788. key = "ansi";
  1789. }
  1790. if ("ansi16" in suite) {
  1791. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  1792. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  1793. }
  1794. if ("ansi256" in suite) {
  1795. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  1796. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  1797. }
  1798. if ("rgb" in suite) {
  1799. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  1800. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  1801. }
  1802. }
  1803. return styles;
  1804. }
  1805. Object.defineProperty(module, "exports", {
  1806. enumerable: true,
  1807. get: assembleStyles
  1808. });
  1809. }
  1810. });
  1811. // node_modules/@babel/highlight/node_modules/has-flag/index.js
  1812. var require_has_flag = __commonJS({
  1813. "node_modules/@babel/highlight/node_modules/has-flag/index.js"(exports, module) {
  1814. "use strict";
  1815. module.exports = (flag, argv) => {
  1816. argv = argv || process.argv;
  1817. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  1818. const pos = argv.indexOf(prefix + flag);
  1819. const terminatorPos = argv.indexOf("--");
  1820. return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  1821. };
  1822. }
  1823. });
  1824. // node_modules/@babel/highlight/node_modules/supports-color/index.js
  1825. var require_supports_color = __commonJS({
  1826. "node_modules/@babel/highlight/node_modules/supports-color/index.js"(exports, module) {
  1827. "use strict";
  1828. var os = __require("os");
  1829. var hasFlag = require_has_flag();
  1830. var env = process.env;
  1831. var forceColor;
  1832. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
  1833. forceColor = false;
  1834. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  1835. forceColor = true;
  1836. }
  1837. if ("FORCE_COLOR" in env) {
  1838. forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  1839. }
  1840. function translateLevel(level) {
  1841. if (level === 0) {
  1842. return false;
  1843. }
  1844. return {
  1845. level,
  1846. hasBasic: true,
  1847. has256: level >= 2,
  1848. has16m: level >= 3
  1849. };
  1850. }
  1851. function supportsColor(stream) {
  1852. if (forceColor === false) {
  1853. return 0;
  1854. }
  1855. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  1856. return 3;
  1857. }
  1858. if (hasFlag("color=256")) {
  1859. return 2;
  1860. }
  1861. if (stream && !stream.isTTY && forceColor !== true) {
  1862. return 0;
  1863. }
  1864. const min = forceColor ? 1 : 0;
  1865. if (process.platform === "win32") {
  1866. const osRelease = os.release().split(".");
  1867. if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  1868. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  1869. }
  1870. return 1;
  1871. }
  1872. if ("CI" in env) {
  1873. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  1874. return 1;
  1875. }
  1876. return min;
  1877. }
  1878. if ("TEAMCITY_VERSION" in env) {
  1879. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  1880. }
  1881. if (env.COLORTERM === "truecolor") {
  1882. return 3;
  1883. }
  1884. if ("TERM_PROGRAM" in env) {
  1885. const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  1886. switch (env.TERM_PROGRAM) {
  1887. case "iTerm.app":
  1888. return version >= 3 ? 3 : 2;
  1889. case "Apple_Terminal":
  1890. return 2;
  1891. }
  1892. }
  1893. if (/-256(color)?$/i.test(env.TERM)) {
  1894. return 2;
  1895. }
  1896. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  1897. return 1;
  1898. }
  1899. if ("COLORTERM" in env) {
  1900. return 1;
  1901. }
  1902. if (env.TERM === "dumb") {
  1903. return min;
  1904. }
  1905. return min;
  1906. }
  1907. function getSupportLevel(stream) {
  1908. const level = supportsColor(stream);
  1909. return translateLevel(level);
  1910. }
  1911. module.exports = {
  1912. supportsColor: getSupportLevel,
  1913. stdout: getSupportLevel(process.stdout),
  1914. stderr: getSupportLevel(process.stderr)
  1915. };
  1916. }
  1917. });
  1918. // node_modules/@babel/highlight/node_modules/chalk/templates.js
  1919. var require_templates = __commonJS({
  1920. "node_modules/@babel/highlight/node_modules/chalk/templates.js"(exports, module) {
  1921. "use strict";
  1922. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  1923. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  1924. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  1925. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  1926. var ESCAPES = /* @__PURE__ */ new Map([
  1927. ["n", "\n"],
  1928. ["r", "\r"],
  1929. ["t", " "],
  1930. ["b", "\b"],
  1931. ["f", "\f"],
  1932. ["v", "\v"],
  1933. ["0", "\0"],
  1934. ["\\", "\\"],
  1935. ["e", "\x1B"],
  1936. ["a", "\x07"]
  1937. ]);
  1938. function unescape(c) {
  1939. if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
  1940. return String.fromCharCode(parseInt(c.slice(1), 16));
  1941. }
  1942. return ESCAPES.get(c) || c;
  1943. }
  1944. function parseArguments(name, args) {
  1945. const results = [];
  1946. const chunks = args.trim().split(/\s*,\s*/g);
  1947. let matches;
  1948. for (const chunk of chunks) {
  1949. if (!isNaN(chunk)) {
  1950. results.push(Number(chunk));
  1951. } else if (matches = chunk.match(STRING_REGEX)) {
  1952. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  1953. } else {
  1954. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
  1955. }
  1956. }
  1957. return results;
  1958. }
  1959. function parseStyle(style) {
  1960. STYLE_REGEX.lastIndex = 0;
  1961. const results = [];
  1962. let matches;
  1963. while ((matches = STYLE_REGEX.exec(style)) !== null) {
  1964. const name = matches[1];
  1965. if (matches[2]) {
  1966. const args = parseArguments(name, matches[2]);
  1967. results.push([name].concat(args));
  1968. } else {
  1969. results.push([name]);
  1970. }
  1971. }
  1972. return results;
  1973. }
  1974. function buildStyle(chalk, styles) {
  1975. const enabled = {};
  1976. for (const layer of styles) {
  1977. for (const style of layer.styles) {
  1978. enabled[style[0]] = layer.inverse ? null : style.slice(1);
  1979. }
  1980. }
  1981. let current = chalk;
  1982. for (const styleName of Object.keys(enabled)) {
  1983. if (Array.isArray(enabled[styleName])) {
  1984. if (!(styleName in current)) {
  1985. throw new Error(`Unknown Chalk style: ${styleName}`);
  1986. }
  1987. if (enabled[styleName].length > 0) {
  1988. current = current[styleName].apply(current, enabled[styleName]);
  1989. } else {
  1990. current = current[styleName];
  1991. }
  1992. }
  1993. }
  1994. return current;
  1995. }
  1996. module.exports = (chalk, tmp) => {
  1997. const styles = [];
  1998. const chunks = [];
  1999. let chunk = [];
  2000. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
  2001. if (escapeChar) {
  2002. chunk.push(unescape(escapeChar));
  2003. } else if (style) {
  2004. const str = chunk.join("");
  2005. chunk = [];
  2006. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  2007. styles.push({ inverse, styles: parseStyle(style) });
  2008. } else if (close) {
  2009. if (styles.length === 0) {
  2010. throw new Error("Found extraneous } in Chalk template literal");
  2011. }
  2012. chunks.push(buildStyle(chalk, styles)(chunk.join("")));
  2013. chunk = [];
  2014. styles.pop();
  2015. } else {
  2016. chunk.push(chr);
  2017. }
  2018. });
  2019. chunks.push(chunk.join(""));
  2020. if (styles.length > 0) {
  2021. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
  2022. throw new Error(errMsg);
  2023. }
  2024. return chunks.join("");
  2025. };
  2026. }
  2027. });
  2028. // node_modules/@babel/highlight/node_modules/chalk/index.js
  2029. var require_chalk = __commonJS({
  2030. "node_modules/@babel/highlight/node_modules/chalk/index.js"(exports, module) {
  2031. "use strict";
  2032. var escapeStringRegexp = require_escape_string_regexp();
  2033. var ansiStyles = require_ansi_styles();
  2034. var stdoutColor = require_supports_color().stdout;
  2035. var template = require_templates();
  2036. var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
  2037. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  2038. var skipModels = /* @__PURE__ */ new Set(["gray"]);
  2039. var styles = /* @__PURE__ */ Object.create(null);
  2040. function applyOptions(obj, options) {
  2041. options = options || {};
  2042. const scLevel = stdoutColor ? stdoutColor.level : 0;
  2043. obj.level = options.level === void 0 ? scLevel : options.level;
  2044. obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
  2045. }
  2046. function Chalk(options) {
  2047. if (!this || !(this instanceof Chalk) || this.template) {
  2048. const chalk = {};
  2049. applyOptions(chalk, options);
  2050. chalk.template = function() {
  2051. const args = [].slice.call(arguments);
  2052. return chalkTag.apply(null, [chalk.template].concat(args));
  2053. };
  2054. Object.setPrototypeOf(chalk, Chalk.prototype);
  2055. Object.setPrototypeOf(chalk.template, chalk);
  2056. chalk.template.constructor = Chalk;
  2057. return chalk.template;
  2058. }
  2059. applyOptions(this, options);
  2060. }
  2061. if (isSimpleWindowsTerm) {
  2062. ansiStyles.blue.open = "\x1B[94m";
  2063. }
  2064. for (const key of Object.keys(ansiStyles)) {
  2065. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
  2066. styles[key] = {
  2067. get() {
  2068. const codes = ansiStyles[key];
  2069. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  2070. }
  2071. };
  2072. }
  2073. styles.visible = {
  2074. get() {
  2075. return build.call(this, this._styles || [], true, "visible");
  2076. }
  2077. };
  2078. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
  2079. for (const model of Object.keys(ansiStyles.color.ansi)) {
  2080. if (skipModels.has(model)) {
  2081. continue;
  2082. }
  2083. styles[model] = {
  2084. get() {
  2085. const level = this.level;
  2086. return function() {
  2087. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  2088. const codes = {
  2089. open,
  2090. close: ansiStyles.color.close,
  2091. closeRe: ansiStyles.color.closeRe
  2092. };
  2093. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  2094. };
  2095. }
  2096. };
  2097. }
  2098. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
  2099. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  2100. if (skipModels.has(model)) {
  2101. continue;
  2102. }
  2103. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  2104. styles[bgModel] = {
  2105. get() {
  2106. const level = this.level;
  2107. return function() {
  2108. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  2109. const codes = {
  2110. open,
  2111. close: ansiStyles.bgColor.close,
  2112. closeRe: ansiStyles.bgColor.closeRe
  2113. };
  2114. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  2115. };
  2116. }
  2117. };
  2118. }
  2119. var proto = Object.defineProperties(() => {
  2120. }, styles);
  2121. function build(_styles, _empty, key) {
  2122. const builder = function() {
  2123. return applyStyle.apply(builder, arguments);
  2124. };
  2125. builder._styles = _styles;
  2126. builder._empty = _empty;
  2127. const self = this;
  2128. Object.defineProperty(builder, "level", {
  2129. enumerable: true,
  2130. get() {
  2131. return self.level;
  2132. },
  2133. set(level) {
  2134. self.level = level;
  2135. }
  2136. });
  2137. Object.defineProperty(builder, "enabled", {
  2138. enumerable: true,
  2139. get() {
  2140. return self.enabled;
  2141. },
  2142. set(enabled) {
  2143. self.enabled = enabled;
  2144. }
  2145. });
  2146. builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
  2147. builder.__proto__ = proto;
  2148. return builder;
  2149. }
  2150. function applyStyle() {
  2151. const args = arguments;
  2152. const argsLen = args.length;
  2153. let str = String(arguments[0]);
  2154. if (argsLen === 0) {
  2155. return "";
  2156. }
  2157. if (argsLen > 1) {
  2158. for (let a = 1; a < argsLen; a++) {
  2159. str += " " + args[a];
  2160. }
  2161. }
  2162. if (!this.enabled || this.level <= 0 || !str) {
  2163. return this._empty ? "" : str;
  2164. }
  2165. const originalDim = ansiStyles.dim.open;
  2166. if (isSimpleWindowsTerm && this.hasGrey) {
  2167. ansiStyles.dim.open = "";
  2168. }
  2169. for (const code of this._styles.slice().reverse()) {
  2170. str = code.open + str.replace(code.closeRe, code.open) + code.close;
  2171. str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
  2172. }
  2173. ansiStyles.dim.open = originalDim;
  2174. return str;
  2175. }
  2176. function chalkTag(chalk, strings) {
  2177. if (!Array.isArray(strings)) {
  2178. return [].slice.call(arguments, 1).join(" ");
  2179. }
  2180. const args = [].slice.call(arguments, 2);
  2181. const parts = [strings.raw[0]];
  2182. for (let i = 1; i < strings.length; i++) {
  2183. parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
  2184. parts.push(String(strings.raw[i]));
  2185. }
  2186. return template(chalk, parts.join(""));
  2187. }
  2188. Object.defineProperties(Chalk.prototype, styles);
  2189. module.exports = Chalk();
  2190. module.exports.supportsColor = stdoutColor;
  2191. module.exports.default = module.exports;
  2192. }
  2193. });
  2194. // node_modules/@babel/highlight/lib/index.js
  2195. var require_lib2 = __commonJS({
  2196. "node_modules/@babel/highlight/lib/index.js"(exports) {
  2197. "use strict";
  2198. Object.defineProperty(exports, "__esModule", {
  2199. value: true
  2200. });
  2201. exports.default = highlight;
  2202. exports.getChalk = getChalk;
  2203. exports.shouldHighlight = shouldHighlight;
  2204. var _jsTokens = require_js_tokens();
  2205. var _helperValidatorIdentifier = require_lib();
  2206. var _chalk = require_chalk();
  2207. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  2208. function getDefs(chalk) {
  2209. return {
  2210. keyword: chalk.cyan,
  2211. capitalized: chalk.yellow,
  2212. jsxIdentifier: chalk.yellow,
  2213. punctuator: chalk.yellow,
  2214. number: chalk.magenta,
  2215. string: chalk.green,
  2216. regex: chalk.magenta,
  2217. comment: chalk.grey,
  2218. invalid: chalk.white.bgRed.bold
  2219. };
  2220. }
  2221. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  2222. var BRACKET = /^[()[\]{}]$/;
  2223. var tokenize;
  2224. {
  2225. const JSX_TAG = /^[a-z][\w-]*$/i;
  2226. const getTokenType = function(token, offset, text) {
  2227. if (token.type === "name") {
  2228. if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
  2229. return "keyword";
  2230. }
  2231. if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) == "</")) {
  2232. return "jsxIdentifier";
  2233. }
  2234. if (token.value[0] !== token.value[0].toLowerCase()) {
  2235. return "capitalized";
  2236. }
  2237. }
  2238. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  2239. return "bracket";
  2240. }
  2241. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  2242. return "punctuator";
  2243. }
  2244. return token.type;
  2245. };
  2246. tokenize = function* (text) {
  2247. let match;
  2248. while (match = _jsTokens.default.exec(text)) {
  2249. const token = _jsTokens.matchToToken(match);
  2250. yield {
  2251. type: getTokenType(token, match.index, text),
  2252. value: token.value
  2253. };
  2254. }
  2255. };
  2256. }
  2257. function highlightTokens(defs, text) {
  2258. let highlighted = "";
  2259. for (const {
  2260. type,
  2261. value
  2262. } of tokenize(text)) {
  2263. const colorize = defs[type];
  2264. if (colorize) {
  2265. highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
  2266. } else {
  2267. highlighted += value;
  2268. }
  2269. }
  2270. return highlighted;
  2271. }
  2272. function shouldHighlight(options) {
  2273. return !!_chalk.supportsColor || options.forceColor;
  2274. }
  2275. function getChalk(options) {
  2276. return options.forceColor ? new _chalk.constructor({
  2277. enabled: true,
  2278. level: 1
  2279. }) : _chalk;
  2280. }
  2281. function highlight(code, options = {}) {
  2282. if (code !== "" && shouldHighlight(options)) {
  2283. const chalk = getChalk(options);
  2284. const defs = getDefs(chalk);
  2285. return highlightTokens(defs, code);
  2286. } else {
  2287. return code;
  2288. }
  2289. }
  2290. }
  2291. });
  2292. // node_modules/@babel/code-frame/lib/index.js
  2293. var require_lib3 = __commonJS({
  2294. "node_modules/@babel/code-frame/lib/index.js"(exports) {
  2295. "use strict";
  2296. Object.defineProperty(exports, "__esModule", {
  2297. value: true
  2298. });
  2299. exports.codeFrameColumns = codeFrameColumns;
  2300. exports.default = _default;
  2301. var _highlight = require_lib2();
  2302. var deprecationWarningShown = false;
  2303. function getDefs(chalk) {
  2304. return {
  2305. gutter: chalk.grey,
  2306. marker: chalk.red.bold,
  2307. message: chalk.red.bold
  2308. };
  2309. }
  2310. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  2311. function getMarkerLines(loc, source, opts) {
  2312. const startLoc = Object.assign({
  2313. column: 0,
  2314. line: -1
  2315. }, loc.start);
  2316. const endLoc = Object.assign({}, startLoc, loc.end);
  2317. const {
  2318. linesAbove = 2,
  2319. linesBelow = 3
  2320. } = opts || {};
  2321. const startLine = startLoc.line;
  2322. const startColumn = startLoc.column;
  2323. const endLine = endLoc.line;
  2324. const endColumn = endLoc.column;
  2325. let start = Math.max(startLine - (linesAbove + 1), 0);
  2326. let end = Math.min(source.length, endLine + linesBelow);
  2327. if (startLine === -1) {
  2328. start = 0;
  2329. }
  2330. if (endLine === -1) {
  2331. end = source.length;
  2332. }
  2333. const lineDiff = endLine - startLine;
  2334. const markerLines = {};
  2335. if (lineDiff) {
  2336. for (let i = 0; i <= lineDiff; i++) {
  2337. const lineNumber = i + startLine;
  2338. if (!startColumn) {
  2339. markerLines[lineNumber] = true;
  2340. } else if (i === 0) {
  2341. const sourceLength = source[lineNumber - 1].length;
  2342. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  2343. } else if (i === lineDiff) {
  2344. markerLines[lineNumber] = [0, endColumn];
  2345. } else {
  2346. const sourceLength = source[lineNumber - i].length;
  2347. markerLines[lineNumber] = [0, sourceLength];
  2348. }
  2349. }
  2350. } else {
  2351. if (startColumn === endColumn) {
  2352. if (startColumn) {
  2353. markerLines[startLine] = [startColumn, 0];
  2354. } else {
  2355. markerLines[startLine] = true;
  2356. }
  2357. } else {
  2358. markerLines[startLine] = [startColumn, endColumn - startColumn];
  2359. }
  2360. }
  2361. return {
  2362. start,
  2363. end,
  2364. markerLines
  2365. };
  2366. }
  2367. function codeFrameColumns(rawLines, loc, opts = {}) {
  2368. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  2369. const chalk = (0, _highlight.getChalk)(opts);
  2370. const defs = getDefs(chalk);
  2371. const maybeHighlight = (chalkFn, string) => {
  2372. return highlighted ? chalkFn(string) : string;
  2373. };
  2374. const lines = rawLines.split(NEWLINE);
  2375. const {
  2376. start,
  2377. end,
  2378. markerLines
  2379. } = getMarkerLines(loc, lines, opts);
  2380. const hasColumns = loc.start && typeof loc.start.column === "number";
  2381. const numberMaxWidth = String(end).length;
  2382. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  2383. let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
  2384. const number = start + 1 + index;
  2385. const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
  2386. const gutter = ` ${paddedNumber} |`;
  2387. const hasMarker = markerLines[number];
  2388. const lastMarkerLine = !markerLines[number + 1];
  2389. if (hasMarker) {
  2390. let markerLine = "";
  2391. if (Array.isArray(hasMarker)) {
  2392. const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  2393. const numberOfMarkers = hasMarker[1] || 1;
  2394. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  2395. if (lastMarkerLine && opts.message) {
  2396. markerLine += " " + maybeHighlight(defs.message, opts.message);
  2397. }
  2398. }
  2399. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
  2400. } else {
  2401. return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
  2402. }
  2403. }).join("\n");
  2404. if (opts.message && !hasColumns) {
  2405. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  2406. ${frame}`;
  2407. }
  2408. if (highlighted) {
  2409. return chalk.reset(frame);
  2410. } else {
  2411. return frame;
  2412. }
  2413. }
  2414. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  2415. if (!deprecationWarningShown) {
  2416. deprecationWarningShown = true;
  2417. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  2418. if (process.emitWarning) {
  2419. process.emitWarning(message, "DeprecationWarning");
  2420. } else {
  2421. const deprecationError = new Error(message);
  2422. deprecationError.name = "DeprecationWarning";
  2423. console.warn(new Error(message));
  2424. }
  2425. }
  2426. colNumber = Math.max(colNumber, 0);
  2427. const location = {
  2428. start: {
  2429. column: colNumber,
  2430. line: lineNumber
  2431. }
  2432. };
  2433. return codeFrameColumns(rawLines, location, opts);
  2434. }
  2435. }
  2436. });
  2437. // node_modules/parse-json/index.js
  2438. var require_parse_json = __commonJS({
  2439. "node_modules/parse-json/index.js"(exports, module) {
  2440. "use strict";
  2441. var errorEx = require_error_ex();
  2442. var fallback = require_json_parse_even_better_errors();
  2443. var { default: LinesAndColumns } = require_build();
  2444. var { codeFrameColumns } = require_lib3();
  2445. var JSONError = errorEx("JSONError", {
  2446. fileName: errorEx.append("in %s"),
  2447. codeFrame: errorEx.append("\n\n%s\n")
  2448. });
  2449. var parseJson = (string, reviver, filename) => {
  2450. if (typeof reviver === "string") {
  2451. filename = reviver;
  2452. reviver = null;
  2453. }
  2454. try {
  2455. try {
  2456. return JSON.parse(string, reviver);
  2457. } catch (error) {
  2458. fallback(string, reviver);
  2459. throw error;
  2460. }
  2461. } catch (error) {
  2462. error.message = error.message.replace(/\n/g, "");
  2463. const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/);
  2464. const jsonError = new JSONError(error);
  2465. if (filename) {
  2466. jsonError.fileName = filename;
  2467. }
  2468. if (indexMatch && indexMatch.length > 0) {
  2469. const lines = new LinesAndColumns(string);
  2470. const index = Number(indexMatch[1]);
  2471. const location = lines.locationForIndex(index);
  2472. const codeFrame = codeFrameColumns(
  2473. string,
  2474. { start: { line: location.line + 1, column: location.column + 1 } },
  2475. { highlightCode: true }
  2476. );
  2477. jsonError.codeFrame = codeFrame;
  2478. }
  2479. throw jsonError;
  2480. }
  2481. };
  2482. parseJson.JSONError = JSONError;
  2483. module.exports = parseJson;
  2484. }
  2485. });
  2486. // node_modules/js-yaml/lib/common.js
  2487. var require_common = __commonJS({
  2488. "node_modules/js-yaml/lib/common.js"(exports, module) {
  2489. "use strict";
  2490. function isNothing(subject) {
  2491. return typeof subject === "undefined" || subject === null;
  2492. }
  2493. function isObject(subject) {
  2494. return typeof subject === "object" && subject !== null;
  2495. }
  2496. function toArray(sequence) {
  2497. if (Array.isArray(sequence))
  2498. return sequence;
  2499. else if (isNothing(sequence))
  2500. return [];
  2501. return [sequence];
  2502. }
  2503. function extend(target, source) {
  2504. var index, length, key, sourceKeys;
  2505. if (source) {
  2506. sourceKeys = Object.keys(source);
  2507. for (index = 0, length = sourceKeys.length; index < length; index += 1) {
  2508. key = sourceKeys[index];
  2509. target[key] = source[key];
  2510. }
  2511. }
  2512. return target;
  2513. }
  2514. function repeat(string, count) {
  2515. var result = "", cycle;
  2516. for (cycle = 0; cycle < count; cycle += 1) {
  2517. result += string;
  2518. }
  2519. return result;
  2520. }
  2521. function isNegativeZero(number) {
  2522. return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
  2523. }
  2524. module.exports.isNothing = isNothing;
  2525. module.exports.isObject = isObject;
  2526. module.exports.toArray = toArray;
  2527. module.exports.repeat = repeat;
  2528. module.exports.isNegativeZero = isNegativeZero;
  2529. module.exports.extend = extend;
  2530. }
  2531. });
  2532. // node_modules/js-yaml/lib/exception.js
  2533. var require_exception = __commonJS({
  2534. "node_modules/js-yaml/lib/exception.js"(exports, module) {
  2535. "use strict";
  2536. function formatError(exception, compact) {
  2537. var where = "", message = exception.reason || "(unknown reason)";
  2538. if (!exception.mark)
  2539. return message;
  2540. if (exception.mark.name) {
  2541. where += 'in "' + exception.mark.name + '" ';
  2542. }
  2543. where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")";
  2544. if (!compact && exception.mark.snippet) {
  2545. where += "\n\n" + exception.mark.snippet;
  2546. }
  2547. return message + " " + where;
  2548. }
  2549. function YAMLException(reason, mark) {
  2550. Error.call(this);
  2551. this.name = "YAMLException";
  2552. this.reason = reason;
  2553. this.mark = mark;
  2554. this.message = formatError(this, false);
  2555. if (Error.captureStackTrace) {
  2556. Error.captureStackTrace(this, this.constructor);
  2557. } else {
  2558. this.stack = new Error().stack || "";
  2559. }
  2560. }
  2561. YAMLException.prototype = Object.create(Error.prototype);
  2562. YAMLException.prototype.constructor = YAMLException;
  2563. YAMLException.prototype.toString = function toString(compact) {
  2564. return this.name + ": " + formatError(this, compact);
  2565. };
  2566. module.exports = YAMLException;
  2567. }
  2568. });
  2569. // node_modules/js-yaml/lib/snippet.js
  2570. var require_snippet = __commonJS({
  2571. "node_modules/js-yaml/lib/snippet.js"(exports, module) {
  2572. "use strict";
  2573. var common = require_common();
  2574. function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
  2575. var head = "";
  2576. var tail = "";
  2577. var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
  2578. if (position - lineStart > maxHalfLength) {
  2579. head = " ... ";
  2580. lineStart = position - maxHalfLength + head.length;
  2581. }
  2582. if (lineEnd - position > maxHalfLength) {
  2583. tail = " ...";
  2584. lineEnd = position + maxHalfLength - tail.length;
  2585. }
  2586. return {
  2587. str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail,
  2588. pos: position - lineStart + head.length
  2589. // relative position
  2590. };
  2591. }
  2592. function padStart(string, max) {
  2593. return common.repeat(" ", max - string.length) + string;
  2594. }
  2595. function makeSnippet(mark, options) {
  2596. options = Object.create(options || null);
  2597. if (!mark.buffer)
  2598. return null;
  2599. if (!options.maxLength)
  2600. options.maxLength = 79;
  2601. if (typeof options.indent !== "number")
  2602. options.indent = 1;
  2603. if (typeof options.linesBefore !== "number")
  2604. options.linesBefore = 3;
  2605. if (typeof options.linesAfter !== "number")
  2606. options.linesAfter = 2;
  2607. var re = /\r?\n|\r|\0/g;
  2608. var lineStarts = [0];
  2609. var lineEnds = [];
  2610. var match;
  2611. var foundLineNo = -1;
  2612. while (match = re.exec(mark.buffer)) {
  2613. lineEnds.push(match.index);
  2614. lineStarts.push(match.index + match[0].length);
  2615. if (mark.position <= match.index && foundLineNo < 0) {
  2616. foundLineNo = lineStarts.length - 2;
  2617. }
  2618. }
  2619. if (foundLineNo < 0)
  2620. foundLineNo = lineStarts.length - 1;
  2621. var result = "", i, line;
  2622. var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
  2623. var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
  2624. for (i = 1; i <= options.linesBefore; i++) {
  2625. if (foundLineNo - i < 0)
  2626. break;
  2627. line = getLine(
  2628. mark.buffer,
  2629. lineStarts[foundLineNo - i],
  2630. lineEnds[foundLineNo - i],
  2631. mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
  2632. maxLineLength
  2633. );
  2634. result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result;
  2635. }
  2636. line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
  2637. result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
  2638. result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
  2639. for (i = 1; i <= options.linesAfter; i++) {
  2640. if (foundLineNo + i >= lineEnds.length)
  2641. break;
  2642. line = getLine(
  2643. mark.buffer,
  2644. lineStarts[foundLineNo + i],
  2645. lineEnds[foundLineNo + i],
  2646. mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
  2647. maxLineLength
  2648. );
  2649. result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n";
  2650. }
  2651. return result.replace(/\n$/, "");
  2652. }
  2653. module.exports = makeSnippet;
  2654. }
  2655. });
  2656. // node_modules/js-yaml/lib/type.js
  2657. var require_type = __commonJS({
  2658. "node_modules/js-yaml/lib/type.js"(exports, module) {
  2659. "use strict";
  2660. var YAMLException = require_exception();
  2661. var TYPE_CONSTRUCTOR_OPTIONS = [
  2662. "kind",
  2663. "multi",
  2664. "resolve",
  2665. "construct",
  2666. "instanceOf",
  2667. "predicate",
  2668. "represent",
  2669. "representName",
  2670. "defaultStyle",
  2671. "styleAliases"
  2672. ];
  2673. var YAML_NODE_KINDS = [
  2674. "scalar",
  2675. "sequence",
  2676. "mapping"
  2677. ];
  2678. function compileStyleAliases(map) {
  2679. var result = {};
  2680. if (map !== null) {
  2681. Object.keys(map).forEach(function(style) {
  2682. map[style].forEach(function(alias) {
  2683. result[String(alias)] = style;
  2684. });
  2685. });
  2686. }
  2687. return result;
  2688. }
  2689. function Type(tag, options) {
  2690. options = options || {};
  2691. Object.keys(options).forEach(function(name) {
  2692. if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
  2693. throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
  2694. }
  2695. });
  2696. this.options = options;
  2697. this.tag = tag;
  2698. this.kind = options["kind"] || null;
  2699. this.resolve = options["resolve"] || function() {
  2700. return true;
  2701. };
  2702. this.construct = options["construct"] || function(data) {
  2703. return data;
  2704. };
  2705. this.instanceOf = options["instanceOf"] || null;
  2706. this.predicate = options["predicate"] || null;
  2707. this.represent = options["represent"] || null;
  2708. this.representName = options["representName"] || null;
  2709. this.defaultStyle = options["defaultStyle"] || null;
  2710. this.multi = options["multi"] || false;
  2711. this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
  2712. if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
  2713. throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
  2714. }
  2715. }
  2716. module.exports = Type;
  2717. }
  2718. });
  2719. // node_modules/js-yaml/lib/schema.js
  2720. var require_schema = __commonJS({
  2721. "node_modules/js-yaml/lib/schema.js"(exports, module) {
  2722. "use strict";
  2723. var YAMLException = require_exception();
  2724. var Type = require_type();
  2725. function compileList(schema, name) {
  2726. var result = [];
  2727. schema[name].forEach(function(currentType) {
  2728. var newIndex = result.length;
  2729. result.forEach(function(previousType, previousIndex) {
  2730. if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
  2731. newIndex = previousIndex;
  2732. }
  2733. });
  2734. result[newIndex] = currentType;
  2735. });
  2736. return result;
  2737. }
  2738. function compileMap() {
  2739. var result = {
  2740. scalar: {},
  2741. sequence: {},
  2742. mapping: {},
  2743. fallback: {},
  2744. multi: {
  2745. scalar: [],
  2746. sequence: [],
  2747. mapping: [],
  2748. fallback: []
  2749. }
  2750. }, index, length;
  2751. function collectType(type) {
  2752. if (type.multi) {
  2753. result.multi[type.kind].push(type);
  2754. result.multi["fallback"].push(type);
  2755. } else {
  2756. result[type.kind][type.tag] = result["fallback"][type.tag] = type;
  2757. }
  2758. }
  2759. for (index = 0, length = arguments.length; index < length; index += 1) {
  2760. arguments[index].forEach(collectType);
  2761. }
  2762. return result;
  2763. }
  2764. function Schema(definition) {
  2765. return this.extend(definition);
  2766. }
  2767. Schema.prototype.extend = function extend(definition) {
  2768. var implicit = [];
  2769. var explicit = [];
  2770. if (definition instanceof Type) {
  2771. explicit.push(definition);
  2772. } else if (Array.isArray(definition)) {
  2773. explicit = explicit.concat(definition);
  2774. } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
  2775. if (definition.implicit)
  2776. implicit = implicit.concat(definition.implicit);
  2777. if (definition.explicit)
  2778. explicit = explicit.concat(definition.explicit);
  2779. } else {
  2780. throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
  2781. }
  2782. implicit.forEach(function(type) {
  2783. if (!(type instanceof Type)) {
  2784. throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
  2785. }
  2786. if (type.loadKind && type.loadKind !== "scalar") {
  2787. throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
  2788. }
  2789. if (type.multi) {
  2790. throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
  2791. }
  2792. });
  2793. explicit.forEach(function(type) {
  2794. if (!(type instanceof Type)) {
  2795. throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
  2796. }
  2797. });
  2798. var result = Object.create(Schema.prototype);
  2799. result.implicit = (this.implicit || []).concat(implicit);
  2800. result.explicit = (this.explicit || []).concat(explicit);
  2801. result.compiledImplicit = compileList(result, "implicit");
  2802. result.compiledExplicit = compileList(result, "explicit");
  2803. result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
  2804. return result;
  2805. };
  2806. module.exports = Schema;
  2807. }
  2808. });
  2809. // node_modules/js-yaml/lib/type/str.js
  2810. var require_str = __commonJS({
  2811. "node_modules/js-yaml/lib/type/str.js"(exports, module) {
  2812. "use strict";
  2813. var Type = require_type();
  2814. module.exports = new Type("tag:yaml.org,2002:str", {
  2815. kind: "scalar",
  2816. construct: function(data) {
  2817. return data !== null ? data : "";
  2818. }
  2819. });
  2820. }
  2821. });
  2822. // node_modules/js-yaml/lib/type/seq.js
  2823. var require_seq = __commonJS({
  2824. "node_modules/js-yaml/lib/type/seq.js"(exports, module) {
  2825. "use strict";
  2826. var Type = require_type();
  2827. module.exports = new Type("tag:yaml.org,2002:seq", {
  2828. kind: "sequence",
  2829. construct: function(data) {
  2830. return data !== null ? data : [];
  2831. }
  2832. });
  2833. }
  2834. });
  2835. // node_modules/js-yaml/lib/type/map.js
  2836. var require_map = __commonJS({
  2837. "node_modules/js-yaml/lib/type/map.js"(exports, module) {
  2838. "use strict";
  2839. var Type = require_type();
  2840. module.exports = new Type("tag:yaml.org,2002:map", {
  2841. kind: "mapping",
  2842. construct: function(data) {
  2843. return data !== null ? data : {};
  2844. }
  2845. });
  2846. }
  2847. });
  2848. // node_modules/js-yaml/lib/schema/failsafe.js
  2849. var require_failsafe = __commonJS({
  2850. "node_modules/js-yaml/lib/schema/failsafe.js"(exports, module) {
  2851. "use strict";
  2852. var Schema = require_schema();
  2853. module.exports = new Schema({
  2854. explicit: [
  2855. require_str(),
  2856. require_seq(),
  2857. require_map()
  2858. ]
  2859. });
  2860. }
  2861. });
  2862. // node_modules/js-yaml/lib/type/null.js
  2863. var require_null = __commonJS({
  2864. "node_modules/js-yaml/lib/type/null.js"(exports, module) {
  2865. "use strict";
  2866. var Type = require_type();
  2867. function resolveYamlNull(data) {
  2868. if (data === null)
  2869. return true;
  2870. var max = data.length;
  2871. return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
  2872. }
  2873. function constructYamlNull() {
  2874. return null;
  2875. }
  2876. function isNull(object) {
  2877. return object === null;
  2878. }
  2879. module.exports = new Type("tag:yaml.org,2002:null", {
  2880. kind: "scalar",
  2881. resolve: resolveYamlNull,
  2882. construct: constructYamlNull,
  2883. predicate: isNull,
  2884. represent: {
  2885. canonical: function() {
  2886. return "~";
  2887. },
  2888. lowercase: function() {
  2889. return "null";
  2890. },
  2891. uppercase: function() {
  2892. return "NULL";
  2893. },
  2894. camelcase: function() {
  2895. return "Null";
  2896. },
  2897. empty: function() {
  2898. return "";
  2899. }
  2900. },
  2901. defaultStyle: "lowercase"
  2902. });
  2903. }
  2904. });
  2905. // node_modules/js-yaml/lib/type/bool.js
  2906. var require_bool = __commonJS({
  2907. "node_modules/js-yaml/lib/type/bool.js"(exports, module) {
  2908. "use strict";
  2909. var Type = require_type();
  2910. function resolveYamlBoolean(data) {
  2911. if (data === null)
  2912. return false;
  2913. var max = data.length;
  2914. return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
  2915. }
  2916. function constructYamlBoolean(data) {
  2917. return data === "true" || data === "True" || data === "TRUE";
  2918. }
  2919. function isBoolean(object) {
  2920. return Object.prototype.toString.call(object) === "[object Boolean]";
  2921. }
  2922. module.exports = new Type("tag:yaml.org,2002:bool", {
  2923. kind: "scalar",
  2924. resolve: resolveYamlBoolean,
  2925. construct: constructYamlBoolean,
  2926. predicate: isBoolean,
  2927. represent: {
  2928. lowercase: function(object) {
  2929. return object ? "true" : "false";
  2930. },
  2931. uppercase: function(object) {
  2932. return object ? "TRUE" : "FALSE";
  2933. },
  2934. camelcase: function(object) {
  2935. return object ? "True" : "False";
  2936. }
  2937. },
  2938. defaultStyle: "lowercase"
  2939. });
  2940. }
  2941. });
  2942. // node_modules/js-yaml/lib/type/int.js
  2943. var require_int = __commonJS({
  2944. "node_modules/js-yaml/lib/type/int.js"(exports, module) {
  2945. "use strict";
  2946. var common = require_common();
  2947. var Type = require_type();
  2948. function isHexCode(c) {
  2949. return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
  2950. }
  2951. function isOctCode(c) {
  2952. return 48 <= c && c <= 55;
  2953. }
  2954. function isDecCode(c) {
  2955. return 48 <= c && c <= 57;
  2956. }
  2957. function resolveYamlInteger(data) {
  2958. if (data === null)
  2959. return false;
  2960. var max = data.length, index = 0, hasDigits = false, ch;
  2961. if (!max)
  2962. return false;
  2963. ch = data[index];
  2964. if (ch === "-" || ch === "+") {
  2965. ch = data[++index];
  2966. }
  2967. if (ch === "0") {
  2968. if (index + 1 === max)
  2969. return true;
  2970. ch = data[++index];
  2971. if (ch === "b") {
  2972. index++;
  2973. for (; index < max; index++) {
  2974. ch = data[index];
  2975. if (ch === "_")
  2976. continue;
  2977. if (ch !== "0" && ch !== "1")
  2978. return false;
  2979. hasDigits = true;
  2980. }
  2981. return hasDigits && ch !== "_";
  2982. }
  2983. if (ch === "x") {
  2984. index++;
  2985. for (; index < max; index++) {
  2986. ch = data[index];
  2987. if (ch === "_")
  2988. continue;
  2989. if (!isHexCode(data.charCodeAt(index)))
  2990. return false;
  2991. hasDigits = true;
  2992. }
  2993. return hasDigits && ch !== "_";
  2994. }
  2995. if (ch === "o") {
  2996. index++;
  2997. for (; index < max; index++) {
  2998. ch = data[index];
  2999. if (ch === "_")
  3000. continue;
  3001. if (!isOctCode(data.charCodeAt(index)))
  3002. return false;
  3003. hasDigits = true;
  3004. }
  3005. return hasDigits && ch !== "_";
  3006. }
  3007. }
  3008. if (ch === "_")
  3009. return false;
  3010. for (; index < max; index++) {
  3011. ch = data[index];
  3012. if (ch === "_")
  3013. continue;
  3014. if (!isDecCode(data.charCodeAt(index))) {
  3015. return false;
  3016. }
  3017. hasDigits = true;
  3018. }
  3019. if (!hasDigits || ch === "_")
  3020. return false;
  3021. return true;
  3022. }
  3023. function constructYamlInteger(data) {
  3024. var value = data, sign = 1, ch;
  3025. if (value.indexOf("_") !== -1) {
  3026. value = value.replace(/_/g, "");
  3027. }
  3028. ch = value[0];
  3029. if (ch === "-" || ch === "+") {
  3030. if (ch === "-")
  3031. sign = -1;
  3032. value = value.slice(1);
  3033. ch = value[0];
  3034. }
  3035. if (value === "0")
  3036. return 0;
  3037. if (ch === "0") {
  3038. if (value[1] === "b")
  3039. return sign * parseInt(value.slice(2), 2);
  3040. if (value[1] === "x")
  3041. return sign * parseInt(value.slice(2), 16);
  3042. if (value[1] === "o")
  3043. return sign * parseInt(value.slice(2), 8);
  3044. }
  3045. return sign * parseInt(value, 10);
  3046. }
  3047. function isInteger(object) {
  3048. return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
  3049. }
  3050. module.exports = new Type("tag:yaml.org,2002:int", {
  3051. kind: "scalar",
  3052. resolve: resolveYamlInteger,
  3053. construct: constructYamlInteger,
  3054. predicate: isInteger,
  3055. represent: {
  3056. binary: function(obj) {
  3057. return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
  3058. },
  3059. octal: function(obj) {
  3060. return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1);
  3061. },
  3062. decimal: function(obj) {
  3063. return obj.toString(10);
  3064. },
  3065. /* eslint-disable max-len */
  3066. hexadecimal: function(obj) {
  3067. return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
  3068. }
  3069. },
  3070. defaultStyle: "decimal",
  3071. styleAliases: {
  3072. binary: [2, "bin"],
  3073. octal: [8, "oct"],
  3074. decimal: [10, "dec"],
  3075. hexadecimal: [16, "hex"]
  3076. }
  3077. });
  3078. }
  3079. });
  3080. // node_modules/js-yaml/lib/type/float.js
  3081. var require_float = __commonJS({
  3082. "node_modules/js-yaml/lib/type/float.js"(exports, module) {
  3083. "use strict";
  3084. var common = require_common();
  3085. var Type = require_type();
  3086. var YAML_FLOAT_PATTERN = new RegExp(
  3087. // 2.5e4, 2.5 and integers
  3088. "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
  3089. );
  3090. function resolveYamlFloat(data) {
  3091. if (data === null)
  3092. return false;
  3093. if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_`
  3094. // Probably should update regexp & check speed
  3095. data[data.length - 1] === "_") {
  3096. return false;
  3097. }
  3098. return true;
  3099. }
  3100. function constructYamlFloat(data) {
  3101. var value, sign;
  3102. value = data.replace(/_/g, "").toLowerCase();
  3103. sign = value[0] === "-" ? -1 : 1;
  3104. if ("+-".indexOf(value[0]) >= 0) {
  3105. value = value.slice(1);
  3106. }
  3107. if (value === ".inf") {
  3108. return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
  3109. } else if (value === ".nan") {
  3110. return NaN;
  3111. }
  3112. return sign * parseFloat(value, 10);
  3113. }
  3114. var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
  3115. function representYamlFloat(object, style) {
  3116. var res;
  3117. if (isNaN(object)) {
  3118. switch (style) {
  3119. case "lowercase":
  3120. return ".nan";
  3121. case "uppercase":
  3122. return ".NAN";
  3123. case "camelcase":
  3124. return ".NaN";
  3125. }
  3126. } else if (Number.POSITIVE_INFINITY === object) {
  3127. switch (style) {
  3128. case "lowercase":
  3129. return ".inf";
  3130. case "uppercase":
  3131. return ".INF";
  3132. case "camelcase":
  3133. return ".Inf";
  3134. }
  3135. } else if (Number.NEGATIVE_INFINITY === object) {
  3136. switch (style) {
  3137. case "lowercase":
  3138. return "-.inf";
  3139. case "uppercase":
  3140. return "-.INF";
  3141. case "camelcase":
  3142. return "-.Inf";
  3143. }
  3144. } else if (common.isNegativeZero(object)) {
  3145. return "-0.0";
  3146. }
  3147. res = object.toString(10);
  3148. return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
  3149. }
  3150. function isFloat(object) {
  3151. return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
  3152. }
  3153. module.exports = new Type("tag:yaml.org,2002:float", {
  3154. kind: "scalar",
  3155. resolve: resolveYamlFloat,
  3156. construct: constructYamlFloat,
  3157. predicate: isFloat,
  3158. represent: representYamlFloat,
  3159. defaultStyle: "lowercase"
  3160. });
  3161. }
  3162. });
  3163. // node_modules/js-yaml/lib/schema/json.js
  3164. var require_json = __commonJS({
  3165. "node_modules/js-yaml/lib/schema/json.js"(exports, module) {
  3166. "use strict";
  3167. module.exports = require_failsafe().extend({
  3168. implicit: [
  3169. require_null(),
  3170. require_bool(),
  3171. require_int(),
  3172. require_float()
  3173. ]
  3174. });
  3175. }
  3176. });
  3177. // node_modules/js-yaml/lib/schema/core.js
  3178. var require_core = __commonJS({
  3179. "node_modules/js-yaml/lib/schema/core.js"(exports, module) {
  3180. "use strict";
  3181. module.exports = require_json();
  3182. }
  3183. });
  3184. // node_modules/js-yaml/lib/type/timestamp.js
  3185. var require_timestamp = __commonJS({
  3186. "node_modules/js-yaml/lib/type/timestamp.js"(exports, module) {
  3187. "use strict";
  3188. var Type = require_type();
  3189. var YAML_DATE_REGEXP = new RegExp(
  3190. "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
  3191. );
  3192. var YAML_TIMESTAMP_REGEXP = new RegExp(
  3193. "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
  3194. );
  3195. function resolveYamlTimestamp(data) {
  3196. if (data === null)
  3197. return false;
  3198. if (YAML_DATE_REGEXP.exec(data) !== null)
  3199. return true;
  3200. if (YAML_TIMESTAMP_REGEXP.exec(data) !== null)
  3201. return true;
  3202. return false;
  3203. }
  3204. function constructYamlTimestamp(data) {
  3205. var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
  3206. match = YAML_DATE_REGEXP.exec(data);
  3207. if (match === null)
  3208. match = YAML_TIMESTAMP_REGEXP.exec(data);
  3209. if (match === null)
  3210. throw new Error("Date resolve error");
  3211. year = +match[1];
  3212. month = +match[2] - 1;
  3213. day = +match[3];
  3214. if (!match[4]) {
  3215. return new Date(Date.UTC(year, month, day));
  3216. }
  3217. hour = +match[4];
  3218. minute = +match[5];
  3219. second = +match[6];
  3220. if (match[7]) {
  3221. fraction = match[7].slice(0, 3);
  3222. while (fraction.length < 3) {
  3223. fraction += "0";
  3224. }
  3225. fraction = +fraction;
  3226. }
  3227. if (match[9]) {
  3228. tz_hour = +match[10];
  3229. tz_minute = +(match[11] || 0);
  3230. delta = (tz_hour * 60 + tz_minute) * 6e4;
  3231. if (match[9] === "-")
  3232. delta = -delta;
  3233. }
  3234. date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
  3235. if (delta)
  3236. date.setTime(date.getTime() - delta);
  3237. return date;
  3238. }
  3239. function representYamlTimestamp(object) {
  3240. return object.toISOString();
  3241. }
  3242. module.exports = new Type("tag:yaml.org,2002:timestamp", {
  3243. kind: "scalar",
  3244. resolve: resolveYamlTimestamp,
  3245. construct: constructYamlTimestamp,
  3246. instanceOf: Date,
  3247. represent: representYamlTimestamp
  3248. });
  3249. }
  3250. });
  3251. // node_modules/js-yaml/lib/type/merge.js
  3252. var require_merge = __commonJS({
  3253. "node_modules/js-yaml/lib/type/merge.js"(exports, module) {
  3254. "use strict";
  3255. var Type = require_type();
  3256. function resolveYamlMerge(data) {
  3257. return data === "<<" || data === null;
  3258. }
  3259. module.exports = new Type("tag:yaml.org,2002:merge", {
  3260. kind: "scalar",
  3261. resolve: resolveYamlMerge
  3262. });
  3263. }
  3264. });
  3265. // node_modules/js-yaml/lib/type/binary.js
  3266. var require_binary = __commonJS({
  3267. "node_modules/js-yaml/lib/type/binary.js"(exports, module) {
  3268. "use strict";
  3269. var Type = require_type();
  3270. var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
  3271. function resolveYamlBinary(data) {
  3272. if (data === null)
  3273. return false;
  3274. var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
  3275. for (idx = 0; idx < max; idx++) {
  3276. code = map.indexOf(data.charAt(idx));
  3277. if (code > 64)
  3278. continue;
  3279. if (code < 0)
  3280. return false;
  3281. bitlen += 6;
  3282. }
  3283. return bitlen % 8 === 0;
  3284. }
  3285. function constructYamlBinary(data) {
  3286. var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = [];
  3287. for (idx = 0; idx < max; idx++) {
  3288. if (idx % 4 === 0 && idx) {
  3289. result.push(bits >> 16 & 255);
  3290. result.push(bits >> 8 & 255);
  3291. result.push(bits & 255);
  3292. }
  3293. bits = bits << 6 | map.indexOf(input.charAt(idx));
  3294. }
  3295. tailbits = max % 4 * 6;
  3296. if (tailbits === 0) {
  3297. result.push(bits >> 16 & 255);
  3298. result.push(bits >> 8 & 255);
  3299. result.push(bits & 255);
  3300. } else if (tailbits === 18) {
  3301. result.push(bits >> 10 & 255);
  3302. result.push(bits >> 2 & 255);
  3303. } else if (tailbits === 12) {
  3304. result.push(bits >> 4 & 255);
  3305. }
  3306. return new Uint8Array(result);
  3307. }
  3308. function representYamlBinary(object) {
  3309. var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP;
  3310. for (idx = 0; idx < max; idx++) {
  3311. if (idx % 3 === 0 && idx) {
  3312. result += map[bits >> 18 & 63];
  3313. result += map[bits >> 12 & 63];
  3314. result += map[bits >> 6 & 63];
  3315. result += map[bits & 63];
  3316. }
  3317. bits = (bits << 8) + object[idx];
  3318. }
  3319. tail = max % 3;
  3320. if (tail === 0) {
  3321. result += map[bits >> 18 & 63];
  3322. result += map[bits >> 12 & 63];
  3323. result += map[bits >> 6 & 63];
  3324. result += map[bits & 63];
  3325. } else if (tail === 2) {
  3326. result += map[bits >> 10 & 63];
  3327. result += map[bits >> 4 & 63];
  3328. result += map[bits << 2 & 63];
  3329. result += map[64];
  3330. } else if (tail === 1) {
  3331. result += map[bits >> 2 & 63];
  3332. result += map[bits << 4 & 63];
  3333. result += map[64];
  3334. result += map[64];
  3335. }
  3336. return result;
  3337. }
  3338. function isBinary(obj) {
  3339. return Object.prototype.toString.call(obj) === "[object Uint8Array]";
  3340. }
  3341. module.exports = new Type("tag:yaml.org,2002:binary", {
  3342. kind: "scalar",
  3343. resolve: resolveYamlBinary,
  3344. construct: constructYamlBinary,
  3345. predicate: isBinary,
  3346. represent: representYamlBinary
  3347. });
  3348. }
  3349. });
  3350. // node_modules/js-yaml/lib/type/omap.js
  3351. var require_omap = __commonJS({
  3352. "node_modules/js-yaml/lib/type/omap.js"(exports, module) {
  3353. "use strict";
  3354. var Type = require_type();
  3355. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  3356. var _toString = Object.prototype.toString;
  3357. function resolveYamlOmap(data) {
  3358. if (data === null)
  3359. return true;
  3360. var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
  3361. for (index = 0, length = object.length; index < length; index += 1) {
  3362. pair = object[index];
  3363. pairHasKey = false;
  3364. if (_toString.call(pair) !== "[object Object]")
  3365. return false;
  3366. for (pairKey in pair) {
  3367. if (_hasOwnProperty.call(pair, pairKey)) {
  3368. if (!pairHasKey)
  3369. pairHasKey = true;
  3370. else
  3371. return false;
  3372. }
  3373. }
  3374. if (!pairHasKey)
  3375. return false;
  3376. if (objectKeys.indexOf(pairKey) === -1)
  3377. objectKeys.push(pairKey);
  3378. else
  3379. return false;
  3380. }
  3381. return true;
  3382. }
  3383. function constructYamlOmap(data) {
  3384. return data !== null ? data : [];
  3385. }
  3386. module.exports = new Type("tag:yaml.org,2002:omap", {
  3387. kind: "sequence",
  3388. resolve: resolveYamlOmap,
  3389. construct: constructYamlOmap
  3390. });
  3391. }
  3392. });
  3393. // node_modules/js-yaml/lib/type/pairs.js
  3394. var require_pairs = __commonJS({
  3395. "node_modules/js-yaml/lib/type/pairs.js"(exports, module) {
  3396. "use strict";
  3397. var Type = require_type();
  3398. var _toString = Object.prototype.toString;
  3399. function resolveYamlPairs(data) {
  3400. if (data === null)
  3401. return true;
  3402. var index, length, pair, keys, result, object = data;
  3403. result = new Array(object.length);
  3404. for (index = 0, length = object.length; index < length; index += 1) {
  3405. pair = object[index];
  3406. if (_toString.call(pair) !== "[object Object]")
  3407. return false;
  3408. keys = Object.keys(pair);
  3409. if (keys.length !== 1)
  3410. return false;
  3411. result[index] = [keys[0], pair[keys[0]]];
  3412. }
  3413. return true;
  3414. }
  3415. function constructYamlPairs(data) {
  3416. if (data === null)
  3417. return [];
  3418. var index, length, pair, keys, result, object = data;
  3419. result = new Array(object.length);
  3420. for (index = 0, length = object.length; index < length; index += 1) {
  3421. pair = object[index];
  3422. keys = Object.keys(pair);
  3423. result[index] = [keys[0], pair[keys[0]]];
  3424. }
  3425. return result;
  3426. }
  3427. module.exports = new Type("tag:yaml.org,2002:pairs", {
  3428. kind: "sequence",
  3429. resolve: resolveYamlPairs,
  3430. construct: constructYamlPairs
  3431. });
  3432. }
  3433. });
  3434. // node_modules/js-yaml/lib/type/set.js
  3435. var require_set = __commonJS({
  3436. "node_modules/js-yaml/lib/type/set.js"(exports, module) {
  3437. "use strict";
  3438. var Type = require_type();
  3439. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  3440. function resolveYamlSet(data) {
  3441. if (data === null)
  3442. return true;
  3443. var key, object = data;
  3444. for (key in object) {
  3445. if (_hasOwnProperty.call(object, key)) {
  3446. if (object[key] !== null)
  3447. return false;
  3448. }
  3449. }
  3450. return true;
  3451. }
  3452. function constructYamlSet(data) {
  3453. return data !== null ? data : {};
  3454. }
  3455. module.exports = new Type("tag:yaml.org,2002:set", {
  3456. kind: "mapping",
  3457. resolve: resolveYamlSet,
  3458. construct: constructYamlSet
  3459. });
  3460. }
  3461. });
  3462. // node_modules/js-yaml/lib/schema/default.js
  3463. var require_default = __commonJS({
  3464. "node_modules/js-yaml/lib/schema/default.js"(exports, module) {
  3465. "use strict";
  3466. module.exports = require_core().extend({
  3467. implicit: [
  3468. require_timestamp(),
  3469. require_merge()
  3470. ],
  3471. explicit: [
  3472. require_binary(),
  3473. require_omap(),
  3474. require_pairs(),
  3475. require_set()
  3476. ]
  3477. });
  3478. }
  3479. });
  3480. // node_modules/js-yaml/lib/loader.js
  3481. var require_loader = __commonJS({
  3482. "node_modules/js-yaml/lib/loader.js"(exports, module) {
  3483. "use strict";
  3484. var common = require_common();
  3485. var YAMLException = require_exception();
  3486. var makeSnippet = require_snippet();
  3487. var DEFAULT_SCHEMA = require_default();
  3488. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  3489. var CONTEXT_FLOW_IN = 1;
  3490. var CONTEXT_FLOW_OUT = 2;
  3491. var CONTEXT_BLOCK_IN = 3;
  3492. var CONTEXT_BLOCK_OUT = 4;
  3493. var CHOMPING_CLIP = 1;
  3494. var CHOMPING_STRIP = 2;
  3495. var CHOMPING_KEEP = 3;
  3496. var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
  3497. var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
  3498. var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
  3499. var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
  3500. var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
  3501. function _class(obj) {
  3502. return Object.prototype.toString.call(obj);
  3503. }
  3504. function is_EOL(c) {
  3505. return c === 10 || c === 13;
  3506. }
  3507. function is_WHITE_SPACE(c) {
  3508. return c === 9 || c === 32;
  3509. }
  3510. function is_WS_OR_EOL(c) {
  3511. return c === 9 || c === 32 || c === 10 || c === 13;
  3512. }
  3513. function is_FLOW_INDICATOR(c) {
  3514. return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
  3515. }
  3516. function fromHexCode(c) {
  3517. var lc;
  3518. if (48 <= c && c <= 57) {
  3519. return c - 48;
  3520. }
  3521. lc = c | 32;
  3522. if (97 <= lc && lc <= 102) {
  3523. return lc - 97 + 10;
  3524. }
  3525. return -1;
  3526. }
  3527. function escapedHexLen(c) {
  3528. if (c === 120) {
  3529. return 2;
  3530. }
  3531. if (c === 117) {
  3532. return 4;
  3533. }
  3534. if (c === 85) {
  3535. return 8;
  3536. }
  3537. return 0;
  3538. }
  3539. function fromDecimalCode(c) {
  3540. if (48 <= c && c <= 57) {
  3541. return c - 48;
  3542. }
  3543. return -1;
  3544. }
  3545. function simpleEscapeSequence(c) {
  3546. return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
  3547. }
  3548. function charFromCodepoint(c) {
  3549. if (c <= 65535) {
  3550. return String.fromCharCode(c);
  3551. }
  3552. return String.fromCharCode(
  3553. (c - 65536 >> 10) + 55296,
  3554. (c - 65536 & 1023) + 56320
  3555. );
  3556. }
  3557. var simpleEscapeCheck = new Array(256);
  3558. var simpleEscapeMap = new Array(256);
  3559. for (i = 0; i < 256; i++) {
  3560. simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
  3561. simpleEscapeMap[i] = simpleEscapeSequence(i);
  3562. }
  3563. var i;
  3564. function State(input, options) {
  3565. this.input = input;
  3566. this.filename = options["filename"] || null;
  3567. this.schema = options["schema"] || DEFAULT_SCHEMA;
  3568. this.onWarning = options["onWarning"] || null;
  3569. this.legacy = options["legacy"] || false;
  3570. this.json = options["json"] || false;
  3571. this.listener = options["listener"] || null;
  3572. this.implicitTypes = this.schema.compiledImplicit;
  3573. this.typeMap = this.schema.compiledTypeMap;
  3574. this.length = input.length;
  3575. this.position = 0;
  3576. this.line = 0;
  3577. this.lineStart = 0;
  3578. this.lineIndent = 0;
  3579. this.firstTabInLine = -1;
  3580. this.documents = [];
  3581. }
  3582. function generateError(state, message) {
  3583. var mark = {
  3584. name: state.filename,
  3585. buffer: state.input.slice(0, -1),
  3586. // omit trailing \0
  3587. position: state.position,
  3588. line: state.line,
  3589. column: state.position - state.lineStart
  3590. };
  3591. mark.snippet = makeSnippet(mark);
  3592. return new YAMLException(message, mark);
  3593. }
  3594. function throwError(state, message) {
  3595. throw generateError(state, message);
  3596. }
  3597. function throwWarning(state, message) {
  3598. if (state.onWarning) {
  3599. state.onWarning.call(null, generateError(state, message));
  3600. }
  3601. }
  3602. var directiveHandlers = {
  3603. YAML: function handleYamlDirective(state, name, args) {
  3604. var match, major, minor;
  3605. if (state.version !== null) {
  3606. throwError(state, "duplication of %YAML directive");
  3607. }
  3608. if (args.length !== 1) {
  3609. throwError(state, "YAML directive accepts exactly one argument");
  3610. }
  3611. match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
  3612. if (match === null) {
  3613. throwError(state, "ill-formed argument of the YAML directive");
  3614. }
  3615. major = parseInt(match[1], 10);
  3616. minor = parseInt(match[2], 10);
  3617. if (major !== 1) {
  3618. throwError(state, "unacceptable YAML version of the document");
  3619. }
  3620. state.version = args[0];
  3621. state.checkLineBreaks = minor < 2;
  3622. if (minor !== 1 && minor !== 2) {
  3623. throwWarning(state, "unsupported YAML version of the document");
  3624. }
  3625. },
  3626. TAG: function handleTagDirective(state, name, args) {
  3627. var handle, prefix;
  3628. if (args.length !== 2) {
  3629. throwError(state, "TAG directive accepts exactly two arguments");
  3630. }
  3631. handle = args[0];
  3632. prefix = args[1];
  3633. if (!PATTERN_TAG_HANDLE.test(handle)) {
  3634. throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
  3635. }
  3636. if (_hasOwnProperty.call(state.tagMap, handle)) {
  3637. throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
  3638. }
  3639. if (!PATTERN_TAG_URI.test(prefix)) {
  3640. throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
  3641. }
  3642. try {
  3643. prefix = decodeURIComponent(prefix);
  3644. } catch (err) {
  3645. throwError(state, "tag prefix is malformed: " + prefix);
  3646. }
  3647. state.tagMap[handle] = prefix;
  3648. }
  3649. };
  3650. function captureSegment(state, start, end, checkJson) {
  3651. var _position, _length, _character, _result;
  3652. if (start < end) {
  3653. _result = state.input.slice(start, end);
  3654. if (checkJson) {
  3655. for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
  3656. _character = _result.charCodeAt(_position);
  3657. if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
  3658. throwError(state, "expected valid JSON character");
  3659. }
  3660. }
  3661. } else if (PATTERN_NON_PRINTABLE.test(_result)) {
  3662. throwError(state, "the stream contains non-printable characters");
  3663. }
  3664. state.result += _result;
  3665. }
  3666. }
  3667. function mergeMappings(state, destination, source, overridableKeys) {
  3668. var sourceKeys, key, index, quantity;
  3669. if (!common.isObject(source)) {
  3670. throwError(state, "cannot merge mappings; the provided source object is unacceptable");
  3671. }
  3672. sourceKeys = Object.keys(source);
  3673. for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
  3674. key = sourceKeys[index];
  3675. if (!_hasOwnProperty.call(destination, key)) {
  3676. destination[key] = source[key];
  3677. overridableKeys[key] = true;
  3678. }
  3679. }
  3680. }
  3681. function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
  3682. var index, quantity;
  3683. if (Array.isArray(keyNode)) {
  3684. keyNode = Array.prototype.slice.call(keyNode);
  3685. for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
  3686. if (Array.isArray(keyNode[index])) {
  3687. throwError(state, "nested arrays are not supported inside keys");
  3688. }
  3689. if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
  3690. keyNode[index] = "[object Object]";
  3691. }
  3692. }
  3693. }
  3694. if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
  3695. keyNode = "[object Object]";
  3696. }
  3697. keyNode = String(keyNode);
  3698. if (_result === null) {
  3699. _result = {};
  3700. }
  3701. if (keyTag === "tag:yaml.org,2002:merge") {
  3702. if (Array.isArray(valueNode)) {
  3703. for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
  3704. mergeMappings(state, _result, valueNode[index], overridableKeys);
  3705. }
  3706. } else {
  3707. mergeMappings(state, _result, valueNode, overridableKeys);
  3708. }
  3709. } else {
  3710. if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
  3711. state.line = startLine || state.line;
  3712. state.lineStart = startLineStart || state.lineStart;
  3713. state.position = startPos || state.position;
  3714. throwError(state, "duplicated mapping key");
  3715. }
  3716. if (keyNode === "__proto__") {
  3717. Object.defineProperty(_result, keyNode, {
  3718. configurable: true,
  3719. enumerable: true,
  3720. writable: true,
  3721. value: valueNode
  3722. });
  3723. } else {
  3724. _result[keyNode] = valueNode;
  3725. }
  3726. delete overridableKeys[keyNode];
  3727. }
  3728. return _result;
  3729. }
  3730. function readLineBreak(state) {
  3731. var ch;
  3732. ch = state.input.charCodeAt(state.position);
  3733. if (ch === 10) {
  3734. state.position++;
  3735. } else if (ch === 13) {
  3736. state.position++;
  3737. if (state.input.charCodeAt(state.position) === 10) {
  3738. state.position++;
  3739. }
  3740. } else {
  3741. throwError(state, "a line break is expected");
  3742. }
  3743. state.line += 1;
  3744. state.lineStart = state.position;
  3745. state.firstTabInLine = -1;
  3746. }
  3747. function skipSeparationSpace(state, allowComments, checkIndent) {
  3748. var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
  3749. while (ch !== 0) {
  3750. while (is_WHITE_SPACE(ch)) {
  3751. if (ch === 9 && state.firstTabInLine === -1) {
  3752. state.firstTabInLine = state.position;
  3753. }
  3754. ch = state.input.charCodeAt(++state.position);
  3755. }
  3756. if (allowComments && ch === 35) {
  3757. do {
  3758. ch = state.input.charCodeAt(++state.position);
  3759. } while (ch !== 10 && ch !== 13 && ch !== 0);
  3760. }
  3761. if (is_EOL(ch)) {
  3762. readLineBreak(state);
  3763. ch = state.input.charCodeAt(state.position);
  3764. lineBreaks++;
  3765. state.lineIndent = 0;
  3766. while (ch === 32) {
  3767. state.lineIndent++;
  3768. ch = state.input.charCodeAt(++state.position);
  3769. }
  3770. } else {
  3771. break;
  3772. }
  3773. }
  3774. if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
  3775. throwWarning(state, "deficient indentation");
  3776. }
  3777. return lineBreaks;
  3778. }
  3779. function testDocumentSeparator(state) {
  3780. var _position = state.position, ch;
  3781. ch = state.input.charCodeAt(_position);
  3782. if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
  3783. _position += 3;
  3784. ch = state.input.charCodeAt(_position);
  3785. if (ch === 0 || is_WS_OR_EOL(ch)) {
  3786. return true;
  3787. }
  3788. }
  3789. return false;
  3790. }
  3791. function writeFoldedLines(state, count) {
  3792. if (count === 1) {
  3793. state.result += " ";
  3794. } else if (count > 1) {
  3795. state.result += common.repeat("\n", count - 1);
  3796. }
  3797. }
  3798. function readPlainScalar(state, nodeIndent, withinFlowCollection) {
  3799. var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
  3800. ch = state.input.charCodeAt(state.position);
  3801. if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
  3802. return false;
  3803. }
  3804. if (ch === 63 || ch === 45) {
  3805. following = state.input.charCodeAt(state.position + 1);
  3806. if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
  3807. return false;
  3808. }
  3809. }
  3810. state.kind = "scalar";
  3811. state.result = "";
  3812. captureStart = captureEnd = state.position;
  3813. hasPendingContent = false;
  3814. while (ch !== 0) {
  3815. if (ch === 58) {
  3816. following = state.input.charCodeAt(state.position + 1);
  3817. if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
  3818. break;
  3819. }
  3820. } else if (ch === 35) {
  3821. preceding = state.input.charCodeAt(state.position - 1);
  3822. if (is_WS_OR_EOL(preceding)) {
  3823. break;
  3824. }
  3825. } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
  3826. break;
  3827. } else if (is_EOL(ch)) {
  3828. _line = state.line;
  3829. _lineStart = state.lineStart;
  3830. _lineIndent = state.lineIndent;
  3831. skipSeparationSpace(state, false, -1);
  3832. if (state.lineIndent >= nodeIndent) {
  3833. hasPendingContent = true;
  3834. ch = state.input.charCodeAt(state.position);
  3835. continue;
  3836. } else {
  3837. state.position = captureEnd;
  3838. state.line = _line;
  3839. state.lineStart = _lineStart;
  3840. state.lineIndent = _lineIndent;
  3841. break;
  3842. }
  3843. }
  3844. if (hasPendingContent) {
  3845. captureSegment(state, captureStart, captureEnd, false);
  3846. writeFoldedLines(state, state.line - _line);
  3847. captureStart = captureEnd = state.position;
  3848. hasPendingContent = false;
  3849. }
  3850. if (!is_WHITE_SPACE(ch)) {
  3851. captureEnd = state.position + 1;
  3852. }
  3853. ch = state.input.charCodeAt(++state.position);
  3854. }
  3855. captureSegment(state, captureStart, captureEnd, false);
  3856. if (state.result) {
  3857. return true;
  3858. }
  3859. state.kind = _kind;
  3860. state.result = _result;
  3861. return false;
  3862. }
  3863. function readSingleQuotedScalar(state, nodeIndent) {
  3864. var ch, captureStart, captureEnd;
  3865. ch = state.input.charCodeAt(state.position);
  3866. if (ch !== 39) {
  3867. return false;
  3868. }
  3869. state.kind = "scalar";
  3870. state.result = "";
  3871. state.position++;
  3872. captureStart = captureEnd = state.position;
  3873. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  3874. if (ch === 39) {
  3875. captureSegment(state, captureStart, state.position, true);
  3876. ch = state.input.charCodeAt(++state.position);
  3877. if (ch === 39) {
  3878. captureStart = state.position;
  3879. state.position++;
  3880. captureEnd = state.position;
  3881. } else {
  3882. return true;
  3883. }
  3884. } else if (is_EOL(ch)) {
  3885. captureSegment(state, captureStart, captureEnd, true);
  3886. writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
  3887. captureStart = captureEnd = state.position;
  3888. } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
  3889. throwError(state, "unexpected end of the document within a single quoted scalar");
  3890. } else {
  3891. state.position++;
  3892. captureEnd = state.position;
  3893. }
  3894. }
  3895. throwError(state, "unexpected end of the stream within a single quoted scalar");
  3896. }
  3897. function readDoubleQuotedScalar(state, nodeIndent) {
  3898. var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
  3899. ch = state.input.charCodeAt(state.position);
  3900. if (ch !== 34) {
  3901. return false;
  3902. }
  3903. state.kind = "scalar";
  3904. state.result = "";
  3905. state.position++;
  3906. captureStart = captureEnd = state.position;
  3907. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  3908. if (ch === 34) {
  3909. captureSegment(state, captureStart, state.position, true);
  3910. state.position++;
  3911. return true;
  3912. } else if (ch === 92) {
  3913. captureSegment(state, captureStart, state.position, true);
  3914. ch = state.input.charCodeAt(++state.position);
  3915. if (is_EOL(ch)) {
  3916. skipSeparationSpace(state, false, nodeIndent);
  3917. } else if (ch < 256 && simpleEscapeCheck[ch]) {
  3918. state.result += simpleEscapeMap[ch];
  3919. state.position++;
  3920. } else if ((tmp = escapedHexLen(ch)) > 0) {
  3921. hexLength = tmp;
  3922. hexResult = 0;
  3923. for (; hexLength > 0; hexLength--) {
  3924. ch = state.input.charCodeAt(++state.position);
  3925. if ((tmp = fromHexCode(ch)) >= 0) {
  3926. hexResult = (hexResult << 4) + tmp;
  3927. } else {
  3928. throwError(state, "expected hexadecimal character");
  3929. }
  3930. }
  3931. state.result += charFromCodepoint(hexResult);
  3932. state.position++;
  3933. } else {
  3934. throwError(state, "unknown escape sequence");
  3935. }
  3936. captureStart = captureEnd = state.position;
  3937. } else if (is_EOL(ch)) {
  3938. captureSegment(state, captureStart, captureEnd, true);
  3939. writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
  3940. captureStart = captureEnd = state.position;
  3941. } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
  3942. throwError(state, "unexpected end of the document within a double quoted scalar");
  3943. } else {
  3944. state.position++;
  3945. captureEnd = state.position;
  3946. }
  3947. }
  3948. throwError(state, "unexpected end of the stream within a double quoted scalar");
  3949. }
  3950. function readFlowCollection(state, nodeIndent) {
  3951. var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch;
  3952. ch = state.input.charCodeAt(state.position);
  3953. if (ch === 91) {
  3954. terminator = 93;
  3955. isMapping = false;
  3956. _result = [];
  3957. } else if (ch === 123) {
  3958. terminator = 125;
  3959. isMapping = true;
  3960. _result = {};
  3961. } else {
  3962. return false;
  3963. }
  3964. if (state.anchor !== null) {
  3965. state.anchorMap[state.anchor] = _result;
  3966. }
  3967. ch = state.input.charCodeAt(++state.position);
  3968. while (ch !== 0) {
  3969. skipSeparationSpace(state, true, nodeIndent);
  3970. ch = state.input.charCodeAt(state.position);
  3971. if (ch === terminator) {
  3972. state.position++;
  3973. state.tag = _tag;
  3974. state.anchor = _anchor;
  3975. state.kind = isMapping ? "mapping" : "sequence";
  3976. state.result = _result;
  3977. return true;
  3978. } else if (!readNext) {
  3979. throwError(state, "missed comma between flow collection entries");
  3980. } else if (ch === 44) {
  3981. throwError(state, "expected the node content, but found ','");
  3982. }
  3983. keyTag = keyNode = valueNode = null;
  3984. isPair = isExplicitPair = false;
  3985. if (ch === 63) {
  3986. following = state.input.charCodeAt(state.position + 1);
  3987. if (is_WS_OR_EOL(following)) {
  3988. isPair = isExplicitPair = true;
  3989. state.position++;
  3990. skipSeparationSpace(state, true, nodeIndent);
  3991. }
  3992. }
  3993. _line = state.line;
  3994. _lineStart = state.lineStart;
  3995. _pos = state.position;
  3996. composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
  3997. keyTag = state.tag;
  3998. keyNode = state.result;
  3999. skipSeparationSpace(state, true, nodeIndent);
  4000. ch = state.input.charCodeAt(state.position);
  4001. if ((isExplicitPair || state.line === _line) && ch === 58) {
  4002. isPair = true;
  4003. ch = state.input.charCodeAt(++state.position);
  4004. skipSeparationSpace(state, true, nodeIndent);
  4005. composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
  4006. valueNode = state.result;
  4007. }
  4008. if (isMapping) {
  4009. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
  4010. } else if (isPair) {
  4011. _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
  4012. } else {
  4013. _result.push(keyNode);
  4014. }
  4015. skipSeparationSpace(state, true, nodeIndent);
  4016. ch = state.input.charCodeAt(state.position);
  4017. if (ch === 44) {
  4018. readNext = true;
  4019. ch = state.input.charCodeAt(++state.position);
  4020. } else {
  4021. readNext = false;
  4022. }
  4023. }
  4024. throwError(state, "unexpected end of the stream within a flow collection");
  4025. }
  4026. function readBlockScalar(state, nodeIndent) {
  4027. var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
  4028. ch = state.input.charCodeAt(state.position);
  4029. if (ch === 124) {
  4030. folding = false;
  4031. } else if (ch === 62) {
  4032. folding = true;
  4033. } else {
  4034. return false;
  4035. }
  4036. state.kind = "scalar";
  4037. state.result = "";
  4038. while (ch !== 0) {
  4039. ch = state.input.charCodeAt(++state.position);
  4040. if (ch === 43 || ch === 45) {
  4041. if (CHOMPING_CLIP === chomping) {
  4042. chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
  4043. } else {
  4044. throwError(state, "repeat of a chomping mode identifier");
  4045. }
  4046. } else if ((tmp = fromDecimalCode(ch)) >= 0) {
  4047. if (tmp === 0) {
  4048. throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
  4049. } else if (!detectedIndent) {
  4050. textIndent = nodeIndent + tmp - 1;
  4051. detectedIndent = true;
  4052. } else {
  4053. throwError(state, "repeat of an indentation width identifier");
  4054. }
  4055. } else {
  4056. break;
  4057. }
  4058. }
  4059. if (is_WHITE_SPACE(ch)) {
  4060. do {
  4061. ch = state.input.charCodeAt(++state.position);
  4062. } while (is_WHITE_SPACE(ch));
  4063. if (ch === 35) {
  4064. do {
  4065. ch = state.input.charCodeAt(++state.position);
  4066. } while (!is_EOL(ch) && ch !== 0);
  4067. }
  4068. }
  4069. while (ch !== 0) {
  4070. readLineBreak(state);
  4071. state.lineIndent = 0;
  4072. ch = state.input.charCodeAt(state.position);
  4073. while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) {
  4074. state.lineIndent++;
  4075. ch = state.input.charCodeAt(++state.position);
  4076. }
  4077. if (!detectedIndent && state.lineIndent > textIndent) {
  4078. textIndent = state.lineIndent;
  4079. }
  4080. if (is_EOL(ch)) {
  4081. emptyLines++;
  4082. continue;
  4083. }
  4084. if (state.lineIndent < textIndent) {
  4085. if (chomping === CHOMPING_KEEP) {
  4086. state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
  4087. } else if (chomping === CHOMPING_CLIP) {
  4088. if (didReadContent) {
  4089. state.result += "\n";
  4090. }
  4091. }
  4092. break;
  4093. }
  4094. if (folding) {
  4095. if (is_WHITE_SPACE(ch)) {
  4096. atMoreIndented = true;
  4097. state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
  4098. } else if (atMoreIndented) {
  4099. atMoreIndented = false;
  4100. state.result += common.repeat("\n", emptyLines + 1);
  4101. } else if (emptyLines === 0) {
  4102. if (didReadContent) {
  4103. state.result += " ";
  4104. }
  4105. } else {
  4106. state.result += common.repeat("\n", emptyLines);
  4107. }
  4108. } else {
  4109. state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
  4110. }
  4111. didReadContent = true;
  4112. detectedIndent = true;
  4113. emptyLines = 0;
  4114. captureStart = state.position;
  4115. while (!is_EOL(ch) && ch !== 0) {
  4116. ch = state.input.charCodeAt(++state.position);
  4117. }
  4118. captureSegment(state, captureStart, state.position, false);
  4119. }
  4120. return true;
  4121. }
  4122. function readBlockSequence(state, nodeIndent) {
  4123. var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
  4124. if (state.firstTabInLine !== -1)
  4125. return false;
  4126. if (state.anchor !== null) {
  4127. state.anchorMap[state.anchor] = _result;
  4128. }
  4129. ch = state.input.charCodeAt(state.position);
  4130. while (ch !== 0) {
  4131. if (state.firstTabInLine !== -1) {
  4132. state.position = state.firstTabInLine;
  4133. throwError(state, "tab characters must not be used in indentation");
  4134. }
  4135. if (ch !== 45) {
  4136. break;
  4137. }
  4138. following = state.input.charCodeAt(state.position + 1);
  4139. if (!is_WS_OR_EOL(following)) {
  4140. break;
  4141. }
  4142. detected = true;
  4143. state.position++;
  4144. if (skipSeparationSpace(state, true, -1)) {
  4145. if (state.lineIndent <= nodeIndent) {
  4146. _result.push(null);
  4147. ch = state.input.charCodeAt(state.position);
  4148. continue;
  4149. }
  4150. }
  4151. _line = state.line;
  4152. composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
  4153. _result.push(state.result);
  4154. skipSeparationSpace(state, true, -1);
  4155. ch = state.input.charCodeAt(state.position);
  4156. if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
  4157. throwError(state, "bad indentation of a sequence entry");
  4158. } else if (state.lineIndent < nodeIndent) {
  4159. break;
  4160. }
  4161. }
  4162. if (detected) {
  4163. state.tag = _tag;
  4164. state.anchor = _anchor;
  4165. state.kind = "sequence";
  4166. state.result = _result;
  4167. return true;
  4168. }
  4169. return false;
  4170. }
  4171. function readBlockMapping(state, nodeIndent, flowIndent) {
  4172. var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
  4173. if (state.firstTabInLine !== -1)
  4174. return false;
  4175. if (state.anchor !== null) {
  4176. state.anchorMap[state.anchor] = _result;
  4177. }
  4178. ch = state.input.charCodeAt(state.position);
  4179. while (ch !== 0) {
  4180. if (!atExplicitKey && state.firstTabInLine !== -1) {
  4181. state.position = state.firstTabInLine;
  4182. throwError(state, "tab characters must not be used in indentation");
  4183. }
  4184. following = state.input.charCodeAt(state.position + 1);
  4185. _line = state.line;
  4186. if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
  4187. if (ch === 63) {
  4188. if (atExplicitKey) {
  4189. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  4190. keyTag = keyNode = valueNode = null;
  4191. }
  4192. detected = true;
  4193. atExplicitKey = true;
  4194. allowCompact = true;
  4195. } else if (atExplicitKey) {
  4196. atExplicitKey = false;
  4197. allowCompact = true;
  4198. } else {
  4199. throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
  4200. }
  4201. state.position += 1;
  4202. ch = following;
  4203. } else {
  4204. _keyLine = state.line;
  4205. _keyLineStart = state.lineStart;
  4206. _keyPos = state.position;
  4207. if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
  4208. break;
  4209. }
  4210. if (state.line === _line) {
  4211. ch = state.input.charCodeAt(state.position);
  4212. while (is_WHITE_SPACE(ch)) {
  4213. ch = state.input.charCodeAt(++state.position);
  4214. }
  4215. if (ch === 58) {
  4216. ch = state.input.charCodeAt(++state.position);
  4217. if (!is_WS_OR_EOL(ch)) {
  4218. throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
  4219. }
  4220. if (atExplicitKey) {
  4221. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  4222. keyTag = keyNode = valueNode = null;
  4223. }
  4224. detected = true;
  4225. atExplicitKey = false;
  4226. allowCompact = false;
  4227. keyTag = state.tag;
  4228. keyNode = state.result;
  4229. } else if (detected) {
  4230. throwError(state, "can not read an implicit mapping pair; a colon is missed");
  4231. } else {
  4232. state.tag = _tag;
  4233. state.anchor = _anchor;
  4234. return true;
  4235. }
  4236. } else if (detected) {
  4237. throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
  4238. } else {
  4239. state.tag = _tag;
  4240. state.anchor = _anchor;
  4241. return true;
  4242. }
  4243. }
  4244. if (state.line === _line || state.lineIndent > nodeIndent) {
  4245. if (atExplicitKey) {
  4246. _keyLine = state.line;
  4247. _keyLineStart = state.lineStart;
  4248. _keyPos = state.position;
  4249. }
  4250. if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
  4251. if (atExplicitKey) {
  4252. keyNode = state.result;
  4253. } else {
  4254. valueNode = state.result;
  4255. }
  4256. }
  4257. if (!atExplicitKey) {
  4258. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
  4259. keyTag = keyNode = valueNode = null;
  4260. }
  4261. skipSeparationSpace(state, true, -1);
  4262. ch = state.input.charCodeAt(state.position);
  4263. }
  4264. if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
  4265. throwError(state, "bad indentation of a mapping entry");
  4266. } else if (state.lineIndent < nodeIndent) {
  4267. break;
  4268. }
  4269. }
  4270. if (atExplicitKey) {
  4271. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  4272. }
  4273. if (detected) {
  4274. state.tag = _tag;
  4275. state.anchor = _anchor;
  4276. state.kind = "mapping";
  4277. state.result = _result;
  4278. }
  4279. return detected;
  4280. }
  4281. function readTagProperty(state) {
  4282. var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
  4283. ch = state.input.charCodeAt(state.position);
  4284. if (ch !== 33)
  4285. return false;
  4286. if (state.tag !== null) {
  4287. throwError(state, "duplication of a tag property");
  4288. }
  4289. ch = state.input.charCodeAt(++state.position);
  4290. if (ch === 60) {
  4291. isVerbatim = true;
  4292. ch = state.input.charCodeAt(++state.position);
  4293. } else if (ch === 33) {
  4294. isNamed = true;
  4295. tagHandle = "!!";
  4296. ch = state.input.charCodeAt(++state.position);
  4297. } else {
  4298. tagHandle = "!";
  4299. }
  4300. _position = state.position;
  4301. if (isVerbatim) {
  4302. do {
  4303. ch = state.input.charCodeAt(++state.position);
  4304. } while (ch !== 0 && ch !== 62);
  4305. if (state.position < state.length) {
  4306. tagName = state.input.slice(_position, state.position);
  4307. ch = state.input.charCodeAt(++state.position);
  4308. } else {
  4309. throwError(state, "unexpected end of the stream within a verbatim tag");
  4310. }
  4311. } else {
  4312. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  4313. if (ch === 33) {
  4314. if (!isNamed) {
  4315. tagHandle = state.input.slice(_position - 1, state.position + 1);
  4316. if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
  4317. throwError(state, "named tag handle cannot contain such characters");
  4318. }
  4319. isNamed = true;
  4320. _position = state.position + 1;
  4321. } else {
  4322. throwError(state, "tag suffix cannot contain exclamation marks");
  4323. }
  4324. }
  4325. ch = state.input.charCodeAt(++state.position);
  4326. }
  4327. tagName = state.input.slice(_position, state.position);
  4328. if (PATTERN_FLOW_INDICATORS.test(tagName)) {
  4329. throwError(state, "tag suffix cannot contain flow indicator characters");
  4330. }
  4331. }
  4332. if (tagName && !PATTERN_TAG_URI.test(tagName)) {
  4333. throwError(state, "tag name cannot contain such characters: " + tagName);
  4334. }
  4335. try {
  4336. tagName = decodeURIComponent(tagName);
  4337. } catch (err) {
  4338. throwError(state, "tag name is malformed: " + tagName);
  4339. }
  4340. if (isVerbatim) {
  4341. state.tag = tagName;
  4342. } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
  4343. state.tag = state.tagMap[tagHandle] + tagName;
  4344. } else if (tagHandle === "!") {
  4345. state.tag = "!" + tagName;
  4346. } else if (tagHandle === "!!") {
  4347. state.tag = "tag:yaml.org,2002:" + tagName;
  4348. } else {
  4349. throwError(state, 'undeclared tag handle "' + tagHandle + '"');
  4350. }
  4351. return true;
  4352. }
  4353. function readAnchorProperty(state) {
  4354. var _position, ch;
  4355. ch = state.input.charCodeAt(state.position);
  4356. if (ch !== 38)
  4357. return false;
  4358. if (state.anchor !== null) {
  4359. throwError(state, "duplication of an anchor property");
  4360. }
  4361. ch = state.input.charCodeAt(++state.position);
  4362. _position = state.position;
  4363. while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
  4364. ch = state.input.charCodeAt(++state.position);
  4365. }
  4366. if (state.position === _position) {
  4367. throwError(state, "name of an anchor node must contain at least one character");
  4368. }
  4369. state.anchor = state.input.slice(_position, state.position);
  4370. return true;
  4371. }
  4372. function readAlias(state) {
  4373. var _position, alias, ch;
  4374. ch = state.input.charCodeAt(state.position);
  4375. if (ch !== 42)
  4376. return false;
  4377. ch = state.input.charCodeAt(++state.position);
  4378. _position = state.position;
  4379. while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
  4380. ch = state.input.charCodeAt(++state.position);
  4381. }
  4382. if (state.position === _position) {
  4383. throwError(state, "name of an alias node must contain at least one character");
  4384. }
  4385. alias = state.input.slice(_position, state.position);
  4386. if (!_hasOwnProperty.call(state.anchorMap, alias)) {
  4387. throwError(state, 'unidentified alias "' + alias + '"');
  4388. }
  4389. state.result = state.anchorMap[alias];
  4390. skipSeparationSpace(state, true, -1);
  4391. return true;
  4392. }
  4393. function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
  4394. var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent;
  4395. if (state.listener !== null) {
  4396. state.listener("open", state);
  4397. }
  4398. state.tag = null;
  4399. state.anchor = null;
  4400. state.kind = null;
  4401. state.result = null;
  4402. allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
  4403. if (allowToSeek) {
  4404. if (skipSeparationSpace(state, true, -1)) {
  4405. atNewLine = true;
  4406. if (state.lineIndent > parentIndent) {
  4407. indentStatus = 1;
  4408. } else if (state.lineIndent === parentIndent) {
  4409. indentStatus = 0;
  4410. } else if (state.lineIndent < parentIndent) {
  4411. indentStatus = -1;
  4412. }
  4413. }
  4414. }
  4415. if (indentStatus === 1) {
  4416. while (readTagProperty(state) || readAnchorProperty(state)) {
  4417. if (skipSeparationSpace(state, true, -1)) {
  4418. atNewLine = true;
  4419. allowBlockCollections = allowBlockStyles;
  4420. if (state.lineIndent > parentIndent) {
  4421. indentStatus = 1;
  4422. } else if (state.lineIndent === parentIndent) {
  4423. indentStatus = 0;
  4424. } else if (state.lineIndent < parentIndent) {
  4425. indentStatus = -1;
  4426. }
  4427. } else {
  4428. allowBlockCollections = false;
  4429. }
  4430. }
  4431. }
  4432. if (allowBlockCollections) {
  4433. allowBlockCollections = atNewLine || allowCompact;
  4434. }
  4435. if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
  4436. if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
  4437. flowIndent = parentIndent;
  4438. } else {
  4439. flowIndent = parentIndent + 1;
  4440. }
  4441. blockIndent = state.position - state.lineStart;
  4442. if (indentStatus === 1) {
  4443. if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
  4444. hasContent = true;
  4445. } else {
  4446. if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
  4447. hasContent = true;
  4448. } else if (readAlias(state)) {
  4449. hasContent = true;
  4450. if (state.tag !== null || state.anchor !== null) {
  4451. throwError(state, "alias node should not have any properties");
  4452. }
  4453. } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
  4454. hasContent = true;
  4455. if (state.tag === null) {
  4456. state.tag = "?";
  4457. }
  4458. }
  4459. if (state.anchor !== null) {
  4460. state.anchorMap[state.anchor] = state.result;
  4461. }
  4462. }
  4463. } else if (indentStatus === 0) {
  4464. hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
  4465. }
  4466. }
  4467. if (state.tag === null) {
  4468. if (state.anchor !== null) {
  4469. state.anchorMap[state.anchor] = state.result;
  4470. }
  4471. } else if (state.tag === "?") {
  4472. if (state.result !== null && state.kind !== "scalar") {
  4473. throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
  4474. }
  4475. for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
  4476. type = state.implicitTypes[typeIndex];
  4477. if (type.resolve(state.result)) {
  4478. state.result = type.construct(state.result);
  4479. state.tag = type.tag;
  4480. if (state.anchor !== null) {
  4481. state.anchorMap[state.anchor] = state.result;
  4482. }
  4483. break;
  4484. }
  4485. }
  4486. } else if (state.tag !== "!") {
  4487. if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) {
  4488. type = state.typeMap[state.kind || "fallback"][state.tag];
  4489. } else {
  4490. type = null;
  4491. typeList = state.typeMap.multi[state.kind || "fallback"];
  4492. for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
  4493. if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
  4494. type = typeList[typeIndex];
  4495. break;
  4496. }
  4497. }
  4498. }
  4499. if (!type) {
  4500. throwError(state, "unknown tag !<" + state.tag + ">");
  4501. }
  4502. if (state.result !== null && type.kind !== state.kind) {
  4503. throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
  4504. }
  4505. if (!type.resolve(state.result, state.tag)) {
  4506. throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
  4507. } else {
  4508. state.result = type.construct(state.result, state.tag);
  4509. if (state.anchor !== null) {
  4510. state.anchorMap[state.anchor] = state.result;
  4511. }
  4512. }
  4513. }
  4514. if (state.listener !== null) {
  4515. state.listener("close", state);
  4516. }
  4517. return state.tag !== null || state.anchor !== null || hasContent;
  4518. }
  4519. function readDocument(state) {
  4520. var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
  4521. state.version = null;
  4522. state.checkLineBreaks = state.legacy;
  4523. state.tagMap = /* @__PURE__ */ Object.create(null);
  4524. state.anchorMap = /* @__PURE__ */ Object.create(null);
  4525. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  4526. skipSeparationSpace(state, true, -1);
  4527. ch = state.input.charCodeAt(state.position);
  4528. if (state.lineIndent > 0 || ch !== 37) {
  4529. break;
  4530. }
  4531. hasDirectives = true;
  4532. ch = state.input.charCodeAt(++state.position);
  4533. _position = state.position;
  4534. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  4535. ch = state.input.charCodeAt(++state.position);
  4536. }
  4537. directiveName = state.input.slice(_position, state.position);
  4538. directiveArgs = [];
  4539. if (directiveName.length < 1) {
  4540. throwError(state, "directive name must not be less than one character in length");
  4541. }
  4542. while (ch !== 0) {
  4543. while (is_WHITE_SPACE(ch)) {
  4544. ch = state.input.charCodeAt(++state.position);
  4545. }
  4546. if (ch === 35) {
  4547. do {
  4548. ch = state.input.charCodeAt(++state.position);
  4549. } while (ch !== 0 && !is_EOL(ch));
  4550. break;
  4551. }
  4552. if (is_EOL(ch))
  4553. break;
  4554. _position = state.position;
  4555. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  4556. ch = state.input.charCodeAt(++state.position);
  4557. }
  4558. directiveArgs.push(state.input.slice(_position, state.position));
  4559. }
  4560. if (ch !== 0)
  4561. readLineBreak(state);
  4562. if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
  4563. directiveHandlers[directiveName](state, directiveName, directiveArgs);
  4564. } else {
  4565. throwWarning(state, 'unknown document directive "' + directiveName + '"');
  4566. }
  4567. }
  4568. skipSeparationSpace(state, true, -1);
  4569. if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
  4570. state.position += 3;
  4571. skipSeparationSpace(state, true, -1);
  4572. } else if (hasDirectives) {
  4573. throwError(state, "directives end mark is expected");
  4574. }
  4575. composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
  4576. skipSeparationSpace(state, true, -1);
  4577. if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
  4578. throwWarning(state, "non-ASCII line breaks are interpreted as content");
  4579. }
  4580. state.documents.push(state.result);
  4581. if (state.position === state.lineStart && testDocumentSeparator(state)) {
  4582. if (state.input.charCodeAt(state.position) === 46) {
  4583. state.position += 3;
  4584. skipSeparationSpace(state, true, -1);
  4585. }
  4586. return;
  4587. }
  4588. if (state.position < state.length - 1) {
  4589. throwError(state, "end of the stream or a document separator is expected");
  4590. } else {
  4591. return;
  4592. }
  4593. }
  4594. function loadDocuments(input, options) {
  4595. input = String(input);
  4596. options = options || {};
  4597. if (input.length !== 0) {
  4598. if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
  4599. input += "\n";
  4600. }
  4601. if (input.charCodeAt(0) === 65279) {
  4602. input = input.slice(1);
  4603. }
  4604. }
  4605. var state = new State(input, options);
  4606. var nullpos = input.indexOf("\0");
  4607. if (nullpos !== -1) {
  4608. state.position = nullpos;
  4609. throwError(state, "null byte is not allowed in input");
  4610. }
  4611. state.input += "\0";
  4612. while (state.input.charCodeAt(state.position) === 32) {
  4613. state.lineIndent += 1;
  4614. state.position += 1;
  4615. }
  4616. while (state.position < state.length - 1) {
  4617. readDocument(state);
  4618. }
  4619. return state.documents;
  4620. }
  4621. function loadAll(input, iterator, options) {
  4622. if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") {
  4623. options = iterator;
  4624. iterator = null;
  4625. }
  4626. var documents = loadDocuments(input, options);
  4627. if (typeof iterator !== "function") {
  4628. return documents;
  4629. }
  4630. for (var index = 0, length = documents.length; index < length; index += 1) {
  4631. iterator(documents[index]);
  4632. }
  4633. }
  4634. function load(input, options) {
  4635. var documents = loadDocuments(input, options);
  4636. if (documents.length === 0) {
  4637. return void 0;
  4638. } else if (documents.length === 1) {
  4639. return documents[0];
  4640. }
  4641. throw new YAMLException("expected a single document in the stream, but found more");
  4642. }
  4643. module.exports.loadAll = loadAll;
  4644. module.exports.load = load;
  4645. }
  4646. });
  4647. // node_modules/js-yaml/lib/dumper.js
  4648. var require_dumper = __commonJS({
  4649. "node_modules/js-yaml/lib/dumper.js"(exports, module) {
  4650. "use strict";
  4651. var common = require_common();
  4652. var YAMLException = require_exception();
  4653. var DEFAULT_SCHEMA = require_default();
  4654. var _toString = Object.prototype.toString;
  4655. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  4656. var CHAR_BOM = 65279;
  4657. var CHAR_TAB = 9;
  4658. var CHAR_LINE_FEED = 10;
  4659. var CHAR_CARRIAGE_RETURN = 13;
  4660. var CHAR_SPACE = 32;
  4661. var CHAR_EXCLAMATION = 33;
  4662. var CHAR_DOUBLE_QUOTE = 34;
  4663. var CHAR_SHARP = 35;
  4664. var CHAR_PERCENT = 37;
  4665. var CHAR_AMPERSAND = 38;
  4666. var CHAR_SINGLE_QUOTE = 39;
  4667. var CHAR_ASTERISK = 42;
  4668. var CHAR_COMMA = 44;
  4669. var CHAR_MINUS = 45;
  4670. var CHAR_COLON = 58;
  4671. var CHAR_EQUALS = 61;
  4672. var CHAR_GREATER_THAN = 62;
  4673. var CHAR_QUESTION = 63;
  4674. var CHAR_COMMERCIAL_AT = 64;
  4675. var CHAR_LEFT_SQUARE_BRACKET = 91;
  4676. var CHAR_RIGHT_SQUARE_BRACKET = 93;
  4677. var CHAR_GRAVE_ACCENT = 96;
  4678. var CHAR_LEFT_CURLY_BRACKET = 123;
  4679. var CHAR_VERTICAL_LINE = 124;
  4680. var CHAR_RIGHT_CURLY_BRACKET = 125;
  4681. var ESCAPE_SEQUENCES = {};
  4682. ESCAPE_SEQUENCES[0] = "\\0";
  4683. ESCAPE_SEQUENCES[7] = "\\a";
  4684. ESCAPE_SEQUENCES[8] = "\\b";
  4685. ESCAPE_SEQUENCES[9] = "\\t";
  4686. ESCAPE_SEQUENCES[10] = "\\n";
  4687. ESCAPE_SEQUENCES[11] = "\\v";
  4688. ESCAPE_SEQUENCES[12] = "\\f";
  4689. ESCAPE_SEQUENCES[13] = "\\r";
  4690. ESCAPE_SEQUENCES[27] = "\\e";
  4691. ESCAPE_SEQUENCES[34] = '\\"';
  4692. ESCAPE_SEQUENCES[92] = "\\\\";
  4693. ESCAPE_SEQUENCES[133] = "\\N";
  4694. ESCAPE_SEQUENCES[160] = "\\_";
  4695. ESCAPE_SEQUENCES[8232] = "\\L";
  4696. ESCAPE_SEQUENCES[8233] = "\\P";
  4697. var DEPRECATED_BOOLEANS_SYNTAX = [
  4698. "y",
  4699. "Y",
  4700. "yes",
  4701. "Yes",
  4702. "YES",
  4703. "on",
  4704. "On",
  4705. "ON",
  4706. "n",
  4707. "N",
  4708. "no",
  4709. "No",
  4710. "NO",
  4711. "off",
  4712. "Off",
  4713. "OFF"
  4714. ];
  4715. var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
  4716. function compileStyleMap(schema, map) {
  4717. var result, keys, index, length, tag, style, type;
  4718. if (map === null)
  4719. return {};
  4720. result = {};
  4721. keys = Object.keys(map);
  4722. for (index = 0, length = keys.length; index < length; index += 1) {
  4723. tag = keys[index];
  4724. style = String(map[tag]);
  4725. if (tag.slice(0, 2) === "!!") {
  4726. tag = "tag:yaml.org,2002:" + tag.slice(2);
  4727. }
  4728. type = schema.compiledTypeMap["fallback"][tag];
  4729. if (type && _hasOwnProperty.call(type.styleAliases, style)) {
  4730. style = type.styleAliases[style];
  4731. }
  4732. result[tag] = style;
  4733. }
  4734. return result;
  4735. }
  4736. function encodeHex(character) {
  4737. var string, handle, length;
  4738. string = character.toString(16).toUpperCase();
  4739. if (character <= 255) {
  4740. handle = "x";
  4741. length = 2;
  4742. } else if (character <= 65535) {
  4743. handle = "u";
  4744. length = 4;
  4745. } else if (character <= 4294967295) {
  4746. handle = "U";
  4747. length = 8;
  4748. } else {
  4749. throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
  4750. }
  4751. return "\\" + handle + common.repeat("0", length - string.length) + string;
  4752. }
  4753. var QUOTING_TYPE_SINGLE = 1;
  4754. var QUOTING_TYPE_DOUBLE = 2;
  4755. function State(options) {
  4756. this.schema = options["schema"] || DEFAULT_SCHEMA;
  4757. this.indent = Math.max(1, options["indent"] || 2);
  4758. this.noArrayIndent = options["noArrayIndent"] || false;
  4759. this.skipInvalid = options["skipInvalid"] || false;
  4760. this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
  4761. this.styleMap = compileStyleMap(this.schema, options["styles"] || null);
  4762. this.sortKeys = options["sortKeys"] || false;
  4763. this.lineWidth = options["lineWidth"] || 80;
  4764. this.noRefs = options["noRefs"] || false;
  4765. this.noCompatMode = options["noCompatMode"] || false;
  4766. this.condenseFlow = options["condenseFlow"] || false;
  4767. this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
  4768. this.forceQuotes = options["forceQuotes"] || false;
  4769. this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null;
  4770. this.implicitTypes = this.schema.compiledImplicit;
  4771. this.explicitTypes = this.schema.compiledExplicit;
  4772. this.tag = null;
  4773. this.result = "";
  4774. this.duplicates = [];
  4775. this.usedDuplicates = null;
  4776. }
  4777. function indentString(string, spaces) {
  4778. var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length;
  4779. while (position < length) {
  4780. next = string.indexOf("\n", position);
  4781. if (next === -1) {
  4782. line = string.slice(position);
  4783. position = length;
  4784. } else {
  4785. line = string.slice(position, next + 1);
  4786. position = next + 1;
  4787. }
  4788. if (line.length && line !== "\n")
  4789. result += ind;
  4790. result += line;
  4791. }
  4792. return result;
  4793. }
  4794. function generateNextLine(state, level) {
  4795. return "\n" + common.repeat(" ", state.indent * level);
  4796. }
  4797. function testImplicitResolving(state, str) {
  4798. var index, length, type;
  4799. for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
  4800. type = state.implicitTypes[index];
  4801. if (type.resolve(str)) {
  4802. return true;
  4803. }
  4804. }
  4805. return false;
  4806. }
  4807. function isWhitespace(c) {
  4808. return c === CHAR_SPACE || c === CHAR_TAB;
  4809. }
  4810. function isPrintable(c) {
  4811. return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111;
  4812. }
  4813. function isNsCharOrWhitespace(c) {
  4814. return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
  4815. }
  4816. function isPlainSafe(c, prev, inblock) {
  4817. var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
  4818. var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
  4819. return (
  4820. // ns-plain-safe
  4821. (inblock ? (
  4822. // c = flow-in
  4823. cIsNsCharOrWhitespace
  4824. ) : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar
  4825. );
  4826. }
  4827. function isPlainSafeFirst(c) {
  4828. return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
  4829. }
  4830. function isPlainSafeLast(c) {
  4831. return !isWhitespace(c) && c !== CHAR_COLON;
  4832. }
  4833. function codePointAt(string, pos) {
  4834. var first = string.charCodeAt(pos), second;
  4835. if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
  4836. second = string.charCodeAt(pos + 1);
  4837. if (second >= 56320 && second <= 57343) {
  4838. return (first - 55296) * 1024 + second - 56320 + 65536;
  4839. }
  4840. }
  4841. return first;
  4842. }
  4843. function needIndentIndicator(string) {
  4844. var leadingSpaceRe = /^\n* /;
  4845. return leadingSpaceRe.test(string);
  4846. }
  4847. var STYLE_PLAIN = 1;
  4848. var STYLE_SINGLE = 2;
  4849. var STYLE_LITERAL = 3;
  4850. var STYLE_FOLDED = 4;
  4851. var STYLE_DOUBLE = 5;
  4852. function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
  4853. var i;
  4854. var char = 0;
  4855. var prevChar = null;
  4856. var hasLineBreak = false;
  4857. var hasFoldableLine = false;
  4858. var shouldTrackWidth = lineWidth !== -1;
  4859. var previousLineBreak = -1;
  4860. var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
  4861. if (singleLineOnly || forceQuotes) {
  4862. for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
  4863. char = codePointAt(string, i);
  4864. if (!isPrintable(char)) {
  4865. return STYLE_DOUBLE;
  4866. }
  4867. plain = plain && isPlainSafe(char, prevChar, inblock);
  4868. prevChar = char;
  4869. }
  4870. } else {
  4871. for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
  4872. char = codePointAt(string, i);
  4873. if (char === CHAR_LINE_FEED) {
  4874. hasLineBreak = true;
  4875. if (shouldTrackWidth) {
  4876. hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented.
  4877. i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
  4878. previousLineBreak = i;
  4879. }
  4880. } else if (!isPrintable(char)) {
  4881. return STYLE_DOUBLE;
  4882. }
  4883. plain = plain && isPlainSafe(char, prevChar, inblock);
  4884. prevChar = char;
  4885. }
  4886. hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ");
  4887. }
  4888. if (!hasLineBreak && !hasFoldableLine) {
  4889. if (plain && !forceQuotes && !testAmbiguousType(string)) {
  4890. return STYLE_PLAIN;
  4891. }
  4892. return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
  4893. }
  4894. if (indentPerLevel > 9 && needIndentIndicator(string)) {
  4895. return STYLE_DOUBLE;
  4896. }
  4897. if (!forceQuotes) {
  4898. return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
  4899. }
  4900. return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
  4901. }
  4902. function writeScalar(state, string, level, iskey, inblock) {
  4903. state.dump = function() {
  4904. if (string.length === 0) {
  4905. return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
  4906. }
  4907. if (!state.noCompatMode) {
  4908. if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
  4909. return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
  4910. }
  4911. }
  4912. var indent = state.indent * Math.max(1, level);
  4913. var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
  4914. var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
  4915. function testAmbiguity(string2) {
  4916. return testImplicitResolving(state, string2);
  4917. }
  4918. switch (chooseScalarStyle(
  4919. string,
  4920. singleLineOnly,
  4921. state.indent,
  4922. lineWidth,
  4923. testAmbiguity,
  4924. state.quotingType,
  4925. state.forceQuotes && !iskey,
  4926. inblock
  4927. )) {
  4928. case STYLE_PLAIN:
  4929. return string;
  4930. case STYLE_SINGLE:
  4931. return "'" + string.replace(/'/g, "''") + "'";
  4932. case STYLE_LITERAL:
  4933. return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent));
  4934. case STYLE_FOLDED:
  4935. return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
  4936. case STYLE_DOUBLE:
  4937. return '"' + escapeString(string, lineWidth) + '"';
  4938. default:
  4939. throw new YAMLException("impossible error: invalid scalar style");
  4940. }
  4941. }();
  4942. }
  4943. function blockHeader(string, indentPerLevel) {
  4944. var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
  4945. var clip = string[string.length - 1] === "\n";
  4946. var keep = clip && (string[string.length - 2] === "\n" || string === "\n");
  4947. var chomp = keep ? "+" : clip ? "" : "-";
  4948. return indentIndicator + chomp + "\n";
  4949. }
  4950. function dropEndingNewline(string) {
  4951. return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
  4952. }
  4953. function foldString(string, width) {
  4954. var lineRe = /(\n+)([^\n]*)/g;
  4955. var result = function() {
  4956. var nextLF = string.indexOf("\n");
  4957. nextLF = nextLF !== -1 ? nextLF : string.length;
  4958. lineRe.lastIndex = nextLF;
  4959. return foldLine(string.slice(0, nextLF), width);
  4960. }();
  4961. var prevMoreIndented = string[0] === "\n" || string[0] === " ";
  4962. var moreIndented;
  4963. var match;
  4964. while (match = lineRe.exec(string)) {
  4965. var prefix = match[1], line = match[2];
  4966. moreIndented = line[0] === " ";
  4967. result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
  4968. prevMoreIndented = moreIndented;
  4969. }
  4970. return result;
  4971. }
  4972. function foldLine(line, width) {
  4973. if (line === "" || line[0] === " ")
  4974. return line;
  4975. var breakRe = / [^ ]/g;
  4976. var match;
  4977. var start = 0, end, curr = 0, next = 0;
  4978. var result = "";
  4979. while (match = breakRe.exec(line)) {
  4980. next = match.index;
  4981. if (next - start > width) {
  4982. end = curr > start ? curr : next;
  4983. result += "\n" + line.slice(start, end);
  4984. start = end + 1;
  4985. }
  4986. curr = next;
  4987. }
  4988. result += "\n";
  4989. if (line.length - start > width && curr > start) {
  4990. result += line.slice(start, curr) + "\n" + line.slice(curr + 1);
  4991. } else {
  4992. result += line.slice(start);
  4993. }
  4994. return result.slice(1);
  4995. }
  4996. function escapeString(string) {
  4997. var result = "";
  4998. var char = 0;
  4999. var escapeSeq;
  5000. for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
  5001. char = codePointAt(string, i);
  5002. escapeSeq = ESCAPE_SEQUENCES[char];
  5003. if (!escapeSeq && isPrintable(char)) {
  5004. result += string[i];
  5005. if (char >= 65536)
  5006. result += string[i + 1];
  5007. } else {
  5008. result += escapeSeq || encodeHex(char);
  5009. }
  5010. }
  5011. return result;
  5012. }
  5013. function writeFlowSequence(state, level, object) {
  5014. var _result = "", _tag = state.tag, index, length, value;
  5015. for (index = 0, length = object.length; index < length; index += 1) {
  5016. value = object[index];
  5017. if (state.replacer) {
  5018. value = state.replacer.call(object, String(index), value);
  5019. }
  5020. if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
  5021. if (_result !== "")
  5022. _result += "," + (!state.condenseFlow ? " " : "");
  5023. _result += state.dump;
  5024. }
  5025. }
  5026. state.tag = _tag;
  5027. state.dump = "[" + _result + "]";
  5028. }
  5029. function writeBlockSequence(state, level, object, compact) {
  5030. var _result = "", _tag = state.tag, index, length, value;
  5031. for (index = 0, length = object.length; index < length; index += 1) {
  5032. value = object[index];
  5033. if (state.replacer) {
  5034. value = state.replacer.call(object, String(index), value);
  5035. }
  5036. if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) {
  5037. if (!compact || _result !== "") {
  5038. _result += generateNextLine(state, level);
  5039. }
  5040. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  5041. _result += "-";
  5042. } else {
  5043. _result += "- ";
  5044. }
  5045. _result += state.dump;
  5046. }
  5047. }
  5048. state.tag = _tag;
  5049. state.dump = _result || "[]";
  5050. }
  5051. function writeFlowMapping(state, level, object) {
  5052. var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
  5053. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  5054. pairBuffer = "";
  5055. if (_result !== "")
  5056. pairBuffer += ", ";
  5057. if (state.condenseFlow)
  5058. pairBuffer += '"';
  5059. objectKey = objectKeyList[index];
  5060. objectValue = object[objectKey];
  5061. if (state.replacer) {
  5062. objectValue = state.replacer.call(object, objectKey, objectValue);
  5063. }
  5064. if (!writeNode(state, level, objectKey, false, false)) {
  5065. continue;
  5066. }
  5067. if (state.dump.length > 1024)
  5068. pairBuffer += "? ";
  5069. pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
  5070. if (!writeNode(state, level, objectValue, false, false)) {
  5071. continue;
  5072. }
  5073. pairBuffer += state.dump;
  5074. _result += pairBuffer;
  5075. }
  5076. state.tag = _tag;
  5077. state.dump = "{" + _result + "}";
  5078. }
  5079. function writeBlockMapping(state, level, object, compact) {
  5080. var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
  5081. if (state.sortKeys === true) {
  5082. objectKeyList.sort();
  5083. } else if (typeof state.sortKeys === "function") {
  5084. objectKeyList.sort(state.sortKeys);
  5085. } else if (state.sortKeys) {
  5086. throw new YAMLException("sortKeys must be a boolean or a function");
  5087. }
  5088. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  5089. pairBuffer = "";
  5090. if (!compact || _result !== "") {
  5091. pairBuffer += generateNextLine(state, level);
  5092. }
  5093. objectKey = objectKeyList[index];
  5094. objectValue = object[objectKey];
  5095. if (state.replacer) {
  5096. objectValue = state.replacer.call(object, objectKey, objectValue);
  5097. }
  5098. if (!writeNode(state, level + 1, objectKey, true, true, true)) {
  5099. continue;
  5100. }
  5101. explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
  5102. if (explicitPair) {
  5103. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  5104. pairBuffer += "?";
  5105. } else {
  5106. pairBuffer += "? ";
  5107. }
  5108. }
  5109. pairBuffer += state.dump;
  5110. if (explicitPair) {
  5111. pairBuffer += generateNextLine(state, level);
  5112. }
  5113. if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
  5114. continue;
  5115. }
  5116. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  5117. pairBuffer += ":";
  5118. } else {
  5119. pairBuffer += ": ";
  5120. }
  5121. pairBuffer += state.dump;
  5122. _result += pairBuffer;
  5123. }
  5124. state.tag = _tag;
  5125. state.dump = _result || "{}";
  5126. }
  5127. function detectType(state, object, explicit) {
  5128. var _result, typeList, index, length, type, style;
  5129. typeList = explicit ? state.explicitTypes : state.implicitTypes;
  5130. for (index = 0, length = typeList.length; index < length; index += 1) {
  5131. type = typeList[index];
  5132. if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
  5133. if (explicit) {
  5134. if (type.multi && type.representName) {
  5135. state.tag = type.representName(object);
  5136. } else {
  5137. state.tag = type.tag;
  5138. }
  5139. } else {
  5140. state.tag = "?";
  5141. }
  5142. if (type.represent) {
  5143. style = state.styleMap[type.tag] || type.defaultStyle;
  5144. if (_toString.call(type.represent) === "[object Function]") {
  5145. _result = type.represent(object, style);
  5146. } else if (_hasOwnProperty.call(type.represent, style)) {
  5147. _result = type.represent[style](object, style);
  5148. } else {
  5149. throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style');
  5150. }
  5151. state.dump = _result;
  5152. }
  5153. return true;
  5154. }
  5155. }
  5156. return false;
  5157. }
  5158. function writeNode(state, level, object, block, compact, iskey, isblockseq) {
  5159. state.tag = null;
  5160. state.dump = object;
  5161. if (!detectType(state, object, false)) {
  5162. detectType(state, object, true);
  5163. }
  5164. var type = _toString.call(state.dump);
  5165. var inblock = block;
  5166. var tagStr;
  5167. if (block) {
  5168. block = state.flowLevel < 0 || state.flowLevel > level;
  5169. }
  5170. var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate;
  5171. if (objectOrArray) {
  5172. duplicateIndex = state.duplicates.indexOf(object);
  5173. duplicate = duplicateIndex !== -1;
  5174. }
  5175. if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
  5176. compact = false;
  5177. }
  5178. if (duplicate && state.usedDuplicates[duplicateIndex]) {
  5179. state.dump = "*ref_" + duplicateIndex;
  5180. } else {
  5181. if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
  5182. state.usedDuplicates[duplicateIndex] = true;
  5183. }
  5184. if (type === "[object Object]") {
  5185. if (block && Object.keys(state.dump).length !== 0) {
  5186. writeBlockMapping(state, level, state.dump, compact);
  5187. if (duplicate) {
  5188. state.dump = "&ref_" + duplicateIndex + state.dump;
  5189. }
  5190. } else {
  5191. writeFlowMapping(state, level, state.dump);
  5192. if (duplicate) {
  5193. state.dump = "&ref_" + duplicateIndex + " " + state.dump;
  5194. }
  5195. }
  5196. } else if (type === "[object Array]") {
  5197. if (block && state.dump.length !== 0) {
  5198. if (state.noArrayIndent && !isblockseq && level > 0) {
  5199. writeBlockSequence(state, level - 1, state.dump, compact);
  5200. } else {
  5201. writeBlockSequence(state, level, state.dump, compact);
  5202. }
  5203. if (duplicate) {
  5204. state.dump = "&ref_" + duplicateIndex + state.dump;
  5205. }
  5206. } else {
  5207. writeFlowSequence(state, level, state.dump);
  5208. if (duplicate) {
  5209. state.dump = "&ref_" + duplicateIndex + " " + state.dump;
  5210. }
  5211. }
  5212. } else if (type === "[object String]") {
  5213. if (state.tag !== "?") {
  5214. writeScalar(state, state.dump, level, iskey, inblock);
  5215. }
  5216. } else if (type === "[object Undefined]") {
  5217. return false;
  5218. } else {
  5219. if (state.skipInvalid)
  5220. return false;
  5221. throw new YAMLException("unacceptable kind of an object to dump " + type);
  5222. }
  5223. if (state.tag !== null && state.tag !== "?") {
  5224. tagStr = encodeURI(
  5225. state.tag[0] === "!" ? state.tag.slice(1) : state.tag
  5226. ).replace(/!/g, "%21");
  5227. if (state.tag[0] === "!") {
  5228. tagStr = "!" + tagStr;
  5229. } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") {
  5230. tagStr = "!!" + tagStr.slice(18);
  5231. } else {
  5232. tagStr = "!<" + tagStr + ">";
  5233. }
  5234. state.dump = tagStr + " " + state.dump;
  5235. }
  5236. }
  5237. return true;
  5238. }
  5239. function getDuplicateReferences(object, state) {
  5240. var objects = [], duplicatesIndexes = [], index, length;
  5241. inspectNode(object, objects, duplicatesIndexes);
  5242. for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
  5243. state.duplicates.push(objects[duplicatesIndexes[index]]);
  5244. }
  5245. state.usedDuplicates = new Array(length);
  5246. }
  5247. function inspectNode(object, objects, duplicatesIndexes) {
  5248. var objectKeyList, index, length;
  5249. if (object !== null && typeof object === "object") {
  5250. index = objects.indexOf(object);
  5251. if (index !== -1) {
  5252. if (duplicatesIndexes.indexOf(index) === -1) {
  5253. duplicatesIndexes.push(index);
  5254. }
  5255. } else {
  5256. objects.push(object);
  5257. if (Array.isArray(object)) {
  5258. for (index = 0, length = object.length; index < length; index += 1) {
  5259. inspectNode(object[index], objects, duplicatesIndexes);
  5260. }
  5261. } else {
  5262. objectKeyList = Object.keys(object);
  5263. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  5264. inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
  5265. }
  5266. }
  5267. }
  5268. }
  5269. }
  5270. function dump(input, options) {
  5271. options = options || {};
  5272. var state = new State(options);
  5273. if (!state.noRefs)
  5274. getDuplicateReferences(input, state);
  5275. var value = input;
  5276. if (state.replacer) {
  5277. value = state.replacer.call({ "": value }, "", value);
  5278. }
  5279. if (writeNode(state, 0, value, true, true))
  5280. return state.dump + "\n";
  5281. return "";
  5282. }
  5283. module.exports.dump = dump;
  5284. }
  5285. });
  5286. // node_modules/js-yaml/index.js
  5287. var require_js_yaml = __commonJS({
  5288. "node_modules/js-yaml/index.js"(exports, module) {
  5289. "use strict";
  5290. var loader = require_loader();
  5291. var dumper = require_dumper();
  5292. function renamed(from, to) {
  5293. return function() {
  5294. throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
  5295. };
  5296. }
  5297. module.exports.Type = require_type();
  5298. module.exports.Schema = require_schema();
  5299. module.exports.FAILSAFE_SCHEMA = require_failsafe();
  5300. module.exports.JSON_SCHEMA = require_json();
  5301. module.exports.CORE_SCHEMA = require_core();
  5302. module.exports.DEFAULT_SCHEMA = require_default();
  5303. module.exports.load = loader.load;
  5304. module.exports.loadAll = loader.loadAll;
  5305. module.exports.dump = dumper.dump;
  5306. module.exports.YAMLException = require_exception();
  5307. module.exports.types = {
  5308. binary: require_binary(),
  5309. float: require_float(),
  5310. map: require_map(),
  5311. null: require_null(),
  5312. pairs: require_pairs(),
  5313. set: require_set(),
  5314. timestamp: require_timestamp(),
  5315. bool: require_bool(),
  5316. int: require_int(),
  5317. merge: require_merge(),
  5318. omap: require_omap(),
  5319. seq: require_seq(),
  5320. str: require_str()
  5321. };
  5322. module.exports.safeLoad = renamed("safeLoad", "load");
  5323. module.exports.safeLoadAll = renamed("safeLoadAll", "loadAll");
  5324. module.exports.safeDump = renamed("safeDump", "dump");
  5325. }
  5326. });
  5327. // node_modules/cosmiconfig/dist/loaders.js
  5328. var require_loaders = __commonJS({
  5329. "node_modules/cosmiconfig/dist/loaders.js"(exports) {
  5330. "use strict";
  5331. Object.defineProperty(exports, "__esModule", {
  5332. value: true
  5333. });
  5334. exports.loaders = void 0;
  5335. var _url = __require("url");
  5336. var importFresh;
  5337. var loadJsSync = function loadJsSync2(filepath) {
  5338. if (importFresh === void 0) {
  5339. importFresh = require_import_fresh();
  5340. }
  5341. const result = importFresh(filepath);
  5342. return result;
  5343. };
  5344. var loadJs = async function loadJs2(filepath) {
  5345. try {
  5346. const {
  5347. href
  5348. } = (0, _url.pathToFileURL)(filepath);
  5349. return (await import(href)).default;
  5350. } catch (error) {
  5351. return loadJsSync(filepath, "");
  5352. }
  5353. };
  5354. var parseJson;
  5355. var loadJson = function loadJson2(filepath, content) {
  5356. if (parseJson === void 0) {
  5357. parseJson = require_parse_json();
  5358. }
  5359. try {
  5360. const result = parseJson(content);
  5361. return result;
  5362. } catch (error) {
  5363. error.message = `JSON Error in ${filepath}:
  5364. ${error.message}`;
  5365. throw error;
  5366. }
  5367. };
  5368. var yaml;
  5369. var loadYaml = function loadYaml2(filepath, content) {
  5370. if (yaml === void 0) {
  5371. yaml = require_js_yaml();
  5372. }
  5373. try {
  5374. const result = yaml.load(content);
  5375. return result;
  5376. } catch (error) {
  5377. error.message = `YAML Error in ${filepath}:
  5378. ${error.message}`;
  5379. throw error;
  5380. }
  5381. };
  5382. var loaders = {
  5383. loadJs,
  5384. loadJsSync,
  5385. loadJson,
  5386. loadYaml
  5387. };
  5388. exports.loaders = loaders;
  5389. }
  5390. });
  5391. // node_modules/cosmiconfig/dist/ExplorerBase.js
  5392. var require_ExplorerBase = __commonJS({
  5393. "node_modules/cosmiconfig/dist/ExplorerBase.js"(exports) {
  5394. "use strict";
  5395. Object.defineProperty(exports, "__esModule", {
  5396. value: true
  5397. });
  5398. exports.ExplorerBase = void 0;
  5399. exports.getExtensionDescription = getExtensionDescription;
  5400. var _path = _interopRequireDefault(__require("path"));
  5401. var _getPropertyByPath = require_getPropertyByPath();
  5402. var _loaders = require_loaders();
  5403. function _interopRequireDefault(obj) {
  5404. return obj && obj.__esModule ? obj : { default: obj };
  5405. }
  5406. var ExplorerBase = class {
  5407. constructor(options) {
  5408. if (options.cache) {
  5409. this.loadCache = /* @__PURE__ */ new Map();
  5410. this.searchCache = /* @__PURE__ */ new Map();
  5411. }
  5412. this.config = options;
  5413. this.validateConfig();
  5414. }
  5415. clearLoadCache() {
  5416. if (this.loadCache) {
  5417. this.loadCache.clear();
  5418. }
  5419. }
  5420. clearSearchCache() {
  5421. if (this.searchCache) {
  5422. this.searchCache.clear();
  5423. }
  5424. }
  5425. clearCaches() {
  5426. this.clearLoadCache();
  5427. this.clearSearchCache();
  5428. }
  5429. validateConfig() {
  5430. const config = this.config;
  5431. config.searchPlaces.forEach((place) => {
  5432. const loaderKey = _path.default.extname(place) || "noExt";
  5433. const loader = config.loaders[loaderKey];
  5434. if (!loader) {
  5435. throw new Error(`No loader specified for ${getExtensionDescription(place)}, so searchPlaces item "${place}" is invalid`);
  5436. }
  5437. if (typeof loader !== "function") {
  5438. throw new Error(`loader for ${getExtensionDescription(place)} is not a function (type provided: "${typeof loader}"), so searchPlaces item "${place}" is invalid`);
  5439. }
  5440. });
  5441. }
  5442. shouldSearchStopWithResult(result) {
  5443. if (result === null)
  5444. return false;
  5445. return !(result.isEmpty && this.config.ignoreEmptySearchPlaces);
  5446. }
  5447. nextDirectoryToSearch(currentDir, currentResult) {
  5448. if (this.shouldSearchStopWithResult(currentResult)) {
  5449. return null;
  5450. }
  5451. const nextDir = nextDirUp(currentDir);
  5452. if (nextDir === currentDir || currentDir === this.config.stopDir) {
  5453. return null;
  5454. }
  5455. return nextDir;
  5456. }
  5457. loadPackageProp(filepath, content) {
  5458. const parsedContent = _loaders.loaders.loadJson(filepath, content);
  5459. const packagePropValue = (0, _getPropertyByPath.getPropertyByPath)(parsedContent, this.config.packageProp);
  5460. return packagePropValue || null;
  5461. }
  5462. getLoaderEntryForFile(filepath) {
  5463. if (_path.default.basename(filepath) === "package.json") {
  5464. return this.loadPackageProp.bind(this);
  5465. }
  5466. const loaderKey = _path.default.extname(filepath) || "noExt";
  5467. const loader = this.config.loaders[loaderKey];
  5468. if (!loader) {
  5469. throw new Error(`No loader specified for ${getExtensionDescription(filepath)}`);
  5470. }
  5471. return loader;
  5472. }
  5473. loadedContentToCosmiconfigResult(filepath, loadedContent, forceProp) {
  5474. if (loadedContent === null) {
  5475. return null;
  5476. }
  5477. if (loadedContent === void 0) {
  5478. return {
  5479. filepath,
  5480. config: void 0,
  5481. isEmpty: true
  5482. };
  5483. }
  5484. if (this.config.usePackagePropInConfigFiles || forceProp) {
  5485. loadedContent = (0, _getPropertyByPath.getPropertyByPath)(loadedContent, this.config.packageProp);
  5486. }
  5487. if (loadedContent === void 0) {
  5488. return {
  5489. filepath,
  5490. config: void 0,
  5491. isEmpty: true
  5492. };
  5493. }
  5494. return {
  5495. config: loadedContent,
  5496. filepath
  5497. };
  5498. }
  5499. validateFilePath(filepath) {
  5500. if (!filepath) {
  5501. throw new Error("load must pass a non-empty string");
  5502. }
  5503. }
  5504. };
  5505. exports.ExplorerBase = ExplorerBase;
  5506. function nextDirUp(dir) {
  5507. return _path.default.dirname(dir);
  5508. }
  5509. function getExtensionDescription(filepath) {
  5510. const ext = _path.default.extname(filepath);
  5511. return ext ? `extension "${ext}"` : "files without extensions";
  5512. }
  5513. }
  5514. });
  5515. // node_modules/path-type/index.js
  5516. var require_path_type = __commonJS({
  5517. "node_modules/path-type/index.js"(exports) {
  5518. "use strict";
  5519. var { promisify } = __require("util");
  5520. var fs2 = __require("fs");
  5521. async function isType(fsStatType, statsMethodName, filePath) {
  5522. if (typeof filePath !== "string") {
  5523. throw new TypeError(`Expected a string, got ${typeof filePath}`);
  5524. }
  5525. try {
  5526. const stats = await promisify(fs2[fsStatType])(filePath);
  5527. return stats[statsMethodName]();
  5528. } catch (error) {
  5529. if (error.code === "ENOENT") {
  5530. return false;
  5531. }
  5532. throw error;
  5533. }
  5534. }
  5535. function isTypeSync(fsStatType, statsMethodName, filePath) {
  5536. if (typeof filePath !== "string") {
  5537. throw new TypeError(`Expected a string, got ${typeof filePath}`);
  5538. }
  5539. try {
  5540. return fs2[fsStatType](filePath)[statsMethodName]();
  5541. } catch (error) {
  5542. if (error.code === "ENOENT") {
  5543. return false;
  5544. }
  5545. throw error;
  5546. }
  5547. }
  5548. exports.isFile = isType.bind(null, "stat", "isFile");
  5549. exports.isDirectory = isType.bind(null, "stat", "isDirectory");
  5550. exports.isSymlink = isType.bind(null, "lstat", "isSymbolicLink");
  5551. exports.isFileSync = isTypeSync.bind(null, "statSync", "isFile");
  5552. exports.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory");
  5553. exports.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink");
  5554. }
  5555. });
  5556. // node_modules/cosmiconfig/dist/getDirectory.js
  5557. var require_getDirectory = __commonJS({
  5558. "node_modules/cosmiconfig/dist/getDirectory.js"(exports) {
  5559. "use strict";
  5560. Object.defineProperty(exports, "__esModule", {
  5561. value: true
  5562. });
  5563. exports.getDirectory = getDirectory;
  5564. exports.getDirectorySync = getDirectorySync;
  5565. var _path = _interopRequireDefault(__require("path"));
  5566. var _pathType = require_path_type();
  5567. function _interopRequireDefault(obj) {
  5568. return obj && obj.__esModule ? obj : { default: obj };
  5569. }
  5570. async function getDirectory(filepath) {
  5571. const filePathIsDirectory = await (0, _pathType.isDirectory)(filepath);
  5572. if (filePathIsDirectory === true) {
  5573. return filepath;
  5574. }
  5575. const directory = _path.default.dirname(filepath);
  5576. return directory;
  5577. }
  5578. function getDirectorySync(filepath) {
  5579. const filePathIsDirectory = (0, _pathType.isDirectorySync)(filepath);
  5580. if (filePathIsDirectory === true) {
  5581. return filepath;
  5582. }
  5583. const directory = _path.default.dirname(filepath);
  5584. return directory;
  5585. }
  5586. }
  5587. });
  5588. // node_modules/cosmiconfig/dist/readFile.js
  5589. var require_readFile = __commonJS({
  5590. "node_modules/cosmiconfig/dist/readFile.js"(exports) {
  5591. "use strict";
  5592. Object.defineProperty(exports, "__esModule", {
  5593. value: true
  5594. });
  5595. exports.readFile = readFile;
  5596. exports.readFileSync = readFileSync;
  5597. var _fs = _interopRequireDefault(__require("fs"));
  5598. function _interopRequireDefault(obj) {
  5599. return obj && obj.__esModule ? obj : { default: obj };
  5600. }
  5601. async function fsReadFileAsync(pathname, encoding) {
  5602. return new Promise((resolve, reject) => {
  5603. _fs.default.readFile(pathname, encoding, (error, contents) => {
  5604. if (error) {
  5605. reject(error);
  5606. return;
  5607. }
  5608. resolve(contents);
  5609. });
  5610. });
  5611. }
  5612. async function readFile(filepath, options = {}) {
  5613. const throwNotFound = options.throwNotFound === true;
  5614. try {
  5615. const content = await fsReadFileAsync(filepath, "utf8");
  5616. return content;
  5617. } catch (error) {
  5618. if (throwNotFound === false && (error.code === "ENOENT" || error.code === "EISDIR")) {
  5619. return null;
  5620. }
  5621. throw error;
  5622. }
  5623. }
  5624. function readFileSync(filepath, options = {}) {
  5625. const throwNotFound = options.throwNotFound === true;
  5626. try {
  5627. const content = _fs.default.readFileSync(filepath, "utf8");
  5628. return content;
  5629. } catch (error) {
  5630. if (throwNotFound === false && (error.code === "ENOENT" || error.code === "EISDIR")) {
  5631. return null;
  5632. }
  5633. throw error;
  5634. }
  5635. }
  5636. }
  5637. });
  5638. // node_modules/cosmiconfig/dist/Explorer.js
  5639. var require_Explorer = __commonJS({
  5640. "node_modules/cosmiconfig/dist/Explorer.js"(exports) {
  5641. "use strict";
  5642. Object.defineProperty(exports, "__esModule", {
  5643. value: true
  5644. });
  5645. exports.Explorer = void 0;
  5646. var _path = _interopRequireDefault(__require("path"));
  5647. var _cacheWrapper = require_cacheWrapper();
  5648. var _ExplorerBase = require_ExplorerBase();
  5649. var _getDirectory = require_getDirectory();
  5650. var _readFile = require_readFile();
  5651. function _interopRequireDefault(obj) {
  5652. return obj && obj.__esModule ? obj : { default: obj };
  5653. }
  5654. var Explorer = class extends _ExplorerBase.ExplorerBase {
  5655. constructor(options) {
  5656. super(options);
  5657. }
  5658. async search(searchFrom = process.cwd()) {
  5659. if (this.config.metaConfigFilePath) {
  5660. const config = await this._loadFile(this.config.metaConfigFilePath, true);
  5661. if (config && !config.isEmpty) {
  5662. return config;
  5663. }
  5664. }
  5665. return await this.searchFromDirectory(await (0, _getDirectory.getDirectory)(searchFrom));
  5666. }
  5667. async searchFromDirectory(dir) {
  5668. const absoluteDir = _path.default.resolve(process.cwd(), dir);
  5669. const run = async () => {
  5670. const result = await this.searchDirectory(absoluteDir);
  5671. const nextDir = this.nextDirectoryToSearch(absoluteDir, result);
  5672. if (nextDir) {
  5673. return this.searchFromDirectory(nextDir);
  5674. }
  5675. return await this.config.transform(result);
  5676. };
  5677. if (this.searchCache) {
  5678. return (0, _cacheWrapper.cacheWrapper)(this.searchCache, absoluteDir, run);
  5679. }
  5680. return run();
  5681. }
  5682. async searchDirectory(dir) {
  5683. for await (const place of this.config.searchPlaces) {
  5684. const placeResult = await this.loadSearchPlace(dir, place);
  5685. if (this.shouldSearchStopWithResult(placeResult)) {
  5686. return placeResult;
  5687. }
  5688. }
  5689. return null;
  5690. }
  5691. async loadSearchPlace(dir, place) {
  5692. const filepath = _path.default.join(dir, place);
  5693. const fileContents = await (0, _readFile.readFile)(filepath);
  5694. return await this.createCosmiconfigResult(filepath, fileContents, false);
  5695. }
  5696. async loadFileContent(filepath, content) {
  5697. if (content === null) {
  5698. return null;
  5699. }
  5700. if (content.trim() === "") {
  5701. return void 0;
  5702. }
  5703. const loader = this.getLoaderEntryForFile(filepath);
  5704. try {
  5705. return await loader(filepath, content);
  5706. } catch (e) {
  5707. e.filepath = filepath;
  5708. throw e;
  5709. }
  5710. }
  5711. async createCosmiconfigResult(filepath, content, forceProp) {
  5712. const fileContent = await this.loadFileContent(filepath, content);
  5713. return this.loadedContentToCosmiconfigResult(filepath, fileContent, forceProp);
  5714. }
  5715. async load(filepath) {
  5716. return this._loadFile(filepath, false);
  5717. }
  5718. async _loadFile(filepath, forceProp) {
  5719. this.validateFilePath(filepath);
  5720. const absoluteFilePath = _path.default.resolve(process.cwd(), filepath);
  5721. const runLoad = async () => {
  5722. const fileContents = await (0, _readFile.readFile)(absoluteFilePath, {
  5723. throwNotFound: true
  5724. });
  5725. const result = await this.createCosmiconfigResult(absoluteFilePath, fileContents, forceProp);
  5726. return await this.config.transform(result);
  5727. };
  5728. if (this.loadCache) {
  5729. return (0, _cacheWrapper.cacheWrapper)(this.loadCache, absoluteFilePath, runLoad);
  5730. }
  5731. return runLoad();
  5732. }
  5733. };
  5734. exports.Explorer = Explorer;
  5735. }
  5736. });
  5737. // node_modules/cosmiconfig/dist/ExplorerSync.js
  5738. var require_ExplorerSync = __commonJS({
  5739. "node_modules/cosmiconfig/dist/ExplorerSync.js"(exports) {
  5740. "use strict";
  5741. Object.defineProperty(exports, "__esModule", {
  5742. value: true
  5743. });
  5744. exports.ExplorerSync = void 0;
  5745. var _path = _interopRequireDefault(__require("path"));
  5746. var _cacheWrapper = require_cacheWrapper();
  5747. var _ExplorerBase = require_ExplorerBase();
  5748. var _getDirectory = require_getDirectory();
  5749. var _readFile = require_readFile();
  5750. function _interopRequireDefault(obj) {
  5751. return obj && obj.__esModule ? obj : { default: obj };
  5752. }
  5753. var ExplorerSync = class extends _ExplorerBase.ExplorerBase {
  5754. constructor(options) {
  5755. super(options);
  5756. }
  5757. searchSync(searchFrom = process.cwd()) {
  5758. if (this.config.metaConfigFilePath) {
  5759. const config = this._loadFileSync(this.config.metaConfigFilePath, true);
  5760. if (config && !config.isEmpty) {
  5761. return config;
  5762. }
  5763. }
  5764. return this.searchFromDirectorySync((0, _getDirectory.getDirectorySync)(searchFrom));
  5765. }
  5766. searchFromDirectorySync(dir) {
  5767. const absoluteDir = _path.default.resolve(process.cwd(), dir);
  5768. const run = () => {
  5769. const result = this.searchDirectorySync(absoluteDir);
  5770. const nextDir = this.nextDirectoryToSearch(absoluteDir, result);
  5771. if (nextDir) {
  5772. return this.searchFromDirectorySync(nextDir);
  5773. }
  5774. return this.config.transform(result);
  5775. };
  5776. if (this.searchCache) {
  5777. return (0, _cacheWrapper.cacheWrapperSync)(this.searchCache, absoluteDir, run);
  5778. }
  5779. return run();
  5780. }
  5781. searchDirectorySync(dir) {
  5782. for (const place of this.config.searchPlaces) {
  5783. const placeResult = this.loadSearchPlaceSync(dir, place);
  5784. if (this.shouldSearchStopWithResult(placeResult)) {
  5785. return placeResult;
  5786. }
  5787. }
  5788. return null;
  5789. }
  5790. loadSearchPlaceSync(dir, place) {
  5791. const filepath = _path.default.join(dir, place);
  5792. const content = (0, _readFile.readFileSync)(filepath);
  5793. return this.createCosmiconfigResultSync(filepath, content, false);
  5794. }
  5795. loadFileContentSync(filepath, content) {
  5796. if (content === null) {
  5797. return null;
  5798. }
  5799. if (content.trim() === "") {
  5800. return void 0;
  5801. }
  5802. const loader = this.getLoaderEntryForFile(filepath);
  5803. try {
  5804. return loader(filepath, content);
  5805. } catch (e) {
  5806. e.filepath = filepath;
  5807. throw e;
  5808. }
  5809. }
  5810. createCosmiconfigResultSync(filepath, content, forceProp) {
  5811. const fileContent = this.loadFileContentSync(filepath, content);
  5812. return this.loadedContentToCosmiconfigResult(filepath, fileContent, forceProp);
  5813. }
  5814. loadSync(filepath) {
  5815. return this._loadFileSync(filepath, false);
  5816. }
  5817. _loadFileSync(filepath, forceProp) {
  5818. this.validateFilePath(filepath);
  5819. const absoluteFilePath = _path.default.resolve(process.cwd(), filepath);
  5820. const runLoadSync = () => {
  5821. const content = (0, _readFile.readFileSync)(absoluteFilePath, {
  5822. throwNotFound: true
  5823. });
  5824. const cosmiconfigResult = this.createCosmiconfigResultSync(absoluteFilePath, content, forceProp);
  5825. return this.config.transform(cosmiconfigResult);
  5826. };
  5827. if (this.loadCache) {
  5828. return (0, _cacheWrapper.cacheWrapperSync)(this.loadCache, absoluteFilePath, runLoadSync);
  5829. }
  5830. return runLoadSync();
  5831. }
  5832. };
  5833. exports.ExplorerSync = ExplorerSync;
  5834. }
  5835. });
  5836. // node_modules/cosmiconfig/dist/types.js
  5837. var require_types = __commonJS({
  5838. "node_modules/cosmiconfig/dist/types.js"(exports) {
  5839. "use strict";
  5840. Object.defineProperty(exports, "__esModule", {
  5841. value: true
  5842. });
  5843. }
  5844. });
  5845. // node_modules/cosmiconfig/dist/index.js
  5846. var require_dist = __commonJS({
  5847. "node_modules/cosmiconfig/dist/index.js"(exports) {
  5848. "use strict";
  5849. Object.defineProperty(exports, "__esModule", {
  5850. value: true
  5851. });
  5852. exports.cosmiconfig = cosmiconfig2;
  5853. exports.cosmiconfigSync = cosmiconfigSync;
  5854. exports.metaSearchPlaces = exports.defaultLoadersSync = exports.defaultLoaders = void 0;
  5855. var _os = _interopRequireDefault(__require("os"));
  5856. var _Explorer = require_Explorer();
  5857. var _ExplorerSync = require_ExplorerSync();
  5858. var _loaders = require_loaders();
  5859. var _types = require_types();
  5860. function _interopRequireDefault(obj) {
  5861. return obj && obj.__esModule ? obj : { default: obj };
  5862. }
  5863. var metaSearchPlaces = ["package.json", ".config.json", ".config.yaml", ".config.yml", ".config.js", ".config.cjs", ".config.mjs"];
  5864. exports.metaSearchPlaces = metaSearchPlaces;
  5865. var defaultLoaders = Object.freeze({
  5866. ".mjs": _loaders.loaders.loadJs,
  5867. ".cjs": _loaders.loaders.loadJs,
  5868. ".js": _loaders.loaders.loadJs,
  5869. ".json": _loaders.loaders.loadJson,
  5870. ".yaml": _loaders.loaders.loadYaml,
  5871. ".yml": _loaders.loaders.loadYaml,
  5872. noExt: _loaders.loaders.loadYaml
  5873. });
  5874. exports.defaultLoaders = defaultLoaders;
  5875. var defaultLoadersSync = Object.freeze({
  5876. ".cjs": _loaders.loaders.loadJsSync,
  5877. ".js": _loaders.loaders.loadJsSync,
  5878. ".json": _loaders.loaders.loadJson,
  5879. ".yaml": _loaders.loaders.loadYaml,
  5880. ".yml": _loaders.loaders.loadYaml,
  5881. noExt: _loaders.loaders.loadYaml
  5882. });
  5883. exports.defaultLoadersSync = defaultLoadersSync;
  5884. var identity = function identity2(x) {
  5885. return x;
  5886. };
  5887. function replaceMetaPlaceholders(paths, moduleName) {
  5888. return paths.map((path) => path.replace("{name}", moduleName));
  5889. }
  5890. function getExplorerOptions(moduleName, options) {
  5891. var _metaConfig$config;
  5892. const metaExplorer = new _ExplorerSync.ExplorerSync({
  5893. packageProp: "cosmiconfig",
  5894. stopDir: process.cwd(),
  5895. searchPlaces: metaSearchPlaces,
  5896. ignoreEmptySearchPlaces: false,
  5897. usePackagePropInConfigFiles: true,
  5898. loaders: defaultLoaders,
  5899. transform: identity,
  5900. cache: true,
  5901. metaConfigFilePath: null
  5902. });
  5903. const metaConfig = metaExplorer.searchSync();
  5904. if (!metaConfig) {
  5905. return options;
  5906. }
  5907. if ((_metaConfig$config = metaConfig.config) !== null && _metaConfig$config !== void 0 && _metaConfig$config.loaders) {
  5908. throw new Error("Can not specify loaders in meta config file");
  5909. }
  5910. const overrideOptions = metaConfig.config ?? {};
  5911. if (overrideOptions.searchPlaces) {
  5912. overrideOptions.searchPlaces = replaceMetaPlaceholders(overrideOptions.searchPlaces, moduleName);
  5913. }
  5914. overrideOptions.metaConfigFilePath = metaConfig.filepath;
  5915. return {
  5916. ...options,
  5917. ...overrideOptions
  5918. };
  5919. }
  5920. function cosmiconfig2(moduleName, options = {}) {
  5921. const explorerOptions = getExplorerOptions(moduleName, options);
  5922. const normalizedOptions = normalizeOptions(moduleName, explorerOptions);
  5923. const explorer = new _Explorer.Explorer(normalizedOptions);
  5924. return {
  5925. search: explorer.search.bind(explorer),
  5926. load: explorer.load.bind(explorer),
  5927. clearLoadCache: explorer.clearLoadCache.bind(explorer),
  5928. clearSearchCache: explorer.clearSearchCache.bind(explorer),
  5929. clearCaches: explorer.clearCaches.bind(explorer)
  5930. };
  5931. }
  5932. function cosmiconfigSync(moduleName, options = {}) {
  5933. const explorerOptions = getExplorerOptions(moduleName, options);
  5934. const normalizedOptions = normalizeOptionsSync(moduleName, explorerOptions);
  5935. const explorerSync = new _ExplorerSync.ExplorerSync(normalizedOptions);
  5936. return {
  5937. search: explorerSync.searchSync.bind(explorerSync),
  5938. load: explorerSync.loadSync.bind(explorerSync),
  5939. clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync),
  5940. clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync),
  5941. clearCaches: explorerSync.clearCaches.bind(explorerSync)
  5942. };
  5943. }
  5944. function normalizeOptions(moduleName, options) {
  5945. const defaults = {
  5946. packageProp: moduleName,
  5947. searchPlaces: ["package.json", `.${moduleName}rc`, `.${moduleName}rc.json`, `.${moduleName}rc.yaml`, `.${moduleName}rc.yml`, `.${moduleName}rc.js`, `.${moduleName}rc.cjs`, `.${moduleName}rc.mjs`, `.config/${moduleName}rc`, `.config/${moduleName}rc.json`, `.config/${moduleName}rc.yaml`, `.config/${moduleName}rc.yml`, `.config/${moduleName}rc.js`, `.config/${moduleName}rc.cjs`, `.config/${moduleName}rc.mjs`, `${moduleName}.config.js`, `${moduleName}.config.cjs`, `${moduleName}.config.mjs`].filter(Boolean),
  5948. ignoreEmptySearchPlaces: true,
  5949. stopDir: _os.default.homedir(),
  5950. cache: true,
  5951. transform: identity,
  5952. loaders: defaultLoaders,
  5953. metaConfigFilePath: null
  5954. };
  5955. const normalizedOptions = {
  5956. ...defaults,
  5957. ...options,
  5958. loaders: {
  5959. ...defaults.loaders,
  5960. ...options.loaders
  5961. }
  5962. };
  5963. return normalizedOptions;
  5964. }
  5965. function normalizeOptionsSync(moduleName, options) {
  5966. const defaults = {
  5967. packageProp: moduleName,
  5968. searchPlaces: ["package.json", `.${moduleName}rc`, `.${moduleName}rc.json`, `.${moduleName}rc.yaml`, `.${moduleName}rc.yml`, `.${moduleName}rc.js`, `.${moduleName}rc.cjs`, `.config/${moduleName}rc`, `.config/${moduleName}rc.json`, `.config/${moduleName}rc.yaml`, `.config/${moduleName}rc.yml`, `.config/${moduleName}rc.js`, `.config/${moduleName}rc.cjs`, `${moduleName}.config.js`, `${moduleName}.config.cjs`],
  5969. ignoreEmptySearchPlaces: true,
  5970. stopDir: _os.default.homedir(),
  5971. cache: true,
  5972. transform: identity,
  5973. loaders: defaultLoadersSync,
  5974. metaConfigFilePath: null
  5975. };
  5976. const normalizedOptions = {
  5977. ...defaults,
  5978. ...options,
  5979. loaders: {
  5980. ...defaults.loaders,
  5981. ...options.loaders
  5982. }
  5983. };
  5984. return normalizedOptions;
  5985. }
  5986. }
  5987. });
  5988. // node_modules/find-parent-dir/index.js
  5989. var require_find_parent_dir = __commonJS({
  5990. "node_modules/find-parent-dir/index.js"(exports, module) {
  5991. "use strict";
  5992. var path = __require("path");
  5993. var fs2 = __require("fs");
  5994. var exists = fs2.exists || path.exists;
  5995. var existsSync = fs2.existsSync || path.existsSync;
  5996. function splitPath(path2) {
  5997. var parts = path2.split(/(\/|\\)/);
  5998. if (!parts.length)
  5999. return parts;
  6000. return !parts[0].length ? parts.slice(1) : parts;
  6001. }
  6002. exports = module.exports = function(currentFullPath, clue, cb) {
  6003. function testDir(parts) {
  6004. if (parts.length === 0)
  6005. return cb(null, null);
  6006. var p = parts.join("");
  6007. exists(path.join(p, clue), function(itdoes) {
  6008. if (itdoes)
  6009. return cb(null, p);
  6010. testDir(parts.slice(0, -1));
  6011. });
  6012. }
  6013. testDir(splitPath(currentFullPath));
  6014. };
  6015. exports.sync = function(currentFullPath, clue) {
  6016. function testDir(parts) {
  6017. if (parts.length === 0)
  6018. return null;
  6019. var p = parts.join("");
  6020. var itdoes = existsSync(path.join(p, clue));
  6021. return itdoes ? p : testDir(parts.slice(0, -1));
  6022. }
  6023. return testDir(splitPath(currentFullPath));
  6024. };
  6025. }
  6026. });
  6027. // node_modules/ci-info/vendors.json
  6028. var require_vendors = __commonJS({
  6029. "node_modules/ci-info/vendors.json"(exports, module) {
  6030. module.exports = [
  6031. {
  6032. name: "Appcircle",
  6033. constant: "APPCIRCLE",
  6034. env: "AC_APPCIRCLE"
  6035. },
  6036. {
  6037. name: "AppVeyor",
  6038. constant: "APPVEYOR",
  6039. env: "APPVEYOR",
  6040. pr: "APPVEYOR_PULL_REQUEST_NUMBER"
  6041. },
  6042. {
  6043. name: "AWS CodeBuild",
  6044. constant: "CODEBUILD",
  6045. env: "CODEBUILD_BUILD_ARN"
  6046. },
  6047. {
  6048. name: "Azure Pipelines",
  6049. constant: "AZURE_PIPELINES",
  6050. env: "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
  6051. pr: "SYSTEM_PULLREQUEST_PULLREQUESTID"
  6052. },
  6053. {
  6054. name: "Bamboo",
  6055. constant: "BAMBOO",
  6056. env: "bamboo_planKey"
  6057. },
  6058. {
  6059. name: "Bitbucket Pipelines",
  6060. constant: "BITBUCKET",
  6061. env: "BITBUCKET_COMMIT",
  6062. pr: "BITBUCKET_PR_ID"
  6063. },
  6064. {
  6065. name: "Bitrise",
  6066. constant: "BITRISE",
  6067. env: "BITRISE_IO",
  6068. pr: "BITRISE_PULL_REQUEST"
  6069. },
  6070. {
  6071. name: "Buddy",
  6072. constant: "BUDDY",
  6073. env: "BUDDY_WORKSPACE_ID",
  6074. pr: "BUDDY_EXECUTION_PULL_REQUEST_ID"
  6075. },
  6076. {
  6077. name: "Buildkite",
  6078. constant: "BUILDKITE",
  6079. env: "BUILDKITE",
  6080. pr: {
  6081. env: "BUILDKITE_PULL_REQUEST",
  6082. ne: "false"
  6083. }
  6084. },
  6085. {
  6086. name: "CircleCI",
  6087. constant: "CIRCLE",
  6088. env: "CIRCLECI",
  6089. pr: "CIRCLE_PULL_REQUEST"
  6090. },
  6091. {
  6092. name: "Cirrus CI",
  6093. constant: "CIRRUS",
  6094. env: "CIRRUS_CI",
  6095. pr: "CIRRUS_PR"
  6096. },
  6097. {
  6098. name: "Codefresh",
  6099. constant: "CODEFRESH",
  6100. env: "CF_BUILD_ID",
  6101. pr: {
  6102. any: [
  6103. "CF_PULL_REQUEST_NUMBER",
  6104. "CF_PULL_REQUEST_ID"
  6105. ]
  6106. }
  6107. },
  6108. {
  6109. name: "Codemagic",
  6110. constant: "CODEMAGIC",
  6111. env: "CM_BUILD_ID",
  6112. pr: "CM_PULL_REQUEST"
  6113. },
  6114. {
  6115. name: "Codeship",
  6116. constant: "CODESHIP",
  6117. env: {
  6118. CI_NAME: "codeship"
  6119. }
  6120. },
  6121. {
  6122. name: "Drone",
  6123. constant: "DRONE",
  6124. env: "DRONE",
  6125. pr: {
  6126. DRONE_BUILD_EVENT: "pull_request"
  6127. }
  6128. },
  6129. {
  6130. name: "dsari",
  6131. constant: "DSARI",
  6132. env: "DSARI"
  6133. },
  6134. {
  6135. name: "Expo Application Services",
  6136. constant: "EAS",
  6137. env: "EAS_BUILD"
  6138. },
  6139. {
  6140. name: "Gerrit",
  6141. constant: "GERRIT",
  6142. env: "GERRIT_PROJECT"
  6143. },
  6144. {
  6145. name: "GitHub Actions",
  6146. constant: "GITHUB_ACTIONS",
  6147. env: "GITHUB_ACTIONS",
  6148. pr: {
  6149. GITHUB_EVENT_NAME: "pull_request"
  6150. }
  6151. },
  6152. {
  6153. name: "GitLab CI",
  6154. constant: "GITLAB",
  6155. env: "GITLAB_CI",
  6156. pr: "CI_MERGE_REQUEST_ID"
  6157. },
  6158. {
  6159. name: "GoCD",
  6160. constant: "GOCD",
  6161. env: "GO_PIPELINE_LABEL"
  6162. },
  6163. {
  6164. name: "Google Cloud Build",
  6165. constant: "GOOGLE_CLOUD_BUILD",
  6166. env: "BUILDER_OUTPUT"
  6167. },
  6168. {
  6169. name: "Harness CI",
  6170. constant: "HARNESS",
  6171. env: "HARNESS_BUILD_ID"
  6172. },
  6173. {
  6174. name: "Heroku",
  6175. constant: "HEROKU",
  6176. env: {
  6177. env: "NODE",
  6178. includes: "/app/.heroku/node/bin/node"
  6179. }
  6180. },
  6181. {
  6182. name: "Hudson",
  6183. constant: "HUDSON",
  6184. env: "HUDSON_URL"
  6185. },
  6186. {
  6187. name: "Jenkins",
  6188. constant: "JENKINS",
  6189. env: [
  6190. "JENKINS_URL",
  6191. "BUILD_ID"
  6192. ],
  6193. pr: {
  6194. any: [
  6195. "ghprbPullId",
  6196. "CHANGE_ID"
  6197. ]
  6198. }
  6199. },
  6200. {
  6201. name: "LayerCI",
  6202. constant: "LAYERCI",
  6203. env: "LAYERCI",
  6204. pr: "LAYERCI_PULL_REQUEST"
  6205. },
  6206. {
  6207. name: "Magnum CI",
  6208. constant: "MAGNUM",
  6209. env: "MAGNUM"
  6210. },
  6211. {
  6212. name: "Netlify CI",
  6213. constant: "NETLIFY",
  6214. env: "NETLIFY",
  6215. pr: {
  6216. env: "PULL_REQUEST",
  6217. ne: "false"
  6218. }
  6219. },
  6220. {
  6221. name: "Nevercode",
  6222. constant: "NEVERCODE",
  6223. env: "NEVERCODE",
  6224. pr: {
  6225. env: "NEVERCODE_PULL_REQUEST",
  6226. ne: "false"
  6227. }
  6228. },
  6229. {
  6230. name: "ReleaseHub",
  6231. constant: "RELEASEHUB",
  6232. env: "RELEASE_BUILD_ID"
  6233. },
  6234. {
  6235. name: "Render",
  6236. constant: "RENDER",
  6237. env: "RENDER",
  6238. pr: {
  6239. IS_PULL_REQUEST: "true"
  6240. }
  6241. },
  6242. {
  6243. name: "Sail CI",
  6244. constant: "SAIL",
  6245. env: "SAILCI",
  6246. pr: "SAIL_PULL_REQUEST_NUMBER"
  6247. },
  6248. {
  6249. name: "Screwdriver",
  6250. constant: "SCREWDRIVER",
  6251. env: "SCREWDRIVER",
  6252. pr: {
  6253. env: "SD_PULL_REQUEST",
  6254. ne: "false"
  6255. }
  6256. },
  6257. {
  6258. name: "Semaphore",
  6259. constant: "SEMAPHORE",
  6260. env: "SEMAPHORE",
  6261. pr: "PULL_REQUEST_NUMBER"
  6262. },
  6263. {
  6264. name: "Shippable",
  6265. constant: "SHIPPABLE",
  6266. env: "SHIPPABLE",
  6267. pr: {
  6268. IS_PULL_REQUEST: "true"
  6269. }
  6270. },
  6271. {
  6272. name: "Solano CI",
  6273. constant: "SOLANO",
  6274. env: "TDDIUM",
  6275. pr: "TDDIUM_PR_ID"
  6276. },
  6277. {
  6278. name: "Sourcehut",
  6279. constant: "SOURCEHUT",
  6280. env: {
  6281. CI_NAME: "sourcehut"
  6282. }
  6283. },
  6284. {
  6285. name: "Strider CD",
  6286. constant: "STRIDER",
  6287. env: "STRIDER"
  6288. },
  6289. {
  6290. name: "TaskCluster",
  6291. constant: "TASKCLUSTER",
  6292. env: [
  6293. "TASK_ID",
  6294. "RUN_ID"
  6295. ]
  6296. },
  6297. {
  6298. name: "TeamCity",
  6299. constant: "TEAMCITY",
  6300. env: "TEAMCITY_VERSION"
  6301. },
  6302. {
  6303. name: "Travis CI",
  6304. constant: "TRAVIS",
  6305. env: "TRAVIS",
  6306. pr: {
  6307. env: "TRAVIS_PULL_REQUEST",
  6308. ne: "false"
  6309. }
  6310. },
  6311. {
  6312. name: "Vercel",
  6313. constant: "VERCEL",
  6314. env: {
  6315. any: [
  6316. "NOW_BUILDER",
  6317. "VERCEL"
  6318. ]
  6319. }
  6320. },
  6321. {
  6322. name: "Visual Studio App Center",
  6323. constant: "APPCENTER",
  6324. env: "APPCENTER_BUILD_ID"
  6325. },
  6326. {
  6327. name: "Woodpecker",
  6328. constant: "WOODPECKER",
  6329. env: {
  6330. CI: "woodpecker"
  6331. },
  6332. pr: {
  6333. CI_BUILD_EVENT: "pull_request"
  6334. }
  6335. },
  6336. {
  6337. name: "Xcode Cloud",
  6338. constant: "XCODE_CLOUD",
  6339. env: "CI_XCODE_PROJECT",
  6340. pr: "CI_PULL_REQUEST_NUMBER"
  6341. },
  6342. {
  6343. name: "Xcode Server",
  6344. constant: "XCODE_SERVER",
  6345. env: "XCS"
  6346. }
  6347. ];
  6348. }
  6349. });
  6350. // node_modules/ci-info/index.js
  6351. var require_ci_info = __commonJS({
  6352. "node_modules/ci-info/index.js"(exports) {
  6353. "use strict";
  6354. var vendors = require_vendors();
  6355. var env = process.env;
  6356. Object.defineProperty(exports, "_vendors", {
  6357. value: vendors.map(function(v) {
  6358. return v.constant;
  6359. })
  6360. });
  6361. exports.name = null;
  6362. exports.isPR = null;
  6363. vendors.forEach(function(vendor) {
  6364. const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
  6365. const isCI2 = envs.every(function(obj) {
  6366. return checkEnv(obj);
  6367. });
  6368. exports[vendor.constant] = isCI2;
  6369. if (!isCI2) {
  6370. return;
  6371. }
  6372. exports.name = vendor.name;
  6373. switch (typeof vendor.pr) {
  6374. case "string":
  6375. exports.isPR = !!env[vendor.pr];
  6376. break;
  6377. case "object":
  6378. if ("env" in vendor.pr) {
  6379. exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
  6380. } else if ("any" in vendor.pr) {
  6381. exports.isPR = vendor.pr.any.some(function(key) {
  6382. return !!env[key];
  6383. });
  6384. } else {
  6385. exports.isPR = checkEnv(vendor.pr);
  6386. }
  6387. break;
  6388. default:
  6389. exports.isPR = null;
  6390. }
  6391. });
  6392. exports.isCI = !!(env.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false'
  6393. (env.BUILD_ID || // Jenkins, Cloudbees
  6394. env.BUILD_NUMBER || // Jenkins, TeamCity
  6395. env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
  6396. env.CI_APP_ID || // Appflow
  6397. env.CI_BUILD_ID || // Appflow
  6398. env.CI_BUILD_NUMBER || // Appflow
  6399. env.CI_NAME || // Codeship and others
  6400. env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
  6401. env.RUN_ID || // TaskCluster, dsari
  6402. exports.name || false));
  6403. function checkEnv(obj) {
  6404. if (typeof obj === "string")
  6405. return !!env[obj];
  6406. if ("env" in obj) {
  6407. return env[obj.env] && env[obj.env].includes(obj.includes);
  6408. }
  6409. if ("any" in obj) {
  6410. return obj.any.some(function(k) {
  6411. return !!env[k];
  6412. });
  6413. }
  6414. return Object.keys(obj).every(function(k) {
  6415. return env[k] === obj[k];
  6416. });
  6417. }
  6418. }
  6419. });
  6420. // src/common/mockable.js
  6421. var import_cosmiconfig = __toESM(require_dist(), 1);
  6422. var import_find_parent_dir = __toESM(require_find_parent_dir(), 1);
  6423. import fs from "fs/promises";
  6424. // node_modules/get-stdin/index.js
  6425. var { stdin } = process;
  6426. async function getStdin() {
  6427. let result = "";
  6428. if (stdin.isTTY) {
  6429. return result;
  6430. }
  6431. stdin.setEncoding("utf8");
  6432. for await (const chunk of stdin) {
  6433. result += chunk;
  6434. }
  6435. return result;
  6436. }
  6437. getStdin.buffer = async () => {
  6438. const result = [];
  6439. let length = 0;
  6440. if (stdin.isTTY) {
  6441. return Buffer.concat([]);
  6442. }
  6443. for await (const chunk of stdin) {
  6444. result.push(chunk);
  6445. length += chunk.length;
  6446. }
  6447. return Buffer.concat(result, length);
  6448. };
  6449. // src/common/mockable.js
  6450. var import_ci_info = __toESM(require_ci_info(), 1);
  6451. function writeFormattedFile(file, data) {
  6452. return fs.writeFile(file, data);
  6453. }
  6454. var mockable = {
  6455. cosmiconfig: import_cosmiconfig.cosmiconfig,
  6456. findParentDir: import_find_parent_dir.sync,
  6457. getStdin,
  6458. isCI: () => import_ci_info.isCI,
  6459. writeFormattedFile
  6460. };
  6461. var mockable_default = mockable;
  6462. export {
  6463. mockable_default as default
  6464. };