internal.mjs 226 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555
  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/code-frame/node_modules/escape-string-regexp/index.js
  662. var require_escape_string_regexp = __commonJS({
  663. "node_modules/@babel/code-frame/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/code-frame/node_modules/has-flag/index.js
  1812. var require_has_flag = __commonJS({
  1813. "node_modules/@babel/code-frame/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/code-frame/node_modules/supports-color/index.js
  1825. var require_supports_color = __commonJS({
  1826. "node_modules/@babel/code-frame/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/code-frame/node_modules/chalk/templates.js
  1919. var require_templates = __commonJS({
  1920. "node_modules/@babel/code-frame/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/code-frame/node_modules/chalk/index.js
  2029. var require_chalk = __commonJS({
  2030. "node_modules/@babel/code-frame/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.shouldHighlight = shouldHighlight;
  2203. var _jsTokens = require_js_tokens();
  2204. var _helperValidatorIdentifier = require_lib();
  2205. var _chalk2 = require_chalk();
  2206. var chalk = _chalk2;
  2207. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  2208. function getDefs(chalk2) {
  2209. return {
  2210. keyword: chalk2.cyan,
  2211. capitalized: chalk2.yellow,
  2212. jsxIdentifier: chalk2.yellow,
  2213. punctuator: chalk2.yellow,
  2214. number: chalk2.magenta,
  2215. string: chalk2.green,
  2216. regex: chalk2.magenta,
  2217. comment: chalk2.grey,
  2218. invalid: chalk2.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. var chalkWithForcedColor = void 0;
  2276. function getChalk(forceColor) {
  2277. if (forceColor) {
  2278. var _chalkWithForcedColor;
  2279. (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk.constructor({
  2280. enabled: true,
  2281. level: 1
  2282. });
  2283. return chalkWithForcedColor;
  2284. }
  2285. return chalk;
  2286. }
  2287. {
  2288. {
  2289. exports.getChalk = (options) => getChalk(options.forceColor);
  2290. }
  2291. }
  2292. function highlight(code, options = {}) {
  2293. if (code !== "" && shouldHighlight(options)) {
  2294. const defs = getDefs(getChalk(options.forceColor));
  2295. return highlightTokens(defs, code);
  2296. } else {
  2297. return code;
  2298. }
  2299. }
  2300. }
  2301. });
  2302. // node_modules/@babel/code-frame/lib/index.js
  2303. var require_lib3 = __commonJS({
  2304. "node_modules/@babel/code-frame/lib/index.js"(exports) {
  2305. "use strict";
  2306. Object.defineProperty(exports, "__esModule", {
  2307. value: true
  2308. });
  2309. exports.codeFrameColumns = codeFrameColumns;
  2310. exports.default = _default;
  2311. var _highlight = require_lib2();
  2312. var _chalk2 = require_chalk();
  2313. var chalk = _chalk2;
  2314. var chalkWithForcedColor = void 0;
  2315. function getChalk(forceColor) {
  2316. if (forceColor) {
  2317. var _chalkWithForcedColor;
  2318. (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk.constructor({
  2319. enabled: true,
  2320. level: 1
  2321. });
  2322. return chalkWithForcedColor;
  2323. }
  2324. return chalk;
  2325. }
  2326. var deprecationWarningShown = false;
  2327. function getDefs(chalk2) {
  2328. return {
  2329. gutter: chalk2.grey,
  2330. marker: chalk2.red.bold,
  2331. message: chalk2.red.bold
  2332. };
  2333. }
  2334. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  2335. function getMarkerLines(loc, source, opts) {
  2336. const startLoc = Object.assign({
  2337. column: 0,
  2338. line: -1
  2339. }, loc.start);
  2340. const endLoc = Object.assign({}, startLoc, loc.end);
  2341. const {
  2342. linesAbove = 2,
  2343. linesBelow = 3
  2344. } = opts || {};
  2345. const startLine = startLoc.line;
  2346. const startColumn = startLoc.column;
  2347. const endLine = endLoc.line;
  2348. const endColumn = endLoc.column;
  2349. let start = Math.max(startLine - (linesAbove + 1), 0);
  2350. let end = Math.min(source.length, endLine + linesBelow);
  2351. if (startLine === -1) {
  2352. start = 0;
  2353. }
  2354. if (endLine === -1) {
  2355. end = source.length;
  2356. }
  2357. const lineDiff = endLine - startLine;
  2358. const markerLines = {};
  2359. if (lineDiff) {
  2360. for (let i = 0; i <= lineDiff; i++) {
  2361. const lineNumber = i + startLine;
  2362. if (!startColumn) {
  2363. markerLines[lineNumber] = true;
  2364. } else if (i === 0) {
  2365. const sourceLength = source[lineNumber - 1].length;
  2366. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  2367. } else if (i === lineDiff) {
  2368. markerLines[lineNumber] = [0, endColumn];
  2369. } else {
  2370. const sourceLength = source[lineNumber - i].length;
  2371. markerLines[lineNumber] = [0, sourceLength];
  2372. }
  2373. }
  2374. } else {
  2375. if (startColumn === endColumn) {
  2376. if (startColumn) {
  2377. markerLines[startLine] = [startColumn, 0];
  2378. } else {
  2379. markerLines[startLine] = true;
  2380. }
  2381. } else {
  2382. markerLines[startLine] = [startColumn, endColumn - startColumn];
  2383. }
  2384. }
  2385. return {
  2386. start,
  2387. end,
  2388. markerLines
  2389. };
  2390. }
  2391. function codeFrameColumns(rawLines, loc, opts = {}) {
  2392. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  2393. const chalk2 = getChalk(opts.forceColor);
  2394. const defs = getDefs(chalk2);
  2395. const maybeHighlight = (chalkFn, string) => {
  2396. return highlighted ? chalkFn(string) : string;
  2397. };
  2398. const lines = rawLines.split(NEWLINE);
  2399. const {
  2400. start,
  2401. end,
  2402. markerLines
  2403. } = getMarkerLines(loc, lines, opts);
  2404. const hasColumns = loc.start && typeof loc.start.column === "number";
  2405. const numberMaxWidth = String(end).length;
  2406. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  2407. let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
  2408. const number = start + 1 + index;
  2409. const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
  2410. const gutter = ` ${paddedNumber} |`;
  2411. const hasMarker = markerLines[number];
  2412. const lastMarkerLine = !markerLines[number + 1];
  2413. if (hasMarker) {
  2414. let markerLine = "";
  2415. if (Array.isArray(hasMarker)) {
  2416. const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  2417. const numberOfMarkers = hasMarker[1] || 1;
  2418. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  2419. if (lastMarkerLine && opts.message) {
  2420. markerLine += " " + maybeHighlight(defs.message, opts.message);
  2421. }
  2422. }
  2423. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
  2424. } else {
  2425. return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
  2426. }
  2427. }).join("\n");
  2428. if (opts.message && !hasColumns) {
  2429. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  2430. ${frame}`;
  2431. }
  2432. if (highlighted) {
  2433. return chalk2.reset(frame);
  2434. } else {
  2435. return frame;
  2436. }
  2437. }
  2438. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  2439. if (!deprecationWarningShown) {
  2440. deprecationWarningShown = true;
  2441. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  2442. if (process.emitWarning) {
  2443. process.emitWarning(message, "DeprecationWarning");
  2444. } else {
  2445. const deprecationError = new Error(message);
  2446. deprecationError.name = "DeprecationWarning";
  2447. console.warn(new Error(message));
  2448. }
  2449. }
  2450. colNumber = Math.max(colNumber, 0);
  2451. const location = {
  2452. start: {
  2453. column: colNumber,
  2454. line: lineNumber
  2455. }
  2456. };
  2457. return codeFrameColumns(rawLines, location, opts);
  2458. }
  2459. }
  2460. });
  2461. // node_modules/parse-json/index.js
  2462. var require_parse_json = __commonJS({
  2463. "node_modules/parse-json/index.js"(exports, module) {
  2464. "use strict";
  2465. var errorEx = require_error_ex();
  2466. var fallback = require_json_parse_even_better_errors();
  2467. var { default: LinesAndColumns } = require_build();
  2468. var { codeFrameColumns } = require_lib3();
  2469. var JSONError = errorEx("JSONError", {
  2470. fileName: errorEx.append("in %s"),
  2471. codeFrame: errorEx.append("\n\n%s\n")
  2472. });
  2473. var parseJson = (string, reviver, filename) => {
  2474. if (typeof reviver === "string") {
  2475. filename = reviver;
  2476. reviver = null;
  2477. }
  2478. try {
  2479. try {
  2480. return JSON.parse(string, reviver);
  2481. } catch (error) {
  2482. fallback(string, reviver);
  2483. throw error;
  2484. }
  2485. } catch (error) {
  2486. error.message = error.message.replace(/\n/g, "");
  2487. const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/);
  2488. const jsonError = new JSONError(error);
  2489. if (filename) {
  2490. jsonError.fileName = filename;
  2491. }
  2492. if (indexMatch && indexMatch.length > 0) {
  2493. const lines = new LinesAndColumns(string);
  2494. const index = Number(indexMatch[1]);
  2495. const location = lines.locationForIndex(index);
  2496. const codeFrame = codeFrameColumns(
  2497. string,
  2498. { start: { line: location.line + 1, column: location.column + 1 } },
  2499. { highlightCode: true }
  2500. );
  2501. jsonError.codeFrame = codeFrame;
  2502. }
  2503. throw jsonError;
  2504. }
  2505. };
  2506. parseJson.JSONError = JSONError;
  2507. module.exports = parseJson;
  2508. }
  2509. });
  2510. // node_modules/js-yaml/lib/common.js
  2511. var require_common = __commonJS({
  2512. "node_modules/js-yaml/lib/common.js"(exports, module) {
  2513. "use strict";
  2514. function isNothing(subject) {
  2515. return typeof subject === "undefined" || subject === null;
  2516. }
  2517. function isObject(subject) {
  2518. return typeof subject === "object" && subject !== null;
  2519. }
  2520. function toArray(sequence) {
  2521. if (Array.isArray(sequence))
  2522. return sequence;
  2523. else if (isNothing(sequence))
  2524. return [];
  2525. return [sequence];
  2526. }
  2527. function extend(target, source) {
  2528. var index, length, key, sourceKeys;
  2529. if (source) {
  2530. sourceKeys = Object.keys(source);
  2531. for (index = 0, length = sourceKeys.length; index < length; index += 1) {
  2532. key = sourceKeys[index];
  2533. target[key] = source[key];
  2534. }
  2535. }
  2536. return target;
  2537. }
  2538. function repeat(string, count) {
  2539. var result = "", cycle;
  2540. for (cycle = 0; cycle < count; cycle += 1) {
  2541. result += string;
  2542. }
  2543. return result;
  2544. }
  2545. function isNegativeZero(number) {
  2546. return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
  2547. }
  2548. module.exports.isNothing = isNothing;
  2549. module.exports.isObject = isObject;
  2550. module.exports.toArray = toArray;
  2551. module.exports.repeat = repeat;
  2552. module.exports.isNegativeZero = isNegativeZero;
  2553. module.exports.extend = extend;
  2554. }
  2555. });
  2556. // node_modules/js-yaml/lib/exception.js
  2557. var require_exception = __commonJS({
  2558. "node_modules/js-yaml/lib/exception.js"(exports, module) {
  2559. "use strict";
  2560. function formatError(exception, compact) {
  2561. var where = "", message = exception.reason || "(unknown reason)";
  2562. if (!exception.mark)
  2563. return message;
  2564. if (exception.mark.name) {
  2565. where += 'in "' + exception.mark.name + '" ';
  2566. }
  2567. where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")";
  2568. if (!compact && exception.mark.snippet) {
  2569. where += "\n\n" + exception.mark.snippet;
  2570. }
  2571. return message + " " + where;
  2572. }
  2573. function YAMLException(reason, mark) {
  2574. Error.call(this);
  2575. this.name = "YAMLException";
  2576. this.reason = reason;
  2577. this.mark = mark;
  2578. this.message = formatError(this, false);
  2579. if (Error.captureStackTrace) {
  2580. Error.captureStackTrace(this, this.constructor);
  2581. } else {
  2582. this.stack = new Error().stack || "";
  2583. }
  2584. }
  2585. YAMLException.prototype = Object.create(Error.prototype);
  2586. YAMLException.prototype.constructor = YAMLException;
  2587. YAMLException.prototype.toString = function toString(compact) {
  2588. return this.name + ": " + formatError(this, compact);
  2589. };
  2590. module.exports = YAMLException;
  2591. }
  2592. });
  2593. // node_modules/js-yaml/lib/snippet.js
  2594. var require_snippet = __commonJS({
  2595. "node_modules/js-yaml/lib/snippet.js"(exports, module) {
  2596. "use strict";
  2597. var common = require_common();
  2598. function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
  2599. var head = "";
  2600. var tail = "";
  2601. var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
  2602. if (position - lineStart > maxHalfLength) {
  2603. head = " ... ";
  2604. lineStart = position - maxHalfLength + head.length;
  2605. }
  2606. if (lineEnd - position > maxHalfLength) {
  2607. tail = " ...";
  2608. lineEnd = position + maxHalfLength - tail.length;
  2609. }
  2610. return {
  2611. str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail,
  2612. pos: position - lineStart + head.length
  2613. // relative position
  2614. };
  2615. }
  2616. function padStart(string, max) {
  2617. return common.repeat(" ", max - string.length) + string;
  2618. }
  2619. function makeSnippet(mark, options) {
  2620. options = Object.create(options || null);
  2621. if (!mark.buffer)
  2622. return null;
  2623. if (!options.maxLength)
  2624. options.maxLength = 79;
  2625. if (typeof options.indent !== "number")
  2626. options.indent = 1;
  2627. if (typeof options.linesBefore !== "number")
  2628. options.linesBefore = 3;
  2629. if (typeof options.linesAfter !== "number")
  2630. options.linesAfter = 2;
  2631. var re = /\r?\n|\r|\0/g;
  2632. var lineStarts = [0];
  2633. var lineEnds = [];
  2634. var match;
  2635. var foundLineNo = -1;
  2636. while (match = re.exec(mark.buffer)) {
  2637. lineEnds.push(match.index);
  2638. lineStarts.push(match.index + match[0].length);
  2639. if (mark.position <= match.index && foundLineNo < 0) {
  2640. foundLineNo = lineStarts.length - 2;
  2641. }
  2642. }
  2643. if (foundLineNo < 0)
  2644. foundLineNo = lineStarts.length - 1;
  2645. var result = "", i, line;
  2646. var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
  2647. var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
  2648. for (i = 1; i <= options.linesBefore; i++) {
  2649. if (foundLineNo - i < 0)
  2650. break;
  2651. line = getLine(
  2652. mark.buffer,
  2653. lineStarts[foundLineNo - i],
  2654. lineEnds[foundLineNo - i],
  2655. mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
  2656. maxLineLength
  2657. );
  2658. result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result;
  2659. }
  2660. line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
  2661. result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
  2662. result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
  2663. for (i = 1; i <= options.linesAfter; i++) {
  2664. if (foundLineNo + i >= lineEnds.length)
  2665. break;
  2666. line = getLine(
  2667. mark.buffer,
  2668. lineStarts[foundLineNo + i],
  2669. lineEnds[foundLineNo + i],
  2670. mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
  2671. maxLineLength
  2672. );
  2673. result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n";
  2674. }
  2675. return result.replace(/\n$/, "");
  2676. }
  2677. module.exports = makeSnippet;
  2678. }
  2679. });
  2680. // node_modules/js-yaml/lib/type.js
  2681. var require_type = __commonJS({
  2682. "node_modules/js-yaml/lib/type.js"(exports, module) {
  2683. "use strict";
  2684. var YAMLException = require_exception();
  2685. var TYPE_CONSTRUCTOR_OPTIONS = [
  2686. "kind",
  2687. "multi",
  2688. "resolve",
  2689. "construct",
  2690. "instanceOf",
  2691. "predicate",
  2692. "represent",
  2693. "representName",
  2694. "defaultStyle",
  2695. "styleAliases"
  2696. ];
  2697. var YAML_NODE_KINDS = [
  2698. "scalar",
  2699. "sequence",
  2700. "mapping"
  2701. ];
  2702. function compileStyleAliases(map) {
  2703. var result = {};
  2704. if (map !== null) {
  2705. Object.keys(map).forEach(function(style) {
  2706. map[style].forEach(function(alias) {
  2707. result[String(alias)] = style;
  2708. });
  2709. });
  2710. }
  2711. return result;
  2712. }
  2713. function Type(tag, options) {
  2714. options = options || {};
  2715. Object.keys(options).forEach(function(name) {
  2716. if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
  2717. throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
  2718. }
  2719. });
  2720. this.options = options;
  2721. this.tag = tag;
  2722. this.kind = options["kind"] || null;
  2723. this.resolve = options["resolve"] || function() {
  2724. return true;
  2725. };
  2726. this.construct = options["construct"] || function(data) {
  2727. return data;
  2728. };
  2729. this.instanceOf = options["instanceOf"] || null;
  2730. this.predicate = options["predicate"] || null;
  2731. this.represent = options["represent"] || null;
  2732. this.representName = options["representName"] || null;
  2733. this.defaultStyle = options["defaultStyle"] || null;
  2734. this.multi = options["multi"] || false;
  2735. this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
  2736. if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
  2737. throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
  2738. }
  2739. }
  2740. module.exports = Type;
  2741. }
  2742. });
  2743. // node_modules/js-yaml/lib/schema.js
  2744. var require_schema = __commonJS({
  2745. "node_modules/js-yaml/lib/schema.js"(exports, module) {
  2746. "use strict";
  2747. var YAMLException = require_exception();
  2748. var Type = require_type();
  2749. function compileList(schema, name) {
  2750. var result = [];
  2751. schema[name].forEach(function(currentType) {
  2752. var newIndex = result.length;
  2753. result.forEach(function(previousType, previousIndex) {
  2754. if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
  2755. newIndex = previousIndex;
  2756. }
  2757. });
  2758. result[newIndex] = currentType;
  2759. });
  2760. return result;
  2761. }
  2762. function compileMap() {
  2763. var result = {
  2764. scalar: {},
  2765. sequence: {},
  2766. mapping: {},
  2767. fallback: {},
  2768. multi: {
  2769. scalar: [],
  2770. sequence: [],
  2771. mapping: [],
  2772. fallback: []
  2773. }
  2774. }, index, length;
  2775. function collectType(type) {
  2776. if (type.multi) {
  2777. result.multi[type.kind].push(type);
  2778. result.multi["fallback"].push(type);
  2779. } else {
  2780. result[type.kind][type.tag] = result["fallback"][type.tag] = type;
  2781. }
  2782. }
  2783. for (index = 0, length = arguments.length; index < length; index += 1) {
  2784. arguments[index].forEach(collectType);
  2785. }
  2786. return result;
  2787. }
  2788. function Schema(definition) {
  2789. return this.extend(definition);
  2790. }
  2791. Schema.prototype.extend = function extend(definition) {
  2792. var implicit = [];
  2793. var explicit = [];
  2794. if (definition instanceof Type) {
  2795. explicit.push(definition);
  2796. } else if (Array.isArray(definition)) {
  2797. explicit = explicit.concat(definition);
  2798. } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
  2799. if (definition.implicit)
  2800. implicit = implicit.concat(definition.implicit);
  2801. if (definition.explicit)
  2802. explicit = explicit.concat(definition.explicit);
  2803. } else {
  2804. throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
  2805. }
  2806. implicit.forEach(function(type) {
  2807. if (!(type instanceof Type)) {
  2808. throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
  2809. }
  2810. if (type.loadKind && type.loadKind !== "scalar") {
  2811. throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
  2812. }
  2813. if (type.multi) {
  2814. throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
  2815. }
  2816. });
  2817. explicit.forEach(function(type) {
  2818. if (!(type instanceof Type)) {
  2819. throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
  2820. }
  2821. });
  2822. var result = Object.create(Schema.prototype);
  2823. result.implicit = (this.implicit || []).concat(implicit);
  2824. result.explicit = (this.explicit || []).concat(explicit);
  2825. result.compiledImplicit = compileList(result, "implicit");
  2826. result.compiledExplicit = compileList(result, "explicit");
  2827. result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
  2828. return result;
  2829. };
  2830. module.exports = Schema;
  2831. }
  2832. });
  2833. // node_modules/js-yaml/lib/type/str.js
  2834. var require_str = __commonJS({
  2835. "node_modules/js-yaml/lib/type/str.js"(exports, module) {
  2836. "use strict";
  2837. var Type = require_type();
  2838. module.exports = new Type("tag:yaml.org,2002:str", {
  2839. kind: "scalar",
  2840. construct: function(data) {
  2841. return data !== null ? data : "";
  2842. }
  2843. });
  2844. }
  2845. });
  2846. // node_modules/js-yaml/lib/type/seq.js
  2847. var require_seq = __commonJS({
  2848. "node_modules/js-yaml/lib/type/seq.js"(exports, module) {
  2849. "use strict";
  2850. var Type = require_type();
  2851. module.exports = new Type("tag:yaml.org,2002:seq", {
  2852. kind: "sequence",
  2853. construct: function(data) {
  2854. return data !== null ? data : [];
  2855. }
  2856. });
  2857. }
  2858. });
  2859. // node_modules/js-yaml/lib/type/map.js
  2860. var require_map = __commonJS({
  2861. "node_modules/js-yaml/lib/type/map.js"(exports, module) {
  2862. "use strict";
  2863. var Type = require_type();
  2864. module.exports = new Type("tag:yaml.org,2002:map", {
  2865. kind: "mapping",
  2866. construct: function(data) {
  2867. return data !== null ? data : {};
  2868. }
  2869. });
  2870. }
  2871. });
  2872. // node_modules/js-yaml/lib/schema/failsafe.js
  2873. var require_failsafe = __commonJS({
  2874. "node_modules/js-yaml/lib/schema/failsafe.js"(exports, module) {
  2875. "use strict";
  2876. var Schema = require_schema();
  2877. module.exports = new Schema({
  2878. explicit: [
  2879. require_str(),
  2880. require_seq(),
  2881. require_map()
  2882. ]
  2883. });
  2884. }
  2885. });
  2886. // node_modules/js-yaml/lib/type/null.js
  2887. var require_null = __commonJS({
  2888. "node_modules/js-yaml/lib/type/null.js"(exports, module) {
  2889. "use strict";
  2890. var Type = require_type();
  2891. function resolveYamlNull(data) {
  2892. if (data === null)
  2893. return true;
  2894. var max = data.length;
  2895. return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
  2896. }
  2897. function constructYamlNull() {
  2898. return null;
  2899. }
  2900. function isNull(object) {
  2901. return object === null;
  2902. }
  2903. module.exports = new Type("tag:yaml.org,2002:null", {
  2904. kind: "scalar",
  2905. resolve: resolveYamlNull,
  2906. construct: constructYamlNull,
  2907. predicate: isNull,
  2908. represent: {
  2909. canonical: function() {
  2910. return "~";
  2911. },
  2912. lowercase: function() {
  2913. return "null";
  2914. },
  2915. uppercase: function() {
  2916. return "NULL";
  2917. },
  2918. camelcase: function() {
  2919. return "Null";
  2920. },
  2921. empty: function() {
  2922. return "";
  2923. }
  2924. },
  2925. defaultStyle: "lowercase"
  2926. });
  2927. }
  2928. });
  2929. // node_modules/js-yaml/lib/type/bool.js
  2930. var require_bool = __commonJS({
  2931. "node_modules/js-yaml/lib/type/bool.js"(exports, module) {
  2932. "use strict";
  2933. var Type = require_type();
  2934. function resolveYamlBoolean(data) {
  2935. if (data === null)
  2936. return false;
  2937. var max = data.length;
  2938. return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
  2939. }
  2940. function constructYamlBoolean(data) {
  2941. return data === "true" || data === "True" || data === "TRUE";
  2942. }
  2943. function isBoolean(object) {
  2944. return Object.prototype.toString.call(object) === "[object Boolean]";
  2945. }
  2946. module.exports = new Type("tag:yaml.org,2002:bool", {
  2947. kind: "scalar",
  2948. resolve: resolveYamlBoolean,
  2949. construct: constructYamlBoolean,
  2950. predicate: isBoolean,
  2951. represent: {
  2952. lowercase: function(object) {
  2953. return object ? "true" : "false";
  2954. },
  2955. uppercase: function(object) {
  2956. return object ? "TRUE" : "FALSE";
  2957. },
  2958. camelcase: function(object) {
  2959. return object ? "True" : "False";
  2960. }
  2961. },
  2962. defaultStyle: "lowercase"
  2963. });
  2964. }
  2965. });
  2966. // node_modules/js-yaml/lib/type/int.js
  2967. var require_int = __commonJS({
  2968. "node_modules/js-yaml/lib/type/int.js"(exports, module) {
  2969. "use strict";
  2970. var common = require_common();
  2971. var Type = require_type();
  2972. function isHexCode(c) {
  2973. return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
  2974. }
  2975. function isOctCode(c) {
  2976. return 48 <= c && c <= 55;
  2977. }
  2978. function isDecCode(c) {
  2979. return 48 <= c && c <= 57;
  2980. }
  2981. function resolveYamlInteger(data) {
  2982. if (data === null)
  2983. return false;
  2984. var max = data.length, index = 0, hasDigits = false, ch;
  2985. if (!max)
  2986. return false;
  2987. ch = data[index];
  2988. if (ch === "-" || ch === "+") {
  2989. ch = data[++index];
  2990. }
  2991. if (ch === "0") {
  2992. if (index + 1 === max)
  2993. return true;
  2994. ch = data[++index];
  2995. if (ch === "b") {
  2996. index++;
  2997. for (; index < max; index++) {
  2998. ch = data[index];
  2999. if (ch === "_")
  3000. continue;
  3001. if (ch !== "0" && ch !== "1")
  3002. return false;
  3003. hasDigits = true;
  3004. }
  3005. return hasDigits && ch !== "_";
  3006. }
  3007. if (ch === "x") {
  3008. index++;
  3009. for (; index < max; index++) {
  3010. ch = data[index];
  3011. if (ch === "_")
  3012. continue;
  3013. if (!isHexCode(data.charCodeAt(index)))
  3014. return false;
  3015. hasDigits = true;
  3016. }
  3017. return hasDigits && ch !== "_";
  3018. }
  3019. if (ch === "o") {
  3020. index++;
  3021. for (; index < max; index++) {
  3022. ch = data[index];
  3023. if (ch === "_")
  3024. continue;
  3025. if (!isOctCode(data.charCodeAt(index)))
  3026. return false;
  3027. hasDigits = true;
  3028. }
  3029. return hasDigits && ch !== "_";
  3030. }
  3031. }
  3032. if (ch === "_")
  3033. return false;
  3034. for (; index < max; index++) {
  3035. ch = data[index];
  3036. if (ch === "_")
  3037. continue;
  3038. if (!isDecCode(data.charCodeAt(index))) {
  3039. return false;
  3040. }
  3041. hasDigits = true;
  3042. }
  3043. if (!hasDigits || ch === "_")
  3044. return false;
  3045. return true;
  3046. }
  3047. function constructYamlInteger(data) {
  3048. var value = data, sign = 1, ch;
  3049. if (value.indexOf("_") !== -1) {
  3050. value = value.replace(/_/g, "");
  3051. }
  3052. ch = value[0];
  3053. if (ch === "-" || ch === "+") {
  3054. if (ch === "-")
  3055. sign = -1;
  3056. value = value.slice(1);
  3057. ch = value[0];
  3058. }
  3059. if (value === "0")
  3060. return 0;
  3061. if (ch === "0") {
  3062. if (value[1] === "b")
  3063. return sign * parseInt(value.slice(2), 2);
  3064. if (value[1] === "x")
  3065. return sign * parseInt(value.slice(2), 16);
  3066. if (value[1] === "o")
  3067. return sign * parseInt(value.slice(2), 8);
  3068. }
  3069. return sign * parseInt(value, 10);
  3070. }
  3071. function isInteger(object) {
  3072. return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
  3073. }
  3074. module.exports = new Type("tag:yaml.org,2002:int", {
  3075. kind: "scalar",
  3076. resolve: resolveYamlInteger,
  3077. construct: constructYamlInteger,
  3078. predicate: isInteger,
  3079. represent: {
  3080. binary: function(obj) {
  3081. return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
  3082. },
  3083. octal: function(obj) {
  3084. return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1);
  3085. },
  3086. decimal: function(obj) {
  3087. return obj.toString(10);
  3088. },
  3089. /* eslint-disable max-len */
  3090. hexadecimal: function(obj) {
  3091. return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
  3092. }
  3093. },
  3094. defaultStyle: "decimal",
  3095. styleAliases: {
  3096. binary: [2, "bin"],
  3097. octal: [8, "oct"],
  3098. decimal: [10, "dec"],
  3099. hexadecimal: [16, "hex"]
  3100. }
  3101. });
  3102. }
  3103. });
  3104. // node_modules/js-yaml/lib/type/float.js
  3105. var require_float = __commonJS({
  3106. "node_modules/js-yaml/lib/type/float.js"(exports, module) {
  3107. "use strict";
  3108. var common = require_common();
  3109. var Type = require_type();
  3110. var YAML_FLOAT_PATTERN = new RegExp(
  3111. // 2.5e4, 2.5 and integers
  3112. "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
  3113. );
  3114. function resolveYamlFloat(data) {
  3115. if (data === null)
  3116. return false;
  3117. if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_`
  3118. // Probably should update regexp & check speed
  3119. data[data.length - 1] === "_") {
  3120. return false;
  3121. }
  3122. return true;
  3123. }
  3124. function constructYamlFloat(data) {
  3125. var value, sign;
  3126. value = data.replace(/_/g, "").toLowerCase();
  3127. sign = value[0] === "-" ? -1 : 1;
  3128. if ("+-".indexOf(value[0]) >= 0) {
  3129. value = value.slice(1);
  3130. }
  3131. if (value === ".inf") {
  3132. return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
  3133. } else if (value === ".nan") {
  3134. return NaN;
  3135. }
  3136. return sign * parseFloat(value, 10);
  3137. }
  3138. var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
  3139. function representYamlFloat(object, style) {
  3140. var res;
  3141. if (isNaN(object)) {
  3142. switch (style) {
  3143. case "lowercase":
  3144. return ".nan";
  3145. case "uppercase":
  3146. return ".NAN";
  3147. case "camelcase":
  3148. return ".NaN";
  3149. }
  3150. } else if (Number.POSITIVE_INFINITY === object) {
  3151. switch (style) {
  3152. case "lowercase":
  3153. return ".inf";
  3154. case "uppercase":
  3155. return ".INF";
  3156. case "camelcase":
  3157. return ".Inf";
  3158. }
  3159. } else if (Number.NEGATIVE_INFINITY === object) {
  3160. switch (style) {
  3161. case "lowercase":
  3162. return "-.inf";
  3163. case "uppercase":
  3164. return "-.INF";
  3165. case "camelcase":
  3166. return "-.Inf";
  3167. }
  3168. } else if (common.isNegativeZero(object)) {
  3169. return "-0.0";
  3170. }
  3171. res = object.toString(10);
  3172. return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
  3173. }
  3174. function isFloat(object) {
  3175. return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
  3176. }
  3177. module.exports = new Type("tag:yaml.org,2002:float", {
  3178. kind: "scalar",
  3179. resolve: resolveYamlFloat,
  3180. construct: constructYamlFloat,
  3181. predicate: isFloat,
  3182. represent: representYamlFloat,
  3183. defaultStyle: "lowercase"
  3184. });
  3185. }
  3186. });
  3187. // node_modules/js-yaml/lib/schema/json.js
  3188. var require_json = __commonJS({
  3189. "node_modules/js-yaml/lib/schema/json.js"(exports, module) {
  3190. "use strict";
  3191. module.exports = require_failsafe().extend({
  3192. implicit: [
  3193. require_null(),
  3194. require_bool(),
  3195. require_int(),
  3196. require_float()
  3197. ]
  3198. });
  3199. }
  3200. });
  3201. // node_modules/js-yaml/lib/schema/core.js
  3202. var require_core = __commonJS({
  3203. "node_modules/js-yaml/lib/schema/core.js"(exports, module) {
  3204. "use strict";
  3205. module.exports = require_json();
  3206. }
  3207. });
  3208. // node_modules/js-yaml/lib/type/timestamp.js
  3209. var require_timestamp = __commonJS({
  3210. "node_modules/js-yaml/lib/type/timestamp.js"(exports, module) {
  3211. "use strict";
  3212. var Type = require_type();
  3213. var YAML_DATE_REGEXP = new RegExp(
  3214. "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
  3215. );
  3216. var YAML_TIMESTAMP_REGEXP = new RegExp(
  3217. "^([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]))?))?$"
  3218. );
  3219. function resolveYamlTimestamp(data) {
  3220. if (data === null)
  3221. return false;
  3222. if (YAML_DATE_REGEXP.exec(data) !== null)
  3223. return true;
  3224. if (YAML_TIMESTAMP_REGEXP.exec(data) !== null)
  3225. return true;
  3226. return false;
  3227. }
  3228. function constructYamlTimestamp(data) {
  3229. var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
  3230. match = YAML_DATE_REGEXP.exec(data);
  3231. if (match === null)
  3232. match = YAML_TIMESTAMP_REGEXP.exec(data);
  3233. if (match === null)
  3234. throw new Error("Date resolve error");
  3235. year = +match[1];
  3236. month = +match[2] - 1;
  3237. day = +match[3];
  3238. if (!match[4]) {
  3239. return new Date(Date.UTC(year, month, day));
  3240. }
  3241. hour = +match[4];
  3242. minute = +match[5];
  3243. second = +match[6];
  3244. if (match[7]) {
  3245. fraction = match[7].slice(0, 3);
  3246. while (fraction.length < 3) {
  3247. fraction += "0";
  3248. }
  3249. fraction = +fraction;
  3250. }
  3251. if (match[9]) {
  3252. tz_hour = +match[10];
  3253. tz_minute = +(match[11] || 0);
  3254. delta = (tz_hour * 60 + tz_minute) * 6e4;
  3255. if (match[9] === "-")
  3256. delta = -delta;
  3257. }
  3258. date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
  3259. if (delta)
  3260. date.setTime(date.getTime() - delta);
  3261. return date;
  3262. }
  3263. function representYamlTimestamp(object) {
  3264. return object.toISOString();
  3265. }
  3266. module.exports = new Type("tag:yaml.org,2002:timestamp", {
  3267. kind: "scalar",
  3268. resolve: resolveYamlTimestamp,
  3269. construct: constructYamlTimestamp,
  3270. instanceOf: Date,
  3271. represent: representYamlTimestamp
  3272. });
  3273. }
  3274. });
  3275. // node_modules/js-yaml/lib/type/merge.js
  3276. var require_merge = __commonJS({
  3277. "node_modules/js-yaml/lib/type/merge.js"(exports, module) {
  3278. "use strict";
  3279. var Type = require_type();
  3280. function resolveYamlMerge(data) {
  3281. return data === "<<" || data === null;
  3282. }
  3283. module.exports = new Type("tag:yaml.org,2002:merge", {
  3284. kind: "scalar",
  3285. resolve: resolveYamlMerge
  3286. });
  3287. }
  3288. });
  3289. // node_modules/js-yaml/lib/type/binary.js
  3290. var require_binary = __commonJS({
  3291. "node_modules/js-yaml/lib/type/binary.js"(exports, module) {
  3292. "use strict";
  3293. var Type = require_type();
  3294. var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
  3295. function resolveYamlBinary(data) {
  3296. if (data === null)
  3297. return false;
  3298. var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
  3299. for (idx = 0; idx < max; idx++) {
  3300. code = map.indexOf(data.charAt(idx));
  3301. if (code > 64)
  3302. continue;
  3303. if (code < 0)
  3304. return false;
  3305. bitlen += 6;
  3306. }
  3307. return bitlen % 8 === 0;
  3308. }
  3309. function constructYamlBinary(data) {
  3310. var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = [];
  3311. for (idx = 0; idx < max; idx++) {
  3312. if (idx % 4 === 0 && idx) {
  3313. result.push(bits >> 16 & 255);
  3314. result.push(bits >> 8 & 255);
  3315. result.push(bits & 255);
  3316. }
  3317. bits = bits << 6 | map.indexOf(input.charAt(idx));
  3318. }
  3319. tailbits = max % 4 * 6;
  3320. if (tailbits === 0) {
  3321. result.push(bits >> 16 & 255);
  3322. result.push(bits >> 8 & 255);
  3323. result.push(bits & 255);
  3324. } else if (tailbits === 18) {
  3325. result.push(bits >> 10 & 255);
  3326. result.push(bits >> 2 & 255);
  3327. } else if (tailbits === 12) {
  3328. result.push(bits >> 4 & 255);
  3329. }
  3330. return new Uint8Array(result);
  3331. }
  3332. function representYamlBinary(object) {
  3333. var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP;
  3334. for (idx = 0; idx < max; idx++) {
  3335. if (idx % 3 === 0 && idx) {
  3336. result += map[bits >> 18 & 63];
  3337. result += map[bits >> 12 & 63];
  3338. result += map[bits >> 6 & 63];
  3339. result += map[bits & 63];
  3340. }
  3341. bits = (bits << 8) + object[idx];
  3342. }
  3343. tail = max % 3;
  3344. if (tail === 0) {
  3345. result += map[bits >> 18 & 63];
  3346. result += map[bits >> 12 & 63];
  3347. result += map[bits >> 6 & 63];
  3348. result += map[bits & 63];
  3349. } else if (tail === 2) {
  3350. result += map[bits >> 10 & 63];
  3351. result += map[bits >> 4 & 63];
  3352. result += map[bits << 2 & 63];
  3353. result += map[64];
  3354. } else if (tail === 1) {
  3355. result += map[bits >> 2 & 63];
  3356. result += map[bits << 4 & 63];
  3357. result += map[64];
  3358. result += map[64];
  3359. }
  3360. return result;
  3361. }
  3362. function isBinary(obj) {
  3363. return Object.prototype.toString.call(obj) === "[object Uint8Array]";
  3364. }
  3365. module.exports = new Type("tag:yaml.org,2002:binary", {
  3366. kind: "scalar",
  3367. resolve: resolveYamlBinary,
  3368. construct: constructYamlBinary,
  3369. predicate: isBinary,
  3370. represent: representYamlBinary
  3371. });
  3372. }
  3373. });
  3374. // node_modules/js-yaml/lib/type/omap.js
  3375. var require_omap = __commonJS({
  3376. "node_modules/js-yaml/lib/type/omap.js"(exports, module) {
  3377. "use strict";
  3378. var Type = require_type();
  3379. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  3380. var _toString = Object.prototype.toString;
  3381. function resolveYamlOmap(data) {
  3382. if (data === null)
  3383. return true;
  3384. var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
  3385. for (index = 0, length = object.length; index < length; index += 1) {
  3386. pair = object[index];
  3387. pairHasKey = false;
  3388. if (_toString.call(pair) !== "[object Object]")
  3389. return false;
  3390. for (pairKey in pair) {
  3391. if (_hasOwnProperty.call(pair, pairKey)) {
  3392. if (!pairHasKey)
  3393. pairHasKey = true;
  3394. else
  3395. return false;
  3396. }
  3397. }
  3398. if (!pairHasKey)
  3399. return false;
  3400. if (objectKeys.indexOf(pairKey) === -1)
  3401. objectKeys.push(pairKey);
  3402. else
  3403. return false;
  3404. }
  3405. return true;
  3406. }
  3407. function constructYamlOmap(data) {
  3408. return data !== null ? data : [];
  3409. }
  3410. module.exports = new Type("tag:yaml.org,2002:omap", {
  3411. kind: "sequence",
  3412. resolve: resolveYamlOmap,
  3413. construct: constructYamlOmap
  3414. });
  3415. }
  3416. });
  3417. // node_modules/js-yaml/lib/type/pairs.js
  3418. var require_pairs = __commonJS({
  3419. "node_modules/js-yaml/lib/type/pairs.js"(exports, module) {
  3420. "use strict";
  3421. var Type = require_type();
  3422. var _toString = Object.prototype.toString;
  3423. function resolveYamlPairs(data) {
  3424. if (data === null)
  3425. return true;
  3426. var index, length, pair, keys, result, object = data;
  3427. result = new Array(object.length);
  3428. for (index = 0, length = object.length; index < length; index += 1) {
  3429. pair = object[index];
  3430. if (_toString.call(pair) !== "[object Object]")
  3431. return false;
  3432. keys = Object.keys(pair);
  3433. if (keys.length !== 1)
  3434. return false;
  3435. result[index] = [keys[0], pair[keys[0]]];
  3436. }
  3437. return true;
  3438. }
  3439. function constructYamlPairs(data) {
  3440. if (data === null)
  3441. return [];
  3442. var index, length, pair, keys, result, object = data;
  3443. result = new Array(object.length);
  3444. for (index = 0, length = object.length; index < length; index += 1) {
  3445. pair = object[index];
  3446. keys = Object.keys(pair);
  3447. result[index] = [keys[0], pair[keys[0]]];
  3448. }
  3449. return result;
  3450. }
  3451. module.exports = new Type("tag:yaml.org,2002:pairs", {
  3452. kind: "sequence",
  3453. resolve: resolveYamlPairs,
  3454. construct: constructYamlPairs
  3455. });
  3456. }
  3457. });
  3458. // node_modules/js-yaml/lib/type/set.js
  3459. var require_set = __commonJS({
  3460. "node_modules/js-yaml/lib/type/set.js"(exports, module) {
  3461. "use strict";
  3462. var Type = require_type();
  3463. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  3464. function resolveYamlSet(data) {
  3465. if (data === null)
  3466. return true;
  3467. var key, object = data;
  3468. for (key in object) {
  3469. if (_hasOwnProperty.call(object, key)) {
  3470. if (object[key] !== null)
  3471. return false;
  3472. }
  3473. }
  3474. return true;
  3475. }
  3476. function constructYamlSet(data) {
  3477. return data !== null ? data : {};
  3478. }
  3479. module.exports = new Type("tag:yaml.org,2002:set", {
  3480. kind: "mapping",
  3481. resolve: resolveYamlSet,
  3482. construct: constructYamlSet
  3483. });
  3484. }
  3485. });
  3486. // node_modules/js-yaml/lib/schema/default.js
  3487. var require_default = __commonJS({
  3488. "node_modules/js-yaml/lib/schema/default.js"(exports, module) {
  3489. "use strict";
  3490. module.exports = require_core().extend({
  3491. implicit: [
  3492. require_timestamp(),
  3493. require_merge()
  3494. ],
  3495. explicit: [
  3496. require_binary(),
  3497. require_omap(),
  3498. require_pairs(),
  3499. require_set()
  3500. ]
  3501. });
  3502. }
  3503. });
  3504. // node_modules/js-yaml/lib/loader.js
  3505. var require_loader = __commonJS({
  3506. "node_modules/js-yaml/lib/loader.js"(exports, module) {
  3507. "use strict";
  3508. var common = require_common();
  3509. var YAMLException = require_exception();
  3510. var makeSnippet = require_snippet();
  3511. var DEFAULT_SCHEMA = require_default();
  3512. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  3513. var CONTEXT_FLOW_IN = 1;
  3514. var CONTEXT_FLOW_OUT = 2;
  3515. var CONTEXT_BLOCK_IN = 3;
  3516. var CONTEXT_BLOCK_OUT = 4;
  3517. var CHOMPING_CLIP = 1;
  3518. var CHOMPING_STRIP = 2;
  3519. var CHOMPING_KEEP = 3;
  3520. var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
  3521. var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
  3522. var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
  3523. var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
  3524. var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
  3525. function _class(obj) {
  3526. return Object.prototype.toString.call(obj);
  3527. }
  3528. function is_EOL(c) {
  3529. return c === 10 || c === 13;
  3530. }
  3531. function is_WHITE_SPACE(c) {
  3532. return c === 9 || c === 32;
  3533. }
  3534. function is_WS_OR_EOL(c) {
  3535. return c === 9 || c === 32 || c === 10 || c === 13;
  3536. }
  3537. function is_FLOW_INDICATOR(c) {
  3538. return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
  3539. }
  3540. function fromHexCode(c) {
  3541. var lc;
  3542. if (48 <= c && c <= 57) {
  3543. return c - 48;
  3544. }
  3545. lc = c | 32;
  3546. if (97 <= lc && lc <= 102) {
  3547. return lc - 97 + 10;
  3548. }
  3549. return -1;
  3550. }
  3551. function escapedHexLen(c) {
  3552. if (c === 120) {
  3553. return 2;
  3554. }
  3555. if (c === 117) {
  3556. return 4;
  3557. }
  3558. if (c === 85) {
  3559. return 8;
  3560. }
  3561. return 0;
  3562. }
  3563. function fromDecimalCode(c) {
  3564. if (48 <= c && c <= 57) {
  3565. return c - 48;
  3566. }
  3567. return -1;
  3568. }
  3569. function simpleEscapeSequence(c) {
  3570. 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" : "";
  3571. }
  3572. function charFromCodepoint(c) {
  3573. if (c <= 65535) {
  3574. return String.fromCharCode(c);
  3575. }
  3576. return String.fromCharCode(
  3577. (c - 65536 >> 10) + 55296,
  3578. (c - 65536 & 1023) + 56320
  3579. );
  3580. }
  3581. var simpleEscapeCheck = new Array(256);
  3582. var simpleEscapeMap = new Array(256);
  3583. for (i = 0; i < 256; i++) {
  3584. simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
  3585. simpleEscapeMap[i] = simpleEscapeSequence(i);
  3586. }
  3587. var i;
  3588. function State(input, options) {
  3589. this.input = input;
  3590. this.filename = options["filename"] || null;
  3591. this.schema = options["schema"] || DEFAULT_SCHEMA;
  3592. this.onWarning = options["onWarning"] || null;
  3593. this.legacy = options["legacy"] || false;
  3594. this.json = options["json"] || false;
  3595. this.listener = options["listener"] || null;
  3596. this.implicitTypes = this.schema.compiledImplicit;
  3597. this.typeMap = this.schema.compiledTypeMap;
  3598. this.length = input.length;
  3599. this.position = 0;
  3600. this.line = 0;
  3601. this.lineStart = 0;
  3602. this.lineIndent = 0;
  3603. this.firstTabInLine = -1;
  3604. this.documents = [];
  3605. }
  3606. function generateError(state, message) {
  3607. var mark = {
  3608. name: state.filename,
  3609. buffer: state.input.slice(0, -1),
  3610. // omit trailing \0
  3611. position: state.position,
  3612. line: state.line,
  3613. column: state.position - state.lineStart
  3614. };
  3615. mark.snippet = makeSnippet(mark);
  3616. return new YAMLException(message, mark);
  3617. }
  3618. function throwError(state, message) {
  3619. throw generateError(state, message);
  3620. }
  3621. function throwWarning(state, message) {
  3622. if (state.onWarning) {
  3623. state.onWarning.call(null, generateError(state, message));
  3624. }
  3625. }
  3626. var directiveHandlers = {
  3627. YAML: function handleYamlDirective(state, name, args) {
  3628. var match, major, minor;
  3629. if (state.version !== null) {
  3630. throwError(state, "duplication of %YAML directive");
  3631. }
  3632. if (args.length !== 1) {
  3633. throwError(state, "YAML directive accepts exactly one argument");
  3634. }
  3635. match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
  3636. if (match === null) {
  3637. throwError(state, "ill-formed argument of the YAML directive");
  3638. }
  3639. major = parseInt(match[1], 10);
  3640. minor = parseInt(match[2], 10);
  3641. if (major !== 1) {
  3642. throwError(state, "unacceptable YAML version of the document");
  3643. }
  3644. state.version = args[0];
  3645. state.checkLineBreaks = minor < 2;
  3646. if (minor !== 1 && minor !== 2) {
  3647. throwWarning(state, "unsupported YAML version of the document");
  3648. }
  3649. },
  3650. TAG: function handleTagDirective(state, name, args) {
  3651. var handle, prefix;
  3652. if (args.length !== 2) {
  3653. throwError(state, "TAG directive accepts exactly two arguments");
  3654. }
  3655. handle = args[0];
  3656. prefix = args[1];
  3657. if (!PATTERN_TAG_HANDLE.test(handle)) {
  3658. throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
  3659. }
  3660. if (_hasOwnProperty.call(state.tagMap, handle)) {
  3661. throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
  3662. }
  3663. if (!PATTERN_TAG_URI.test(prefix)) {
  3664. throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
  3665. }
  3666. try {
  3667. prefix = decodeURIComponent(prefix);
  3668. } catch (err) {
  3669. throwError(state, "tag prefix is malformed: " + prefix);
  3670. }
  3671. state.tagMap[handle] = prefix;
  3672. }
  3673. };
  3674. function captureSegment(state, start, end, checkJson) {
  3675. var _position, _length, _character, _result;
  3676. if (start < end) {
  3677. _result = state.input.slice(start, end);
  3678. if (checkJson) {
  3679. for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
  3680. _character = _result.charCodeAt(_position);
  3681. if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
  3682. throwError(state, "expected valid JSON character");
  3683. }
  3684. }
  3685. } else if (PATTERN_NON_PRINTABLE.test(_result)) {
  3686. throwError(state, "the stream contains non-printable characters");
  3687. }
  3688. state.result += _result;
  3689. }
  3690. }
  3691. function mergeMappings(state, destination, source, overridableKeys) {
  3692. var sourceKeys, key, index, quantity;
  3693. if (!common.isObject(source)) {
  3694. throwError(state, "cannot merge mappings; the provided source object is unacceptable");
  3695. }
  3696. sourceKeys = Object.keys(source);
  3697. for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
  3698. key = sourceKeys[index];
  3699. if (!_hasOwnProperty.call(destination, key)) {
  3700. destination[key] = source[key];
  3701. overridableKeys[key] = true;
  3702. }
  3703. }
  3704. }
  3705. function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
  3706. var index, quantity;
  3707. if (Array.isArray(keyNode)) {
  3708. keyNode = Array.prototype.slice.call(keyNode);
  3709. for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
  3710. if (Array.isArray(keyNode[index])) {
  3711. throwError(state, "nested arrays are not supported inside keys");
  3712. }
  3713. if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
  3714. keyNode[index] = "[object Object]";
  3715. }
  3716. }
  3717. }
  3718. if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
  3719. keyNode = "[object Object]";
  3720. }
  3721. keyNode = String(keyNode);
  3722. if (_result === null) {
  3723. _result = {};
  3724. }
  3725. if (keyTag === "tag:yaml.org,2002:merge") {
  3726. if (Array.isArray(valueNode)) {
  3727. for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
  3728. mergeMappings(state, _result, valueNode[index], overridableKeys);
  3729. }
  3730. } else {
  3731. mergeMappings(state, _result, valueNode, overridableKeys);
  3732. }
  3733. } else {
  3734. if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
  3735. state.line = startLine || state.line;
  3736. state.lineStart = startLineStart || state.lineStart;
  3737. state.position = startPos || state.position;
  3738. throwError(state, "duplicated mapping key");
  3739. }
  3740. if (keyNode === "__proto__") {
  3741. Object.defineProperty(_result, keyNode, {
  3742. configurable: true,
  3743. enumerable: true,
  3744. writable: true,
  3745. value: valueNode
  3746. });
  3747. } else {
  3748. _result[keyNode] = valueNode;
  3749. }
  3750. delete overridableKeys[keyNode];
  3751. }
  3752. return _result;
  3753. }
  3754. function readLineBreak(state) {
  3755. var ch;
  3756. ch = state.input.charCodeAt(state.position);
  3757. if (ch === 10) {
  3758. state.position++;
  3759. } else if (ch === 13) {
  3760. state.position++;
  3761. if (state.input.charCodeAt(state.position) === 10) {
  3762. state.position++;
  3763. }
  3764. } else {
  3765. throwError(state, "a line break is expected");
  3766. }
  3767. state.line += 1;
  3768. state.lineStart = state.position;
  3769. state.firstTabInLine = -1;
  3770. }
  3771. function skipSeparationSpace(state, allowComments, checkIndent) {
  3772. var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
  3773. while (ch !== 0) {
  3774. while (is_WHITE_SPACE(ch)) {
  3775. if (ch === 9 && state.firstTabInLine === -1) {
  3776. state.firstTabInLine = state.position;
  3777. }
  3778. ch = state.input.charCodeAt(++state.position);
  3779. }
  3780. if (allowComments && ch === 35) {
  3781. do {
  3782. ch = state.input.charCodeAt(++state.position);
  3783. } while (ch !== 10 && ch !== 13 && ch !== 0);
  3784. }
  3785. if (is_EOL(ch)) {
  3786. readLineBreak(state);
  3787. ch = state.input.charCodeAt(state.position);
  3788. lineBreaks++;
  3789. state.lineIndent = 0;
  3790. while (ch === 32) {
  3791. state.lineIndent++;
  3792. ch = state.input.charCodeAt(++state.position);
  3793. }
  3794. } else {
  3795. break;
  3796. }
  3797. }
  3798. if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
  3799. throwWarning(state, "deficient indentation");
  3800. }
  3801. return lineBreaks;
  3802. }
  3803. function testDocumentSeparator(state) {
  3804. var _position = state.position, ch;
  3805. ch = state.input.charCodeAt(_position);
  3806. if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
  3807. _position += 3;
  3808. ch = state.input.charCodeAt(_position);
  3809. if (ch === 0 || is_WS_OR_EOL(ch)) {
  3810. return true;
  3811. }
  3812. }
  3813. return false;
  3814. }
  3815. function writeFoldedLines(state, count) {
  3816. if (count === 1) {
  3817. state.result += " ";
  3818. } else if (count > 1) {
  3819. state.result += common.repeat("\n", count - 1);
  3820. }
  3821. }
  3822. function readPlainScalar(state, nodeIndent, withinFlowCollection) {
  3823. var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
  3824. ch = state.input.charCodeAt(state.position);
  3825. 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) {
  3826. return false;
  3827. }
  3828. if (ch === 63 || ch === 45) {
  3829. following = state.input.charCodeAt(state.position + 1);
  3830. if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
  3831. return false;
  3832. }
  3833. }
  3834. state.kind = "scalar";
  3835. state.result = "";
  3836. captureStart = captureEnd = state.position;
  3837. hasPendingContent = false;
  3838. while (ch !== 0) {
  3839. if (ch === 58) {
  3840. following = state.input.charCodeAt(state.position + 1);
  3841. if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
  3842. break;
  3843. }
  3844. } else if (ch === 35) {
  3845. preceding = state.input.charCodeAt(state.position - 1);
  3846. if (is_WS_OR_EOL(preceding)) {
  3847. break;
  3848. }
  3849. } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
  3850. break;
  3851. } else if (is_EOL(ch)) {
  3852. _line = state.line;
  3853. _lineStart = state.lineStart;
  3854. _lineIndent = state.lineIndent;
  3855. skipSeparationSpace(state, false, -1);
  3856. if (state.lineIndent >= nodeIndent) {
  3857. hasPendingContent = true;
  3858. ch = state.input.charCodeAt(state.position);
  3859. continue;
  3860. } else {
  3861. state.position = captureEnd;
  3862. state.line = _line;
  3863. state.lineStart = _lineStart;
  3864. state.lineIndent = _lineIndent;
  3865. break;
  3866. }
  3867. }
  3868. if (hasPendingContent) {
  3869. captureSegment(state, captureStart, captureEnd, false);
  3870. writeFoldedLines(state, state.line - _line);
  3871. captureStart = captureEnd = state.position;
  3872. hasPendingContent = false;
  3873. }
  3874. if (!is_WHITE_SPACE(ch)) {
  3875. captureEnd = state.position + 1;
  3876. }
  3877. ch = state.input.charCodeAt(++state.position);
  3878. }
  3879. captureSegment(state, captureStart, captureEnd, false);
  3880. if (state.result) {
  3881. return true;
  3882. }
  3883. state.kind = _kind;
  3884. state.result = _result;
  3885. return false;
  3886. }
  3887. function readSingleQuotedScalar(state, nodeIndent) {
  3888. var ch, captureStart, captureEnd;
  3889. ch = state.input.charCodeAt(state.position);
  3890. if (ch !== 39) {
  3891. return false;
  3892. }
  3893. state.kind = "scalar";
  3894. state.result = "";
  3895. state.position++;
  3896. captureStart = captureEnd = state.position;
  3897. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  3898. if (ch === 39) {
  3899. captureSegment(state, captureStart, state.position, true);
  3900. ch = state.input.charCodeAt(++state.position);
  3901. if (ch === 39) {
  3902. captureStart = state.position;
  3903. state.position++;
  3904. captureEnd = state.position;
  3905. } else {
  3906. return true;
  3907. }
  3908. } else if (is_EOL(ch)) {
  3909. captureSegment(state, captureStart, captureEnd, true);
  3910. writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
  3911. captureStart = captureEnd = state.position;
  3912. } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
  3913. throwError(state, "unexpected end of the document within a single quoted scalar");
  3914. } else {
  3915. state.position++;
  3916. captureEnd = state.position;
  3917. }
  3918. }
  3919. throwError(state, "unexpected end of the stream within a single quoted scalar");
  3920. }
  3921. function readDoubleQuotedScalar(state, nodeIndent) {
  3922. var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
  3923. ch = state.input.charCodeAt(state.position);
  3924. if (ch !== 34) {
  3925. return false;
  3926. }
  3927. state.kind = "scalar";
  3928. state.result = "";
  3929. state.position++;
  3930. captureStart = captureEnd = state.position;
  3931. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  3932. if (ch === 34) {
  3933. captureSegment(state, captureStart, state.position, true);
  3934. state.position++;
  3935. return true;
  3936. } else if (ch === 92) {
  3937. captureSegment(state, captureStart, state.position, true);
  3938. ch = state.input.charCodeAt(++state.position);
  3939. if (is_EOL(ch)) {
  3940. skipSeparationSpace(state, false, nodeIndent);
  3941. } else if (ch < 256 && simpleEscapeCheck[ch]) {
  3942. state.result += simpleEscapeMap[ch];
  3943. state.position++;
  3944. } else if ((tmp = escapedHexLen(ch)) > 0) {
  3945. hexLength = tmp;
  3946. hexResult = 0;
  3947. for (; hexLength > 0; hexLength--) {
  3948. ch = state.input.charCodeAt(++state.position);
  3949. if ((tmp = fromHexCode(ch)) >= 0) {
  3950. hexResult = (hexResult << 4) + tmp;
  3951. } else {
  3952. throwError(state, "expected hexadecimal character");
  3953. }
  3954. }
  3955. state.result += charFromCodepoint(hexResult);
  3956. state.position++;
  3957. } else {
  3958. throwError(state, "unknown escape sequence");
  3959. }
  3960. captureStart = captureEnd = state.position;
  3961. } else if (is_EOL(ch)) {
  3962. captureSegment(state, captureStart, captureEnd, true);
  3963. writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
  3964. captureStart = captureEnd = state.position;
  3965. } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
  3966. throwError(state, "unexpected end of the document within a double quoted scalar");
  3967. } else {
  3968. state.position++;
  3969. captureEnd = state.position;
  3970. }
  3971. }
  3972. throwError(state, "unexpected end of the stream within a double quoted scalar");
  3973. }
  3974. function readFlowCollection(state, nodeIndent) {
  3975. 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;
  3976. ch = state.input.charCodeAt(state.position);
  3977. if (ch === 91) {
  3978. terminator = 93;
  3979. isMapping = false;
  3980. _result = [];
  3981. } else if (ch === 123) {
  3982. terminator = 125;
  3983. isMapping = true;
  3984. _result = {};
  3985. } else {
  3986. return false;
  3987. }
  3988. if (state.anchor !== null) {
  3989. state.anchorMap[state.anchor] = _result;
  3990. }
  3991. ch = state.input.charCodeAt(++state.position);
  3992. while (ch !== 0) {
  3993. skipSeparationSpace(state, true, nodeIndent);
  3994. ch = state.input.charCodeAt(state.position);
  3995. if (ch === terminator) {
  3996. state.position++;
  3997. state.tag = _tag;
  3998. state.anchor = _anchor;
  3999. state.kind = isMapping ? "mapping" : "sequence";
  4000. state.result = _result;
  4001. return true;
  4002. } else if (!readNext) {
  4003. throwError(state, "missed comma between flow collection entries");
  4004. } else if (ch === 44) {
  4005. throwError(state, "expected the node content, but found ','");
  4006. }
  4007. keyTag = keyNode = valueNode = null;
  4008. isPair = isExplicitPair = false;
  4009. if (ch === 63) {
  4010. following = state.input.charCodeAt(state.position + 1);
  4011. if (is_WS_OR_EOL(following)) {
  4012. isPair = isExplicitPair = true;
  4013. state.position++;
  4014. skipSeparationSpace(state, true, nodeIndent);
  4015. }
  4016. }
  4017. _line = state.line;
  4018. _lineStart = state.lineStart;
  4019. _pos = state.position;
  4020. composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
  4021. keyTag = state.tag;
  4022. keyNode = state.result;
  4023. skipSeparationSpace(state, true, nodeIndent);
  4024. ch = state.input.charCodeAt(state.position);
  4025. if ((isExplicitPair || state.line === _line) && ch === 58) {
  4026. isPair = true;
  4027. ch = state.input.charCodeAt(++state.position);
  4028. skipSeparationSpace(state, true, nodeIndent);
  4029. composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
  4030. valueNode = state.result;
  4031. }
  4032. if (isMapping) {
  4033. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
  4034. } else if (isPair) {
  4035. _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
  4036. } else {
  4037. _result.push(keyNode);
  4038. }
  4039. skipSeparationSpace(state, true, nodeIndent);
  4040. ch = state.input.charCodeAt(state.position);
  4041. if (ch === 44) {
  4042. readNext = true;
  4043. ch = state.input.charCodeAt(++state.position);
  4044. } else {
  4045. readNext = false;
  4046. }
  4047. }
  4048. throwError(state, "unexpected end of the stream within a flow collection");
  4049. }
  4050. function readBlockScalar(state, nodeIndent) {
  4051. var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
  4052. ch = state.input.charCodeAt(state.position);
  4053. if (ch === 124) {
  4054. folding = false;
  4055. } else if (ch === 62) {
  4056. folding = true;
  4057. } else {
  4058. return false;
  4059. }
  4060. state.kind = "scalar";
  4061. state.result = "";
  4062. while (ch !== 0) {
  4063. ch = state.input.charCodeAt(++state.position);
  4064. if (ch === 43 || ch === 45) {
  4065. if (CHOMPING_CLIP === chomping) {
  4066. chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
  4067. } else {
  4068. throwError(state, "repeat of a chomping mode identifier");
  4069. }
  4070. } else if ((tmp = fromDecimalCode(ch)) >= 0) {
  4071. if (tmp === 0) {
  4072. throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
  4073. } else if (!detectedIndent) {
  4074. textIndent = nodeIndent + tmp - 1;
  4075. detectedIndent = true;
  4076. } else {
  4077. throwError(state, "repeat of an indentation width identifier");
  4078. }
  4079. } else {
  4080. break;
  4081. }
  4082. }
  4083. if (is_WHITE_SPACE(ch)) {
  4084. do {
  4085. ch = state.input.charCodeAt(++state.position);
  4086. } while (is_WHITE_SPACE(ch));
  4087. if (ch === 35) {
  4088. do {
  4089. ch = state.input.charCodeAt(++state.position);
  4090. } while (!is_EOL(ch) && ch !== 0);
  4091. }
  4092. }
  4093. while (ch !== 0) {
  4094. readLineBreak(state);
  4095. state.lineIndent = 0;
  4096. ch = state.input.charCodeAt(state.position);
  4097. while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) {
  4098. state.lineIndent++;
  4099. ch = state.input.charCodeAt(++state.position);
  4100. }
  4101. if (!detectedIndent && state.lineIndent > textIndent) {
  4102. textIndent = state.lineIndent;
  4103. }
  4104. if (is_EOL(ch)) {
  4105. emptyLines++;
  4106. continue;
  4107. }
  4108. if (state.lineIndent < textIndent) {
  4109. if (chomping === CHOMPING_KEEP) {
  4110. state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
  4111. } else if (chomping === CHOMPING_CLIP) {
  4112. if (didReadContent) {
  4113. state.result += "\n";
  4114. }
  4115. }
  4116. break;
  4117. }
  4118. if (folding) {
  4119. if (is_WHITE_SPACE(ch)) {
  4120. atMoreIndented = true;
  4121. state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
  4122. } else if (atMoreIndented) {
  4123. atMoreIndented = false;
  4124. state.result += common.repeat("\n", emptyLines + 1);
  4125. } else if (emptyLines === 0) {
  4126. if (didReadContent) {
  4127. state.result += " ";
  4128. }
  4129. } else {
  4130. state.result += common.repeat("\n", emptyLines);
  4131. }
  4132. } else {
  4133. state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
  4134. }
  4135. didReadContent = true;
  4136. detectedIndent = true;
  4137. emptyLines = 0;
  4138. captureStart = state.position;
  4139. while (!is_EOL(ch) && ch !== 0) {
  4140. ch = state.input.charCodeAt(++state.position);
  4141. }
  4142. captureSegment(state, captureStart, state.position, false);
  4143. }
  4144. return true;
  4145. }
  4146. function readBlockSequence(state, nodeIndent) {
  4147. var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
  4148. if (state.firstTabInLine !== -1)
  4149. return false;
  4150. if (state.anchor !== null) {
  4151. state.anchorMap[state.anchor] = _result;
  4152. }
  4153. ch = state.input.charCodeAt(state.position);
  4154. while (ch !== 0) {
  4155. if (state.firstTabInLine !== -1) {
  4156. state.position = state.firstTabInLine;
  4157. throwError(state, "tab characters must not be used in indentation");
  4158. }
  4159. if (ch !== 45) {
  4160. break;
  4161. }
  4162. following = state.input.charCodeAt(state.position + 1);
  4163. if (!is_WS_OR_EOL(following)) {
  4164. break;
  4165. }
  4166. detected = true;
  4167. state.position++;
  4168. if (skipSeparationSpace(state, true, -1)) {
  4169. if (state.lineIndent <= nodeIndent) {
  4170. _result.push(null);
  4171. ch = state.input.charCodeAt(state.position);
  4172. continue;
  4173. }
  4174. }
  4175. _line = state.line;
  4176. composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
  4177. _result.push(state.result);
  4178. skipSeparationSpace(state, true, -1);
  4179. ch = state.input.charCodeAt(state.position);
  4180. if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
  4181. throwError(state, "bad indentation of a sequence entry");
  4182. } else if (state.lineIndent < nodeIndent) {
  4183. break;
  4184. }
  4185. }
  4186. if (detected) {
  4187. state.tag = _tag;
  4188. state.anchor = _anchor;
  4189. state.kind = "sequence";
  4190. state.result = _result;
  4191. return true;
  4192. }
  4193. return false;
  4194. }
  4195. function readBlockMapping(state, nodeIndent, flowIndent) {
  4196. 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;
  4197. if (state.firstTabInLine !== -1)
  4198. return false;
  4199. if (state.anchor !== null) {
  4200. state.anchorMap[state.anchor] = _result;
  4201. }
  4202. ch = state.input.charCodeAt(state.position);
  4203. while (ch !== 0) {
  4204. if (!atExplicitKey && state.firstTabInLine !== -1) {
  4205. state.position = state.firstTabInLine;
  4206. throwError(state, "tab characters must not be used in indentation");
  4207. }
  4208. following = state.input.charCodeAt(state.position + 1);
  4209. _line = state.line;
  4210. if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
  4211. if (ch === 63) {
  4212. if (atExplicitKey) {
  4213. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  4214. keyTag = keyNode = valueNode = null;
  4215. }
  4216. detected = true;
  4217. atExplicitKey = true;
  4218. allowCompact = true;
  4219. } else if (atExplicitKey) {
  4220. atExplicitKey = false;
  4221. allowCompact = true;
  4222. } else {
  4223. throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
  4224. }
  4225. state.position += 1;
  4226. ch = following;
  4227. } else {
  4228. _keyLine = state.line;
  4229. _keyLineStart = state.lineStart;
  4230. _keyPos = state.position;
  4231. if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
  4232. break;
  4233. }
  4234. if (state.line === _line) {
  4235. ch = state.input.charCodeAt(state.position);
  4236. while (is_WHITE_SPACE(ch)) {
  4237. ch = state.input.charCodeAt(++state.position);
  4238. }
  4239. if (ch === 58) {
  4240. ch = state.input.charCodeAt(++state.position);
  4241. if (!is_WS_OR_EOL(ch)) {
  4242. throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
  4243. }
  4244. if (atExplicitKey) {
  4245. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  4246. keyTag = keyNode = valueNode = null;
  4247. }
  4248. detected = true;
  4249. atExplicitKey = false;
  4250. allowCompact = false;
  4251. keyTag = state.tag;
  4252. keyNode = state.result;
  4253. } else if (detected) {
  4254. throwError(state, "can not read an implicit mapping pair; a colon is missed");
  4255. } else {
  4256. state.tag = _tag;
  4257. state.anchor = _anchor;
  4258. return true;
  4259. }
  4260. } else if (detected) {
  4261. throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
  4262. } else {
  4263. state.tag = _tag;
  4264. state.anchor = _anchor;
  4265. return true;
  4266. }
  4267. }
  4268. if (state.line === _line || state.lineIndent > nodeIndent) {
  4269. if (atExplicitKey) {
  4270. _keyLine = state.line;
  4271. _keyLineStart = state.lineStart;
  4272. _keyPos = state.position;
  4273. }
  4274. if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
  4275. if (atExplicitKey) {
  4276. keyNode = state.result;
  4277. } else {
  4278. valueNode = state.result;
  4279. }
  4280. }
  4281. if (!atExplicitKey) {
  4282. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
  4283. keyTag = keyNode = valueNode = null;
  4284. }
  4285. skipSeparationSpace(state, true, -1);
  4286. ch = state.input.charCodeAt(state.position);
  4287. }
  4288. if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
  4289. throwError(state, "bad indentation of a mapping entry");
  4290. } else if (state.lineIndent < nodeIndent) {
  4291. break;
  4292. }
  4293. }
  4294. if (atExplicitKey) {
  4295. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  4296. }
  4297. if (detected) {
  4298. state.tag = _tag;
  4299. state.anchor = _anchor;
  4300. state.kind = "mapping";
  4301. state.result = _result;
  4302. }
  4303. return detected;
  4304. }
  4305. function readTagProperty(state) {
  4306. var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
  4307. ch = state.input.charCodeAt(state.position);
  4308. if (ch !== 33)
  4309. return false;
  4310. if (state.tag !== null) {
  4311. throwError(state, "duplication of a tag property");
  4312. }
  4313. ch = state.input.charCodeAt(++state.position);
  4314. if (ch === 60) {
  4315. isVerbatim = true;
  4316. ch = state.input.charCodeAt(++state.position);
  4317. } else if (ch === 33) {
  4318. isNamed = true;
  4319. tagHandle = "!!";
  4320. ch = state.input.charCodeAt(++state.position);
  4321. } else {
  4322. tagHandle = "!";
  4323. }
  4324. _position = state.position;
  4325. if (isVerbatim) {
  4326. do {
  4327. ch = state.input.charCodeAt(++state.position);
  4328. } while (ch !== 0 && ch !== 62);
  4329. if (state.position < state.length) {
  4330. tagName = state.input.slice(_position, state.position);
  4331. ch = state.input.charCodeAt(++state.position);
  4332. } else {
  4333. throwError(state, "unexpected end of the stream within a verbatim tag");
  4334. }
  4335. } else {
  4336. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  4337. if (ch === 33) {
  4338. if (!isNamed) {
  4339. tagHandle = state.input.slice(_position - 1, state.position + 1);
  4340. if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
  4341. throwError(state, "named tag handle cannot contain such characters");
  4342. }
  4343. isNamed = true;
  4344. _position = state.position + 1;
  4345. } else {
  4346. throwError(state, "tag suffix cannot contain exclamation marks");
  4347. }
  4348. }
  4349. ch = state.input.charCodeAt(++state.position);
  4350. }
  4351. tagName = state.input.slice(_position, state.position);
  4352. if (PATTERN_FLOW_INDICATORS.test(tagName)) {
  4353. throwError(state, "tag suffix cannot contain flow indicator characters");
  4354. }
  4355. }
  4356. if (tagName && !PATTERN_TAG_URI.test(tagName)) {
  4357. throwError(state, "tag name cannot contain such characters: " + tagName);
  4358. }
  4359. try {
  4360. tagName = decodeURIComponent(tagName);
  4361. } catch (err) {
  4362. throwError(state, "tag name is malformed: " + tagName);
  4363. }
  4364. if (isVerbatim) {
  4365. state.tag = tagName;
  4366. } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
  4367. state.tag = state.tagMap[tagHandle] + tagName;
  4368. } else if (tagHandle === "!") {
  4369. state.tag = "!" + tagName;
  4370. } else if (tagHandle === "!!") {
  4371. state.tag = "tag:yaml.org,2002:" + tagName;
  4372. } else {
  4373. throwError(state, 'undeclared tag handle "' + tagHandle + '"');
  4374. }
  4375. return true;
  4376. }
  4377. function readAnchorProperty(state) {
  4378. var _position, ch;
  4379. ch = state.input.charCodeAt(state.position);
  4380. if (ch !== 38)
  4381. return false;
  4382. if (state.anchor !== null) {
  4383. throwError(state, "duplication of an anchor property");
  4384. }
  4385. ch = state.input.charCodeAt(++state.position);
  4386. _position = state.position;
  4387. while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
  4388. ch = state.input.charCodeAt(++state.position);
  4389. }
  4390. if (state.position === _position) {
  4391. throwError(state, "name of an anchor node must contain at least one character");
  4392. }
  4393. state.anchor = state.input.slice(_position, state.position);
  4394. return true;
  4395. }
  4396. function readAlias(state) {
  4397. var _position, alias, ch;
  4398. ch = state.input.charCodeAt(state.position);
  4399. if (ch !== 42)
  4400. return false;
  4401. ch = state.input.charCodeAt(++state.position);
  4402. _position = state.position;
  4403. while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
  4404. ch = state.input.charCodeAt(++state.position);
  4405. }
  4406. if (state.position === _position) {
  4407. throwError(state, "name of an alias node must contain at least one character");
  4408. }
  4409. alias = state.input.slice(_position, state.position);
  4410. if (!_hasOwnProperty.call(state.anchorMap, alias)) {
  4411. throwError(state, 'unidentified alias "' + alias + '"');
  4412. }
  4413. state.result = state.anchorMap[alias];
  4414. skipSeparationSpace(state, true, -1);
  4415. return true;
  4416. }
  4417. function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
  4418. var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent;
  4419. if (state.listener !== null) {
  4420. state.listener("open", state);
  4421. }
  4422. state.tag = null;
  4423. state.anchor = null;
  4424. state.kind = null;
  4425. state.result = null;
  4426. allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
  4427. if (allowToSeek) {
  4428. if (skipSeparationSpace(state, true, -1)) {
  4429. atNewLine = true;
  4430. if (state.lineIndent > parentIndent) {
  4431. indentStatus = 1;
  4432. } else if (state.lineIndent === parentIndent) {
  4433. indentStatus = 0;
  4434. } else if (state.lineIndent < parentIndent) {
  4435. indentStatus = -1;
  4436. }
  4437. }
  4438. }
  4439. if (indentStatus === 1) {
  4440. while (readTagProperty(state) || readAnchorProperty(state)) {
  4441. if (skipSeparationSpace(state, true, -1)) {
  4442. atNewLine = true;
  4443. allowBlockCollections = allowBlockStyles;
  4444. if (state.lineIndent > parentIndent) {
  4445. indentStatus = 1;
  4446. } else if (state.lineIndent === parentIndent) {
  4447. indentStatus = 0;
  4448. } else if (state.lineIndent < parentIndent) {
  4449. indentStatus = -1;
  4450. }
  4451. } else {
  4452. allowBlockCollections = false;
  4453. }
  4454. }
  4455. }
  4456. if (allowBlockCollections) {
  4457. allowBlockCollections = atNewLine || allowCompact;
  4458. }
  4459. if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
  4460. if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
  4461. flowIndent = parentIndent;
  4462. } else {
  4463. flowIndent = parentIndent + 1;
  4464. }
  4465. blockIndent = state.position - state.lineStart;
  4466. if (indentStatus === 1) {
  4467. if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
  4468. hasContent = true;
  4469. } else {
  4470. if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
  4471. hasContent = true;
  4472. } else if (readAlias(state)) {
  4473. hasContent = true;
  4474. if (state.tag !== null || state.anchor !== null) {
  4475. throwError(state, "alias node should not have any properties");
  4476. }
  4477. } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
  4478. hasContent = true;
  4479. if (state.tag === null) {
  4480. state.tag = "?";
  4481. }
  4482. }
  4483. if (state.anchor !== null) {
  4484. state.anchorMap[state.anchor] = state.result;
  4485. }
  4486. }
  4487. } else if (indentStatus === 0) {
  4488. hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
  4489. }
  4490. }
  4491. if (state.tag === null) {
  4492. if (state.anchor !== null) {
  4493. state.anchorMap[state.anchor] = state.result;
  4494. }
  4495. } else if (state.tag === "?") {
  4496. if (state.result !== null && state.kind !== "scalar") {
  4497. throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
  4498. }
  4499. for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
  4500. type = state.implicitTypes[typeIndex];
  4501. if (type.resolve(state.result)) {
  4502. state.result = type.construct(state.result);
  4503. state.tag = type.tag;
  4504. if (state.anchor !== null) {
  4505. state.anchorMap[state.anchor] = state.result;
  4506. }
  4507. break;
  4508. }
  4509. }
  4510. } else if (state.tag !== "!") {
  4511. if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) {
  4512. type = state.typeMap[state.kind || "fallback"][state.tag];
  4513. } else {
  4514. type = null;
  4515. typeList = state.typeMap.multi[state.kind || "fallback"];
  4516. for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
  4517. if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
  4518. type = typeList[typeIndex];
  4519. break;
  4520. }
  4521. }
  4522. }
  4523. if (!type) {
  4524. throwError(state, "unknown tag !<" + state.tag + ">");
  4525. }
  4526. if (state.result !== null && type.kind !== state.kind) {
  4527. throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
  4528. }
  4529. if (!type.resolve(state.result, state.tag)) {
  4530. throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
  4531. } else {
  4532. state.result = type.construct(state.result, state.tag);
  4533. if (state.anchor !== null) {
  4534. state.anchorMap[state.anchor] = state.result;
  4535. }
  4536. }
  4537. }
  4538. if (state.listener !== null) {
  4539. state.listener("close", state);
  4540. }
  4541. return state.tag !== null || state.anchor !== null || hasContent;
  4542. }
  4543. function readDocument(state) {
  4544. var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
  4545. state.version = null;
  4546. state.checkLineBreaks = state.legacy;
  4547. state.tagMap = /* @__PURE__ */ Object.create(null);
  4548. state.anchorMap = /* @__PURE__ */ Object.create(null);
  4549. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  4550. skipSeparationSpace(state, true, -1);
  4551. ch = state.input.charCodeAt(state.position);
  4552. if (state.lineIndent > 0 || ch !== 37) {
  4553. break;
  4554. }
  4555. hasDirectives = true;
  4556. ch = state.input.charCodeAt(++state.position);
  4557. _position = state.position;
  4558. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  4559. ch = state.input.charCodeAt(++state.position);
  4560. }
  4561. directiveName = state.input.slice(_position, state.position);
  4562. directiveArgs = [];
  4563. if (directiveName.length < 1) {
  4564. throwError(state, "directive name must not be less than one character in length");
  4565. }
  4566. while (ch !== 0) {
  4567. while (is_WHITE_SPACE(ch)) {
  4568. ch = state.input.charCodeAt(++state.position);
  4569. }
  4570. if (ch === 35) {
  4571. do {
  4572. ch = state.input.charCodeAt(++state.position);
  4573. } while (ch !== 0 && !is_EOL(ch));
  4574. break;
  4575. }
  4576. if (is_EOL(ch))
  4577. break;
  4578. _position = state.position;
  4579. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  4580. ch = state.input.charCodeAt(++state.position);
  4581. }
  4582. directiveArgs.push(state.input.slice(_position, state.position));
  4583. }
  4584. if (ch !== 0)
  4585. readLineBreak(state);
  4586. if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
  4587. directiveHandlers[directiveName](state, directiveName, directiveArgs);
  4588. } else {
  4589. throwWarning(state, 'unknown document directive "' + directiveName + '"');
  4590. }
  4591. }
  4592. skipSeparationSpace(state, true, -1);
  4593. if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
  4594. state.position += 3;
  4595. skipSeparationSpace(state, true, -1);
  4596. } else if (hasDirectives) {
  4597. throwError(state, "directives end mark is expected");
  4598. }
  4599. composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
  4600. skipSeparationSpace(state, true, -1);
  4601. if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
  4602. throwWarning(state, "non-ASCII line breaks are interpreted as content");
  4603. }
  4604. state.documents.push(state.result);
  4605. if (state.position === state.lineStart && testDocumentSeparator(state)) {
  4606. if (state.input.charCodeAt(state.position) === 46) {
  4607. state.position += 3;
  4608. skipSeparationSpace(state, true, -1);
  4609. }
  4610. return;
  4611. }
  4612. if (state.position < state.length - 1) {
  4613. throwError(state, "end of the stream or a document separator is expected");
  4614. } else {
  4615. return;
  4616. }
  4617. }
  4618. function loadDocuments(input, options) {
  4619. input = String(input);
  4620. options = options || {};
  4621. if (input.length !== 0) {
  4622. if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
  4623. input += "\n";
  4624. }
  4625. if (input.charCodeAt(0) === 65279) {
  4626. input = input.slice(1);
  4627. }
  4628. }
  4629. var state = new State(input, options);
  4630. var nullpos = input.indexOf("\0");
  4631. if (nullpos !== -1) {
  4632. state.position = nullpos;
  4633. throwError(state, "null byte is not allowed in input");
  4634. }
  4635. state.input += "\0";
  4636. while (state.input.charCodeAt(state.position) === 32) {
  4637. state.lineIndent += 1;
  4638. state.position += 1;
  4639. }
  4640. while (state.position < state.length - 1) {
  4641. readDocument(state);
  4642. }
  4643. return state.documents;
  4644. }
  4645. function loadAll(input, iterator, options) {
  4646. if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") {
  4647. options = iterator;
  4648. iterator = null;
  4649. }
  4650. var documents = loadDocuments(input, options);
  4651. if (typeof iterator !== "function") {
  4652. return documents;
  4653. }
  4654. for (var index = 0, length = documents.length; index < length; index += 1) {
  4655. iterator(documents[index]);
  4656. }
  4657. }
  4658. function load(input, options) {
  4659. var documents = loadDocuments(input, options);
  4660. if (documents.length === 0) {
  4661. return void 0;
  4662. } else if (documents.length === 1) {
  4663. return documents[0];
  4664. }
  4665. throw new YAMLException("expected a single document in the stream, but found more");
  4666. }
  4667. module.exports.loadAll = loadAll;
  4668. module.exports.load = load;
  4669. }
  4670. });
  4671. // node_modules/js-yaml/lib/dumper.js
  4672. var require_dumper = __commonJS({
  4673. "node_modules/js-yaml/lib/dumper.js"(exports, module) {
  4674. "use strict";
  4675. var common = require_common();
  4676. var YAMLException = require_exception();
  4677. var DEFAULT_SCHEMA = require_default();
  4678. var _toString = Object.prototype.toString;
  4679. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  4680. var CHAR_BOM = 65279;
  4681. var CHAR_TAB = 9;
  4682. var CHAR_LINE_FEED = 10;
  4683. var CHAR_CARRIAGE_RETURN = 13;
  4684. var CHAR_SPACE = 32;
  4685. var CHAR_EXCLAMATION = 33;
  4686. var CHAR_DOUBLE_QUOTE = 34;
  4687. var CHAR_SHARP = 35;
  4688. var CHAR_PERCENT = 37;
  4689. var CHAR_AMPERSAND = 38;
  4690. var CHAR_SINGLE_QUOTE = 39;
  4691. var CHAR_ASTERISK = 42;
  4692. var CHAR_COMMA = 44;
  4693. var CHAR_MINUS = 45;
  4694. var CHAR_COLON = 58;
  4695. var CHAR_EQUALS = 61;
  4696. var CHAR_GREATER_THAN = 62;
  4697. var CHAR_QUESTION = 63;
  4698. var CHAR_COMMERCIAL_AT = 64;
  4699. var CHAR_LEFT_SQUARE_BRACKET = 91;
  4700. var CHAR_RIGHT_SQUARE_BRACKET = 93;
  4701. var CHAR_GRAVE_ACCENT = 96;
  4702. var CHAR_LEFT_CURLY_BRACKET = 123;
  4703. var CHAR_VERTICAL_LINE = 124;
  4704. var CHAR_RIGHT_CURLY_BRACKET = 125;
  4705. var ESCAPE_SEQUENCES = {};
  4706. ESCAPE_SEQUENCES[0] = "\\0";
  4707. ESCAPE_SEQUENCES[7] = "\\a";
  4708. ESCAPE_SEQUENCES[8] = "\\b";
  4709. ESCAPE_SEQUENCES[9] = "\\t";
  4710. ESCAPE_SEQUENCES[10] = "\\n";
  4711. ESCAPE_SEQUENCES[11] = "\\v";
  4712. ESCAPE_SEQUENCES[12] = "\\f";
  4713. ESCAPE_SEQUENCES[13] = "\\r";
  4714. ESCAPE_SEQUENCES[27] = "\\e";
  4715. ESCAPE_SEQUENCES[34] = '\\"';
  4716. ESCAPE_SEQUENCES[92] = "\\\\";
  4717. ESCAPE_SEQUENCES[133] = "\\N";
  4718. ESCAPE_SEQUENCES[160] = "\\_";
  4719. ESCAPE_SEQUENCES[8232] = "\\L";
  4720. ESCAPE_SEQUENCES[8233] = "\\P";
  4721. var DEPRECATED_BOOLEANS_SYNTAX = [
  4722. "y",
  4723. "Y",
  4724. "yes",
  4725. "Yes",
  4726. "YES",
  4727. "on",
  4728. "On",
  4729. "ON",
  4730. "n",
  4731. "N",
  4732. "no",
  4733. "No",
  4734. "NO",
  4735. "off",
  4736. "Off",
  4737. "OFF"
  4738. ];
  4739. var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
  4740. function compileStyleMap(schema, map) {
  4741. var result, keys, index, length, tag, style, type;
  4742. if (map === null)
  4743. return {};
  4744. result = {};
  4745. keys = Object.keys(map);
  4746. for (index = 0, length = keys.length; index < length; index += 1) {
  4747. tag = keys[index];
  4748. style = String(map[tag]);
  4749. if (tag.slice(0, 2) === "!!") {
  4750. tag = "tag:yaml.org,2002:" + tag.slice(2);
  4751. }
  4752. type = schema.compiledTypeMap["fallback"][tag];
  4753. if (type && _hasOwnProperty.call(type.styleAliases, style)) {
  4754. style = type.styleAliases[style];
  4755. }
  4756. result[tag] = style;
  4757. }
  4758. return result;
  4759. }
  4760. function encodeHex(character) {
  4761. var string, handle, length;
  4762. string = character.toString(16).toUpperCase();
  4763. if (character <= 255) {
  4764. handle = "x";
  4765. length = 2;
  4766. } else if (character <= 65535) {
  4767. handle = "u";
  4768. length = 4;
  4769. } else if (character <= 4294967295) {
  4770. handle = "U";
  4771. length = 8;
  4772. } else {
  4773. throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
  4774. }
  4775. return "\\" + handle + common.repeat("0", length - string.length) + string;
  4776. }
  4777. var QUOTING_TYPE_SINGLE = 1;
  4778. var QUOTING_TYPE_DOUBLE = 2;
  4779. function State(options) {
  4780. this.schema = options["schema"] || DEFAULT_SCHEMA;
  4781. this.indent = Math.max(1, options["indent"] || 2);
  4782. this.noArrayIndent = options["noArrayIndent"] || false;
  4783. this.skipInvalid = options["skipInvalid"] || false;
  4784. this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
  4785. this.styleMap = compileStyleMap(this.schema, options["styles"] || null);
  4786. this.sortKeys = options["sortKeys"] || false;
  4787. this.lineWidth = options["lineWidth"] || 80;
  4788. this.noRefs = options["noRefs"] || false;
  4789. this.noCompatMode = options["noCompatMode"] || false;
  4790. this.condenseFlow = options["condenseFlow"] || false;
  4791. this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
  4792. this.forceQuotes = options["forceQuotes"] || false;
  4793. this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null;
  4794. this.implicitTypes = this.schema.compiledImplicit;
  4795. this.explicitTypes = this.schema.compiledExplicit;
  4796. this.tag = null;
  4797. this.result = "";
  4798. this.duplicates = [];
  4799. this.usedDuplicates = null;
  4800. }
  4801. function indentString(string, spaces) {
  4802. var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length;
  4803. while (position < length) {
  4804. next = string.indexOf("\n", position);
  4805. if (next === -1) {
  4806. line = string.slice(position);
  4807. position = length;
  4808. } else {
  4809. line = string.slice(position, next + 1);
  4810. position = next + 1;
  4811. }
  4812. if (line.length && line !== "\n")
  4813. result += ind;
  4814. result += line;
  4815. }
  4816. return result;
  4817. }
  4818. function generateNextLine(state, level) {
  4819. return "\n" + common.repeat(" ", state.indent * level);
  4820. }
  4821. function testImplicitResolving(state, str) {
  4822. var index, length, type;
  4823. for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
  4824. type = state.implicitTypes[index];
  4825. if (type.resolve(str)) {
  4826. return true;
  4827. }
  4828. }
  4829. return false;
  4830. }
  4831. function isWhitespace(c) {
  4832. return c === CHAR_SPACE || c === CHAR_TAB;
  4833. }
  4834. function isPrintable(c) {
  4835. return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111;
  4836. }
  4837. function isNsCharOrWhitespace(c) {
  4838. return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
  4839. }
  4840. function isPlainSafe(c, prev, inblock) {
  4841. var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
  4842. var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
  4843. return (
  4844. // ns-plain-safe
  4845. (inblock ? (
  4846. // c = flow-in
  4847. cIsNsCharOrWhitespace
  4848. ) : 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
  4849. );
  4850. }
  4851. function isPlainSafeFirst(c) {
  4852. 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;
  4853. }
  4854. function isPlainSafeLast(c) {
  4855. return !isWhitespace(c) && c !== CHAR_COLON;
  4856. }
  4857. function codePointAt(string, pos) {
  4858. var first = string.charCodeAt(pos), second;
  4859. if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
  4860. second = string.charCodeAt(pos + 1);
  4861. if (second >= 56320 && second <= 57343) {
  4862. return (first - 55296) * 1024 + second - 56320 + 65536;
  4863. }
  4864. }
  4865. return first;
  4866. }
  4867. function needIndentIndicator(string) {
  4868. var leadingSpaceRe = /^\n* /;
  4869. return leadingSpaceRe.test(string);
  4870. }
  4871. var STYLE_PLAIN = 1;
  4872. var STYLE_SINGLE = 2;
  4873. var STYLE_LITERAL = 3;
  4874. var STYLE_FOLDED = 4;
  4875. var STYLE_DOUBLE = 5;
  4876. function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
  4877. var i;
  4878. var char = 0;
  4879. var prevChar = null;
  4880. var hasLineBreak = false;
  4881. var hasFoldableLine = false;
  4882. var shouldTrackWidth = lineWidth !== -1;
  4883. var previousLineBreak = -1;
  4884. var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
  4885. if (singleLineOnly || forceQuotes) {
  4886. for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
  4887. char = codePointAt(string, i);
  4888. if (!isPrintable(char)) {
  4889. return STYLE_DOUBLE;
  4890. }
  4891. plain = plain && isPlainSafe(char, prevChar, inblock);
  4892. prevChar = char;
  4893. }
  4894. } else {
  4895. for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
  4896. char = codePointAt(string, i);
  4897. if (char === CHAR_LINE_FEED) {
  4898. hasLineBreak = true;
  4899. if (shouldTrackWidth) {
  4900. hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented.
  4901. i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
  4902. previousLineBreak = i;
  4903. }
  4904. } else if (!isPrintable(char)) {
  4905. return STYLE_DOUBLE;
  4906. }
  4907. plain = plain && isPlainSafe(char, prevChar, inblock);
  4908. prevChar = char;
  4909. }
  4910. hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ");
  4911. }
  4912. if (!hasLineBreak && !hasFoldableLine) {
  4913. if (plain && !forceQuotes && !testAmbiguousType(string)) {
  4914. return STYLE_PLAIN;
  4915. }
  4916. return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
  4917. }
  4918. if (indentPerLevel > 9 && needIndentIndicator(string)) {
  4919. return STYLE_DOUBLE;
  4920. }
  4921. if (!forceQuotes) {
  4922. return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
  4923. }
  4924. return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
  4925. }
  4926. function writeScalar(state, string, level, iskey, inblock) {
  4927. state.dump = function() {
  4928. if (string.length === 0) {
  4929. return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
  4930. }
  4931. if (!state.noCompatMode) {
  4932. if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
  4933. return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
  4934. }
  4935. }
  4936. var indent = state.indent * Math.max(1, level);
  4937. var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
  4938. var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
  4939. function testAmbiguity(string2) {
  4940. return testImplicitResolving(state, string2);
  4941. }
  4942. switch (chooseScalarStyle(
  4943. string,
  4944. singleLineOnly,
  4945. state.indent,
  4946. lineWidth,
  4947. testAmbiguity,
  4948. state.quotingType,
  4949. state.forceQuotes && !iskey,
  4950. inblock
  4951. )) {
  4952. case STYLE_PLAIN:
  4953. return string;
  4954. case STYLE_SINGLE:
  4955. return "'" + string.replace(/'/g, "''") + "'";
  4956. case STYLE_LITERAL:
  4957. return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent));
  4958. case STYLE_FOLDED:
  4959. return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
  4960. case STYLE_DOUBLE:
  4961. return '"' + escapeString(string, lineWidth) + '"';
  4962. default:
  4963. throw new YAMLException("impossible error: invalid scalar style");
  4964. }
  4965. }();
  4966. }
  4967. function blockHeader(string, indentPerLevel) {
  4968. var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
  4969. var clip = string[string.length - 1] === "\n";
  4970. var keep = clip && (string[string.length - 2] === "\n" || string === "\n");
  4971. var chomp = keep ? "+" : clip ? "" : "-";
  4972. return indentIndicator + chomp + "\n";
  4973. }
  4974. function dropEndingNewline(string) {
  4975. return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
  4976. }
  4977. function foldString(string, width) {
  4978. var lineRe = /(\n+)([^\n]*)/g;
  4979. var result = function() {
  4980. var nextLF = string.indexOf("\n");
  4981. nextLF = nextLF !== -1 ? nextLF : string.length;
  4982. lineRe.lastIndex = nextLF;
  4983. return foldLine(string.slice(0, nextLF), width);
  4984. }();
  4985. var prevMoreIndented = string[0] === "\n" || string[0] === " ";
  4986. var moreIndented;
  4987. var match;
  4988. while (match = lineRe.exec(string)) {
  4989. var prefix = match[1], line = match[2];
  4990. moreIndented = line[0] === " ";
  4991. result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
  4992. prevMoreIndented = moreIndented;
  4993. }
  4994. return result;
  4995. }
  4996. function foldLine(line, width) {
  4997. if (line === "" || line[0] === " ")
  4998. return line;
  4999. var breakRe = / [^ ]/g;
  5000. var match;
  5001. var start = 0, end, curr = 0, next = 0;
  5002. var result = "";
  5003. while (match = breakRe.exec(line)) {
  5004. next = match.index;
  5005. if (next - start > width) {
  5006. end = curr > start ? curr : next;
  5007. result += "\n" + line.slice(start, end);
  5008. start = end + 1;
  5009. }
  5010. curr = next;
  5011. }
  5012. result += "\n";
  5013. if (line.length - start > width && curr > start) {
  5014. result += line.slice(start, curr) + "\n" + line.slice(curr + 1);
  5015. } else {
  5016. result += line.slice(start);
  5017. }
  5018. return result.slice(1);
  5019. }
  5020. function escapeString(string) {
  5021. var result = "";
  5022. var char = 0;
  5023. var escapeSeq;
  5024. for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
  5025. char = codePointAt(string, i);
  5026. escapeSeq = ESCAPE_SEQUENCES[char];
  5027. if (!escapeSeq && isPrintable(char)) {
  5028. result += string[i];
  5029. if (char >= 65536)
  5030. result += string[i + 1];
  5031. } else {
  5032. result += escapeSeq || encodeHex(char);
  5033. }
  5034. }
  5035. return result;
  5036. }
  5037. function writeFlowSequence(state, level, object) {
  5038. var _result = "", _tag = state.tag, index, length, value;
  5039. for (index = 0, length = object.length; index < length; index += 1) {
  5040. value = object[index];
  5041. if (state.replacer) {
  5042. value = state.replacer.call(object, String(index), value);
  5043. }
  5044. if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
  5045. if (_result !== "")
  5046. _result += "," + (!state.condenseFlow ? " " : "");
  5047. _result += state.dump;
  5048. }
  5049. }
  5050. state.tag = _tag;
  5051. state.dump = "[" + _result + "]";
  5052. }
  5053. function writeBlockSequence(state, level, object, compact) {
  5054. var _result = "", _tag = state.tag, index, length, value;
  5055. for (index = 0, length = object.length; index < length; index += 1) {
  5056. value = object[index];
  5057. if (state.replacer) {
  5058. value = state.replacer.call(object, String(index), value);
  5059. }
  5060. if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) {
  5061. if (!compact || _result !== "") {
  5062. _result += generateNextLine(state, level);
  5063. }
  5064. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  5065. _result += "-";
  5066. } else {
  5067. _result += "- ";
  5068. }
  5069. _result += state.dump;
  5070. }
  5071. }
  5072. state.tag = _tag;
  5073. state.dump = _result || "[]";
  5074. }
  5075. function writeFlowMapping(state, level, object) {
  5076. var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
  5077. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  5078. pairBuffer = "";
  5079. if (_result !== "")
  5080. pairBuffer += ", ";
  5081. if (state.condenseFlow)
  5082. pairBuffer += '"';
  5083. objectKey = objectKeyList[index];
  5084. objectValue = object[objectKey];
  5085. if (state.replacer) {
  5086. objectValue = state.replacer.call(object, objectKey, objectValue);
  5087. }
  5088. if (!writeNode(state, level, objectKey, false, false)) {
  5089. continue;
  5090. }
  5091. if (state.dump.length > 1024)
  5092. pairBuffer += "? ";
  5093. pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
  5094. if (!writeNode(state, level, objectValue, false, false)) {
  5095. continue;
  5096. }
  5097. pairBuffer += state.dump;
  5098. _result += pairBuffer;
  5099. }
  5100. state.tag = _tag;
  5101. state.dump = "{" + _result + "}";
  5102. }
  5103. function writeBlockMapping(state, level, object, compact) {
  5104. var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
  5105. if (state.sortKeys === true) {
  5106. objectKeyList.sort();
  5107. } else if (typeof state.sortKeys === "function") {
  5108. objectKeyList.sort(state.sortKeys);
  5109. } else if (state.sortKeys) {
  5110. throw new YAMLException("sortKeys must be a boolean or a function");
  5111. }
  5112. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  5113. pairBuffer = "";
  5114. if (!compact || _result !== "") {
  5115. pairBuffer += generateNextLine(state, level);
  5116. }
  5117. objectKey = objectKeyList[index];
  5118. objectValue = object[objectKey];
  5119. if (state.replacer) {
  5120. objectValue = state.replacer.call(object, objectKey, objectValue);
  5121. }
  5122. if (!writeNode(state, level + 1, objectKey, true, true, true)) {
  5123. continue;
  5124. }
  5125. explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
  5126. if (explicitPair) {
  5127. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  5128. pairBuffer += "?";
  5129. } else {
  5130. pairBuffer += "? ";
  5131. }
  5132. }
  5133. pairBuffer += state.dump;
  5134. if (explicitPair) {
  5135. pairBuffer += generateNextLine(state, level);
  5136. }
  5137. if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
  5138. continue;
  5139. }
  5140. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  5141. pairBuffer += ":";
  5142. } else {
  5143. pairBuffer += ": ";
  5144. }
  5145. pairBuffer += state.dump;
  5146. _result += pairBuffer;
  5147. }
  5148. state.tag = _tag;
  5149. state.dump = _result || "{}";
  5150. }
  5151. function detectType(state, object, explicit) {
  5152. var _result, typeList, index, length, type, style;
  5153. typeList = explicit ? state.explicitTypes : state.implicitTypes;
  5154. for (index = 0, length = typeList.length; index < length; index += 1) {
  5155. type = typeList[index];
  5156. if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
  5157. if (explicit) {
  5158. if (type.multi && type.representName) {
  5159. state.tag = type.representName(object);
  5160. } else {
  5161. state.tag = type.tag;
  5162. }
  5163. } else {
  5164. state.tag = "?";
  5165. }
  5166. if (type.represent) {
  5167. style = state.styleMap[type.tag] || type.defaultStyle;
  5168. if (_toString.call(type.represent) === "[object Function]") {
  5169. _result = type.represent(object, style);
  5170. } else if (_hasOwnProperty.call(type.represent, style)) {
  5171. _result = type.represent[style](object, style);
  5172. } else {
  5173. throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style');
  5174. }
  5175. state.dump = _result;
  5176. }
  5177. return true;
  5178. }
  5179. }
  5180. return false;
  5181. }
  5182. function writeNode(state, level, object, block, compact, iskey, isblockseq) {
  5183. state.tag = null;
  5184. state.dump = object;
  5185. if (!detectType(state, object, false)) {
  5186. detectType(state, object, true);
  5187. }
  5188. var type = _toString.call(state.dump);
  5189. var inblock = block;
  5190. var tagStr;
  5191. if (block) {
  5192. block = state.flowLevel < 0 || state.flowLevel > level;
  5193. }
  5194. var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate;
  5195. if (objectOrArray) {
  5196. duplicateIndex = state.duplicates.indexOf(object);
  5197. duplicate = duplicateIndex !== -1;
  5198. }
  5199. if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
  5200. compact = false;
  5201. }
  5202. if (duplicate && state.usedDuplicates[duplicateIndex]) {
  5203. state.dump = "*ref_" + duplicateIndex;
  5204. } else {
  5205. if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
  5206. state.usedDuplicates[duplicateIndex] = true;
  5207. }
  5208. if (type === "[object Object]") {
  5209. if (block && Object.keys(state.dump).length !== 0) {
  5210. writeBlockMapping(state, level, state.dump, compact);
  5211. if (duplicate) {
  5212. state.dump = "&ref_" + duplicateIndex + state.dump;
  5213. }
  5214. } else {
  5215. writeFlowMapping(state, level, state.dump);
  5216. if (duplicate) {
  5217. state.dump = "&ref_" + duplicateIndex + " " + state.dump;
  5218. }
  5219. }
  5220. } else if (type === "[object Array]") {
  5221. if (block && state.dump.length !== 0) {
  5222. if (state.noArrayIndent && !isblockseq && level > 0) {
  5223. writeBlockSequence(state, level - 1, state.dump, compact);
  5224. } else {
  5225. writeBlockSequence(state, level, state.dump, compact);
  5226. }
  5227. if (duplicate) {
  5228. state.dump = "&ref_" + duplicateIndex + state.dump;
  5229. }
  5230. } else {
  5231. writeFlowSequence(state, level, state.dump);
  5232. if (duplicate) {
  5233. state.dump = "&ref_" + duplicateIndex + " " + state.dump;
  5234. }
  5235. }
  5236. } else if (type === "[object String]") {
  5237. if (state.tag !== "?") {
  5238. writeScalar(state, state.dump, level, iskey, inblock);
  5239. }
  5240. } else if (type === "[object Undefined]") {
  5241. return false;
  5242. } else {
  5243. if (state.skipInvalid)
  5244. return false;
  5245. throw new YAMLException("unacceptable kind of an object to dump " + type);
  5246. }
  5247. if (state.tag !== null && state.tag !== "?") {
  5248. tagStr = encodeURI(
  5249. state.tag[0] === "!" ? state.tag.slice(1) : state.tag
  5250. ).replace(/!/g, "%21");
  5251. if (state.tag[0] === "!") {
  5252. tagStr = "!" + tagStr;
  5253. } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") {
  5254. tagStr = "!!" + tagStr.slice(18);
  5255. } else {
  5256. tagStr = "!<" + tagStr + ">";
  5257. }
  5258. state.dump = tagStr + " " + state.dump;
  5259. }
  5260. }
  5261. return true;
  5262. }
  5263. function getDuplicateReferences(object, state) {
  5264. var objects = [], duplicatesIndexes = [], index, length;
  5265. inspectNode(object, objects, duplicatesIndexes);
  5266. for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
  5267. state.duplicates.push(objects[duplicatesIndexes[index]]);
  5268. }
  5269. state.usedDuplicates = new Array(length);
  5270. }
  5271. function inspectNode(object, objects, duplicatesIndexes) {
  5272. var objectKeyList, index, length;
  5273. if (object !== null && typeof object === "object") {
  5274. index = objects.indexOf(object);
  5275. if (index !== -1) {
  5276. if (duplicatesIndexes.indexOf(index) === -1) {
  5277. duplicatesIndexes.push(index);
  5278. }
  5279. } else {
  5280. objects.push(object);
  5281. if (Array.isArray(object)) {
  5282. for (index = 0, length = object.length; index < length; index += 1) {
  5283. inspectNode(object[index], objects, duplicatesIndexes);
  5284. }
  5285. } else {
  5286. objectKeyList = Object.keys(object);
  5287. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  5288. inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
  5289. }
  5290. }
  5291. }
  5292. }
  5293. }
  5294. function dump(input, options) {
  5295. options = options || {};
  5296. var state = new State(options);
  5297. if (!state.noRefs)
  5298. getDuplicateReferences(input, state);
  5299. var value = input;
  5300. if (state.replacer) {
  5301. value = state.replacer.call({ "": value }, "", value);
  5302. }
  5303. if (writeNode(state, 0, value, true, true))
  5304. return state.dump + "\n";
  5305. return "";
  5306. }
  5307. module.exports.dump = dump;
  5308. }
  5309. });
  5310. // node_modules/js-yaml/index.js
  5311. var require_js_yaml = __commonJS({
  5312. "node_modules/js-yaml/index.js"(exports, module) {
  5313. "use strict";
  5314. var loader = require_loader();
  5315. var dumper = require_dumper();
  5316. function renamed(from, to) {
  5317. return function() {
  5318. throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
  5319. };
  5320. }
  5321. module.exports.Type = require_type();
  5322. module.exports.Schema = require_schema();
  5323. module.exports.FAILSAFE_SCHEMA = require_failsafe();
  5324. module.exports.JSON_SCHEMA = require_json();
  5325. module.exports.CORE_SCHEMA = require_core();
  5326. module.exports.DEFAULT_SCHEMA = require_default();
  5327. module.exports.load = loader.load;
  5328. module.exports.loadAll = loader.loadAll;
  5329. module.exports.dump = dumper.dump;
  5330. module.exports.YAMLException = require_exception();
  5331. module.exports.types = {
  5332. binary: require_binary(),
  5333. float: require_float(),
  5334. map: require_map(),
  5335. null: require_null(),
  5336. pairs: require_pairs(),
  5337. set: require_set(),
  5338. timestamp: require_timestamp(),
  5339. bool: require_bool(),
  5340. int: require_int(),
  5341. merge: require_merge(),
  5342. omap: require_omap(),
  5343. seq: require_seq(),
  5344. str: require_str()
  5345. };
  5346. module.exports.safeLoad = renamed("safeLoad", "load");
  5347. module.exports.safeLoadAll = renamed("safeLoadAll", "loadAll");
  5348. module.exports.safeDump = renamed("safeDump", "dump");
  5349. }
  5350. });
  5351. // node_modules/cosmiconfig/dist/loaders.js
  5352. var require_loaders = __commonJS({
  5353. "node_modules/cosmiconfig/dist/loaders.js"(exports) {
  5354. "use strict";
  5355. Object.defineProperty(exports, "__esModule", {
  5356. value: true
  5357. });
  5358. exports.loaders = void 0;
  5359. var _url = __require("url");
  5360. var importFresh;
  5361. var loadJsSync = function loadJsSync2(filepath) {
  5362. if (importFresh === void 0) {
  5363. importFresh = require_import_fresh();
  5364. }
  5365. const result = importFresh(filepath);
  5366. return result;
  5367. };
  5368. var loadJs = async function loadJs2(filepath) {
  5369. try {
  5370. const {
  5371. href
  5372. } = (0, _url.pathToFileURL)(filepath);
  5373. return (await import(href)).default;
  5374. } catch (error) {
  5375. return loadJsSync(filepath, "");
  5376. }
  5377. };
  5378. var parseJson;
  5379. var loadJson = function loadJson2(filepath, content) {
  5380. if (parseJson === void 0) {
  5381. parseJson = require_parse_json();
  5382. }
  5383. try {
  5384. const result = parseJson(content);
  5385. return result;
  5386. } catch (error) {
  5387. error.message = `JSON Error in ${filepath}:
  5388. ${error.message}`;
  5389. throw error;
  5390. }
  5391. };
  5392. var yaml;
  5393. var loadYaml = function loadYaml2(filepath, content) {
  5394. if (yaml === void 0) {
  5395. yaml = require_js_yaml();
  5396. }
  5397. try {
  5398. const result = yaml.load(content);
  5399. return result;
  5400. } catch (error) {
  5401. error.message = `YAML Error in ${filepath}:
  5402. ${error.message}`;
  5403. throw error;
  5404. }
  5405. };
  5406. var loaders = {
  5407. loadJs,
  5408. loadJsSync,
  5409. loadJson,
  5410. loadYaml
  5411. };
  5412. exports.loaders = loaders;
  5413. }
  5414. });
  5415. // node_modules/cosmiconfig/dist/ExplorerBase.js
  5416. var require_ExplorerBase = __commonJS({
  5417. "node_modules/cosmiconfig/dist/ExplorerBase.js"(exports) {
  5418. "use strict";
  5419. Object.defineProperty(exports, "__esModule", {
  5420. value: true
  5421. });
  5422. exports.ExplorerBase = void 0;
  5423. exports.getExtensionDescription = getExtensionDescription;
  5424. var _path = _interopRequireDefault(__require("path"));
  5425. var _getPropertyByPath = require_getPropertyByPath();
  5426. var _loaders = require_loaders();
  5427. function _interopRequireDefault(obj) {
  5428. return obj && obj.__esModule ? obj : { default: obj };
  5429. }
  5430. var ExplorerBase = class {
  5431. constructor(options) {
  5432. if (options.cache) {
  5433. this.loadCache = /* @__PURE__ */ new Map();
  5434. this.searchCache = /* @__PURE__ */ new Map();
  5435. }
  5436. this.config = options;
  5437. this.validateConfig();
  5438. }
  5439. clearLoadCache() {
  5440. if (this.loadCache) {
  5441. this.loadCache.clear();
  5442. }
  5443. }
  5444. clearSearchCache() {
  5445. if (this.searchCache) {
  5446. this.searchCache.clear();
  5447. }
  5448. }
  5449. clearCaches() {
  5450. this.clearLoadCache();
  5451. this.clearSearchCache();
  5452. }
  5453. validateConfig() {
  5454. const config = this.config;
  5455. config.searchPlaces.forEach((place) => {
  5456. const loaderKey = _path.default.extname(place) || "noExt";
  5457. const loader = config.loaders[loaderKey];
  5458. if (!loader) {
  5459. throw new Error(`No loader specified for ${getExtensionDescription(place)}, so searchPlaces item "${place}" is invalid`);
  5460. }
  5461. if (typeof loader !== "function") {
  5462. throw new Error(`loader for ${getExtensionDescription(place)} is not a function (type provided: "${typeof loader}"), so searchPlaces item "${place}" is invalid`);
  5463. }
  5464. });
  5465. }
  5466. shouldSearchStopWithResult(result) {
  5467. if (result === null)
  5468. return false;
  5469. return !(result.isEmpty && this.config.ignoreEmptySearchPlaces);
  5470. }
  5471. nextDirectoryToSearch(currentDir, currentResult) {
  5472. if (this.shouldSearchStopWithResult(currentResult)) {
  5473. return null;
  5474. }
  5475. const nextDir = nextDirUp(currentDir);
  5476. if (nextDir === currentDir || currentDir === this.config.stopDir) {
  5477. return null;
  5478. }
  5479. return nextDir;
  5480. }
  5481. loadPackageProp(filepath, content) {
  5482. const parsedContent = _loaders.loaders.loadJson(filepath, content);
  5483. const packagePropValue = (0, _getPropertyByPath.getPropertyByPath)(parsedContent, this.config.packageProp);
  5484. return packagePropValue || null;
  5485. }
  5486. getLoaderEntryForFile(filepath) {
  5487. if (_path.default.basename(filepath) === "package.json") {
  5488. return this.loadPackageProp.bind(this);
  5489. }
  5490. const loaderKey = _path.default.extname(filepath) || "noExt";
  5491. const loader = this.config.loaders[loaderKey];
  5492. if (!loader) {
  5493. throw new Error(`No loader specified for ${getExtensionDescription(filepath)}`);
  5494. }
  5495. return loader;
  5496. }
  5497. loadedContentToCosmiconfigResult(filepath, loadedContent, forceProp) {
  5498. if (loadedContent === null) {
  5499. return null;
  5500. }
  5501. if (loadedContent === void 0) {
  5502. return {
  5503. filepath,
  5504. config: void 0,
  5505. isEmpty: true
  5506. };
  5507. }
  5508. if (this.config.usePackagePropInConfigFiles || forceProp) {
  5509. loadedContent = (0, _getPropertyByPath.getPropertyByPath)(loadedContent, this.config.packageProp);
  5510. }
  5511. if (loadedContent === void 0) {
  5512. return {
  5513. filepath,
  5514. config: void 0,
  5515. isEmpty: true
  5516. };
  5517. }
  5518. return {
  5519. config: loadedContent,
  5520. filepath
  5521. };
  5522. }
  5523. validateFilePath(filepath) {
  5524. if (!filepath) {
  5525. throw new Error("load must pass a non-empty string");
  5526. }
  5527. }
  5528. };
  5529. exports.ExplorerBase = ExplorerBase;
  5530. function nextDirUp(dir) {
  5531. return _path.default.dirname(dir);
  5532. }
  5533. function getExtensionDescription(filepath) {
  5534. const ext = _path.default.extname(filepath);
  5535. return ext ? `extension "${ext}"` : "files without extensions";
  5536. }
  5537. }
  5538. });
  5539. // node_modules/path-type/index.js
  5540. var require_path_type = __commonJS({
  5541. "node_modules/path-type/index.js"(exports) {
  5542. "use strict";
  5543. var { promisify } = __require("util");
  5544. var fs2 = __require("fs");
  5545. async function isType(fsStatType, statsMethodName, filePath) {
  5546. if (typeof filePath !== "string") {
  5547. throw new TypeError(`Expected a string, got ${typeof filePath}`);
  5548. }
  5549. try {
  5550. const stats = await promisify(fs2[fsStatType])(filePath);
  5551. return stats[statsMethodName]();
  5552. } catch (error) {
  5553. if (error.code === "ENOENT") {
  5554. return false;
  5555. }
  5556. throw error;
  5557. }
  5558. }
  5559. function isTypeSync(fsStatType, statsMethodName, filePath) {
  5560. if (typeof filePath !== "string") {
  5561. throw new TypeError(`Expected a string, got ${typeof filePath}`);
  5562. }
  5563. try {
  5564. return fs2[fsStatType](filePath)[statsMethodName]();
  5565. } catch (error) {
  5566. if (error.code === "ENOENT") {
  5567. return false;
  5568. }
  5569. throw error;
  5570. }
  5571. }
  5572. exports.isFile = isType.bind(null, "stat", "isFile");
  5573. exports.isDirectory = isType.bind(null, "stat", "isDirectory");
  5574. exports.isSymlink = isType.bind(null, "lstat", "isSymbolicLink");
  5575. exports.isFileSync = isTypeSync.bind(null, "statSync", "isFile");
  5576. exports.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory");
  5577. exports.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink");
  5578. }
  5579. });
  5580. // node_modules/cosmiconfig/dist/getDirectory.js
  5581. var require_getDirectory = __commonJS({
  5582. "node_modules/cosmiconfig/dist/getDirectory.js"(exports) {
  5583. "use strict";
  5584. Object.defineProperty(exports, "__esModule", {
  5585. value: true
  5586. });
  5587. exports.getDirectory = getDirectory;
  5588. exports.getDirectorySync = getDirectorySync;
  5589. var _path = _interopRequireDefault(__require("path"));
  5590. var _pathType = require_path_type();
  5591. function _interopRequireDefault(obj) {
  5592. return obj && obj.__esModule ? obj : { default: obj };
  5593. }
  5594. async function getDirectory(filepath) {
  5595. const filePathIsDirectory = await (0, _pathType.isDirectory)(filepath);
  5596. if (filePathIsDirectory === true) {
  5597. return filepath;
  5598. }
  5599. const directory = _path.default.dirname(filepath);
  5600. return directory;
  5601. }
  5602. function getDirectorySync(filepath) {
  5603. const filePathIsDirectory = (0, _pathType.isDirectorySync)(filepath);
  5604. if (filePathIsDirectory === true) {
  5605. return filepath;
  5606. }
  5607. const directory = _path.default.dirname(filepath);
  5608. return directory;
  5609. }
  5610. }
  5611. });
  5612. // node_modules/cosmiconfig/dist/readFile.js
  5613. var require_readFile = __commonJS({
  5614. "node_modules/cosmiconfig/dist/readFile.js"(exports) {
  5615. "use strict";
  5616. Object.defineProperty(exports, "__esModule", {
  5617. value: true
  5618. });
  5619. exports.readFile = readFile;
  5620. exports.readFileSync = readFileSync;
  5621. var _fs = _interopRequireDefault(__require("fs"));
  5622. function _interopRequireDefault(obj) {
  5623. return obj && obj.__esModule ? obj : { default: obj };
  5624. }
  5625. async function fsReadFileAsync(pathname, encoding) {
  5626. return new Promise((resolve, reject) => {
  5627. _fs.default.readFile(pathname, encoding, (error, contents) => {
  5628. if (error) {
  5629. reject(error);
  5630. return;
  5631. }
  5632. resolve(contents);
  5633. });
  5634. });
  5635. }
  5636. async function readFile(filepath, options = {}) {
  5637. const throwNotFound = options.throwNotFound === true;
  5638. try {
  5639. const content = await fsReadFileAsync(filepath, "utf8");
  5640. return content;
  5641. } catch (error) {
  5642. if (throwNotFound === false && (error.code === "ENOENT" || error.code === "EISDIR")) {
  5643. return null;
  5644. }
  5645. throw error;
  5646. }
  5647. }
  5648. function readFileSync(filepath, options = {}) {
  5649. const throwNotFound = options.throwNotFound === true;
  5650. try {
  5651. const content = _fs.default.readFileSync(filepath, "utf8");
  5652. return content;
  5653. } catch (error) {
  5654. if (throwNotFound === false && (error.code === "ENOENT" || error.code === "EISDIR")) {
  5655. return null;
  5656. }
  5657. throw error;
  5658. }
  5659. }
  5660. }
  5661. });
  5662. // node_modules/cosmiconfig/dist/Explorer.js
  5663. var require_Explorer = __commonJS({
  5664. "node_modules/cosmiconfig/dist/Explorer.js"(exports) {
  5665. "use strict";
  5666. Object.defineProperty(exports, "__esModule", {
  5667. value: true
  5668. });
  5669. exports.Explorer = void 0;
  5670. var _path = _interopRequireDefault(__require("path"));
  5671. var _cacheWrapper = require_cacheWrapper();
  5672. var _ExplorerBase = require_ExplorerBase();
  5673. var _getDirectory = require_getDirectory();
  5674. var _readFile = require_readFile();
  5675. function _interopRequireDefault(obj) {
  5676. return obj && obj.__esModule ? obj : { default: obj };
  5677. }
  5678. var Explorer = class extends _ExplorerBase.ExplorerBase {
  5679. constructor(options) {
  5680. super(options);
  5681. }
  5682. async search(searchFrom = process.cwd()) {
  5683. if (this.config.metaConfigFilePath) {
  5684. const config = await this._loadFile(this.config.metaConfigFilePath, true);
  5685. if (config && !config.isEmpty) {
  5686. return config;
  5687. }
  5688. }
  5689. return await this.searchFromDirectory(await (0, _getDirectory.getDirectory)(searchFrom));
  5690. }
  5691. async searchFromDirectory(dir) {
  5692. const absoluteDir = _path.default.resolve(process.cwd(), dir);
  5693. const run = async () => {
  5694. const result = await this.searchDirectory(absoluteDir);
  5695. const nextDir = this.nextDirectoryToSearch(absoluteDir, result);
  5696. if (nextDir) {
  5697. return this.searchFromDirectory(nextDir);
  5698. }
  5699. return await this.config.transform(result);
  5700. };
  5701. if (this.searchCache) {
  5702. return (0, _cacheWrapper.cacheWrapper)(this.searchCache, absoluteDir, run);
  5703. }
  5704. return run();
  5705. }
  5706. async searchDirectory(dir) {
  5707. for await (const place of this.config.searchPlaces) {
  5708. const placeResult = await this.loadSearchPlace(dir, place);
  5709. if (this.shouldSearchStopWithResult(placeResult)) {
  5710. return placeResult;
  5711. }
  5712. }
  5713. return null;
  5714. }
  5715. async loadSearchPlace(dir, place) {
  5716. const filepath = _path.default.join(dir, place);
  5717. const fileContents = await (0, _readFile.readFile)(filepath);
  5718. return await this.createCosmiconfigResult(filepath, fileContents, false);
  5719. }
  5720. async loadFileContent(filepath, content) {
  5721. if (content === null) {
  5722. return null;
  5723. }
  5724. if (content.trim() === "") {
  5725. return void 0;
  5726. }
  5727. const loader = this.getLoaderEntryForFile(filepath);
  5728. try {
  5729. return await loader(filepath, content);
  5730. } catch (e) {
  5731. e.filepath = filepath;
  5732. throw e;
  5733. }
  5734. }
  5735. async createCosmiconfigResult(filepath, content, forceProp) {
  5736. const fileContent = await this.loadFileContent(filepath, content);
  5737. return this.loadedContentToCosmiconfigResult(filepath, fileContent, forceProp);
  5738. }
  5739. async load(filepath) {
  5740. return this._loadFile(filepath, false);
  5741. }
  5742. async _loadFile(filepath, forceProp) {
  5743. this.validateFilePath(filepath);
  5744. const absoluteFilePath = _path.default.resolve(process.cwd(), filepath);
  5745. const runLoad = async () => {
  5746. const fileContents = await (0, _readFile.readFile)(absoluteFilePath, {
  5747. throwNotFound: true
  5748. });
  5749. const result = await this.createCosmiconfigResult(absoluteFilePath, fileContents, forceProp);
  5750. return await this.config.transform(result);
  5751. };
  5752. if (this.loadCache) {
  5753. return (0, _cacheWrapper.cacheWrapper)(this.loadCache, absoluteFilePath, runLoad);
  5754. }
  5755. return runLoad();
  5756. }
  5757. };
  5758. exports.Explorer = Explorer;
  5759. }
  5760. });
  5761. // node_modules/cosmiconfig/dist/ExplorerSync.js
  5762. var require_ExplorerSync = __commonJS({
  5763. "node_modules/cosmiconfig/dist/ExplorerSync.js"(exports) {
  5764. "use strict";
  5765. Object.defineProperty(exports, "__esModule", {
  5766. value: true
  5767. });
  5768. exports.ExplorerSync = void 0;
  5769. var _path = _interopRequireDefault(__require("path"));
  5770. var _cacheWrapper = require_cacheWrapper();
  5771. var _ExplorerBase = require_ExplorerBase();
  5772. var _getDirectory = require_getDirectory();
  5773. var _readFile = require_readFile();
  5774. function _interopRequireDefault(obj) {
  5775. return obj && obj.__esModule ? obj : { default: obj };
  5776. }
  5777. var ExplorerSync = class extends _ExplorerBase.ExplorerBase {
  5778. constructor(options) {
  5779. super(options);
  5780. }
  5781. searchSync(searchFrom = process.cwd()) {
  5782. if (this.config.metaConfigFilePath) {
  5783. const config = this._loadFileSync(this.config.metaConfigFilePath, true);
  5784. if (config && !config.isEmpty) {
  5785. return config;
  5786. }
  5787. }
  5788. return this.searchFromDirectorySync((0, _getDirectory.getDirectorySync)(searchFrom));
  5789. }
  5790. searchFromDirectorySync(dir) {
  5791. const absoluteDir = _path.default.resolve(process.cwd(), dir);
  5792. const run = () => {
  5793. const result = this.searchDirectorySync(absoluteDir);
  5794. const nextDir = this.nextDirectoryToSearch(absoluteDir, result);
  5795. if (nextDir) {
  5796. return this.searchFromDirectorySync(nextDir);
  5797. }
  5798. return this.config.transform(result);
  5799. };
  5800. if (this.searchCache) {
  5801. return (0, _cacheWrapper.cacheWrapperSync)(this.searchCache, absoluteDir, run);
  5802. }
  5803. return run();
  5804. }
  5805. searchDirectorySync(dir) {
  5806. for (const place of this.config.searchPlaces) {
  5807. const placeResult = this.loadSearchPlaceSync(dir, place);
  5808. if (this.shouldSearchStopWithResult(placeResult)) {
  5809. return placeResult;
  5810. }
  5811. }
  5812. return null;
  5813. }
  5814. loadSearchPlaceSync(dir, place) {
  5815. const filepath = _path.default.join(dir, place);
  5816. const content = (0, _readFile.readFileSync)(filepath);
  5817. return this.createCosmiconfigResultSync(filepath, content, false);
  5818. }
  5819. loadFileContentSync(filepath, content) {
  5820. if (content === null) {
  5821. return null;
  5822. }
  5823. if (content.trim() === "") {
  5824. return void 0;
  5825. }
  5826. const loader = this.getLoaderEntryForFile(filepath);
  5827. try {
  5828. return loader(filepath, content);
  5829. } catch (e) {
  5830. e.filepath = filepath;
  5831. throw e;
  5832. }
  5833. }
  5834. createCosmiconfigResultSync(filepath, content, forceProp) {
  5835. const fileContent = this.loadFileContentSync(filepath, content);
  5836. return this.loadedContentToCosmiconfigResult(filepath, fileContent, forceProp);
  5837. }
  5838. loadSync(filepath) {
  5839. return this._loadFileSync(filepath, false);
  5840. }
  5841. _loadFileSync(filepath, forceProp) {
  5842. this.validateFilePath(filepath);
  5843. const absoluteFilePath = _path.default.resolve(process.cwd(), filepath);
  5844. const runLoadSync = () => {
  5845. const content = (0, _readFile.readFileSync)(absoluteFilePath, {
  5846. throwNotFound: true
  5847. });
  5848. const cosmiconfigResult = this.createCosmiconfigResultSync(absoluteFilePath, content, forceProp);
  5849. return this.config.transform(cosmiconfigResult);
  5850. };
  5851. if (this.loadCache) {
  5852. return (0, _cacheWrapper.cacheWrapperSync)(this.loadCache, absoluteFilePath, runLoadSync);
  5853. }
  5854. return runLoadSync();
  5855. }
  5856. };
  5857. exports.ExplorerSync = ExplorerSync;
  5858. }
  5859. });
  5860. // node_modules/cosmiconfig/dist/types.js
  5861. var require_types = __commonJS({
  5862. "node_modules/cosmiconfig/dist/types.js"(exports) {
  5863. "use strict";
  5864. Object.defineProperty(exports, "__esModule", {
  5865. value: true
  5866. });
  5867. }
  5868. });
  5869. // node_modules/cosmiconfig/dist/index.js
  5870. var require_dist = __commonJS({
  5871. "node_modules/cosmiconfig/dist/index.js"(exports) {
  5872. "use strict";
  5873. Object.defineProperty(exports, "__esModule", {
  5874. value: true
  5875. });
  5876. exports.cosmiconfig = cosmiconfig2;
  5877. exports.cosmiconfigSync = cosmiconfigSync;
  5878. exports.metaSearchPlaces = exports.defaultLoadersSync = exports.defaultLoaders = void 0;
  5879. var _os = _interopRequireDefault(__require("os"));
  5880. var _Explorer = require_Explorer();
  5881. var _ExplorerSync = require_ExplorerSync();
  5882. var _loaders = require_loaders();
  5883. var _types = require_types();
  5884. function _interopRequireDefault(obj) {
  5885. return obj && obj.__esModule ? obj : { default: obj };
  5886. }
  5887. var metaSearchPlaces = ["package.json", ".config.json", ".config.yaml", ".config.yml", ".config.js", ".config.cjs", ".config.mjs"];
  5888. exports.metaSearchPlaces = metaSearchPlaces;
  5889. var defaultLoaders = Object.freeze({
  5890. ".mjs": _loaders.loaders.loadJs,
  5891. ".cjs": _loaders.loaders.loadJs,
  5892. ".js": _loaders.loaders.loadJs,
  5893. ".json": _loaders.loaders.loadJson,
  5894. ".yaml": _loaders.loaders.loadYaml,
  5895. ".yml": _loaders.loaders.loadYaml,
  5896. noExt: _loaders.loaders.loadYaml
  5897. });
  5898. exports.defaultLoaders = defaultLoaders;
  5899. var defaultLoadersSync = Object.freeze({
  5900. ".cjs": _loaders.loaders.loadJsSync,
  5901. ".js": _loaders.loaders.loadJsSync,
  5902. ".json": _loaders.loaders.loadJson,
  5903. ".yaml": _loaders.loaders.loadYaml,
  5904. ".yml": _loaders.loaders.loadYaml,
  5905. noExt: _loaders.loaders.loadYaml
  5906. });
  5907. exports.defaultLoadersSync = defaultLoadersSync;
  5908. var identity = function identity2(x) {
  5909. return x;
  5910. };
  5911. function replaceMetaPlaceholders(paths, moduleName) {
  5912. return paths.map((path) => path.replace("{name}", moduleName));
  5913. }
  5914. function getExplorerOptions(moduleName, options) {
  5915. var _metaConfig$config;
  5916. const metaExplorer = new _ExplorerSync.ExplorerSync({
  5917. packageProp: "cosmiconfig",
  5918. stopDir: process.cwd(),
  5919. searchPlaces: metaSearchPlaces,
  5920. ignoreEmptySearchPlaces: false,
  5921. usePackagePropInConfigFiles: true,
  5922. loaders: defaultLoaders,
  5923. transform: identity,
  5924. cache: true,
  5925. metaConfigFilePath: null
  5926. });
  5927. const metaConfig = metaExplorer.searchSync();
  5928. if (!metaConfig) {
  5929. return options;
  5930. }
  5931. if ((_metaConfig$config = metaConfig.config) !== null && _metaConfig$config !== void 0 && _metaConfig$config.loaders) {
  5932. throw new Error("Can not specify loaders in meta config file");
  5933. }
  5934. const overrideOptions = metaConfig.config ?? {};
  5935. if (overrideOptions.searchPlaces) {
  5936. overrideOptions.searchPlaces = replaceMetaPlaceholders(overrideOptions.searchPlaces, moduleName);
  5937. }
  5938. overrideOptions.metaConfigFilePath = metaConfig.filepath;
  5939. return {
  5940. ...options,
  5941. ...overrideOptions
  5942. };
  5943. }
  5944. function cosmiconfig2(moduleName, options = {}) {
  5945. const explorerOptions = getExplorerOptions(moduleName, options);
  5946. const normalizedOptions = normalizeOptions(moduleName, explorerOptions);
  5947. const explorer = new _Explorer.Explorer(normalizedOptions);
  5948. return {
  5949. search: explorer.search.bind(explorer),
  5950. load: explorer.load.bind(explorer),
  5951. clearLoadCache: explorer.clearLoadCache.bind(explorer),
  5952. clearSearchCache: explorer.clearSearchCache.bind(explorer),
  5953. clearCaches: explorer.clearCaches.bind(explorer)
  5954. };
  5955. }
  5956. function cosmiconfigSync(moduleName, options = {}) {
  5957. const explorerOptions = getExplorerOptions(moduleName, options);
  5958. const normalizedOptions = normalizeOptionsSync(moduleName, explorerOptions);
  5959. const explorerSync = new _ExplorerSync.ExplorerSync(normalizedOptions);
  5960. return {
  5961. search: explorerSync.searchSync.bind(explorerSync),
  5962. load: explorerSync.loadSync.bind(explorerSync),
  5963. clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync),
  5964. clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync),
  5965. clearCaches: explorerSync.clearCaches.bind(explorerSync)
  5966. };
  5967. }
  5968. function normalizeOptions(moduleName, options) {
  5969. const defaults = {
  5970. packageProp: moduleName,
  5971. 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),
  5972. ignoreEmptySearchPlaces: true,
  5973. stopDir: _os.default.homedir(),
  5974. cache: true,
  5975. transform: identity,
  5976. loaders: defaultLoaders,
  5977. metaConfigFilePath: null
  5978. };
  5979. const normalizedOptions = {
  5980. ...defaults,
  5981. ...options,
  5982. loaders: {
  5983. ...defaults.loaders,
  5984. ...options.loaders
  5985. }
  5986. };
  5987. return normalizedOptions;
  5988. }
  5989. function normalizeOptionsSync(moduleName, options) {
  5990. const defaults = {
  5991. packageProp: moduleName,
  5992. 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`],
  5993. ignoreEmptySearchPlaces: true,
  5994. stopDir: _os.default.homedir(),
  5995. cache: true,
  5996. transform: identity,
  5997. loaders: defaultLoadersSync,
  5998. metaConfigFilePath: null
  5999. };
  6000. const normalizedOptions = {
  6001. ...defaults,
  6002. ...options,
  6003. loaders: {
  6004. ...defaults.loaders,
  6005. ...options.loaders
  6006. }
  6007. };
  6008. return normalizedOptions;
  6009. }
  6010. }
  6011. });
  6012. // node_modules/find-parent-dir/index.js
  6013. var require_find_parent_dir = __commonJS({
  6014. "node_modules/find-parent-dir/index.js"(exports, module) {
  6015. "use strict";
  6016. var path = __require("path");
  6017. var fs2 = __require("fs");
  6018. var exists = fs2.exists || path.exists;
  6019. var existsSync = fs2.existsSync || path.existsSync;
  6020. function splitPath(path2) {
  6021. var parts = path2.split(/(\/|\\)/);
  6022. if (!parts.length)
  6023. return parts;
  6024. return !parts[0].length ? parts.slice(1) : parts;
  6025. }
  6026. exports = module.exports = function(currentFullPath, clue, cb) {
  6027. function testDir(parts) {
  6028. if (parts.length === 0)
  6029. return cb(null, null);
  6030. var p = parts.join("");
  6031. exists(path.join(p, clue), function(itdoes) {
  6032. if (itdoes)
  6033. return cb(null, p);
  6034. testDir(parts.slice(0, -1));
  6035. });
  6036. }
  6037. testDir(splitPath(currentFullPath));
  6038. };
  6039. exports.sync = function(currentFullPath, clue) {
  6040. function testDir(parts) {
  6041. if (parts.length === 0)
  6042. return null;
  6043. var p = parts.join("");
  6044. var itdoes = existsSync(path.join(p, clue));
  6045. return itdoes ? p : testDir(parts.slice(0, -1));
  6046. }
  6047. return testDir(splitPath(currentFullPath));
  6048. };
  6049. }
  6050. });
  6051. // node_modules/ci-info/vendors.json
  6052. var require_vendors = __commonJS({
  6053. "node_modules/ci-info/vendors.json"(exports, module) {
  6054. module.exports = [
  6055. {
  6056. name: "Appcircle",
  6057. constant: "APPCIRCLE",
  6058. env: "AC_APPCIRCLE"
  6059. },
  6060. {
  6061. name: "AppVeyor",
  6062. constant: "APPVEYOR",
  6063. env: "APPVEYOR",
  6064. pr: "APPVEYOR_PULL_REQUEST_NUMBER"
  6065. },
  6066. {
  6067. name: "AWS CodeBuild",
  6068. constant: "CODEBUILD",
  6069. env: "CODEBUILD_BUILD_ARN"
  6070. },
  6071. {
  6072. name: "Azure Pipelines",
  6073. constant: "AZURE_PIPELINES",
  6074. env: "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
  6075. pr: "SYSTEM_PULLREQUEST_PULLREQUESTID"
  6076. },
  6077. {
  6078. name: "Bamboo",
  6079. constant: "BAMBOO",
  6080. env: "bamboo_planKey"
  6081. },
  6082. {
  6083. name: "Bitbucket Pipelines",
  6084. constant: "BITBUCKET",
  6085. env: "BITBUCKET_COMMIT",
  6086. pr: "BITBUCKET_PR_ID"
  6087. },
  6088. {
  6089. name: "Bitrise",
  6090. constant: "BITRISE",
  6091. env: "BITRISE_IO",
  6092. pr: "BITRISE_PULL_REQUEST"
  6093. },
  6094. {
  6095. name: "Buddy",
  6096. constant: "BUDDY",
  6097. env: "BUDDY_WORKSPACE_ID",
  6098. pr: "BUDDY_EXECUTION_PULL_REQUEST_ID"
  6099. },
  6100. {
  6101. name: "Buildkite",
  6102. constant: "BUILDKITE",
  6103. env: "BUILDKITE",
  6104. pr: {
  6105. env: "BUILDKITE_PULL_REQUEST",
  6106. ne: "false"
  6107. }
  6108. },
  6109. {
  6110. name: "CircleCI",
  6111. constant: "CIRCLE",
  6112. env: "CIRCLECI",
  6113. pr: "CIRCLE_PULL_REQUEST"
  6114. },
  6115. {
  6116. name: "Cirrus CI",
  6117. constant: "CIRRUS",
  6118. env: "CIRRUS_CI",
  6119. pr: "CIRRUS_PR"
  6120. },
  6121. {
  6122. name: "Codefresh",
  6123. constant: "CODEFRESH",
  6124. env: "CF_BUILD_ID",
  6125. pr: {
  6126. any: [
  6127. "CF_PULL_REQUEST_NUMBER",
  6128. "CF_PULL_REQUEST_ID"
  6129. ]
  6130. }
  6131. },
  6132. {
  6133. name: "Codemagic",
  6134. constant: "CODEMAGIC",
  6135. env: "CM_BUILD_ID",
  6136. pr: "CM_PULL_REQUEST"
  6137. },
  6138. {
  6139. name: "Codeship",
  6140. constant: "CODESHIP",
  6141. env: {
  6142. CI_NAME: "codeship"
  6143. }
  6144. },
  6145. {
  6146. name: "Drone",
  6147. constant: "DRONE",
  6148. env: "DRONE",
  6149. pr: {
  6150. DRONE_BUILD_EVENT: "pull_request"
  6151. }
  6152. },
  6153. {
  6154. name: "dsari",
  6155. constant: "DSARI",
  6156. env: "DSARI"
  6157. },
  6158. {
  6159. name: "Expo Application Services",
  6160. constant: "EAS",
  6161. env: "EAS_BUILD"
  6162. },
  6163. {
  6164. name: "Gerrit",
  6165. constant: "GERRIT",
  6166. env: "GERRIT_PROJECT"
  6167. },
  6168. {
  6169. name: "GitHub Actions",
  6170. constant: "GITHUB_ACTIONS",
  6171. env: "GITHUB_ACTIONS",
  6172. pr: {
  6173. GITHUB_EVENT_NAME: "pull_request"
  6174. }
  6175. },
  6176. {
  6177. name: "GitLab CI",
  6178. constant: "GITLAB",
  6179. env: "GITLAB_CI",
  6180. pr: "CI_MERGE_REQUEST_ID"
  6181. },
  6182. {
  6183. name: "GoCD",
  6184. constant: "GOCD",
  6185. env: "GO_PIPELINE_LABEL"
  6186. },
  6187. {
  6188. name: "Google Cloud Build",
  6189. constant: "GOOGLE_CLOUD_BUILD",
  6190. env: "BUILDER_OUTPUT"
  6191. },
  6192. {
  6193. name: "Harness CI",
  6194. constant: "HARNESS",
  6195. env: "HARNESS_BUILD_ID"
  6196. },
  6197. {
  6198. name: "Heroku",
  6199. constant: "HEROKU",
  6200. env: {
  6201. env: "NODE",
  6202. includes: "/app/.heroku/node/bin/node"
  6203. }
  6204. },
  6205. {
  6206. name: "Hudson",
  6207. constant: "HUDSON",
  6208. env: "HUDSON_URL"
  6209. },
  6210. {
  6211. name: "Jenkins",
  6212. constant: "JENKINS",
  6213. env: [
  6214. "JENKINS_URL",
  6215. "BUILD_ID"
  6216. ],
  6217. pr: {
  6218. any: [
  6219. "ghprbPullId",
  6220. "CHANGE_ID"
  6221. ]
  6222. }
  6223. },
  6224. {
  6225. name: "LayerCI",
  6226. constant: "LAYERCI",
  6227. env: "LAYERCI",
  6228. pr: "LAYERCI_PULL_REQUEST"
  6229. },
  6230. {
  6231. name: "Magnum CI",
  6232. constant: "MAGNUM",
  6233. env: "MAGNUM"
  6234. },
  6235. {
  6236. name: "Netlify CI",
  6237. constant: "NETLIFY",
  6238. env: "NETLIFY",
  6239. pr: {
  6240. env: "PULL_REQUEST",
  6241. ne: "false"
  6242. }
  6243. },
  6244. {
  6245. name: "Nevercode",
  6246. constant: "NEVERCODE",
  6247. env: "NEVERCODE",
  6248. pr: {
  6249. env: "NEVERCODE_PULL_REQUEST",
  6250. ne: "false"
  6251. }
  6252. },
  6253. {
  6254. name: "ReleaseHub",
  6255. constant: "RELEASEHUB",
  6256. env: "RELEASE_BUILD_ID"
  6257. },
  6258. {
  6259. name: "Render",
  6260. constant: "RENDER",
  6261. env: "RENDER",
  6262. pr: {
  6263. IS_PULL_REQUEST: "true"
  6264. }
  6265. },
  6266. {
  6267. name: "Sail CI",
  6268. constant: "SAIL",
  6269. env: "SAILCI",
  6270. pr: "SAIL_PULL_REQUEST_NUMBER"
  6271. },
  6272. {
  6273. name: "Screwdriver",
  6274. constant: "SCREWDRIVER",
  6275. env: "SCREWDRIVER",
  6276. pr: {
  6277. env: "SD_PULL_REQUEST",
  6278. ne: "false"
  6279. }
  6280. },
  6281. {
  6282. name: "Semaphore",
  6283. constant: "SEMAPHORE",
  6284. env: "SEMAPHORE",
  6285. pr: "PULL_REQUEST_NUMBER"
  6286. },
  6287. {
  6288. name: "Shippable",
  6289. constant: "SHIPPABLE",
  6290. env: "SHIPPABLE",
  6291. pr: {
  6292. IS_PULL_REQUEST: "true"
  6293. }
  6294. },
  6295. {
  6296. name: "Solano CI",
  6297. constant: "SOLANO",
  6298. env: "TDDIUM",
  6299. pr: "TDDIUM_PR_ID"
  6300. },
  6301. {
  6302. name: "Sourcehut",
  6303. constant: "SOURCEHUT",
  6304. env: {
  6305. CI_NAME: "sourcehut"
  6306. }
  6307. },
  6308. {
  6309. name: "Strider CD",
  6310. constant: "STRIDER",
  6311. env: "STRIDER"
  6312. },
  6313. {
  6314. name: "TaskCluster",
  6315. constant: "TASKCLUSTER",
  6316. env: [
  6317. "TASK_ID",
  6318. "RUN_ID"
  6319. ]
  6320. },
  6321. {
  6322. name: "TeamCity",
  6323. constant: "TEAMCITY",
  6324. env: "TEAMCITY_VERSION"
  6325. },
  6326. {
  6327. name: "Travis CI",
  6328. constant: "TRAVIS",
  6329. env: "TRAVIS",
  6330. pr: {
  6331. env: "TRAVIS_PULL_REQUEST",
  6332. ne: "false"
  6333. }
  6334. },
  6335. {
  6336. name: "Vercel",
  6337. constant: "VERCEL",
  6338. env: {
  6339. any: [
  6340. "NOW_BUILDER",
  6341. "VERCEL"
  6342. ]
  6343. }
  6344. },
  6345. {
  6346. name: "Visual Studio App Center",
  6347. constant: "APPCENTER",
  6348. env: "APPCENTER_BUILD_ID"
  6349. },
  6350. {
  6351. name: "Woodpecker",
  6352. constant: "WOODPECKER",
  6353. env: {
  6354. CI: "woodpecker"
  6355. },
  6356. pr: {
  6357. CI_BUILD_EVENT: "pull_request"
  6358. }
  6359. },
  6360. {
  6361. name: "Xcode Cloud",
  6362. constant: "XCODE_CLOUD",
  6363. env: "CI_XCODE_PROJECT",
  6364. pr: "CI_PULL_REQUEST_NUMBER"
  6365. },
  6366. {
  6367. name: "Xcode Server",
  6368. constant: "XCODE_SERVER",
  6369. env: "XCS"
  6370. }
  6371. ];
  6372. }
  6373. });
  6374. // node_modules/ci-info/index.js
  6375. var require_ci_info = __commonJS({
  6376. "node_modules/ci-info/index.js"(exports) {
  6377. "use strict";
  6378. var vendors = require_vendors();
  6379. var env = process.env;
  6380. Object.defineProperty(exports, "_vendors", {
  6381. value: vendors.map(function(v) {
  6382. return v.constant;
  6383. })
  6384. });
  6385. exports.name = null;
  6386. exports.isPR = null;
  6387. vendors.forEach(function(vendor) {
  6388. const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
  6389. const isCI2 = envs.every(function(obj) {
  6390. return checkEnv(obj);
  6391. });
  6392. exports[vendor.constant] = isCI2;
  6393. if (!isCI2) {
  6394. return;
  6395. }
  6396. exports.name = vendor.name;
  6397. switch (typeof vendor.pr) {
  6398. case "string":
  6399. exports.isPR = !!env[vendor.pr];
  6400. break;
  6401. case "object":
  6402. if ("env" in vendor.pr) {
  6403. exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
  6404. } else if ("any" in vendor.pr) {
  6405. exports.isPR = vendor.pr.any.some(function(key) {
  6406. return !!env[key];
  6407. });
  6408. } else {
  6409. exports.isPR = checkEnv(vendor.pr);
  6410. }
  6411. break;
  6412. default:
  6413. exports.isPR = null;
  6414. }
  6415. });
  6416. exports.isCI = !!(env.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false'
  6417. (env.BUILD_ID || // Jenkins, Cloudbees
  6418. env.BUILD_NUMBER || // Jenkins, TeamCity
  6419. env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
  6420. env.CI_APP_ID || // Appflow
  6421. env.CI_BUILD_ID || // Appflow
  6422. env.CI_BUILD_NUMBER || // Appflow
  6423. env.CI_NAME || // Codeship and others
  6424. env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
  6425. env.RUN_ID || // TaskCluster, dsari
  6426. exports.name || false));
  6427. function checkEnv(obj) {
  6428. if (typeof obj === "string")
  6429. return !!env[obj];
  6430. if ("env" in obj) {
  6431. return env[obj.env] && env[obj.env].includes(obj.includes);
  6432. }
  6433. if ("any" in obj) {
  6434. return obj.any.some(function(k) {
  6435. return !!env[k];
  6436. });
  6437. }
  6438. return Object.keys(obj).every(function(k) {
  6439. return env[k] === obj[k];
  6440. });
  6441. }
  6442. }
  6443. });
  6444. // src/common/mockable.js
  6445. var import_cosmiconfig = __toESM(require_dist(), 1);
  6446. var import_find_parent_dir = __toESM(require_find_parent_dir(), 1);
  6447. import fs from "fs/promises";
  6448. // node_modules/get-stdin/index.js
  6449. var { stdin } = process;
  6450. async function getStdin() {
  6451. let result = "";
  6452. if (stdin.isTTY) {
  6453. return result;
  6454. }
  6455. stdin.setEncoding("utf8");
  6456. for await (const chunk of stdin) {
  6457. result += chunk;
  6458. }
  6459. return result;
  6460. }
  6461. getStdin.buffer = async () => {
  6462. const result = [];
  6463. let length = 0;
  6464. if (stdin.isTTY) {
  6465. return Buffer.concat([]);
  6466. }
  6467. for await (const chunk of stdin) {
  6468. result.push(chunk);
  6469. length += chunk.length;
  6470. }
  6471. return Buffer.concat(result, length);
  6472. };
  6473. // src/common/mockable.js
  6474. var import_ci_info = __toESM(require_ci_info(), 1);
  6475. function writeFormattedFile(file, data) {
  6476. return fs.writeFile(file, data);
  6477. }
  6478. var mockable = {
  6479. cosmiconfig: import_cosmiconfig.cosmiconfig,
  6480. findParentDir: import_find_parent_dir.sync,
  6481. getStdin,
  6482. isCI: () => import_ci_info.isCI,
  6483. writeFormattedFile
  6484. };
  6485. var mockable_default = mockable;
  6486. export {
  6487. mockable_default as default
  6488. };